From 7902bea17fdd17330749e93d2e53ad4a9bd610e5 Mon Sep 17 00:00:00 2001 From: tillvit Date: Mon, 7 Oct 2024 18:44:29 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tillvit/?= =?UTF-8?q?smeditor@4f2c0a1cd77324d1a0ef8b1c870e7e71ce2a660e=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-b2d4070f.js => AnimatedSprite-fe6fab2d.js | 2 +- ...er-eb846239.js => ChartManager-a4938337.js | 64 +++++++++---------- HoldBody-c167b8e7.js => HoldBody-7c69d162.js | 2 +- ...6a5f8a13.js => NodeFileHandler-bfbfd5ad.js | 6 +- Noteskin-d1f8b157.js => Noteskin-0136a2b5.js | 2 +- Noteskin-6e682e6f.js => Noteskin-1189f7fb.js | 2 +- Noteskin-2e3fb130.js => Noteskin-2e945f65.js | 2 +- Noteskin-76755dcc.js => Noteskin-4163467c.js | 2 +- Noteskin-38a763d9.js => Noteskin-44caf370.js | 2 +- Noteskin-42c53605.js => Noteskin-5b1b2407.js | 2 +- Noteskin-42298fb1.js => Noteskin-5d1a05aa.js | 2 +- Noteskin-ff479165.js => Noteskin-63e31f76.js | 2 +- Noteskin-803fa9d7.js => Noteskin-657b4cb0.js | 2 +- Noteskin-5725b491.js => Noteskin-69c5b4b7.js | 2 +- Noteskin-f717025c.js => Noteskin-7e011e81.js | 2 +- Noteskin-092cf15a.js => Noteskin-8c62d8ce.js | 2 +- Noteskin-c09b95ff.js => Noteskin-9f92ab0e.js | 2 +- Noteskin-64efdd72.js => Noteskin-b2279a2b.js | 2 +- Noteskin-da5b9f1d.js => Noteskin-b32d01e2.js | 2 +- Noteskin-73e877f6.js => Noteskin-f9326759.js | 2 +- app.js | 2 +- app/index.html | 2 +- ...ader-df03ddd3.js => downloader-0aae82d5.js | 2 +- embed.js | 2 +- embed/index.html | 2 +- memory-5b775533.js => memory-5d567038.js | 2 +- sw.js | 2 +- 27 files changed, 60 insertions(+), 60 deletions(-) rename AnimatedSprite-b2d4070f.js => AnimatedSprite-fe6fab2d.js (98%) rename ChartManager-eb846239.js => ChartManager-a4938337.js (77%) rename HoldBody-c167b8e7.js => HoldBody-7c69d162.js (98%) rename NodeFileHandler-6a5f8a13.js => NodeFileHandler-bfbfd5ad.js (86%) rename Noteskin-d1f8b157.js => Noteskin-0136a2b5.js (99%) rename Noteskin-6e682e6f.js => Noteskin-1189f7fb.js (97%) rename Noteskin-2e3fb130.js => Noteskin-2e945f65.js (99%) rename Noteskin-76755dcc.js => Noteskin-4163467c.js (99%) rename Noteskin-38a763d9.js => Noteskin-44caf370.js (98%) rename Noteskin-42c53605.js => Noteskin-5b1b2407.js (99%) rename Noteskin-42298fb1.js => Noteskin-5d1a05aa.js (99%) rename Noteskin-ff479165.js => Noteskin-63e31f76.js (98%) rename Noteskin-803fa9d7.js => Noteskin-657b4cb0.js (97%) rename Noteskin-5725b491.js => Noteskin-69c5b4b7.js (99%) rename Noteskin-f717025c.js => Noteskin-7e011e81.js (99%) rename Noteskin-092cf15a.js => Noteskin-8c62d8ce.js (98%) rename Noteskin-c09b95ff.js => Noteskin-9f92ab0e.js (99%) rename Noteskin-64efdd72.js => Noteskin-b2279a2b.js (99%) rename Noteskin-da5b9f1d.js => Noteskin-b32d01e2.js (99%) rename Noteskin-73e877f6.js => Noteskin-f9326759.js (99%) rename downloader-df03ddd3.js => downloader-0aae82d5.js (97%) rename memory-5b775533.js => memory-5d567038.js (98%) diff --git a/AnimatedSprite-b2d4070f.js b/AnimatedSprite-fe6fab2d.js similarity index 98% rename from AnimatedSprite-b2d4070f.js rename to AnimatedSprite-fe6fab2d.js index a3cf6d2b..a183a2ba 100644 --- a/AnimatedSprite-b2d4070f.js +++ b/AnimatedSprite-fe6fab2d.js @@ -1 +1 @@ -import{H as a,s as r,c as h,U as u}from"./ChartManager-eb846239.js";class n extends a{constructor(t,e=!0){super(t[0]instanceof r?t[0]:t[0].texture),this._textures=null,this._durations=null,this._autoUpdate=e,this._isConnectedToTicker=!1,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this.update,this),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this.update,this,u.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,s=this.currentFrame;if(this._durations!==null){let i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];const o=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):s!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrames)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(t){const e=[];for(let s=0;sthis.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this.update,this),this._isConnectedToTicker=!0))}}export{n as A}; +import{H as a,s as r,c as h,U as u}from"./ChartManager-a4938337.js";class n extends a{constructor(t,e=!0){super(t[0]instanceof r?t[0]:t[0].texture),this._textures=null,this._durations=null,this._autoUpdate=e,this._isConnectedToTicker=!1,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this.update,this),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this.update,this,u.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,s=this.currentFrame;if(this._durations!==null){let i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];const o=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):s!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrames)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(t){const e=[];for(let s=0;sthis.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this.update,this),this._isConnectedToTicker=!0))}}export{n as A}; diff --git a/ChartManager-eb846239.js b/ChartManager-a4938337.js similarity index 77% rename from ChartManager-eb846239.js rename to ChartManager-a4938337.js index b963af67..c6ebbcab 100644 --- a/ChartManager-eb846239.js +++ b/ChartManager-a4938337.js @@ -1,15 +1,15 @@ -var Ay=Object.defineProperty;var Sy=(r,e,t)=>e in r?Ay(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ks=(r,e,t)=>(Sy(r,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(s){if(s.ep)return;s.ep=!0;const n=t(s);fetch(s.href,n)}})();var Ss=(r=>(r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2",r))(Ss||{}),Sf=(r=>(r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS",r))(Sf||{}),Rh=(r=>(r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL",r))(Rh||{}),Me=(r=>(r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR",r))(Me||{}),ji=(r=>(r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN",r))(ji||{}),se=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(se||{}),Qs=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(Qs||{}),xe=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(xe||{}),de=(r=>(r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT",r))(de||{}),ar=(r=>(r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR",r))(ar||{}),Ur=(r=>(r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",r))(Ur||{}),Ji=(r=>(r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL",r))(Ji||{}),zt=(r=>(r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",r))(zt||{}),Gi=(r=>(r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BLIT",r))(Gi||{}),Yc=(r=>(r[r.AUTO=0]="AUTO",r[r.MANUAL=1]="MANUAL",r))(Yc||{}),di=(r=>(r.LOW="lowp",r.MEDIUM="mediump",r.HIGH="highp",r))(di||{}),vt=(r=>(r[r.NONE=0]="NONE",r[r.SCISSOR=1]="SCISSOR",r[r.STENCIL=2]="STENCIL",r[r.SPRITE=3]="SPRITE",r[r.COLOR=4]="COLOR",r))(vt||{}),gt=(r=>(r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH",r))(gt||{}),Yi=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(Yi||{});const Cy={createCanvas:(r,e)=>{const t=document.createElement("canvas");return t.width=r,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,e)=>fetch(r,e),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")},ue={ADAPTER:Cy,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Ml=/iPhone/i,Nd=/iPod/i,Ud=/iPad/i,Hd=/\biOS-universal(?:.+)Mac\b/i,kl=/\bAndroid(?:.+)Mobile\b/i,Gd=/Android/i,Is=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Ma=/Silk/i,ir=/Windows Phone/i,Vd=/\bWindows(?:.+)ARM\b/i,Wd=/BlackBerry/i,zd=/BB10/i,jd=/Opera Mini/i,$d=/\b(CriOS|Chrome)(?:.+)Mobile/i,Yd=/Mobile(?:.+)Firefox\b/i,Xd=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function My(r){return function(e){return e.test(r)}}function qd(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var s=My(t),n={apple:{phone:s(Ml)&&!s(ir),ipod:s(Nd),tablet:!s(Ml)&&(s(Ud)||Xd(e))&&!s(ir),universal:s(Hd),device:(s(Ml)||s(Nd)||s(Ud)||s(Hd)||Xd(e))&&!s(ir)},amazon:{phone:s(Is),tablet:!s(Is)&&s(Ma),device:s(Is)||s(Ma)},android:{phone:!s(ir)&&s(Is)||!s(ir)&&s(kl),tablet:!s(ir)&&!s(Is)&&!s(kl)&&(s(Ma)||s(Gd)),device:!s(ir)&&(s(Is)||s(Ma)||s(kl)||s(Gd))||s(/\bokhttp\b/i)},windows:{phone:s(ir),tablet:s(Vd),device:s(ir)||s(Vd)},other:{blackberry:s(Wd),blackberry10:s(zd),opera:s(jd),firefox:s(Yd),chrome:s($d),device:s(Wd)||s(zd)||s(jd)||s(Yd)||s($d)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}const ky=qd.default??qd,or=ky(globalThis.navigator);ue.RETINA_PREFIX=/@([0-9\.]+)x/;ue.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Wt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ya(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Iy(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),t}var Cf={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function n(l,c,d,h,u){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new s(d,h||l,u),f=t?t+c:c;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],p]:l._events[f].push(p):(l._events[f]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],d,h;if(this._eventsCount===0)return c;for(h in d=this._events)e.call(d,h)&&c.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},o.prototype.listeners=function(c){var d=t?t+c:c,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,p=h.length,f=new Array(p);u80*t){o=c=r[0],l=d=r[1];for(var f=t;fc&&(c=h),u>d&&(d=u);p=Math.max(c-o,d-l),p=p!==0?32767/p:0}return na(n,a,t,o,l,p,0),a}function Mf(r,e,t,i,s){var n,a;if(s===Oh(r,e,t,i)>0)for(n=e;n=e;n-=i)a=Kd(n,r[n],r[n+1],a);return a&&rl(a,a.next)&&(oa(a),a=a.next),a}function xs(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner&&(rl(t,t.next)||ht(t.prev,t,t.next)===0)){if(oa(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function na(r,e,t,i,s,n,a){if(r){!a&&n&&Gy(r,i,s,n);for(var o=r,l,c;r.prev!==r.next;){if(l=r.prev,c=r.next,n?Ry(r,i,s,n):By(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),oa(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=Ly(xs(r),e,t),na(r,e,t,i,s,n,2)):a===2&&Dy(r,e,t,i,s,n):na(xs(r),e,t,i,s,n,1);break}}}}function By(r){var e=r.prev,t=r,i=r.next;if(ht(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,a=i.x,o=e.y,l=t.y,c=i.y,d=sn?s>a?s:a:n>a?n:a,p=o>l?o>c?o:c:l>c?l:c,f=i.next;f!==e;){if(f.x>=d&&f.x<=u&&f.y>=h&&f.y<=p&&Xs(s,o,n,l,a,c,f.x,f.y)&&ht(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Ry(r,e,t,i){var s=r.prev,n=r,a=r.next;if(ht(s,n,a)>=0)return!1;for(var o=s.x,l=n.x,c=a.x,d=s.y,h=n.y,u=a.y,p=ol?o>c?o:c:l>c?l:c,g=d>h?d>u?d:u:h>u?h:u,y=Lh(p,f,e,t,i),w=Lh(m,g,e,t,i),b=r.prevZ,v=r.nextZ;b&&b.z>=y&&v&&v.z<=w;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==s&&b!==a&&Xs(o,d,l,h,c,u,b.x,b.y)&&ht(b.prev,b,b.next)>=0||(b=b.prevZ,v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==s&&v!==a&&Xs(o,d,l,h,c,u,v.x,v.y)&&ht(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;b&&b.z>=y;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==s&&b!==a&&Xs(o,d,l,h,c,u,b.x,b.y)&&ht(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;v&&v.z<=w;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==s&&v!==a&&Xs(o,d,l,h,c,u,v.x,v.y)&&ht(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function Ly(r,e,t){var i=r;do{var s=i.prev,n=i.next.next;!rl(s,n)&&kf(s,i,i.next,n)&&aa(s,n)&&aa(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),oa(i),oa(i.next),i=r=n),i=i.next}while(i!==r);return xs(i)}function Dy(r,e,t,i,s,n){var a=r;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&zy(a,o)){var l=If(a,o);a=xs(a,a.next),l=xs(l,l.next),na(a,e,t,i,s,n,0),na(l,e,t,i,s,n,0);return}o=o.next}a=a.next}while(a!==r)}function Oy(r,e,t,i){var s=[],n,a,o,l,c;for(n=0,a=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,a=t.x=t.x&&t.x>=c&&i!==t.x&&Xs(sa.x||t.x===a.x&&Hy(a,t)))&&(a=t,h=u)),t=t.next;while(t!==l);return a}function Hy(r,e){return ht(r.prev,r,e.prev)<0&&ht(e.next,r,r.next)<0}function Gy(r,e,t,i){var s=r;do s.z===0&&(s.z=Lh(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,Vy(s)}function Vy(r){var e,t,i,s,n,a,o,l,c=1;do{for(t=r,r=null,n=null,a=0;t;){for(a++,i=t,o=0,e=0;e0||l>0&&i;)o!==0&&(l===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,l--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;t=i}n.nextZ=null,c*=2}while(a>1);return r}function Lh(r,e,t,i,s){return r=(r-t)*s|0,e=(e-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function Wy(r){var e=r,t=r;do(e.x=(r-a)*(n-o)&&(r-a)*(i-o)>=(t-a)*(e-o)&&(t-a)*(n-o)>=(s-a)*(i-o)}function zy(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!jy(r,e)&&(aa(r,e)&&aa(e,r)&&$y(r,e)&&(ht(r.prev,r,e.prev)||ht(r,e.prev,e))||rl(r,e)&&ht(r.prev,r,r.next)>0&&ht(e.prev,e,e.next)>0)}function ht(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function rl(r,e){return r.x===e.x&&r.y===e.y}function kf(r,e,t,i){var s=Ia(ht(r,e,t)),n=Ia(ht(r,e,i)),a=Ia(ht(t,i,r)),o=Ia(ht(t,i,e));return!!(s!==n&&a!==o||s===0&&ka(r,t,e)||n===0&&ka(r,i,e)||a===0&&ka(t,r,i)||o===0&&ka(t,e,i))}function ka(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function Ia(r){return r>0?1:r<0?-1:0}function jy(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&kf(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function aa(r,e){return ht(r.prev,r,r.next)<0?ht(r,e,r.next)>=0&&ht(r,r.prev,e)>=0:ht(r,e,r.prev)<0||ht(r,r.next,e)<0}function $y(r,e){var t=r,i=!1,s=(r.x+e.x)/2,n=(r.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function If(r,e){var t=new Dh(r.i,r.x,r.y),i=new Dh(e.i,e.x,e.y),s=r.next,n=e.prev;return r.next=e,e.prev=r,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function Kd(r,e,t,i){var s=new Dh(r,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function oa(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Dh(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}il.deviation=function(r,e,t,i){var s=e&&e.length,n=s?e[0]*t:r.length,a=Math.abs(Oh(r,0,n,t));if(s)for(var o=0,l=e.length;o0&&(i+=r[s-1].length,t.holes.push(i))}return t};var Yy=Xc.exports;const Xy=ya(Yy);var Mo={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Mo.exports;(function(r,e){(function(t){var i=e&&!e.nodeType&&e,s=r&&!r.nodeType&&r,n=typeof Wt=="object"&&Wt;(n.global===n||n.window===n||n.self===n)&&(t=n);var a,o=2147483647,l=36,c=1,d=26,h=38,u=700,p=72,f=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,w=/[\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"},v=l-c,E=Math.floor,C=String.fromCharCode,I;function L(V){throw new RangeError(b[V])}function k(V,F){for(var U=V.length,te=[];U--;)te[U]=F(V[U]);return te}function N(V,F){var U=V.split("@"),te="";U.length>1&&(te=U[0]+"@",V=U[1]),V=V.replace(w,".");var Q=V.split("."),Z=k(Q,F).join(".");return te+Z}function G(V){for(var F=[],U=0,te=V.length,Q,Z;U=55296&&Q<=56319&&U65535&&(F-=65536,U+=C(F>>>10&1023|55296),F=56320|F&1023),U+=C(F),U}).join("")}function S(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:l}function x(V,F){return V+22+75*(V<26)-((F!=0)<<5)}function D(V,F,U){var te=0;for(V=U?E(V/u):V>>1,V+=E(V/F);V>v*d>>1;te+=l)V=E(V/v);return E(te+(v+1)*V/(V+h))}function $(V){var F=[],U=V.length,te,Q=0,Z=f,ye=p,Ce,ce,fe,we,le,pe,be,T,Y;for(Ce=V.lastIndexOf(m),Ce<0&&(Ce=0),ce=0;ce=128&&L("not-basic"),F.push(V.charCodeAt(ce));for(fe=Ce>0?Ce+1:0;fe=U&&L("invalid-input"),be=S(V.charCodeAt(fe++)),(be>=l||be>E((o-Q)/le))&&L("overflow"),Q+=be*le,T=pe<=ye?c:pe>=ye+d?d:pe-ye,!(beE(o/Y)&&L("overflow"),le*=Y;te=F.length+1,ye=D(Q-we,te,we==0),E(Q/te)>o-Z&&L("overflow"),Z+=E(Q/te),Q%=te,F.splice(Q++,0,Z)}return A(F)}function R(V){var F,U,te,Q,Z,ye,Ce,ce,fe,we,le,pe=[],be,T,Y,j;for(V=G(V),be=V.length,F=f,U=0,Z=p,ye=0;ye=F&&leE((o-U)/T)&&L("overflow"),U+=(Ce-F)*T,F=Ce,ye=0;yeo&&L("overflow"),le==F){for(ce=U,fe=l;we=fe<=Z?c:fe>=Z+d?d:fe-Z,!(ce"u"||!_t?Ge:_t(Uint8Array),gs={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ps&&_t?_t([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":Ns,"%AsyncGenerator%":Ns,"%AsyncGeneratorFunction%":Ns,"%AsyncIteratorPrototype%":Ns,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":v0,"%eval%":eval,"%EvalError%":b0,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":Bf,"%GeneratorFunction%":Ns,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ps&&_t?_t(_t([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ps||!_t?Ge:_t(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":w0,"%ReferenceError%":_0,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ps||!_t?Ge:_t(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ps&&_t?_t(""[Symbol.iterator]()):Ge,"%Symbol%":Ps?Symbol:Ge,"%SyntaxError%":ln,"%ThrowTypeError%":T0,"%TypedArray%":A0,"%TypeError%":en,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":x0,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet};if(_t)try{null.error}catch(r){var S0=_t(_t(r));gs["%Error.prototype%"]=S0}var C0=function r(e){var t;if(e==="%AsyncFunction%")t=Pl("async function () {}");else if(e==="%GeneratorFunction%")t=Pl("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Pl("async function* () {}");else if(e==="%AsyncGenerator%"){var i=r("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&_t&&(t=_t(s.prototype))}return gs[e]=t,t},Qd={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ba=qc,ko=y0,M0=ba.call(Function.call,Array.prototype.concat),k0=ba.call(Function.apply,Array.prototype.splice),eu=ba.call(Function.call,String.prototype.replace),Io=ba.call(Function.call,String.prototype.slice),I0=ba.call(Function.call,RegExp.prototype.exec),P0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B0=/\\(\\)?/g,R0=function(e){var t=Io(e,0,1),i=Io(e,-1);if(t==="%"&&i!=="%")throw new ln("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new ln("invalid intrinsic syntax, expected opening `%`");var s=[];return eu(e,P0,function(n,a,o,l){s[s.length]=o?eu(l,B0,"$1"):a||n}),s},L0=function(e,t){var i=e,s;if(ko(Qd,i)&&(s=Qd[i],i="%"+s[0]+"%"),ko(gs,i)){var n=gs[i];if(n===Ns&&(n=C0(i)),typeof n>"u"&&!t)throw new en("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:n}}throw new ln("intrinsic "+e+" does not exist!")},xn=function(e,t){if(typeof e!="string"||e.length===0)throw new en("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new en('"allowMissing" argument must be a boolean');if(I0(/^%?[^%]*%?$/,e)===null)throw new ln("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=R0(e),s=i.length>0?i[0]:"",n=L0("%"+s+"%",t),a=n.name,o=n.value,l=!1,c=n.alias;c&&(s=c[0],k0(i,M0([0,1],c)));for(var d=1,h=!0;d=i.length){var m=ms(o,u);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[u]}else h=ko(o,u),o=o[u];h&&!l&&(gs[a]=o)}}return o},Rf={exports:{}},Rl,tu;function Kc(){if(tu)return Rl;tu=1;var r=xn,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Rl=e,Rl}var D0=xn,mo=D0("%Object.getOwnPropertyDescriptor%",!0);if(mo)try{mo([],"length")}catch{mo=null}var Lf=mo,iu=Kc(),O0=Pf,Bs=va,ru=Lf,F0=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Bs("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Bs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Bs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Bs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Bs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Bs("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!ru&&ru(e,t);if(iu)iu(e,t,{configurable:a===null&&l?l.configurable:!a,enumerable:s===null&&l?l.enumerable:!s,value:i,writable:n===null&&l?l.writable:!n});else if(o||!s&&!n&&!a)e[t]=i;else throw new O0("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Fh=Kc(),Df=function(){return!!Fh};Df.hasArrayLengthDefineBug=function(){if(!Fh)return null;try{return Fh([],"length",{value:1}).length!==1}catch{return!0}};var N0=Df,U0=xn,su=F0,H0=N0(),nu=Lf,au=va,G0=U0("%Math.floor%"),V0=function(e,t){if(typeof e!="function")throw new au("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||G0(t)!==t)throw new au("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],s=!0,n=!0;if("length"in e&&nu){var a=nu(e,"length");a&&!a.configurable&&(s=!1),a&&!a.writable&&(n=!1)}return(s||n||!i)&&(H0?su(e,"length",t,!0,!0):su(e,"length",t)),e};(function(r){var e=qc,t=xn,i=V0,s=va,n=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,n),l=Kc(),c=t("%Math.max%");r.exports=function(u){if(typeof u!="function")throw new s("a function is required");var p=o(e,a,arguments);return i(p,1+c(0,u.length-(arguments.length-1)),!0)};var d=function(){return o(e,n,arguments)};l?l(r.exports,"apply",{value:d}):r.exports.apply=d})(Rf);var W0=Rf.exports,Of=xn,Ff=W0,z0=Ff(Of("String.prototype.indexOf")),j0=function(e,t){var i=Of(e,!!t);return typeof i=="function"&&z0(e,".prototype.")>-1?Ff(i):i};const $0={},Y0=Object.freeze(Object.defineProperty({__proto__:null,default:$0},Symbol.toStringTag,{value:"Module"})),X0=Iy(Y0);var Zc=typeof Map=="function"&&Map.prototype,Ll=Object.getOwnPropertyDescriptor&&Zc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Po=Zc&&Ll&&typeof Ll.get=="function"?Ll.get:null,ou=Zc&&Map.prototype.forEach,Jc=typeof Set=="function"&&Set.prototype,Dl=Object.getOwnPropertyDescriptor&&Jc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bo=Jc&&Dl&&typeof Dl.get=="function"?Dl.get:null,lu=Jc&&Set.prototype.forEach,q0=typeof WeakMap=="function"&&WeakMap.prototype,Kn=q0?WeakMap.prototype.has:null,K0=typeof WeakSet=="function"&&WeakSet.prototype,Zn=K0?WeakSet.prototype.has:null,Z0=typeof WeakRef=="function"&&WeakRef.prototype,hu=Z0?WeakRef.prototype.deref:null,J0=Boolean.prototype.valueOf,Q0=Object.prototype.toString,ev=Function.prototype.toString,tv=String.prototype.match,Qc=String.prototype.slice,Or=String.prototype.replace,iv=String.prototype.toUpperCase,cu=String.prototype.toLowerCase,Nf=RegExp.prototype.test,du=Array.prototype.concat,Vi=Array.prototype.join,rv=Array.prototype.slice,uu=Math.floor,Nh=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ol=Object.getOwnPropertySymbols,Uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Dt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hn||"symbol")?Symbol.toStringTag:null,Uf=Object.prototype.propertyIsEnumerable,pu=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function fu(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Nf.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-uu(-r):uu(r);if(i!==r){var s=String(i),n=Qc.call(e,s.length+1);return Or.call(s,t,"$&_")+"."+Or.call(Or.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Or.call(e,t,"$&_")}var Hh=X0,mu=Hh.custom,gu=Gf(mu)?mu:null,sv=function r(e,t,i,s){var n=t||{};if(Mr(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Mr(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Mr(n,"customInspect")?n.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Mr(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Mr(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=n.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Wf(e,n);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return o?fu(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return o?fu(e,c):c}var d=typeof n.depth>"u"?5:n.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof e=="object")return Gh(e)?"[Array]":"[Object]";var h=xv(n,i);if(typeof s>"u")s=[];else if(Vf(s,e)>=0)return"[Circular]";function u(S,x,D){if(x&&(s=rv.call(s),s.push(x)),D){var $={depth:n.depth};return Mr(n,"quoteStyle")&&($.quoteStyle=n.quoteStyle),r(S,$,i+1,s)}return r(S,n,i+1,s)}if(typeof e=="function"&&!yu(e)){var p=pv(e),f=Pa(e,u);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+Vi.call(f,", ")+" }":"")}if(Gf(e)){var m=hn?Or.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Uh.call(e);return typeof e=="object"&&!hn?kn(m):m}if(bv(e)){for(var g="<"+cu.call(String(e.nodeName)),y=e.attributes||[],w=0;w",g}if(Gh(e)){if(e.length===0)return"[]";var b=Pa(e,u);return h&&!_v(b)?"["+Vh(b,h)+"]":"[ "+Vi.call(b,", ")+" ]"}if(ov(e)){var v=Pa(e,u);return!("cause"in Error.prototype)&&"cause"in e&&!Uf.call(e,"cause")?"{ ["+String(e)+"] "+Vi.call(du.call("[cause]: "+u(e.cause),v),", ")+" }":v.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Vi.call(v,", ")+" }"}if(typeof e=="object"&&a){if(gu&&typeof e[gu]=="function"&&Hh)return Hh(e,{depth:d-i});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(fv(e)){var E=[];return ou&&ou.call(e,function(S,x){E.push(u(x,e,!0)+" => "+u(S,e))}),vu("Map",Po.call(e),E,h)}if(yv(e)){var C=[];return lu&&lu.call(e,function(S){C.push(u(S,e))}),vu("Set",Bo.call(e),C,h)}if(mv(e))return Fl("WeakMap");if(vv(e))return Fl("WeakSet");if(gv(e))return Fl("WeakRef");if(hv(e))return kn(u(Number(e)));if(dv(e))return kn(u(Nh.call(e)));if(cv(e))return kn(J0.call(e));if(lv(e))return kn(u(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Wt<"u"&&e===Wt)return"{ [object globalThis] }";if(!av(e)&&!yu(e)){var I=Pa(e,u),L=pu?pu(e)===Object.prototype:e instanceof Object||e.constructor===Object,k=e instanceof Object?"":"null prototype",N=!L&&Dt&&Object(e)===e&&Dt in e?Qc.call(zr(e),8,-1):k?"Object":"",G=L||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",A=G+(N||k?"["+Vi.call(du.call([],N||[],k||[]),": ")+"] ":"");return I.length===0?A+"{}":h?A+"{"+Vh(I,h)+"}":A+"{ "+Vi.call(I,", ")+" }"}return String(e)};function Hf(r,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+r+i}function nv(r){return Or.call(String(r),/"/g,""")}function Gh(r){return zr(r)==="[object Array]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function av(r){return zr(r)==="[object Date]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function yu(r){return zr(r)==="[object RegExp]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function ov(r){return zr(r)==="[object Error]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function lv(r){return zr(r)==="[object String]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function hv(r){return zr(r)==="[object Number]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function cv(r){return zr(r)==="[object Boolean]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function Gf(r){if(hn)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Uh)return!1;try{return Uh.call(r),!0}catch{}return!1}function dv(r){if(!r||typeof r!="object"||!Nh)return!1;try{return Nh.call(r),!0}catch{}return!1}var uv=Object.prototype.hasOwnProperty||function(r){return r in this};function Mr(r,e){return uv.call(r,e)}function zr(r){return Q0.call(r)}function pv(r){if(r.name)return r.name;var e=tv.call(ev.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Vf(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return Wf(Qc.call(r,0,e.maxStringLength),e)+i}var s=Or.call(Or.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wv);return Hf(s,"single",e)}function wv(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+iv.call(e.toString(16))}function kn(r){return"Object("+r+")"}function Fl(r){return r+" { ? }"}function vu(r,e,t,i){var s=i?Vh(t,i):Vi.call(t,", ");return r+" ("+e+") {"+s+"}"}function _v(r){for(var e=0;ee in r?Ay(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ks=(r,e,t)=>(Sy(r,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(s){if(s.ep)return;s.ep=!0;const n=t(s);fetch(s.href,n)}})();var Ss=(r=>(r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2",r))(Ss||{}),Sf=(r=>(r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS",r))(Sf||{}),Rh=(r=>(r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL",r))(Rh||{}),Me=(r=>(r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR",r))(Me||{}),ji=(r=>(r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN",r))(ji||{}),se=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(se||{}),Qs=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(Qs||{}),xe=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(xe||{}),de=(r=>(r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT",r))(de||{}),ar=(r=>(r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR",r))(ar||{}),Ur=(r=>(r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",r))(Ur||{}),Ji=(r=>(r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL",r))(Ji||{}),zt=(r=>(r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",r))(zt||{}),Gi=(r=>(r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BLIT",r))(Gi||{}),Xc=(r=>(r[r.AUTO=0]="AUTO",r[r.MANUAL=1]="MANUAL",r))(Xc||{}),di=(r=>(r.LOW="lowp",r.MEDIUM="mediump",r.HIGH="highp",r))(di||{}),vt=(r=>(r[r.NONE=0]="NONE",r[r.SCISSOR=1]="SCISSOR",r[r.STENCIL=2]="STENCIL",r[r.SPRITE=3]="SPRITE",r[r.COLOR=4]="COLOR",r))(vt||{}),gt=(r=>(r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH",r))(gt||{}),Xi=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(Xi||{});const Cy={createCanvas:(r,e)=>{const t=document.createElement("canvas");return t.width=r,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,e)=>fetch(r,e),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")},ue={ADAPTER:Cy,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Ml=/iPhone/i,Nd=/iPod/i,Ud=/iPad/i,Hd=/\biOS-universal(?:.+)Mac\b/i,kl=/\bAndroid(?:.+)Mobile\b/i,Gd=/Android/i,Is=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Ma=/Silk/i,ir=/Windows Phone/i,Vd=/\bWindows(?:.+)ARM\b/i,Wd=/BlackBerry/i,zd=/BB10/i,jd=/Opera Mini/i,$d=/\b(CriOS|Chrome)(?:.+)Mobile/i,Xd=/Mobile(?:.+)Firefox\b/i,Yd=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function My(r){return function(e){return e.test(r)}}function qd(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var s=My(t),n={apple:{phone:s(Ml)&&!s(ir),ipod:s(Nd),tablet:!s(Ml)&&(s(Ud)||Yd(e))&&!s(ir),universal:s(Hd),device:(s(Ml)||s(Nd)||s(Ud)||s(Hd)||Yd(e))&&!s(ir)},amazon:{phone:s(Is),tablet:!s(Is)&&s(Ma),device:s(Is)||s(Ma)},android:{phone:!s(ir)&&s(Is)||!s(ir)&&s(kl),tablet:!s(ir)&&!s(Is)&&!s(kl)&&(s(Ma)||s(Gd)),device:!s(ir)&&(s(Is)||s(Ma)||s(kl)||s(Gd))||s(/\bokhttp\b/i)},windows:{phone:s(ir),tablet:s(Vd),device:s(ir)||s(Vd)},other:{blackberry:s(Wd),blackberry10:s(zd),opera:s(jd),firefox:s(Xd),chrome:s($d),device:s(Wd)||s(zd)||s(jd)||s(Xd)||s($d)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}const ky=qd.default??qd,or=ky(globalThis.navigator);ue.RETINA_PREFIX=/@([0-9\.]+)x/;ue.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Wt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ya(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Iy(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),t}var Cf={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function n(l,c,d,h,u){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new s(d,h||l,u),f=t?t+c:c;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],p]:l._events[f].push(p):(l._events[f]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],d,h;if(this._eventsCount===0)return c;for(h in d=this._events)e.call(d,h)&&c.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},o.prototype.listeners=function(c){var d=t?t+c:c,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,p=h.length,f=new Array(p);u80*t){o=c=r[0],l=d=r[1];for(var f=t;fc&&(c=h),u>d&&(d=u);p=Math.max(c-o,d-l),p=p!==0?32767/p:0}return na(n,a,t,o,l,p,0),a}function Mf(r,e,t,i,s){var n,a;if(s===Oh(r,e,t,i)>0)for(n=e;n=e;n-=i)a=Kd(n,r[n],r[n+1],a);return a&&rl(a,a.next)&&(oa(a),a=a.next),a}function xs(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner&&(rl(t,t.next)||ht(t.prev,t,t.next)===0)){if(oa(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function na(r,e,t,i,s,n,a){if(r){!a&&n&&Gy(r,i,s,n);for(var o=r,l,c;r.prev!==r.next;){if(l=r.prev,c=r.next,n?Ry(r,i,s,n):By(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),oa(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=Ly(xs(r),e,t),na(r,e,t,i,s,n,2)):a===2&&Dy(r,e,t,i,s,n):na(xs(r),e,t,i,s,n,1);break}}}}function By(r){var e=r.prev,t=r,i=r.next;if(ht(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,a=i.x,o=e.y,l=t.y,c=i.y,d=sn?s>a?s:a:n>a?n:a,p=o>l?o>c?o:c:l>c?l:c,f=i.next;f!==e;){if(f.x>=d&&f.x<=u&&f.y>=h&&f.y<=p&&Ys(s,o,n,l,a,c,f.x,f.y)&&ht(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Ry(r,e,t,i){var s=r.prev,n=r,a=r.next;if(ht(s,n,a)>=0)return!1;for(var o=s.x,l=n.x,c=a.x,d=s.y,h=n.y,u=a.y,p=ol?o>c?o:c:l>c?l:c,g=d>h?d>u?d:u:h>u?h:u,y=Lh(p,f,e,t,i),w=Lh(m,g,e,t,i),b=r.prevZ,v=r.nextZ;b&&b.z>=y&&v&&v.z<=w;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==s&&b!==a&&Ys(o,d,l,h,c,u,b.x,b.y)&&ht(b.prev,b,b.next)>=0||(b=b.prevZ,v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==s&&v!==a&&Ys(o,d,l,h,c,u,v.x,v.y)&&ht(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;b&&b.z>=y;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==s&&b!==a&&Ys(o,d,l,h,c,u,b.x,b.y)&&ht(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;v&&v.z<=w;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==s&&v!==a&&Ys(o,d,l,h,c,u,v.x,v.y)&&ht(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function Ly(r,e,t){var i=r;do{var s=i.prev,n=i.next.next;!rl(s,n)&&kf(s,i,i.next,n)&&aa(s,n)&&aa(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),oa(i),oa(i.next),i=r=n),i=i.next}while(i!==r);return xs(i)}function Dy(r,e,t,i,s,n){var a=r;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&zy(a,o)){var l=If(a,o);a=xs(a,a.next),l=xs(l,l.next),na(a,e,t,i,s,n,0),na(l,e,t,i,s,n,0);return}o=o.next}a=a.next}while(a!==r)}function Oy(r,e,t,i){var s=[],n,a,o,l,c;for(n=0,a=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,a=t.x=t.x&&t.x>=c&&i!==t.x&&Ys(sa.x||t.x===a.x&&Hy(a,t)))&&(a=t,h=u)),t=t.next;while(t!==l);return a}function Hy(r,e){return ht(r.prev,r,e.prev)<0&&ht(e.next,r,r.next)<0}function Gy(r,e,t,i){var s=r;do s.z===0&&(s.z=Lh(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,Vy(s)}function Vy(r){var e,t,i,s,n,a,o,l,c=1;do{for(t=r,r=null,n=null,a=0;t;){for(a++,i=t,o=0,e=0;e0||l>0&&i;)o!==0&&(l===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,l--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;t=i}n.nextZ=null,c*=2}while(a>1);return r}function Lh(r,e,t,i,s){return r=(r-t)*s|0,e=(e-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function Wy(r){var e=r,t=r;do(e.x=(r-a)*(n-o)&&(r-a)*(i-o)>=(t-a)*(e-o)&&(t-a)*(n-o)>=(s-a)*(i-o)}function zy(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!jy(r,e)&&(aa(r,e)&&aa(e,r)&&$y(r,e)&&(ht(r.prev,r,e.prev)||ht(r,e.prev,e))||rl(r,e)&&ht(r.prev,r,r.next)>0&&ht(e.prev,e,e.next)>0)}function ht(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function rl(r,e){return r.x===e.x&&r.y===e.y}function kf(r,e,t,i){var s=Ia(ht(r,e,t)),n=Ia(ht(r,e,i)),a=Ia(ht(t,i,r)),o=Ia(ht(t,i,e));return!!(s!==n&&a!==o||s===0&&ka(r,t,e)||n===0&&ka(r,i,e)||a===0&&ka(t,r,i)||o===0&&ka(t,e,i))}function ka(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function Ia(r){return r>0?1:r<0?-1:0}function jy(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&kf(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function aa(r,e){return ht(r.prev,r,r.next)<0?ht(r,e,r.next)>=0&&ht(r,r.prev,e)>=0:ht(r,e,r.prev)<0||ht(r,r.next,e)<0}function $y(r,e){var t=r,i=!1,s=(r.x+e.x)/2,n=(r.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function If(r,e){var t=new Dh(r.i,r.x,r.y),i=new Dh(e.i,e.x,e.y),s=r.next,n=e.prev;return r.next=e,e.prev=r,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function Kd(r,e,t,i){var s=new Dh(r,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function oa(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Dh(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}il.deviation=function(r,e,t,i){var s=e&&e.length,n=s?e[0]*t:r.length,a=Math.abs(Oh(r,0,n,t));if(s)for(var o=0,l=e.length;o0&&(i+=r[s-1].length,t.holes.push(i))}return t};var Xy=Yc.exports;const Yy=ya(Xy);var Mo={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Mo.exports;(function(r,e){(function(t){var i=e&&!e.nodeType&&e,s=r&&!r.nodeType&&r,n=typeof Wt=="object"&&Wt;(n.global===n||n.window===n||n.self===n)&&(t=n);var a,o=2147483647,l=36,c=1,d=26,h=38,u=700,p=72,f=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,w=/[\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"},v=l-c,E=Math.floor,C=String.fromCharCode,I;function L(V){throw new RangeError(b[V])}function k(V,F){for(var U=V.length,te=[];U--;)te[U]=F(V[U]);return te}function N(V,F){var U=V.split("@"),te="";U.length>1&&(te=U[0]+"@",V=U[1]),V=V.replace(w,".");var Q=V.split("."),Z=k(Q,F).join(".");return te+Z}function G(V){for(var F=[],U=0,te=V.length,Q,Z;U=55296&&Q<=56319&&U65535&&(F-=65536,U+=C(F>>>10&1023|55296),F=56320|F&1023),U+=C(F),U}).join("")}function S(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:l}function x(V,F){return V+22+75*(V<26)-((F!=0)<<5)}function D(V,F,U){var te=0;for(V=U?E(V/u):V>>1,V+=E(V/F);V>v*d>>1;te+=l)V=E(V/v);return E(te+(v+1)*V/(V+h))}function $(V){var F=[],U=V.length,te,Q=0,Z=f,ye=p,Ce,ce,fe,we,le,pe,be,T,X;for(Ce=V.lastIndexOf(m),Ce<0&&(Ce=0),ce=0;ce=128&&L("not-basic"),F.push(V.charCodeAt(ce));for(fe=Ce>0?Ce+1:0;fe=U&&L("invalid-input"),be=S(V.charCodeAt(fe++)),(be>=l||be>E((o-Q)/le))&&L("overflow"),Q+=be*le,T=pe<=ye?c:pe>=ye+d?d:pe-ye,!(beE(o/X)&&L("overflow"),le*=X;te=F.length+1,ye=D(Q-we,te,we==0),E(Q/te)>o-Z&&L("overflow"),Z+=E(Q/te),Q%=te,F.splice(Q++,0,Z)}return A(F)}function R(V){var F,U,te,Q,Z,ye,Ce,ce,fe,we,le,pe=[],be,T,X,j;for(V=G(V),be=V.length,F=f,U=0,Z=p,ye=0;ye=F&&leE((o-U)/T)&&L("overflow"),U+=(Ce-F)*T,F=Ce,ye=0;yeo&&L("overflow"),le==F){for(ce=U,fe=l;we=fe<=Z?c:fe>=Z+d?d:fe-Z,!(ce"u"||!_t?Ge:_t(Uint8Array),gs={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ps&&_t?_t([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":Ns,"%AsyncGenerator%":Ns,"%AsyncGeneratorFunction%":Ns,"%AsyncIteratorPrototype%":Ns,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":v0,"%eval%":eval,"%EvalError%":b0,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":Bf,"%GeneratorFunction%":Ns,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ps&&_t?_t(_t([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ps||!_t?Ge:_t(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":w0,"%ReferenceError%":_0,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ps||!_t?Ge:_t(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ps&&_t?_t(""[Symbol.iterator]()):Ge,"%Symbol%":Ps?Symbol:Ge,"%SyntaxError%":ln,"%ThrowTypeError%":T0,"%TypedArray%":A0,"%TypeError%":en,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":x0,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet};if(_t)try{null.error}catch(r){var S0=_t(_t(r));gs["%Error.prototype%"]=S0}var C0=function r(e){var t;if(e==="%AsyncFunction%")t=Pl("async function () {}");else if(e==="%GeneratorFunction%")t=Pl("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Pl("async function* () {}");else if(e==="%AsyncGenerator%"){var i=r("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&_t&&(t=_t(s.prototype))}return gs[e]=t,t},Qd={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ba=qc,ko=y0,M0=ba.call(Function.call,Array.prototype.concat),k0=ba.call(Function.apply,Array.prototype.splice),eu=ba.call(Function.call,String.prototype.replace),Io=ba.call(Function.call,String.prototype.slice),I0=ba.call(Function.call,RegExp.prototype.exec),P0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B0=/\\(\\)?/g,R0=function(e){var t=Io(e,0,1),i=Io(e,-1);if(t==="%"&&i!=="%")throw new ln("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new ln("invalid intrinsic syntax, expected opening `%`");var s=[];return eu(e,P0,function(n,a,o,l){s[s.length]=o?eu(l,B0,"$1"):a||n}),s},L0=function(e,t){var i=e,s;if(ko(Qd,i)&&(s=Qd[i],i="%"+s[0]+"%"),ko(gs,i)){var n=gs[i];if(n===Ns&&(n=C0(i)),typeof n>"u"&&!t)throw new en("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:n}}throw new ln("intrinsic "+e+" does not exist!")},xn=function(e,t){if(typeof e!="string"||e.length===0)throw new en("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new en('"allowMissing" argument must be a boolean');if(I0(/^%?[^%]*%?$/,e)===null)throw new ln("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=R0(e),s=i.length>0?i[0]:"",n=L0("%"+s+"%",t),a=n.name,o=n.value,l=!1,c=n.alias;c&&(s=c[0],k0(i,M0([0,1],c)));for(var d=1,h=!0;d=i.length){var m=ms(o,u);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[u]}else h=ko(o,u),o=o[u];h&&!l&&(gs[a]=o)}}return o},Rf={exports:{}},Rl,tu;function Kc(){if(tu)return Rl;tu=1;var r=xn,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Rl=e,Rl}var D0=xn,mo=D0("%Object.getOwnPropertyDescriptor%",!0);if(mo)try{mo([],"length")}catch{mo=null}var Lf=mo,iu=Kc(),O0=Pf,Bs=va,ru=Lf,F0=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Bs("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Bs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Bs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Bs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Bs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Bs("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!ru&&ru(e,t);if(iu)iu(e,t,{configurable:a===null&&l?l.configurable:!a,enumerable:s===null&&l?l.enumerable:!s,value:i,writable:n===null&&l?l.writable:!n});else if(o||!s&&!n&&!a)e[t]=i;else throw new O0("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Fh=Kc(),Df=function(){return!!Fh};Df.hasArrayLengthDefineBug=function(){if(!Fh)return null;try{return Fh([],"length",{value:1}).length!==1}catch{return!0}};var N0=Df,U0=xn,su=F0,H0=N0(),nu=Lf,au=va,G0=U0("%Math.floor%"),V0=function(e,t){if(typeof e!="function")throw new au("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||G0(t)!==t)throw new au("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],s=!0,n=!0;if("length"in e&&nu){var a=nu(e,"length");a&&!a.configurable&&(s=!1),a&&!a.writable&&(n=!1)}return(s||n||!i)&&(H0?su(e,"length",t,!0,!0):su(e,"length",t)),e};(function(r){var e=qc,t=xn,i=V0,s=va,n=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,n),l=Kc(),c=t("%Math.max%");r.exports=function(u){if(typeof u!="function")throw new s("a function is required");var p=o(e,a,arguments);return i(p,1+c(0,u.length-(arguments.length-1)),!0)};var d=function(){return o(e,n,arguments)};l?l(r.exports,"apply",{value:d}):r.exports.apply=d})(Rf);var W0=Rf.exports,Of=xn,Ff=W0,z0=Ff(Of("String.prototype.indexOf")),j0=function(e,t){var i=Of(e,!!t);return typeof i=="function"&&z0(e,".prototype.")>-1?Ff(i):i};const $0={},X0=Object.freeze(Object.defineProperty({__proto__:null,default:$0},Symbol.toStringTag,{value:"Module"})),Y0=Iy(X0);var Zc=typeof Map=="function"&&Map.prototype,Ll=Object.getOwnPropertyDescriptor&&Zc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Po=Zc&&Ll&&typeof Ll.get=="function"?Ll.get:null,ou=Zc&&Map.prototype.forEach,Jc=typeof Set=="function"&&Set.prototype,Dl=Object.getOwnPropertyDescriptor&&Jc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bo=Jc&&Dl&&typeof Dl.get=="function"?Dl.get:null,lu=Jc&&Set.prototype.forEach,q0=typeof WeakMap=="function"&&WeakMap.prototype,Kn=q0?WeakMap.prototype.has:null,K0=typeof WeakSet=="function"&&WeakSet.prototype,Zn=K0?WeakSet.prototype.has:null,Z0=typeof WeakRef=="function"&&WeakRef.prototype,hu=Z0?WeakRef.prototype.deref:null,J0=Boolean.prototype.valueOf,Q0=Object.prototype.toString,ev=Function.prototype.toString,tv=String.prototype.match,Qc=String.prototype.slice,Or=String.prototype.replace,iv=String.prototype.toUpperCase,cu=String.prototype.toLowerCase,Nf=RegExp.prototype.test,du=Array.prototype.concat,Vi=Array.prototype.join,rv=Array.prototype.slice,uu=Math.floor,Nh=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ol=Object.getOwnPropertySymbols,Uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Dt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hn||"symbol")?Symbol.toStringTag:null,Uf=Object.prototype.propertyIsEnumerable,pu=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function fu(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Nf.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-uu(-r):uu(r);if(i!==r){var s=String(i),n=Qc.call(e,s.length+1);return Or.call(s,t,"$&_")+"."+Or.call(Or.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Or.call(e,t,"$&_")}var Hh=Y0,mu=Hh.custom,gu=Gf(mu)?mu:null,sv=function r(e,t,i,s){var n=t||{};if(Mr(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Mr(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Mr(n,"customInspect")?n.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Mr(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Mr(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=n.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Wf(e,n);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return o?fu(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return o?fu(e,c):c}var d=typeof n.depth>"u"?5:n.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof e=="object")return Gh(e)?"[Array]":"[Object]";var h=xv(n,i);if(typeof s>"u")s=[];else if(Vf(s,e)>=0)return"[Circular]";function u(S,x,D){if(x&&(s=rv.call(s),s.push(x)),D){var $={depth:n.depth};return Mr(n,"quoteStyle")&&($.quoteStyle=n.quoteStyle),r(S,$,i+1,s)}return r(S,n,i+1,s)}if(typeof e=="function"&&!yu(e)){var p=pv(e),f=Pa(e,u);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+Vi.call(f,", ")+" }":"")}if(Gf(e)){var m=hn?Or.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Uh.call(e);return typeof e=="object"&&!hn?kn(m):m}if(bv(e)){for(var g="<"+cu.call(String(e.nodeName)),y=e.attributes||[],w=0;w",g}if(Gh(e)){if(e.length===0)return"[]";var b=Pa(e,u);return h&&!_v(b)?"["+Vh(b,h)+"]":"[ "+Vi.call(b,", ")+" ]"}if(ov(e)){var v=Pa(e,u);return!("cause"in Error.prototype)&&"cause"in e&&!Uf.call(e,"cause")?"{ ["+String(e)+"] "+Vi.call(du.call("[cause]: "+u(e.cause),v),", ")+" }":v.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Vi.call(v,", ")+" }"}if(typeof e=="object"&&a){if(gu&&typeof e[gu]=="function"&&Hh)return Hh(e,{depth:d-i});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(fv(e)){var E=[];return ou&&ou.call(e,function(S,x){E.push(u(x,e,!0)+" => "+u(S,e))}),vu("Map",Po.call(e),E,h)}if(yv(e)){var C=[];return lu&&lu.call(e,function(S){C.push(u(S,e))}),vu("Set",Bo.call(e),C,h)}if(mv(e))return Fl("WeakMap");if(vv(e))return Fl("WeakSet");if(gv(e))return Fl("WeakRef");if(hv(e))return kn(u(Number(e)));if(dv(e))return kn(u(Nh.call(e)));if(cv(e))return kn(J0.call(e));if(lv(e))return kn(u(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Wt<"u"&&e===Wt)return"{ [object globalThis] }";if(!av(e)&&!yu(e)){var I=Pa(e,u),L=pu?pu(e)===Object.prototype:e instanceof Object||e.constructor===Object,k=e instanceof Object?"":"null prototype",N=!L&&Dt&&Object(e)===e&&Dt in e?Qc.call(zr(e),8,-1):k?"Object":"",G=L||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",A=G+(N||k?"["+Vi.call(du.call([],N||[],k||[]),": ")+"] ":"");return I.length===0?A+"{}":h?A+"{"+Vh(I,h)+"}":A+"{ "+Vi.call(I,", ")+" }"}return String(e)};function Hf(r,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+r+i}function nv(r){return Or.call(String(r),/"/g,""")}function Gh(r){return zr(r)==="[object Array]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function av(r){return zr(r)==="[object Date]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function yu(r){return zr(r)==="[object RegExp]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function ov(r){return zr(r)==="[object Error]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function lv(r){return zr(r)==="[object String]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function hv(r){return zr(r)==="[object Number]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function cv(r){return zr(r)==="[object Boolean]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function Gf(r){if(hn)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Uh)return!1;try{return Uh.call(r),!0}catch{}return!1}function dv(r){if(!r||typeof r!="object"||!Nh)return!1;try{return Nh.call(r),!0}catch{}return!1}var uv=Object.prototype.hasOwnProperty||function(r){return r in this};function Mr(r,e){return uv.call(r,e)}function zr(r){return Q0.call(r)}function pv(r){if(r.name)return r.name;var e=tv.call(ev.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Vf(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return Wf(Qc.call(r,0,e.maxStringLength),e)+i}var s=Or.call(Or.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wv);return Hf(s,"single",e)}function wv(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+iv.call(e.toString(16))}function kn(r){return"Object("+r+")"}function Fl(r){return r+" { ? }"}function vu(r,e,t,i){var s=i?Vh(t,i):Vi.call(t,", ");return r+" ("+e+") {"+s+"}"}function _v(r){for(var e=0;e=0)return!1;return!0}function xv(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Vi.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Vi.call(Array(e+1),t)}}function Vh(r,e){if(r.length===0)return"";var t=` `+e.prev+e.base;return t+Vi.call(r,","+t)+` -`+e.prev}function Pa(r,e){var t=Gh(r),i=[];if(t){i.length=r.length;for(var s=0;s1;){var t=e.pop(),i=t.obj[t.prop];if(ls(i)){for(var s=[],n=0;n=Hl?a.slice(l,l+Hl):a,d=[],h=0;h=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||n===Fv.RFC1738&&(u===40||u===41)){d[d.length]=c.charAt(h);continue}if(u<128){d[d.length]=Ri[u];continue}if(u<2048){d[d.length]=Ri[192|u>>6]+Ri[128|u&63];continue}if(u<55296||u>=57344){d[d.length]=Ri[224|u>>12]+Ri[128|u>>6&63]+Ri[128|u&63];continue}h+=1,u=65536+((u&1023)<<10|c.charCodeAt(h)&1023),d[d.length]=Ri[240|u>>18]+Ri[128|u>>12&63]+Ri[128|u>>6&63]+Ri[128|u&63]}o+=d.join("")}return o},Wv=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],s=0;s"u"&&(E=0)}if(typeof d=="function"?b=d(t,b):b instanceof Date?b=p(b):i==="comma"&&Hi(b)&&(b=go.maybeMap(b,function(V){return V instanceof Date?p(V):V})),b===null){if(a)return c&&!g?c(t,yt.encoder,y,"key",f):t;b=""}if(Zv(b)||go.isBuffer(b)){if(c){var L=g?t:c(t,yt.encoder,y,"key",f);return[m(L)+"="+m(c(b,yt.encoder,y,"value",f))]}return[m(t)+"="+m(String(b))]}var k=[];if(typeof b>"u")return k;var N;if(i==="comma"&&Hi(b))g&&c&&(b=go.maybeMap(b,c)),N=[{value:b.length>0?b.join(",")||null:void 0}];else if(Hi(d))N=d;else{var G=Object.keys(b);N=h?G.sort(h):G}var A=l?t.replace(/\./g,"%2E"):t,S=s&&Hi(b)&&b.length===1?A+"[]":A;if(n&&Hi(b)&&b.length===0)return S+"[]";for(var x=0;x"u"?e.encodeDotInKeys===!0?!0:yt.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:yt.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:yt.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:yt.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?yt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:yt.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:yt.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:yt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:yt.encodeValuesOnly,filter:n,format:i,formatter:s,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:yt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:yt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:yt.strictNullHandling}},eb=function(r,e){var t=r,i=Qv(e),s,n;typeof i.filter=="function"?(n=i.filter,t=n("",t)):Hi(i.filter)&&(n=i.filter,s=n);var a=[];if(typeof t!="object"||t===null)return"";var o=Xf[i.arrayFormat],l=o==="comma"&&i.commaRoundTrip;s||(s=Object.keys(t)),i.sort&&s.sort(i.sort);for(var c=Yf(),d=0;d0?p+u:""},cn=$f,Wh=Object.prototype.hasOwnProperty,tb=Array.isArray,pt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:cn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},ib=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Kf=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},rb="utf8=%26%2310003%3B",sb="utf8=%E2%9C%93",nb=function(e,t){var i={__proto__:null},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;s=s.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var n=t.parameterLimit===1/0?void 0:t.parameterLimit,a=s.split(t.delimiter,n),o=-1,l,c=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(f=tb(f)?[f]:f);var m=Wh.call(i,p);m&&t.duplicates==="combine"?i[p]=cn.combine(i[p],f):(!m||t.duplicates==="last")&&(i[p]=f)}return i},ab=function(r,e,t,i){for(var s=i?e:Kf(e,t),n=r.length-1;n>=0;--n){var a,o=r[n];if(o==="[]"&&t.parseArrays)a=t.allowEmptyArrays&&(s===""||t.strictNullHandling&&s===null)?[]:[].concat(s);else{a=t.plainObjects?Object.create(null):{};var l=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,c=t.decodeDotInKeys?l.replace(/%2E/g,"."):l,d=parseInt(c,10);!t.parseArrays&&c===""?a={0:s}:!isNaN(d)&&o!==c&&String(d)===c&&d>=0&&t.parseArrays&&d<=t.arrayLimit?(a=[],a[d]=s):c!=="__proto__"&&(a[c]=s)}s=a}return s},ob=function(e,t,i,s){if(e){var n=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=i.depth>0&&a.exec(n),c=l?n.slice(0,l.index):n,d=[];if(c){if(!i.plainObjects&&Wh.call(Object.prototype,c)&&!i.allowPrototypes)return;d.push(c)}for(var h=0;i.depth>0&&(l=o.exec(n))!==null&&h"u"?pt.charset:e.charset,i=typeof e.duplicates>"u"?pt.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var s=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:pt.allowDots:!!e.allowDots;return{allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:pt.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:pt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:pt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:pt.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:pt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:pt.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:pt.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:pt.decoder,delimiter:typeof e.delimiter=="string"||cn.isRegExp(e.delimiter)?e.delimiter:pt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:pt.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:pt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:pt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:pt.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:pt.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:pt.strictNullHandling}},hb=function(r,e){var t=lb(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof r=="string"?nb(r,t):r,s=t.plainObjects?Object.create(null):{},n=Object.keys(i),a=0;a",'"',"`"," ","\r",` +`+e.prev}function Pa(r,e){var t=Gh(r),i=[];if(t){i.length=r.length;for(var s=0;s1;){var t=e.pop(),i=t.obj[t.prop];if(ls(i)){for(var s=[],n=0;n=Hl?a.slice(l,l+Hl):a,d=[],h=0;h=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||n===Fv.RFC1738&&(u===40||u===41)){d[d.length]=c.charAt(h);continue}if(u<128){d[d.length]=Ri[u];continue}if(u<2048){d[d.length]=Ri[192|u>>6]+Ri[128|u&63];continue}if(u<55296||u>=57344){d[d.length]=Ri[224|u>>12]+Ri[128|u>>6&63]+Ri[128|u&63];continue}h+=1,u=65536+((u&1023)<<10|c.charCodeAt(h)&1023),d[d.length]=Ri[240|u>>18]+Ri[128|u>>12&63]+Ri[128|u>>6&63]+Ri[128|u&63]}o+=d.join("")}return o},Wv=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],s=0;s"u"&&(E=0)}if(typeof d=="function"?b=d(t,b):b instanceof Date?b=p(b):i==="comma"&&Hi(b)&&(b=go.maybeMap(b,function(V){return V instanceof Date?p(V):V})),b===null){if(a)return c&&!g?c(t,yt.encoder,y,"key",f):t;b=""}if(Zv(b)||go.isBuffer(b)){if(c){var L=g?t:c(t,yt.encoder,y,"key",f);return[m(L)+"="+m(c(b,yt.encoder,y,"value",f))]}return[m(t)+"="+m(String(b))]}var k=[];if(typeof b>"u")return k;var N;if(i==="comma"&&Hi(b))g&&c&&(b=go.maybeMap(b,c)),N=[{value:b.length>0?b.join(",")||null:void 0}];else if(Hi(d))N=d;else{var G=Object.keys(b);N=h?G.sort(h):G}var A=l?t.replace(/\./g,"%2E"):t,S=s&&Hi(b)&&b.length===1?A+"[]":A;if(n&&Hi(b)&&b.length===0)return S+"[]";for(var x=0;x"u"?e.encodeDotInKeys===!0?!0:yt.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:yt.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:yt.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:yt.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?yt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:yt.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:yt.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:yt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:yt.encodeValuesOnly,filter:n,format:i,formatter:s,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:yt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:yt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:yt.strictNullHandling}},eb=function(r,e){var t=r,i=Qv(e),s,n;typeof i.filter=="function"?(n=i.filter,t=n("",t)):Hi(i.filter)&&(n=i.filter,s=n);var a=[];if(typeof t!="object"||t===null)return"";var o=Yf[i.arrayFormat],l=o==="comma"&&i.commaRoundTrip;s||(s=Object.keys(t)),i.sort&&s.sort(i.sort);for(var c=Xf(),d=0;d0?p+u:""},cn=$f,Wh=Object.prototype.hasOwnProperty,tb=Array.isArray,pt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:cn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},ib=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Kf=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},rb="utf8=%26%2310003%3B",sb="utf8=%E2%9C%93",nb=function(e,t){var i={__proto__:null},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;s=s.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var n=t.parameterLimit===1/0?void 0:t.parameterLimit,a=s.split(t.delimiter,n),o=-1,l,c=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(f=tb(f)?[f]:f);var m=Wh.call(i,p);m&&t.duplicates==="combine"?i[p]=cn.combine(i[p],f):(!m||t.duplicates==="last")&&(i[p]=f)}return i},ab=function(r,e,t,i){for(var s=i?e:Kf(e,t),n=r.length-1;n>=0;--n){var a,o=r[n];if(o==="[]"&&t.parseArrays)a=t.allowEmptyArrays&&(s===""||t.strictNullHandling&&s===null)?[]:[].concat(s);else{a=t.plainObjects?Object.create(null):{};var l=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,c=t.decodeDotInKeys?l.replace(/%2E/g,"."):l,d=parseInt(c,10);!t.parseArrays&&c===""?a={0:s}:!isNaN(d)&&o!==c&&String(d)===c&&d>=0&&t.parseArrays&&d<=t.arrayLimit?(a=[],a[d]=s):c!=="__proto__"&&(a[c]=s)}s=a}return s},ob=function(e,t,i,s){if(e){var n=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=i.depth>0&&a.exec(n),c=l?n.slice(0,l.index):n,d=[];if(c){if(!i.plainObjects&&Wh.call(Object.prototype,c)&&!i.allowPrototypes)return;d.push(c)}for(var h=0;i.depth>0&&(l=o.exec(n))!==null&&h"u"?pt.charset:e.charset,i=typeof e.duplicates>"u"?pt.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var s=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:pt.allowDots:!!e.allowDots;return{allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:pt.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:pt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:pt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:pt.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:pt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:pt.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:pt.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:pt.decoder,delimiter:typeof e.delimiter=="string"||cn.isRegExp(e.delimiter)?e.delimiter:pt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:pt.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:pt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:pt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:pt.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:pt.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:pt.strictNullHandling}},hb=function(r,e){var t=lb(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof r=="string"?nb(r,t):r,s=t.plainObjects?Object.create(null):{},n=Object.keys(i),a=0;a",'"',"`"," ","\r",` `," "],bb=["{","}","|","\\","^","`"].concat(vb),zh=["'"].concat(bb),wu=["%","/","?",";","#"].concat(zh),_u=["/","?","#"],wb=255,xu=/^[+a-z0-9A-Z_-]{0,63}$/,_b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,xb={javascript:!0,"javascript:":!0},jh={javascript:!0,"javascript:":!0},tn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},$h=pb;function Tb(r,e,t){if(r&&typeof r=="object"&&r instanceof cr)return r;var i=new cr;return i.parse(r,e,t),i}cr.prototype.parse=function(r,e,t){if(typeof r!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof r);var i=r.indexOf("?"),s=i!==-1&&i127?E+="x":E+=v[C];if(!E.match(xu)){var L=w.slice(0,p),k=w.slice(p+1),N=v.match(_b);N&&(L.push(N[1]),k.unshift(N[2])),k.length&&(o="/"+k.join(".")+o),this.hostname=L.join(".");break}}}this.hostname.length>wb?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=fb.toASCII(this.hostname));var G=this.port?":"+this.port:"",A=this.hostname||"";this.host=A+G,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!xb[d])for(var p=0,b=zh.length;p0?t.host.split("@"):!1;E&&(t.auth=E.shift(),t.hostname=E.shift(),t.host=t.hostname)}return t.search=r.search,t.query=r.query,(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!w.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var C=w.slice(-1)[0],I=(t.host||r.host||w.length>1)&&(C==="."||C==="..")||C==="",L=0,k=w.length;k>=0;k--)C=w[k],C==="."?w.splice(k,1):C===".."?(w.splice(k,1),L++):L&&(w.splice(k,1),L--);if(!g&&!y)for(;L--;L)w.unshift("..");g&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),I&&w.join("/").substr(-1)!=="/"&&w.push("");var N=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(v){t.hostname=N?"":w.length?w.shift():"",t.host=t.hostname;var E=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;E&&(t.auth=E.shift(),t.hostname=E.shift(),t.host=t.hostname)}return g=g||t.host&&w.length,g&&!N&&w.unshift(""),w.length>0?t.pathname=w.join("/"):(t.pathname=null,t.path=null),(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=r.auth||t.auth,t.slashes=t.slashes||r.slashes,t.href=t.format(),t};cr.prototype.parseHost=function(){var r=this.host,e=gb.exec(r);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),r=r.substr(0,r.length-e.length)),r&&(this.hostname=r)};const Tu={};function He(r,e,t=3){if(Tu[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e} Deprecated since v${r}`):(i=i.split(` `).splice(t).join(` `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e} Deprecated since v${r}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e} -Deprecated since v${r}`),console.warn(i))),Tu[e]=!0}function vi(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function In(r){return r.split("?")[0].split("#")[0]}function Eb(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ab(r,e,t){return r.replace(new RegExp(Eb(e),"g"),t)}function Sb(r,e){let t="",i=0,s=-1,n=0,a=-1;for(let o=0;o<=r.length;++o){if(o2){const l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=o,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=o,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+=`/${r.slice(s+1,o)}`:t=r.slice(s+1,o),i=o-s-1;s=o,n=0}else a===46&&n!==-1?++n:n=-1}return t}const At={toPosix(r){return Ab(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){vi(r),r=this.toPosix(r);const e=/^file:\/\/\//.exec(r);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(r);return t?t[0]:""},toAbsolute(r,e,t){if(vi(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;const i=In(this.toPosix(e??ue.ADAPTER.getBaseUrl())),s=In(this.toPosix(t??this.rootname(i)));return r=this.toPosix(r),r.startsWith("/")?At.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(vi(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let e="";const t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));const i=r.endsWith("/");return r=Sb(r,!1),r.length>0&&i&&(r+="/"),t?`/${r}`:e+r},isAbsolute(r){return vi(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let e;for(let t=0;t0)if(e===void 0)e=i;else{const s=r[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(vi(r),r.length===0)return".";r=this.toPosix(r);let e=r.charCodeAt(0);const t=e===47;let i=-1,s=!0;const n=this.getProtocol(r),a=r;r=r.slice(n.length);for(let o=r.length-1;o>=1;--o)if(e=r.charCodeAt(o),e===47){if(!s){i=o;break}}else s=!1;return i===-1?t?"/":this.isUrl(a)?n+r:n:t&&i===1?"//":n+r.slice(0,i)},rootname(r){vi(r),r=this.toPosix(r);let e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){const t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename(r,e){vi(r),e&&vi(e),r=In(this.toPosix(r));let t=0,i=-1,s=!0,n;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";let a=e.length-1,o=-1;for(n=r.length-1;n>=0;--n){const l=r.charCodeAt(n);if(l===47){if(!s){t=n+1;break}}else o===-1&&(s=!1,o=n+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(i=n):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=r.length),r.slice(t,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){t=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(t,i)},extname(r){vi(r),r=In(this.toPosix(r));let e=-1,t=0,i=-1,s=!0,n=0;for(let a=r.length-1;a>=0;--a){const o=r.charCodeAt(a);if(o===47){if(!s){t=a+1;break}continue}i===-1&&(s=!1,i=a+1),o===46?e===-1?e=a:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||i===-1||n===0||n===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse(r){vi(r);const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=In(this.toPosix(r));let t=r.charCodeAt(0);const i=this.isAbsolute(r);let s;e.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let n=-1,a=0,o=-1,l=!0,c=r.length-1,d=0;for(;c>=s;--c){if(t=r.charCodeAt(c),t===47){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),t===46?n===-1?n=c:d!==1&&(d=1):n!==-1&&(d=-1)}return n===-1||o===-1||d===0||d===1&&n===o-1&&n===a+1?o!==-1&&(a===0&&i?e.base=e.name=r.slice(1,o):e.base=e.name=r.slice(a,o)):(a===0&&i?(e.name=r.slice(1,n),e.base=r.slice(1,o)):(e.name=r.slice(a,n),e.base=r.slice(a,o)),e.ext=r.slice(n,o)),e.dir=this.dirname(r),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Vl;async function Cb(){return Vl??(Vl=(async()=>{const r=document.createElement("canvas").getContext("webgl");if(!r)return zt.UNPACK;const e=await new Promise(n=>{const a=document.createElement("video");a.onloadeddata=()=>n(a),a.onerror=()=>n(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return zt.UNPACK;const t=r.createTexture();r.bindTexture(r.TEXTURE_2D,t);const i=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,i),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.NONE),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e);const s=new Uint8Array(4);return r.readPixels(0,0,1,1,r.RGBA,r.UNSIGNED_BYTE,s),r.deleteFramebuffer(i),r.deleteTexture(t),r.getExtension("WEBGL_lose_context")?.loseContext(),s[0]<=s[3]?zt.PMA:zt.UNPACK})()),Vl}let Wl;function Mb(){return typeof Wl>"u"&&(Wl=function(){const r={stencil:!0,failIfMajorPerformanceCaveat:ue.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!ue.ADAPTER.getWebGLRenderingContext())return!1;const e=ue.ADAPTER.createCanvas();let t=e.getContext("webgl",r)||e.getContext("experimental-webgl",r);const i=!!t?.getContextAttributes()?.stencil;if(t){const s=t.getExtension("WEBGL_lose_context");s&&s.loseContext()}return t=null,i}catch{return!1}}()),Wl}var kb={grad:.9,turn:360,rad:360/(2*Math.PI)},rr=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},xt=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},ui=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},Zf=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},Eu=function(r){return{r:ui(r.r,0,255),g:ui(r.g,0,255),b:ui(r.b,0,255),a:ui(r.a)}},zl=function(r){return{r:xt(r.r),g:xt(r.g),b:xt(r.b),a:xt(r.a,3)}},Ib=/^#([0-9a-f]{3,8})$/i,La=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},Jf=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),a=n-Math.min(e,t,i),o=a?n===e?(t-i)/a:n===t?2+(i-e)/a:4+(e-t)/a:0;return{h:60*(o<0?o+6:o),s:n?a/n*100:0,v:n/255*100,a:s}},Qf=function(r){var e=r.h,t=r.s,i=r.v,s=r.a;e=e/360*6,t/=100,i/=100;var n=Math.floor(e),a=i*(1-t),o=i*(1-(e-n)*t),l=i*(1-(1-e+n)*t),c=n%6;return{r:255*[i,o,a,a,l,i][c],g:255*[l,i,i,o,a,a][c],b:255*[a,a,l,i,i,o][c],a:s}},Au=function(r){return{h:Zf(r.h),s:ui(r.s,0,100),l:ui(r.l,0,100),a:ui(r.a)}},Su=function(r){return{h:xt(r.h),s:xt(r.s),l:xt(r.l),a:xt(r.a,3)}},Cu=function(r){return Qf((t=(e=r).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},Qn=function(r){return{h:(e=Jf(r)).h,s:(s=(200-(t=e.s))*(i=e.v)/100)>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,i,s},Pb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Lb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yh={string:[[function(r){var e=Ib.exec(r);return e?(r=e[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?xt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?xt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=Rb.exec(r)||Lb.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:Eu({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(r){var e=Pb.exec(r)||Bb.exec(r);if(!e)return null;var t,i,s=Au({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(kb[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Cu(s)},"hsl"]],object:[[function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return rr(e)&&rr(t)&&rr(i)?Eu({r:Number(e),g:Number(t),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var e=r.h,t=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!rr(e)||!rr(t)||!rr(i))return null;var a=Au({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return Cu(a)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!rr(e)||!rr(t)||!rr(i))return null;var a=function(o){return{h:Zf(o.h),s:ui(o.s,0,100),v:ui(o.v,0,100),a:ui(o.a)}}({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return Qf(a)},"hsv"]]},Mu=function(r,e){for(var t=0;t=.5},r.prototype.toHex=function(){return e=zl(this.rgba),t=e.r,i=e.g,s=e.b,a=(n=e.a)<1?La(xt(255*n)):"","#"+La(t)+La(i)+La(s)+a;var e,t,i,s,n,a},r.prototype.toRgb=function(){return zl(this.rgba)},r.prototype.toRgbString=function(){return e=zl(this.rgba),t=e.r,i=e.g,s=e.b,(n=e.a)<1?"rgba("+t+", "+i+", "+s+", "+n+")":"rgb("+t+", "+i+", "+s+")";var e,t,i,s,n},r.prototype.toHsl=function(){return Su(Qn(this.rgba))},r.prototype.toHslString=function(){return e=Su(Qn(this.rgba)),t=e.h,i=e.s,s=e.l,(n=e.a)<1?"hsla("+t+", "+i+"%, "+s+"%, "+n+")":"hsl("+t+", "+i+"%, "+s+"%)";var e,t,i,s,n},r.prototype.toHsv=function(){return e=Jf(this.rgba),{h:xt(e.h),s:xt(e.s),v:xt(e.v),a:xt(e.a,3)};var e},r.prototype.invert=function(){return Li({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},r.prototype.saturate=function(e){return e===void 0&&(e=.1),Li(jl(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),Li(jl(this.rgba,-e))},r.prototype.grayscale=function(){return Li(jl(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),Li(ku(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),Li(ku(this.rgba,-e))},r.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},r.prototype.alpha=function(e){return typeof e=="number"?Li({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):xt(this.rgba.a,3);var t},r.prototype.hue=function(e){var t=Qn(this.rgba);return typeof e=="number"?Li({h:e,s:t.s,l:t.l,a:t.a}):xt(t.h)},r.prototype.isEqual=function(e){return this.toHex()===Li(e).toHex()},r}(),Li=function(r){return r instanceof Xh?r:new Xh(r)},Iu=[],Ob=function(r){r.forEach(function(e){Iu.indexOf(e)<0&&(e(Xh,Yh),Iu.push(e))})};function Fb(r,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in t)i[t[s]]=s;var n={};r.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,c=i[this.toHex()];if(c)return c;if(a?.closest){var d=this.toRgb(),h=1/0,u="black";if(!n.length)for(var p in t)n[p]=new r(t[p]).toRgb();for(var f in t){var m=(o=d,l=n[f],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));ms===t[n]);if(e!==null&&t!==null){const s=Object.keys(e),n=Object.keys(t);return s.length!==n.length?!1:s.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,i,s]=this._components;return{r:e,g:t,b:i,a:s}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,s]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(s*255),e}toRgbArray(e){e=e??[];const[t,i,s]=this._components;return e[0]=t,e[1]=i,e[2]=s,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,s,n]=yo.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return t&&(i=i*e+.5|0,s=s*e+.5|0,n=n*e+.5|0),(e*255<<24)+(i<<16)+(s<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,i,s]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(i*e)/e,this._components[2]=Math.round(s*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,i,s,n]=this._components;return e[0]=t,e[1]=i,e[2]=s,e[3]=n,e}normalize(e){let t,i,s,n;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const a=e;t=(a>>16&255)/255,i=(a>>8&255)/255,s=(a&255)/255,n=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,s,n=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,s,n=255]=e,t/=255,i/=255,s/=255,n/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const o=yo.HEX_PATTERN.exec(e);o&&(e=`#${o[2]}`)}const a=Li(e);a.isValid()&&({r:t,g:i,b:s,a:n}=a.rgba,t/=255,i/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=s,this._components[3]=n,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((s,n)=>{e[n]=Math.min(Math.max(s,t),i)}),e)}};Us.shared=new Us,Us.temp=new Us,Us.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let B=Us;function Nb(r){return He("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),B.shared.setValue(r).toHex()}function Ub(r){return He("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),B.shared.setValue(r).toNumber()}function Hb(){const r=[],e=[];for(let i=0;i<32;i++)r[i]=i,e[i]=i;r[Me.NORMAL_NPM]=Me.NORMAL,r[Me.ADD_NPM]=Me.ADD,r[Me.SCREEN_NPM]=Me.SCREEN,e[Me.NORMAL]=Me.NORMAL_NPM,e[Me.ADD]=Me.ADD_NPM,e[Me.SCREEN]=Me.SCREEN_NPM;const t=[];return t.push(e),t.push(r),t}const em=Hb();function tm(r,e){return em[e?1:0][r]}function Gb(r,e=null){const t=r*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,s=0;i>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Pu(r){return!(r&r-1)&&!!r}function Bu(r){let e=(r>65535?1:0)<<4;r>>>=e;let t=(r>255?1:0)<<3;return r>>>=t,e|=t,t=(r>15?1:0)<<2,r>>>=t,e|=t,t=(r>3?1:0)<<1,r>>>=t,e|=t,e|r>>1}function rn(r,e,t){const i=r.length;let s;if(e>=i||t===0)return;t=e+t>i?i-e:t;const n=i-t;for(s=e;s(r.Renderer="renderer",r.Application="application",r.RendererSystem="renderer-webgl-system",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererSystem="renderer-canvas-system",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r))(oe||{});const Kh=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},Fu=(r,e)=>Kh(r).priority??e,ge={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Kh).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(Kh).forEach(e=>{e.type.forEach(t=>{const i=this._addHandlers,s=this._queue;i[t]?i[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(r,e,t){const i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;const n=this._queue;return n[r]&&(n[r]?.forEach(a=>e(a)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>Fu(n,t)-Fu(s,t)))},i=>{const s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})}};class Zh{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const Yb=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` -`);function Xb(r){let e="";for(let t=0;t0&&(e+=` -else `),t=0;--i){const s=Jh[i];if(s.test&&s.test(r,t))return new s(r,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Ci{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,n,a,o,l){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:d}=this;this._aliasCount++;for(let h=0,u=d.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Ci.prototype,{dispatch:{value:Ci.prototype.emit},run:{value:Ci.prototype.emit}});class la{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ci("setRealSize"),this.onUpdate=new Ci("update"),this.onError=new Ci("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){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)}static test(e,t){return!1}}class sl extends la{constructor(e,t){const{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const s=e.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===zt.UNPACK);const n=t.realWidth,a=t.realHeight;return i.width===n&&i.height===a?s.texSubImage2D(t.target,0,0,0,n,a,t.format,i.type,this.data):(i.width=n,i.height=a,s.texImage2D(t.target,0,i.internalFormat,n,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const Kb={scaleMode:ar.NEAREST,alphaMode:zt.NPM},Qh=class Hs extends _n{constructor(e=null,t=null){super(),t=Object.assign({},Hs.defaultOptions,t);const{alphaMode:i,mipmap:s,anisotropicLevel:n,scaleMode:a,width:o,height:l,wrapMode:c,format:d,type:h,target:u,resolution:p,resourceOptions:f}=t;e&&!(e instanceof la)&&(e=rm(e,f),e.internal=!0),this.resolution=p||ue.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=s,this.anisotropicLevel=n,this._wrapMode=c,this._scaleMode=a,this.format=d,this.type=h,this.target=u,this.alphaMode=i,this.uid=Ts(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,i=!0),i&&this.dirtyStyleId++,this}setSize(e,t,i){return i=i||this.resolution,this.setRealSize(e*i,t*i,i)}setRealSize(e,t,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Pu(this.realWidth)&&Pu(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){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))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete _r[this.cacheId],delete Di[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),Hs.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,i=ue.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${Ts()}`}n=e._pixiId}let a=_r[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in BaseTextureCache.`);return a||(a=new Hs(e,t),a.cacheId=n,Hs.addToCache(a,n)),a}static fromBuffer(e,t,i,s){e=e||new Float32Array(t*i*4);const n=new sl(e,{width:t,height:i,...s?.resourceOptions});let a,o;return e instanceof Float32Array?(a=se.RGBA,o=xe.FLOAT):e instanceof Int32Array?(a=se.RGBA_INTEGER,o=xe.INT):e instanceof Uint32Array?(a=se.RGBA_INTEGER,o=xe.UNSIGNED_INT):e instanceof Int16Array?(a=se.RGBA_INTEGER,o=xe.SHORT):e instanceof Uint16Array?(a=se.RGBA_INTEGER,o=xe.UNSIGNED_SHORT):e instanceof Int8Array?(a=se.RGBA,o=xe.BYTE):(a=se.RGBA,o=xe.UNSIGNED_BYTE),n.internal=!0,new Hs(n,Object.assign({},Kb,{type:o,format:a},s))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),_r[t]&&_r[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),_r[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=_r[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete _r[e],t}}else if(e?.textureCacheIds){for(let t=0;t1){for(let h=0;h(r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC",r))(It||{});class ze{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new ze(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}}ze.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const Da=[new ze,new ze,new ze,new ze];class ke{constructor(e=0,t=0,i=0,s=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s),this.type=It.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ke(0,0,0,0)}clone(){return new ke(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e=this.y&&te.right?e.right:this.right)<=L)return!1;const k=this.ye.bottom?e.bottom:this.bottom)>k}const i=this.left,s=this.right,n=this.top,a=this.bottom;if(s<=i||a<=n)return!1;const o=Da[0].set(e.left,e.top),l=Da[1].set(e.left,e.bottom),c=Da[2].set(e.right,e.top),d=Da[3].set(e.right,e.bottom);if(c.x<=o.x||l.y<=o.y)return!1;const h=Math.sign(t.a*t.d-t.b*t.c);if(h===0||(t.apply(o,o),t.apply(l,l),t.apply(c,c),t.apply(d,d),Math.max(o.x,l.x,c.x,d.x)<=i||Math.min(o.x,l.x,c.x,d.x)>=s||Math.max(o.y,l.y,c.y,d.y)<=n||Math.min(o.y,l.y,c.y,d.y)>=a))return!1;const u=h*(l.y-o.y),p=h*(o.x-l.x),f=u*i+p*n,m=u*s+p*n,g=u*i+p*a,y=u*s+p*a;if(Math.max(f,m,g,y)<=u*o.x+p*o.y||Math.min(f,m,g,y)>=u*d.x+p*d.y)return!1;const w=h*(o.y-c.y),b=h*(c.x-o.x),v=w*i+b*n,E=w*s+b*n,C=w*i+b*a,I=w*s+b*a;return!(Math.max(v,E,C,I)<=w*o.x+b*o.y||Math.min(v,E,C,I)>=w*d.x+b*d.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){const i=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=s-this.y,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}}ke.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class nl{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=It.CIRC}clone(){return new nl(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;const i=this.radius*this.radius;let s=this.x-e,n=this.y-t;return s*=s,n*=n,s+n<=i}getBounds(){return new ke(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}nl.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class al{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s,this.type=It.ELIP}clone(){return new al(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,s=(t-this.y)/this.height;return i*=i,s*=s,i+s<=1}getBounds(){return new ke(this.x-this.width,this.y-this.height,this.width,this.height)}}al.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class ys{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){const i=[];for(let s=0,n=t.length;st!=d>t&&e<(c-o)*((t-l)/(d-l))+o&&(i=!i)}return i}}ys.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((r,e)=>`${r}, ${e}`,"")}]`};class ol{constructor(e=0,t=0,i=0,s=0,n=20){this.x=e,this.y=t,this.width=i,this.height=s,this.radius=n,this.type=It.RREC}clone(){return new ol(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let s=e-(this.x+i),n=t-(this.y+i);const a=i*i;if(s*s+n*n<=a||(s=e-(this.x+this.width-i),s*s+n*n<=a)||(n=t-(this.y+this.height-i),s*s+n*n<=a)||(s=e-(this.x+i),s*s+n*n<=a))return!0}return!1}}ol.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class tt{constructor(e=1,t=0,i=0,s=1,n=0,a=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,s,n,a){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new ze;const i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new ze;const i=1/(this.a*this.d+this.c*-this.b),s=e.x,n=e.y;return t.x=this.d*i*s+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*n+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),i=Math.sin(e),s=this.a,n=this.c,a=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this}append(e){const t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}setTransform(e,t,i,s,n,a,o,l,c){return this.a=Math.cos(o+c)*n,this.b=Math.sin(o+c)*n,this.c=-Math.sin(o-l)*a,this.d=Math.cos(o-l)*a,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,i=this.b,s=this.c,n=this.d,a=e.pivot,o=-Math.atan2(-s,n),l=Math.atan2(i,t),c=Math.abs(o+l);return c<1e-5||Math.abs(Do-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(a.x*t+a.y*s),e.position.y=this.ty+(a.x*i+a.y*n),e}invert(){const e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,a=e*s-t*i;return this.a=s/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-s*n)/a,this.ty=-(e*this.ty-t*n)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new tt;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new tt}static get TEMP_MATRIX(){return new tt}}tt.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}]`};const Jr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Qr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],es=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],ts=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],tc=[],am=[],Oa=Math.sign;function sw(){for(let r=0;r<16;r++){const e=[];tc.push(e);for(let t=0;t<16;t++){const i=Oa(Jr[r]*Jr[t]+es[r]*Qr[t]),s=Oa(Qr[r]*Jr[t]+ts[r]*Qr[t]),n=Oa(Jr[r]*es[t]+es[r]*ts[t]),a=Oa(Qr[r]*es[t]+ts[r]*ts[t]);for(let o=0;o<16;o++)if(Jr[o]===i&&Qr[o]===s&&es[o]===n&&ts[o]===a){e.push(o);break}}}for(let r=0;r<16;r++){const e=new tt;e.set(Jr[r],Qr[r],es[r],ts[r],0,0),am.push(e)}}sw();const 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:r=>Jr[r],uY:r=>Qr[r],vX:r=>es[r],vY:r=>ts[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>tc[r][e],sub:(r,e)=>tc[r][lt.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?lt.S:lt.N:Math.abs(e)*2<=Math.abs(r)?r>0?lt.E:lt.W:e>0?r>0?lt.SE:lt.SW:r>0?lt.NE:lt.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{const s=am[lt.inv(e)];s.tx=t,s.ty=i,r.append(s)}};class lr{constructor(e,t,i=0,s=0){this._x=i,this._y=s,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new lr(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}lr.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const ic=class{constructor(){this.worldTransform=new tt,this.localTransform=new tt,this.position=new lr(this.onChange,this,0,0),this.scale=new lr(this.onChange,this,1,1),this.pivot=new lr(this.onChange,this,0,0),this.skew=new lr(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}onChange(){this._localID++}updateSkew(){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++}updateLocalTransform(){const r=this.localTransform;this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(r){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==r._worldID){const t=r.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=r._worldID,this._worldID++}}setFromMatrix(r){r.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(r){this._rotation!==r&&(this._rotation=r,this.updateSkew())}};ic.IDENTITY=new ic;let id=ic;id.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}) ]`};var aw=`varying vec2 vTextureCoord; +Deprecated since v${r}`),console.warn(i))),Tu[e]=!0}function vi(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function In(r){return r.split("?")[0].split("#")[0]}function Eb(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ab(r,e,t){return r.replace(new RegExp(Eb(e),"g"),t)}function Sb(r,e){let t="",i=0,s=-1,n=0,a=-1;for(let o=0;o<=r.length;++o){if(o2){const l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=o,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=o,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+=`/${r.slice(s+1,o)}`:t=r.slice(s+1,o),i=o-s-1;s=o,n=0}else a===46&&n!==-1?++n:n=-1}return t}const At={toPosix(r){return Ab(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){vi(r),r=this.toPosix(r);const e=/^file:\/\/\//.exec(r);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(r);return t?t[0]:""},toAbsolute(r,e,t){if(vi(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;const i=In(this.toPosix(e??ue.ADAPTER.getBaseUrl())),s=In(this.toPosix(t??this.rootname(i)));return r=this.toPosix(r),r.startsWith("/")?At.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(vi(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let e="";const t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));const i=r.endsWith("/");return r=Sb(r,!1),r.length>0&&i&&(r+="/"),t?`/${r}`:e+r},isAbsolute(r){return vi(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let e;for(let t=0;t0)if(e===void 0)e=i;else{const s=r[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(vi(r),r.length===0)return".";r=this.toPosix(r);let e=r.charCodeAt(0);const t=e===47;let i=-1,s=!0;const n=this.getProtocol(r),a=r;r=r.slice(n.length);for(let o=r.length-1;o>=1;--o)if(e=r.charCodeAt(o),e===47){if(!s){i=o;break}}else s=!1;return i===-1?t?"/":this.isUrl(a)?n+r:n:t&&i===1?"//":n+r.slice(0,i)},rootname(r){vi(r),r=this.toPosix(r);let e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){const t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename(r,e){vi(r),e&&vi(e),r=In(this.toPosix(r));let t=0,i=-1,s=!0,n;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";let a=e.length-1,o=-1;for(n=r.length-1;n>=0;--n){const l=r.charCodeAt(n);if(l===47){if(!s){t=n+1;break}}else o===-1&&(s=!1,o=n+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(i=n):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=r.length),r.slice(t,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){t=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(t,i)},extname(r){vi(r),r=In(this.toPosix(r));let e=-1,t=0,i=-1,s=!0,n=0;for(let a=r.length-1;a>=0;--a){const o=r.charCodeAt(a);if(o===47){if(!s){t=a+1;break}continue}i===-1&&(s=!1,i=a+1),o===46?e===-1?e=a:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||i===-1||n===0||n===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse(r){vi(r);const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=In(this.toPosix(r));let t=r.charCodeAt(0);const i=this.isAbsolute(r);let s;e.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let n=-1,a=0,o=-1,l=!0,c=r.length-1,d=0;for(;c>=s;--c){if(t=r.charCodeAt(c),t===47){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),t===46?n===-1?n=c:d!==1&&(d=1):n!==-1&&(d=-1)}return n===-1||o===-1||d===0||d===1&&n===o-1&&n===a+1?o!==-1&&(a===0&&i?e.base=e.name=r.slice(1,o):e.base=e.name=r.slice(a,o)):(a===0&&i?(e.name=r.slice(1,n),e.base=r.slice(1,o)):(e.name=r.slice(a,n),e.base=r.slice(a,o)),e.ext=r.slice(n,o)),e.dir=this.dirname(r),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Vl;async function Cb(){return Vl??(Vl=(async()=>{const r=document.createElement("canvas").getContext("webgl");if(!r)return zt.UNPACK;const e=await new Promise(n=>{const a=document.createElement("video");a.onloadeddata=()=>n(a),a.onerror=()=>n(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return zt.UNPACK;const t=r.createTexture();r.bindTexture(r.TEXTURE_2D,t);const i=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,i),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.NONE),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e);const s=new Uint8Array(4);return r.readPixels(0,0,1,1,r.RGBA,r.UNSIGNED_BYTE,s),r.deleteFramebuffer(i),r.deleteTexture(t),r.getExtension("WEBGL_lose_context")?.loseContext(),s[0]<=s[3]?zt.PMA:zt.UNPACK})()),Vl}let Wl;function Mb(){return typeof Wl>"u"&&(Wl=function(){const r={stencil:!0,failIfMajorPerformanceCaveat:ue.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!ue.ADAPTER.getWebGLRenderingContext())return!1;const e=ue.ADAPTER.createCanvas();let t=e.getContext("webgl",r)||e.getContext("experimental-webgl",r);const i=!!t?.getContextAttributes()?.stencil;if(t){const s=t.getExtension("WEBGL_lose_context");s&&s.loseContext()}return t=null,i}catch{return!1}}()),Wl}var kb={grad:.9,turn:360,rad:360/(2*Math.PI)},rr=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},xt=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},ui=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},Zf=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},Eu=function(r){return{r:ui(r.r,0,255),g:ui(r.g,0,255),b:ui(r.b,0,255),a:ui(r.a)}},zl=function(r){return{r:xt(r.r),g:xt(r.g),b:xt(r.b),a:xt(r.a,3)}},Ib=/^#([0-9a-f]{3,8})$/i,La=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},Jf=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),a=n-Math.min(e,t,i),o=a?n===e?(t-i)/a:n===t?2+(i-e)/a:4+(e-t)/a:0;return{h:60*(o<0?o+6:o),s:n?a/n*100:0,v:n/255*100,a:s}},Qf=function(r){var e=r.h,t=r.s,i=r.v,s=r.a;e=e/360*6,t/=100,i/=100;var n=Math.floor(e),a=i*(1-t),o=i*(1-(e-n)*t),l=i*(1-(1-e+n)*t),c=n%6;return{r:255*[i,o,a,a,l,i][c],g:255*[l,i,i,o,a,a][c],b:255*[a,a,l,i,i,o][c],a:s}},Au=function(r){return{h:Zf(r.h),s:ui(r.s,0,100),l:ui(r.l,0,100),a:ui(r.a)}},Su=function(r){return{h:xt(r.h),s:xt(r.s),l:xt(r.l),a:xt(r.a,3)}},Cu=function(r){return Qf((t=(e=r).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},Qn=function(r){return{h:(e=Jf(r)).h,s:(s=(200-(t=e.s))*(i=e.v)/100)>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,i,s},Pb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Lb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xh={string:[[function(r){var e=Ib.exec(r);return e?(r=e[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?xt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?xt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=Rb.exec(r)||Lb.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:Eu({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(r){var e=Pb.exec(r)||Bb.exec(r);if(!e)return null;var t,i,s=Au({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(kb[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Cu(s)},"hsl"]],object:[[function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return rr(e)&&rr(t)&&rr(i)?Eu({r:Number(e),g:Number(t),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var e=r.h,t=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!rr(e)||!rr(t)||!rr(i))return null;var a=Au({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return Cu(a)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!rr(e)||!rr(t)||!rr(i))return null;var a=function(o){return{h:Zf(o.h),s:ui(o.s,0,100),v:ui(o.v,0,100),a:ui(o.a)}}({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return Qf(a)},"hsv"]]},Mu=function(r,e){for(var t=0;t=.5},r.prototype.toHex=function(){return e=zl(this.rgba),t=e.r,i=e.g,s=e.b,a=(n=e.a)<1?La(xt(255*n)):"","#"+La(t)+La(i)+La(s)+a;var e,t,i,s,n,a},r.prototype.toRgb=function(){return zl(this.rgba)},r.prototype.toRgbString=function(){return e=zl(this.rgba),t=e.r,i=e.g,s=e.b,(n=e.a)<1?"rgba("+t+", "+i+", "+s+", "+n+")":"rgb("+t+", "+i+", "+s+")";var e,t,i,s,n},r.prototype.toHsl=function(){return Su(Qn(this.rgba))},r.prototype.toHslString=function(){return e=Su(Qn(this.rgba)),t=e.h,i=e.s,s=e.l,(n=e.a)<1?"hsla("+t+", "+i+"%, "+s+"%, "+n+")":"hsl("+t+", "+i+"%, "+s+"%)";var e,t,i,s,n},r.prototype.toHsv=function(){return e=Jf(this.rgba),{h:xt(e.h),s:xt(e.s),v:xt(e.v),a:xt(e.a,3)};var e},r.prototype.invert=function(){return Li({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},r.prototype.saturate=function(e){return e===void 0&&(e=.1),Li(jl(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),Li(jl(this.rgba,-e))},r.prototype.grayscale=function(){return Li(jl(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),Li(ku(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),Li(ku(this.rgba,-e))},r.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},r.prototype.alpha=function(e){return typeof e=="number"?Li({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):xt(this.rgba.a,3);var t},r.prototype.hue=function(e){var t=Qn(this.rgba);return typeof e=="number"?Li({h:e,s:t.s,l:t.l,a:t.a}):xt(t.h)},r.prototype.isEqual=function(e){return this.toHex()===Li(e).toHex()},r}(),Li=function(r){return r instanceof Yh?r:new Yh(r)},Iu=[],Ob=function(r){r.forEach(function(e){Iu.indexOf(e)<0&&(e(Yh,Xh),Iu.push(e))})};function Fb(r,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in t)i[t[s]]=s;var n={};r.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,c=i[this.toHex()];if(c)return c;if(a?.closest){var d=this.toRgb(),h=1/0,u="black";if(!n.length)for(var p in t)n[p]=new r(t[p]).toRgb();for(var f in t){var m=(o=d,l=n[f],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));ms===t[n]);if(e!==null&&t!==null){const s=Object.keys(e),n=Object.keys(t);return s.length!==n.length?!1:s.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,i,s]=this._components;return{r:e,g:t,b:i,a:s}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,s]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(s*255),e}toRgbArray(e){e=e??[];const[t,i,s]=this._components;return e[0]=t,e[1]=i,e[2]=s,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,s,n]=yo.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return t&&(i=i*e+.5|0,s=s*e+.5|0,n=n*e+.5|0),(e*255<<24)+(i<<16)+(s<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,i,s]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(i*e)/e,this._components[2]=Math.round(s*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,i,s,n]=this._components;return e[0]=t,e[1]=i,e[2]=s,e[3]=n,e}normalize(e){let t,i,s,n;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const a=e;t=(a>>16&255)/255,i=(a>>8&255)/255,s=(a&255)/255,n=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,s,n=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,s,n=255]=e,t/=255,i/=255,s/=255,n/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const o=yo.HEX_PATTERN.exec(e);o&&(e=`#${o[2]}`)}const a=Li(e);a.isValid()&&({r:t,g:i,b:s,a:n}=a.rgba,t/=255,i/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=s,this._components[3]=n,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((s,n)=>{e[n]=Math.min(Math.max(s,t),i)}),e)}};Us.shared=new Us,Us.temp=new Us,Us.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let B=Us;function Nb(r){return He("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),B.shared.setValue(r).toHex()}function Ub(r){return He("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),B.shared.setValue(r).toNumber()}function Hb(){const r=[],e=[];for(let i=0;i<32;i++)r[i]=i,e[i]=i;r[Me.NORMAL_NPM]=Me.NORMAL,r[Me.ADD_NPM]=Me.ADD,r[Me.SCREEN_NPM]=Me.SCREEN,e[Me.NORMAL]=Me.NORMAL_NPM,e[Me.ADD]=Me.ADD_NPM,e[Me.SCREEN]=Me.SCREEN_NPM;const t=[];return t.push(e),t.push(r),t}const em=Hb();function tm(r,e){return em[e?1:0][r]}function Gb(r,e=null){const t=r*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,s=0;i>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Pu(r){return!(r&r-1)&&!!r}function Bu(r){let e=(r>65535?1:0)<<4;r>>>=e;let t=(r>255?1:0)<<3;return r>>>=t,e|=t,t=(r>15?1:0)<<2,r>>>=t,e|=t,t=(r>3?1:0)<<1,r>>>=t,e|=t,e|r>>1}function rn(r,e,t){const i=r.length;let s;if(e>=i||t===0)return;t=e+t>i?i-e:t;const n=i-t;for(s=e;s(r.Renderer="renderer",r.Application="application",r.RendererSystem="renderer-webgl-system",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererSystem="renderer-canvas-system",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r))(oe||{});const Kh=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},Fu=(r,e)=>Kh(r).priority??e,ge={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Kh).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(Kh).forEach(e=>{e.type.forEach(t=>{const i=this._addHandlers,s=this._queue;i[t]?i[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(r,e,t){const i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;const n=this._queue;return n[r]&&(n[r]?.forEach(a=>e(a)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>Fu(n,t)-Fu(s,t)))},i=>{const s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})}};class Zh{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const Xb=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +`);function Yb(r){let e="";for(let t=0;t0&&(e+=` +else `),t=0;--i){const s=Jh[i];if(s.test&&s.test(r,t))return new s(r,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Ci{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,n,a,o,l){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:d}=this;this._aliasCount++;for(let h=0,u=d.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Ci.prototype,{dispatch:{value:Ci.prototype.emit},run:{value:Ci.prototype.emit}});class la{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ci("setRealSize"),this.onUpdate=new Ci("update"),this.onError=new Ci("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){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)}static test(e,t){return!1}}class sl extends la{constructor(e,t){const{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const s=e.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===zt.UNPACK);const n=t.realWidth,a=t.realHeight;return i.width===n&&i.height===a?s.texSubImage2D(t.target,0,0,0,n,a,t.format,i.type,this.data):(i.width=n,i.height=a,s.texImage2D(t.target,0,i.internalFormat,n,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const Kb={scaleMode:ar.NEAREST,alphaMode:zt.NPM},Qh=class Hs extends _n{constructor(e=null,t=null){super(),t=Object.assign({},Hs.defaultOptions,t);const{alphaMode:i,mipmap:s,anisotropicLevel:n,scaleMode:a,width:o,height:l,wrapMode:c,format:d,type:h,target:u,resolution:p,resourceOptions:f}=t;e&&!(e instanceof la)&&(e=rm(e,f),e.internal=!0),this.resolution=p||ue.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=s,this.anisotropicLevel=n,this._wrapMode=c,this._scaleMode=a,this.format=d,this.type=h,this.target=u,this.alphaMode=i,this.uid=Ts(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,i=!0),i&&this.dirtyStyleId++,this}setSize(e,t,i){return i=i||this.resolution,this.setRealSize(e*i,t*i,i)}setRealSize(e,t,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Pu(this.realWidth)&&Pu(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){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))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete _r[this.cacheId],delete Di[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),Hs.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,i=ue.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${Ts()}`}n=e._pixiId}let a=_r[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in BaseTextureCache.`);return a||(a=new Hs(e,t),a.cacheId=n,Hs.addToCache(a,n)),a}static fromBuffer(e,t,i,s){e=e||new Float32Array(t*i*4);const n=new sl(e,{width:t,height:i,...s?.resourceOptions});let a,o;return e instanceof Float32Array?(a=se.RGBA,o=xe.FLOAT):e instanceof Int32Array?(a=se.RGBA_INTEGER,o=xe.INT):e instanceof Uint32Array?(a=se.RGBA_INTEGER,o=xe.UNSIGNED_INT):e instanceof Int16Array?(a=se.RGBA_INTEGER,o=xe.SHORT):e instanceof Uint16Array?(a=se.RGBA_INTEGER,o=xe.UNSIGNED_SHORT):e instanceof Int8Array?(a=se.RGBA,o=xe.BYTE):(a=se.RGBA,o=xe.UNSIGNED_BYTE),n.internal=!0,new Hs(n,Object.assign({},Kb,{type:o,format:a},s))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),_r[t]&&_r[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),_r[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=_r[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete _r[e],t}}else if(e?.textureCacheIds){for(let t=0;t1){for(let h=0;h(r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC",r))(It||{});class We{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new We(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}}We.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const Da=[new We,new We,new We,new We];class ke{constructor(e=0,t=0,i=0,s=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s),this.type=It.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ke(0,0,0,0)}clone(){return new ke(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e=this.y&&te.right?e.right:this.right)<=L)return!1;const k=this.ye.bottom?e.bottom:this.bottom)>k}const i=this.left,s=this.right,n=this.top,a=this.bottom;if(s<=i||a<=n)return!1;const o=Da[0].set(e.left,e.top),l=Da[1].set(e.left,e.bottom),c=Da[2].set(e.right,e.top),d=Da[3].set(e.right,e.bottom);if(c.x<=o.x||l.y<=o.y)return!1;const h=Math.sign(t.a*t.d-t.b*t.c);if(h===0||(t.apply(o,o),t.apply(l,l),t.apply(c,c),t.apply(d,d),Math.max(o.x,l.x,c.x,d.x)<=i||Math.min(o.x,l.x,c.x,d.x)>=s||Math.max(o.y,l.y,c.y,d.y)<=n||Math.min(o.y,l.y,c.y,d.y)>=a))return!1;const u=h*(l.y-o.y),p=h*(o.x-l.x),f=u*i+p*n,m=u*s+p*n,g=u*i+p*a,y=u*s+p*a;if(Math.max(f,m,g,y)<=u*o.x+p*o.y||Math.min(f,m,g,y)>=u*d.x+p*d.y)return!1;const w=h*(o.y-c.y),b=h*(c.x-o.x),v=w*i+b*n,E=w*s+b*n,C=w*i+b*a,I=w*s+b*a;return!(Math.max(v,E,C,I)<=w*o.x+b*o.y||Math.min(v,E,C,I)>=w*d.x+b*d.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){const i=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=s-this.y,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}}ke.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class nl{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=It.CIRC}clone(){return new nl(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;const i=this.radius*this.radius;let s=this.x-e,n=this.y-t;return s*=s,n*=n,s+n<=i}getBounds(){return new ke(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}nl.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class al{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s,this.type=It.ELIP}clone(){return new al(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,s=(t-this.y)/this.height;return i*=i,s*=s,i+s<=1}getBounds(){return new ke(this.x-this.width,this.y-this.height,this.width,this.height)}}al.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class ys{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){const i=[];for(let s=0,n=t.length;st!=d>t&&e<(c-o)*((t-l)/(d-l))+o&&(i=!i)}return i}}ys.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((r,e)=>`${r}, ${e}`,"")}]`};class ol{constructor(e=0,t=0,i=0,s=0,n=20){this.x=e,this.y=t,this.width=i,this.height=s,this.radius=n,this.type=It.RREC}clone(){return new ol(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let s=e-(this.x+i),n=t-(this.y+i);const a=i*i;if(s*s+n*n<=a||(s=e-(this.x+this.width-i),s*s+n*n<=a)||(n=t-(this.y+this.height-i),s*s+n*n<=a)||(s=e-(this.x+i),s*s+n*n<=a))return!0}return!1}}ol.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class tt{constructor(e=1,t=0,i=0,s=1,n=0,a=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,s,n,a){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new We;const i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new We;const i=1/(this.a*this.d+this.c*-this.b),s=e.x,n=e.y;return t.x=this.d*i*s+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*n+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),i=Math.sin(e),s=this.a,n=this.c,a=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this}append(e){const t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}setTransform(e,t,i,s,n,a,o,l,c){return this.a=Math.cos(o+c)*n,this.b=Math.sin(o+c)*n,this.c=-Math.sin(o-l)*a,this.d=Math.cos(o-l)*a,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,i=this.b,s=this.c,n=this.d,a=e.pivot,o=-Math.atan2(-s,n),l=Math.atan2(i,t),c=Math.abs(o+l);return c<1e-5||Math.abs(Do-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(a.x*t+a.y*s),e.position.y=this.ty+(a.x*i+a.y*n),e}invert(){const e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,a=e*s-t*i;return this.a=s/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-s*n)/a,this.ty=-(e*this.ty-t*n)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new tt;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new tt}static get TEMP_MATRIX(){return new tt}}tt.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}]`};const Jr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Qr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],es=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],ts=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],tc=[],am=[],Oa=Math.sign;function sw(){for(let r=0;r<16;r++){const e=[];tc.push(e);for(let t=0;t<16;t++){const i=Oa(Jr[r]*Jr[t]+es[r]*Qr[t]),s=Oa(Qr[r]*Jr[t]+ts[r]*Qr[t]),n=Oa(Jr[r]*es[t]+es[r]*ts[t]),a=Oa(Qr[r]*es[t]+ts[r]*ts[t]);for(let o=0;o<16;o++)if(Jr[o]===i&&Qr[o]===s&&es[o]===n&&ts[o]===a){e.push(o);break}}}for(let r=0;r<16;r++){const e=new tt;e.set(Jr[r],Qr[r],es[r],ts[r],0,0),am.push(e)}}sw();const 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:r=>Jr[r],uY:r=>Qr[r],vX:r=>es[r],vY:r=>ts[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>tc[r][e],sub:(r,e)=>tc[r][lt.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?lt.S:lt.N:Math.abs(e)*2<=Math.abs(r)?r>0?lt.E:lt.W:e>0?r>0?lt.SE:lt.SW:r>0?lt.NE:lt.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{const s=am[lt.inv(e)];s.tx=t,s.ty=i,r.append(s)}};class lr{constructor(e,t,i=0,s=0){this._x=i,this._y=s,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new lr(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}lr.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const ic=class{constructor(){this.worldTransform=new tt,this.localTransform=new tt,this.position=new lr(this.onChange,this,0,0),this.scale=new lr(this.onChange,this,1,1),this.pivot=new lr(this.onChange,this,0,0),this.skew=new lr(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}onChange(){this._localID++}updateSkew(){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++}updateLocalTransform(){const r=this.localTransform;this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(r){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==r._worldID){const t=r.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=r._worldID,this._worldID++}}setFromMatrix(r){r.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(r){this._rotation!==r&&(this._rotation=r,this.updateSkew())}};ic.IDENTITY=new ic;let id=ic;id.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}) ]`};var aw=`varying vec2 vTextureCoord; uniform sampler2D uSampler; @@ -303,7 +303,7 @@ void main(void){ `);o[0]=l,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function pw(r,e,t,i){r.getProgramParameter(e,r.LINK_STATUS)||(r.getShaderParameter(t,r.COMPILE_STATUS)||Hu(r,t),r.getShaderParameter(i,r.COMPILE_STATUS)||Hu(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(e)))}const fw={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 hm(r){return fw[r]}let Ua=null;const Gu={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 cm(r,e){if(!Ua){const t=Object.keys(Gu);Ua={};for(let i=0;i0&&(t+=` else `),i=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){const{elements:n,ids:a,count:o}=e;let l=0;for(let c=0;c=0&&h=Ss.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}Fo.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},Fo.extension={type:oe.RendererSystem,name:"context"};ge.add(Fo);class ac{constructor(e,t){if(this.width=Math.round(e),this.height=Math.round(t),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");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 Ci("disposeFramebuffer"),this.multisample=gt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new Pe(null,{scaleMode:ar.NEAREST,resolution:1,mipmap:Ji.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Pe(null,{scaleMode:ar.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Ji.OFF,format:se.DEPTH_COMPONENT,type:xe.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!e||!t)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i{const s=this.source;this.url=s.src;const n=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.update(),this._load=null,this.createBitmap?t(this.process()):t(this))};s.complete&&s.src?n():(s.onload=n,s.onerror=a=>{i(a),this.onError.emit(a)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(s=>s.blob()).then(s=>t(s,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===zt.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let s=!0;const n=t._glTextures;for(const a in n){const o=n[a];if(o!==i&&o.dirtyId!==t.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class rd{constructor(){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)}set(e,t,i){const s=t.width,n=t.height;if(i){const a=e.width/2/s,o=e.height/2/n,l=e.x/s+a,c=e.y/n+o;i=lt.add(i,lt.NW),this.x0=l+a*lt.uX(i),this.y0=c+o*lt.uY(i),i=lt.add(i,2),this.x1=l+a*lt.uX(i),this.y1=c+o*lt.uY(i),i=lt.add(i,2),this.x2=l+a*lt.uX(i),this.y2=c+o*lt.uY(i),i=lt.add(i,2),this.x3=l+a*lt.uX(i),this.y3=c+o*lt.uY(i)}else this.x0=e.x/s,this.y0=e.y/n,this.x1=(e.x+e.width)/s,this.y1=e.y/n,this.x2=(e.x+e.width)/s,this.y2=(e.y+e.height)/n,this.x3=e.x/s,this.y3=(e.y+e.height)/n;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}}rd.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}]`};const zu=new rd;function Ga(r){r.destroy=function(){},r.on=function(){},r.once=function(){},r.emit=function(){}}class ie extends _n{constructor(e,t,i,s,n,a,o){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new ke(0,0,1,1)),e instanceof ie&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=s,this.valid=!1,this.destroyed=!1,this._uvs=zu,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(n||0),n===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new ze(a.x,a.y):new ze(0,0),this.defaultBorders=o,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:t}=this.baseTexture;t?.url&&Di[t.url]&&ie.removeFromCache(t.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,ie.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new ie(this.baseTexture,!this.noFrame&&e,t,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===zu&&(this._uvs=new rd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=ue.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else if(e instanceof Pe){if(!e.cacheId){const o=t?.pixiIdPrefix||"pixiid";e.cacheId=`${o}-${Ts()}`,Pe.addToCache(e,e.cacheId)}n=e.cacheId}else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${Ts()}`}n=e._pixiId}let a=Di[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in TextureCache.`);return!a&&!(e instanceof Pe)?(t.resolution||(t.resolution=pr(e)),a=new ie(new Pe(e,t)),a.baseTexture.cacheId=n,Pe.addToCache(a.baseTexture,n),ie.addToCache(a,n)):!a&&e instanceof Pe&&(a=new ie(e),ie.addToCache(a,n)),a}static fromURL(e,t){const i=Object.assign({autoLoad:!1},t?.resourceOptions),s=ie.from(e,Object.assign({resourceOptions:i},t),!1),n=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):n.load().then(()=>Promise.resolve(s))}static fromBuffer(e,t,i,s){return new ie(Pe.fromBuffer(e,t,i,s))}static fromLoader(e,t,i,s){const n=new Pe(e,Object.assign({scaleMode:Pe.defaultOptions.scaleMode,resolution:pr(t)},s)),{resource:a}=n;a instanceof pm&&(a.url=t);const o=new ie(n);return i||(i=t),Pe.addToCache(o.baseTexture,i),ie.addToCache(o,i),i!==t&&(Pe.addToCache(o.baseTexture,t),ie.addToCache(o,t)),o.baseTexture.valid?Promise.resolve(o):new Promise(l=>{o.baseTexture.once("loaded",()=>l(o))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Di[t]&&Di[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),Di[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Di[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Di[e],t}}else if(e?.textureCacheIds){for(let t=0;tthis.baseTexture.width,o=i+n>this.baseTexture.height;if(a||o){const l=a&&o?"and":"or",c=`X: ${t} + ${s} = ${t+s} > ${this.baseTexture.width}`,d=`Y: ${i} + ${n} = ${i+n} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${l} ${d}`)}this.valid=s&&n&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ie._EMPTY||(ie._EMPTY=new ie(new Pe),Ga(ie._EMPTY),Ga(ie._EMPTY.baseTexture)),ie._EMPTY}static get WHITE(){if(!ie._WHITE){const e=ue.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),ie._WHITE=new ie(Pe.from(e)),Ga(ie._WHITE),Ga(ie._WHITE.baseTexture)}return ie._WHITE}}class Ft extends ie{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){const s=this.baseTexture.resolution,n=Math.round(e*s)/s,a=Math.round(t*s)/s;this.valid=n>0&&a>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(n,a),this.updateUvs()}setResolution(e){const{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new Ft(new um(e))}}class fm{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=gt.NONE){const s=new um(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Ft(s)}getOptimalTexture(e,t,i=1,s=gt.NONE){let n;e=Math.max(Math.ceil(e*i-1e-6),1),t=Math.max(Math.ceil(t*i-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=Ro(e),t=Ro(t),n=((e&65535)<<16|t&65535)>>>0,s>1&&(n+=s*4294967296)):n=s>1?-s:-1,this.texturePool[n]||(this.texturePool[n]=[]);let a=this.texturePool[n].pop();return a||(a=this.createTexture(e,t,s)),a.filterPoolKey=n,a.setResolution(i),a}getFilterTexture(e,t,i){const s=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||gt.NONE);return s.filterFrame=e.filterFrame,s}returnTexture(e){const t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const t in this.texturePool){const i=this.texturePool[t];if(i)for(let s=0;s0&&e.height>0;for(const t in this.texturePool){if(!(Number(t)<0))continue;const i=this.texturePool[t];if(i)for(let s=0;s1&&(d=this.getOptimalFilterTexture(c.width,c.height,t.resolution),d.filterFrame=c.filterFrame),i[h].apply(this,c,d,Gi.CLEAR,t);const u=c;c=d,d=u}i[h].apply(this,c,l.renderTexture,Gi.BLEND,t),h>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(d)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=Gi.CLEAR){const{renderTexture:i,state:s}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e?.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const n=s.stateId&1||this.forceClear;(t===Gi.CLEAR||t===Gi.BLIT&&n)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,s){const n=this.renderer;n.state.set(e.state),this.bindAndClear(i,s),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(ji.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(ji.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){const{sourceFrame:i,destinationFrame:s}=this.activeState,{orig:n}=t._texture,a=e.set(s.width,0,0,s.height,i.x,i.y),o=t.worldTransform.copyTo(tt.TEMP_MATRIX);return o.invert(),a.prepend(o),a.scale(1/n.width,1/n.height),a.translate(t.anchor.x,t.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,s=gt.NONE){return this.texturePool.getOptimalTexture(e,t,i,s)}getFilterTexture(e,t,i){if(typeof e=="number"){const n=e;e=t,t=n}e=e||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||gt.NONE);return s.filterFrame=e.filterFrame,s}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){const i=Va[0],s=Va[1],n=Va[2],a=Va[3];i.set(t.left,t.top),s.set(t.left,t.bottom),n.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(i,i),e.apply(s,s),e.apply(n,n),e.apply(a,a);const o=Math.min(i.x,s.x,n.x,a.x),l=Math.min(i.y,s.y,n.y,a.y),c=Math.max(i.x,s.x,n.x,a.x),d=Math.max(i.y,s.y,n.y,a.y);t.x=o,t.y=l,t.width=c-o,t.height=d-l}roundFrame(e,t,i,s,n){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(n){const{a,b:o,c:l,d:c}=n;if((Math.abs(o)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}n=n?eh.copyFrom(n):eh.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.transformAABB(n,e),e.ceil(t),this.transformAABB(n.invert(),e)}}}gm.extension={type:oe.RendererSystem,name:"filter"};ge.add(gm);class Cw{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=gt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Mw=new ke;class ym{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new ac(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ke,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;ue.PREFER_ENV===Ss.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=s=>t.drawBuffersWEBGL(s):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){const{gl:s}=this;if(e){const n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,s.bindFramebuffer(s.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=i),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let a=0;a>i,o=t.height>>i,l=a/t.width;this.setViewport(t.x*l,t.y*l,a,o)}else{const a=e.width>>i,o=e.height>>i;this.setViewport(0,0,a,o)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,s){const n=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),s=Math.round(s),(n.width!==i||n.height!==s||n.x!==e||n.y!==t)&&(n.x=e,n.y=t,n.width=i,n.height=s,this.gl.viewport(e,t,i,s))}get size(){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}}clear(e,t,i,s,n=Rh.COLOR|Rh.DEPTH){const{gl:a}=this;a.clearColor(e,t,i,s),a.clear(n)}initFramebuffer(e){const{gl:t}=this,i=new Cw(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){const{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];if(i.stencil){t.bindRenderbuffer(t.RENDERBUFFER,i.stencil);let a;this.renderer.context.webGLVersion===1?a=t.DEPTH_STENCIL:e.depth&&e.stencil?a=t.DEPTH24_STENCIL8:e.depth?a=t.DEPTH_COMPONENT24:a=t.STENCIL_INDEX8,i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,a,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,a,e.width,e.height)}const s=e.colorTextures;let n=s.length;t.drawBuffers||(n=Math.min(n,1));for(let a=0;a1&&this.canMultisampleFramebuffer(e)?s.msaaBuffer=s.msaaBuffer||i.createRenderbuffer():s.msaaBuffer&&(i.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const o=[];for(let l=0;l1&&i.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){const l=e.depthTexture;this.renderer.texture.bind(l,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,t)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){s.stencil=s.stencil||i.createRenderbuffer();let l,c;this.renderer.context.webGLVersion===1?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH_STENCIL):e.depth&&e.stencil?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH24_STENCIL8):e.depth?(l=i.DEPTH_ATTACHMENT,c=i.DEPTH_COMPONENT24):(l=i.STENCIL_ATTACHMENT,c=i.STENCIL_INDEX8),i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,c,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,c,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,l,i.RENDERBUFFER,s.stencil)}else s.stencil&&(i.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:t}=this;let i=gt.NONE;if(e<=1||t===null)return i;for(let s=0;s=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(s.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&s.deleteRenderbuffer(i.msaaBuffer),i.stencil&&s.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){const t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;ii.createVertexArrayOES(),e.bindVertexArray=s=>i.bindVertexArrayOES(s),e.deleteVertexArray=s=>i.deleteVertexArrayOES(s)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){const i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n),e.drawElementsInstanced=(s,n,a,o,l)=>i.drawElementsInstancedANGLE(s,n,a,o,l),e.drawArraysInstanced=(s,n,a,o)=>i.drawArraysInstancedANGLE(s,n,a,o)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;const{gl:i}=this;let s=e.glVertexArrayObjects[this.CONTEXT_UID],n=!1;s||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=s={},n=!0);const a=s[t.program.id]||this.initGeometryVao(e,t,n);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?i.bindVertexArray(a):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);const i=this.mapCoord;for(let s=0;s=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){const{elements:n,ids:a,count:o}=e;let l=0;for(let c=0;c=0&&h=Ss.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}Fo.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},Fo.extension={type:oe.RendererSystem,name:"context"};ge.add(Fo);class ac{constructor(e,t){if(this.width=Math.round(e),this.height=Math.round(t),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");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 Ci("disposeFramebuffer"),this.multisample=gt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new Pe(null,{scaleMode:ar.NEAREST,resolution:1,mipmap:Ji.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Pe(null,{scaleMode:ar.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Ji.OFF,format:se.DEPTH_COMPONENT,type:xe.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!e||!t)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i{const s=this.source;this.url=s.src;const n=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.update(),this._load=null,this.createBitmap?t(this.process()):t(this))};s.complete&&s.src?n():(s.onload=n,s.onerror=a=>{i(a),this.onError.emit(a)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(s=>s.blob()).then(s=>t(s,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===zt.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let s=!0;const n=t._glTextures;for(const a in n){const o=n[a];if(o!==i&&o.dirtyId!==t.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class rd{constructor(){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)}set(e,t,i){const s=t.width,n=t.height;if(i){const a=e.width/2/s,o=e.height/2/n,l=e.x/s+a,c=e.y/n+o;i=lt.add(i,lt.NW),this.x0=l+a*lt.uX(i),this.y0=c+o*lt.uY(i),i=lt.add(i,2),this.x1=l+a*lt.uX(i),this.y1=c+o*lt.uY(i),i=lt.add(i,2),this.x2=l+a*lt.uX(i),this.y2=c+o*lt.uY(i),i=lt.add(i,2),this.x3=l+a*lt.uX(i),this.y3=c+o*lt.uY(i)}else this.x0=e.x/s,this.y0=e.y/n,this.x1=(e.x+e.width)/s,this.y1=e.y/n,this.x2=(e.x+e.width)/s,this.y2=(e.y+e.height)/n,this.x3=e.x/s,this.y3=(e.y+e.height)/n;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}}rd.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}]`};const zu=new rd;function Ga(r){r.destroy=function(){},r.on=function(){},r.once=function(){},r.emit=function(){}}class ie extends _n{constructor(e,t,i,s,n,a,o){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new ke(0,0,1,1)),e instanceof ie&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=s,this.valid=!1,this.destroyed=!1,this._uvs=zu,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(n||0),n===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new We(a.x,a.y):new We(0,0),this.defaultBorders=o,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:t}=this.baseTexture;t?.url&&Di[t.url]&&ie.removeFromCache(t.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,ie.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new ie(this.baseTexture,!this.noFrame&&e,t,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===zu&&(this._uvs=new rd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=ue.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else if(e instanceof Pe){if(!e.cacheId){const o=t?.pixiIdPrefix||"pixiid";e.cacheId=`${o}-${Ts()}`,Pe.addToCache(e,e.cacheId)}n=e.cacheId}else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${Ts()}`}n=e._pixiId}let a=Di[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in TextureCache.`);return!a&&!(e instanceof Pe)?(t.resolution||(t.resolution=pr(e)),a=new ie(new Pe(e,t)),a.baseTexture.cacheId=n,Pe.addToCache(a.baseTexture,n),ie.addToCache(a,n)):!a&&e instanceof Pe&&(a=new ie(e),ie.addToCache(a,n)),a}static fromURL(e,t){const i=Object.assign({autoLoad:!1},t?.resourceOptions),s=ie.from(e,Object.assign({resourceOptions:i},t),!1),n=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):n.load().then(()=>Promise.resolve(s))}static fromBuffer(e,t,i,s){return new ie(Pe.fromBuffer(e,t,i,s))}static fromLoader(e,t,i,s){const n=new Pe(e,Object.assign({scaleMode:Pe.defaultOptions.scaleMode,resolution:pr(t)},s)),{resource:a}=n;a instanceof pm&&(a.url=t);const o=new ie(n);return i||(i=t),Pe.addToCache(o.baseTexture,i),ie.addToCache(o,i),i!==t&&(Pe.addToCache(o.baseTexture,t),ie.addToCache(o,t)),o.baseTexture.valid?Promise.resolve(o):new Promise(l=>{o.baseTexture.once("loaded",()=>l(o))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Di[t]&&Di[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),Di[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Di[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Di[e],t}}else if(e?.textureCacheIds){for(let t=0;tthis.baseTexture.width,o=i+n>this.baseTexture.height;if(a||o){const l=a&&o?"and":"or",c=`X: ${t} + ${s} = ${t+s} > ${this.baseTexture.width}`,d=`Y: ${i} + ${n} = ${i+n} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${l} ${d}`)}this.valid=s&&n&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ie._EMPTY||(ie._EMPTY=new ie(new Pe),Ga(ie._EMPTY),Ga(ie._EMPTY.baseTexture)),ie._EMPTY}static get WHITE(){if(!ie._WHITE){const e=ue.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),ie._WHITE=new ie(Pe.from(e)),Ga(ie._WHITE),Ga(ie._WHITE.baseTexture)}return ie._WHITE}}class Ft extends ie{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){const s=this.baseTexture.resolution,n=Math.round(e*s)/s,a=Math.round(t*s)/s;this.valid=n>0&&a>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(n,a),this.updateUvs()}setResolution(e){const{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new Ft(new um(e))}}class fm{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=gt.NONE){const s=new um(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Ft(s)}getOptimalTexture(e,t,i=1,s=gt.NONE){let n;e=Math.max(Math.ceil(e*i-1e-6),1),t=Math.max(Math.ceil(t*i-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=Ro(e),t=Ro(t),n=((e&65535)<<16|t&65535)>>>0,s>1&&(n+=s*4294967296)):n=s>1?-s:-1,this.texturePool[n]||(this.texturePool[n]=[]);let a=this.texturePool[n].pop();return a||(a=this.createTexture(e,t,s)),a.filterPoolKey=n,a.setResolution(i),a}getFilterTexture(e,t,i){const s=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||gt.NONE);return s.filterFrame=e.filterFrame,s}returnTexture(e){const t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const t in this.texturePool){const i=this.texturePool[t];if(i)for(let s=0;s0&&e.height>0;for(const t in this.texturePool){if(!(Number(t)<0))continue;const i=this.texturePool[t];if(i)for(let s=0;s1&&(d=this.getOptimalFilterTexture(c.width,c.height,t.resolution),d.filterFrame=c.filterFrame),i[h].apply(this,c,d,Gi.CLEAR,t);const u=c;c=d,d=u}i[h].apply(this,c,l.renderTexture,Gi.BLEND,t),h>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(d)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=Gi.CLEAR){const{renderTexture:i,state:s}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e?.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const n=s.stateId&1||this.forceClear;(t===Gi.CLEAR||t===Gi.BLIT&&n)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,s){const n=this.renderer;n.state.set(e.state),this.bindAndClear(i,s),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(ji.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(ji.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){const{sourceFrame:i,destinationFrame:s}=this.activeState,{orig:n}=t._texture,a=e.set(s.width,0,0,s.height,i.x,i.y),o=t.worldTransform.copyTo(tt.TEMP_MATRIX);return o.invert(),a.prepend(o),a.scale(1/n.width,1/n.height),a.translate(t.anchor.x,t.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,s=gt.NONE){return this.texturePool.getOptimalTexture(e,t,i,s)}getFilterTexture(e,t,i){if(typeof e=="number"){const n=e;e=t,t=n}e=e||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||gt.NONE);return s.filterFrame=e.filterFrame,s}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){const i=Va[0],s=Va[1],n=Va[2],a=Va[3];i.set(t.left,t.top),s.set(t.left,t.bottom),n.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(i,i),e.apply(s,s),e.apply(n,n),e.apply(a,a);const o=Math.min(i.x,s.x,n.x,a.x),l=Math.min(i.y,s.y,n.y,a.y),c=Math.max(i.x,s.x,n.x,a.x),d=Math.max(i.y,s.y,n.y,a.y);t.x=o,t.y=l,t.width=c-o,t.height=d-l}roundFrame(e,t,i,s,n){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(n){const{a,b:o,c:l,d:c}=n;if((Math.abs(o)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}n=n?eh.copyFrom(n):eh.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.transformAABB(n,e),e.ceil(t),this.transformAABB(n.invert(),e)}}}gm.extension={type:oe.RendererSystem,name:"filter"};ge.add(gm);class Cw{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=gt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Mw=new ke;class ym{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new ac(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ke,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;ue.PREFER_ENV===Ss.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=s=>t.drawBuffersWEBGL(s):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){const{gl:s}=this;if(e){const n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,s.bindFramebuffer(s.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=i),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let a=0;a>i,o=t.height>>i,l=a/t.width;this.setViewport(t.x*l,t.y*l,a,o)}else{const a=e.width>>i,o=e.height>>i;this.setViewport(0,0,a,o)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,s){const n=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),s=Math.round(s),(n.width!==i||n.height!==s||n.x!==e||n.y!==t)&&(n.x=e,n.y=t,n.width=i,n.height=s,this.gl.viewport(e,t,i,s))}get size(){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}}clear(e,t,i,s,n=Rh.COLOR|Rh.DEPTH){const{gl:a}=this;a.clearColor(e,t,i,s),a.clear(n)}initFramebuffer(e){const{gl:t}=this,i=new Cw(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){const{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];if(i.stencil){t.bindRenderbuffer(t.RENDERBUFFER,i.stencil);let a;this.renderer.context.webGLVersion===1?a=t.DEPTH_STENCIL:e.depth&&e.stencil?a=t.DEPTH24_STENCIL8:e.depth?a=t.DEPTH_COMPONENT24:a=t.STENCIL_INDEX8,i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,a,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,a,e.width,e.height)}const s=e.colorTextures;let n=s.length;t.drawBuffers||(n=Math.min(n,1));for(let a=0;a1&&this.canMultisampleFramebuffer(e)?s.msaaBuffer=s.msaaBuffer||i.createRenderbuffer():s.msaaBuffer&&(i.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const o=[];for(let l=0;l1&&i.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){const l=e.depthTexture;this.renderer.texture.bind(l,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,t)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){s.stencil=s.stencil||i.createRenderbuffer();let l,c;this.renderer.context.webGLVersion===1?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH_STENCIL):e.depth&&e.stencil?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH24_STENCIL8):e.depth?(l=i.DEPTH_ATTACHMENT,c=i.DEPTH_COMPONENT24):(l=i.STENCIL_ATTACHMENT,c=i.STENCIL_INDEX8),i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,c,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,c,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,l,i.RENDERBUFFER,s.stencil)}else s.stencil&&(i.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:t}=this;let i=gt.NONE;if(e<=1||t===null)return i;for(let s=0;s=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(s.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&s.deleteRenderbuffer(i.msaaBuffer),i.stencil&&s.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){const t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;ii.createVertexArrayOES(),e.bindVertexArray=s=>i.bindVertexArrayOES(s),e.deleteVertexArray=s=>i.deleteVertexArrayOES(s)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){const i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n),e.drawElementsInstanced=(s,n,a,o,l)=>i.drawElementsInstancedANGLE(s,n,a,o,l),e.drawArraysInstanced=(s,n,a,o)=>i.drawArraysInstancedANGLE(s,n,a,o)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;const{gl:i}=this;let s=e.glVertexArrayObjects[this.CONTEXT_UID],n=!1;s||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=s={},n=!0);const a=s[t.program.id]||this.initGeometryVao(e,t,n);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?i.bindVertexArray(a):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);const i=this.mapCoord;for(let s=0;s0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}wm.extension={type:oe.RendererSystem,name:"mask"};ge.add(wm);class _m{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const $u=new tt,Yu=[],xm=class vo extends _m{constructor(e){super(e),this.glConst=ue.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:s}=this,n=s.renderTexture,a=i.getBounds(!0,Yu.pop()??new ke);this.roundFrameToPixels(a,n.current?n.current.resolution:s.resolution,n.sourceFrame,n.destinationFrame,s.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:i,c:s,d:n}=e;return(Math.abs(i)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(n)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||vo.isMatrixRotated(t.worldTransform)||vo.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const i=e._scissorRectLocal;return i.width>0&&i.height>0}roundFrameToPixels(e,t,i,s,n){vo.isMatrixRotated(n)||(n=n?$u.copyFrom(n):$u.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.renderer.filter.transformAABB(n,e),e.fit(s),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Yu.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};xm.extension={type:oe.RendererSystem,name:"scissor"};let Rw=xm;ge.add(Rw);class Tm extends _m{constructor(e){super(e),this.glConst=ue.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const t=e.maskObject,{gl:i}=this.renderer,s=e._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;const n=e._colorMask;n!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,s,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,n!==0&&(e._colorMask=n,i.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}pop(e){const t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=i?i._colorMask:15;s!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,s!==0&&(i._colorMask=s,t.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}Tm.extension={type:oe.RendererSystem,name:"stencil"};ge.add(Tm);class Em{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}Em.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"_plugin"};ge.add(Em);class Am{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new tt,this.transform=null}update(e,t,i,s){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,s),this.transform&&this.projectionMatrix.append(this.transform);const n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)}calculateProjection(e,t,i,s){const n=this.projectionMatrix,a=s?-1:1;n.identity(),n.a=1/t.width*2,n.d=a*(1/t.height*2),n.tx=-1-t.x*n.a,n.ty=-a-t.y*n.d}setTransform(e){}destroy(){this.renderer=null}}Am.extension={type:oe.RendererSystem,name:"projection"};ge.add(Am);const Lw=new id,Xu=new ke;class Sm{constructor(e){this.renderer=e,this._tempMatrix=new tt}generateTexture(e,t){const{region:i,...s}=t||{},n=i?.copyTo(Xu)||e.getLocalBounds(Xu,!0),a=s.resolution||this.renderer.resolution;n.width=Math.max(n.width,1/a),n.height=Math.max(n.height,1/a),s.width=n.width,s.height=n.height,s.resolution=a,s.multisample??(s.multisample=this.renderer.multisample);const o=Ft.create(s);this._tempMatrix.tx=-n.x,this._tempMatrix.ty=-n.y;const l=e.transform;return e.transform=Lw,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,o}destroy(){}}Sm.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"textureGenerator"};ge.add(Sm);const Kr=new ke,Bn=new ke;class Cm{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ke,this.destinationFrame=new ke,this.viewportFrame=new ke}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){const s=this.renderer;this.current=e;let n,a,o;e?(n=e.baseTexture,o=n.resolution,t||(Kr.width=e.frame.width,Kr.height=e.frame.height,t=Kr),i||(Bn.x=e.frame.x,Bn.y=e.frame.y,Bn.width=t.width,Bn.height=t.height,i=Bn),a=n.framebuffer):(o=s.resolution,t||(Kr.width=s._view.screen.width,Kr.height=s._view.screen.height,t=Kr),i||(i=Kr,i.width=t.width,i.height=t.height));const l=this.viewportFrame;l.x=i.x*o,l.y=i.y*o,l.width=i.width*o,l.height=i.height*o,e||(l.y=s.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(a,l),this.renderer.projection.update(i,t,o,!a),e?this.renderer.mask.setMaskStack(n.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){const i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=B.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&s.premultiply(s.alpha);const n=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,o=n.width!==a.width||n.height!==a.height;if(o){let{x:l,y:c,width:d,height:h}=this.viewportFrame;l=Math.round(l),c=Math.round(c),d=Math.round(d),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(l,c,d,h)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,t),o&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Cm.extension={type:oe.RendererSystem,name:"renderTexture"};ge.add(Cm);class Dw{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Ow(r,e){const t={},i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let s=0;sl>c?1:-1);for(let l=0;l0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}wm.extension={type:oe.RendererSystem,name:"mask"};ge.add(wm);class _m{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const $u=new tt,Xu=[],xm=class vo extends _m{constructor(e){super(e),this.glConst=ue.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:s}=this,n=s.renderTexture,a=i.getBounds(!0,Xu.pop()??new ke);this.roundFrameToPixels(a,n.current?n.current.resolution:s.resolution,n.sourceFrame,n.destinationFrame,s.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:i,c:s,d:n}=e;return(Math.abs(i)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(n)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||vo.isMatrixRotated(t.worldTransform)||vo.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const i=e._scissorRectLocal;return i.width>0&&i.height>0}roundFrameToPixels(e,t,i,s,n){vo.isMatrixRotated(n)||(n=n?$u.copyFrom(n):$u.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.renderer.filter.transformAABB(n,e),e.fit(s),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Xu.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};xm.extension={type:oe.RendererSystem,name:"scissor"};let Rw=xm;ge.add(Rw);class Tm extends _m{constructor(e){super(e),this.glConst=ue.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const t=e.maskObject,{gl:i}=this.renderer,s=e._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;const n=e._colorMask;n!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,s,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,n!==0&&(e._colorMask=n,i.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}pop(e){const t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=i?i._colorMask:15;s!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,s!==0&&(i._colorMask=s,t.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}Tm.extension={type:oe.RendererSystem,name:"stencil"};ge.add(Tm);class Em{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}Em.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"_plugin"};ge.add(Em);class Am{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new tt,this.transform=null}update(e,t,i,s){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,s),this.transform&&this.projectionMatrix.append(this.transform);const n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)}calculateProjection(e,t,i,s){const n=this.projectionMatrix,a=s?-1:1;n.identity(),n.a=1/t.width*2,n.d=a*(1/t.height*2),n.tx=-1-t.x*n.a,n.ty=-a-t.y*n.d}setTransform(e){}destroy(){this.renderer=null}}Am.extension={type:oe.RendererSystem,name:"projection"};ge.add(Am);const Lw=new id,Yu=new ke;class Sm{constructor(e){this.renderer=e,this._tempMatrix=new tt}generateTexture(e,t){const{region:i,...s}=t||{},n=i?.copyTo(Yu)||e.getLocalBounds(Yu,!0),a=s.resolution||this.renderer.resolution;n.width=Math.max(n.width,1/a),n.height=Math.max(n.height,1/a),s.width=n.width,s.height=n.height,s.resolution=a,s.multisample??(s.multisample=this.renderer.multisample);const o=Ft.create(s);this._tempMatrix.tx=-n.x,this._tempMatrix.ty=-n.y;const l=e.transform;return e.transform=Lw,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,o}destroy(){}}Sm.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"textureGenerator"};ge.add(Sm);const Kr=new ke,Bn=new ke;class Cm{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ke,this.destinationFrame=new ke,this.viewportFrame=new ke}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){const s=this.renderer;this.current=e;let n,a,o;e?(n=e.baseTexture,o=n.resolution,t||(Kr.width=e.frame.width,Kr.height=e.frame.height,t=Kr),i||(Bn.x=e.frame.x,Bn.y=e.frame.y,Bn.width=t.width,Bn.height=t.height,i=Bn),a=n.framebuffer):(o=s.resolution,t||(Kr.width=s._view.screen.width,Kr.height=s._view.screen.height,t=Kr),i||(i=Kr,i.width=t.width,i.height=t.height));const l=this.viewportFrame;l.x=i.x*o,l.y=i.y*o,l.width=i.width*o,l.height=i.height*o,e||(l.y=s.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(a,l),this.renderer.projection.update(i,t,o,!a),e?this.renderer.mask.setMaskStack(n.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){const i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=B.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&s.premultiply(s.alpha);const n=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,o=n.width!==a.width||n.height!==a.height;if(o){let{x:l,y:c,width:d,height:h}=this.viewportFrame;l=Math.round(l),c=Math.round(c),d=Math.round(d),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(l,c,d,h)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,t),o&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Cm.extension={type:oe.RendererSystem,name:"renderTexture"};ge.add(Cm);class Dw{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Ow(r,e){const t={},i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let s=0;sl>c?1:-1);for(let l=0;l>1,i++;this.stateId=e.data}for(let t=0;te.systems[s]),i=[...t,...Object.keys(e.systems).filter(s=>!t.includes(s))];for(const s of i)this.addSystem(e.systems[s],s)}addRunners(...e){e.forEach(t=>{this.runners[t]=new Ci(t)})}addSystem(e,t){const i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(const s in this.runners)this.runners[s].add(i);return this}emitWithCustomOptions(e,t){const i=Object.keys(this._systemsHash);e.items.forEach(s=>{const n=i.find(a=>this._systemsHash[a]===s);s[e.name](t[n])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const Hn=class bo{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=bo.defaultMaxIdle,this.checkCountMax=bo.defaultCheckCountMax,this.mode=bo.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==Yc.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let i=!1;for(let s=0;sthis.maxIdle&&(e.destroyTexture(n,!0),t[s]=null,i=!0)}if(i){let s=0;for(let n=0;n=0;s--)this.unload(e.children[s])}destroy(){this.renderer=null}};Hn.defaultMode=Yc.AUTO,Hn.defaultMaxIdle=60*60,Hn.defaultCheckCountMax=60*10,Hn.extension={type:oe.RendererSystem,name:"textureGC"};let rs=Hn;ge.add(rs);class ih{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=xe.UNSIGNED_BYTE,this.internalFormat=se.RGBA,this.samplerType=0}}function e_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[r.RGB]:de.FLOAT,[r.RGBA]:de.FLOAT,[r.ALPHA]:de.FLOAT,[r.LUMINANCE]:de.FLOAT,[r.LUMINANCE_ALPHA]:de.FLOAT,[r.R8]:de.FLOAT,[r.R8_SNORM]:de.FLOAT,[r.RG8]:de.FLOAT,[r.RG8_SNORM]:de.FLOAT,[r.RGB8]:de.FLOAT,[r.RGB8_SNORM]:de.FLOAT,[r.RGB565]:de.FLOAT,[r.RGBA4]:de.FLOAT,[r.RGB5_A1]:de.FLOAT,[r.RGBA8]:de.FLOAT,[r.RGBA8_SNORM]:de.FLOAT,[r.RGB10_A2]:de.FLOAT,[r.RGB10_A2UI]:de.FLOAT,[r.SRGB8]:de.FLOAT,[r.SRGB8_ALPHA8]:de.FLOAT,[r.R16F]:de.FLOAT,[r.RG16F]:de.FLOAT,[r.RGB16F]:de.FLOAT,[r.RGBA16F]:de.FLOAT,[r.R32F]:de.FLOAT,[r.RG32F]:de.FLOAT,[r.RGB32F]:de.FLOAT,[r.RGBA32F]:de.FLOAT,[r.R11F_G11F_B10F]:de.FLOAT,[r.RGB9_E5]:de.FLOAT,[r.R8I]:de.INT,[r.R8UI]:de.UINT,[r.R16I]:de.INT,[r.R16UI]:de.UINT,[r.R32I]:de.INT,[r.R32UI]:de.UINT,[r.RG8I]:de.INT,[r.RG8UI]:de.UINT,[r.RG16I]:de.INT,[r.RG16UI]:de.UINT,[r.RG32I]:de.INT,[r.RG32UI]:de.UINT,[r.RGB8I]:de.INT,[r.RGB8UI]:de.UINT,[r.RGB16I]:de.INT,[r.RGB16UI]:de.UINT,[r.RGB32I]:de.INT,[r.RGB32UI]:de.UINT,[r.RGBA8I]:de.INT,[r.RGBA8UI]:de.UINT,[r.RGBA16I]:de.INT,[r.RGBA16UI]:de.UINT,[r.RGBA32I]:de.INT,[r.RGBA32UI]:de.UINT,[r.DEPTH_COMPONENT16]:de.FLOAT,[r.DEPTH_COMPONENT24]:de.FLOAT,[r.DEPTH_COMPONENT32F]:de.FLOAT,[r.DEPTH_STENCIL]:de.FLOAT,[r.DEPTH24_STENCIL8]:de.FLOAT,[r.DEPTH32F_STENCIL8]:de.FLOAT}:e={[r.RGB]:de.FLOAT,[r.RGBA]:de.FLOAT,[r.ALPHA]:de.FLOAT,[r.LUMINANCE]:de.FLOAT,[r.LUMINANCE_ALPHA]:de.FLOAT,[r.DEPTH_STENCIL]:de.FLOAT},e}function t_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[xe.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA8,[se.RGB]:r.RGB8,[se.RG]:r.RG8,[se.RED]:r.R8,[se.RGBA_INTEGER]:r.RGBA8UI,[se.RGB_INTEGER]:r.RGB8UI,[se.RG_INTEGER]:r.RG8UI,[se.RED_INTEGER]:r.R8UI,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[xe.BYTE]:{[se.RGBA]:r.RGBA8_SNORM,[se.RGB]:r.RGB8_SNORM,[se.RG]:r.RG8_SNORM,[se.RED]:r.R8_SNORM,[se.RGBA_INTEGER]:r.RGBA8I,[se.RGB_INTEGER]:r.RGB8I,[se.RG_INTEGER]:r.RG8I,[se.RED_INTEGER]:r.R8I},[xe.UNSIGNED_SHORT]:{[se.RGBA_INTEGER]:r.RGBA16UI,[se.RGB_INTEGER]:r.RGB16UI,[se.RG_INTEGER]:r.RG16UI,[se.RED_INTEGER]:r.R16UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT16},[xe.SHORT]:{[se.RGBA_INTEGER]:r.RGBA16I,[se.RGB_INTEGER]:r.RGB16I,[se.RG_INTEGER]:r.RG16I,[se.RED_INTEGER]:r.R16I},[xe.UNSIGNED_INT]:{[se.RGBA_INTEGER]:r.RGBA32UI,[se.RGB_INTEGER]:r.RGB32UI,[se.RG_INTEGER]:r.RG32UI,[se.RED_INTEGER]:r.R32UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT24},[xe.INT]:{[se.RGBA_INTEGER]:r.RGBA32I,[se.RGB_INTEGER]:r.RGB32I,[se.RG_INTEGER]:r.RG32I,[se.RED_INTEGER]:r.R32I},[xe.FLOAT]:{[se.RGBA]:r.RGBA32F,[se.RGB]:r.RGB32F,[se.RG]:r.RG32F,[se.RED]:r.R32F,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT32F},[xe.HALF_FLOAT]:{[se.RGBA]:r.RGBA16F,[se.RGB]:r.RGB16F,[se.RG]:r.RG16F,[se.RED]:r.R16F},[xe.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB565},[xe.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA4},[xe.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGB5_A1},[xe.UNSIGNED_INT_2_10_10_10_REV]:{[se.RGBA]:r.RGB10_A2,[se.RGBA_INTEGER]:r.RGB10_A2UI},[xe.UNSIGNED_INT_10F_11F_11F_REV]:{[se.RGB]:r.R11F_G11F_B10F},[xe.UNSIGNED_INT_5_9_9_9_REV]:{[se.RGB]:r.RGB9_E5},[xe.UNSIGNED_INT_24_8]:{[se.DEPTH_STENCIL]:r.DEPTH24_STENCIL8},[xe.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[se.DEPTH_STENCIL]:r.DEPTH32F_STENCIL8}}:e={[xe.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA,[se.RGB]:r.RGB,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[xe.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB},[xe.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA},[xe.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGBA}},e}class Pm{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Pe,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=t_(e),this.samplerTypes=e_(e);const t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let s=0;s=0;--n){const a=t[n];a&&a._glTextures[s].samplerType!==de.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(e){const t=new ih(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){t.internalFormat=this.internalFormats[e.type]?.[e.format]??e.format,t.samplerType=this.samplerTypes[t.internalFormat]??de.FLOAT,this.webGLVersion===2&&e.type===xe.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){const t=e._glTextures[this.CONTEXT_UID];if(!t)return;const i=this.renderer;if(this.initTextureType(e,t),e.resource?.upload(i,e,t))t.samplerType!==de.FLOAT&&(this.hasIntegerTextures=!0);else{const s=e.realWidth,n=e.realHeight,a=i.gl;(t.width!==s||t.height!==n||t.dirtyId<0)&&(t.width=s,t.height=n,a.texImage2D(e.target,0,t.internalFormat,s,n,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){const{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){const s=this.managedTextures.indexOf(e);s!==-1&&rn(this.managedTextures,s,1)}}updateTextureStyle(e){const t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===Ji.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=Ur.CLAMP:t.wrapMode=e.wrapMode,e.resource?.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){const i=this.gl;if(t.mipmap&&e.mipmap!==Ji.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===ar.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&e.anisotropicLevel>0&&e.scaleMode===ar.LINEAR){const n=Math.min(e.anisotropicLevel,i.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,s.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===ar.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===ar.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}}Pm.extension={type:oe.RendererSystem,name:"texture"};ge.add(Pm);class Bm{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){const{gl:i,renderer:s}=this;t&&s.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:t,renderer:i,CONTEXT_UID:s}=this,n=t.createTransformFeedback();e._glTransformFeedbacks[s]=n,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n);for(let a=0;a(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(Gr||{});class rh{constructor(e,t=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=s}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const Rm=class Kt{constructor(){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 rh(null,null,1/0),this.deltaMS=1/Kt.targetFPMS,this.elapsedMS=1/Kt.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,i=Gr.NORMAL){return this._addListener(new rh(e,t,i))}addOnce(e,t,i=Gr.NORMAL){return this._addListener(new rh(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const n=e-this._lastFrame|0;if(n{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Et.shared:new Et,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Lm.extension=oe.Application;ge.add(Lm);const Dm=[];ge.handleByList(oe.Renderer,Dm);function i_(r){for(const e of Dm)if(e.test(r))return new e(r);throw new Error("Unable to auto-detect a suitable renderer.")}var r_=`attribute vec2 aVertexPosition; +`))}}let zw=0;const Wa={textureCount:0,uboCount:0};class km{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=zw++}systemCheck(){if(!mw())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,s=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(s.program)),t||(Wa.textureCount=0,Wa.uboCount=0,this.syncUniformGroup(e.uniformGroup,Wa)),s}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=cw(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const s=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),s(i.uniformData,e.uniforms,this.renderer,Wa,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);const n=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,s.uniformBlockBinding(t.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=Ww(e,this.shader.program.uniformData)),e.autoManage){const l=new Float32Array(o.size/4);e.buffer.update(l)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const s=e.uniforms,n=[`${i}-`];for(const a in s)n.push(a),t[a]&&n.push(t[a].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,s=Nw(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}km.extension={type:oe.RendererSystem,name:"shader"};ge.add(km);class No{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.2 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}No.defaultOptions={hello:!1},No.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"startup"};ge.add(No);function jw(r,e=[]){return e[Me.NORMAL]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.ADD]=[r.ONE,r.ONE],e[Me.MULTIPLY]=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SCREEN]=[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.OVERLAY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.DARKEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.LIGHTEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.COLOR_DODGE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.COLOR_BURN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.HARD_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SOFT_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.DIFFERENCE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.EXCLUSION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.HUE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SATURATION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.COLOR]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.LUMINOSITY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.NONE]=[0,0],e[Me.NORMAL_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.ADD_NPM]=[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],e[Me.SCREEN_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SRC_IN]=[r.DST_ALPHA,r.ZERO],e[Me.SRC_OUT]=[r.ONE_MINUS_DST_ALPHA,r.ZERO],e[Me.SRC_ATOP]=[r.DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[Me.DST_OVER]=[r.ONE_MINUS_DST_ALPHA,r.ONE],e[Me.DST_IN]=[r.ZERO,r.SRC_ALPHA],e[Me.DST_OUT]=[r.ZERO,r.ONE_MINUS_SRC_ALPHA],e[Me.DST_ATOP]=[r.ONE_MINUS_DST_ALPHA,r.SRC_ALPHA],e[Me.XOR]=[r.ONE_MINUS_DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[Me.SUBTRACT]=[r.ONE,r.ONE,r.ONE,r.ONE,r.FUNC_REVERSE_SUBTRACT,r.FUNC_ADD],e}const $w=0,Xw=1,Yw=2,qw=3,Kw=4,Zw=5,Im=class oc{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Me.NONE,this._blendEq=!1,this.map=[],this.map[$w]=this.setBlend,this.map[Xw]=this.setOffset,this.map[Yw]=this.setCullFace,this.map[qw]=this.setDepthTest,this.map[Kw]=this.setFrontFace,this.map[Zw]=this.setDepthMask,this.checks=[],this.defaultState=new er,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=jw(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,i=0;for(;t;)t&1&&this.map[i].call(this,!!(e.data&1<>1,i++;this.stateId=e.data}for(let t=0;te.systems[s]),i=[...t,...Object.keys(e.systems).filter(s=>!t.includes(s))];for(const s of i)this.addSystem(e.systems[s],s)}addRunners(...e){e.forEach(t=>{this.runners[t]=new Ci(t)})}addSystem(e,t){const i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(const s in this.runners)this.runners[s].add(i);return this}emitWithCustomOptions(e,t){const i=Object.keys(this._systemsHash);e.items.forEach(s=>{const n=i.find(a=>this._systemsHash[a]===s);s[e.name](t[n])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const Hn=class bo{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=bo.defaultMaxIdle,this.checkCountMax=bo.defaultCheckCountMax,this.mode=bo.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==Xc.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let i=!1;for(let s=0;sthis.maxIdle&&(e.destroyTexture(n,!0),t[s]=null,i=!0)}if(i){let s=0;for(let n=0;n=0;s--)this.unload(e.children[s])}destroy(){this.renderer=null}};Hn.defaultMode=Xc.AUTO,Hn.defaultMaxIdle=60*60,Hn.defaultCheckCountMax=60*10,Hn.extension={type:oe.RendererSystem,name:"textureGC"};let rs=Hn;ge.add(rs);class ih{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=xe.UNSIGNED_BYTE,this.internalFormat=se.RGBA,this.samplerType=0}}function e_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[r.RGB]:de.FLOAT,[r.RGBA]:de.FLOAT,[r.ALPHA]:de.FLOAT,[r.LUMINANCE]:de.FLOAT,[r.LUMINANCE_ALPHA]:de.FLOAT,[r.R8]:de.FLOAT,[r.R8_SNORM]:de.FLOAT,[r.RG8]:de.FLOAT,[r.RG8_SNORM]:de.FLOAT,[r.RGB8]:de.FLOAT,[r.RGB8_SNORM]:de.FLOAT,[r.RGB565]:de.FLOAT,[r.RGBA4]:de.FLOAT,[r.RGB5_A1]:de.FLOAT,[r.RGBA8]:de.FLOAT,[r.RGBA8_SNORM]:de.FLOAT,[r.RGB10_A2]:de.FLOAT,[r.RGB10_A2UI]:de.FLOAT,[r.SRGB8]:de.FLOAT,[r.SRGB8_ALPHA8]:de.FLOAT,[r.R16F]:de.FLOAT,[r.RG16F]:de.FLOAT,[r.RGB16F]:de.FLOAT,[r.RGBA16F]:de.FLOAT,[r.R32F]:de.FLOAT,[r.RG32F]:de.FLOAT,[r.RGB32F]:de.FLOAT,[r.RGBA32F]:de.FLOAT,[r.R11F_G11F_B10F]:de.FLOAT,[r.RGB9_E5]:de.FLOAT,[r.R8I]:de.INT,[r.R8UI]:de.UINT,[r.R16I]:de.INT,[r.R16UI]:de.UINT,[r.R32I]:de.INT,[r.R32UI]:de.UINT,[r.RG8I]:de.INT,[r.RG8UI]:de.UINT,[r.RG16I]:de.INT,[r.RG16UI]:de.UINT,[r.RG32I]:de.INT,[r.RG32UI]:de.UINT,[r.RGB8I]:de.INT,[r.RGB8UI]:de.UINT,[r.RGB16I]:de.INT,[r.RGB16UI]:de.UINT,[r.RGB32I]:de.INT,[r.RGB32UI]:de.UINT,[r.RGBA8I]:de.INT,[r.RGBA8UI]:de.UINT,[r.RGBA16I]:de.INT,[r.RGBA16UI]:de.UINT,[r.RGBA32I]:de.INT,[r.RGBA32UI]:de.UINT,[r.DEPTH_COMPONENT16]:de.FLOAT,[r.DEPTH_COMPONENT24]:de.FLOAT,[r.DEPTH_COMPONENT32F]:de.FLOAT,[r.DEPTH_STENCIL]:de.FLOAT,[r.DEPTH24_STENCIL8]:de.FLOAT,[r.DEPTH32F_STENCIL8]:de.FLOAT}:e={[r.RGB]:de.FLOAT,[r.RGBA]:de.FLOAT,[r.ALPHA]:de.FLOAT,[r.LUMINANCE]:de.FLOAT,[r.LUMINANCE_ALPHA]:de.FLOAT,[r.DEPTH_STENCIL]:de.FLOAT},e}function t_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[xe.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA8,[se.RGB]:r.RGB8,[se.RG]:r.RG8,[se.RED]:r.R8,[se.RGBA_INTEGER]:r.RGBA8UI,[se.RGB_INTEGER]:r.RGB8UI,[se.RG_INTEGER]:r.RG8UI,[se.RED_INTEGER]:r.R8UI,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[xe.BYTE]:{[se.RGBA]:r.RGBA8_SNORM,[se.RGB]:r.RGB8_SNORM,[se.RG]:r.RG8_SNORM,[se.RED]:r.R8_SNORM,[se.RGBA_INTEGER]:r.RGBA8I,[se.RGB_INTEGER]:r.RGB8I,[se.RG_INTEGER]:r.RG8I,[se.RED_INTEGER]:r.R8I},[xe.UNSIGNED_SHORT]:{[se.RGBA_INTEGER]:r.RGBA16UI,[se.RGB_INTEGER]:r.RGB16UI,[se.RG_INTEGER]:r.RG16UI,[se.RED_INTEGER]:r.R16UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT16},[xe.SHORT]:{[se.RGBA_INTEGER]:r.RGBA16I,[se.RGB_INTEGER]:r.RGB16I,[se.RG_INTEGER]:r.RG16I,[se.RED_INTEGER]:r.R16I},[xe.UNSIGNED_INT]:{[se.RGBA_INTEGER]:r.RGBA32UI,[se.RGB_INTEGER]:r.RGB32UI,[se.RG_INTEGER]:r.RG32UI,[se.RED_INTEGER]:r.R32UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT24},[xe.INT]:{[se.RGBA_INTEGER]:r.RGBA32I,[se.RGB_INTEGER]:r.RGB32I,[se.RG_INTEGER]:r.RG32I,[se.RED_INTEGER]:r.R32I},[xe.FLOAT]:{[se.RGBA]:r.RGBA32F,[se.RGB]:r.RGB32F,[se.RG]:r.RG32F,[se.RED]:r.R32F,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT32F},[xe.HALF_FLOAT]:{[se.RGBA]:r.RGBA16F,[se.RGB]:r.RGB16F,[se.RG]:r.RG16F,[se.RED]:r.R16F},[xe.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB565},[xe.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA4},[xe.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGB5_A1},[xe.UNSIGNED_INT_2_10_10_10_REV]:{[se.RGBA]:r.RGB10_A2,[se.RGBA_INTEGER]:r.RGB10_A2UI},[xe.UNSIGNED_INT_10F_11F_11F_REV]:{[se.RGB]:r.R11F_G11F_B10F},[xe.UNSIGNED_INT_5_9_9_9_REV]:{[se.RGB]:r.RGB9_E5},[xe.UNSIGNED_INT_24_8]:{[se.DEPTH_STENCIL]:r.DEPTH24_STENCIL8},[xe.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[se.DEPTH_STENCIL]:r.DEPTH32F_STENCIL8}}:e={[xe.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA,[se.RGB]:r.RGB,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[xe.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB},[xe.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA},[xe.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGBA}},e}class Pm{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Pe,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=t_(e),this.samplerTypes=e_(e);const t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let s=0;s=0;--n){const a=t[n];a&&a._glTextures[s].samplerType!==de.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(e){const t=new ih(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){t.internalFormat=this.internalFormats[e.type]?.[e.format]??e.format,t.samplerType=this.samplerTypes[t.internalFormat]??de.FLOAT,this.webGLVersion===2&&e.type===xe.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){const t=e._glTextures[this.CONTEXT_UID];if(!t)return;const i=this.renderer;if(this.initTextureType(e,t),e.resource?.upload(i,e,t))t.samplerType!==de.FLOAT&&(this.hasIntegerTextures=!0);else{const s=e.realWidth,n=e.realHeight,a=i.gl;(t.width!==s||t.height!==n||t.dirtyId<0)&&(t.width=s,t.height=n,a.texImage2D(e.target,0,t.internalFormat,s,n,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){const{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){const s=this.managedTextures.indexOf(e);s!==-1&&rn(this.managedTextures,s,1)}}updateTextureStyle(e){const t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===Ji.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=Ur.CLAMP:t.wrapMode=e.wrapMode,e.resource?.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){const i=this.gl;if(t.mipmap&&e.mipmap!==Ji.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===ar.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&e.anisotropicLevel>0&&e.scaleMode===ar.LINEAR){const n=Math.min(e.anisotropicLevel,i.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,s.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===ar.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===ar.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}}Pm.extension={type:oe.RendererSystem,name:"texture"};ge.add(Pm);class Bm{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){const{gl:i,renderer:s}=this;t&&s.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:t,renderer:i,CONTEXT_UID:s}=this,n=t.createTransformFeedback();e._glTransformFeedbacks[s]=n,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n);for(let a=0;a(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(Gr||{});class rh{constructor(e,t=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=s}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const Rm=class Kt{constructor(){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 rh(null,null,1/0),this.deltaMS=1/Kt.targetFPMS,this.elapsedMS=1/Kt.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,i=Gr.NORMAL){return this._addListener(new rh(e,t,i))}addOnce(e,t,i=Gr.NORMAL){return this._addListener(new rh(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const n=e-this._lastFrame|0;if(n{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Et.shared:new Et,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Lm.extension=oe.Application;ge.add(Lm);const Dm=[];ge.handleByList(oe.Renderer,Dm);function i_(r){for(const e of Dm)if(e.test(r))return new e(r);throw new Error("Unable to auto-detect a suitable renderer.")}var r_=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -523,7 +523,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`;const n_=r_,Om=s_;class Fm{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=gt.HIGH?this.multisample=gt.HIGH:t>=gt.MEDIUM?this.multisample=gt.MEDIUM:t>=gt.LOW?this.multisample=gt.LOW:this.multisample=gt.NONE}destroy(){}}Fm.extension={type:oe.RendererSystem,name:"_multisample"};ge.add(Fm);class a_{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Nm{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){const n=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,n.buffer)}}bindBufferRange(e,t,i){const{gl:s,CONTEXT_UID:n}=this;i=i||0;const a=e._glBuffers[n]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const n=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,n)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;it.resource).filter(t=>t).map(t=>t.load());return this._load=Promise.all(e).then(()=>{const{realWidth:t,realHeight:i}=this.items[0];return this.resize(t,i),this.update(),Promise.resolve(this)}),this._load}}class o_ extends Hm{constructor(e,t){const{width:i,height:s}=t||{};let n,a;Array.isArray(e)?(n=e,a=e.length):a=e,super(a,{width:i,height:s}),n&&this.initFromArray(n,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=Qs.TEXTURE_2D_ARRAY}upload(e,t,i){const{length:s,itemDirtyIds:n,items:a}=this,{gl:o}=e;i.dirtyId<0&&o.texImage3D(o.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,s,0,t.format,i.type,null);for(let l=0;l0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Qs.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,i){const s=this.itemDirtyIds;for(let n=0;n{if(this.url===null){e(this);return}try{const i=await ue.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await i.blob();if(this.destroyed)return;const n=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===zt.UNPACK?"premultiply":"none"});if(this.destroyed){n.close();return}this.source=n,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return qs._EMPTY=qs._EMPTY??ue.ADAPTER.createCanvas(0,0),qs._EMPTY}}const hc=class _o extends fr{constructor(e,t){t=t||{},super(ue.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},_o.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;fr.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,i=e.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let s=t*this.scale,n=i*this.scale;(this._overrideWidth||this._overrideHeight)&&(s=this._overrideWidth||this._overrideHeight/i*t,n=this._overrideHeight||this._overrideWidth/t*i),s=Math.round(s),n=Math.round(n);const a=this.source;a.width=s,a.height=n,a._pixiId=`canvas_${Ts()}`,a.getContext("2d").drawImage(e,0,0,t,i,0,0,s,n),this._resolve(),this._resolve=null}}static getSize(e){const t=_o.SVG_SIZE.exec(e),i={};return t&&(i[t[1]]=Math.round(parseFloat(t[3])),i[t[5]]=Math.round(parseFloat(t[7]))),i}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&_o.SVG_XML.test(e)}};hc.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let cc=hc;class c_ extends fr{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const dc=class uc extends fr{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const i=document.createElement("video");t.autoLoad!==!1&&i.setAttribute("preload","auto"),t.playsinline!==!1&&(i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),t.muted===!0&&(i.setAttribute("muted",""),i.muted=!0),t.loop===!0&&i.setAttribute("loop",""),t.autoPlay!==!1&&i.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const s=e[0].src||e[0];fr.crossOrigin(i,s,t.crossorigin);for(let n=0;n{this.valid?t(this):(this._resolve=t,this._reject=i,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!t&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(Et.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Et.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Et.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||uc.TYPES.includes(t)}};dc.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],dc.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let Vm=dc;Jh.push(qs,pm,l_,Vm,c_,cc,sl,h_,o_);class Ho{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?ke.EMPTY:(e=e||new ke(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){const{a:i,b:s,c:n,d:a,tx:o,ty:l}=e,c=i*t.x+n*t.y+o,d=s*t.x+a*t.y+l;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,a=e[0],o=e[1];t=as?a:s,n=o>n?o:n,a=e[2],o=e[3],t=as?a:s,n=o>n?o:n,a=e[4],o=e[5],t=as?a:s,n=o>n?o:n,a=e[6],o=e[7],t=as?a:s,n=o>n?o:n,this.minX=t,this.minY=i,this.maxX=s,this.maxY=n}addFrame(e,t,i,s,n){this.addFrameMatrix(e.worldTransform,t,i,s,n)}addFrameMatrix(e,t,i,s,n){const a=e.a,o=e.b,l=e.c,c=e.d,d=e.tx,h=e.ty;let u=this.minX,p=this.minY,f=this.maxX,m=this.maxY,g=a*t+l*i+d,y=o*t+c*i+h;u=gf?g:f,m=y>m?y:m,g=a*s+l*i+d,y=o*s+c*i+h,u=gf?g:f,m=y>m?y:m,g=a*t+l*n+d,y=o*t+c*n+h,u=gf?g:f,m=y>m?y:m,g=a*s+l*n+d,y=o*s+c*n+h,u=gf?g:f,m=y>m?y:m,this.minX=u,this.minY=p,this.maxX=f,this.maxY=m}addVertexData(e,t,i){let s=this.minX,n=this.minY,a=this.maxX,o=this.maxY;for(let l=t;la?c:a,o=d>o?d:o}this.minX=s,this.minY=n,this.maxX=a,this.maxY=o}addVertices(e,t,i,s){this.addVerticesMatrix(e.worldTransform,t,i,s)}addVerticesMatrix(e,t,i,s,n=0,a=n){const o=e.a,l=e.b,c=e.c,d=e.d,h=e.tx,u=e.ty;let p=this.minX,f=this.minY,m=this.maxX,g=this.maxY;for(let y=i;ys?e.maxX:s,this.maxY=e.maxY>n?e.maxY:n}addBoundsMask(e,t){const i=e.minX>t.minX?e.minX:t.minX,s=e.minY>t.minY?e.minY:t.minY,n=e.maxXc?n:c,this.maxY=a>d?a:d}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){const i=e.minX>t.x?e.minX:t.x,s=e.minY>t.y?e.minY:t.y,n=e.maxXc?n:c,this.maxY=a>d?a:d}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,s,n,a){e-=n,t-=a,i+=n,s+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYs?this.maxY:s}}class ct extends _n{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new id,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ho,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const t=Object.keys(e);for(let i=0;i1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const i=this.getChildIndex(e),s=this.getChildIndex(t);this.children[i]=t,this.children[s]=e,this.onChildrenChange(i=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const i=this.getChildIndex(e);rn(this.children,i,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&n<=s){a=this.children.splice(i,n);for(let o=0;o1&&this.children.sort(p_),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let i,s;this.cullArea?(i=this.cullArea,s=this.worldTransform):this._render!==pc.prototype._render&&(i=this.getBounds(!0));const n=e.projection.transform;if(n&&(s?(s=u_.copyFrom(s),s.prepend(n)):s=n),i&&t.intersects(i,s))this._render(e);else if(this.cullArea)return;for(let a=0,o=this.children.length;a=s&&Rn.x=n&&Rn.y=gt.HIGH?this.multisample=gt.HIGH:t>=gt.MEDIUM?this.multisample=gt.MEDIUM:t>=gt.LOW?this.multisample=gt.LOW:this.multisample=gt.NONE}destroy(){}}Fm.extension={type:oe.RendererSystem,name:"_multisample"};ge.add(Fm);class a_{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Nm{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){const n=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,n.buffer)}}bindBufferRange(e,t,i){const{gl:s,CONTEXT_UID:n}=this;i=i||0;const a=e._glBuffers[n]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const n=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,n)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;it.resource).filter(t=>t).map(t=>t.load());return this._load=Promise.all(e).then(()=>{const{realWidth:t,realHeight:i}=this.items[0];return this.resize(t,i),this.update(),Promise.resolve(this)}),this._load}}class o_ extends Hm{constructor(e,t){const{width:i,height:s}=t||{};let n,a;Array.isArray(e)?(n=e,a=e.length):a=e,super(a,{width:i,height:s}),n&&this.initFromArray(n,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=Qs.TEXTURE_2D_ARRAY}upload(e,t,i){const{length:s,itemDirtyIds:n,items:a}=this,{gl:o}=e;i.dirtyId<0&&o.texImage3D(o.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,s,0,t.format,i.type,null);for(let l=0;l0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Qs.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,i){const s=this.itemDirtyIds;for(let n=0;n{if(this.url===null){e(this);return}try{const i=await ue.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await i.blob();if(this.destroyed)return;const n=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===zt.UNPACK?"premultiply":"none"});if(this.destroyed){n.close();return}this.source=n,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return qs._EMPTY=qs._EMPTY??ue.ADAPTER.createCanvas(0,0),qs._EMPTY}}const hc=class _o extends fr{constructor(e,t){t=t||{},super(ue.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},_o.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;fr.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,i=e.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let s=t*this.scale,n=i*this.scale;(this._overrideWidth||this._overrideHeight)&&(s=this._overrideWidth||this._overrideHeight/i*t,n=this._overrideHeight||this._overrideWidth/t*i),s=Math.round(s),n=Math.round(n);const a=this.source;a.width=s,a.height=n,a._pixiId=`canvas_${Ts()}`,a.getContext("2d").drawImage(e,0,0,t,i,0,0,s,n),this._resolve(),this._resolve=null}}static getSize(e){const t=_o.SVG_SIZE.exec(e),i={};return t&&(i[t[1]]=Math.round(parseFloat(t[3])),i[t[5]]=Math.round(parseFloat(t[7]))),i}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&_o.SVG_XML.test(e)}};hc.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let cc=hc;class c_ extends fr{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const dc=class uc extends fr{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const i=document.createElement("video");t.autoLoad!==!1&&i.setAttribute("preload","auto"),t.playsinline!==!1&&(i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),t.muted===!0&&(i.setAttribute("muted",""),i.muted=!0),t.loop===!0&&i.setAttribute("loop",""),t.autoPlay!==!1&&i.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const s=e[0].src||e[0];fr.crossOrigin(i,s,t.crossorigin);for(let n=0;n{this.valid?t(this):(this._resolve=t,this._reject=i,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!t&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(Et.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Et.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Et.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||uc.TYPES.includes(t)}};dc.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],dc.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let Vm=dc;Jh.push(qs,pm,l_,Vm,c_,cc,sl,h_,o_);class Ho{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?ke.EMPTY:(e=e||new ke(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){const{a:i,b:s,c:n,d:a,tx:o,ty:l}=e,c=i*t.x+n*t.y+o,d=s*t.x+a*t.y+l;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,a=e[0],o=e[1];t=as?a:s,n=o>n?o:n,a=e[2],o=e[3],t=as?a:s,n=o>n?o:n,a=e[4],o=e[5],t=as?a:s,n=o>n?o:n,a=e[6],o=e[7],t=as?a:s,n=o>n?o:n,this.minX=t,this.minY=i,this.maxX=s,this.maxY=n}addFrame(e,t,i,s,n){this.addFrameMatrix(e.worldTransform,t,i,s,n)}addFrameMatrix(e,t,i,s,n){const a=e.a,o=e.b,l=e.c,c=e.d,d=e.tx,h=e.ty;let u=this.minX,p=this.minY,f=this.maxX,m=this.maxY,g=a*t+l*i+d,y=o*t+c*i+h;u=gf?g:f,m=y>m?y:m,g=a*s+l*i+d,y=o*s+c*i+h,u=gf?g:f,m=y>m?y:m,g=a*t+l*n+d,y=o*t+c*n+h,u=gf?g:f,m=y>m?y:m,g=a*s+l*n+d,y=o*s+c*n+h,u=gf?g:f,m=y>m?y:m,this.minX=u,this.minY=p,this.maxX=f,this.maxY=m}addVertexData(e,t,i){let s=this.minX,n=this.minY,a=this.maxX,o=this.maxY;for(let l=t;la?c:a,o=d>o?d:o}this.minX=s,this.minY=n,this.maxX=a,this.maxY=o}addVertices(e,t,i,s){this.addVerticesMatrix(e.worldTransform,t,i,s)}addVerticesMatrix(e,t,i,s,n=0,a=n){const o=e.a,l=e.b,c=e.c,d=e.d,h=e.tx,u=e.ty;let p=this.minX,f=this.minY,m=this.maxX,g=this.maxY;for(let y=i;ys?e.maxX:s,this.maxY=e.maxY>n?e.maxY:n}addBoundsMask(e,t){const i=e.minX>t.minX?e.minX:t.minX,s=e.minY>t.minY?e.minY:t.minY,n=e.maxXc?n:c,this.maxY=a>d?a:d}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){const i=e.minX>t.x?e.minX:t.x,s=e.minY>t.y?e.minY:t.y,n=e.maxXc?n:c,this.maxY=a>d?a:d}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,s,n,a){e-=n,t-=a,i+=n,s+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYs?this.maxY:s}}class ct extends _n{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new id,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ho,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const t=Object.keys(e);for(let i=0;i1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const i=this.getChildIndex(e),s=this.getChildIndex(t);this.children[i]=t,this.children[s]=e,this.onChildrenChange(i=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const i=this.getChildIndex(e);rn(this.children,i,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&n<=s){a=this.children.splice(i,n);for(let o=0;o1&&this.children.sort(p_),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let i,s;this.cullArea?(i=this.cullArea,s=this.worldTransform):this._render!==pc.prototype._render&&(i=this.getBounds(!0));const n=e.projection.transform;if(n&&(s?(s=u_.copyFrom(s),s.prepend(n)):s=n),i&&t.intersects(i,s))this._render(e);else if(this.cullArea)return;for(let a=0,o=this.children.length;a=s&&Rn.x=n&&Rn.y{Object.defineProperty(qu,r,{get(){return He("7.1.0",`filters.${r} has moved to ${r}`),e}})});class B_{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Et.system.add(this.tickerUpdate,this,Gr.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Et.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTimei.priority-s.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,s=t.length;i=0;s--)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const s=Array.isArray(t)?t:[t];for(let n=i.length-1;n>=0;n--)s.forEach(a=>{e.currentTarget=i[n],this.notifyTarget(e,a)})}propagationPath(e){const t=[e];for(let i=0;i=0;h--){const u=d[h],p=this.hitTestMoveRecursive(u,this._isInteractive(t)?t:u.eventMode,i,s,n,a||n(e,i));if(p){if(p.length>0&&!p[p.length-1].parent)continue;const f=e.isInteractive();(p.length>0||f)&&(f&&this._allInteractiveElements.push(e),p.push(e)),this._hitElements.length===0&&(this._hitElements=p),o=!0}}}const l=this._isInteractive(t),c=e.isInteractive();return l&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:l&&!n(e,i)&&s(e,i)?c?[e]:[]:null}hitTestRecursive(e,t,i,s,n){if(this._interactivePrune(e)||n(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Pr.pauseUpdate=!1),e.interactiveChildren&&e.children){const l=e.children;for(let c=l.length-1;c>=0;c--){const d=l[c],h=this.hitTestRecursive(d,this._isInteractive(t)?t:d.eventMode,i,s,n);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const u=e.isInteractive();return(h.length>0||u)&&h.push(e),h}}}const a=this._isInteractive(t),o=e.isInteractive();return a&&s(e,i)?o?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,sh),!e.hitArea.contains(sh.x,sh.y)))return!0;if(e._mask){const i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!i.containsPoint?.(t))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){t=t??e.type;const i=`on${t}`;e.currentTarget[i]?.(e);const s=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,s),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const s=t.button===2;this.dispatchEvent(t,s?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==t.target){const l=e.type==="mousemove"?"mouseout":"pointerout",c=this.createPointerEvent(e,l,n);if(this.dispatchEvent(c,"pointerout"),i&&this.dispatchEvent(c,"mouseout"),!t.composedPath().includes(n)){const d=this.createPointerEvent(e,"pointerleave",n);for(d.eventPhase=d.AT_TARGET;d.target&&!t.composedPath().includes(d.target);)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseleave"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(c)}if(n!==t.target){const l=e.type==="mousemove"?"mouseover":"pointerover",c=this.clonePointerEvent(t,l);this.dispatchEvent(c,"pointerover"),i&&this.dispatchEvent(c,"mouseover");let d=n?.parent;for(;d&&d!==this.rootTarget.parent&&d!==t.target;)d=d.parent;if(!d||d===this.rootTarget.parent){const h=this.clonePointerEvent(t,"pointerenter");for(h.eventPhase=h.AT_TARGET;h.target&&h.target!==n&&h.target!==this.rootTarget.parent;)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseenter"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(c)}const a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push("pointermove"):this.dispatchEvent(t,"pointermove"),o&&a.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?a.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),o&&a.push("globaltouchmove")),i&&(this.moveOnAll?a.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),o&&a.push("globalmousemove"),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);const n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.findMountedTarget(t.overTargets),n=this.createPointerEvent(e,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");const a=this.createPointerEvent(e,"pointerleave",s);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),i&&this.notifyTarget(a,"mouseleave"),a.target=a.target.parent;t.overTargets=null,this.freeEvent(n),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const o=i.button===2;this.dispatchEvent(i,o?"rightup":"mouseup")}const s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[e.button]);let a=n;if(n&&!i.composedPath().includes(n)){let o=n;for(;o&&!i.composedPath().includes(o);){if(i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const l=i.button===2;this.notifyTarget(i,l?"rightupoutside":"mouseupoutside")}o=o.parent}delete s.pressTargetsByButton[e.button],a=o}if(a){const o=this.clonePointerEvent(i,"click");o.target=a,o.path=null,s.clicksByButton[e.button]||(s.clicksByButton[e.button]={clickCount:0,target:o.target,timeStamp:t});const l=s.clicksByButton[e.button];if(l.target===o.target&&t-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=o.target,l.timeStamp=t,o.detail=l.clickCount,o.pointerType==="mouse"){const c=o.button===2;this.dispatchEvent(o,c?"rightclick":"click")}else o.pointerType==="touch"&&this.dispatchEvent(o,"tap");this.dispatchEvent(o,"pointertap"),this.freeEvent(o)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),s=this.createPointerEvent(e);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(s)}mapWheel(e){if(!(e instanceof nn)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),t[i]=s,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,vc._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,s=t.length;i0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",s=this.normalizeToPointerData(e);for(let n=0,a=s.length;n"u"&&(n.button=0),typeof n.buttons>"u"&&(n.buttons=1),typeof n.isPrimary>"u"&&(n.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof n.width>"u"&&(n.width=n.radiusX||1),typeof n.height>"u"&&(n.height=n.radiusY||1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="touch"),typeof n.pointerId>"u"&&(n.pointerId=n.identifier||0),typeof n.pressure>"u"&&(n.pressure=n.force||.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),typeof n.layerX>"u"&&(n.layerX=n.offsetX=n.clientX),typeof n.layerY>"u"&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,n.type=e.type,t.push(n)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=O_),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=F_[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};yc.extension={name:"events",type:[oe.RendererSystem,oe.CanvasRendererSystem]},yc.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let bc=yc;ge.add(bc);function Ku(r){return r==="dynamic"||r==="static"}const N_={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??Ku(bc.defaultEventMode)},set interactive(r){He("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=r,this.eventMode=r?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??bc.defaultEventMode},set eventMode(r){this._internalInteractive=Ku(r),this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof t=="object"?t.signal:void 0,n=typeof t=="object"?t.once===!0:!1,a=typeof e=="function"?void 0:e;r=i?`${r}capture`:r;const o=typeof e=="function"?e:e.handleEvent,l=this;s&&s.addEventListener("abort",()=>{l.off(r,o,a)}),n?l.once(r,o,a):l.on(r,o,a)},removeEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.off(r,e,s)},dispatchEvent(r){if(!(r instanceof wa))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}};ct.mixin(N_);const U_={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};ct.mixin(U_);const H_=9,za=100,G_=0,V_=0,Zu=2,Ju=1,W_=-1e3,z_=-1e3,j_=2;class jm{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(or.tablet||or.phone)&&this.createTouchHook();const t=document.createElement("div");t.style.width=`${za}px`,t.style.height=`${za}px`,t.style.position="absolute",t.style.top=`${G_}px`,t.style.left=`${V_}px`,t.style.zIndex=Zu.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${Ju}px`,e.style.height=`${Ju}px`,e.style.position="absolute",e.style.top=`${W_}px`,e.style.left=`${z_}px`,e.style.zIndex=j_.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode?.appendChild(this.div))}deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode?.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const t=e.children;if(t)for(let i=0;i title : ${e.title}
tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${za}px`,t.style.height=`${za}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=Zu.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{displayObject:i}=e.target,s=this.renderer.events.rootBoundary,n=Object.assign(new wa(s),{target:i});s.rootTarget=this.renderer.lastObjectRendered,t.forEach(a=>s.dispatchEvent(n,a))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===H_&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}jm.extension={name:"accessibility",type:[oe.RendererPlugin,oe.CanvasRendererPlugin]};ge.add(jm);const $m=class wc{constructor(e){this.stage=new Ee,e=Object.assign({forceCanvas:!1},e),this.renderer=i_(e),wc._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer?.view}get screen(){return this.renderer?.screen}destroy(e,t){const i=wc._plugins.slice(0);i.reverse(),i.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};$m._plugins=[];let $_=$m;ge.handleByList(oe.Application,$_._plugins);class Ym{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:s,clientHeight:n}=this._resizeTo;t=s,i=n}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Ym.extension=oe.Application;ge.add(Ym);const Qu={loader:oe.LoadParser,resolver:oe.ResolveParser,cache:oe.CacheParser,detection:oe.DetectionParser};ge.handle(oe.Asset,r=>{const e=r.ref;Object.entries(Qu).filter(([t])=>!!e[t]).forEach(([t,i])=>ge.add(Object.assign(e[t],{extension:e[t].extension??i})))},r=>{const e=r.ref;Object.keys(Qu).filter(t=>!!e[t]).forEach(t=>ge.remove(e[t]))});class Y_{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i(Array.isArray(r)||(r=[r]),e?r.map(i=>typeof i=="string"||t?e(i):i):r),_c=(r,e)=>{const t=e.split("?")[1];return t&&(r+=`?${t}`),r};function Xm(r,e,t,i,s){const n=e[t];for(let a=0;a{const a=n.substring(1,n.length-1).split(",");s.push(a)}),Xm(r,s,0,t,i)}else i.push(r);return i}const Vo=r=>!Array.isArray(r);class q_{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const i=Ti(e);let s;for(let o=0;o{s[o]=t}));const n=Object.keys(s),a={cacheKeys:n,keys:i};if(i.forEach(o=>{this._cacheMap.set(o,a)}),n.forEach(o=>{this._cache.has(o)&&this._cache.get(o)!==t&&console.warn("[Cache] already has key:",o),this._cache.set(o,s[o])}),t instanceof ie){const o=t;i.forEach(l=>{o.baseTexture!==ie.EMPTY.baseTexture&&Pe.addToCache(o.baseTexture,l),ie.addToCache(o,l)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(i=>{this._cache.delete(i)}),t.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const hs=new q_;class K_{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const i={promise:null,parser:null};return i.promise=(async()=>{let s=null,n=null;if(t.loadParser&&(n=this._parserHash[t.loadParser],n||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!n){for(let a=0;a({alias:[c],src:c})),o=a.length,l=a.map(async c=>{const d=At.toAbsolute(c.src);if(!s[c.src])try{this.promiseCache[d]||(this.promiseCache[d]=this._getLoadPromiseAndParser(d,c)),s[c.src]=await this.promiseCache[d].promise,t&&t(++i/o)}catch(h){throw delete this.promiseCache[d],delete s[c.src],new Error(`[Loader.load] Failed to load ${d}. +`;class P_ extends Ut{constructor(e=.5,t=Math.random()){super(Om,I_,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const qu={AlphaFilter:y_,BlurFilter:T_,BlurFilterPass:fc,ColorMatrixFilter:mc,DisplacementFilter:C_,FXAAFilter:gc,NoiseFilter:P_};Object.entries(qu).forEach(([r,e])=>{Object.defineProperty(qu,r,{get(){return He("7.1.0",`filters.${r} has moved to ${r}`),e}})});class B_{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Et.system.add(this.tickerUpdate,this,Gr.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Et.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTimei.priority-s.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,s=t.length;i=0;s--)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const s=Array.isArray(t)?t:[t];for(let n=i.length-1;n>=0;n--)s.forEach(a=>{e.currentTarget=i[n],this.notifyTarget(e,a)})}propagationPath(e){const t=[e];for(let i=0;i=0;h--){const u=d[h],p=this.hitTestMoveRecursive(u,this._isInteractive(t)?t:u.eventMode,i,s,n,a||n(e,i));if(p){if(p.length>0&&!p[p.length-1].parent)continue;const f=e.isInteractive();(p.length>0||f)&&(f&&this._allInteractiveElements.push(e),p.push(e)),this._hitElements.length===0&&(this._hitElements=p),o=!0}}}const l=this._isInteractive(t),c=e.isInteractive();return l&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:l&&!n(e,i)&&s(e,i)?c?[e]:[]:null}hitTestRecursive(e,t,i,s,n){if(this._interactivePrune(e)||n(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Pr.pauseUpdate=!1),e.interactiveChildren&&e.children){const l=e.children;for(let c=l.length-1;c>=0;c--){const d=l[c],h=this.hitTestRecursive(d,this._isInteractive(t)?t:d.eventMode,i,s,n);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const u=e.isInteractive();return(h.length>0||u)&&h.push(e),h}}}const a=this._isInteractive(t),o=e.isInteractive();return a&&s(e,i)?o?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,sh),!e.hitArea.contains(sh.x,sh.y)))return!0;if(e._mask){const i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!i.containsPoint?.(t))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){t=t??e.type;const i=`on${t}`;e.currentTarget[i]?.(e);const s=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,s),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const s=t.button===2;this.dispatchEvent(t,s?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==t.target){const l=e.type==="mousemove"?"mouseout":"pointerout",c=this.createPointerEvent(e,l,n);if(this.dispatchEvent(c,"pointerout"),i&&this.dispatchEvent(c,"mouseout"),!t.composedPath().includes(n)){const d=this.createPointerEvent(e,"pointerleave",n);for(d.eventPhase=d.AT_TARGET;d.target&&!t.composedPath().includes(d.target);)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseleave"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(c)}if(n!==t.target){const l=e.type==="mousemove"?"mouseover":"pointerover",c=this.clonePointerEvent(t,l);this.dispatchEvent(c,"pointerover"),i&&this.dispatchEvent(c,"mouseover");let d=n?.parent;for(;d&&d!==this.rootTarget.parent&&d!==t.target;)d=d.parent;if(!d||d===this.rootTarget.parent){const h=this.clonePointerEvent(t,"pointerenter");for(h.eventPhase=h.AT_TARGET;h.target&&h.target!==n&&h.target!==this.rootTarget.parent;)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseenter"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(c)}const a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push("pointermove"):this.dispatchEvent(t,"pointermove"),o&&a.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?a.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),o&&a.push("globaltouchmove")),i&&(this.moveOnAll?a.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),o&&a.push("globalmousemove"),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);const n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.findMountedTarget(t.overTargets),n=this.createPointerEvent(e,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");const a=this.createPointerEvent(e,"pointerleave",s);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),i&&this.notifyTarget(a,"mouseleave"),a.target=a.target.parent;t.overTargets=null,this.freeEvent(n),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const o=i.button===2;this.dispatchEvent(i,o?"rightup":"mouseup")}const s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[e.button]);let a=n;if(n&&!i.composedPath().includes(n)){let o=n;for(;o&&!i.composedPath().includes(o);){if(i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const l=i.button===2;this.notifyTarget(i,l?"rightupoutside":"mouseupoutside")}o=o.parent}delete s.pressTargetsByButton[e.button],a=o}if(a){const o=this.clonePointerEvent(i,"click");o.target=a,o.path=null,s.clicksByButton[e.button]||(s.clicksByButton[e.button]={clickCount:0,target:o.target,timeStamp:t});const l=s.clicksByButton[e.button];if(l.target===o.target&&t-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=o.target,l.timeStamp=t,o.detail=l.clickCount,o.pointerType==="mouse"){const c=o.button===2;this.dispatchEvent(o,c?"rightclick":"click")}else o.pointerType==="touch"&&this.dispatchEvent(o,"tap");this.dispatchEvent(o,"pointertap"),this.freeEvent(o)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),s=this.createPointerEvent(e);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(s)}mapWheel(e){if(!(e instanceof nn)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),t[i]=s,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,vc._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,s=t.length;i0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",s=this.normalizeToPointerData(e);for(let n=0,a=s.length;n"u"&&(n.button=0),typeof n.buttons>"u"&&(n.buttons=1),typeof n.isPrimary>"u"&&(n.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof n.width>"u"&&(n.width=n.radiusX||1),typeof n.height>"u"&&(n.height=n.radiusY||1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="touch"),typeof n.pointerId>"u"&&(n.pointerId=n.identifier||0),typeof n.pressure>"u"&&(n.pressure=n.force||.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),typeof n.layerX>"u"&&(n.layerX=n.offsetX=n.clientX),typeof n.layerY>"u"&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,n.type=e.type,t.push(n)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=O_),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=F_[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};yc.extension={name:"events",type:[oe.RendererSystem,oe.CanvasRendererSystem]},yc.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let bc=yc;ge.add(bc);function Ku(r){return r==="dynamic"||r==="static"}const N_={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??Ku(bc.defaultEventMode)},set interactive(r){He("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=r,this.eventMode=r?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??bc.defaultEventMode},set eventMode(r){this._internalInteractive=Ku(r),this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof t=="object"?t.signal:void 0,n=typeof t=="object"?t.once===!0:!1,a=typeof e=="function"?void 0:e;r=i?`${r}capture`:r;const o=typeof e=="function"?e:e.handleEvent,l=this;s&&s.addEventListener("abort",()=>{l.off(r,o,a)}),n?l.once(r,o,a):l.on(r,o,a)},removeEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.off(r,e,s)},dispatchEvent(r){if(!(r instanceof wa))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}};ct.mixin(N_);const U_={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};ct.mixin(U_);const H_=9,za=100,G_=0,V_=0,Zu=2,Ju=1,W_=-1e3,z_=-1e3,j_=2;class jm{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(or.tablet||or.phone)&&this.createTouchHook();const t=document.createElement("div");t.style.width=`${za}px`,t.style.height=`${za}px`,t.style.position="absolute",t.style.top=`${G_}px`,t.style.left=`${V_}px`,t.style.zIndex=Zu.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${Ju}px`,e.style.height=`${Ju}px`,e.style.position="absolute",e.style.top=`${W_}px`,e.style.left=`${z_}px`,e.style.zIndex=j_.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode?.appendChild(this.div))}deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode?.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const t=e.children;if(t)for(let i=0;i title : ${e.title}
tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${za}px`,t.style.height=`${za}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=Zu.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{displayObject:i}=e.target,s=this.renderer.events.rootBoundary,n=Object.assign(new wa(s),{target:i});s.rootTarget=this.renderer.lastObjectRendered,t.forEach(a=>s.dispatchEvent(n,a))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===H_&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}jm.extension={name:"accessibility",type:[oe.RendererPlugin,oe.CanvasRendererPlugin]};ge.add(jm);const $m=class wc{constructor(e){this.stage=new Ee,e=Object.assign({forceCanvas:!1},e),this.renderer=i_(e),wc._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer?.view}get screen(){return this.renderer?.screen}destroy(e,t){const i=wc._plugins.slice(0);i.reverse(),i.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};$m._plugins=[];let $_=$m;ge.handleByList(oe.Application,$_._plugins);class Xm{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:s,clientHeight:n}=this._resizeTo;t=s,i=n}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Xm.extension=oe.Application;ge.add(Xm);const Qu={loader:oe.LoadParser,resolver:oe.ResolveParser,cache:oe.CacheParser,detection:oe.DetectionParser};ge.handle(oe.Asset,r=>{const e=r.ref;Object.entries(Qu).filter(([t])=>!!e[t]).forEach(([t,i])=>ge.add(Object.assign(e[t],{extension:e[t].extension??i})))},r=>{const e=r.ref;Object.keys(Qu).filter(t=>!!e[t]).forEach(t=>ge.remove(e[t]))});class X_{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i(Array.isArray(r)||(r=[r]),e?r.map(i=>typeof i=="string"||t?e(i):i):r),_c=(r,e)=>{const t=e.split("?")[1];return t&&(r+=`?${t}`),r};function Ym(r,e,t,i,s){const n=e[t];for(let a=0;a{const a=n.substring(1,n.length-1).split(",");s.push(a)}),Ym(r,s,0,t,i)}else i.push(r);return i}const Vo=r=>!Array.isArray(r);class q_{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const i=Ti(e);let s;for(let o=0;o{s[o]=t}));const n=Object.keys(s),a={cacheKeys:n,keys:i};if(i.forEach(o=>{this._cacheMap.set(o,a)}),n.forEach(o=>{this._cache.has(o)&&this._cache.get(o)!==t&&console.warn("[Cache] already has key:",o),this._cache.set(o,s[o])}),t instanceof ie){const o=t;i.forEach(l=>{o.baseTexture!==ie.EMPTY.baseTexture&&Pe.addToCache(o.baseTexture,l),ie.addToCache(o,l)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(i=>{this._cache.delete(i)}),t.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const hs=new q_;class K_{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const i={promise:null,parser:null};return i.promise=(async()=>{let s=null,n=null;if(t.loadParser&&(n=this._parserHash[t.loadParser],n||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!n){for(let a=0;a({alias:[c],src:c})),o=a.length,l=a.map(async c=>{const d=At.toAbsolute(c.src);if(!s[c.src])try{this.promiseCache[d]||(this.promiseCache[d]=this._getLoadPromiseAndParser(d,c)),s[c.src]=await this.promiseCache[d].promise,t&&t(++i/o)}catch(h){throw delete this.promiseCache[d],delete s[c.src],new Error(`[Loader.load] Failed to load ${d}. ${h}`)}});return await Promise.all(l),n?s[a[0].src]:s}async unload(e){const t=Ti(e,i=>({alias:[i],src:i})).map(async i=>{const s=At.toAbsolute(i.src),n=this.promiseCache[s];if(n){const a=await n.promise;delete this.promiseCache[s],n.parser?.unload?.(a,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Bi=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(Bi||{});const Z_=".json",J_="application/json",Q_={extension:{type:oe.LoadParser,priority:Bi.Low},name:"loadJson",test(r){return En(r,J_)||jr(r,Z_)},async load(r){return await(await ue.ADAPTER.fetch(r)).json()}};ge.add(Q_);const ex=".txt",tx="text/plain",ix={name:"loadTxt",extension:{type:oe.LoadParser,priority:Bi.Low},test(r){return En(r,tx)||jr(r,ex)},async load(r){return await(await ue.ADAPTER.fetch(r)).text()}};ge.add(ix);const rx=["normal","bold","100","200","300","400","500","600","700","800","900"],sx=[".ttf",".otf",".woff",".woff2"],nx=["font/ttf","font/otf","font/woff","font/woff2"],ax=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function ox(r){const e=At.extname(r),t=At.basename(r,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1));let i=t.length>0;for(const n of t)if(!n.match(ax)){i=!1;break}let s=t.join(" ");return i||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const lx=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function hx(r){return lx.test(r)?r:encodeURI(r)}const cx={extension:{type:oe.LoadParser,priority:Bi.Low},name:"loadWebFont",test(r){return En(r,nx)||jr(r,sx)},async load(r,e){const t=ue.ADAPTER.getFontFaceSet();if(t){const i=[],s=e.data?.family??ox(r),n=e.data?.weights?.filter(o=>rx.includes(o))??["normal"],a=e.data??{};for(let o=0;oue.ADAPTER.getFontFaceSet().delete(e))}};ge.add(cx);const dx=`(function() { "use strict"; const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="; @@ -908,7 +908,7 @@ ${h}`)}});return await Promise.all(l),n?s[a[0].src]:s}async unload(e){const t=Ti }; })(); `;let on=null;class qm{constructor(){on||(on=URL.createObjectURL(new Blob([ux],{type:"application/javascript"}))),this.worker=new Worker(on)}}qm.revokeObjectURL=function(){on&&(URL.revokeObjectURL(on),on=null)};let ep=0,nh;class px{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new xc;t.addEventListener("message",i=>{t.terminate(),xc.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){nh===void 0&&(nh=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((s,n)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:n})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[ep]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:ep++,id:i})}}const tp=new px;function _a(r,e,t){r.resource.internal=!0;const i=new ie(r),s=()=>{delete e.promiseCache[t],hs.has(t)&&hs.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),s())}),i.once("destroyed",()=>{r.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),s())}),i}const fx=[".jpeg",".jpg",".png",".webp",".avif"],mx=["image/jpeg","image/png","image/webp","image/avif"];async function gx(r){const e=await ue.ADAPTER.fetch(r);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const hl={name:"loadTextures",extension:{type:oe.LoadParser,priority:Bi.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(r){return En(r,mx)||jr(r,fx)},async load(r,e,t){const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let s;i?this.config.preferWorkers&&await tp.isImageBitmapSupported()?s=await tp.loadImageBitmap(r):s=await gx(r):s=await new Promise((o,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=r,c.complete?o(c):(c.onload=()=>o(c),c.onerror=d=>l(d))});const n={...e.data};n.resolution??(n.resolution=pr(r)),i&&n.resourceOptions?.ownsImageBitmap===void 0&&(n.resourceOptions={...n.resourceOptions},n.resourceOptions.ownsImageBitmap=!0);const a=new Pe(s,n);return a.resource.src=r,_a(a,t,r)},unload(r){r.destroy(!0)}};ge.add(hl);const yx=".svg",vx="image/svg+xml",bx={extension:{type:oe.LoadParser,priority:Bi.High},name:"loadSVG",test(r){return En(r,vx)||jr(r,yx)},async testParse(r){return cc.test(r)},async parse(r,e,t){const i=new cc(r,e?.data?.resourceOptions);await i.load();const s=new Pe(i,{resolution:pr(r),...e?.data});return s.resource.src=e.src,_a(s,t,e.src)},async load(r,e){return(await ue.ADAPTER.fetch(r)).text()},unload:hl.unload};ge.add(bx);const wx=[".mp4",".m4v",".webm",".ogv"],_x=["video/mp4","video/webm","video/ogg"],xx={name:"loadVideo",extension:{type:oe.LoadParser,priority:Bi.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(r){return En(r,_x)||jr(r,wx)},async load(r,e,t){let i;const s=await(await ue.ADAPTER.fetch(r)).blob(),n=URL.createObjectURL(s);try{const a={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...e?.data?.resourceOptions,autoLoad:!0},o=new Vm(n,a);await o.load();const l=new Pe(o,{alphaMode:await Cb(),resolution:pr(r),...e?.data});l.resource.src=r,i=_a(l,t,r),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(n)})}catch(a){throw URL.revokeObjectURL(n),a}return i},unload(r){r.destroy(!0)}};ge.add(xx);class Tx{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const t=e;this._defaultSearchParams=Object.keys(t).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}getAlias(e){const{alias:t,name:i,src:s,srcs:n}=e;return Ti(t||i||s||n,a=>typeof a=="string"?a:Array.isArray(a)?a.map(o=>o?.src??o?.srcs??o):a?.src||a?.srcs?a.src??a.srcs:a,!0)}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){const i=[];Array.isArray(t)?t.forEach(s=>{const n=s.src??s.srcs,a=s.alias??s.name;let o;if(typeof a=="string"){const l=this._createBundleAssetId(e,a);i.push(l),o=[a,l]}else{const l=a.map(c=>this._createBundleAssetId(e,c));i.push(...l),o=[...a,...l]}this.add({...s,alias:o,src:n})}):Object.keys(t).forEach(s=>{const n=[s,this._createBundleAssetId(e,s)];if(typeof t[s]=="string")this.add({alias:n,src:t[s]});else if(Array.isArray(t[s]))this.add({alias:n,src:t[s]});else{const a=t[s],o=a.src??a.srcs;this.add({...a,alias:n,src:Array.isArray(o)?o:[o]})}i.push(...n)}),this._bundles[e]=i}add(e,t,i,s,n){const a=[];typeof e=="string"||Array.isArray(e)&&typeof e[0]=="string"?(He("7.2.0",`Assets.add now uses an object instead of individual parameters. -Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:s,loadParser:n})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=l=>{this.hasKey(l)&&console.warn(`[Resolver] already has key: ${l} overwriting`)},Ti(a).forEach(l=>{const{src:c,srcs:d}=l;let{data:h,format:u,loadParser:p}=l;const f=Ti(c||d).map(y=>typeof y=="string"?X_(y):Array.isArray(y)?y:[y]),m=this.getAlias(l);Array.isArray(m)?m.forEach(o):o(m);const g=[];f.forEach(y=>{y.forEach(w=>{let b={};if(typeof w!="object"){b.src=w;for(let v=0;v{this._assetMap[y]=g})})}resolveBundle(e){const t=Vo(e);e=Ti(e);const i={};return e.forEach(s=>{const n=this._bundles[s];if(n){const a=this.resolve(n),o={};for(const l in a){const c=a[l];o[this._extractAssetIdFromBundle(s,l)]=c}i[s]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const s in t)i[s]=t[s].src;return i}return t.src}resolve(e){const t=Vo(e);e=Ti(e);const i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s];const a=n[0],o=this._getPreferredOrder(n);o?.priority.forEach(l=>{o.params[l].forEach(c=>{const d=n.filter(h=>h[l]?h[l]===c:!1);d.length&&(n=d)})}),this._resolverHash[s]=n[0]??a}else this._resolverHash[s]=this.buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;tn.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:s,loadParser:n,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=At.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=n??e.loadParser,e.format=a??e.format??At.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class Ex{constructor(){this._detections=[],this._initialized=!1,this.resolver=new Tx,this.loader=new K_,this.cache=hs,this._backgroundLoader=new Y_(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let n=e.manifest;typeof n=="string"&&(n=await this.load(n)),this.resolver.addManifest(n)}const t=e.texturePreference?.resolution??1,i=typeof t=="number"?[t]:t,s=await this._detectFormats({preferredFormats:e.texturePreference?.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,s,n){this.resolver.add(e,t,i,s,n)}async load(e,t){this._initialized||await this.init();const i=Vo(e),s=Ti(e).map(o=>{if(typeof o!="string"){const l=this.resolver.getAlias(o);return l.some(c=>!this.resolver.hasKey(c))&&this.add(o),Array.isArray(l)?l[0]:l}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),n=this.resolver.resolve(s),a=await this._mapLoadToResolve(n,t);return i?a[s[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const s=this.resolver.resolveBundle(e),n={},a=Object.keys(s);let o=0,l=0;const c=()=>{t?.(++o/l)},d=a.map(h=>{const u=s[h];return l+=Object.keys(u).length,this._mapLoadToResolve(u,c).then(p=>{n[h]=p})});return await Promise.all(d),i?n[e[0]]:n}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return hs.get(e);const t={};for(let i=0;i{const c=n[o.src],d=[o.src];o.alias&&d.push(...o.alias),a[s[l]]=c,hs.set(d,c)}),a}async unload(e){this._initialized||await this.init();const t=Ti(e).map(s=>typeof s!="string"?s.src:s),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=Ti(e);const t=this.resolver.resolveBundle(e),i=Object.keys(t).map(s=>this._unloadFromResolved(t[s]));await Promise.all(i)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach(i=>{hs.remove(i.src)}),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const i of e.detections)e.skipDetections||await i.test()?t=await i.add(t):e.skipDetections||(t=await i.remove(t));return t=t.filter((i,s)=>t.indexOf(i)===s),t}get detections(){return this._detections}get preferWorkers(){return hl.config.preferWorkers}set preferWorkers(e){He("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}}const Ks=new Ex;ge.handleByList(oe.LoadParser,Ks.loader.parsers).handleByList(oe.ResolveParser,Ks.resolver.parsers).handleByList(oe.CacheParser,Ks.cache.parsers).handleByList(oe.DetectionParser,Ks.detections);const Ax={extension:oe.CacheParser,test:r=>Array.isArray(r)&&r.every(e=>e instanceof ie),getCacheableAssets:(r,e)=>{const t={};return r.forEach(i=>{e.forEach((s,n)=>{t[i+(n===0?"":n+1)]=s})}),t}};ge.add(Ax);async function Km(r){if("Image"in globalThis)return new Promise(e=>{const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src=r});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(r)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const Sx={extension:{type:oe.DetectionParser,priority:1},test:async()=>Km("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async r=>[...r,"avif"],remove:async r=>r.filter(e=>e!=="avif")};ge.add(Sx);const Cx={extension:{type:oe.DetectionParser,priority:0},test:async()=>Km("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async r=>[...r,"webp"],remove:async r=>r.filter(e=>e!=="webp")};ge.add(Cx);const ip=["png","jpg","jpeg"],Mx={extension:{type:oe.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async r=>[...r,...ip],remove:async r=>r.filter(e=>!ip.includes(e))};ge.add(Mx);const kx="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function nd(r){return kx?!1:document.createElement("video").canPlayType(r)!==""}const Ix={extension:{type:oe.DetectionParser,priority:0},test:async()=>nd("video/webm"),add:async r=>[...r,"webm"],remove:async r=>r.filter(e=>e!=="webm")};ge.add(Ix);const Px={extension:{type:oe.DetectionParser,priority:0},test:async()=>nd("video/mp4"),add:async r=>[...r,"mp4","m4v"],remove:async r=>r.filter(e=>e!=="mp4"&&e!=="m4v")};ge.add(Px);const Bx={extension:{type:oe.DetectionParser,priority:0},test:async()=>nd("video/ogg"),add:async r=>[...r,"ogv"],remove:async r=>r.filter(e=>e!=="ogv")};ge.add(Bx);const Rx={extension:oe.ResolveParser,test:hl.test,parse:r=>({resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:At.extname(r).slice(1),src:r})};ge.add(Rx);var Mt=(r=>(r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",r[r.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",r[r.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",r[r.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",r[r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",r[r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",r[r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",r))(Mt||{});const Wo={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let Oi,Vs;function rp(){Vs={bptc:Oi.getExtension("EXT_texture_compression_bptc"),astc:Oi.getExtension("WEBGL_compressed_texture_astc"),etc:Oi.getExtension("WEBGL_compressed_texture_etc"),s3tc:Oi.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:Oi.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:Oi.getExtension("WEBGL_compressed_texture_pvrtc")||Oi.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:Oi.getExtension("WEBGL_compressed_texture_etc1"),atc:Oi.getExtension("WEBGL_compressed_texture_atc")}}const Lx={extension:{type:oe.DetectionParser,priority:2},test:async()=>{const r=ue.ADAPTER.createCanvas().getContext("webgl");return r?(Oi=r,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async r=>{Vs||rp();const e=[];for(const t in Vs)Vs[t]&&e.push(t);return[...e,...r]},remove:async r=>(Vs||rp(),r.filter(e=>!(e in Vs)))};ge.add(Lx);class Dx extends sl{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,s;typeof e=="string"?(i=e,s=new Uint8Array):(i=null,s=e),super(s,t),this.origin=i,this.buffer=s?new Zh(s):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new Zh(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class vs extends Dx{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=vs._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||vs._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){const s=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;s.pixelStorei(s.UNPACK_ALIGNMENT,4);for(let n=0,a=this.levels;n=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,t,i,s,n,a,o){const l=new Array(i);let c=e.byteOffset,d=a,h=o,u=d+s-1&~(s-1),p=h+n-1&~(n-1),f=u*p*Wo[t];for(let m=0;m1?d:u,levelHeight:i>1?h:p,levelBuffer:new Uint8Array(e.buffer,c,f)},c+=f,d=d>>1||1,h=h>>1||1,u=d+s-1&~(s-1),p=h+n-1&~(n-1),f=u*p*Wo[t];return l}}const ah=4,ja=124,Ox=32,sp=20,Fx=542327876,$a={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},Nx={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},Ya={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},Ux=1,Hx=2,Gx=4,Vx=64,Wx=512,zx=131072,jx=827611204,$x=861165636,Yx=894720068,Xx=808540228,qx=4,Kx={[jx]:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,[$x]:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,[Yx]:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT},Zx={70:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:Mt.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:Mt.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:Mt.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:Mt.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function Jx(r){const e=new Uint32Array(r);if(e[0]!==Fx)throw new Error("Invalid DDS file magic word");const t=new Uint32Array(r,0,ja/Uint32Array.BYTES_PER_ELEMENT),i=t[$a.HEIGHT],s=t[$a.WIDTH],n=t[$a.MIPMAP_COUNT],a=new Uint32Array(r,$a.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,Ox/Uint32Array.BYTES_PER_ELEMENT),o=a[Ux];if(o&Gx){const l=a[Nx.FOURCC];if(l!==Xx){const w=Kx[l],b=ah+ja,v=new Uint8Array(r,b);return[new vs(v,{format:w,width:s,height:i,levels:n})]}const c=ah+ja,d=new Uint32Array(e.buffer,c,sp/Uint32Array.BYTES_PER_ELEMENT),h=d[Ya.DXGI_FORMAT],u=d[Ya.RESOURCE_DIMENSION],p=d[Ya.MISC_FLAG],f=d[Ya.ARRAY_SIZE],m=Zx[h];if(m===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${h}`);if(p===qx)throw new Error("DDSParser does not support cubemap textures");if(u===6)throw new Error("DDSParser does not supported 3D texture data");const g=new Array,y=ah+ja+sp;if(f===1)g.push(new Uint8Array(r,y));else{const w=Wo[m];let b=0,v=s,E=i;for(let I=0;I>>1,E=E>>>1}let C=y;for(let I=0;Inew vs(w,{format:m,width:s,height:i,levels:n}))}throw o&Vx?new Error("DDSParser does not support uncompressed texture data."):o&Wx?new Error("DDSParser does not supported YUV uncompressed texture data."):o&zx?new Error("DDSParser does not support single-channel (lumninance) texture data!"):o&Hx?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const np=[171,75,84,88,32,49,49,187,13,10,26,10],Qx=67305985,bi={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},Tc=64,ap={[xe.UNSIGNED_BYTE]:1,[xe.UNSIGNED_SHORT]:2,[xe.INT]:4,[xe.UNSIGNED_INT]:4,[xe.FLOAT]:4,[xe.HALF_FLOAT]:8},e1={[se.RGBA]:4,[se.RGB]:3,[se.RG]:2,[se.RED]:1,[se.LUMINANCE]:1,[se.LUMINANCE_ALPHA]:2,[se.ALPHA]:1},t1={[xe.UNSIGNED_SHORT_4_4_4_4]:2,[xe.UNSIGNED_SHORT_5_5_5_1]:2,[xe.UNSIGNED_SHORT_5_6_5]:2};function i1(r,e,t=!1){const i=new DataView(e);if(!r1(r,i))return null;const s=i.getUint32(bi.ENDIANNESS,!0)===Qx,n=i.getUint32(bi.GL_TYPE,s),a=i.getUint32(bi.GL_FORMAT,s),o=i.getUint32(bi.GL_INTERNAL_FORMAT,s),l=i.getUint32(bi.PIXEL_WIDTH,s),c=i.getUint32(bi.PIXEL_HEIGHT,s)||1,d=i.getUint32(bi.PIXEL_DEPTH,s)||1,h=i.getUint32(bi.NUMBER_OF_ARRAY_ELEMENTS,s)||1,u=i.getUint32(bi.NUMBER_OF_FACES,s),p=i.getUint32(bi.NUMBER_OF_MIPMAP_LEVELS,s),f=i.getUint32(bi.BYTES_OF_KEY_VALUE_DATA,s);if(c===0||d!==1)throw new Error("Only 2D textures are supported");if(u!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const m=4,g=4,y=l+3&-4,w=c+3&-4,b=new Array(h);let v=l*c;n===0&&(v=y*w);let E;if(n!==0?ap[n]?E=ap[n]*e1[a]:E=t1[n]:E=Wo[o],E===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const C=t?n1(i,f,s):null;let I=v*E,L=l,k=c,N=y,G=w,A=Tc+f;for(let S=0;S1||n!==0?L:N,levelHeight:p>1||n!==0?k:G,levelBuffer:new Uint8Array(e,D,I)},D+=I}A+=x+4,A=A%4!==0?A+4-A%4:A,L=L>>1||1,k=k>>1||1,N=L+m-1&~(m-1),G=k+g-1&~(g-1),I=N*G*E}return n!==0?{uncompressed:b.map(S=>{let x=S[0].levelBuffer,D=!1;return n===xe.FLOAT?x=new Float32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4):n===xe.UNSIGNED_INT?(D=!0,x=new Uint32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)):n===xe.INT&&(D=!0,x=new Int32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)),{resource:new sl(x,{width:S[0].levelWidth,height:S[0].levelHeight}),type:n,format:D?s1(a):a}}),kvData:C}:{compressed:b.map(S=>new vs(null,{format:o,width:l,height:c,levels:p,levelBuffers:S})),kvData:C}}function r1(r,e){for(let t=0;te-s){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let l=0;for(;l{const a=new Pe(n,{mipmap:Ji.OFF,alphaMode:zt.NO_PREMULTIPLIED_ALPHA,resolution:pr(r),...e.data});return _a(a,t,r)});return s.length===1?s[0]:s},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(a1);const o1={extension:{type:oe.LoadParser,priority:Bi.High},name:"loadKTX",test(r){return jr(r,".ktx")},async load(r,e,t){const i=await(await ue.ADAPTER.fetch(r)).arrayBuffer(),{compressed:s,uncompressed:n,kvData:a}=i1(r,i),o=s??n,l={mipmap:Ji.OFF,alphaMode:zt.NO_PREMULTIPLIED_ALPHA,resolution:pr(r),...e.data},c=o.map(d=>{o===n&&Object.assign(l,{type:d.type,format:d.format});const h=d.resource??d,u=new Pe(h,l);return u.ktxKeyValueData=a,_a(u,t,r)});return c.length===1?c[0]:c},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(o1);const l1=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],h1={extension:oe.ResolveParser,test:r=>{const e=At.extname(r).slice(1);return["basis","ktx","dds"].includes(e)},parse:r=>{const e=r.split("."),t=e.pop();if(["ktx","dds"].includes(t)){const i=e.pop();if(l1.includes(i))return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:i,src:r}}return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:t,src:r}}};ge.add(h1);const Xa=new ke,c1=4,Zm=class Vn{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,t,i,s){const n=new Image;return n.src=await this.base64(e,t,i,s),n}async base64(e,t,i,s){const n=this.canvas(e,s);if(n.toBlob!==void 0)return new Promise((a,o)=>{n.toBlob(l=>{if(!l){o(new Error("ICanvas.toBlob failed!"));return}const c=new FileReader;c.onload=()=>a(c.result),c.onerror=o,c.readAsDataURL(l)},t,i)});if(n.toDataURL!==void 0)return n.toDataURL(t,i);if(n.convertToBlob!==void 0){const a=await n.convertToBlob({type:t,quality:i});return new Promise((o,l)=>{const c=new FileReader;c.onload=()=>o(c.result),c.onerror=l,c.readAsDataURL(a)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);a&&Vn._flipY(i,s,n),o&&Vn._unpremultiplyAlpha(i);const l=new Wb(s,n,1),c=new ImageData(new Uint8ClampedArray(i.buffer),s,n);return l.context.putImageData(c,0,0),l.canvas}pixels(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);return a&&Vn._flipY(i,s,n),o&&Vn._unpremultiplyAlpha(i),i}_rawPixels(e,t){const i=this.renderer;if(!i)throw new Error("The Extract has already been destroyed");let s,n=!1,a=!1,o,l=!1;e&&(e instanceof Ft?o=e:(o=i.generateTexture(e,{region:t,resolution:i.resolution,multisample:i.multisample}),l=!0,t&&(Xa.width=t.width,Xa.height=t.height,t=Xa)));const c=i.gl;if(o){if(s=o.baseTexture.resolution,t=t??o.frame,n=!1,a=o.baseTexture.alphaMode>0&&o.baseTexture.format===se.RGBA,!l){i.renderTexture.bind(o);const p=o.framebuffer.glFramebuffers[i.CONTEXT_UID];p.blitFramebuffer&&i.framebuffer.bind(p.blitFramebuffer)}}else s=i.resolution,t||(t=Xa,t.width=i.width/s,t.height=i.height/s),n=!0,a=this._rendererPremultipliedAlpha,i.renderTexture.bind();const d=Math.max(Math.round(t.width*s),1),h=Math.max(Math.round(t.height*s),1),u=new Uint8Array(c1*d*h);return c.readPixels(Math.round(t.x*s),Math.round(t.y*s),d,h,c.RGBA,c.UNSIGNED_BYTE,u),l&&o?.destroy(!0),{pixels:u,width:d,height:h,flipY:n,premultipliedAlpha:a}}destroy(){this.renderer=null}static _flipY(e,t,i){const s=t<<2,n=i>>1,a=new Uint8Array(s);for(let o=0;o=0&&o>=0&&s>=0&&n>=0)){e.length=0;return}const l=Math.ceil(2.3*Math.sqrt(a+o)),c=l*8+(s?4:0)+(n?4:0);if(e.length=c,c===0)return;if(l===0){e.length=8,e[0]=e[6]=t+s,e[1]=e[3]=i+n,e[2]=e[4]=t-s,e[5]=e[7]=i-n;return}let d=0,h=l*4+(s?2:0)+2,u=h,p=c;{const f=s+a,m=n,g=t+f,y=t-f,w=i+m;if(e[d++]=g,e[d++]=w,e[--h]=w,e[--h]=y,n){const b=i-m;e[u++]=y,e[u++]=b,e[--p]=b,e[--p]=g}}for(let f=1;f0||e&&i<=0){const s=t/2;for(let n=s+s%2;n=6){op(t,!1);const a=[];for(let c=0;c=0&&n>=0&&a.push(t,i,t+s,i,t+s,i+n,t,i+n)},triangulate(r,e){const t=r.points,i=e.points;if(t.length===0)return;const s=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},p1={build(r){zo.build(r)},triangulate(r,e){zo.triangulate(r,e)}};var oi=(r=>(r.MITER="miter",r.BEVEL="bevel",r.ROUND="round",r))(oi||{}),Nr=(r=>(r.BUTT="butt",r.ROUND="round",r.SQUARE="square",r))(Nr||{});const dn={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,e=20){if(!this.adaptive||!r||isNaN(r))return e;let t=Math.ceil(r/this.maxLength);return tthis.maxSegments&&(t=this.maxSegments),t}};class lp{static curveTo(e,t,i,s,n,a){const o=a[a.length-2],l=a[a.length-1]-t,c=o-e,d=s-t,h=i-e,u=Math.abs(l*h-c*d);if(u<1e-8||n===0)return(a[a.length-2]!==e||a[a.length-1]!==t)&&a.push(e,t),null;const p=l*l+c*c,f=d*d+h*h,m=l*d+c*h,g=n*Math.sqrt(p)/u,y=n*Math.sqrt(f)/u,w=g*m/p,b=y*m/f,v=g*h+y*c,E=g*d+y*l,C=c*(y+w),I=l*(y+w),L=h*(g+b),k=d*(g+b),N=Math.atan2(I-E,C-v),G=Math.atan2(k-E,L-v);return{cx:v+e,cy:E+t,radius:n,startAngle:N,endAngle:G,anticlockwise:c*d>h*l}}static arc(e,t,i,s,n,a,o,l,c){const d=o-a,h=dn._segmentsCount(Math.abs(d)*n,Math.ceil(Math.abs(d)/Do)*40),u=d/(h*2),p=u*2,f=Math.cos(u),m=Math.sin(u),g=h-1,y=g%1/g;for(let w=0;w<=g;++w){const b=w+y*w,v=u+a+p*b,E=Math.cos(v),C=-Math.sin(v);c.push((f*E+m*C)*n+i,(f*-C+m*E)*n+s)}}}class f1{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class ad{static curveLength(e,t,i,s,n,a,o,l){let c=0,d=0,h=0,u=0,p=0,f=0,m=0,g=0,y=0,w=0,b=0,v=e,E=t;for(let C=1;C<=10;++C)d=C/10,h=d*d,u=h*d,p=1-d,f=p*p,m=f*p,g=m*e+3*f*d*i+3*p*h*n+u*o,y=m*t+3*f*d*s+3*p*h*a+u*l,w=v-g,b=E-y,v=g,E=y,c+=Math.sqrt(w*w+b*b);return c}static curveTo(e,t,i,s,n,a,o){const l=o[o.length-2],c=o[o.length-1];o.length-=2;const d=dn._segmentsCount(ad.curveLength(l,c,e,t,i,s,n,a));let h=0,u=0,p=0,f=0,m=0;o.push(l,c);for(let g=1,y=0;g<=d;++g)y=g/d,h=1-y,u=h*h,p=u*h,f=y*y,m=f*y,o.push(p*l+3*u*y*e+3*h*f*i+m*n,p*c+3*u*y*t+3*h*f*s+m*a)}}function hp(r,e,t,i,s,n,a,o){const l=r-t*s,c=e-i*s,d=r+t*n,h=e+i*n;let u,p;a?(u=i,p=-t):(u=-i,p=t);const f=l+u,m=c+p,g=d+u,y=h+p;return o.push(f,m,g,y),2}function Zr(r,e,t,i,s,n,a,o){const l=t-r,c=i-e;let d=Math.atan2(l,c),h=Math.atan2(s-r,n-e);o&&dh&&(h+=Math.PI*2);let u=d;const p=h-d,f=Math.abs(p),m=Math.sqrt(l*l+c*c),g=(15*f*Math.sqrt(m)/Math.PI>>0)+1,y=p/g;if(u+=y,o){a.push(r,e,t,i);for(let w=1,b=u;w=0&&(n.join===oi.ROUND?u+=Zr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,d,!1)+4:u+=2,d.push(b-k*x,v-N*x,b+k*S,v+N*S));continue}const Z=(-I+y)*(-L+v)-(-I+b)*(-L+w),ye=(-k+E)*(-N+v)-(-k+b)*(-N+C),Ce=(O*ye-V*Z)/te,ce=(F*Z-W*ye)/te,fe=(Ce-b)*(Ce-b)+(ce-v)*(ce-v),we=b+(Ce-b)*S,le=v+(ce-v)*S,pe=b-(Ce-b)*x,be=v-(ce-v)*x,T=Math.min(O*O+W*W,V*V+F*F),Y=Q?S:x,j=T+Y*Y*m,P=fe<=j;let M=n.join;if(M===oi.MITER&&fe/m>g&&(M=oi.BEVEL),P)switch(M){case oi.MITER:{d.push(we,le,pe,be);break}case oi.BEVEL:{Q?d.push(we,le,b+I*x,v+L*x,we,le,b+k*x,v+N*x):d.push(b-I*S,v-L*S,pe,be,b-k*S,v-N*S,pe,be),u+=2;break}case oi.ROUND:{Q?(d.push(we,le,b+I*x,v+L*x),u+=Zr(b,v,b+I*x,v+L*x,b+k*x,v+N*x,d,!0)+4,d.push(we,le,b+k*x,v+N*x)):(d.push(b-I*S,v-L*S,pe,be),u+=Zr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,d,!1)+4,d.push(b-k*S,v-N*S,pe,be));break}}else{switch(d.push(b-I*S,v-L*S,b+I*x,v+L*x),M){case oi.MITER:{Q?d.push(pe,be,pe,be):d.push(we,le,we,le),u+=2;break}case oi.ROUND:{Q?u+=Zr(b,v,b+I*x,v+L*x,b+k*x,v+N*x,d,!0)+2:u+=Zr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,d,!1)+2;break}}d.push(b-k*S,v-N*S,b+k*x,v+N*x),u+=2}}y=i[(h-2)*2],w=i[(h-2)*2+1],b=i[(h-1)*2],v=i[(h-1)*2+1],I=-(w-v),L=y-b,G=Math.sqrt(I*I+L*L),I/=G,L/=G,I*=f,L*=f,d.push(b-I*S,v-L*S,b+I*x,v+L*x),l||(n.cap===Nr.ROUND?u+=Zr(b-I*(S-x)*.5,v-L*(S-x)*.5,b-I*S,v-L*S,b+I*x,v+L*x,d,!1)+2:n.cap===Nr.SQUARE&&(u+=hp(b,v,I,L,S,x,!1,d)));const D=e.indices,$=dn.epsilon*dn.epsilon;for(let R=p;R0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,i=null,s=null){const n=new jo(e,t,i,s);return this.graphicsData.push(n),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const i=new jo(e,null,null,t),s=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=s.lineStyle,s.holes.push(i),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(i=this.batches[this.batches.length-1],s=i.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(s=qa.pop(),s||(s=new ec,s.texArray=new sc),this.drawCalls.push(s)),s.start=d,s.size=0,s.texArray.count=0,s.type=c),m.touched=1,m._batchEnabled=e,m._batchLocation=n,m.wrapMode=Ur.REPEAT,s.texArray.elements[s.texArray.count++]=m,n++)),s.size+=u.size,d+=u.size,o=m._batchLocation,this.addColors(t,f.color,f.alpha,u.attribSize,u.attribStart),this.addTextureIds(i,o,u.attribSize,u.attribStart)}Pe._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,i=this.colors,s=this.textureIds,n=new ArrayBuffer(e.length*3*4),a=new Float32Array(n),o=new Uint32Array(n);let l=0;for(let c=0;c0&&e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:i},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new ys,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new ys,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const i=this.currentPath.points,s=i[i.length-2],n=i[i.length-1];return(s!==e||n!==t)&&i.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,i,s){this._initCurve();const n=this.currentPath.points;return n.length===0&&this.moveTo(0,0),od.curveTo(e,t,i,s,n),this}bezierCurveTo(e,t,i,s,n,a){return this._initCurve(),ad.curveTo(e,t,i,s,n,a,this.currentPath.points),this}arcTo(e,t,i,s,n){this._initCurve(e,t);const a=this.currentPath.points,o=lp.curveTo(e,t,i,s,n,a);if(o){const{cx:l,cy:c,radius:d,startAngle:h,endAngle:u,anticlockwise:p}=o;this.arc(l,c,d,h,u,p)}return this}arc(e,t,i,s,n,a=!1){if(s===n)return this;if(!a&&n<=s?n+=Do:a&&s<=n&&(s+=Do),n-s===0)return this;const o=e+Math.cos(s)*i,l=t+Math.sin(s)*i,c=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const h=Math.abs(d[d.length-2]-o),u=Math.abs(d[d.length-1]-l);h0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:i},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,i,s){return this.drawShape(new ke(e,t,i,s))}drawRoundedRect(e,t,i,s,n){return this.drawShape(new ol(e,t,i,s,n))}drawCircle(e,t,i){return this.drawShape(new nl(e,t,i))}drawEllipse(e,t,i,s){return this.drawShape(new al(e,t,i,s))}drawPolygon(...e){let t,i=!0;const s=e[0];s.points?(i=s.closeStroke,t=s.points):Array.isArray(e[0])?t=e[0]:t=e;const n=new ys(t);return n.closeStroke=i,this.drawShape(n),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===It.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,i=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(e.points);for(let s=0;s{this.hasKey(l)&&console.warn(`[Resolver] already has key: ${l} overwriting`)},Ti(a).forEach(l=>{const{src:c,srcs:d}=l;let{data:h,format:u,loadParser:p}=l;const f=Ti(c||d).map(y=>typeof y=="string"?Y_(y):Array.isArray(y)?y:[y]),m=this.getAlias(l);Array.isArray(m)?m.forEach(o):o(m);const g=[];f.forEach(y=>{y.forEach(w=>{let b={};if(typeof w!="object"){b.src=w;for(let v=0;v{this._assetMap[y]=g})})}resolveBundle(e){const t=Vo(e);e=Ti(e);const i={};return e.forEach(s=>{const n=this._bundles[s];if(n){const a=this.resolve(n),o={};for(const l in a){const c=a[l];o[this._extractAssetIdFromBundle(s,l)]=c}i[s]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const s in t)i[s]=t[s].src;return i}return t.src}resolve(e){const t=Vo(e);e=Ti(e);const i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s];const a=n[0],o=this._getPreferredOrder(n);o?.priority.forEach(l=>{o.params[l].forEach(c=>{const d=n.filter(h=>h[l]?h[l]===c:!1);d.length&&(n=d)})}),this._resolverHash[s]=n[0]??a}else this._resolverHash[s]=this.buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;tn.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:s,loadParser:n,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=At.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=n??e.loadParser,e.format=a??e.format??At.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class Ex{constructor(){this._detections=[],this._initialized=!1,this.resolver=new Tx,this.loader=new K_,this.cache=hs,this._backgroundLoader=new X_(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let n=e.manifest;typeof n=="string"&&(n=await this.load(n)),this.resolver.addManifest(n)}const t=e.texturePreference?.resolution??1,i=typeof t=="number"?[t]:t,s=await this._detectFormats({preferredFormats:e.texturePreference?.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,s,n){this.resolver.add(e,t,i,s,n)}async load(e,t){this._initialized||await this.init();const i=Vo(e),s=Ti(e).map(o=>{if(typeof o!="string"){const l=this.resolver.getAlias(o);return l.some(c=>!this.resolver.hasKey(c))&&this.add(o),Array.isArray(l)?l[0]:l}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),n=this.resolver.resolve(s),a=await this._mapLoadToResolve(n,t);return i?a[s[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const s=this.resolver.resolveBundle(e),n={},a=Object.keys(s);let o=0,l=0;const c=()=>{t?.(++o/l)},d=a.map(h=>{const u=s[h];return l+=Object.keys(u).length,this._mapLoadToResolve(u,c).then(p=>{n[h]=p})});return await Promise.all(d),i?n[e[0]]:n}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return hs.get(e);const t={};for(let i=0;i{const c=n[o.src],d=[o.src];o.alias&&d.push(...o.alias),a[s[l]]=c,hs.set(d,c)}),a}async unload(e){this._initialized||await this.init();const t=Ti(e).map(s=>typeof s!="string"?s.src:s),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=Ti(e);const t=this.resolver.resolveBundle(e),i=Object.keys(t).map(s=>this._unloadFromResolved(t[s]));await Promise.all(i)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach(i=>{hs.remove(i.src)}),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const i of e.detections)e.skipDetections||await i.test()?t=await i.add(t):e.skipDetections||(t=await i.remove(t));return t=t.filter((i,s)=>t.indexOf(i)===s),t}get detections(){return this._detections}get preferWorkers(){return hl.config.preferWorkers}set preferWorkers(e){He("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}}const Ks=new Ex;ge.handleByList(oe.LoadParser,Ks.loader.parsers).handleByList(oe.ResolveParser,Ks.resolver.parsers).handleByList(oe.CacheParser,Ks.cache.parsers).handleByList(oe.DetectionParser,Ks.detections);const Ax={extension:oe.CacheParser,test:r=>Array.isArray(r)&&r.every(e=>e instanceof ie),getCacheableAssets:(r,e)=>{const t={};return r.forEach(i=>{e.forEach((s,n)=>{t[i+(n===0?"":n+1)]=s})}),t}};ge.add(Ax);async function Km(r){if("Image"in globalThis)return new Promise(e=>{const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src=r});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(r)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const Sx={extension:{type:oe.DetectionParser,priority:1},test:async()=>Km("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async r=>[...r,"avif"],remove:async r=>r.filter(e=>e!=="avif")};ge.add(Sx);const Cx={extension:{type:oe.DetectionParser,priority:0},test:async()=>Km("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async r=>[...r,"webp"],remove:async r=>r.filter(e=>e!=="webp")};ge.add(Cx);const ip=["png","jpg","jpeg"],Mx={extension:{type:oe.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async r=>[...r,...ip],remove:async r=>r.filter(e=>!ip.includes(e))};ge.add(Mx);const kx="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function nd(r){return kx?!1:document.createElement("video").canPlayType(r)!==""}const Ix={extension:{type:oe.DetectionParser,priority:0},test:async()=>nd("video/webm"),add:async r=>[...r,"webm"],remove:async r=>r.filter(e=>e!=="webm")};ge.add(Ix);const Px={extension:{type:oe.DetectionParser,priority:0},test:async()=>nd("video/mp4"),add:async r=>[...r,"mp4","m4v"],remove:async r=>r.filter(e=>e!=="mp4"&&e!=="m4v")};ge.add(Px);const Bx={extension:{type:oe.DetectionParser,priority:0},test:async()=>nd("video/ogg"),add:async r=>[...r,"ogv"],remove:async r=>r.filter(e=>e!=="ogv")};ge.add(Bx);const Rx={extension:oe.ResolveParser,test:hl.test,parse:r=>({resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:At.extname(r).slice(1),src:r})};ge.add(Rx);var Mt=(r=>(r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",r[r.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",r[r.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",r[r.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",r[r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",r[r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",r[r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",r))(Mt||{});const Wo={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let Oi,Vs;function rp(){Vs={bptc:Oi.getExtension("EXT_texture_compression_bptc"),astc:Oi.getExtension("WEBGL_compressed_texture_astc"),etc:Oi.getExtension("WEBGL_compressed_texture_etc"),s3tc:Oi.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:Oi.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:Oi.getExtension("WEBGL_compressed_texture_pvrtc")||Oi.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:Oi.getExtension("WEBGL_compressed_texture_etc1"),atc:Oi.getExtension("WEBGL_compressed_texture_atc")}}const Lx={extension:{type:oe.DetectionParser,priority:2},test:async()=>{const r=ue.ADAPTER.createCanvas().getContext("webgl");return r?(Oi=r,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async r=>{Vs||rp();const e=[];for(const t in Vs)Vs[t]&&e.push(t);return[...e,...r]},remove:async r=>(Vs||rp(),r.filter(e=>!(e in Vs)))};ge.add(Lx);class Dx extends sl{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,s;typeof e=="string"?(i=e,s=new Uint8Array):(i=null,s=e),super(s,t),this.origin=i,this.buffer=s?new Zh(s):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new Zh(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class vs extends Dx{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=vs._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||vs._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){const s=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;s.pixelStorei(s.UNPACK_ALIGNMENT,4);for(let n=0,a=this.levels;n=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,t,i,s,n,a,o){const l=new Array(i);let c=e.byteOffset,d=a,h=o,u=d+s-1&~(s-1),p=h+n-1&~(n-1),f=u*p*Wo[t];for(let m=0;m1?d:u,levelHeight:i>1?h:p,levelBuffer:new Uint8Array(e.buffer,c,f)},c+=f,d=d>>1||1,h=h>>1||1,u=d+s-1&~(s-1),p=h+n-1&~(n-1),f=u*p*Wo[t];return l}}const ah=4,ja=124,Ox=32,sp=20,Fx=542327876,$a={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},Nx={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},Xa={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},Ux=1,Hx=2,Gx=4,Vx=64,Wx=512,zx=131072,jx=827611204,$x=861165636,Xx=894720068,Yx=808540228,qx=4,Kx={[jx]:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,[$x]:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,[Xx]:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT},Zx={70:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:Mt.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:Mt.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:Mt.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:Mt.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function Jx(r){const e=new Uint32Array(r);if(e[0]!==Fx)throw new Error("Invalid DDS file magic word");const t=new Uint32Array(r,0,ja/Uint32Array.BYTES_PER_ELEMENT),i=t[$a.HEIGHT],s=t[$a.WIDTH],n=t[$a.MIPMAP_COUNT],a=new Uint32Array(r,$a.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,Ox/Uint32Array.BYTES_PER_ELEMENT),o=a[Ux];if(o&Gx){const l=a[Nx.FOURCC];if(l!==Yx){const w=Kx[l],b=ah+ja,v=new Uint8Array(r,b);return[new vs(v,{format:w,width:s,height:i,levels:n})]}const c=ah+ja,d=new Uint32Array(e.buffer,c,sp/Uint32Array.BYTES_PER_ELEMENT),h=d[Xa.DXGI_FORMAT],u=d[Xa.RESOURCE_DIMENSION],p=d[Xa.MISC_FLAG],f=d[Xa.ARRAY_SIZE],m=Zx[h];if(m===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${h}`);if(p===qx)throw new Error("DDSParser does not support cubemap textures");if(u===6)throw new Error("DDSParser does not supported 3D texture data");const g=new Array,y=ah+ja+sp;if(f===1)g.push(new Uint8Array(r,y));else{const w=Wo[m];let b=0,v=s,E=i;for(let I=0;I>>1,E=E>>>1}let C=y;for(let I=0;Inew vs(w,{format:m,width:s,height:i,levels:n}))}throw o&Vx?new Error("DDSParser does not support uncompressed texture data."):o&Wx?new Error("DDSParser does not supported YUV uncompressed texture data."):o&zx?new Error("DDSParser does not support single-channel (lumninance) texture data!"):o&Hx?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const np=[171,75,84,88,32,49,49,187,13,10,26,10],Qx=67305985,bi={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},Tc=64,ap={[xe.UNSIGNED_BYTE]:1,[xe.UNSIGNED_SHORT]:2,[xe.INT]:4,[xe.UNSIGNED_INT]:4,[xe.FLOAT]:4,[xe.HALF_FLOAT]:8},e1={[se.RGBA]:4,[se.RGB]:3,[se.RG]:2,[se.RED]:1,[se.LUMINANCE]:1,[se.LUMINANCE_ALPHA]:2,[se.ALPHA]:1},t1={[xe.UNSIGNED_SHORT_4_4_4_4]:2,[xe.UNSIGNED_SHORT_5_5_5_1]:2,[xe.UNSIGNED_SHORT_5_6_5]:2};function i1(r,e,t=!1){const i=new DataView(e);if(!r1(r,i))return null;const s=i.getUint32(bi.ENDIANNESS,!0)===Qx,n=i.getUint32(bi.GL_TYPE,s),a=i.getUint32(bi.GL_FORMAT,s),o=i.getUint32(bi.GL_INTERNAL_FORMAT,s),l=i.getUint32(bi.PIXEL_WIDTH,s),c=i.getUint32(bi.PIXEL_HEIGHT,s)||1,d=i.getUint32(bi.PIXEL_DEPTH,s)||1,h=i.getUint32(bi.NUMBER_OF_ARRAY_ELEMENTS,s)||1,u=i.getUint32(bi.NUMBER_OF_FACES,s),p=i.getUint32(bi.NUMBER_OF_MIPMAP_LEVELS,s),f=i.getUint32(bi.BYTES_OF_KEY_VALUE_DATA,s);if(c===0||d!==1)throw new Error("Only 2D textures are supported");if(u!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const m=4,g=4,y=l+3&-4,w=c+3&-4,b=new Array(h);let v=l*c;n===0&&(v=y*w);let E;if(n!==0?ap[n]?E=ap[n]*e1[a]:E=t1[n]:E=Wo[o],E===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const C=t?n1(i,f,s):null;let I=v*E,L=l,k=c,N=y,G=w,A=Tc+f;for(let S=0;S1||n!==0?L:N,levelHeight:p>1||n!==0?k:G,levelBuffer:new Uint8Array(e,D,I)},D+=I}A+=x+4,A=A%4!==0?A+4-A%4:A,L=L>>1||1,k=k>>1||1,N=L+m-1&~(m-1),G=k+g-1&~(g-1),I=N*G*E}return n!==0?{uncompressed:b.map(S=>{let x=S[0].levelBuffer,D=!1;return n===xe.FLOAT?x=new Float32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4):n===xe.UNSIGNED_INT?(D=!0,x=new Uint32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)):n===xe.INT&&(D=!0,x=new Int32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)),{resource:new sl(x,{width:S[0].levelWidth,height:S[0].levelHeight}),type:n,format:D?s1(a):a}}),kvData:C}:{compressed:b.map(S=>new vs(null,{format:o,width:l,height:c,levels:p,levelBuffers:S})),kvData:C}}function r1(r,e){for(let t=0;te-s){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let l=0;for(;l{const a=new Pe(n,{mipmap:Ji.OFF,alphaMode:zt.NO_PREMULTIPLIED_ALPHA,resolution:pr(r),...e.data});return _a(a,t,r)});return s.length===1?s[0]:s},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(a1);const o1={extension:{type:oe.LoadParser,priority:Bi.High},name:"loadKTX",test(r){return jr(r,".ktx")},async load(r,e,t){const i=await(await ue.ADAPTER.fetch(r)).arrayBuffer(),{compressed:s,uncompressed:n,kvData:a}=i1(r,i),o=s??n,l={mipmap:Ji.OFF,alphaMode:zt.NO_PREMULTIPLIED_ALPHA,resolution:pr(r),...e.data},c=o.map(d=>{o===n&&Object.assign(l,{type:d.type,format:d.format});const h=d.resource??d,u=new Pe(h,l);return u.ktxKeyValueData=a,_a(u,t,r)});return c.length===1?c[0]:c},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(o1);const l1=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],h1={extension:oe.ResolveParser,test:r=>{const e=At.extname(r).slice(1);return["basis","ktx","dds"].includes(e)},parse:r=>{const e=r.split("."),t=e.pop();if(["ktx","dds"].includes(t)){const i=e.pop();if(l1.includes(i))return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:i,src:r}}return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:t,src:r}}};ge.add(h1);const Ya=new ke,c1=4,Zm=class Vn{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,t,i,s){const n=new Image;return n.src=await this.base64(e,t,i,s),n}async base64(e,t,i,s){const n=this.canvas(e,s);if(n.toBlob!==void 0)return new Promise((a,o)=>{n.toBlob(l=>{if(!l){o(new Error("ICanvas.toBlob failed!"));return}const c=new FileReader;c.onload=()=>a(c.result),c.onerror=o,c.readAsDataURL(l)},t,i)});if(n.toDataURL!==void 0)return n.toDataURL(t,i);if(n.convertToBlob!==void 0){const a=await n.convertToBlob({type:t,quality:i});return new Promise((o,l)=>{const c=new FileReader;c.onload=()=>o(c.result),c.onerror=l,c.readAsDataURL(a)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);a&&Vn._flipY(i,s,n),o&&Vn._unpremultiplyAlpha(i);const l=new Wb(s,n,1),c=new ImageData(new Uint8ClampedArray(i.buffer),s,n);return l.context.putImageData(c,0,0),l.canvas}pixels(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);return a&&Vn._flipY(i,s,n),o&&Vn._unpremultiplyAlpha(i),i}_rawPixels(e,t){const i=this.renderer;if(!i)throw new Error("The Extract has already been destroyed");let s,n=!1,a=!1,o,l=!1;e&&(e instanceof Ft?o=e:(o=i.generateTexture(e,{region:t,resolution:i.resolution,multisample:i.multisample}),l=!0,t&&(Ya.width=t.width,Ya.height=t.height,t=Ya)));const c=i.gl;if(o){if(s=o.baseTexture.resolution,t=t??o.frame,n=!1,a=o.baseTexture.alphaMode>0&&o.baseTexture.format===se.RGBA,!l){i.renderTexture.bind(o);const p=o.framebuffer.glFramebuffers[i.CONTEXT_UID];p.blitFramebuffer&&i.framebuffer.bind(p.blitFramebuffer)}}else s=i.resolution,t||(t=Ya,t.width=i.width/s,t.height=i.height/s),n=!0,a=this._rendererPremultipliedAlpha,i.renderTexture.bind();const d=Math.max(Math.round(t.width*s),1),h=Math.max(Math.round(t.height*s),1),u=new Uint8Array(c1*d*h);return c.readPixels(Math.round(t.x*s),Math.round(t.y*s),d,h,c.RGBA,c.UNSIGNED_BYTE,u),l&&o?.destroy(!0),{pixels:u,width:d,height:h,flipY:n,premultipliedAlpha:a}}destroy(){this.renderer=null}static _flipY(e,t,i){const s=t<<2,n=i>>1,a=new Uint8Array(s);for(let o=0;o=0&&o>=0&&s>=0&&n>=0)){e.length=0;return}const l=Math.ceil(2.3*Math.sqrt(a+o)),c=l*8+(s?4:0)+(n?4:0);if(e.length=c,c===0)return;if(l===0){e.length=8,e[0]=e[6]=t+s,e[1]=e[3]=i+n,e[2]=e[4]=t-s,e[5]=e[7]=i-n;return}let d=0,h=l*4+(s?2:0)+2,u=h,p=c;{const f=s+a,m=n,g=t+f,y=t-f,w=i+m;if(e[d++]=g,e[d++]=w,e[--h]=w,e[--h]=y,n){const b=i-m;e[u++]=y,e[u++]=b,e[--p]=b,e[--p]=g}}for(let f=1;f0||e&&i<=0){const s=t/2;for(let n=s+s%2;n=6){op(t,!1);const a=[];for(let c=0;c=0&&n>=0&&a.push(t,i,t+s,i,t+s,i+n,t,i+n)},triangulate(r,e){const t=r.points,i=e.points;if(t.length===0)return;const s=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},p1={build(r){zo.build(r)},triangulate(r,e){zo.triangulate(r,e)}};var oi=(r=>(r.MITER="miter",r.BEVEL="bevel",r.ROUND="round",r))(oi||{}),Nr=(r=>(r.BUTT="butt",r.ROUND="round",r.SQUARE="square",r))(Nr||{});const dn={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,e=20){if(!this.adaptive||!r||isNaN(r))return e;let t=Math.ceil(r/this.maxLength);return tthis.maxSegments&&(t=this.maxSegments),t}};class lp{static curveTo(e,t,i,s,n,a){const o=a[a.length-2],l=a[a.length-1]-t,c=o-e,d=s-t,h=i-e,u=Math.abs(l*h-c*d);if(u<1e-8||n===0)return(a[a.length-2]!==e||a[a.length-1]!==t)&&a.push(e,t),null;const p=l*l+c*c,f=d*d+h*h,m=l*d+c*h,g=n*Math.sqrt(p)/u,y=n*Math.sqrt(f)/u,w=g*m/p,b=y*m/f,v=g*h+y*c,E=g*d+y*l,C=c*(y+w),I=l*(y+w),L=h*(g+b),k=d*(g+b),N=Math.atan2(I-E,C-v),G=Math.atan2(k-E,L-v);return{cx:v+e,cy:E+t,radius:n,startAngle:N,endAngle:G,anticlockwise:c*d>h*l}}static arc(e,t,i,s,n,a,o,l,c){const d=o-a,h=dn._segmentsCount(Math.abs(d)*n,Math.ceil(Math.abs(d)/Do)*40),u=d/(h*2),p=u*2,f=Math.cos(u),m=Math.sin(u),g=h-1,y=g%1/g;for(let w=0;w<=g;++w){const b=w+y*w,v=u+a+p*b,E=Math.cos(v),C=-Math.sin(v);c.push((f*E+m*C)*n+i,(f*-C+m*E)*n+s)}}}class f1{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class ad{static curveLength(e,t,i,s,n,a,o,l){let c=0,d=0,h=0,u=0,p=0,f=0,m=0,g=0,y=0,w=0,b=0,v=e,E=t;for(let C=1;C<=10;++C)d=C/10,h=d*d,u=h*d,p=1-d,f=p*p,m=f*p,g=m*e+3*f*d*i+3*p*h*n+u*o,y=m*t+3*f*d*s+3*p*h*a+u*l,w=v-g,b=E-y,v=g,E=y,c+=Math.sqrt(w*w+b*b);return c}static curveTo(e,t,i,s,n,a,o){const l=o[o.length-2],c=o[o.length-1];o.length-=2;const d=dn._segmentsCount(ad.curveLength(l,c,e,t,i,s,n,a));let h=0,u=0,p=0,f=0,m=0;o.push(l,c);for(let g=1,y=0;g<=d;++g)y=g/d,h=1-y,u=h*h,p=u*h,f=y*y,m=f*y,o.push(p*l+3*u*y*e+3*h*f*i+m*n,p*c+3*u*y*t+3*h*f*s+m*a)}}function hp(r,e,t,i,s,n,a,o){const l=r-t*s,c=e-i*s,d=r+t*n,h=e+i*n;let u,p;a?(u=i,p=-t):(u=-i,p=t);const f=l+u,m=c+p,g=d+u,y=h+p;return o.push(f,m,g,y),2}function Zr(r,e,t,i,s,n,a,o){const l=t-r,c=i-e;let d=Math.atan2(l,c),h=Math.atan2(s-r,n-e);o&&dh&&(h+=Math.PI*2);let u=d;const p=h-d,f=Math.abs(p),m=Math.sqrt(l*l+c*c),g=(15*f*Math.sqrt(m)/Math.PI>>0)+1,y=p/g;if(u+=y,o){a.push(r,e,t,i);for(let w=1,b=u;w=0&&(n.join===oi.ROUND?u+=Zr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,d,!1)+4:u+=2,d.push(b-k*x,v-N*x,b+k*S,v+N*S));continue}const Z=(-I+y)*(-L+v)-(-I+b)*(-L+w),ye=(-k+E)*(-N+v)-(-k+b)*(-N+C),Ce=(O*ye-V*Z)/te,ce=(F*Z-W*ye)/te,fe=(Ce-b)*(Ce-b)+(ce-v)*(ce-v),we=b+(Ce-b)*S,le=v+(ce-v)*S,pe=b-(Ce-b)*x,be=v-(ce-v)*x,T=Math.min(O*O+W*W,V*V+F*F),X=Q?S:x,j=T+X*X*m,P=fe<=j;let M=n.join;if(M===oi.MITER&&fe/m>g&&(M=oi.BEVEL),P)switch(M){case oi.MITER:{d.push(we,le,pe,be);break}case oi.BEVEL:{Q?d.push(we,le,b+I*x,v+L*x,we,le,b+k*x,v+N*x):d.push(b-I*S,v-L*S,pe,be,b-k*S,v-N*S,pe,be),u+=2;break}case oi.ROUND:{Q?(d.push(we,le,b+I*x,v+L*x),u+=Zr(b,v,b+I*x,v+L*x,b+k*x,v+N*x,d,!0)+4,d.push(we,le,b+k*x,v+N*x)):(d.push(b-I*S,v-L*S,pe,be),u+=Zr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,d,!1)+4,d.push(b-k*S,v-N*S,pe,be));break}}else{switch(d.push(b-I*S,v-L*S,b+I*x,v+L*x),M){case oi.MITER:{Q?d.push(pe,be,pe,be):d.push(we,le,we,le),u+=2;break}case oi.ROUND:{Q?u+=Zr(b,v,b+I*x,v+L*x,b+k*x,v+N*x,d,!0)+2:u+=Zr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,d,!1)+2;break}}d.push(b-k*S,v-N*S,b+k*x,v+N*x),u+=2}}y=i[(h-2)*2],w=i[(h-2)*2+1],b=i[(h-1)*2],v=i[(h-1)*2+1],I=-(w-v),L=y-b,G=Math.sqrt(I*I+L*L),I/=G,L/=G,I*=f,L*=f,d.push(b-I*S,v-L*S,b+I*x,v+L*x),l||(n.cap===Nr.ROUND?u+=Zr(b-I*(S-x)*.5,v-L*(S-x)*.5,b-I*S,v-L*S,b+I*x,v+L*x,d,!1)+2:n.cap===Nr.SQUARE&&(u+=hp(b,v,I,L,S,x,!1,d)));const D=e.indices,$=dn.epsilon*dn.epsilon;for(let R=p;R0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,i=null,s=null){const n=new jo(e,t,i,s);return this.graphicsData.push(n),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const i=new jo(e,null,null,t),s=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=s.lineStyle,s.holes.push(i),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(i=this.batches[this.batches.length-1],s=i.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(s=qa.pop(),s||(s=new ec,s.texArray=new sc),this.drawCalls.push(s)),s.start=d,s.size=0,s.texArray.count=0,s.type=c),m.touched=1,m._batchEnabled=e,m._batchLocation=n,m.wrapMode=Ur.REPEAT,s.texArray.elements[s.texArray.count++]=m,n++)),s.size+=u.size,d+=u.size,o=m._batchLocation,this.addColors(t,f.color,f.alpha,u.attribSize,u.attribStart),this.addTextureIds(i,o,u.attribSize,u.attribStart)}Pe._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,i=this.colors,s=this.textureIds,n=new ArrayBuffer(e.length*3*4),a=new Float32Array(n),o=new Uint32Array(n);let l=0;for(let c=0;c0&&e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:i},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new ys,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new ys,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const i=this.currentPath.points,s=i[i.length-2],n=i[i.length-1];return(s!==e||n!==t)&&i.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,i,s){this._initCurve();const n=this.currentPath.points;return n.length===0&&this.moveTo(0,0),od.curveTo(e,t,i,s,n),this}bezierCurveTo(e,t,i,s,n,a){return this._initCurve(),ad.curveTo(e,t,i,s,n,a,this.currentPath.points),this}arcTo(e,t,i,s,n){this._initCurve(e,t);const a=this.currentPath.points,o=lp.curveTo(e,t,i,s,n,a);if(o){const{cx:l,cy:c,radius:d,startAngle:h,endAngle:u,anticlockwise:p}=o;this.arc(l,c,d,h,u,p)}return this}arc(e,t,i,s,n,a=!1){if(s===n)return this;if(!a&&n<=s?n+=Do:a&&s<=n&&(s+=Do),n-s===0)return this;const o=e+Math.cos(s)*i,l=t+Math.sin(s)*i,c=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const h=Math.abs(d[d.length-2]-o),u=Math.abs(d[d.length-1]-l);h0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:i},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,i,s){return this.drawShape(new ke(e,t,i,s))}drawRoundedRect(e,t,i,s,n){return this.drawShape(new ol(e,t,i,s,n))}drawCircle(e,t,i){return this.drawShape(new nl(e,t,i))}drawEllipse(e,t,i,s){return this.drawShape(new al(e,t,i,s))}drawPolygon(...e){let t,i=!0;const s=e[0];s.points?(i=s.closeStroke,t=s.points):Array.isArray(e[0])?t=e[0]:t=e;const n=new ys(t);return n.closeStroke=i,this.drawShape(n),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===It.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,i=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(e.points);for(let s=0;se?1:this._width/e,i=this._topHeight+this._bottomHeight,s=this._height>i?1:this._height/i;return Math.min(t,s)}get width(){return this._width}set width(e){this._width=e,this._refresh()}get height(){return this._height}set height(e){this._height=e,this._refresh()}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this._refresh()}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this._refresh()}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this._refresh()}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this._refresh()}_refresh(){const e=this.texture,t=this.geometry.buffers[1].data;this._origWidth=e.orig.width,this._origHeight=e.orig.height;const i=1/this._origWidth,s=1/this._origHeight;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1,t[2]=t[10]=t[18]=t[26]=i*this._leftWidth,t[4]=t[12]=t[20]=t[28]=1-i*this._rightWidth,t[9]=t[11]=t[13]=t[15]=s*this._topHeight,t[17]=t[19]=t[21]=t[23]=1-s*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}class hd extends Ee{constructor(e=1500,t,i=16384,s=!1){super();const n=16384;i>n&&(i=n),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=i,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=Me.NORMAL,this.autoResize=s,this.roundPixels=!0,this.baseTexture=null,this.setProperties(t),this._tintColor=new B(0),this.tintRgb=new Float32Array(3),this.tint=16777215}setProperties(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])}updateTransform(){this.displayObjectUpdateTransform()}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintColor.toRgbArray(this.tintRgb)}render(e){!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",()=>this.onChildrenChange(0))),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))}onChildrenChange(e){const t=Math.floor(e/this._batchSize);for(;this._bufferUpdateIDs.lengthe?1:this._width/e,i=this._topHeight+this._bottomHeight,s=this._height>i?1:this._height/i;return Math.min(t,s)}get width(){return this._width}set width(e){this._width=e,this._refresh()}get height(){return this._height}set height(e){this._height=e,this._refresh()}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this._refresh()}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this._refresh()}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this._refresh()}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this._refresh()}_refresh(){const e=this.texture,t=this.geometry.buffers[1].data;this._origWidth=e.orig.width,this._origHeight=e.orig.height;const i=1/this._origWidth,s=1/this._origHeight;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1,t[2]=t[10]=t[18]=t[26]=i*this._leftWidth,t[4]=t[12]=t[20]=t[28]=1-i*this._rightWidth,t[9]=t[11]=t[13]=t[15]=s*this._topHeight,t[17]=t[19]=t[21]=t[23]=1-s*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}class hd extends Ee{constructor(e=1500,t,i=16384,s=!1){super();const n=16384;i>n&&(i=n),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=i,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=Me.NORMAL,this.autoResize=s,this.roundPixels=!0,this.baseTexture=null,this.setProperties(t),this._tintColor=new B(0),this.tintRgb=new Float32Array(3),this.tint=16777215}setProperties(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])}updateTransform(){this.displayObjectUpdateTransform()}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintColor.toRgbArray(this.tintRgb)}render(e){!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",()=>this.onChildrenChange(0))),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))}onChildrenChange(e){const t=Math.floor(e/this._batchSize);for(;this._bufferUpdateIDs.lengthi&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const l=t[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=tm(e.blendMode,c),n.state.set(this.state);const d=n.gl,h=e.worldTransform.copyTo(this.tempMatrix);h.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=B.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);let u=!1;for(let p=0,f=0;ps&&(m=s),f>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[f];g.uploadDynamic(t,p,m);const y=e._bufferUpdateIDs[f]||0;u=u||g._updateID0);s[a]=c,s[a+n]=c,s[a+n*2]=c,s[a+n*3]=c,a+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}ng.extension={name:"particle",type:oe.RendererPlugin};ge.add(ng);var dl=(r=>(r[r.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",r[r.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",r))(dl||{});const Za={willReadFrequently:!0},Fi=class ve{static get experimentalLetterSpacingSupported(){let e=ve._experimentalLetterSpacingSupported;if(e!==void 0){const t=ue.ADAPTER.getCanvasRenderingContext2D().prototype;e=ve._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,s,n,a,o,l,c){this.text=e,this.style=t,this.width=i,this.height=s,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,i,s=ve._canvas){i=i??t.wordWrap;const n=t.toFontString(),a=ve.measureFont(n);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=s.getContext("2d",Za);o.font=n;const l=(i?ve.wordWrap(e,t,s):e).split(/(?:\r\n|\r|\n)/),c=new Array(l.length);let d=0;for(let f=0;f0&&(s?n-=t:n+=(ve.graphemeSegmenter(e).length-1)*t),n}static wordWrap(e,t,i=ve._canvas){const s=i.getContext("2d",Za);let n=0,a="",o="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,h=ve.collapseSpaces(d),u=ve.collapseNewlines(d);let p=!h;const f=t.wordWrapWidth+c,m=ve.tokenize(e);for(let g=0;gf)if(a!==""&&(o+=ve.addLine(a),a="",n=0),ve.canBreakWords(y,t.breakWords)){const b=ve.wordWrapSplit(y);for(let v=0;vf&&(o+=ve.addLine(a),p=!1,a="",n=0),a+=E,n+=L}}else{a.length>0&&(o+=ve.addLine(a),a="",n=0);const b=g===m.length-1;o+=ve.addLine(y,!b),p=!1,a="",n=0}else w+n>f&&(p=!1,o+=ve.addLine(a),a="",n=0),(a.length>0||!ve.isBreakingSpace(y)||p)&&(a+=y,n+=w)}return o+=ve.addLine(a,!1),o}static addLine(e,t=!0){return e=ve.trimRight(e),e=t?`${e} +`;class ng extends ll{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new tt,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:xe.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Yi.from(E1,T1,{}),this.state=er.for2d()}render(e){const t=e.children,i=e._maxSize,s=e._batchSize,n=this.renderer;let a=t.length;if(a===0)return;a>i&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const l=t[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=tm(e.blendMode,c),n.state.set(this.state);const d=n.gl,h=e.worldTransform.copyTo(this.tempMatrix);h.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=B.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);let u=!1;for(let p=0,f=0;ps&&(m=s),f>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[f];g.uploadDynamic(t,p,m);const y=e._bufferUpdateIDs[f]||0;u=u||g._updateID0);s[a]=c,s[a+n]=c,s[a+n*2]=c,s[a+n*3]=c,a+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}ng.extension={name:"particle",type:oe.RendererPlugin};ge.add(ng);var dl=(r=>(r[r.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",r[r.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",r))(dl||{});const Za={willReadFrequently:!0},Fi=class ve{static get experimentalLetterSpacingSupported(){let e=ve._experimentalLetterSpacingSupported;if(e!==void 0){const t=ue.ADAPTER.getCanvasRenderingContext2D().prototype;e=ve._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,s,n,a,o,l,c){this.text=e,this.style=t,this.width=i,this.height=s,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,i,s=ve._canvas){i=i??t.wordWrap;const n=t.toFontString(),a=ve.measureFont(n);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=s.getContext("2d",Za);o.font=n;const l=(i?ve.wordWrap(e,t,s):e).split(/(?:\r\n|\r|\n)/),c=new Array(l.length);let d=0;for(let f=0;f0&&(s?n-=t:n+=(ve.graphemeSegmenter(e).length-1)*t),n}static wordWrap(e,t,i=ve._canvas){const s=i.getContext("2d",Za);let n=0,a="",o="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,h=ve.collapseSpaces(d),u=ve.collapseNewlines(d);let p=!h;const f=t.wordWrapWidth+c,m=ve.tokenize(e);for(let g=0;gf)if(a!==""&&(o+=ve.addLine(a),a="",n=0),ve.canBreakWords(y,t.breakWords)){const b=ve.wordWrapSplit(y);for(let v=0;vf&&(o+=ve.addLine(a),p=!1,a="",n=0),a+=E,n+=L}}else{a.length>0&&(o+=ve.addLine(a),a="",n=0);const b=g===m.length-1;o+=ve.addLine(y,!b),p=!1,a="",n=0}else w+n>f&&(p=!1,o+=ve.addLine(a),a="",n=0),(a.length>0||!ve.isBreakingSpace(y)||p)&&(a+=y,n+=w)}return o+=ve.addLine(a,!1),o}static addLine(e,t=!0){return e=ve.trimRight(e),e=t?`${e} `:e,e}static getFromCache(e,t,i,s){let n=i[e];return typeof n!="number"&&(n=ve._measureText(e,t,s)+t,i[e]=n),n}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!ve.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:ve._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:ve._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let s=0;so;--u){for(let m=0;m{if(typeof Intl?.Segmenter=="function"){const r=new Intl.Segmenter;return e=>[...r.segment(e)].map(t=>t.segment)}return r=>[...r]})(),Fi.experimentalLetterSpacing=!1,Fi._fonts={},Fi._newlines=[10,13],Fi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let kr=Fi;const A1=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ag=class Wn{constructor(e){this.styleID=0,this.reset(),dh(this,e,e)}clone(){const e={};return dh(e,this,Wn.defaultStyle),new Wn(e)}reset(){dh(this,Wn.defaultStyle,Wn.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=ch(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=ch(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){S1(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=ch(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let i=t.length-1;i>=0;i--){let s=t[i].trim();!/([\"\'])[^\'\"]+\1/.test(s)&&!A1.includes(s)&&(s=`"${s}"`),t[i]=s}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};ag.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:dl.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let Vr=ag;function ch(r){const e=B.shared,t=i=>{const s=e.setValue(i);return s.alpha===1?s.toHex():s.toRgbaString()};return Array.isArray(r)?r.map(t):t(r)}function S1(r,e){if(!Array.isArray(r)||!Array.isArray(e)||r.length!==e.length)return!1;for(let t=0;t0&&f>m&&(g=(m+f)/2);const y=m+u,w=i.lineHeight*(p+1);let b=y;p+10}}function k1(r,e){let t=!1;if(r?._textures?.length){for(let i=0;i{this.queue&&this.prepareItems()},this.registerFindHook(L1),this.registerFindHook(D1),this.registerFindHook(k1),this.registerFindHook(I1),this.registerFindHook(P1),this.registerUploadHook(B1),this.registerUploadHook(R1)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Et.system.addOnce(this.tick,this,Gr.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let i=0,s=this.uploadHooks.length;i=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&Et.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};hg.uploadsPerFrame=4;let Mc=hg;Object.defineProperties(ue,{UPLOADS_PER_FRAME:{get(){return Mc.uploadsPerFrame},set(r){He("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),Mc.uploadsPerFrame=r}}});function dg(r,e){return e instanceof Pe?(e._glTextures[r.CONTEXT_UID]||r.texture.bind(e),!0):!1}function O1(r,e){if(!(e instanceof An))return!1;const{geometry:t}=e;e.finishPoly(),t.updateBatches();const{batches:i}=t;for(let s=0;s1?Xi.from(U1,N1,t):Xi.from(fp,H1,t)}render(e){const t=this.renderer,i=this.quad;let s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);const n=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-n,s[1]=s[3]=-a,s[2]=s[4]=1-n,s[5]=s[7]=1-a,i.invalidate();const o=e._texture,l=o.baseTexture,c=l.alphaMode>0,d=e.tileTransform.localTransform,h=e.uvMatrix;let u=l.isPowerOfTwo&&o.frame.width===l.width&&o.frame.height===l.height;u&&(l._glTextures[t.CONTEXT_UID]?u=l.wrapMode!==Ur.CLAMP:l.wrapMode===Ur.CLAMP&&(l.wrapMode=Ur.REPEAT));const p=u?this.simpleShader:this.shader,f=o.width,m=o.height,g=e._width,y=e._height;Ja.set(d.a*f/g,d.b*f/y,d.c*m/g,d.d*m/y,d.tx/g,d.ty/y),Ja.invert(),u?Ja.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=Ja.toArray(!0),p.uniforms.uColor=B.shared.setValue(e.tint).premultiply(e.worldAlpha,c).toArray(p.uniforms.uColor),p.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),p.uniforms.uSampler=o,t.shader.bind(p),t.geometry.bind(i),this.state.blendMode=tm(e.blendMode,c),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}pg.extension={name:"tilingSprite",type:oe.RendererPlugin};ge.add(pg);const fg=class zn{constructor(e,t,i){this.linkedSheets=[],(e instanceof Pe||e instanceof ie)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:s,data:n,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=s instanceof ie?s:null,this.baseTexture=s instanceof Pe?s:this._texture.baseTexture,this.textures={},this.animations={},this.data=n;const l=this.baseTexture.resource;this.resolution=this._updateResolution(a||(l?l.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=pr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=zn.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=zn.BATCH_SIZE;for(;t-e{this._batchIndex*zn.BATCH_SIZE{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=At.dirname(r[0]);e.linkedSheets.forEach((n,a)=>{Object.assign(i,mg([`${s}/${e.data.meta.related_multi_packs[a]}`],n,!0))})}return i}const W1={extension:oe.Asset,cache:{test:r=>r instanceof mp,getCacheableAssets:(r,e)=>mg(r,e,!1)},resolver:{test:r=>{const e=r.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&V1.includes(i)},parse:r=>{const e=r.split(".");return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:e[e.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:oe.LoadParser,priority:Bi.Normal},async testParse(r,e){return At.extname(e.src).toLowerCase()===".json"&&!!r.frames},async parse(r,e,t){const{texture:i,imageFilename:s,cachePrefix:n}=e?.data??{};let a=At.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let o;if(i&&i.baseTexture)o=i;else{const d=_c(a+(s??r.meta.image),e.src);o=(await t.load([d]))[d]}const l=new mp({texture:o.baseTexture,data:r,resolutionFilename:e.src,cachePrefix:n});await l.parse();const c=r?.meta?.related_multi_packs;if(Array.isArray(c)){const d=[];for(const u of c){if(typeof u!="string")continue;let p=a+u;e.data?.ignoreMultiPack||(p=_c(p,e.src),d.push(t.load({src:p,data:{ignoreMultiPack:!0}})))}const h=await Promise.all(d);l.linkedSheets=h,h.forEach(u=>{u.linkedSheets=[l].concat(l.linkedSheets.filter(p=>p!==u))})}return l},unload(r){r.destroy(!0)}}};ge.add(W1);class $o{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class To{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const n in t){const a=t[n].match(/^[a-z]+/gm)[0],o=t[n].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),l={};for(const c in o){const d=o[c].split("="),h=d[0],u=d[1].replace(/"/gm,""),p=parseFloat(u),f=isNaN(p)?u:p;l[h]=f}i[a].push(l)}const s=new $o;return i.info.forEach(n=>s.info.push({face:n.face,size:parseInt(n.size,10)})),i.common.forEach(n=>s.common.push({lineHeight:parseInt(n.lineHeight,10)})),i.page.forEach(n=>s.page.push({id:parseInt(n.id,10),file:n.file})),i.char.forEach(n=>s.char.push({id:parseInt(n.id,10),page:parseInt(n.page,10),x:parseInt(n.x,10),y:parseInt(n.y,10),width:parseInt(n.width,10),height:parseInt(n.height,10),xoffset:parseInt(n.xoffset,10),yoffset:parseInt(n.yoffset,10),xadvance:parseInt(n.xadvance,10)})),i.kerning.forEach(n=>s.kerning.push({first:parseInt(n.first,10),second:parseInt(n.second,10),amount:parseInt(n.amount,10)})),i.distanceField.forEach(n=>s.distanceField.push({distanceRange:parseInt(n.distanceRange,10),fieldType:n.fieldType})),s}}class kc{static test(e){const t=e;return typeof e!="string"&&"getElementsByTagName"in e&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const t=new $o,i=e.getElementsByTagName("info"),s=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),l=e.getElementsByTagName("distanceField");for(let c=0;c")?kc.test(ue.ADAPTER.parseXML(e)):!1}static parse(e){return kc.parse(ue.ADAPTER.parseXML(e))}}const uh=[To,kc,Ic];function z1(r){for(let e=0;e=l-N*a){if(m===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--C,g=null,y=null,w=null,m=0,f=0,b=0;continue}if(b=Math.max(N+L.fontProperties.descent,b),G*a+f>=u){if(f===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--C,m+=b*a,m=Math.ceil(m),f=0,b=0;continue}$1(g,y,L,f,m,a,h);const A=Eo(L.text);p.char.push({id:A,page:v.length-1,x:f/a,y:m/a,width:G,height:N,xoffset:0,yoffset:0,xadvance:k-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0)}),f+=(G+2*n)*a,f=Math.ceil(f)}if(!i?.skipKerning)for(let C=0,I=d.length;C1?Yi.from(U1,N1,t):Yi.from(fp,H1,t)}render(e){const t=this.renderer,i=this.quad;let s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);const n=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-n,s[1]=s[3]=-a,s[2]=s[4]=1-n,s[5]=s[7]=1-a,i.invalidate();const o=e._texture,l=o.baseTexture,c=l.alphaMode>0,d=e.tileTransform.localTransform,h=e.uvMatrix;let u=l.isPowerOfTwo&&o.frame.width===l.width&&o.frame.height===l.height;u&&(l._glTextures[t.CONTEXT_UID]?u=l.wrapMode!==Ur.CLAMP:l.wrapMode===Ur.CLAMP&&(l.wrapMode=Ur.REPEAT));const p=u?this.simpleShader:this.shader,f=o.width,m=o.height,g=e._width,y=e._height;Ja.set(d.a*f/g,d.b*f/y,d.c*m/g,d.d*m/y,d.tx/g,d.ty/y),Ja.invert(),u?Ja.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=Ja.toArray(!0),p.uniforms.uColor=B.shared.setValue(e.tint).premultiply(e.worldAlpha,c).toArray(p.uniforms.uColor),p.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),p.uniforms.uSampler=o,t.shader.bind(p),t.geometry.bind(i),this.state.blendMode=tm(e.blendMode,c),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}pg.extension={name:"tilingSprite",type:oe.RendererPlugin};ge.add(pg);const fg=class zn{constructor(e,t,i){this.linkedSheets=[],(e instanceof Pe||e instanceof ie)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:s,data:n,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=s instanceof ie?s:null,this.baseTexture=s instanceof Pe?s:this._texture.baseTexture,this.textures={},this.animations={},this.data=n;const l=this.baseTexture.resource;this.resolution=this._updateResolution(a||(l?l.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=pr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=zn.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=zn.BATCH_SIZE;for(;t-e{this._batchIndex*zn.BATCH_SIZE{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=At.dirname(r[0]);e.linkedSheets.forEach((n,a)=>{Object.assign(i,mg([`${s}/${e.data.meta.related_multi_packs[a]}`],n,!0))})}return i}const W1={extension:oe.Asset,cache:{test:r=>r instanceof mp,getCacheableAssets:(r,e)=>mg(r,e,!1)},resolver:{test:r=>{const e=r.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&V1.includes(i)},parse:r=>{const e=r.split(".");return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:e[e.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:oe.LoadParser,priority:Bi.Normal},async testParse(r,e){return At.extname(e.src).toLowerCase()===".json"&&!!r.frames},async parse(r,e,t){const{texture:i,imageFilename:s,cachePrefix:n}=e?.data??{};let a=At.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let o;if(i&&i.baseTexture)o=i;else{const d=_c(a+(s??r.meta.image),e.src);o=(await t.load([d]))[d]}const l=new mp({texture:o.baseTexture,data:r,resolutionFilename:e.src,cachePrefix:n});await l.parse();const c=r?.meta?.related_multi_packs;if(Array.isArray(c)){const d=[];for(const u of c){if(typeof u!="string")continue;let p=a+u;e.data?.ignoreMultiPack||(p=_c(p,e.src),d.push(t.load({src:p,data:{ignoreMultiPack:!0}})))}const h=await Promise.all(d);l.linkedSheets=h,h.forEach(u=>{u.linkedSheets=[l].concat(l.linkedSheets.filter(p=>p!==u))})}return l},unload(r){r.destroy(!0)}}};ge.add(W1);class $o{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class To{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const n in t){const a=t[n].match(/^[a-z]+/gm)[0],o=t[n].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),l={};for(const c in o){const d=o[c].split("="),h=d[0],u=d[1].replace(/"/gm,""),p=parseFloat(u),f=isNaN(p)?u:p;l[h]=f}i[a].push(l)}const s=new $o;return i.info.forEach(n=>s.info.push({face:n.face,size:parseInt(n.size,10)})),i.common.forEach(n=>s.common.push({lineHeight:parseInt(n.lineHeight,10)})),i.page.forEach(n=>s.page.push({id:parseInt(n.id,10),file:n.file})),i.char.forEach(n=>s.char.push({id:parseInt(n.id,10),page:parseInt(n.page,10),x:parseInt(n.x,10),y:parseInt(n.y,10),width:parseInt(n.width,10),height:parseInt(n.height,10),xoffset:parseInt(n.xoffset,10),yoffset:parseInt(n.yoffset,10),xadvance:parseInt(n.xadvance,10)})),i.kerning.forEach(n=>s.kerning.push({first:parseInt(n.first,10),second:parseInt(n.second,10),amount:parseInt(n.amount,10)})),i.distanceField.forEach(n=>s.distanceField.push({distanceRange:parseInt(n.distanceRange,10),fieldType:n.fieldType})),s}}class kc{static test(e){const t=e;return typeof e!="string"&&"getElementsByTagName"in e&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const t=new $o,i=e.getElementsByTagName("info"),s=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),l=e.getElementsByTagName("distanceField");for(let c=0;c")?kc.test(ue.ADAPTER.parseXML(e)):!1}static parse(e){return kc.parse(ue.ADAPTER.parseXML(e))}}const uh=[To,kc,Ic];function z1(r){for(let e=0;e=l-N*a){if(m===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--C,g=null,y=null,w=null,m=0,f=0,b=0;continue}if(b=Math.max(N+L.fontProperties.descent,b),G*a+f>=u){if(f===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--C,m+=b*a,m=Math.ceil(m),f=0,b=0;continue}$1(g,y,L,f,m,a,h);const A=Eo(L.text);p.char.push({id:A,page:v.length-1,x:f/a,y:m/a,width:G,height:N,xoffset:0,yoffset:0,xadvance:k-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0)}),f+=(G+2*n)*a,f=Math.ceil(f)}if(!i?.skipKerning)for(let C=0,I=d.length;C{this.dirty=!0},this,0,0),this._roundPixels=ue.ROUND_PIXELS,this.dirty=!0,this._resolution=ue.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){const e=Cr.available[this._fontName],t=this.fontSize,i=t/e.size,s=new ze,n=[],a=[],o=[],l=this._text.replace(/(?:\r\n|\r)/g,` +`;const gp=[],yp=[],vp=[],yg=class vg extends Ee{constructor(e,t={}){super();const{align:i,tint:s,maxWidth:n,letterSpacing:a,fontName:o,fontSize:l}=Object.assign({},vg.styleDefaults,t);if(!Cr.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new B(s),this._font=void 0,this._fontName=o,this._fontSize=l,this.text=e,this._maxWidth=n,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new lr(()=>{this.dirty=!0},this,0,0),this._roundPixels=ue.ROUND_PIXELS,this.dirty=!0,this._resolution=ue.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){const e=Cr.available[this._fontName],t=this.fontSize,i=t/e.size,s=new We,n=[],a=[],o=[],l=this._text.replace(/(?:\r\n|\r)/g,` `)||" ",c=gg(l),d=this._maxWidth*e.size/t,h=e.distanceFieldType==="none"?gp:yp;let u=null,p=0,f=0,m=0,g=-1,y=0,w=0,b=0,v=0;for(let G=0;G0&&s.x>d&&(++w,rn(n,1+g-w,1+G-g),G=g,g=-1,a.push(y),o.push(n.length>0?n[n.length-1].prevSpaces:0),f=Math.max(f,y),m++,s.x=0,s.y+=e.lineHeight,u=null,v=0)}const E=c[c.length-1];E!=="\r"&&E!==` -`&&(/(?:\s)/.test(E)&&(p=y),a.push(p),f=Math.max(f,p),o.push(-1));const C=[];for(let G=0;G<=m;G++){let A=0;this._align==="right"?A=f-a[G]:this._align==="center"?A=(f-a[G])/2:this._align==="justify"&&(A=o[G]<0?0:(f-a[G])/o[G]),C.push(A)}const I=n.length,L={},k=[],N=this._activePagesMeshData;h.push(...N);for(let G=0;G6*S)||A.vertices.lengtht[s.mesh.texture.baseTexture.uid]).forEach(s=>{s.mesh.texture=ie.EMPTY});for(const s in t)t[s].destroy(),delete t[s];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};yg.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};let De=yg;const K1=[".xml",".fnt"],Z1={extension:{type:oe.LoadParser,priority:Bi.Normal},name:"loadBitmapFont",test(r){return K1.includes(At.extname(r).toLowerCase())},async testParse(r){return To.test(r)||Ic.test(r)},async parse(r,e,t){const i=To.test(r)?To.parse(r):Ic.parse(r),{src:s}=e,{page:n}=i,a=[];for(let c=0;co[c]);return Cr.install(i,l,!0)},async load(r,e){return(await ue.ADAPTER.fetch(r)).text()},unload(r){r.destroy()}};ge.add(Z1);const Pc=class Ws extends Vr{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Ws(Object.keys(Ws.defaultOptions).reduce((t,i)=>({...t,[i]:e[i]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete Ws.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:i}=Ws;if(i[e]){const s=i[e];return this._fonts.push(s),s.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return ue.ADAPTER.fetch(e).then(s=>s.blob()).then(async s=>new Promise((n,a)=>{const o=URL.createObjectURL(s),l=new FileReader;l.onload=()=>n([o,l.result]),l.onerror=a,l.readAsDataURL(s)})).then(async([s,n])=>{const a=Object.assign({family:At.basename(e,At.extname(e)),weight:"normal",style:"normal",display:"auto",src:s,dataSrc:n,refs:1,originalUrl:e,fontFace:null},t);i[e]=a,this._fonts.push(a),this.styleID++;const o=new FontFace(a.family,`url(${a.src})`,{weight:a.weight,style:a.style,display:a.display});a.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(i=>!this._overrides.includes(i));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(i=>this._overrides.includes(i));t.length>0&&(this._overrides=this._overrides.filter(i=>!t.includes(i)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} +`){a.push(p),o.push(-1),f=Math.max(f,p),++m,++w,s.x=0,s.y+=e.lineHeight,u=null,v=0;continue}const x=e.chars[S];if(!x)continue;u&&x.kerning[u]&&(s.x+=x.kerning[u]);const D=vp.pop()||{texture:ie.EMPTY,line:0,charCode:0,prevSpaces:0,position:new We};D.texture=x.texture,D.line=m,D.charCode=S,D.position.x=Math.round(s.x+x.xOffset+this._letterSpacing/2),D.position.y=Math.round(s.y+x.yOffset),D.prevSpaces=v,n.push(D),p=D.position.x+Math.max(x.xAdvance-x.xOffset,x.texture.orig.width),s.x+=x.xAdvance+this._letterSpacing,b=Math.max(b,x.yOffset+x.texture.height),u=S,g!==-1&&d>0&&s.x>d&&(++w,rn(n,1+g-w,1+G-g),G=g,g=-1,a.push(y),o.push(n.length>0?n[n.length-1].prevSpaces:0),f=Math.max(f,y),m++,s.x=0,s.y+=e.lineHeight,u=null,v=0)}const E=c[c.length-1];E!=="\r"&&E!==` +`&&(/(?:\s)/.test(E)&&(p=y),a.push(p),f=Math.max(f,p),o.push(-1));const C=[];for(let G=0;G<=m;G++){let A=0;this._align==="right"?A=f-a[G]:this._align==="center"?A=(f-a[G])/2:this._align==="justify"&&(A=o[G]<0?0:(f-a[G])/o[G]),C.push(A)}const I=n.length,L={},k=[],N=this._activePagesMeshData;h.push(...N);for(let G=0;G6*S)||A.vertices.lengtht[s.mesh.texture.baseTexture.uid]).forEach(s=>{s.mesh.texture=ie.EMPTY});for(const s in t)t[s].destroy(),delete t[s];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};yg.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};let De=yg;const K1=[".xml",".fnt"],Z1={extension:{type:oe.LoadParser,priority:Bi.Normal},name:"loadBitmapFont",test(r){return K1.includes(At.extname(r).toLowerCase())},async testParse(r){return To.test(r)||Ic.test(r)},async parse(r,e,t){const i=To.test(r)?To.parse(r):Ic.parse(r),{src:s}=e,{page:n}=i,a=[];for(let c=0;co[c]);return Cr.install(i,l,!0)},async load(r,e){return(await ue.ADAPTER.fetch(r)).text()},unload(r){r.destroy()}};ge.add(Z1);const Pc=class Ws extends Vr{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Ws(Object.keys(Ws.defaultOptions).reduce((t,i)=>({...t,[i]:e[i]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete Ws.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:i}=Ws;if(i[e]){const s=i[e];return this._fonts.push(s),s.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return ue.ADAPTER.fetch(e).then(s=>s.blob()).then(async s=>new Promise((n,a)=>{const o=URL.createObjectURL(s),l=new FileReader;l.onload=()=>n([o,l.result]),l.onerror=a,l.readAsDataURL(s)})).then(async([s,n])=>{const a=Object.assign({family:At.basename(e,At.extname(e)),weight:"normal",style:"normal",display:"auto",src:s,dataSrc:n,refs:1,originalUrl:e,fontFace:null},t);i[e]=a,this._fonts.push(a),this.styleID++;const o=new FontFace(a.family,`url(${a.src})`,{weight:a.weight,style:a.style,display:a.display});a.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(i=>!this._overrides.includes(i));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(i=>this._overrides.includes(i));t.length>0&&(this._overrides=this._overrides.filter(i=>!t.includes(i)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} @font-face { font-family: "${t.family}"; src: url('${t.dataSrc}'); font-weight: ${t.weight}; font-style: ${t.style}; font-display: ${t.display}; - }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=Ub(e)),typeof e=="number"?Nb(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const n=`${i}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${n} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${n} ${e}`}reset(){Object.assign(this,Ws.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=ue.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Pc.availableFonts={},Pc.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let ph=Pc;const Qa=class zs extends Oe{constructor(e="",t={}){super(ie.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,s=ie.from(i,{scaleMode:ue.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new ke,s.trim=new ke,this.texture=s;const n="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(n,"svg"),l=document.createElementNS(n,"foreignObject"),c=document.createElementNS(a,"div"),d=document.createElementNS(a,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",o.appendChild(l),this.maxWidth=zs.defaultMaxWidth,this.maxHeight=zs.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=o,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=i,this._loadImage=new Image,this._autoResolution=zs.defaultAutoResolution,this._resolution=zs.defaultResolution??ue.RESOLUTION,this.text=e,this.style=t}measureText(e){const{text:t,style:i,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(s)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const n=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=n;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const l=Math.min(this.maxWidth,Math.ceil(a)),c=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",l.toString()),this._svgRoot.setAttribute("height",c.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:this._style?.toCSS(s)}),this._styleElement.textContent=this._style?.toGlobalCSS()),{width:l+i.padding*2,height:c+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:n,height:a}=this.measureText();i.width=s.width=Math.ceil(Math.max(1,n)),i.height=s.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(l=>{s.onload=async()=>{if(o/gi,"

").replace(/
/gi,"
").replace(/ /gi," ")}};Qa.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},Qa.defaultMaxWidth=2024,Qa.defaultMaxHeight=2024,Qa.defaultAutoResolution=!0;var $t="top",fi="bottom",mi="right",Yt="left",cd="auto",xa=[$t,fi,mi,Yt],un="start",ha="end",J1="clippingParents",bg="viewport",Ln="popper",Q1="reference",bp=xa.reduce(function(r,e){return r.concat([e+"-"+un,e+"-"+ha])},[]),wg=[].concat(xa,[cd]).reduce(function(r,e){return r.concat([e,e+"-"+un,e+"-"+ha])},[]),eT="beforeRead",tT="read",iT="afterRead",rT="beforeMain",sT="main",nT="afterMain",aT="beforeWrite",oT="write",lT="afterWrite",hT=[eT,tT,iT,rT,sT,nT,aT,oT,lT];function Qi(r){return r?(r.nodeName||"").toLowerCase():null}function Jt(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function Es(r){var e=Jt(r).Element;return r instanceof e||r instanceof Element}function pi(r){var e=Jt(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function dd(r){if(typeof ShadowRoot>"u")return!1;var e=Jt(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function cT(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},n=e.elements[t];!pi(n)||!Qi(n)||(Object.assign(n.style,i),Object.keys(s).forEach(function(a){var o=s[a];o===!1?n.removeAttribute(a):n.setAttribute(a,o===!0?"":o)}))})}function dT(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],n=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(l,c){return l[c]="",l},{});!pi(s)||!Qi(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){s.removeAttribute(l)}))})}}const _g={name:"applyStyles",enabled:!0,phase:"write",fn:cT,effect:dT,requires:["computeStyles"]};function qi(r){return r.split("-")[0]}var bs=Math.max,Yo=Math.min,pn=Math.round;function Bc(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function xg(){return!/^((?!chrome|android).)*safari/i.test(Bc())}function fn(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=r.getBoundingClientRect(),s=1,n=1;e&&pi(r)&&(s=r.offsetWidth>0&&pn(i.width)/r.offsetWidth||1,n=r.offsetHeight>0&&pn(i.height)/r.offsetHeight||1);var a=Es(r)?Jt(r):window,o=a.visualViewport,l=!xg()&&t,c=(i.left+(l&&o?o.offsetLeft:0))/s,d=(i.top+(l&&o?o.offsetTop:0))/n,h=i.width/s,u=i.height/n;return{width:h,height:u,top:d,right:c+h,bottom:d+u,left:c,x:c,y:d}}function ud(r){var e=fn(r),t=r.offsetWidth,i=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:i}}function Tg(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&dd(t)){var i=e;do{if(i&&r.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function mr(r){return Jt(r).getComputedStyle(r)}function uT(r){return["table","td","th"].indexOf(Qi(r))>=0}function $r(r){return((Es(r)?r.ownerDocument:r.document)||window.document).documentElement}function ul(r){return Qi(r)==="html"?r:r.assignedSlot||r.parentNode||(dd(r)?r.host:null)||$r(r)}function wp(r){return!pi(r)||mr(r).position==="fixed"?null:r.offsetParent}function pT(r){var e=/firefox/i.test(Bc()),t=/Trident/i.test(Bc());if(t&&pi(r)){var i=mr(r);if(i.position==="fixed")return null}var s=ul(r);for(dd(s)&&(s=s.host);pi(s)&&["html","body"].indexOf(Qi(s))<0;){var n=mr(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||e&&n.willChange==="filter"||e&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function Ta(r){for(var e=Jt(r),t=wp(r);t&&uT(t)&&mr(t).position==="static";)t=wp(t);return t&&(Qi(t)==="html"||Qi(t)==="body"&&mr(t).position==="static")?e:t||pT(r)||e}function pd(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ea(r,e,t){return bs(r,Yo(e,t))}function fT(r,e,t){var i=ea(r,e,t);return i>t?t:i}function Eg(){return{top:0,right:0,bottom:0,left:0}}function Ag(r){return Object.assign({},Eg(),r)}function Sg(r,e){return e.reduce(function(t,i){return t[i]=r,t},{})}var mT=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ag(typeof e!="number"?e:Sg(e,xa))};function gT(r){var e,t=r.state,i=r.name,s=r.options,n=t.elements.arrow,a=t.modifiersData.popperOffsets,o=qi(t.placement),l=pd(o),c=[Yt,mi].indexOf(o)>=0,d=c?"height":"width";if(!(!n||!a)){var h=mT(s.padding,t),u=ud(n),p=l==="y"?$t:Yt,f=l==="y"?fi:mi,m=t.rects.reference[d]+t.rects.reference[l]-a[l]-t.rects.popper[d],g=a[l]-t.rects.reference[l],y=Ta(n),w=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,b=m/2-g/2,v=h[p],E=w-u[d]-h[f],C=w/2-u[d]/2+b,I=ea(v,C,E),L=l;t.modifiersData[i]=(e={},e[L]=I,e.centerOffset=I-C,e)}}function yT(r){var e=r.state,t=r.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||Tg(e.elements.popper,s)&&(e.elements.arrow=s))}const vT={name:"arrow",enabled:!0,phase:"main",fn:gT,effect:yT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mn(r){return r.split("-")[1]}var bT={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wT(r,e){var t=r.x,i=r.y,s=e.devicePixelRatio||1;return{x:pn(t*s)/s||0,y:pn(i*s)/s||0}}function _p(r){var e,t=r.popper,i=r.popperRect,s=r.placement,n=r.variation,a=r.offsets,o=r.position,l=r.gpuAcceleration,c=r.adaptive,d=r.roundOffsets,h=r.isFixed,u=a.x,p=u===void 0?0:u,f=a.y,m=f===void 0?0:f,g=typeof d=="function"?d({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var y=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),b=Yt,v=$t,E=window;if(c){var C=Ta(t),I="clientHeight",L="clientWidth";if(C===Jt(t)&&(C=$r(t),mr(C).position!=="static"&&o==="absolute"&&(I="scrollHeight",L="scrollWidth")),C=C,s===$t||(s===Yt||s===mi)&&n===ha){v=fi;var k=h&&C===E&&E.visualViewport?E.visualViewport.height:C[I];m-=k-i.height,m*=l?1:-1}if(s===Yt||(s===$t||s===fi)&&n===ha){b=mi;var N=h&&C===E&&E.visualViewport?E.visualViewport.width:C[L];p-=N-i.width,p*=l?1:-1}}var G=Object.assign({position:o},c&&bT),A=d===!0?wT({x:p,y:m},Jt(t)):{x:p,y:m};if(p=A.x,m=A.y,l){var S;return Object.assign({},G,(S={},S[v]=w?"0":"",S[b]=y?"0":"",S.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",S))}return Object.assign({},G,(e={},e[v]=w?m+"px":"",e[b]=y?p+"px":"",e.transform="",e))}function _T(r){var e=r.state,t=r.options,i=t.gpuAcceleration,s=i===void 0?!0:i,n=t.adaptive,a=n===void 0?!0:n,o=t.roundOffsets,l=o===void 0?!0:o,c={placement:qi(e.placement),variation:mn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,_p(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,_p(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const xT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_T,data:{}};var eo={passive:!0};function TT(r){var e=r.state,t=r.instance,i=r.options,s=i.scroll,n=s===void 0?!0:s,a=i.resize,o=a===void 0?!0:a,l=Jt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return n&&c.forEach(function(d){d.addEventListener("scroll",t.update,eo)}),o&&l.addEventListener("resize",t.update,eo),function(){n&&c.forEach(function(d){d.removeEventListener("scroll",t.update,eo)}),o&&l.removeEventListener("resize",t.update,eo)}}const ET={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:TT,data:{}};var AT={left:"right",right:"left",bottom:"top",top:"bottom"};function Ao(r){return r.replace(/left|right|bottom|top/g,function(e){return AT[e]})}var ST={start:"end",end:"start"};function xp(r){return r.replace(/start|end/g,function(e){return ST[e]})}function fd(r){var e=Jt(r),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function md(r){return fn($r(r)).left+fd(r).scrollLeft}function CT(r,e){var t=Jt(r),i=$r(r),s=t.visualViewport,n=i.clientWidth,a=i.clientHeight,o=0,l=0;if(s){n=s.width,a=s.height;var c=xg();(c||!c&&e==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:n,height:a,x:o+md(r),y:l}}function MT(r){var e,t=$r(r),i=fd(r),s=(e=r.ownerDocument)==null?void 0:e.body,n=bs(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=bs(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-i.scrollLeft+md(r),l=-i.scrollTop;return mr(s||t).direction==="rtl"&&(o+=bs(t.clientWidth,s?s.clientWidth:0)-n),{width:n,height:a,x:o,y:l}}function gd(r){var e=mr(r),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function Cg(r){return["html","body","#document"].indexOf(Qi(r))>=0?r.ownerDocument.body:pi(r)&&gd(r)?r:Cg(ul(r))}function ta(r,e){var t;e===void 0&&(e=[]);var i=Cg(r),s=i===((t=r.ownerDocument)==null?void 0:t.body),n=Jt(i),a=s?[n].concat(n.visualViewport||[],gd(i)?i:[]):i,o=e.concat(a);return s?o:o.concat(ta(ul(a)))}function Rc(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function kT(r,e){var t=fn(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function Tp(r,e,t){return e===bg?Rc(CT(r,t)):Es(e)?kT(e,t):Rc(MT($r(r)))}function IT(r){var e=ta(ul(r)),t=["absolute","fixed"].indexOf(mr(r).position)>=0,i=t&&pi(r)?Ta(r):r;return Es(i)?e.filter(function(s){return Es(s)&&Tg(s,i)&&Qi(s)!=="body"}):[]}function PT(r,e,t,i){var s=e==="clippingParents"?IT(r):[].concat(e),n=[].concat(s,[t]),a=n[0],o=n.reduce(function(l,c){var d=Tp(r,c,i);return l.top=bs(d.top,l.top),l.right=Yo(d.right,l.right),l.bottom=Yo(d.bottom,l.bottom),l.left=bs(d.left,l.left),l},Tp(r,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Mg(r){var e=r.reference,t=r.element,i=r.placement,s=i?qi(i):null,n=i?mn(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(s){case $t:l={x:a,y:e.y-t.height};break;case fi:l={x:a,y:e.y+e.height};break;case mi:l={x:e.x+e.width,y:o};break;case Yt:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var c=s?pd(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(n){case un:l[c]=l[c]-(e[d]/2-t[d]/2);break;case ha:l[c]=l[c]+(e[d]/2-t[d]/2);break}}return l}function ca(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?r.placement:i,n=t.strategy,a=n===void 0?r.strategy:n,o=t.boundary,l=o===void 0?J1:o,c=t.rootBoundary,d=c===void 0?bg:c,h=t.elementContext,u=h===void 0?Ln:h,p=t.altBoundary,f=p===void 0?!1:p,m=t.padding,g=m===void 0?0:m,y=Ag(typeof g!="number"?g:Sg(g,xa)),w=u===Ln?Q1:Ln,b=r.rects.popper,v=r.elements[f?w:u],E=PT(Es(v)?v:v.contextElement||$r(r.elements.popper),l,d,a),C=fn(r.elements.reference),I=Mg({reference:C,element:b,strategy:"absolute",placement:s}),L=Rc(Object.assign({},b,I)),k=u===Ln?L:C,N={top:E.top-k.top+y.top,bottom:k.bottom-E.bottom+y.bottom,left:E.left-k.left+y.left,right:k.right-E.right+y.right},G=r.modifiersData.offset;if(u===Ln&&G){var A=G[s];Object.keys(N).forEach(function(S){var x=[mi,fi].indexOf(S)>=0?1:-1,D=[$t,fi].indexOf(S)>=0?"y":"x";N[S]+=A[D]*x})}return N}function BT(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,n=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?wg:l,d=mn(i),h=d?o?bp:bp.filter(function(f){return mn(f)===d}):xa,u=h.filter(function(f){return c.indexOf(f)>=0});u.length===0&&(u=h);var p=u.reduce(function(f,m){return f[m]=ca(r,{placement:m,boundary:s,rootBoundary:n,padding:a})[qi(m)],f},{});return Object.keys(p).sort(function(f,m){return p[f]-p[m]})}function RT(r){if(qi(r)===cd)return[];var e=Ao(r);return[xp(r),e,xp(e)]}function LT(r){var e=r.state,t=r.options,i=r.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,c=t.padding,d=t.boundary,h=t.rootBoundary,u=t.altBoundary,p=t.flipVariations,f=p===void 0?!0:p,m=t.allowedAutoPlacements,g=e.options.placement,y=qi(g),w=y===g,b=l||(w||!f?[Ao(g)]:RT(g)),v=[g].concat(b).reduce(function(Q,Z){return Q.concat(qi(Z)===cd?BT(e,{placement:Z,boundary:d,rootBoundary:h,padding:c,flipVariations:f,allowedAutoPlacements:m}):Z)},[]),E=e.rects.reference,C=e.rects.popper,I=new Map,L=!0,k=v[0],N=0;N=0,D=x?"width":"height",$=ca(e,{placement:G,boundary:d,rootBoundary:h,altBoundary:u,padding:c}),R=x?S?mi:Yt:S?fi:$t;E[D]>C[D]&&(R=Ao(R));var O=Ao(R),W=[];if(n&&W.push($[A]<=0),o&&W.push($[R]<=0,$[O]<=0),W.every(function(Q){return Q})){k=G,L=!1;break}I.set(G,W)}if(L)for(var V=f?3:1,F=function(Z){var ye=v.find(function(Ce){var ce=I.get(Ce);if(ce)return ce.slice(0,Z).every(function(fe){return fe})});if(ye)return k=ye,"break"},U=V;U>0;U--){var te=F(U);if(te==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}const DT={name:"flip",enabled:!0,phase:"main",fn:LT,requiresIfExists:["offset"],data:{_skip:!1}};function Ep(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function Ap(r){return[$t,mi,fi,Yt].some(function(e){return r[e]>=0})}function OT(r){var e=r.state,t=r.name,i=e.rects.reference,s=e.rects.popper,n=e.modifiersData.preventOverflow,a=ca(e,{elementContext:"reference"}),o=ca(e,{altBoundary:!0}),l=Ep(a,i),c=Ep(o,s,n),d=Ap(l),h=Ap(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const FT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:OT};function NT(r,e,t){var i=qi(r),s=[Yt,$t].indexOf(i)>=0?-1:1,n=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,a=n[0],o=n[1];return a=a||0,o=(o||0)*s,[Yt,mi].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function UT(r){var e=r.state,t=r.options,i=r.name,s=t.offset,n=s===void 0?[0,0]:s,a=wg.reduce(function(d,h){return d[h]=NT(h,e.rects,n),d},{}),o=a[e.placement],l=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=a}const HT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:UT};function GT(r){var e=r.state,t=r.name;e.modifiersData[t]=Mg({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const VT={name:"popperOffsets",enabled:!0,phase:"read",fn:GT,data:{}};function WT(r){return r==="x"?"y":"x"}function zT(r){var e=r.state,t=r.options,i=r.name,s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,c=t.rootBoundary,d=t.altBoundary,h=t.padding,u=t.tether,p=u===void 0?!0:u,f=t.tetherOffset,m=f===void 0?0:f,g=ca(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),y=qi(e.placement),w=mn(e.placement),b=!w,v=pd(y),E=WT(v),C=e.modifiersData.popperOffsets,I=e.rects.reference,L=e.rects.popper,k=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),G=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(C){if(n){var S,x=v==="y"?$t:Yt,D=v==="y"?fi:mi,$=v==="y"?"height":"width",R=C[v],O=R+g[x],W=R-g[D],V=p?-L[$]/2:0,F=w===un?I[$]:L[$],U=w===un?-L[$]:-I[$],te=e.elements.arrow,Q=p&&te?ud(te):{width:0,height:0},Z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Eg(),ye=Z[x],Ce=Z[D],ce=ea(0,I[$],Q[$]),fe=b?I[$]/2-V-ce-ye-N.mainAxis:F-ce-ye-N.mainAxis,we=b?-I[$]/2+V+ce+Ce+N.mainAxis:U+ce+Ce+N.mainAxis,le=e.elements.arrow&&Ta(e.elements.arrow),pe=le?v==="y"?le.clientTop||0:le.clientLeft||0:0,be=(S=G?.[v])!=null?S:0,T=R+fe-be-pe,Y=R+we-be,j=ea(p?Yo(O,T):O,R,p?bs(W,Y):W);C[v]=j,A[v]=j-R}if(o){var P,M=v==="x"?$t:Yt,H=v==="x"?fi:mi,J=C[E],ee=E==="y"?"height":"width",z=J+g[M],re=J-g[H],he=[$t,Yt].indexOf(y)!==-1,ne=(P=G?.[E])!=null?P:0,_e=he?z:J-I[ee]-L[ee]-ne+N.altAxis,Ye=he?J+I[ee]+L[ee]-ne-N.altAxis:re,Fe=p&&he?fT(_e,J,Ye):ea(p?_e:z,J,p?Ye:re);C[E]=Fe,A[E]=Fe-J}e.modifiersData[i]=A}}const jT={name:"preventOverflow",enabled:!0,phase:"main",fn:zT,requiresIfExists:["offset"]};function $T(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function YT(r){return r===Jt(r)||!pi(r)?fd(r):$T(r)}function XT(r){var e=r.getBoundingClientRect(),t=pn(e.width)/r.offsetWidth||1,i=pn(e.height)/r.offsetHeight||1;return t!==1||i!==1}function qT(r,e,t){t===void 0&&(t=!1);var i=pi(e),s=pi(e)&&XT(e),n=$r(e),a=fn(r,s,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((Qi(e)!=="body"||gd(n))&&(o=YT(e)),pi(e)?(l=fn(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):n&&(l.x=md(n))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function KT(r){var e=new Map,t=new Set,i=[];r.forEach(function(n){e.set(n.name,n)});function s(n){t.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&s(l)}}),i.push(n)}return r.forEach(function(n){t.has(n.name)||s(n)}),i}function ZT(r){var e=KT(r);return hT.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function JT(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function QT(r){var e=r.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var Sp={placement:"bottom",modifiers:[],strategy:"absolute"};function Cp(){for(var r=arguments.length,e=new Array(r),t=0;t-1}function Rg(r,e){return typeof r=="function"?r.apply(void 0,e):r}function Mp(r,e){if(e===0)return r;var t;return function(i){clearTimeout(t),t=setTimeout(function(){r(i)},e)}}function nE(r){return r.split(/\s+/).filter(Boolean)}function js(r){return[].concat(r)}function kp(r,e){r.indexOf(e)===-1&&r.push(e)}function aE(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function oE(r){return r.split("-")[0]}function Xo(r){return[].slice.call(r)}function Ip(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function ia(){return document.createElement("div")}function pl(r){return["Element","Fragment"].some(function(e){return yd(r,e)})}function lE(r){return yd(r,"NodeList")}function hE(r){return yd(r,"MouseEvent")}function cE(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function dE(r){return pl(r)?[r]:lE(r)?Xo(r):Array.isArray(r)?r:Xo(document.querySelectorAll(r))}function mh(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Pp(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function uE(r){var e,t=js(r),i=t[0];return i!=null&&(e=i.ownerDocument)!=null&&e.body?i.ownerDocument:document}function pE(r,e){var t=e.clientX,i=e.clientY;return r.every(function(s){var n=s.popperRect,a=s.popperState,o=s.props,l=o.interactiveBorder,c=oE(a.placement),d=a.modifiersData.offset;if(!d)return!0;var h=c==="bottom"?d.top.y:0,u=c==="top"?d.bottom.y:0,p=c==="right"?d.left.x:0,f=c==="left"?d.right.x:0,m=n.top-i+h>l,g=i-n.bottom-u>l,y=n.left-t+p>l,w=t-n.right-f>l;return m||g||y||w})}function gh(r,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){r[i](s,t)})}function Bp(r,e){for(var t=e;t;){var i;if(r.contains(t))return!0;t=t.getRootNode==null||(i=t.getRootNode())==null?void 0:i.host}return!1}var Wi={isTouch:!1},Rp=0;function fE(){Wi.isTouch||(Wi.isTouch=!0,window.performance&&document.addEventListener("mousemove",Lg))}function Lg(){var r=performance.now();r-Rp<20&&(Wi.isTouch=!1,document.removeEventListener("mousemove",Lg)),Rp=r}function mE(){var r=document.activeElement;if(cE(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function gE(){document.addEventListener("touchstart",fE,ss),window.addEventListener("blur",mE)}var yE=typeof window<"u"&&typeof document<"u",vE=yE?!!window.msCrypto:!1,bE={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},wE={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ai=Object.assign({appendTo:Bg,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},bE,wE),_E=Object.keys(Ai),xE=function(e){var t=Object.keys(e);t.forEach(function(i){Ai[i]=e[i]})};function Dg(r){var e=r.plugins||[],t=e.reduce(function(i,s){var n=s.name,a=s.defaultValue;if(n){var o;i[n]=r[n]!==void 0?r[n]:(o=Ai[n])!=null?o:a}return i},{});return Object.assign({},r,t)}function TE(r,e){var t=e?Object.keys(Dg(Object.assign({},Ai,{plugins:e}))):_E,i=t.reduce(function(s,n){var a=(r.getAttribute("data-tippy-"+n)||"").trim();if(!a)return s;if(n==="content")s[n]=a;else try{s[n]=JSON.parse(a)}catch{s[n]=a}return s},{});return i}function Lp(r,e){var t=Object.assign({},e,{content:Rg(e.content,[r])},e.ignoreAttributes?{}:TE(r,e.plugins));return t.aria=Object.assign({},Ai.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var EE=function(){return"innerHTML"};function Lc(r,e){r[EE()]=e}function Dp(r){var e=ia();return r===!0?e.className=Ig:(e.className=Pg,pl(r)?e.appendChild(r):Lc(e,r)),e}function Op(r,e){pl(e.content)?(Lc(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Lc(r,e.content):r.textContent=e.content)}function Dc(r){var e=r.firstElementChild,t=Xo(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(kg)}),arrow:t.find(function(i){return i.classList.contains(Ig)||i.classList.contains(Pg)}),backdrop:t.find(function(i){return i.classList.contains(sE)})}}function Og(r){var e=ia(),t=ia();t.className=rE,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=ia();i.className=kg,i.setAttribute("data-state","hidden"),Op(i,r.props),e.appendChild(t),t.appendChild(i),s(r.props,r.props);function s(n,a){var o=Dc(e),l=o.box,c=o.content,d=o.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(n.content!==a.content||n.allowHTML!==a.allowHTML)&&Op(c,r.props),a.arrow?d?n.arrow!==a.arrow&&(l.removeChild(d),l.appendChild(Dp(a.arrow))):l.appendChild(Dp(a.arrow)):d&&l.removeChild(d)}return{popper:e,onUpdate:s}}Og.$$tippy=!0;var AE=1,to=[],yh=[];function SE(r,e){var t=Lp(r,Object.assign({},Ai,Dg(Ip(e)))),i,s,n,a=!1,o=!1,l=!1,c=!1,d,h,u,p=[],f=Mp(T,t.interactiveDebounce),m,g=AE++,y=null,w=aE(t.plugins),b={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:g,reference:r,popper:ia(),popperInstance:y,props:t,state:b,plugins:w,clearDelayTimeouts:_e,setProps:Ye,setContent:Fe,show:Gt,hide:Xr,hideWithInteractivity:Qt,enable:he,disable:ne,unmount:qr,destroy:at};if(!t.render)return v;var E=t.render(v),C=E.popper,I=E.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+v.id,v.popper=C,r._tippy=v,C._tippy=v;var L=w.map(function(q){return q.fn(v)}),k=r.hasAttribute("aria-expanded");return le(),V(),R(),O("onCreate",[v]),t.showOnCreate&&z(),C.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&x().addEventListener("mousemove",f)}),v;function N(){var q=v.props.touch;return Array.isArray(q)?q:[q,0]}function G(){return N()[0]==="hold"}function A(){var q;return!!((q=v.props.render)!=null&&q.$$tippy)}function S(){return m||r}function x(){var q=S().parentNode;return q?uE(q):document}function D(){return Dc(C)}function $(q){return v.state.isMounted&&!v.state.isVisible||Wi.isTouch||d&&d.type==="focus"?0:fh(v.props.delay,q?0:1,Ai.delay)}function R(q){q===void 0&&(q=!1),C.style.pointerEvents=v.props.interactive&&!q?"":"none",C.style.zIndex=""+v.props.zIndex}function O(q,me,Te){if(Te===void 0&&(Te=!0),L.forEach(function(Ve){Ve[q]&&Ve[q].apply(Ve,me)}),Te){var $e;($e=v.props)[q].apply($e,me)}}function W(){var q=v.props.aria;if(q.content){var me="aria-"+q.content,Te=C.id,$e=js(v.props.triggerTarget||r);$e.forEach(function(Ve){var Ct=Ve.getAttribute(me);if(v.state.isVisible)Ve.setAttribute(me,Ct?Ct+" "+Te:Te);else{var Vt=Ct&&Ct.replace(Te,"").trim();Vt?Ve.setAttribute(me,Vt):Ve.removeAttribute(me)}})}}function V(){if(!(k||!v.props.aria.expanded)){var q=js(v.props.triggerTarget||r);q.forEach(function(me){v.props.interactive?me.setAttribute("aria-expanded",v.state.isVisible&&me===S()?"true":"false"):me.removeAttribute("aria-expanded")})}}function F(){x().removeEventListener("mousemove",f),to=to.filter(function(q){return q!==f})}function U(q){if(!(Wi.isTouch&&(l||q.type==="mousedown"))){var me=q.composedPath&&q.composedPath()[0]||q.target;if(!(v.props.interactive&&Bp(C,me))){if(js(v.props.triggerTarget||r).some(function(Te){return Bp(Te,me)})){if(Wi.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else O("onClickOutside",[v,q]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),o=!0,setTimeout(function(){o=!1}),v.state.isMounted||ye())}}}function te(){l=!0}function Q(){l=!1}function Z(){var q=x();q.addEventListener("mousedown",U,!0),q.addEventListener("touchend",U,ss),q.addEventListener("touchstart",Q,ss),q.addEventListener("touchmove",te,ss)}function ye(){var q=x();q.removeEventListener("mousedown",U,!0),q.removeEventListener("touchend",U,ss),q.removeEventListener("touchstart",Q,ss),q.removeEventListener("touchmove",te,ss)}function Ce(q,me){fe(q,function(){!v.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&me()})}function ce(q,me){fe(q,me)}function fe(q,me){var Te=D().box;function $e(Ve){Ve.target===Te&&(gh(Te,"remove",$e),me())}if(q===0)return me();gh(Te,"remove",h),gh(Te,"add",$e),h=$e}function we(q,me,Te){Te===void 0&&(Te=!1);var $e=js(v.props.triggerTarget||r);$e.forEach(function(Ve){Ve.addEventListener(q,me,Te),p.push({node:Ve,eventType:q,handler:me,options:Te})})}function le(){G()&&(we("touchstart",be,{passive:!0}),we("touchend",Y,{passive:!0})),nE(v.props.trigger).forEach(function(q){if(q!=="manual")switch(we(q,be),q){case"mouseenter":we("mouseleave",Y);break;case"focus":we(vE?"focusout":"blur",j);break;case"focusin":we("focusout",j);break}})}function pe(){p.forEach(function(q){var me=q.node,Te=q.eventType,$e=q.handler,Ve=q.options;me.removeEventListener(Te,$e,Ve)}),p=[]}function be(q){var me,Te=!1;if(!(!v.state.isEnabled||P(q)||o)){var $e=((me=d)==null?void 0:me.type)==="focus";d=q,m=q.currentTarget,V(),!v.state.isVisible&&hE(q)&&to.forEach(function(Ve){return Ve(q)}),q.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||a)&&v.props.hideOnClick!==!1&&v.state.isVisible?Te=!0:z(q),q.type==="click"&&(a=!Te),Te&&!$e&&re(q)}}function T(q){var me=q.target,Te=S().contains(me)||C.contains(me);if(!(q.type==="mousemove"&&Te)){var $e=ee().concat(C).map(function(Ve){var Ct,Vt=Ve._tippy,tr=(Ct=Vt.popperInstance)==null?void 0:Ct.state;return tr?{popperRect:Ve.getBoundingClientRect(),popperState:tr,props:t}:null}).filter(Boolean);pE($e,q)&&(F(),re(q))}}function Y(q){var me=P(q)||v.props.trigger.indexOf("click")>=0&&a;if(!me){if(v.props.interactive){v.hideWithInteractivity(q);return}re(q)}}function j(q){v.props.trigger.indexOf("focusin")<0&&q.target!==S()||v.props.interactive&&q.relatedTarget&&C.contains(q.relatedTarget)||re(q)}function P(q){return Wi.isTouch?G()!==q.type.indexOf("touch")>=0:!1}function M(){H();var q=v.props,me=q.popperOptions,Te=q.placement,$e=q.offset,Ve=q.getReferenceClientRect,Ct=q.moveTransition,Vt=A()?Dc(C).arrow:null,tr=Ve?{getBoundingClientRect:Ve,contextElement:Ve.contextElement||S()}:r,wr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Sa){var Ms=Sa.state;if(A()){var Ey=D(),Cl=Ey.box;["placement","reference-hidden","escaped"].forEach(function(Ca){Ca==="placement"?Cl.setAttribute("data-placement",Ms.placement):Ms.attributes.popper["data-popper-"+Ca]?Cl.setAttribute("data-"+Ca,""):Cl.removeAttribute("data-"+Ca)}),Ms.attributes.popper={}}}},ei=[{name:"offset",options:{offset:$e}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ct}},wr];A()&&Vt&&ei.push({name:"arrow",options:{element:Vt,padding:3}}),ei.push.apply(ei,me?.modifiers||[]),v.popperInstance=iE(tr,C,Object.assign({},me,{placement:Te,onFirstUpdate:u,modifiers:ei}))}function H(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function J(){var q=v.props.appendTo,me,Te=S();v.props.interactive&&q===Bg||q==="parent"?me=Te.parentNode:me=Rg(q,[Te]),me.contains(C)||me.appendChild(C),v.state.isMounted=!0,M()}function ee(){return Xo(C.querySelectorAll("[data-tippy-root]"))}function z(q){v.clearDelayTimeouts(),q&&O("onTrigger",[v,q]),Z();var me=$(!0),Te=N(),$e=Te[0],Ve=Te[1];Wi.isTouch&&$e==="hold"&&Ve&&(me=Ve),me?i=setTimeout(function(){v.show()},me):v.show()}function re(q){if(v.clearDelayTimeouts(),O("onUntrigger",[v,q]),!v.state.isVisible){ye();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(q.type)>=0&&a)){var me=$(!1);me?s=setTimeout(function(){v.state.isVisible&&v.hide()},me):n=requestAnimationFrame(function(){v.hide()})}}function he(){v.state.isEnabled=!0}function ne(){v.hide(),v.state.isEnabled=!1}function _e(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(n)}function Ye(q){if(!v.state.isDestroyed){O("onBeforeUpdate",[v,q]),pe();var me=v.props,Te=Lp(r,Object.assign({},me,Ip(q),{ignoreAttributes:!0}));v.props=Te,le(),me.interactiveDebounce!==Te.interactiveDebounce&&(F(),f=Mp(T,Te.interactiveDebounce)),me.triggerTarget&&!Te.triggerTarget?js(me.triggerTarget).forEach(function($e){$e.removeAttribute("aria-expanded")}):Te.triggerTarget&&r.removeAttribute("aria-expanded"),V(),R(),I&&I(me,Te),v.popperInstance&&(M(),ee().forEach(function($e){requestAnimationFrame($e._tippy.popperInstance.forceUpdate)})),O("onAfterUpdate",[v,q])}}function Fe(q){v.setProps({content:q})}function Gt(){var q=v.state.isVisible,me=v.state.isDestroyed,Te=!v.state.isEnabled,$e=Wi.isTouch&&!v.props.touch,Ve=fh(v.props.duration,0,Ai.duration);if(!(q||me||Te||$e)&&!S().hasAttribute("disabled")&&(O("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,A()&&(C.style.visibility="visible"),R(),Z(),v.state.isMounted||(C.style.transition="none"),A()){var Ct=D(),Vt=Ct.box,tr=Ct.content;mh([Vt,tr],0)}u=function(){var ei;if(!(!v.state.isVisible||c)){if(c=!0,C.offsetHeight,C.style.transition=v.props.moveTransition,A()&&v.props.animation){var Sl=D(),Sa=Sl.box,Ms=Sl.content;mh([Sa,Ms],Ve),Pp([Sa,Ms],"visible")}W(),V(),kp(yh,v),(ei=v.popperInstance)==null||ei.forceUpdate(),O("onMount",[v]),v.props.animation&&A()&&ce(Ve,function(){v.state.isShown=!0,O("onShown",[v])})}},J()}}function Xr(){var q=!v.state.isVisible,me=v.state.isDestroyed,Te=!v.state.isEnabled,$e=fh(v.props.duration,1,Ai.duration);if(!(q||me||Te)&&(O("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,c=!1,a=!1,A()&&(C.style.visibility="hidden"),F(),ye(),R(!0),A()){var Ve=D(),Ct=Ve.box,Vt=Ve.content;v.props.animation&&(mh([Ct,Vt],$e),Pp([Ct,Vt],"hidden"))}W(),V(),v.props.animation?A()&&Ce($e,v.unmount):v.unmount()}}function Qt(q){x().addEventListener("mousemove",f),kp(to,f),f(q)}function qr(){v.state.isVisible&&v.hide(),v.state.isMounted&&(H(),ee().forEach(function(q){q._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),yh=yh.filter(function(q){return q!==v}),v.state.isMounted=!1,O("onHidden",[v]))}function at(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),pe(),delete r._tippy,v.state.isDestroyed=!0,O("onDestroy",[v]))}}function Pt(r,e){e===void 0&&(e={});var t=Ai.plugins.concat(e.plugins||[]);gE();var i=Object.assign({},e,{plugins:t}),s=dE(r),n=s.reduce(function(a,o){var l=o&&SE(o,i);return l&&a.push(l),a},[]);return pl(r)?n[0]:n}Pt.defaultProps=Ai;Pt.setDefaultProps=xE;Pt.currentInput=Wi;Object.assign({},_g,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}});Pt.setDefaultProps({render:Og});const CE="modulepreload",ME=function(r){return"/smeditor/"+r},Fp={},Ke=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(n=>{if(n=ME(n),n in Fp)return;Fp[n]=!0;const a=n.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!i)for(let d=s.length-1;d>=0;d--){const h=s[d];if(h.href===n&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":CE,a||(c.as="script",c.crossOrigin=""),c.href=n,document.head.appendChild(c),a)return new Promise((d,h)=>{c.addEventListener("load",d),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e()).catch(n=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=n,window.dispatchEvent(a),!a.defaultPrevented)throw n})},qo={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],ABORT:["The operation was aborted","AbortError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},kE=r=>typeof r=="object"&&typeof r.type<"u";async function IE(r){var e,t,i;const{FolderHandle:s,FileHandle:n}=await Ke(()=>import("./memory-5b775533.js"),[]),{FileSystemDirectoryHandle:a}=await Ke(()=>Promise.resolve().then(()=>GA),void 0),o=(t=(e=r[0].webkitRelativePath)===null||e===void 0?void 0:e.split("/",1)[0])!==null&&t!==void 0?t:"",l=new s(o,!1);for(let c=0;c(f._entries[m]||(f._entries[m]=new s(m,!1)),f._entries[m]),l);p._entries[u]=new n(d.name,d,!1)}return new a(l)}async function PE(r){const{FileHandle:e}=await Ke(()=>import("./memory-5b775533.js"),[]),{FileSystemFileHandle:t}=await Ke(()=>Promise.resolve().then(()=>Qg),void 0);return Array.from(r).map(s=>new t(new e(s.name,s,!1)))}const Fg=Object.freeze(Object.defineProperty({__proto__:null,errors:qo,isChunkObject:kE,makeDirHandleFromFileList:IE,makeFileHandlesFromFileList:PE},Symbol.toStringTag,{value:"Module"}));var fs={};/*! howler.js v2.2.4 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */(function(r){(function(){var e=function(){this.init()};e.prototype={init:function(){var h=this||t;return h._counter=1e3,h._html5AudioPool=[],h.html5PoolSize=10,h._codecs={},h._howls=[],h._muted=!1,h._volume=1,h._canPlayEvent="canplaythrough",h._navigator=typeof window<"u"&&window.navigator?window.navigator:null,h.masterGain=null,h.noAudio=!1,h.usingWebAudio=!0,h.autoSuspend=!0,h.ctx=null,h.autoUnlock=!0,h._setup(),h},volume:function(h){var u=this||t;if(h=parseFloat(h),u.ctx||d(),h!==void 0&&h>=0&&h<=1){if(u._volume=h,u._muted)return u;u.usingWebAudio&&u.masterGain.gain.setValueAtTime(h,t.ctx.currentTime);for(var p=0;p=0;u--)h._howls[u].unload();return h.usingWebAudio&&h.ctx&&h.ctx.close!==void 0&&(h.ctx.close(),h.ctx=null,d()),h},codecs:function(h){return(this||t)._codecs[h.replace(/^x-/,"")]},_setup:function(){var h=this||t;if(h.state=h.ctx&&h.ctx.state||"suspended",h._autoSuspend(),!h.usingWebAudio)if(typeof Audio<"u")try{var u=new Audio;u.oncanplaythrough===void 0&&(h._canPlayEvent="canplay")}catch{h.noAudio=!0}else h.noAudio=!0;try{var u=new Audio;u.muted&&(h.noAudio=!0)}catch{}return h.noAudio||h._setupCodecs(),h},_setupCodecs:function(){var h=this||t,u=null;try{u=typeof Audio<"u"?new Audio:null}catch{return h}if(!u||typeof u.canPlayType!="function")return h;var p=u.canPlayType("audio/mpeg;").replace(/^no$/,""),f=h._navigator?h._navigator.userAgent:"",m=f.match(/OPR\/(\d+)/g),g=m&&parseInt(m[0].split("/")[1],10)<33,y=f.indexOf("Safari")!==-1&&f.indexOf("Chrome")===-1,w=f.match(/Version\/(.*?) /),b=y&&w&&parseInt(w[1],10)<15;return h._codecs={mp3:!(g||!p&&!u.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!p,opus:!!u.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!u.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!u.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(u.canPlayType('audio/wav; codecs="1"')||u.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!u.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!u.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(u.canPlayType("audio/x-m4a;")||u.canPlayType("audio/m4a;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(u.canPlayType("audio/x-m4b;")||u.canPlayType("audio/m4b;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(u.canPlayType("audio/x-mp4;")||u.canPlayType("audio/mp4;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(b||!u.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(b||!u.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!u.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(u.canPlayType("audio/x-flac;")||u.canPlayType("audio/flac;")).replace(/^no$/,"")},h},_unlockAudio:function(){var h=this||t;if(!h._audioUnlocked&&h.ctx){h._audioUnlocked=!1,h.autoUnlock=!1,h._mobileUnloaded||h.ctx.sampleRate===44100||(h._mobileUnloaded=!0,h.unload()),h._scratchBuffer=h.ctx.createBuffer(1,1,22050);var u=function(p){for(;h._html5AudioPool.length0?y._seek:p._sprite[h][0]/1e3),v=Math.max(0,(p._sprite[h][0]+p._sprite[h][1])/1e3-b),E=1e3*v/Math.abs(y._rate),C=p._sprite[h][0]/1e3,I=(p._sprite[h][0]+p._sprite[h][1])/1e3;y._sprite=h,y._ended=!1;var L=function(){y._paused=!1,y._seek=b,y._start=C,y._stop=I,y._loop=!(!y._loop&&!p._sprite[h][2])};if(b>=I)return void p._ended(y);var k=y._node;if(p._webAudio){var N=function(){p._playLock=!1,L(),p._refreshBuffer(y);var x=y._muted||p._muted?0:y._volume;k.gain.setValueAtTime(x,t.ctx.currentTime),y._playStart=t.ctx.currentTime,k.bufferSource.start===void 0?y._loop?k.bufferSource.noteGrainOn(0,b,86400):k.bufferSource.noteGrainOn(0,b,v):y._loop?k.bufferSource.start(0,b,86400):k.bufferSource.start(0,b,v),E!==1/0&&(p._endTimers[y._id]=setTimeout(p._ended.bind(p,y),E)),u||setTimeout(function(){p._emit("play",y._id),p._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?N():(p._playLock=!0,p.once("resume",N),p._clearTimer(y._id))}else{var G=function(){k.currentTime=b,k.muted=y._muted||p._muted||t._muted||k.muted,k.volume=y._volume*t.volume(),k.playbackRate=y._rate;try{var x=k.play();if(x&&typeof Promise<"u"&&(x instanceof Promise||typeof x.then=="function")?(p._playLock=!0,L(),x.then(function(){p._playLock=!1,k._unlocked=!0,u?p._loadQueue():p._emit("play",y._id)}).catch(function(){p._playLock=!1,p._emit("playerror",y._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),y._ended=!0,y._paused=!0})):u||(p._playLock=!1,L(),p._emit("play",y._id)),k.playbackRate=y._rate,k.paused)return void p._emit("playerror",y._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");h!=="__default"||y._loop?p._endTimers[y._id]=setTimeout(p._ended.bind(p,y),E):(p._endTimers[y._id]=function(){p._ended(y),k.removeEventListener("ended",p._endTimers[y._id],!1)},k.addEventListener("ended",p._endTimers[y._id],!1))}catch(D){p._emit("playerror",y._id,D)}};k.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(k.src=p._src,k.load());var A=window&&window.ejecta||!k.readyState&&t._navigator.isCocoonJS;if(k.readyState>=3||A)G();else{p._playLock=!0,p._state="loading";var S=function(){p._state="loaded",G(),k.removeEventListener(t._canPlayEvent,S,!1)};k.addEventListener(t._canPlayEvent,S,!1),p._clearTimer(y._id)}}return y._id},pause:function(h){var u=this;if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"pause",action:function(){u.pause(h)}}),u;for(var p=u._getSoundIds(h),f=0;f=0?u=parseInt(f[0],10):h=parseFloat(f[0]):f.length>=2&&(h=parseFloat(f[0]),u=parseInt(f[1],10));var m;if(!(h!==void 0&&h>=0&&h<=1))return m=u?p._soundById(u):p._sounds[0],m?m._volume:0;if(p._state!=="loaded"||p._playLock)return p._queue.push({event:"volume",action:function(){p.volume.apply(p,f)}}),p;u===void 0&&(p._volume=h),u=p._getSoundIds(u);for(var g=0;g0?f/v:f),C=Date.now();h._fadeTo=p,h._interval=setInterval(function(){var I=(Date.now()-C)/f;C=Date.now(),w+=b*I,w=Math.round(100*w)/100,w=b<0?Math.max(p,w):Math.min(p,w),y._webAudio?h._volume=w:y.volume(w,h._id,!0),g&&(y._volume=w),(pu&&w>=p)&&(clearInterval(h._interval),h._interval=null,h._fadeTo=null,y.volume(p,h._id),y._emit("fade",h._id))},E)},_stopFade:function(h){var u=this,p=u._soundById(h);return p&&p._interval&&(u._webAudio&&p._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(p._interval),p._interval=null,u.volume(p._fadeTo,h),p._fadeTo=null,u._emit("fade",h)),u},loop:function(){var h,u,p,f=this,m=arguments;if(m.length===0)return f._loop;if(m.length===1){if(typeof m[0]!="boolean")return!!(p=f._soundById(parseInt(m[0],10)))&&p._loop;h=m[0],f._loop=h}else m.length===2&&(h=m[0],u=parseInt(m[1],10));for(var g=f._getSoundIds(u),y=0;y=0?u=parseInt(f[0],10):h=parseFloat(f[0])}else f.length===2&&(h=parseFloat(f[0]),u=parseInt(f[1],10));var y;if(typeof h!="number")return y=p._soundById(u),y?y._rate:p._rate;if(p._state!=="loaded"||p._playLock)return p._queue.push({event:"rate",action:function(){p.rate.apply(p,f)}}),p;u===void 0&&(p._rate=h),u=p._getSoundIds(u);for(var w=0;w=0?u=parseInt(f[0],10):p._sounds.length&&(u=p._sounds[0]._id,h=parseFloat(f[0]))}else f.length===2&&(h=parseFloat(f[0]),u=parseInt(f[1],10));if(u===void 0)return 0;if(typeof h=="number"&&(p._state!=="loaded"||p._playLock))return p._queue.push({event:"seek",action:function(){p.seek.apply(p,f)}}),p;var y=p._soundById(u);if(y){if(!(typeof h=="number"&&h>=0)){if(p._webAudio){var w=p.playing(u)?t.ctx.currentTime-y._playStart:0,b=y._rateSeek?y._rateSeek-y._seek:0;return y._seek+(b+w*Math.abs(y._rate))}return y._node.currentTime}var v=p.playing(u);v&&p.pause(u,!0),y._seek=h,y._ended=!1,p._clearTimer(u),p._webAudio||!y._node||isNaN(y._node.duration)||(y._node.currentTime=h);var E=function(){v&&p.play(u,!0),p._emit("seek",u)};if(v&&!p._webAudio){var C=function(){p._playLock?setTimeout(C,0):E()};setTimeout(C,0)}else E()}return p},playing:function(h){var u=this;if(typeof h=="number"){var p=u._soundById(h);return!!p&&!p._paused}for(var f=0;f=0&&t._howls.splice(f,1);var m=!0;for(p=0;p=0){m=!1;break}return n&&m&&delete n[h._src],t.noAudio=!1,h._state="unloaded",h._sounds=[],h=null,null},on:function(h,u,p,f){var m=this,g=m["_on"+h];return typeof u=="function"&&g.push(f?{id:p,fn:u,once:f}:{id:p,fn:u}),m},off:function(h,u,p){var f=this,m=f["_on"+h],g=0;if(typeof u=="number"&&(p=u,u=null),u||p)for(g=0;g=0;g--)m[g].id&&m[g].id!==u&&h!=="load"||(setTimeout(function(y){y.call(this,u,p)}.bind(f,m[g].fn),0),m[g].once&&f.off(h,m[g].fn,m[g].id));return f._loadQueue(h),f},_loadQueue:function(h){var u=this;if(u._queue.length>0){var p=u._queue[0];p.event===h&&(u._queue.shift(),u._loadQueue()),h||p.action()}return u},_ended:function(h){var u=this,p=h._sprite;if(!u._webAudio&&h._node&&!h._node.paused&&!h._node.ended&&h._node.currentTime=0;f--){if(p<=u)return;h._sounds[f]._ended&&(h._webAudio&&h._sounds[f]._node&&h._sounds[f]._node.disconnect(0),h._sounds.splice(f,1),p--)}}},_getSoundIds:function(h){var u=this;if(h===void 0){for(var p=[],f=0;f=0;if(!h.bufferSource)return u;if(t._scratchBuffer&&h.bufferSource&&(h.bufferSource.onended=null,h.bufferSource.disconnect(0),p))try{h.bufferSource.buffer=t._scratchBuffer}catch{}return h.bufferSource=null,u},_clearSound:function(h){/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent)||(h.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var s=function(h){this._parent=h,this.init()};s.prototype={init:function(){var h=this,u=h._parent;return h._muted=u._muted,h._loop=u._loop,h._volume=u._volume,h._rate=u._rate,h._seek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,u._sounds.push(h),h.create(),h},create:function(){var h=this,u=h._parent,p=t._muted||h._muted||h._parent._muted?0:h._volume;return u._webAudio?(h._node=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),h._node.gain.setValueAtTime(p,t.ctx.currentTime),h._node.paused=!0,h._node.connect(t.masterGain)):t.noAudio||(h._node=t._obtainHtml5Audio(),h._errorFn=h._errorListener.bind(h),h._node.addEventListener("error",h._errorFn,!1),h._loadFn=h._loadListener.bind(h),h._node.addEventListener(t._canPlayEvent,h._loadFn,!1),h._endFn=h._endListener.bind(h),h._node.addEventListener("ended",h._endFn,!1),h._node.src=u._src,h._node.preload=u._preload===!0?"auto":u._preload,h._node.volume=p*t.volume(),h._node.load()),h},reset:function(){var h=this,u=h._parent;return h._muted=u._muted,h._loop=u._loop,h._volume=u._volume,h._rate=u._rate,h._seek=0,h._rateSeek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,h},_errorListener:function(){var h=this;h._parent._emit("loaderror",h._id,h._node.error?h._node.error.code:0),h._node.removeEventListener("error",h._errorFn,!1)},_loadListener:function(){var h=this,u=h._parent;u._duration=Math.ceil(10*h._node.duration)/10,Object.keys(u._sprite).length===0&&(u._sprite={__default:[0,1e3*u._duration]}),u._state!=="loaded"&&(u._state="loaded",u._emit("load"),u._loadQueue()),h._node.removeEventListener(t._canPlayEvent,h._loadFn,!1)},_endListener:function(){var h=this,u=h._parent;u._duration===1/0&&(u._duration=Math.ceil(10*h._node.duration)/10,u._sprite.__default[1]===1/0&&(u._sprite.__default[1]=1e3*u._duration),u._ended(h)),h._node.removeEventListener("ended",h._endFn,!1)}};var n={},a=function(h){var u=h._src;if(n[u])return h._duration=n[u].duration,void c(h);if(/^data:[^;]+;base64,/.test(u)){for(var p=atob(u.split(",")[1]),f=new Uint8Array(p.length),m=0;m0?(n[u._src]=m,c(u,m)):p()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(h).then(f).catch(p):t.ctx.decodeAudioData(h,f,p)},c=function(h,u){u&&!h._duration&&(h._duration=u.duration),Object.keys(h._sprite).length===0&&(h._sprite={__default:[0,1e3*h._duration]}),h._state!=="loaded"&&(h._state="loaded",h._emit("load"),h._loadQueue())},d=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var h=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),u=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),p=u?parseInt(u[1],10):null;if(h&&p&&p<9){var f=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!f&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};r.Howler=t,r.Howl=i,typeof Wt<"u"?(Wt.HowlerGlobal=e,Wt.Howler=t,Wt.Howl=i,Wt.Sound=s):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=i,window.Sound=s)})()})(fs);const BE="/smeditor/assets/assist_tick-b8aada2a.ogg",Ng="/smeditor/assets/metronome_high-6fa54e52.ogg",Ug="/smeditor/assets/metronome_low-4db4e760.ogg",RE="/smeditor/assets/mine-b65ce42d.ogg",fl=[".aac",".mid",".midi",".mp3",".oga",".ogg",".opus",".wav",".webm",".weba",".flac",".aiff"],ns=[".bmp",".gif",".jpeg",".jpg",".png",".tif",".tiff",".webp"],vd=["Hold","Roll"];function Hg(r){return!vd.includes(r.type)}function Le(r){return vd.includes(r.type)}var li="INUMBER",Sn="IOP1",Cn="IOP2",Mn="IOP3",gr="IVAR",As="IVARNAME",gn="IFUNCALL",ml="IFUNDEF",Xt="IEXPR",bd="IEXPREVAL",Cs="IMEMBER",gl="IENDSTATEMENT",yn="IARRAY";function je(r,e){this.type=r,this.value=e??0}je.prototype.toString=function(){switch(this.type){case li:case Sn:case Cn:case Mn:case gr:case As:case gl:return this.value;case gn:return"CALL "+this.value;case ml:return"DEF "+this.value;case yn:return"ARRAY "+this.value;case Cs:return"."+this.value;default:return"Invalid Instruction"}};function yl(r){return new je(Sn,r)}function vr(r){return new je(Cn,r)}function Gg(r){return new je(Mn,r)}function Oc(r,e,t,i,s){for(var n=[],a=[],o,l,c,d,h=0;h1)l=n.pop(),o=n.pop(),d=t[u.value],u=new je(li,d(o.value,l.value)),n.push(u);else if(p===Mn&&n.length>2)c=n.pop(),l=n.pop(),o=n.pop(),u.value==="?"?n.push(o.value?l.value:c.value):(d=i[u.value],u=new je(li,d(o.value,l.value,c.value)),n.push(u));else if(p===Sn&&n.length>0)o=n.pop(),d=e[u.value],u=new je(li,d(o.value)),n.push(u);else if(p===Xt){for(;n.length>0;)a.push(n.shift());a.push(new je(Xt,Oc(u.value,e,t,i,s)))}else if(p===Cs&&n.length>0)o=n.pop(),n.push(new je(li,o.value[u.value]));else{for(;n.length>0;)a.push(n.shift());a.push(u)}}for(;n.length>0;)a.push(n.shift());return a}function Vg(r,e,t){for(var i=[],s=0;s0;)l.unshift(sr(i.pop(),t));if(o=i.pop(),o.apply&&o.call)i.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(p===ml)i.push(function(){for(var m=i.pop(),g=[],y=u.value;y-- >0;)g.unshift(i.pop());var w=i.pop(),b=function(){for(var v=Object.assign({},t),E=0,C=g.length;E0;)l.unshift(i.pop());i.push(l)}else throw new Error("invalid Expression")}if(i.length>1)throw new Error("invalid Expression (parity)");return i[0]===0?0:sr(i[0],t)}function LE(r,e,t){return wd(r)?r:{type:bd,value:function(i){return cs(r.value,e,i)}}}function wd(r){return r&&r.type===bd}function sr(r,e){return wd(r)?r.value(e):r}function _d(r,e){for(var t=[],i,s,n,a,o,l,c=0;c0;)o.unshift(t.pop());a=t.pop(),t.push(a+"("+o.join(", ")+")")}else if(h===ml){for(s=t.pop(),l=d.value,o=[];l-- >0;)o.unshift(t.pop());i=t.pop(),e?t.push("("+i+" = function("+o.join(", ")+") { return "+s+" })"):t.push("("+i+"("+o.join(", ")+") = "+s+")")}else if(h===Cs)i=t.pop(),t.push(i+"."+d.value);else if(h===yn){for(l=d.value,o=[];l-- >0;)o.unshift(t.pop());t.push("["+o.join(", ")+"]")}else if(h===Xt)t.push("("+_d(d.value,e)+")");else if(h!==gl)throw new Error("invalid Expression")}return t.length>1&&(e?t=[t.join(",")]:t=[t.join(";")]),String(t[0])}function Np(r){return typeof r=="string"?JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):r}function Zs(r,e){for(var t=0;t=this.expression.length)return this.newToken(da,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')};ft.prototype.isString=function(){var r=!1,e=this.pos,t=this.expression.charAt(e);if(t==="'"||t==='"')for(var i=this.expression.indexOf(t,e+1);i>=0&&this.pos"9")))break}if(e>r){var i=this.expression.substring(r,e);if(i in this.consts)return this.current=this.newToken(vl,this.consts[i]),this.pos+=i.length,!0}return!1};ft.prototype.isNamedOp=function(){for(var r=this.pos,e=r;e"9")))break}if(e>r){var i=this.expression.substring(r,e);if(this.isOperatorEnabled(i)&&(i in this.binaryOps||i in this.unaryOps||i in this.ternaryOps))return this.current=this.newToken(Ze,i),this.pos+=i.length,!0}return!1};ft.prototype.isName=function(){for(var r=this.pos,e=r,t=!1;e"9"))break}else t=!0}if(t){var s=this.expression.substring(r,e);return this.current=this.newToken(Td,s),this.pos+=s.length,!0}return!1};ft.prototype.isWhitespace=function(){for(var r=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===` + }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=Ub(e)),typeof e=="number"?Nb(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const n=`${i}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${n} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${n} ${e}`}reset(){Object.assign(this,Ws.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=ue.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Pc.availableFonts={},Pc.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let ph=Pc;const Qa=class zs extends Oe{constructor(e="",t={}){super(ie.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,s=ie.from(i,{scaleMode:ue.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new ke,s.trim=new ke,this.texture=s;const n="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(n,"svg"),l=document.createElementNS(n,"foreignObject"),c=document.createElementNS(a,"div"),d=document.createElementNS(a,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",o.appendChild(l),this.maxWidth=zs.defaultMaxWidth,this.maxHeight=zs.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=o,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=i,this._loadImage=new Image,this._autoResolution=zs.defaultAutoResolution,this._resolution=zs.defaultResolution??ue.RESOLUTION,this.text=e,this.style=t}measureText(e){const{text:t,style:i,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(s)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const n=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=n;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const l=Math.min(this.maxWidth,Math.ceil(a)),c=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",l.toString()),this._svgRoot.setAttribute("height",c.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:this._style?.toCSS(s)}),this._styleElement.textContent=this._style?.toGlobalCSS()),{width:l+i.padding*2,height:c+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:n,height:a}=this.measureText();i.width=s.width=Math.ceil(Math.max(1,n)),i.height=s.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(l=>{s.onload=async()=>{if(o/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};Qa.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},Qa.defaultMaxWidth=2024,Qa.defaultMaxHeight=2024,Qa.defaultAutoResolution=!0;var $t="top",fi="bottom",mi="right",Xt="left",cd="auto",xa=[$t,fi,mi,Xt],un="start",ha="end",J1="clippingParents",bg="viewport",Ln="popper",Q1="reference",bp=xa.reduce(function(r,e){return r.concat([e+"-"+un,e+"-"+ha])},[]),wg=[].concat(xa,[cd]).reduce(function(r,e){return r.concat([e,e+"-"+un,e+"-"+ha])},[]),eT="beforeRead",tT="read",iT="afterRead",rT="beforeMain",sT="main",nT="afterMain",aT="beforeWrite",oT="write",lT="afterWrite",hT=[eT,tT,iT,rT,sT,nT,aT,oT,lT];function Qi(r){return r?(r.nodeName||"").toLowerCase():null}function Jt(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function Es(r){var e=Jt(r).Element;return r instanceof e||r instanceof Element}function pi(r){var e=Jt(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function dd(r){if(typeof ShadowRoot>"u")return!1;var e=Jt(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function cT(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},n=e.elements[t];!pi(n)||!Qi(n)||(Object.assign(n.style,i),Object.keys(s).forEach(function(a){var o=s[a];o===!1?n.removeAttribute(a):n.setAttribute(a,o===!0?"":o)}))})}function dT(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],n=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(l,c){return l[c]="",l},{});!pi(s)||!Qi(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){s.removeAttribute(l)}))})}}const _g={name:"applyStyles",enabled:!0,phase:"write",fn:cT,effect:dT,requires:["computeStyles"]};function qi(r){return r.split("-")[0]}var bs=Math.max,Xo=Math.min,pn=Math.round;function Bc(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function xg(){return!/^((?!chrome|android).)*safari/i.test(Bc())}function fn(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=r.getBoundingClientRect(),s=1,n=1;e&&pi(r)&&(s=r.offsetWidth>0&&pn(i.width)/r.offsetWidth||1,n=r.offsetHeight>0&&pn(i.height)/r.offsetHeight||1);var a=Es(r)?Jt(r):window,o=a.visualViewport,l=!xg()&&t,c=(i.left+(l&&o?o.offsetLeft:0))/s,d=(i.top+(l&&o?o.offsetTop:0))/n,h=i.width/s,u=i.height/n;return{width:h,height:u,top:d,right:c+h,bottom:d+u,left:c,x:c,y:d}}function ud(r){var e=fn(r),t=r.offsetWidth,i=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:i}}function Tg(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&dd(t)){var i=e;do{if(i&&r.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function mr(r){return Jt(r).getComputedStyle(r)}function uT(r){return["table","td","th"].indexOf(Qi(r))>=0}function $r(r){return((Es(r)?r.ownerDocument:r.document)||window.document).documentElement}function ul(r){return Qi(r)==="html"?r:r.assignedSlot||r.parentNode||(dd(r)?r.host:null)||$r(r)}function wp(r){return!pi(r)||mr(r).position==="fixed"?null:r.offsetParent}function pT(r){var e=/firefox/i.test(Bc()),t=/Trident/i.test(Bc());if(t&&pi(r)){var i=mr(r);if(i.position==="fixed")return null}var s=ul(r);for(dd(s)&&(s=s.host);pi(s)&&["html","body"].indexOf(Qi(s))<0;){var n=mr(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||e&&n.willChange==="filter"||e&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function Ta(r){for(var e=Jt(r),t=wp(r);t&&uT(t)&&mr(t).position==="static";)t=wp(t);return t&&(Qi(t)==="html"||Qi(t)==="body"&&mr(t).position==="static")?e:t||pT(r)||e}function pd(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ea(r,e,t){return bs(r,Xo(e,t))}function fT(r,e,t){var i=ea(r,e,t);return i>t?t:i}function Eg(){return{top:0,right:0,bottom:0,left:0}}function Ag(r){return Object.assign({},Eg(),r)}function Sg(r,e){return e.reduce(function(t,i){return t[i]=r,t},{})}var mT=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ag(typeof e!="number"?e:Sg(e,xa))};function gT(r){var e,t=r.state,i=r.name,s=r.options,n=t.elements.arrow,a=t.modifiersData.popperOffsets,o=qi(t.placement),l=pd(o),c=[Xt,mi].indexOf(o)>=0,d=c?"height":"width";if(!(!n||!a)){var h=mT(s.padding,t),u=ud(n),p=l==="y"?$t:Xt,f=l==="y"?fi:mi,m=t.rects.reference[d]+t.rects.reference[l]-a[l]-t.rects.popper[d],g=a[l]-t.rects.reference[l],y=Ta(n),w=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,b=m/2-g/2,v=h[p],E=w-u[d]-h[f],C=w/2-u[d]/2+b,I=ea(v,C,E),L=l;t.modifiersData[i]=(e={},e[L]=I,e.centerOffset=I-C,e)}}function yT(r){var e=r.state,t=r.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||Tg(e.elements.popper,s)&&(e.elements.arrow=s))}const vT={name:"arrow",enabled:!0,phase:"main",fn:gT,effect:yT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mn(r){return r.split("-")[1]}var bT={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wT(r,e){var t=r.x,i=r.y,s=e.devicePixelRatio||1;return{x:pn(t*s)/s||0,y:pn(i*s)/s||0}}function _p(r){var e,t=r.popper,i=r.popperRect,s=r.placement,n=r.variation,a=r.offsets,o=r.position,l=r.gpuAcceleration,c=r.adaptive,d=r.roundOffsets,h=r.isFixed,u=a.x,p=u===void 0?0:u,f=a.y,m=f===void 0?0:f,g=typeof d=="function"?d({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var y=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),b=Xt,v=$t,E=window;if(c){var C=Ta(t),I="clientHeight",L="clientWidth";if(C===Jt(t)&&(C=$r(t),mr(C).position!=="static"&&o==="absolute"&&(I="scrollHeight",L="scrollWidth")),C=C,s===$t||(s===Xt||s===mi)&&n===ha){v=fi;var k=h&&C===E&&E.visualViewport?E.visualViewport.height:C[I];m-=k-i.height,m*=l?1:-1}if(s===Xt||(s===$t||s===fi)&&n===ha){b=mi;var N=h&&C===E&&E.visualViewport?E.visualViewport.width:C[L];p-=N-i.width,p*=l?1:-1}}var G=Object.assign({position:o},c&&bT),A=d===!0?wT({x:p,y:m},Jt(t)):{x:p,y:m};if(p=A.x,m=A.y,l){var S;return Object.assign({},G,(S={},S[v]=w?"0":"",S[b]=y?"0":"",S.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",S))}return Object.assign({},G,(e={},e[v]=w?m+"px":"",e[b]=y?p+"px":"",e.transform="",e))}function _T(r){var e=r.state,t=r.options,i=t.gpuAcceleration,s=i===void 0?!0:i,n=t.adaptive,a=n===void 0?!0:n,o=t.roundOffsets,l=o===void 0?!0:o,c={placement:qi(e.placement),variation:mn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,_p(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,_p(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const xT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_T,data:{}};var eo={passive:!0};function TT(r){var e=r.state,t=r.instance,i=r.options,s=i.scroll,n=s===void 0?!0:s,a=i.resize,o=a===void 0?!0:a,l=Jt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return n&&c.forEach(function(d){d.addEventListener("scroll",t.update,eo)}),o&&l.addEventListener("resize",t.update,eo),function(){n&&c.forEach(function(d){d.removeEventListener("scroll",t.update,eo)}),o&&l.removeEventListener("resize",t.update,eo)}}const ET={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:TT,data:{}};var AT={left:"right",right:"left",bottom:"top",top:"bottom"};function Ao(r){return r.replace(/left|right|bottom|top/g,function(e){return AT[e]})}var ST={start:"end",end:"start"};function xp(r){return r.replace(/start|end/g,function(e){return ST[e]})}function fd(r){var e=Jt(r),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function md(r){return fn($r(r)).left+fd(r).scrollLeft}function CT(r,e){var t=Jt(r),i=$r(r),s=t.visualViewport,n=i.clientWidth,a=i.clientHeight,o=0,l=0;if(s){n=s.width,a=s.height;var c=xg();(c||!c&&e==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:n,height:a,x:o+md(r),y:l}}function MT(r){var e,t=$r(r),i=fd(r),s=(e=r.ownerDocument)==null?void 0:e.body,n=bs(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=bs(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-i.scrollLeft+md(r),l=-i.scrollTop;return mr(s||t).direction==="rtl"&&(o+=bs(t.clientWidth,s?s.clientWidth:0)-n),{width:n,height:a,x:o,y:l}}function gd(r){var e=mr(r),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function Cg(r){return["html","body","#document"].indexOf(Qi(r))>=0?r.ownerDocument.body:pi(r)&&gd(r)?r:Cg(ul(r))}function ta(r,e){var t;e===void 0&&(e=[]);var i=Cg(r),s=i===((t=r.ownerDocument)==null?void 0:t.body),n=Jt(i),a=s?[n].concat(n.visualViewport||[],gd(i)?i:[]):i,o=e.concat(a);return s?o:o.concat(ta(ul(a)))}function Rc(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function kT(r,e){var t=fn(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function Tp(r,e,t){return e===bg?Rc(CT(r,t)):Es(e)?kT(e,t):Rc(MT($r(r)))}function IT(r){var e=ta(ul(r)),t=["absolute","fixed"].indexOf(mr(r).position)>=0,i=t&&pi(r)?Ta(r):r;return Es(i)?e.filter(function(s){return Es(s)&&Tg(s,i)&&Qi(s)!=="body"}):[]}function PT(r,e,t,i){var s=e==="clippingParents"?IT(r):[].concat(e),n=[].concat(s,[t]),a=n[0],o=n.reduce(function(l,c){var d=Tp(r,c,i);return l.top=bs(d.top,l.top),l.right=Xo(d.right,l.right),l.bottom=Xo(d.bottom,l.bottom),l.left=bs(d.left,l.left),l},Tp(r,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Mg(r){var e=r.reference,t=r.element,i=r.placement,s=i?qi(i):null,n=i?mn(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(s){case $t:l={x:a,y:e.y-t.height};break;case fi:l={x:a,y:e.y+e.height};break;case mi:l={x:e.x+e.width,y:o};break;case Xt:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var c=s?pd(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(n){case un:l[c]=l[c]-(e[d]/2-t[d]/2);break;case ha:l[c]=l[c]+(e[d]/2-t[d]/2);break}}return l}function ca(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?r.placement:i,n=t.strategy,a=n===void 0?r.strategy:n,o=t.boundary,l=o===void 0?J1:o,c=t.rootBoundary,d=c===void 0?bg:c,h=t.elementContext,u=h===void 0?Ln:h,p=t.altBoundary,f=p===void 0?!1:p,m=t.padding,g=m===void 0?0:m,y=Ag(typeof g!="number"?g:Sg(g,xa)),w=u===Ln?Q1:Ln,b=r.rects.popper,v=r.elements[f?w:u],E=PT(Es(v)?v:v.contextElement||$r(r.elements.popper),l,d,a),C=fn(r.elements.reference),I=Mg({reference:C,element:b,strategy:"absolute",placement:s}),L=Rc(Object.assign({},b,I)),k=u===Ln?L:C,N={top:E.top-k.top+y.top,bottom:k.bottom-E.bottom+y.bottom,left:E.left-k.left+y.left,right:k.right-E.right+y.right},G=r.modifiersData.offset;if(u===Ln&&G){var A=G[s];Object.keys(N).forEach(function(S){var x=[mi,fi].indexOf(S)>=0?1:-1,D=[$t,fi].indexOf(S)>=0?"y":"x";N[S]+=A[D]*x})}return N}function BT(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,n=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?wg:l,d=mn(i),h=d?o?bp:bp.filter(function(f){return mn(f)===d}):xa,u=h.filter(function(f){return c.indexOf(f)>=0});u.length===0&&(u=h);var p=u.reduce(function(f,m){return f[m]=ca(r,{placement:m,boundary:s,rootBoundary:n,padding:a})[qi(m)],f},{});return Object.keys(p).sort(function(f,m){return p[f]-p[m]})}function RT(r){if(qi(r)===cd)return[];var e=Ao(r);return[xp(r),e,xp(e)]}function LT(r){var e=r.state,t=r.options,i=r.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,c=t.padding,d=t.boundary,h=t.rootBoundary,u=t.altBoundary,p=t.flipVariations,f=p===void 0?!0:p,m=t.allowedAutoPlacements,g=e.options.placement,y=qi(g),w=y===g,b=l||(w||!f?[Ao(g)]:RT(g)),v=[g].concat(b).reduce(function(Q,Z){return Q.concat(qi(Z)===cd?BT(e,{placement:Z,boundary:d,rootBoundary:h,padding:c,flipVariations:f,allowedAutoPlacements:m}):Z)},[]),E=e.rects.reference,C=e.rects.popper,I=new Map,L=!0,k=v[0],N=0;N=0,D=x?"width":"height",$=ca(e,{placement:G,boundary:d,rootBoundary:h,altBoundary:u,padding:c}),R=x?S?mi:Xt:S?fi:$t;E[D]>C[D]&&(R=Ao(R));var O=Ao(R),W=[];if(n&&W.push($[A]<=0),o&&W.push($[R]<=0,$[O]<=0),W.every(function(Q){return Q})){k=G,L=!1;break}I.set(G,W)}if(L)for(var V=f?3:1,F=function(Z){var ye=v.find(function(Ce){var ce=I.get(Ce);if(ce)return ce.slice(0,Z).every(function(fe){return fe})});if(ye)return k=ye,"break"},U=V;U>0;U--){var te=F(U);if(te==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}const DT={name:"flip",enabled:!0,phase:"main",fn:LT,requiresIfExists:["offset"],data:{_skip:!1}};function Ep(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function Ap(r){return[$t,mi,fi,Xt].some(function(e){return r[e]>=0})}function OT(r){var e=r.state,t=r.name,i=e.rects.reference,s=e.rects.popper,n=e.modifiersData.preventOverflow,a=ca(e,{elementContext:"reference"}),o=ca(e,{altBoundary:!0}),l=Ep(a,i),c=Ep(o,s,n),d=Ap(l),h=Ap(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const FT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:OT};function NT(r,e,t){var i=qi(r),s=[Xt,$t].indexOf(i)>=0?-1:1,n=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,a=n[0],o=n[1];return a=a||0,o=(o||0)*s,[Xt,mi].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function UT(r){var e=r.state,t=r.options,i=r.name,s=t.offset,n=s===void 0?[0,0]:s,a=wg.reduce(function(d,h){return d[h]=NT(h,e.rects,n),d},{}),o=a[e.placement],l=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=a}const HT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:UT};function GT(r){var e=r.state,t=r.name;e.modifiersData[t]=Mg({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const VT={name:"popperOffsets",enabled:!0,phase:"read",fn:GT,data:{}};function WT(r){return r==="x"?"y":"x"}function zT(r){var e=r.state,t=r.options,i=r.name,s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,c=t.rootBoundary,d=t.altBoundary,h=t.padding,u=t.tether,p=u===void 0?!0:u,f=t.tetherOffset,m=f===void 0?0:f,g=ca(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),y=qi(e.placement),w=mn(e.placement),b=!w,v=pd(y),E=WT(v),C=e.modifiersData.popperOffsets,I=e.rects.reference,L=e.rects.popper,k=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),G=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(C){if(n){var S,x=v==="y"?$t:Xt,D=v==="y"?fi:mi,$=v==="y"?"height":"width",R=C[v],O=R+g[x],W=R-g[D],V=p?-L[$]/2:0,F=w===un?I[$]:L[$],U=w===un?-L[$]:-I[$],te=e.elements.arrow,Q=p&&te?ud(te):{width:0,height:0},Z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Eg(),ye=Z[x],Ce=Z[D],ce=ea(0,I[$],Q[$]),fe=b?I[$]/2-V-ce-ye-N.mainAxis:F-ce-ye-N.mainAxis,we=b?-I[$]/2+V+ce+Ce+N.mainAxis:U+ce+Ce+N.mainAxis,le=e.elements.arrow&&Ta(e.elements.arrow),pe=le?v==="y"?le.clientTop||0:le.clientLeft||0:0,be=(S=G?.[v])!=null?S:0,T=R+fe-be-pe,X=R+we-be,j=ea(p?Xo(O,T):O,R,p?bs(W,X):W);C[v]=j,A[v]=j-R}if(o){var P,M=v==="x"?$t:Xt,H=v==="x"?fi:mi,J=C[E],ee=E==="y"?"height":"width",z=J+g[M],re=J-g[H],he=[$t,Xt].indexOf(y)!==-1,ne=(P=G?.[E])!=null?P:0,_e=he?z:J-I[ee]-L[ee]-ne+N.altAxis,Xe=he?J+I[ee]+L[ee]-ne-N.altAxis:re,Fe=p&&he?fT(_e,J,Xe):ea(p?_e:z,J,p?Xe:re);C[E]=Fe,A[E]=Fe-J}e.modifiersData[i]=A}}const jT={name:"preventOverflow",enabled:!0,phase:"main",fn:zT,requiresIfExists:["offset"]};function $T(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function XT(r){return r===Jt(r)||!pi(r)?fd(r):$T(r)}function YT(r){var e=r.getBoundingClientRect(),t=pn(e.width)/r.offsetWidth||1,i=pn(e.height)/r.offsetHeight||1;return t!==1||i!==1}function qT(r,e,t){t===void 0&&(t=!1);var i=pi(e),s=pi(e)&&YT(e),n=$r(e),a=fn(r,s,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((Qi(e)!=="body"||gd(n))&&(o=XT(e)),pi(e)?(l=fn(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):n&&(l.x=md(n))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function KT(r){var e=new Map,t=new Set,i=[];r.forEach(function(n){e.set(n.name,n)});function s(n){t.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&s(l)}}),i.push(n)}return r.forEach(function(n){t.has(n.name)||s(n)}),i}function ZT(r){var e=KT(r);return hT.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function JT(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function QT(r){var e=r.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var Sp={placement:"bottom",modifiers:[],strategy:"absolute"};function Cp(){for(var r=arguments.length,e=new Array(r),t=0;t-1}function Rg(r,e){return typeof r=="function"?r.apply(void 0,e):r}function Mp(r,e){if(e===0)return r;var t;return function(i){clearTimeout(t),t=setTimeout(function(){r(i)},e)}}function nE(r){return r.split(/\s+/).filter(Boolean)}function js(r){return[].concat(r)}function kp(r,e){r.indexOf(e)===-1&&r.push(e)}function aE(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function oE(r){return r.split("-")[0]}function Yo(r){return[].slice.call(r)}function Ip(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function ia(){return document.createElement("div")}function pl(r){return["Element","Fragment"].some(function(e){return yd(r,e)})}function lE(r){return yd(r,"NodeList")}function hE(r){return yd(r,"MouseEvent")}function cE(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function dE(r){return pl(r)?[r]:lE(r)?Yo(r):Array.isArray(r)?r:Yo(document.querySelectorAll(r))}function mh(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Pp(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function uE(r){var e,t=js(r),i=t[0];return i!=null&&(e=i.ownerDocument)!=null&&e.body?i.ownerDocument:document}function pE(r,e){var t=e.clientX,i=e.clientY;return r.every(function(s){var n=s.popperRect,a=s.popperState,o=s.props,l=o.interactiveBorder,c=oE(a.placement),d=a.modifiersData.offset;if(!d)return!0;var h=c==="bottom"?d.top.y:0,u=c==="top"?d.bottom.y:0,p=c==="right"?d.left.x:0,f=c==="left"?d.right.x:0,m=n.top-i+h>l,g=i-n.bottom-u>l,y=n.left-t+p>l,w=t-n.right-f>l;return m||g||y||w})}function gh(r,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){r[i](s,t)})}function Bp(r,e){for(var t=e;t;){var i;if(r.contains(t))return!0;t=t.getRootNode==null||(i=t.getRootNode())==null?void 0:i.host}return!1}var Wi={isTouch:!1},Rp=0;function fE(){Wi.isTouch||(Wi.isTouch=!0,window.performance&&document.addEventListener("mousemove",Lg))}function Lg(){var r=performance.now();r-Rp<20&&(Wi.isTouch=!1,document.removeEventListener("mousemove",Lg)),Rp=r}function mE(){var r=document.activeElement;if(cE(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function gE(){document.addEventListener("touchstart",fE,ss),window.addEventListener("blur",mE)}var yE=typeof window<"u"&&typeof document<"u",vE=yE?!!window.msCrypto:!1,bE={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},wE={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ai=Object.assign({appendTo:Bg,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},bE,wE),_E=Object.keys(Ai),xE=function(e){var t=Object.keys(e);t.forEach(function(i){Ai[i]=e[i]})};function Dg(r){var e=r.plugins||[],t=e.reduce(function(i,s){var n=s.name,a=s.defaultValue;if(n){var o;i[n]=r[n]!==void 0?r[n]:(o=Ai[n])!=null?o:a}return i},{});return Object.assign({},r,t)}function TE(r,e){var t=e?Object.keys(Dg(Object.assign({},Ai,{plugins:e}))):_E,i=t.reduce(function(s,n){var a=(r.getAttribute("data-tippy-"+n)||"").trim();if(!a)return s;if(n==="content")s[n]=a;else try{s[n]=JSON.parse(a)}catch{s[n]=a}return s},{});return i}function Lp(r,e){var t=Object.assign({},e,{content:Rg(e.content,[r])},e.ignoreAttributes?{}:TE(r,e.plugins));return t.aria=Object.assign({},Ai.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var EE=function(){return"innerHTML"};function Lc(r,e){r[EE()]=e}function Dp(r){var e=ia();return r===!0?e.className=Ig:(e.className=Pg,pl(r)?e.appendChild(r):Lc(e,r)),e}function Op(r,e){pl(e.content)?(Lc(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Lc(r,e.content):r.textContent=e.content)}function Dc(r){var e=r.firstElementChild,t=Yo(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(kg)}),arrow:t.find(function(i){return i.classList.contains(Ig)||i.classList.contains(Pg)}),backdrop:t.find(function(i){return i.classList.contains(sE)})}}function Og(r){var e=ia(),t=ia();t.className=rE,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=ia();i.className=kg,i.setAttribute("data-state","hidden"),Op(i,r.props),e.appendChild(t),t.appendChild(i),s(r.props,r.props);function s(n,a){var o=Dc(e),l=o.box,c=o.content,d=o.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(n.content!==a.content||n.allowHTML!==a.allowHTML)&&Op(c,r.props),a.arrow?d?n.arrow!==a.arrow&&(l.removeChild(d),l.appendChild(Dp(a.arrow))):l.appendChild(Dp(a.arrow)):d&&l.removeChild(d)}return{popper:e,onUpdate:s}}Og.$$tippy=!0;var AE=1,to=[],yh=[];function SE(r,e){var t=Lp(r,Object.assign({},Ai,Dg(Ip(e)))),i,s,n,a=!1,o=!1,l=!1,c=!1,d,h,u,p=[],f=Mp(T,t.interactiveDebounce),m,g=AE++,y=null,w=aE(t.plugins),b={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:g,reference:r,popper:ia(),popperInstance:y,props:t,state:b,plugins:w,clearDelayTimeouts:_e,setProps:Xe,setContent:Fe,show:Gt,hide:Yr,hideWithInteractivity:Qt,enable:he,disable:ne,unmount:qr,destroy:at};if(!t.render)return v;var E=t.render(v),C=E.popper,I=E.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+v.id,v.popper=C,r._tippy=v,C._tippy=v;var L=w.map(function(K){return K.fn(v)}),k=r.hasAttribute("aria-expanded");return le(),V(),R(),O("onCreate",[v]),t.showOnCreate&&z(),C.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&x().addEventListener("mousemove",f)}),v;function N(){var K=v.props.touch;return Array.isArray(K)?K:[K,0]}function G(){return N()[0]==="hold"}function A(){var K;return!!((K=v.props.render)!=null&&K.$$tippy)}function S(){return m||r}function x(){var K=S().parentNode;return K?uE(K):document}function D(){return Dc(C)}function $(K){return v.state.isMounted&&!v.state.isVisible||Wi.isTouch||d&&d.type==="focus"?0:fh(v.props.delay,K?0:1,Ai.delay)}function R(K){K===void 0&&(K=!1),C.style.pointerEvents=v.props.interactive&&!K?"":"none",C.style.zIndex=""+v.props.zIndex}function O(K,me,Te){if(Te===void 0&&(Te=!0),L.forEach(function(Ve){Ve[K]&&Ve[K].apply(Ve,me)}),Te){var $e;($e=v.props)[K].apply($e,me)}}function W(){var K=v.props.aria;if(K.content){var me="aria-"+K.content,Te=C.id,$e=js(v.props.triggerTarget||r);$e.forEach(function(Ve){var Ct=Ve.getAttribute(me);if(v.state.isVisible)Ve.setAttribute(me,Ct?Ct+" "+Te:Te);else{var Vt=Ct&&Ct.replace(Te,"").trim();Vt?Ve.setAttribute(me,Vt):Ve.removeAttribute(me)}})}}function V(){if(!(k||!v.props.aria.expanded)){var K=js(v.props.triggerTarget||r);K.forEach(function(me){v.props.interactive?me.setAttribute("aria-expanded",v.state.isVisible&&me===S()?"true":"false"):me.removeAttribute("aria-expanded")})}}function F(){x().removeEventListener("mousemove",f),to=to.filter(function(K){return K!==f})}function U(K){if(!(Wi.isTouch&&(l||K.type==="mousedown"))){var me=K.composedPath&&K.composedPath()[0]||K.target;if(!(v.props.interactive&&Bp(C,me))){if(js(v.props.triggerTarget||r).some(function(Te){return Bp(Te,me)})){if(Wi.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else O("onClickOutside",[v,K]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),o=!0,setTimeout(function(){o=!1}),v.state.isMounted||ye())}}}function te(){l=!0}function Q(){l=!1}function Z(){var K=x();K.addEventListener("mousedown",U,!0),K.addEventListener("touchend",U,ss),K.addEventListener("touchstart",Q,ss),K.addEventListener("touchmove",te,ss)}function ye(){var K=x();K.removeEventListener("mousedown",U,!0),K.removeEventListener("touchend",U,ss),K.removeEventListener("touchstart",Q,ss),K.removeEventListener("touchmove",te,ss)}function Ce(K,me){fe(K,function(){!v.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&me()})}function ce(K,me){fe(K,me)}function fe(K,me){var Te=D().box;function $e(Ve){Ve.target===Te&&(gh(Te,"remove",$e),me())}if(K===0)return me();gh(Te,"remove",h),gh(Te,"add",$e),h=$e}function we(K,me,Te){Te===void 0&&(Te=!1);var $e=js(v.props.triggerTarget||r);$e.forEach(function(Ve){Ve.addEventListener(K,me,Te),p.push({node:Ve,eventType:K,handler:me,options:Te})})}function le(){G()&&(we("touchstart",be,{passive:!0}),we("touchend",X,{passive:!0})),nE(v.props.trigger).forEach(function(K){if(K!=="manual")switch(we(K,be),K){case"mouseenter":we("mouseleave",X);break;case"focus":we(vE?"focusout":"blur",j);break;case"focusin":we("focusout",j);break}})}function pe(){p.forEach(function(K){var me=K.node,Te=K.eventType,$e=K.handler,Ve=K.options;me.removeEventListener(Te,$e,Ve)}),p=[]}function be(K){var me,Te=!1;if(!(!v.state.isEnabled||P(K)||o)){var $e=((me=d)==null?void 0:me.type)==="focus";d=K,m=K.currentTarget,V(),!v.state.isVisible&&hE(K)&&to.forEach(function(Ve){return Ve(K)}),K.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||a)&&v.props.hideOnClick!==!1&&v.state.isVisible?Te=!0:z(K),K.type==="click"&&(a=!Te),Te&&!$e&&re(K)}}function T(K){var me=K.target,Te=S().contains(me)||C.contains(me);if(!(K.type==="mousemove"&&Te)){var $e=ee().concat(C).map(function(Ve){var Ct,Vt=Ve._tippy,tr=(Ct=Vt.popperInstance)==null?void 0:Ct.state;return tr?{popperRect:Ve.getBoundingClientRect(),popperState:tr,props:t}:null}).filter(Boolean);pE($e,K)&&(F(),re(K))}}function X(K){var me=P(K)||v.props.trigger.indexOf("click")>=0&&a;if(!me){if(v.props.interactive){v.hideWithInteractivity(K);return}re(K)}}function j(K){v.props.trigger.indexOf("focusin")<0&&K.target!==S()||v.props.interactive&&K.relatedTarget&&C.contains(K.relatedTarget)||re(K)}function P(K){return Wi.isTouch?G()!==K.type.indexOf("touch")>=0:!1}function M(){H();var K=v.props,me=K.popperOptions,Te=K.placement,$e=K.offset,Ve=K.getReferenceClientRect,Ct=K.moveTransition,Vt=A()?Dc(C).arrow:null,tr=Ve?{getBoundingClientRect:Ve,contextElement:Ve.contextElement||S()}:r,wr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Sa){var Ms=Sa.state;if(A()){var Ey=D(),Cl=Ey.box;["placement","reference-hidden","escaped"].forEach(function(Ca){Ca==="placement"?Cl.setAttribute("data-placement",Ms.placement):Ms.attributes.popper["data-popper-"+Ca]?Cl.setAttribute("data-"+Ca,""):Cl.removeAttribute("data-"+Ca)}),Ms.attributes.popper={}}}},ei=[{name:"offset",options:{offset:$e}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ct}},wr];A()&&Vt&&ei.push({name:"arrow",options:{element:Vt,padding:3}}),ei.push.apply(ei,me?.modifiers||[]),v.popperInstance=iE(tr,C,Object.assign({},me,{placement:Te,onFirstUpdate:u,modifiers:ei}))}function H(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function J(){var K=v.props.appendTo,me,Te=S();v.props.interactive&&K===Bg||K==="parent"?me=Te.parentNode:me=Rg(K,[Te]),me.contains(C)||me.appendChild(C),v.state.isMounted=!0,M()}function ee(){return Yo(C.querySelectorAll("[data-tippy-root]"))}function z(K){v.clearDelayTimeouts(),K&&O("onTrigger",[v,K]),Z();var me=$(!0),Te=N(),$e=Te[0],Ve=Te[1];Wi.isTouch&&$e==="hold"&&Ve&&(me=Ve),me?i=setTimeout(function(){v.show()},me):v.show()}function re(K){if(v.clearDelayTimeouts(),O("onUntrigger",[v,K]),!v.state.isVisible){ye();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(K.type)>=0&&a)){var me=$(!1);me?s=setTimeout(function(){v.state.isVisible&&v.hide()},me):n=requestAnimationFrame(function(){v.hide()})}}function he(){v.state.isEnabled=!0}function ne(){v.hide(),v.state.isEnabled=!1}function _e(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(n)}function Xe(K){if(!v.state.isDestroyed){O("onBeforeUpdate",[v,K]),pe();var me=v.props,Te=Lp(r,Object.assign({},me,Ip(K),{ignoreAttributes:!0}));v.props=Te,le(),me.interactiveDebounce!==Te.interactiveDebounce&&(F(),f=Mp(T,Te.interactiveDebounce)),me.triggerTarget&&!Te.triggerTarget?js(me.triggerTarget).forEach(function($e){$e.removeAttribute("aria-expanded")}):Te.triggerTarget&&r.removeAttribute("aria-expanded"),V(),R(),I&&I(me,Te),v.popperInstance&&(M(),ee().forEach(function($e){requestAnimationFrame($e._tippy.popperInstance.forceUpdate)})),O("onAfterUpdate",[v,K])}}function Fe(K){v.setProps({content:K})}function Gt(){var K=v.state.isVisible,me=v.state.isDestroyed,Te=!v.state.isEnabled,$e=Wi.isTouch&&!v.props.touch,Ve=fh(v.props.duration,0,Ai.duration);if(!(K||me||Te||$e)&&!S().hasAttribute("disabled")&&(O("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,A()&&(C.style.visibility="visible"),R(),Z(),v.state.isMounted||(C.style.transition="none"),A()){var Ct=D(),Vt=Ct.box,tr=Ct.content;mh([Vt,tr],0)}u=function(){var ei;if(!(!v.state.isVisible||c)){if(c=!0,C.offsetHeight,C.style.transition=v.props.moveTransition,A()&&v.props.animation){var Sl=D(),Sa=Sl.box,Ms=Sl.content;mh([Sa,Ms],Ve),Pp([Sa,Ms],"visible")}W(),V(),kp(yh,v),(ei=v.popperInstance)==null||ei.forceUpdate(),O("onMount",[v]),v.props.animation&&A()&&ce(Ve,function(){v.state.isShown=!0,O("onShown",[v])})}},J()}}function Yr(){var K=!v.state.isVisible,me=v.state.isDestroyed,Te=!v.state.isEnabled,$e=fh(v.props.duration,1,Ai.duration);if(!(K||me||Te)&&(O("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,c=!1,a=!1,A()&&(C.style.visibility="hidden"),F(),ye(),R(!0),A()){var Ve=D(),Ct=Ve.box,Vt=Ve.content;v.props.animation&&(mh([Ct,Vt],$e),Pp([Ct,Vt],"hidden"))}W(),V(),v.props.animation?A()&&Ce($e,v.unmount):v.unmount()}}function Qt(K){x().addEventListener("mousemove",f),kp(to,f),f(K)}function qr(){v.state.isVisible&&v.hide(),v.state.isMounted&&(H(),ee().forEach(function(K){K._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),yh=yh.filter(function(K){return K!==v}),v.state.isMounted=!1,O("onHidden",[v]))}function at(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),pe(),delete r._tippy,v.state.isDestroyed=!0,O("onDestroy",[v]))}}function Pt(r,e){e===void 0&&(e={});var t=Ai.plugins.concat(e.plugins||[]);gE();var i=Object.assign({},e,{plugins:t}),s=dE(r),n=s.reduce(function(a,o){var l=o&&SE(o,i);return l&&a.push(l),a},[]);return pl(r)?n[0]:n}Pt.defaultProps=Ai;Pt.setDefaultProps=xE;Pt.currentInput=Wi;Object.assign({},_g,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}});Pt.setDefaultProps({render:Og});const CE="modulepreload",ME=function(r){return"/smeditor/"+r},Fp={},Ke=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(n=>{if(n=ME(n),n in Fp)return;Fp[n]=!0;const a=n.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!i)for(let d=s.length-1;d>=0;d--){const h=s[d];if(h.href===n&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":CE,a||(c.as="script",c.crossOrigin=""),c.href=n,document.head.appendChild(c),a)return new Promise((d,h)=>{c.addEventListener("load",d),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e()).catch(n=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=n,window.dispatchEvent(a),!a.defaultPrevented)throw n})},qo={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],ABORT:["The operation was aborted","AbortError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},kE=r=>typeof r=="object"&&typeof r.type<"u";async function IE(r){var e,t,i;const{FolderHandle:s,FileHandle:n}=await Ke(()=>import("./memory-5d567038.js"),[]),{FileSystemDirectoryHandle:a}=await Ke(()=>Promise.resolve().then(()=>GA),void 0),o=(t=(e=r[0].webkitRelativePath)===null||e===void 0?void 0:e.split("/",1)[0])!==null&&t!==void 0?t:"",l=new s(o,!1);for(let c=0;c(f._entries[m]||(f._entries[m]=new s(m,!1)),f._entries[m]),l);p._entries[u]=new n(d.name,d,!1)}return new a(l)}async function PE(r){const{FileHandle:e}=await Ke(()=>import("./memory-5d567038.js"),[]),{FileSystemFileHandle:t}=await Ke(()=>Promise.resolve().then(()=>Qg),void 0);return Array.from(r).map(s=>new t(new e(s.name,s,!1)))}const Fg=Object.freeze(Object.defineProperty({__proto__:null,errors:qo,isChunkObject:kE,makeDirHandleFromFileList:IE,makeFileHandlesFromFileList:PE},Symbol.toStringTag,{value:"Module"}));var fs={};/*! howler.js v2.2.4 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */(function(r){(function(){var e=function(){this.init()};e.prototype={init:function(){var h=this||t;return h._counter=1e3,h._html5AudioPool=[],h.html5PoolSize=10,h._codecs={},h._howls=[],h._muted=!1,h._volume=1,h._canPlayEvent="canplaythrough",h._navigator=typeof window<"u"&&window.navigator?window.navigator:null,h.masterGain=null,h.noAudio=!1,h.usingWebAudio=!0,h.autoSuspend=!0,h.ctx=null,h.autoUnlock=!0,h._setup(),h},volume:function(h){var u=this||t;if(h=parseFloat(h),u.ctx||d(),h!==void 0&&h>=0&&h<=1){if(u._volume=h,u._muted)return u;u.usingWebAudio&&u.masterGain.gain.setValueAtTime(h,t.ctx.currentTime);for(var p=0;p=0;u--)h._howls[u].unload();return h.usingWebAudio&&h.ctx&&h.ctx.close!==void 0&&(h.ctx.close(),h.ctx=null,d()),h},codecs:function(h){return(this||t)._codecs[h.replace(/^x-/,"")]},_setup:function(){var h=this||t;if(h.state=h.ctx&&h.ctx.state||"suspended",h._autoSuspend(),!h.usingWebAudio)if(typeof Audio<"u")try{var u=new Audio;u.oncanplaythrough===void 0&&(h._canPlayEvent="canplay")}catch{h.noAudio=!0}else h.noAudio=!0;try{var u=new Audio;u.muted&&(h.noAudio=!0)}catch{}return h.noAudio||h._setupCodecs(),h},_setupCodecs:function(){var h=this||t,u=null;try{u=typeof Audio<"u"?new Audio:null}catch{return h}if(!u||typeof u.canPlayType!="function")return h;var p=u.canPlayType("audio/mpeg;").replace(/^no$/,""),f=h._navigator?h._navigator.userAgent:"",m=f.match(/OPR\/(\d+)/g),g=m&&parseInt(m[0].split("/")[1],10)<33,y=f.indexOf("Safari")!==-1&&f.indexOf("Chrome")===-1,w=f.match(/Version\/(.*?) /),b=y&&w&&parseInt(w[1],10)<15;return h._codecs={mp3:!(g||!p&&!u.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!p,opus:!!u.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!u.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!u.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(u.canPlayType('audio/wav; codecs="1"')||u.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!u.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!u.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(u.canPlayType("audio/x-m4a;")||u.canPlayType("audio/m4a;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(u.canPlayType("audio/x-m4b;")||u.canPlayType("audio/m4b;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(u.canPlayType("audio/x-mp4;")||u.canPlayType("audio/mp4;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(b||!u.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(b||!u.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!u.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(u.canPlayType("audio/x-flac;")||u.canPlayType("audio/flac;")).replace(/^no$/,"")},h},_unlockAudio:function(){var h=this||t;if(!h._audioUnlocked&&h.ctx){h._audioUnlocked=!1,h.autoUnlock=!1,h._mobileUnloaded||h.ctx.sampleRate===44100||(h._mobileUnloaded=!0,h.unload()),h._scratchBuffer=h.ctx.createBuffer(1,1,22050);var u=function(p){for(;h._html5AudioPool.length0?y._seek:p._sprite[h][0]/1e3),v=Math.max(0,(p._sprite[h][0]+p._sprite[h][1])/1e3-b),E=1e3*v/Math.abs(y._rate),C=p._sprite[h][0]/1e3,I=(p._sprite[h][0]+p._sprite[h][1])/1e3;y._sprite=h,y._ended=!1;var L=function(){y._paused=!1,y._seek=b,y._start=C,y._stop=I,y._loop=!(!y._loop&&!p._sprite[h][2])};if(b>=I)return void p._ended(y);var k=y._node;if(p._webAudio){var N=function(){p._playLock=!1,L(),p._refreshBuffer(y);var x=y._muted||p._muted?0:y._volume;k.gain.setValueAtTime(x,t.ctx.currentTime),y._playStart=t.ctx.currentTime,k.bufferSource.start===void 0?y._loop?k.bufferSource.noteGrainOn(0,b,86400):k.bufferSource.noteGrainOn(0,b,v):y._loop?k.bufferSource.start(0,b,86400):k.bufferSource.start(0,b,v),E!==1/0&&(p._endTimers[y._id]=setTimeout(p._ended.bind(p,y),E)),u||setTimeout(function(){p._emit("play",y._id),p._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?N():(p._playLock=!0,p.once("resume",N),p._clearTimer(y._id))}else{var G=function(){k.currentTime=b,k.muted=y._muted||p._muted||t._muted||k.muted,k.volume=y._volume*t.volume(),k.playbackRate=y._rate;try{var x=k.play();if(x&&typeof Promise<"u"&&(x instanceof Promise||typeof x.then=="function")?(p._playLock=!0,L(),x.then(function(){p._playLock=!1,k._unlocked=!0,u?p._loadQueue():p._emit("play",y._id)}).catch(function(){p._playLock=!1,p._emit("playerror",y._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),y._ended=!0,y._paused=!0})):u||(p._playLock=!1,L(),p._emit("play",y._id)),k.playbackRate=y._rate,k.paused)return void p._emit("playerror",y._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");h!=="__default"||y._loop?p._endTimers[y._id]=setTimeout(p._ended.bind(p,y),E):(p._endTimers[y._id]=function(){p._ended(y),k.removeEventListener("ended",p._endTimers[y._id],!1)},k.addEventListener("ended",p._endTimers[y._id],!1))}catch(D){p._emit("playerror",y._id,D)}};k.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(k.src=p._src,k.load());var A=window&&window.ejecta||!k.readyState&&t._navigator.isCocoonJS;if(k.readyState>=3||A)G();else{p._playLock=!0,p._state="loading";var S=function(){p._state="loaded",G(),k.removeEventListener(t._canPlayEvent,S,!1)};k.addEventListener(t._canPlayEvent,S,!1),p._clearTimer(y._id)}}return y._id},pause:function(h){var u=this;if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"pause",action:function(){u.pause(h)}}),u;for(var p=u._getSoundIds(h),f=0;f=0?u=parseInt(f[0],10):h=parseFloat(f[0]):f.length>=2&&(h=parseFloat(f[0]),u=parseInt(f[1],10));var m;if(!(h!==void 0&&h>=0&&h<=1))return m=u?p._soundById(u):p._sounds[0],m?m._volume:0;if(p._state!=="loaded"||p._playLock)return p._queue.push({event:"volume",action:function(){p.volume.apply(p,f)}}),p;u===void 0&&(p._volume=h),u=p._getSoundIds(u);for(var g=0;g0?f/v:f),C=Date.now();h._fadeTo=p,h._interval=setInterval(function(){var I=(Date.now()-C)/f;C=Date.now(),w+=b*I,w=Math.round(100*w)/100,w=b<0?Math.max(p,w):Math.min(p,w),y._webAudio?h._volume=w:y.volume(w,h._id,!0),g&&(y._volume=w),(pu&&w>=p)&&(clearInterval(h._interval),h._interval=null,h._fadeTo=null,y.volume(p,h._id),y._emit("fade",h._id))},E)},_stopFade:function(h){var u=this,p=u._soundById(h);return p&&p._interval&&(u._webAudio&&p._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(p._interval),p._interval=null,u.volume(p._fadeTo,h),p._fadeTo=null,u._emit("fade",h)),u},loop:function(){var h,u,p,f=this,m=arguments;if(m.length===0)return f._loop;if(m.length===1){if(typeof m[0]!="boolean")return!!(p=f._soundById(parseInt(m[0],10)))&&p._loop;h=m[0],f._loop=h}else m.length===2&&(h=m[0],u=parseInt(m[1],10));for(var g=f._getSoundIds(u),y=0;y=0?u=parseInt(f[0],10):h=parseFloat(f[0])}else f.length===2&&(h=parseFloat(f[0]),u=parseInt(f[1],10));var y;if(typeof h!="number")return y=p._soundById(u),y?y._rate:p._rate;if(p._state!=="loaded"||p._playLock)return p._queue.push({event:"rate",action:function(){p.rate.apply(p,f)}}),p;u===void 0&&(p._rate=h),u=p._getSoundIds(u);for(var w=0;w=0?u=parseInt(f[0],10):p._sounds.length&&(u=p._sounds[0]._id,h=parseFloat(f[0]))}else f.length===2&&(h=parseFloat(f[0]),u=parseInt(f[1],10));if(u===void 0)return 0;if(typeof h=="number"&&(p._state!=="loaded"||p._playLock))return p._queue.push({event:"seek",action:function(){p.seek.apply(p,f)}}),p;var y=p._soundById(u);if(y){if(!(typeof h=="number"&&h>=0)){if(p._webAudio){var w=p.playing(u)?t.ctx.currentTime-y._playStart:0,b=y._rateSeek?y._rateSeek-y._seek:0;return y._seek+(b+w*Math.abs(y._rate))}return y._node.currentTime}var v=p.playing(u);v&&p.pause(u,!0),y._seek=h,y._ended=!1,p._clearTimer(u),p._webAudio||!y._node||isNaN(y._node.duration)||(y._node.currentTime=h);var E=function(){v&&p.play(u,!0),p._emit("seek",u)};if(v&&!p._webAudio){var C=function(){p._playLock?setTimeout(C,0):E()};setTimeout(C,0)}else E()}return p},playing:function(h){var u=this;if(typeof h=="number"){var p=u._soundById(h);return!!p&&!p._paused}for(var f=0;f=0&&t._howls.splice(f,1);var m=!0;for(p=0;p=0){m=!1;break}return n&&m&&delete n[h._src],t.noAudio=!1,h._state="unloaded",h._sounds=[],h=null,null},on:function(h,u,p,f){var m=this,g=m["_on"+h];return typeof u=="function"&&g.push(f?{id:p,fn:u,once:f}:{id:p,fn:u}),m},off:function(h,u,p){var f=this,m=f["_on"+h],g=0;if(typeof u=="number"&&(p=u,u=null),u||p)for(g=0;g=0;g--)m[g].id&&m[g].id!==u&&h!=="load"||(setTimeout(function(y){y.call(this,u,p)}.bind(f,m[g].fn),0),m[g].once&&f.off(h,m[g].fn,m[g].id));return f._loadQueue(h),f},_loadQueue:function(h){var u=this;if(u._queue.length>0){var p=u._queue[0];p.event===h&&(u._queue.shift(),u._loadQueue()),h||p.action()}return u},_ended:function(h){var u=this,p=h._sprite;if(!u._webAudio&&h._node&&!h._node.paused&&!h._node.ended&&h._node.currentTime=0;f--){if(p<=u)return;h._sounds[f]._ended&&(h._webAudio&&h._sounds[f]._node&&h._sounds[f]._node.disconnect(0),h._sounds.splice(f,1),p--)}}},_getSoundIds:function(h){var u=this;if(h===void 0){for(var p=[],f=0;f=0;if(!h.bufferSource)return u;if(t._scratchBuffer&&h.bufferSource&&(h.bufferSource.onended=null,h.bufferSource.disconnect(0),p))try{h.bufferSource.buffer=t._scratchBuffer}catch{}return h.bufferSource=null,u},_clearSound:function(h){/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent)||(h.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var s=function(h){this._parent=h,this.init()};s.prototype={init:function(){var h=this,u=h._parent;return h._muted=u._muted,h._loop=u._loop,h._volume=u._volume,h._rate=u._rate,h._seek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,u._sounds.push(h),h.create(),h},create:function(){var h=this,u=h._parent,p=t._muted||h._muted||h._parent._muted?0:h._volume;return u._webAudio?(h._node=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),h._node.gain.setValueAtTime(p,t.ctx.currentTime),h._node.paused=!0,h._node.connect(t.masterGain)):t.noAudio||(h._node=t._obtainHtml5Audio(),h._errorFn=h._errorListener.bind(h),h._node.addEventListener("error",h._errorFn,!1),h._loadFn=h._loadListener.bind(h),h._node.addEventListener(t._canPlayEvent,h._loadFn,!1),h._endFn=h._endListener.bind(h),h._node.addEventListener("ended",h._endFn,!1),h._node.src=u._src,h._node.preload=u._preload===!0?"auto":u._preload,h._node.volume=p*t.volume(),h._node.load()),h},reset:function(){var h=this,u=h._parent;return h._muted=u._muted,h._loop=u._loop,h._volume=u._volume,h._rate=u._rate,h._seek=0,h._rateSeek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,h},_errorListener:function(){var h=this;h._parent._emit("loaderror",h._id,h._node.error?h._node.error.code:0),h._node.removeEventListener("error",h._errorFn,!1)},_loadListener:function(){var h=this,u=h._parent;u._duration=Math.ceil(10*h._node.duration)/10,Object.keys(u._sprite).length===0&&(u._sprite={__default:[0,1e3*u._duration]}),u._state!=="loaded"&&(u._state="loaded",u._emit("load"),u._loadQueue()),h._node.removeEventListener(t._canPlayEvent,h._loadFn,!1)},_endListener:function(){var h=this,u=h._parent;u._duration===1/0&&(u._duration=Math.ceil(10*h._node.duration)/10,u._sprite.__default[1]===1/0&&(u._sprite.__default[1]=1e3*u._duration),u._ended(h)),h._node.removeEventListener("ended",h._endFn,!1)}};var n={},a=function(h){var u=h._src;if(n[u])return h._duration=n[u].duration,void c(h);if(/^data:[^;]+;base64,/.test(u)){for(var p=atob(u.split(",")[1]),f=new Uint8Array(p.length),m=0;m0?(n[u._src]=m,c(u,m)):p()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(h).then(f).catch(p):t.ctx.decodeAudioData(h,f,p)},c=function(h,u){u&&!h._duration&&(h._duration=u.duration),Object.keys(h._sprite).length===0&&(h._sprite={__default:[0,1e3*h._duration]}),h._state!=="loaded"&&(h._state="loaded",h._emit("load"),h._loadQueue())},d=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var h=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),u=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),p=u?parseInt(u[1],10):null;if(h&&p&&p<9){var f=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!f&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};r.Howler=t,r.Howl=i,typeof Wt<"u"?(Wt.HowlerGlobal=e,Wt.Howler=t,Wt.Howl=i,Wt.Sound=s):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=i,window.Sound=s)})()})(fs);const BE="/smeditor/assets/assist_tick-b8aada2a.ogg",Ng="/smeditor/assets/metronome_high-6fa54e52.ogg",Ug="/smeditor/assets/metronome_low-4db4e760.ogg",RE="/smeditor/assets/mine-b65ce42d.ogg",fl=[".aac",".mid",".midi",".mp3",".oga",".ogg",".opus",".wav",".webm",".weba",".flac",".aiff"],ns=[".bmp",".gif",".jpeg",".jpg",".png",".tif",".tiff",".webp"],vd=["Hold","Roll"];function Hg(r){return!vd.includes(r.type)}function Le(r){return vd.includes(r.type)}var li="INUMBER",Sn="IOP1",Cn="IOP2",Mn="IOP3",gr="IVAR",As="IVARNAME",gn="IFUNCALL",ml="IFUNDEF",Yt="IEXPR",bd="IEXPREVAL",Cs="IMEMBER",gl="IENDSTATEMENT",yn="IARRAY";function je(r,e){this.type=r,this.value=e??0}je.prototype.toString=function(){switch(this.type){case li:case Sn:case Cn:case Mn:case gr:case As:case gl:return this.value;case gn:return"CALL "+this.value;case ml:return"DEF "+this.value;case yn:return"ARRAY "+this.value;case Cs:return"."+this.value;default:return"Invalid Instruction"}};function yl(r){return new je(Sn,r)}function vr(r){return new je(Cn,r)}function Gg(r){return new je(Mn,r)}function Oc(r,e,t,i,s){for(var n=[],a=[],o,l,c,d,h=0;h1)l=n.pop(),o=n.pop(),d=t[u.value],u=new je(li,d(o.value,l.value)),n.push(u);else if(p===Mn&&n.length>2)c=n.pop(),l=n.pop(),o=n.pop(),u.value==="?"?n.push(o.value?l.value:c.value):(d=i[u.value],u=new je(li,d(o.value,l.value,c.value)),n.push(u));else if(p===Sn&&n.length>0)o=n.pop(),d=e[u.value],u=new je(li,d(o.value)),n.push(u);else if(p===Yt){for(;n.length>0;)a.push(n.shift());a.push(new je(Yt,Oc(u.value,e,t,i,s)))}else if(p===Cs&&n.length>0)o=n.pop(),n.push(new je(li,o.value[u.value]));else{for(;n.length>0;)a.push(n.shift());a.push(u)}}for(;n.length>0;)a.push(n.shift());return a}function Vg(r,e,t){for(var i=[],s=0;s0;)l.unshift(sr(i.pop(),t));if(o=i.pop(),o.apply&&o.call)i.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(p===ml)i.push(function(){for(var m=i.pop(),g=[],y=u.value;y-- >0;)g.unshift(i.pop());var w=i.pop(),b=function(){for(var v=Object.assign({},t),E=0,C=g.length;E0;)l.unshift(i.pop());i.push(l)}else throw new Error("invalid Expression")}if(i.length>1)throw new Error("invalid Expression (parity)");return i[0]===0?0:sr(i[0],t)}function LE(r,e,t){return wd(r)?r:{type:bd,value:function(i){return cs(r.value,e,i)}}}function wd(r){return r&&r.type===bd}function sr(r,e){return wd(r)?r.value(e):r}function _d(r,e){for(var t=[],i,s,n,a,o,l,c=0;c0;)o.unshift(t.pop());a=t.pop(),t.push(a+"("+o.join(", ")+")")}else if(h===ml){for(s=t.pop(),l=d.value,o=[];l-- >0;)o.unshift(t.pop());i=t.pop(),e?t.push("("+i+" = function("+o.join(", ")+") { return "+s+" })"):t.push("("+i+"("+o.join(", ")+") = "+s+")")}else if(h===Cs)i=t.pop(),t.push(i+"."+d.value);else if(h===yn){for(l=d.value,o=[];l-- >0;)o.unshift(t.pop());t.push("["+o.join(", ")+"]")}else if(h===Yt)t.push("("+_d(d.value,e)+")");else if(h!==gl)throw new Error("invalid Expression")}return t.length>1&&(e?t=[t.join(",")]:t=[t.join(";")]),String(t[0])}function Np(r){return typeof r=="string"?JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):r}function Zs(r,e){for(var t=0;t=this.expression.length)return this.newToken(da,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')};ft.prototype.isString=function(){var r=!1,e=this.pos,t=this.expression.charAt(e);if(t==="'"||t==='"')for(var i=this.expression.indexOf(t,e+1);i>=0&&this.pos"9")))break}if(e>r){var i=this.expression.substring(r,e);if(i in this.consts)return this.current=this.newToken(vl,this.consts[i]),this.pos+=i.length,!0}return!1};ft.prototype.isNamedOp=function(){for(var r=this.pos,e=r;e"9")))break}if(e>r){var i=this.expression.substring(r,e);if(this.isOperatorEnabled(i)&&(i in this.binaryOps||i in this.unaryOps||i in this.ternaryOps))return this.current=this.newToken(Ze,i),this.pos+=i.length,!0}return!1};ft.prototype.isName=function(){for(var r=this.pos,e=r,t=!1;e"9"))break}else t=!0}if(t){var s=this.expression.substring(r,e);return this.current=this.newToken(Td,s),this.pos+=s.length,!0}return!1};ft.prototype.isWhitespace=function(){for(var r=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===` `||e==="\r")&&(r=!0,this.pos++,!(this.pos>=this.expression.length));)e=this.expression.charAt(this.pos);return r};var DE=/^[0-9a-f]{4}$/i;ft.prototype.unescape=function(r){var e=r.indexOf("\\");if(e<0)return r;for(var t=r.substring(0,e);e>=0;){var i=r.charAt(++e);switch(i){case"'":t+="'";break;case'"':t+='"';break;case"\\":t+="\\";break;case"/":t+="/";break;case"b":t+="\b";break;case"f":t+="\f";break;case"n":t+=` `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"u":var s=r.substring(e+1,e+5);DE.test(s)||this.parseError("Illegal escape sequence: \\u"+s),t+=String.fromCharCode(parseInt(s,16)),e+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+i+'"')}++e;var n=r.indexOf("\\",e);t+=r.substring(e,n<0?r.length:n),e=n}return t};ft.prototype.isComment=function(){var r=this.expression.charAt(this.pos);return r==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1};ft.prototype.isRadixInteger=function(){var r=this.pos;if(r>=this.expression.length-2||this.expression.charAt(r)!=="0")return!1;++r;var e,t;if(this.expression.charAt(r)==="x")e=16,t=/^[0-9a-f]$/i,++r;else if(this.expression.charAt(r)==="b")e=2,t=/^[01]$/i,++r;else return!1;for(var i=!1,s=r;r="0"&&a<="9"||!s&&a===".");)a==="."?s=!0:n=!0,e++,r=n;if(r&&(i=e),a==="e"||a==="E"){e++;for(var o=!0,l=!1;e="0"&&a<="9")l=!0,o=!1;else break;e++}l||(e=i)}return r?(this.current=this.newToken(vl,parseFloat(this.expression.substring(t,e))),this.pos=e):this.pos=i,r};ft.prototype.isOperator=function(){var r=this.pos,e=this.expression.charAt(this.pos);if(e==="+"||e==="-"||e==="*"||e==="/"||e==="%"||e==="^"||e==="?"||e===":"||e===".")this.current=this.newToken(Ze,e);else if(e==="∙"||e==="•")this.current=this.newToken(Ze,"*");else if(e===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,">="),this.pos++):this.current=this.newToken(Ze,">");else if(e==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"<="),this.pos++):this.current=this.newToken(Ze,"<");else if(e==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ze,"||"),this.pos++;else return!1;else if(e==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"=="),this.pos++):this.current=this.newToken(Ze,e);else if(e==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"!="),this.pos++):this.current=this.newToken(Ze,e);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=r,!1)};ft.prototype.isOperatorEnabled=function(r){return this.parser.isOperatorEnabled(r)};ft.prototype.getCoordinates=function(){var r=0,e,t=-1;do r++,e=this.pos-t,t=this.expression.indexOf(` -`,t+1);while(t>=0&&t"u"?!0:Array.isArray(e)?Zs(e,r.value):typeof e=="function"?e(r):r.value===e};it.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()};it.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken};it.prototype.accept=function(r,e){return this.nextToken.type===r&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1};it.prototype.expect=function(r,e){if(!this.accept(r,e)){var t=this.tokens.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: Expected "+(e||r))}};it.prototype.parseAtom=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.accept(Td)||this.accept(Ze,t))r.push(new je(gr,this.current.value));else if(this.accept(vl))r.push(new je(li,this.current.value));else if(this.accept(Wg))r.push(new je(li,this.current.value));else if(this.accept(yr,"("))this.parseExpression(r),this.expect(yr,")");else if(this.accept(vn,"["))if(this.accept(vn,"]"))r.push(new je(yn,0));else{var i=this.parseArrayList(r);r.push(new je(yn,i))}else throw new Error("unexpected "+this.nextToken)};it.prototype.parseExpression=function(r){var e=[];this.parseUntilEndStatement(r,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(r,e)&&this.pushExpression(r,e))};it.prototype.pushExpression=function(r,e){for(var t=0,i=e.length;t=",">","in"];it.prototype.parseComparison=function(r){for(this.parseAddSub(r);this.accept(Ze,OE);){var e=this.current;this.parseAddSub(r),r.push(vr(e.value))}};var FE=["+","-","||"];it.prototype.parseAddSub=function(r){for(this.parseTerm(r);this.accept(Ze,FE);){var e=this.current;this.parseTerm(r),r.push(vr(e.value))}};var NE=["*","/","%"];it.prototype.parseTerm=function(r){for(this.parseFactor(r);this.accept(Ze,NE);){var e=this.current;this.parseFactor(r),r.push(vr(e.value))}};it.prototype.parseFactor=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.save(),this.accept(Ze,t)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===yr&&this.nextToken.value==="("){this.restore(),this.parseExponential(r);return}else if(this.nextToken.type===Ed||this.nextToken.type===bl||this.nextToken.type===da||this.nextToken.type===yr&&this.nextToken.value===")"){this.restore(),this.parseAtom(r);return}}var i=this.current;this.parseFactor(r),r.push(yl(i.value))}else this.parseExponential(r)};it.prototype.parseExponential=function(r){for(this.parsePostfixExpression(r);this.accept(Ze,"^");)this.parseFactor(r),r.push(vr("^"))};it.prototype.parsePostfixExpression=function(r){for(this.parseFunctionCall(r);this.accept(Ze,"!");)r.push(yl("!"))};it.prototype.parseFunctionCall=function(r){var e=this.tokens.unaryOps;function t(n){return n.value in e}if(this.accept(Ze,t)){var i=this.current;this.parseAtom(r),r.push(yl(i.value))}else for(this.parseMemberExpression(r);this.accept(yr,"(");)if(this.accept(yr,")"))r.push(new je(gn,0));else{var s=this.parseArgumentList(r);r.push(new je(gn,s))}};it.prototype.parseArgumentList=function(r){for(var e=0;!this.accept(yr,")");)for(this.parseExpression(r),++e;this.accept(bl);)this.parseExpression(r),++e;return e};it.prototype.parseMemberExpression=function(r){for(this.parseAtom(r);this.accept(Ze,".")||this.accept(vn,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Td),r.push(new je(Cs,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(r),this.expect(vn,"]"),r.push(vr("["))}else throw new Error("unexpected symbol: "+e.value)}};function UE(r,e){return Number(r)+Number(e)}function HE(r,e){return r-e}function GE(r,e){return r*e}function VE(r,e){return r/e}function WE(r,e){return r%e}function zE(r,e){return Array.isArray(r)&&Array.isArray(e)?r.concat(e):""+r+e}function jE(r,e){return r===e}function $E(r,e){return r!==e}function YE(r,e){return r>e}function XE(r,e){return r=e}function KE(r,e){return r<=e}function ZE(r,e){return!!(r&&e)}function JE(r,e){return!!(r||e)}function QE(r,e){return Zs(e,r)}function eA(r){return(Math.exp(r)-Math.exp(-r))/2}function tA(r){return(Math.exp(r)+Math.exp(-r))/2}function iA(r){return r===1/0?1:r===-1/0?-1:(Math.exp(r)-Math.exp(-r))/(Math.exp(r)+Math.exp(-r))}function rA(r){return r===-1/0?r:Math.log(r+Math.sqrt(r*r+1))}function sA(r){return Math.log(r+Math.sqrt(r*r-1))}function nA(r){return Math.log((1+r)/(1-r))/2}function Up(r){return Math.log(r)*Math.LOG10E}function aA(r){return-r}function oA(r){return!r}function lA(r){return r<0?Math.ceil(r):Math.floor(r)}function hA(r){return Math.random()*(r||1)}function Hp(r){return Ad(r+1)}function cA(r){return isFinite(r)&&r===Math.round(r)}var dA=4.7421875,vh=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function Ad(r){var e,t;if(cA(r)){if(r<=0)return isFinite(r)?1/0:NaN;if(r>171)return 1/0;for(var i=r-2,s=r-1;i>1;)s*=i,i--;return s===0&&(s=1),s}if(r<.5)return Math.PI/(Math.sin(Math.PI*r)*Ad(1-r));if(r>=171.35)return 1/0;if(r>85){var n=r*r,a=n*r,o=a*r,l=o*r;return Math.sqrt(2*Math.PI/r)*Math.pow(r/Math.E,r)*(1+1/(12*r)+1/(288*n)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*r))}--r,t=vh[0];for(var c=1;c0?(s=i/e,r+=s*s):r+=i}return e===1/0?1/0:e*Math.sqrt(r)}function Vp(r,e,t){return r?e:t}function pA(r,e){return typeof e>"u"||+e==0?Math.round(r):(r=+r,e=-+e,isNaN(r)||!(typeof e=="number"&&e%1===0)?NaN:(r=r.toString().split("e"),r=Math.round(+(r[0]+"e"+(r[1]?+r[1]-e:-e))),r=r.toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))))}function fA(r,e,t){return t&&(t[r]=e),e}function mA(r,e){return r[e|0]}function gA(r){return arguments.length===1&&Array.isArray(r)?Math.max.apply(Math,r):Math.max.apply(Math,arguments)}function yA(r){return arguments.length===1&&Array.isArray(r)?Math.min.apply(Math,r):Math.min.apply(Math,arguments)}function vA(r,e){if(typeof r!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(t,i){return r(t,i)})}function bA(r,e,t){if(typeof r!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(t))throw new Error("Second argument to fold is not an array");return t.reduce(function(i,s,n){return r(i,s,n)},e)}function wA(r,e){if(typeof r!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(t,i){return r(t,i)})}function _A(r,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(r)}function xA(r,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(r)}function TA(r){return(r>0)-(r<0)||+r}var Wp=1/3;function EA(r){return r<0?-Math.pow(-r,Wp):Math.pow(r,Wp)}function AA(r){return Math.exp(r)-1}function SA(r){return Math.log(1+r)}function CA(r){return Math.log(r)/Math.LN2}function br(r){this.options=r||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||eA,cosh:Math.cosh||tA,tanh:Math.tanh||iA,asinh:Math.asinh||rA,acosh:Math.acosh||sA,atanh:Math.atanh||nA,sqrt:Math.sqrt,cbrt:Math.cbrt||EA,log:Math.log,log2:Math.log2||CA,ln:Math.log,lg:Math.log10||Up,log10:Math.log10||Up,expm1:Math.expm1||AA,log1p:Math.log1p||SA,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||lA,"-":aA,"+":Number,exp:Math.exp,not:oA,length:uA,"!":Hp,sign:Math.sign||TA},this.binaryOps={"+":UE,"-":HE,"*":GE,"/":VE,"%":WE,"^":Math.pow,"||":zE,"==":jE,"!=":$E,">":YE,"<":XE,">=":qE,"<=":KE,and:ZE,or:JE,in:QE,"=":fA,"[":mA},this.ternaryOps={"?":Vp},this.functions={random:hA,fac:Hp,min:yA,max:gA,hypot:Math.hypot||Gp,pyt:Math.hypot||Gp,pow:Math.pow,atan2:Math.atan2,if:Vp,gamma:Ad,roundTo:pA,map:vA,fold:bA,filter:wA,indexOf:_A,join:xA},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}br.prototype.parse=function(r){var e=[],t=new it(this,new ft(this,r),{allowMemberAccess:this.options.allowMemberAccess});return t.parseExpression(e),t.expect(da,"EOF"),new Ii(e,this)};br.prototype.evaluate=function(r,e){return this.parse(r).evaluate(e)};var jg=new br;br.parse=function(r){return jg.parse(r)};br.evaluate=function(r,e){return jg.parse(r).evaluate(e)};var zp={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function MA(r){return zp.hasOwnProperty(r)?zp[r]:r}br.prototype.isOperatorEnabled=function(r){var e=MA(r),t=this.options.operators||{};return!(e in t)||!!t[e]};const So=[1,1/2,1/3,1/4,1/6,1/8,1/12,1/16,1/24,1/48];function kA(r){for(let e=0;en),r.length==0)return-1;if(e>=t(r[r.length-1])){let n=r.length-1;for(;n>0&&t(r[n-1])==e;)n--;return n}let i=0,s=r.length;for(;i<=s&&i>>1;if(t(r[n])==e){for(;n>0&&t(r[n-1])==e;)n--;return n}t(r[n])e&&(s=n-1)}return Math.max(0,s)}function io(r,e,t){if(t=t??(s=>s),r.length==0)return-1;let i=Lt(r,e,t);for(;r[i-1]&&t(r[i-1])==e;)i--;return i}function jp(r,e){return!(Object.keys(r).some(t=>r[t]!=e[t])||Object.keys(e).some(t=>r[t]!=e[t]))}function ua(r){try{return br.evaluate(r)}catch{return null}}function Ki(r,e){let t=r.length;if(r.length!=0)for(;t--;)e(r[t],t)&&r[t].destroy()}function Nc(r){return r==""?"":r.slice(0,1).toUpperCase()+r.slice(1).toLowerCase()}function Uc(r){return r.button==2||r.getModifierState("Control")&&Si}function KC(){try{return window.self!==window.top}catch{return!0}}function ZC(r,e,t,i,s){const n=[];for(let a=0;a1&&(i.innerHTML+=` (${t})`),i.classList.add("waterfall-item"),Se.messages[e]={type:"",container:i,timeoutID:setTimeout(()=>{i.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(i)},5500),count:t},this.view.appendChild(i)}static createFormatted(e,t){if(this.view==null)return;let i=1;if(this.messages[e]&&this.messages[e].type==t){const n=this.messages[e];clearTimeout(n.timeoutID),clearTimeout(n.clearTimeoutID),i=++n.count,this.view.removeChild(n.container)}const s=document.createElement("div");s.innerHTML=`
${Nc(t)}:
`+e,i>1&&(s.innerHTML+=` (${i})`),s.classList.add("waterfall-item"),console[t](e),Se.messages[e]={type:t,container:s,timeoutID:setTimeout(()=>{s.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(s)},5500),count:i},this.view.appendChild(s)}}class IA{cols=[];keyDown(e){this.cols[e]=(this.cols[e]??0)+1}keyUp(e){this.cols[e]=(this.cols[e]??1)-1,this.cols[e]=Math.max(this.cols[e],0)}isPressed(e){return!!this.cols[e]}getHeldCols(){return this.cols.map((e,t)=>t).filter(e=>this.isPressed(e))}reset(){this.cols=[]}}const $p=["audio.rate","chart.snap","chart.CMod","play.timingCollection"];class Ko{static app={width:800,height:600,fullscreen:!1};static general={spinnerStep:1,smoothAnimations:!0,warnBeforeExit:!0,showPlaybackOptions:!0,theme:"default"};static chart={CMod:!1,reverse:!1,mousePlacement:!1,defaultHoldPlacement:!0,zoom:1,speed:250,snap:1,hideWarpedArrows:!1,hideFakedArrows:!1,doSpeedChanges:!0,drawNoteFlash:!0,drawIcons:!0,receptorYPos:-200,receptorXPos:0,maxDrawBeats:20,maxDrawBeatsBack:10,scroll:{scrollSensitivity:1,scrollSnapEveryScroll:!navigator.userAgent.includes("Mac"),invertZoomScroll:!1,invertReverseScroll:!0},waveform:{enabled:!0,antialiasing:!0,color:"#60617288",allowFilter:!0,filteredColor:"#1e523e88",lineHeight:1,speedChanges:!0},noteLayout:{enabled:!0},npsGraph:{enabled:!1,color1:"#4aa7bcff",color2:"#423c7aff"},timingEventOrder:{left:["LABELS","FAKES","TIMESIGNATURES","DELAYS","WARPS","STOPS","BPMS"],right:["SPEEDS","SCROLLS","TICKCOUNTS","COMBOS","ATTACKS","BGCHANGES","FGCHANGES"]},renderTimingEvent:{BPMS:!0,STOPS:!0,DELAYS:!0,WARPS:!0,FAKES:!0,COMBOS:!0,SPEEDS:!0,LABELS:!0,SCROLLS:!0,TIMESIGNATURES:!0,TICKCOUNTS:!0,BGCHANGES:!0,FGCHANGES:!0,ATTACKS:!0},noteskin:{type:"dance-single",name:"default"},lastNoteskins:{"dance-single":"default","dance-double":"default","dance-couple":"default","dance-solo":"default","dance-solodouble":"default","dance-threepanel":"default","dance-threedouble":"default","pump-single":"default","pump-double":"default","pump-versus":"default","pump-couple":"default","pump-halfdouble":"default"}};static audio={assistTick:!1,metronome:!1,rate:1,masterVolume:1,songVolume:.2,soundEffectVolume:.5,allowFilter:!0};static play={offset:0,effectOffset:0,visualOffset:0,hideBarlines:!1,judgementTilt:!0,timingCollection:"ITG",timingWindowScale:1,timingWindowAdd:0,defaultTimingCollection:{"dance-single":"ITG","dance-double":"ITG","dance-threepanel":"ITG","dance-threedouble":"ITG","dance-solo":"ITG","dance-solodouble":"ITG"}};static performance={antialiasing:!1,resolution:window.devicePixelRatio};static debug={showFPS:!1,showTimers:!1,showScroll:!1,showNoteskinErrors:!1};static experimental={}}class _ extends Ko{static extractOptions(e,t){return Object.entries(e).reduce((i,s)=>{const n=t?t+".":"";return typeof s[1]=="object"&&!Array.isArray(s[1])?i=i.concat(this.extractOptions(s[1],n+s[0])):(s[0]=n+s[0],i.push([s[0],s[1]])),i},[])}static applyOption(e){if(typeof this.getDefaultOption(e[0])!=typeof e[1])return console.warn("Couldn't load option "+e[0]+": the value "+e[1]+" ("+typeof e[1]+") does not match the type "+typeof this.getDefaultOption(e[0]));const t=e[0].split("."),i=t.pop();let s=this;for(const n of t)if(n in s)s=s[n];else return console.warn("Couldn't load option "+e[0]+": the id doesn't exist");s[i]=e[1]}static getDefaultOption(e){const t=e.split(".");let i=Ko;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static getOption(e){const t=e.split(".");let i=this;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static saveOptions(){const e={};for(const t of this.extractOptions(this)){if($p.includes(t[0]))continue;const i=this.getDefaultOption(t[0]);if(i==null){console.warn("Couldn't save option "+t[0]+": the id doesn't exist");continue}typeof i!=typeof t[1]?(console.warn("Couldn't save option "+t[0]+": the value "+t[1]+" does not match the type "+typeof this.getDefaultOption(t[0])),e[t[0]]=i):e[t[0]]=t[1]}localStorage.setItem("options",JSON.stringify(e))}static loadOptions(){const e=localStorage.getItem("options");if(!e)return;const t=JSON.parse(e);if(typeof t!="object")return console.error("Couldn't load options from storage");for(const i of Object.entries(t))$p.includes(i[0])||this.applyOption(i)}static clearSave(){localStorage.removeItem("options")}}const $g={};for(const r of Object.entries(Ko))$g[r[0]]=JSON.parse(JSON.stringify(r[1]));Object.assign(_,$g);class wl{timingWindowMS;dancePoints;lifeChange;constructor(e,t,i){this.timingWindowMS=e,this.dancePoints=t,this.lifeChange=i}getTimingWindowMS(){return this.timingWindowMS*_.play.timingWindowScale+_.play.timingWindowAdd}}class ro extends wl{target="dropped";constructor(e,t){super(0,e,t)}}class Ls extends wl{noteType;constructor(e,t,i,s){super(t,i,s),this.noteType=e}}const PA="/smeditor/assets/judgementITG-5390eacd.png",BA="/smeditor/assets/judgementWaterfall-5bb3f994.png";class st{static ITG=new st(PA,["w0","w1","w2","w3","w4","w5","miss"]);static WATERFALL=new st(BA,["w0","w1","w2","w3","w4","w5","miss"]);texHeight=0;texWidth=0;texture;judgeNames=[];constructor(e,t){this.judgeNames=t,this.loadTex(e)}async loadTex(e){const t=await Ks.load(e);this.texture=t,this.texHeight=t.height,this.texWidth=t.width}getTexture(e,t){if(!this.texture||!this.judgeNames.includes(t.id))return;let i=0;const s=this.judgeNames.indexOf(t.id)*this.texHeight/this.judgeNames.length;return e>=0&&(i+=this.texWidth/2),this.texture.frame=new ke(i,s,this.texWidth/2,this.texHeight/this.judgeNames.length),this.texture}}class so extends wl{target="mine";constructor(e,t,i){super(e,t,i)}}class wt extends wl{id;name;color;judgementTexture;constructor(e,t,i,s,n,a,o){super(s,n,a),this.id=e,this.name=t,this.color=i,this.judgementTexture=o}}const Yg=new wt("w0","Fantastic",183528,0,0,0,st.ITG);class no extends wt{constructor(e,t,i,s,n){super("miss",e,t,0,i,s,n)}}function Zi(r){return r.color!=null&&r.id!="miss"}function Pi(r){return r.color!=null&&r.id=="miss"}function ws(r){return!!r.noteType}function bn(r){return r.target=="dropped"}function _l(r){return r.target=="mine"}class Je{static COLLECTIONS={ITG:new Je([new wt("w0","Fantastic",2215144,23,5,.008,st.ITG),new wt("w2","Excellent",14851096,44.5,4,.008,st.ITG),new wt("w3","Great",6736213,103.5,2,.004,st.ITG),new wt("w4","Decent",11820287,136.5,0,0,st.ITG),new wt("w5","Way Off",13206878,181.5,-6,-.05,st.ITG),new no("Miss",16724016,-12,-.1,st.ITG),new Ls("Hold",321.5,5,-.008),new Ls("Roll",351.5,5,-.008),new ro(0,-.08),new so(71.5,-6,-.05)],103.5),FA:new Je([new wt("w0","Fantastic",2215144,15,3.5,.008,st.ITG),new wt("w1","Fantastic",16777215,23,3,.008,st.ITG),new wt("w2","Excellent",14851096,44.5,2,.008,st.ITG),new wt("w3","Great",6736213,103.5,1,.004,st.ITG),new wt("w4","Decent",11820287,136.5,0,0,st.ITG),new wt("w5","Way Off",13206878,181.5,0,-.05,st.ITG),new no("Miss",16724016,0,-.1,st.ITG),new Ls("Hold",321.5,1,-.008),new Ls("Roll",351.5,1,-.008),new ro(0,-.08),new so(71.5,-1,-.05)],103.5),WATERFALL:new Je([new wt("w0","Masterful",16711870,15,10,.008,st.WATERFALL),new wt("w2","Awesome",16776960,30,9,.008,st.WATERFALL),new wt("w3","Solid",51200,50,6,.008,st.WATERFALL),new wt("w4","OK",33023,100,3,.004,st.WATERFALL),new wt("w5","Fault",8421504,160,0,0,st.WATERFALL),new no("Miss",16724016,0,-.1,st.WATERFALL),new Ls("Hold",300,6,-.008),new Ls("Roll",350,6,-.008),new ro(0,-.08),new so(71.5,-3,-.05)],100)};windows=[];holdWindows={};missWindow;droppedWindow;mineWindow;hideLimitMS;constructor(e,t){this.missWindow=new no("Miss",16724016,-12,-.1,st.ITG),this.droppedWindow=new ro(0,-.08),this.mineWindow=new so(71.5,-1,-.05);for(const i of e)Zi(i)?this.windows.push(i):Pi(i)?this.missWindow=i:ws(i)?this.holdWindows[i.noteType]=i:bn(i)?this.droppedWindow=i:_l(i)&&(this.mineWindow=i);this.windows.sort((i,s)=>i.timingWindowMS-s.timingWindowMS),this.hideLimitMS=t}judgeInput(e){for(const t of this.windows)if(t.getTimingWindowMS()/1e3>=Math.abs(e))return t;return this.missWindow}getHeldJudgement(e){return this.holdWindows[e.type]}getMissJudgement(){return this.missWindow}getDroppedJudgement(){return this.droppedWindow}getMineJudgement(){return this.mineWindow}shouldHideNote(e){return e.id!="miss"&&e.timingWindowMS<=this.hideLimitMS}maxWindowMS(){return this.windows.at(-1)?.getTimingWindowMS()??0}getMaxDancePoints(){return Math.max(...this.windows.map(e=>e.dancePoints),this.missWindow.dancePoints)}getMaxHoldDancePoints(e){return Math.max(this.holdWindows[e].dancePoints??0,this.droppedWindow.dancePoints)}getStandardWindows(){return[...this.windows]}getHoldWindows(){return[...Object.values(this.holdWindows)]}static getCollection(e){return this.COLLECTIONS[e]??this.COLLECTIONS.ITG}static getCollections(){return Je.COLLECTIONS}}class RA{}class Yr extends RA{chordCohesion=new Map;missNoteIndex=0;holdProgress=[];heldCols=new IA;collection=Je.getCollection("ITG");usesHoldTicks=!1;update(e){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=-1;for(;e.loadedChart.getNotedata()[this.missNoteIndex]&&e.loadedChart.getNotedata()[this.missNoteIndex].second=e.chartView.chart.getSecondsFromBeat(n.beat+n.hold)&&(n.gameplay.hideNote=!0,e.chartView.doJudgement(n,null,this.collection.getHeldJudgement(n)),e.chartView.getNotefield().releaseHold(n.col),this.holdProgress.splice(this.holdProgress.indexOf(n),1),e.gameStats?.addHoldDataPoint(n,this.collection.getHeldJudgement(n)))}for(const n of this.heldCols.getHeldCols()){const a=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,n,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);a&&(a.gameplay.hasHit=!0,a.gameplay.hideNote=!0,e.chartView.doJudgement(a,null,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([a],this.collection.getMineJudgement(),null),e.mine.play())}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=Je.getCollection(_.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=Lt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdProgress=[],this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const n of this.holdProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now());s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}keyUp(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Lift"]);this.heldCols.keyUp(t),e.chartView.getNotefield().lift(t),s&&this.hitNote(e,s,i)}shouldAssistTick(e){return!e.fake&&!e.warped&&e.type!="Mine"}hitNote(e,t,i){t.gameplay.hasHit=!0,Le(t)&&(t.gameplay.lastHoldActivation=Date.now(),t.type=="Roll"?e.chartView.getNotefield().activateRoll(t.col):e.chartView.getNotefield().activateHold(t.col),this.holdProgress.push(t));const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/_.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/_.audio.rate,n),a&&Hg(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/_.audio.rate)}}getClosestNote(e,t,i,s,n){n=n??this.collection.maxWindowMS(),n*=_.audio.rate;const a=t-n/1e3,o=t+n/1e3;let l=Lt(e,a,d=>d.second)+1;l>=1&&a<=e[l-1].second&&l--;let c;for(;e[l]&&e[l].second<=o;){const d=e[l];if(d.gameplay.hasHit||d.col!=i||d.fake||d.warped||!s.includes(d.type)){l++;continue}(!c||Math.abs(d.second-t)=i.getTimingWindowMS():!1}calculateMaxDP(e,t){const i=new Map,s=new Map;for(const a of e)a.type=="Mine"||a.fake||a.warped||(Le(a)&&(s.has(a.type)||s.set(a.type,0),s.set(a.type,s.get(a.type)+1)),i.has(a.beat)||i.set(a.beat,[]),i.get(a.beat).push(a));let n=i.size*Je.getCollection(_.play.timingCollection).getMaxDancePoints();return n+=Array.from(s.entries()).reduce((a,o)=>a+o[1]*Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(o[0]),0),n}}function Ht(r,e,t){return r*(1-t)+e*t}function Nt(r,e,t){return(t-r)/(e-r)}function ae(r,e){return Math.round(r*Math.pow(10,e))/Math.pow(10,e)}function Be(r,e,t){return Math.max(e,Math.min(t,r))}function Xg(r){if(r.length==0)return 0;const e=r.length,t=r.reduce((i,s)=>i+s)/e;return Math.sqrt(r.map(i=>Math.pow(i-t,2)).reduce((i,s)=>i+s)/e)}function xl(r){if(r.length==0)return 0;r=[...r],r.sort((t,i)=>t-i);const e=Math.floor(r.length/2);return r.length%2?r[e]:(r[e-1]+r[e])/2}function LA(r){return r.length==0?0:r.reduce((e,t)=>e+t)/r.length}function qg(r,e){return e?qg(e,r%e):e===0?r:NaN}function Kg(r,e){return r*e/qg(r,e)}function Yp(r){let e=1;for(let t=0;te&&(e=t);return e}class DA{}const OA={1:"Tap",2:"Hold",4:"Roll",M:"Mine",F:"Fake",L:"Lift"},FA={Tap:"1",Hold:"2",Roll:"4",Mine:"M",Fake:"F",Lift:"L"};class yi extends DA{serialize(e,t){if(e.length==0)return"";const i=[];let s=0;const n=e.filter(Le).map(c=>({col:c.col,beat:c.beat+c.hold})).sort((c,d)=>c.beat-d.beat),a=e.at(-1),o=a.beat+(Le(a)?a.hold:0);let l=Math.ceil(o/4);o%4==0&&l++;for(let c=0;cFc(f.beat))),Yp(u.map(f=>Fc(f.beat)))));for(let f=0;f=0&&t"u"?!0:Array.isArray(e)?Zs(e,r.value):typeof e=="function"?e(r):r.value===e};it.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()};it.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken};it.prototype.accept=function(r,e){return this.nextToken.type===r&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1};it.prototype.expect=function(r,e){if(!this.accept(r,e)){var t=this.tokens.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: Expected "+(e||r))}};it.prototype.parseAtom=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.accept(Td)||this.accept(Ze,t))r.push(new je(gr,this.current.value));else if(this.accept(vl))r.push(new je(li,this.current.value));else if(this.accept(Wg))r.push(new je(li,this.current.value));else if(this.accept(yr,"("))this.parseExpression(r),this.expect(yr,")");else if(this.accept(vn,"["))if(this.accept(vn,"]"))r.push(new je(yn,0));else{var i=this.parseArrayList(r);r.push(new je(yn,i))}else throw new Error("unexpected "+this.nextToken)};it.prototype.parseExpression=function(r){var e=[];this.parseUntilEndStatement(r,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(r,e)&&this.pushExpression(r,e))};it.prototype.pushExpression=function(r,e){for(var t=0,i=e.length;t=",">","in"];it.prototype.parseComparison=function(r){for(this.parseAddSub(r);this.accept(Ze,OE);){var e=this.current;this.parseAddSub(r),r.push(vr(e.value))}};var FE=["+","-","||"];it.prototype.parseAddSub=function(r){for(this.parseTerm(r);this.accept(Ze,FE);){var e=this.current;this.parseTerm(r),r.push(vr(e.value))}};var NE=["*","/","%"];it.prototype.parseTerm=function(r){for(this.parseFactor(r);this.accept(Ze,NE);){var e=this.current;this.parseFactor(r),r.push(vr(e.value))}};it.prototype.parseFactor=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.save(),this.accept(Ze,t)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===yr&&this.nextToken.value==="("){this.restore(),this.parseExponential(r);return}else if(this.nextToken.type===Ed||this.nextToken.type===bl||this.nextToken.type===da||this.nextToken.type===yr&&this.nextToken.value===")"){this.restore(),this.parseAtom(r);return}}var i=this.current;this.parseFactor(r),r.push(yl(i.value))}else this.parseExponential(r)};it.prototype.parseExponential=function(r){for(this.parsePostfixExpression(r);this.accept(Ze,"^");)this.parseFactor(r),r.push(vr("^"))};it.prototype.parsePostfixExpression=function(r){for(this.parseFunctionCall(r);this.accept(Ze,"!");)r.push(yl("!"))};it.prototype.parseFunctionCall=function(r){var e=this.tokens.unaryOps;function t(n){return n.value in e}if(this.accept(Ze,t)){var i=this.current;this.parseAtom(r),r.push(yl(i.value))}else for(this.parseMemberExpression(r);this.accept(yr,"(");)if(this.accept(yr,")"))r.push(new je(gn,0));else{var s=this.parseArgumentList(r);r.push(new je(gn,s))}};it.prototype.parseArgumentList=function(r){for(var e=0;!this.accept(yr,")");)for(this.parseExpression(r),++e;this.accept(bl);)this.parseExpression(r),++e;return e};it.prototype.parseMemberExpression=function(r){for(this.parseAtom(r);this.accept(Ze,".")||this.accept(vn,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Td),r.push(new je(Cs,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(r),this.expect(vn,"]"),r.push(vr("["))}else throw new Error("unexpected symbol: "+e.value)}};function UE(r,e){return Number(r)+Number(e)}function HE(r,e){return r-e}function GE(r,e){return r*e}function VE(r,e){return r/e}function WE(r,e){return r%e}function zE(r,e){return Array.isArray(r)&&Array.isArray(e)?r.concat(e):""+r+e}function jE(r,e){return r===e}function $E(r,e){return r!==e}function XE(r,e){return r>e}function YE(r,e){return r=e}function KE(r,e){return r<=e}function ZE(r,e){return!!(r&&e)}function JE(r,e){return!!(r||e)}function QE(r,e){return Zs(e,r)}function eA(r){return(Math.exp(r)-Math.exp(-r))/2}function tA(r){return(Math.exp(r)+Math.exp(-r))/2}function iA(r){return r===1/0?1:r===-1/0?-1:(Math.exp(r)-Math.exp(-r))/(Math.exp(r)+Math.exp(-r))}function rA(r){return r===-1/0?r:Math.log(r+Math.sqrt(r*r+1))}function sA(r){return Math.log(r+Math.sqrt(r*r-1))}function nA(r){return Math.log((1+r)/(1-r))/2}function Up(r){return Math.log(r)*Math.LOG10E}function aA(r){return-r}function oA(r){return!r}function lA(r){return r<0?Math.ceil(r):Math.floor(r)}function hA(r){return Math.random()*(r||1)}function Hp(r){return Ad(r+1)}function cA(r){return isFinite(r)&&r===Math.round(r)}var dA=4.7421875,vh=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function Ad(r){var e,t;if(cA(r)){if(r<=0)return isFinite(r)?1/0:NaN;if(r>171)return 1/0;for(var i=r-2,s=r-1;i>1;)s*=i,i--;return s===0&&(s=1),s}if(r<.5)return Math.PI/(Math.sin(Math.PI*r)*Ad(1-r));if(r>=171.35)return 1/0;if(r>85){var n=r*r,a=n*r,o=a*r,l=o*r;return Math.sqrt(2*Math.PI/r)*Math.pow(r/Math.E,r)*(1+1/(12*r)+1/(288*n)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*r))}--r,t=vh[0];for(var c=1;c0?(s=i/e,r+=s*s):r+=i}return e===1/0?1/0:e*Math.sqrt(r)}function Vp(r,e,t){return r?e:t}function pA(r,e){return typeof e>"u"||+e==0?Math.round(r):(r=+r,e=-+e,isNaN(r)||!(typeof e=="number"&&e%1===0)?NaN:(r=r.toString().split("e"),r=Math.round(+(r[0]+"e"+(r[1]?+r[1]-e:-e))),r=r.toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))))}function fA(r,e,t){return t&&(t[r]=e),e}function mA(r,e){return r[e|0]}function gA(r){return arguments.length===1&&Array.isArray(r)?Math.max.apply(Math,r):Math.max.apply(Math,arguments)}function yA(r){return arguments.length===1&&Array.isArray(r)?Math.min.apply(Math,r):Math.min.apply(Math,arguments)}function vA(r,e){if(typeof r!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(t,i){return r(t,i)})}function bA(r,e,t){if(typeof r!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(t))throw new Error("Second argument to fold is not an array");return t.reduce(function(i,s,n){return r(i,s,n)},e)}function wA(r,e){if(typeof r!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(t,i){return r(t,i)})}function _A(r,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(r)}function xA(r,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(r)}function TA(r){return(r>0)-(r<0)||+r}var Wp=1/3;function EA(r){return r<0?-Math.pow(-r,Wp):Math.pow(r,Wp)}function AA(r){return Math.exp(r)-1}function SA(r){return Math.log(1+r)}function CA(r){return Math.log(r)/Math.LN2}function br(r){this.options=r||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||eA,cosh:Math.cosh||tA,tanh:Math.tanh||iA,asinh:Math.asinh||rA,acosh:Math.acosh||sA,atanh:Math.atanh||nA,sqrt:Math.sqrt,cbrt:Math.cbrt||EA,log:Math.log,log2:Math.log2||CA,ln:Math.log,lg:Math.log10||Up,log10:Math.log10||Up,expm1:Math.expm1||AA,log1p:Math.log1p||SA,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||lA,"-":aA,"+":Number,exp:Math.exp,not:oA,length:uA,"!":Hp,sign:Math.sign||TA},this.binaryOps={"+":UE,"-":HE,"*":GE,"/":VE,"%":WE,"^":Math.pow,"||":zE,"==":jE,"!=":$E,">":XE,"<":YE,">=":qE,"<=":KE,and:ZE,or:JE,in:QE,"=":fA,"[":mA},this.ternaryOps={"?":Vp},this.functions={random:hA,fac:Hp,min:yA,max:gA,hypot:Math.hypot||Gp,pyt:Math.hypot||Gp,pow:Math.pow,atan2:Math.atan2,if:Vp,gamma:Ad,roundTo:pA,map:vA,fold:bA,filter:wA,indexOf:_A,join:xA},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}br.prototype.parse=function(r){var e=[],t=new it(this,new ft(this,r),{allowMemberAccess:this.options.allowMemberAccess});return t.parseExpression(e),t.expect(da,"EOF"),new Ii(e,this)};br.prototype.evaluate=function(r,e){return this.parse(r).evaluate(e)};var jg=new br;br.parse=function(r){return jg.parse(r)};br.evaluate=function(r,e){return jg.parse(r).evaluate(e)};var zp={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function MA(r){return zp.hasOwnProperty(r)?zp[r]:r}br.prototype.isOperatorEnabled=function(r){var e=MA(r),t=this.options.operators||{};return!(e in t)||!!t[e]};const So=[1,1/2,1/3,1/4,1/6,1/8,1/12,1/16,1/24,1/48];function kA(r){for(let e=0;en),r.length==0)return-1;if(e>=t(r[r.length-1])){let n=r.length-1;for(;n>0&&t(r[n-1])==e;)n--;return n}let i=0,s=r.length;for(;i<=s&&i>>1;if(t(r[n])==e){for(;n>0&&t(r[n-1])==e;)n--;return n}t(r[n])e&&(s=n-1)}return Math.max(0,s)}function io(r,e,t){if(t=t??(s=>s),r.length==0)return-1;let i=Lt(r,e,t);for(;r[i-1]&&t(r[i-1])==e;)i--;return i}function jp(r,e){return!(Object.keys(r).some(t=>r[t]!=e[t])||Object.keys(e).some(t=>r[t]!=e[t]))}function ua(r){try{return br.evaluate(r)}catch{return null}}function Ki(r,e){let t=r.length;if(r.length!=0)for(;t--;)e(r[t],t)&&r[t].destroy()}function Nc(r){return r==""?"":r.slice(0,1).toUpperCase()+r.slice(1).toLowerCase()}function Uc(r){return r.button==2||r.getModifierState("Control")&&Si}function KC(){try{return window.self!==window.top}catch{return!0}}function ZC(r,e,t,i,s){const n=[];for(let a=0;a1&&(i.innerHTML+=` (${t})`),i.classList.add("waterfall-item"),Se.messages[e]={type:"",container:i,timeoutID:setTimeout(()=>{i.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(i)},5500),count:t},this.view.appendChild(i)}static createFormatted(e,t){if(this.view==null)return;let i=1;if(this.messages[e]&&this.messages[e].type==t){const n=this.messages[e];clearTimeout(n.timeoutID),clearTimeout(n.clearTimeoutID),i=++n.count,this.view.removeChild(n.container)}const s=document.createElement("div");s.innerHTML=`
${Nc(t)}:
`+e,i>1&&(s.innerHTML+=` (${i})`),s.classList.add("waterfall-item"),console[t](e),Se.messages[e]={type:t,container:s,timeoutID:setTimeout(()=>{s.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(s)},5500),count:i},this.view.appendChild(s)}}class IA{cols=[];keyDown(e){this.cols[e]=(this.cols[e]??0)+1}keyUp(e){this.cols[e]=(this.cols[e]??1)-1,this.cols[e]=Math.max(this.cols[e],0)}isPressed(e){return!!this.cols[e]}getHeldCols(){return this.cols.map((e,t)=>t).filter(e=>this.isPressed(e))}reset(){this.cols=[]}}const $p=["audio.rate","chart.snap","chart.CMod","play.timingCollection"];class Ko{static app={width:800,height:600,fullscreen:!1};static general={spinnerStep:1,smoothAnimations:!0,warnBeforeExit:!0,showPlaybackOptions:!0,theme:"default"};static chart={CMod:!1,reverse:!1,mousePlacement:!1,defaultHoldPlacement:!0,zoom:1,speed:250,snap:1,hideWarpedArrows:!1,hideFakedArrows:!1,doSpeedChanges:!0,drawNoteFlash:!0,drawIcons:!0,allowReceptorDrag:!0,receptorYPos:-250,receptorXPos:0,maxDrawBeats:20,maxDrawBeatsBack:10,scroll:{scrollSensitivity:1,scrollSnapEveryScroll:!navigator.userAgent.includes("Mac"),invertZoomScroll:!1,invertReverseScroll:!0},waveform:{enabled:!0,antialiasing:!0,color:"#60617288",allowFilter:!0,filteredColor:"#1e523e88",lineHeight:1,speedChanges:!0},noteLayout:{enabled:!0},npsGraph:{enabled:!1,color1:"#4aa7bcff",color2:"#423c7aff"},timingEventOrder:{left:["LABELS","FAKES","TIMESIGNATURES","DELAYS","WARPS","STOPS","BPMS"],right:["SPEEDS","SCROLLS","TICKCOUNTS","COMBOS","ATTACKS","BGCHANGES","FGCHANGES"]},renderTimingEvent:{BPMS:!0,STOPS:!0,DELAYS:!0,WARPS:!0,FAKES:!0,COMBOS:!0,SPEEDS:!0,LABELS:!0,SCROLLS:!0,TIMESIGNATURES:!0,TICKCOUNTS:!0,BGCHANGES:!0,FGCHANGES:!0,ATTACKS:!0},noteskin:{type:"dance-single",name:"default"},lastNoteskins:{"dance-single":"default","dance-double":"default","dance-couple":"default","dance-solo":"default","dance-solodouble":"default","dance-threepanel":"default","dance-threedouble":"default","pump-single":"default","pump-double":"default","pump-versus":"default","pump-couple":"default","pump-halfdouble":"default"}};static audio={assistTick:!1,metronome:!1,rate:1,masterVolume:1,songVolume:.2,soundEffectVolume:.5,allowFilter:!0};static play={offset:0,effectOffset:0,visualOffset:0,hideBarlines:!1,judgementTilt:!0,timingCollection:"ITG",timingWindowScale:1,timingWindowAdd:0,defaultTimingCollection:{"dance-single":"ITG","dance-double":"ITG","dance-threepanel":"ITG","dance-threedouble":"ITG","dance-solo":"ITG","dance-solodouble":"ITG"}};static performance={antialiasing:!1,resolution:window.devicePixelRatio};static debug={showFPS:!1,showTimers:!1,showScroll:!1,showNoteskinErrors:!1};static experimental={}}class _ extends Ko{static extractOptions(e,t){return Object.entries(e).reduce((i,s)=>{const n=t?t+".":"";return typeof s[1]=="object"&&!Array.isArray(s[1])?i=i.concat(this.extractOptions(s[1],n+s[0])):(s[0]=n+s[0],i.push([s[0],s[1]])),i},[])}static applyOption(e){if(typeof this.getDefaultOption(e[0])!=typeof e[1])return console.warn("Couldn't load option "+e[0]+": the value "+e[1]+" ("+typeof e[1]+") does not match the type "+typeof this.getDefaultOption(e[0]));const t=e[0].split("."),i=t.pop();let s=this;for(const n of t)if(n in s)s=s[n];else return console.warn("Couldn't load option "+e[0]+": the id doesn't exist");s[i]=e[1]}static getDefaultOption(e){const t=e.split(".");let i=Ko;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static getOption(e){const t=e.split(".");let i=this;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static saveOptions(){const e={};for(const t of this.extractOptions(this)){if($p.includes(t[0]))continue;const i=this.getDefaultOption(t[0]);if(i==null){console.warn("Couldn't save option "+t[0]+": the id doesn't exist");continue}typeof i!=typeof t[1]?(console.warn("Couldn't save option "+t[0]+": the value "+t[1]+" does not match the type "+typeof this.getDefaultOption(t[0])),e[t[0]]=i):e[t[0]]=t[1]}localStorage.setItem("options",JSON.stringify(e))}static loadOptions(){const e=localStorage.getItem("options");if(!e)return;const t=JSON.parse(e);if(typeof t!="object")return console.error("Couldn't load options from storage");for(const i of Object.entries(t))$p.includes(i[0])||this.applyOption(i)}static clearSave(){localStorage.removeItem("options")}}const $g={};for(const r of Object.entries(Ko))$g[r[0]]=JSON.parse(JSON.stringify(r[1]));Object.assign(_,$g);class wl{timingWindowMS;dancePoints;lifeChange;constructor(e,t,i){this.timingWindowMS=e,this.dancePoints=t,this.lifeChange=i}getTimingWindowMS(){return this.timingWindowMS*_.play.timingWindowScale+_.play.timingWindowAdd}}class ro extends wl{target="dropped";constructor(e,t){super(0,e,t)}}class Ls extends wl{noteType;constructor(e,t,i,s){super(t,i,s),this.noteType=e}}const PA="/smeditor/assets/judgementITG-5390eacd.png",BA="/smeditor/assets/judgementWaterfall-5bb3f994.png";class st{static ITG=new st(PA,["w0","w1","w2","w3","w4","w5","miss"]);static WATERFALL=new st(BA,["w0","w1","w2","w3","w4","w5","miss"]);texHeight=0;texWidth=0;texture;judgeNames=[];constructor(e,t){this.judgeNames=t,this.loadTex(e)}async loadTex(e){const t=await Ks.load(e);this.texture=t,this.texHeight=t.height,this.texWidth=t.width}getTexture(e,t){if(!this.texture||!this.judgeNames.includes(t.id))return;let i=0;const s=this.judgeNames.indexOf(t.id)*this.texHeight/this.judgeNames.length;return e>=0&&(i+=this.texWidth/2),this.texture.frame=new ke(i,s,this.texWidth/2,this.texHeight/this.judgeNames.length),this.texture}}class so extends wl{target="mine";constructor(e,t,i){super(e,t,i)}}class wt extends wl{id;name;color;judgementTexture;constructor(e,t,i,s,n,a,o){super(s,n,a),this.id=e,this.name=t,this.color=i,this.judgementTexture=o}}const Xg=new wt("w0","Fantastic",183528,0,0,0,st.ITG);class no extends wt{constructor(e,t,i,s,n){super("miss",e,t,0,i,s,n)}}function Zi(r){return r.color!=null&&r.id!="miss"}function Pi(r){return r.color!=null&&r.id=="miss"}function ws(r){return!!r.noteType}function bn(r){return r.target=="dropped"}function _l(r){return r.target=="mine"}class Je{static COLLECTIONS={ITG:new Je([new wt("w0","Fantastic",2215144,23,5,.008,st.ITG),new wt("w2","Excellent",14851096,44.5,4,.008,st.ITG),new wt("w3","Great",6736213,103.5,2,.004,st.ITG),new wt("w4","Decent",11820287,136.5,0,0,st.ITG),new wt("w5","Way Off",13206878,181.5,-6,-.05,st.ITG),new no("Miss",16724016,-12,-.1,st.ITG),new Ls("Hold",321.5,5,-.008),new Ls("Roll",351.5,5,-.008),new ro(0,-.08),new so(71.5,-6,-.05)],103.5),FA:new Je([new wt("w0","Fantastic",2215144,15,3.5,.008,st.ITG),new wt("w1","Fantastic",16777215,23,3,.008,st.ITG),new wt("w2","Excellent",14851096,44.5,2,.008,st.ITG),new wt("w3","Great",6736213,103.5,1,.004,st.ITG),new wt("w4","Decent",11820287,136.5,0,0,st.ITG),new wt("w5","Way Off",13206878,181.5,0,-.05,st.ITG),new no("Miss",16724016,0,-.1,st.ITG),new Ls("Hold",321.5,1,-.008),new Ls("Roll",351.5,1,-.008),new ro(0,-.08),new so(71.5,-1,-.05)],103.5),WATERFALL:new Je([new wt("w0","Masterful",16711870,15,10,.008,st.WATERFALL),new wt("w2","Awesome",16776960,30,9,.008,st.WATERFALL),new wt("w3","Solid",51200,50,6,.008,st.WATERFALL),new wt("w4","OK",33023,100,3,.004,st.WATERFALL),new wt("w5","Fault",8421504,160,0,0,st.WATERFALL),new no("Miss",16724016,0,-.1,st.WATERFALL),new Ls("Hold",300,6,-.008),new Ls("Roll",350,6,-.008),new ro(0,-.08),new so(71.5,-3,-.05)],100)};windows=[];holdWindows={};missWindow;droppedWindow;mineWindow;hideLimitMS;constructor(e,t){this.missWindow=new no("Miss",16724016,-12,-.1,st.ITG),this.droppedWindow=new ro(0,-.08),this.mineWindow=new so(71.5,-1,-.05);for(const i of e)Zi(i)?this.windows.push(i):Pi(i)?this.missWindow=i:ws(i)?this.holdWindows[i.noteType]=i:bn(i)?this.droppedWindow=i:_l(i)&&(this.mineWindow=i);this.windows.sort((i,s)=>i.timingWindowMS-s.timingWindowMS),this.hideLimitMS=t}judgeInput(e){for(const t of this.windows)if(t.getTimingWindowMS()/1e3>=Math.abs(e))return t;return this.missWindow}getHeldJudgement(e){return this.holdWindows[e.type]}getMissJudgement(){return this.missWindow}getDroppedJudgement(){return this.droppedWindow}getMineJudgement(){return this.mineWindow}shouldHideNote(e){return e.id!="miss"&&e.timingWindowMS<=this.hideLimitMS}maxWindowMS(){return this.windows.at(-1)?.getTimingWindowMS()??0}getMaxDancePoints(){return Math.max(...this.windows.map(e=>e.dancePoints),this.missWindow.dancePoints)}getMaxHoldDancePoints(e){return Math.max(this.holdWindows[e].dancePoints??0,this.droppedWindow.dancePoints)}getStandardWindows(){return[...this.windows]}getHoldWindows(){return[...Object.values(this.holdWindows)]}static getCollection(e){return this.COLLECTIONS[e]??this.COLLECTIONS.ITG}static getCollections(){return Je.COLLECTIONS}}class RA{}class Xr extends RA{chordCohesion=new Map;missNoteIndex=0;holdProgress=[];heldCols=new IA;collection=Je.getCollection("ITG");usesHoldTicks=!1;update(e){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=-1;for(;e.loadedChart.getNotedata()[this.missNoteIndex]&&e.loadedChart.getNotedata()[this.missNoteIndex].second=e.chartView.chart.getSecondsFromBeat(n.beat+n.hold)&&(n.gameplay.hideNote=!0,e.chartView.doJudgement(n,null,this.collection.getHeldJudgement(n)),e.chartView.getNotefield().releaseHold(n.col),this.holdProgress.splice(this.holdProgress.indexOf(n),1),e.gameStats?.addHoldDataPoint(n,this.collection.getHeldJudgement(n)))}for(const n of this.heldCols.getHeldCols()){const a=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,n,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);a&&(a.gameplay.hasHit=!0,a.gameplay.hideNote=!0,e.chartView.doJudgement(a,null,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([a],this.collection.getMineJudgement(),null),e.mine.play())}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=Je.getCollection(_.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=Lt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdProgress=[],this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const n of this.holdProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now());s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}keyUp(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Lift"]);this.heldCols.keyUp(t),e.chartView.getNotefield().lift(t),s&&this.hitNote(e,s,i)}shouldAssistTick(e){return!e.fake&&!e.warped&&e.type!="Mine"}hitNote(e,t,i){t.gameplay.hasHit=!0,Le(t)&&(t.gameplay.lastHoldActivation=Date.now(),t.type=="Roll"?e.chartView.getNotefield().activateRoll(t.col):e.chartView.getNotefield().activateHold(t.col),this.holdProgress.push(t));const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/_.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/_.audio.rate,n),a&&Hg(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/_.audio.rate)}}getClosestNote(e,t,i,s,n){n=n??this.collection.maxWindowMS(),n*=_.audio.rate;const a=t-n/1e3,o=t+n/1e3;let l=Lt(e,a,d=>d.second)+1;l>=1&&a<=e[l-1].second&&l--;let c;for(;e[l]&&e[l].second<=o;){const d=e[l];if(d.gameplay.hasHit||d.col!=i||d.fake||d.warped||!s.includes(d.type)){l++;continue}(!c||Math.abs(d.second-t)=i.getTimingWindowMS():!1}calculateMaxDP(e,t){const i=new Map,s=new Map;for(const a of e)a.type=="Mine"||a.fake||a.warped||(Le(a)&&(s.has(a.type)||s.set(a.type,0),s.set(a.type,s.get(a.type)+1)),i.has(a.beat)||i.set(a.beat,[]),i.get(a.beat).push(a));let n=i.size*Je.getCollection(_.play.timingCollection).getMaxDancePoints();return n+=Array.from(s.entries()).reduce((a,o)=>a+o[1]*Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(o[0]),0),n}}function Ht(r,e,t){return r*(1-t)+e*t}function Nt(r,e,t){return(t-r)/(e-r)}function ae(r,e){return Math.round(r*Math.pow(10,e))/Math.pow(10,e)}function Be(r,e,t){return Math.max(e,Math.min(t,r))}function Yg(r){if(r.length==0)return 0;const e=r.length,t=r.reduce((i,s)=>i+s)/e;return Math.sqrt(r.map(i=>Math.pow(i-t,2)).reduce((i,s)=>i+s)/e)}function xl(r){if(r.length==0)return 0;r=[...r],r.sort((t,i)=>t-i);const e=Math.floor(r.length/2);return r.length%2?r[e]:(r[e-1]+r[e])/2}function LA(r){return r.length==0?0:r.reduce((e,t)=>e+t)/r.length}function qg(r,e){return e?qg(e,r%e):e===0?r:NaN}function Kg(r,e){return r*e/qg(r,e)}function Xp(r){let e=1;for(let t=0;te&&(e=t);return e}class DA{}const OA={1:"Tap",2:"Hold",4:"Roll",M:"Mine",F:"Fake",L:"Lift"},FA={Tap:"1",Hold:"2",Roll:"4",Mine:"M",Fake:"F",Lift:"L"};class yi extends DA{serialize(e,t){if(e.length==0)return"";const i=[];let s=0;const n=e.filter(Le).map(c=>({col:c.col,beat:c.beat+c.hold})).sort((c,d)=>c.beat-d.beat),a=e.at(-1),o=a.beat+(Le(a)?a.hold:0);let l=Math.ceil(o/4);o%4==0&&l++;for(let c=0;cFc(f.beat))),Xp(u.map(f=>Fc(f.beat)))));for(let f=0;f=t.numCols);h++){const u=a*4+l/o.length*4;let p=c[h];if(p=="{"||p=="["){let f="";for(h++;hn[c]?n[c]=void 0:n[c]1&&t.Jumps++,s+l>2&&t.Hands++,s=0,i=o.beat}if(o.type!="Mine"&&!o.fake&&!o.warped&&s++,o.fake||o.warped){t.Fakes++;continue}switch(o.type){case"Tap":t.Taps++;break;case"Hold":t.Holds++;break;case"Roll":t.Rolls++;break;case"Lift":t.Lifts++;break;case"Mine":t.Mines++;break}Le(o)&&(n[o.col]=o.beat+o.hold)}let a=0;for(let o=0;o1&&t.Jumps++,s+a>2&&t.Hands++,t}getNPSGraph(e,t){const i=e.at(-1);if(!i)return[];let s=i.beat;Le(i)&&(s+=i.hold);const n=[];let a=0;for(;e[a];){const o=Math.floor(t.getMeasure(e[a].beat)),l=t.getBeatFromMeasure(o),c=t.getBeatFromMeasure(o+1),d=t.getSecondsFromBeat(c)-t.getSecondsFromBeat(l);if(d<=.05){for(;e[a]?.beat=e.chartView.chart.getSecondsFromBeat(o.beat+o.hold)&&(o.gameplay.hideNote=a.hitLast||l.length==0||o.gameplay?.droppedHoldBeat===void 0,this.tickProgress.delete(a))}for(const a of this.heldCols.getHeldCols()){const o=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,a,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);o&&(o.gameplay.hasHit=!0,o.gameplay.hideNote=!0,e.chartView.doJudgement(o,0,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([o],this.collection.getMineJudgement(),0),e.mine.play())}}hitNote(e,t,i){t.gameplay.hasHit=!0;const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/_.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/_.audio.rate,n),a&&Hg(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/_.audio.rate)}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=Je.getCollection(_.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=Lt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdIndex=s,this.tickProgress=new Set,this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const{hold:n}of this.tickProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now(),n.gameplay.droppedHoldBeat=void 0,e.chartView.getNotefield().activateRoll(n.col));s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}shouldDropHold(e,t){if(!e.gameplay?.lastHoldActivation)return!1;const i=this.collection.getHeldJudgement(e);return i?t-e.gameplay.lastHoldActivation>=i.getTimingWindowMS():!1}generateHoldTicks(e,t){const i=e.getTimingData("TICKCOUNTS");let s=Lt(i,t.beat,c=>c.beat),a=1/(i[s]??{type:"TICKCOUNTS",beat:0,value:4}).value,o=Math.round(t.beat/a)*a;o==t.beat&&(o+=a);const l=[];for((i[s]?.value??4)!=0?l.push(o):o=t.beat;oc<=dr(t)&&!e.isBeatWarped(c))}else o+=a;(i[s]?.value??4)!=0&&l.at(-1)!=o&&l.push(o)}return l.filter(c=>c<=dr(t)&&!e.isBeatWarped(c))}calculateMaxDP(e,t){const i=new Map;let s=0;for(const n of e)n.type=="Mine"||n.fake||(Le(n)&&(s+=Je.getCollection(_.play.timingCollection).getMaxDancePoints()*this.generateHoldTicks(t,n).length),!n.warped&&(i.has(n.beat)||i.set(n.beat,[]),i.get(n.beat).push(n)));return s+=i.size*Je.getCollection(_.play.timingCollection).getMaxDancePoints(),s}}class We{static gameTypes={};static priority=[];static register(e){e.notefieldWidth=e.columnWidths.reduce((t,i)=>t+i,0),We.gameTypes[e.id]=e,this.priority.push(e)}static getPriority(){return this.priority}static getGameType(e){return We.gameTypes[e]}static getTypes(){return this.gameTypes}}We.register({id:"dance-single",numCols:4,columnWidths:[64,64,64,64],columnNames:["Left","Down","Up","Right"],gameLogic:new Yr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0],vertical:[0,2,1,3]}});We.register({id:"dance-double",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new Yr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});We.register({id:"dance-couple",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new Yr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});We.register({id:"dance-solo",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new Yr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0],vertical:[0,1,3,2,4,5]}});We.register({id:"dance-solodouble",numCols:12,columnWidths:[64,64,64,64,64,64,64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right","Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new Yr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0,11,10,8,9,7,6],vertical:[0,1,3,2,4,5,6,7,9,8,10,11]}});We.register({id:"dance-threepanel",numCols:3,columnWidths:[64,64,64],columnNames:["UpLeft","Down","UpRight"],gameLogic:new Yr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0],vertical:[0,1,2]}});We.register({id:"dance-threedouble",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["UpLeft","Down","UpRight","UpLeft","Down","UpRight"],gameLogic:new Yr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0,5,4,3],vertical:[0,1,2,3,4,5]}});We.register({id:"pump-single",numCols:5,columnWidths:[58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[4,3,2,1,0],vertical:[1,0,2,4,3]}});We.register({id:"pump-double",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});We.register({id:"pump-versus",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});We.register({id:"pump-couple",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});We.register({id:"pump-halfdouble",numCols:6,columnWidths:[58,58,58,58,58,58],columnNames:["Center","UpRight","DownRight","DownLeft","UpLeft","Center"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,3,2,1,0],vertical:[0,2,1,4,3,5]}});class K extends _n{static _instance;static get instance(){return K._instance||(K._instance=new K),K._instance}static emit(e,...t){return K.instance.emit(e,...t)}static on(e,t,i){K.instance.on(e,t,i)}static off(e,t,i,s){K.instance.off(e,t,i,s)}}const Ei=["Beginner","Easy","Medium","Hard","Challenge","Edit"],ur=["BPMS","STOPS","WARPS","DELAYS","LABELS","SPEEDS","SCROLLS","TICKCOUNTS","TIMESIGNATURES","COMBOS","FAKES","ATTACKS","BGCHANGES","FGCHANGES"];class Zg{gameType=We.getPriority()[0];description="";difficulty="Beginner";meter=1;meterF=1;radarValues="0,0,0,0,0";chartName="";chartStyle="";credit="";music;timingData;sm;other_properties={};notedata=[];_notedataStats;_npsGraph;_lastBeat=0;_lastSecond=0;constructor(e,t){if(this.timingData=e.timingData.createChartTimingData(this),this.timingData.reloadCache(),this.sm=e,!t){this.recalculateStats();return}if(e._type=="ssc"){const i=t;for(const n in i)(n=="OFFSET"||ur.includes(n))&&this.timingData.parse(n,i[n]);this.timingData.reloadCache();const s=We.getGameType(i.STEPSTYPE);if(!s)throw Error("Unknown step type "+i.STEPSTYPE);if(this.gameType=s,this.description=i.DESCRIPTION??"",Ei.includes(i.DIFFICULTY))this.difficulty=i.DIFFICULTY;else throw Error("Unknown chart difficulty "+i.DIFFICULTY);this.meter=parseInt(i.METER),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=parseFloat(i.METERF),(!isFinite(this.meterF)||this.meterF<0)&&(this.meterF=this.meter),this.radarValues=i.RADARVALUES??"",this.notedata=s.parser.fromString(i.NOTES,s).map(n=>this.computeNote(n))??[],this.credit=i.CREDIT??"",this.chartName=i.CHARTNAME??"",this.chartStyle=i.CHARTSTYLE??"",this.music=i.MUSIC;for(const n in i)["STEPSTYPE","DESCRIPTION","DIFFICULTY","METER","METERF","RADARVALUES","CREDIT","CHARTNAME","CHARTSTYLE","MUSIC","NOTES","NOTEDATA"].includes(n)||(this.other_properties[n]=i[n])}else{const i=/([\w-]+):[\s ]*([^:]*):[\s ]*(\w+):[\s ]*(\d+):[\s ]*([\d.,]*):[\s ]*([\w\s, ]*)/g.exec(t.trim());if(i!=null){const s=We.getGameType(i[1]);if(!s)throw Error("Unknown step type "+i[1]);if(this.gameType=s,this.description=i[2]??"",Ei.includes(i[3]))this.difficulty=i[3];else throw Error("Unknown chart difficulty "+i[3]);this.meter=parseInt(i[4]),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=this.meter,this.radarValues=i[5]??"",this.notedata=s.parser.fromString(i[6],s).map(n=>this.computeNote(n))??[]}else throw Error("Failed to load sm chart!")}this.recalculateStats()}getNotedataStats(){return this._notedataStats}getNPSGraph(){return this._npsGraph}getMaxNPS(){let e=0;for(const t of this._npsGraph)t>e&&(e=t);return e}getLastBeat(){return this._lastBeat}getLastSecond(){return this._lastSecond}getSecondsFromBeat(e,t){return this.timingData.getSecondsFromBeat(e,t)}getBeatFromSeconds(e){return this.timingData.getBeatFromSeconds(e)}getBeatFromEffectiveBeat(e){return this.timingData.getBeatFromEffectiveBeat(e)}isBeatWarped(e){return this.timingData.isBeatWarped(e)}isBeatFaked(e){return this.timingData.isBeatFaked(e)}recalculateLastNote(){let e=0,t=0;this.notedata.forEach(i=>{const s=i.beat+(Le(i)?i.hold:0),n=this.timingData.getSecondsFromBeat(s);s>e&&(e=s),n>t&&(t=n)}),this._lastBeat=e,this._lastSecond=t}getNoteIndex(e){if(this.notedata.includes(e))return this.notedata.indexOf(e);for(let t=0;ts.beat)+1;return i>=1&&this.notedata[i-1].beat>e.beat&&i--,this.notedata.splice(i,0,t),t}addNote(e,t=!0){const i=this.insertNote(e);return t&&K.emit("chartModified"),i}addNotes(e,t=!0){const i=e.map(s=>this.insertNote(s));return t&&K.emit("chartModified"),i}computeNote(e){return Object.assign(e,{warped:this.timingData.isBeatWarped(e.beat),fake:e.type=="Fake"||this.timingData.isBeatFaked(e.beat),second:this.timingData.getSecondsFromBeat(e.beat),quant:Math.round(Fc(this.timingData.getBeatOfMeasure(e.beat)))})}modifyNote(e,t,i=!0){const s=this.getNoteIndex(e);if(s==-1)return;const n=Object.assign({},this.notedata[s]);this.notedata.splice(s,1),Le(t)||(t.hold=void 0),Object.assign(n,t),this.addNote(n),i&&K.emit("chartModified")}removeNote(e,t=!0){const i=this.getNoteIndex(e);if(i==-1)return;const s=this.notedata.splice(i,1);return t&&K.emit("chartModified"),s[0]}removeNotes(e,t=!0){const i=e.map(s=>{const n=this.getNoteIndex(s);return n==-1?void 0:this.notedata.splice(n,1)[0]}).filter(s=>s!=null);return t&&K.emit("chartModified"),i}setNotedata(e){this.notedata=e,K.emit("chartModified")}getNotedata(){return this.notedata}recalculateNotes(){this.notedata=this.notedata.map(e=>this.computeNote(e))}recalculateStats(){this._notedataStats=this.gameType.parser.getStats(this.notedata),this._npsGraph=this.gameType.parser.getNPSGraph(this.notedata,this.timingData),this.recalculateLastNote()}getMusicPath(){return this.music??this.sm.properties.MUSIC??""}toString(){return this.difficulty+" "+this.meter}serialize(e){let t="//---------------"+this.gameType.id+" - "+this.description+`--------------- +`);for(let l=0;l=t.numCols);h++){const u=a*4+l/o.length*4;let p=c[h];if(p=="{"||p=="["){let f="";for(h++;hn[c]?n[c]=void 0:n[c]1&&t.Jumps++,s+l>2&&t.Hands++,s=0,i=o.beat}if(o.type!="Mine"&&!o.fake&&!o.warped&&s++,o.fake||o.warped){t.Fakes++;continue}switch(o.type){case"Tap":t.Taps++;break;case"Hold":t.Holds++;break;case"Roll":t.Rolls++;break;case"Lift":t.Lifts++;break;case"Mine":t.Mines++;break}Le(o)&&(n[o.col]=o.beat+o.hold)}let a=0;for(let o=0;o1&&t.Jumps++,s+a>2&&t.Hands++,t}getNPSGraph(e,t){const i=e.at(-1);if(!i)return[];let s=i.beat;Le(i)&&(s+=i.hold);const n=[];let a=0;for(;e[a];){const o=Math.floor(t.getMeasure(e[a].beat)),l=t.getBeatFromMeasure(o),c=t.getBeatFromMeasure(o+1),d=t.getSecondsFromBeat(c)-t.getSecondsFromBeat(l);if(d<=.05){for(;e[a]?.beat=e.chartView.chart.getSecondsFromBeat(o.beat+o.hold)&&(o.gameplay.hideNote=a.hitLast||l.length==0||o.gameplay?.droppedHoldBeat===void 0,this.tickProgress.delete(a))}for(const a of this.heldCols.getHeldCols()){const o=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,a,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);o&&(o.gameplay.hasHit=!0,o.gameplay.hideNote=!0,e.chartView.doJudgement(o,0,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([o],this.collection.getMineJudgement(),0),e.mine.play())}}hitNote(e,t,i){t.gameplay.hasHit=!0;const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/_.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/_.audio.rate,n),a&&Hg(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/_.audio.rate)}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=Je.getCollection(_.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=Lt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdIndex=s,this.tickProgress=new Set,this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const{hold:n}of this.tickProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now(),n.gameplay.droppedHoldBeat=void 0,e.chartView.getNotefield().activateRoll(n.col));s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}shouldDropHold(e,t){if(!e.gameplay?.lastHoldActivation)return!1;const i=this.collection.getHeldJudgement(e);return i?t-e.gameplay.lastHoldActivation>=i.getTimingWindowMS():!1}generateHoldTicks(e,t){const i=e.getTimingData("TICKCOUNTS");let s=Lt(i,t.beat,c=>c.beat),a=1/(i[s]??{type:"TICKCOUNTS",beat:0,value:4}).value,o=Math.round(t.beat/a)*a;o==t.beat&&(o+=a);const l=[];for((i[s]?.value??4)!=0?l.push(o):o=t.beat;oc<=dr(t)&&!e.isBeatWarped(c))}else o+=a;(i[s]?.value??4)!=0&&l.at(-1)!=o&&l.push(o)}return l.filter(c=>c<=dr(t)&&!e.isBeatWarped(c))}calculateMaxDP(e,t){const i=new Map;let s=0;for(const n of e)n.type=="Mine"||n.fake||(Le(n)&&(s+=Je.getCollection(_.play.timingCollection).getMaxDancePoints()*this.generateHoldTicks(t,n).length),!n.warped&&(i.has(n.beat)||i.set(n.beat,[]),i.get(n.beat).push(n)));return s+=i.size*Je.getCollection(_.play.timingCollection).getMaxDancePoints(),s}}class ze{static gameTypes={};static priority=[];static register(e){e.notefieldWidth=e.columnWidths.reduce((t,i)=>t+i,0),ze.gameTypes[e.id]=e,this.priority.push(e)}static getPriority(){return this.priority}static getGameType(e){return ze.gameTypes[e]}static getTypes(){return this.gameTypes}}ze.register({id:"dance-single",numCols:4,columnWidths:[64,64,64,64],columnNames:["Left","Down","Up","Right"],gameLogic:new Xr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0],vertical:[0,2,1,3]}});ze.register({id:"dance-double",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new Xr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});ze.register({id:"dance-couple",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new Xr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});ze.register({id:"dance-solo",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new Xr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0],vertical:[0,1,3,2,4,5]}});ze.register({id:"dance-solodouble",numCols:12,columnWidths:[64,64,64,64,64,64,64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right","Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new Xr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0,11,10,8,9,7,6],vertical:[0,1,3,2,4,5,6,7,9,8,10,11]}});ze.register({id:"dance-threepanel",numCols:3,columnWidths:[64,64,64],columnNames:["UpLeft","Down","UpRight"],gameLogic:new Xr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0],vertical:[0,1,2]}});ze.register({id:"dance-threedouble",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["UpLeft","Down","UpRight","UpLeft","Down","UpRight"],gameLogic:new Xr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0,5,4,3],vertical:[0,1,2,3,4,5]}});ze.register({id:"pump-single",numCols:5,columnWidths:[58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[4,3,2,1,0],vertical:[1,0,2,4,3]}});ze.register({id:"pump-double",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});ze.register({id:"pump-versus",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});ze.register({id:"pump-couple",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});ze.register({id:"pump-halfdouble",numCols:6,columnWidths:[58,58,58,58,58,58],columnNames:["Center","UpRight","DownRight","DownLeft","UpLeft","Center"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,3,2,1,0],vertical:[0,2,1,4,3,5]}});class q extends _n{static _instance;static get instance(){return q._instance||(q._instance=new q),q._instance}static emit(e,...t){return q.instance.emit(e,...t)}static on(e,t,i){q.instance.on(e,t,i)}static off(e,t,i,s){q.instance.off(e,t,i,s)}}const Ei=["Beginner","Easy","Medium","Hard","Challenge","Edit"],ur=["BPMS","STOPS","WARPS","DELAYS","LABELS","SPEEDS","SCROLLS","TICKCOUNTS","TIMESIGNATURES","COMBOS","FAKES","ATTACKS","BGCHANGES","FGCHANGES"];class Zg{gameType=ze.getPriority()[0];description="";difficulty="Beginner";meter=1;meterF=1;radarValues="0,0,0,0,0";chartName="";chartStyle="";credit="";music;timingData;sm;other_properties={};notedata=[];_notedataStats;_npsGraph;_lastBeat=0;_lastSecond=0;constructor(e,t){if(this.timingData=e.timingData.createChartTimingData(this),this.timingData.reloadCache(),this.sm=e,!t){this.recalculateStats();return}if(e._type=="ssc"){const i=t;for(const n in i)(n=="OFFSET"||ur.includes(n))&&this.timingData.parse(n,i[n]);this.timingData.reloadCache();const s=ze.getGameType(i.STEPSTYPE);if(!s)throw Error("Unknown step type "+i.STEPSTYPE);if(this.gameType=s,this.description=i.DESCRIPTION??"",Ei.includes(i.DIFFICULTY))this.difficulty=i.DIFFICULTY;else throw Error("Unknown chart difficulty "+i.DIFFICULTY);this.meter=parseInt(i.METER),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=parseFloat(i.METERF),(!isFinite(this.meterF)||this.meterF<0)&&(this.meterF=this.meter),this.radarValues=i.RADARVALUES??"",this.notedata=s.parser.fromString(i.NOTES,s).map(n=>this.computeNote(n))??[],this.credit=i.CREDIT??"",this.chartName=i.CHARTNAME??"",this.chartStyle=i.CHARTSTYLE??"",this.music=i.MUSIC;for(const n in i)["STEPSTYPE","DESCRIPTION","DIFFICULTY","METER","METERF","RADARVALUES","CREDIT","CHARTNAME","CHARTSTYLE","MUSIC","NOTES","NOTEDATA"].includes(n)||(this.other_properties[n]=i[n])}else{const i=/([\w-]+):[\s ]*([^:]*):[\s ]*(\w+):[\s ]*(\d+):[\s ]*([\d.,]*):[\s ]*([\w\s, ]*)/g.exec(t.trim());if(i!=null){const s=ze.getGameType(i[1]);if(!s)throw Error("Unknown step type "+i[1]);if(this.gameType=s,this.description=i[2]??"",Ei.includes(i[3]))this.difficulty=i[3];else throw Error("Unknown chart difficulty "+i[3]);this.meter=parseInt(i[4]),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=this.meter,this.radarValues=i[5]??"",this.notedata=s.parser.fromString(i[6],s).map(n=>this.computeNote(n))??[]}else throw Error("Failed to load sm chart!")}this.recalculateStats()}getNotedataStats(){return this._notedataStats}getNPSGraph(){return this._npsGraph}getMaxNPS(){let e=0;for(const t of this._npsGraph)t>e&&(e=t);return e}getLastBeat(){return this._lastBeat}getLastSecond(){return this._lastSecond}getSecondsFromBeat(e,t){return this.timingData.getSecondsFromBeat(e,t)}getBeatFromSeconds(e){return this.timingData.getBeatFromSeconds(e)}getBeatFromEffectiveBeat(e){return this.timingData.getBeatFromEffectiveBeat(e)}isBeatWarped(e){return this.timingData.isBeatWarped(e)}isBeatFaked(e){return this.timingData.isBeatFaked(e)}recalculateLastNote(){let e=0,t=0;this.notedata.forEach(i=>{const s=i.beat+(Le(i)?i.hold:0),n=this.timingData.getSecondsFromBeat(s);s>e&&(e=s),n>t&&(t=n)}),this._lastBeat=e,this._lastSecond=t}getNoteIndex(e){if(this.notedata.includes(e))return this.notedata.indexOf(e);for(let t=0;ts.beat)+1;return i>=1&&this.notedata[i-1].beat>e.beat&&i--,this.notedata.splice(i,0,t),t}addNote(e,t=!0){const i=this.insertNote(e);return t&&q.emit("chartModified"),i}addNotes(e,t=!0){const i=e.map(s=>this.insertNote(s));return t&&q.emit("chartModified"),i}computeNote(e){return Object.assign(e,{warped:this.timingData.isBeatWarped(e.beat),fake:e.type=="Fake"||this.timingData.isBeatFaked(e.beat),second:this.timingData.getSecondsFromBeat(e.beat),quant:Math.round(Fc(this.timingData.getBeatOfMeasure(e.beat)))})}modifyNote(e,t,i=!0){const s=this.getNoteIndex(e);if(s==-1)return;const n=Object.assign({},this.notedata[s]);this.notedata.splice(s,1),Le(t)||(t.hold=void 0),Object.assign(n,t),this.addNote(n),i&&q.emit("chartModified")}removeNote(e,t=!0){const i=this.getNoteIndex(e);if(i==-1)return;const s=this.notedata.splice(i,1);return t&&q.emit("chartModified"),s[0]}removeNotes(e,t=!0){const i=e.map(s=>{const n=this.getNoteIndex(s);return n==-1?void 0:this.notedata.splice(n,1)[0]}).filter(s=>s!=null);return t&&q.emit("chartModified"),i}setNotedata(e){this.notedata=e,q.emit("chartModified")}getNotedata(){return this.notedata}recalculateNotes(){this.notedata=this.notedata.map(e=>this.computeNote(e))}recalculateStats(){this._notedataStats=this.gameType.parser.getStats(this.notedata),this._npsGraph=this.gameType.parser.getNPSGraph(this.notedata,this.timingData),this.recalculateLastNote()}getMusicPath(){return this.music??this.sm.properties.MUSIC??""}toString(){return this.difficulty+" "+this.meter}serialize(e){let t="//---------------"+this.gameType.id+" - "+this.description+`--------------- `;if(e=="sm")t+=`#NOTES: `,t+=` ${this.gameType.id}: `,t+=` ${this.description}: @@ -1172,7 +1172,7 @@ void main(void)\r `;for(const i in this.other_properties)t+=`#${i}:${this.other_properties[i]}; `;this.timingData.usesChartTiming()||(t+=this.timingData.serialize("ssc")),t+=`#NOTES: `}return t+=this.gameType.parser.serialize(this.notedata,this.gameType)+`; -`,t}requiresSSC(){return this.chartName!==""||this.chartStyle!==""||this.credit!==""||this.music!==void 0||this.timingData.requiresSSC()}}class NA extends HTMLDivElement{_width;_height;_color;_svg;loadSVG(e){this.innerHTML=e,this._svg=this.children[0],this.updateStyles()}updateStyles(){this._svg&&(this.style.width="",this.style.height="",this._width!==void 0&&(this._svg.style.width=this._width+"px"),this._height!==void 0&&(this._svg.style.height=this._height+"px"),this._color!==void 0&&(this._svg.style.color=this._color))}get width(){return this._width}set width(e){e!==void 0&&(this._width=e,this.updateStyles())}get height(){return this._height}set height(e){e!==void 0&&(this._height=e,this.updateStyles())}get color(){return this._color}set color(e){e!==void 0&&(this._color=e,this.updateStyles())}}class Ae{static cache=new Map;static pendingWrappers=new Map;static getIcon(e,t,i,s){const n=document.createElement("div");if(Object.setPrototypeOf(n,NA.prototype),n.loadSVG("
"),n.classList.add("icon"),this.cache.has(e))n.loadSVG(this.cache.get(e));else{const a=!this.pendingWrappers.has(e);this.pendingWrappers.has(e)||this.pendingWrappers.set(e,[]),this.pendingWrappers.get(e).push(n),a&&this.fetchIcon(e)}return n.width=t,i===void 0&&t!==void 0&&(i=t),n.height=i,n.color=s,n}static fetchIcon(e){fetch(`/smeditor/assets/svg/${e}.svg`).then(t=>t.text()).then(t=>{this.cache.set(e,t),this.pendingWrappers.get(e).forEach(i=>{i.loadSVG(t)}),this.pendingWrappers.set(e,[])})}}const Kp=globalThis.showDirectoryPicker;async function UA(r={}){if(Kp&&!r._preferPolyfill)return Kp(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeDirHandleFromFileList:t}=await Ke(()=>Promise.resolve().then(()=>Fg),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const Zp=globalThis.showOpenFilePicker;async function Jg(r={}){if(Zp&&!r._preferPolyfill)return Zp(r);const e=document.createElement("input");e.type="file",e.multiple=!!r.multiple,e.accept=(r.accepts||[]).map(i=>[...(i.extensions||[]).map(s=>"."+s),...i.mimeTypes||[]]).flat().join(","),e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeFileHandlesFromFileList:t}=await Ke(()=>Promise.resolve().then(()=>Fg),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const Jp=globalThis.showSaveFilePicker;async function HA(r={}){if(Jp&&!r._preferPolyfill)return Jp(r);const{FileSystemFileHandle:e}=await Ke(()=>Promise.resolve().then(()=>Qg),void 0),{FileHandle:t}=await Ke(()=>import("./downloader-df03ddd3.js"),[]);return new e(new t(r.suggestedName))}const Ds=Symbol("adapter");let Sd=class{constructor(e){this.kind=e.kind,this.name=e.name,this[Ds]=e}get isFile(){return this.kind==="file"}get isDirectory(){return this.kind==="directory"}async queryPermission(e={mode:"read"}){const t=this[Ds];if(t.queryPermission)return t.queryPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async requestPermission(e={mode:"read"}){const t=this[Ds];if(t.requestPermission)return t.requestPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async isSameEntry(e){return this===e?!0:this.kind!==e.kind||!e[Ds]?!1:await this[Ds].isSameEntry(e[Ds])}};Object.defineProperty(Sd.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const bh=Symbol("adapter");let wn=class extends Sd{constructor(e){super(e),this.kind="file",this[bh]=e}async createWritable(e={}){const{FileSystemWritableFileStream:t}=await Ke(()=>import("./FileSystemWritableFileStream-e4c13ad9.js"),["FileSystemWritableFileStream-e4c13ad9.js","web-streams-ponyfill-4a0f4950.js"]);return new t(await this[bh].createWritable(e))}async getFile(){return this[bh].getFile()}};Object.defineProperty(wn.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(wn.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const Qg=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:wn,default:wn},Symbol.toStringTag,{value:"Module"})),Os=Symbol("adapter");class Wr extends Sd{constructor(e){super(e),this.kind="directory",this[Os]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return new Wr(await this[Os].getDirectoryHandle(e,t))}getDirectory(e,t={}){return this.getDirectoryHandle(e,t)}async*entries(){for await(const[e,t]of this[Os].entries())yield[t.name,t.kind==="file"?new wn(t):new Wr(t)]}async*getEntries(){return this.entries()}async*keys(){for await(const[e]of this[Os].entries())yield e}async*values(){for await(const[e,t]of this.entries())yield t}async getFileHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.create=!!t.create,new wn(await this[Os].getFileHandle(e,t))}getFile(e,t={}){return this.getFileHandle(e,t)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[Os].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:i,path:s}=t.pop();for await(const n of i.values()){if(await n.isSameEntry(e))return[...s,n.name];n.kind==="directory"&&t.push({handle:n,path:[...s,n.name]})}}return null}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty(Wr.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Wr.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const GA=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:Wr,default:Wr},Symbol.toStringTag,{value:"Module"}));async function Qp(r,e={}){var t,i,s,n;if(!r){if(!(!((t=globalThis.navigator)===null||t===void 0)&&t.storage)&&((i=globalThis.location)===null||i===void 0?void 0:i.protocol)==="http:")throw new Error("Native getDirectory not supported in HTTP context. Please use HTTPS instead or provide an adapter.");if(!(!((n=(s=globalThis.navigator)===null||s===void 0?void 0:s.storage)===null||n===void 0)&&n.getDirectory))throw new Error("Native StorageManager.getDirectory() is not supported in current environment. Please provide an adapter instead.");return globalThis.navigator.storage.getDirectory()}const a=await r,o=typeof a=="function"?await a(e):await a.default(e);return new Wr(o)}var wh,_h;const VA={adapter:{cache:!!(globalThis.CacheStorage&&globalThis.caches instanceof CacheStorage),native:typeof((_h=(wh=globalThis.navigator)===null||wh===void 0?void 0:wh.storage)===null||_h===void 0?void 0:_h.getDirectory)=="function",sandbox:typeof window<"u"&&typeof window.webkitRequestFileSystem=="function"}},ef=r=>typeof r=="object"&&r!=null&&r.nodeType===1,tf=(r,e)=>(!e||r!=="hidden")&&r!=="visible"&&r!=="clip",xh=(r,e)=>{if(r.clientHeight{const s=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!s&&(s.clientHeightne||n>r&&a=e&&o>=t?n-r-i:a>e&&ot?a-e+s:0,WA=r=>{const e=r.parentElement;return e??(r.getRootNode().host||null)},rf=(r,e)=>{var t,i,s,n;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:l,boundary:c,skipOverflowHiddenElements:d}=e,h=typeof c=="function"?c:$=>$!==c;if(!ef(r))throw new TypeError("Invalid target");const u=document.scrollingElement||document.documentElement,p=[];let f=r;for(;ef(f)&&h(f);){if(f=WA(f),f===u){p.push(f);break}f!=null&&f===document.body&&xh(f)&&!xh(document.documentElement)||f!=null&&xh(f,d)&&p.push(f)}const m=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,g=(n=(s=window.visualViewport)==null?void 0:s.height)!=null?n:innerHeight,{scrollX:y,scrollY:w}=window,{height:b,width:v,top:E,right:C,bottom:I,left:L}=r.getBoundingClientRect(),{top:k,right:N,bottom:G,left:A}=($=>{const R=window.getComputedStyle($);return{top:parseFloat(R.scrollMarginTop)||0,right:parseFloat(R.scrollMarginRight)||0,bottom:parseFloat(R.scrollMarginBottom)||0,left:parseFloat(R.scrollMarginLeft)||0}})(r);let S=o==="start"||o==="nearest"?E-k:o==="end"?I+G:E+b/2-k+G,x=l==="center"?L+v/2-A+N:l==="end"?C+N:L-A;const D=[];for(let $=0;$=0&&L>=0&&I<=g&&C<=m&&E>=V&&I<=U&&L>=te&&C<=F)return D;const Q=getComputedStyle(R),Z=parseInt(Q.borderLeftWidth,10),ye=parseInt(Q.borderTopWidth,10),Ce=parseInt(Q.borderRightWidth,10),ce=parseInt(Q.borderBottomWidth,10);let fe=0,we=0;const le="offsetWidth"in R?R.offsetWidth-R.clientWidth-Z-Ce:0,pe="offsetHeight"in R?R.offsetHeight-R.clientHeight-ye-ce:0,be="offsetWidth"in R?R.offsetWidth===0?0:W/R.offsetWidth:0,T="offsetHeight"in R?R.offsetHeight===0?0:O/R.offsetHeight:0;if(u===R)fe=o==="start"?S:o==="end"?S-g:o==="nearest"?ao(w,w+g,g,ye,ce,w+S,w+S+b,b):S-g/2,we=l==="start"?x:l==="center"?x-m/2:l==="end"?x-m:ao(y,y+m,m,Z,Ce,y+x,y+x+v,v),fe=Math.max(0,fe+w),we=Math.max(0,we+y);else{fe=o==="start"?S-V-ye:o==="end"?S-U+ce+pe:o==="nearest"?ao(V,U,O,ye,ce+pe,S,S+b,b):S-(V+O/2)+pe/2,we=l==="start"?x-te-Z:l==="center"?x-(te+W/2)+le/2:l==="end"?x-F+Ce+le:ao(te,F,W,Z,Ce+le,x,x+v,v);const{scrollLeft:Y,scrollTop:j}=R;fe=T===0?0:Math.max(0,Math.min(j+fe/T,R.scrollHeight-O/T+pe)),we=be===0?0:Math.max(0,Math.min(Y+we/be,R.scrollWidth-W/be+le)),S+=j-fe,x+=Y-we}D.push({el:R,top:fe,left:we})}return D},zA=r=>r===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(r)?r:{block:"start",inline:"nearest"};function ra(r,e){if(!r.isConnected||!(s=>{let n=s;for(;n&&n.parentNode;){if(n.parentNode===document)return!0;n=n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode}return!1})(r))return;const t=(s=>{const n=window.getComputedStyle(s);return{top:parseFloat(n.scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0}})(r);if((s=>typeof s=="object"&&typeof s.behavior=="function")(e))return e.behavior(rf(r,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:s,top:n,left:a}of rf(r,zA(e))){const o=n-t.top+t.bottom,l=a-t.left+t.right;s.scroll({top:o,left:l,behavior:i})}}function zi(r,e){let t=Cd(r)[2];return e&&t.slice(-1*e.length)===e&&(t=t.slice(0,t.length-e.length)),t}function Ot(r){const e=Cd(r),t=e[0];let i=e[1];return!t&&!i?"":(i&&(i=i.slice(0,i.length-1)),t+i)}function $i(r){return Cd(r)[3]}const jA=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function Cd(r){return jA.exec(r).slice(1)}const{GONE:ey}=qo;FileSystemFileHandle;class Md{_path;kind="file";name;isFile=!0;isDirectory=!1;constructor(e){this._path=e,this.name=new URL(e).pathname.split("/").pop()??""}async getFile(){return fetch(this._path).then(e=>e.blob()).then(e=>new File([e],this.name)).catch(()=>{throw new DOMException(...ey)})}async createWritable(){throw Error("Cannot call createWriteable from a URLFileHandle")}async isSameEntry(e){return FileSystemHandle instanceof Md?e._path==this._path:!1}async queryPermission(){return"granted"}async requestPermission(){return"granted"}}class $A{async handleDropEvent(e,t){throw Error("Cannot call handleDropEvent from a URLFileHandler")}async getDirectoryHandle(e,t,i){throw Error("Cannot call getDirectoryHandle from a URLFileHandler")}async hasFile(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}async getFileHandle(e,t){try{if(!await this.hasFile(e))throw new DOMException(...ey);return new Md(e)}catch(i){console.error("Failed to get file "+e+": "+i);return}}async getFileHandleRelativeTo(e,t){const i=new URL(e);$i(i.pathname)!=""&&(i.pathname=i.pathname.split("/").slice(0,-1).join("/")),i.pathname+="/"+t;try{return this.getFileHandle(i.toString())}catch(s){console.error("Failed to get relative file "+i+": "+s);return}}async getDirectoryFiles(e){throw Error("Cannot call getDirectoryFiles from a URLFileHandler")}async getDirectoryFolders(e){throw Error("Cannot call getDirectoryFolders from a URLFileHandler")}async writeFile(e,t){throw Error("Cannot save to a URL file!")}getRelativePath(e,t){throw Error("Cannot call getRelativePath from a URLFileHandler")}}function oo(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ty={exports:{}};/*! +`,t}requiresSSC(){return this.chartName!==""||this.chartStyle!==""||this.credit!==""||this.music!==void 0||this.timingData.requiresSSC()}}class NA extends HTMLDivElement{_width;_height;_color;_svg;loadSVG(e){this.innerHTML=e,this._svg=this.children[0],this.updateStyles()}updateStyles(){this._svg&&(this.style.width="",this.style.height="",this._width!==void 0&&(this._svg.style.width=this._width+"px"),this._height!==void 0&&(this._svg.style.height=this._height+"px"),this._color!==void 0&&(this._svg.style.color=this._color))}get width(){return this._width}set width(e){e!==void 0&&(this._width=e,this.updateStyles())}get height(){return this._height}set height(e){e!==void 0&&(this._height=e,this.updateStyles())}get color(){return this._color}set color(e){e!==void 0&&(this._color=e,this.updateStyles())}}class Ae{static cache=new Map;static pendingWrappers=new Map;static getIcon(e,t,i,s){const n=document.createElement("div");if(Object.setPrototypeOf(n,NA.prototype),n.loadSVG("
"),n.classList.add("icon"),this.cache.has(e))n.loadSVG(this.cache.get(e));else{const a=!this.pendingWrappers.has(e);this.pendingWrappers.has(e)||this.pendingWrappers.set(e,[]),this.pendingWrappers.get(e).push(n),a&&this.fetchIcon(e)}return n.width=t,i===void 0&&t!==void 0&&(i=t),n.height=i,n.color=s,n}static fetchIcon(e){fetch(`/smeditor/assets/svg/${e}.svg`).then(t=>t.text()).then(t=>{this.cache.set(e,t),this.pendingWrappers.get(e).forEach(i=>{i.loadSVG(t)}),this.pendingWrappers.set(e,[])})}}const Kp=globalThis.showDirectoryPicker;async function UA(r={}){if(Kp&&!r._preferPolyfill)return Kp(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeDirHandleFromFileList:t}=await Ke(()=>Promise.resolve().then(()=>Fg),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const Zp=globalThis.showOpenFilePicker;async function Jg(r={}){if(Zp&&!r._preferPolyfill)return Zp(r);const e=document.createElement("input");e.type="file",e.multiple=!!r.multiple,e.accept=(r.accepts||[]).map(i=>[...(i.extensions||[]).map(s=>"."+s),...i.mimeTypes||[]]).flat().join(","),e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeFileHandlesFromFileList:t}=await Ke(()=>Promise.resolve().then(()=>Fg),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const Jp=globalThis.showSaveFilePicker;async function HA(r={}){if(Jp&&!r._preferPolyfill)return Jp(r);const{FileSystemFileHandle:e}=await Ke(()=>Promise.resolve().then(()=>Qg),void 0),{FileHandle:t}=await Ke(()=>import("./downloader-0aae82d5.js"),[]);return new e(new t(r.suggestedName))}const Ds=Symbol("adapter");let Sd=class{constructor(e){this.kind=e.kind,this.name=e.name,this[Ds]=e}get isFile(){return this.kind==="file"}get isDirectory(){return this.kind==="directory"}async queryPermission(e={mode:"read"}){const t=this[Ds];if(t.queryPermission)return t.queryPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async requestPermission(e={mode:"read"}){const t=this[Ds];if(t.requestPermission)return t.requestPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async isSameEntry(e){return this===e?!0:this.kind!==e.kind||!e[Ds]?!1:await this[Ds].isSameEntry(e[Ds])}};Object.defineProperty(Sd.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const bh=Symbol("adapter");let wn=class extends Sd{constructor(e){super(e),this.kind="file",this[bh]=e}async createWritable(e={}){const{FileSystemWritableFileStream:t}=await Ke(()=>import("./FileSystemWritableFileStream-e4c13ad9.js"),["FileSystemWritableFileStream-e4c13ad9.js","web-streams-ponyfill-4a0f4950.js"]);return new t(await this[bh].createWritable(e))}async getFile(){return this[bh].getFile()}};Object.defineProperty(wn.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(wn.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const Qg=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:wn,default:wn},Symbol.toStringTag,{value:"Module"})),Os=Symbol("adapter");class Wr extends Sd{constructor(e){super(e),this.kind="directory",this[Os]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return new Wr(await this[Os].getDirectoryHandle(e,t))}getDirectory(e,t={}){return this.getDirectoryHandle(e,t)}async*entries(){for await(const[e,t]of this[Os].entries())yield[t.name,t.kind==="file"?new wn(t):new Wr(t)]}async*getEntries(){return this.entries()}async*keys(){for await(const[e]of this[Os].entries())yield e}async*values(){for await(const[e,t]of this.entries())yield t}async getFileHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.create=!!t.create,new wn(await this[Os].getFileHandle(e,t))}getFile(e,t={}){return this.getFileHandle(e,t)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[Os].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:i,path:s}=t.pop();for await(const n of i.values()){if(await n.isSameEntry(e))return[...s,n.name];n.kind==="directory"&&t.push({handle:n,path:[...s,n.name]})}}return null}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty(Wr.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Wr.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const GA=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:Wr,default:Wr},Symbol.toStringTag,{value:"Module"}));async function Qp(r,e={}){var t,i,s,n;if(!r){if(!(!((t=globalThis.navigator)===null||t===void 0)&&t.storage)&&((i=globalThis.location)===null||i===void 0?void 0:i.protocol)==="http:")throw new Error("Native getDirectory not supported in HTTP context. Please use HTTPS instead or provide an adapter.");if(!(!((n=(s=globalThis.navigator)===null||s===void 0?void 0:s.storage)===null||n===void 0)&&n.getDirectory))throw new Error("Native StorageManager.getDirectory() is not supported in current environment. Please provide an adapter instead.");return globalThis.navigator.storage.getDirectory()}const a=await r,o=typeof a=="function"?await a(e):await a.default(e);return new Wr(o)}var wh,_h;const VA={adapter:{cache:!!(globalThis.CacheStorage&&globalThis.caches instanceof CacheStorage),native:typeof((_h=(wh=globalThis.navigator)===null||wh===void 0?void 0:wh.storage)===null||_h===void 0?void 0:_h.getDirectory)=="function",sandbox:typeof window<"u"&&typeof window.webkitRequestFileSystem=="function"}},ef=r=>typeof r=="object"&&r!=null&&r.nodeType===1,tf=(r,e)=>(!e||r!=="hidden")&&r!=="visible"&&r!=="clip",xh=(r,e)=>{if(r.clientHeight{const s=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!s&&(s.clientHeightne||n>r&&a=e&&o>=t?n-r-i:a>e&&ot?a-e+s:0,WA=r=>{const e=r.parentElement;return e??(r.getRootNode().host||null)},rf=(r,e)=>{var t,i,s,n;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:l,boundary:c,skipOverflowHiddenElements:d}=e,h=typeof c=="function"?c:$=>$!==c;if(!ef(r))throw new TypeError("Invalid target");const u=document.scrollingElement||document.documentElement,p=[];let f=r;for(;ef(f)&&h(f);){if(f=WA(f),f===u){p.push(f);break}f!=null&&f===document.body&&xh(f)&&!xh(document.documentElement)||f!=null&&xh(f,d)&&p.push(f)}const m=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,g=(n=(s=window.visualViewport)==null?void 0:s.height)!=null?n:innerHeight,{scrollX:y,scrollY:w}=window,{height:b,width:v,top:E,right:C,bottom:I,left:L}=r.getBoundingClientRect(),{top:k,right:N,bottom:G,left:A}=($=>{const R=window.getComputedStyle($);return{top:parseFloat(R.scrollMarginTop)||0,right:parseFloat(R.scrollMarginRight)||0,bottom:parseFloat(R.scrollMarginBottom)||0,left:parseFloat(R.scrollMarginLeft)||0}})(r);let S=o==="start"||o==="nearest"?E-k:o==="end"?I+G:E+b/2-k+G,x=l==="center"?L+v/2-A+N:l==="end"?C+N:L-A;const D=[];for(let $=0;$=0&&L>=0&&I<=g&&C<=m&&E>=V&&I<=U&&L>=te&&C<=F)return D;const Q=getComputedStyle(R),Z=parseInt(Q.borderLeftWidth,10),ye=parseInt(Q.borderTopWidth,10),Ce=parseInt(Q.borderRightWidth,10),ce=parseInt(Q.borderBottomWidth,10);let fe=0,we=0;const le="offsetWidth"in R?R.offsetWidth-R.clientWidth-Z-Ce:0,pe="offsetHeight"in R?R.offsetHeight-R.clientHeight-ye-ce:0,be="offsetWidth"in R?R.offsetWidth===0?0:W/R.offsetWidth:0,T="offsetHeight"in R?R.offsetHeight===0?0:O/R.offsetHeight:0;if(u===R)fe=o==="start"?S:o==="end"?S-g:o==="nearest"?ao(w,w+g,g,ye,ce,w+S,w+S+b,b):S-g/2,we=l==="start"?x:l==="center"?x-m/2:l==="end"?x-m:ao(y,y+m,m,Z,Ce,y+x,y+x+v,v),fe=Math.max(0,fe+w),we=Math.max(0,we+y);else{fe=o==="start"?S-V-ye:o==="end"?S-U+ce+pe:o==="nearest"?ao(V,U,O,ye,ce+pe,S,S+b,b):S-(V+O/2)+pe/2,we=l==="start"?x-te-Z:l==="center"?x-(te+W/2)+le/2:l==="end"?x-F+Ce+le:ao(te,F,W,Z,Ce+le,x,x+v,v);const{scrollLeft:X,scrollTop:j}=R;fe=T===0?0:Math.max(0,Math.min(j+fe/T,R.scrollHeight-O/T+pe)),we=be===0?0:Math.max(0,Math.min(X+we/be,R.scrollWidth-W/be+le)),S+=j-fe,x+=X-we}D.push({el:R,top:fe,left:we})}return D},zA=r=>r===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(r)?r:{block:"start",inline:"nearest"};function ra(r,e){if(!r.isConnected||!(s=>{let n=s;for(;n&&n.parentNode;){if(n.parentNode===document)return!0;n=n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode}return!1})(r))return;const t=(s=>{const n=window.getComputedStyle(s);return{top:parseFloat(n.scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0}})(r);if((s=>typeof s=="object"&&typeof s.behavior=="function")(e))return e.behavior(rf(r,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:s,top:n,left:a}of rf(r,zA(e))){const o=n-t.top+t.bottom,l=a-t.left+t.right;s.scroll({top:o,left:l,behavior:i})}}function zi(r,e){let t=Cd(r)[2];return e&&t.slice(-1*e.length)===e&&(t=t.slice(0,t.length-e.length)),t}function Ot(r){const e=Cd(r),t=e[0];let i=e[1];return!t&&!i?"":(i&&(i=i.slice(0,i.length-1)),t+i)}function $i(r){return Cd(r)[3]}const jA=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function Cd(r){return jA.exec(r).slice(1)}const{GONE:ey}=qo;FileSystemFileHandle;class Md{_path;kind="file";name;isFile=!0;isDirectory=!1;constructor(e){this._path=e,this.name=new URL(e).pathname.split("/").pop()??""}async getFile(){return fetch(this._path).then(e=>e.blob()).then(e=>new File([e],this.name)).catch(()=>{throw new DOMException(...ey)})}async createWritable(){throw Error("Cannot call createWriteable from a URLFileHandle")}async isSameEntry(e){return FileSystemHandle instanceof Md?e._path==this._path:!1}async queryPermission(){return"granted"}async requestPermission(){return"granted"}}class $A{async handleDropEvent(e,t){throw Error("Cannot call handleDropEvent from a URLFileHandler")}async getDirectoryHandle(e,t,i){throw Error("Cannot call getDirectoryHandle from a URLFileHandler")}async hasFile(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}async getFileHandle(e,t){try{if(!await this.hasFile(e))throw new DOMException(...ey);return new Md(e)}catch(i){console.error("Failed to get file "+e+": "+i);return}}async getFileHandleRelativeTo(e,t){const i=new URL(e);$i(i.pathname)!=""&&(i.pathname=i.pathname.split("/").slice(0,-1).join("/")),i.pathname+="/"+t;try{return this.getFileHandle(i.toString())}catch(s){console.error("Failed to get relative file "+i+": "+s);return}}async getDirectoryFiles(e){throw Error("Cannot call getDirectoryFiles from a URLFileHandler")}async getDirectoryFolders(e){throw Error("Cannot call getDirectoryFolders from a URLFileHandler")}async writeFile(e,t){throw Error("Cannot save to a URL file!")}getRelativePath(e,t){throw Error("Cannot call getRelativePath from a URLFileHandler")}}function oo(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ty={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -1183,10 +1183,10 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(r,e){(function(t){r.exports=t()})(function(){return function t(i,s,n){function a(c,d){if(!s[c]){if(!i[c]){var h=typeof oo=="function"&&oo;if(!d&&h)return h(c,!0);if(o)return o(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var p=s[c]={exports:{}};i[c][0].call(p.exports,function(f){var m=i[c][1][f];return a(m||f)},p,p.exports,t,i,s,n)}return s[c].exports}for(var o=typeof oo=="function"&&oo,l=0;l>2,p=(3&c)<<4|d>>4,f=1>6:64,m=2>4,d=(15&u)<<4|(p=o.indexOf(l.charAt(m++)))>>2,h=(3&p)<<6|(f=o.indexOf(l.charAt(m++))),w[g++]=c,p!==64&&(w[g++]=d),f!==64&&(w[g++]=h);return w}},{"./support":30,"./utils":32}],2:[function(t,i,s){var n=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function c(d,h,u,p,f){this.compressedSize=d,this.uncompressedSize=h,this.crc32=u,this.compression=p,this.compressedContent=f}c.prototype={getContentWorker:function(){var d=new a(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),h=this;return d.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new a(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,h,u){return d.pipe(new o).pipe(new l("uncompressedSize")).pipe(h.compressWorker(u)).pipe(new l("compressedSize")).withStreamInfo("compression",h)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,s){var n=t("./utils"),a=function(){for(var o,l=[],c=0;c<256;c++){o=c;for(var d=0;d<8;d++)o=1&o?3988292384^o>>>1:o>>>1;l[c]=o}return l}();i.exports=function(o,l){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(c,d,h,u){var p=a,f=u+h;c^=-1;for(var m=u;m>>8^p[255&(c^d[m])];return-1^c}(0|l,o,o.length,0):function(c,d,h,u){var p=a,f=u+h;c^=-1;for(var m=u;m>>8^p[255&(c^d.charCodeAt(m))];return-1^c}(0|l,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,i,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),l=t("./stream/GenericWorker"),c=n?"uint8array":"array";function d(h,u){l.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=u,this.meta={}}s.magic="\b\0",o.inherits(d,l),d.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,h.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(u){h.push({data:u,meta:h.meta})}},s.compressWorker=function(h){return new d("Deflate",h)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,s){function n(p,f){var m,g="";for(m=0;m>>=8;return g}function a(p,f,m,g,y,w){var b,v,E=p.file,C=p.compression,I=w!==c.utf8encode,L=o.transformTo("string",w(E.name)),k=o.transformTo("string",c.utf8encode(E.name)),N=E.comment,G=o.transformTo("string",w(N)),A=o.transformTo("string",c.utf8encode(N)),S=k.length!==E.name.length,x=A.length!==N.length,D="",$="",R="",O=E.dir,W=E.date,V={crc32:0,compressedSize:0,uncompressedSize:0};f&&!m||(V.crc32=p.crc32,V.compressedSize=p.compressedSize,V.uncompressedSize=p.uncompressedSize);var F=0;f&&(F|=8),I||!S&&!x||(F|=2048);var U=0,te=0;O&&(U|=16),y==="UNIX"?(te=798,U|=function(Z,ye){var Ce=Z;return Z||(Ce=ye?16893:33204),(65535&Ce)<<16}(E.unixPermissions,O)):(te=20,U|=function(Z){return 63&(Z||0)}(E.dosPermissions)),b=W.getUTCHours(),b<<=6,b|=W.getUTCMinutes(),b<<=5,b|=W.getUTCSeconds()/2,v=W.getUTCFullYear()-1980,v<<=4,v|=W.getUTCMonth()+1,v<<=5,v|=W.getUTCDate(),S&&($=n(1,1)+n(d(L),4)+k,D+="up"+n($.length,2)+$),x&&(R=n(1,1)+n(d(G),4)+A,D+="uc"+n(R.length,2)+R);var Q="";return Q+=` -\0`,Q+=n(F,2),Q+=C.magic,Q+=n(b,2),Q+=n(v,2),Q+=n(V.crc32,4),Q+=n(V.compressedSize,4),Q+=n(V.uncompressedSize,4),Q+=n(L.length,2),Q+=n(D.length,2),{fileRecord:h.LOCAL_FILE_HEADER+Q+L+D,dirRecord:h.CENTRAL_FILE_HEADER+n(te,2)+Q+n(G.length,2)+"\0\0\0\0"+n(U,4)+n(g,4)+L+D+G}}var o=t("../utils"),l=t("../stream/GenericWorker"),c=t("../utf8"),d=t("../crc32"),h=t("../signature");function u(p,f,m,g){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f,this.zipPlatform=m,this.encodeFileName=g,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,l),u.prototype.push=function(p){var f=p.meta.percent||0,m=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,l.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:m?(f+100*(m-g-1))/m:100}}))},u.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var f=this.streamFiles&&!p.file.dir;if(f){var m=a(p,f,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(p){this.accumulate=!1;var f=this.streamFiles&&!p.file.dir,m=a(p,f,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),f)this.push({data:function(g){return h.DATA_DESCRIPTOR+n(g.crc32,4)+n(g.compressedSize,4)+n(g.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var p=this.bytesWritten,f=0;f=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=o,c},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=a},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),a=t("../support"),o=t("./ArrayReader"),l=t("./StringReader"),c=t("./NodeBufferReader"),d=t("./Uint8ArrayReader");i.exports=function(h){var u=n.getTypeOf(h);return n.checkSupport(u),u!=="string"||a.uint8array?u==="nodebuffer"?new c(h):a.uint8array?new d(n.transformTo("uint8array",h)):new o(n.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),a=t("../utils");function o(l){n.call(this,"ConvertWorker to "+l),this.destType=l}a.inherits(o,n),o.prototype.processChunk=function(l){this.push({data:a.transformTo(this.destType,l.data),meta:l.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),a=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(l){this.streamInfo.crc32=a(l.data,this.streamInfo.crc32||0),this.push(l)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}n.inherits(o,a),o.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}a.prototype.processChunk.call(this,l)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=n.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}n.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var l=0;l "+a:a}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),l=t("../base64"),c=t("../support"),d=t("../external"),h=null;if(c.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(f,m){return new d.Promise(function(g,y){var w=[],b=f._internalType,v=f._outputType,E=f._mimeType;f.on("data",function(C,I){w.push(C),m&&m(I)}).on("error",function(C){w=[],y(C)}).on("end",function(){try{var C=function(I,L,k){switch(I){case"blob":return n.newBlob(n.transformTo("arraybuffer",L),k);case"base64":return l.encode(L);default:return n.transformTo(I,L)}}(v,function(I,L){var k,N=0,G=null,A=0;for(k=0;k"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(n),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),l=t("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function u(){l.call(this,"utf-8 encode")}s.utf8encode=function(p){return a.nodebuffer?o.newBufferFrom(p,"utf-8"):function(f){var m,g,y,w,b,v=f.length,E=0;for(w=0;w>>6:(g<65536?m[b++]=224|g>>>12:(m[b++]=240|g>>>18,m[b++]=128|g>>>12&63),m[b++]=128|g>>>6&63),m[b++]=128|63&g);return m}(p)},s.utf8decode=function(p){return a.nodebuffer?n.transformTo("nodebuffer",p).toString("utf-8"):function(f){var m,g,y,w,b=f.length,v=new Array(2*b);for(m=g=0;m>10&1023,v[g++]=56320|1023&y)}return v.length!==g&&(v.subarray?v=v.subarray(0,g):v.length=g),n.applyFromCharCode(v)}(p=n.transformTo(a.uint8array?"uint8array":"array",p))},n.inherits(h,l),h.prototype.processChunk=function(p){var f=n.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var m=f;(f=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),f.set(m,this.leftOver.length)}else f=this.leftOver.concat(f);this.leftOver=null}var g=function(w,b){var v;for((b=b||w.length)>w.length&&(b=w.length),v=b-1;0<=v&&(192&w[v])==128;)v--;return v<0||v===0?b:v+c[w[v]]>b?v:b}(f),y=f;g!==f.length&&(a.uint8array?(y=f.subarray(0,g),this.leftOver=f.subarray(g,f.length)):(y=f.slice(0,g),this.leftOver=f.slice(g,f.length))),this.push({data:s.utf8decode(y),meta:p.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=h,n.inherits(u,l),u.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),l=t("./external");function c(m){return m}function d(m,g){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=n(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var f,m,g,y=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?u[g++]=224|p>>>12:(u[g++]=240|p>>>18,u[g++]=128|p>>>12&63),u[g++]=128|p>>>6&63),u[g++]=128|63&p);return u},s.buf2binstring=function(h){return d(h,h.length)},s.binstring2buf=function(h){for(var u=new n.Buf8(h.length),p=0,f=u.length;p>10&1023,w[f++]=56320|1023&m)}return d(w,f)},s.utf8border=function(h,u){var p;for((u=u||h.length)>h.length&&(u=h.length),p=u-1;0<=p&&(192&h[p])==128;)p--;return p<0||p===0?u:p+l[h[p]]>u?p:u}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,a,o,l){for(var c=65535&n|0,d=n>>>16&65535|0,h=0;o!==0;){for(o-=h=2e3>>1:a>>>1;o[l]=a}return o}();i.exports=function(a,o,l,c){var d=n,h=c+l;a^=-1;for(var u=c;u>>8^d[255&(a^o[u])];return-1^a}},{}],46:[function(t,i,s){var n,a=t("../utils/common"),o=t("./trees"),l=t("./adler32"),c=t("./crc32"),d=t("./messages"),h=0,u=4,p=0,f=-2,m=-1,g=4,y=2,w=8,b=9,v=286,E=30,C=19,I=2*v+1,L=15,k=3,N=258,G=N+k+1,A=42,S=113,x=1,D=2,$=3,R=4;function O(T,Y){return T.msg=d[Y],Y}function W(T){return(T<<1)-(4T.avail_out&&(j=T.avail_out),j!==0&&(a.arraySet(T.output,Y.pending_buf,Y.pending_out,j,T.next_out),T.next_out+=j,Y.pending_out+=j,T.total_out+=j,T.avail_out-=j,Y.pending-=j,Y.pending===0&&(Y.pending_out=0))}function U(T,Y){o._tr_flush_block(T,0<=T.block_start?T.block_start:-1,T.strstart-T.block_start,Y),T.block_start=T.strstart,F(T.strm)}function te(T,Y){T.pending_buf[T.pending++]=Y}function Q(T,Y){T.pending_buf[T.pending++]=Y>>>8&255,T.pending_buf[T.pending++]=255&Y}function Z(T,Y){var j,P,M=T.max_chain_length,H=T.strstart,J=T.prev_length,ee=T.nice_match,z=T.strstart>T.w_size-G?T.strstart-(T.w_size-G):0,re=T.window,he=T.w_mask,ne=T.prev,_e=T.strstart+N,Ye=re[H+J-1],Fe=re[H+J];T.prev_length>=T.good_match&&(M>>=2),ee>T.lookahead&&(ee=T.lookahead);do if(re[(j=Y)+J]===Fe&&re[j+J-1]===Ye&&re[j]===re[H]&&re[++j]===re[H+1]){H+=2,j++;do;while(re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&H<_e);if(P=N-(_e-H),H=_e-N,Jz&&--M!=0);return J<=T.lookahead?J:T.lookahead}function ye(T){var Y,j,P,M,H,J,ee,z,re,he,ne=T.w_size;do{if(M=T.window_size-T.lookahead-T.strstart,T.strstart>=ne+(ne-G)){for(a.arraySet(T.window,T.window,ne,ne,0),T.match_start-=ne,T.strstart-=ne,T.block_start-=ne,Y=j=T.hash_size;P=T.head[--Y],T.head[Y]=ne<=P?P-ne:0,--j;);for(Y=j=ne;P=T.prev[--Y],T.prev[Y]=ne<=P?P-ne:0,--j;);M+=ne}if(T.strm.avail_in===0)break;if(J=T.strm,ee=T.window,z=T.strstart+T.lookahead,re=M,he=void 0,he=J.avail_in,re=k)for(H=T.strstart-T.insert,T.ins_h=T.window[H],T.ins_h=(T.ins_h<=k&&(T.ins_h=(T.ins_h<=k)if(P=o._tr_tally(T,T.strstart-T.match_start,T.match_length-k),T.lookahead-=T.match_length,T.match_length<=T.max_lazy_match&&T.lookahead>=k){for(T.match_length--;T.strstart++,T.ins_h=(T.ins_h<=k&&(T.ins_h=(T.ins_h<=k&&T.match_length<=T.prev_length){for(M=T.strstart+T.lookahead-k,P=o._tr_tally(T,T.strstart-1-T.prev_match,T.prev_length-k),T.lookahead-=T.prev_length-1,T.prev_length-=2;++T.strstart<=M&&(T.ins_h=(T.ins_h<T.pending_buf_size-5&&(j=T.pending_buf_size-5);;){if(T.lookahead<=1){if(ye(T),T.lookahead===0&&Y===h)return x;if(T.lookahead===0)break}T.strstart+=T.lookahead,T.lookahead=0;var P=T.block_start+j;if((T.strstart===0||T.strstart>=P)&&(T.lookahead=T.strstart-P,T.strstart=P,U(T,!1),T.strm.avail_out===0)||T.strstart-T.block_start>=T.w_size-G&&(U(T,!1),T.strm.avail_out===0))return x}return T.insert=0,Y===u?(U(T,!0),T.strm.avail_out===0?$:R):(T.strstart>T.block_start&&(U(T,!1),T.strm.avail_out),x)}),new fe(4,4,8,4,Ce),new fe(4,5,16,8,Ce),new fe(4,6,32,32,Ce),new fe(4,4,16,16,ce),new fe(8,16,32,32,ce),new fe(8,16,128,128,ce),new fe(8,32,128,256,ce),new fe(32,128,258,1024,ce),new fe(32,258,258,4096,ce)],s.deflateInit=function(T,Y){return be(T,Y,w,15,8,0)},s.deflateInit2=be,s.deflateReset=pe,s.deflateResetKeep=le,s.deflateSetHeader=function(T,Y){return T&&T.state?T.state.wrap!==2?f:(T.state.gzhead=Y,p):f},s.deflate=function(T,Y){var j,P,M,H;if(!T||!T.state||5>8&255),te(P,P.gzhead.time>>16&255),te(P,P.gzhead.time>>24&255),te(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),te(P,255&P.gzhead.os),P.gzhead.extra&&P.gzhead.extra.length&&(te(P,255&P.gzhead.extra.length),te(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(T.adler=c(T.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=69):(te(P,0),te(P,0),te(P,0),te(P,0),te(P,0),te(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),te(P,3),P.status=S);else{var J=w+(P.w_bits-8<<4)<<8;J|=(2<=P.strategy||P.level<2?0:P.level<6?1:P.level===6?2:3)<<6,P.strstart!==0&&(J|=32),J+=31-J%31,P.status=S,Q(P,J),P.strstart!==0&&(Q(P,T.adler>>>16),Q(P,65535&T.adler)),T.adler=1}if(P.status===69)if(P.gzhead.extra){for(M=P.pending;P.gzindex<(65535&P.gzhead.extra.length)&&(P.pending!==P.pending_buf_size||(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending!==P.pending_buf_size));)te(P,255&P.gzhead.extra[P.gzindex]),P.gzindex++;P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=73)}else P.status=73;if(P.status===73)if(P.gzhead.name){M=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending===P.pending_buf_size)){H=1;break}H=P.gzindexM&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),H===0&&(P.gzindex=0,P.status=91)}else P.status=91;if(P.status===91)if(P.gzhead.comment){M=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending===P.pending_buf_size)){H=1;break}H=P.gzindexM&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),H===0&&(P.status=103)}else P.status=103;if(P.status===103&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&F(T),P.pending+2<=P.pending_buf_size&&(te(P,255&T.adler),te(P,T.adler>>8&255),T.adler=0,P.status=S)):P.status=S),P.pending!==0){if(F(T),T.avail_out===0)return P.last_flush=-1,p}else if(T.avail_in===0&&W(Y)<=W(j)&&Y!==u)return O(T,-5);if(P.status===666&&T.avail_in!==0)return O(T,-5);if(T.avail_in!==0||P.lookahead!==0||Y!==h&&P.status!==666){var ee=P.strategy===2?function(z,re){for(var he;;){if(z.lookahead===0&&(ye(z),z.lookahead===0)){if(re===h)return x;break}if(z.match_length=0,he=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,he&&(U(z,!1),z.strm.avail_out===0))return x}return z.insert=0,re===u?(U(z,!0),z.strm.avail_out===0?$:R):z.last_lit&&(U(z,!1),z.strm.avail_out===0)?x:D}(P,Y):P.strategy===3?function(z,re){for(var he,ne,_e,Ye,Fe=z.window;;){if(z.lookahead<=N){if(ye(z),z.lookahead<=N&&re===h)return x;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=k&&0z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=k?(he=o._tr_tally(z,1,z.match_length-k),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(he=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),he&&(U(z,!1),z.strm.avail_out===0))return x}return z.insert=0,re===u?(U(z,!0),z.strm.avail_out===0?$:R):z.last_lit&&(U(z,!1),z.strm.avail_out===0)?x:D}(P,Y):n[P.level].func(P,Y);if(ee!==$&&ee!==R||(P.status=666),ee===x||ee===$)return T.avail_out===0&&(P.last_flush=-1),p;if(ee===D&&(Y===1?o._tr_align(P):Y!==5&&(o._tr_stored_block(P,0,0,!1),Y===3&&(V(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),F(T),T.avail_out===0))return P.last_flush=-1,p}return Y!==u?p:P.wrap<=0?1:(P.wrap===2?(te(P,255&T.adler),te(P,T.adler>>8&255),te(P,T.adler>>16&255),te(P,T.adler>>24&255),te(P,255&T.total_in),te(P,T.total_in>>8&255),te(P,T.total_in>>16&255),te(P,T.total_in>>24&255)):(Q(P,T.adler>>>16),Q(P,65535&T.adler)),F(T),0=j.w_size&&(H===0&&(V(j.head),j.strstart=0,j.block_start=0,j.insert=0),re=new a.Buf8(j.w_size),a.arraySet(re,Y,he-j.w_size,j.w_size,0),Y=re,he=j.w_size),J=T.avail_in,ee=T.next_in,z=T.input,T.avail_in=he,T.next_in=0,T.input=Y,ye(j);j.lookahead>=k;){for(P=j.strstart,M=j.lookahead-(k-1);j.ins_h=(j.ins_h<>>=k=L>>>24,b-=k,(k=L>>>16&255)===0)D[d++]=65535&L;else{if(!(16&k)){if(!(64&k)){L=v[(65535&L)+(w&(1<>>=k,b-=k),b<15&&(w+=x[l++]<>>=k=L>>>24,b-=k,!(16&(k=L>>>16&255))){if(!(64&k)){L=E[(65535&L)+(w&(1<>>=k,b-=k,(k=d-h)>3,w&=(1<<(b-=N<<3))-1,n.next_in=l,n.next_out=d,n.avail_in=l>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function w(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(A){var S;return A&&A.state?(S=A.state,A.total_in=A.total_out=S.total=0,A.msg="",S.wrap&&(A.adler=1&S.wrap),S.mode=f,S.last=0,S.havedict=0,S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new n.Buf32(m),S.distcode=S.distdyn=new n.Buf32(g),S.sane=1,S.back=-1,u):p}function v(A){var S;return A&&A.state?((S=A.state).wsize=0,S.whave=0,S.wnext=0,b(A)):p}function E(A,S){var x,D;return A&&A.state?(D=A.state,S<0?(x=0,S=-S):(x=1+(S>>4),S<48&&(S&=15)),S&&(S<8||15=R.wsize?(n.arraySet(R.window,S,x-R.wsize,R.wsize,0),R.wnext=0,R.whave=R.wsize):(D<($=R.wsize-R.wnext)&&($=D),n.arraySet(R.window,S,x-D,$,R.wnext),(D-=$)?(n.arraySet(R.window,S,x-D,D,0),R.wnext=D,R.whave=R.wsize):(R.wnext+=$,R.wnext===R.wsize&&(R.wnext=0),R.whave>>8&255,x.check=o(x.check,H,2,0),U=F=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&F)<<8)+(F>>8))%31){A.msg="incorrect header check",x.mode=30;break}if((15&F)!=8){A.msg="unknown compression method",x.mode=30;break}if(U-=4,T=8+(15&(F>>>=4)),x.wbits===0)x.wbits=T;else if(T>x.wbits){A.msg="invalid window size",x.mode=30;break}x.dmax=1<>8&1),512&x.flags&&(H[0]=255&F,H[1]=F>>>8&255,x.check=o(x.check,H,2,0)),U=F=0,x.mode=3;case 3:for(;U<32;){if(W===0)break e;W--,F+=D[R++]<>>8&255,H[2]=F>>>16&255,H[3]=F>>>24&255,x.check=o(x.check,H,4,0)),U=F=0,x.mode=4;case 4:for(;U<16;){if(W===0)break e;W--,F+=D[R++]<>8),512&x.flags&&(H[0]=255&F,H[1]=F>>>8&255,x.check=o(x.check,H,2,0)),U=F=0,x.mode=5;case 5:if(1024&x.flags){for(;U<16;){if(W===0)break e;W--,F+=D[R++]<>>8&255,x.check=o(x.check,H,2,0)),U=F=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(W<(Z=x.length)&&(Z=W),Z&&(x.head&&(T=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),n.arraySet(x.head.extra,D,R,Z,T)),512&x.flags&&(x.check=o(x.check,D,Z,R)),W-=Z,R+=Z,x.length-=Z),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(W===0)break e;for(Z=0;T=D[R+Z++],x.head&&T&&x.length<65536&&(x.head.name+=String.fromCharCode(T)),T&&Z>9&1,x.head.done=!0),A.adler=x.check=0,x.mode=12;break;case 10:for(;U<32;){if(W===0)break e;W--,F+=D[R++]<>>=7&U,U-=7&U,x.mode=27;break}for(;U<3;){if(W===0)break e;W--,F+=D[R++]<>>=1)){case 0:x.mode=14;break;case 1:if(N(x),x.mode=20,S!==6)break;F>>>=2,U-=2;break e;case 2:x.mode=17;break;case 3:A.msg="invalid block type",x.mode=30}F>>>=2,U-=2;break;case 14:for(F>>>=7&U,U-=7&U;U<32;){if(W===0)break e;W--,F+=D[R++]<>>16^65535)){A.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&F,U=F=0,x.mode=15,S===6)break e;case 15:x.mode=16;case 16:if(Z=x.length){if(W>>=5,U-=5,x.ndist=1+(31&F),F>>>=5,U-=5,x.ncode=4+(15&F),F>>>=4,U-=4,286>>=3,U-=3}for(;x.have<19;)x.lens[J[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,j={bits:x.lenbits},Y=c(0,x.lens,0,19,x.lencode,0,x.work,j),x.lenbits=j.bits,Y){A.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=ce,U-=ce,x.lens[x.have++]=we;else{if(we===16){for(P=ce+2;U>>=ce,U-=ce,x.have===0){A.msg="invalid bit length repeat",x.mode=30;break}T=x.lens[x.have-1],Z=3+(3&F),F>>>=2,U-=2}else if(we===17){for(P=ce+3;U>>=ce)),F>>>=3,U-=3}else{for(P=ce+7;U>>=ce)),F>>>=7,U-=7}if(x.have+Z>x.nlen+x.ndist){A.msg="invalid bit length repeat",x.mode=30;break}for(;Z--;)x.lens[x.have++]=T}}if(x.mode===30)break;if(x.lens[256]===0){A.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,j={bits:x.lenbits},Y=c(d,x.lens,0,x.nlen,x.lencode,0,x.work,j),x.lenbits=j.bits,Y){A.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,j={bits:x.distbits},Y=c(h,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,j),x.distbits=j.bits,Y){A.msg="invalid distances set",x.mode=30;break}if(x.mode=20,S===6)break e;case 20:x.mode=21;case 21:if(6<=W&&258<=V){A.next_out=O,A.avail_out=V,A.next_in=R,A.avail_in=W,x.hold=F,x.bits=U,l(A,Q),O=A.next_out,$=A.output,V=A.avail_out,R=A.next_in,D=A.input,W=A.avail_in,F=x.hold,U=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;fe=(M=x.lencode[F&(1<>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>le)])>>>16&255,we=65535&M,!(le+(ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=le,U-=le,x.back+=le}if(F>>>=ce,U-=ce,x.back+=ce,x.length=we,fe===0){x.mode=26;break}if(32&fe){x.back=-1,x.mode=12;break}if(64&fe){A.msg="invalid literal/length code",x.mode=30;break}x.extra=15&fe,x.mode=22;case 22:if(x.extra){for(P=x.extra;U>>=x.extra,U-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;fe=(M=x.distcode[F&(1<>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>le)])>>>16&255,we=65535&M,!(le+(ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=le,U-=le,x.back+=le}if(F>>>=ce,U-=ce,x.back+=ce,64&fe){A.msg="invalid distance code",x.mode=30;break}x.offset=we,x.extra=15&fe,x.mode=24;case 24:if(x.extra){for(P=x.extra;U>>=x.extra,U-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){A.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(V===0)break e;if(Z=Q-V,x.offset>Z){if((Z=x.offset-Z)>x.whave&&x.sane){A.msg="invalid distance too far back",x.mode=30;break}ye=Z>x.wnext?(Z-=x.wnext,x.wsize-Z):x.wnext-Z,Z>x.length&&(Z=x.length),Ce=x.window}else Ce=$,ye=O-x.offset,Z=x.length;for(VI?(k=ye[Ce+g[S]],U[te+g[S]]):(k=96,0),w=1<>O)+(b-=w)]=L<<24|k<<16|N|0,b!==0;);for(w=1<>=1;if(w!==0?(F&=w-1,F+=w):F=0,S++,--Q[A]==0){if(A===D)break;A=h[u+g[S]]}if($>>7)]}function te(M,H){M.pending_buf[M.pending++]=255&H,M.pending_buf[M.pending++]=H>>>8&255}function Q(M,H,J){M.bi_valid>y-J?(M.bi_buf|=H<>y-M.bi_valid,M.bi_valid+=J-y):(M.bi_buf|=H<>>=1,J<<=1,0<--H;);return J>>>1}function Ce(M,H,J){var ee,z,re=new Array(g+1),he=0;for(ee=1;ee<=g;ee++)re[ee]=he=he+J[ee-1]<<1;for(z=0;z<=H;z++){var ne=M[2*z+1];ne!==0&&(M[2*z]=ye(re[ne]++,ne))}}function ce(M){var H;for(H=0;H>1;1<=J;J--)le(M,re,J);for(z=_e;J=M.heap[1],M.heap[1]=M.heap[M.heap_len--],le(M,re,1),ee=M.heap[1],M.heap[--M.heap_max]=J,M.heap[--M.heap_max]=ee,re[2*z]=re[2*J]+re[2*ee],M.depth[z]=(M.depth[J]>=M.depth[ee]?M.depth[J]:M.depth[ee])+1,re[2*J+1]=re[2*ee+1]=z,M.heap[1]=z++,le(M,re,1),2<=M.heap_len;);M.heap[--M.heap_max]=M.heap[1],function(Fe,Gt){var Xr,Qt,qr,at,q,me,Te=Gt.dyn_tree,$e=Gt.max_code,Ve=Gt.stat_desc.static_tree,Ct=Gt.stat_desc.has_stree,Vt=Gt.stat_desc.extra_bits,tr=Gt.stat_desc.extra_base,wr=Gt.stat_desc.max_length,ei=0;for(at=0;at<=g;at++)Fe.bl_count[at]=0;for(Te[2*Fe.heap[Fe.heap_max]+1]=0,Xr=Fe.heap_max+1;Xr>=7;z>>=1)if(1&Ye&&ne.dyn_ltree[2*_e]!==0)return a;if(ne.dyn_ltree[18]!==0||ne.dyn_ltree[20]!==0||ne.dyn_ltree[26]!==0)return o;for(_e=32;_e>>3,(re=M.static_len+3+7>>>3)<=z&&(z=re)):z=re=J+5,J+4<=z&&H!==-1?P(M,H,J,ee):M.strategy===4||re===z?(Q(M,2+(ee?1:0),3),pe(M,G,A)):(Q(M,4+(ee?1:0),3),function(ne,_e,Ye,Fe){var Gt;for(Q(ne,_e-257,5),Q(ne,Ye-1,5),Q(ne,Fe-4,4),Gt=0;Gt>>8&255,M.pending_buf[M.d_buf+2*M.last_lit+1]=255&H,M.pending_buf[M.l_buf+M.last_lit]=255&J,M.last_lit++,H===0?M.dyn_ltree[2*J]++:(M.matches++,H--,M.dyn_ltree[2*(x[J]+h+1)]++,M.dyn_dtree[2*U(H)]++),M.last_lit===M.lit_bufsize-1},s._tr_align=function(M){Q(M,2,3),Z(M,b,G),function(H){H.bi_valid===16?(te(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):8<=H.bi_valid&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)}(M)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(a,o){if(!a.setImmediate){var l,c,d,h,u=1,p={},f=!1,m=a.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(a);g=g&&g.setTimeout?g:a,l={}.toString.call(a.process)==="[object process]"?function(v){process.nextTick(function(){w(v)})}:function(){if(a.postMessage&&!a.importScripts){var v=!0,E=a.onmessage;return a.onmessage=function(){v=!1},a.postMessage("","*"),a.onmessage=E,v}}()?(h="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",b,!1):a.attachEvent("onmessage",b),function(v){a.postMessage(h+v,"*")}):a.MessageChannel?((d=new MessageChannel).port1.onmessage=function(v){w(v.data)},function(v){d.port2.postMessage(v)}):m&&"onreadystatechange"in m.createElement("script")?(c=m.documentElement,function(v){var E=m.createElement("script");E.onreadystatechange=function(){w(v),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(v){setTimeout(w,0,v)},g.setImmediate=function(v){typeof v!="function"&&(v=new Function(""+v));for(var E=new Array(arguments.length-1),C=0;C"u"?n===void 0?this:n:self)}).call(this,typeof Wt<"u"?Wt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ty);var YA=ty.exports;const XA=ya(YA),nr=class nr{static async writeHandle(e,t){const i=this.workID++,s=new Promise((o,l)=>this.map.set(i,[o,l])),n=new TextEncoder,a=typeof t=="string"?n.encode(t):await t.arrayBuffer();return this.worker.postMessage([i,e,a],[a]),s}};ks(nr,"worker",new Worker(new URL("/smeditor/assets/SafariFileWorker-557e53c3.js",self.location),{type:"module"})),ks(nr,"workID",0),ks(nr,"map",new Map),nr.worker.onmessage=e=>{const t=e.data;t.success?nr.map.get(t.id)[0]():nr.map.get(t.id)[1](t.reason),nr.map.delete(t.id)};let Hc=nr;class qA{_root;async getRoot(){return this._root||(VA.adapter.native?await Qp().then(e=>this._root=e):await Qp(Ke(()=>import("./memory-5b775533.js"),[])).then(e=>this._root=e)),this._root}async uploadHandle(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.kind=="file"){const s=await i.getFileHandle(e.name,{create:!0});await this.writeFile(s,await e.getFile())}else{const s=await i.getDirectoryHandle(e.name,{create:!0}),n=[];for await(const a of e.values())n.push(this.uploadHandle(a,s));await Promise.all(n)}}async uploadFiles(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.isFile){const s=e;if(s.name==".DS_Store")return;s.file(async n=>{const a=await i.getFileHandle(n.name,{create:!0});await this.writeHandle(a,n)})}else if(e.isDirectory){const s=e.createReader(),n=await i.getDirectoryHandle(e.name,{create:!0});for await(const a of n.values())await n.removeEntry(a.name,{recursive:!0});s.readEntries(async a=>{const o=[];for(let l=0;li!="."&&i!="");t.indexOf("..")>-1;){const i=t.indexOf("..");if(i==0)throw Error("Path"+t.join("/")+"is invalid!");t.splice(i-1,2)}return t.join("/")}async zipDirectory(e,t){const i=t??new XA,s=$i(e)==""?e:Ot(e),n=await this.getDirectoryHandle(s);if(n){for(const a of await this.getDirectoryFiles(n))i.file(a.name,await a.getFile());for(const a of await this.getDirectoryFolders(n)){const o=i.folder(a.name);if(!o){console.error("Failed to zip folder "+s+"/"+a.name);continue}await this.zipDirectory(s+"/"+a.name,o)}return i}}async saveDirectory(e){const t=$i(e)==""?e:Ot(e);Se.create("Exporting "+t+".zip");const i=await HA({_preferPolyfill:!1,suggestedName:`${t}.zip`,types:[{accept:{"application/zip":[".zip"]}}],excludeAcceptAllOption:!1}),s=await this.zipDirectory(e);s&&await s.generateAsync({type:"blob"}).then(async n=>{if(!window.showSaveFilePicker){console.log(n);const a=document.createElement("a"),o=URL.createObjectURL(n);document.body.appendChild(a),a.href=o,a.download=t+".zip",a.click(),a.remove(),window.URL.revokeObjectURL(o);return}await this.writeHandle(i,n)})}async renameFile(e,t){if(e!=t)try{const i=await this.getDirectoryHandle(Ot(e)),s=await this.getDirectoryHandle(Ot(t),{create:!0}),n=await this.getFileHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,zi(t)),await i.removeEntry(zi(e))}catch(i){console.error(i)}}async renameDirectory(e,t){if(!t.startsWith(e))try{const i=await this.getDirectoryHandle(Ot(e)),s=await this.getDirectoryHandle(Ot(t),{create:!0}),n=await this.getDirectoryHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,zi(t)),await i.removeEntry(zi(e),{recursive:!0})}catch(i){console.error(i)}}async copyToHandle(e,t,i){try{if(t.kind=="directory"){const s=await e.getDirectoryHandle(i??t.name,{create:!0}),n=[];for await(const a of t.values())n.push(this.copyToHandle(s,a));await Promise.all(n)}else{const s=await t.getFile(),n=await e.getFileHandle(i??t.name,{create:!0});await this.writeHandle(n,s)}}catch(s){console.error(s)}}getRelativePath(e,t){const i=e.split("/"),s=t.split("/"),n=Math.min(i.length,s.length);let a=n;for(let l=0;limport("./NodeFileHandler-6a5f8a13.js"),[])).NodeFileHandler:new qA}static getStandardHandler(){return this.standardHandler}static getHandler(e){return e!==void 0&&e.startsWith("https://")||e?.startsWith("http://")?this.urlHandler:this.standardHandler}static handleDropEvent(e,t){return this.getHandler().handleDropEvent(e,t)}static getDirectoryHandle(e,t){return Ue.getHandler(e).getDirectoryHandle(e,t)}static hasFile(e){return Ue.getHandler(e).hasFile(e)}static getFileHandle(e,t){return Ue.getHandler(e).getFileHandle(e,t)}static getFileHandleRelativeTo(e,t){return Ue.getHandler(e).getFileHandleRelativeTo(e,t)}static getDirectoryFiles(e){return Ue.getHandler(typeof e=="string"?e:void 0).getDirectoryFiles(e)}static getDirectoryFolders(e){return Ue.getHandler(typeof e=="string"?e:void 0).getDirectoryFolders(e)}static writeFile(e,t){return Ue.getHandler(typeof e=="string"?e:void 0).writeFile(e,t)}static getRelativePath(e,t){return Ue.getHandler().getRelativePath(e,t)}}class St{windowManager;options;windowElement;viewElement;constructor(e){this.options=e;const t=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");if(t.appendChild(s),t.appendChild(i),t.style.width=e.width+"px",t.style.left=window.innerWidth/2-e.width/2+"px",t.style.top=window.innerHeight/2-e.height/2+"px",t.classList.add("unselectable","window"),e.win_id&&(t.dataset.win_id=e.win_id),i.classList.add("view"),i.style.height=e.height+"px",i.style.width=e.width+"px",s.classList.add("navbar"),e.title!==""&&s.appendChild(n),!e.disableClose){const a=Ae.getIcon("MINIMIZE",15),o=Ae.getIcon("CLOSE_WINDOW",15);a.classList.add("unselectable"),a.draggable=!1,a.onclick=()=>{i.style.height!="0px"?i.style.height="0px":i.style.height=e.height+"px",this.clampPosition()},o.classList.add("unselectable"),o.draggable=!1,o.onclick=()=>this.closeWindow(),s.appendChild(a),s.appendChild(o)}n.innerText=e.title,n.classList.add("title"),t.addEventListener("mousedown",()=>this.focus()),e.blocking&&(window.addEventListener("mousedown",this.block,!0),document.getElementById("blocker").style.display="block",t.dataset.blocking="block"),n.addEventListener("mousedown",()=>{window.addEventListener("mousemove",this.handleDrag),window.addEventListener("mouseup",()=>window.removeEventListener("mousemove",this.handleDrag))}),this.focus(),t.classList.add("focused"),this.windowElement=t,this.viewElement=i}addToManager(e){this.windowManager=e,e.view.appendChild(this.windowElement),this.focus()}onClose(){}closeWindow(){this.windowManager&&(this.onClose(),this.windowManager.removeWindow(this),this.windowElement.classList.add("exiting"),window.removeEventListener("mousedown",this.block,!0),this.options.blocking&&this.windowManager.windows.filter(e=>e.options.blocking).length==0&&(document.getElementById("blocker").style.display="none"),setTimeout(()=>this.windowManager.view.removeChild(this.windowElement),40))}focus(){if(this.windowManager==null)return;this.windowManager.unfocusAll(),this.windowElement.classList.add("focused");const e=Array.from(this.windowManager.view.children).map(t=>t).filter(t=>t!=this.windowElement);e.sort((t,i)=>parseInt(t.style.zIndex)-parseInt(i.style.zIndex)),e.push(this.windowElement);for(let t=0;t{!e.target||this.windowElement.contains(e.target)||(e.stopImmediatePropagation(),e.preventDefault())};handleDrag=e=>{const t=parseInt(this.windowElement.style.left.slice(0,-2))+e.movementX,i=parseInt(this.windowElement.style.top.slice(0,-2))+e.movementY;this.windowElement.style.left=t+"px",this.windowElement.style.top=i+"px",this.clampPosition()};clampPosition(){if(this.windowManager==null)return;const e=parseInt(this.windowElement.style.left.slice(0,-2)),t=parseInt(this.windowElement.style.top.slice(0,-2)),i=this.windowManager.app.view.getBoundingClientRect();this.windowElement.style.left=Be(e,i.left,i.width-this.windowElement.clientWidth+i.left)+"px",this.windowElement.style.top=Be(t,i.top,i.height-this.windowElement.clientHeight+i.top)+"px"}move(e,t){this.windowElement.style.left=e+"px",this.windowElement.style.top=t+"px"}}class kd extends St{app;dirOptions;fileDropPath="";draggedElement;draggedCopy;keyHandler;dropHandler;mouseHandler;dragHandler;constructor(e,t,i){super({title:t.title,width:500,height:400,disableClose:t.disableClose,win_id:"file_selector"+Math.random(),blocking:!0}),this.app=e,this.dirOptions=t,t.accepted_file_types||=[],this.keyHandler=this.handleKeyEvent.bind(this),this.dropHandler=this.handleDropEvent.bind(this),this.mouseHandler=this.handleMouseEvent.bind(this),this.dragHandler=this.handleDragEvent.bind(this),this.initView().then(()=>{i&&this.selectPath(i),t.onload?.()})}async initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("menu-options");const i=document.createElement("div");i.classList.add("menu-left");const s=document.createElement("div");s.classList.add("menu-right"),t.appendChild(i),t.appendChild(s);const n=document.createElement("button");n.innerText="Cancel",n.onclick=()=>{window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),this.closeWindow()};const a=document.createElement("button");a.innerText="Select",a.classList.add("confirm"),a.onclick=()=>this.confirmFile(),a.disabled=!0,i.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dir-selector"),o.onclick=y=>{y.target==o&&this.selectElement(void 0)};const l=document.createElement("div");l.classList.add("file-options");const c=document.createElement("button"),d=Ae.getIcon("ADD_FILE",16);c.appendChild(d),c.appendChild(document.createTextNode("Upload files")),l.appendChild(c),c.onclick=async()=>{const y=this.fileDropPath,w=await Jg({_preferPolyfill:!1,excludeAcceptAllOption:!1,multiple:!0}),v=this.viewElement.querySelector(".info.selected")?.dataset.path??"",E=[];for(const C of w)E.push(Ue.getStandardHandler().uploadHandle(C,v));await Promise.all(E),await this.refreshDirectory(y),this.getAcceptableFile(y).then(C=>this.selectPath(C))};const h=document.createElement("button"),u=Ae.getIcon("FOLDER",16);h.appendChild(u),h.appendChild(document.createTextNode("Upload folder")),l.appendChild(h),h.onclick=async()=>{const y=this.fileDropPath,w=await UA({_preferPolyfill:!1}),v=this.viewElement.querySelector(".info.selected")?.dataset.path??"";await Ue.getStandardHandler().uploadHandle(w,v),await this.refreshDirectory(y),this.getAcceptableFile(y==""?w.name:y+"/"+w.name).then(E=>this.selectPath(E))};const p=document.createElement("button");p.classList.add("rename");const f=Ae.getIcon("EDIT",16);p.appendChild(f),p.appendChild(document.createTextNode("Rename")),p.disabled=!0,p.onclick=()=>{const y=this.viewElement.querySelector(".info.selected");y?.dataset.path&&this.startEditing(y.querySelector("textarea"))},l.appendChild(p);const m=document.createElement("button");m.classList.add("delete");const g=Ae.getIcon("TRASH",16);m.appendChild(g),m.appendChild(document.createTextNode("Delete")),m.disabled=!0,m.onclick=()=>{const y=this.viewElement.querySelector(".info.selected"),w=y?.dataset.path;if(!w)return;const b=y.parentElement.classList.contains("folder");Ue.getStandardHandler()[b?"removeDirectory":"removeFile"](w).then(()=>{const v=this.getElement(w);v&&(v.parentElement?.remove(),m.disabled=!0,p.disabled=!0)})},l.appendChild(m),e.appendChild(o),e.appendChild(l),e.appendChild(t),this.viewElement.appendChild(e),window.addEventListener("keydown",this.keyHandler,!0),window.addEventListener("drop",this.dropHandler,!0),window.addEventListener("mousemove",this.dragHandler,!0),this.viewElement.addEventListener("dragover",this.mouseHandler),await this.createDiv("").then(y=>o.replaceChildren(...y))}async expand(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.remove("collapsed");const t=e.nextSibling;await this.createDiv(e.dataset.path).then(i=>{t.replaceChildren(...i)})}collapse(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.add("collapsed"),e.nextSibling.replaceChildren()}selectElement(e){if(this.viewElement.querySelector(".info.selected")?.classList.remove("selected"),!e){this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0;return}e.classList.add("selected"),ra(e,{scrollMode:"if-needed",block:"nearest",inline:"nearest"});const t=this.viewElement.querySelector("button.confirm"),i=e.dataset.path;t.disabled=!0,i&&(t.disabled=!this.acceptableFileType(i),this.viewElement.querySelector(".delete").disabled=!1,this.viewElement.querySelector(".rename").disabled=!1)}async createDiv(e){const t=await Ue.getStandardHandler().getDirectoryFolders(e);let i=await Ue.getStandardHandler().getDirectoryFiles(e);return t.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i=i.filter(s=>$i(s.name)!=".crswap"),t.map(s=>this.createBaseElement(e,s)).concat(i.map(s=>this.createBaseElement(e,s)))}createBaseElement(e,t){e!=""&&(e+="/");const i=document.createElement("div");i.classList.add("item");const s=document.createElement("div");if(s.classList.add("info"),i.appendChild(s),t.kind=="directory"){const a=Ae.getIcon("CHEVRON",16);a.classList.add("folder-icon"),s.appendChild(a);const o=document.createElement("div");o.classList.add("children"),i.appendChild(o),i.classList.add("folder"),i.classList.add("collapsed"),s.addEventListener("click",l=>{const c=l.target;c?.classList.contains("options-icon")||c.tagName=="TEXTAREA"&&!c.disabled||(i.classList.contains("collapsed")?this.expand(s):this.collapse(s))})}else{this.acceptableFileType(t.name)||s.classList.add("disabled");const a=Ae.getIcon(this.getIconId(t.name),16);s.appendChild(a)}s.dataset.path=e+t.name;const n=document.createElement("textarea");return n.rows=1,n.disabled=!0,n.autocomplete="off",n.autocapitalize="off",n.spellcheck=!1,n.innerText=t.name,n.style.pointerEvents="none",n.classList.add("title"),s.appendChild(n),s.addEventListener("click",()=>this.selectElement(s)),s.addEventListener("mousedown",()=>this.startDragging(s)),s.ondblclick=()=>this.confirmFile(),i}confirmFile(){const t=this.viewElement.querySelector(".info.selected")?.dataset.path;t&&this.acceptableFileType(t)&&(this.dirOptions.callback?.(t),window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),window.removeEventListener("mousemove",this.dragHandler,!0),this.closeWindow())}acceptableFileType(e){return this.dirOptions.accepted_file_types.length==0||this.dirOptions.accepted_file_types.includes($i(e))}getIconId(e){const t=$i(e);return t==""&&!e.startsWith(".")?"FOLDER":ns.includes(t)?"IMAGE_FILE":fl.includes(t)?"VOLUME":[".sm",".ssc"].includes(t)?"SM_FILE":"UNKNOWN_FILE"}startEditing(e){const t=e.value,i=!!e.parentElement?.parentElement?.classList.contains("folder"),s=e.parentElement?.dataset.path??"",n=Ot(s);e.value=s.split("/").at(-1)??"",window.removeEventListener("keydown",this.keyHandler,!0),e.disabled=!1,e.style.pointerEvents="",e.focus(),e.addEventListener("keypress",a=>{a.code=="Enter"&&(a.preventDefault(),a.stopImmediatePropagation(),e.blur())},!0),e.addEventListener("blur",async()=>{if(window.addEventListener("keydown",this.keyHandler,!0),e.disabled=!0,e.style.pointerEvents="none",e.value.startsWith(".")){e.value=t;return}e.value=e.value.replaceAll("/","");const a=n==""?e.value:n+"/"+e.value;a!=s&&(e.parentElement.dataset.path=a,await Ue.getStandardHandler()[i?"renameDirectory":"renameFile"](s,a),this.refreshDirectory(n),e.value.length>32&&(e.value=e.value.slice(0,32)+"..."))})}async refreshDirectory(e){const t=this.viewElement.querySelector(".dir-selector");if(!t)return;let i=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']")?.nextSibling;if(e==""&&(i=t),!i)return;const s=Array.from(i.parentElement.querySelectorAll(".folder:not(.collapsed)")).map(n=>n.children[0].dataset.path);await this.createDiv(e).then(n=>i.replaceChildren(...n)),await Promise.all(s.map(n=>this.expand(t.querySelector("div[data-path='"+this.escapeSelector(n)+"']"))))}getElement(e){const t=this.viewElement.querySelector(".dir-selector");return t?t.querySelector("div[data-path='"+this.escapeSelector(e)+"']"):null}async getAcceptableFile(e){const t=await Ue.getStandardHandler().getDirectoryHandle(e);if(!t)return;const i=[{path:e,handle:t}];for(;i.length>0;){const s=i.shift(),n=s.handle;for await(const a of n.values()){const o=s.path==""?"":s.path+"/";if(a.kind=="directory")i.push({path:o+a.name,handle:a});else if(this.acceptableFileType(a.name))return o+a.name}}}async selectPath(e){if(!e)return;const t=this.viewElement.querySelector(".dir-selector");if(!t)return;const i=e.split("/");i.pop();const s=[];for(;i.length>0;){s.push(i.shift());const a=t.querySelector("div[data-path='"+this.escapeSelector(s.join("/"))+"']");if(!a)return;await this.expand(a)}const n=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']");n&&this.selectElement(n)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".info.selected");if(t==null){if(e.code.startsWith("Arrow")){const i=this.viewElement.querySelector(".info");i&&this.selectElement(i)}return}if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s=i.previousSibling?.querySelector(".info");s&&!s.parentElement.classList.contains("collapsed")&&s.parentElement.classList.contains("folder")&&(s=s.parentElement.querySelector(".children").lastChild.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.querySelector(".info")),s&&(this.selectElement(s),ra(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s;i.classList.contains("folder")&&!i.classList.contains("collapsed")&&(s=i.querySelector(".children").children[0].querySelector(".info")),s||(s=t.parentElement.nextSibling?.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.nextSibling.querySelector(".info")),s&&(this.selectElement(s),ra(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowLeft"&&(e.preventDefault(),e.stopImmediatePropagation(),this.collapse(t)),e.code=="ArrowRight"&&(e.preventDefault(),e.stopImmediatePropagation(),this.expand(t)),e.code=="Enter"&&(e.preventDefault(),e.stopImmediatePropagation(),t.parentElement?.querySelector(".title")&&this.startEditing(t.parentElement?.querySelector(".title"))),e.code=="Delete"||e.code=="Backspace"){const i=this.viewElement.querySelector(".info.selected"),s=i?.dataset.path;if(!s)return;const n=i.parentElement.classList.contains("folder");Ue.getStandardHandler()[n?"removeDirectory":"removeFile"](s).then(()=>{const a=this.getElement(s);a&&(a.parentElement?.remove(),this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0)})}}startDragging(e){const t=e;t.totalMovementX=0,t.totalMovementY=0,this.draggedElement=t;const i=()=>{this.stopDragging(),window.removeEventListener("mouseup",i)};window.addEventListener("mouseup",i)}handleDragEvent(e){if(this.draggedElement){if(this.draggedElement.totalMovementX+=e.movementX,this.draggedElement.totalMovementY+=e.movementY,!this.draggedCopy)if(Math.abs(this.draggedElement.totalMovementX)+Math.abs(this.draggedElement.totalMovementY)>8){this.viewElement.addEventListener("mousemove",this.mouseHandler),this.draggedCopy=this.draggedElement.parentElement.cloneNode(!0),this.draggedCopy.style.position="fixed";const t=this.draggedElement.getBoundingClientRect();this.draggedCopy.style.top=t.top+this.draggedElement.totalMovementY+"px",this.draggedCopy.style.left=t.left+this.draggedElement.totalMovementX+"px",this.draggedCopy.style.width=t.width+"px",this.draggedCopy.style.boxShadow="3px 3px 3px #222",this.draggedCopy.querySelector(".children")&&this.draggedCopy.removeChild(this.draggedCopy.querySelector(".children")),this.viewElement.appendChild(this.draggedCopy)}else return;this.draggedCopy.style.top=parseFloat(this.draggedCopy.style.top.slice(0,-2))+e.movementY+"px",this.draggedCopy.style.left=parseFloat(this.draggedCopy.style.left.slice(0,-2))+e.movementX+"px"}}async stopDragging(){if(this.draggedCopy){this.draggedCopy.remove(),this.viewElement.removeEventListener("mousemove",this.mouseHandler);const e=this.draggedCopy.classList.contains("folder"),t=this.draggedElement.dataset.path,i=this.fileDropPath==""?zi(this.draggedElement.dataset.path):this.fileDropPath+"/"+zi(this.draggedElement.dataset.path);t!=i&&await Ue.getStandardHandler()[e?"renameDirectory":"renameFile"](t,i),await this.refreshDirectory(Ot(t)),await this.refreshDirectory(Ot(i)),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}this.draggedCopy=void 0,this.draggedElement=void 0}handleDropEvent(e){e.preventDefault(),e.stopImmediatePropagation(),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),e.target.closest(".dir-selector")&&Ue.getStandardHandler().handleDropEvent(e,this.fileDropPath).then(async t=>{await this.refreshDirectory(this.fileDropPath),this.getAcceptableFile(t??this.fileDropPath).then(i=>this.selectPath(i)),this.fileDropPath=""})}handleMouseEvent(e){const t=this.viewElement.querySelector(".dir-selector");let i=Array.from(t.querySelectorAll("div.item.folder"));const s=this.viewElement.querySelector(".outlined");i=i.filter(n=>!n.parentElement.closest(".collapsed")),i.reverse(),i.push(t);for(const n of i){const a=n.getBoundingClientRect();if(e.clientX>=a.x&&e.clientX<=a.x+a.width&&e.clientY>=a.y&&e.clientY<=a.y+a.height){s!=n&&s?.classList.remove("outlined");const o=n.querySelector(".info");this.fileDropPath=o?.dataset.path??"",n.classList.contains("dir-selector")&&(this.fileDropPath=""),n.classList.add("outlined");return}}this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}escapeSelector(e){return e.replaceAll(/'/g,"\\'")}}class mt{items=[];itemIndex=0;limit=0;app;static instance;constructor(e){this.app=e,mt.instance||(mt.instance=this)}run(e){e.action(this.app),this.items.splice(this.itemIndex,this.items.length-this.itemIndex,e),this.itemIndex++}undo(){this.items[this.itemIndex-1]&&(this.items[this.itemIndex-1].undo(this.app),this.itemIndex--,K.emit("undo"))}redo(){this.items[this.itemIndex]&&(this.items[this.itemIndex].redo?this.items[this.itemIndex].redo(this.app):this.items[this.itemIndex].action(this.app),this.itemIndex++,K.emit("redo"))}reset(){this.itemIndex=0,this.limit=0,this.items=[]}canUndo(){return this.itemIndex>0}canRedo(){return this.itemIndex!=this.items.length}setLimit(){this.limit=this.itemIndex}isDirty(){return this.itemIndex!=this.limit}}function iy(){const r=document.createElement("div");return r.spellcheck=!1,r.contentEditable="true",r.classList.add("inlineEdit"),r.onkeydown=e=>{e.key=="Enter"&&r.blur()},r}function lo(r,e){return{title:r,element:t=>{const i=iy();return i.onblur=()=>{const s=t[e];mt.instance.run({action:()=>{t[e]=i.innerText},undo:()=>{t[e]=s}}),i.scrollLeft=0},i.innerText=t[e],i}}}const KA={name:lo("Name","chartName"),credit:lo("Artist","credit"),style:lo("Style","chartStyle"),description:lo("Description","description"),music:{title:"Music File",element:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-row","flex-column-gap","flex-static","hide-buttons");const i=()=>{if(s.innerText==(r.music??e.chartManager.loadedSM.properties.MUSIC??""))return;const c=e.chartManager.chartAudio.isPlaying();if(s.innerText==""||s.innerText==e.chartManager.loadedSM.properties.MUSIC){r.music=void 0,s.innerText=e.chartManager.loadedSM.properties.MUSIC+"",e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play();return}const d=r.music;mt.instance.run({action:()=>r.music=s.innerText==e.chartManager.loadedSM.properties.MUSIC?void 0:s.innerText,undo:()=>r.music=d}),e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play()},s=iy();s.style.flex="1",s.onblur=i,s.innerText=r.music??e.chartManager.loadedSM.properties.MUSIC??"";const n=document.createElement("button");n.onclick=()=>{const c=Ot(e.chartManager.smPath);if(window.nw){const d=document.createElement("input");d.type="file",d.accept="audio/*",d.onchange=()=>{s.innerText=Ue.getRelativePath(c,d.value),i()},d.click()}else e.windowManager.openWindow(new kd(e,{title:"Select an audio file...",accepted_file_types:fl,disableClose:!0,callback:d=>{s.innerText=Ue.getRelativePath(c,d),i()}},c+"/"+(r.music??e.chartManager.loadedSM.properties.MUSIC??"")))};const a=Ae.getIcon("FOLDER",12);n.appendChild(a);const o=document.createElement("button");o.onclick=()=>{s.innerText!=(e.chartManager.loadedSM.properties.MUSIC??"")&&(s.innerText=e.chartManager.loadedSM.properties.MUSIC??"",i())};const l=Ae.getIcon("REVERT",12);return o.appendChild(l),t.appendChild(s),t.appendChild(n),t.appendChild(o),t}}};class gi{view;items=[];selectedItem;onChangeHandlers=[];static create(e,t){return new gi(document.createElement("div"),e,t)}constructor(e,t,i){this.view=e,e.classList.add("dropdown"),this.items=t??[],this.selectedItem=i??this.items[0];const s=document.createElement("div");s.classList.add("dropdown-selected");const n=document.createElement("div");n.classList.add("dropdown-selected-text");const a=Ae.getIcon("CHEVRON",12);s.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dropdown-items"),o.style.height="",s.onclick=()=>{if(!s.classList.contains("disabled")){if(this.items.length==0){o.style.height="";return}this.createDropdown(),o.style.height==""?(o.classList.remove("collapsed"),o.style.width=Math.max(o.scrollWidth,s.clientWidth)+"px",o.style.height=o.scrollHeight+"px",Array.from(o.children).forEach((l,c)=>{l.style.animationDelay=c*.02+"s"})):(o.style.height="",o.classList.add("collapsed"))}},window.addEventListener("click",l=>{const c=l.target;(!c.closest(".dropdown")||c.closest(".dropdown")!=e)&&(o.style.height="")}),o.classList.add("collapsed"),this.view.appendChild(s),this.view.appendChild(o),this.setSelected()}onChange(e){this.onChangeHandlers.push(e)}removeHandler(e){this.onChangeHandlers.includes(e)&&this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(e),1)}getItems(){return this.items}setItems(e){this.items=e,e.includes(this.selectedItem)||(this.selectedItem=this.items[0],this.setSelected())}setSelected(e){this.selectedItem=e??this.selectedItem;const t=this.view.querySelector(".dropdown-selected-text");t.innerText=this.selectedItem?this.selectedItem+"":""}closeDropdown(){const e=this.view.querySelector(".dropdown-items");e&&(e.style.height="")}get value(){return this.selectedItem}get disabled(){return this.view.querySelector(".dropdown-selected").classList.contains("disabled")}set disabled(e){e?this.view.querySelector(".dropdown-selected").classList.add("disabled"):this.view.querySelector(".dropdown-selected").classList.remove("disabled")}createDropdown(){const e=this.view.querySelector(".dropdown-items"),t=this.items.map((i,s)=>{const n=document.createElement("div");return n.classList.add("dropdown-item"),n.innerText=i+"",n.onclick=()=>{e.style.height="",this.selectedItem!=i&&(this.setSelected(i),this.onChangeHandlers.forEach(a=>a(i,s)))},n});e.replaceChildren(...t)}}class Tl extends St{app;buttonOptions;message;resolve;resolved=new Promise(e=>this.resolve=e);constructor(e,t,i,s){super({title:t,width:300,height:100,disableClose:!0,win_id:"confirm",blocking:!0}),this.app=e,this.message=i,this.buttonOptions=s,this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText=this.message,e.appendChild(t);const i=document.createElement("div");i.classList.add("menu-options"),this.buttonOptions.forEach(s=>{const n=document.createElement("button");n.innerText=s.label,n.onclick=()=>{s.callback?.(),this.resolve?.(s.label),this.closeWindow()},s.type!="default"&&n.classList.add(s.type),i.append(n)}),e.appendChild(i),this.viewElement.appendChild(e)}}class ry extends St{app;gameType;chartList;chartInfo;gameTypeDropdown;smLoadHandler=()=>{this.gameTypeDropdown.setItems(We.getPriority().map(e=>{const t=this.app.chartManager.loadedSM?.charts[e.id]??[];return e.id+" ("+t.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts()};constructor(e,t){super({title:"Chart List",width:500,height:400,win_id:"chart_list"}),this.app=e,this.gameType=t??e.chartManager.loadedChart?.gameType??We.getPriority()[0],this.initView(),K.on("smLoadedAfter",this.smLoadHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("chart-view-type-wrapper");const i=document.createElement("div");i.classList.add("chart-view-type-label"),i.innerText="Game Type:",this.gameTypeDropdown=gi.create(We.getPriority().map(n=>{const a=this.app.chartManager.loadedSM?.charts[n.id]??[];return n.id+" ("+a.length+")"}),this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameTypeDropdown.onChange(n=>{this.gameType=We.getGameType(n.split(" ")[0])??this.gameType,this.loadCharts()}),t.appendChild(i),t.appendChild(this.gameTypeDropdown.view);const s=document.createElement("div");s.classList.add("chart-view-scroller"),e.appendChild(t),e.appendChild(s),this.chartList=document.createElement("div"),this.chartList.classList.add("chart-list"),this.chartInfo=document.createElement("div"),this.chartInfo.classList.add("chart-info"),s.appendChild(this.chartList),s.appendChild(this.chartInfo),this.viewElement.appendChild(e),this.loadCharts()}onClose(){K.off("smLoadedAfter",this.smLoadHandler)}loadCharts(){const e=this.app.chartManager.loadedSM?.charts[this.gameType.id]??[],t=[];this.gameTypeDropdown.setItems(We.getPriority().map(a=>{const o=this.app.chartManager.loadedSM?.charts[a.id]??[];return a.id+" ("+o.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),e.forEach(a=>{const o=document.createElement("div");o.classList.add("chart-list-item"),o.chart=a,this.app.chartManager.loadedChart==a&&o.classList.add("selected"),o.onclick=()=>{o.chart!=this.app.chartManager.loadedChart&&(this.app.chartManager.loadChart(o.chart),this.chartList.querySelectorAll(".selected").forEach(u=>u.classList.remove("selected")),o.classList.add("selected"))},o.onmouseenter=()=>{this.loadChartDetails(o.chart)},o.onmouseleave=()=>{this.loadChartDetails()};const l=document.createElement("div");l.innerText=a.meter+"",l.classList.add("title",a.difficulty);const c=document.createElement("div");c.classList.add("chart-list-info");const d=document.createElement("div");d.innerText=a.credit,d.classList.add("title","chart-credit");const h=document.createElement("div");h.innerText=a.getNotedata().length+"",h.classList.add("title","chart-step-count"),c.appendChild(d),c.appendChild(h),o.appendChild(l),o.appendChild(c),t.push(o)});const i=document.createElement("div");i.classList.add("chart-list-item");const s=document.createElement("div");s.innerText="+",s.classList.add("title");const n=document.createElement("div");n.classList.add("chart-list-info"),n.innerText="New Blank Chart",i.appendChild(s),i.appendChild(n),i.onclick=()=>{const a=new Zg(this.app.chartManager.loadedSM);a.gameType=this.gameType,this.app.chartManager.loadedSM.addChart(a),this.app.chartManager.loadChart(a),this.loadCharts()},this.chartList.replaceChildren(...t,i),this.loadChartDetails()}loadChartDetails(e){if(e=e??this.app.chartManager.loadedChart,e?.gameType.id!=this.gameType.id){this.chartInfo.replaceChildren();return}if(!e)return;const t=()=>this.app.chartManager.loadedSM.charts[e.gameType.id].sort((m,g)=>Ei.indexOf(m.difficulty)==Ei.indexOf(g.difficulty)?m.meter-g.meter:Ei.indexOf(m.difficulty)-Ei.indexOf(g.difficulty)),i=document.createElement("div");i.classList.add("chart-info-main");const s=gi.create(Ei,e.difficulty);s.view.classList.add("no-border","white"),s.onChange(m=>{const g=e.difficulty;mt.instance.run({action:()=>{e.difficulty=m,t(),this.loadCharts()},undo:()=>{e.difficulty=g,t(),this.loadCharts()}})});const n=document.createElement("div");n.spellcheck=!1,n.contentEditable="true",n.classList.add("inlineEdit","chart-meter"),n.onkeydown=m=>{m.key=="Enter"&&n.blur()},n.onblur=()=>{let m=ua(n.innerText);if(m===null){n.innerText=e?.meter+"";return}m=Math.round(Be(1,m,2**31-1));const g=e.meter;mt.instance.run({action:()=>{e.meter=m,e.meterF=m,t(),this.loadCharts()},undo:()=>{e.meter=g,e.meterF=g,t(),this.loadCharts()}}),n.scrollLeft=0},n.innerText=e.meter+"";const a=document.createElement("div");a.classList.add("chart-properties"),i.appendChild(s.view),i.appendChild(n),Object.values(KA).forEach(m=>{const g=document.createElement("div");g.classList.add("label"),g.innerText=m.title;const y=m.element(e,this.app);m.title=="Artist"&&y.addEventListener("blur",()=>this.loadCharts()),a.appendChild(g),a.appendChild(y)});const o=e.getNotedataStats(),l=document.createElement("div");l.classList.add("chart-info-grid-item");const c=document.createElement("div");c.innerText="Peak NPS",c.classList.add("title","chart-info-grid-label");const d=document.createElement("div");d.innerText=e.getMaxNPS().toFixed(2)+"",d.classList.add("title","chart-info-grid-count"),l.appendChild(c),l.appendChild(d);const h=document.createElement("div");h.classList.add("chart-info-grid"),Object.entries(o).forEach(m=>{const g=document.createElement("div");g.classList.add("chart-info-grid-item");const y=document.createElement("div");y.innerText=m[0],y.classList.add("title","chart-info-grid-label");const w=document.createElement("div");w.innerText=m[1]+"",w.classList.add("title","chart-info-grid-count"),g.appendChild(y),g.appendChild(w),h.appendChild(g)});const u=document.createElement("div");u.classList.add("menu-options");const p=document.createElement("button");p.innerText="Duplicate Chart",p.onclick=()=>{const m=Object.assign(Object.create(Object.getPrototypeOf(e)),e);m.setNotedata(e.getNotedata().map(g=>e.computeNote(g))??[]),this.app.chartManager.loadedSM.addChart(m),this.app.chartManager.loadChart(m),this.loadCharts()},u.append(p);const f=document.createElement("button");f.innerText="Delete Chart",f.onclick=()=>{this.app.windowManager.openWindow(new Tl(this.app,"Delete chart","Are you sure you want to delete this chart?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{this.app.chartManager.loadedSM.removeChart(e)&&(this.app.chartManager.loadChart(),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts())}}]))},f.classList.add("delete"),u.append(f),this.chartInfo.replaceChildren(i,a,l,h,u)}}var ZA=4,JA=.001,QA=1e-7,eS=10,jn=11,ho=1/(jn-1),tS=typeof Float32Array=="function";function sy(r,e){return 1-3*e+3*r}function ny(r,e){return 3*e-6*r}function ay(r){return 3*r}function Zo(r,e,t){return((sy(e,t)*r+ny(e,t))*r+ay(e))*r}function oy(r,e,t){return 3*sy(e,t)*r*r+2*ny(e,t)*r+ay(e)}function iS(r,e,t,i,s){var n,a,o=0;do a=e+(t-e)/2,n=Zo(a,i,s)-r,n>0?t=a:e=a;while(Math.abs(n)>QA&&++o=JA?rS(l,p,e,i):f===0?p:iS(l,c,c+ho,e,i)}return function(c){return c===0?0:c===1?1:Zo(o(c),t,s)}};const Zt=ya(nS),aS=Zt(0,0,1,1);function sf(r,e){const t=e?e.split("."):[];for(;t.length&&r;){const i=t.shift(),s=new RegExp("(.+)\\[([0-9]*)\\]").exec(i);if(s!==null&&s.length==3){const n={arrName:s[1],arrIndex:s[2]};r[n.arrName]!==void 0?r=r[n.arrName][n.arrIndex]:r=void 0;continue}r=r[i]}return r}function oS(r,e,t){const i=e?e.split("."):[];for(;i.length&&r;){const s=i.shift(),n=new RegExp("(.+)\\[([0-9]*)\\]").exec(s);if(n!==null&&n.length==3){const a={arrName:n[1],arrIndex:n[2]};r[a.arrName]!==void 0&&i.length===0&&(r[a.arrName][a.arrIndex]=t);continue}r[s]===void 0&&(r[s]={}),i.length===0&&(r[s]=t),r=r[s]}return r}const Ir=class Ir{static updateObject(e,t,i){const s=Object.keys(t).sort((o,l)=>parseFloat(o)-parseFloat(l));let n="0";for(let o=s.length-2;o>=0;o--)if(parseFloat(s[o])<=i){n=s[o];break}let a="1";for(let o=1;oi){a=s[o];break}Object.keys(t[0]).forEach(o=>{let l=t[n][o],c=t[a][o];l==="inherit"&&(t[n][o]=sf(e,o),l=t[n][o]),c==="inherit"&&(t[a][o]=sf(e,o),c=t[a][o]);const d=l+(i-parseFloat(n))/(parseFloat(a)-parseFloat(n))*(c-l);oS(e,o,d)})}static stop(e,t=null){e!==void 0&&(t!==null&&this.animations.get(e)?.obj&&!this.animations.get(e).obj.destroyed&&this.updateObject(this.animations.get(e).obj,this.animations.get(e).animation,t),this.animations.delete(e))}static finish(e){e!==void 0&&this.stop(e,1)}static animate(e,t,i,s,n=()=>{},a){return a||=`${++this._id}`,this.animations.set(a,{obj:e,animation:t,seconds:1/(60*i),progress:0,curve:s!==void 0?s:aS,onend:n}),a}};ks(Ir,"animations",new Map),ks(Ir,"_id",0),Et.shared.add(e=>{for(const[t,i]of Ir.animations.entries())i.obj._destroyed?Ir.stop(t):(i.progress=Math.min(1,i.progress+i.seconds*e),Ir.updateObject(i.obj,i.animation,i.curve(i.progress)),i.progress>=1&&(i.onend(i.obj),Ir.stop(t,1)))});let Rt=Ir;const Th=[{frequency:20,Q:.71},{frequency:75,gain:0},{frequency:100,gain:0,Q:.6},{frequency:250,gain:0,Q:.3},{frequency:1040,gain:0,Q:.41},{frequency:2500,gain:0,Q:.2},{frequency:7500,gain:0},{frequency:2e4,Q:.71}],nf=[{freq:20,label:"20"},{freq:30,label:"30"},{freq:40,label:"40"},{freq:50,label:"50"},{freq:60,label:"60"},{freq:70,label:""},{freq:80,label:"80"},{freq:90,label:""},{freq:100,label:"100"},{freq:200,label:"200"},{freq:300,label:"300"},{freq:400,label:"400"},{freq:500,label:"500"},{freq:600,label:"600"},{freq:700,label:""},{freq:800,label:"800"},{freq:900,label:""},{freq:1e3,label:"1k"},{freq:2e3,label:"2k"},{freq:3e3,label:"3k"},{freq:4e3,label:"4k"},{freq:5e3,label:"5k"},{freq:6e3,label:"6k"},{freq:7e3,label:""},{freq:8e3,label:"8k"},{freq:9e3,label:""},{freq:1e4,label:"10k"},{freq:15e3,label:""},{freq:2e4,label:"20k"}],$s=0,Ys=0,_s=1200,kt=400,Jo=new Array(_s).fill(0).map((r,e)=>Id(e)),lS=new Float32Array(Jo);function Qo(r){return Math.log(r/20)/Math.log(1102.5)*_s}function Id(r){return Math.pow(1102.5,r/_s)*20}function ds(r){return-r*6+kt/2}function af(r){return-(r-kt/2)/6}class hS extends St{app;cachedReponse=new Array(_s).fill(0);onAudioLoad=this.onAudio.bind(this);points=[];icons;info;trackedFilter=null;constructor(e){super({title:"Audio Equalizer",width:600,height:245,win_id:"audio-eq"}),this.app=e,this.initView(),this.onAudioLoad(),K.on("audioLoaded",this.onAudioLoad)}destroy(){K.off("audioLoaded",this.onAudioLoad)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("eq-container");const t=document.createElement("div");t.classList.add("icon-container"),this.app.chartManager.chartAudio.getFilters().forEach((b,v)=>{const E=Ae.getIcon(b.type.toUpperCase(),36,24,as[v]);E.classList.add("eq-icon"),E.style.backgroundColor=`${as[v]}40`,E.onclick=()=>{this.app.chartManager.chartAudio.getFilter(v).enabled?this.app.chartManager.chartAudio.disableFilter(v):this.app.chartManager.chartAudio.enableFilter(v),this.endTrack(),this.updateIcons()},E.onmouseenter=()=>this.points[v].highlight(),E.onmouseleave=()=>this.points[v].unhighlight(),t.appendChild(E)}),this.icons=t,this.updateIcons();const i=document.createElement("canvas");i.style.width="600px",i.style.height="200px",i.onmousedown=b=>{const v=this.points.filter(E=>E.hitTest(b.offsetX*2,b.offsetY*2)).at(-1);this.endTrack(),v?.mouseDown(b)};const s=document.createElement("div");s.classList.add("eq-info-container");const n=document.createElement("div");n.classList.add("eq-info");const a=document.createElement("div");a.innerText="Type",a.classList.add("eq-info-label");const o=document.createElement("div");o.classList.add("eq-info-value"),n.replaceChildren(a,o);const l=document.createElement("div");l.classList.add("eq-info");const c=document.createElement("div");c.innerText="Frequency",c.classList.add("eq-info-label");const d=document.createElement("div");d.contentEditable="false",d.classList.add("eq-info-value","inlineEdit"),l.replaceChildren(c,d),this.setupInput(d,"frequency",20,22050," Hz");const h=document.createElement("div");h.classList.add("eq-info");const u=document.createElement("div");u.innerText="Gain",u.classList.add("eq-info-label");const p=document.createElement("div");p.contentEditable="false",p.classList.add("eq-info-value","inlineEdit"),h.replaceChildren(u,p),this.setupInput(p,"gain",-24,24," dB",1);const f=document.createElement("div");f.classList.add("eq-info");const m=document.createElement("div");m.innerText="Q",m.classList.add("eq-info-label");const g=document.createElement("div");g.contentEditable="false",g.classList.add("eq-info-value","inlineEdit"),f.replaceChildren(m,g),this.setupInput(g,"Q",1e-4,1e3,"",4);const y=document.createElement("div");y.classList.add("eq-reset","disabled"),y.innerText="Reset",y.onclick=()=>{if(this.trackedFilter==null)for(let b=0;b{o=this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,e.innerText=ae(o,a)+"",this.selectText(e)},e.onkeydown=l=>{if(l.key=="Enter"){e.blur();return}if(l.key=="Tab"){const d=[...e.parentElement.parentElement.children],h=d.indexOf(e.parentElement);for(let u=1;u{const c=ua(e.innerText);c!==null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Be(c,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse())})},e.onblur=()=>{ua(e.innerText)===null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Be(o,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse()),e.innerText=ae(this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,a)+n}}onAudio(){this.points=this.app.chartManager.chartAudio.getFilters().map((e,t)=>new cS(this,t)),this.getResponse(),this.updateIcons(),this.endTrack()}getResponse(){this.cachedReponse=this.app.chartManager.chartAudio.getFrequencyResponse(Jo)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=1200,t.canvas.height=400;const i=()=>{if(!this.app.chartManager.chartAudio)return;const s=t.createRadialGradient(e.width/2,e.height/2,0,e.width/2,e.height/2,e.width/2);s.addColorStop(0,"rgb(11, 14, 26)"),s.addColorStop(1,"rgb(5, 7, 13)"),t.fillStyle=s,t.fillRect(0,0,e.width,e.height),t.fillStyle="rgb(0, 50, 150)",this.drawFrequencies(t,this.app.chartManager.chartAudio.getFrequencyData()),this.app.chartManager.chartAudio.hasFilters()&&(t.fillStyle="rgba(200, 200, 200, 0.2)",this.drawFrequencies(t,this.app.chartManager.chartAudio.getFilteredFrequencyData())),t.fillStyle="rgba(200, 200, 200, 0.5)",this.drawResponse(t),t.fillStyle="rgba(0, 100, 150, 0.5)",t.font="22px Assistant",this.drawGrid(t),this.points.forEach(n=>n.draw(t)),e.closest("#windows")&&requestAnimationFrame(i)};return i}drawFrequencies(e,t){for(let i=0;i<_s;i++){const s=Id(i)/this.app.chartManager.chartAudio.getSampleRate()*this.app.chartManager.chartAudio.getFFTSize(),n=t[Math.floor(s)]/255;e.fillRect($s+i,Ys+kt-n*kt,1,n*kt)}}drawResponse(e){for(let t=0;t<_s;t++){const i=Math.log(this.cachedReponse[t])/.115241,s=ds(i);e.fillRect(t+$s,Math.min(s,kt/2)+Ys,1,Math.max(s,kt/2)-Math.min(s,kt/2))}}drawGrid(e){for(const t of nf)e.fillRect($s+Qo(t.freq),Ys,1,kt),e.fillText(t.label,$s+Qo(t.freq)-(t==nf.at(-1)?20:0),Ys+kt/2);for(let t=-25;t<=25;t+=5){const i=Ys+ds(t);e.fillRect(0,i,1200,1),t!=0&&e.fillText(t+"",$s,i)}}updateIcons(){[...this.icons.children].forEach((e,t)=>{this.app.chartManager.chartAudio.getFilter(t).enabled?e.classList.remove("disabled"):e.classList.add("disabled")}),this.getResponse()}trackFilter(e){this.trackedFilter=e;const t=this.app.chartManager.chartAudio.getFilter(e),[i,s,n,a]=[...this.info.children].map(o=>o.children[1]);i.innerText=t.type,s.innerText=Math.round(t.frequency.value)+" Hz",n.innerText=t.type.endsWith("pass")?"-":ae(t.gain.value,1)+" dB",a.innerText=t.type.endsWith("shelf")?"-":ae(t.Q.value,2)+"",i.style.color=as[e],s.style.color=as[e],n.style.color=as[e],a.style.color=as[e],s.contentEditable="true",n.contentEditable=`${!t.type.endsWith("pass")}`,a.contentEditable=`${!t.type.endsWith("shelf")}`}endTrack(){setTimeout(()=>{this.trackedFilter=null,this.points.forEach(n=>n.unhighlight());const[e,t,i,s]=[...this.info.children].map(n=>n.children[1]);e.innerText="",t.innerText="",i.innerText="",s.innerText="",t.contentEditable="false",i.contentEditable="false",s.contentEditable="false"})}}const co=16,as=["#a3001b","#a34f00","#d6d606","#19c402","#02c4ba","#022fc4","#5602c4","#c402b4"];class cS{filterIndex;window;dragging=!1;x=0;y=0;type;response=new Float32Array(Jo.length);_empty=new Float32Array(Jo.length);highlighted=!1;pointSize=.4;constructor(e,t){this.filterIndex=t,this.window=e,this.type=this.window.app.chartManager.chartAudio.getFilter(t).type,this.x=Qo(this.window.app.chartManager.chartAudio.getFilter(t).frequency.value??10),this.getY()}hitTest(e,t){return(e-this.x)*(e-this.x)+(t-this.y)*(t-this.y)<=co*co}canChangeGain(){return this.type=="lowshelf"||this.type=="highshelf"||this.type=="peaking"}canChangeQ(){return!this.type.endsWith("shelf")}getY(){this.type.endsWith("shelf")?this.y=ds(this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value/2):this.canChangeGain()?this.y=ds(this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value??0):this.y=kt/2}getGain(){if(this.canChangeGain())return this.type.endsWith("shelf")?af(this.y)*2:af(this.y)}mouseDown(e){this.calcResponse(),this.dragging=!0,this.highlighted=!0,this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled||(this.window.app.chartManager.chartAudio.enableFilter(this.filterIndex),this.window.updateIcons());const t=this.x,i=this.y,s=e.clientX,n=e.clientY,a=l=>{this.x=(l.clientX-s)*2+t,this.canChangeGain()?this.y=(l.clientY-n)*2+i:this.y=kt/2,this.x=Be(this.x,0,_s),this.y=Be(this.y,this.type.endsWith("shelf")?kt/4:ds(24),this.type.endsWith("shelf")?3*kt/4:ds(-24)),this.window.app.chartManager.chartAudio.updateFilter(this.filterIndex,{frequency:Id(this.x),gain:this.getGain()}),this.window.getResponse(),this.window.trackFilter(this.filterIndex),this.calcResponse()};this.window.trackFilter(this.filterIndex);const o=()=>{Rt.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.3}},.3,Zt(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),this.dragging=!1,window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o)};Rt.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.9}},.3,Zt(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),window.addEventListener("mousemove",a),window.addEventListener("mouseup",o)}calcResponse(){this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).getFrequencyResponse(lS,this.response,this._empty)}draw(e){const t=this.highlighted||this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled?as[this.filterIndex]:"#888888";if(e.fillStyle=t+"60",this.dragging)for(let i=0;i{navigator.clipboard.writeText(s.innerText)}),this.outputDiv=s;const n=document.createElement("div");n.classList.add("export-section-label"),n.innerText="Include",i.appendChild(n),Object.keys(this.exportOptions.include).forEach(o=>{const l=document.createElement("input");l.type="checkbox",l.id="en-i-"+o,l.checked=this.exportOptions.include[o],l.onchange=()=>{this.exportOptions.include[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=o;const d=document.createElement("div");d.replaceChildren(l,c),d.classList.add("export-option"),i.appendChild(d)});const a=document.createElement("div");a.classList.add("export-section-label"),a.innerText="Options",i.appendChild(a),Object.keys(this.exportOptions.options).forEach(o=>{const l=document.createElement("input");l.id="en-o-"+o,l.type="checkbox",l.checked=this.exportOptions.options[o],l.onchange=()=>{this.exportOptions.options[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=Eh[o].label;const d=document.createElement("div");d.replaceChildren(l,c),d.classList.add("export-option"),i.appendChild(d),Eh[o].tooltip!==void 0&&Pt(d,{content:Eh[o].tooltip})}),t.replaceChildren(i,s),e.appendChild(t),this.viewElement.appendChild(e)}export(){let e=`{ +\0`,Q+=n(F,2),Q+=C.magic,Q+=n(b,2),Q+=n(v,2),Q+=n(V.crc32,4),Q+=n(V.compressedSize,4),Q+=n(V.uncompressedSize,4),Q+=n(L.length,2),Q+=n(D.length,2),{fileRecord:h.LOCAL_FILE_HEADER+Q+L+D,dirRecord:h.CENTRAL_FILE_HEADER+n(te,2)+Q+n(G.length,2)+"\0\0\0\0"+n(U,4)+n(g,4)+L+D+G}}var o=t("../utils"),l=t("../stream/GenericWorker"),c=t("../utf8"),d=t("../crc32"),h=t("../signature");function u(p,f,m,g){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f,this.zipPlatform=m,this.encodeFileName=g,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,l),u.prototype.push=function(p){var f=p.meta.percent||0,m=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,l.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:m?(f+100*(m-g-1))/m:100}}))},u.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var f=this.streamFiles&&!p.file.dir;if(f){var m=a(p,f,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(p){this.accumulate=!1;var f=this.streamFiles&&!p.file.dir,m=a(p,f,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),f)this.push({data:function(g){return h.DATA_DESCRIPTOR+n(g.crc32,4)+n(g.compressedSize,4)+n(g.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var p=this.bytesWritten,f=0;f=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=o,c},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=a},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),a=t("../support"),o=t("./ArrayReader"),l=t("./StringReader"),c=t("./NodeBufferReader"),d=t("./Uint8ArrayReader");i.exports=function(h){var u=n.getTypeOf(h);return n.checkSupport(u),u!=="string"||a.uint8array?u==="nodebuffer"?new c(h):a.uint8array?new d(n.transformTo("uint8array",h)):new o(n.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),a=t("../utils");function o(l){n.call(this,"ConvertWorker to "+l),this.destType=l}a.inherits(o,n),o.prototype.processChunk=function(l){this.push({data:a.transformTo(this.destType,l.data),meta:l.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),a=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(l){this.streamInfo.crc32=a(l.data,this.streamInfo.crc32||0),this.push(l)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}n.inherits(o,a),o.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}a.prototype.processChunk.call(this,l)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=n.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}n.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var l=0;l "+a:a}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),l=t("../base64"),c=t("../support"),d=t("../external"),h=null;if(c.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(f,m){return new d.Promise(function(g,y){var w=[],b=f._internalType,v=f._outputType,E=f._mimeType;f.on("data",function(C,I){w.push(C),m&&m(I)}).on("error",function(C){w=[],y(C)}).on("end",function(){try{var C=function(I,L,k){switch(I){case"blob":return n.newBlob(n.transformTo("arraybuffer",L),k);case"base64":return l.encode(L);default:return n.transformTo(I,L)}}(v,function(I,L){var k,N=0,G=null,A=0;for(k=0;k"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(n),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),l=t("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function u(){l.call(this,"utf-8 encode")}s.utf8encode=function(p){return a.nodebuffer?o.newBufferFrom(p,"utf-8"):function(f){var m,g,y,w,b,v=f.length,E=0;for(w=0;w>>6:(g<65536?m[b++]=224|g>>>12:(m[b++]=240|g>>>18,m[b++]=128|g>>>12&63),m[b++]=128|g>>>6&63),m[b++]=128|63&g);return m}(p)},s.utf8decode=function(p){return a.nodebuffer?n.transformTo("nodebuffer",p).toString("utf-8"):function(f){var m,g,y,w,b=f.length,v=new Array(2*b);for(m=g=0;m>10&1023,v[g++]=56320|1023&y)}return v.length!==g&&(v.subarray?v=v.subarray(0,g):v.length=g),n.applyFromCharCode(v)}(p=n.transformTo(a.uint8array?"uint8array":"array",p))},n.inherits(h,l),h.prototype.processChunk=function(p){var f=n.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var m=f;(f=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),f.set(m,this.leftOver.length)}else f=this.leftOver.concat(f);this.leftOver=null}var g=function(w,b){var v;for((b=b||w.length)>w.length&&(b=w.length),v=b-1;0<=v&&(192&w[v])==128;)v--;return v<0||v===0?b:v+c[w[v]]>b?v:b}(f),y=f;g!==f.length&&(a.uint8array?(y=f.subarray(0,g),this.leftOver=f.subarray(g,f.length)):(y=f.slice(0,g),this.leftOver=f.slice(g,f.length))),this.push({data:s.utf8decode(y),meta:p.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=h,n.inherits(u,l),u.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),l=t("./external");function c(m){return m}function d(m,g){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=n(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var f,m,g,y=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?u[g++]=224|p>>>12:(u[g++]=240|p>>>18,u[g++]=128|p>>>12&63),u[g++]=128|p>>>6&63),u[g++]=128|63&p);return u},s.buf2binstring=function(h){return d(h,h.length)},s.binstring2buf=function(h){for(var u=new n.Buf8(h.length),p=0,f=u.length;p>10&1023,w[f++]=56320|1023&m)}return d(w,f)},s.utf8border=function(h,u){var p;for((u=u||h.length)>h.length&&(u=h.length),p=u-1;0<=p&&(192&h[p])==128;)p--;return p<0||p===0?u:p+l[h[p]]>u?p:u}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,a,o,l){for(var c=65535&n|0,d=n>>>16&65535|0,h=0;o!==0;){for(o-=h=2e3>>1:a>>>1;o[l]=a}return o}();i.exports=function(a,o,l,c){var d=n,h=c+l;a^=-1;for(var u=c;u>>8^d[255&(a^o[u])];return-1^a}},{}],46:[function(t,i,s){var n,a=t("../utils/common"),o=t("./trees"),l=t("./adler32"),c=t("./crc32"),d=t("./messages"),h=0,u=4,p=0,f=-2,m=-1,g=4,y=2,w=8,b=9,v=286,E=30,C=19,I=2*v+1,L=15,k=3,N=258,G=N+k+1,A=42,S=113,x=1,D=2,$=3,R=4;function O(T,X){return T.msg=d[X],X}function W(T){return(T<<1)-(4T.avail_out&&(j=T.avail_out),j!==0&&(a.arraySet(T.output,X.pending_buf,X.pending_out,j,T.next_out),T.next_out+=j,X.pending_out+=j,T.total_out+=j,T.avail_out-=j,X.pending-=j,X.pending===0&&(X.pending_out=0))}function U(T,X){o._tr_flush_block(T,0<=T.block_start?T.block_start:-1,T.strstart-T.block_start,X),T.block_start=T.strstart,F(T.strm)}function te(T,X){T.pending_buf[T.pending++]=X}function Q(T,X){T.pending_buf[T.pending++]=X>>>8&255,T.pending_buf[T.pending++]=255&X}function Z(T,X){var j,P,M=T.max_chain_length,H=T.strstart,J=T.prev_length,ee=T.nice_match,z=T.strstart>T.w_size-G?T.strstart-(T.w_size-G):0,re=T.window,he=T.w_mask,ne=T.prev,_e=T.strstart+N,Xe=re[H+J-1],Fe=re[H+J];T.prev_length>=T.good_match&&(M>>=2),ee>T.lookahead&&(ee=T.lookahead);do if(re[(j=X)+J]===Fe&&re[j+J-1]===Xe&&re[j]===re[H]&&re[++j]===re[H+1]){H+=2,j++;do;while(re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&H<_e);if(P=N-(_e-H),H=_e-N,Jz&&--M!=0);return J<=T.lookahead?J:T.lookahead}function ye(T){var X,j,P,M,H,J,ee,z,re,he,ne=T.w_size;do{if(M=T.window_size-T.lookahead-T.strstart,T.strstart>=ne+(ne-G)){for(a.arraySet(T.window,T.window,ne,ne,0),T.match_start-=ne,T.strstart-=ne,T.block_start-=ne,X=j=T.hash_size;P=T.head[--X],T.head[X]=ne<=P?P-ne:0,--j;);for(X=j=ne;P=T.prev[--X],T.prev[X]=ne<=P?P-ne:0,--j;);M+=ne}if(T.strm.avail_in===0)break;if(J=T.strm,ee=T.window,z=T.strstart+T.lookahead,re=M,he=void 0,he=J.avail_in,re=k)for(H=T.strstart-T.insert,T.ins_h=T.window[H],T.ins_h=(T.ins_h<=k&&(T.ins_h=(T.ins_h<=k)if(P=o._tr_tally(T,T.strstart-T.match_start,T.match_length-k),T.lookahead-=T.match_length,T.match_length<=T.max_lazy_match&&T.lookahead>=k){for(T.match_length--;T.strstart++,T.ins_h=(T.ins_h<=k&&(T.ins_h=(T.ins_h<=k&&T.match_length<=T.prev_length){for(M=T.strstart+T.lookahead-k,P=o._tr_tally(T,T.strstart-1-T.prev_match,T.prev_length-k),T.lookahead-=T.prev_length-1,T.prev_length-=2;++T.strstart<=M&&(T.ins_h=(T.ins_h<T.pending_buf_size-5&&(j=T.pending_buf_size-5);;){if(T.lookahead<=1){if(ye(T),T.lookahead===0&&X===h)return x;if(T.lookahead===0)break}T.strstart+=T.lookahead,T.lookahead=0;var P=T.block_start+j;if((T.strstart===0||T.strstart>=P)&&(T.lookahead=T.strstart-P,T.strstart=P,U(T,!1),T.strm.avail_out===0)||T.strstart-T.block_start>=T.w_size-G&&(U(T,!1),T.strm.avail_out===0))return x}return T.insert=0,X===u?(U(T,!0),T.strm.avail_out===0?$:R):(T.strstart>T.block_start&&(U(T,!1),T.strm.avail_out),x)}),new fe(4,4,8,4,Ce),new fe(4,5,16,8,Ce),new fe(4,6,32,32,Ce),new fe(4,4,16,16,ce),new fe(8,16,32,32,ce),new fe(8,16,128,128,ce),new fe(8,32,128,256,ce),new fe(32,128,258,1024,ce),new fe(32,258,258,4096,ce)],s.deflateInit=function(T,X){return be(T,X,w,15,8,0)},s.deflateInit2=be,s.deflateReset=pe,s.deflateResetKeep=le,s.deflateSetHeader=function(T,X){return T&&T.state?T.state.wrap!==2?f:(T.state.gzhead=X,p):f},s.deflate=function(T,X){var j,P,M,H;if(!T||!T.state||5>8&255),te(P,P.gzhead.time>>16&255),te(P,P.gzhead.time>>24&255),te(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),te(P,255&P.gzhead.os),P.gzhead.extra&&P.gzhead.extra.length&&(te(P,255&P.gzhead.extra.length),te(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(T.adler=c(T.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=69):(te(P,0),te(P,0),te(P,0),te(P,0),te(P,0),te(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),te(P,3),P.status=S);else{var J=w+(P.w_bits-8<<4)<<8;J|=(2<=P.strategy||P.level<2?0:P.level<6?1:P.level===6?2:3)<<6,P.strstart!==0&&(J|=32),J+=31-J%31,P.status=S,Q(P,J),P.strstart!==0&&(Q(P,T.adler>>>16),Q(P,65535&T.adler)),T.adler=1}if(P.status===69)if(P.gzhead.extra){for(M=P.pending;P.gzindex<(65535&P.gzhead.extra.length)&&(P.pending!==P.pending_buf_size||(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending!==P.pending_buf_size));)te(P,255&P.gzhead.extra[P.gzindex]),P.gzindex++;P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=73)}else P.status=73;if(P.status===73)if(P.gzhead.name){M=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending===P.pending_buf_size)){H=1;break}H=P.gzindexM&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),H===0&&(P.gzindex=0,P.status=91)}else P.status=91;if(P.status===91)if(P.gzhead.comment){M=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending===P.pending_buf_size)){H=1;break}H=P.gzindexM&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),H===0&&(P.status=103)}else P.status=103;if(P.status===103&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&F(T),P.pending+2<=P.pending_buf_size&&(te(P,255&T.adler),te(P,T.adler>>8&255),T.adler=0,P.status=S)):P.status=S),P.pending!==0){if(F(T),T.avail_out===0)return P.last_flush=-1,p}else if(T.avail_in===0&&W(X)<=W(j)&&X!==u)return O(T,-5);if(P.status===666&&T.avail_in!==0)return O(T,-5);if(T.avail_in!==0||P.lookahead!==0||X!==h&&P.status!==666){var ee=P.strategy===2?function(z,re){for(var he;;){if(z.lookahead===0&&(ye(z),z.lookahead===0)){if(re===h)return x;break}if(z.match_length=0,he=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,he&&(U(z,!1),z.strm.avail_out===0))return x}return z.insert=0,re===u?(U(z,!0),z.strm.avail_out===0?$:R):z.last_lit&&(U(z,!1),z.strm.avail_out===0)?x:D}(P,X):P.strategy===3?function(z,re){for(var he,ne,_e,Xe,Fe=z.window;;){if(z.lookahead<=N){if(ye(z),z.lookahead<=N&&re===h)return x;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=k&&0z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=k?(he=o._tr_tally(z,1,z.match_length-k),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(he=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),he&&(U(z,!1),z.strm.avail_out===0))return x}return z.insert=0,re===u?(U(z,!0),z.strm.avail_out===0?$:R):z.last_lit&&(U(z,!1),z.strm.avail_out===0)?x:D}(P,X):n[P.level].func(P,X);if(ee!==$&&ee!==R||(P.status=666),ee===x||ee===$)return T.avail_out===0&&(P.last_flush=-1),p;if(ee===D&&(X===1?o._tr_align(P):X!==5&&(o._tr_stored_block(P,0,0,!1),X===3&&(V(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),F(T),T.avail_out===0))return P.last_flush=-1,p}return X!==u?p:P.wrap<=0?1:(P.wrap===2?(te(P,255&T.adler),te(P,T.adler>>8&255),te(P,T.adler>>16&255),te(P,T.adler>>24&255),te(P,255&T.total_in),te(P,T.total_in>>8&255),te(P,T.total_in>>16&255),te(P,T.total_in>>24&255)):(Q(P,T.adler>>>16),Q(P,65535&T.adler)),F(T),0=j.w_size&&(H===0&&(V(j.head),j.strstart=0,j.block_start=0,j.insert=0),re=new a.Buf8(j.w_size),a.arraySet(re,X,he-j.w_size,j.w_size,0),X=re,he=j.w_size),J=T.avail_in,ee=T.next_in,z=T.input,T.avail_in=he,T.next_in=0,T.input=X,ye(j);j.lookahead>=k;){for(P=j.strstart,M=j.lookahead-(k-1);j.ins_h=(j.ins_h<>>=k=L>>>24,b-=k,(k=L>>>16&255)===0)D[d++]=65535&L;else{if(!(16&k)){if(!(64&k)){L=v[(65535&L)+(w&(1<>>=k,b-=k),b<15&&(w+=x[l++]<>>=k=L>>>24,b-=k,!(16&(k=L>>>16&255))){if(!(64&k)){L=E[(65535&L)+(w&(1<>>=k,b-=k,(k=d-h)>3,w&=(1<<(b-=N<<3))-1,n.next_in=l,n.next_out=d,n.avail_in=l>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function w(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(A){var S;return A&&A.state?(S=A.state,A.total_in=A.total_out=S.total=0,A.msg="",S.wrap&&(A.adler=1&S.wrap),S.mode=f,S.last=0,S.havedict=0,S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new n.Buf32(m),S.distcode=S.distdyn=new n.Buf32(g),S.sane=1,S.back=-1,u):p}function v(A){var S;return A&&A.state?((S=A.state).wsize=0,S.whave=0,S.wnext=0,b(A)):p}function E(A,S){var x,D;return A&&A.state?(D=A.state,S<0?(x=0,S=-S):(x=1+(S>>4),S<48&&(S&=15)),S&&(S<8||15=R.wsize?(n.arraySet(R.window,S,x-R.wsize,R.wsize,0),R.wnext=0,R.whave=R.wsize):(D<($=R.wsize-R.wnext)&&($=D),n.arraySet(R.window,S,x-D,$,R.wnext),(D-=$)?(n.arraySet(R.window,S,x-D,D,0),R.wnext=D,R.whave=R.wsize):(R.wnext+=$,R.wnext===R.wsize&&(R.wnext=0),R.whave>>8&255,x.check=o(x.check,H,2,0),U=F=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&F)<<8)+(F>>8))%31){A.msg="incorrect header check",x.mode=30;break}if((15&F)!=8){A.msg="unknown compression method",x.mode=30;break}if(U-=4,T=8+(15&(F>>>=4)),x.wbits===0)x.wbits=T;else if(T>x.wbits){A.msg="invalid window size",x.mode=30;break}x.dmax=1<>8&1),512&x.flags&&(H[0]=255&F,H[1]=F>>>8&255,x.check=o(x.check,H,2,0)),U=F=0,x.mode=3;case 3:for(;U<32;){if(W===0)break e;W--,F+=D[R++]<>>8&255,H[2]=F>>>16&255,H[3]=F>>>24&255,x.check=o(x.check,H,4,0)),U=F=0,x.mode=4;case 4:for(;U<16;){if(W===0)break e;W--,F+=D[R++]<>8),512&x.flags&&(H[0]=255&F,H[1]=F>>>8&255,x.check=o(x.check,H,2,0)),U=F=0,x.mode=5;case 5:if(1024&x.flags){for(;U<16;){if(W===0)break e;W--,F+=D[R++]<>>8&255,x.check=o(x.check,H,2,0)),U=F=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(W<(Z=x.length)&&(Z=W),Z&&(x.head&&(T=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),n.arraySet(x.head.extra,D,R,Z,T)),512&x.flags&&(x.check=o(x.check,D,Z,R)),W-=Z,R+=Z,x.length-=Z),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(W===0)break e;for(Z=0;T=D[R+Z++],x.head&&T&&x.length<65536&&(x.head.name+=String.fromCharCode(T)),T&&Z>9&1,x.head.done=!0),A.adler=x.check=0,x.mode=12;break;case 10:for(;U<32;){if(W===0)break e;W--,F+=D[R++]<>>=7&U,U-=7&U,x.mode=27;break}for(;U<3;){if(W===0)break e;W--,F+=D[R++]<>>=1)){case 0:x.mode=14;break;case 1:if(N(x),x.mode=20,S!==6)break;F>>>=2,U-=2;break e;case 2:x.mode=17;break;case 3:A.msg="invalid block type",x.mode=30}F>>>=2,U-=2;break;case 14:for(F>>>=7&U,U-=7&U;U<32;){if(W===0)break e;W--,F+=D[R++]<>>16^65535)){A.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&F,U=F=0,x.mode=15,S===6)break e;case 15:x.mode=16;case 16:if(Z=x.length){if(W>>=5,U-=5,x.ndist=1+(31&F),F>>>=5,U-=5,x.ncode=4+(15&F),F>>>=4,U-=4,286>>=3,U-=3}for(;x.have<19;)x.lens[J[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,j={bits:x.lenbits},X=c(0,x.lens,0,19,x.lencode,0,x.work,j),x.lenbits=j.bits,X){A.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=ce,U-=ce,x.lens[x.have++]=we;else{if(we===16){for(P=ce+2;U>>=ce,U-=ce,x.have===0){A.msg="invalid bit length repeat",x.mode=30;break}T=x.lens[x.have-1],Z=3+(3&F),F>>>=2,U-=2}else if(we===17){for(P=ce+3;U>>=ce)),F>>>=3,U-=3}else{for(P=ce+7;U>>=ce)),F>>>=7,U-=7}if(x.have+Z>x.nlen+x.ndist){A.msg="invalid bit length repeat",x.mode=30;break}for(;Z--;)x.lens[x.have++]=T}}if(x.mode===30)break;if(x.lens[256]===0){A.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,j={bits:x.lenbits},X=c(d,x.lens,0,x.nlen,x.lencode,0,x.work,j),x.lenbits=j.bits,X){A.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,j={bits:x.distbits},X=c(h,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,j),x.distbits=j.bits,X){A.msg="invalid distances set",x.mode=30;break}if(x.mode=20,S===6)break e;case 20:x.mode=21;case 21:if(6<=W&&258<=V){A.next_out=O,A.avail_out=V,A.next_in=R,A.avail_in=W,x.hold=F,x.bits=U,l(A,Q),O=A.next_out,$=A.output,V=A.avail_out,R=A.next_in,D=A.input,W=A.avail_in,F=x.hold,U=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;fe=(M=x.lencode[F&(1<>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>le)])>>>16&255,we=65535&M,!(le+(ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=le,U-=le,x.back+=le}if(F>>>=ce,U-=ce,x.back+=ce,x.length=we,fe===0){x.mode=26;break}if(32&fe){x.back=-1,x.mode=12;break}if(64&fe){A.msg="invalid literal/length code",x.mode=30;break}x.extra=15&fe,x.mode=22;case 22:if(x.extra){for(P=x.extra;U>>=x.extra,U-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;fe=(M=x.distcode[F&(1<>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>le)])>>>16&255,we=65535&M,!(le+(ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=le,U-=le,x.back+=le}if(F>>>=ce,U-=ce,x.back+=ce,64&fe){A.msg="invalid distance code",x.mode=30;break}x.offset=we,x.extra=15&fe,x.mode=24;case 24:if(x.extra){for(P=x.extra;U>>=x.extra,U-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){A.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(V===0)break e;if(Z=Q-V,x.offset>Z){if((Z=x.offset-Z)>x.whave&&x.sane){A.msg="invalid distance too far back",x.mode=30;break}ye=Z>x.wnext?(Z-=x.wnext,x.wsize-Z):x.wnext-Z,Z>x.length&&(Z=x.length),Ce=x.window}else Ce=$,ye=O-x.offset,Z=x.length;for(VI?(k=ye[Ce+g[S]],U[te+g[S]]):(k=96,0),w=1<>O)+(b-=w)]=L<<24|k<<16|N|0,b!==0;);for(w=1<>=1;if(w!==0?(F&=w-1,F+=w):F=0,S++,--Q[A]==0){if(A===D)break;A=h[u+g[S]]}if($>>7)]}function te(M,H){M.pending_buf[M.pending++]=255&H,M.pending_buf[M.pending++]=H>>>8&255}function Q(M,H,J){M.bi_valid>y-J?(M.bi_buf|=H<>y-M.bi_valid,M.bi_valid+=J-y):(M.bi_buf|=H<>>=1,J<<=1,0<--H;);return J>>>1}function Ce(M,H,J){var ee,z,re=new Array(g+1),he=0;for(ee=1;ee<=g;ee++)re[ee]=he=he+J[ee-1]<<1;for(z=0;z<=H;z++){var ne=M[2*z+1];ne!==0&&(M[2*z]=ye(re[ne]++,ne))}}function ce(M){var H;for(H=0;H>1;1<=J;J--)le(M,re,J);for(z=_e;J=M.heap[1],M.heap[1]=M.heap[M.heap_len--],le(M,re,1),ee=M.heap[1],M.heap[--M.heap_max]=J,M.heap[--M.heap_max]=ee,re[2*z]=re[2*J]+re[2*ee],M.depth[z]=(M.depth[J]>=M.depth[ee]?M.depth[J]:M.depth[ee])+1,re[2*J+1]=re[2*ee+1]=z,M.heap[1]=z++,le(M,re,1),2<=M.heap_len;);M.heap[--M.heap_max]=M.heap[1],function(Fe,Gt){var Yr,Qt,qr,at,K,me,Te=Gt.dyn_tree,$e=Gt.max_code,Ve=Gt.stat_desc.static_tree,Ct=Gt.stat_desc.has_stree,Vt=Gt.stat_desc.extra_bits,tr=Gt.stat_desc.extra_base,wr=Gt.stat_desc.max_length,ei=0;for(at=0;at<=g;at++)Fe.bl_count[at]=0;for(Te[2*Fe.heap[Fe.heap_max]+1]=0,Yr=Fe.heap_max+1;Yr>=7;z>>=1)if(1&Xe&&ne.dyn_ltree[2*_e]!==0)return a;if(ne.dyn_ltree[18]!==0||ne.dyn_ltree[20]!==0||ne.dyn_ltree[26]!==0)return o;for(_e=32;_e>>3,(re=M.static_len+3+7>>>3)<=z&&(z=re)):z=re=J+5,J+4<=z&&H!==-1?P(M,H,J,ee):M.strategy===4||re===z?(Q(M,2+(ee?1:0),3),pe(M,G,A)):(Q(M,4+(ee?1:0),3),function(ne,_e,Xe,Fe){var Gt;for(Q(ne,_e-257,5),Q(ne,Xe-1,5),Q(ne,Fe-4,4),Gt=0;Gt>>8&255,M.pending_buf[M.d_buf+2*M.last_lit+1]=255&H,M.pending_buf[M.l_buf+M.last_lit]=255&J,M.last_lit++,H===0?M.dyn_ltree[2*J]++:(M.matches++,H--,M.dyn_ltree[2*(x[J]+h+1)]++,M.dyn_dtree[2*U(H)]++),M.last_lit===M.lit_bufsize-1},s._tr_align=function(M){Q(M,2,3),Z(M,b,G),function(H){H.bi_valid===16?(te(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):8<=H.bi_valid&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)}(M)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(a,o){if(!a.setImmediate){var l,c,d,h,u=1,p={},f=!1,m=a.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(a);g=g&&g.setTimeout?g:a,l={}.toString.call(a.process)==="[object process]"?function(v){process.nextTick(function(){w(v)})}:function(){if(a.postMessage&&!a.importScripts){var v=!0,E=a.onmessage;return a.onmessage=function(){v=!1},a.postMessage("","*"),a.onmessage=E,v}}()?(h="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",b,!1):a.attachEvent("onmessage",b),function(v){a.postMessage(h+v,"*")}):a.MessageChannel?((d=new MessageChannel).port1.onmessage=function(v){w(v.data)},function(v){d.port2.postMessage(v)}):m&&"onreadystatechange"in m.createElement("script")?(c=m.documentElement,function(v){var E=m.createElement("script");E.onreadystatechange=function(){w(v),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(v){setTimeout(w,0,v)},g.setImmediate=function(v){typeof v!="function"&&(v=new Function(""+v));for(var E=new Array(arguments.length-1),C=0;C"u"?n===void 0?this:n:self)}).call(this,typeof Wt<"u"?Wt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ty);var XA=ty.exports;const YA=ya(XA),nr=class nr{static async writeHandle(e,t){const i=this.workID++,s=new Promise((o,l)=>this.map.set(i,[o,l])),n=new TextEncoder,a=typeof t=="string"?n.encode(t):await t.arrayBuffer();return this.worker.postMessage([i,e,a],[a]),s}};ks(nr,"worker",new Worker(new URL("/smeditor/assets/SafariFileWorker-557e53c3.js",self.location),{type:"module"})),ks(nr,"workID",0),ks(nr,"map",new Map),nr.worker.onmessage=e=>{const t=e.data;t.success?nr.map.get(t.id)[0]():nr.map.get(t.id)[1](t.reason),nr.map.delete(t.id)};let Hc=nr;class qA{_root;async getRoot(){return this._root||(VA.adapter.native?await Qp().then(e=>this._root=e):await Qp(Ke(()=>import("./memory-5d567038.js"),[])).then(e=>this._root=e)),this._root}async uploadHandle(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.kind=="file"){const s=await i.getFileHandle(e.name,{create:!0});await this.writeFile(s,await e.getFile())}else{const s=await i.getDirectoryHandle(e.name,{create:!0}),n=[];for await(const a of e.values())n.push(this.uploadHandle(a,s));await Promise.all(n)}}async uploadFiles(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.isFile){const s=e;if(s.name==".DS_Store")return;s.file(async n=>{const a=await i.getFileHandle(n.name,{create:!0});await this.writeHandle(a,n)})}else if(e.isDirectory){const s=e.createReader(),n=await i.getDirectoryHandle(e.name,{create:!0});for await(const a of n.values())await n.removeEntry(a.name,{recursive:!0});s.readEntries(async a=>{const o=[];for(let l=0;li!="."&&i!="");t.indexOf("..")>-1;){const i=t.indexOf("..");if(i==0)throw Error("Path"+t.join("/")+"is invalid!");t.splice(i-1,2)}return t.join("/")}async zipDirectory(e,t){const i=t??new YA,s=$i(e)==""?e:Ot(e),n=await this.getDirectoryHandle(s);if(n){for(const a of await this.getDirectoryFiles(n))i.file(a.name,await a.getFile());for(const a of await this.getDirectoryFolders(n)){const o=i.folder(a.name);if(!o){console.error("Failed to zip folder "+s+"/"+a.name);continue}await this.zipDirectory(s+"/"+a.name,o)}return i}}async saveDirectory(e){const t=$i(e)==""?e:Ot(e);Se.create("Exporting "+t+".zip");const i=await HA({_preferPolyfill:!1,suggestedName:`${t}.zip`,types:[{accept:{"application/zip":[".zip"]}}],excludeAcceptAllOption:!1}),s=await this.zipDirectory(e);s&&await s.generateAsync({type:"blob"}).then(async n=>{if(!window.showSaveFilePicker){console.log(n);const a=document.createElement("a"),o=URL.createObjectURL(n);document.body.appendChild(a),a.href=o,a.download=t+".zip",a.click(),a.remove(),window.URL.revokeObjectURL(o);return}await this.writeHandle(i,n)})}async renameFile(e,t){if(e!=t)try{const i=await this.getDirectoryHandle(Ot(e)),s=await this.getDirectoryHandle(Ot(t),{create:!0}),n=await this.getFileHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,zi(t)),await i.removeEntry(zi(e))}catch(i){console.error(i)}}async renameDirectory(e,t){if(!t.startsWith(e))try{const i=await this.getDirectoryHandle(Ot(e)),s=await this.getDirectoryHandle(Ot(t),{create:!0}),n=await this.getDirectoryHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,zi(t)),await i.removeEntry(zi(e),{recursive:!0})}catch(i){console.error(i)}}async copyToHandle(e,t,i){try{if(t.kind=="directory"){const s=await e.getDirectoryHandle(i??t.name,{create:!0}),n=[];for await(const a of t.values())n.push(this.copyToHandle(s,a));await Promise.all(n)}else{const s=await t.getFile(),n=await e.getFileHandle(i??t.name,{create:!0});await this.writeHandle(n,s)}}catch(s){console.error(s)}}getRelativePath(e,t){const i=e.split("/"),s=t.split("/"),n=Math.min(i.length,s.length);let a=n;for(let l=0;limport("./NodeFileHandler-bfbfd5ad.js"),[])).NodeFileHandler:new qA}static getStandardHandler(){return this.standardHandler}static getHandler(e){return e!==void 0&&e.startsWith("https://")||e?.startsWith("http://")?this.urlHandler:this.standardHandler}static handleDropEvent(e,t){return this.getHandler().handleDropEvent(e,t)}static getDirectoryHandle(e,t){return Ue.getHandler(e).getDirectoryHandle(e,t)}static hasFile(e){return Ue.getHandler(e).hasFile(e)}static getFileHandle(e,t){return Ue.getHandler(e).getFileHandle(e,t)}static getFileHandleRelativeTo(e,t){return Ue.getHandler(e).getFileHandleRelativeTo(e,t)}static getDirectoryFiles(e){return Ue.getHandler(typeof e=="string"?e:void 0).getDirectoryFiles(e)}static getDirectoryFolders(e){return Ue.getHandler(typeof e=="string"?e:void 0).getDirectoryFolders(e)}static writeFile(e,t){return Ue.getHandler(typeof e=="string"?e:void 0).writeFile(e,t)}static getRelativePath(e,t){return Ue.getHandler().getRelativePath(e,t)}}class St{windowManager;options;windowElement;viewElement;constructor(e){this.options=e;const t=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");if(t.appendChild(s),t.appendChild(i),t.style.width=e.width+"px",t.style.left=window.innerWidth/2-e.width/2+"px",t.style.top=window.innerHeight/2-e.height/2+"px",t.classList.add("unselectable","window"),e.win_id&&(t.dataset.win_id=e.win_id),i.classList.add("view"),i.style.height=e.height+"px",i.style.width=e.width+"px",s.classList.add("navbar"),e.title!==""&&s.appendChild(n),!e.disableClose){const a=Ae.getIcon("MINIMIZE",15),o=Ae.getIcon("CLOSE_WINDOW",15);a.classList.add("unselectable"),a.draggable=!1,a.onclick=()=>{i.style.height!="0px"?i.style.height="0px":i.style.height=e.height+"px",this.clampPosition()},o.classList.add("unselectable"),o.draggable=!1,o.onclick=()=>this.closeWindow(),s.appendChild(a),s.appendChild(o)}n.innerText=e.title,n.classList.add("title"),t.addEventListener("mousedown",()=>this.focus()),e.blocking&&(window.addEventListener("mousedown",this.block,!0),document.getElementById("blocker").style.display="block",t.dataset.blocking="block"),n.addEventListener("mousedown",()=>{window.addEventListener("mousemove",this.handleDrag),window.addEventListener("mouseup",()=>window.removeEventListener("mousemove",this.handleDrag))}),this.focus(),t.classList.add("focused"),this.windowElement=t,this.viewElement=i}addToManager(e){this.windowManager=e,e.view.appendChild(this.windowElement),this.focus()}onClose(){}closeWindow(){this.windowManager&&(this.onClose(),this.windowManager.removeWindow(this),this.windowElement.classList.add("exiting"),window.removeEventListener("mousedown",this.block,!0),this.options.blocking&&this.windowManager.windows.filter(e=>e.options.blocking).length==0&&(document.getElementById("blocker").style.display="none"),setTimeout(()=>this.windowManager.view.removeChild(this.windowElement),40))}focus(){if(this.windowManager==null)return;this.windowManager.unfocusAll(),this.windowElement.classList.add("focused");const e=Array.from(this.windowManager.view.children).map(t=>t).filter(t=>t!=this.windowElement);e.sort((t,i)=>parseInt(t.style.zIndex)-parseInt(i.style.zIndex)),e.push(this.windowElement);for(let t=0;t{!e.target||this.windowElement.contains(e.target)||(e.stopImmediatePropagation(),e.preventDefault())};handleDrag=e=>{const t=parseInt(this.windowElement.style.left.slice(0,-2))+e.movementX,i=parseInt(this.windowElement.style.top.slice(0,-2))+e.movementY;this.windowElement.style.left=t+"px",this.windowElement.style.top=i+"px",this.clampPosition()};clampPosition(){if(this.windowManager==null)return;const e=parseInt(this.windowElement.style.left.slice(0,-2)),t=parseInt(this.windowElement.style.top.slice(0,-2)),i=this.windowManager.app.view.getBoundingClientRect();this.windowElement.style.left=Be(e,i.left,i.width-this.windowElement.clientWidth+i.left)+"px",this.windowElement.style.top=Be(t,i.top,i.height-this.windowElement.clientHeight+i.top)+"px"}move(e,t){this.windowElement.style.left=e+"px",this.windowElement.style.top=t+"px"}}class kd extends St{app;dirOptions;fileDropPath="";draggedElement;draggedCopy;keyHandler;dropHandler;mouseHandler;dragHandler;constructor(e,t,i){super({title:t.title,width:500,height:400,disableClose:t.disableClose,win_id:"file_selector"+Math.random(),blocking:!0}),this.app=e,this.dirOptions=t,t.accepted_file_types||=[],this.keyHandler=this.handleKeyEvent.bind(this),this.dropHandler=this.handleDropEvent.bind(this),this.mouseHandler=this.handleMouseEvent.bind(this),this.dragHandler=this.handleDragEvent.bind(this),this.initView().then(()=>{i&&this.selectPath(i),t.onload?.()})}async initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("menu-options");const i=document.createElement("div");i.classList.add("menu-left");const s=document.createElement("div");s.classList.add("menu-right"),t.appendChild(i),t.appendChild(s);const n=document.createElement("button");n.innerText="Cancel",n.onclick=()=>{window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),this.closeWindow()};const a=document.createElement("button");a.innerText="Select",a.classList.add("confirm"),a.onclick=()=>this.confirmFile(),a.disabled=!0,i.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dir-selector"),o.onclick=y=>{y.target==o&&this.selectElement(void 0)};const l=document.createElement("div");l.classList.add("file-options");const c=document.createElement("button"),d=Ae.getIcon("ADD_FILE",16);c.appendChild(d),c.appendChild(document.createTextNode("Upload files")),l.appendChild(c),c.onclick=async()=>{const y=this.fileDropPath,w=await Jg({_preferPolyfill:!1,excludeAcceptAllOption:!1,multiple:!0}),v=this.viewElement.querySelector(".info.selected")?.dataset.path??"",E=[];for(const C of w)E.push(Ue.getStandardHandler().uploadHandle(C,v));await Promise.all(E),await this.refreshDirectory(y),this.getAcceptableFile(y).then(C=>this.selectPath(C))};const h=document.createElement("button"),u=Ae.getIcon("FOLDER",16);h.appendChild(u),h.appendChild(document.createTextNode("Upload folder")),l.appendChild(h),h.onclick=async()=>{const y=this.fileDropPath,w=await UA({_preferPolyfill:!1}),v=this.viewElement.querySelector(".info.selected")?.dataset.path??"";await Ue.getStandardHandler().uploadHandle(w,v),await this.refreshDirectory(y),this.getAcceptableFile(y==""?w.name:y+"/"+w.name).then(E=>this.selectPath(E))};const p=document.createElement("button");p.classList.add("rename");const f=Ae.getIcon("EDIT",16);p.appendChild(f),p.appendChild(document.createTextNode("Rename")),p.disabled=!0,p.onclick=()=>{const y=this.viewElement.querySelector(".info.selected");y?.dataset.path&&this.startEditing(y.querySelector("textarea"))},l.appendChild(p);const m=document.createElement("button");m.classList.add("delete");const g=Ae.getIcon("TRASH",16);m.appendChild(g),m.appendChild(document.createTextNode("Delete")),m.disabled=!0,m.onclick=()=>{const y=this.viewElement.querySelector(".info.selected"),w=y?.dataset.path;if(!w)return;const b=y.parentElement.classList.contains("folder");Ue.getStandardHandler()[b?"removeDirectory":"removeFile"](w).then(()=>{const v=this.getElement(w);v&&(v.parentElement?.remove(),m.disabled=!0,p.disabled=!0)})},l.appendChild(m),e.appendChild(o),e.appendChild(l),e.appendChild(t),this.viewElement.appendChild(e),window.addEventListener("keydown",this.keyHandler,!0),window.addEventListener("drop",this.dropHandler,!0),window.addEventListener("mousemove",this.dragHandler,!0),this.viewElement.addEventListener("dragover",this.mouseHandler),await this.createDiv("").then(y=>o.replaceChildren(...y))}async expand(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.remove("collapsed");const t=e.nextSibling;await this.createDiv(e.dataset.path).then(i=>{t.replaceChildren(...i)})}collapse(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.add("collapsed"),e.nextSibling.replaceChildren()}selectElement(e){if(this.viewElement.querySelector(".info.selected")?.classList.remove("selected"),!e){this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0;return}e.classList.add("selected"),ra(e,{scrollMode:"if-needed",block:"nearest",inline:"nearest"});const t=this.viewElement.querySelector("button.confirm"),i=e.dataset.path;t.disabled=!0,i&&(t.disabled=!this.acceptableFileType(i),this.viewElement.querySelector(".delete").disabled=!1,this.viewElement.querySelector(".rename").disabled=!1)}async createDiv(e){const t=await Ue.getStandardHandler().getDirectoryFolders(e);let i=await Ue.getStandardHandler().getDirectoryFiles(e);return t.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i=i.filter(s=>$i(s.name)!=".crswap"),t.map(s=>this.createBaseElement(e,s)).concat(i.map(s=>this.createBaseElement(e,s)))}createBaseElement(e,t){e!=""&&(e+="/");const i=document.createElement("div");i.classList.add("item");const s=document.createElement("div");if(s.classList.add("info"),i.appendChild(s),t.kind=="directory"){const a=Ae.getIcon("CHEVRON",16);a.classList.add("folder-icon"),s.appendChild(a);const o=document.createElement("div");o.classList.add("children"),i.appendChild(o),i.classList.add("folder"),i.classList.add("collapsed"),s.addEventListener("click",l=>{const c=l.target;c?.classList.contains("options-icon")||c.tagName=="TEXTAREA"&&!c.disabled||(i.classList.contains("collapsed")?this.expand(s):this.collapse(s))})}else{this.acceptableFileType(t.name)||s.classList.add("disabled");const a=Ae.getIcon(this.getIconId(t.name),16);s.appendChild(a)}s.dataset.path=e+t.name;const n=document.createElement("textarea");return n.rows=1,n.disabled=!0,n.autocomplete="off",n.autocapitalize="off",n.spellcheck=!1,n.innerText=t.name,n.style.pointerEvents="none",n.classList.add("title"),s.appendChild(n),s.addEventListener("click",()=>this.selectElement(s)),s.addEventListener("mousedown",()=>this.startDragging(s)),s.ondblclick=()=>this.confirmFile(),i}confirmFile(){const t=this.viewElement.querySelector(".info.selected")?.dataset.path;t&&this.acceptableFileType(t)&&(this.dirOptions.callback?.(t),window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),window.removeEventListener("mousemove",this.dragHandler,!0),this.closeWindow())}acceptableFileType(e){return this.dirOptions.accepted_file_types.length==0||this.dirOptions.accepted_file_types.includes($i(e))}getIconId(e){const t=$i(e);return t==""&&!e.startsWith(".")?"FOLDER":ns.includes(t)?"IMAGE_FILE":fl.includes(t)?"VOLUME":[".sm",".ssc"].includes(t)?"SM_FILE":"UNKNOWN_FILE"}startEditing(e){const t=e.value,i=!!e.parentElement?.parentElement?.classList.contains("folder"),s=e.parentElement?.dataset.path??"",n=Ot(s);e.value=s.split("/").at(-1)??"",window.removeEventListener("keydown",this.keyHandler,!0),e.disabled=!1,e.style.pointerEvents="",e.focus(),e.addEventListener("keypress",a=>{a.code=="Enter"&&(a.preventDefault(),a.stopImmediatePropagation(),e.blur())},!0),e.addEventListener("blur",async()=>{if(window.addEventListener("keydown",this.keyHandler,!0),e.disabled=!0,e.style.pointerEvents="none",e.value.startsWith(".")){e.value=t;return}e.value=e.value.replaceAll("/","");const a=n==""?e.value:n+"/"+e.value;a!=s&&(e.parentElement.dataset.path=a,await Ue.getStandardHandler()[i?"renameDirectory":"renameFile"](s,a),this.refreshDirectory(n),e.value.length>32&&(e.value=e.value.slice(0,32)+"..."))})}async refreshDirectory(e){const t=this.viewElement.querySelector(".dir-selector");if(!t)return;let i=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']")?.nextSibling;if(e==""&&(i=t),!i)return;const s=Array.from(i.parentElement.querySelectorAll(".folder:not(.collapsed)")).map(n=>n.children[0].dataset.path);await this.createDiv(e).then(n=>i.replaceChildren(...n)),await Promise.all(s.map(n=>this.expand(t.querySelector("div[data-path='"+this.escapeSelector(n)+"']"))))}getElement(e){const t=this.viewElement.querySelector(".dir-selector");return t?t.querySelector("div[data-path='"+this.escapeSelector(e)+"']"):null}async getAcceptableFile(e){const t=await Ue.getStandardHandler().getDirectoryHandle(e);if(!t)return;const i=[{path:e,handle:t}];for(;i.length>0;){const s=i.shift(),n=s.handle;for await(const a of n.values()){const o=s.path==""?"":s.path+"/";if(a.kind=="directory")i.push({path:o+a.name,handle:a});else if(this.acceptableFileType(a.name))return o+a.name}}}async selectPath(e){if(!e)return;const t=this.viewElement.querySelector(".dir-selector");if(!t)return;const i=e.split("/");i.pop();const s=[];for(;i.length>0;){s.push(i.shift());const a=t.querySelector("div[data-path='"+this.escapeSelector(s.join("/"))+"']");if(!a)return;await this.expand(a)}const n=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']");n&&this.selectElement(n)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".info.selected");if(t==null){if(e.code.startsWith("Arrow")){const i=this.viewElement.querySelector(".info");i&&this.selectElement(i)}return}if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s=i.previousSibling?.querySelector(".info");s&&!s.parentElement.classList.contains("collapsed")&&s.parentElement.classList.contains("folder")&&(s=s.parentElement.querySelector(".children").lastChild.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.querySelector(".info")),s&&(this.selectElement(s),ra(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s;i.classList.contains("folder")&&!i.classList.contains("collapsed")&&(s=i.querySelector(".children").children[0].querySelector(".info")),s||(s=t.parentElement.nextSibling?.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.nextSibling.querySelector(".info")),s&&(this.selectElement(s),ra(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowLeft"&&(e.preventDefault(),e.stopImmediatePropagation(),this.collapse(t)),e.code=="ArrowRight"&&(e.preventDefault(),e.stopImmediatePropagation(),this.expand(t)),e.code=="Enter"&&(e.preventDefault(),e.stopImmediatePropagation(),t.parentElement?.querySelector(".title")&&this.startEditing(t.parentElement?.querySelector(".title"))),e.code=="Delete"||e.code=="Backspace"){const i=this.viewElement.querySelector(".info.selected"),s=i?.dataset.path;if(!s)return;const n=i.parentElement.classList.contains("folder");Ue.getStandardHandler()[n?"removeDirectory":"removeFile"](s).then(()=>{const a=this.getElement(s);a&&(a.parentElement?.remove(),this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0)})}}startDragging(e){const t=e;t.totalMovementX=0,t.totalMovementY=0,this.draggedElement=t;const i=()=>{this.stopDragging(),window.removeEventListener("mouseup",i)};window.addEventListener("mouseup",i)}handleDragEvent(e){if(this.draggedElement){if(this.draggedElement.totalMovementX+=e.movementX,this.draggedElement.totalMovementY+=e.movementY,!this.draggedCopy)if(Math.abs(this.draggedElement.totalMovementX)+Math.abs(this.draggedElement.totalMovementY)>8){this.viewElement.addEventListener("mousemove",this.mouseHandler),this.draggedCopy=this.draggedElement.parentElement.cloneNode(!0),this.draggedCopy.style.position="fixed";const t=this.draggedElement.getBoundingClientRect();this.draggedCopy.style.top=t.top+this.draggedElement.totalMovementY+"px",this.draggedCopy.style.left=t.left+this.draggedElement.totalMovementX+"px",this.draggedCopy.style.width=t.width+"px",this.draggedCopy.style.boxShadow="3px 3px 3px #222",this.draggedCopy.querySelector(".children")&&this.draggedCopy.removeChild(this.draggedCopy.querySelector(".children")),this.viewElement.appendChild(this.draggedCopy)}else return;this.draggedCopy.style.top=parseFloat(this.draggedCopy.style.top.slice(0,-2))+e.movementY+"px",this.draggedCopy.style.left=parseFloat(this.draggedCopy.style.left.slice(0,-2))+e.movementX+"px"}}async stopDragging(){if(this.draggedCopy){this.draggedCopy.remove(),this.viewElement.removeEventListener("mousemove",this.mouseHandler);const e=this.draggedCopy.classList.contains("folder"),t=this.draggedElement.dataset.path,i=this.fileDropPath==""?zi(this.draggedElement.dataset.path):this.fileDropPath+"/"+zi(this.draggedElement.dataset.path);t!=i&&await Ue.getStandardHandler()[e?"renameDirectory":"renameFile"](t,i),await this.refreshDirectory(Ot(t)),await this.refreshDirectory(Ot(i)),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}this.draggedCopy=void 0,this.draggedElement=void 0}handleDropEvent(e){e.preventDefault(),e.stopImmediatePropagation(),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),e.target.closest(".dir-selector")&&Ue.getStandardHandler().handleDropEvent(e,this.fileDropPath).then(async t=>{await this.refreshDirectory(this.fileDropPath),this.getAcceptableFile(t??this.fileDropPath).then(i=>this.selectPath(i)),this.fileDropPath=""})}handleMouseEvent(e){const t=this.viewElement.querySelector(".dir-selector");let i=Array.from(t.querySelectorAll("div.item.folder"));const s=this.viewElement.querySelector(".outlined");i=i.filter(n=>!n.parentElement.closest(".collapsed")),i.reverse(),i.push(t);for(const n of i){const a=n.getBoundingClientRect();if(e.clientX>=a.x&&e.clientX<=a.x+a.width&&e.clientY>=a.y&&e.clientY<=a.y+a.height){s!=n&&s?.classList.remove("outlined");const o=n.querySelector(".info");this.fileDropPath=o?.dataset.path??"",n.classList.contains("dir-selector")&&(this.fileDropPath=""),n.classList.add("outlined");return}}this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}escapeSelector(e){return e.replaceAll(/'/g,"\\'")}}class mt{items=[];itemIndex=0;limit=0;app;static instance;constructor(e){this.app=e,mt.instance||(mt.instance=this)}run(e){e.action(this.app),this.items.splice(this.itemIndex,this.items.length-this.itemIndex,e),this.itemIndex++}undo(){this.items[this.itemIndex-1]&&(this.items[this.itemIndex-1].undo(this.app),this.itemIndex--,q.emit("undo"))}redo(){this.items[this.itemIndex]&&(this.items[this.itemIndex].redo?this.items[this.itemIndex].redo(this.app):this.items[this.itemIndex].action(this.app),this.itemIndex++,q.emit("redo"))}reset(){this.itemIndex=0,this.limit=0,this.items=[]}canUndo(){return this.itemIndex>0}canRedo(){return this.itemIndex!=this.items.length}setLimit(){this.limit=this.itemIndex}isDirty(){return this.itemIndex!=this.limit}}function iy(){const r=document.createElement("div");return r.spellcheck=!1,r.contentEditable="true",r.classList.add("inlineEdit"),r.onkeydown=e=>{e.key=="Enter"&&r.blur()},r}function lo(r,e){return{title:r,element:t=>{const i=iy();return i.onblur=()=>{const s=t[e];mt.instance.run({action:()=>{t[e]=i.innerText},undo:()=>{t[e]=s}}),i.scrollLeft=0},i.innerText=t[e],i}}}const KA={name:lo("Name","chartName"),credit:lo("Artist","credit"),style:lo("Style","chartStyle"),description:lo("Description","description"),music:{title:"Music File",element:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-row","flex-column-gap","flex-static","hide-buttons");const i=()=>{if(s.innerText==(r.music??e.chartManager.loadedSM.properties.MUSIC??""))return;const c=e.chartManager.chartAudio.isPlaying();if(s.innerText==""||s.innerText==e.chartManager.loadedSM.properties.MUSIC){r.music=void 0,s.innerText=e.chartManager.loadedSM.properties.MUSIC+"",e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play();return}const d=r.music;mt.instance.run({action:()=>r.music=s.innerText==e.chartManager.loadedSM.properties.MUSIC?void 0:s.innerText,undo:()=>r.music=d}),e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play()},s=iy();s.style.flex="1",s.onblur=i,s.innerText=r.music??e.chartManager.loadedSM.properties.MUSIC??"";const n=document.createElement("button");n.onclick=()=>{const c=Ot(e.chartManager.smPath);if(window.nw){const d=document.createElement("input");d.type="file",d.accept="audio/*",d.onchange=()=>{s.innerText=Ue.getRelativePath(c,d.value),i()},d.click()}else e.windowManager.openWindow(new kd(e,{title:"Select an audio file...",accepted_file_types:fl,disableClose:!0,callback:d=>{s.innerText=Ue.getRelativePath(c,d),i()}},c+"/"+(r.music??e.chartManager.loadedSM.properties.MUSIC??"")))};const a=Ae.getIcon("FOLDER",12);n.appendChild(a);const o=document.createElement("button");o.onclick=()=>{s.innerText!=(e.chartManager.loadedSM.properties.MUSIC??"")&&(s.innerText=e.chartManager.loadedSM.properties.MUSIC??"",i())};const l=Ae.getIcon("REVERT",12);return o.appendChild(l),t.appendChild(s),t.appendChild(n),t.appendChild(o),t}}};class gi{view;items=[];selectedItem;onChangeHandlers=[];static create(e,t){return new gi(document.createElement("div"),e,t)}constructor(e,t,i){this.view=e,e.classList.add("dropdown"),this.items=t??[],this.selectedItem=i??this.items[0];const s=document.createElement("div");s.classList.add("dropdown-selected");const n=document.createElement("div");n.classList.add("dropdown-selected-text");const a=Ae.getIcon("CHEVRON",12);s.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dropdown-items"),o.style.height="",s.onclick=()=>{if(!s.classList.contains("disabled")){if(this.items.length==0){o.style.height="";return}this.createDropdown(),o.style.height==""?(o.classList.remove("collapsed"),o.style.width=Math.max(o.scrollWidth,s.clientWidth)+"px",o.style.height=o.scrollHeight+"px",Array.from(o.children).forEach((l,c)=>{l.style.animationDelay=c*.02+"s"})):(o.style.height="",o.classList.add("collapsed"))}},window.addEventListener("click",l=>{const c=l.target;(!c.closest(".dropdown")||c.closest(".dropdown")!=e)&&(o.style.height="")}),o.classList.add("collapsed"),this.view.appendChild(s),this.view.appendChild(o),this.setSelected()}onChange(e){this.onChangeHandlers.push(e)}removeHandler(e){this.onChangeHandlers.includes(e)&&this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(e),1)}getItems(){return this.items}setItems(e){this.items=e,e.includes(this.selectedItem)||(this.selectedItem=this.items[0],this.setSelected())}setSelected(e){this.selectedItem=e??this.selectedItem;const t=this.view.querySelector(".dropdown-selected-text");t.innerText=this.selectedItem?this.selectedItem+"":""}closeDropdown(){const e=this.view.querySelector(".dropdown-items");e&&(e.style.height="")}get value(){return this.selectedItem}get disabled(){return this.view.querySelector(".dropdown-selected").classList.contains("disabled")}set disabled(e){e?this.view.querySelector(".dropdown-selected").classList.add("disabled"):this.view.querySelector(".dropdown-selected").classList.remove("disabled")}createDropdown(){const e=this.view.querySelector(".dropdown-items"),t=this.items.map((i,s)=>{const n=document.createElement("div");return n.classList.add("dropdown-item"),n.innerText=i+"",n.onclick=()=>{e.style.height="",this.selectedItem!=i&&(this.setSelected(i),this.onChangeHandlers.forEach(a=>a(i,s)))},n});e.replaceChildren(...t)}}class Tl extends St{app;buttonOptions;message;resolve;resolved=new Promise(e=>this.resolve=e);constructor(e,t,i,s){super({title:t,width:300,height:100,disableClose:!0,win_id:"confirm",blocking:!0}),this.app=e,this.message=i,this.buttonOptions=s,this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText=this.message,e.appendChild(t);const i=document.createElement("div");i.classList.add("menu-options"),this.buttonOptions.forEach(s=>{const n=document.createElement("button");n.innerText=s.label,n.onclick=()=>{s.callback?.(),this.resolve?.(s.label),this.closeWindow()},s.type!="default"&&n.classList.add(s.type),i.append(n)}),e.appendChild(i),this.viewElement.appendChild(e)}}class ry extends St{app;gameType;chartList;chartInfo;gameTypeDropdown;smLoadHandler=()=>{this.gameTypeDropdown.setItems(ze.getPriority().map(e=>{const t=this.app.chartManager.loadedSM?.charts[e.id]??[];return e.id+" ("+t.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts()};constructor(e,t){super({title:"Chart List",width:500,height:400,win_id:"chart_list"}),this.app=e,this.gameType=t??e.chartManager.loadedChart?.gameType??ze.getPriority()[0],this.initView(),q.on("smLoadedAfter",this.smLoadHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("chart-view-type-wrapper");const i=document.createElement("div");i.classList.add("chart-view-type-label"),i.innerText="Game Type:",this.gameTypeDropdown=gi.create(ze.getPriority().map(n=>{const a=this.app.chartManager.loadedSM?.charts[n.id]??[];return n.id+" ("+a.length+")"}),this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameTypeDropdown.onChange(n=>{this.gameType=ze.getGameType(n.split(" ")[0])??this.gameType,this.loadCharts()}),t.appendChild(i),t.appendChild(this.gameTypeDropdown.view);const s=document.createElement("div");s.classList.add("chart-view-scroller"),e.appendChild(t),e.appendChild(s),this.chartList=document.createElement("div"),this.chartList.classList.add("chart-list"),this.chartInfo=document.createElement("div"),this.chartInfo.classList.add("chart-info"),s.appendChild(this.chartList),s.appendChild(this.chartInfo),this.viewElement.appendChild(e),this.loadCharts()}onClose(){q.off("smLoadedAfter",this.smLoadHandler)}loadCharts(){const e=this.app.chartManager.loadedSM?.charts[this.gameType.id]??[],t=[];this.gameTypeDropdown.setItems(ze.getPriority().map(a=>{const o=this.app.chartManager.loadedSM?.charts[a.id]??[];return a.id+" ("+o.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),e.forEach(a=>{const o=document.createElement("div");o.classList.add("chart-list-item"),o.chart=a,this.app.chartManager.loadedChart==a&&o.classList.add("selected"),o.onclick=()=>{o.chart!=this.app.chartManager.loadedChart&&(this.app.chartManager.loadChart(o.chart),this.chartList.querySelectorAll(".selected").forEach(u=>u.classList.remove("selected")),o.classList.add("selected"))},o.onmouseenter=()=>{this.loadChartDetails(o.chart)},o.onmouseleave=()=>{this.loadChartDetails()};const l=document.createElement("div");l.innerText=a.meter+"",l.classList.add("title",a.difficulty);const c=document.createElement("div");c.classList.add("chart-list-info");const d=document.createElement("div");d.innerText=a.credit,d.classList.add("title","chart-credit");const h=document.createElement("div");h.innerText=a.getNotedata().length+"",h.classList.add("title","chart-step-count"),c.appendChild(d),c.appendChild(h),o.appendChild(l),o.appendChild(c),t.push(o)});const i=document.createElement("div");i.classList.add("chart-list-item");const s=document.createElement("div");s.innerText="+",s.classList.add("title");const n=document.createElement("div");n.classList.add("chart-list-info"),n.innerText="New Blank Chart",i.appendChild(s),i.appendChild(n),i.onclick=()=>{const a=new Zg(this.app.chartManager.loadedSM);a.gameType=this.gameType,this.app.chartManager.loadedSM.addChart(a),this.app.chartManager.loadChart(a),this.loadCharts()},this.chartList.replaceChildren(...t,i),this.loadChartDetails()}loadChartDetails(e){if(e=e??this.app.chartManager.loadedChart,e?.gameType.id!=this.gameType.id){this.chartInfo.replaceChildren();return}if(!e)return;const t=()=>this.app.chartManager.loadedSM.charts[e.gameType.id].sort((m,g)=>Ei.indexOf(m.difficulty)==Ei.indexOf(g.difficulty)?m.meter-g.meter:Ei.indexOf(m.difficulty)-Ei.indexOf(g.difficulty)),i=document.createElement("div");i.classList.add("chart-info-main");const s=gi.create(Ei,e.difficulty);s.view.classList.add("no-border","white"),s.onChange(m=>{const g=e.difficulty;mt.instance.run({action:()=>{e.difficulty=m,t(),this.loadCharts()},undo:()=>{e.difficulty=g,t(),this.loadCharts()}})});const n=document.createElement("div");n.spellcheck=!1,n.contentEditable="true",n.classList.add("inlineEdit","chart-meter"),n.onkeydown=m=>{m.key=="Enter"&&n.blur()},n.onblur=()=>{let m=ua(n.innerText);if(m===null){n.innerText=e?.meter+"";return}m=Math.round(Be(1,m,2**31-1));const g=e.meter;mt.instance.run({action:()=>{e.meter=m,e.meterF=m,t(),this.loadCharts()},undo:()=>{e.meter=g,e.meterF=g,t(),this.loadCharts()}}),n.scrollLeft=0},n.innerText=e.meter+"";const a=document.createElement("div");a.classList.add("chart-properties"),i.appendChild(s.view),i.appendChild(n),Object.values(KA).forEach(m=>{const g=document.createElement("div");g.classList.add("label"),g.innerText=m.title;const y=m.element(e,this.app);m.title=="Artist"&&y.addEventListener("blur",()=>this.loadCharts()),a.appendChild(g),a.appendChild(y)});const o=e.getNotedataStats(),l=document.createElement("div");l.classList.add("chart-info-grid-item");const c=document.createElement("div");c.innerText="Peak NPS",c.classList.add("title","chart-info-grid-label");const d=document.createElement("div");d.innerText=e.getMaxNPS().toFixed(2)+"",d.classList.add("title","chart-info-grid-count"),l.appendChild(c),l.appendChild(d);const h=document.createElement("div");h.classList.add("chart-info-grid"),Object.entries(o).forEach(m=>{const g=document.createElement("div");g.classList.add("chart-info-grid-item");const y=document.createElement("div");y.innerText=m[0],y.classList.add("title","chart-info-grid-label");const w=document.createElement("div");w.innerText=m[1]+"",w.classList.add("title","chart-info-grid-count"),g.appendChild(y),g.appendChild(w),h.appendChild(g)});const u=document.createElement("div");u.classList.add("menu-options");const p=document.createElement("button");p.innerText="Duplicate Chart",p.onclick=()=>{const m=Object.assign(Object.create(Object.getPrototypeOf(e)),e);m.setNotedata(e.getNotedata().map(g=>e.computeNote(g))??[]),this.app.chartManager.loadedSM.addChart(m),this.app.chartManager.loadChart(m),this.loadCharts()},u.append(p);const f=document.createElement("button");f.innerText="Delete Chart",f.onclick=()=>{this.app.windowManager.openWindow(new Tl(this.app,"Delete chart","Are you sure you want to delete this chart?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{this.app.chartManager.loadedSM.removeChart(e)&&(this.app.chartManager.loadChart(),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts())}}]))},f.classList.add("delete"),u.append(f),this.chartInfo.replaceChildren(i,a,l,h,u)}}var ZA=4,JA=.001,QA=1e-7,eS=10,jn=11,ho=1/(jn-1),tS=typeof Float32Array=="function";function sy(r,e){return 1-3*e+3*r}function ny(r,e){return 3*e-6*r}function ay(r){return 3*r}function Zo(r,e,t){return((sy(e,t)*r+ny(e,t))*r+ay(e))*r}function oy(r,e,t){return 3*sy(e,t)*r*r+2*ny(e,t)*r+ay(e)}function iS(r,e,t,i,s){var n,a,o=0;do a=e+(t-e)/2,n=Zo(a,i,s)-r,n>0?t=a:e=a;while(Math.abs(n)>QA&&++o=JA?rS(l,p,e,i):f===0?p:iS(l,c,c+ho,e,i)}return function(c){return c===0?0:c===1?1:Zo(o(c),t,s)}};const Zt=ya(nS),aS=Zt(0,0,1,1);function sf(r,e){const t=e?e.split("."):[];for(;t.length&&r;){const i=t.shift(),s=new RegExp("(.+)\\[([0-9]*)\\]").exec(i);if(s!==null&&s.length==3){const n={arrName:s[1],arrIndex:s[2]};r[n.arrName]!==void 0?r=r[n.arrName][n.arrIndex]:r=void 0;continue}r=r[i]}return r}function oS(r,e,t){const i=e?e.split("."):[];for(;i.length&&r;){const s=i.shift(),n=new RegExp("(.+)\\[([0-9]*)\\]").exec(s);if(n!==null&&n.length==3){const a={arrName:n[1],arrIndex:n[2]};r[a.arrName]!==void 0&&i.length===0&&(r[a.arrName][a.arrIndex]=t);continue}r[s]===void 0&&(r[s]={}),i.length===0&&(r[s]=t),r=r[s]}return r}const Ir=class Ir{static updateObject(e,t,i){const s=Object.keys(t).sort((o,l)=>parseFloat(o)-parseFloat(l));let n="0";for(let o=s.length-2;o>=0;o--)if(parseFloat(s[o])<=i){n=s[o];break}let a="1";for(let o=1;oi){a=s[o];break}Object.keys(t[0]).forEach(o=>{let l=t[n][o],c=t[a][o];l==="inherit"&&(t[n][o]=sf(e,o),l=t[n][o]),c==="inherit"&&(t[a][o]=sf(e,o),c=t[a][o]);const d=l+(i-parseFloat(n))/(parseFloat(a)-parseFloat(n))*(c-l);oS(e,o,d)})}static stop(e,t=null){e!==void 0&&(t!==null&&this.animations.get(e)?.obj&&!this.animations.get(e).obj.destroyed&&this.updateObject(this.animations.get(e).obj,this.animations.get(e).animation,t),this.animations.delete(e))}static finish(e){e!==void 0&&this.stop(e,1)}static animate(e,t,i,s,n=()=>{},a){return a||=`${++this._id}`,this.animations.set(a,{obj:e,animation:t,seconds:1/(60*i),progress:0,curve:s!==void 0?s:aS,onend:n}),a}};ks(Ir,"animations",new Map),ks(Ir,"_id",0),Et.shared.add(e=>{for(const[t,i]of Ir.animations.entries())i.obj._destroyed?Ir.stop(t):(i.progress=Math.min(1,i.progress+i.seconds*e),Ir.updateObject(i.obj,i.animation,i.curve(i.progress)),i.progress>=1&&(i.onend(i.obj),Ir.stop(t,1)))});let Rt=Ir;const Th=[{frequency:20,Q:.71},{frequency:75,gain:0},{frequency:100,gain:0,Q:.6},{frequency:250,gain:0,Q:.3},{frequency:1040,gain:0,Q:.41},{frequency:2500,gain:0,Q:.2},{frequency:7500,gain:0},{frequency:2e4,Q:.71}],nf=[{freq:20,label:"20"},{freq:30,label:"30"},{freq:40,label:"40"},{freq:50,label:"50"},{freq:60,label:"60"},{freq:70,label:""},{freq:80,label:"80"},{freq:90,label:""},{freq:100,label:"100"},{freq:200,label:"200"},{freq:300,label:"300"},{freq:400,label:"400"},{freq:500,label:"500"},{freq:600,label:"600"},{freq:700,label:""},{freq:800,label:"800"},{freq:900,label:""},{freq:1e3,label:"1k"},{freq:2e3,label:"2k"},{freq:3e3,label:"3k"},{freq:4e3,label:"4k"},{freq:5e3,label:"5k"},{freq:6e3,label:"6k"},{freq:7e3,label:""},{freq:8e3,label:"8k"},{freq:9e3,label:""},{freq:1e4,label:"10k"},{freq:15e3,label:""},{freq:2e4,label:"20k"}],$s=0,Xs=0,_s=1200,kt=400,Jo=new Array(_s).fill(0).map((r,e)=>Id(e)),lS=new Float32Array(Jo);function Qo(r){return Math.log(r/20)/Math.log(1102.5)*_s}function Id(r){return Math.pow(1102.5,r/_s)*20}function ds(r){return-r*6+kt/2}function af(r){return-(r-kt/2)/6}class hS extends St{app;cachedReponse=new Array(_s).fill(0);onAudioLoad=this.onAudio.bind(this);points=[];icons;info;trackedFilter=null;constructor(e){super({title:"Audio Equalizer",width:600,height:245,win_id:"audio-eq"}),this.app=e,this.initView(),this.onAudioLoad(),q.on("audioLoaded",this.onAudioLoad)}destroy(){q.off("audioLoaded",this.onAudioLoad)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("eq-container");const t=document.createElement("div");t.classList.add("icon-container"),this.app.chartManager.chartAudio.getFilters().forEach((b,v)=>{const E=Ae.getIcon(b.type.toUpperCase(),36,24,as[v]);E.classList.add("eq-icon"),E.style.backgroundColor=`${as[v]}40`,E.onclick=()=>{this.app.chartManager.chartAudio.getFilter(v).enabled?this.app.chartManager.chartAudio.disableFilter(v):this.app.chartManager.chartAudio.enableFilter(v),this.endTrack(),this.updateIcons()},E.onmouseenter=()=>this.points[v].highlight(),E.onmouseleave=()=>this.points[v].unhighlight(),t.appendChild(E)}),this.icons=t,this.updateIcons();const i=document.createElement("canvas");i.style.width="600px",i.style.height="200px",i.onmousedown=b=>{const v=this.points.filter(E=>E.hitTest(b.offsetX*2,b.offsetY*2)).at(-1);this.endTrack(),v?.mouseDown(b)};const s=document.createElement("div");s.classList.add("eq-info-container");const n=document.createElement("div");n.classList.add("eq-info");const a=document.createElement("div");a.innerText="Type",a.classList.add("eq-info-label");const o=document.createElement("div");o.classList.add("eq-info-value"),n.replaceChildren(a,o);const l=document.createElement("div");l.classList.add("eq-info");const c=document.createElement("div");c.innerText="Frequency",c.classList.add("eq-info-label");const d=document.createElement("div");d.contentEditable="false",d.classList.add("eq-info-value","inlineEdit"),l.replaceChildren(c,d),this.setupInput(d,"frequency",20,22050," Hz");const h=document.createElement("div");h.classList.add("eq-info");const u=document.createElement("div");u.innerText="Gain",u.classList.add("eq-info-label");const p=document.createElement("div");p.contentEditable="false",p.classList.add("eq-info-value","inlineEdit"),h.replaceChildren(u,p),this.setupInput(p,"gain",-24,24," dB",1);const f=document.createElement("div");f.classList.add("eq-info");const m=document.createElement("div");m.innerText="Q",m.classList.add("eq-info-label");const g=document.createElement("div");g.contentEditable="false",g.classList.add("eq-info-value","inlineEdit"),f.replaceChildren(m,g),this.setupInput(g,"Q",1e-4,1e3,"",4);const y=document.createElement("div");y.classList.add("eq-reset","disabled"),y.innerText="Reset",y.onclick=()=>{if(this.trackedFilter==null)for(let b=0;b{o=this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,e.innerText=ae(o,a)+"",this.selectText(e)},e.onkeydown=l=>{if(l.key=="Enter"){e.blur();return}if(l.key=="Tab"){const d=[...e.parentElement.parentElement.children],h=d.indexOf(e.parentElement);for(let u=1;u{const c=ua(e.innerText);c!==null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Be(c,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse())})},e.onblur=()=>{ua(e.innerText)===null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Be(o,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse()),e.innerText=ae(this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,a)+n}}onAudio(){this.points=this.app.chartManager.chartAudio.getFilters().map((e,t)=>new cS(this,t)),this.getResponse(),this.updateIcons(),this.endTrack()}getResponse(){this.cachedReponse=this.app.chartManager.chartAudio.getFrequencyResponse(Jo)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=1200,t.canvas.height=400;const i=()=>{if(!this.app.chartManager.chartAudio)return;const s=t.createRadialGradient(e.width/2,e.height/2,0,e.width/2,e.height/2,e.width/2);s.addColorStop(0,"rgb(11, 14, 26)"),s.addColorStop(1,"rgb(5, 7, 13)"),t.fillStyle=s,t.fillRect(0,0,e.width,e.height),t.fillStyle="rgb(0, 50, 150)",this.drawFrequencies(t,this.app.chartManager.chartAudio.getFrequencyData()),this.app.chartManager.chartAudio.hasFilters()&&(t.fillStyle="rgba(200, 200, 200, 0.2)",this.drawFrequencies(t,this.app.chartManager.chartAudio.getFilteredFrequencyData())),t.fillStyle="rgba(200, 200, 200, 0.5)",this.drawResponse(t),t.fillStyle="rgba(0, 100, 150, 0.5)",t.font="22px Assistant",this.drawGrid(t),this.points.forEach(n=>n.draw(t)),e.closest("#windows")&&requestAnimationFrame(i)};return i}drawFrequencies(e,t){for(let i=0;i<_s;i++){const s=Id(i)/this.app.chartManager.chartAudio.getSampleRate()*this.app.chartManager.chartAudio.getFFTSize(),n=t[Math.floor(s)]/255;e.fillRect($s+i,Xs+kt-n*kt,1,n*kt)}}drawResponse(e){for(let t=0;t<_s;t++){const i=Math.log(this.cachedReponse[t])/.115241,s=ds(i);e.fillRect(t+$s,Math.min(s,kt/2)+Xs,1,Math.max(s,kt/2)-Math.min(s,kt/2))}}drawGrid(e){for(const t of nf)e.fillRect($s+Qo(t.freq),Xs,1,kt),e.fillText(t.label,$s+Qo(t.freq)-(t==nf.at(-1)?20:0),Xs+kt/2);for(let t=-25;t<=25;t+=5){const i=Xs+ds(t);e.fillRect(0,i,1200,1),t!=0&&e.fillText(t+"",$s,i)}}updateIcons(){[...this.icons.children].forEach((e,t)=>{this.app.chartManager.chartAudio.getFilter(t).enabled?e.classList.remove("disabled"):e.classList.add("disabled")}),this.getResponse()}trackFilter(e){this.trackedFilter=e;const t=this.app.chartManager.chartAudio.getFilter(e),[i,s,n,a]=[...this.info.children].map(o=>o.children[1]);i.innerText=t.type,s.innerText=Math.round(t.frequency.value)+" Hz",n.innerText=t.type.endsWith("pass")?"-":ae(t.gain.value,1)+" dB",a.innerText=t.type.endsWith("shelf")?"-":ae(t.Q.value,2)+"",i.style.color=as[e],s.style.color=as[e],n.style.color=as[e],a.style.color=as[e],s.contentEditable="true",n.contentEditable=`${!t.type.endsWith("pass")}`,a.contentEditable=`${!t.type.endsWith("shelf")}`}endTrack(){setTimeout(()=>{this.trackedFilter=null,this.points.forEach(n=>n.unhighlight());const[e,t,i,s]=[...this.info.children].map(n=>n.children[1]);e.innerText="",t.innerText="",i.innerText="",s.innerText="",t.contentEditable="false",i.contentEditable="false",s.contentEditable="false"})}}const co=16,as=["#a3001b","#a34f00","#d6d606","#19c402","#02c4ba","#022fc4","#5602c4","#c402b4"];class cS{filterIndex;window;dragging=!1;x=0;y=0;type;response=new Float32Array(Jo.length);_empty=new Float32Array(Jo.length);highlighted=!1;pointSize=.4;constructor(e,t){this.filterIndex=t,this.window=e,this.type=this.window.app.chartManager.chartAudio.getFilter(t).type,this.x=Qo(this.window.app.chartManager.chartAudio.getFilter(t).frequency.value??10),this.getY()}hitTest(e,t){return(e-this.x)*(e-this.x)+(t-this.y)*(t-this.y)<=co*co}canChangeGain(){return this.type=="lowshelf"||this.type=="highshelf"||this.type=="peaking"}canChangeQ(){return!this.type.endsWith("shelf")}getY(){this.type.endsWith("shelf")?this.y=ds(this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value/2):this.canChangeGain()?this.y=ds(this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value??0):this.y=kt/2}getGain(){if(this.canChangeGain())return this.type.endsWith("shelf")?af(this.y)*2:af(this.y)}mouseDown(e){this.calcResponse(),this.dragging=!0,this.highlighted=!0,this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled||(this.window.app.chartManager.chartAudio.enableFilter(this.filterIndex),this.window.updateIcons());const t=this.x,i=this.y,s=e.clientX,n=e.clientY,a=l=>{this.x=(l.clientX-s)*2+t,this.canChangeGain()?this.y=(l.clientY-n)*2+i:this.y=kt/2,this.x=Be(this.x,0,_s),this.y=Be(this.y,this.type.endsWith("shelf")?kt/4:ds(24),this.type.endsWith("shelf")?3*kt/4:ds(-24)),this.window.app.chartManager.chartAudio.updateFilter(this.filterIndex,{frequency:Id(this.x),gain:this.getGain()}),this.window.getResponse(),this.window.trackFilter(this.filterIndex),this.calcResponse()};this.window.trackFilter(this.filterIndex);const o=()=>{Rt.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.3}},.3,Zt(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),this.dragging=!1,window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o)};Rt.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.9}},.3,Zt(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),window.addEventListener("mousemove",a),window.addEventListener("mouseup",o)}calcResponse(){this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).getFrequencyResponse(lS,this.response,this._empty)}draw(e){const t=this.highlighted||this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled?as[this.filterIndex]:"#888888";if(e.fillStyle=t+"60",this.dragging)for(let i=0;i{navigator.clipboard.writeText(s.innerText)}),this.outputDiv=s;const n=document.createElement("div");n.classList.add("export-section-label"),n.innerText="Include",i.appendChild(n),Object.keys(this.exportOptions.include).forEach(o=>{const l=document.createElement("input");l.type="checkbox",l.id="en-i-"+o,l.checked=this.exportOptions.include[o],l.onchange=()=>{this.exportOptions.include[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=o;const d=document.createElement("div");d.replaceChildren(l,c),d.classList.add("export-option"),i.appendChild(d)});const a=document.createElement("div");a.classList.add("export-section-label"),a.innerText="Options",i.appendChild(a),Object.keys(this.exportOptions.options).forEach(o=>{const l=document.createElement("input");l.id="en-o-"+o,l.type="checkbox",l.checked=this.exportOptions.options[o],l.onchange=()=>{this.exportOptions.options[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=Eh[o].label;const d=document.createElement("div");d.replaceChildren(l,c),d.classList.add("export-option"),i.appendChild(d),Eh[o].tooltip!==void 0&&Pt(d,{content:Eh[o].tooltip})}),t.replaceChildren(i,s),e.appendChild(t),this.viewElement.appendChild(e)}export(){let e=`{ `+this.selection.map(t=>{let i=" {";return this.exportOptions.include.Beat&&(i+=this.padNum(t.beat)+","),this.exportOptions.include.Second&&(i+=this.padNum(t.second)+","),this.exportOptions.include.Column&&(this.exportOptions.options.columnOneBased?i+=t.col+1+",":i+=t.col+","),this.exportOptions.include.Type&&(this.exportOptions.options.notitgNoteTypes&&of[t.type]!==void 0?i+=of[t.type]+",":i+='"'+t.type+'",'),this.exportOptions.include.Quantization&&(i+=t.quant+","),this.exportOptions.include.Length&&Le(t)&&(this.exportOptions.options.lengthAsNumberIndex?i+=this.padNum(t.hold)+",":i+="length="+this.padNum(t.hold)+","),i.endsWith(",")&&(i=i.slice(0,-1)),i+="}",this.getNumIncludes()==1&&(i=i.replaceAll("{",""),i=i.replaceAll("}","")),i}).join(`, `)+` -}`;this.exportOptions.options.minify&&(e=e.replaceAll(/\s/g,"")),this.outputDiv.innerText=e}getNumIncludes(){return Object.values(this.exportOptions.include).map(e=>+e).reduce((e,t)=>e+t,0)}padNum(e){return this.exportOptions.options.padNumbers?(Math.round(e*1e3)/1e3).toFixed(3):Math.round(e*1e3)/1e3}}const Br={"dance-single":[{label:"Left",keys:["Left","A"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"Right",keys:["Right","D"]}],"dance-double":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-couple":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-solo":[{label:"Left",keys:["Left","A"]},{label:"UpLeft",keys:["Q"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"UpRight",keys:["E"]},{label:"Right",keys:["Right","D"]}],"dance-solodouble":[{label:"P1 Left",keys:["A"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Down",keys:["S"]},{label:"P1 Up",keys:["W"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 Right",keys:["D"]},{label:"P2 Left",keys:["J"]},{label:"P2 UpLeft",keys:["U"]},{label:"P2 Down",keys:["K"]},{label:"P2 Up",keys:["I"]},{label:"P2 UpRight",keys:["O"]},{label:"P2 Right",keys:["L"]}],"dance-threepanel":[{label:"UpLeft",keys:["Left","Q"]},{label:"Down",keys:["Down","S"]},{label:"UpRight",keys:["Right","E"]}],"dance-threedouble":[{label:"P1 UpLeft",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 UpRight",keys:["Right"]},{label:"P2 UpLeft",keys:["Q"]},{label:"P2 Down",keys:["S"]},{label:"P2 UpRight",keys:["E"]}],"pump-single":[{label:"DownLeft",keys:["Z"]},{label:"UpLeft",keys:["Q"]},{label:"Center",keys:["S"]},{label:"UpRight",keys:["E"]},{label:"DownRight",keys:["C"]}],"pump-double":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-versus":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-couple":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-halfdouble":[{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]}]};class Re{static app;static userKeybinds=new Map;static userGameplayKeybinds=new Map;static load(e){this.app=e;try{this.loadKeybinds()}catch(t){console.error("Failed to load user keybinds!"),console.error(t.stack),this.userKeybinds.clear(),this.userGameplayKeybinds.clear()}window.addEventListener("keydown",t=>this.checkKey(t,"keydown")),window.addEventListener("keyup",t=>this.checkKey(t,"keyup"))}static checkKey(e,t){if(e.target.classList.contains("inlineEdit")||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLButtonElement||["Meta","Control","Shift","Alt"].includes(e.key))return;const i=[];for(let a=0;a(o[d]??c.keys).some(h=>s==h));if(l!=-1){if(e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;this.app.chartManager[t=="keydown"?"judgeCol":"judgeColUp"](l);return}}const n=Object.keys(Tt).filter(a=>!["cut","copy","paste","pasteReplace"].includes(a)).filter(a=>{for(const o of this.getCombosForKeybind(a))if(this.compareModifiers(o.mods,i)&&o.key==s)return!0;return!1}).map(a=>Tt[a]);if(n.length>0){if(n.every(a=>a.preventDefault!=!1)&&e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;for(const a of n){let o=a.disabled;if(o instanceof Function&&(o=o(this.app)),!o&&!(a.disableRepeat&&e.repeat)){t=="keydown"?a.callback(this.app):a.callbackKeyUp?.(this.app);return}}}}static getKeyNameFromCode(e){let t=e;return t.startsWith("Digit")&&(t=t.slice(5)),t.startsWith("Key")&&(t=t.slice(3)),t in gf&&(t=gf[t]),t}static getKeybindString(e){return this.getCombosForKeybind(e).map(t=>this.getComboString(t)).join(" / ")}static getComboString(e){const t=Co.filter(i=>e.mods.includes(i)).map(i=>OS[i]).join("");return t+(t!=""?" ":"")+(vy[e.key]??e.key)}static getCombosForKeybind(e){return e in Tt?this.userKeybinds.get(e)??Tt[e].combos:(console.log("Couldn't find keybind with id "+e),[])}static getKeysForGameType(e){const t=We.getGameType(e);return t?new Array(t.numCols).fill(null).map((i,s)=>this.userGameplayKeybinds.get(e)?.[s]??Br[e]?.[s].keys??[]):(console.log("Couldn't find game type with id "+e),[])}static compareModifiers(e,t){if(e.length!=t.length)return!1;for(const i of Co)if((e.includes(i)?1:0)+(t.includes(i)?1:0)==1)return!1;return!0}static compareCombos(e,t){return e.key==t.key&&this.compareModifiers(e.mods,t.mods)}static loadKeybinds(){const e=localStorage.getItem("keybinds");if(e){const i=JSON.parse(e);if(typeof i!="object")return console.error("Couldn't load keybinds from storage");for(const[s,n]of Object.entries(i)){if(!(s in Tt)){console.warn("Couldn't load keybind "+s+": key doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load keybind "+s+": value is not an array"),this.userKeybinds.set(s,n.filter(a=>typeof a.key!="string"||!Array.isArray(a.mods)?(console.warn("Couldn't load keycombo for keybind "+s+": "+JSON.stringify(a)),!1):!0))}}const t=localStorage.getItem("keybindsGP");if(t){const i=JSON.parse(t);if(typeof i!="object")return console.error("Couldn't load gameplay keybinds from storage");for(const[s,n]of Object.entries(i)){if(!We.getGameType(s)){console.warn("Couldn't load gameplay keybinds for gameType "+s+": gameType doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load gameplay keybind "+s+": value is not an array"),this.userGameplayKeybinds.set(s,n.map((a,o)=>!Array.isArray(a)&&a!==null?(console.warn("Couldn't load gameplay keys for type "+s+" col "+o+": "+JSON.stringify(a)),null):a))}}}static clearSave(){localStorage.removeItem("keybinds"),localStorage.removeItem("keybindsGP")}static setKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...Tt[e].combos]),this.userKeybinds.get(e)?.push(t),this.checkIsDefault(e),this.saveKeybinds()}static removeKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...Tt[e].combos]),this.userKeybinds.set(e,this.userKeybinds.get(e).filter(i=>!this.compareCombos(i,t))),this.checkIsDefault(e),this.saveKeybinds()}static revertKeybind(e){this.userKeybinds.delete(e),this.saveKeybinds()}static revertGameplayKeybind(e,t){this.userGameplayKeybinds.has(e)&&(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(i=>i===null)&&this.userGameplayKeybinds.delete(e)),this.saveKeybinds()}static setGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(We.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Br[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t].push(i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static removeGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(We.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Br[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t]=this.userGameplayKeybinds.get(e)[t].filter(s=>s!=i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static checkIsDefault(e){if(!this.userKeybinds.has(e))return!0;const t=this.userKeybinds.get(e),i=[...Tt[e].combos];return t.length!=i.length?!1:t.map(s=>this.getComboString(s)).sort().join("∆")==i.map(s=>this.getComboString(s)).sort().join("∆")?(this.userKeybinds.delete(e),!0):!1}static checkIsDefaultGameplay(e,t){if(!this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.get(e)[t]===null)return!0;const i=this.userGameplayKeybinds.get(e)[t],s=[...Br[e]?.[t].keys??[]];return i.length!=s.length?!1:i.sort().join("∆")==s.sort().join("∆")?(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(n=>n===null)&&this.userGameplayKeybinds.delete(e),!0):!1}static saveKeybinds(){const e={};for(const[i,s]of this.userKeybinds.entries())e[i]=s;localStorage.setItem("keybinds",JSON.stringify(e));const t={};for(const[i,s]of this.userGameplayKeybinds.entries())t[i]=s;localStorage.setItem("keybindsGP",JSON.stringify(t))}static getKeybindTooltip(e){return this.getCombosForKeybind(e).map(i=>{let s=this.getComboString(i);return s==""?"":(s=s.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"")}).join("")}static evaluateTaggedTooltip(e,t){t=t.map(s=>s.startsWith("\\")?s.slice(1):this.getKeybindTooltip(s));const i=[];for(let s=0;s"+i.join("")+""}static createKeybindTooltip(e){return(t,...i)=>{Pt(e,{allowHTML:!0,onShow:s=>{s.setContent(this.evaluateTaggedTooltip(t,i))}})}}}class ly extends St{app;allowMods;callback;combo={mods:[],key:""};conflictCheck;listener;constructor(e,t,i,s){super({title:"",width:300,height:168,disableClose:!0,win_id:"keyComboSelector",blocking:!0}),this.app=e,this.allowMods=t,this.callback=i,this.conflictCheck=s??(()=>[]),this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding"),e.style.gap="8px";const t=document.createElement("div");t.classList.add("label"),t.innerText="Input a key combo and select Ok when finished.",e.appendChild(t);const i=document.createElement("input");i.type="text",i.disabled=!0,i.style.fontSize="18px",i.style.height="24px",i.style.flex="0",i.style.textAlign="center",e.appendChild(i);const s=document.createElement("div");s.classList.add("detail"),s.innerText="No conflicts",s.style.flex="1",e.appendChild(s);const n=document.createElement("div");n.classList.add("menu-options");const a=document.createElement("button");a.innerText="Ok",a.onclick=()=>{this.callback(this.combo),this.closeWindow()},a.classList.add("confirm"),a.disabled=!0;const o=document.createElement("button");o.innerText="Cancel",o.onclick=()=>{this.closeWindow()},n.append(o),n.append(a),e.appendChild(n),this.viewElement.appendChild(e),this.listener=l=>{if(["Meta","Control","Shift","Alt","Escape"].includes(l.key))return;if(this.combo.key=Re.getKeyNameFromCode(l.code),this.allowMods){const d=[];for(let h=0;h=3?s.innerText=`Conflicts with ${c.length} keybinds`:c.length>=1?s.innerText=`Conflicts with ${c.join(",")}`:s.innerText="No conflicts"),l.preventDefault()},window.addEventListener("keydown",this.listener)}onClose(){window.removeEventListener("keydown",this.listener)}}class uS extends St{app;observer;conflictMap=this.calculateConflicts();constructor(e){super({title:"Gameplay Keybind Options",width:600,height:400,disableClose:!1,win_id:"gameplay_keybind_options",blocking:!1}),this.app=e,this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-scrollers");const s=document.createElement("div");s.classList.add("pref-section-scroller");const n=document.createElement("div");n.classList.add("pref-option-scroller"),i.replaceChildren(s,n),this.observer=new IntersectionObserver(a=>{a.forEach(o=>{const l=o.target.dataset.id,c=s.querySelector(`.pref-section[data-id=${l}]`);c&&(o.intersectionRatio>0?c.classList.add("selected"):c.classList.remove("selected"))})},{}),t.replaceChildren(i),s.replaceChildren(...this.createSections()),n.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(){return Object.keys(We.getTypes()).map(e=>this.createEmptySection(e))}createOptions(){return Object.keys(We.getTypes()).map(e=>{const t=new Array(We.getTypes()[e].numCols).fill(null).map((n,a)=>this.createKeybindItem(e,a)),i=document.createElement("div");i.classList.add("pref-group"),i.dataset.id=e;const s=document.createElement("div");return s.classList.add("pref-group-label"),s.innerText=e,i.replaceChildren(s,...t),this.observer.observe(i),i})}createEmptySection(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e,t.innerText=e,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e}]`).scrollIntoView()},t}createKeybindItem(e,t){const i=document.createElement("div");i.classList.add("pref-keybind"),i.dataset.id=e+"-"+t,i.onclick=o=>{o.target.classList.contains("pref-keybind-combo")||i.querySelector(".icon")?.contains(o.target)||this.app.windowManager.openWindow(new ly(this.app,!1,l=>{Re.setGameplayKeybind(e,t,l.key),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l=>{const c=this.conflictMap.get(e)?.get(l.key)?.map(d=>Br[d[0]]?.[d[1]].label??"Column "+d[1])??[];return c.includes(Br[e]?.[t].label??"Column "+t)?"self":c}))};const s=document.createElement("div");s.classList.add("pref-keybind-label"),s.innerText=Br[e]?.[t].label??"Column "+t;const n=Ae.getIcon("REVERT");n.style.width="12px",n.addEventListener("click",()=>{Re.revertGameplayKeybind(e,t),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))}),n.style.display=Re.checkIsDefaultGameplay(e,t)?"none":"block";const a=document.createElement("div");return a.classList.add("pref-keybind-combos"),a.replaceChildren(...Re.getKeysForGameType(e)[t].map(o=>{const l=document.createElement("button");return l.classList.add("pref-keybind-combo"),l.innerText=o,this.conflictMap.get(e).get(o).length>1&&l.classList.add("conflict"),l.onclick=()=>{Re.removeGameplayKeybind(e,t,o),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l})),i.replaceChildren(s,n,a),i}calculateConflicts(){const e=new Map;Object.keys(We.getTypes()).forEach(t=>{const i=new Map;Re.getKeysForGameType(t).forEach((s,n)=>{s.forEach((a,o)=>{i.has(a)||i.set(a,[]),i.get(a).push([t,n,o])})}),e.set(t,i)}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())for(const i of t.values())i.length!=1&&i.forEach(s=>{const n=this.viewElement.querySelector(`.pref-keybind[data-id=${s[0]}-${s[1]}] .pref-keybind-combos`);n?.children[s[2]]&&n.children[s[2]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class hy{static _model;static async getModel(){return this._model||await this._load(),this._model}static async _load(){this._model=[];const e=localStorage.getItem("recentFiles");if(e){try{const t=JSON.parse(e);if(!Array.isArray(t))return;for(const i of t)typeof i!="object"||Array.isArray(i)||typeof i?.name!="string"||typeof i?.path!="string"||this._model.find(s=>s.path==i.path)||this._model.push({name:i.name,path:i.path})}catch{console.log("Failed to load recent file entries");return}await this.saveEntries()}}static async getRecents(){return await this.getModel()}static async addSM(e,t){const i=await this.getModel(),s=i.findIndex(n=>n.path==e);s!=-1&&i.splice(s,1),i.unshift({name:t.properties.TITLE??"Untitled Song",path:e}),this.saveEntries()}static async limitEntries(){(await this.getModel()).splice(15)}static async saveEntries(){this.limitEntries();const e=await Promise.all(this._model.map(async t=>await Ue.hasFile(t.path)));this._model=this._model.filter((t,i)=>e[i]),localStorage.setItem("recentFiles",JSON.stringify(this._model))}}function ti(r){return!!r.simfileTimingData}class cy{_cache={warpedBeats:new Map,beatsToSeconds:new Map};columns={};offset;buildBeatTimingDataCache(){const e=[];let t=this.getTimingData("BPMS","STOPS","WARPS","DELAYS");t=t.concat(this.getTimingData("WARPS").map(n=>({type:"WARP_DEST",beat:n.beat+n.value,value:n.value})));const i=["WARP_DEST","BPMS","STOPS","WARPS","DELAYS"];t.sort((n,a)=>n.beat==a.beat?i.indexOf(n.type)-i.indexOf(a.type):n.beat-a.beat);const s=this.getOffset();e.push({beat:0,secondBefore:-s,secondOf:-s,secondAfter:-s,secondClamp:-s,bpm:this.getTimingData("BPMS")[0]?.value??120,warped:!1});for(const n of t){if(e.at(-1)?.beat!=n.beat){e.at(-1).secondClamp=Math.max(Math.max(e.at(-2)?.secondClamp??-s,e.at(-2)?.secondAfter??-s),e.at(-1).secondBefore);let a=(n.beat-e.at(-1).beat)*60/e.at(-1).bpm;e.at(-1).warped&&(a=0),e.push({beat:n.beat,secondBefore:e.at(-1).secondAfter+a,secondOf:e.at(-1).secondAfter+a,secondAfter:e.at(-1).secondAfter+a,secondClamp:0,bpm:e.at(-1).bpm,warped:e.at(-1).warped})}n.type=="WARPS"&&(e.at(-1).warped=!0),n.type=="WARP_DEST"&&(e.at(-1).warped=!1),n.type=="BPMS"&&(e.at(-1).bpm=n.value),n.type=="STOPS"&&(e.at(-1).secondAfter+=n.value),n.type=="DELAYS"&&(e.at(-1).secondOf+=n.value,e.at(-1).secondAfter+=n.value)}e.at(-1).secondClamp=Math.max(e.at(-2)?.secondClamp??-s,e.at(-1).secondBefore),this._cache.beatTiming=e,this._cache.warpedBeats.clear(),this._cache.beatsToSeconds.clear()}buildEffectiveBeatTimingDataCache(){const e=[...this.getTimingData("SCROLLS")];let t=0;if(e.length==0){this._cache.effectiveBeatTiming=[];return}e[0].beat!=0&&e.unshift({type:"SCROLLS",beat:0,value:e[0].value??1}),t=e[0].beat;for(let i=0;is[t])}mergeColumns(e){if(e.length==0)return[];for(e=e.filter(t=>t.length>0);e.length>1;){const t=[];for(let i=0;i=e.length)return n.concat(t.slice(s))}else if(n.push(t[s]),s++,s>=t.length)return n.concat(e.slice(i))}splitEvents(e){const t=new Map;return e.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type).push(i)}),t}splitEventPairs(e){const t=new Map;return e.forEach(i=>{t.has(i[0].type)||t.set(i[0].type,[]),t.get(i[0].type).push(i)}),t}parse(e,t){if(e=="OFFSET"){this.offset=parseFloat(t);return}e in this.columns||this.createColumn(e),this.parseEvents(e,t)}setOffset(e){const t=this.offset;mt.instance.run({action:()=>{this.offset=e,this.reloadCache(["OFFSET"]),K.emit("timingModified"),K.emit("chartModified")},undo:()=>{this.offset=t,this.reloadCache(["OFFSET"]),K.emit("timingModified"),K.emit("chartModified")}})}serialize(e){this.reloadCache();let t="";this.offset&&(t+="#OFFSET:"+this.offset+`; +}`;this.exportOptions.options.minify&&(e=e.replaceAll(/\s/g,"")),this.outputDiv.innerText=e}getNumIncludes(){return Object.values(this.exportOptions.include).map(e=>+e).reduce((e,t)=>e+t,0)}padNum(e){return this.exportOptions.options.padNumbers?(Math.round(e*1e3)/1e3).toFixed(3):Math.round(e*1e3)/1e3}}const Br={"dance-single":[{label:"Left",keys:["Left","A"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"Right",keys:["Right","D"]}],"dance-double":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-couple":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-solo":[{label:"Left",keys:["Left","A"]},{label:"UpLeft",keys:["Q"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"UpRight",keys:["E"]},{label:"Right",keys:["Right","D"]}],"dance-solodouble":[{label:"P1 Left",keys:["A"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Down",keys:["S"]},{label:"P1 Up",keys:["W"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 Right",keys:["D"]},{label:"P2 Left",keys:["J"]},{label:"P2 UpLeft",keys:["U"]},{label:"P2 Down",keys:["K"]},{label:"P2 Up",keys:["I"]},{label:"P2 UpRight",keys:["O"]},{label:"P2 Right",keys:["L"]}],"dance-threepanel":[{label:"UpLeft",keys:["Left","Q"]},{label:"Down",keys:["Down","S"]},{label:"UpRight",keys:["Right","E"]}],"dance-threedouble":[{label:"P1 UpLeft",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 UpRight",keys:["Right"]},{label:"P2 UpLeft",keys:["Q"]},{label:"P2 Down",keys:["S"]},{label:"P2 UpRight",keys:["E"]}],"pump-single":[{label:"DownLeft",keys:["Z"]},{label:"UpLeft",keys:["Q"]},{label:"Center",keys:["S"]},{label:"UpRight",keys:["E"]},{label:"DownRight",keys:["C"]}],"pump-double":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-versus":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-couple":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-halfdouble":[{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]}]};class Re{static app;static userKeybinds=new Map;static userGameplayKeybinds=new Map;static load(e){this.app=e;try{this.loadKeybinds()}catch(t){console.error("Failed to load user keybinds!"),console.error(t.stack),this.userKeybinds.clear(),this.userGameplayKeybinds.clear()}window.addEventListener("keydown",t=>this.checkKey(t,"keydown")),window.addEventListener("keyup",t=>this.checkKey(t,"keyup"))}static checkKey(e,t){if(e.target.classList.contains("inlineEdit")||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLButtonElement||["Meta","Control","Shift","Alt"].includes(e.key))return;const i=[];for(let a=0;a(o[d]??c.keys).some(h=>s==h));if(l!=-1){if(e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;this.app.chartManager[t=="keydown"?"judgeCol":"judgeColUp"](l);return}}const n=Object.keys(Tt).filter(a=>!["cut","copy","paste","pasteReplace"].includes(a)).filter(a=>{for(const o of this.getCombosForKeybind(a))if(this.compareModifiers(o.mods,i)&&o.key==s)return!0;return!1}).map(a=>Tt[a]);if(n.length>0){if(n.every(a=>a.preventDefault!=!1)&&e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;for(const a of n){let o=a.disabled;if(o instanceof Function&&(o=o(this.app)),!o&&!(a.disableRepeat&&e.repeat)){t=="keydown"?a.callback(this.app):a.callbackKeyUp?.(this.app);return}}}}static getKeyNameFromCode(e){let t=e;return t.startsWith("Digit")&&(t=t.slice(5)),t.startsWith("Key")&&(t=t.slice(3)),t in gf&&(t=gf[t]),t}static getKeybindString(e){return this.getCombosForKeybind(e).map(t=>this.getComboString(t)).join(" / ")}static getComboString(e){const t=Co.filter(i=>e.mods.includes(i)).map(i=>OS[i]).join("");return t+(t!=""?" ":"")+(vy[e.key]??e.key)}static getCombosForKeybind(e){return e in Tt?this.userKeybinds.get(e)??Tt[e].combos:(console.log("Couldn't find keybind with id "+e),[])}static getKeysForGameType(e){const t=ze.getGameType(e);return t?new Array(t.numCols).fill(null).map((i,s)=>this.userGameplayKeybinds.get(e)?.[s]??Br[e]?.[s].keys??[]):(console.log("Couldn't find game type with id "+e),[])}static compareModifiers(e,t){if(e.length!=t.length)return!1;for(const i of Co)if((e.includes(i)?1:0)+(t.includes(i)?1:0)==1)return!1;return!0}static compareCombos(e,t){return e.key==t.key&&this.compareModifiers(e.mods,t.mods)}static loadKeybinds(){const e=localStorage.getItem("keybinds");if(e){const i=JSON.parse(e);if(typeof i!="object")return console.error("Couldn't load keybinds from storage");for(const[s,n]of Object.entries(i)){if(!(s in Tt)){console.warn("Couldn't load keybind "+s+": key doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load keybind "+s+": value is not an array"),this.userKeybinds.set(s,n.filter(a=>typeof a.key!="string"||!Array.isArray(a.mods)?(console.warn("Couldn't load keycombo for keybind "+s+": "+JSON.stringify(a)),!1):!0))}}const t=localStorage.getItem("keybindsGP");if(t){const i=JSON.parse(t);if(typeof i!="object")return console.error("Couldn't load gameplay keybinds from storage");for(const[s,n]of Object.entries(i)){if(!ze.getGameType(s)){console.warn("Couldn't load gameplay keybinds for gameType "+s+": gameType doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load gameplay keybind "+s+": value is not an array"),this.userGameplayKeybinds.set(s,n.map((a,o)=>!Array.isArray(a)&&a!==null?(console.warn("Couldn't load gameplay keys for type "+s+" col "+o+": "+JSON.stringify(a)),null):a))}}}static clearSave(){localStorage.removeItem("keybinds"),localStorage.removeItem("keybindsGP")}static setKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...Tt[e].combos]),this.userKeybinds.get(e)?.push(t),this.checkIsDefault(e),this.saveKeybinds()}static removeKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...Tt[e].combos]),this.userKeybinds.set(e,this.userKeybinds.get(e).filter(i=>!this.compareCombos(i,t))),this.checkIsDefault(e),this.saveKeybinds()}static revertKeybind(e){this.userKeybinds.delete(e),this.saveKeybinds()}static revertGameplayKeybind(e,t){this.userGameplayKeybinds.has(e)&&(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(i=>i===null)&&this.userGameplayKeybinds.delete(e)),this.saveKeybinds()}static setGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(ze.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Br[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t].push(i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static removeGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(ze.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Br[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t]=this.userGameplayKeybinds.get(e)[t].filter(s=>s!=i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static checkIsDefault(e){if(!this.userKeybinds.has(e))return!0;const t=this.userKeybinds.get(e),i=[...Tt[e].combos];return t.length!=i.length?!1:t.map(s=>this.getComboString(s)).sort().join("∆")==i.map(s=>this.getComboString(s)).sort().join("∆")?(this.userKeybinds.delete(e),!0):!1}static checkIsDefaultGameplay(e,t){if(!this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.get(e)[t]===null)return!0;const i=this.userGameplayKeybinds.get(e)[t],s=[...Br[e]?.[t].keys??[]];return i.length!=s.length?!1:i.sort().join("∆")==s.sort().join("∆")?(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(n=>n===null)&&this.userGameplayKeybinds.delete(e),!0):!1}static saveKeybinds(){const e={};for(const[i,s]of this.userKeybinds.entries())e[i]=s;localStorage.setItem("keybinds",JSON.stringify(e));const t={};for(const[i,s]of this.userGameplayKeybinds.entries())t[i]=s;localStorage.setItem("keybindsGP",JSON.stringify(t))}static getKeybindTooltip(e){return this.getCombosForKeybind(e).map(i=>{let s=this.getComboString(i);return s==""?"":(s=s.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"")}).join("")}static evaluateTaggedTooltip(e,t){t=t.map(s=>s.startsWith("\\")?s.slice(1):this.getKeybindTooltip(s));const i=[];for(let s=0;s"+i.join("")+""}static createKeybindTooltip(e){return(t,...i)=>{Pt(e,{allowHTML:!0,onShow:s=>{s.setContent(this.evaluateTaggedTooltip(t,i))}})}}}class ly extends St{app;allowMods;callback;combo={mods:[],key:""};conflictCheck;listener;constructor(e,t,i,s){super({title:"",width:300,height:168,disableClose:!0,win_id:"keyComboSelector",blocking:!0}),this.app=e,this.allowMods=t,this.callback=i,this.conflictCheck=s??(()=>[]),this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding"),e.style.gap="8px";const t=document.createElement("div");t.classList.add("label"),t.innerText="Input a key combo and select Ok when finished.",e.appendChild(t);const i=document.createElement("input");i.type="text",i.disabled=!0,i.style.fontSize="18px",i.style.height="24px",i.style.flex="0",i.style.textAlign="center",e.appendChild(i);const s=document.createElement("div");s.classList.add("detail"),s.innerText="No conflicts",s.style.flex="1",e.appendChild(s);const n=document.createElement("div");n.classList.add("menu-options");const a=document.createElement("button");a.innerText="Ok",a.onclick=()=>{this.callback(this.combo),this.closeWindow()},a.classList.add("confirm"),a.disabled=!0;const o=document.createElement("button");o.innerText="Cancel",o.onclick=()=>{this.closeWindow()},n.append(o),n.append(a),e.appendChild(n),this.viewElement.appendChild(e),this.listener=l=>{if(["Meta","Control","Shift","Alt","Escape"].includes(l.key))return;if(this.combo.key=Re.getKeyNameFromCode(l.code),this.allowMods){const d=[];for(let h=0;h=3?s.innerText=`Conflicts with ${c.length} keybinds`:c.length>=1?s.innerText=`Conflicts with ${c.join(",")}`:s.innerText="No conflicts"),l.preventDefault()},window.addEventListener("keydown",this.listener)}onClose(){window.removeEventListener("keydown",this.listener)}}class uS extends St{app;observer;conflictMap=this.calculateConflicts();constructor(e){super({title:"Gameplay Keybind Options",width:600,height:400,disableClose:!1,win_id:"gameplay_keybind_options",blocking:!1}),this.app=e,this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-scrollers");const s=document.createElement("div");s.classList.add("pref-section-scroller");const n=document.createElement("div");n.classList.add("pref-option-scroller"),i.replaceChildren(s,n),this.observer=new IntersectionObserver(a=>{a.forEach(o=>{const l=o.target.dataset.id,c=s.querySelector(`.pref-section[data-id=${l}]`);c&&(o.intersectionRatio>0?c.classList.add("selected"):c.classList.remove("selected"))})},{}),t.replaceChildren(i),s.replaceChildren(...this.createSections()),n.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(){return Object.keys(ze.getTypes()).map(e=>this.createEmptySection(e))}createOptions(){return Object.keys(ze.getTypes()).map(e=>{const t=new Array(ze.getTypes()[e].numCols).fill(null).map((n,a)=>this.createKeybindItem(e,a)),i=document.createElement("div");i.classList.add("pref-group"),i.dataset.id=e;const s=document.createElement("div");return s.classList.add("pref-group-label"),s.innerText=e,i.replaceChildren(s,...t),this.observer.observe(i),i})}createEmptySection(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e,t.innerText=e,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e}]`).scrollIntoView()},t}createKeybindItem(e,t){const i=document.createElement("div");i.classList.add("pref-keybind"),i.dataset.id=e+"-"+t,i.onclick=o=>{o.target.classList.contains("pref-keybind-combo")||i.querySelector(".icon")?.contains(o.target)||this.app.windowManager.openWindow(new ly(this.app,!1,l=>{Re.setGameplayKeybind(e,t,l.key),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l=>{const c=this.conflictMap.get(e)?.get(l.key)?.map(d=>Br[d[0]]?.[d[1]].label??"Column "+d[1])??[];return c.includes(Br[e]?.[t].label??"Column "+t)?"self":c}))};const s=document.createElement("div");s.classList.add("pref-keybind-label"),s.innerText=Br[e]?.[t].label??"Column "+t;const n=Ae.getIcon("REVERT");n.style.width="12px",n.addEventListener("click",()=>{Re.revertGameplayKeybind(e,t),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))}),n.style.display=Re.checkIsDefaultGameplay(e,t)?"none":"block";const a=document.createElement("div");return a.classList.add("pref-keybind-combos"),a.replaceChildren(...Re.getKeysForGameType(e)[t].map(o=>{const l=document.createElement("button");return l.classList.add("pref-keybind-combo"),l.innerText=o,this.conflictMap.get(e).get(o).length>1&&l.classList.add("conflict"),l.onclick=()=>{Re.removeGameplayKeybind(e,t,o),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l})),i.replaceChildren(s,n,a),i}calculateConflicts(){const e=new Map;Object.keys(ze.getTypes()).forEach(t=>{const i=new Map;Re.getKeysForGameType(t).forEach((s,n)=>{s.forEach((a,o)=>{i.has(a)||i.set(a,[]),i.get(a).push([t,n,o])})}),e.set(t,i)}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())for(const i of t.values())i.length!=1&&i.forEach(s=>{const n=this.viewElement.querySelector(`.pref-keybind[data-id=${s[0]}-${s[1]}] .pref-keybind-combos`);n?.children[s[2]]&&n.children[s[2]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class hy{static _model;static async getModel(){return this._model||await this._load(),this._model}static async _load(){this._model=[];const e=localStorage.getItem("recentFiles");if(e){try{const t=JSON.parse(e);if(!Array.isArray(t))return;for(const i of t)typeof i!="object"||Array.isArray(i)||typeof i?.name!="string"||typeof i?.path!="string"||this._model.find(s=>s.path==i.path)||this._model.push({name:i.name,path:i.path})}catch{console.log("Failed to load recent file entries");return}await this.saveEntries()}}static async getRecents(){return await this.getModel()}static async addSM(e,t){const i=await this.getModel(),s=i.findIndex(n=>n.path==e);s!=-1&&i.splice(s,1),i.unshift({name:t.properties.TITLE??"Untitled Song",path:e}),this.saveEntries()}static async limitEntries(){(await this.getModel()).splice(15)}static async saveEntries(){this.limitEntries();const e=await Promise.all(this._model.map(async t=>await Ue.hasFile(t.path)));this._model=this._model.filter((t,i)=>e[i]),localStorage.setItem("recentFiles",JSON.stringify(this._model))}}function ti(r){return!!r.simfileTimingData}class cy{_cache={warpedBeats:new Map,beatsToSeconds:new Map};columns={};offset;buildBeatTimingDataCache(){const e=[];let t=this.getTimingData("BPMS","STOPS","WARPS","DELAYS");t=t.concat(this.getTimingData("WARPS").map(n=>({type:"WARP_DEST",beat:n.beat+n.value,value:n.value})));const i=["WARP_DEST","BPMS","STOPS","WARPS","DELAYS"];t.sort((n,a)=>n.beat==a.beat?i.indexOf(n.type)-i.indexOf(a.type):n.beat-a.beat);const s=this.getOffset();e.push({beat:0,secondBefore:-s,secondOf:-s,secondAfter:-s,secondClamp:-s,bpm:this.getTimingData("BPMS")[0]?.value??120,warped:!1});for(const n of t){if(e.at(-1)?.beat!=n.beat){e.at(-1).secondClamp=Math.max(Math.max(e.at(-2)?.secondClamp??-s,e.at(-2)?.secondAfter??-s),e.at(-1).secondBefore);let a=(n.beat-e.at(-1).beat)*60/e.at(-1).bpm;e.at(-1).warped&&(a=0),e.push({beat:n.beat,secondBefore:e.at(-1).secondAfter+a,secondOf:e.at(-1).secondAfter+a,secondAfter:e.at(-1).secondAfter+a,secondClamp:0,bpm:e.at(-1).bpm,warped:e.at(-1).warped})}n.type=="WARPS"&&(e.at(-1).warped=!0),n.type=="WARP_DEST"&&(e.at(-1).warped=!1),n.type=="BPMS"&&(e.at(-1).bpm=n.value),n.type=="STOPS"&&(e.at(-1).secondAfter+=n.value),n.type=="DELAYS"&&(e.at(-1).secondOf+=n.value,e.at(-1).secondAfter+=n.value)}e.at(-1).secondClamp=Math.max(e.at(-2)?.secondClamp??-s,e.at(-1).secondBefore),this._cache.beatTiming=e,this._cache.warpedBeats.clear(),this._cache.beatsToSeconds.clear()}buildEffectiveBeatTimingDataCache(){const e=[...this.getTimingData("SCROLLS")];let t=0;if(e.length==0){this._cache.effectiveBeatTiming=[];return}e[0].beat!=0&&e.unshift({type:"SCROLLS",beat:0,value:e[0].value??1}),t=e[0].beat;for(let i=0;is[t])}mergeColumns(e){if(e.length==0)return[];for(e=e.filter(t=>t.length>0);e.length>1;){const t=[];for(let i=0;i=e.length)return n.concat(t.slice(s))}else if(n.push(t[s]),s++,s>=t.length)return n.concat(e.slice(i))}splitEvents(e){const t=new Map;return e.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type).push(i)}),t}splitEventPairs(e){const t=new Map;return e.forEach(i=>{t.has(i[0].type)||t.set(i[0].type,[]),t.get(i[0].type).push(i)}),t}parse(e,t){if(e=="OFFSET"){this.offset=parseFloat(t);return}e in this.columns||this.createColumn(e),this.parseEvents(e,t)}setOffset(e){const t=this.offset;mt.instance.run({action:()=>{this.offset=e,this.reloadCache(["OFFSET"]),q.emit("timingModified"),q.emit("chartModified")},undo:()=>{this.offset=t,this.reloadCache(["OFFSET"]),q.emit("timingModified"),q.emit("chartModified")}})}serialize(e){this.reloadCache();let t="";this.offset&&(t+="#OFFSET:"+this.offset+`; `);let i=["BPMS","STOPS","WARPS","DELAYS","SPEEDS","SCROLLS","TICKCOUNTS","TIMESIGNATURES","LABELS","COMBOS","FAKES","BGCHANGES","FGCHANGES","ATTACKS"];e=="sm"&&(i=["BPMS","STOPS","TIMESIGNATURES","BGCHANGES","FGCHANGES","ATTACKS"]);for(const s of i)s in this.columns&&(t+=this.formatProperty(e,s));return t}formatProperty(e,t){let s="";const n=a=>ae(a,3).toFixed(3);switch(t){case"ATTACKS":{s=this.columns[t].events.map(o=>`TIME=${o.second}:${o.endType}=${o.value}:MODS=${o.mods}`).join(`: `);break}case"BGCHANGES":case"FGCHANGES":{s=this.columns[t].events.map(o=>[o.beat,o.file,n(o.updateRate),Number(o.crossFade),Number(o.stretchRewind),Number(o.stretchNoLoop),o.effect,o.file2,o.transition,o.color1,o.color2].join("=")).join(`, `);break}case"BPMS":case"DELAYS":case"FAKES":case"SCROLLS":case"WARPS":{s=this.columns[t].events.map(o=>[n(o.beat),n(o.value)].join("=")).join(`, @@ -1197,7 +1197,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE `);break}case"TIMESIGNATURES":{s=this.getTimingData(t).map(o=>[n(o.beat),o.upper,o.lower].join("=")).join(`, `);break}}return s.includes(",")&&(s+=` `),"#"+t+":"+s+`; -`}createColumn(e){this.columns[e]={type:e,events:[]}}getTime(e){switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":return e.beat;case"ATTACKS":return e.second}}isNullEvent(e){switch(e.type){case"BPMS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return!1;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":return e.value==0;case"LABELS":return e.value=="";case"BGCHANGES":case"FGCHANGES":return e.file=="";case"ATTACKS":return e.mods==""}}isSimilar(e,t){switch(e.type){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":return e.type==t.type&&e.value==t.value;case"TIMESIGNATURES":return e.type==t.type&&e.upper==t.upper&&e.lower==t.lower;case"COMBOS":return e.type==t.type&&e.hitMult==t.hitMult&&e.missMult==t.missMult;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return!1}}removeOverlapping(e){const t=[];let i=null;for(;e.length>0;)this.getTime(e[0])!=i&&(i=this.getTime(e[0]),t.push(e[0])),e.shift();return t}compareEvents(e,t){const i=s=>!s.some(n=>e[n]!==void 0&&e[n]!==t[n]);switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"TICKCOUNTS":case"FAKES":case"LABELS":return i(["type","beat","value"]);case"SPEEDS":return i(["type","beat","value","unit","delay"]);case"TIMESIGNATURES":return i(["type","beat","upper","lower"]);case"COMBOS":return i(["type","beat","hitMult","missMult"]);case"ATTACKS":return i(["type","second","mods","endType","value"]);case"FGCHANGES":case"BGCHANGES":return i(["type","beat","color1","color2","crossFade","effect","file1","file2","stretchNoLoop","stretchRewind","transition","updateRate"])}}insertEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e],s=[];t=this.removeOverlapping(t);let n=0;for(;t[0]&&i.events[n];){const a=i.events[n],o=[];for(;t[0]&&this.getTime(a)>=this.getTime(t[0]);)o.push(t.shift());if(o.length==0){n++;continue}i.events.splice(n,0,...o),n+=o.length,this.getTime(o.at(-1))==this.getTime(a)?s.push(...i.events.splice(n,1)):n++}return i.events.push(...t),s}deleteEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e];t=this.removeOverlapping(t);const s=[];let n=0,a=0;for(;t[n]&&i.events[a];)this.compareEvents(t[n],i.events[a])?(s.push(...i.events.splice(a,1)),n++):a++;return s}getColumnType(e){switch(e){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return"continuing";case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return"instant"}}findConflictingEvents(e){const t=this.columns[e];if(!t)return[];switch(this.getColumnType(t.type)){case"continuing":{const i=[];let s=0;for(;t.events[s]&&this.isNullEvent(t.events[s]);)i.push(t.events[s]),s++;let n=t.events[s];for(s++;sthis.isNullEvent(i))}}parseEvents(e,t){switch(e){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"FAKES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)/g)).map(i=>({type:e,beat:parseFloat(i[1]),value:parseFloat(i[2])})));return;case"TICKCOUNTS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?\d+)/g)).map(i=>({type:"TICKCOUNTS",beat:parseFloat(i[1]),value:parseInt(i[2])})));return;case"LABELS":this.insertEvents(e,Array.from(t.matchAll(/((-?[\d.]+)=([^\n]+)=\d)|((-?[\d.]+)=([^\n,]+))/g)).map(i=>i[1]===void 0?{type:"LABELS",beat:parseFloat(i[5]),value:i[6].trim()}:{type:"LABELS",beat:parseFloat(i[2]),value:i[3].trim()}));return;case"SPEEDS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)=([\d.]+)=([01])/g)).map(i=>({type:"SPEEDS",beat:parseFloat(i[1]),value:parseFloat(i[2]),delay:parseFloat(i[3]),unit:i[4].trim()=="0"?"B":"T"})));return;case"TIMESIGNATURES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=(\d+)/g)).map(i=>({type:"TIMESIGNATURES",beat:parseFloat(i[1]),upper:parseInt(i[2]),lower:parseInt(i[3])})));return;case"COMBOS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=*(\d+)*/g)).map(i=>({type:"COMBOS",beat:parseFloat(i[1]),hitMult:parseInt(i[2]),missMult:parseInt(i[3]??i[2])})));return;case"ATTACKS":this.insertEvents(e,Array.from(t.matchAll(/TIME=(-?[\d.]+):(END|LEN)=(-?[\d.]+):MODS=([^:]+)/g)).map(i=>({type:"ATTACKS",second:parseFloat(i[1]),endType:i[2].trim(),value:parseFloat(i[3]),mods:i[4].trim()})));return;case"BGCHANGES":case"FGCHANGES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=([^\n]+?)=(-?[\d.]+)=([01])=([01])=([01])=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)/g)).map(i=>({type:e,beat:parseFloat(i[1]),file:i[2].trim(),updateRate:parseFloat(i[3]),crossFade:i[4].trim()=="1",stretchRewind:i[5].trim()=="1",stretchNoLoop:i[6].trim()=="1",effect:i[7].trim()??"",file2:i[8].trim()??"",transition:i[9].trim()??"",color1:i[10].trim()??"",color2:i[11].trim()??""})))}}typeRequiresSSC(e){switch(e){case"BPMS":case"STOPS":case"ATTACKS":case"BGCHANGES":case"FGCHANGES":return!1;case"WARPS":case"DELAYS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":return!!this.columns[e]&&this.columns[e].events.length>0}}getDefaultEvent(e,t){switch(e){case"BPMS":return{type:e,beat:t,value:120,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"STOPS":case"WARPS":case"FAKES":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"DELAYS":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t,"before"),isChartTiming:ti(this)};case"LABELS":return{type:e,beat:t,value:"",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"SPEEDS":return{type:e,beat:t,value:1,delay:0,unit:"B",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"SCROLLS":return{type:e,beat:t,value:1,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"TICKCOUNTS":return{type:e,beat:t,value:4,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"TIMESIGNATURES":return{type:e,beat:t,upper:4,lower:4,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"COMBOS":return{type:e,beat:t,hitMult:1,missMult:1,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"ATTACKS":return{type:e,beat:t,second:this.getSecondsFromBeat(t),endType:"LEN",value:1,mods:"",isChartTiming:ti(this)};case"BGCHANGES":case"FGCHANGES":return{type:e,beat:t,file:"",updateRate:1,crossFade:!1,stretchRewind:!1,stretchNoLoop:!1,effect:"",file2:"",transition:"",color1:"",color2:"",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)}}}getEventAtBeat(e,t,i=!0){const s=this.getColumn(e),n=s.events[Lt(s.events,t,a=>a.beat)];if(!n)switch(this.getColumnType(s.type)){case"continuing":return i?this.getDefaultEvent(s.type,0):void 0;case"instant":return}return n}updateEvents(e){const t=this.columns[e];if(t){switch(e){case"DELAYS":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat,"before"));break;case"ATTACKS":t.events.forEach(i=>i.beat=this.getBeatFromSeconds(i.second));break;case"BPMS":case"STOPS":case"WARPS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat))}t.events.forEach(i=>i.isChartTiming=ti(this))}}_insert(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())i.push(...this.insertEvents(n,a)),s.push(...this.findConflictingEvents(n));return{events:e,insertConflicts:i,errors:s}}_modify(e){const t=this.splitEventPairs(e),i=[],s=[];for(const[n,a]of t.entries())this.deleteEvents(n,a.map(o=>o[0]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0)),i.push(...this.insertEvents(n,a.map(o=>o[1]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0))),s.push(...this.findConflictingEvents(n));return{newEvents:e.map(n=>n[1]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),oldEvents:e.map(n=>n[0]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),insertConflicts:i,errors:s}}_delete(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())s.push(...this.deleteEvents(n,a)),i.push(...this.findConflictingEvents(n));return{removedEvents:s,errors:i}}findEvents(e){const t=this.splitEvents(e),i=[];for(const[s,n]of t.entries()){const a=this.columns[s];if(!a)continue;let o=0,l=0;for(;n[o]&&a.events[l];)this.compareEvents(n[o],a.events[l])?(i.push(a.events[l]),o++):l++}return i}getBeatFromSeconds(e){if(!isFinite(e))return 0;if(this._cache.beatTiming==null&&this.buildBeatTimingDataCache(),e+this.getOffset()<0)return(e+this.getOffset())*this._cache.beatTiming[0].bpm/60;const t=this._cache.beatTiming,i=this.binarySearch(t,"secondClamp",e),s=Math.max(0,e-i.secondAfter);return i.beat+s*i.bpm/60}getSecondsFromBeat(e,t){if(t||="",!isFinite(e))return 0;this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=Math.floor(e*1e3)/1e3;if(e<=0){const c=this._cache.beatTiming[0].bpm;return-this.getOffset()+e*60/c}const s=`${e}-${t}`;if(this._cache.beatsToSeconds.has(s))return this._cache.beatsToSeconds.get(s);const n=this._cache.beatTiming,a=this.binarySearch(n,"beat",i);if(a.beat==i){if(t=="noclamp"||t=="")return this._cache.beatsToSeconds.set(s,a.secondOf),a.secondOf;if(t=="before")return this._cache.beatsToSeconds.set(s,a.secondBefore),a.secondBefore;if(t=="after")return this._cache.beatsToSeconds.set(s,a.secondAfter),a.secondAfter}let l=(e-a.beat)*60/a.bpm;return a.warped&&(l=0),t=="noclamp"?(this._cache.beatsToSeconds.set(s,a.secondAfter+l),a.secondAfter+l):(this._cache.beatsToSeconds.set(s,Math.max(a.secondClamp,a.secondAfter+l)),Math.max(a.secondClamp,a.secondAfter+l))}isBeatWarped(e){if(!isFinite(e))return!1;const t=Math.floor(e*1e3)/1e3;if(this._cache.warpedBeats.has(t))return this._cache.warpedBeats.get(t);this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=this._cache.beatTiming,s=this.binarySearch(i,"beat",t),n=s.beat==t?s.secondClamp:Math.max(s.secondAfter,s.secondClamp);return s.secondOf=s.beat&&te&&i.beat>0)return e;let s=i.effectiveBeat;const n=e-i.beat;return s+=n*i.value,s}getBeatFromEffectiveBeat(e){if(!isFinite(e))return 0;this._cache.effectiveBeatTiming==null&&this.buildEffectiveBeatTimingDataCache();const t=this._cache.effectiveBeatTiming;if(t.length==0)return e;let i=0;for(;t[i+1]&&(t[i].value<=0||t[i+1].effectiveBeat<=e);)i++;let n=(e-t[i].effectiveBeat)/t[i].value;return isFinite(n)||(n=0),t[i].beat+n}getSpeedMult(e,t){if(!isFinite(e)||!isFinite(t))return 0;const i=this.getColumn("SPEEDS").events;if(i.length==0)return 1;const s=this.binarySearchIndex(i,"beat",e),n=i[s];if(n==null)return 1;let a=e-n.beat;n.unit=="T"&&(a=t-n.second);let o=Be(a/n.delay,0,1);n.delay==0&&(o=1);const l=i[s-1]?.value??1;return o*(n.value-l)+l}reloadCache(e=[]){let t=e;(e.length==0||e.filter(i=>["WARPS","STOPS","DELAYS","BPMS","OFFSET"].includes(i)).length>0)&&(this.buildBeatTimingDataCache(),t=[...ur]),(e.length==0||e.includes("SCROLLS"))&&this.buildEffectiveBeatTimingDataCache(),(e.length==0||e.includes("TIMESIGNATURES"))&&this.buildMeasureTimingCache(),t.filter(i=>i!="OFFSET").forEach(i=>this.updateEvents(i)),this._cache.sortedEvents=this.mergeColumns(ur.map(i=>this.getColumn(i).events))}getBeatTiming(){return[...this._cache.beatTiming]}getTimingData(...e){return e.length==0?this._cache.sortedEvents:this.mergeColumns(e.map(t=>this.getColumn(t).events))}requiresSSC(){return ur.some(e=>this.typeRequiresSSC(e))}}class pS extends cy{simfileTimingData;chart;constructor(e,t){super(),this.simfileTimingData=e,this.chart=t}getColumn(e){return this.columns[e]??this.simfileTimingData.getColumn(e)}splitSM(e){const t=[],i=[];for(const s of e)s.isChartTiming?i.push(s):t.push(s);return[t,i]}splitSMPairs(e){const t=[],i=[];for(const s of e)s[0].isChartTiming?i.push(s):t.push(s);return[t,i]}insert(e){let t,i;const s=e.find(o=>o.type=="TIMESIGNATURES"),[n,a]=this.splitSM(e);mt.instance.run({action:o=>{t=this.simfileTimingData._insert(n),this.simfileTimingData._delete(t.errors),i=this._insert(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.events).concat(this.simfileTimingData.findEvents(t.events))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._delete(t.events),this.simfileTimingData._insert(t.insertConflicts),this._insert(i.errors),this._delete(i.events),this._insert(i.insertConflicts),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")}})}modify(e){let t,i;const s=e.find(o=>o[0].type=="TIMESIGNATURES"),[n,a]=this.splitSMPairs(e);mt.instance.run({action:o=>{t=this.simfileTimingData._modify(n),this.simfileTimingData._delete(t.errors),i=this._modify(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.newEvents).concat(this.simfileTimingData.findEvents(t.newEvents))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._delete(t.newEvents),this.simfileTimingData._insert(t.insertConflicts),this.simfileTimingData._insert(t.oldEvents),this._insert(i.errors),this._delete(i.newEvents),this._insert(i.insertConflicts),this._insert(i.oldEvents),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.oldEvents).concat(this.simfileTimingData.findEvents(t.oldEvents))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")}})}delete(e){let t,i;const s=e.find(o=>o.type=="TIMESIGNATURES"),[n,a]=this.splitSM(e);mt.instance.run({action:o=>{t=this.simfileTimingData._delete(n),this.simfileTimingData._delete(t.errors),i=this._delete(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._insert(t.removedEvents),this._insert(i.errors),this._insert(i.removedEvents),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.removedEvents).concat(this.simfileTimingData.findEvents(t.removedEvents))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")}})}getOffset(){return this.offset??this.simfileTimingData.getOffset()}usesChartTiming(){return this.offset!==void 0||Object.values(this.columns).length>0}hasChartOffset(){return this.offset!==void 0}isPropertyChartSpecific(e){return e in this.columns}reloadCache(e=[]){super.reloadCache(e),this.chart.recalculateNotes()}}class fS extends cy{offset=0;chartTimingDatas=[];constructor(){super(),ur.forEach(e=>this.createColumn(e))}createChartTimingData(e){const t=new pS(this,e);return this.chartTimingDatas.push(t),t}getColumn(e){return this.columns[e]}getOffset(){return this.offset}reloadCache(e=[]){super.reloadCache(e),this.chartTimingDatas.forEach(t=>t.reloadCache(e))}insert(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");mt.instance.run({action:s=>{t=this._insert(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.events)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.events),this._insert(t.insertConflicts),this.reloadCache(),s.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")}})}modify(e){let t;const i=e.find(s=>s[0].type=="TIMESIGNATURES");mt.instance.run({action:s=>{t=this._modify(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.newEvents)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.newEvents),this._insert(t.insertConflicts),this._insert(t.oldEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.oldEvents)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")}})}delete(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");mt.instance.run({action:s=>{t=this._delete(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._insert(t.removedEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.removedEvents)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")}})}}const mS=["TITLE","SUBTITLE","ARTIST","TITLETRANSLIT","SUBTITLETRANSLIT","ARTISTTRANSLIT","GENRE","CREDIT","ORIGIN","BACKGROUND","BANNER","MUSIC","CDTITLE","JACKET","DISCIMAGE","CDIMAGE","PREVIEW","LYRICSPATH","SAMPLESTART","SAMPLELENGTH","SELECTABLE"];class dy{charts={};_type;other_properties={};properties={};timingData=new fS;unloadedCharts=[];loaded;constructor(e){this.loaded=new Promise(t=>{const i=e.name.split(".").pop();i=="sm"||i=="ssc"?this._type=i:t(),e.text().then(s=>{s=s.replaceAll(/\/\/.+/g,"");const n=[...s.matchAll(/#([A-Z]+):([^;]*);/g)];let a=!1,o={};const l=[];for(const c of n)c[1]=="NOTEDATA"&&i=="ssc"||a?(a=!0,o[c[1]]=c[2],c[1]=="NOTES"&&(l.push(o),o={},a=!1)):c[1]=="NOTES"?l.push(c[2]):mS.includes(c[1])?this.properties[c[1]]=c[2]:c[1]=="OFFSET"||ur.includes(c[1])?this.timingData.parse(c[1],c[2]):this.other_properties[c[1]]=c[2];this.charts={};for(const c of l){let d;try{d=new Zg(this,c)}catch(h){this.unloadedCharts.push(c),Se.createFormatted(h instanceof Error?h.message:String(h),"warn");continue}this.addChart(d)}this.timingData.reloadCache(),t()})})}addChart(e){this.charts[e.gameType.id]||=[],this.charts[e.gameType.id].push(e),this.charts[e.gameType.id].sort((t,i)=>Ei.indexOf(t.difficulty)==Ei.indexOf(i.difficulty)?t.meter-i.meter:Ei.indexOf(t.difficulty)-Ei.indexOf(i.difficulty))}removeChart(e){if(!this.charts[e.gameType.id])return!1;const t=this.charts[e.gameType.id].indexOf(e);return t==-1?!1:(this.charts[e.gameType.id].splice(t,1),!0)}serialize(e){let t="";e=="sm"?(this.other_properties.NITGVERSION&&(t+=this.formatProperty("NITGVERSION",this.other_properties.NITGVERSION)),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.GENRE),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)):(t+=this.formatProperty("VERSION",this.other_properties.VERSION??.83),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("TITLETRANSLIT",this.properties.TITLETRANSLIT),t+=this.formatProperty("SUBTITLETRANSLIT",this.properties.SUBTITLETRANSLIT),t+=this.formatProperty("ARTISTTRANSLIT",this.properties.ARTISTTRANSLIT),t+=this.formatProperty("GENRE",this.properties.GENRE),t+=this.formatProperty("CREDIT",this.properties.CREDIT),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.BANNER),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("JACKET",this.properties.JACKET),t+=this.formatProperty("DISCIMAGE",this.properties.DISCIMAGE),t+=this.formatProperty("CDIMAGE",this.properties.CDIMAGE),t+=this.formatProperty("SELECTABLE",this.properties.SELECTABLE??"YES"),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)),t+=this.timingData.serialize(e);for(const i in this.other_properties)i=="VERSION"||i=="NITGVERSION"||(t+=this.formatProperty(i,this.other_properties[i]));t+=` +`}createColumn(e){this.columns[e]={type:e,events:[]}}getTime(e){switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":return e.beat;case"ATTACKS":return e.second}}isNullEvent(e){switch(e.type){case"BPMS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return!1;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":return e.value==0;case"LABELS":return e.value=="";case"BGCHANGES":case"FGCHANGES":return e.file=="";case"ATTACKS":return e.mods==""}}isSimilar(e,t){switch(e.type){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":return e.type==t.type&&e.value==t.value;case"TIMESIGNATURES":return e.type==t.type&&e.upper==t.upper&&e.lower==t.lower;case"COMBOS":return e.type==t.type&&e.hitMult==t.hitMult&&e.missMult==t.missMult;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return!1}}removeOverlapping(e){const t=[];let i=null;for(;e.length>0;)this.getTime(e[0])!=i&&(i=this.getTime(e[0]),t.push(e[0])),e.shift();return t}compareEvents(e,t){const i=s=>!s.some(n=>e[n]!==void 0&&e[n]!==t[n]);switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"TICKCOUNTS":case"FAKES":case"LABELS":return i(["type","beat","value"]);case"SPEEDS":return i(["type","beat","value","unit","delay"]);case"TIMESIGNATURES":return i(["type","beat","upper","lower"]);case"COMBOS":return i(["type","beat","hitMult","missMult"]);case"ATTACKS":return i(["type","second","mods","endType","value"]);case"FGCHANGES":case"BGCHANGES":return i(["type","beat","color1","color2","crossFade","effect","file1","file2","stretchNoLoop","stretchRewind","transition","updateRate"])}}insertEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e],s=[];t=this.removeOverlapping(t);let n=0;for(;t[0]&&i.events[n];){const a=i.events[n],o=[];for(;t[0]&&this.getTime(a)>=this.getTime(t[0]);)o.push(t.shift());if(o.length==0){n++;continue}i.events.splice(n,0,...o),n+=o.length,this.getTime(o.at(-1))==this.getTime(a)?s.push(...i.events.splice(n,1)):n++}return i.events.push(...t),s}deleteEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e];t=this.removeOverlapping(t);const s=[];let n=0,a=0;for(;t[n]&&i.events[a];)this.compareEvents(t[n],i.events[a])?(s.push(...i.events.splice(a,1)),n++):a++;return s}getColumnType(e){switch(e){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return"continuing";case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return"instant"}}findConflictingEvents(e){const t=this.columns[e];if(!t)return[];switch(this.getColumnType(t.type)){case"continuing":{const i=[];let s=0;for(;t.events[s]&&this.isNullEvent(t.events[s]);)i.push(t.events[s]),s++;let n=t.events[s];for(s++;sthis.isNullEvent(i))}}parseEvents(e,t){switch(e){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"FAKES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)/g)).map(i=>({type:e,beat:parseFloat(i[1]),value:parseFloat(i[2])})));return;case"TICKCOUNTS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?\d+)/g)).map(i=>({type:"TICKCOUNTS",beat:parseFloat(i[1]),value:parseInt(i[2])})));return;case"LABELS":this.insertEvents(e,Array.from(t.matchAll(/((-?[\d.]+)=([^\n]+)=\d)|((-?[\d.]+)=([^\n,]+))/g)).map(i=>i[1]===void 0?{type:"LABELS",beat:parseFloat(i[5]),value:i[6].trim()}:{type:"LABELS",beat:parseFloat(i[2]),value:i[3].trim()}));return;case"SPEEDS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)=([\d.]+)=([01])/g)).map(i=>({type:"SPEEDS",beat:parseFloat(i[1]),value:parseFloat(i[2]),delay:parseFloat(i[3]),unit:i[4].trim()=="0"?"B":"T"})));return;case"TIMESIGNATURES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=(\d+)/g)).map(i=>({type:"TIMESIGNATURES",beat:parseFloat(i[1]),upper:parseInt(i[2]),lower:parseInt(i[3])})));return;case"COMBOS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=*(\d+)*/g)).map(i=>({type:"COMBOS",beat:parseFloat(i[1]),hitMult:parseInt(i[2]),missMult:parseInt(i[3]??i[2])})));return;case"ATTACKS":this.insertEvents(e,Array.from(t.matchAll(/TIME=(-?[\d.]+):(END|LEN)=(-?[\d.]+):MODS=([^:]+)/g)).map(i=>({type:"ATTACKS",second:parseFloat(i[1]),endType:i[2].trim(),value:parseFloat(i[3]),mods:i[4].trim()})));return;case"BGCHANGES":case"FGCHANGES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=([^\n]+?)=(-?[\d.]+)=([01])=([01])=([01])=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)/g)).map(i=>({type:e,beat:parseFloat(i[1]),file:i[2].trim(),updateRate:parseFloat(i[3]),crossFade:i[4].trim()=="1",stretchRewind:i[5].trim()=="1",stretchNoLoop:i[6].trim()=="1",effect:i[7].trim()??"",file2:i[8].trim()??"",transition:i[9].trim()??"",color1:i[10].trim()??"",color2:i[11].trim()??""})))}}typeRequiresSSC(e){switch(e){case"BPMS":case"STOPS":case"ATTACKS":case"BGCHANGES":case"FGCHANGES":return!1;case"WARPS":case"DELAYS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":return!!this.columns[e]&&this.columns[e].events.length>0}}getDefaultEvent(e,t){switch(e){case"BPMS":return{type:e,beat:t,value:120,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"STOPS":case"WARPS":case"FAKES":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"DELAYS":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t,"before"),isChartTiming:ti(this)};case"LABELS":return{type:e,beat:t,value:"",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"SPEEDS":return{type:e,beat:t,value:1,delay:0,unit:"B",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"SCROLLS":return{type:e,beat:t,value:1,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"TICKCOUNTS":return{type:e,beat:t,value:4,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"TIMESIGNATURES":return{type:e,beat:t,upper:4,lower:4,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"COMBOS":return{type:e,beat:t,hitMult:1,missMult:1,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"ATTACKS":return{type:e,beat:t,second:this.getSecondsFromBeat(t),endType:"LEN",value:1,mods:"",isChartTiming:ti(this)};case"BGCHANGES":case"FGCHANGES":return{type:e,beat:t,file:"",updateRate:1,crossFade:!1,stretchRewind:!1,stretchNoLoop:!1,effect:"",file2:"",transition:"",color1:"",color2:"",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)}}}getEventAtBeat(e,t,i=!0){const s=this.getColumn(e),n=s.events[Lt(s.events,t,a=>a.beat)];if(!n)switch(this.getColumnType(s.type)){case"continuing":return i?this.getDefaultEvent(s.type,0):void 0;case"instant":return}return n}updateEvents(e){const t=this.columns[e];if(t){switch(e){case"DELAYS":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat,"before"));break;case"ATTACKS":t.events.forEach(i=>i.beat=this.getBeatFromSeconds(i.second));break;case"BPMS":case"STOPS":case"WARPS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat))}t.events.forEach(i=>i.isChartTiming=ti(this))}}_insert(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())i.push(...this.insertEvents(n,a)),s.push(...this.findConflictingEvents(n));return{events:e,insertConflicts:i,errors:s}}_modify(e){const t=this.splitEventPairs(e),i=[],s=[];for(const[n,a]of t.entries())this.deleteEvents(n,a.map(o=>o[0]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0)),i.push(...this.insertEvents(n,a.map(o=>o[1]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0))),s.push(...this.findConflictingEvents(n));return{newEvents:e.map(n=>n[1]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),oldEvents:e.map(n=>n[0]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),insertConflicts:i,errors:s}}_delete(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())s.push(...this.deleteEvents(n,a)),i.push(...this.findConflictingEvents(n));return{removedEvents:s,errors:i}}findEvents(e){const t=this.splitEvents(e),i=[];for(const[s,n]of t.entries()){const a=this.columns[s];if(!a)continue;let o=0,l=0;for(;n[o]&&a.events[l];)this.compareEvents(n[o],a.events[l])?(i.push(a.events[l]),o++):l++}return i}getBeatFromSeconds(e){if(!isFinite(e))return 0;if(this._cache.beatTiming==null&&this.buildBeatTimingDataCache(),e+this.getOffset()<0)return(e+this.getOffset())*this._cache.beatTiming[0].bpm/60;const t=this._cache.beatTiming,i=this.binarySearch(t,"secondClamp",e),s=Math.max(0,e-i.secondAfter);return i.beat+s*i.bpm/60}getSecondsFromBeat(e,t){if(t||="",!isFinite(e))return 0;this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=Math.floor(e*1e3)/1e3;if(e<=0){const c=this._cache.beatTiming[0].bpm;return-this.getOffset()+e*60/c}const s=`${e}-${t}`;if(this._cache.beatsToSeconds.has(s))return this._cache.beatsToSeconds.get(s);const n=this._cache.beatTiming,a=this.binarySearch(n,"beat",i);if(a.beat==i){if(t=="noclamp"||t=="")return this._cache.beatsToSeconds.set(s,a.secondOf),a.secondOf;if(t=="before")return this._cache.beatsToSeconds.set(s,a.secondBefore),a.secondBefore;if(t=="after")return this._cache.beatsToSeconds.set(s,a.secondAfter),a.secondAfter}let l=(e-a.beat)*60/a.bpm;return a.warped&&(l=0),t=="noclamp"?(this._cache.beatsToSeconds.set(s,a.secondAfter+l),a.secondAfter+l):(this._cache.beatsToSeconds.set(s,Math.max(a.secondClamp,a.secondAfter+l)),Math.max(a.secondClamp,a.secondAfter+l))}isBeatWarped(e){if(!isFinite(e))return!1;const t=Math.floor(e*1e3)/1e3;if(this._cache.warpedBeats.has(t))return this._cache.warpedBeats.get(t);this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=this._cache.beatTiming,s=this.binarySearch(i,"beat",t),n=s.beat==t?s.secondClamp:Math.max(s.secondAfter,s.secondClamp);return s.secondOf=s.beat&&te&&i.beat>0)return e;let s=i.effectiveBeat;const n=e-i.beat;return s+=n*i.value,s}getBeatFromEffectiveBeat(e){if(!isFinite(e))return 0;this._cache.effectiveBeatTiming==null&&this.buildEffectiveBeatTimingDataCache();const t=this._cache.effectiveBeatTiming;if(t.length==0)return e;let i=0;for(;t[i+1]&&(t[i].value<=0||t[i+1].effectiveBeat<=e);)i++;let n=(e-t[i].effectiveBeat)/t[i].value;return isFinite(n)||(n=0),t[i].beat+n}getSpeedMult(e,t){if(!isFinite(e)||!isFinite(t))return 0;const i=this.getColumn("SPEEDS").events;if(i.length==0)return 1;const s=this.binarySearchIndex(i,"beat",e),n=i[s];if(n==null)return 1;let a=e-n.beat;n.unit=="T"&&(a=t-n.second);let o=Be(a/n.delay,0,1);n.delay==0&&(o=1);const l=i[s-1]?.value??1;return o*(n.value-l)+l}reloadCache(e=[]){let t=e;(e.length==0||e.filter(i=>["WARPS","STOPS","DELAYS","BPMS","OFFSET"].includes(i)).length>0)&&(this.buildBeatTimingDataCache(),t=[...ur]),(e.length==0||e.includes("SCROLLS"))&&this.buildEffectiveBeatTimingDataCache(),(e.length==0||e.includes("TIMESIGNATURES"))&&this.buildMeasureTimingCache(),t.filter(i=>i!="OFFSET").forEach(i=>this.updateEvents(i)),this._cache.sortedEvents=this.mergeColumns(ur.map(i=>this.getColumn(i).events))}getBeatTiming(){return[...this._cache.beatTiming]}getTimingData(...e){return e.length==0?this._cache.sortedEvents:this.mergeColumns(e.map(t=>this.getColumn(t).events))}requiresSSC(){return ur.some(e=>this.typeRequiresSSC(e))}}class pS extends cy{simfileTimingData;chart;constructor(e,t){super(),this.simfileTimingData=e,this.chart=t}getColumn(e){return this.columns[e]??this.simfileTimingData.getColumn(e)}splitSM(e){const t=[],i=[];for(const s of e)s.isChartTiming?i.push(s):t.push(s);return[t,i]}splitSMPairs(e){const t=[],i=[];for(const s of e)s[0].isChartTiming?i.push(s):t.push(s);return[t,i]}insert(e){let t,i;const s=e.find(o=>o.type=="TIMESIGNATURES"),[n,a]=this.splitSM(e);mt.instance.run({action:o=>{t=this.simfileTimingData._insert(n),this.simfileTimingData._delete(t.errors),i=this._insert(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.events).concat(this.simfileTimingData.findEvents(t.events))),q.emit("timingModified"),q.emit("chartModified"),s&&q.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._delete(t.events),this.simfileTimingData._insert(t.insertConflicts),this._insert(i.errors),this._delete(i.events),this._insert(i.insertConflicts),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),q.emit("timingModified"),q.emit("chartModified"),s&&q.emit("timeSigChanged")}})}modify(e){let t,i;const s=e.find(o=>o[0].type=="TIMESIGNATURES"),[n,a]=this.splitSMPairs(e);mt.instance.run({action:o=>{t=this.simfileTimingData._modify(n),this.simfileTimingData._delete(t.errors),i=this._modify(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.newEvents).concat(this.simfileTimingData.findEvents(t.newEvents))),q.emit("timingModified"),q.emit("chartModified"),s&&q.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._delete(t.newEvents),this.simfileTimingData._insert(t.insertConflicts),this.simfileTimingData._insert(t.oldEvents),this._insert(i.errors),this._delete(i.newEvents),this._insert(i.insertConflicts),this._insert(i.oldEvents),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.oldEvents).concat(this.simfileTimingData.findEvents(t.oldEvents))),q.emit("timingModified"),q.emit("chartModified"),s&&q.emit("timeSigChanged")}})}delete(e){let t,i;const s=e.find(o=>o.type=="TIMESIGNATURES"),[n,a]=this.splitSM(e);mt.instance.run({action:o=>{t=this.simfileTimingData._delete(n),this.simfileTimingData._delete(t.errors),i=this._delete(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),q.emit("timingModified"),q.emit("chartModified"),s&&q.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._insert(t.removedEvents),this._insert(i.errors),this._insert(i.removedEvents),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.removedEvents).concat(this.simfileTimingData.findEvents(t.removedEvents))),q.emit("timingModified"),q.emit("chartModified"),s&&q.emit("timeSigChanged")}})}getOffset(){return this.offset??this.simfileTimingData.getOffset()}usesChartTiming(){return this.offset!==void 0||Object.values(this.columns).length>0}hasChartOffset(){return this.offset!==void 0}isPropertyChartSpecific(e){return e in this.columns}reloadCache(e=[]){super.reloadCache(e),this.chart.recalculateNotes()}}class fS extends cy{offset=0;chartTimingDatas=[];constructor(){super(),ur.forEach(e=>this.createColumn(e))}createChartTimingData(e){const t=new pS(this,e);return this.chartTimingDatas.push(t),t}getColumn(e){return this.columns[e]}getOffset(){return this.offset}reloadCache(e=[]){super.reloadCache(e),this.chartTimingDatas.forEach(t=>t.reloadCache(e))}insert(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");mt.instance.run({action:s=>{t=this._insert(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.events)),q.emit("timingModified"),q.emit("chartModified"),i&&q.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.events),this._insert(t.insertConflicts),this.reloadCache(),s.chartManager.clearSelections(),q.emit("timingModified"),q.emit("chartModified"),i&&q.emit("timeSigChanged")}})}modify(e){let t;const i=e.find(s=>s[0].type=="TIMESIGNATURES");mt.instance.run({action:s=>{t=this._modify(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.newEvents)),q.emit("timingModified"),q.emit("chartModified"),i&&q.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.newEvents),this._insert(t.insertConflicts),this._insert(t.oldEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.oldEvents)),q.emit("timingModified"),q.emit("chartModified"),i&&q.emit("timeSigChanged")}})}delete(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");mt.instance.run({action:s=>{t=this._delete(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),q.emit("timingModified"),q.emit("chartModified"),i&&q.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._insert(t.removedEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.removedEvents)),q.emit("timingModified"),q.emit("chartModified"),i&&q.emit("timeSigChanged")}})}}const mS=["TITLE","SUBTITLE","ARTIST","TITLETRANSLIT","SUBTITLETRANSLIT","ARTISTTRANSLIT","GENRE","CREDIT","ORIGIN","BACKGROUND","BANNER","MUSIC","CDTITLE","JACKET","DISCIMAGE","CDIMAGE","PREVIEW","LYRICSPATH","SAMPLESTART","SAMPLELENGTH","SELECTABLE"];class dy{charts={};_type;other_properties={};properties={};timingData=new fS;unloadedCharts=[];loaded;constructor(e){this.loaded=new Promise(t=>{const i=e.name.split(".").pop();i=="sm"||i=="ssc"?this._type=i:t(),e.text().then(s=>{s=s.replaceAll(/\/\/.+/g,"");const n=[...s.matchAll(/#([A-Z]+):([^;]*);/g)];let a=!1,o={};const l=[];for(const c of n)c[1]=="NOTEDATA"&&i=="ssc"||a?(a=!0,o[c[1]]=c[2],c[1]=="NOTES"&&(l.push(o),o={},a=!1)):c[1]=="NOTES"?l.push(c[2]):mS.includes(c[1])?this.properties[c[1]]=c[2]:c[1]=="OFFSET"||ur.includes(c[1])?this.timingData.parse(c[1],c[2]):this.other_properties[c[1]]=c[2];this.charts={};for(const c of l){let d;try{d=new Zg(this,c)}catch(h){this.unloadedCharts.push(c),Se.createFormatted(h instanceof Error?h.message:String(h),"warn");continue}this.addChart(d)}this.timingData.reloadCache(),t()})})}addChart(e){this.charts[e.gameType.id]||=[],this.charts[e.gameType.id].push(e),this.charts[e.gameType.id].sort((t,i)=>Ei.indexOf(t.difficulty)==Ei.indexOf(i.difficulty)?t.meter-i.meter:Ei.indexOf(t.difficulty)-Ei.indexOf(i.difficulty))}removeChart(e){if(!this.charts[e.gameType.id])return!1;const t=this.charts[e.gameType.id].indexOf(e);return t==-1?!1:(this.charts[e.gameType.id].splice(t,1),!0)}serialize(e){let t="";e=="sm"?(this.other_properties.NITGVERSION&&(t+=this.formatProperty("NITGVERSION",this.other_properties.NITGVERSION)),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.GENRE),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)):(t+=this.formatProperty("VERSION",this.other_properties.VERSION??.83),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("TITLETRANSLIT",this.properties.TITLETRANSLIT),t+=this.formatProperty("SUBTITLETRANSLIT",this.properties.SUBTITLETRANSLIT),t+=this.formatProperty("ARTISTTRANSLIT",this.properties.ARTISTTRANSLIT),t+=this.formatProperty("GENRE",this.properties.GENRE),t+=this.formatProperty("CREDIT",this.properties.CREDIT),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.BANNER),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("JACKET",this.properties.JACKET),t+=this.formatProperty("DISCIMAGE",this.properties.DISCIMAGE),t+=this.formatProperty("CDIMAGE",this.properties.CDIMAGE),t+=this.formatProperty("SELECTABLE",this.properties.SELECTABLE??"YES"),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)),t+=this.timingData.serialize(e);for(const i in this.other_properties)i=="VERSION"||i=="NITGVERSION"||(t+=this.formatProperty(i,this.other_properties[i]));t+=` `;for(const i in this.charts)for(const s of this.charts[i])t+=s.serialize(e)+` `;for(const i of this.unloadedCharts)if(typeof i=="string")t+="#NOTES:"+i+` `;else{t+="//---------------"+i.STEPSTYPE+" - "+i.DESCRIPTION+`--------------- @@ -1238,16 +1238,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE #FGCHANGES:; #KEYSOUNDS:; #ATTACKS:; -`;class ot{view;input;onChange;min=-Number.MAX_VALUE;max=Number.MAX_VALUE;precision;step=1;lastVal="";constructor(e,t,i,s,n,a){this.view=e,this.view.classList.add("spinner"),this.view.onfocus=()=>{o.focus()};const o=document.createElement("input");o.classList.add("spinner-input"),o.type="text",o.autocomplete="off",o.spellcheck=!1,o.onblur=()=>{if(o.value===this.lastVal)return;if(o.value===""){this.onChange?.(void 0);return}const h=ua(o.value);if(h===null){o.value=this.lastVal;return}let u=ae(h,this.precision??3);u=Be(u,this.min,this.max),o.value=this.formatValue(u),this.onChange?.(u)},o.onkeydown=h=>{h.key=="Enter"&&o.blur(),h.key=="Escape"&&(o.value=this.lastVal,o.blur())},o.onfocus=()=>{this.lastVal=o.value},this.input=o,this.min=n??this.min,this.max=a??this.max,this.step=i,this.precision=s,this.setValue(t),e.appendChild(o);const l=document.createElement("div");l.classList.add("spinner-btns"),e.appendChild(l);const c=document.createElement("button");c.classList.add("spinner-up"),c.appendChild(Ae.getIcon("CHEVRON",10)),c.tabIndex=-1,c.onclick=h=>{let u=i??_.general.spinnerStep;h.getModifierState("Shift")&&(u/=10),!(a!==void 0&&parseFloat(o.value)+u>a)&&(o.value=this.formatValue(parseFloat(o.value)+u),this.onChange?.(parseFloat(o.value)))},l.appendChild(c);const d=document.createElement("button");d.classList.add("spinner-down"),d.appendChild(Ae.getIcon("CHEVRON",10)),d.tabIndex=-1,d.onclick=h=>{let u=i??_.general.spinnerStep;h.getModifierState("Shift")&&(u/=10),!(n!==void 0&&parseFloat(o.value)-ur.chartManager.loadAudio()}},{title:"Background Image",propName:"BACKGROUND",input:{type:"file",typeName:"image",accept:ns}},{title:"Banner Image",propName:"BANNER",input:{type:"file",typeName:"image",accept:ns}},{title:"CD Title",propName:"CDTITLE",input:{type:"file",typeName:"image",accept:ns}},{title:"CD Image",propName:"CDIMAGE",input:{type:"file",typeName:"image",accept:ns}},{title:"Jacket",propName:"JACKET",input:{type:"file",typeName:"image",accept:ns}},{title:"Disc Image",propName:"DISCIMAGE",input:{type:"file",typeName:"image",accept:ns}}]},{title:"Song",items:[{title:"Song Preview",propName:"SAMPLESTART",input:{type:"custom",create:(r,e,t)=>{const i=t??mt.instance,s=()=>{a.value{(e??p.chartManager.loadedSM).properties.SAMPLESTART=h,(e??p.chartManager.loadedSM).properties.SAMPLELENGTH=u,n.setValue(parseFloat(h)),a.setValue(parseFloat(h)+parseFloat(u))},undo:()=>{(e??r.chartManager.loadedSM).properties.SAMPLESTART=c,(e??r.chartManager.loadedSM).properties.SAMPLELENGTH=d,n.setValue(parseFloat(c)),a.setValue(parseFloat(c)+parseFloat(d))}})},n=ot.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"),void 0,3,0);n.onChange=c=>{if(c===void 0){n.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"));return}s()};const a=ot.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"),void 0,3,0);a.onChange=c=>{if(c===void 0){a.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"));return}s()};const o=document.createElement("div"),l=document.createElement("div");return l.innerText="to",o.classList.add("flex-row","flex-column-gap"),o.replaceChildren(n.view,l,a.view),o}}}]}];function py(r,e,t,i){const s=i??mt.instance;switch(e.input.type){case"custom":return e.input.create(r,t,i);case"string":{const n=document.createElement("input");return n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{const a=(t??r.chartManager.loadedSM).properties[e.propName],o=n.value;s.run({action:l=>{(t??l.chartManager.loadedSM).properties[e.propName]=o,n.value=o},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=a,n.value=a??""}})},n.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",n}case"number":{const n=e.input,a=ot.create(parseFloat((t??r.chartManager.loadedSM).properties[e.propName])??15,n.step,n.precision,n.min,n.max);return a.onChange=o=>{if(o===void 0){a.setValue(parseFloat((t??r.chartManager.loadedSM).properties[e.propName]??"0"));return}const l=(t??r.chartManager.loadedSM).properties[e.propName],c=o.toString();s.run({action:d=>{(t??d.chartManager.loadedSM).properties[e.propName]=c,a.setValue(parseFloat(c))},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=l,a.setValue(parseFloat(l??"0"))}})},a.view}case"file":{const n=e.input,a=e.input.onChange,o=document.createElement("div");o.classList.add("flex-row","flex-column-gap");const l=document.createElement("input");l.type="text",l.autocomplete="off",l.spellcheck=!1,l.placeholder="click to select a file",l.onclick=h=>{h.preventDefault(),l.blur();const u=Ot(r.chartManager.smPath);if(window.nw){const p=document.createElement("input");p.type="file",p.accept=n.accept.join(","),p.onchange=()=>{const f=Ue.getRelativePath(u,p.value),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=f,l.value=f},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)},p.click()}else r.windowManager.openWindow(new kd(r,{title:`Select a${n.typeName.match(/^[aieouAIEOU].*/)?"n":""} ${n.typeName} file...`,accepted_file_types:n.accept,disableClose:!0,callback:p=>{const f=Ue.getRelativePath(u,p),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=f,l.value=f},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)}},(t??r.chartManager.loadedSM).properties[e.propName]?u+"/"+(t??r.chartManager.loadedSM).properties[e.propName]:r.chartManager.smPath))},l.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",o.appendChild(l);const c=document.createElement("button");c.style.height="100%",c.classList.add("delete"),c.disabled=!(t??r.chartManager.loadedSM).properties[e.propName],c.onclick=()=>{l.value="",c.disabled=!0};const d=Ae.getIcon("TRASH",12);return c.appendChild(d),o.appendChild(c),o}}}class fy extends St{app;sm;actionHistory;fileTable={};constructor(e){super({title:"New Song",width:450,height:492,disableClose:!0,win_id:"sm_properties",blocking:!0});const t=new Blob([gS],{type:"text/plain"}),i=new File([t],"song.sm",{type:"text/plain"});this.sm=new dy(i),this.app=e,this.actionHistory=new mt(this.app),this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",uy.forEach(l=>{const c=document.createElement("div");c.classList.add("sm-container");const d=document.createElement("div");d.classList.add("sm-title"),d.innerText=l.title;const h=document.createElement("div");h.classList.add("property-grid"),l.items.forEach(u=>{const p=document.createElement("div");p.classList.add("label"),p.innerText=u.title,h.appendChild(p),u.input.type=="file"?h.appendChild(this.createFileElement(u.propName,u.input.typeName)):h.appendChild(py(this.app,u,this.sm,this.actionHistory))}),c.appendChild(d),c.appendChild(h),e.appendChild(c)});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow()};const o=document.createElement("button");o.innerText="Create",o.classList.add("confirm"),o.onclick=()=>{this.sm.properties.MUSIC===void 0||this.sm.properties.MUSIC===""?this.app.windowManager.openWindow(new Tl(this.app,"No audio file uploaded","Are you sure you want to create a file with no audio?",[{type:"confirm",label:"Yes",callback:()=>{this.createSong(),this.closeWindow()}},{type:"default",label:"No"}])):(this.createSong(),this.closeWindow())},s.appendChild(a),n.appendChild(o),e.appendChild(i),this.viewElement.appendChild(e)}async createSong(){let e=this.sm.properties.TITLE;if(window.nw){const t=nw.require("path"),i=document.createElement("input");i.type="file",i.nwsaveas=e+".sm",i.onchange=async()=>{const s=t.basename(i.value,t.extname(i.value));e=t.dirname(i.value);const n=t.join(e,s+".sm");await Ue.writeFile(n,this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(a=>Ue.writeFile(e+`/${a[0]}`,a[1]))),await this.app.chartManager.loadSM(n),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()},i.click()}else{if(await Ue.getDirectoryHandle(e)){let t=2;for(;await Ue.getDirectoryHandle(e);)e=`${this.sm.properties.TITLE} ${t++}`}await Ue.writeFile(e+"/song.sm",this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(t=>Ue.writeFile(e+`/${t[0]}`,t[1]))),await this.app.chartManager.loadSM(e+"/song.sm"),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()}}createFileElement(e,t){const i=document.createElement("div");i.classList.add("flex-row","flex-column-gap");const s=document.createElement("input");s.type="text",s.autocomplete="off",s.spellcheck=!1,s.placeholder="click to upload a file",s.style.color="white",s.readOnly=!0,s.onclick=o=>{o.preventDefault(),s.blur();const l=document.createElement("input");l.type="file",l.accept=t=="audio"?"audio/*":"image/*",l.onchange=()=>{const c=l.files?.[0];if(!c)return;this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]];let d=c.name;for(;this.fileTable[c.name]&&(this.fileTable[c.name].size!=c.size||this.fileTable[c.name].type!=c.type);)d="_"+d;this.fileTable[d]=c,s.value=d,this.sm.properties[e]=s.value,n.disabled=!1},l.click()},s.value=this.sm.properties[e]??"",i.appendChild(s);const n=document.createElement("button");n.style.height="100%",n.classList.add("delete"),n.disabled=!0,n.onclick=()=>{this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]],this.sm.properties[e]=void 0,s.value="",n.disabled=!0};const a=Ae.getIcon("TRASH",12);return n.appendChild(a),i.appendChild(n),i}}class my extends St{app;keyHandler;constructor(e,t=!0){super({title:"Open a Song",width:400,height:320,disableClose:t,win_id:"select_sm_initial"}),this.app=e,this.keyHandler=this.handleKeyEvent.bind(this),window.addEventListener("keydown",this.keyHandler),this.initView(),K.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}onClose(){window.removeEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("open-container"),e.appendChild(t);const i=document.createElement("div");i.classList.add("top-container");const s=document.createElement("div");s.classList.add("separator"),s.style.margin="10px";const n=document.createElement("div");n.classList.add("bottom-container"),t.appendChild(i),t.appendChild(s),t.appendChild(n);const a=document.createElement("button");a.style.display="flex",a.style.flexDirection="column",a.style.padding="10px",a.style.backgroundColor="#414352",a.style.color="white",i.appendChild(a);const o=Ae.getIcon("UPLOAD",30);a.appendChild(o);const l=document.createElement("div");l.innerText=window.nw?"Open an existing song":"Import a song folder",a.appendChild(l),a.onclick=()=>{if(window.nw){const f=document.createElement("input");f.type="file",f.accept=".sm,.ssc",f.onchange=()=>{this.app.chartManager.loadSM(f.value),this.closeWindow()},f.click()}else this.app.windowManager.openWindow(new kd(this.app,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:f=>{this.app.chartManager.loadSM(f),this.closeWindow()}}))};const c=document.createElement("button");c.style.display="flex",c.style.flexDirection="column",c.style.padding="10px",c.style.backgroundColor="#506352",c.style.color="white",i.appendChild(c);const d=Ae.getIcon("PLUS",30);c.appendChild(d);const h=document.createElement("div");h.innerText="New Song",c.appendChild(h),c.onclick=()=>{this.app.windowManager.openWindow(new fy(this.app))};const u=document.createElement("div");u.innerText="Recently Opened",u.classList.add("title"),n.appendChild(u);const p=document.createElement("div");p.classList.add("recent-selector"),n.appendChild(p),hy.getRecents().then(f=>f.forEach(m=>{const g=document.createElement("div");g.classList.add("recent-item");const y=document.createElement("div");y.classList.add("recent-name"),y.innerText=m.name;const w=document.createElement("div");w.classList.add("recent-path"),w.innerText=m.path,g.appendChild(y),g.appendChild(w),g.onclick=()=>{p.querySelectorAll(".selected").forEach(b=>b.classList.remove("selected")),g.classList.add("selected")},g.ondblclick=()=>{this.app.chartManager.loadSM(m.path),this.closeWindow()},p.appendChild(g)})),this.viewElement.appendChild(e)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".selected");if(t){if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.previousElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),ra(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.nextElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),ra(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}}}}function tM(){const r=new URLSearchParams(location.search),e=r.get("flags");if(e!=null){const n=new Set(e.split("").map(a=>vS[a]).filter(a=>a));for(const a of n.values())Ie[a]=!Ie[a]}const t=r.get("url");if(t!=null)try{Ie.url=new URL(t).toString()}catch{Se.createFormatted("Invalid url "+t,"warn"),Ie.url=null}const i=r.get("chartIndex");if(i!=null)try{Ie.chartIndex=parseInt(i)}catch{Se.createFormatted("Invalid chartIndex "+i,"warn"),Ie.chartIndex=null}const s=r.get("chartType");s!==null&&(We.getGameType(s)?Ie.chartType=s:(Se.createFormatted("Invalid chartType "+s,"warn"),Ie.chartType=null))}const yS={viewMode:{char:"V",name:"Force view mode (disables record mode)"},menuBar:{char:"M",name:"Hide menu bar"},playbackOptions:{char:"o",name:"Hide playback options"},barlines:{char:"B",name:"Hide barlines, waveform, and timing boxes"},assist:{char:"A",name:"Disable assist sounds"},recordMode:{char:"R",name:"Disable record mode"},playMode:{char:"P",name:"Disable play mode"},layout:{char:"L",name:"Hide note layout"},status:{char:"S",name:"Hide status bar"},autoPlay:{char:"a",name:"Play automatically"},openWindows:{char:"O",name:"Disable opening windows"},hidePoweredByText:{char:"H",name:'Hide "Powered by SMEditor" text'}},vS=Object.fromEntries(Object.entries(yS).map(([r,e])=>[e.char,r])),Ie={viewMode:!1,menuBar:!0,playbackOptions:!0,barlines:!0,assist:!0,recordMode:!0,playMode:!0,layout:!0,status:!0,autoPlay:!1,hidePoweredByText:!1,openWindows:!0,url:null,chartIndex:null,chartType:null},$n={file:{type:"menu",title:"File",options:[{type:"selection",id:"newSong"},{type:"selection",id:"openSong"},{type:"separator"},{type:"selection",id:"save"},{type:"selection",id:"export"}]},edit:{type:"menu",title:"Edit",options:[{type:"selection",id:"cut"},{type:"selection",id:"copy"},{type:"selection",id:"paste"},{type:"selection",id:"pasteReplace"},{type:"separator"},{type:"selection",id:"undo"},{type:"selection",id:"redo"},{type:"separator"},{type:"checkbox",id:"mousePlacement",checked:()=>_.chart.mousePlacement}]},view:{type:"menu",title:"View",options:[{type:"dropdown",title:"Cursor",options:[{type:"selection",id:"cursorUp"},{type:"selection",id:"cursorDown"},{type:"separator"},{type:"selection",id:"previousNote"},{type:"selection",id:"nextNote"},{type:"separator"},{type:"selection",id:"previousMeasure"},{type:"selection",id:"nextMeasure"},{type:"separator"},{type:"selection",id:"jumpChartStart"},{type:"selection",id:"jumpChartEnd"},{type:"separator"},{type:"selection",id:"jumpSongStart"},{type:"selection",id:"jumpSongEnd"}]},{type:"dropdown",title:"Snap",options:[{type:"selection",id:"decreaseSnap"},{type:"selection",id:"increaseSnap"}]},{type:"dropdown",title:"Scroll",options:[{type:"checkbox",id:"XMod",checked:()=>!_.chart.CMod},{type:"checkbox",id:"CMod",checked:()=>_.chart.CMod},{type:"separator"},{type:"selection",id:"increaseScrollSpeed"},{type:"selection",id:"decreaseScrollSpeed"}]},{type:"dropdown",title:"Zoom",options:[{type:"selection",id:"zoomIn"},{type:"selection",id:"zoomOut"},{type:"separator"},{type:"selection",id:"zoomDefault"}]},{type:"separator"},{type:"selection",id:"playMode"},{type:"selection",id:"playModeStart"},{type:"separator"},{type:"selection",id:"recordMode"},{type:"selection",id:"recordModeStart"},{type:"separator"},{type:"checkbox",id:"reverse",checked:()=>_.chart.reverse},{type:"checkbox",id:"hideWarpedArrows",checked:()=>_.chart.hideWarpedArrows},{type:"checkbox",id:"hideFakedArrows",checked:()=>_.chart.hideFakedArrows},{type:"checkbox",id:"doSpeedChanges",checked:()=>_.chart.doSpeedChanges}]},chart:{type:"menu",title:"Chart",options:[{type:"selection",id:"openChart"},{type:"separator"},{type:"selection",id:"previousChart"},{type:"selection",id:"nextChart"},{type:"separator"},{type:"selection",id:"songProperties"},{type:"separator"},{type:"selection",id:"timingDataRow"}]},selection:{type:"menu",title:"Selection",options:[{type:"dropdown",title:"Convert",options:[{type:"selection",id:"convertHoldsRolls"},{type:"selection",id:"convertRollsHolds"},{type:"selection",id:"swapHoldsRolls"},{type:"separator"},{type:"selection",id:"convertHoldsTaps"},{type:"selection",id:"convertTapsMines"},{type:"selection",id:"convertTapsLifts"},{type:"selection",id:"convertTapsFakes"}]},{type:"dropdown",title:"Mirror",options:[{type:"selection",id:"mirrorHorizontally"},{type:"selection",id:"mirrorVertically"},{type:"selection",id:"mirrorBoth"}]},{type:"dropdown",title:"Stretch",options:[{type:"selection",id:"expand2to1"},{type:"selection",id:"expand3to2"},{type:"selection",id:"expand4to3"},{type:"separator"},{type:"selection",id:"compress1to2"},{type:"selection",id:"compress2to3"},{type:"selection",id:"compress3to4"}]},{type:"dropdown",title:"Quantize",options:[{type:"selection",id:"quantize4th"},{type:"selection",id:"quantize8th"},{type:"selection",id:"quantize12th"},{type:"selection",id:"quantize16th"},{type:"selection",id:"quantize24th"},{type:"selection",id:"quantize32nd"},{type:"selection",id:"quantize48th"},{type:"selection",id:"quantize96th"}]},{type:"separator"},{type:"selection",id:"setSongPreview"},{type:"separator"},{type:"selection",id:"exportNotedata"},{type:"separator"},{type:"selection",id:"selectBeforeCursor"},{type:"selection",id:"selectAfterCursor"},{type:"selection",id:"selectAll"}]},audio:{type:"menu",title:"Audio",options:[{type:"selection",id:"detectSync"},{type:"separator"},{type:"checkbox",id:"assistTick",checked:()=>_.audio.assistTick&&Ie.assist},{type:"checkbox",id:"metronome",checked:()=>_.audio.metronome&&Ie.assist},{type:"separator"},{type:"dropdown",title:()=>"Master Volume ("+Math.round(_.audio.masterVolume*100)+"%)",options:[{type:"selection",id:"volumeUp"},{type:"selection",id:"volumeDown"}]},{type:"dropdown",title:()=>"Song Volume ("+Math.round(_.audio.songVolume*100)+"%)",options:[{type:"selection",id:"songVolumeUp"},{type:"selection",id:"songVolumeDown"}]},{type:"dropdown",title:()=>"Effect Volume ("+Math.round(_.audio.soundEffectVolume*100)+"%)",options:[{type:"selection",id:"effectvolumeUp"},{type:"selection",id:"effectvolumeDown"}]},{type:"dropdown",title:()=>"Playback rate ("+Math.round(_.audio.rate*100)+"%)",options:[{type:"selection",id:"rateUp"},{type:"selection",id:"rateDown"},{type:"separator"},{type:"selection",id:"rateDefault"}]},{type:"separator"},{type:"selection",id:"showEq"}]},preferences:{type:"menu",title:"Preferences",options:[{type:"selection",id:"options"},{type:"selection",id:"themes"},{type:"selection",id:"keybinds"},{type:"selection",id:"gameplayKeybinds"},{type:"selection",id:"noteskinWindow"}]},help:{type:"menu",title:"Help",options:[{type:"selection",id:"openGuide"}]}},lf=["cut","copy","paste","pasteReplace"],hf={edit:[{ids:["delete"],after:"redo"},{ids:["previousNoteType","nextNoteType","noteTypeTap","noteTypeMine","noteTypeFake","noteTypeLift","quant4","quant8","quant12","quant16","quant24","quant32","quant48","quant96","quant192"],after:"mousePlacement"}],view:[{ids:["playback","selectRegion"]}],debug:[{ids:["showFPSCounter","showDebugTimers"]}]};class Ui extends St{static GROUPS;app;observer;searchDropdown;conflictMap=this.calculateConflicts();constructor(e){super({title:"Keybind Options",width:600,height:400,disableClose:!1,win_id:"keybind_options",blocking:!1}),this.app=e,Ui.GROUPS||(Ui.GROUPS=Ui.createGroups()),this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for a keybind...",s.oninput=()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))};const n=gi.create(["Name","Key"],"Name");n.onChange(()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))}),this.searchDropdown=n,i.replaceChildren(s,n.view);const a=document.createElement("div");a.classList.add("pref-scrollers");const o=document.createElement("div");o.classList.add("pref-section-scroller");const l=document.createElement("div");l.classList.add("pref-option-scroller"),a.replaceChildren(o,l),this.observer=new IntersectionObserver(c=>{c.forEach(d=>{const h=d.target.dataset.id,u=o.querySelector(`.pref-section[data-id=${h}]`);u&&(d.intersectionRatio>0?u.classList.add("selected"):u.classList.remove("selected"))})},{}),t.replaceChildren(i,a),o.replaceChildren(...this.createSections()),l.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(e=""){return Object.keys(Ui.GROUPS).filter(t=>Ui.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>this.createEmptySection($n[t]?.title??Nc(t),t))}createOptions(e=""){return Object.keys(Ui.GROUPS).filter(t=>Ui.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>{const i=Ui.GROUPS[t].filter(a=>this.filterID(e,a)).map(a=>this.createKeybindItem(a)),s=document.createElement("div");s.classList.add("pref-group"),s.dataset.id=t;const n=document.createElement("div");return n.classList.add("pref-group-label"),n.innerText=$n[t]?.title??Nc(t),s.replaceChildren(n,...i),this.observer.observe(s),s})}static createGroups(){const e=Object.keys(Tt),t={};return Object.keys($n).forEach(i=>{t[i]=this.expandMenubarOptions($n[i]).map(s=>{const n=e.indexOf(s);return n!=-1&&e.splice(n,1),s}).filter(s=>!lf.includes(s))}),Object.keys(hf).forEach(i=>{t[i]===void 0&&(t[i]=[]),hf[i].forEach(s=>{const n=s.after?t[i].findIndex(a=>s.after==a)+1:0;t[i].splice(n,0,...s.ids),s.ids.forEach(a=>{const o=e.indexOf(a);o!=-1&&e.splice(o,1)})})}),lf.forEach(i=>{const s=e.indexOf(i);s!=-1&&e.splice(s,1)}),e.length>0&&(console.warn("Missing keybinds not shown:"),console.warn(e)),t}filterID(e,t){if((this.searchDropdown?.value??"Name")=="Name")return(Tt[t].bindLabel??Tt[t].label).toLowerCase().includes(e.toLowerCase());{const i=Re.getCombosForKeybind(t);if(i.some(n=>n.key.toLowerCase().includes(e.toLowerCase()))||i.some(n=>(vy[n.key]??n.key).toLowerCase().includes(e.toLowerCase())))return!0;let s=e.split(" ").map(n=>n.toLowerCase());return i.some(n=>(s.includes("shift")||s.includes("⇧"))&&!n.mods.includes(Yn.SHIFT)||(s.includes("ctrl")||s.includes("control")||s.includes("⌃"))&&!n.mods.includes(Yn.CTRL)||(s.includes("meta")||s.includes("cmd")||s.includes("command")||s.includes("⌘"))&&!n.mods.includes(Yn.META)||(s.includes("alt")||s.includes("⌥"))&&!n.mods.includes(Yn.ALT)?!1:(s=s.filter(a=>!["shift","ctrl","control","meta","cmd","command","alt","⇧","⌃","⌘","⌥",""].includes(a)),s.length==0||s.length==1&&n.key.toLowerCase().includes(s[0])))}}static expandMenubarOptions(e){switch(e.type){case"menu":case"dropdown":return e.options.map(t=>this.expandMenubarOptions(t)).flat();case"selection":case"checkbox":return[e.id];case"separator":return[]}}createEmptySection(e,t){const i=document.createElement("div");return i.classList.add("pref-section"),i.dataset.id=t,i.innerText=e,i.onclick=()=>{i.parentElement.parentElement.querySelector(`.pref-group[data-id=${t}]`).scrollIntoView()},i}createKeybindItem(e){const t=document.createElement("div");t.classList.add("pref-keybind"),t.dataset.id=e,t.onclick=a=>{a.target.classList.contains("pref-keybind-combo")||t.querySelector(".icon")?.contains(a.target)||this.app.windowManager.openWindow(new ly(this.app,!0,o=>{Re.setKeybind(e,o),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o=>{const l=this.conflictMap.get(Re.getComboString(o))?.map(c=>c[0]).map(c=>Tt[c].bindLabel??Tt[c].label)??[];return l.includes(e)?"self":l}))};const i=document.createElement("div");i.classList.add("pref-keybind-label"),i.innerText=Tt[e].bindLabel??Tt[e].label;const s=Ae.getIcon("REVERT");s.style.width="12px",s.addEventListener("click",()=>{Re.revertKeybind(e),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))}),s.style.display=Re.checkIsDefault(e)?"none":"block";const n=document.createElement("div");return n.classList.add("pref-keybind-combos"),n.replaceChildren(...Re.getCombosForKeybind(e).map(a=>{const o=document.createElement("button");return o.classList.add("pref-keybind-combo"),o.innerText=Re.getComboString(a),this.conflictMap.get(Re.getComboString(a)).length>1&&o.classList.add("conflict"),o.onclick=()=>{Re.removeKeybind(e,a),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o})),t.replaceChildren(i,s,n),t}calculateConflicts(){const e=new Map;Object.keys(Tt).forEach(t=>{Re.getCombosForKeybind(t).forEach((i,s)=>{const n=Re.getComboString(i);e.has(n)||e.set(n,[]),e.get(n).push([t,s])})}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())t.length!=1&&t.forEach(i=>{const s=this.viewElement.querySelector(`.pref-keybind[data-id=${i[0]}] .pref-keybind-combos`);s?.children[i[1]]&&s.children[i[1]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class nt{static noteskins=new Map;static register(e){for(const t of new Set(e.gameTypes))nt.noteskins.has(t)||nt.noteskins.set(t,new Map),nt.noteskins.get(t).set(e.id,e)}static async getNoteskin(e,t){const i=this.noteskins.get(e.id);if(!i||i.size==0)return;const s=i.get(t)??[...i.values()][0];return i.get(t)||Se.createFormatted(`Couldn't find the noteskin ${t}!`,"warn"),await s.load()}static getNoteskinData(e,t){const i=this.noteskins.get(e.id);return!i||i.size==0?void 0:i.get(t)??[...i.values()][0]}static getNoteskins(){return this.noteskins}static getPreviewUrl(e,t){return this.getNoteskinData(e,t).preview}}nt.register({id:"default",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-64efdd72.js"),["Noteskin-64efdd72.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-17ffcc02.png",self.location).href,title:"Scalable",subtitle:"Pete-Lawrence"});nt.register({id:"cf-chrome",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-76755dcc.js"),["Noteskin-76755dcc.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-40b76b28.png",self.location).href,title:"CF_CHROME",subtitle:"Pete-Lawrence"});nt.register({id:"ddr-note",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-2e3fb130.js"),["Noteskin-2e3fb130.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-b8f75a15.png",self.location).href,title:"DDR-Note",subtitle:"Pete-Lawrence"});nt.register({id:"ddr-note-itg",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-42298fb1.js"),["Noteskin-42298fb1.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-f113aacc.png",self.location).href,title:"DDR-Note (ITG quants)",subtitle:"Pete-Lawrence"});nt.register({id:"ddr-rainbow",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-f717025c.js"),["Noteskin-f717025c.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-0f9b00cd.png",self.location).href,title:"DDR-Rainbow",subtitle:"LemmaEOF"});nt.register({id:"ddr-rainbow-itg",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-da5b9f1d.js"),["Noteskin-da5b9f1d.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-2fd7d50c.png",self.location).href,title:"DDR-Rainbow (ITG quants)",subtitle:"LemmaEOF"});nt.register({id:"metal",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-c09b95ff.js"),["Noteskin-c09b95ff.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-26b1bdce.png",self.location).href,title:"Metal",subtitle:"Pete-Lawrence"});nt.register({id:"pastel",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-ff479165.js"),["Noteskin-ff479165.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-d67630f1.png",self.location).href,title:"Pastel",subtitle:"halcyoniix"});nt.register({id:"dividebyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-d1f8b157.js"),["Noteskin-d1f8b157.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-d763e667.png",self.location).href,title:"DivideByZero",subtitle:"MinaciousGrace"});nt.register({id:"subtractbyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-38a763d9.js"),["Noteskin-38a763d9.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-72ea0444.png",self.location).href,title:"SubtractByZero",subtitle:"qwertyzoro/Vague"});nt.register({id:"sm4",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-73e877f6.js"),["Noteskin-73e877f6.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-3514cbb3.png",self.location).href,title:"SM4",subtitle:"from SM4"});nt.register({id:"sm4-bold",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-5725b491.js"),["Noteskin-5725b491.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-9fe2bd96.png",self.location).href,title:"SM4 Bold",subtitle:"from SM4"});nt.register({id:"starlight-vivid",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-092cf15a.js"),["Noteskin-092cf15a.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-5ecfc22a.png",self.location).href,title:"SLNEXXT-vivid",subtitle:"from STARLiGHT-NEXXT"});nt.register({id:"default",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-803fa9d7.js"),["Noteskin-803fa9d7.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-d6d59d37.png",self.location).href,title:"Fiesta"});nt.register({id:"fourv2",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-42c53605.js"),["Noteskin-42c53605.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-5d9781d2.png",self.location).href,title:"FourV2",subtitle:"Jousway"});nt.register({id:"prime",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-6e682e6f.js"),["Noteskin-6e682e6f.js","AnimatedSprite-b2d4070f.js","HoldBody-c167b8e7.js"])).default,preview:new URL("/smeditor/assets/preview-4f79831b.png",self.location).href,title:"Prime"});const bS="/smeditor/assets/preview-747db171.png";class wS extends St{app;grid;lastGameType=null;constructor(e){super({title:"Noteskin Selection",width:600,height:400,disableClose:!1,win_id:"noteskin-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid(),K.on("chartLoaded",()=>{const t=e.chartManager.loadedChart.gameType.id;this.lastGameType!=t&&this.loadGrid()})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("input");t.classList.add("pref-search-bar"),t.type="text",t.placeholder="Search for a noteskin...",t.oninput=()=>{this.filterGrid(t.value)};const i=document.createElement("div");i.classList.add("noteskin-grid"),this.grid=i,e.replaceChildren(t,i),this.viewElement.appendChild(e)}loadGrid(){if(this.grid.replaceChildren(),!this.app.chartManager.loadedChart)return;const e=this.app.chartManager.loadedChart.gameType;this.lastGameType=e.id;const t=nt.getNoteskins().get(e.id);if(t)for(const[i,s]of t.entries()){const n=document.createElement("div"),a=document.createElement("img"),o=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div");n.classList.add("noteskin-cell"),o.classList.add("noteskin-label"),l.classList.add("noteskin-title"),c.classList.add("noteskin-subtitle"),l.innerText=s.title??i,c.innerText=s.subtitle??"",a.src=nt.getPreviewUrl(e,i),a.onerror=()=>{a.src=bS},n.replaceChildren(a,o),o.replaceChildren(l,c),this.grid.appendChild(n),i==_.chart.noteskin.name&&(n.classList.add("selected"),setTimeout(()=>{n.scrollIntoView({behavior:_.general.smoothAnimations?"smooth":"instant",block:"center"})})),n.dataset.id=i,n.dataset.title=s.title??"",n.dataset.subtitle=s.subtitle??"",n.onclick=()=>{_.chart.noteskin.name!=i&&(this.app.chartManager.chartView?.swapNoteskin(i),this.removeAllSelections(),n.classList.add("selected"))}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id)||this.containsQuery(e,i.dataset.title)||this.containsQuery(e,i.dataset.subtitle);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}}class _S extends St{app;metronomeInterval;startTime;me_high=new fs.Howl({src:Ng,volume:_.audio.soundEffectVolume});me_low=new fs.Howl({src:Ug,volume:_.audio.soundEffectVolume});tickLines=[];resultLines=[];previousOffsets=[];keyHandler;constructor(e){super({title:"Offset Adjuster",width:300,height:200,win_id:"offset",blocking:!0}),this.app=e,this.initView(),this.startTime=performance.now();let t=this.startTime+500;this.tickLines.push({time:t+500,beat:0}),this.tickLines.push({time:t+500*2,beat:1}),this.tickLines.push({time:t+500*3,beat:2}),this.tickLines.push({time:t+500*4,beat:3});let i=0;this.metronomeInterval=setInterval(()=>{const s=performance.now();if(s-t>500){for(t=s,(i%4==0?this.me_high:this.me_low).play();this.tickLines[0]?.time+1e3s-n.startTime<8e3)},5),this.keyHandler=s=>{if(s.code.startsWith("Digit")||s.code.startsWith("Key")||s.code=="Space"){let n=this.tickLines[0];const a=performance.now();for(const l of this.tickLines)if(a-l.time+_.play.offset*1e3<300){n=l;break}s.preventDefault();const o=a-n.time+_.play.offset*1e3;o>-300&&(this.tickLines.splice(this.tickLines.indexOf(n),1),this.resultLines.push({startTime:performance.now(),offset:o}),this.previousOffsets.push(o),this.previousOffsets.length==16&&(Xg(this.previousOffsets)<70&&(_.play.offset-=xl(this.previousOffsets)/1e3),this.previousOffsets=[]))}},window.addEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("canvas");this.viewElement.appendChild(e);const t=this.drawEQ(e);requestAnimationFrame(t)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=250,t.canvas.height=100;const i=()=>{t.fillStyle="rgba(0, 0, 0, 1)",t.fillRect(0,0,e.width,e.height),t.fillStyle="rgb(255, 255, 255)",t.fillRect(e.width/2-1,8,2,e.height-16);const s=performance.now();for(const n of this.resultLines){t.fillStyle="rgba(255, 255, 255, 1)";const a=Math.min(1,4-(s-n.startTime)/2e3);if(n.offset<0&&(t.fillStyle=`rgba(160, ${Ht(160,0,-n.offset/250)}, ${Ht(160,0,-n.offset/250)}, ${a})`),n.offset>0&&(t.fillStyle=`rgba(${Ht(160,0,n.offset/250)}, ${Ht(160,0,n.offset/250)}, 160, ${a})`),t.fillRect(e.width/2-.5+n.offset/4,12,1,e.height-24),s-n.startTime<250){const o=(s-n.startTime)/250;t.globalAlpha=1-o,t.fillRect(e.width/2-.5-o*3+n.offset/4,12-o*10,1+o*6,e.height-24+o*20)}t.globalAlpha=1}for(const n of this.tickLines){const a=n.time-s-_.play.offset*1e3;t.fillStyle="rgba(255, 255, 255, 0.8)",n.beat%4!=0?t.fillRect(e.width/2-1-a/4,12,2,e.height-24):t.fillRect(e.width/2-2-a/4,12,4,e.height-24)}e.closest("#windows")&&requestAnimationFrame(i)};return i}onClose(){clearInterval(this.metronomeInterval),window.removeEventListener("keydown",this.keyHandler)}}class xS extends St{app;changeHandler=()=>this.initView();constructor(e){super({title:"Song Properties",width:450,height:486,disableClose:!1,win_id:"sm_properties",blocking:!1}),this.app=e,this.initView(),K.on("smLoaded",this.changeHandler),K.on("undo",this.changeHandler),K.on("redo",this.changeHandler)}onClose(){K.off("smLoaded",this.changeHandler),K.off("undo",this.changeHandler),K.off("redo",this.changeHandler)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",uy.forEach(i=>{const s=document.createElement("div");s.classList.add("sm-container");const n=document.createElement("div");n.classList.add("sm-title"),n.innerText=i.title;const a=document.createElement("div");a.classList.add("property-grid"),i.items.forEach(o=>{const l=document.createElement("div");l.classList.add("label"),l.innerText=o.title,a.appendChild(l),a.appendChild(py(this.app,o))}),s.appendChild(n),s.appendChild(a),e.appendChild(s)}),this.viewElement.appendChild(e)}}var TS=CS,el=8192,Pd=65536,Bd=new ArrayBuffer(Pd*4),ES=new Float64Array(Bd,Pd,el),AS=new Float64Array(Bd,Pd*2,el/2),SS=MS({Math,Float64Array},null,Bd);function CS(r){if(!r)throw Error("Input data is not provided, pass an array.");var e=r.length;if(e>el)throw Error("Input length is too big, must be under "+el);var t=Math.floor(Math.log(e)/Math.LN2);if(Math.pow(2,t)!==e)throw Error("Invalid array size, must be a power of 2.");return ES.set(r),SS(e,t),AS.subarray(0,e/2)}function MS(r,e,t){var i=6.283185307179586,s=r.Math.sqrt,n=r.Math.sin,a=r.Math.cos,o=r.Math.abs,l=r.Math.SQRT1_2,c=r.Math.imul,d=new r.Float64Array(t),h=new r.Float64Array(t),u=8192,p=16384;function f(g,y){g=g|0,y=y|0;var w=0,b=0,v=0,E=0,C=0,I=0,L=0,k=0,N=0,G=0,A=0,S=0,x=0,D=0,$=0,R=0,O=0,W=0,V=0,F=0,U=0,te=0,Q=0,Z=0,ye=0,Ce=0,ce=0,fe=0,we=0,le=0,pe=0,be=0;for(w=g>>>1,v=2/+(g|0),m(g),le=0,be=4;(le|0)<(g|0);be=c(be,4)){for(pe=le;(pe|0)<(g|0);pe=pe+be|0)F=h[pe<<3>>3]-h[pe+1<<3>>3],h[pe<<3>>3]=h[pe<<3>>3]+h[pe+1<<3>>3],h[pe+1<<3>>3]=F;le=c(2,be-1)}for(E=2,L=g>>>1;L=L>>>1;){le=0,E=E<<1,be=E<<1,C=E>>>2,I=E>>>3;do{if((C|0)!=1)for(pe=le;(pe|0)<(g|0);pe=pe+be|0)S=pe,x=S+C|0,D=x+C|0,$=D+C|0,k=h[D<<3>>3]+h[$<<3>>3],h[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|0))}}for(;w=w-1|0;)ce=+h[w<<3>>3],fe=+h[g-w-1<<3>>3],we=v*s(ce*ce+fe*fe),d[p+w<<3>>3]=we;d[p+0<<3>>3]=o(v*h[0])}function m(g){g=g|0;var y=0,w=0,b=1,v=0,E=0;y=g>>>1,w=g-1|0,h[0]=d[u+0<<3>>3];do{for(v=v+y|0,h[b<<3>>3]=d[u+v<<3>>3],h[v<<3>>3]=d[u+b<<3>>3],b=b+1|0,E=y<<1;E=E>>1,((v=v^E)&E)==0;);(v|0)>=(b|0)&&(h[b<<3>>3]=d[u+v<<3>>3],h[v<<3>>3]=d[u+b<<3>>3],h[w-b<<3>>3]=d[u+w-v<<3>>3],h[w-v<<3>>3]=d[u+w-b<<3>>3]),b=b+1|0}while((b|0)<(y|0));h[w<<3>>3]=d[u+w<<3>>3]}return f}const cf=ya(TS);class us{view;slider;text;options;constructor(e,t){this.view=e,this.options=t,this.view.classList.add("slider");const i=document.createElement("input");i.classList.add("slider-input"),i.type="range",i.min=t.min.toString(),i.max=t.max.toString(),i.step=t.step.toString(),i.value=(t.value??(t.min+t.max)/2).toString(),i.oninput=()=>{s.innerText=this.formatValue(parseFloat(i.value))+"",this.options.onChange?.(parseFloat(i.value))},t.width!==void 0&&(i.style.width=t.width+"px"),this.slider=i,e.appendChild(i);const s=document.createElement("div");s.innerText=this.formatValue(parseFloat(i.value))+"",s.style.width="30px",this.text=s,e.appendChild(s)}get value(){return parseFloat(this.slider.value)}setValue(e){this.slider.value=e+"",this.text.innerText=this.formatValue(parseFloat(this.slider.value))+""}static create(e){return new us(document.createElement("div"),e)}formatValue(e){return this.options.transformer?this.options.transformer(e):this.options.precision===void 0?ae(e,3).toString():ae(e,this.options.precision).toFixed(this.options.precision)}}const ii=800,qe=200,Ah=3,Dn=125,On=250,uo=3,kS=.02,Fs=6,Sh=800,df=15,qt=32768,Ch=[{frequency:20,weight:.4006009013520281},{frequency:25,weight:.4258037044922291},{frequency:31.5,weight:.4536690484291709},{frequency:40,weight:.4840856831659204},{frequency:50,weight:.5142710208279764},{frequency:63,weight:.5473453749315819},{frequency:80,weight:.5841121495327103},{frequency:100,weight:.6214074879602299},{frequency:125,weight:.6601749463607856},{frequency:160,weight:.7054673721340388},{frequency:200,weight:.7489234225800412},{frequency:250,weight:.7936507936507937},{frequency:315,weight:.8406893652795292},{frequency:400,weight:.889284126278346},{frequency:500,weight:.9291521486643438},{frequency:630,weight:.9675858732462506},{frequency:800,weight:.9985022466300548},{frequency:1e3,weight:.9997500624843789},{frequency:1250,weight:.9564801530368244},{frequency:1600,weight:.9409550693954364},{frequency:2e3,weight:1.0196278358399185},{frequency:2500,weight:1.0955902492467817},{frequency:3150,weight:1.1232799775344005},{frequency:4e3,weight:1.0914051841746248},{frequency:5e3,weight:.9997500624843789},{frequency:6300,weight:.8727907484180668},{frequency:8e3,weight:.7722007722007722},{frequency:1e4,weight:.7369196757553427},{frequency:12500,weight:.7768498737618955},{frequency:16e3,weight:.7698229407236336},{frequency:2e4,weight:.4311738708634257},{frequency:22550,weight:.2},{frequency:25e3,weight:0}];class gy extends St{app;onAudioLoad=this.reset.bind(this);windowStep=512;fftSize=1024;tempoFftSize=4096;tempoStep=2;monoAudioData;audioLength=0;sampleRate=44100;tempogram=[];tempogramGroups=[];spectrogram=[];spectrogramDifference=[];noveltyCurve=[];noveltyCurveIsolated=[];spectrogramCanvases=[];lowestFinishedBlock=0;numRenderedBlocks=0;peaks=[];_threshold=.3;spectroHeights=[];spectroWeights=[];placeNotesSelectionButton;toggleButton;resetButton;onsetResults;offsetTableLabel;offsetRows=[];bpmRows=[];covers=[];doAnalysis=!1;lastSecond=0;constructor(e){super({title:"Detect Audio Sync",width:400,height:450,win_id:"detect-sync"}),this.app=e,this.initView(),this.reset(),K.on("audioLoaded",this.onAudioLoad)}onClose(){K.off("audioLoaded",this.onAudioLoad),this.app.chartManager.chartAudio.offLoad(this.onAudioLoad)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("sync-container"),e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center";const t=document.createElement("canvas");t.style.width=`${ii/2}px`,t.style.height=`${qe}px`;const i=document.createElement("div");i.classList.add("sync-tab-container");const s=document.createElement("div");s.classList.add("sync-tab-option","active"),s.innerText="Analysis Options";const n=document.createElement("div");n.classList.add("sync-tab-option"),n.innerText="Tempo Results";const a=document.createElement("div");a.classList.add("sync-tab-option"),a.innerText="Onset Results",i.replaceChildren(s,n,a),[...i.children].forEach((m,g)=>{m.onclick=()=>{l.scrollLeft=370*g,i.querySelectorAll(".active").forEach(y=>y.classList.remove("active")),m.classList.add("active")}});const o=document.createElement("div");o.classList.add("sync-tab-view");const l=document.createElement("div");l.classList.add("sync-tab-scroller");const c=this.createOptionsView(),d=this.createTempoView(),h=this.createOnsetsView(),u=(m,g)=>{const y=document.createElement("div");return y.classList.add("sync-cover"),y.innerText=m,y.style.left=`${g*370}px`,y};this.covers=[u("Clear analysis results to edit",0),u("Start analysis to view",1),u("Start analysis to view",2)],o.appendChild(l),l.replaceChildren(c,this.covers[0],d,this.covers[1],h,this.covers[2]);const p=document.createElement("div");p.classList.add("sync-bottom-container"),this.resetButton=document.createElement("button"),this.resetButton.classList.add("delete"),this.resetButton.innerText="Clear results",this.resetButton.style.width="120px",this.resetButton.disabled=!0,this.resetButton.onclick=()=>{this.resetButton.disabled=!0,s.click(),this.reset()},this.toggleButton=document.createElement("button"),this.toggleButton.innerText="Start analyzing",this.toggleButton.style.width="200px",this.toggleButton.onclick=()=>{this.doAnalysis||n.click(),this.doAnalysis=!this.doAnalysis,this.toggleButton.innerText=this.doAnalysis?"Stop analyzing":this.hasData()?"Resume analyzing":"Start analyzing",this.resetButton.disabled=this.doAnalysis},p.replaceChildren(this.toggleButton,this.resetButton),e.replaceChildren(t,i,o,p),this.viewElement.appendChild(e);const f=this.windowLoop(t);requestAnimationFrame(f)}createOptionsView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.flexDirection="column",e.style.gap="3px",e.style.height="100%";const t=(c,d,h)=>{const u=document.createElement("div");u.style.display="flex",u.style.flexDirection="row",u.style.justifyContent="space-between",u.style.alignItems="center";const p=document.createElement("div");return p.innerText=c,u.replaceChildren(p,d),Pt(u,{content:h}),u},i=document.createElement("div");i.innerText="Onsets",i.style.fontWeight="600";const s=us.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.fftSize),transformer:c=>2**c,onChange:c=>{this.fftSize=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(c)),this.reset()}}),n=us.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.windowStep),transformer:c=>2**c,onChange:c=>{this.windowStep=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(Math.log2(this.fftSize))),this.reset()}}),a=document.createElement("div");a.innerText="Tempo",a.style.fontWeight="600",a.style.marginTop="15px";const o=us.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.tempoFftSize),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(c)),this.reset()}}),l=us.create({min:Math.log2(1),max:Math.log2(1024),step:1,value:Math.log2(this.tempoStep),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(Math.log2(this.tempoFftSize))),this.reset()}});return e.replaceChildren(i,t("FFT Size",s.view,"Determines the amount of audio to analyze at every block. Higher values result in more accurate frequencies, while lower values result in more accurate timings. Defaults to 1024."),t("Window Step",n.view,"Determines the number of blocks per second. Lower values result in more time-accurate spectrograms, but may take more time and mess up tempo analysis. Defaults to 512 and must be lower than FFT Size."),a,t("FFT Size",o.view,"Determines the amount of the onset graph to analyze at every block. Higher values result in more accurate tempos, while lower values result in more accurate timings. Defaults to 4096."),t("Window Step",l.view,"Determines the number of blocks per second. Lower values result in more time-accurate tempograms, but may take more time. Defaults to 2 and must be lower than FFT Size.")),e}createTempoView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.gap="10px";const t=document.createElement("div");t.style.flex="1";const i=document.createElement("div");i.classList.add("sync-table-label"),i.innerText="Offsets",this.offsetTableLabel=i;const s=document.createElement("table");s.classList.add("sync-table");const n=document.createElement("tr"),a=document.createElement("th");a.innerText="Offset";const o=document.createElement("th");o.innerText="Confidence",n.replaceChildren(a,o),s.appendChild(n),t.replaceChildren(i,s);const l=document.createElement("div");l.style.flex="1";const c=document.createElement("div");c.classList.add("sync-table-label"),c.innerText="Current Tempos";const d=document.createElement("table");d.classList.add("sync-table");const h=document.createElement("tr"),u=document.createElement("th");u.innerText="BPM";const p=document.createElement("th");p.innerText="Confidence",h.replaceChildren(u,p),d.appendChild(h);for(let f=0;f<5;f++){const m=document.createElement("tr"),g=document.createElement("td");g.innerText="-";const y=document.createElement("td");y.innerText="-",m.replaceChildren(g,y),s.appendChild(m),this.offsetRows.push(m);const w=m.cloneNode(!0);d.appendChild(w),this.bpmRows.push(w)}return l.replaceChildren(c,d),e.replaceChildren(t,l),e}createOnsetsView(){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.justifyContent="center",e.style.alignItems="center",e.style.position="relative";const t=document.createElement("div");t.style.display="flex",t.style.justifyContent="space-between",t.style.alignItems="center",t.style.width="100%",Pt(t,{content:"Adjust the threshold for a block to be considered an onset (red line)."});const i=document.createElement("div");i.innerText="Onset Threshold";const s=us.create({min:0,max:1,step:.01,value:.3,onChange:c=>{this.threshold=c}}),n=document.createElement("div");n.style.color="#888888",n.style.fontStyle="italic",n.style.fontSize="11px",n.style.marginBottom="15px",n.style.marginTop="-6px",n.innerText="Found 0 onsets",this.onsetResults=n,t.replaceChildren(i,s.view);const a=document.createElement("div");a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.width="100%";const o=document.createElement("button");o.innerText="Place onsets as notes",o.onclick=()=>this.placeOnsets();const l=document.createElement("button");return l.innerText="Place onsets as notes in selection",l.disabled=!0,l.onclick=()=>this.placeOnsets(!0),this.placeNotesSelectionButton=l,a.replaceChildren(o,l),e.replaceChildren(t,n,a),e}async reset(){this._threshold=.3,this.doAnalysis=!1,this.toggleButton.disabled=!1,this.toggleButton.style.background="",this.toggleButton.innerText="Start analyzing",this.app.chartManager.chartAudio.onLoad(this.onAudioLoad),await this.getMonoAudioData(),this.sampleRate=this.app.chartManager.chartAudio.getSampleRate(),this.spectroHeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=(i+1)/(this.fftSize/2)*this.sampleRate/2,a=qe-Be(Math.log(s/20)/Math.log(this.sampleRate/40)*qe,0,qe),o=qe-Be(Math.log(n/20)/Math.log(this.sampleRate/40)*qe,0,qe);return{y:o,height:a-o}}),this.spectroWeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=Ch.findIndex(l=>l.frequency>s);if(n<1)return 0;const a=Ch[n-1],o=Ch[n];return Ht(a.weight,o.weight,Nt(Math.log(1+a.frequency),Math.log(1+o.frequency),Math.log(1+s)))});const e=Math.max(1,Math.ceil(this.audioLength/this.windowStep));this.spectrogramCanvases=[];for(let t=0;t{t.firstChild.innerText="-",t.lastChild.innerText="-"}),this.bpmRows.forEach(t=>{t.firstChild.innerText="-",t.lastChild.innerText="-"})}hasData(){return this.numRenderedBlocks>0}windowLoop(e){const t=e.getContext("2d");t.canvas.width=ii,t.canvas.height=qe*2,t.imageSmoothingEnabled=!1;const i=()=>{if(this.placeNotesSelectionButton.disabled=this.app.chartManager.startRegion===void 0||this.app.chartManager.endRegion===void 0||this.app.chartManager.startRegion==this.app.chartManager.endRegion,this.covers[0].classList.toggle("active",this.hasData()),this.covers[1].classList.toggle("active",!this.hasData()),this.covers[2].classList.toggle("active",!this.hasData()),!this.app.chartManager.chartAudio)return;const s=Math.ceil(this.audioLength/this.windowStep);if(this.monoAudioData!==void 0&&this.doAnalysis){const h=performance.now();for(;performance.now()-h=s){this.tempogram.length==0&&(this.toggleButton.disabled=!0,this.calcTempogram());break}this.spectrogram[this.lowestFinishedBlock]===void 0&&(this.renderBlock(this.lowestFinishedBlock),this.calcDifference(this.lowestFinishedBlock),this.calcIsolatedNovelty(this.lowestFinishedBlock),this.numRenderedBlocks++),this.lowestFinishedBlock++}this.lowestFinishedBlockw.centeru.center-Fs);y!==void 0&&(p+=y.groups[0].value,f+=y.avg,m++)}p/=m,f/=m,h.push({bpm:f,weight:u.groups[0].value,smoothedWeight:p})}h.sort((u,p)=>p.smoothedWeight-u.smoothedWeight);for(const u of h)u.weight<.01||(t.font=`${18+u.weight*300}px Assistant`,t.globalAlpha=Math.min(1,u.weight*100),t.fillText(ae(u.bpm,0)+"",200,Ht(qe*2,qe*1.5,Nt(Dn,On,u.bpm))));if(this.lastSecond!=this.app.chartManager.getTime()){this.lastSecond=this.app.chartManager.getTime();const u=h.slice(0,5).reduce((p,f)=>p+f.smoothedWeight,0);for(let p=0;p<5;p++){const f=this.bpmRows[p],m=h[p]?.bpm,g=h[p]?.weight;f.firstChild.innerText=m===void 0?"-":Math.round(m).toString(),f.lastChild.innerText=g===void 0?"-":Math.round(g/u*100)+"%"}}}t.globalAlpha=1,t.font="22px Assistant",t.textAlign="left",t.textBaseline="top",t.fillText("Spectrogram",10,10),t.fillText("Onsets",10,qe+10),t.fillText("Tempogram",10,qe*1.5+10),e.closest("#windows")&&requestAnimationFrame(i)};return i}renderBlock(e){if(!this.monoAudioData)return;const t=new Float32Array(this.fftSize);t.set(this.monoAudioData.subarray(Math.max(0,e*this.windowStep-this.fftSize/2),e*this.windowStep+this.fftSize/2),-Math.min(0,e*this.windowStep-this.fftSize/2));for(let s=0;s{const a=this.spectroHeights[n],o=Be(s*2e3,0,255);i.globalAlpha=o/255,i.fillRect(e%qt,a.y,1,a.height)}),i.globalAlpha=1}storeDifferenceResponse(e,t){this.spectrogramDifference[e]=t;const i=t.reduce((s,n)=>s+n,0);this.noveltyCurve[e]=i}calcIsolatedNovelty(e){for(let t=e-Ah;t<=e;t++){if(t<0)continue;let i=0,s=0;for(let n=t-Ah;n<=t+Ah;n++)this.noveltyCurve[n]!==void 0&&(i+=this.noveltyCurve[n],s++);i/=s,this.storeIsolatedNovelty(t,Math.max(0,this.noveltyCurve[t]-i))}}storeIsolatedNovelty(e,t){this.noveltyCurveIsolated[e]=Math.log(1+t),Math.log(1+t)>this._threshold&&Math.log(1+t)>(this.noveltyCurveIsolated[e-1]??0)?(this.peaks[e-1]&&(this.peaks[e-1]=!1),this.peaks[e]=!0,this.onsetResults.innerText=`Found ${this.peaks.filter(n=>n).length} onsets`):this.peaks[e]=!1;const i=this.spectrogramCanvases[Math.floor(e/qt)].getContext("2d"),s=Math.min(1,Math.log(1+t))*qe*.5;i.fillStyle="rgb(11, 14, 26)",i.fillRect(e%qt,qe,1,qe*.5),i.fillStyle="rgba(0, 100, 150, 0.5)",i.fillRect(e%qt,qe*1.5-s,1,s)}async getMonoAudioData(){const e=this.app.chartManager.chartAudio;if(!e)return;const t=e.getBuffer(),i=new OfflineAudioContext(t.numberOfChannels,t.length,t.sampleRate),s=i.createBufferSource();s.buffer=t;const n=i.createChannelMerger(t.numberOfChannels);s.connect(n),n.connect(i.destination),s.start(),await i.startRendering().then(a=>{this.monoAudioData=a.getChannelData(0),this.audioLength=this.monoAudioData.length}).catch(()=>{Se.createFormatted("Failed to load audio: audio rendering failed","error")})}get threshold(){return this._threshold}set threshold(e){this._threshold=e,this.peaks=this.noveltyCurveIsolated.map((t,i)=>t>this._threshold&&(this.noveltyCurveIsolated[i-1]??0)t).length} onsets`}calculateOffset(){const e=new Map;let t=0,i=0,s=0;for(let c=0;cu.groups[0].value>=kS);if(h.length!=0&&(i=c,h.forEach(u=>{let p=0,f=0;for(let g=c-uo;g<=c+uo;g++){if(this.tempogramGroups[g]===void 0)continue;const y=this.tempogramGroups[g].find(w=>w.centeru.center-Fs);y!==void 0&&(f+=y.avg,p++)}const m=Math.round(f/p);e.has(m)||e.set(m,0),e.set(m,e.get(m)+1),e.get(m)>t&&(t=e.get(m),s=m)}),t>50))break}if(s==0)return;const n=60/s*(this.sampleRate/this.windowStep),a=new Array(Sh).fill(0).map((c,d)=>{const h=d%n/n;let u=0,p=0;for(let f=1;f<=4;f++)p+=Math.max(1-Math.abs(Math.round(h*f)/f-h)*12,0)*1/f,u+=1/f;return p/u}),o=[];for(let c=i;ca[u]*h).reduce((h,u)=>h+u,0);o.push({block:c,offset:-(c*this.windowStep/this.sampleRate)%(60/s),response:d,curve:this.noveltyCurveIsolated.slice(c,c+Sh).map((h,u)=>a[u]*h)})}o.sort((c,d)=>d.response-c.response);const l=o.slice(0,5).reduce((c,d)=>c+d.response,0);this.offsetTableLabel.innerText=`Offsets (first BPM: ${s})`;for(let c=0;c{if(!i)return null;let n=this.app.chartManager.loadedChart.getBeatFromSeconds(s*this.windowStep/this.sampleRate);return n=Math.round(n*48)/48,n<0?null:{type:"Tap",beat:n,col:0}}).filter(i=>i!==null).filter(i=>e?i.beat>this.app.chartManager.startRegion&&i.beatu.beat==n.beat):-1,o=i.getDivisionLength(e);const l=i.getDivisionOfMeasure(e)%1*o;let c=Math.max(0,e-l);c=s[a+1]?.beat&&(a++,n=s[a],c=n.beat,o=i.getDivisionLength(c),d=0,h=n.upper)}calcTempogram(){let e=0;for(let a=0;ae&&(e=this.noveltyCurveIsolated[a]);const t=new Float32Array(this.noveltyCurveIsolated.length);for(let a=0;a{const o=new Float32Array(this.tempoFftSize);o.set(t.subarray(Math.max(0,a*this.tempoStep-this.tempoFftSize/2),a*this.tempoStep+this.tempoFftSize/2),-Math.min(0,a*this.tempoStep-this.tempoFftSize/2));for(let c=0;cn(++a),1)):(this.calculateOffset(),this.spectrogram=[],this.noveltyCurve=[],this.tempogram=[],this.monoAudioData=void 0,this.toggleButton.innerText="Finished analyzing",this.resetButton.disabled=!1,this.doAnalysis=!1,this.toggleButton.style.background="var(--accent-color)")};n(0)}storeTempogram(e,t){const i=new Map,s=[];t.forEach((a,o)=>{let l=this.sampleRate*60/(this.windowStep*this.tempoFftSize)*o;if(!(l>On*4||lOn&&l!=1/0;)l/=2;for(;l({bpm:a,value:o})).sort((a,o)=>o.value-a.value).filter(a=>a.value!=0);for(let a=0;ac.centero.bpm-Fs);if(l===void 0){s.push({center:o.bpm,groups:[o]});continue}l.groups.push(o)}this.tempogramGroups[e]=s.map(a=>({...a,avg:a.groups.reduce((o,l)=>o+l.bpm*l.value,0)/a.groups.reduce((o,l)=>o+l.value,0)}));const n=this.spectrogramCanvases[Math.floor(e*this.tempoStep/qt)].getContext("2d");n.fillStyle="rgba(0, 166, 255, 1)",this.tempogram[e].forEach(a=>{const o=Be(a.value*8e3,0,255);n.globalAlpha=o/255,n.fillRect(e*this.tempoStep%qt,Ht(qe*2,qe*1.5,Nt(Dn,On,a.bpm)),1*this.tempoStep,qe*.5/(On-Dn))})}}const uf=["accent-color","editor-bg","widget-bg","editable-overlay-hover","editable-overlay-active","text-color","text-color-secondary","text-color-detail","text-color-disabled","primary-bg","primary-border","primary-bg-active","primary-bg-hover","secondary-bg","secondary-border","secondary-bg-active","secondary-bg-hover","tooltip-bg","input-bg","input-bg-active","input-bg-hover","input-border","navbar-bg","navbar-bg-inactive","window-bg","window-border"],IS=["primary-bg","secondary-bg","text-color","accent-color","widget-bg","editor-bg","editable-overlay-active","input-bg","window-bg"],PS=[{name:"primary-bg",ids:[{id:"primary-bg",label:"base"},{id:"primary-bg-active",label:"active"},{id:"primary-bg-hover",label:"hover"},{id:"primary-border",label:"border"}]},{name:"secondary-bg",ids:[{id:"secondary-bg",label:"base"},{id:"secondary-bg-active",label:"active"},{id:"secondary-bg-hover",label:"hover"},{id:"secondary-border",label:"border"}]},{name:"text-color",ids:[{id:"text-color",label:"primary"},{id:"text-color-secondary",label:"secondary"},{id:"text-color-detail",label:"detail"},{id:"text-color-disabled",label:"disabled"}]},{name:"other",ids:[{id:"accent-color",label:"accent-color"},{id:"widget-bg",label:"widget-bg"},{id:"tooltip-bg",label:"tooltip-bg"},{id:"editor-bg",label:"editor-bg"}]},{name:"editable-overlay",ids:[{id:"editable-overlay-hover",label:"hover"},{id:"editable-overlay-active",label:"active"}]},{name:"input",ids:[{id:"input-bg",label:"background"},{id:"input-bg-active",label:"active"},{id:"input-bg-hover",label:"hover"},{id:"input-border",label:"border"}]},{name:"window",ids:[{id:"window-bg",label:"background"},{id:"window-border",label:"border"}]},{name:"window-navbar",ids:[{id:"navbar-bg",label:"active"},{id:"navbar-bg-inactive",label:"inactive"}]}],pf={"accent-color":"Color used for focus input rings, confirm buttons","text-color":"Base text color","text-color-secondary":"Secondary text color, used for text in recent files, menubar keybinds","text-color-detail":"Detail text color, used for text in timing event boxes","text-color-disabled":"Used for texts relating to empty/disabled things (ex. no files in directory picker)","primary-bg":"Primary background, used for menubar, context/dropdown menus","primary-border":"","primary-bg-active":"","primary-bg-hover":"","navbar-bg":"Window navbar background","navbar-bg-inactive":"","window-bg":"Window background","window-border":"","secondary-bg":"Secondary background, used for subareas in menus","secondary-border":"","secondary-bg-active":"","secondary-bg-hover":"","editable-overlay-hover":"Overlay on top of editable items (status widget buttons, playback option toggles, textareas)","editable-overlay-active":"","input-bg":"Background color for input","input-bg-active":"","input-bg-hover":"","input-border":"","widget-bg":"Widget background","tooltip-bg":"Color of these tooltips","editor-bg":"Editor background"},Mh={"primary-bg":{"primary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"primary-bg-active":function(r){return this.lighten(r,10)},"primary-bg-hover":function(r){return this.lighten(r,30)},"widget-bg":function(r){return this.add(r,-50).setAlpha(136/255)},"window-bg":function(r){return this.lighten(r,-10)},"text-color":function(r){return this.average(r)>.5?new B("#000"):new B("#fff")},"input-bg":function(r){return this.average(r)<.5?new B("#000"):new B("#fff")},"input-border":function(r){return this.average(r)>.5?this.add(r,-30).setAlpha(119/255):this.add(r,30).setAlpha(119/255)},"tooltip-bg":function(r){return this.lighten(r,-10).setAlpha(238/255)},"secondary-bg":function(r){return this.lighten(r,-20)},"editor-bg":function(r){return this.lighten(r,-60)}},"window-bg":{"navbar-bg":function(r){return new B(r)}},"secondary-bg":{"secondary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"secondary-bg-active":function(r){return this.lighten(r,50)},"secondary-bg-hover":function(r){return this.lighten(r,30)}},"navbar-bg":{"navbar-bg-inactive":function(r){return this.lighten(r,-33)}},"text-color":{"text-color-secondary":function(r){return new B(r).setAlpha(119/255)},"text-color-detail":function(r){return new B(r).setAlpha(68/255)},"text-color-disabled":function(r){return new B(r).setAlpha(136/255)}},"input-bg":{"input-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"input-bg-active":function(r){return this.lighten(r,50)},"input-bg-hover":function(r){return this.lighten(r,30)}}},os={default:{"accent-color":new B("rgb(23, 131, 208)"),"text-color":new B("#fff"),"text-color-secondary":new B("#888"),"text-color-detail":new B("#757a89"),"text-color-disabled":new B("#888"),"primary-bg":new B("#555"),"primary-border":new B("#444"),"primary-bg-active":new B("#575757"),"primary-bg-hover":new B("#666"),"navbar-bg":new B("#3d3d3d"),"navbar-bg-inactive":new B("#626262"),"window-bg":new B("#3d3d3d"),"window-border":new B("#00000000"),"secondary-bg":new B("#373737"),"secondary-border":new B("#333"),"secondary-bg-active":new B("#555"),"secondary-bg-hover":new B("#454545"),"editable-overlay-hover":new B("rgb(255, 255, 255, 0.1)"),"editable-overlay-active":new B("rgb(255, 255, 255, 0.2)"),"input-bg":new B("rgba(35, 35, 35, 0.309)"),"input-bg-active":new B("rgba(50, 50, 50, 0.309)"),"input-bg-hover":new B("rgba(79, 79, 79, 0.309)"),"input-border":new B("rgba(0, 0, 0, 0.3)"),"widget-bg":new B("rgba(0, 0, 0, 0.5)"),"tooltip-bg":new B("rgba(20, 20, 20, 0.95)"),"editor-bg":new B("#18191c")},dusk:{"accent-color":new B("#b34e97ff"),"text-color":new B("#ffffffff"),"text-color-secondary":new B("#ffffff77"),"text-color-detail":new B("#ffffff44"),"text-color-disabled":new B("#ffffff88"),"primary-bg":new B("#1b0131ff"),"primary-border":new B("#1e0136bb"),"primary-bg-active":new B("#2f0057ff"),"primary-bg-hover":new B("#230140ff"),"navbar-bg":new B("#18012cff"),"navbar-bg-inactive":new B("#10011dff"),"window-bg":new B("#18012cff"),"window-border":new B("#00000000"),"secondary-bg":new B("#160127ff"),"secondary-border":new B("#18012bbb"),"secondary-bg-active":new B("#310a52ff"),"secondary-bg-hover":new B("#25033fff"),"editable-overlay-hover":new B("#e79dff1a"),"editable-overlay-active":new B("#e79dff33"),"input-bg":new B("#000000ff"),"input-bg-active":new B("#000000ff"),"input-bg-hover":new B("#000000ff"),"input-border":new B("#391f4f77"),"widget-bg":new B("#00000088"),"tooltip-bg":new B("#18012cee"),"editor-bg":new B("#0b0014ff")},nord:{"accent-color":new B("#1783d0ff"),"text-color":new B("#d9dee8ff"),"text-color-secondary":new B("#d9dee878"),"text-color-detail":new B("#d9dee845"),"text-color-disabled":new B("#d9dee887"),"primary-bg":new B("#2e3440ff"),"primary-border":new B("#323946ba"),"primary-bg-active":new B("#636d83ff"),"primary-bg-hover":new B("#485061ff"),"navbar-bg":new B("#292e39ff"),"navbar-bg-inactive":new B("#2f333cff"),"window-bg":new B("#292e39ff"),"window-border":new B("#00000000"),"secondary-bg":new B("#242933ff"),"secondary-border":new B("#272d38ba"),"secondary-bg-active":new B("#444d5fff"),"secondary-bg-hover":new B("#3f4755ff"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#1212124f"),"input-bg-active":new B("#141414ff"),"input-bg-hover":new B("#171717ff"),"input-border":new B("#121212ff"),"widget-bg":new B("#00020e87"),"tooltip-bg":new B("#292e39ed"),"editor-bg":new B("#18191cff")},light:{"accent-color":new B("#ff594cff"),"text-color":new B("#000000ff"),"text-color-secondary":new B("#00000078"),"text-color-detail":new B("#00000045"),"text-color-disabled":new B("#00000087"),"primary-bg":new B("#ffffffff"),"primary-border":new B("#b5b5b5ff"),"primary-bg-active":new B("#ebebebff"),"primary-bg-hover":new B("#ffd4d1ff"),"navbar-bg":new B("#edededff"),"navbar-bg-inactive":new B("#d1d1d1ff"),"window-bg":new B("#edededff"),"window-border":new B("#00000000"),"secondary-bg":new B("#d9d9d9ff"),"secondary-border":new B("#c7c7c7ff"),"secondary-bg-active":new B("#f0f0f0ff"),"secondary-bg-hover":new B("#e3e3e3ff"),"editable-overlay-hover":new B("#ff594c3d"),"editable-overlay-active":new B("#ff594c73"),"input-bg":new B("#ebebebff"),"input-bg-active":new B("#e0e0e0ff"),"input-bg-hover":new B("#ffffffff"),"input-border":new B("#9e9e9eff"),"widget-bg":new B("#f7f7f7e5"),"tooltip-bg":new B("#ffffffff"),"editor-bg":new B("#cfcfcfff")},rust:{"accent-color":new B("#b37100ff"),"text-color":new B("#ffd7bdf2"),"text-color-secondary":new B("#ffd7bd78"),"text-color-detail":new B("#ffd7bd45"),"text-color-disabled":new B("#ffd7bd87"),"primary-bg":new B("#3c2e2aff"),"primary-border":new B("#42332eff"),"primary-bg-active":new B("#68524bff"),"primary-bg-hover":new B("#4e3c37ff"),"navbar-bg":new B("#362926ff"),"navbar-bg-inactive":new B("#241b19ff"),"window-bg":new B("#58413cff"),"window-border":new B("#00000000"),"secondary-bg":new B("#40302ba1"),"secondary-border":new B("#46352fff"),"secondary-bg-active":new B("#614a42ff"),"secondary-bg-hover":new B("#533e38ff"),"editable-overlay-hover":new B("#fff8e01a"),"editable-overlay-active":new B("#fff8e033"),"input-bg":new B("#231515ff"),"input-bg-active":new B("#271717ff"),"input-bg-hover":new B("#2e1b1bff"),"input-border":new B("#4b413fff"),"widget-bg":new B("#311e1cff"),"tooltip-bg":new B("#362926ff"),"editor-bg":new B("#181211ff")},tron:{"accent-color":new B("#00ccffff"),"text-color":new B("#ffffffff"),"text-color-secondary":new B("#ffffffe4"),"text-color-detail":new B("#ffffff5b"),"text-color-disabled":new B("#ffffff88"),"primary-bg":new B("#000000ff"),"primary-border":new B("#ff7b00c9"),"primary-bg-active":new B("#00e1ff98"),"primary-bg-hover":new B("#ff751a5a"),"navbar-bg":new B("#000000ff"),"navbar-bg-inactive":new B("#000000ff"),"window-bg":new B("#000000ff"),"window-border":new B("#ff880085"),"secondary-bg":new B("#121212ff"),"secondary-border":new B("#ff8800aa"),"secondary-bg-active":new B("#00e1ffa3"),"secondary-bg-hover":new B("#ff7e145a"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#000000ff"),"input-bg-active":new B("#000000ff"),"input-bg-hover":new B("#000000ff"),"input-border":new B("#1e1e1eff"),"widget-bg":new B("#000000ad"),"tooltip-bg":new B("#000000ff"),"editor-bg":new B("#000000ff")},gilded:{"accent-color":new B("#ffc014ff"),"text-color":new B("#e6e6e6ff"),"text-color-secondary":new B("#ffffff6b"),"text-color-detail":new B("#e6e6e645"),"text-color-disabled":new B("#e6e6e687"),"primary-bg":new B("#232325ff"),"primary-border":new B("#272729ff"),"primary-bg-active":new B("#ffc0145b"),"primary-bg-hover":new B("#ffc01421"),"navbar-bg":new B("#202021ff"),"navbar-bg-inactive":new B("#151516ff"),"window-bg":new B("#202021ff"),"window-border":new B("#00000000"),"secondary-bg":new B("#1c1c1eff"),"secondary-border":new B("#1f1f21ff"),"secondary-bg-active":new B("#1f1f21ff"),"secondary-bg-hover":new B("#242427ff"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#0d0d0dff"),"input-bg-active":new B("#0e0e0eff"),"input-bg-hover":new B("#111111ff"),"input-border":new B("#0e0e0eff"),"widget-bg":new B("#171717db"),"tooltip-bg":new B("#202021ff"),"editor-bg":new B("#0e0e0fff")}};class Qe{static _themes=os;static _userThemes={};static _initialized=!1;static style;static currentTheme;static initialize(){this._createThemeStyle(),this._loadUserThemes(),this._initialized=!0}static _createThemeStyle(){const e=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(e),this.style=e}static _loadUserThemes(){let e={};try{e=JSON.parse(localStorage.getItem("themes")??"{}")}catch{console.warn("Error loading user themes")}const t={};for(const[i,s]of Object.entries(e))t[i]=this.validateTheme(s);this._userThemes=t}static _saveUserThemes(){const e=Object.fromEntries(Object.entries(this._userThemes).map(([t,i])=>[t,this.convertThemeToString(i)]));localStorage.setItem("themes",JSON.stringify(e))}static validateTheme(e){const t={...os.default};if(typeof e!="object")return t;for(const i of uf)if(e[i]!==void 0)try{t[i]=new B(e[i])}catch{console.warn(`Invalid color ${e[i]} for ${i}`)}return t}static getThemes(){return{...this._themes,...this._userThemes}}static getBuiltinThemes(){return this._themes}static getUserThemes(){return this._userThemes}static loadTheme(e){this._initialized||this.initialize();let t=this.getThemes()[e];t||(Se.createFormatted("Error loading theme: Invalid theme id","error"),t=os.default),_.general.theme=e,this._applyTheme(t)}static _applyTheme(e){const t=`body{${uf.map(i=>`--${i}: ${(e[i]??os.default[i]).toHexa()};`).join("")}}`;this.style.innerHTML=t,this.currentTheme={...e},K.emit("themeChanged")}static loadThemeFromColors(e){this._applyTheme(this.validateTheme(e))}static getCurrentTheme(){return this.currentTheme}static convertThemeToString(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.toHexa()]))}static exportCurrentTheme(e){return e={code:!1,spaces:!1,...e},e.code?JSON.stringify(Object.fromEntries(Object.entries(this.currentTheme).map(([t,i])=>[t,`^new Color('${i.toHexa()}')^`])),null,e.spaces?2:0).replaceAll('"^',"").replaceAll('^"',""):JSON.stringify(this.convertThemeToString(this.currentTheme),null,e.spaces?2:0)}static createUserTheme(e,t){this.getThemes()[e]===void 0&&(t?this._userThemes[e]={...t}:this._userThemes[e]={...os.default},this._saveUserThemes())}static setUserTheme(e,t){this._userThemes[e]!==void 0&&(this._userThemes[e]={...t},this._saveUserThemes())}static deleteUserTheme(e){this._userThemes[e]!==void 0&&(delete this._userThemes[e],this.loadTheme("default"),this._saveUserThemes())}static renameUserTheme(e,t){this._userThemes[e]!==void 0&&this.getThemes()[t]===void 0&&(this._userThemes[t]=this._userThemes[e],delete this._userThemes[e],this._saveUserThemes())}static parseThemeText(e){let t;try{t=JSON.parse(e)}catch{return null}return this.validateTheme(t)}static getColor(e){return this.currentTheme?.[e]??os.default[e]}}function Rd(r,e,t){return(r<<16)+(e<<8)+t}function Ld(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Be(Math.round(t*e),0,255),i=Be(Math.round(i*e),0,255),s=Be(Math.round(s*e),0,255),Rd(t,i,s)}function BS(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Be(Math.round(t+e),0,255),i=Be(Math.round(i+e),0,255),s=Be(Math.round(s+e),0,255),Rd(t,i,s)}function Gc(r,e,t){const[i,s,n]=r.match(/\w\w/g).map(u=>parseInt(u,16)),[a,o,l]=e.match(/\w\w/g).map(u=>parseInt(u,16)),c=Math.round(i+(a-i)*t).toString(16).padStart(2,"0"),d=Math.round(s+(o-s)*t).toString(16).padStart(2,"0"),h=Math.round(n+(l-n)*t).toString(16).padStart(2,"0");return"#"+c+d+h}function RS(r,e,t){const i=Ht(r.red,e.red,t),s=Ht(r.green,e.green,t),n=Ht(r.blue,e.blue,t),a=Ht(r.alpha,e.alpha,t);return new B([i,s,n,a])}const sa=new Map;K.on("themeChanged",()=>{for(const[r,e]of sa.entries()){const t=Qe.getColor(r);e.forEach(i=>{i.destroyed||(i.tint=t.toNumber(),i.alpha=t.alpha)}),sa.set(r,e.filter(i=>!i.destroyed))}});function et(r,e){sa.has(e)||sa.set(e,[]),sa.get(e).push(r);const t=Qe.getColor(e);r.tint=t.toNumber(),r.alpha=t.alpha}function kh(r){const{r:e,g:t,b:i,a:s}=r.toRgba(),n=Math.max(e,t,i),a=Math.min(e,t,i);let o=0,l=0;const c=(n+a)/2;if(n==a)o=l=0;else{const d=n-a;switch(l=c>.5?d/(2-n-a):d/(n+a),n){case e:o=(t-i)/d+(t{const o=document.createElement("input");o.type="text";let l="";o.onfocus=()=>{l=o.value},o.onkeydown=c=>{c.key=="Enter"&&(o.blur(),c.preventDefault()),c.key=="Escape"&&(o.value=l,o.blur(),c.stopImmediatePropagation())},o.oninput=()=>{a.isValid(o.value)!==null&&t.onupdate?.(t.getValue())},o.onblur=()=>{const c=a.isValid(o.value);c===null?o.value=l:o.value=c,t.onupdate?.(t.getValue())},t.inputs[n]=o,s.appendChild(o)}),t.replaceChildren(i,s),t}setValue(e){Object.entries(this.inputs).forEach(([t,i])=>{document.activeElement!=i&&(i.value=this.opts[t].setValue(e))})}}const ri=(r,e,t)=>i=>{t!==void 0&&i.endsWith(t)&&(i=i.slice(0,i.length-t.length));let s;try{s=parseInt(i)}catch{return null}return Be(s,r,e)+""},si=(r,e,t,i)=>{let s;i!==void 0&&r.endsWith(i)&&(r=r.slice(0,r.length-i.length));try{s=parseInt(r)}catch{return e}return Be(s,e,t)};class El extends yy{_value;_hue=0;_sat=0;_val=0;_alp=1;popup;matrix;matrixDot;matrixDragging=!1;hueDragging=!1;hueThumb;alphaDragging=!1;alphaBg;alphaThumb;previewNew;formats=[];onColorChange;static create(e){const t=Ih();return Object.setPrototypeOf(t,El.prototype),t.value=pa(e.value),t.classList.add("color-picker"),t.formats=[],e.height!==void 0&&(t.style.height=e.height+"px"),e.width!==void 0&&(t.style.width=e.width+"px"),t.addEventListener("click",()=>{t.createPopup()}),t}updatePreview(){this.color=this._value}get value(){return this._value}set value(e){this._value=e;const t=po(this._value);this._hue=t[0],this._sat=t[1],this._val=t[2],this._alp=t[3],this.updatePreview(),this.updatePopup()}get hue(){return this._hue}set hue(e){this._hue=e,this.updateColor()}get sat(){return this._sat}set sat(e){this._sat=e,this.updateColor()}get val(){return this._val}set val(e){this._val=e,this.updateColor()}get alpha(){return this._alp}set alpha(e){this._alp=e,this.updateColor()}updateColor(){this._value=new B({h:this._hue*360,s:this._sat*100,v:this._val*100,a:this._alp}),this.updatePreview(),this.updatePopup()}createPopup(){if(this.popup){this.closePopup();return}const e=document.createElement("div");e.classList.add("color-picker-popup");const t=document.createElement("div");t.classList.add("color-picker-area");const[i,s]=this.createMatrix();this.matrix=i,this.matrixDot=s,s.style.background="#f00";const[n,a]=this.createSlider({ondrag:()=>this.hueDragging=!0,offdrag:()=>this.hueDragging=!1,change:E=>{this.hue=E,this.onColorChange?.(this._value)}});this.hueThumb=a,n.style.background="linear-gradient(to right, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 66%, #f0f 83%, red 100%)";const[o,l]=this.createSlider({ondrag:()=>this.alphaDragging=!0,offdrag:()=>this.alphaDragging=!1,change:E=>{this.alpha=E,this.onColorChange?.(this._value)}});this.alphaThumb=l,o.classList.add("color-picker-transparent");const c=document.createElement("div");c.classList.add("color-slider"),o.appendChild(c),this.alphaBg=c,t.replaceChildren(i,n,o);const d=document.createElement("div");d.classList.add("color-picker-area");const h=Js.create({label:"HEX",inputs:{hex:{setValue:E=>E.alpha!=1?E.toHexa():E.toHex(),isValid:E=>{const C=/#?([0-9a-fA-F]+)/.exec(E);return C&&[3,4,6,8].includes(C[1].length)?(E[0]!="#"&&(E="#"+E),E):null}}},getValue(){let E=this.inputs.hex.value;return E[0]!="#"&&(E="#"+E),new B(E)},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(h),d.appendChild(h);const u=Js.create({label:"RGBA",inputs:{r:{setValue:E=>Math.round(E.red*255).toString(),isValid:ri(0,255)},g:{setValue:E=>Math.round(E.green*255).toString(),isValid:ri(0,255)},b:{setValue:E=>Math.round(E.blue*255).toString(),isValid:ri(0,255)},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({r:si(this.inputs.r.value,0,255),g:si(this.inputs.g.value,0,255),b:si(this.inputs.b.value,0,255),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(u),d.appendChild(u);const p=Js.create({label:"HSVA",inputs:{h:{setValue:E=>Math.round(po(E)[0]*360)+"º",isValid:ri(0,360,"º")},s:{setValue:E=>Math.round(po(E)[1]*100)+"%",isValid:ri(0,100,"%")},v:{setValue:E=>Math.round(po(E)[2]*100)+"%",isValid:ri(0,100,"%")},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({h:si(this.inputs.h.value,0,360,"º"),s:si(this.inputs.s.value,0,100,"%"),v:si(this.inputs.v.value,0,100,"%"),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(p),d.appendChild(p);const f=Js.create({label:"HSLA",inputs:{h:{setValue:E=>Math.round(kh(E)[0]*360)+"º",isValid:ri(0,360,"º")},s:{setValue:E=>Math.round(kh(E)[1]*100)+"%",isValid:ri(0,100,"%")},l:{setValue:E=>Math.round(kh(E)[2]*100)+"%",isValid:ri(0,100,"%")},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({h:si(this.inputs.h.value,0,360,"º"),s:si(this.inputs.s.value,0,100,"%"),l:si(this.inputs.l.value,0,100,"%"),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(f),d.appendChild(f);const m=document.createElement("div");m.classList.add("color-picker-preview");const g=Ih(),y=Ih();y.color=this._value,g.color=this._value,m.replaceChildren(g,y),this.previewNew=g,d.appendChild(m),e.replaceChildren(t,d),this.popup=e,this.updatePopup();const w=this._value,b=E=>{E.key=="Escape"&&(E.stopImmediatePropagation(),window.removeEventListener("keydown",b),window.removeEventListener("mousedown",v),this.closePopup(),this.value=w,this.onColorChange?.(this._value))},v=E=>{e.contains(E.target)||(window.removeEventListener("keydown",b),window.removeEventListener("mousedown",v),this.closePopup())};window.addEventListener("keydown",b),window.addEventListener("mousedown",v),document.getElementById("popups").appendChild(e),setTimeout(()=>this.movePosition())}updatePopup(){if(!this.popup)return;this.matrix.style.backgroundColor=`hsl(${this._hue*360} 100% 50%)`,this.matrixDot.style.backgroundColor=this._value.toHex(),this.matrixDragging||(this.matrixDot.style.left=this._sat*200+"px",this.matrixDot.style.top=(1-this._val)*200+"px"),this.hueDragging||(this.hueThumb.style.left=this._hue*200+"px");const e=`rgba(${this._value.red*255}, ${this._value.green*255}, ${this._value.blue*255}`;this.alphaBg.style.background=`linear-gradient(to right, ${e}, 0 ), ${e}, 1))`,this.alphaDragging||(this.alphaThumb.style.left=this._alp*200+"px"),this.formats.forEach(t=>t.setValue(this._value)),this.previewNew.color=this._value}closePopup(){const e=this.popup;this.popup=void 0,e&&(e.classList.add("exiting"),setTimeout(()=>{e.remove()},500))}createMatrix(){const e=document.createElement("div");e.classList.add("color-matrix"),e.style.backgroundColor="#ff0000";const t=document.createElement("div");t.classList.add("color-matrix-x");const i=document.createElement("div");i.classList.add("color-matrix-y");const s=document.createElement("div");s.classList.add("color-matrix-dot"),e.appendChild(s),e.replaceChildren(t,i,s),e.onmousedown=o=>{window.addEventListener("mousemove",n),window.addEventListener("mouseup",a),n(o),this.matrixDragging=!0};const n=o=>{const l=e.getBoundingClientRect(),c=Be((o.clientX-l.left)/l.width,0,1),d=Be((o.clientY-l.top)/l.height,0,1);s.style.left=c*l.width+"px",s.style.top=d*l.height+"px",this._sat=c,this.val=1-d,this.onColorChange?.(this._value)},a=()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",a),this.matrixDragging=!1};return[e,s]}createSlider(e){const t=document.createElement("div");t.classList.add("color-slider");const i=document.createElement("div");i.classList.add("color-slider-thumb"),t.appendChild(i),t.onmousedown=a=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",n),s(a),e.ondrag?.(),this.onColorChange?.(this._value)};const s=a=>{const o=t.getBoundingClientRect(),l=Be((a.clientX-o.left)/o.width,0,1);i.style.left=l*o.width+"px",e.change(l)},n=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",n),e.offdrag?.()};return[t,i]}movePosition(){const e=this.getBoundingClientRect(),t=e.left+e.width/2-this.popup.clientWidth/2,i=e.top+e.height+10,s=15,n=window.innerWidth-this.popup.clientWidth-15;this.popup.style.left=`${Be(t,s,n)}px`,this.popup.style.top=`${i}px`,i+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transformOrigin="bottom center",this.popup.style.top=`${e.top-this.popup.clientHeight-10}px`)}isActive(){return this.popup!==void 0}}class Vc extends St{app;grid;actions={};constructor(e){super({title:"Themes",width:600,height:400,disableClose:!1,win_id:"theme-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-search");const i=document.createElement("input");i.classList.add("pref-search-bar"),i.type="text",i.placeholder="Search for a theme...",i.oninput=()=>{this.filterGrid(i.value)},t.appendChild(i);const s=document.createElement("div");s.classList.add("theme-grid"),this.grid=s;const n=this.createOptionTray();e.replaceChildren(t,s,n),this.viewElement.appendChild(e)}createOptionTray(){const e=document.createElement("div");e.classList.add("theme-tray");const t=document.createElement("button");t.appendChild(Ae.getIcon("PLUS",16)),t.appendChild(document.createTextNode("New")),t.onclick=()=>{const l=this.getNonConflictingName("new-theme");Qe.createUserTheme(l),Qe.loadTheme(l),this.loadGrid()},this.actions.add=t,e.appendChild(t);const i=document.createElement("button");i.appendChild(Ae.getIcon("COPY",16)),i.appendChild(document.createTextNode("Duplicate")),i.onclick=()=>{const l=this.getNonConflictingName(_.general.theme);Qe.createUserTheme(l,Qe.getCurrentTheme()),Qe.loadTheme(l),this.loadGrid()},i.disabled=!0,this.actions.copy=i,e.appendChild(i);const s=document.createElement("button");s.classList.add("confirm"),s.appendChild(Ae.getIcon("EDIT",16)),s.appendChild(document.createTextNode("Edit")),s.onclick=()=>{this.closeWindow(),this.app.windowManager.openWindow(new fa(this.app))},s.disabled=!0,this.actions.edit=s,e.appendChild(s);const n=document.createElement("button");n.classList.add("delete"),n.appendChild(Ae.getIcon("TRASH",16)),n.appendChild(document.createTextNode("Delete")),n.onclick=()=>{this.app.windowManager.openWindow(new Tl(this.app,"Delete theme","Are you sure you want to delete this theme?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{Qe.deleteUserTheme(_.general.theme),this.loadGrid()}}]))},n.disabled=!0,this.actions.del=n,e.appendChild(n);const a=document.createElement("button");a.appendChild(Ae.getIcon("UPLOAD",16)),a.appendChild(document.createTextNode("Import")),a.onclick=async()=>{(await Jg({_preferPolyfill:!1,excludeAcceptAllOption:!1,multiple:!0,accepts:[{extensions:["txt"]}]})).forEach(c=>{c.getFile().then(d=>d.text()).then(d=>{const h=Qe.parseThemeText(d);let u=zi(c.name,".txt");if(!h){Se.createFormatted("Failed to load theme "+u,"error");return}u=this.getNonConflictingName(u),Qe.createUserTheme(u,h),this.loadGrid()})})},this.actions.imp=a,e.appendChild(a);const o=document.createElement("button");return o.appendChild(Ae.getIcon("DOWNLOAD",16)),o.appendChild(document.createTextNode("Export")),o.onclick=()=>{const l=Qe.exportCurrentTheme({spaces:!0}),c=new File([l],_.general.theme+".txt",{type:"text/plain"}),d=document.createElement("a"),h=URL.createObjectURL(c);d.href=h,d.download=c.name,document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(h)},this.actions.exp=o,o.disabled=!0,e.appendChild(o),e}loadGrid(){this.grid.replaceChildren();const e=Qe.getThemes();if(e)for(const[t,i]of Object.entries(e)){let s=t;const n=os[t]!==void 0,a=document.createElement("div"),o=document.createElement("div");if(o.classList.add("inlineEdit"),n)o.style.fontWeight="bold";else{o.contentEditable="true";let c=t;o.onfocus=()=>{c=o.innerText},o.onkeydown=d=>{d.key=="Enter"&&(o.blur(),d.preventDefault()),d.key=="Escape"&&(o.innerText=c,o.blur(),d.stopImmediatePropagation())},o.onblur=()=>{if(o.innerText==c)return;const d=this.getNonConflictingName(o.innerText);Qe.renameUserTheme(c,d),Qe.loadTheme(d),o.innerText=d,s=d,a.dataset.id=d}}const l=document.createElement("div");l.classList.add("theme-preview-grid");for(const c of IS){const d=document.createElement("div");d.style.backgroundColor=i[c].toHex(),l.appendChild(d)}o.innerText=t,a.classList.add("theme-cell"),o.classList.add("theme-title"),a.replaceChildren(o,l),this.grid.appendChild(a),t==_.general.theme&&(a.classList.add("selected"),setTimeout(()=>{a.scrollIntoView({behavior:_.general.smoothAnimations?"smooth":"instant",block:"center"})}),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1),a.dataset.id=t,a.onclick=()=>{_.general.theme!=s&&(Qe.loadTheme(s),this.removeAllSelections(),a.classList.add("selected"),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1)}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}getNonConflictingName(e){const t=Qe.getThemes();if(t[e]==null)return e;let i=2;const s=/([^]+)-(\d+)$/.exec(e);s&&(e=s[1],i=parseInt(s[2]));let n=`${e}-${i}`;for(;t[n]!==void 0;)n=`${e}-${i}`,i++;return n}}class fa extends St{app;pickers={};handlers=[];linkBlacklist=new Set;static isOpen=!1;constructor(e){super({title:"Theme Color Editor",width:500,height:400,win_id:"theme-editor",disableClose:!0}),this.app=e,this.initView(),fa.isOpen=!0}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("theme-color-grid"),PS.forEach(l=>{t.appendChild(this.createGroup(l))});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow(),Qe.loadTheme(_.general.theme),this.app.windowManager.openWindow(new Vc(this.app))},s.appendChild(a);const o=document.createElement("button");o.innerText="Save",o.classList.add("confirm"),o.onclick=()=>{Qe.setUserTheme(_.general.theme,Qe.getCurrentTheme()),Qe.loadTheme(_.general.theme),this.app.windowManager.openWindow(new Vc(this.app)),this.closeWindow()},n.appendChild(o),e.replaceChildren(t,i),this.viewElement.appendChild(e)}createGroup(e){const t=document.createElement("div");t.classList.add("theme-group");const i=document.createElement("div");i.classList.add("theme-group-label"),i.innerText=e.name;const s=document.createElement("div");return s.classList.add("theme-picker-grid"),e.ids.forEach(n=>{s.appendChild(this.createPicker(n))}),t.replaceChildren(i,s),t}createPicker(e){const t=()=>{const d=new B(Qe.getCurrentTheme()[e.id]);o.innerText=d.toHex()+" | "+Math.round(d.alpha*100)+"%",!l.isActive()&&(l.value=d)},i=d=>{const h=Qe.getCurrentTheme();h[e.id]=d,Qe._applyTheme(this.updateLinks(e.id,h))},s=document.createElement("div");s.classList.add("theme-color-cell"),pf[e.id]!=""&&Pt(s,{content:pf[e.id]});const n=Mh[e.id];n&&(s.onmouseover=()=>{Object.keys(n).forEach(d=>{this.linkBlacklist.has(d)||this.pickers[d].classList.add("linked")})},s.onmouseout=()=>{Object.keys(n).forEach(d=>{this.pickers[d].classList.remove("linked")})});const a=document.createElement("div");a.innerText=e.label;const o=document.createElement("div");o.classList.add("theme-color-detail");const l=El.create({value:"white",width:30,height:30});l.onColorChange=i,s.replaceChildren(a,o,l);const c=this.getLink(e.id);if(c!==null){const d=document.createElement("div");d.classList.add("ico-checkbox");const h=Ae.getIcon("LINK",16),u=Ae.getIcon("LINK_BROKEN",16);let p=!0;const f=()=>{p?this.linkBlacklist.delete(e.id):this.linkBlacklist.add(e.id),h.style.display=p?"":"none",u.style.display=p?"none":""};d.onclick=()=>{p=!p,f()},Pt(d,{onShow(g){g.setContent(p?`Linked to ${c}`:"Unlinked")}}),Pt(d,{trigger:"click",onShow(g){g.setContent(p?`Linked to ${c}`:"Unlinked")}}),f(),d.replaceChildren(h,u),s.appendChild(d);const m=g=>{p&&(p=!1,f()),i(g)};l.onColorChange=m}return t(),K.on("themeChanged",t),this.handlers.push(t),this.pickers[e.id]=s,s}getLink(e){for(const[t,i]of Object.entries(Mh))if(e in i)return t;return null}average(e){return(e.red+e.green+e.blue)/3}lighten(e,t){return new B(Ld(new B(e).toNumber(),1+t/100))}add(e,t){return new B(BS(new B(e).toNumber(),t))}updateLinks(e,t){const i=new Set,s=[e];for(;s.length!=0;){const n=s.shift(),a=Mh[n];if(a)for(const[o,l]of Object.entries(a))this.linkBlacklist.has(o)||i.has(o)||(t[o]=l.bind(this)(t[n]),s.push(o),i.add(o))}return t}onClose(){fa.isOpen=!1}}const ni=r=>r,ff={offset:{title:"Offset",element:ni({create:(r,e)=>{const t=ot.create(0,_.general.spinnerStep/100,3);return t.onChange=i=>{i!=null&&(e().setOffset(i),r.chartManager.setBeat(r.chartManager.getBeat()))},t.view},update:(r,e)=>{const t=r.querySelector(".spinner-input");if(document.activeElement==t)return;const i=e.getOffset();t.value!=ae(i,3).toFixed(3)&&(t.value=ae(i,3).toFixed(3))}})},bpm:{title:"BPM",element:ni({create:(r,e)=>{const t=ot.create(120,void 0,3);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"BPMS",beat:s}]);return}e().insert([{type:"BPMS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("BPMS",t)?.value??120;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},stop:{title:"Stop",element:ni({create:(r,e)=>{const t=ot.create(0,void 0,3);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.getBeat();e().delete([{type:"STOPS",beat:s}]);return}e().insert([{type:"STOPS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("STOPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},delay:{title:"Delay",element:ni({create:(r,e)=>{const t=ot.create(0,void 0,3);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.getBeat();e().delete([{type:"DELAYS",beat:s}]);return}e().insert([{type:"DELAYS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("DELAYS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},warp:{title:"Warp",element:ni({create:(r,e)=>{const t=ot.create(0,void 0,3,0);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.getBeat();e().delete([{type:"WARPS",beat:s}]);return}i<0||e().insert([{type:"WARPS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("WARPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},timeSig:{title:"Time Sig.",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=ot.create(4,1,0,1);i.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();e().delete([{type:"TIMESIGNATURES",beat:a}]);return}n<1||e().insert([{type:"TIMESIGNATURES",beat:r.chartManager.getBeat(),upper:n,lower:s.value}])};const s=ot.create(4,1,0,1);return s.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();e().delete([{type:"TIMESIGNATURES",beat:a}]);return}n<1||e().insert([{type:"TIMESIGNATURES",beat:r.chartManager.getBeat(),upper:i.value,lower:n}])},t.appendChild(i.view),t.appendChild(s.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("TIMESIGNATURES",t),a=n?.upper??4,o=n?.lower??4;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},tick:{title:"Tickcount",element:ni({create:(r,e)=>{const t=ot.create(4,1,0,0);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"TICKCOUNTS",beat:s}]);return}i<0||e().insert([{type:"TICKCOUNTS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("TICKCOUNTS",t)?.value??4;i.value!=Math.round(s).toString()&&(i.value=Math.round(s).toString())}})},combo:{title:"Combo",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=ot.create(1,1,0,0);i.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();e().delete([{type:"COMBOS",beat:a}]);return}n<0||e().insert([{type:"COMBOS",beat:r.chartManager.getBeat(),hitMult:n,missMult:s.value}])};const s=ot.create(1,1,0,0);return s.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();s.setValue(r.chartManager.loadedChart?.timingData.getEventAtBeat("COMBOS",a)?.missMult??1);return}n<0||e().insert([{type:"COMBOS",beat:r.chartManager.getBeat(),hitMult:i.value,missMult:n}])},t.appendChild(i.view),t.appendChild(s.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("COMBOS",t),a=n?.hitMult??1,o=n?.missMult??1;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},speed:{title:"Speed",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=()=>{e().insert([{type:"SPEEDS",beat:r.chartManager.getBeat(),value:s.value,delay:n.value,unit:a.value=="Beats"?"B":"T"}])},s=ot.create(1,.1,0);s.onChange=o=>{if(o==null){const l=r.chartManager.getBeat();e().delete([{type:"SPEEDS",beat:l}]);return}i()};const n=ot.create(1,.1,0);n.onChange=o=>{o==null||o<0||i()};const a=gi.create(["Beat","Time"],"Beats");return a.onChange=i,t.appendChild(s.view),t.appendChild(n.view),t.appendChild(a.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.children[1].querySelector(".spinner-input"),n=e.getEventAtBeat("SPEEDS",t),a=n?.value??1,o=n?.delay??0,l=n?.unit=="B"?"Beat":"Time";document.activeElement!=i&&i.value!=ae(a,3).toFixed(3)&&(i.value=ae(a,3).toFixed(3)),document.activeElement!=s&&s.value!=ae(o,3).toFixed(3)&&(s.value=ae(o,3).toFixed(3)),s.disabled=n?.beat!=t;const c=r.lastElementChild.querySelector(".dropdown-selected-text");c.innerText!=l&&(c.innerText=l),n?.beat!=t?c.classList.add("disabled"):c.classList.remove("disabled")}})},scroll:{title:"Scroll",element:ni({create:(r,e)=>{const t=ot.create(1,void 0,3);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"SCROLLS",beat:s}]);return}e().insert([{type:"SCROLLS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("SCROLLS",t)?.value??1;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},fake:{title:"Fake",element:ni({create:(r,e)=>{const t=ot.create(1,void 0,3,0);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"FAKES",beat:s}]);return}i<0||e().insert([{type:"FAKES",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("FAKES",t);let n=s?.value??1;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},label:{title:"Label",element:ni({create:(r,e)=>{const t=document.createElement("input");return t.type="text",t.autocomplete="off",t.spellcheck=!1,t.onkeydown=i=>{i.key=="Enter"&&t.blur()},t.onblur=()=>{if(t.value==""){const i=r.chartManager.getBeat();e().delete([{type:"LABELS",beat:i}]);return}e().insert([{type:"LABELS",beat:r.chartManager.getBeat(),value:t.value}])},t},update:(r,e,t)=>{const i=r;if(document.activeElement==i)return;const n=e.getEventAtBeat("LABELS",t)?.value??"";i.value!=n&&(i.value=n)}})}};class LS extends St{app;lastBeat;chartTiming=!1;interval;changeHandler=()=>this.setData();constructor(e){super({title:"Edit Timing Data",width:300,height:340,disableClose:!1,win_id:"timing_data",blocking:!1}),this.app=e,this.lastBeat=Math.round(this.app.chartManager.getBeat()*1e3)/1e3,this.chartTiming=this.app.chartManager.loadedChart.timingData.usesChartTiming(),this.initView(),this.interval=setInterval(()=>{Math.round(this.app.chartManager.getBeat()*1e3)/1e3!=this.lastBeat&&(this.lastBeat=Math.round(this.app.chartManager.getBeat()*1e3)/1e3,this.setData())},17),K.on("timingModified",this.changeHandler),K.on("chartLoaded",this.changeHandler)}onClose(){K.off("timingModified",this.changeHandler),clearInterval(this.interval)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("timing-data");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to";const i=gi.create(["All charts","This chart"],this.chartTiming?"This chart":"All charts");i.onChange(s=>{this.chartTiming=s=="This chart"}),e.appendChild(t),e.appendChild(i.view),Object.values(ff).forEach(s=>{const n=document.createElement("div");n.classList.add("label"),n.innerText=s.title;const a=s.element.create(this.app,()=>this.chartTiming?this.app.chartManager.loadedChart.timingData:this.app.chartManager.loadedSM.timingData);e.appendChild(n),e.appendChild(a)}),this.viewElement.appendChild(e),this.setData()}setData(){this.app.chartManager.loadedChart&&Object.values(ff).forEach((e,t)=>{const i=this.viewElement.children[0].children[t*2+3];e.element.update(i,this.app.chartManager.loadedChart.timingData,this.lastBeat)})}}const mf=[{type:"group",id:"app",label:"App",disable:()=>window.nw===void 0,children:[{type:"subgroup",children:[{type:"item",label:"Window Width",id:"app.width",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.width=e)}}},{type:"item",label:"Window Height",id:"app.height",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.height=e)}}}]},{type:"subgroup",children:[{type:"item",label:"Fullscreen",id:"app.fullscreen",input:{type:"checkbox",onChange:(r,e)=>{const t=nw.Window.get();e?nw.Window.get().enterFullscreen():(t.hide(),nw.Window.get().leaveFullscreen(),t.show())}}}]}]},{type:"group",id:"general",label:"General",children:[{type:"subgroup",children:[{type:"item",label:"Smooth Animations",id:"general.smoothAnimations",input:{type:"checkbox",onChange:(r,e)=>{e?document.body.classList.add("animated"):document.body.classList.remove("animated")}}},{type:"item",label:"Warn before exit",id:"general.warnBeforeExit",input:{type:"checkbox"},tooltip:"Warn before exiting the editor if you have unsaved changes."},{type:"item",label:"Spinner step",id:"general.spinnerStep",input:{type:"slider",min:0,step:.1,max:5,hardMin:0,hardMax:2**31-1},tooltip:"The default increment for all number spinners."}]}]},{type:"group",id:"chart",label:"Chart",children:[{type:"subgroup",label:"Playfield",children:[{type:"subgroup",children:[{type:"item",label:"Enable mouse placement",id:"chart.mousePlacement",input:{type:"checkbox"}},{type:"item",label:"Directional hold placement behavior",id:"chart.defaultHoldPlacement",input:{type:"checkbox"},tooltip:"Changes the hold placement behavior. By default, holds can only be extended in one direction when placed. Turn this off to mimic the behavior of AV/Stepmania."}]},{type:"subgroup",children:[{type:"item",label:"Zoom",id:"chart.zoom",input:{type:"slider",min:50,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Reverse playfield",id:"chart.reverse",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Y position",id:"chart.receptorYPos",input:{type:"slider",min:-400,max:0,hardMin:-(2**31-1),hardMax:2**31-1}},{type:"item",label:"Draw length",id:"chart.maxDrawBeats",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes. Increasing this works well for songs with high bpm but can affect performance. Only applies to XMod."},{type:"item",label:"Draw length past receptors",id:"chart.maxDrawBeatsBack",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes past the receptors. Increasing this can affect performance. Only applies to XMod."}]},{type:"subgroup",children:[{type:"item",label:"Draw noteflashes",id:"chart.drawNoteFlash",input:{type:"checkbox"}},{type:"item",label:"Draw note icons",id:"chart.drawIcons",input:{type:"checkbox"},tooltip:"Draw indicators above notes that some noteskins may not differentiate, like Fakes and Lifts."}]}]},{type:"subgroup",label:"Scrolling",children:[{type:"item",label:"Scroll sensitivity",id:"chart.scroll.scrollSensitivity",input:{type:"slider",min:0,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}},tooltip:"Adjust the scroll sensitivity when scrolling through the chart."},{type:"item",label:"Snap every scroll",id:"chart.scroll.scrollSnapEveryScroll",input:{type:"checkbox"},tooltip:"Whether each scroll movement corresponds to moving one snap unit when scrolling. Turning this on will have the same behavior as ArrowVortex. Recommended on for those using a mouse, off for those using trackpad."},{type:"item",label:"Invert zoom in/out",id:"chart.scroll.invertZoomScroll",input:{type:"checkbox"},tooltip:"Inverts the zoom in/out control when scrolling."},{type:"item",label:"Invert scroll direction when in reverse",id:"chart.scroll.invertReverseScroll",input:{type:"checkbox"}}]},{type:"subgroup",label:"Waveform",children:[{type:"item",label:"Draw waveform",id:"chart.waveform.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Color",id:"chart.waveform.color",input:{type:"color"}}]},{type:"subgroup",children:[{type:"item",label:"Draw filtered waveform",id:"chart.waveform.allowFilter",input:{type:"checkbox"}},{type:"item",label:"Filtered color",id:"chart.waveform.filteredColor",input:{type:"color"}}]},{type:"item",label:"Line height",id:"chart.waveform.lineHeight",input:{type:"slider",min:1,max:3,step:.1,hardMax:100},tooltip:"The height of each line of the waveform. Increasing this can help performance."},{type:"item",label:"Antialiasing",id:"chart.waveform.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Allow speed changes",id:"chart.waveform.speedChanges",input:{type:"checkbox"},tooltip:"Allows the waveform to be affected by SPEEDS and SCROLLS."}]},{type:"subgroup",label:"Note Layout",children:[{type:"item",label:"Show Note Layout",id:"chart.noteLayout.enabled",input:{type:"checkbox"}}]},{type:"subgroup",label:"NPS Graph",children:[{type:"item",label:"Show NPS Graph",id:"chart.npsGraph.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Start Color",id:"chart.npsGraph.color1",input:{type:"color"}},{type:"item",label:"End Color",id:"chart.npsGraph.color2",input:{type:"color"}}]}]}]},{type:"group",id:"audio",label:"Audio",children:[{type:"subgroup",children:[{type:"item",label:"Master volume",id:"audio.masterVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Song volume",id:"audio.songVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Sound effect volume",id:"audio.soundEffectVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}}]},{type:"subgroup",children:[{type:"item",label:"Enable assist tick",id:"audio.assistTick",input:{type:"checkbox"},tooltip:"Plays a sound when a note passes the receptors"},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Allow filters to affect audio",id:"audio.allowFilter",input:{type:"checkbox",onChange:r=>{r.chartManager.chartAudio.reload()}}},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]}]},{type:"group",id:"play",label:"Play mode",children:[{type:"subgroup",label:"Calibration",children:[{type:"item",label:"Global offset",id:"play.offset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing a chart. Set to positive if you are hitting early and negative if you are hitting late."},{type:"item",label:"Sound effect offset",id:"play.effectOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing sound effects like assist tick and metronome."},{type:"item",label:"Visual offset",id:"play.visualOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when displaying notes."}]},{type:"subgroup",children:[{type:"item",label:"Judgement tilt",id:"play.judgementTilt",input:{type:"checkbox"},tooltip:"Tilts the judgement text left if you are hitting early and right if you are hitting late."},{type:"item",label:"Hide barlines during play",id:"play.hideBarlines",input:{type:"checkbox"}}]},{type:"subgroup",label:"Timing windows",children:[{type:"item",id:"play.timingCollection",label:"Timing window collection",input:{type:"dropdown",advanced:!1,get items(){return Object.keys(Je.getCollections())}}},{type:"item",id:"play.timingWindowScale",label:"Timing window scale",input:{type:"slider",min:0,step:.001,max:2,hardMax:2**31-1},tooltip:"Scales all timing windows by the given amount."},{type:"item",id:"play.timingWindowAdd",label:"Timing window add",input:{type:"slider",min:0,step:.001,max:1,hardMax:2**31-1},tooltip:"Adds this value (in seconds) to all timing windows."}]}]},{type:"group",id:"performance",label:"Performance",children:[{type:"item",label:"Antialiasing",id:"performance.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Resolution",id:"performance.resolution",input:{type:"slider",min:1,step:1,max:4,hardMin:0,hardMax:2**31-1},tooltip:"Requires a reload."}]},{type:"group",id:"debug",label:"Debug",children:[{type:"item",label:"Show FPS",id:"debug.showFPS",input:{type:"checkbox"}},{type:"item",label:"Show rendering timers",id:"debug.showTimers",input:{type:"checkbox"}},{type:"item",label:"Show scrolls/speeds debug visual",id:"debug.showScroll",input:{type:"checkbox"}},{type:"item",label:"Show noteskin errors",id:"debug.showNoteskinErrors",input:{type:"checkbox"}}]}];class DS extends St{app;observer;sectionContainer;constructor(e){super({title:"Options",width:600,height:400,disableClose:!1,win_id:"user_options",blocking:!1}),this.app=e,this.initView(),K.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for an option...",s.oninput=()=>{a.replaceChildren(),o.replaceChildren(...this.createOptions(this.filterOptions(s.value)))},i.appendChild(s);const n=document.createElement("div");n.classList.add("pref-scrollers");const a=document.createElement("div");a.classList.add("pref-section-scroller"),this.sectionContainer=a;const o=document.createElement("div");o.classList.add("pref-option-scroller"),n.replaceChildren(a,o),this.observer=new IntersectionObserver(l=>{l.forEach(c=>{const d=c.target.dataset.id,h=a.querySelector(`.pref-section[data-id=${d}]`);h&&(c.intersectionRatio>0?h.classList.add("selected"):h.classList.remove("selected"))})},{}),t.replaceChildren(i,n),a.replaceChildren(),o.replaceChildren(...this.createOptions(mf)),e.appendChild(t),this.viewElement.appendChild(e)}createOptions(e){return e.filter(t=>!t.disable?.(this.app)).map(t=>{const i=this.makeOption(t);return t.type=="group"&&(this.observer.observe(i),this.sectionContainer?.appendChild(this.createEmptyGroup(t))),i})}makeOption(e){const t=document.createElement("div");t.classList.add("pref-"+e.type),(e.type=="group"||e.type=="item")&&(t.dataset.id=e.id);const i=document.createElement("div");i.classList.add(`pref-${e.type}-label`),e.label!==void 0&&(i.innerText=e.label,t.appendChild(i));const s=Ae.getIcon("REVERT");if(e.type=="item"&&(s.style.width="12px",s.addEventListener("click",()=>{_.applyOption([e.id,_.getDefaultOption(e.id)]);const n=e.input.onChange;n?.(this.app,_.getDefaultOption(e.id)),K.emit("userOptionUpdated",e.id),t.replaceWith(this.makeOption(e))}),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",t.appendChild(s)),e.type=="item"){const n=_.getOption(e.id);let a;if(!e.input)return t;switch(i.innerText=e.label,e.input.type){case"checkbox":{const o=document.createElement("input"),l=e.input.onChange;o.type="checkbox",o.checked=n,o.onblur=null,o.onchange=()=>{_.applyOption([e.id,o.checked]),K.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",l?.(this.app,o.checked)},o.classList.add("pref-input","right"),o.onkeydown=c=>{c.key=="Enter"&&o.blur()},a=o;break}case"dropdown":{if(e.input.advanced){const o=e.input.transformers.deserialize,l=e.input.transformers.serialize,c=e.input.onChange,d=gi.create(e.input.items,l(n));d.onChange(h=>{_.applyOption([e.id,o(h)]),K.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(h))}),d.view.classList.add("pref-input","dropdown-right"),a=d.view}else{const o=e.input.onChange,l=gi.create(e.input.items,n);l.onChange(c=>{_.applyOption([e.id,c]),K.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,c)}),l.view.classList.add("pref-input","dropdown-right"),a=l.view}break}case"number":{const o=e.input.transformers?.deserialize??(h=>h),l=e.input.transformers?.serialize??(h=>h),c=e.input.onChange,d=ot.create(l(n),e.input.step,e.input.precision,e.input.min,e.input.max);d.onChange=h=>{if(!h){d.setValue(l(h));return}_.applyOption([e.id,o(h)]),K.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(h))},a=d.view;break}case"slider":{const o=e.input.transformers?.deserialize??(m=>m),l=e.input.transformers?.serialize??(m=>m),c=e.input.onChange,d=document.createElement("div");d.style.display="flex",d.style.alignItems="center";const h=document.createElement("input");h.type="range",h.min=e.input.min?.toString()??"",h.max=e.input.max?.toString()??"",h.step=e.input.step?.toString()??"1",h.value=l(n).toString();const u=document.createElement("input");u.type="text",u.value=(Math.round(l(n)*1e3)/1e3).toString();const p=e.input.min??e.input.hardMin??-Number.MAX_VALUE,f=e.input.max??e.input.hardMax??Number.MAX_VALUE;u.onblur=()=>{let m=ua(u.value);if(m===null){u.value=(Math.round(l(n)*1e3)/1e3).toString();return}m=Be(m,p,f),u.value=ae(m,3).toString(),u.blur(),u.value==""?u.value=l(m).toString():(_.applyOption([e.id,o(m)]),K.emit("userOptionUpdated",e.id)),h.value=m.toString(),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(m))},h.oninput=()=>{const m=parseFloat(h.value);u.value=ae(m,3).toString(),_.applyOption([e.id,o(m)]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block"},u.style.width="50px",u.onkeydown=m=>{m.key=="Enter"&&u.blur()},d.appendChild(h),d.appendChild(u),a=d;break}case"text":{const o=e.input.onChange,l=document.createElement("input");l.type="text",l.value=n.toString(),l.onblur=()=>{_.applyOption([e.id,l.value]),K.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,l.value)},l.onkeydown=c=>{c.key=="Enter"&&l.blur()},a=l;break}case"color":{const o=e.input.onChange,l=El.create({value:n});l.onColorChange=c=>{_.applyOption([e.id,c.toHexa()]),K.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,c)},a=l}}a.classList.add("pref-item-input"),t.appendChild(a)}else{const n=document.createElement("div");n.classList.add("pref-children"),t.appendChild(n),n.replaceChildren(...this.createOptions(e.children))}return e.type=="item"&&e.tooltip!==void 0&&Pt(t,{content:e.tooltip}),t}filterOptions(e,t=mf){const i=[];return t.forEach(s=>{if(s.label&&s.label.toLowerCase().includes(e.toLowerCase())){i.push(s);return}if(s.type=="group"||s.type=="subgroup"){const n=this.filterOptions(e,s.children);n.length!=0&&i.push({...s,children:n})}}),i}createEmptyGroup(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e.id,t.innerText=e.label,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e.id}]`).scrollIntoView()},t}onClose(){this.observer?.disconnect()}}var Yn=(r=>(r.SHIFT="Shift",r.CTRL="Ctrl",r.ALT="Alt",r.META="Command",r))(Yn||{});const Si=navigator.userAgent.indexOf("Mac OS X")>-1,dt=Si?"Command":"Ctrl",OS={Shift:Si?"⇧":"Shift",Ctrl:Si?"⌃":"Ctrl",Alt:Si?"⌥":"Alt",Command:"⌘"},gf={ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",BracketLeft:"[",BracketRight:"]",Semicolon:";",Quote:"'",Backslash:"\\",Slash:"/",Period:".",Comma:",",Backquote:"`",Minus:"-",Equal:"+"},vy={Home:Si?"fn Left":"Home",End:Si?"fn Right":"End",PageUp:Si?"fn Up":"End",PageDown:Si?"fn Down":"End"},tl=["ctrlKey","altKey","shiftKey","metaKey"],Co=["Ctrl","Alt","Shift","Command"],Tt={playback:{label:"Play/Pause",combos:[{key:"Space",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.playPause()},decreaseSnap:{label:"Decrease snap",combos:[{key:"Left",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.previousSnap()},increaseSnap:{label:"Increase snap",combos:[{key:"Right",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.nextSnap()},cursorUp:{label:"Move cursor up",combos:[{key:"Up",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>{r.chartManager.snapToPreviousTick()}},cursorDown:{label:"Move cursor down",combos:[{key:"Down",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>{r.chartManager.snapToNextTick()}},increaseScrollSpeed:{label:"Increase scroll speed",combos:[{key:"Up",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>_.chart.speed=Math.max(10,_.chart.speed*Math.pow(1.01,30))},decreaseScrollSpeed:{label:"Decrease scroll speed",combos:[{key:"Down",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>_.chart.speed=Math.max(10,_.chart.speed*Math.pow(1.01,-30))},zoomIn:{label:"Zoom in",combos:[{key:"+",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom+=.1,Se.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},zoomOut:{label:"Zoom out",combos:[{key:"-",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom=Math.max(.1,_.chart.zoom-.1),Se.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},zoomDefault:{label:"Reset zoom",combos:[{key:"0",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom=1,Se.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},newSong:{label:"New song...",bindLabel:"New song",combos:[{key:"N",mods:[dt]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new fy(r))}},openSong:{label:"Open song...",bindLabel:"Open song",combos:[{key:"O",mods:[dt]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>{if(window.nw){const e=document.createElement("input");e.type="file",e.accept=".sm,.ssc",e.onchange=()=>r.chartManager.loadSM(e.value),e.click()}else r.windowManager.openWindow(new my(r,!1))}},songProperties:{label:"Song properties...",bindLabel:"Open song properties",combos:[{key:"O",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new xS(r))},save:{label:"Save...",bindLabel:"Save",combos:[{key:"S",mods:[dt]}],disabled:r=>!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>r.chartManager.save()},export:{label:"Save and export current song",combos:[{key:"E",mods:[dt]}],disabled:r=>!!window.nw||!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>{r.chartManager.save(),Ue.getStandardHandler().saveDirectory(r.chartManager.smPath)}},exportNotedata:{label:"Export to notedata...",bindLabel:"Export to notedata",combos:[{key:"E",mods:[dt,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new dS(r,r.chartManager.selection.notes))},openChart:{label:"Chart list",bindLabel:"Open chart list",combos:[{key:"O",mods:[dt,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new ry(r))},timingDataRow:{label:"Edit timing data at row",combos:[{key:"T",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new LS(r))},selectRegion:{label:"Select region",combos:[{key:"Tab",mods:[]}],disabled:r=>!r.chartManager.loadedChart&&r.chartManager.getMode()!=X.Edit,callback:r=>r.chartManager.selectRegion()},volumeUp:{label:"Increase master volume",combos:[{key:"Up",mods:["Alt"]}],disabled:!1,callback:()=>{_.audio.masterVolume=Math.min(_.audio.masterVolume+.05,1),Se.create("Master volume: "+Math.round(_.audio.masterVolume*100)+"%")}},volumeDown:{label:"Decrease master volume",combos:[{key:"Down",mods:["Alt"]}],disabled:!1,callback:()=>{_.audio.masterVolume=Math.max(_.audio.masterVolume-.05,0),Se.create("Master volume: "+Math.round(_.audio.masterVolume*100)+"%")}},songVolumeUp:{label:"Increase song volume",combos:[{key:"Up",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{_.audio.songVolume=Math.min(_.audio.songVolume+.05,1),Se.create("Song volume: "+Math.round(_.audio.songVolume*100)+"%")}},songVolumeDown:{label:"Decrease song volume",combos:[{key:"Down",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{_.audio.songVolume=Math.max(_.audio.songVolume-.05,0),Se.create("Song volume: "+Math.round(_.audio.songVolume*100)+"%")}},effectvolumeUp:{label:"Increase tick/metronome volume",combos:[{key:"Up",mods:["Shift",dt,"Alt"]}],disabled:!1,callback:()=>{_.audio.soundEffectVolume=Math.min(_.audio.soundEffectVolume+.05,1),Se.create("Effect volume: "+Math.round(_.audio.soundEffectVolume*100)+"%")}},effectvolumeDown:{label:"Decrease tick/metronome volume",combos:[{key:"Down",mods:["Shift",dt,"Alt"]}],disabled:!1,callback:()=>{_.audio.soundEffectVolume=Math.max(_.audio.soundEffectVolume-.05,0),Se.create("Effect Volume: "+Math.round(_.audio.soundEffectVolume*100)+"%")}},rateUp:{label:"Increase playback rate",combos:[{key:"Right",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:()=>{_.audio.rate+=.05,Se.create("Playback Rate: "+Math.round(_.audio.rate*100)+"%")}},rateDown:{label:"Decrease playback rate",combos:[{key:"Left",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:()=>{_.audio.rate=Math.max(_.audio.rate-.05,.1),Se.create("Playback Rate: "+Math.round(_.audio.rate*100)+"%")}},rateDefault:{label:"Reset playback rate",combos:[],disabled:!1,callback:()=>{_.audio.rate=1,Se.create("Playback Rate: "+Math.round(_.audio.rate)+"%")}},previousMeasure:{label:"Previous measure",combos:[{key:"PageUp",mods:[]},{key:";",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>{const e=r.chartManager.getBeat(),t=r.chartManager.loadedChart.timingData.getMeasureLength(e-.001);r.chartManager.snapToNearestTick(Math.max(0,e-t))}},nextMeasure:{label:"Next measure",combos:[{key:"PageDown",mods:[]},{key:"'",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>{const e=r.chartManager.getBeat(),t=r.chartManager.loadedChart.timingData.getMeasureLength(e);r.chartManager.snapToNearestTick(Math.max(0,e+t))}},previousNote:{label:"Previous note",combos:[{key:",",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.previousNote()},nextNote:{label:"Next note",combos:[{key:".",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.nextNote()},jumpChartStart:{label:"Jump to first note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.firstNote()},jumpChartEnd:{label:"Jump to last note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.lastNote()},jumpSongStart:{label:"Jump to song start",combos:[{key:"Home",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.setBeat(Math.max(0,r.chartManager.loadedChart.getBeatFromSeconds(0)))},jumpSongEnd:{label:"Jump to song end",combos:[{key:"End",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.setBeat(r.chartManager.loadedChart.getBeatFromSeconds(r.chartManager.chartAudio.getSongLength()))},assistTick:{label:"Assist tick",combos:[{key:"F7",mods:[]}],disabled:()=>!Ie.assist,callback:()=>{_.audio.assistTick=!_.audio.assistTick,Se.create("Assist Tick: "+(_.audio.assistTick?"on":"off"))}},metronome:{label:"Metronome",combos:[{key:"F7",mods:["Alt"]}],disabled:()=>!Ie.assist,callback:()=>{_.audio.metronome=!_.audio.metronome,Se.create("Metronome: "+(_.audio.metronome?"on":"off"))}},XMod:{label:"XMod (Beat-based)",combos:[{key:"X",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.CMod=!1,Se.create("Switched to XMod")}},CMod:{label:"CMod (Time-based)",combos:[{key:"C",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.CMod=!0,Se.create("Switched to CMod")}},reverse:{label:"Reverse playfield",combos:[],disabled:!1,callback:()=>{_.chart.reverse=!_.chart.reverse,Se.create("Reverse Playfield: "+(_.chart.reverse?"on":"off"))}},hideWarpedArrows:{label:"Hide warped notes (CMod only)",combos:[{key:"W",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.hideWarpedArrows=!_.chart.hideWarpedArrows,Se.create("Hide Warped Arrows: "+(_.chart.hideWarpedArrows?"on":"off"))}},hideFakedArrows:{label:"Hide faked notes (CMod only)",combos:[{key:"F",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.hideFakedArrows=!_.chart.hideFakedArrows,Se.create("Hide Faked Arrows: "+(_.chart.hideFakedArrows?"on":"off"))}},doSpeedChanges:{label:"Do speed changes (XMod only)",combos:[{key:"S",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.doSpeedChanges=!_.chart.doSpeedChanges,Se.create("Speed Changes: "+(_.chart.doSpeedChanges?"on":"off"))}},showEq:{label:"Equalizer",combos:[{key:"E",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new hS(r))},detectSync:{label:"Detect audio sync",combos:[{key:"L",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new gy(r))},previousNoteType:{label:"Previous note type",combos:[{key:"N",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.previousNoteType()},nextNoteType:{label:"Next note type",combos:[{key:"M",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.Record,callback:r=>r.chartManager.nextNoteType()},undo:{label:"Undo",combos:[{key:"Z",mods:[dt]}],disabled:r=>!r.actionHistory.canUndo()||r.chartManager.getMode()!=X.Edit,callback:r=>r.actionHistory.undo()},redo:{label:"Redo",combos:[{key:"Y",mods:[dt]},{key:"Z",mods:[dt,"Shift"]}],disabled:r=>!r.actionHistory.canRedo()||r.chartManager.getMode()!=X.Edit,callback:r=>r.actionHistory.redo()},mousePlacement:{label:"Enable Mouse Note Placement",combos:[{key:"M",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.mousePlacement=!_.chart.mousePlacement,Se.create("Mouse Note Placement: "+(_.chart.mousePlacement?"on":"off"))}},playMode:{label:"Enter/Exit Play Mode",combos:[{key:"P",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Record||!Ie.playMode,callback:r=>r.chartManager.setMode(X.Play)},recordMode:{label:"Enter/Exit Record Mode",combos:[{key:"R",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.View||!Ie.recordMode,callback:r=>r.chartManager.setMode(X.Record)},playModeStart:{label:"Play from start",combos:[{key:"P",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Record||!Ie.playMode,callback:r=>{r.chartManager.setBeat(0),r.chartManager.setMode(X.Play)}},recordModeStart:{label:"Record from start",combos:[{key:"R",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==X.Play||r.chartManager.getMode()==X.View||!Ie.recordMode,callback:r=>r.chartManager.setMode(X.Record)},options:{label:"Options...",bindLabel:"Edit options",combos:[{key:",",mods:[dt]}],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new DS(r))}},keybinds:{label:"Keybinds...",bindLabel:"Edit keybinds",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new Ui(r))}},gameplayKeybinds:{label:"Gameplay keybinds...",bindLabel:"Edit gameplay keybinds",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new uS(r))}},themes:{label:"Themes...",bindLabel:"Edit themes",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows||fa.isOpen,callback:r=>{r.windowManager.openWindow(new Vc(r))}},convertHoldsRolls:{label:"Holds to rolls",bindLabel:"Convert holds to rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"&&(e.type="Roll"),e))}},convertRollsHolds:{label:"Rolls to holds",bindLabel:"Convert rolls to holds",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Roll"&&(e.type="Hold"),e))}},swapHoldsRolls:{label:"Swap holds and rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"?e.type="Roll":e.type=="Roll"&&(e.type="Hold"),e))}},convertHoldsTaps:{label:"Holds/rolls to taps",bindLabel:"Convert holds/rolls to taps",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>((e.type=="Hold"||e.type=="Roll")&&(e.type="Tap"),e))}},convertTapsMines:{label:"Taps to mines",bindLabel:"Convert ntapsotes to mines",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Mine"),e))}},convertTapsLifts:{label:"Taps to lifts",bindLabel:"Convert taps to lifts",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Lift"),e))}},convertTapsFakes:{label:"Taps to fakes",bindLabel:"Convert taps to fakes",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Fake"),e))}},mirrorHorizontally:{label:"Horizontally",bindLabel:"Mirror horizontally",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e))}},mirrorVertically:{label:"Vertically",bindLabel:"Mirror vertically",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},mirrorBoth:{label:"Both",bindLabel:"Mirror both",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},selectBeforeCursor:{label:"Select before cursor",combos:[{key:"Home",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ne.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beate.beat!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ne.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beat>r.chartManager.getBeat())):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData().filter(e=>e.beat>r.chartManager.getBeat()))}},selectAll:{label:"Select all",combos:[{key:"A",mods:[dt]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ne.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata()):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData())}},expand2to1:{label:"Expand 2:1 (8th to 4th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=X.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*2+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=2,t.hold=Math.round(t.hold*48)/48),t))}},expand3to2:{label:"Expand 3:2 (12th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=X.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*1.5+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=1.5,t.hold=Math.round(t.hold*48)/48),t))}},expand4to3:{label:"Expand 4:3 (16th to 2th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=X.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*4/3+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=4/3,t.hold=Math.round(t.hold*48)/48),t))}},compress1to2:{label:"Compress 1:2 (4th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=X.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/2+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold/=2,t.hold=Math.round(t.hold*48)/48),t))}},compress2to3:{label:"Compress 2:3 (8th to 12th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=X.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/1.5+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold/=1.5,t.hold=Math.round(t.hold*48)/48),t))}},compress3to4:{label:"Compress 3:4 (12th to 16th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=X.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*.75+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=.75,t.hold=Math.round(t.hold*48)/48),t))}},quantize4th:{label:"4ths",bindLabel:"Quantize to 4ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,4),e.beat=Math.round(e.beat*48)/48,e))}},quantize8th:{label:"8ths",bindLabel:"Quantize to 8ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,8),e.beat=Math.round(e.beat*48)/48,e))}},quantize12th:{label:"12ths",bindLabel:"Quantize to 12ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,12),e.beat=Math.round(e.beat*48)/48,e))}},quantize16th:{label:"16ths",bindLabel:"Quantize to 16ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,16),e.beat=Math.round(e.beat*48)/48,e))}},quantize24th:{label:"24ths",bindLabel:"Quantize to 24ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,24),e.beat=Math.round(e.beat*48)/48,e))}},quantize32nd:{label:"32nds",bindLabel:"Quantize to 32nds",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,32),e.beat=Math.round(e.beat*48)/48,e))}},quantize48th:{label:"48ths",bindLabel:"Quantize to 48ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,48),e.beat=Math.round(e.beat*48)/48,e))}},quantize96th:{label:"96ths",bindLabel:"Quantize to 96ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=X.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,96),e.beat=Math.round(e.beat*48)/48,e))}},delete:{label:"Delete",combos:[{key:"Backspace",mods:[]},{key:"Delete",mods:[]}],disabled:r=>r.chartManager.getMode()!=X.Edit||r.chartManager.selection.notes.length==0&&r.chartManager.eventSelection.timingEvents.length==0,callback:r=>{r.chartManager.deleteSelection(),r.chartManager.deleteEventSelection()}},paste:{label:"Paste",combos:[{mods:[dt],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=X.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e)}},pasteReplace:{label:"Clear and paste",combos:[{mods:[dt,"Shift"],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=X.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e,!0)}},copy:{label:"Copy",combos:[{mods:[dt],key:"C"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=X.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e)}},cut:{label:"Cut",combos:[{mods:[dt],key:"X"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=X.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e),r.chartManager.deleteSelection()}},adjustOffset:{label:"Adjust offset",combos:[],disabled:()=>!Ie.openWindows,callback:r=>r.windowManager.openWindow(new _S(r))},setSongPreview:{label:"Set as song preview",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=X.Edit||!r.chartManager.hasRange(),callback:r=>{const e=r.chartManager.loadedChart,t=r.chartManager.loadedSM.properties.SAMPLESTART??"0",i=r.chartManager.loadedSM.properties.SAMPLELENGTH??"10";let s="",n="";if(r.chartManager.startRegion!==void 0&&r.chartManager.endRegion!==void 0){const a=e.getSecondsFromBeat(r.chartManager.startRegion),o=e.getSecondsFromBeat(r.chartManager.endRegion);s=ae(a,3).toString(),n=ae(o-a,3).toString()}else{const o=(r.chartManager.selection.notes.length>0?r.chartManager.selection.notes:r.chartManager.eventSelection.timingEvents).map(d=>d.beat),l=e.getSecondsFromBeat(Math.min(...o)),c=e.getSecondsFromBeat(Math.max(...o));s=ae(l,3).toString(),n=ae(c-l,3).toString()}mt.instance.run({action:a=>{a.chartManager.loadedSM.properties.SAMPLESTART=s,a.chartManager.loadedSM.properties.SAMPLELENGTH=n},undo:()=>{r.chartManager.loadedSM.properties.SAMPLESTART=t,r.chartManager.loadedSM.properties.SAMPLELENGTH=i}})}},showDebugTimers:{label:"Toggle Debug Timers",combos:[{key:"F3",mods:["Shift"]}],disabled:!1,callback:()=>{_.debug.showTimers=!_.debug.showTimers}},showFPSCounter:{label:"Toggle FPS Counter",combos:[{key:"F3",mods:[]}],disabled:!1,callback:()=>{_.debug.showFPS=!_.debug.showFPS}},noteTypeTap:{label:"Switch to Taps",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Tap")}},noteTypeLift:{label:"Switch to Lifts",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Lift")}},noteTypeMine:{label:"Switch to Mines",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Mine")}},noteTypeFake:{label:"Switch to Fakes",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Fake")}},quant4:{label:"Switch to 4ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1}},quant8:{label:"Switch to 8ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/2}},quant12:{label:"Switch to 12ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/3}},quant16:{label:"Switch to 16ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/4}},quant24:{label:"Switch to 24ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/6}},quant32:{label:"Switch to 32ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/8}},quant48:{label:"Switch to 48ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/12}},quant96:{label:"Switch to 96ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/24}},quant192:{label:"Switch to 192nds",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/48}},openGuide:{label:"Open Help Guide",combos:[],disabled:!1,callback:()=>{window.open("/smeditor/guide/")}},noteskinWindow:{label:"Noteskins...",bindLabel:"Open Noteskin Window",combos:[{mods:["Shift"],key:"N"}],disabled:r=>!r.chartManager.chartView,callback:r=>r.windowManager.openWindow(new wS(r))},previousChart:{label:"Previous chart",combos:[{key:"F5",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t-1]&&r.chartManager.loadChart(e[t-1])}},nextChart:{label:"Next chart",combos:[{key:"F6",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t+1]&&r.chartManager.loadChart(e[t+1])}}};class FS{static popup;static open(e,t){this.popup=this.build(e,t),document.getElementById("popups")?.appendChild(this.popup)}static build(e,t){const i=document.createElement("div");i.classList.add("update-popup");const s=document.createElement("div");s.classList.add("title"),s.innerText=`A new version of the desktop app is available! (${e})`;const n=document.createElement("div");return n.classList.add("desc"),n.innerText="Click here to download the new version.",i.replaceChildren(s,n),i.onclick=()=>{localStorage.setItem("downloadedVersion",e),nw.require("nw.gui").Shell.openExternal(t),this.close()},i}static close(){this.popup&&(this.popup.style.opacity="0",this.popup.onclick=null,setTimeout(()=>this.popup.remove(),300))}}class jt extends sg{static graphics=new An;static textures={default:Ft.create({width:50,height:50}),noBorder:Ft.create({width:50,height:50}),onlyBorder:Ft.create({width:50,height:50})};static init(e){this.textures.default=Ft.create({width:50,height:50,resolution:e.resolution}),this.textures.noBorder=Ft.create({width:50,height:50,resolution:e.resolution}),this.textures.onlyBorder=Ft.create({width:50,height:50,resolution:e.resolution}),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(1,0),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.default}),this.graphics.clear(),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(0,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.noBorder}),this.graphics.clear(),this.graphics.beginFill(16777215,0),this.graphics.lineStyle(2,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.onlyBorder})}constructor(e){super(jt.textures[e??"default"],5,5,5,5)}}const Xn=[];function yf(){return Xn.length}function iM(){for(Xn.push(Date.now());Xn.length>0&&Xn[0]0&&qn[0]yf()+" FPS"});drawUpdateTimeGraph=new Fn({width:300,height:wi,color:6034982,min:0,unit:"ms",label:"DrawUpdate",precision:1});updateTimeGraph=new Fn({width:300,height:wi,color:1516101,min:0,unit:"ms",label:"Update",precision:1,sublabel:()=>vf()+" TPS"});memoryTimeGraph=new Fn({width:300,height:wi,color:6626406,min:0,formatter:e=>Math.round(e/1048576)+" MB",label:"Memory"});cpuGraph=new Fn({width:300,height:wi,color:5190685,min:0,label:"CPU"});graphs=new Ee;fpsCounter=new Ee;fpsBg=new jt("noBorder");fpsText=new De("",{fontName:"Main",fontSize:12});lastFrameTime=0;constructor(e){super(e),this.drawUpdateTimeGraph.y+=wi+5,this.updateTimeGraph.y+=(wi+5)*2,this.memoryTimeGraph.y+=(wi+5)*3,this.cpuGraph.y+=(wi+5)*4,ma.instance=this,this.fpsText.x=5,this.fpsBg.y=-5,et(this.fpsBg,"widget-bg"),et(this.fpsText,"text-color"),this.graphs.addChild(this.frameTimeGraph,this.drawUpdateTimeGraph,this.updateTimeGraph),performance.memory&&this.graphs.addChild(this.memoryTimeGraph),this.fpsCounter.addChild(this.fpsBg,this.fpsText),this.graphs.visible=_.debug.showTimers,this.fpsCounter.visible=_.debug.showFPS,this.addChild(this.graphs,this.fpsCounter)}update(){this.x=-this.manager.app.renderer.screen.width/2+20,this.y=-this.manager.app.renderer.screen.height/2+20,this.graphs.children.forEach(e=>e.update()),this.graphs.visible=_.debug.showTimers,this.fpsCounter.visible=_.debug.showFPS,this.fpsText.text=`${yf()} FPS +`;class ot{view;input;onChange;min=-Number.MAX_VALUE;max=Number.MAX_VALUE;precision;step=1;lastVal="";constructor(e,t,i,s,n,a){this.view=e,this.view.classList.add("spinner"),this.view.onfocus=()=>{o.focus()};const o=document.createElement("input");o.classList.add("spinner-input"),o.type="text",o.autocomplete="off",o.spellcheck=!1,o.onblur=()=>{if(o.value===this.lastVal)return;if(o.value===""){this.onChange?.(void 0);return}const h=ua(o.value);if(h===null){o.value=this.lastVal;return}let u=ae(h,this.precision??3);u=Be(u,this.min,this.max),o.value=this.formatValue(u),this.onChange?.(u)},o.onkeydown=h=>{h.key=="Enter"&&o.blur(),h.key=="Escape"&&(o.value=this.lastVal,o.blur())},o.onfocus=()=>{this.lastVal=o.value},this.input=o,this.min=n??this.min,this.max=a??this.max,this.step=i,this.precision=s,this.setValue(t),e.appendChild(o);const l=document.createElement("div");l.classList.add("spinner-btns"),e.appendChild(l);const c=document.createElement("button");c.classList.add("spinner-up"),c.appendChild(Ae.getIcon("CHEVRON",10)),c.tabIndex=-1,c.onclick=h=>{let u=i??_.general.spinnerStep;h.getModifierState("Shift")&&(u/=10),!(a!==void 0&&parseFloat(o.value)+u>a)&&(o.value=this.formatValue(parseFloat(o.value)+u),this.onChange?.(parseFloat(o.value)))},l.appendChild(c);const d=document.createElement("button");d.classList.add("spinner-down"),d.appendChild(Ae.getIcon("CHEVRON",10)),d.tabIndex=-1,d.onclick=h=>{let u=i??_.general.spinnerStep;h.getModifierState("Shift")&&(u/=10),!(n!==void 0&&parseFloat(o.value)-ur.chartManager.loadAudio()}},{title:"Background Image",propName:"BACKGROUND",input:{type:"file",typeName:"image",accept:ns}},{title:"Banner Image",propName:"BANNER",input:{type:"file",typeName:"image",accept:ns}},{title:"CD Title",propName:"CDTITLE",input:{type:"file",typeName:"image",accept:ns}},{title:"CD Image",propName:"CDIMAGE",input:{type:"file",typeName:"image",accept:ns}},{title:"Jacket",propName:"JACKET",input:{type:"file",typeName:"image",accept:ns}},{title:"Disc Image",propName:"DISCIMAGE",input:{type:"file",typeName:"image",accept:ns}}]},{title:"Song",items:[{title:"Song Preview",propName:"SAMPLESTART",input:{type:"custom",create:(r,e,t)=>{const i=t??mt.instance,s=()=>{a.value{(e??p.chartManager.loadedSM).properties.SAMPLESTART=h,(e??p.chartManager.loadedSM).properties.SAMPLELENGTH=u,n.setValue(parseFloat(h)),a.setValue(parseFloat(h)+parseFloat(u))},undo:()=>{(e??r.chartManager.loadedSM).properties.SAMPLESTART=c,(e??r.chartManager.loadedSM).properties.SAMPLELENGTH=d,n.setValue(parseFloat(c)),a.setValue(parseFloat(c)+parseFloat(d))}})},n=ot.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"),void 0,3,0);n.onChange=c=>{if(c===void 0){n.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"));return}s()};const a=ot.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"),void 0,3,0);a.onChange=c=>{if(c===void 0){a.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"));return}s()};const o=document.createElement("div"),l=document.createElement("div");return l.innerText="to",o.classList.add("flex-row","flex-column-gap"),o.replaceChildren(n.view,l,a.view),o}}}]}];function py(r,e,t,i){const s=i??mt.instance;switch(e.input.type){case"custom":return e.input.create(r,t,i);case"string":{const n=document.createElement("input");return n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{const a=(t??r.chartManager.loadedSM).properties[e.propName],o=n.value;s.run({action:l=>{(t??l.chartManager.loadedSM).properties[e.propName]=o,n.value=o},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=a,n.value=a??""}})},n.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",n}case"number":{const n=e.input,a=ot.create(parseFloat((t??r.chartManager.loadedSM).properties[e.propName])??15,n.step,n.precision,n.min,n.max);return a.onChange=o=>{if(o===void 0){a.setValue(parseFloat((t??r.chartManager.loadedSM).properties[e.propName]??"0"));return}const l=(t??r.chartManager.loadedSM).properties[e.propName],c=o.toString();s.run({action:d=>{(t??d.chartManager.loadedSM).properties[e.propName]=c,a.setValue(parseFloat(c))},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=l,a.setValue(parseFloat(l??"0"))}})},a.view}case"file":{const n=e.input,a=e.input.onChange,o=document.createElement("div");o.classList.add("flex-row","flex-column-gap");const l=document.createElement("input");l.type="text",l.autocomplete="off",l.spellcheck=!1,l.placeholder="click to select a file",l.onclick=h=>{h.preventDefault(),l.blur();const u=Ot(r.chartManager.smPath);if(window.nw){const p=document.createElement("input");p.type="file",p.accept=n.accept.join(","),p.onchange=()=>{const f=Ue.getRelativePath(u,p.value),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=f,l.value=f},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)},p.click()}else r.windowManager.openWindow(new kd(r,{title:`Select a${n.typeName.match(/^[aieouAIEOU].*/)?"n":""} ${n.typeName} file...`,accepted_file_types:n.accept,disableClose:!0,callback:p=>{const f=Ue.getRelativePath(u,p),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=f,l.value=f},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)}},(t??r.chartManager.loadedSM).properties[e.propName]?u+"/"+(t??r.chartManager.loadedSM).properties[e.propName]:r.chartManager.smPath))},l.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",o.appendChild(l);const c=document.createElement("button");c.style.height="100%",c.classList.add("delete"),c.disabled=!(t??r.chartManager.loadedSM).properties[e.propName],c.onclick=()=>{l.value="",c.disabled=!0};const d=Ae.getIcon("TRASH",12);return c.appendChild(d),o.appendChild(c),o}}}class fy extends St{app;sm;actionHistory;fileTable={};constructor(e){super({title:"New Song",width:450,height:492,disableClose:!0,win_id:"sm_properties",blocking:!0});const t=new Blob([gS],{type:"text/plain"}),i=new File([t],"song.sm",{type:"text/plain"});this.sm=new dy(i),this.app=e,this.actionHistory=new mt(this.app),this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",uy.forEach(l=>{const c=document.createElement("div");c.classList.add("sm-container");const d=document.createElement("div");d.classList.add("sm-title"),d.innerText=l.title;const h=document.createElement("div");h.classList.add("property-grid"),l.items.forEach(u=>{const p=document.createElement("div");p.classList.add("label"),p.innerText=u.title,h.appendChild(p),u.input.type=="file"?h.appendChild(this.createFileElement(u.propName,u.input.typeName)):h.appendChild(py(this.app,u,this.sm,this.actionHistory))}),c.appendChild(d),c.appendChild(h),e.appendChild(c)});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow()};const o=document.createElement("button");o.innerText="Create",o.classList.add("confirm"),o.onclick=()=>{this.sm.properties.MUSIC===void 0||this.sm.properties.MUSIC===""?this.app.windowManager.openWindow(new Tl(this.app,"No audio file uploaded","Are you sure you want to create a file with no audio?",[{type:"confirm",label:"Yes",callback:()=>{this.createSong(),this.closeWindow()}},{type:"default",label:"No"}])):(this.createSong(),this.closeWindow())},s.appendChild(a),n.appendChild(o),e.appendChild(i),this.viewElement.appendChild(e)}async createSong(){let e=this.sm.properties.TITLE;if(window.nw){const t=nw.require("path"),i=document.createElement("input");i.type="file",i.nwsaveas=e+".sm",i.onchange=async()=>{const s=t.basename(i.value,t.extname(i.value));e=t.dirname(i.value);const n=t.join(e,s+".sm");await Ue.writeFile(n,this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(a=>Ue.writeFile(e+`/${a[0]}`,a[1]))),await this.app.chartManager.loadSM(n),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()},i.click()}else{if(await Ue.getDirectoryHandle(e)){let t=2;for(;await Ue.getDirectoryHandle(e);)e=`${this.sm.properties.TITLE} ${t++}`}await Ue.writeFile(e+"/song.sm",this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(t=>Ue.writeFile(e+`/${t[0]}`,t[1]))),await this.app.chartManager.loadSM(e+"/song.sm"),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()}}createFileElement(e,t){const i=document.createElement("div");i.classList.add("flex-row","flex-column-gap");const s=document.createElement("input");s.type="text",s.autocomplete="off",s.spellcheck=!1,s.placeholder="click to upload a file",s.style.color="white",s.readOnly=!0,s.onclick=o=>{o.preventDefault(),s.blur();const l=document.createElement("input");l.type="file",l.accept=t=="audio"?"audio/*":"image/*",l.onchange=()=>{const c=l.files?.[0];if(!c)return;this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]];let d=c.name;for(;this.fileTable[c.name]&&(this.fileTable[c.name].size!=c.size||this.fileTable[c.name].type!=c.type);)d="_"+d;this.fileTable[d]=c,s.value=d,this.sm.properties[e]=s.value,n.disabled=!1},l.click()},s.value=this.sm.properties[e]??"",i.appendChild(s);const n=document.createElement("button");n.style.height="100%",n.classList.add("delete"),n.disabled=!0,n.onclick=()=>{this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]],this.sm.properties[e]=void 0,s.value="",n.disabled=!0};const a=Ae.getIcon("TRASH",12);return n.appendChild(a),i.appendChild(n),i}}class my extends St{app;keyHandler;constructor(e,t=!0){super({title:"Open a Song",width:400,height:320,disableClose:t,win_id:"select_sm_initial"}),this.app=e,this.keyHandler=this.handleKeyEvent.bind(this),window.addEventListener("keydown",this.keyHandler),this.initView(),q.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}onClose(){window.removeEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("open-container"),e.appendChild(t);const i=document.createElement("div");i.classList.add("top-container");const s=document.createElement("div");s.classList.add("separator"),s.style.margin="10px";const n=document.createElement("div");n.classList.add("bottom-container"),t.appendChild(i),t.appendChild(s),t.appendChild(n);const a=document.createElement("button");a.style.display="flex",a.style.flexDirection="column",a.style.padding="10px",a.style.backgroundColor="#414352",a.style.color="white",i.appendChild(a);const o=Ae.getIcon("UPLOAD",30);a.appendChild(o);const l=document.createElement("div");l.innerText=window.nw?"Open an existing song":"Import a song folder",a.appendChild(l),a.onclick=()=>{if(window.nw){const f=document.createElement("input");f.type="file",f.accept=".sm,.ssc",f.onchange=()=>{this.app.chartManager.loadSM(f.value),this.closeWindow()},f.click()}else this.app.windowManager.openWindow(new kd(this.app,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:f=>{this.app.chartManager.loadSM(f),this.closeWindow()}}))};const c=document.createElement("button");c.style.display="flex",c.style.flexDirection="column",c.style.padding="10px",c.style.backgroundColor="#506352",c.style.color="white",i.appendChild(c);const d=Ae.getIcon("PLUS",30);c.appendChild(d);const h=document.createElement("div");h.innerText="New Song",c.appendChild(h),c.onclick=()=>{this.app.windowManager.openWindow(new fy(this.app))};const u=document.createElement("div");u.innerText="Recently Opened",u.classList.add("title"),n.appendChild(u);const p=document.createElement("div");p.classList.add("recent-selector"),n.appendChild(p),hy.getRecents().then(f=>f.forEach(m=>{const g=document.createElement("div");g.classList.add("recent-item");const y=document.createElement("div");y.classList.add("recent-name"),y.innerText=m.name;const w=document.createElement("div");w.classList.add("recent-path"),w.innerText=m.path,g.appendChild(y),g.appendChild(w),g.onclick=()=>{p.querySelectorAll(".selected").forEach(b=>b.classList.remove("selected")),g.classList.add("selected")},g.ondblclick=()=>{this.app.chartManager.loadSM(m.path),this.closeWindow()},p.appendChild(g)})),this.viewElement.appendChild(e)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".selected");if(t){if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.previousElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),ra(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.nextElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),ra(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}}}}function tM(){const r=new URLSearchParams(location.search),e=r.get("flags");if(e!=null){const n=new Set(e.split("").map(a=>vS[a]).filter(a=>a));for(const a of n.values())Ie[a]=!Ie[a]}const t=r.get("url");if(t!=null)try{Ie.url=new URL(t).toString()}catch{Se.createFormatted("Invalid url "+t,"warn"),Ie.url=null}const i=r.get("chartIndex");if(i!=null)try{Ie.chartIndex=parseInt(i)}catch{Se.createFormatted("Invalid chartIndex "+i,"warn"),Ie.chartIndex=null}const s=r.get("chartType");s!==null&&(ze.getGameType(s)?Ie.chartType=s:(Se.createFormatted("Invalid chartType "+s,"warn"),Ie.chartType=null))}const yS={viewMode:{char:"V",name:"Force view mode (disables record mode)"},menuBar:{char:"M",name:"Hide menu bar"},playbackOptions:{char:"o",name:"Hide playback options"},barlines:{char:"B",name:"Hide barlines, waveform, and timing boxes"},assist:{char:"A",name:"Disable assist sounds"},recordMode:{char:"R",name:"Disable record mode"},playMode:{char:"P",name:"Disable play mode"},layout:{char:"L",name:"Hide note layout"},status:{char:"S",name:"Hide status bar"},autoPlay:{char:"a",name:"Play automatically"},openWindows:{char:"O",name:"Disable opening windows"},hidePoweredByText:{char:"H",name:'Hide "Powered by SMEditor" text'}},vS=Object.fromEntries(Object.entries(yS).map(([r,e])=>[e.char,r])),Ie={viewMode:!1,menuBar:!0,playbackOptions:!0,barlines:!0,assist:!0,recordMode:!0,playMode:!0,layout:!0,status:!0,autoPlay:!1,hidePoweredByText:!1,openWindows:!0,url:null,chartIndex:null,chartType:null},$n={file:{type:"menu",title:"File",options:[{type:"selection",id:"newSong"},{type:"selection",id:"openSong"},{type:"separator"},{type:"selection",id:"save"},{type:"selection",id:"export"}]},edit:{type:"menu",title:"Edit",options:[{type:"selection",id:"cut"},{type:"selection",id:"copy"},{type:"selection",id:"paste"},{type:"selection",id:"pasteReplace"},{type:"separator"},{type:"selection",id:"undo"},{type:"selection",id:"redo"},{type:"separator"},{type:"checkbox",id:"mousePlacement",checked:()=>_.chart.mousePlacement}]},view:{type:"menu",title:"View",options:[{type:"dropdown",title:"Cursor",options:[{type:"selection",id:"cursorUp"},{type:"selection",id:"cursorDown"},{type:"separator"},{type:"selection",id:"previousNote"},{type:"selection",id:"nextNote"},{type:"separator"},{type:"selection",id:"previousMeasure"},{type:"selection",id:"nextMeasure"},{type:"separator"},{type:"selection",id:"jumpChartStart"},{type:"selection",id:"jumpChartEnd"},{type:"separator"},{type:"selection",id:"jumpSongStart"},{type:"selection",id:"jumpSongEnd"}]},{type:"dropdown",title:"Snap",options:[{type:"selection",id:"decreaseSnap"},{type:"selection",id:"increaseSnap"}]},{type:"dropdown",title:"Scroll",options:[{type:"checkbox",id:"XMod",checked:()=>!_.chart.CMod},{type:"checkbox",id:"CMod",checked:()=>_.chart.CMod},{type:"separator"},{type:"selection",id:"increaseScrollSpeed"},{type:"selection",id:"decreaseScrollSpeed"}]},{type:"dropdown",title:"Zoom",options:[{type:"selection",id:"zoomIn"},{type:"selection",id:"zoomOut"},{type:"separator"},{type:"selection",id:"zoomDefault"}]},{type:"separator"},{type:"selection",id:"playMode"},{type:"selection",id:"playModeStart"},{type:"separator"},{type:"selection",id:"recordMode"},{type:"selection",id:"recordModeStart"},{type:"separator"},{type:"checkbox",id:"reverse",checked:()=>_.chart.reverse},{type:"checkbox",id:"hideWarpedArrows",checked:()=>_.chart.hideWarpedArrows},{type:"checkbox",id:"hideFakedArrows",checked:()=>_.chart.hideFakedArrows},{type:"checkbox",id:"doSpeedChanges",checked:()=>_.chart.doSpeedChanges}]},chart:{type:"menu",title:"Chart",options:[{type:"selection",id:"openChart"},{type:"separator"},{type:"selection",id:"previousChart"},{type:"selection",id:"nextChart"},{type:"separator"},{type:"selection",id:"songProperties"},{type:"separator"},{type:"selection",id:"timingDataRow"}]},selection:{type:"menu",title:"Selection",options:[{type:"dropdown",title:"Convert",options:[{type:"selection",id:"convertHoldsRolls"},{type:"selection",id:"convertRollsHolds"},{type:"selection",id:"swapHoldsRolls"},{type:"separator"},{type:"selection",id:"convertHoldsTaps"},{type:"selection",id:"convertTapsMines"},{type:"selection",id:"convertTapsLifts"},{type:"selection",id:"convertTapsFakes"}]},{type:"dropdown",title:"Mirror",options:[{type:"selection",id:"mirrorHorizontally"},{type:"selection",id:"mirrorVertically"},{type:"selection",id:"mirrorBoth"}]},{type:"dropdown",title:"Stretch",options:[{type:"selection",id:"expand2to1"},{type:"selection",id:"expand3to2"},{type:"selection",id:"expand4to3"},{type:"separator"},{type:"selection",id:"compress1to2"},{type:"selection",id:"compress2to3"},{type:"selection",id:"compress3to4"}]},{type:"dropdown",title:"Quantize",options:[{type:"selection",id:"quantize4th"},{type:"selection",id:"quantize8th"},{type:"selection",id:"quantize12th"},{type:"selection",id:"quantize16th"},{type:"selection",id:"quantize24th"},{type:"selection",id:"quantize32nd"},{type:"selection",id:"quantize48th"},{type:"selection",id:"quantize96th"}]},{type:"separator"},{type:"selection",id:"setSongPreview"},{type:"separator"},{type:"selection",id:"exportNotedata"},{type:"separator"},{type:"selection",id:"selectBeforeCursor"},{type:"selection",id:"selectAfterCursor"},{type:"selection",id:"selectAll"}]},audio:{type:"menu",title:"Audio",options:[{type:"selection",id:"detectSync"},{type:"separator"},{type:"checkbox",id:"assistTick",checked:()=>_.audio.assistTick&&Ie.assist},{type:"checkbox",id:"metronome",checked:()=>_.audio.metronome&&Ie.assist},{type:"separator"},{type:"dropdown",title:()=>"Master Volume ("+Math.round(_.audio.masterVolume*100)+"%)",options:[{type:"selection",id:"volumeUp"},{type:"selection",id:"volumeDown"}]},{type:"dropdown",title:()=>"Song Volume ("+Math.round(_.audio.songVolume*100)+"%)",options:[{type:"selection",id:"songVolumeUp"},{type:"selection",id:"songVolumeDown"}]},{type:"dropdown",title:()=>"Effect Volume ("+Math.round(_.audio.soundEffectVolume*100)+"%)",options:[{type:"selection",id:"effectvolumeUp"},{type:"selection",id:"effectvolumeDown"}]},{type:"dropdown",title:()=>"Playback rate ("+Math.round(_.audio.rate*100)+"%)",options:[{type:"selection",id:"rateUp"},{type:"selection",id:"rateDown"},{type:"separator"},{type:"selection",id:"rateDefault"}]},{type:"separator"},{type:"selection",id:"showEq"}]},preferences:{type:"menu",title:"Preferences",options:[{type:"selection",id:"options"},{type:"selection",id:"themes"},{type:"selection",id:"keybinds"},{type:"selection",id:"gameplayKeybinds"},{type:"selection",id:"noteskinWindow"}]},help:{type:"menu",title:"Help",options:[{type:"selection",id:"openGuide"}]}},lf=["cut","copy","paste","pasteReplace"],hf={edit:[{ids:["delete"],after:"redo"},{ids:["previousNoteType","nextNoteType","noteTypeTap","noteTypeMine","noteTypeFake","noteTypeLift","quant4","quant8","quant12","quant16","quant24","quant32","quant48","quant96","quant192"],after:"mousePlacement"}],view:[{ids:["playback","selectRegion"]}],debug:[{ids:["showFPSCounter","showDebugTimers"]}]};class Ui extends St{static GROUPS;app;observer;searchDropdown;conflictMap=this.calculateConflicts();constructor(e){super({title:"Keybind Options",width:600,height:400,disableClose:!1,win_id:"keybind_options",blocking:!1}),this.app=e,Ui.GROUPS||(Ui.GROUPS=Ui.createGroups()),this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for a keybind...",s.oninput=()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))};const n=gi.create(["Name","Key"],"Name");n.onChange(()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))}),this.searchDropdown=n,i.replaceChildren(s,n.view);const a=document.createElement("div");a.classList.add("pref-scrollers");const o=document.createElement("div");o.classList.add("pref-section-scroller");const l=document.createElement("div");l.classList.add("pref-option-scroller"),a.replaceChildren(o,l),this.observer=new IntersectionObserver(c=>{c.forEach(d=>{const h=d.target.dataset.id,u=o.querySelector(`.pref-section[data-id=${h}]`);u&&(d.intersectionRatio>0?u.classList.add("selected"):u.classList.remove("selected"))})},{}),t.replaceChildren(i,a),o.replaceChildren(...this.createSections()),l.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(e=""){return Object.keys(Ui.GROUPS).filter(t=>Ui.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>this.createEmptySection($n[t]?.title??Nc(t),t))}createOptions(e=""){return Object.keys(Ui.GROUPS).filter(t=>Ui.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>{const i=Ui.GROUPS[t].filter(a=>this.filterID(e,a)).map(a=>this.createKeybindItem(a)),s=document.createElement("div");s.classList.add("pref-group"),s.dataset.id=t;const n=document.createElement("div");return n.classList.add("pref-group-label"),n.innerText=$n[t]?.title??Nc(t),s.replaceChildren(n,...i),this.observer.observe(s),s})}static createGroups(){const e=Object.keys(Tt),t={};return Object.keys($n).forEach(i=>{t[i]=this.expandMenubarOptions($n[i]).map(s=>{const n=e.indexOf(s);return n!=-1&&e.splice(n,1),s}).filter(s=>!lf.includes(s))}),Object.keys(hf).forEach(i=>{t[i]===void 0&&(t[i]=[]),hf[i].forEach(s=>{const n=s.after?t[i].findIndex(a=>s.after==a)+1:0;t[i].splice(n,0,...s.ids),s.ids.forEach(a=>{const o=e.indexOf(a);o!=-1&&e.splice(o,1)})})}),lf.forEach(i=>{const s=e.indexOf(i);s!=-1&&e.splice(s,1)}),e.length>0&&(console.warn("Missing keybinds not shown:"),console.warn(e)),t}filterID(e,t){if((this.searchDropdown?.value??"Name")=="Name")return(Tt[t].bindLabel??Tt[t].label).toLowerCase().includes(e.toLowerCase());{const i=Re.getCombosForKeybind(t);if(i.some(n=>n.key.toLowerCase().includes(e.toLowerCase()))||i.some(n=>(vy[n.key]??n.key).toLowerCase().includes(e.toLowerCase())))return!0;let s=e.split(" ").map(n=>n.toLowerCase());return i.some(n=>(s.includes("shift")||s.includes("⇧"))&&!n.mods.includes(Xn.SHIFT)||(s.includes("ctrl")||s.includes("control")||s.includes("⌃"))&&!n.mods.includes(Xn.CTRL)||(s.includes("meta")||s.includes("cmd")||s.includes("command")||s.includes("⌘"))&&!n.mods.includes(Xn.META)||(s.includes("alt")||s.includes("⌥"))&&!n.mods.includes(Xn.ALT)?!1:(s=s.filter(a=>!["shift","ctrl","control","meta","cmd","command","alt","⇧","⌃","⌘","⌥",""].includes(a)),s.length==0||s.length==1&&n.key.toLowerCase().includes(s[0])))}}static expandMenubarOptions(e){switch(e.type){case"menu":case"dropdown":return e.options.map(t=>this.expandMenubarOptions(t)).flat();case"selection":case"checkbox":return[e.id];case"separator":return[]}}createEmptySection(e,t){const i=document.createElement("div");return i.classList.add("pref-section"),i.dataset.id=t,i.innerText=e,i.onclick=()=>{i.parentElement.parentElement.querySelector(`.pref-group[data-id=${t}]`).scrollIntoView()},i}createKeybindItem(e){const t=document.createElement("div");t.classList.add("pref-keybind"),t.dataset.id=e,t.onclick=a=>{a.target.classList.contains("pref-keybind-combo")||t.querySelector(".icon")?.contains(a.target)||this.app.windowManager.openWindow(new ly(this.app,!0,o=>{Re.setKeybind(e,o),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o=>{const l=this.conflictMap.get(Re.getComboString(o))?.map(c=>c[0]).map(c=>Tt[c].bindLabel??Tt[c].label)??[];return l.includes(e)?"self":l}))};const i=document.createElement("div");i.classList.add("pref-keybind-label"),i.innerText=Tt[e].bindLabel??Tt[e].label;const s=Ae.getIcon("REVERT");s.style.width="12px",s.addEventListener("click",()=>{Re.revertKeybind(e),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))}),s.style.display=Re.checkIsDefault(e)?"none":"block";const n=document.createElement("div");return n.classList.add("pref-keybind-combos"),n.replaceChildren(...Re.getCombosForKeybind(e).map(a=>{const o=document.createElement("button");return o.classList.add("pref-keybind-combo"),o.innerText=Re.getComboString(a),this.conflictMap.get(Re.getComboString(a)).length>1&&o.classList.add("conflict"),o.onclick=()=>{Re.removeKeybind(e,a),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o})),t.replaceChildren(i,s,n),t}calculateConflicts(){const e=new Map;Object.keys(Tt).forEach(t=>{Re.getCombosForKeybind(t).forEach((i,s)=>{const n=Re.getComboString(i);e.has(n)||e.set(n,[]),e.get(n).push([t,s])})}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())t.length!=1&&t.forEach(i=>{const s=this.viewElement.querySelector(`.pref-keybind[data-id=${i[0]}] .pref-keybind-combos`);s?.children[i[1]]&&s.children[i[1]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class nt{static noteskins=new Map;static register(e){for(const t of new Set(e.gameTypes))nt.noteskins.has(t)||nt.noteskins.set(t,new Map),nt.noteskins.get(t).set(e.id,e)}static async getNoteskin(e,t){const i=this.noteskins.get(e.id);if(!i||i.size==0)return;const s=i.get(t)??[...i.values()][0];return i.get(t)||Se.createFormatted(`Couldn't find the noteskin ${t}!`,"warn"),await s.load()}static getNoteskinData(e,t){const i=this.noteskins.get(e.id);return!i||i.size==0?void 0:i.get(t)??[...i.values()][0]}static getNoteskins(){return this.noteskins}static getPreviewUrl(e,t){return this.getNoteskinData(e,t).preview}}nt.register({id:"default",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-b2279a2b.js"),["Noteskin-b2279a2b.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-17ffcc02.png",self.location).href,title:"Scalable",subtitle:"Pete-Lawrence"});nt.register({id:"cf-chrome",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-4163467c.js"),["Noteskin-4163467c.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-40b76b28.png",self.location).href,title:"CF_CHROME",subtitle:"Pete-Lawrence"});nt.register({id:"ddr-note",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-2e945f65.js"),["Noteskin-2e945f65.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-b8f75a15.png",self.location).href,title:"DDR-Note",subtitle:"Pete-Lawrence"});nt.register({id:"ddr-note-itg",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-5d1a05aa.js"),["Noteskin-5d1a05aa.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-f113aacc.png",self.location).href,title:"DDR-Note (ITG quants)",subtitle:"Pete-Lawrence"});nt.register({id:"ddr-rainbow",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-7e011e81.js"),["Noteskin-7e011e81.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-0f9b00cd.png",self.location).href,title:"DDR-Rainbow",subtitle:"LemmaEOF"});nt.register({id:"ddr-rainbow-itg",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-b32d01e2.js"),["Noteskin-b32d01e2.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-2fd7d50c.png",self.location).href,title:"DDR-Rainbow (ITG quants)",subtitle:"LemmaEOF"});nt.register({id:"metal",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-9f92ab0e.js"),["Noteskin-9f92ab0e.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-26b1bdce.png",self.location).href,title:"Metal",subtitle:"Pete-Lawrence"});nt.register({id:"pastel",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-63e31f76.js"),["Noteskin-63e31f76.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-d67630f1.png",self.location).href,title:"Pastel",subtitle:"halcyoniix"});nt.register({id:"dividebyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-0136a2b5.js"),["Noteskin-0136a2b5.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-d763e667.png",self.location).href,title:"DivideByZero",subtitle:"MinaciousGrace"});nt.register({id:"subtractbyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-44caf370.js"),["Noteskin-44caf370.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-72ea0444.png",self.location).href,title:"SubtractByZero",subtitle:"qwertyzoro/Vague"});nt.register({id:"sm4",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-f9326759.js"),["Noteskin-f9326759.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-3514cbb3.png",self.location).href,title:"SM4",subtitle:"from SM4"});nt.register({id:"sm4-bold",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-69c5b4b7.js"),["Noteskin-69c5b4b7.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-9fe2bd96.png",self.location).href,title:"SM4 Bold",subtitle:"from SM4"});nt.register({id:"starlight-vivid",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-8c62d8ce.js"),["Noteskin-8c62d8ce.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-5ecfc22a.png",self.location).href,title:"SLNEXXT-vivid",subtitle:"from STARLiGHT-NEXXT"});nt.register({id:"default",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-657b4cb0.js"),["Noteskin-657b4cb0.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-d6d59d37.png",self.location).href,title:"Fiesta"});nt.register({id:"fourv2",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-5b1b2407.js"),["Noteskin-5b1b2407.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-5d9781d2.png",self.location).href,title:"FourV2",subtitle:"Jousway"});nt.register({id:"prime",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-1189f7fb.js"),["Noteskin-1189f7fb.js","AnimatedSprite-fe6fab2d.js","HoldBody-7c69d162.js"])).default,preview:new URL("/smeditor/assets/preview-4f79831b.png",self.location).href,title:"Prime"});const bS="/smeditor/assets/preview-747db171.png";class wS extends St{app;grid;lastGameType=null;constructor(e){super({title:"Noteskin Selection",width:600,height:400,disableClose:!1,win_id:"noteskin-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid(),q.on("chartLoaded",()=>{const t=e.chartManager.loadedChart.gameType.id;this.lastGameType!=t&&this.loadGrid()})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("input");t.classList.add("pref-search-bar"),t.type="text",t.placeholder="Search for a noteskin...",t.oninput=()=>{this.filterGrid(t.value)};const i=document.createElement("div");i.classList.add("noteskin-grid"),this.grid=i,e.replaceChildren(t,i),this.viewElement.appendChild(e)}loadGrid(){if(this.grid.replaceChildren(),!this.app.chartManager.loadedChart)return;const e=this.app.chartManager.loadedChart.gameType;this.lastGameType=e.id;const t=nt.getNoteskins().get(e.id);if(t)for(const[i,s]of t.entries()){const n=document.createElement("div"),a=document.createElement("img"),o=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div");n.classList.add("noteskin-cell"),o.classList.add("noteskin-label"),l.classList.add("noteskin-title"),c.classList.add("noteskin-subtitle"),l.innerText=s.title??i,c.innerText=s.subtitle??"",a.src=nt.getPreviewUrl(e,i),a.onerror=()=>{a.src=bS},n.replaceChildren(a,o),o.replaceChildren(l,c),this.grid.appendChild(n),i==_.chart.noteskin.name&&(n.classList.add("selected"),setTimeout(()=>{n.scrollIntoView({behavior:_.general.smoothAnimations?"smooth":"instant",block:"center"})})),n.dataset.id=i,n.dataset.title=s.title??"",n.dataset.subtitle=s.subtitle??"",n.onclick=()=>{_.chart.noteskin.name!=i&&(this.app.chartManager.chartView?.swapNoteskin(i),this.removeAllSelections(),n.classList.add("selected"))}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id)||this.containsQuery(e,i.dataset.title)||this.containsQuery(e,i.dataset.subtitle);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}}class _S extends St{app;metronomeInterval;startTime;me_high=new fs.Howl({src:Ng,volume:_.audio.soundEffectVolume});me_low=new fs.Howl({src:Ug,volume:_.audio.soundEffectVolume});tickLines=[];resultLines=[];previousOffsets=[];keyHandler;constructor(e){super({title:"Offset Adjuster",width:300,height:200,win_id:"offset",blocking:!0}),this.app=e,this.initView(),this.startTime=performance.now();let t=this.startTime+500;this.tickLines.push({time:t+500,beat:0}),this.tickLines.push({time:t+500*2,beat:1}),this.tickLines.push({time:t+500*3,beat:2}),this.tickLines.push({time:t+500*4,beat:3});let i=0;this.metronomeInterval=setInterval(()=>{const s=performance.now();if(s-t>500){for(t=s,(i%4==0?this.me_high:this.me_low).play();this.tickLines[0]?.time+1e3s-n.startTime<8e3)},5),this.keyHandler=s=>{if(s.code.startsWith("Digit")||s.code.startsWith("Key")||s.code=="Space"){let n=this.tickLines[0];const a=performance.now();for(const l of this.tickLines)if(a-l.time+_.play.offset*1e3<300){n=l;break}s.preventDefault();const o=a-n.time+_.play.offset*1e3;o>-300&&(this.tickLines.splice(this.tickLines.indexOf(n),1),this.resultLines.push({startTime:performance.now(),offset:o}),this.previousOffsets.push(o),this.previousOffsets.length==16&&(Yg(this.previousOffsets)<70&&(_.play.offset-=xl(this.previousOffsets)/1e3),this.previousOffsets=[]))}},window.addEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("canvas");this.viewElement.appendChild(e);const t=this.drawEQ(e);requestAnimationFrame(t)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=250,t.canvas.height=100;const i=()=>{t.fillStyle="rgba(0, 0, 0, 1)",t.fillRect(0,0,e.width,e.height),t.fillStyle="rgb(255, 255, 255)",t.fillRect(e.width/2-1,8,2,e.height-16);const s=performance.now();for(const n of this.resultLines){t.fillStyle="rgba(255, 255, 255, 1)";const a=Math.min(1,4-(s-n.startTime)/2e3);if(n.offset<0&&(t.fillStyle=`rgba(160, ${Ht(160,0,-n.offset/250)}, ${Ht(160,0,-n.offset/250)}, ${a})`),n.offset>0&&(t.fillStyle=`rgba(${Ht(160,0,n.offset/250)}, ${Ht(160,0,n.offset/250)}, 160, ${a})`),t.fillRect(e.width/2-.5+n.offset/4,12,1,e.height-24),s-n.startTime<250){const o=(s-n.startTime)/250;t.globalAlpha=1-o,t.fillRect(e.width/2-.5-o*3+n.offset/4,12-o*10,1+o*6,e.height-24+o*20)}t.globalAlpha=1}for(const n of this.tickLines){const a=n.time-s-_.play.offset*1e3;t.fillStyle="rgba(255, 255, 255, 0.8)",n.beat%4!=0?t.fillRect(e.width/2-1-a/4,12,2,e.height-24):t.fillRect(e.width/2-2-a/4,12,4,e.height-24)}e.closest("#windows")&&requestAnimationFrame(i)};return i}onClose(){clearInterval(this.metronomeInterval),window.removeEventListener("keydown",this.keyHandler)}}class xS extends St{app;changeHandler=()=>this.initView();constructor(e){super({title:"Song Properties",width:450,height:486,disableClose:!1,win_id:"sm_properties",blocking:!1}),this.app=e,this.initView(),q.on("smLoaded",this.changeHandler),q.on("undo",this.changeHandler),q.on("redo",this.changeHandler)}onClose(){q.off("smLoaded",this.changeHandler),q.off("undo",this.changeHandler),q.off("redo",this.changeHandler)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",uy.forEach(i=>{const s=document.createElement("div");s.classList.add("sm-container");const n=document.createElement("div");n.classList.add("sm-title"),n.innerText=i.title;const a=document.createElement("div");a.classList.add("property-grid"),i.items.forEach(o=>{const l=document.createElement("div");l.classList.add("label"),l.innerText=o.title,a.appendChild(l),a.appendChild(py(this.app,o))}),s.appendChild(n),s.appendChild(a),e.appendChild(s)}),this.viewElement.appendChild(e)}}var TS=CS,el=8192,Pd=65536,Bd=new ArrayBuffer(Pd*4),ES=new Float64Array(Bd,Pd,el),AS=new Float64Array(Bd,Pd*2,el/2),SS=MS({Math,Float64Array},null,Bd);function CS(r){if(!r)throw Error("Input data is not provided, pass an array.");var e=r.length;if(e>el)throw Error("Input length is too big, must be under "+el);var t=Math.floor(Math.log(e)/Math.LN2);if(Math.pow(2,t)!==e)throw Error("Invalid array size, must be a power of 2.");return ES.set(r),SS(e,t),AS.subarray(0,e/2)}function MS(r,e,t){var i=6.283185307179586,s=r.Math.sqrt,n=r.Math.sin,a=r.Math.cos,o=r.Math.abs,l=r.Math.SQRT1_2,c=r.Math.imul,d=new r.Float64Array(t),h=new r.Float64Array(t),u=8192,p=16384;function f(g,y){g=g|0,y=y|0;var w=0,b=0,v=0,E=0,C=0,I=0,L=0,k=0,N=0,G=0,A=0,S=0,x=0,D=0,$=0,R=0,O=0,W=0,V=0,F=0,U=0,te=0,Q=0,Z=0,ye=0,Ce=0,ce=0,fe=0,we=0,le=0,pe=0,be=0;for(w=g>>>1,v=2/+(g|0),m(g),le=0,be=4;(le|0)<(g|0);be=c(be,4)){for(pe=le;(pe|0)<(g|0);pe=pe+be|0)F=h[pe<<3>>3]-h[pe+1<<3>>3],h[pe<<3>>3]=h[pe<<3>>3]+h[pe+1<<3>>3],h[pe+1<<3>>3]=F;le=c(2,be-1)}for(E=2,L=g>>>1;L=L>>>1;){le=0,E=E<<1,be=E<<1,C=E>>>2,I=E>>>3;do{if((C|0)!=1)for(pe=le;(pe|0)<(g|0);pe=pe+be|0)S=pe,x=S+C|0,D=x+C|0,$=D+C|0,k=h[D<<3>>3]+h[$<<3>>3],h[$<<3>>3]=h[$<<3>>3]-h[D<<3>>3],h[D<<3>>3]=h[S<<3>>3]-k,h[S<<3>>3]=h[S<<3>>3]+k,S=S+I|0,x=x+I|0,D=D+I|0,$=$+I|0,k=h[D<<3>>3]+h[$<<3>>3],N=h[D<<3>>3]-h[$<<3>>3],k=-k*l,N=N*l,F=+h[x<<3>>3],h[$<<3>>3]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d[u+v<<3>>3],h[v<<3>>3]=d[u+b<<3>>3],b=b+1|0,E=y<<1;E=E>>1,((v=v^E)&E)==0;);(v|0)>=(b|0)&&(h[b<<3>>3]=d[u+v<<3>>3],h[v<<3>>3]=d[u+b<<3>>3],h[w-b<<3>>3]=d[u+w-v<<3>>3],h[w-v<<3>>3]=d[u+w-b<<3>>3]),b=b+1|0}while((b|0)<(y|0));h[w<<3>>3]=d[u+w<<3>>3]}return f}const cf=ya(TS);class us{view;slider;text;options;constructor(e,t){this.view=e,this.options=t,this.view.classList.add("slider");const i=document.createElement("input");i.classList.add("slider-input"),i.type="range",i.min=t.min.toString(),i.max=t.max.toString(),i.step=t.step.toString(),i.value=(t.value??(t.min+t.max)/2).toString(),i.oninput=()=>{s.innerText=this.formatValue(parseFloat(i.value))+"",this.options.onChange?.(parseFloat(i.value))},t.width!==void 0&&(i.style.width=t.width+"px"),this.slider=i,e.appendChild(i);const s=document.createElement("div");s.innerText=this.formatValue(parseFloat(i.value))+"",s.style.width="30px",this.text=s,e.appendChild(s)}get value(){return parseFloat(this.slider.value)}setValue(e){this.slider.value=e+"",this.text.innerText=this.formatValue(parseFloat(this.slider.value))+""}static create(e){return new us(document.createElement("div"),e)}formatValue(e){return this.options.transformer?this.options.transformer(e):this.options.precision===void 0?ae(e,3).toString():ae(e,this.options.precision).toFixed(this.options.precision)}}const ii=800,qe=200,Ah=3,Dn=125,On=250,uo=3,kS=.02,Fs=6,Sh=800,df=15,qt=32768,Ch=[{frequency:20,weight:.4006009013520281},{frequency:25,weight:.4258037044922291},{frequency:31.5,weight:.4536690484291709},{frequency:40,weight:.4840856831659204},{frequency:50,weight:.5142710208279764},{frequency:63,weight:.5473453749315819},{frequency:80,weight:.5841121495327103},{frequency:100,weight:.6214074879602299},{frequency:125,weight:.6601749463607856},{frequency:160,weight:.7054673721340388},{frequency:200,weight:.7489234225800412},{frequency:250,weight:.7936507936507937},{frequency:315,weight:.8406893652795292},{frequency:400,weight:.889284126278346},{frequency:500,weight:.9291521486643438},{frequency:630,weight:.9675858732462506},{frequency:800,weight:.9985022466300548},{frequency:1e3,weight:.9997500624843789},{frequency:1250,weight:.9564801530368244},{frequency:1600,weight:.9409550693954364},{frequency:2e3,weight:1.0196278358399185},{frequency:2500,weight:1.0955902492467817},{frequency:3150,weight:1.1232799775344005},{frequency:4e3,weight:1.0914051841746248},{frequency:5e3,weight:.9997500624843789},{frequency:6300,weight:.8727907484180668},{frequency:8e3,weight:.7722007722007722},{frequency:1e4,weight:.7369196757553427},{frequency:12500,weight:.7768498737618955},{frequency:16e3,weight:.7698229407236336},{frequency:2e4,weight:.4311738708634257},{frequency:22550,weight:.2},{frequency:25e3,weight:0}];class gy extends St{app;onAudioLoad=this.reset.bind(this);windowStep=512;fftSize=1024;tempoFftSize=4096;tempoStep=2;monoAudioData;audioLength=0;sampleRate=44100;tempogram=[];tempogramGroups=[];spectrogram=[];spectrogramDifference=[];noveltyCurve=[];noveltyCurveIsolated=[];spectrogramCanvases=[];lowestFinishedBlock=0;numRenderedBlocks=0;peaks=[];_threshold=.3;spectroHeights=[];spectroWeights=[];placeNotesSelectionButton;toggleButton;resetButton;onsetResults;offsetTableLabel;offsetRows=[];bpmRows=[];covers=[];doAnalysis=!1;lastSecond=0;constructor(e){super({title:"Detect Audio Sync",width:400,height:450,win_id:"detect-sync"}),this.app=e,this.initView(),this.reset(),q.on("audioLoaded",this.onAudioLoad)}onClose(){q.off("audioLoaded",this.onAudioLoad),this.app.chartManager.chartAudio.offLoad(this.onAudioLoad)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("sync-container"),e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center";const t=document.createElement("canvas");t.style.width=`${ii/2}px`,t.style.height=`${qe}px`;const i=document.createElement("div");i.classList.add("sync-tab-container");const s=document.createElement("div");s.classList.add("sync-tab-option","active"),s.innerText="Analysis Options";const n=document.createElement("div");n.classList.add("sync-tab-option"),n.innerText="Tempo Results";const a=document.createElement("div");a.classList.add("sync-tab-option"),a.innerText="Onset Results",i.replaceChildren(s,n,a),[...i.children].forEach((m,g)=>{m.onclick=()=>{l.scrollLeft=370*g,i.querySelectorAll(".active").forEach(y=>y.classList.remove("active")),m.classList.add("active")}});const o=document.createElement("div");o.classList.add("sync-tab-view");const l=document.createElement("div");l.classList.add("sync-tab-scroller");const c=this.createOptionsView(),d=this.createTempoView(),h=this.createOnsetsView(),u=(m,g)=>{const y=document.createElement("div");return y.classList.add("sync-cover"),y.innerText=m,y.style.left=`${g*370}px`,y};this.covers=[u("Clear analysis results to edit",0),u("Start analysis to view",1),u("Start analysis to view",2)],o.appendChild(l),l.replaceChildren(c,this.covers[0],d,this.covers[1],h,this.covers[2]);const p=document.createElement("div");p.classList.add("sync-bottom-container"),this.resetButton=document.createElement("button"),this.resetButton.classList.add("delete"),this.resetButton.innerText="Clear results",this.resetButton.style.width="120px",this.resetButton.disabled=!0,this.resetButton.onclick=()=>{this.resetButton.disabled=!0,s.click(),this.reset()},this.toggleButton=document.createElement("button"),this.toggleButton.innerText="Start analyzing",this.toggleButton.style.width="200px",this.toggleButton.onclick=()=>{this.doAnalysis||n.click(),this.doAnalysis=!this.doAnalysis,this.toggleButton.innerText=this.doAnalysis?"Stop analyzing":this.hasData()?"Resume analyzing":"Start analyzing",this.resetButton.disabled=this.doAnalysis},p.replaceChildren(this.toggleButton,this.resetButton),e.replaceChildren(t,i,o,p),this.viewElement.appendChild(e);const f=this.windowLoop(t);requestAnimationFrame(f)}createOptionsView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.flexDirection="column",e.style.gap="3px",e.style.height="100%";const t=(c,d,h)=>{const u=document.createElement("div");u.style.display="flex",u.style.flexDirection="row",u.style.justifyContent="space-between",u.style.alignItems="center";const p=document.createElement("div");return p.innerText=c,u.replaceChildren(p,d),Pt(u,{content:h}),u},i=document.createElement("div");i.innerText="Onsets",i.style.fontWeight="600";const s=us.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.fftSize),transformer:c=>2**c,onChange:c=>{this.fftSize=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(c)),this.reset()}}),n=us.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.windowStep),transformer:c=>2**c,onChange:c=>{this.windowStep=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(Math.log2(this.fftSize))),this.reset()}}),a=document.createElement("div");a.innerText="Tempo",a.style.fontWeight="600",a.style.marginTop="15px";const o=us.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.tempoFftSize),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(c)),this.reset()}}),l=us.create({min:Math.log2(1),max:Math.log2(1024),step:1,value:Math.log2(this.tempoStep),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(Math.log2(this.tempoFftSize))),this.reset()}});return e.replaceChildren(i,t("FFT Size",s.view,"Determines the amount of audio to analyze at every block. Higher values result in more accurate frequencies, while lower values result in more accurate timings. Defaults to 1024."),t("Window Step",n.view,"Determines the number of blocks per second. Lower values result in more time-accurate spectrograms, but may take more time and mess up tempo analysis. Defaults to 512 and must be lower than FFT Size."),a,t("FFT Size",o.view,"Determines the amount of the onset graph to analyze at every block. Higher values result in more accurate tempos, while lower values result in more accurate timings. Defaults to 4096."),t("Window Step",l.view,"Determines the number of blocks per second. Lower values result in more time-accurate tempograms, but may take more time. Defaults to 2 and must be lower than FFT Size.")),e}createTempoView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.gap="10px";const t=document.createElement("div");t.style.flex="1";const i=document.createElement("div");i.classList.add("sync-table-label"),i.innerText="Offsets",this.offsetTableLabel=i;const s=document.createElement("table");s.classList.add("sync-table");const n=document.createElement("tr"),a=document.createElement("th");a.innerText="Offset";const o=document.createElement("th");o.innerText="Confidence",n.replaceChildren(a,o),s.appendChild(n),t.replaceChildren(i,s);const l=document.createElement("div");l.style.flex="1";const c=document.createElement("div");c.classList.add("sync-table-label"),c.innerText="Current Tempos";const d=document.createElement("table");d.classList.add("sync-table");const h=document.createElement("tr"),u=document.createElement("th");u.innerText="BPM";const p=document.createElement("th");p.innerText="Confidence",h.replaceChildren(u,p),d.appendChild(h);for(let f=0;f<5;f++){const m=document.createElement("tr"),g=document.createElement("td");g.innerText="-";const y=document.createElement("td");y.innerText="-",m.replaceChildren(g,y),s.appendChild(m),this.offsetRows.push(m);const w=m.cloneNode(!0);d.appendChild(w),this.bpmRows.push(w)}return l.replaceChildren(c,d),e.replaceChildren(t,l),e}createOnsetsView(){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.justifyContent="center",e.style.alignItems="center",e.style.position="relative";const t=document.createElement("div");t.style.display="flex",t.style.justifyContent="space-between",t.style.alignItems="center",t.style.width="100%",Pt(t,{content:"Adjust the threshold for a block to be considered an onset (red line)."});const i=document.createElement("div");i.innerText="Onset Threshold";const s=us.create({min:0,max:1,step:.01,value:.3,onChange:c=>{this.threshold=c}}),n=document.createElement("div");n.style.color="#888888",n.style.fontStyle="italic",n.style.fontSize="11px",n.style.marginBottom="15px",n.style.marginTop="-6px",n.innerText="Found 0 onsets",this.onsetResults=n,t.replaceChildren(i,s.view);const a=document.createElement("div");a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.width="100%";const o=document.createElement("button");o.innerText="Place onsets as notes",o.onclick=()=>this.placeOnsets();const l=document.createElement("button");return l.innerText="Place onsets as notes in selection",l.disabled=!0,l.onclick=()=>this.placeOnsets(!0),this.placeNotesSelectionButton=l,a.replaceChildren(o,l),e.replaceChildren(t,n,a),e}async reset(){this._threshold=.3,this.doAnalysis=!1,this.toggleButton.disabled=!1,this.toggleButton.style.background="",this.toggleButton.innerText="Start analyzing",this.app.chartManager.chartAudio.onLoad(this.onAudioLoad),await this.getMonoAudioData(),this.sampleRate=this.app.chartManager.chartAudio.getSampleRate(),this.spectroHeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=(i+1)/(this.fftSize/2)*this.sampleRate/2,a=qe-Be(Math.log(s/20)/Math.log(this.sampleRate/40)*qe,0,qe),o=qe-Be(Math.log(n/20)/Math.log(this.sampleRate/40)*qe,0,qe);return{y:o,height:a-o}}),this.spectroWeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=Ch.findIndex(l=>l.frequency>s);if(n<1)return 0;const a=Ch[n-1],o=Ch[n];return Ht(a.weight,o.weight,Nt(Math.log(1+a.frequency),Math.log(1+o.frequency),Math.log(1+s)))});const e=Math.max(1,Math.ceil(this.audioLength/this.windowStep));this.spectrogramCanvases=[];for(let t=0;t{t.firstChild.innerText="-",t.lastChild.innerText="-"}),this.bpmRows.forEach(t=>{t.firstChild.innerText="-",t.lastChild.innerText="-"})}hasData(){return this.numRenderedBlocks>0}windowLoop(e){const t=e.getContext("2d");t.canvas.width=ii,t.canvas.height=qe*2,t.imageSmoothingEnabled=!1;const i=()=>{if(this.placeNotesSelectionButton.disabled=this.app.chartManager.startRegion===void 0||this.app.chartManager.endRegion===void 0||this.app.chartManager.startRegion==this.app.chartManager.endRegion,this.covers[0].classList.toggle("active",this.hasData()),this.covers[1].classList.toggle("active",!this.hasData()),this.covers[2].classList.toggle("active",!this.hasData()),!this.app.chartManager.chartAudio)return;const s=Math.ceil(this.audioLength/this.windowStep);if(this.monoAudioData!==void 0&&this.doAnalysis){const h=performance.now();for(;performance.now()-h=s){this.tempogram.length==0&&(this.toggleButton.disabled=!0,this.calcTempogram());break}this.spectrogram[this.lowestFinishedBlock]===void 0&&(this.renderBlock(this.lowestFinishedBlock),this.calcDifference(this.lowestFinishedBlock),this.calcIsolatedNovelty(this.lowestFinishedBlock),this.numRenderedBlocks++),this.lowestFinishedBlock++}this.lowestFinishedBlockw.centeru.center-Fs);y!==void 0&&(p+=y.groups[0].value,f+=y.avg,m++)}p/=m,f/=m,h.push({bpm:f,weight:u.groups[0].value,smoothedWeight:p})}h.sort((u,p)=>p.smoothedWeight-u.smoothedWeight);for(const u of h)u.weight<.01||(t.font=`${18+u.weight*300}px Assistant`,t.globalAlpha=Math.min(1,u.weight*100),t.fillText(ae(u.bpm,0)+"",200,Ht(qe*2,qe*1.5,Nt(Dn,On,u.bpm))));if(this.lastSecond!=this.app.chartManager.getTime()){this.lastSecond=this.app.chartManager.getTime();const u=h.slice(0,5).reduce((p,f)=>p+f.smoothedWeight,0);for(let p=0;p<5;p++){const f=this.bpmRows[p],m=h[p]?.bpm,g=h[p]?.weight;f.firstChild.innerText=m===void 0?"-":Math.round(m).toString(),f.lastChild.innerText=g===void 0?"-":Math.round(g/u*100)+"%"}}}t.globalAlpha=1,t.font="22px Assistant",t.textAlign="left",t.textBaseline="top",t.fillText("Spectrogram",10,10),t.fillText("Onsets",10,qe+10),t.fillText("Tempogram",10,qe*1.5+10),e.closest("#windows")&&requestAnimationFrame(i)};return i}renderBlock(e){if(!this.monoAudioData)return;const t=new Float32Array(this.fftSize);t.set(this.monoAudioData.subarray(Math.max(0,e*this.windowStep-this.fftSize/2),e*this.windowStep+this.fftSize/2),-Math.min(0,e*this.windowStep-this.fftSize/2));for(let s=0;s{const a=this.spectroHeights[n],o=Be(s*2e3,0,255);i.globalAlpha=o/255,i.fillRect(e%qt,a.y,1,a.height)}),i.globalAlpha=1}storeDifferenceResponse(e,t){this.spectrogramDifference[e]=t;const i=t.reduce((s,n)=>s+n,0);this.noveltyCurve[e]=i}calcIsolatedNovelty(e){for(let t=e-Ah;t<=e;t++){if(t<0)continue;let i=0,s=0;for(let n=t-Ah;n<=t+Ah;n++)this.noveltyCurve[n]!==void 0&&(i+=this.noveltyCurve[n],s++);i/=s,this.storeIsolatedNovelty(t,Math.max(0,this.noveltyCurve[t]-i))}}storeIsolatedNovelty(e,t){this.noveltyCurveIsolated[e]=Math.log(1+t),Math.log(1+t)>this._threshold&&Math.log(1+t)>(this.noveltyCurveIsolated[e-1]??0)?(this.peaks[e-1]&&(this.peaks[e-1]=!1),this.peaks[e]=!0,this.onsetResults.innerText=`Found ${this.peaks.filter(n=>n).length} onsets`):this.peaks[e]=!1;const i=this.spectrogramCanvases[Math.floor(e/qt)].getContext("2d"),s=Math.min(1,Math.log(1+t))*qe*.5;i.fillStyle="rgb(11, 14, 26)",i.fillRect(e%qt,qe,1,qe*.5),i.fillStyle="rgba(0, 100, 150, 0.5)",i.fillRect(e%qt,qe*1.5-s,1,s)}async getMonoAudioData(){const e=this.app.chartManager.chartAudio;if(!e)return;const t=e.getBuffer(),i=new OfflineAudioContext(t.numberOfChannels,t.length,t.sampleRate),s=i.createBufferSource();s.buffer=t;const n=i.createChannelMerger(t.numberOfChannels);s.connect(n),n.connect(i.destination),s.start(),await i.startRendering().then(a=>{this.monoAudioData=a.getChannelData(0),this.audioLength=this.monoAudioData.length}).catch(()=>{Se.createFormatted("Failed to load audio: audio rendering failed","error")})}get threshold(){return this._threshold}set threshold(e){this._threshold=e,this.peaks=this.noveltyCurveIsolated.map((t,i)=>t>this._threshold&&(this.noveltyCurveIsolated[i-1]??0)t).length} onsets`}calculateOffset(){const e=new Map;let t=0,i=0,s=0;for(let c=0;cu.groups[0].value>=kS);if(h.length!=0&&(i=c,h.forEach(u=>{let p=0,f=0;for(let g=c-uo;g<=c+uo;g++){if(this.tempogramGroups[g]===void 0)continue;const y=this.tempogramGroups[g].find(w=>w.centeru.center-Fs);y!==void 0&&(f+=y.avg,p++)}const m=Math.round(f/p);e.has(m)||e.set(m,0),e.set(m,e.get(m)+1),e.get(m)>t&&(t=e.get(m),s=m)}),t>50))break}if(s==0)return;const n=60/s*(this.sampleRate/this.windowStep),a=new Array(Sh).fill(0).map((c,d)=>{const h=d%n/n;let u=0,p=0;for(let f=1;f<=4;f++)p+=Math.max(1-Math.abs(Math.round(h*f)/f-h)*12,0)*1/f,u+=1/f;return p/u}),o=[];for(let c=i;ca[u]*h).reduce((h,u)=>h+u,0);o.push({block:c,offset:-(c*this.windowStep/this.sampleRate)%(60/s),response:d,curve:this.noveltyCurveIsolated.slice(c,c+Sh).map((h,u)=>a[u]*h)})}o.sort((c,d)=>d.response-c.response);const l=o.slice(0,5).reduce((c,d)=>c+d.response,0);this.offsetTableLabel.innerText=`Offsets (first BPM: ${s})`;for(let c=0;c{if(!i)return null;let n=this.app.chartManager.loadedChart.getBeatFromSeconds(s*this.windowStep/this.sampleRate);return n=Math.round(n*48)/48,n<0?null:{type:"Tap",beat:n,col:0}}).filter(i=>i!==null).filter(i=>e?i.beat>this.app.chartManager.startRegion&&i.beatu.beat==n.beat):-1,o=i.getDivisionLength(e);const l=i.getDivisionOfMeasure(e)%1*o;let c=Math.max(0,e-l);c=s[a+1]?.beat&&(a++,n=s[a],c=n.beat,o=i.getDivisionLength(c),d=0,h=n.upper)}calcTempogram(){let e=0;for(let a=0;ae&&(e=this.noveltyCurveIsolated[a]);const t=new Float32Array(this.noveltyCurveIsolated.length);for(let a=0;a{const o=new Float32Array(this.tempoFftSize);o.set(t.subarray(Math.max(0,a*this.tempoStep-this.tempoFftSize/2),a*this.tempoStep+this.tempoFftSize/2),-Math.min(0,a*this.tempoStep-this.tempoFftSize/2));for(let c=0;cn(++a),1)):(this.calculateOffset(),this.spectrogram=[],this.noveltyCurve=[],this.tempogram=[],this.monoAudioData=void 0,this.toggleButton.innerText="Finished analyzing",this.resetButton.disabled=!1,this.doAnalysis=!1,this.toggleButton.style.background="var(--accent-color)")};n(0)}storeTempogram(e,t){const i=new Map,s=[];t.forEach((a,o)=>{let l=this.sampleRate*60/(this.windowStep*this.tempoFftSize)*o;if(!(l>On*4||lOn&&l!=1/0;)l/=2;for(;l({bpm:a,value:o})).sort((a,o)=>o.value-a.value).filter(a=>a.value!=0);for(let a=0;ac.centero.bpm-Fs);if(l===void 0){s.push({center:o.bpm,groups:[o]});continue}l.groups.push(o)}this.tempogramGroups[e]=s.map(a=>({...a,avg:a.groups.reduce((o,l)=>o+l.bpm*l.value,0)/a.groups.reduce((o,l)=>o+l.value,0)}));const n=this.spectrogramCanvases[Math.floor(e*this.tempoStep/qt)].getContext("2d");n.fillStyle="rgba(0, 166, 255, 1)",this.tempogram[e].forEach(a=>{const o=Be(a.value*8e3,0,255);n.globalAlpha=o/255,n.fillRect(e*this.tempoStep%qt,Ht(qe*2,qe*1.5,Nt(Dn,On,a.bpm)),1*this.tempoStep,qe*.5/(On-Dn))})}}const uf=["accent-color","editor-bg","widget-bg","editable-overlay-hover","editable-overlay-active","text-color","text-color-secondary","text-color-detail","text-color-disabled","primary-bg","primary-border","primary-bg-active","primary-bg-hover","secondary-bg","secondary-border","secondary-bg-active","secondary-bg-hover","tooltip-bg","input-bg","input-bg-active","input-bg-hover","input-border","navbar-bg","navbar-bg-inactive","window-bg","window-border"],IS=["primary-bg","secondary-bg","text-color","accent-color","widget-bg","editor-bg","editable-overlay-active","input-bg","window-bg"],PS=[{name:"primary-bg",ids:[{id:"primary-bg",label:"base"},{id:"primary-bg-active",label:"active"},{id:"primary-bg-hover",label:"hover"},{id:"primary-border",label:"border"}]},{name:"secondary-bg",ids:[{id:"secondary-bg",label:"base"},{id:"secondary-bg-active",label:"active"},{id:"secondary-bg-hover",label:"hover"},{id:"secondary-border",label:"border"}]},{name:"text-color",ids:[{id:"text-color",label:"primary"},{id:"text-color-secondary",label:"secondary"},{id:"text-color-detail",label:"detail"},{id:"text-color-disabled",label:"disabled"}]},{name:"other",ids:[{id:"accent-color",label:"accent-color"},{id:"widget-bg",label:"widget-bg"},{id:"tooltip-bg",label:"tooltip-bg"},{id:"editor-bg",label:"editor-bg"}]},{name:"editable-overlay",ids:[{id:"editable-overlay-hover",label:"hover"},{id:"editable-overlay-active",label:"active"}]},{name:"input",ids:[{id:"input-bg",label:"background"},{id:"input-bg-active",label:"active"},{id:"input-bg-hover",label:"hover"},{id:"input-border",label:"border"}]},{name:"window",ids:[{id:"window-bg",label:"background"},{id:"window-border",label:"border"}]},{name:"window-navbar",ids:[{id:"navbar-bg",label:"active"},{id:"navbar-bg-inactive",label:"inactive"}]}],pf={"accent-color":"Color used for focus input rings, confirm buttons","text-color":"Base text color","text-color-secondary":"Secondary text color, used for text in recent files, menubar keybinds","text-color-detail":"Detail text color, used for text in timing event boxes","text-color-disabled":"Used for texts relating to empty/disabled things (ex. no files in directory picker)","primary-bg":"Primary background, used for menubar, context/dropdown menus","primary-border":"","primary-bg-active":"","primary-bg-hover":"","navbar-bg":"Window navbar background","navbar-bg-inactive":"","window-bg":"Window background","window-border":"","secondary-bg":"Secondary background, used for subareas in menus","secondary-border":"","secondary-bg-active":"","secondary-bg-hover":"","editable-overlay-hover":"Overlay on top of editable items (status widget buttons, playback option toggles, textareas)","editable-overlay-active":"","input-bg":"Background color for input","input-bg-active":"","input-bg-hover":"","input-border":"","widget-bg":"Widget background","tooltip-bg":"Color of these tooltips","editor-bg":"Editor background"},Mh={"primary-bg":{"primary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"primary-bg-active":function(r){return this.lighten(r,10)},"primary-bg-hover":function(r){return this.lighten(r,30)},"widget-bg":function(r){return this.add(r,-50).setAlpha(136/255)},"window-bg":function(r){return this.lighten(r,-10)},"text-color":function(r){return this.average(r)>.5?new B("#000"):new B("#fff")},"input-bg":function(r){return this.average(r)<.5?new B("#000"):new B("#fff")},"input-border":function(r){return this.average(r)>.5?this.add(r,-30).setAlpha(119/255):this.add(r,30).setAlpha(119/255)},"tooltip-bg":function(r){return this.lighten(r,-10).setAlpha(238/255)},"secondary-bg":function(r){return this.lighten(r,-20)},"editor-bg":function(r){return this.lighten(r,-60)}},"window-bg":{"navbar-bg":function(r){return new B(r)}},"secondary-bg":{"secondary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"secondary-bg-active":function(r){return this.lighten(r,50)},"secondary-bg-hover":function(r){return this.lighten(r,30)}},"navbar-bg":{"navbar-bg-inactive":function(r){return this.lighten(r,-33)}},"text-color":{"text-color-secondary":function(r){return new B(r).setAlpha(119/255)},"text-color-detail":function(r){return new B(r).setAlpha(68/255)},"text-color-disabled":function(r){return new B(r).setAlpha(136/255)}},"input-bg":{"input-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"input-bg-active":function(r){return this.lighten(r,50)},"input-bg-hover":function(r){return this.lighten(r,30)}}},os={default:{"accent-color":new B("rgb(23, 131, 208)"),"text-color":new B("#fff"),"text-color-secondary":new B("#888"),"text-color-detail":new B("#757a89"),"text-color-disabled":new B("#888"),"primary-bg":new B("#555"),"primary-border":new B("#444"),"primary-bg-active":new B("#575757"),"primary-bg-hover":new B("#666"),"navbar-bg":new B("#3d3d3d"),"navbar-bg-inactive":new B("#626262"),"window-bg":new B("#3d3d3d"),"window-border":new B("#00000000"),"secondary-bg":new B("#373737"),"secondary-border":new B("#333"),"secondary-bg-active":new B("#555"),"secondary-bg-hover":new B("#454545"),"editable-overlay-hover":new B("rgb(255, 255, 255, 0.1)"),"editable-overlay-active":new B("rgb(255, 255, 255, 0.2)"),"input-bg":new B("rgba(35, 35, 35, 0.309)"),"input-bg-active":new B("rgba(50, 50, 50, 0.309)"),"input-bg-hover":new B("rgba(79, 79, 79, 0.309)"),"input-border":new B("rgba(0, 0, 0, 0.3)"),"widget-bg":new B("rgba(0, 0, 0, 0.5)"),"tooltip-bg":new B("rgba(20, 20, 20, 0.95)"),"editor-bg":new B("#18191c")},dusk:{"accent-color":new B("#b34e97ff"),"text-color":new B("#ffffffff"),"text-color-secondary":new B("#ffffff77"),"text-color-detail":new B("#ffffff44"),"text-color-disabled":new B("#ffffff88"),"primary-bg":new B("#1b0131ff"),"primary-border":new B("#1e0136bb"),"primary-bg-active":new B("#2f0057ff"),"primary-bg-hover":new B("#230140ff"),"navbar-bg":new B("#18012cff"),"navbar-bg-inactive":new B("#10011dff"),"window-bg":new B("#18012cff"),"window-border":new B("#00000000"),"secondary-bg":new B("#160127ff"),"secondary-border":new B("#18012bbb"),"secondary-bg-active":new B("#310a52ff"),"secondary-bg-hover":new B("#25033fff"),"editable-overlay-hover":new B("#e79dff1a"),"editable-overlay-active":new B("#e79dff33"),"input-bg":new B("#000000ff"),"input-bg-active":new B("#000000ff"),"input-bg-hover":new B("#000000ff"),"input-border":new B("#391f4f77"),"widget-bg":new B("#00000088"),"tooltip-bg":new B("#18012cee"),"editor-bg":new B("#0b0014ff")},nord:{"accent-color":new B("#1783d0ff"),"text-color":new B("#d9dee8ff"),"text-color-secondary":new B("#d9dee878"),"text-color-detail":new B("#d9dee845"),"text-color-disabled":new B("#d9dee887"),"primary-bg":new B("#2e3440ff"),"primary-border":new B("#323946ba"),"primary-bg-active":new B("#636d83ff"),"primary-bg-hover":new B("#485061ff"),"navbar-bg":new B("#292e39ff"),"navbar-bg-inactive":new B("#2f333cff"),"window-bg":new B("#292e39ff"),"window-border":new B("#00000000"),"secondary-bg":new B("#242933ff"),"secondary-border":new B("#272d38ba"),"secondary-bg-active":new B("#444d5fff"),"secondary-bg-hover":new B("#3f4755ff"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#1212124f"),"input-bg-active":new B("#141414ff"),"input-bg-hover":new B("#171717ff"),"input-border":new B("#121212ff"),"widget-bg":new B("#00020e87"),"tooltip-bg":new B("#292e39ed"),"editor-bg":new B("#18191cff")},light:{"accent-color":new B("#ff594cff"),"text-color":new B("#000000ff"),"text-color-secondary":new B("#00000078"),"text-color-detail":new B("#00000045"),"text-color-disabled":new B("#00000087"),"primary-bg":new B("#ffffffff"),"primary-border":new B("#b5b5b5ff"),"primary-bg-active":new B("#ebebebff"),"primary-bg-hover":new B("#ffd4d1ff"),"navbar-bg":new B("#edededff"),"navbar-bg-inactive":new B("#d1d1d1ff"),"window-bg":new B("#edededff"),"window-border":new B("#00000000"),"secondary-bg":new B("#d9d9d9ff"),"secondary-border":new B("#c7c7c7ff"),"secondary-bg-active":new B("#f0f0f0ff"),"secondary-bg-hover":new B("#e3e3e3ff"),"editable-overlay-hover":new B("#ff594c3d"),"editable-overlay-active":new B("#ff594c73"),"input-bg":new B("#ebebebff"),"input-bg-active":new B("#e0e0e0ff"),"input-bg-hover":new B("#ffffffff"),"input-border":new B("#9e9e9eff"),"widget-bg":new B("#f7f7f7e5"),"tooltip-bg":new B("#ffffffff"),"editor-bg":new B("#cfcfcfff")},rust:{"accent-color":new B("#b37100ff"),"text-color":new B("#ffd7bdf2"),"text-color-secondary":new B("#ffd7bd78"),"text-color-detail":new B("#ffd7bd45"),"text-color-disabled":new B("#ffd7bd87"),"primary-bg":new B("#3c2e2aff"),"primary-border":new B("#42332eff"),"primary-bg-active":new B("#68524bff"),"primary-bg-hover":new B("#4e3c37ff"),"navbar-bg":new B("#362926ff"),"navbar-bg-inactive":new B("#241b19ff"),"window-bg":new B("#58413cff"),"window-border":new B("#00000000"),"secondary-bg":new B("#40302ba1"),"secondary-border":new B("#46352fff"),"secondary-bg-active":new B("#614a42ff"),"secondary-bg-hover":new B("#533e38ff"),"editable-overlay-hover":new B("#fff8e01a"),"editable-overlay-active":new B("#fff8e033"),"input-bg":new B("#231515ff"),"input-bg-active":new B("#271717ff"),"input-bg-hover":new B("#2e1b1bff"),"input-border":new B("#4b413fff"),"widget-bg":new B("#311e1cff"),"tooltip-bg":new B("#362926ff"),"editor-bg":new B("#181211ff")},tron:{"accent-color":new B("#00ccffff"),"text-color":new B("#ffffffff"),"text-color-secondary":new B("#ffffffe4"),"text-color-detail":new B("#ffffff5b"),"text-color-disabled":new B("#ffffff88"),"primary-bg":new B("#000000ff"),"primary-border":new B("#ff7b00c9"),"primary-bg-active":new B("#00e1ff98"),"primary-bg-hover":new B("#ff751a5a"),"navbar-bg":new B("#000000ff"),"navbar-bg-inactive":new B("#000000ff"),"window-bg":new B("#000000ff"),"window-border":new B("#ff880085"),"secondary-bg":new B("#121212ff"),"secondary-border":new B("#ff8800aa"),"secondary-bg-active":new B("#00e1ffa3"),"secondary-bg-hover":new B("#ff7e145a"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#000000ff"),"input-bg-active":new B("#000000ff"),"input-bg-hover":new B("#000000ff"),"input-border":new B("#1e1e1eff"),"widget-bg":new B("#000000ad"),"tooltip-bg":new B("#000000ff"),"editor-bg":new B("#000000ff")},gilded:{"accent-color":new B("#ffc014ff"),"text-color":new B("#e6e6e6ff"),"text-color-secondary":new B("#ffffff6b"),"text-color-detail":new B("#e6e6e645"),"text-color-disabled":new B("#e6e6e687"),"primary-bg":new B("#232325ff"),"primary-border":new B("#272729ff"),"primary-bg-active":new B("#ffc0145b"),"primary-bg-hover":new B("#ffc01421"),"navbar-bg":new B("#202021ff"),"navbar-bg-inactive":new B("#151516ff"),"window-bg":new B("#202021ff"),"window-border":new B("#00000000"),"secondary-bg":new B("#1c1c1eff"),"secondary-border":new B("#1f1f21ff"),"secondary-bg-active":new B("#1f1f21ff"),"secondary-bg-hover":new B("#242427ff"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#0d0d0dff"),"input-bg-active":new B("#0e0e0eff"),"input-bg-hover":new B("#111111ff"),"input-border":new B("#0e0e0eff"),"widget-bg":new B("#171717db"),"tooltip-bg":new B("#202021ff"),"editor-bg":new B("#0e0e0fff")}};class Qe{static _themes=os;static _userThemes={};static _initialized=!1;static style;static currentTheme;static initialize(){this._createThemeStyle(),this._loadUserThemes(),this._initialized=!0}static _createThemeStyle(){const e=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(e),this.style=e}static _loadUserThemes(){let e={};try{e=JSON.parse(localStorage.getItem("themes")??"{}")}catch{console.warn("Error loading user themes")}const t={};for(const[i,s]of Object.entries(e))t[i]=this.validateTheme(s);this._userThemes=t}static _saveUserThemes(){const e=Object.fromEntries(Object.entries(this._userThemes).map(([t,i])=>[t,this.convertThemeToString(i)]));localStorage.setItem("themes",JSON.stringify(e))}static validateTheme(e){const t={...os.default};if(typeof e!="object")return t;for(const i of uf)if(e[i]!==void 0)try{t[i]=new B(e[i])}catch{console.warn(`Invalid color ${e[i]} for ${i}`)}return t}static getThemes(){return{...this._themes,...this._userThemes}}static getBuiltinThemes(){return this._themes}static getUserThemes(){return this._userThemes}static loadTheme(e){this._initialized||this.initialize();let t=this.getThemes()[e];t||(Se.createFormatted("Error loading theme: Invalid theme id","error"),t=os.default),_.general.theme=e,this._applyTheme(t)}static _applyTheme(e){const t=`body{${uf.map(i=>`--${i}: ${(e[i]??os.default[i]).toHexa()};`).join("")}}`;this.style.innerHTML=t,this.currentTheme={...e},q.emit("themeChanged")}static loadThemeFromColors(e){this._applyTheme(this.validateTheme(e))}static getCurrentTheme(){return this.currentTheme}static convertThemeToString(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.toHexa()]))}static exportCurrentTheme(e){return e={code:!1,spaces:!1,...e},e.code?JSON.stringify(Object.fromEntries(Object.entries(this.currentTheme).map(([t,i])=>[t,`^new Color('${i.toHexa()}')^`])),null,e.spaces?2:0).replaceAll('"^',"").replaceAll('^"',""):JSON.stringify(this.convertThemeToString(this.currentTheme),null,e.spaces?2:0)}static createUserTheme(e,t){this.getThemes()[e]===void 0&&(t?this._userThemes[e]={...t}:this._userThemes[e]={...os.default},this._saveUserThemes())}static setUserTheme(e,t){this._userThemes[e]!==void 0&&(this._userThemes[e]={...t},this._saveUserThemes())}static deleteUserTheme(e){this._userThemes[e]!==void 0&&(delete this._userThemes[e],this.loadTheme("default"),this._saveUserThemes())}static renameUserTheme(e,t){this._userThemes[e]!==void 0&&this.getThemes()[t]===void 0&&(this._userThemes[t]=this._userThemes[e],delete this._userThemes[e],this._saveUserThemes())}static parseThemeText(e){let t;try{t=JSON.parse(e)}catch{return null}return this.validateTheme(t)}static getColor(e){return this.currentTheme?.[e]??os.default[e]}}function Rd(r,e,t){return(r<<16)+(e<<8)+t}function Ld(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Be(Math.round(t*e),0,255),i=Be(Math.round(i*e),0,255),s=Be(Math.round(s*e),0,255),Rd(t,i,s)}function BS(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Be(Math.round(t+e),0,255),i=Be(Math.round(i+e),0,255),s=Be(Math.round(s+e),0,255),Rd(t,i,s)}function Gc(r,e,t){const[i,s,n]=r.match(/\w\w/g).map(u=>parseInt(u,16)),[a,o,l]=e.match(/\w\w/g).map(u=>parseInt(u,16)),c=Math.round(i+(a-i)*t).toString(16).padStart(2,"0"),d=Math.round(s+(o-s)*t).toString(16).padStart(2,"0"),h=Math.round(n+(l-n)*t).toString(16).padStart(2,"0");return"#"+c+d+h}function RS(r,e,t){const i=Ht(r.red,e.red,t),s=Ht(r.green,e.green,t),n=Ht(r.blue,e.blue,t),a=Ht(r.alpha,e.alpha,t);return new B([i,s,n,a])}const sa=new Map;q.on("themeChanged",()=>{for(const[r,e]of sa.entries()){const t=Qe.getColor(r);e.forEach(i=>{i.destroyed||(i.tint=t.toNumber(),i.alpha=t.alpha)}),sa.set(r,e.filter(i=>!i.destroyed))}});function et(r,e){sa.has(e)||sa.set(e,[]),sa.get(e).push(r);const t=Qe.getColor(e);r.tint=t.toNumber(),r.alpha=t.alpha}function kh(r){const{r:e,g:t,b:i,a:s}=r.toRgba(),n=Math.max(e,t,i),a=Math.min(e,t,i);let o=0,l=0;const c=(n+a)/2;if(n==a)o=l=0;else{const d=n-a;switch(l=c>.5?d/(2-n-a):d/(n+a),n){case e:o=(t-i)/d+(t{const o=document.createElement("input");o.type="text";let l="";o.onfocus=()=>{l=o.value},o.onkeydown=c=>{c.key=="Enter"&&(o.blur(),c.preventDefault()),c.key=="Escape"&&(o.value=l,o.blur(),c.stopImmediatePropagation())},o.oninput=()=>{a.isValid(o.value)!==null&&t.onupdate?.(t.getValue())},o.onblur=()=>{const c=a.isValid(o.value);c===null?o.value=l:o.value=c,t.onupdate?.(t.getValue())},t.inputs[n]=o,s.appendChild(o)}),t.replaceChildren(i,s),t}setValue(e){Object.entries(this.inputs).forEach(([t,i])=>{document.activeElement!=i&&(i.value=this.opts[t].setValue(e))})}}const ri=(r,e,t)=>i=>{t!==void 0&&i.endsWith(t)&&(i=i.slice(0,i.length-t.length));let s;try{s=parseInt(i)}catch{return null}return Be(s,r,e)+""},si=(r,e,t,i)=>{let s;i!==void 0&&r.endsWith(i)&&(r=r.slice(0,r.length-i.length));try{s=parseInt(r)}catch{return e}return Be(s,e,t)};class El extends yy{_value;_hue=0;_sat=0;_val=0;_alp=1;popup;matrix;matrixDot;matrixDragging=!1;hueDragging=!1;hueThumb;alphaDragging=!1;alphaBg;alphaThumb;previewNew;formats=[];onColorChange;static create(e){const t=Ih();return Object.setPrototypeOf(t,El.prototype),t.value=pa(e.value),t.classList.add("color-picker"),t.formats=[],e.height!==void 0&&(t.style.height=e.height+"px"),e.width!==void 0&&(t.style.width=e.width+"px"),t.addEventListener("click",()=>{t.createPopup()}),t}updatePreview(){this.color=this._value}get value(){return this._value}set value(e){this._value=e;const t=po(this._value);this._hue=t[0],this._sat=t[1],this._val=t[2],this._alp=t[3],this.updatePreview(),this.updatePopup()}get hue(){return this._hue}set hue(e){this._hue=e,this.updateColor()}get sat(){return this._sat}set sat(e){this._sat=e,this.updateColor()}get val(){return this._val}set val(e){this._val=e,this.updateColor()}get alpha(){return this._alp}set alpha(e){this._alp=e,this.updateColor()}updateColor(){this._value=new B({h:this._hue*360,s:this._sat*100,v:this._val*100,a:this._alp}),this.updatePreview(),this.updatePopup()}createPopup(){if(this.popup){this.closePopup();return}const e=document.createElement("div");e.classList.add("color-picker-popup");const t=document.createElement("div");t.classList.add("color-picker-area");const[i,s]=this.createMatrix();this.matrix=i,this.matrixDot=s,s.style.background="#f00";const[n,a]=this.createSlider({ondrag:()=>this.hueDragging=!0,offdrag:()=>this.hueDragging=!1,change:E=>{this.hue=E,this.onColorChange?.(this._value)}});this.hueThumb=a,n.style.background="linear-gradient(to right, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 66%, #f0f 83%, red 100%)";const[o,l]=this.createSlider({ondrag:()=>this.alphaDragging=!0,offdrag:()=>this.alphaDragging=!1,change:E=>{this.alpha=E,this.onColorChange?.(this._value)}});this.alphaThumb=l,o.classList.add("color-picker-transparent");const c=document.createElement("div");c.classList.add("color-slider"),o.appendChild(c),this.alphaBg=c,t.replaceChildren(i,n,o);const d=document.createElement("div");d.classList.add("color-picker-area");const h=Js.create({label:"HEX",inputs:{hex:{setValue:E=>E.alpha!=1?E.toHexa():E.toHex(),isValid:E=>{const C=/#?([0-9a-fA-F]+)/.exec(E);return C&&[3,4,6,8].includes(C[1].length)?(E[0]!="#"&&(E="#"+E),E):null}}},getValue(){let E=this.inputs.hex.value;return E[0]!="#"&&(E="#"+E),new B(E)},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(h),d.appendChild(h);const u=Js.create({label:"RGBA",inputs:{r:{setValue:E=>Math.round(E.red*255).toString(),isValid:ri(0,255)},g:{setValue:E=>Math.round(E.green*255).toString(),isValid:ri(0,255)},b:{setValue:E=>Math.round(E.blue*255).toString(),isValid:ri(0,255)},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({r:si(this.inputs.r.value,0,255),g:si(this.inputs.g.value,0,255),b:si(this.inputs.b.value,0,255),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(u),d.appendChild(u);const p=Js.create({label:"HSVA",inputs:{h:{setValue:E=>Math.round(po(E)[0]*360)+"º",isValid:ri(0,360,"º")},s:{setValue:E=>Math.round(po(E)[1]*100)+"%",isValid:ri(0,100,"%")},v:{setValue:E=>Math.round(po(E)[2]*100)+"%",isValid:ri(0,100,"%")},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({h:si(this.inputs.h.value,0,360,"º"),s:si(this.inputs.s.value,0,100,"%"),v:si(this.inputs.v.value,0,100,"%"),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(p),d.appendChild(p);const f=Js.create({label:"HSLA",inputs:{h:{setValue:E=>Math.round(kh(E)[0]*360)+"º",isValid:ri(0,360,"º")},s:{setValue:E=>Math.round(kh(E)[1]*100)+"%",isValid:ri(0,100,"%")},l:{setValue:E=>Math.round(kh(E)[2]*100)+"%",isValid:ri(0,100,"%")},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({h:si(this.inputs.h.value,0,360,"º"),s:si(this.inputs.s.value,0,100,"%"),l:si(this.inputs.l.value,0,100,"%"),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(f),d.appendChild(f);const m=document.createElement("div");m.classList.add("color-picker-preview");const g=Ih(),y=Ih();y.color=this._value,g.color=this._value,m.replaceChildren(g,y),this.previewNew=g,d.appendChild(m),e.replaceChildren(t,d),this.popup=e,this.updatePopup();const w=this._value,b=E=>{E.key=="Escape"&&(E.stopImmediatePropagation(),window.removeEventListener("keydown",b),window.removeEventListener("mousedown",v),this.closePopup(),this.value=w,this.onColorChange?.(this._value))},v=E=>{e.contains(E.target)||(window.removeEventListener("keydown",b),window.removeEventListener("mousedown",v),this.closePopup())};window.addEventListener("keydown",b),window.addEventListener("mousedown",v),document.getElementById("popups").appendChild(e),setTimeout(()=>this.movePosition())}updatePopup(){if(!this.popup)return;this.matrix.style.backgroundColor=`hsl(${this._hue*360} 100% 50%)`,this.matrixDot.style.backgroundColor=this._value.toHex(),this.matrixDragging||(this.matrixDot.style.left=this._sat*200+"px",this.matrixDot.style.top=(1-this._val)*200+"px"),this.hueDragging||(this.hueThumb.style.left=this._hue*200+"px");const e=`rgba(${this._value.red*255}, ${this._value.green*255}, ${this._value.blue*255}`;this.alphaBg.style.background=`linear-gradient(to right, ${e}, 0 ), ${e}, 1))`,this.alphaDragging||(this.alphaThumb.style.left=this._alp*200+"px"),this.formats.forEach(t=>t.setValue(this._value)),this.previewNew.color=this._value}closePopup(){const e=this.popup;this.popup=void 0,e&&(e.classList.add("exiting"),setTimeout(()=>{e.remove()},500))}createMatrix(){const e=document.createElement("div");e.classList.add("color-matrix"),e.style.backgroundColor="#ff0000";const t=document.createElement("div");t.classList.add("color-matrix-x");const i=document.createElement("div");i.classList.add("color-matrix-y");const s=document.createElement("div");s.classList.add("color-matrix-dot"),e.appendChild(s),e.replaceChildren(t,i,s),e.onmousedown=o=>{window.addEventListener("mousemove",n),window.addEventListener("mouseup",a),n(o),this.matrixDragging=!0};const n=o=>{const l=e.getBoundingClientRect(),c=Be((o.clientX-l.left)/l.width,0,1),d=Be((o.clientY-l.top)/l.height,0,1);s.style.left=c*l.width+"px",s.style.top=d*l.height+"px",this._sat=c,this.val=1-d,this.onColorChange?.(this._value)},a=()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",a),this.matrixDragging=!1};return[e,s]}createSlider(e){const t=document.createElement("div");t.classList.add("color-slider");const i=document.createElement("div");i.classList.add("color-slider-thumb"),t.appendChild(i),t.onmousedown=a=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",n),s(a),e.ondrag?.(),this.onColorChange?.(this._value)};const s=a=>{const o=t.getBoundingClientRect(),l=Be((a.clientX-o.left)/o.width,0,1);i.style.left=l*o.width+"px",e.change(l)},n=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",n),e.offdrag?.()};return[t,i]}movePosition(){const e=this.getBoundingClientRect(),t=e.left+e.width/2-this.popup.clientWidth/2,i=e.top+e.height+10,s=15,n=window.innerWidth-this.popup.clientWidth-15;this.popup.style.left=`${Be(t,s,n)}px`,this.popup.style.top=`${i}px`,i+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transformOrigin="bottom center",this.popup.style.top=`${e.top-this.popup.clientHeight-10}px`)}isActive(){return this.popup!==void 0}}class Vc extends St{app;grid;actions={};constructor(e){super({title:"Themes",width:600,height:400,disableClose:!1,win_id:"theme-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-search");const i=document.createElement("input");i.classList.add("pref-search-bar"),i.type="text",i.placeholder="Search for a theme...",i.oninput=()=>{this.filterGrid(i.value)},t.appendChild(i);const s=document.createElement("div");s.classList.add("theme-grid"),this.grid=s;const n=this.createOptionTray();e.replaceChildren(t,s,n),this.viewElement.appendChild(e)}createOptionTray(){const e=document.createElement("div");e.classList.add("theme-tray");const t=document.createElement("button");t.appendChild(Ae.getIcon("PLUS",16)),t.appendChild(document.createTextNode("New")),t.onclick=()=>{const l=this.getNonConflictingName("new-theme");Qe.createUserTheme(l),Qe.loadTheme(l),this.loadGrid()},this.actions.add=t,e.appendChild(t);const i=document.createElement("button");i.appendChild(Ae.getIcon("COPY",16)),i.appendChild(document.createTextNode("Duplicate")),i.onclick=()=>{const l=this.getNonConflictingName(_.general.theme);Qe.createUserTheme(l,Qe.getCurrentTheme()),Qe.loadTheme(l),this.loadGrid()},i.disabled=!0,this.actions.copy=i,e.appendChild(i);const s=document.createElement("button");s.classList.add("confirm"),s.appendChild(Ae.getIcon("EDIT",16)),s.appendChild(document.createTextNode("Edit")),s.onclick=()=>{this.closeWindow(),this.app.windowManager.openWindow(new fa(this.app))},s.disabled=!0,this.actions.edit=s,e.appendChild(s);const n=document.createElement("button");n.classList.add("delete"),n.appendChild(Ae.getIcon("TRASH",16)),n.appendChild(document.createTextNode("Delete")),n.onclick=()=>{this.app.windowManager.openWindow(new Tl(this.app,"Delete theme","Are you sure you want to delete this theme?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{Qe.deleteUserTheme(_.general.theme),this.loadGrid()}}]))},n.disabled=!0,this.actions.del=n,e.appendChild(n);const a=document.createElement("button");a.appendChild(Ae.getIcon("UPLOAD",16)),a.appendChild(document.createTextNode("Import")),a.onclick=async()=>{(await Jg({_preferPolyfill:!1,excludeAcceptAllOption:!1,multiple:!0,accepts:[{extensions:["txt"]}]})).forEach(c=>{c.getFile().then(d=>d.text()).then(d=>{const h=Qe.parseThemeText(d);let u=zi(c.name,".txt");if(!h){Se.createFormatted("Failed to load theme "+u,"error");return}u=this.getNonConflictingName(u),Qe.createUserTheme(u,h),this.loadGrid()})})},this.actions.imp=a,e.appendChild(a);const o=document.createElement("button");return o.appendChild(Ae.getIcon("DOWNLOAD",16)),o.appendChild(document.createTextNode("Export")),o.onclick=()=>{const l=Qe.exportCurrentTheme({spaces:!0}),c=new File([l],_.general.theme+".txt",{type:"text/plain"}),d=document.createElement("a"),h=URL.createObjectURL(c);d.href=h,d.download=c.name,document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(h)},this.actions.exp=o,o.disabled=!0,e.appendChild(o),e}loadGrid(){this.grid.replaceChildren();const e=Qe.getThemes();if(e)for(const[t,i]of Object.entries(e)){let s=t;const n=os[t]!==void 0,a=document.createElement("div"),o=document.createElement("div");if(o.classList.add("inlineEdit"),n)o.style.fontWeight="bold";else{o.contentEditable="true";let c=t;o.onfocus=()=>{c=o.innerText},o.onkeydown=d=>{d.key=="Enter"&&(o.blur(),d.preventDefault()),d.key=="Escape"&&(o.innerText=c,o.blur(),d.stopImmediatePropagation())},o.onblur=()=>{if(o.innerText==c)return;const d=this.getNonConflictingName(o.innerText);Qe.renameUserTheme(c,d),Qe.loadTheme(d),o.innerText=d,s=d,a.dataset.id=d}}const l=document.createElement("div");l.classList.add("theme-preview-grid");for(const c of IS){const d=document.createElement("div");d.style.backgroundColor=i[c].toHex(),l.appendChild(d)}o.innerText=t,a.classList.add("theme-cell"),o.classList.add("theme-title"),a.replaceChildren(o,l),this.grid.appendChild(a),t==_.general.theme&&(a.classList.add("selected"),setTimeout(()=>{a.scrollIntoView({behavior:_.general.smoothAnimations?"smooth":"instant",block:"center"})}),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1),a.dataset.id=t,a.onclick=()=>{_.general.theme!=s&&(Qe.loadTheme(s),this.removeAllSelections(),a.classList.add("selected"),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1)}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}getNonConflictingName(e){const t=Qe.getThemes();if(t[e]==null)return e;let i=2;const s=/([^]+)-(\d+)$/.exec(e);s&&(e=s[1],i=parseInt(s[2]));let n=`${e}-${i}`;for(;t[n]!==void 0;)n=`${e}-${i}`,i++;return n}}class fa extends St{app;pickers={};handlers=[];linkBlacklist=new Set;static isOpen=!1;constructor(e){super({title:"Theme Color Editor",width:500,height:400,win_id:"theme-editor",disableClose:!0}),this.app=e,this.initView(),fa.isOpen=!0}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("theme-color-grid"),PS.forEach(l=>{t.appendChild(this.createGroup(l))});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow(),Qe.loadTheme(_.general.theme),this.app.windowManager.openWindow(new Vc(this.app))},s.appendChild(a);const o=document.createElement("button");o.innerText="Save",o.classList.add("confirm"),o.onclick=()=>{Qe.setUserTheme(_.general.theme,Qe.getCurrentTheme()),Qe.loadTheme(_.general.theme),this.app.windowManager.openWindow(new Vc(this.app)),this.closeWindow()},n.appendChild(o),e.replaceChildren(t,i),this.viewElement.appendChild(e)}createGroup(e){const t=document.createElement("div");t.classList.add("theme-group");const i=document.createElement("div");i.classList.add("theme-group-label"),i.innerText=e.name;const s=document.createElement("div");return s.classList.add("theme-picker-grid"),e.ids.forEach(n=>{s.appendChild(this.createPicker(n))}),t.replaceChildren(i,s),t}createPicker(e){const t=()=>{const d=new B(Qe.getCurrentTheme()[e.id]);o.innerText=d.toHex()+" | "+Math.round(d.alpha*100)+"%",!l.isActive()&&(l.value=d)},i=d=>{const h=Qe.getCurrentTheme();h[e.id]=d,Qe._applyTheme(this.updateLinks(e.id,h))},s=document.createElement("div");s.classList.add("theme-color-cell"),pf[e.id]!=""&&Pt(s,{content:pf[e.id]});const n=Mh[e.id];n&&(s.onmouseover=()=>{Object.keys(n).forEach(d=>{this.linkBlacklist.has(d)||this.pickers[d].classList.add("linked")})},s.onmouseout=()=>{Object.keys(n).forEach(d=>{this.pickers[d].classList.remove("linked")})});const a=document.createElement("div");a.innerText=e.label;const o=document.createElement("div");o.classList.add("theme-color-detail");const l=El.create({value:"white",width:30,height:30});l.onColorChange=i,s.replaceChildren(a,o,l);const c=this.getLink(e.id);if(c!==null){const d=document.createElement("div");d.classList.add("ico-checkbox");const h=Ae.getIcon("LINK",16),u=Ae.getIcon("LINK_BROKEN",16);let p=!0;const f=()=>{p?this.linkBlacklist.delete(e.id):this.linkBlacklist.add(e.id),h.style.display=p?"":"none",u.style.display=p?"none":""};d.onclick=()=>{p=!p,f()},Pt(d,{onShow(g){g.setContent(p?`Linked to ${c}`:"Unlinked")}}),Pt(d,{trigger:"click",onShow(g){g.setContent(p?`Linked to ${c}`:"Unlinked")}}),f(),d.replaceChildren(h,u),s.appendChild(d);const m=g=>{p&&(p=!1,f()),i(g)};l.onColorChange=m}return t(),q.on("themeChanged",t),this.handlers.push(t),this.pickers[e.id]=s,s}getLink(e){for(const[t,i]of Object.entries(Mh))if(e in i)return t;return null}average(e){return(e.red+e.green+e.blue)/3}lighten(e,t){return new B(Ld(new B(e).toNumber(),1+t/100))}add(e,t){return new B(BS(new B(e).toNumber(),t))}updateLinks(e,t){const i=new Set,s=[e];for(;s.length!=0;){const n=s.shift(),a=Mh[n];if(a)for(const[o,l]of Object.entries(a))this.linkBlacklist.has(o)||i.has(o)||(t[o]=l.bind(this)(t[n]),s.push(o),i.add(o))}return t}onClose(){fa.isOpen=!1}}const ni=r=>r,ff={offset:{title:"Offset",element:ni({create:(r,e)=>{const t=ot.create(0,_.general.spinnerStep/100,3);return t.onChange=i=>{i!=null&&(e().setOffset(i),r.chartManager.setBeat(r.chartManager.getBeat()))},t.view},update:(r,e)=>{const t=r.querySelector(".spinner-input");if(document.activeElement==t)return;const i=e.getOffset();t.value!=ae(i,3).toFixed(3)&&(t.value=ae(i,3).toFixed(3))}})},bpm:{title:"BPM",element:ni({create:(r,e)=>{const t=ot.create(120,void 0,3);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"BPMS",beat:s}]);return}e().insert([{type:"BPMS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("BPMS",t)?.value??120;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},stop:{title:"Stop",element:ni({create:(r,e)=>{const t=ot.create(0,void 0,3);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.getBeat();e().delete([{type:"STOPS",beat:s}]);return}e().insert([{type:"STOPS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("STOPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},delay:{title:"Delay",element:ni({create:(r,e)=>{const t=ot.create(0,void 0,3);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.getBeat();e().delete([{type:"DELAYS",beat:s}]);return}e().insert([{type:"DELAYS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("DELAYS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},warp:{title:"Warp",element:ni({create:(r,e)=>{const t=ot.create(0,void 0,3,0);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.getBeat();e().delete([{type:"WARPS",beat:s}]);return}i<0||e().insert([{type:"WARPS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("WARPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},timeSig:{title:"Time Sig.",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=ot.create(4,1,0,1);i.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();e().delete([{type:"TIMESIGNATURES",beat:a}]);return}n<1||e().insert([{type:"TIMESIGNATURES",beat:r.chartManager.getBeat(),upper:n,lower:s.value}])};const s=ot.create(4,1,0,1);return s.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();e().delete([{type:"TIMESIGNATURES",beat:a}]);return}n<1||e().insert([{type:"TIMESIGNATURES",beat:r.chartManager.getBeat(),upper:i.value,lower:n}])},t.appendChild(i.view),t.appendChild(s.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("TIMESIGNATURES",t),a=n?.upper??4,o=n?.lower??4;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},tick:{title:"Tickcount",element:ni({create:(r,e)=>{const t=ot.create(4,1,0,0);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"TICKCOUNTS",beat:s}]);return}i<0||e().insert([{type:"TICKCOUNTS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("TICKCOUNTS",t)?.value??4;i.value!=Math.round(s).toString()&&(i.value=Math.round(s).toString())}})},combo:{title:"Combo",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=ot.create(1,1,0,0);i.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();e().delete([{type:"COMBOS",beat:a}]);return}n<0||e().insert([{type:"COMBOS",beat:r.chartManager.getBeat(),hitMult:n,missMult:s.value}])};const s=ot.create(1,1,0,0);return s.onChange=n=>{if(n==null){const a=r.chartManager.getBeat();s.setValue(r.chartManager.loadedChart?.timingData.getEventAtBeat("COMBOS",a)?.missMult??1);return}n<0||e().insert([{type:"COMBOS",beat:r.chartManager.getBeat(),hitMult:i.value,missMult:n}])},t.appendChild(i.view),t.appendChild(s.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("COMBOS",t),a=n?.hitMult??1,o=n?.missMult??1;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},speed:{title:"Speed",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=()=>{e().insert([{type:"SPEEDS",beat:r.chartManager.getBeat(),value:s.value,delay:n.value,unit:a.value=="Beats"?"B":"T"}])},s=ot.create(1,.1,0);s.onChange=o=>{if(o==null){const l=r.chartManager.getBeat();e().delete([{type:"SPEEDS",beat:l}]);return}i()};const n=ot.create(1,.1,0);n.onChange=o=>{o==null||o<0||i()};const a=gi.create(["Beat","Time"],"Beats");return a.onChange=i,t.appendChild(s.view),t.appendChild(n.view),t.appendChild(a.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.children[1].querySelector(".spinner-input"),n=e.getEventAtBeat("SPEEDS",t),a=n?.value??1,o=n?.delay??0,l=n?.unit=="B"?"Beat":"Time";document.activeElement!=i&&i.value!=ae(a,3).toFixed(3)&&(i.value=ae(a,3).toFixed(3)),document.activeElement!=s&&s.value!=ae(o,3).toFixed(3)&&(s.value=ae(o,3).toFixed(3)),s.disabled=n?.beat!=t;const c=r.lastElementChild.querySelector(".dropdown-selected-text");c.innerText!=l&&(c.innerText=l),n?.beat!=t?c.classList.add("disabled"):c.classList.remove("disabled")}})},scroll:{title:"Scroll",element:ni({create:(r,e)=>{const t=ot.create(1,void 0,3);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"SCROLLS",beat:s}]);return}e().insert([{type:"SCROLLS",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("SCROLLS",t)?.value??1;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},fake:{title:"Fake",element:ni({create:(r,e)=>{const t=ot.create(1,void 0,3,0);return t.onChange=i=>{if(i==null){const s=r.chartManager.getBeat();e().delete([{type:"FAKES",beat:s}]);return}i<0||e().insert([{type:"FAKES",beat:r.chartManager.getBeat(),value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("FAKES",t);let n=s?.value??1;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},label:{title:"Label",element:ni({create:(r,e)=>{const t=document.createElement("input");return t.type="text",t.autocomplete="off",t.spellcheck=!1,t.onkeydown=i=>{i.key=="Enter"&&t.blur()},t.onblur=()=>{if(t.value==""){const i=r.chartManager.getBeat();e().delete([{type:"LABELS",beat:i}]);return}e().insert([{type:"LABELS",beat:r.chartManager.getBeat(),value:t.value}])},t},update:(r,e,t)=>{const i=r;if(document.activeElement==i)return;const n=e.getEventAtBeat("LABELS",t)?.value??"";i.value!=n&&(i.value=n)}})}};class LS extends St{app;lastBeat;chartTiming=!1;interval;changeHandler=()=>this.setData();constructor(e){super({title:"Edit Timing Data",width:300,height:340,disableClose:!1,win_id:"timing_data",blocking:!1}),this.app=e,this.lastBeat=Math.round(this.app.chartManager.getBeat()*1e3)/1e3,this.chartTiming=this.app.chartManager.loadedChart.timingData.usesChartTiming(),this.initView(),this.interval=setInterval(()=>{Math.round(this.app.chartManager.getBeat()*1e3)/1e3!=this.lastBeat&&(this.lastBeat=Math.round(this.app.chartManager.getBeat()*1e3)/1e3,this.setData())},17),q.on("timingModified",this.changeHandler),q.on("chartLoaded",this.changeHandler)}onClose(){q.off("timingModified",this.changeHandler),clearInterval(this.interval)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("timing-data");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to";const i=gi.create(["All charts","This chart"],this.chartTiming?"This chart":"All charts");i.onChange(s=>{this.chartTiming=s=="This chart"}),e.appendChild(t),e.appendChild(i.view),Object.values(ff).forEach(s=>{const n=document.createElement("div");n.classList.add("label"),n.innerText=s.title;const a=s.element.create(this.app,()=>this.chartTiming?this.app.chartManager.loadedChart.timingData:this.app.chartManager.loadedSM.timingData);e.appendChild(n),e.appendChild(a)}),this.viewElement.appendChild(e),this.setData()}setData(){this.app.chartManager.loadedChart&&Object.values(ff).forEach((e,t)=>{const i=this.viewElement.children[0].children[t*2+3];e.element.update(i,this.app.chartManager.loadedChart.timingData,this.lastBeat)})}}const mf=[{type:"group",id:"app",label:"App",disable:()=>window.nw===void 0,children:[{type:"subgroup",children:[{type:"item",label:"Window Width",id:"app.width",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.width=e)}}},{type:"item",label:"Window Height",id:"app.height",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.height=e)}}}]},{type:"subgroup",children:[{type:"item",label:"Fullscreen",id:"app.fullscreen",input:{type:"checkbox",onChange:(r,e)=>{const t=nw.Window.get();e?nw.Window.get().enterFullscreen():(t.hide(),nw.Window.get().leaveFullscreen(),t.show())}}}]}]},{type:"group",id:"general",label:"General",children:[{type:"subgroup",children:[{type:"item",label:"Smooth Animations",id:"general.smoothAnimations",input:{type:"checkbox",onChange:(r,e)=>{e?document.body.classList.add("animated"):document.body.classList.remove("animated")}}},{type:"item",label:"Warn before exit",id:"general.warnBeforeExit",input:{type:"checkbox"},tooltip:"Warn before exiting the editor if you have unsaved changes."},{type:"item",label:"Spinner step",id:"general.spinnerStep",input:{type:"slider",min:0,step:.1,max:5,hardMin:0,hardMax:2**31-1},tooltip:"The default increment for all number spinners."}]}]},{type:"group",id:"chart",label:"Chart",children:[{type:"subgroup",label:"Playfield",children:[{type:"subgroup",children:[{type:"item",label:"Enable mouse placement",id:"chart.mousePlacement",input:{type:"checkbox"}},{type:"item",label:"Directional hold placement behavior",id:"chart.defaultHoldPlacement",input:{type:"checkbox"},tooltip:"Changes the hold placement behavior. By default, holds can only be extended in one direction when placed. Turn this off to mimic the behavior of AV/Stepmania."}]},{type:"subgroup",children:[{type:"item",label:"Zoom",id:"chart.zoom",input:{type:"slider",min:50,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Reverse playfield",id:"chart.reverse",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Allow receptor dragging",id:"chart.allowReceptorDrag",input:{type:"checkbox"},tooltip:"Allows the receptors to be dragged to move the playfield."},{type:"item",label:"X position",id:"chart.receptorXPos",input:{type:"slider",min:-400,max:400,hardMin:-(2**31-1),hardMax:2**31-1}},{type:"item",label:"Y position",id:"chart.receptorYPos",input:{type:"slider",min:-400,max:0,hardMin:-(2**31-1),hardMax:2**31-1}}]},{type:"subgroup",children:[{type:"item",label:"Draw length",id:"chart.maxDrawBeats",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes. Increasing this works well for songs with high bpm but can affect performance. Only applies to XMod."},{type:"item",label:"Draw length past receptors",id:"chart.maxDrawBeatsBack",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes past the receptors. Increasing this can affect performance. Only applies to XMod."}]},{type:"subgroup",children:[{type:"item",label:"Draw noteflashes",id:"chart.drawNoteFlash",input:{type:"checkbox"}},{type:"item",label:"Draw note icons",id:"chart.drawIcons",input:{type:"checkbox"},tooltip:"Draw indicators above notes that some noteskins may not differentiate, like Fakes and Lifts."}]}]},{type:"subgroup",label:"Scrolling",children:[{type:"item",label:"Scroll sensitivity",id:"chart.scroll.scrollSensitivity",input:{type:"slider",min:0,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}},tooltip:"Adjust the scroll sensitivity when scrolling through the chart."},{type:"item",label:"Snap every scroll",id:"chart.scroll.scrollSnapEveryScroll",input:{type:"checkbox"},tooltip:"Whether each scroll movement corresponds to moving one snap unit when scrolling. Turning this on will have the same behavior as ArrowVortex. Recommended on for those using a mouse, off for those using trackpad."},{type:"item",label:"Invert zoom in/out",id:"chart.scroll.invertZoomScroll",input:{type:"checkbox"},tooltip:"Inverts the zoom in/out control when scrolling."},{type:"item",label:"Invert scroll direction when in reverse",id:"chart.scroll.invertReverseScroll",input:{type:"checkbox"}}]},{type:"subgroup",label:"Waveform",children:[{type:"item",label:"Draw waveform",id:"chart.waveform.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Color",id:"chart.waveform.color",input:{type:"color"}}]},{type:"subgroup",children:[{type:"item",label:"Draw filtered waveform",id:"chart.waveform.allowFilter",input:{type:"checkbox"}},{type:"item",label:"Filtered color",id:"chart.waveform.filteredColor",input:{type:"color"}}]},{type:"item",label:"Line height",id:"chart.waveform.lineHeight",input:{type:"slider",min:1,max:3,step:.1,hardMax:100},tooltip:"The height of each line of the waveform. Increasing this can help performance."},{type:"item",label:"Antialiasing",id:"chart.waveform.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Allow speed changes",id:"chart.waveform.speedChanges",input:{type:"checkbox"},tooltip:"Allows the waveform to be affected by SPEEDS and SCROLLS."}]},{type:"subgroup",label:"Note Layout",children:[{type:"item",label:"Show Note Layout",id:"chart.noteLayout.enabled",input:{type:"checkbox"}}]},{type:"subgroup",label:"NPS Graph",children:[{type:"item",label:"Show NPS Graph",id:"chart.npsGraph.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Start Color",id:"chart.npsGraph.color1",input:{type:"color"}},{type:"item",label:"End Color",id:"chart.npsGraph.color2",input:{type:"color"}}]}]}]},{type:"group",id:"audio",label:"Audio",children:[{type:"subgroup",children:[{type:"item",label:"Master volume",id:"audio.masterVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Song volume",id:"audio.songVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Sound effect volume",id:"audio.soundEffectVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}}]},{type:"subgroup",children:[{type:"item",label:"Enable assist tick",id:"audio.assistTick",input:{type:"checkbox"},tooltip:"Plays a sound when a note passes the receptors"},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Allow filters to affect audio",id:"audio.allowFilter",input:{type:"checkbox",onChange:r=>{r.chartManager.chartAudio.reload()}}},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]}]},{type:"group",id:"play",label:"Play mode",children:[{type:"subgroup",label:"Calibration",children:[{type:"item",label:"Global offset",id:"play.offset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing a chart. Set to positive if you are hitting early and negative if you are hitting late."},{type:"item",label:"Sound effect offset",id:"play.effectOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing sound effects like assist tick and metronome."},{type:"item",label:"Visual offset",id:"play.visualOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when displaying notes."}]},{type:"subgroup",children:[{type:"item",label:"Judgement tilt",id:"play.judgementTilt",input:{type:"checkbox"},tooltip:"Tilts the judgement text left if you are hitting early and right if you are hitting late."},{type:"item",label:"Hide barlines during play",id:"play.hideBarlines",input:{type:"checkbox"}}]},{type:"subgroup",label:"Timing windows",children:[{type:"item",id:"play.timingCollection",label:"Timing window collection",input:{type:"dropdown",advanced:!1,get items(){return Object.keys(Je.getCollections())}}},{type:"item",id:"play.timingWindowScale",label:"Timing window scale",input:{type:"slider",min:0,step:.001,max:2,hardMax:2**31-1},tooltip:"Scales all timing windows by the given amount."},{type:"item",id:"play.timingWindowAdd",label:"Timing window add",input:{type:"slider",min:0,step:.001,max:1,hardMax:2**31-1},tooltip:"Adds this value (in seconds) to all timing windows."}]}]},{type:"group",id:"performance",label:"Performance",children:[{type:"item",label:"Antialiasing",id:"performance.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Resolution",id:"performance.resolution",input:{type:"slider",min:1,step:1,max:4,hardMin:0,hardMax:2**31-1},tooltip:"Requires a reload."}]},{type:"group",id:"debug",label:"Debug",children:[{type:"item",label:"Show FPS",id:"debug.showFPS",input:{type:"checkbox"}},{type:"item",label:"Show rendering timers",id:"debug.showTimers",input:{type:"checkbox"}},{type:"item",label:"Show scrolls/speeds debug visual",id:"debug.showScroll",input:{type:"checkbox"}},{type:"item",label:"Show noteskin errors",id:"debug.showNoteskinErrors",input:{type:"checkbox"}}]}];class DS extends St{app;observer;sectionContainer;constructor(e){super({title:"Options",width:600,height:400,disableClose:!1,win_id:"user_options",blocking:!1}),this.app=e,this.initView(),q.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for an option...",s.oninput=()=>{a.replaceChildren(),o.replaceChildren(...this.createOptions(this.filterOptions(s.value)))},i.appendChild(s);const n=document.createElement("div");n.classList.add("pref-scrollers");const a=document.createElement("div");a.classList.add("pref-section-scroller"),this.sectionContainer=a;const o=document.createElement("div");o.classList.add("pref-option-scroller"),n.replaceChildren(a,o),this.observer=new IntersectionObserver(l=>{l.forEach(c=>{const d=c.target.dataset.id,h=a.querySelector(`.pref-section[data-id=${d}]`);h&&(c.intersectionRatio>0?h.classList.add("selected"):h.classList.remove("selected"))})},{}),t.replaceChildren(i,n),a.replaceChildren(),o.replaceChildren(...this.createOptions(mf)),e.appendChild(t),this.viewElement.appendChild(e)}createOptions(e){return e.filter(t=>!t.disable?.(this.app)).map(t=>{const i=this.makeOption(t);return t.type=="group"&&(this.observer.observe(i),this.sectionContainer?.appendChild(this.createEmptyGroup(t))),i})}makeOption(e){const t=document.createElement("div");t.classList.add("pref-"+e.type),(e.type=="group"||e.type=="item")&&(t.dataset.id=e.id);const i=document.createElement("div");i.classList.add(`pref-${e.type}-label`),e.label!==void 0&&(i.innerText=e.label,t.appendChild(i));const s=Ae.getIcon("REVERT");if(e.type=="item"&&(s.style.width="12px",s.addEventListener("click",()=>{_.applyOption([e.id,_.getDefaultOption(e.id)]);const n=e.input.onChange;n?.(this.app,_.getDefaultOption(e.id)),q.emit("userOptionUpdated",e.id),t.replaceWith(this.makeOption(e))}),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",t.appendChild(s)),e.type=="item"){const n=_.getOption(e.id);let a;if(!e.input)return t;switch(i.innerText=e.label,e.input.type){case"checkbox":{const o=document.createElement("input"),l=e.input.onChange;o.type="checkbox",o.checked=n,o.onblur=null,o.onchange=()=>{_.applyOption([e.id,o.checked]),q.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",l?.(this.app,o.checked)},o.classList.add("pref-input","right"),o.onkeydown=c=>{c.key=="Enter"&&o.blur()},a=o;break}case"dropdown":{if(e.input.advanced){const o=e.input.transformers.deserialize,l=e.input.transformers.serialize,c=e.input.onChange,d=gi.create(e.input.items,l(n));d.onChange(h=>{_.applyOption([e.id,o(h)]),q.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(h))}),d.view.classList.add("pref-input","dropdown-right"),a=d.view}else{const o=e.input.onChange,l=gi.create(e.input.items,n);l.onChange(c=>{_.applyOption([e.id,c]),q.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,c)}),l.view.classList.add("pref-input","dropdown-right"),a=l.view}break}case"number":{const o=e.input.transformers?.deserialize??(h=>h),l=e.input.transformers?.serialize??(h=>h),c=e.input.onChange,d=ot.create(l(n),e.input.step,e.input.precision,e.input.min,e.input.max);d.onChange=h=>{if(!h){d.setValue(l(h));return}_.applyOption([e.id,o(h)]),q.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(h))},a=d.view;break}case"slider":{const o=e.input.transformers?.deserialize??(m=>m),l=e.input.transformers?.serialize??(m=>m),c=e.input.onChange,d=document.createElement("div");d.style.display="flex",d.style.alignItems="center";const h=document.createElement("input");h.type="range",h.min=e.input.min?.toString()??"",h.max=e.input.max?.toString()??"",h.step=e.input.step?.toString()??"1",h.value=l(n).toString();const u=document.createElement("input");u.type="text",u.value=(Math.round(l(n)*1e3)/1e3).toString();const p=e.input.min??e.input.hardMin??-Number.MAX_VALUE,f=e.input.max??e.input.hardMax??Number.MAX_VALUE;u.onblur=()=>{let m=ua(u.value);if(m===null){u.value=(Math.round(l(n)*1e3)/1e3).toString();return}m=Be(m,p,f),u.value=ae(m,3).toString(),u.blur(),u.value==""?u.value=l(m).toString():(_.applyOption([e.id,o(m)]),q.emit("userOptionUpdated",e.id)),h.value=m.toString(),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(m))},h.oninput=()=>{const m=parseFloat(h.value);u.value=ae(m,3).toString(),_.applyOption([e.id,o(m)]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block"},u.style.width="50px",u.onkeydown=m=>{m.key=="Enter"&&u.blur()},d.appendChild(h),d.appendChild(u),a=d;break}case"text":{const o=e.input.onChange,l=document.createElement("input");l.type="text",l.value=n.toString(),l.onblur=()=>{_.applyOption([e.id,l.value]),q.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,l.value)},l.onkeydown=c=>{c.key=="Enter"&&l.blur()},a=l;break}case"color":{const o=e.input.onChange,l=El.create({value:n});l.onColorChange=c=>{_.applyOption([e.id,c.toHexa()]),q.emit("userOptionUpdated",e.id),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,c)},a=l}}a.classList.add("pref-item-input"),t.appendChild(a)}else{const n=document.createElement("div");n.classList.add("pref-children"),t.appendChild(n),n.replaceChildren(...this.createOptions(e.children))}return e.type=="item"&&e.tooltip!==void 0&&Pt(t,{content:e.tooltip}),t}filterOptions(e,t=mf){const i=[];return t.forEach(s=>{if(s.label&&s.label.toLowerCase().includes(e.toLowerCase())){i.push(s);return}if(s.type=="group"||s.type=="subgroup"){const n=this.filterOptions(e,s.children);n.length!=0&&i.push({...s,children:n})}}),i}createEmptyGroup(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e.id,t.innerText=e.label,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e.id}]`).scrollIntoView()},t}onClose(){this.observer?.disconnect()}}var Xn=(r=>(r.SHIFT="Shift",r.CTRL="Ctrl",r.ALT="Alt",r.META="Command",r))(Xn||{});const Si=navigator.userAgent.indexOf("Mac OS X")>-1,dt=Si?"Command":"Ctrl",OS={Shift:Si?"⇧":"Shift",Ctrl:Si?"⌃":"Ctrl",Alt:Si?"⌥":"Alt",Command:"⌘"},gf={ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",BracketLeft:"[",BracketRight:"]",Semicolon:";",Quote:"'",Backslash:"\\",Slash:"/",Period:".",Comma:",",Backquote:"`",Minus:"-",Equal:"+"},vy={Home:Si?"fn Left":"Home",End:Si?"fn Right":"End",PageUp:Si?"fn Up":"End",PageDown:Si?"fn Down":"End"},tl=["ctrlKey","altKey","shiftKey","metaKey"],Co=["Ctrl","Alt","Shift","Command"],Tt={playback:{label:"Play/Pause",combos:[{key:"Space",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.playPause()},decreaseSnap:{label:"Decrease snap",combos:[{key:"Left",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.previousSnap()},increaseSnap:{label:"Increase snap",combos:[{key:"Right",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.nextSnap()},cursorUp:{label:"Move cursor up",combos:[{key:"Up",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>{r.chartManager.snapToPreviousTick()}},cursorDown:{label:"Move cursor down",combos:[{key:"Down",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>{r.chartManager.snapToNextTick()}},increaseScrollSpeed:{label:"Increase scroll speed",combos:[{key:"Up",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>_.chart.speed=Math.max(10,_.chart.speed*Math.pow(1.01,30))},decreaseScrollSpeed:{label:"Decrease scroll speed",combos:[{key:"Down",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>_.chart.speed=Math.max(10,_.chart.speed*Math.pow(1.01,-30))},zoomIn:{label:"Zoom in",combos:[{key:"+",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom+=.1,Se.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},zoomOut:{label:"Zoom out",combos:[{key:"-",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom=Math.max(.1,_.chart.zoom-.1),Se.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},zoomDefault:{label:"Reset zoom",combos:[{key:"0",mods:[dt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom=1,Se.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},newSong:{label:"New song...",bindLabel:"New song",combos:[{key:"N",mods:[dt]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new fy(r))}},openSong:{label:"Open song...",bindLabel:"Open song",combos:[{key:"O",mods:[dt]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>{if(window.nw){const e=document.createElement("input");e.type="file",e.accept=".sm,.ssc",e.onchange=()=>r.chartManager.loadSM(e.value),e.click()}else r.windowManager.openWindow(new my(r,!1))}},songProperties:{label:"Song properties...",bindLabel:"Open song properties",combos:[{key:"O",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new xS(r))},save:{label:"Save...",bindLabel:"Save",combos:[{key:"S",mods:[dt]}],disabled:r=>!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>r.chartManager.save()},export:{label:"Save and export current song",combos:[{key:"E",mods:[dt]}],disabled:r=>!!window.nw||!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>{r.chartManager.save(),Ue.getStandardHandler().saveDirectory(r.chartManager.smPath)}},exportNotedata:{label:"Export to notedata...",bindLabel:"Export to notedata",combos:[{key:"E",mods:[dt,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new dS(r,r.chartManager.selection.notes))},openChart:{label:"Chart list",bindLabel:"Open chart list",combos:[{key:"O",mods:[dt,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new ry(r))},timingDataRow:{label:"Edit timing data at row",combos:[{key:"T",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new LS(r))},selectRegion:{label:"Select region",combos:[{key:"Tab",mods:[]}],disabled:r=>!r.chartManager.loadedChart&&r.chartManager.getMode()!=Y.Edit,callback:r=>r.chartManager.selectRegion()},volumeUp:{label:"Increase master volume",combos:[{key:"Up",mods:["Alt"]}],disabled:!1,callback:()=>{_.audio.masterVolume=Math.min(_.audio.masterVolume+.05,1),Se.create("Master volume: "+Math.round(_.audio.masterVolume*100)+"%")}},volumeDown:{label:"Decrease master volume",combos:[{key:"Down",mods:["Alt"]}],disabled:!1,callback:()=>{_.audio.masterVolume=Math.max(_.audio.masterVolume-.05,0),Se.create("Master volume: "+Math.round(_.audio.masterVolume*100)+"%")}},songVolumeUp:{label:"Increase song volume",combos:[{key:"Up",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{_.audio.songVolume=Math.min(_.audio.songVolume+.05,1),Se.create("Song volume: "+Math.round(_.audio.songVolume*100)+"%")}},songVolumeDown:{label:"Decrease song volume",combos:[{key:"Down",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{_.audio.songVolume=Math.max(_.audio.songVolume-.05,0),Se.create("Song volume: "+Math.round(_.audio.songVolume*100)+"%")}},effectvolumeUp:{label:"Increase tick/metronome volume",combos:[{key:"Up",mods:["Shift",dt,"Alt"]}],disabled:!1,callback:()=>{_.audio.soundEffectVolume=Math.min(_.audio.soundEffectVolume+.05,1),Se.create("Effect volume: "+Math.round(_.audio.soundEffectVolume*100)+"%")}},effectvolumeDown:{label:"Decrease tick/metronome volume",combos:[{key:"Down",mods:["Shift",dt,"Alt"]}],disabled:!1,callback:()=>{_.audio.soundEffectVolume=Math.max(_.audio.soundEffectVolume-.05,0),Se.create("Effect Volume: "+Math.round(_.audio.soundEffectVolume*100)+"%")}},rateUp:{label:"Increase playback rate",combos:[{key:"Right",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:()=>{_.audio.rate+=.05,Se.create("Playback Rate: "+Math.round(_.audio.rate*100)+"%")}},rateDown:{label:"Decrease playback rate",combos:[{key:"Left",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:()=>{_.audio.rate=Math.max(_.audio.rate-.05,.1),Se.create("Playback Rate: "+Math.round(_.audio.rate*100)+"%")}},rateDefault:{label:"Reset playback rate",combos:[],disabled:!1,callback:()=>{_.audio.rate=1,Se.create("Playback Rate: "+Math.round(_.audio.rate)+"%")}},previousMeasure:{label:"Previous measure",combos:[{key:"PageUp",mods:[]},{key:";",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>{const e=r.chartManager.getBeat(),t=r.chartManager.loadedChart.timingData.getMeasureLength(e-.001);r.chartManager.snapToNearestTick(Math.max(0,e-t))}},nextMeasure:{label:"Next measure",combos:[{key:"PageDown",mods:[]},{key:"'",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>{const e=r.chartManager.getBeat(),t=r.chartManager.loadedChart.timingData.getMeasureLength(e);r.chartManager.snapToNearestTick(Math.max(0,e+t))}},previousNote:{label:"Previous note",combos:[{key:",",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.previousNote()},nextNote:{label:"Next note",combos:[{key:".",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.nextNote()},jumpChartStart:{label:"Jump to first note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.firstNote()},jumpChartEnd:{label:"Jump to last note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.lastNote()},jumpSongStart:{label:"Jump to song start",combos:[{key:"Home",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.setBeat(Math.max(0,r.chartManager.loadedChart.getBeatFromSeconds(0)))},jumpSongEnd:{label:"Jump to song end",combos:[{key:"End",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.setBeat(r.chartManager.loadedChart.getBeatFromSeconds(r.chartManager.chartAudio.getSongLength()))},assistTick:{label:"Assist tick",combos:[{key:"F7",mods:[]}],disabled:()=>!Ie.assist,callback:()=>{_.audio.assistTick=!_.audio.assistTick,Se.create("Assist Tick: "+(_.audio.assistTick?"on":"off"))}},metronome:{label:"Metronome",combos:[{key:"F7",mods:["Alt"]}],disabled:()=>!Ie.assist,callback:()=>{_.audio.metronome=!_.audio.metronome,Se.create("Metronome: "+(_.audio.metronome?"on":"off"))}},XMod:{label:"XMod (Beat-based)",combos:[{key:"X",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.CMod=!1,Se.create("Switched to XMod")}},CMod:{label:"CMod (Time-based)",combos:[{key:"C",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.CMod=!0,Se.create("Switched to CMod")}},reverse:{label:"Reverse playfield",combos:[],disabled:!1,callback:()=>{_.chart.reverse=!_.chart.reverse,Se.create("Reverse Playfield: "+(_.chart.reverse?"on":"off"))}},hideWarpedArrows:{label:"Hide warped notes (CMod only)",combos:[{key:"W",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.hideWarpedArrows=!_.chart.hideWarpedArrows,Se.create("Hide Warped Arrows: "+(_.chart.hideWarpedArrows?"on":"off"))}},hideFakedArrows:{label:"Hide faked notes (CMod only)",combos:[{key:"F",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.hideFakedArrows=!_.chart.hideFakedArrows,Se.create("Hide Faked Arrows: "+(_.chart.hideFakedArrows?"on":"off"))}},doSpeedChanges:{label:"Do speed changes (XMod only)",combos:[{key:"S",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.doSpeedChanges=!_.chart.doSpeedChanges,Se.create("Speed Changes: "+(_.chart.doSpeedChanges?"on":"off"))}},showEq:{label:"Equalizer",combos:[{key:"E",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new hS(r))},detectSync:{label:"Detect audio sync",combos:[{key:"L",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new gy(r))},previousNoteType:{label:"Previous note type",combos:[{key:"N",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.previousNoteType()},nextNoteType:{label:"Next note type",combos:[{key:"M",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.Record,callback:r=>r.chartManager.nextNoteType()},undo:{label:"Undo",combos:[{key:"Z",mods:[dt]}],disabled:r=>!r.actionHistory.canUndo()||r.chartManager.getMode()!=Y.Edit,callback:r=>r.actionHistory.undo()},redo:{label:"Redo",combos:[{key:"Y",mods:[dt]},{key:"Z",mods:[dt,"Shift"]}],disabled:r=>!r.actionHistory.canRedo()||r.chartManager.getMode()!=Y.Edit,callback:r=>r.actionHistory.redo()},mousePlacement:{label:"Enable Mouse Note Placement",combos:[{key:"M",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.mousePlacement=!_.chart.mousePlacement,Se.create("Mouse Note Placement: "+(_.chart.mousePlacement?"on":"off"))}},playMode:{label:"Enter/Exit Play Mode",combos:[{key:"P",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Record||!Ie.playMode,callback:r=>r.chartManager.setMode(Y.Play)},recordMode:{label:"Enter/Exit Record Mode",combos:[{key:"R",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.View||!Ie.recordMode,callback:r=>r.chartManager.setMode(Y.Record)},playModeStart:{label:"Play from start",combos:[{key:"P",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Record||!Ie.playMode,callback:r=>{r.chartManager.setBeat(0),r.chartManager.setMode(Y.Play)}},recordModeStart:{label:"Record from start",combos:[{key:"R",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==Y.Play||r.chartManager.getMode()==Y.View||!Ie.recordMode,callback:r=>r.chartManager.setMode(Y.Record)},options:{label:"Options...",bindLabel:"Edit options",combos:[{key:",",mods:[dt]}],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new DS(r))}},keybinds:{label:"Keybinds...",bindLabel:"Edit keybinds",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new Ui(r))}},gameplayKeybinds:{label:"Gameplay keybinds...",bindLabel:"Edit gameplay keybinds",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new uS(r))}},themes:{label:"Themes...",bindLabel:"Edit themes",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows||fa.isOpen,callback:r=>{r.windowManager.openWindow(new Vc(r))}},convertHoldsRolls:{label:"Holds to rolls",bindLabel:"Convert holds to rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"&&(e.type="Roll"),e))}},convertRollsHolds:{label:"Rolls to holds",bindLabel:"Convert rolls to holds",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Roll"&&(e.type="Hold"),e))}},swapHoldsRolls:{label:"Swap holds and rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"?e.type="Roll":e.type=="Roll"&&(e.type="Hold"),e))}},convertHoldsTaps:{label:"Holds/rolls to taps",bindLabel:"Convert holds/rolls to taps",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>((e.type=="Hold"||e.type=="Roll")&&(e.type="Tap"),e))}},convertTapsMines:{label:"Taps to mines",bindLabel:"Convert ntapsotes to mines",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Mine"),e))}},convertTapsLifts:{label:"Taps to lifts",bindLabel:"Convert taps to lifts",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Lift"),e))}},convertTapsFakes:{label:"Taps to fakes",bindLabel:"Convert taps to fakes",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Fake"),e))}},mirrorHorizontally:{label:"Horizontally",bindLabel:"Mirror horizontally",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e))}},mirrorVertically:{label:"Vertically",bindLabel:"Mirror vertically",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},mirrorBoth:{label:"Both",bindLabel:"Mirror both",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},selectBeforeCursor:{label:"Select before cursor",combos:[{key:"Home",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ne.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beate.beat!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ne.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beat>r.chartManager.getBeat())):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData().filter(e=>e.beat>r.chartManager.getBeat()))}},selectAll:{label:"Select all",combos:[{key:"A",mods:[dt]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ne.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata()):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData())}},expand2to1:{label:"Expand 2:1 (8th to 4th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=Y.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*2+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=2,t.hold=Math.round(t.hold*48)/48),t))}},expand3to2:{label:"Expand 3:2 (12th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=Y.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*1.5+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=1.5,t.hold=Math.round(t.hold*48)/48),t))}},expand4to3:{label:"Expand 4:3 (16th to 2th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=Y.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*4/3+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=4/3,t.hold=Math.round(t.hold*48)/48),t))}},compress1to2:{label:"Compress 1:2 (4th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=Y.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/2+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold/=2,t.hold=Math.round(t.hold*48)/48),t))}},compress2to3:{label:"Compress 2:3 (8th to 12th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=Y.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/1.5+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold/=1.5,t.hold=Math.round(t.hold*48)/48),t))}},compress3to4:{label:"Compress 3:4 (12th to 16th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=Y.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*.75+e,t.beat=Math.round(t.beat*48)/48,Le(t)&&(t.hold*=.75,t.hold=Math.round(t.hold*48)/48),t))}},quantize4th:{label:"4ths",bindLabel:"Quantize to 4ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,4),e.beat=Math.round(e.beat*48)/48,e))}},quantize8th:{label:"8ths",bindLabel:"Quantize to 8ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,8),e.beat=Math.round(e.beat*48)/48,e))}},quantize12th:{label:"12ths",bindLabel:"Quantize to 12ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,12),e.beat=Math.round(e.beat*48)/48,e))}},quantize16th:{label:"16ths",bindLabel:"Quantize to 16ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,16),e.beat=Math.round(e.beat*48)/48,e))}},quantize24th:{label:"24ths",bindLabel:"Quantize to 24ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,24),e.beat=Math.round(e.beat*48)/48,e))}},quantize32nd:{label:"32nds",bindLabel:"Quantize to 32nds",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,32),e.beat=Math.round(e.beat*48)/48,e))}},quantize48th:{label:"48ths",bindLabel:"Quantize to 48ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,48),e.beat=Math.round(e.beat*48)/48,e))}},quantize96th:{label:"96ths",bindLabel:"Quantize to 96ths",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=Y.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.beat=r.chartManager.getClosestTick(e.beat,96),e.beat=Math.round(e.beat*48)/48,e))}},delete:{label:"Delete",combos:[{key:"Backspace",mods:[]},{key:"Delete",mods:[]}],disabled:r=>r.chartManager.getMode()!=Y.Edit||r.chartManager.selection.notes.length==0&&r.chartManager.eventSelection.timingEvents.length==0,callback:r=>{r.chartManager.deleteSelection(),r.chartManager.deleteEventSelection()}},paste:{label:"Paste",combos:[{mods:[dt],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=Y.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e)}},pasteReplace:{label:"Clear and paste",combos:[{mods:[dt,"Shift"],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=Y.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e,!0)}},copy:{label:"Copy",combos:[{mods:[dt],key:"C"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=Y.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e)}},cut:{label:"Cut",combos:[{mods:[dt],key:"X"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=Y.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e),r.chartManager.deleteSelection()}},adjustOffset:{label:"Adjust offset",combos:[],disabled:()=>!Ie.openWindows,callback:r=>r.windowManager.openWindow(new _S(r))},setSongPreview:{label:"Set as song preview",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=Y.Edit||!r.chartManager.hasRange(),callback:r=>{const e=r.chartManager.loadedChart,t=r.chartManager.loadedSM.properties.SAMPLESTART??"0",i=r.chartManager.loadedSM.properties.SAMPLELENGTH??"10";let s="",n="";if(r.chartManager.startRegion!==void 0&&r.chartManager.endRegion!==void 0){const a=e.getSecondsFromBeat(r.chartManager.startRegion),o=e.getSecondsFromBeat(r.chartManager.endRegion);s=ae(a,3).toString(),n=ae(o-a,3).toString()}else{const o=(r.chartManager.selection.notes.length>0?r.chartManager.selection.notes:r.chartManager.eventSelection.timingEvents).map(d=>d.beat),l=e.getSecondsFromBeat(Math.min(...o)),c=e.getSecondsFromBeat(Math.max(...o));s=ae(l,3).toString(),n=ae(c-l,3).toString()}mt.instance.run({action:a=>{a.chartManager.loadedSM.properties.SAMPLESTART=s,a.chartManager.loadedSM.properties.SAMPLELENGTH=n},undo:()=>{r.chartManager.loadedSM.properties.SAMPLESTART=t,r.chartManager.loadedSM.properties.SAMPLELENGTH=i}})}},showDebugTimers:{label:"Toggle Debug Timers",combos:[{key:"F3",mods:["Shift"]}],disabled:!1,callback:()=>{_.debug.showTimers=!_.debug.showTimers}},showFPSCounter:{label:"Toggle FPS Counter",combos:[{key:"F3",mods:[]}],disabled:!1,callback:()=>{_.debug.showFPS=!_.debug.showFPS}},noteTypeTap:{label:"Switch to Taps",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Tap")}},noteTypeLift:{label:"Switch to Lifts",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Lift")}},noteTypeMine:{label:"Switch to Mines",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Mine")}},noteTypeFake:{label:"Switch to Fakes",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Fake")}},quant4:{label:"Switch to 4ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1}},quant8:{label:"Switch to 8ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/2}},quant12:{label:"Switch to 12ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/3}},quant16:{label:"Switch to 16ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/4}},quant24:{label:"Switch to 24ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/6}},quant32:{label:"Switch to 32ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/8}},quant48:{label:"Switch to 48ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/12}},quant96:{label:"Switch to 96ths",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/24}},quant192:{label:"Switch to 192nds",combos:[],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.snap=1/48}},openGuide:{label:"Open Help Guide",combos:[],disabled:!1,callback:()=>{window.open("/smeditor/guide/")}},noteskinWindow:{label:"Noteskins...",bindLabel:"Open Noteskin Window",combos:[{mods:["Shift"],key:"N"}],disabled:r=>!r.chartManager.chartView,callback:r=>r.windowManager.openWindow(new wS(r))},previousChart:{label:"Previous chart",combos:[{key:"F5",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t-1]&&r.chartManager.loadChart(e[t-1])}},nextChart:{label:"Next chart",combos:[{key:"F6",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t+1]&&r.chartManager.loadChart(e[t+1])}}};class FS{static popup;static open(e,t){this.popup=this.build(e,t),document.getElementById("popups")?.appendChild(this.popup)}static build(e,t){const i=document.createElement("div");i.classList.add("update-popup");const s=document.createElement("div");s.classList.add("title"),s.innerText=`A new version of the desktop app is available! (${e})`;const n=document.createElement("div");return n.classList.add("desc"),n.innerText="Click here to download the new version.",i.replaceChildren(s,n),i.onclick=()=>{localStorage.setItem("downloadedVersion",e),nw.require("nw.gui").Shell.openExternal(t),this.close()},i}static close(){this.popup&&(this.popup.style.opacity="0",this.popup.onclick=null,setTimeout(()=>this.popup.remove(),300))}}class jt extends sg{static graphics=new An;static textures={default:Ft.create({width:50,height:50}),noBorder:Ft.create({width:50,height:50}),onlyBorder:Ft.create({width:50,height:50})};static init(e){this.textures.default=Ft.create({width:50,height:50,resolution:e.resolution}),this.textures.noBorder=Ft.create({width:50,height:50,resolution:e.resolution}),this.textures.onlyBorder=Ft.create({width:50,height:50,resolution:e.resolution}),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(1,0),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.default}),this.graphics.clear(),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(0,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.noBorder}),this.graphics.clear(),this.graphics.beginFill(16777215,0),this.graphics.lineStyle(2,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.onlyBorder})}constructor(e){super(jt.textures[e??"default"],5,5,5,5)}}const Yn=[];function yf(){return Yn.length}function iM(){for(Yn.push(Date.now());Yn.length>0&&Yn[0]0&&qn[0]yf()+" FPS"});drawUpdateTimeGraph=new Fn({width:300,height:wi,color:6034982,min:0,unit:"ms",label:"DrawUpdate",precision:1});updateTimeGraph=new Fn({width:300,height:wi,color:1516101,min:0,unit:"ms",label:"Update",precision:1,sublabel:()=>vf()+" TPS"});memoryTimeGraph=new Fn({width:300,height:wi,color:6626406,min:0,formatter:e=>Math.round(e/1048576)+" MB",label:"Memory"});cpuGraph=new Fn({width:300,height:wi,color:5190685,min:0,label:"CPU"});graphs=new Ee;fpsCounter=new Ee;fpsBg=new jt("noBorder");fpsText=new De("",{fontName:"Main",fontSize:12});lastFrameTime=0;constructor(e){super(e),this.drawUpdateTimeGraph.y+=wi+5,this.updateTimeGraph.y+=(wi+5)*2,this.memoryTimeGraph.y+=(wi+5)*3,this.cpuGraph.y+=(wi+5)*4,ma.instance=this,this.fpsText.x=5,this.fpsBg.y=-5,et(this.fpsBg,"widget-bg"),et(this.fpsText,"text-color"),this.graphs.addChild(this.frameTimeGraph,this.drawUpdateTimeGraph,this.updateTimeGraph),performance.memory&&this.graphs.addChild(this.memoryTimeGraph),this.fpsCounter.addChild(this.fpsBg,this.fpsText),this.graphs.visible=_.debug.showTimers,this.fpsCounter.visible=_.debug.showFPS,this.addChild(this.graphs,this.fpsCounter)}update(){this.x=-this.manager.app.renderer.screen.width/2+20,this.y=-this.manager.app.renderer.screen.height/2+20,this.graphs.children.forEach(e=>e.update()),this.graphs.visible=_.debug.showTimers,this.fpsCounter.visible=_.debug.showFPS,this.fpsText.text=`${yf()} FPS ${vf()} TPS ${this.lastFrameTime.toFixed(2)} ms -`,this.fpsBg.width=this.fpsText.width+10,this.fpsBg.height=this.fpsText.height+10,_.debug.showTimers?(this.fpsBg.y=(wi+5)*this.graphs.children.length-5,this.fpsText.y=(wi+5)*this.graphs.children.length):(this.fpsBg.y=-5,this.fpsText.y=0)}addMemoryTimeValue(e){this.memoryTimeGraph.addValue(e)}addFrameTimeValue(e){this.lastFrameTime=e,this.frameTimeGraph.addValue(e)}addUpdateTimeValue(e){this.updateTimeGraph.addValue(e)}addDrawUpdateTimeValue(e){this.drawUpdateTimeGraph.addValue(e)}}class Fn extends Ee{graphWidth;graphHeight;color;unit;precision;formatter;sublabel;maxEase=1;targetMax=1;minEase=1;targetMin=1;constrainedMin=null;constrainedMax=null;dataPoints=[];linePool=[];lineContainer;labelText;sublabelText;topText;bottomText;constructor(e){super();const{width:t,height:i,color:s=16777215,unit:n="",label:a="",min:o=null,max:l=null,precision:c=0,formatter:d=null,sublabel:h=()=>""}=e;this.graphWidth=t,this.graphHeight=i,this.color=s,this.unit=n,this.constrainedMax=l,this.constrainedMin=o,this.precision=c,this.formatter=d,this.sublabel=h,this.lineContainer=new hd(t,{position:!0},16384,!0);const u=new jt("noBorder");u.tint=0,u.alpha=.3,u.width=this.graphWidth,u.height=this.graphHeight,et(u,"text-color"),this.labelText=new De(a,{fontName:"Main",fontSize:Math.min(i/5,16)}),this.labelText.alpha=.8,this.sublabelText=new De("",{fontName:"Main",fontSize:Math.min(i/5,16)}),this.topText=new De("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.topText.anchor.x=1,this.topText.alpha=.5,this.topText.x=this.graphWidth,this.bottomText=new De("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.bottomText.anchor.x=1,this.bottomText.anchor.y=1,this.bottomText.alpha=.5,this.bottomText.x=this.graphWidth,this.bottomText.y=this.graphHeight,this.sublabelText.y=this.graphHeight,this.sublabelText.anchor.y=1,this.sublabelText.alpha=.5,this.addChild(u,this.lineContainer,this.labelText,this.sublabelText,this.topText,this.bottomText)}addValue(e){if(this.lineContainer.children[0]?.x+this.lineContainer.x<0){const i=this.lineContainer.children[0];this.dataPoints.shift(),this.removeChild(i),this.linePool.push(i)}this.lineContainer.x-=1,this.lineContainer.x<-1e7&&(this.lineContainer.children.forEach(i=>{i.x-=1e7}),this.lineContainer.x+=1e7);const t=this.linePool.shift()??new Oe(ie.WHITE);t.width=1,t.anchor.x=.5,t.anchor.y=1,t.tint=this.color,t.alpha=.6,t.x=this.graphWidth-this.lineContainer.x,t.y=this.graphHeight,t.value=e,this.dataPoints.push(e),this.targetMax=this.constrainedMax!==null?this.constrainedMax:Math.max(...this.dataPoints),this.targetMin=this.constrainedMin!==null?this.constrainedMin:Math.min(...this.dataPoints),this.lineContainer.addChild(t)}update(){this.dataPoints.length!=0&&(this.maxEase=(this.maxEase-this.targetMax)*.1+this.targetMax,this.minEase=(this.minEase-this.targetMin)*.1+this.targetMin,this.lineContainer.children.forEach(e=>{e.height=Be((e.value-this.minEase)/this.maxEase,0,1)*this.graphHeight}),this.topText.text=this.formatter?.(this.maxEase)??`${ae(this.maxEase,this.precision)} ${this.unit}`,this.bottomText.text=this.formatter?.(this.minEase)??`${ae(this.minEase,this.precision)} ${this.unit}`,this.sublabelText.text=this.sublabel())}}class by extends Aa{backing=new jt("noBorder");overlay=new Oe(ie.WHITE);selectionOverlay=new Oe(ie.WHITE);container=new Ee;lastHeight=0;lastCMod;mouseDown=!1;queued=!1;verticalMargin=40;backingVerticalPadding=10;backingWidth=32;xOffset=20;constructor(e,t=20,i=32){super(e),this.backingWidth=i,this.xOffset=t,this.addChild(this.backing),this.addChild(this.container),this.visible=!1,et(this.backing,"widget-bg"),this.overlay.anchor.x=.5,this.overlay.anchor.y=0,this.overlay.alpha=.3,this.lastCMod=_.chart.CMod,this.addChild(this.overlay),this.x=this.manager.app.renderer.screen.width/2-this.xOffset,K.on("chartLoaded",()=>{this.queued=!1,this.populate()}),K.on("chartModifiedAfter",()=>{this.queued||this.populate(),this.queued=!0});const s=setInterval(()=>{this.queued&&(this.queued=!1,this.populate())},3e3);this.on("destroyed",()=>clearInterval(s)),this.eventMode="static",this.on("mousedown",n=>{this.mouseDown=!0,this.handleMouse(n)}),this.on("mousemove",n=>{this.mouseDown&&this.handleMouse(n)}),this.on("mouseup",()=>{this.mouseDown=!1}),this.on("mouseleave",()=>{this.mouseDown=!1})}handleMouse(e){if(this.manager.chartManager.getMode()==X.Play||!this.getChart())return;let t=(this.container.toLocal(e.global).y+this.container.height/2)/this.container.height;t=Be(t,0,1),this.getChart().getNotedata().at(-1)&&(_.chart.CMod?this.manager.chartManager.setTime(Ht(-this.getChart().timingData.getOffset(),this.getChart().getLastSecond(),t)):this.manager.chartManager.setBeat(this.getChart().getLastBeat()*t))}update(){this.scale.y=_.chart.reverse?-1:1;const e=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=e+this.backingVerticalPadding,this.backing.position.y=-this.backing.height/2,this.backing.position.x=-this.backing.width/2,this.x=this.manager.app.renderer.screen.width/2-this.xOffset;const t=this.getChart(),i=this.manager.chartManager.chartView;if(!t||!i||!Ie.layout){this.visible=!1;return}if(this.visible=!0,!t.getNotedata().at(-1)){this.overlay.height=0;return}const n=_.chart.CMod?i.getSecondFromYPos(-this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(-this.manager.app.renderer.screen.height/2,!0),a=_.chart.CMod?i.getSecondFromYPos(this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(this.manager.app.renderer.screen.height/2,!0),o=this.getYFromRange(t,n,a);this.overlay.y=o.startY,this.overlay.height=o.endY-o.startY,this.overlay.height=Math.max(2,this.overlay.height);const l=this.manager.chartManager.selection.notes;if(l.length<1)this.selectionOverlay.visible=!1;else{this.selectionOverlay.visible=!0;let c,d;_.chart.CMod?(c=Xp(l.map(u=>u.second)),d=qp(l.map(u=>t.getSecondsFromBeat(dr(u))))):(c=Xp(l.map(u=>u.beat)),d=qp(l.map(u=>dr(u))));const h=this.getYFromRange(t,c,d);this.selectionOverlay.y=h.startY,this.selectionOverlay.height=h.endY-h.startY,this.selectionOverlay.height=Math.max(2,this.selectionOverlay.height)}(this.manager.app.renderer.screen.height!=this.lastHeight||this.lastCMod!=_.chart.CMod)&&(this.lastCMod=_.chart.CMod,this.lastHeight=this.manager.app.renderer.screen.height,this.updateDimensions(),this.populate())}getYFromRange(e,t,i){const s=e.getLastBeat(),n=e.getLastSecond();let a=Nt(0,s,t),o=Nt(0,s,i);_.chart.CMod&&(a=Nt(-e.timingData.getOffset(),n,t),o=Nt(-e.timingData.getOffset(),n,i)),a=Be(a,0,1),o=Be(o,0,1),a>o&&([a,o]=[o,a]);const l=(a-.5)*this.container.height,c=(o-.5)*this.container.height;return{startY:l,endY:c}}updateDimensions(){if(!this.getChart())return;const t=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=t+this.backingVerticalPadding,this.backing.width=this.backingWidth,this.overlay.width=this.backingWidth,this.selectionOverlay.width=this.backingWidth,this.pivot.x=this.backing.width/2}populate(){}getChart(){return this.manager.chartManager.loadedChart}}class US extends by{npsGraph;graphGradient=null;graphWidth=40;npsText=new De("",{fontName:"Main",fontSize:12});constructor(e){super(e,60,40),this.graphWidth=40,this.graphGradient=this.makeGradient(),this.npsGraph=new An,this.container.addChild(this.npsGraph),this.npsText.visible=!1,this.npsText.anchor.x=1,this.npsText.anchor.y=.5,et(this.npsText,"text-color"),this.addChild(this.npsText),K.on("userOptionUpdated",i=>{(i=="chart.npsGraph.color1"||i=="chart.npsGraph.color2")&&(this.graphGradient=this.makeGradient(),this.populate())}),this.on("mouseleave",()=>{this.hideNpsDisplay()}),this.on("mouseenter",()=>{this.showNpsDisplay()}),this.on("mousemove",i=>{this.updateNpsDisplay(i)}),this.populate()}updateNpsDisplay(e){const t=this.getChart();if(!t){this.npsText.visible=!1;return}if(!t.getNotedata().at(-1)){this.npsText.visible=!1;return}const s=t.getNPSGraph();let n=this.npsGraph.toLocal(e.global).y/this.npsGraph.height;n=Be(n,0,1);let a=Ht(0,t.getLastBeat(),n);if(_.chart.CMod){const c=Ht(-t.timingData.getOffset(),t.getLastSecond(),n);a=t.timingData.getBeatFromSeconds(c)}const o=Math.floor(t.timingData.getMeasure(a)),l=s[o]??0;this.npsText.text=l.toFixed(1)+" nps",this.npsText.position.y=this.getYFromBeat(a)-this.npsGraph.height/2,this.npsText.position.x=-this.backing.width/2-10,this.npsText.visible=!0}hideNpsDisplay(){this.npsText.visible=!1}showNpsDisplay(){const e=this.getChart();if(!e){this.npsText.visible=!1;return}if(!e.getNotedata().at(-1)){this.npsText.visible=!1;return}this.npsText.visible=!0}update(){if(!_.chart.npsGraph.enabled){this.visible=!1;return}this.visible=!0;const e=this.manager.getChildByName("note-layout");e!==void 0&&e.visible?this.xOffset=e.backingWidth+28:this.xOffset=20,this.npsText.scale.y=_.chart.reverse?-1:1,super.update()}populate(){const e=this.getChart();if(!e)return;const t=this.manager.app.renderer.screen.height-40;if(e.getNotedata().length==0)return;const i=e.getMaxNPS(),s=e.getNPSGraph(),n=e.getLastBeat();this.npsGraph.clear(),this.graphGradient?this.npsGraph.beginTextureFill({texture:this.graphGradient}):this.npsGraph.beginFill(0,1),this.npsGraph.pivot.x=this.backing.width/2,this.npsGraph.pivot.y=t/2;const a=s.length,o=this.getYFromBeat(0);this.npsGraph.moveTo(0,o);for(let h=0;h{this.popup?.contains(t.target)||(this.persistent=!1,this.close())},K.on("snapChanged",this.onSnapChange),this.popup.style.display="none",setTimeout(()=>this.movePosition(e)),this.moveInterval=setInterval(()=>this.movePosition(e),150),this.active=!0)}static movePosition(e){this.popup.style.display="";const t=e.getBounds(),i=t.left+t.width/2,s=200,n=s/2+15,a=window.innerWidth-s/2-15;this.popup.style.left=`${Be(i,n,a)}px`;const o=document.getElementById("pixi").offsetTop+9,l=(t.top+t.height+o)/2;this.popup.style.top=`${t.top+t.height+o}px`,l+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${t.top-t.height/2}px`)}static build(){const e=document.createElement("div");e.classList.add("popup");const t=document.createElement("div");t.classList.add("popup-zoomer"),t.style.width="200px",t.style.backgroundColor="#333333",e.appendChild(t),this.zoomer=t;const i=document.createElement("div");i.innerText="Snap Options",i.classList.add("popup-title"),t.appendChild(i);const s=document.createElement("div");s.classList.add("popup-flex"),t.appendChild(s);const n=document.createElement("div");n.classList.add("popup-row");const a=document.createElement("div");a.innerText="Snap to nearest ";const o=ot.create(_.chart.snap==0?0:Math.round(4/_.chart.snap),1,0,0,1e3);o.onChange=f=>{if(f===void 0){this.updateValues();return}f==0?_.chart.snap=0:_.chart.snap=4/f,this.updateValues()};const l=document.createElement("div");l.innerText=this.suffixSnap()+" note",n.replaceChildren(a,o.view,l);const c=document.createElement("div");c.classList.add("popup-row");const d=document.createElement("div");d.innerText="Snap every";const h=ot.create(_.chart.snap,.001,3,0);h.onChange=f=>{if(f===void 0){this.updateValues();return}f==0?_.chart.snap=0:_.chart.snap=f,this.updateValues()};const u=document.createElement("div");u.innerText=" beats",c.replaceChildren(d,h.view,u),s.replaceChildren(n,c),this.beatInput=h,this.divInput=o,this.divLabel=l;const p=document.createElement("div");return p.innerText="click to edit",p.style.marginTop="4px",p.style.height="10px",t.appendChild(p),p.classList.add("popup-desc"),this.editText=p,e}static updateValues(){document.activeElement==this.divInput.input||document.activeElement==this.beatInput.input||(this.divInput.setValue(_.chart.snap==0?0:Math.round(4/_.chart.snap)),this.divLabel.innerText=this.suffixSnap()+" note",this.beatInput.setValue(_.chart.snap))}static suffixSnap(){const e=_.chart.snap==0?0:Math.round(4/_.chart.snap);return e%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}static close(){if(!this.popup||!this.active||this.persistent)return;window.removeEventListener("click",this.clickOutside,!0),this.popup.classList.add("exiting");const e=this.popup;setTimeout(()=>e.remove(),200),this.active=!1,this.persistent=!1,clearInterval(this.moveInterval),clearInterval(this.updateInterval),K.off("timingModified",this.onSnapChange)}static select(){this.persistent=!0,this.zoomer.classList.add("selected"),this.editText.style.transform="scale(0)",this.editText.style.height="0px",setTimeout(()=>window.addEventListener("click",this.clickOutside,!0),200)}}const HS={fontName:"Main",fontSize:10,fill:["#ffffff"]},wy={4:15157287,8:4033015,12:11152884,16:8577607,24:14167723,32:15376696,48:15699179,64:7071886,96:8553090,192:8553090};class GS extends Ee{renderer;children=[];constructor(e){super(),this.renderer=e;for(let t=0;t<2;t++){const i=new Ee,s=new An,n=new De("4",HS);i.x=(t-.5)*(this.renderer.chart.gameType.notefieldWidth+48),s.rotation=Math.PI/4,s.lineStyle(1,0,1),s.beginFill(16777215),s.drawRect(-12,-12,24,24),s.endFill(),n.anchor.set(.5),i.addChild(s,n),this.addChild(i),i.eventMode="static",i.on("mouseenter",()=>Ph.open(s)),i.on("mousedown",()=>Ph.select()),i.on("mouseleave",()=>Ph.close())}}update(){this.y=this.renderer.getActualReceptorYPos(),this.visible=this.renderer.chartManager.getMode()!=X.Play;for(let e=0;e<2;e++){const t=this.children[e],i=t.children[0];i.tint=wy[4/_.chart.snap]??7368816;const s=t.children[1];s.text=""+(_.chart.snap==0||4/_.chart.snap%1!=0?"":4/_.chart.snap)}}}class VS extends by{barContainer=new hd(1500,{position:!0,scale:!0,tint:!0},16384,!0);bars;barTexture;constructor(e){super(e),this.addChild(this.backing),this.addChild(this.container),this.visible=!1,this.name="note-layout",this.backing.tint=0,this.backing.alpha=.3,this.barTexture=Ft.create({resolution:this.manager.app.renderer.resolution}),this.bars=new Oe(this.barTexture),this.bars.anchor.set(.5),this.container.addChild(this.bars),this.populate()}update(){if(!_.chart.noteLayout.enabled){this.visible=!1;return}this.visible=!0,super.update()}populate(){const e=this.getChart();if(!e){Ki(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}let t=0;const i=e.gameType.numCols,s=e.getNotedata().at(-1),n=this.manager.app.renderer.screen.height-40;if(this.barTexture.resize(i*6,n),this.backingWidth=i*6+8,this.updateDimensions(),!s){Ki(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}const a=s.beat+(Le(s)?s.hold:0),o=e.getSecondsFromBeat(a),l=e.timingData.getOffset();e.getNotedata().forEach(c=>{let d=this.barContainer.children[t];d||(d=new Oe(ie.WHITE),d.width=4,this.barContainer.addChild(d)),d.anchor.set(.5),d.height=1,d.x=(c.col+.5)*6;let h=Nt(0,a,c.beat);if(_.chart.CMod&&(h=Nt(l,o,c.second)),d.y=h*n,d.tint=wy[c.quant],c.type=="Mine"&&(d.tint=8421504),t++,Le(c)){let u=this.barContainer.children[t];u||(u=new Oe(ie.WHITE),u.width=4,u.height=2,this.barContainer.addChild(u)),u.anchor.x=.5,u.anchor.y=0,u.x=(c.col+.5)*6;const p=(_.chart.CMod?e.getSecondsFromBeat(c.beat+c.hold)/o:(c.beat+c.hold)/a)*n+1;u.y=d.y,u.height=p-d.y,c.type=="Hold"&&(u.tint=10526880),c.type=="Roll"&&(u.tint=11379586),t++}}),Ki(this.barContainer.children,(c,d)=>d>=t),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture})}}const Xe=300,rt=150,bf=[.045,.09,.18,.37,.18,.09,.045];class WS extends Aa{max=0;barlines=new Ee;backgroundRect=new jt("noBorder");background=new Ee;backgroundLines=new Ee;statText=new Ee;meanText;medianText;modeText;stddevText;errorMS=[];texts=new Ee;showEase=0;toggled=!1;drag=!1;dragStart=0;lastMode=this.manager.chartManager.getMode();constructor(e){super(e),this.visible=!1,this.background.addChild(this.backgroundRect),et(this.backgroundRect,"widget-bg"),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.on("mousedown",()=>{this.manager.chartManager.getMode()!=X.Play&&(this.drag=!0,this.dragStart=Date.now(),Rt.stop("play-widget"))}),window.addEventListener("mousemove",f=>{this.drag&&(this.showEase+=f.movementY/-400)}),window.addEventListener("mouseup",()=>{this.drag&&(Date.now()-this.dragStart>400?this.toggled=this.showEase>.5:this.toggled=!this.toggled,Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:this.toggled?1:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")),this.drag=!1}),this.on("mouseenter",()=>{!this.toggled&&this.manager.chartManager.getMode()!=X.Play&&Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:.05}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")}),this.on("mouseleave",()=>{!this.toggled&&this.manager.chartManager.getMode()!=X.Play&&Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")});const t=new De("Early",{fontName:"Main",fontSize:15});t.x=-Xe/2+5,t.y=-rt-40,t.alpha=.3,this.background.addChild(t),et(t,"text-color");const i=new De("Late",{fontName:"Main",fontSize:15});i.anchor.x=1,i.x=Xe/2-5,i.y=-rt-40,i.alpha=.3,this.background.addChild(i),et(i,"text-color"),this.meanText=new De("-",{fontName:"Main",fontSize:15}),this.meanText.anchor.x=.5,this.meanText.x=Xe/4*-1.5,this.meanText.y=-rt-70,this.statText.addChild(this.meanText),this.medianText=new De("-",{fontName:"Main",fontSize:15}),this.medianText.anchor.x=.5,this.medianText.x=Xe/4*-.5,this.medianText.y=-rt-70,this.statText.addChild(this.medianText),this.modeText=new De("-",{fontName:"Main",fontSize:15}),this.modeText.anchor.x=.5,this.modeText.x=Xe/4*.5,this.modeText.y=-rt-70,this.statText.addChild(this.modeText),this.stddevText=new De("-",{fontName:"Main",fontSize:15}),this.stddevText.anchor.x=.5,this.stddevText.x=Xe/4*1.5,this.stddevText.y=-rt-70,this.statText.addChild(this.stddevText);const s=new De("Mean",{fontName:"Main",fontSize:10});s.anchor.x=.5,s.x=Xe/4*-1.5,s.y=-rt-80,this.statText.addChild(s);const n=new De("Median",{fontName:"Main",fontSize:10});n.anchor.x=.5,n.x=Xe/4*-.5,n.y=-rt-80,this.statText.addChild(n);const a=new De("Mode",{fontName:"Main",fontSize:10});a.anchor.x=.5,a.x=Xe/4*.5,a.y=-rt-80,this.statText.addChild(a);const o=new De("Std Dev.",{fontName:"Main",fontSize:10});o.anchor.x=.5,o.x=Xe/4*1.5,o.y=-rt-80,this.statText.addChild(o),this.statText.children.forEach(f=>{et(f,"text-color")});const l=new Ee,c=new jt("noBorder");c.tint=3355443,c.alpha=.3,c.width=Xe/2-10,c.height=30,c.y=-25,c.x=-Xe/4,c.pivot.x=(Xe/2-10)/2,c.pivot.y=15;const d=new De("Adjust song offset",{fontName:"Main",fontSize:12});d.anchor.set(.5),d.x=-Xe/4,d.y=-25,l.addChild(c,d),l.eventMode="static",l.addEventListener("mouseenter",()=>{c.alpha=.6}),l.addEventListener("mousedown",f=>{f.stopImmediatePropagation(),this.adjustOffset("song")}),l.addEventListener("mouseleave",()=>{c.alpha=.3}),this.statText.addChild(l),et(d,"text-color");const h=new Ee,u=new jt("noBorder");u.tint=3355443,u.alpha=.3,u.width=Xe/2-10,u.height=30,u.y=-25,u.x=Xe/4,u.pivot.x=(Xe/2-10)/2,u.pivot.y=15,u.eventMode="static",h.addEventListener("mouseenter",()=>{u.alpha=.6}),h.addEventListener("mouseleave",()=>{u.alpha=.3});const p=new De("Adjust global offset",{fontName:"Main",fontSize:12});p.anchor.set(.5),p.x=Xe/4,p.y=-25,h.addChild(u,p),et(p,"text-color"),h.eventMode="static",h.addEventListener("mouseenter",()=>{u.alpha=.6}),h.addEventListener("mousedown",f=>{f.stopImmediatePropagation(),this.adjustOffset("global")}),h.addEventListener("mouseleave",()=>{u.alpha=.3}),this.statText.addChild(h),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.addChild(this.statText),this.addChild(this.barlines),this.addChild(this.texts)}update(){this.visible=!!this.manager.chartManager.gameStats,this.x=-this.manager.chartManager.app.renderer.screen.width/2+20+Xe/2,this.y=this.manager.chartManager.app.renderer.screen.height/2-20,this.backgroundRect.width=Xe+10,this.backgroundRect.height=rt+260,this.backgroundRect.x=-Xe/2-5,this.backgroundRect.y=-rt-260,this.visible=!!this.manager.chartManager.gameStats;for(const e of this.barlines.children)_.general.smoothAnimations?e.height=(e.targetHeight-e.height)*.2+e.height:e.height=e.targetHeight;this.lastMode!=this.manager.chartManager.getMode()&&(this.lastMode=this.manager.chartManager.getMode(),Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:this.manager.chartManager.getMode()==X.Play?1:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")),_.general.smoothAnimations?this.y+=(1-Math.abs(this.showEase))*400:this.manager.chartManager.getMode()!=X.Play&&(this.y+=400)}newLine(){const e=new Oe(ie.WHITE);return e.smoothCount=0,e.targetHeight=0,e.anchor.y=1,e.anchor.x=.5,e.height=0,e.visible=!1,e}startPlay(){const e=this.manager.chartManager.gameStats;this.max=0,this.errorMS=[],this.meanText.text="-",this.medianText.text="-",this.modeText.text="-",this.stddevText.text="-",Ki(this.barlines.children,()=>!0),Ki(this.backgroundLines.children,()=>!0),Ki(this.texts.children,()=>!0);const t=Je.getCollection(_.play.timingCollection),i=t.getStandardWindows().length+1,s=Math.round(t.maxWindowMS());for(let f=0;fw.type==m&&!w.fake).length),g.alpha=.8,y.alpha=.8,y.name=m,this.texts.addChild(g),this.texts.addChild(y),g.x=-Xe/2+160,y.x=-Xe/2+290,g.y=80/l*n-rt-220,y.y=80/l*n++-rt-220,g.anchor.y=.5,y.anchor.y=.5,y.anchor.x=1}const c=new De("Max Combo",{fontName:"Main",fontSize:15});et(c,"text-color");const d=new De("0",{fontName:"Main",fontSize:15});et(d,"text-color"),c.alpha=.8,d.alpha=.8,d.name="Combo",this.texts.addChild(c),this.texts.addChild(d),c.x=-Xe/2+160,d.x=-Xe/2+290,c.y=80/l*n-rt-220,d.y=80/l*n++-rt-220,c.anchor.y=.5,d.anchor.y=.5,d.anchor.x=1;const h=new De("0.00 / 0.00",{fontName:"Main",fontSize:20});et(h,"text-color"),h.alpha=.8,h.x=-Xe/2+225,h.y=-rt-112,h.name="Score",this.texts.addChild(h),h.anchor.set(.5);const u=new De("Score / Current Score",{fontName:"Main",fontSize:13});et(u,"text-color"),u.alpha=.5,u.x=-Xe/2+225,u.y=-rt-135,this.texts.addChild(u),u.anchor.set(.5);const p=new De("Play Statistics",{fontName:"Main",fontSize:13});p.y=-rt-245,p.anchor.set(.5),et(p,"text-color"),this.texts.addChild(p),e.onJudge((f,m)=>{let g="";(Pi(m)||Zi(m))&&(g=m.id),ws(m)&&(g=m.noteType),_l(m)&&(g="Mine");const y=this.texts.getChildByName(g);if(ws(m)){const b=y.text.split(" / ")[1];y.text=e.getCount(m)+" / "+b}else bn(m)||(y.text=e.getCount(m)+"");if(this.texts.getChildByName("Combo").text=e.getMaxCombo()+"",this.texts.getChildByName("Score").text=ae(e.getScore()*100,2).toFixed(2)+" / "+ae(e.getCumulativeScore()*100,2).toFixed(2),Pi(m)||!Zi(m)||f==null)return;const w=Math.round(f*1e3);for(let b=-3;b<=3;b++)this.barlines.children[w+s+b]&&(this.barlines.children[w+s+b].smoothCount+=bf[b+3],this.barlines.children[w+s+b].visible=!0,this.barlines.children[w+s+b].smoothCount>this.max&&(this.modeText.text=w+"ms",this.max=this.barlines.children[w+s+b].smoothCount));this.errorMS.push(f*1e3),this.meanText.text=LA(this.errorMS).toFixed(2)+"ms",this.medianText.text=xl(this.errorMS).toFixed(2)+"ms",this.stddevText.text=Xg(this.errorMS).toFixed(2)+"ms",this.redraw()})}redraw(){for(const e of this.barlines.children)e.targetHeight=e.smoothCount*(rt-20)/this.max}adjustOffset(e){const t=this.manager.chartManager.gameStats;if(!t)return;const i=Math.round(t.getMedian()*1e3)/1e3;if(i==0)return;t.applyOffset(-i),this.barlines.children.forEach(o=>{o.smoothCount=0});const s=Je.getCollection(_.play.timingCollection),n=Math.round(s.maxWindowMS());t.getDataPoints().forEach(o=>{if(Pi(o.judgement)||!Zi(o.judgement)||o.error===null)return;const l=Math.round(o.error*1e3);for(let c=-3;c<=3;c++)this.barlines.children[l+n+c]&&(this.barlines.children[l+n+c].smoothCount+=bf[c+3],this.barlines.children[l+n+c].visible=!0,this.barlines.children[l+n+c].smoothCount>this.max&&(this.modeText.text=l+"ms",this.max=this.barlines.children[l+n+c].smoothCount))}),this.redraw();const a=e=="global"?_.play.offset:this.manager.app.chartManager.loadedChart.timingData.getOffset();if(e=="global")_.play.offset=ae(_.play.offset-i,3);else if(e=="song"){const o=this.manager.app.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.app.chartManager.loadedChart.timingData:this.manager.app.chartManager.loadedSM.timingData;o.setOffset(ae(o.getOffset()-i,3))}Se.create(`Adjusted ${e} offset from ${ae(a,3).toFixed(3)} to ${ae(a-i,3).toFixed(3)}`),this.manager.app.chartManager.setBeat(this.manager.app.chartManager.getBeat())}}class zS extends Aa{registeredSpinners=[];registeredToggles=[];registeredCheckboxes=[];changeRow;warpRow;fakeRow;view;collapseButton;lastSpeedMod=_.chart.CMod;rateSpinner;enteredMain=!1;constructor(e){super(e),this.visible=!1;const t=document.createElement("div");t.id="playback-options",_.general.showPlaybackOptions||t.classList.add("collapsed"),t.style.height="0px",document.getElementById("menubar")?.insertAdjacentElement("afterend",t),this.view=t;const i=document.createElement("button");i.classList.add("po-collapse"),i.tabIndex=-1;const s=Ae.getIcon("CHEVRON",18);i.appendChild(s),_.general.showPlaybackOptions&&i.classList.add("toggled"),this.collapseButton=i,i.onclick=()=>{_.general.showPlaybackOptions=!_.general.showPlaybackOptions,t.classList.toggle("collapsed"),i.classList.toggle("toggled",!t.classList.contains("collapsed")),i.blur()},i.style.display="none",Pt(i,{onShow(O){O.setContent((t.classList.contains("collapsed")?"Show ":"Hide ")+"playback options")}});const n=this.createRow("Zoom"),a=this.createSpinner({value:_.chart.zoom*100,step:10,altStep:2,min:10,hardMin:0,onChange:O=>_.chart.zoom=O/100,getValue:()=>_.chart.zoom*100});n.appendChild(a),t.appendChild(n);const o=document.createElement("div"),l=document.createElement("h1");l.innerText="a",o.appendChild(l),Re.createKeybindTooltip(n)`Adjust playfield size ${"zoomOut"}/${"zoomIn"}`,t.appendChild(this.createSeparator());const c=this.createRow("Playback"),d=this.createSpinner({value:_.audio.rate*100,step:10,altStep:2,min:10,hardMin:0,onChange:O=>_.audio.rate=O/100,getValue:()=>_.audio.rate*100});c.appendChild(d),t.appendChild(c),this.rateSpinner=this.registeredSpinners.at(-1),Re.createKeybindTooltip(c)`Adjust audio playback rate ${"rateDown"}/${"rateUp"}`;const h=document.createElement("div");h.style.gap="5px",h.style.display="flex",h.style.alignItems="center";const u=this.createCheckbox({getValue:()=>_.audio.assistTick,value:_.audio.assistTick,onEl:Ae.getIcon("CLAP",18),offEl:Ae.getIcon("X_CLAP",18),onChange:O=>_.audio.assistTick=O});h.appendChild(u),Re.createKeybindTooltip(u)`Toggle assist tick ${"assistTick"}`;const p=this.createCheckbox({getValue:()=>_.audio.metronome,value:_.audio.metronome,onEl:Ae.getIcon("METRONOME",18),offEl:Ae.getIcon("X_METRONOME",18),onChange:O=>_.audio.metronome=O});h.appendChild(p),t.appendChild(h),Re.createKeybindTooltip(p)`Toggle metronome ${"metronome"}`,t.appendChild(this.createSeparator());const f=this.createRow("Scroll"),m=Ae.getIcon("DBL_CHEVRON",16);m.style.padding="2px";const g=Ae.getIcon("DBL_CHEVRON",16);g.style.padding="2px",g.style.transform="rotate(180deg)";const y=this.createToggle({values:[m,g],value:_.chart.reverse?1:0,getValue:()=>_.chart.reverse?1:0,onChange:(O,W)=>_.chart.reverse=W!=0});f.appendChild(y),t.appendChild(f),Re.createKeybindTooltip(f)`Change scroll direction ${"reverse"}`;const w=this.createRow("Speedmod"),b=this.createToggle({values:["X","C"],value:_.chart.CMod?1:0,getValue:()=>_.chart.CMod?1:0,onChange:O=>_.chart.CMod=O!="X"});Re.createKeybindTooltip(b)`Change speedmod type ${"XMod"}/${"CMod"}`;const v=this.createSpinner({value:_.chart.speed,step:25,altStep:5,min:10,hardMin:10,hardMax:35e3,onChange:O=>_.chart.speed=O,getValue:()=>_.chart.speed});w.appendChild(b),w.appendChild(v),t.appendChild(w),Re.createKeybindTooltip(v)`Adjust scroll speed ${"increaseScrollSpeed"}/${"decreaseScrollSpeed"}`,t.appendChild(this.createSeparator());const E=this.createRow("Speed Changes"),C=this.createToggle({values:["On","Off"],value:_.chart.doSpeedChanges?0:1,getValue:()=>_.chart.doSpeedChanges?0:1,onChange:O=>_.chart.doSpeedChanges=O=="On"});E.appendChild(C),t.appendChild(E),Re.createKeybindTooltip(E)`Allow scroll/speed events (XMod only) ${"doSpeedChanges"}`,this.changeRow=E;const I=this.createRow("Warped Notes"),L=this.createCheckbox({getValue:()=>_.chart.hideWarpedArrows,value:_.chart.hideWarpedArrows,onEl:Ae.getIcon("X_EYE",18),offEl:Ae.getIcon("EYE",18),onChange:O=>_.chart.hideWarpedArrows=O});I.appendChild(L),t.appendChild(I),Re.createKeybindTooltip(I)`Show/hide warped notes (CMod only) ${"hideWarpedArrows"}`,this.warpRow=I;const k=this.createRow("Faked Notes"),N=this.createCheckbox({getValue:()=>_.chart.hideFakedArrows,value:_.chart.hideFakedArrows,onEl:Ae.getIcon("X_EYE",18),offEl:Ae.getIcon("EYE",18),onChange:O=>_.chart.hideFakedArrows=O});k.appendChild(N),t.appendChild(k),Re.createKeybindTooltip(k)`Show/hide faked notes (CMod only) ${"hideFakedArrows"}`,this.fakeRow=k;const G=Ae.getIcon("VOLUME",22);G.style.marginLeft="auto",G.style.marginRight="-16px",G.style.height="22px",G.style.width="22px",G.style.alignSelf="center",t.appendChild(G);const A=this.createRow("Master"),S=this.createSpinner({value:_.audio.masterVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.masterVolume=O/100,getValue:()=>_.audio.masterVolume*100});A.appendChild(S),t.appendChild(A);const x=this.createRow("Song"),D=this.createSpinner({value:_.audio.songVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.songVolume=O/100,getValue:()=>_.audio.songVolume*100});x.appendChild(D),t.appendChild(x);const $=this.createRow("FX"),R=this.createSpinner({value:_.audio.soundEffectVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.soundEffectVolume=O/100,getValue:()=>_.audio.soundEffectVolume*100});$.appendChild(R),t.appendChild($),this.changeRow.style.setProperty("--w",this.changeRow.offsetWidth+"px"),this.warpRow.style.setProperty("--w",this.warpRow.offsetWidth+"px"),this.fakeRow.style.setProperty("--w",this.fakeRow.offsetWidth+"px"),this.changeRow.classList.toggle("hidden",_.chart.CMod),this.warpRow.classList.toggle("hidden",!_.chart.CMod),this.fakeRow.classList.toggle("hidden",!_.chart.CMod),Ie.playbackOptions||(t.style.display="none",i.style.display="none")}createRow(e){const t=document.createElement("div");t.classList.add("playback-options-row");const i=document.createElement("div");return i.classList.add("playback-options-label"),i.innerText=e,t.appendChild(i),t}createSeparator(){const e=document.createElement("div");return e.classList.add("po-separator"),e}createSpinner(e){const t=document.createElement("div");t.classList.add("po-spinner");const i=c=>{let d=_.general.spinnerStep;return c.getModifierState("Shift")?d=e.altStep??(e.step!==void 0?e.step/10:_.general.spinnerStep):d=e.step??_.general.spinnerStep,d},s=document.createElement("button");s.classList.add("po-spinner-btn"),s.innerText="-",s.onclick=c=>{l.currentValue-=i(c),e.min!==void 0&&l.currentValue{l.currentValue+=i(c),e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),o(!0)};const a=document.createElement("input");a.classList.add("po-spinner-input"),a.type="text";const o=(c=!0)=>{e.hardMin!==void 0&&l.currentValuee.hardMax&&(l.currentValue=e.hardMax),c&&e.onChange(l.currentValue),a.value=l.currentValue.toFixed()};a.onwheel=c=>{l.currentValue+=i(c)*c.deltaY/100*(_.chart.scroll.invertZoomScroll?-1:1)*_.chart.scroll.scrollSensitivity,e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),e.min!==void 0&&l.currentValue{c.key=="Enter"&&a.blur(),c.key=="Escape"&&(l.currentValue=e.getValue(),o(!1))},a.onfocus=()=>{a.select()},a.onblur=()=>{const c=this.parseString(a);if(c==null){l.currentValue=e.getValue(),o(!1);return}l.currentValue=c,o()},a.ondragstart=c=>c.preventDefault(),this.registeredSpinners.push(l),t}createToggle(e){const t=document.createElement("div");if(t.classList.add("po-toggle"),e.values.length==0)return t;const i=document.createElement("div");i.classList.add("po-toggle-highlight");const s=e.values.map((l,c)=>{if(typeof l=="string"){const d=document.createElement("div");return d.classList.add("po-toggle-item"),d.innerText=l,t.appendChild(d),d.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},d}else return l.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},t.appendChild(l),l});t.style.visibility="hidden",document.body.appendChild(t);const n=l=>{i.style.left=s[l].getBoundingClientRect().left-s[0].getBoundingClientRect().left+"px",i.style.width=s[l].getBoundingClientRect().width+"px",i.style.height=s[l].getBoundingClientRect().height+"px"},a=(l=!0)=>{l&&e.onChange(e.values[o.currentValue],o.currentValue),[...t.querySelectorAll(".active")].forEach(c=>c.classList.remove("active")),n(o.currentValue),s[o.currentValue].classList.add("active")},o={currentValue:e.value??0,options:e,update:a};return this.registeredToggles.push(o),a(!1),t.remove(),t.style.visibility="",t.appendChild(i),t}createCheckbox(e){const t=document.createElement("div");t.classList.add("ico-checkbox");const i=(n=!0)=>{n&&e.onChange(s.currentValue),s.options.onEl.style.display=s.currentValue?"":"none",s.options.offEl.style.display=s.currentValue?"none":""},s={currentValue:e.value??!0,options:e,update:i};return t.onclick=()=>{s.currentValue=!s.currentValue,i()},this.registeredCheckboxes.push(s),i(!1),t.replaceChildren(s.options.onEl,s.options.offEl),t}update(){!this.enteredMain&&this.manager.chartManager.loadedChart!==void 0&&(this.enteredMain=!0,this.view.style.height="",this.collapseButton.style.display="",document.getElementById("menubar")?.appendChild(this.collapseButton));for(const t of this.registeredSpinners)t.currentValue!=t.options.getValue()&&document.activeElement!=t.input&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredToggles)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredCheckboxes)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));const e=this.manager.chartManager.getMode()==X.Play||this.manager.chartManager.getMode()==X.Record;this.rateSpinner.btnMinus.disabled=e,this.rateSpinner.btnPlus.disabled=e,this.rateSpinner.input.disabled=e,_.chart.CMod!=this.lastSpeedMod&&(this.lastSpeedMod=_.chart.CMod,this.changeRow.classList.toggle("hidden",_.chart.CMod),this.warpRow.classList.toggle("hidden",!_.chart.CMod),this.fakeRow.classList.toggle("hidden",!_.chart.CMod))}parseString(e){try{const t=br.evaluate(e.value);return isFinite(t)?t:0}catch{return null}}}class ga extends Ee{pool=[];options;constructor(e){super(),this.options=e}createChild(){if(this.pool.length==0&&this.options.maxPoolSize!==void 0&&this.children.length>=this.options.maxPoolSize)return;const e=this.pool.pop()??this.options.create();return this.addChild(e),e._disabledTime=Date.now(),e}destroyChild(e){this.children.includes(e)&&(e.removeFromParent(),e.removeAllListeners(),e.eventMode="auto",e._disabledTime=Date.now(),this.pool.push(e))}destroyAll(){this.children.forEach(e=>e._disabledTime=Date.now()),this.pool.push(...this.children),this.children.forEach(e=>{e.removeAllListeners(),e.eventMode="auto"}),this.removeChildren()}_render(e){super._render(e);const t=Date.now();for(;t-this.pool[0]?._disabledTime>(this.options.destroyTimer??5e3);)this.pool.shift().destroy()}}const Hr={BPMS:9182254,STOPS:4934913,DELAYS:217453,WARPS:9243998,FAKES:4868682,COMBOS:939078,SPEEDS:2968693,LABELS:7747359,SCROLLS:3557006,TIMESIGNATURES:5392684,TICKCOUNTS:1594906,BGCHANGES:8460415,FGCHANGES:8857115,ATTACKS:1856083};class jS extends Ee{renderer;areaPool=new ga({create:()=>{const e=new Oe(ie.WHITE);return Object.assign(e,{alpha:.2,width:this.renderer.chart.gameType.notefieldWidth+128}),e.anchor.set(.5,0),e}});timingAreaMap=new Map;timingEvents=[];timingDirty=!0;constructor(e){super(),this.renderer=e,this.addChild(this.areaPool);const t=()=>this.timingDirty=!0;K.on("timingModified",t),this.on("destroyed",()=>K.off("timingModified",t))}update(e,t){this.timingDirty&&(this.timingAreaMap.clear(),this.areaPool.destroyAll(),this.timingDirty=!1,this.timingEvents=this.renderer.chart.timingData.getTimingData("STOPS","WARPS","DELAYS","FAKES")),this.visible=this.renderer.shouldDisplayBarlines();for(const i of this.timingEvents){if(i.beat>t)break;if(this.shouldDrawEvent(i,e,t)&&!this.timingAreaMap.has(i)){const s=this.areaPool.createChild();if(!s)break;s.tint=Hr[i.type],this.timingAreaMap.set(i,s)}}for(const[i,s]of this.timingAreaMap.entries()){if(!this.shouldDrawEvent(i,e,t)){this.timingAreaMap.delete(i),this.areaPool.destroyChild(s);continue}let n=_.chart.CMod?this.renderer.getYPosFromSecond(i.second):this.renderer.getYPosFromBeat(i.beat),a=n;switch(i.type){case"STOPS":case"DELAYS":{_.chart.CMod&&i.value>0?a=this.renderer.getYPosFromSecond(i.second+i.value):i.value<0&&(a=this.renderer.getYPosFromBeat(this.renderer.chart.getBeatFromSeconds(i.second+1e-4)));break}case"FAKES":{a=this.renderer.getYPosFromBeat(i.beat+i.value);break}case"WARPS":{_.chart.CMod||(a=this.renderer.getYPosFromBeat(i.beat+i.value));break}}a0)||e.type=="WARPS"&&_.chart.CMod?!1:e.beat<=i}}class Bh{static active=!1;static popup;static clickOutside;static moveInterval;static exitTimeout;static draggedElement;static dragOffsetX=0;static dragOffsetY=0;static grid;static leftovers;static boundaryCache=[];static open(){this.active||(this.popup=this.build(),document.getElementById("popups")?.appendChild(this.popup),this.clickOutside=e=>{!this.popup?.contains(e.target)&&!this.draggedElement?.contains(e.target)&&!document.getElementById("toggle-tracks")?.contains(e.target)&&this.close()},setTimeout(()=>window.addEventListener("click",this.clickOutside,!0)),this.popup.style.transitionDuration="0s",setTimeout(()=>this.movePosition()),clearTimeout(this.exitTimeout),this.moveInterval=setInterval(()=>this.movePosition(),150),this.active=!0)}static build(){const e=document.createElement("div");e.classList.add("popup"),e.id="timing-track-order";const t=document.createElement("div");t.classList.add("popup-zoomer"),e.appendChild(t);const i=document.createElement("div");i.classList.add("container"),t.appendChild(i);const s=document.createElement("div");s.classList.add("track-grid-options");const n=document.createElement("button");n.classList.add("delete"),n.innerText="Reset",n.onclick=()=>{_.chart.timingEventOrder=structuredClone(Ko.chart.timingEventOrder),this.clearBoundaries(),this.grid?.replaceChildren(),this.leftovers?.replaceChildren();const l=[...ur];for(const d of _.chart.timingEventOrder.left){const h=this.makeDraggableTrack(d);h.classList.add("left"),this.grid?.appendChild(h),l.splice(l.indexOf(d),1)}const c=document.createElement("div");c.classList.add("draggable-track"),c.innerText="PLAYFIELD",c.style.backgroundColor="#2D2D2D",c.style.padding="20px 10px",c.style.writingMode="horizontal-tb",c.addEventListener("mousedown",d=>this.startDragging(d,c)),c.dataset.type="PLAYFIELD",this.grid?.appendChild(c);for(const d of _.chart.timingEventOrder.right){const h=this.makeDraggableTrack(d);h.classList.add("right"),this.grid?.appendChild(h),l.splice(l.indexOf(d),1)}for(const d of l)this.leftovers?.appendChild(this.makeLeftoverTrack(d))},this.grid=document.createElement("div"),this.grid.classList.add("track-grid"),i.appendChild(this.grid),i.appendChild(s);const a=[...ur];for(const l of _.chart.timingEventOrder.left){const c=this.makeDraggableTrack(l);c.classList.add("left"),this.grid.appendChild(c),a.splice(a.indexOf(l),1)}const o=document.createElement("div");o.classList.add("draggable-track"),o.innerText="PLAYFIELD",o.style.backgroundColor="#2D2D2D",o.style.padding="20px 10px",o.style.writingMode="horizontal-tb",o.addEventListener("mousedown",l=>this.startDragging(l,o)),o.dataset.type="PLAYFIELD",this.grid.appendChild(o);for(const l of _.chart.timingEventOrder.right){const c=this.makeDraggableTrack(l);c.classList.add("right"),this.grid.appendChild(c),a.splice(a.indexOf(l),1)}this.leftovers=document.createElement("div"),this.leftovers.classList.add("track-selector"),s.appendChild(this.leftovers),s.appendChild(n);for(const l of a)this.leftovers.appendChild(this.makeLeftoverTrack(l));return e}static makeDraggableTrack(e){const t=document.createElement("div");t.classList.add("draggable-track");const i=document.createElement("div");i.classList.add("draggable-track-text"),i.innerText=e,t.style.backgroundColor=Gc(Hr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(i);let s=!0;const n=Ae.getIcon("TRASH",16);return n.addEventListener("click",()=>{if(!s)return;s=!1,this.deleteTrack(e),t.classList.add("exiting"),setTimeout(()=>t.remove(),400);const a=this.makeLeftoverTrack(e);a.classList.add("entering"),setTimeout(()=>a.classList.remove("entering"),400),this.leftovers?.appendChild(a),this.clearBoundaries()}),t.appendChild(n),t.addEventListener("mousedown",a=>{s&&(n.contains(a.target)||this.startDragging(a,t))}),t.dataset.type=e,t}static makeLeftoverTrack(e){const t=document.createElement("div");t.classList.add("leftover-track");const i=Ae.getIcon("PLUS",8);t.append(i);const s=document.createElement("div");s.classList.add("leftover-track-text"),s.innerText=e,t.style.backgroundColor=Gc(Hr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(s);let n=0,a=0,o=!1,l=!1;return t.addEventListener("mousedown",()=>{o=!0}),t.addEventListener("mousemove",c=>{if(!(!o||l)&&(n+=c.movementX,a+=c.movementY,n*n+a*a>15)){l=!0;const d=this.makeDraggableTrack(e);this.grid?.appendChild(d),this.clearBoundaries();const h=t.getBoundingClientRect(),u=this.getClosestSlot(h.left),p=_.chart.timingEventOrder.left.concat(["PLAYFIELD"],_.chart.timingEventOrder.right);p.splice(u,0,e),this.saveOptions(p),p.forEach(f=>{const m=this.grid?.querySelector(`div[data-type=${f}]`);this.grid?.appendChild(m),f!="PLAYFIELD"&&(m?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(f)&&m?.classList.add("left"),_.chart.timingEventOrder.right.includes(f)&&m?.classList.add("right"))}),this.startDragging(c,d,c.clientX,c.clientY),_.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove()}}),t.addEventListener("mouseup",()=>{if(!o||l)return;l=!0,_.chart.timingEventOrder.right.push(e),_.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove();const c=this.makeDraggableTrack(e);c.classList.add("entering"),c.classList.add("right"),setTimeout(()=>c.classList.remove("entering"),400),this.grid?.appendChild(c),this.clearBoundaries()}),t}static startDragging(e,t,i,s){if(!this.popup)return;this.draggedElement=t.cloneNode(!0),this.draggedElement.style.position="fixed";const n=t.getBoundingClientRect(),a=this.popup.getBoundingClientRect();!i||!s?(this.dragOffsetX=e.clientX-n.left,this.dragOffsetY=e.clientY-n.top,this.draggedElement.style.left=n.left-a.left+"px",this.draggedElement.style.top=n.top-a.top+"px"):(this.dragOffsetX=n.width/2,this.dragOffsetY=n.height/4*3,this.draggedElement.style.left=i-n.width/2-a.left+"px",this.draggedElement.style.top=s-n.height/4*3-a.top+"px",this.draggedElement.classList.add("entering")),this.draggedElement.style.boxShadow="6px 6px 6px #222",this.draggedElement.style.transition="none",t.style.opacity="0.03",this.popup.appendChild(this.draggedElement);const o=_.chart.timingEventOrder.left.concat(["PLAYFIELD"],_.chart.timingEventOrder.right),l=t.dataset.type;let c=o.indexOf(l);const d=o.indexOf(l),h=p=>{this.draggedElement.style.left=p.clientX-this.dragOffsetX-a.left+"px",this.draggedElement.style.top=p.clientY-this.dragOffsetY-a.top+"px";let f=this.getClosestSlot(p.clientX-this.dragOffsetX);Math.abs(p.clientY-this.dragOffsetY-a.top-(n.top-a.top))>140&&(f=d),c!=f&&(o.splice(c,1),o.splice(f,0,l),this.saveOptions(o),o.forEach(m=>{const g=this.grid?.querySelector(`div[data-type=${m}]`);this.grid?.appendChild(g),m!="PLAYFIELD"&&(g?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(m)&&g?.classList.add("left"),_.chart.timingEventOrder.right.includes(m)&&g?.classList.add("right"))}),l!="PLAYFIELD"&&(this.draggedElement?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(l)&&this.draggedElement?.classList.add("left"),_.chart.timingEventOrder.right.includes(l)&&this.draggedElement?.classList.add("right")),c=f)};window.addEventListener("mousemove",h);const u=()=>{this.draggedElement?.remove(),this.draggedElement=void 0,window.removeEventListener("mousemove",h),t.style.opacity="",this.clearBoundaries(),window.removeEventListener("mouseup",u)};window.addEventListener("mouseup",u)}static saveOptions(e){const t=e.indexOf("PLAYFIELD");t!=-1&&(_.chart.timingEventOrder.left=e.slice(0,t),_.chart.timingEventOrder.right=e.slice(t+1))}static deleteTrack(e){const t=_.chart.timingEventOrder.left.indexOf(e);t!=-1&&_.chart.timingEventOrder.left.splice(t,1);const i=_.chart.timingEventOrder.right.indexOf(e);i!=-1&&_.chart.timingEventOrder.right.splice(i,1)}static movePosition(){if(!this.popup)return;const e=document.getElementById("toggle-tracks");if(!e)return;this.popup.style.display="";const t=e.getBoundingClientRect(),i=t.left+t.width/2,s=this.popup.clientWidth,n=s/2+15,a=window.innerWidth-s/2-15;this.popup.style.left=`${Be(i,n,a)}px`;const o=t.top+t.height/2;this.popup.style.top=`${t.top+t.height}px`,o+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${t.top-t.height/2}px`),setTimeout(()=>this.popup.style.transitionDuration="",10)}static getClosestSlot(e){this.boundaryCache.length==0&&this.getBoundaries();let t=-1,i=999999,s=999999;for(let n=0;ns)break;s=a}return t}static getBoundaries(){if(this.grid){for(const e of this.grid.children)this.boundaryCache.push([e,e.getBoundingClientRect()]);this.boundaryCache.sort((e,t)=>e[1].left-t[1].left)}}static clearBoundaries(){this.boundaryCache=[]}static close(){!this.popup||!this.active||(window.removeEventListener("click",this.clickOutside,!0),this.popup.classList.add("exiting"),this.exitTimeout=setTimeout(()=>this.popup.remove(),200),this.active=!1,clearInterval(this.moveInterval),this.clearBoundaries())}}class $S extends Aa{view;playbackBar;skipStart;skipEnd;play;playIcon;stopIcon;record;playtest;timeCounter;beatCounter;min;sec;millis;beat;beatDropdown;editBar;editSteps;editTiming;stepsContainer;timingContainer;editChoiceContainer;addTimingEvent;toggleTimingTracks;detectSync;offsetCounter;offset;noteArrows=[];noteArrowMask;lastTime=null;lastBeat=null;lastOffset=null;lastMode=X.Edit;lastTimingMode=Ne.Off;lastHover=0;lastPlaying=!1;hovering=!1;trackingMovement=!0;idleFrames=0;lastBounds;constructor(e){super(e);const t=document.createElement("div");t.id="status-widget",document.getElementById("view-wrapper")?.appendChild(t),Ie.viewMode&&t.classList.add("collapsed"),this.playbackBar=document.createElement("div"),this.playbackBar.classList.add("playback-bar"),this.editBar=document.createElement("div"),this.editBar.classList.add("edit-bar"),this.skipStart=document.createElement("button"),this.skipStart.tabIndex=-1;const i=Ae.getIcon("SKIP_START",36);this.skipStart.appendChild(i),this.skipStart.onclick=()=>{this.manager.chartManager.setBeat(0),this.skipStart.blur()},Re.createKeybindTooltip(this.skipStart)`Skip to start ${"jumpSongStart"}`,this.skipEnd=document.createElement("button"),this.skipEnd.tabIndex=-1;const s=Ae.getIcon("SKIP_END",36);this.skipEnd.appendChild(s),this.skipEnd.onclick=()=>{this.manager.chartManager.setBeat(this.manager.chartManager.loadedChart.getBeatFromSeconds(this.manager.chartManager.chartAudio.getSongLength())),this.skipEnd.blur()},Re.createKeybindTooltip(this.skipEnd)`Skip to end ${"jumpSongEnd"}`,this.play=document.createElement("button"),this.play.tabIndex=-1;const n=Ae.getIcon("PLAY",40);this.play.appendChild(n),this.playIcon=n;const a=Ae.getIcon("STOP",32);this.play.appendChild(a),this.stopIcon=a,this.stopIcon.style.display="none",this.play.onclick=()=>{(this.manager.chartManager.getMode()==X.Record||this.manager.chartManager.getMode()==X.Play)&&this.manager.chartManager.setMode(X.Edit),this.manager.chartManager.playPause(),this.play.blur()},Re.createKeybindTooltip(this.play)`Play/Pause ${"playback"}`,this.record=document.createElement("button"),this.record.tabIndex=-1;const o=Ae.getIcon("RECORD",36,void 0,"red");this.record.appendChild(o),this.record.onclick=()=>{this.manager.chartManager.setMode(X.Record),this.record.blur()},Re.createKeybindTooltip(this.record)`Record ${"recordMode"}`,(Ie.viewMode||!Ie.recordMode)&&(this.record.style.display="none"),this.playtest=document.createElement("button"),this.playtest.tabIndex=-1;const l=Ae.getIcon("PLAYTEST",30);this.playtest.appendChild(l),this.playtest.onclick=()=>{this.manager.chartManager.setMode(X.Play),this.playtest.blur()},Re.createKeybindTooltip(this.playtest)`Playtest ${"playMode"}`,Ie.playMode||(this.playtest.style.display="none");const c=document.createElement("div");c.classList.add("playback-separator"),this.timeCounter=document.createElement("div"),this.timeCounter.classList.add("playback-counter");const d=document.createElement("div");d.style.display="flex",d.classList.add("playback-counter-main");const h=document.createElement("div");h.classList.add("inlineEdit"),h.innerText="00",h.spellcheck=!1,h.contentEditable="true",h.style.maxWidth="27px",h.onkeydown=A=>{A.key=="Enter"&&h.blur(),A.key=="Escape"&&(h.innerText=Math.floor(Math.abs(this.manager.chartManager.getTime())/60).toString().padStart(2,"0"),h.blur())},h.onfocus=()=>setTimeout(()=>this.selectText(h),25),h.onblur=()=>this.updateTime(),h.ondragstart=A=>A.preventDefault();const u=document.createElement("div");u.classList.add("inlineEdit"),u.innerText="00",u.spellcheck=!1,u.contentEditable="true",u.style.maxWidth="18px",u.onkeydown=A=>{A.key=="Enter"&&u.blur(),A.key=="Escape"&&(u.innerText=Math.floor(Math.abs(this.manager.chartManager.getTime())%60).toString().padStart(2,"0"),u.blur())},u.onfocus=()=>setTimeout(()=>this.selectText(u),25),u.onblur=()=>this.updateTime(),u.ondragstart=A=>A.preventDefault();const p=document.createElement("div");p.classList.add("inlineEdit"),p.innerText="000",p.spellcheck=!1,p.contentEditable="true",p.style.maxWidth="27px",p.onkeydown=A=>{A.key=="Enter"&&p.blur(),A.key=="Escape"&&(p.innerText=(ae(Math.abs(this.manager.chartManager.getTime())%1,3)*1e3).toString().padStart(3,"0"),p.blur())},p.onfocus=()=>setTimeout(()=>this.selectText(p),25),p.onblur=()=>this.updateTime(),p.ondragstart=A=>A.preventDefault(),this.min=h,this.sec=u,this.millis=p;const f=document.createElement("div");f.classList.add("playback-counter-label"),f.innerText="Time",d.appendChild(h),d.appendChild(document.createTextNode(":")),d.appendChild(u),d.appendChild(document.createTextNode(".")),d.appendChild(p),this.timeCounter.appendChild(d),this.timeCounter.appendChild(f);const m=document.createElement("div");m.classList.add("playback-separator"),this.beatCounter=document.createElement("div"),this.beatCounter.classList.add("playback-counter");const g=document.createElement("div");g.classList.add("playback-counter-main","inlineEdit"),g.innerText="0.000",g.spellcheck=!1,g.contentEditable="true",g.onkeydown=A=>{if(A.key=="Enter"&&g.blur(),A.key=="Escape"){if(this.beatDropdown.value=="Measure"){const S=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.getBeat())??this.manager.chartManager.getBeat()/4;g.innerText=ae(S,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.getBeat(),3).toFixed(3);g.blur()}},g.onfocus=()=>{setTimeout(()=>this.selectText(g),25)},g.onblur=()=>this.updateBeat(),g.ondragstart=A=>A.preventDefault(),this.beat=g,this.beatDropdown=gi.create(["Beat","Measure"],"Beat"),this.beatDropdown.view.querySelector(".dropdown-selected").classList.add("playback-counter-label"),this.beatCounter.appendChild(g),this.beatCounter.appendChild(this.beatDropdown.view),this.beatDropdown.onChange(()=>{if(this.beatDropdown.value=="Measure"){const A=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.getBeat())??this.manager.chartManager.getBeat()/4;g.innerText=ae(A,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.getBeat(),3).toFixed(3)}),this.playbackBar.appendChild(this.skipStart),this.playbackBar.appendChild(this.skipEnd),this.playbackBar.appendChild(this.play),this.playbackBar.appendChild(this.record),this.playbackBar.appendChild(this.playtest),this.playbackBar.appendChild(c),this.playbackBar.appendChild(this.timeCounter),this.playbackBar.appendChild(m),this.playbackBar.appendChild(this.beatCounter),this.editSteps=document.createElement("button"),this.editSteps.tabIndex=-1,this.editSteps.classList.add("edit-fancy-button");const y=Ae.getIcon("FEET",24);y.style.marginBottom="2px",this.editSteps.appendChild(y),this.editSteps.appendChild(document.createTextNode("Edit Steps")),this.editSteps.onclick=()=>{this.manager.chartManager.editTimingMode=Ne.Off,this.editSteps.blur()},this.editSteps.classList.add("active"),this.editTiming=document.createElement("button"),this.editTiming.tabIndex=-1,this.editTiming.classList.add("edit-fancy-button");const w=Ae.getIcon("METRONOME",24);w.style.marginBottom="2px",this.editTiming.appendChild(w),this.editTiming.appendChild(document.createTextNode("Edit Timing")),this.editTiming.onclick=()=>{this.manager.chartManager.editTimingMode=Ne.Edit,this.editTiming.blur()};const b=document.createElement("div");b.classList.add("playback-separator");const v=document.createElement("div");v.classList.add("edit-bar-left"),v.appendChild(this.editSteps),v.appendChild(this.editTiming),v.appendChild(b),this.editBar.appendChild(v),this.editChoiceContainer=document.createElement("div"),this.editChoiceContainer.classList.add("edit-choice-container"),this.stepsContainer=document.createElement("div"),this.stepsContainer.classList.add("edit-steps-container"),this.timingContainer=document.createElement("div"),this.timingContainer.classList.add("edit-timing-container"),this.editChoiceContainer.appendChild(this.stepsContainer),this.editChoiceContainer.appendChild(this.timingContainer),this.addTimingEvent=document.createElement("button"),this.addTimingEvent.tabIndex=-1;const E=Ae.getIcon("ADD_EVENT",32);this.addTimingEvent.appendChild(E),this.addTimingEvent.onclick=()=>{this.manager.chartManager.editTimingMode==Ne.Add?this.manager.chartManager.editTimingMode=Ne.Edit:this.manager.chartManager.editTimingMode=Ne.Add,this.addTimingEvent.blur()},this.timingContainer.appendChild(this.addTimingEvent),Pt(this.addTimingEvent,{content:"Add timing events"}),this.toggleTimingTracks=document.createElement("button"),this.toggleTimingTracks.tabIndex=-1;const C=Ae.getIcon("EYE",32);this.toggleTimingTracks.appendChild(C),this.toggleTimingTracks.onclick=()=>{Bh.active?Bh.close():Bh.open(),this.toggleTimingTracks.blur()},this.toggleTimingTracks.id="toggle-tracks",this.timingContainer.appendChild(this.toggleTimingTracks),Pt(this.toggleTimingTracks,{content:"Toggle timing track visibility"}),this.detectSync=document.createElement("button"),this.detectSync.tabIndex=-1;const I=Ae.getIcon("DETECT_SYNC",32);this.detectSync.appendChild(I),this.detectSync.onclick=()=>{this.manager.app.windowManager.openWindow(new gy(this.manager.app)),this.detectSync.blur()},this.detectSync.id="detect-sync",this.timingContainer.appendChild(this.detectSync),Re.createKeybindTooltip(this.detectSync)`Detect audio sync ${"detectSync"}`;const L=document.createElement("div");L.classList.add("playback-separator"),this.timingContainer.appendChild(L),this.offsetCounter=document.createElement("div"),this.offsetCounter.classList.add("playback-counter");const k=document.createElement("div");k.classList.add("playback-counter-label"),k.innerText="Offset";const N=document.createElement("div");N.classList.add("playback-counter-main","inlineEdit"),N.innerText="0.000",N.spellcheck=!1,N.contentEditable="true",N.onkeydown=A=>{A.key=="Enter"&&N.blur(),A.key=="Escape"&&(N.innerText=ae(this.manager.chartManager.loadedChart?.timingData.getOffset()??0,3).toFixed(3),N.blur())},N.tabIndex=-1,N.onfocus=()=>{setTimeout(()=>this.selectText(N),25)},N.onblur=()=>this.updateOffset(),N.ondragstart=A=>A.preventDefault(),this.offset=N,this.offsetCounter.appendChild(N),this.offsetCounter.appendChild(k),this.timingContainer.appendChild(this.offsetCounter),this.editBar.appendChild(this.editChoiceContainer);const G=document.createElement("div");G.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(G),K.on("resize",()=>{this.trackingMovement=!0,this.idleFrames=5}),K.on("noteskinLoaded",()=>{this.stepsContainer.replaceChildren(),this.noteArrows.forEach(S=>{this.removeChild(S.sprite),this.removeChild(S.bg),this.removeChild(S.highlight)}),this.noteArrows=[];const A=document.createElement("div");if(A.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(A),!!this.manager.chartManager.loadedChart){for(const S of this.manager.chartManager.loadedChart.gameType.editNoteTypes){if(vd.includes(S))continue;const x=this.manager.chartManager.chartView.getNotefield().createNote({type:S,beat:0,col:0,quant:4,second:0,warped:!1,fake:!1});x.scale.set(.5);const D=new Oe(ie.WHITE);et(D,"widget-bg"),D.width=48,D.height=48,D.anchor.set(.5);const $=new jt("noBorder");$.alpha=0,$.width=48,$.height=48,$.pivot.x=24,$.pivot.y=24;const R=document.createElement("button");R.tabIndex=-1,R.style.height="48px",R.style.width="48px",R.classList.add("note-placeholder"),R.onclick=()=>{this.manager.chartManager.setEditingNoteType(S),R.blur()},Re.createKeybindTooltip(R)`${"\\"+S} ${"noteType"+S}`;const O={element:R,sprite:x,type:S,bg:D,highlight:$,hovered:!1};R.onmouseover=()=>{O.hovered=!0},R.onmouseleave=()=>{O.hovered=!1},this.addChild(D),this.addChild(x),this.addChild($);const W=R.getBoundingClientRect();x.position.y=W.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,x.position.x=W.left-this.manager.app.view.clientWidth/2+24,D.position=x.position,this.noteArrows.push(O)}this.stepsContainer.replaceChildren(...this.noteArrows.map(S=>S.element),A),this.trackingMovement=!0,this.idleFrames=5}}),this.noteArrowMask=new Oe(ie.WHITE),this.noteArrowMask.height=48,this.noteArrowMask.width=2500,this.noteArrowMask.anchor.y=1,this.noteArrowMask.anchor.x=.5,this.addChild(this.noteArrowMask),this.mask=this.noteArrowMask,t.onmouseenter=()=>{this.lastHover=Date.now(),this.hovering=!0,this.view.style.opacity="",this.view.style.transition=""},t.onmouseleave=()=>this.hovering=!1,t.appendChild(this.playbackBar),t.appendChild(this.editBar),this.view=t,t.style.display="none"}update(){this.view.style.display=this.manager.chartManager.loadedSM&&Ie.status?"":"none";const e=this.manager.chartManager.getTime();this.lastTime!=e&&(document.activeElement!=this.min&&(this.min.innerText=(e<0?"-":"")+Math.floor(Math.abs(e)/60).toString().padStart(2,"0")),document.activeElement!=this.sec&&(this.sec.innerText=Math.floor(Math.abs(e)%60).toString().padStart(2,"0")),document.activeElement!=this.millis&&(this.millis.innerText=(ae(Math.abs(e)%1,3)*1e3).toString().padStart(3,"0")),this.lastTime=e);const t=this.manager.chartManager.getBeat();if(this.lastBeat!=t){if(document.activeElement!=this.beat)if(this.beatDropdown.value=="Measure"){const h=this.manager.chartManager.loadedChart?.timingData?.getMeasure(t)??t/4;this.beat.innerText=ae(h,3).toFixed(3)}else this.beat.innerText=ae(t,3).toFixed(3);this.lastBeat=t}const i=this.manager.chartManager.loadedChart?.timingData.getOffset()??0;this.lastOffset!=i&&document.activeElement!=this.offset&&(this.offset.innerText=ae(i,3).toFixed(3));const s=this.manager.chartManager.getMode(),n=this.manager.chartManager.editTimingMode;if(this.lastMode!=s){switch(s){case X.Edit:this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!1,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",this.record.style.background="",this.playtest.style.background="",this.view.style.opacity="",this.view.style.transition="",this.view.classList.remove("collapsed"),this.beatDropdown.disabled=!1;break;case X.Record:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!1,this.record.style.background="rgba(170, 0, 0, 0.35)",this.playtest.disabled=!0,this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Ne.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case X.Play:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!0,this.playtest.disabled=!1,this.playtest.style.background="rgba(12, 97, 31, 0.35)",this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Ne.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case X.View:this.lastHover=Date.now(),this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!0,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",n!=Ne.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0}this.trackingMovement=!0,this.idleFrames=5,this.lastMode=s}if(this.lastTimingMode!=n){switch(n){case Ne.Off:this.visible=!0,this.stepsContainer.style.transform="",this.timingContainer.style.transform="",this.editSteps.classList.add("active"),this.editTiming.classList.remove("active"),this.offset.tabIndex=-1;break;case Ne.Add:this.addTimingEvent.classList.add("active");break;case Ne.Edit:this.addTimingEvent.classList.remove("active"),this.offset.tabIndex=0}(this.lastTimingMode==Ne.Off&&n!=Ne.Off||this.lastTimingMode!=Ne.Off&&n==Ne.Off)&&this.manager.chartManager.clearSelections(),this.trackingMovement=!0,this.idleFrames=5,this.lastTimingMode=n,this.stepsContainer.style.transform=n==Ne.Off?"":"translateY(-48px)",this.timingContainer.style.transform=n==Ne.Off?"":"translateY(-48px)",this.editSteps.classList.toggle("active",n==Ne.Off),this.editTiming.classList.toggle("active",n!=Ne.Off)}const a=this.manager.chartManager.chartAudio.isPlaying();if(this.lastPlaying!=a&&(this.playIcon.style.display=a?"none":"",this.stopIcon.style.display=a?"":"none",this.lastPlaying=a),(s==X.Play||s==X.Record)&&this.view.style.opacity==""&&!this.hovering&&Date.now()-this.lastHover>3e3&&(this.view.style.opacity="0.2",this.view.style.transition="2s cubic-bezier(.11,.72,.51,1.14)"),this.trackingMovement){const h=this.noteArrows[0];if(h){const p=h.element.getBoundingClientRect();this.noteArrows.forEach((f,m)=>{f.sprite.position.y=p.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,f.sprite.position.x=p.left-this.manager.app.view.clientWidth/2+24+m*48,f.bg.position=f.sprite.position,f.highlight.position=f.sprite.position}),this.lastBounds&&Math.abs(this.lastBounds.top-p.top)+Math.abs(this.lastBounds.left-p.left)==0&&(this.idleFrames--,this.idleFrames<0&&(this.trackingMovement=!1,this.lastBounds=void 0,n!=Ne.Off&&(this.visible=!1))),this.lastBounds=p}const u=this.view.getBoundingClientRect();this.noteArrowMask.y=u.bottom-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top}const o=this.manager.chartManager.getEditingNoteType(),l=Qe.getColor("editable-overlay-hover"),c=Qe.getColor("editable-overlay-active"),d=new B(l).setAlpha(0);this.noteArrows.forEach(h=>{let u=o==h.type?c:h.hovered?l:d;_.general.smoothAnimations&&(u=new B(RS(new B(h.highlight.tint).setAlpha(h.highlight.alpha),u,.3))),h.highlight.tint=u.toNumber(),h.highlight.alpha=u.alpha})}selectText(e){const t=window.getSelection(),i=document.createRange();!t||!i||(i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i))}updateTime(){this.millis.innerText=this.millis.innerText.padEnd(3,"0").slice(0,3);const e=this.parseString(this.min),t=this.parseString(this.sec),i=this.parseString(this.millis);if(e===null||t===null||i===null){this.lastTime=null;return}let s=e*60+t+i/1e3;s>9999999&&(s=9999999),s<0&&(s=0),this.manager.chartManager.setTime(s),this.lastTime=null}updateBeat(){let e=this.parseString(this.beat);if(e===null){this.lastBeat=null;return}this.beatDropdown.value=="Measure"&&(e=this.manager.chartManager.loadedChart?.timingData?.getBeatFromMeasure(e)??e*4),e>9999999&&(e=9999999),e<0&&(e=0),this.manager.chartManager.setBeat(e),this.lastBeat=null}updateOffset(){let e=this.parseString(this.offset);if(e===null){this.lastOffset=null;return}e>9999999&&(e=9999999),e<-9999999&&(e=-9999999),this.lastOffset=null,!(!this.manager.chartManager.loadedChart||!this.manager.chartManager.loadedSM)&&((this.manager.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.chartManager.loadedChart.timingData:this.manager.chartManager.loadedSM.timingData).setOffset(e),this.manager.chartManager.setBeat(this.manager.chartManager.getBeat()))}parseString(e){try{const t=br.evaluate(e.innerText);return isFinite(t)?t:0}catch{return null}}}class YS extends Ee{app;chartManager;children=[];constructor(e){super(),this.app=e.app,this.chartManager=e,this.addChild(new VS(this)),this.addChild(new WS(this)),this.addChild(new $S(this)),this.addChild(new ma(this)),this.addChild(new US(this)),this.addChild(new zS(this)),this.zIndex=2}update(){this.x=this.app.renderer.screen.width/2,this.y=this.app.renderer.screen.height/2,this.children.forEach(e=>e.update())}startPlay(){this.children.forEach(e=>e.startPlay())}endPlay(){this.children.forEach(e=>e.endPlay())}}const Wc=Array(85).fill(void 0).map((r,e)=>33+e),_y=[];for(const r of Wc)for(const e of Wc)_y.push([r,e]);const zc="<~".split("").map(r=>r.charCodeAt(0)),jc="~>".split("").map(r=>r.charCodeAt(0));function XS(r,e,t,i=!1,s=!1,n=!1){let a;typeof r=="string"?a=r.split("").map(h=>h.charCodeAt(0)):a=[...new Uint8Array(r)];const o=4-a.length%4;for(let h=0;h""}=e;this.graphWidth=t,this.graphHeight=i,this.color=s,this.unit=n,this.constrainedMax=l,this.constrainedMin=o,this.precision=c,this.formatter=d,this.sublabel=h,this.lineContainer=new hd(t,{position:!0},16384,!0);const u=new jt("noBorder");u.tint=0,u.alpha=.3,u.width=this.graphWidth,u.height=this.graphHeight,et(u,"text-color"),this.labelText=new De(a,{fontName:"Main",fontSize:Math.min(i/5,16)}),this.labelText.alpha=.8,this.sublabelText=new De("",{fontName:"Main",fontSize:Math.min(i/5,16)}),this.topText=new De("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.topText.anchor.x=1,this.topText.alpha=.5,this.topText.x=this.graphWidth,this.bottomText=new De("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.bottomText.anchor.x=1,this.bottomText.anchor.y=1,this.bottomText.alpha=.5,this.bottomText.x=this.graphWidth,this.bottomText.y=this.graphHeight,this.sublabelText.y=this.graphHeight,this.sublabelText.anchor.y=1,this.sublabelText.alpha=.5,this.addChild(u,this.lineContainer,this.labelText,this.sublabelText,this.topText,this.bottomText)}addValue(e){if(this.lineContainer.children[0]?.x+this.lineContainer.x<0){const i=this.lineContainer.children[0];this.dataPoints.shift(),this.removeChild(i),this.linePool.push(i)}this.lineContainer.x-=1,this.lineContainer.x<-1e7&&(this.lineContainer.children.forEach(i=>{i.x-=1e7}),this.lineContainer.x+=1e7);const t=this.linePool.shift()??new Oe(ie.WHITE);t.width=1,t.anchor.x=.5,t.anchor.y=1,t.tint=this.color,t.alpha=.6,t.x=this.graphWidth-this.lineContainer.x,t.y=this.graphHeight,t.value=e,this.dataPoints.push(e),this.targetMax=this.constrainedMax!==null?this.constrainedMax:Math.max(...this.dataPoints),this.targetMin=this.constrainedMin!==null?this.constrainedMin:Math.min(...this.dataPoints),this.lineContainer.addChild(t)}update(){this.dataPoints.length!=0&&(this.maxEase=(this.maxEase-this.targetMax)*.1+this.targetMax,this.minEase=(this.minEase-this.targetMin)*.1+this.targetMin,this.lineContainer.children.forEach(e=>{e.height=Be((e.value-this.minEase)/this.maxEase,0,1)*this.graphHeight}),this.topText.text=this.formatter?.(this.maxEase)??`${ae(this.maxEase,this.precision)} ${this.unit}`,this.bottomText.text=this.formatter?.(this.minEase)??`${ae(this.minEase,this.precision)} ${this.unit}`,this.sublabelText.text=this.sublabel())}}class by extends Aa{backing=new jt("noBorder");overlay=new Oe(ie.WHITE);selectionOverlay=new Oe(ie.WHITE);container=new Ee;lastHeight=0;lastCMod;mouseDown=!1;queued=!1;verticalMargin=40;backingVerticalPadding=10;backingWidth=32;xOffset=20;constructor(e,t=20,i=32){super(e),this.backingWidth=i,this.xOffset=t,this.sortableChildren=!0,this.addChild(this.backing),this.addChild(this.container),this.visible=!1,et(this.backing,"widget-bg"),this.overlay.anchor.x=.5,this.overlay.anchor.y=0,this.overlay.alpha=.3,this.overlay.zIndex=10,this.lastCMod=_.chart.CMod,this.addChild(this.overlay),this.x=this.manager.app.renderer.screen.width/2-this.xOffset,q.on("chartLoaded",()=>{this.queued=!1,this.populate()}),q.on("chartModifiedAfter",()=>{this.queued||this.populate(),this.queued=!0});const s=setInterval(()=>{this.queued&&(this.queued=!1,this.populate())},3e3);this.on("destroyed",()=>clearInterval(s)),this.eventMode="static",this.on("mousedown",n=>{this.mouseDown=!0,this.handleMouse(n)}),this.on("mousemove",n=>{this.mouseDown&&this.handleMouse(n)}),this.on("mouseup",()=>{this.mouseDown=!1}),this.on("mouseleave",()=>{this.mouseDown=!1})}handleMouse(e){if(this.manager.chartManager.getMode()==Y.Play||!this.getChart())return;let t=(this.container.toLocal(e.global).y+this.container.height/2)/this.container.height;t=Be(t,0,1),this.getChart().getNotedata().at(-1)&&(_.chart.CMod?this.manager.chartManager.setTime(Ht(-this.getChart().timingData.getOffset(),this.getChart().getLastSecond(),t)):this.manager.chartManager.setBeat(this.getChart().getLastBeat()*t))}update(){this.scale.y=_.chart.reverse?-1:1;const e=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=e+this.backingVerticalPadding,this.backing.position.y=-this.backing.height/2,this.backing.position.x=-this.backing.width/2,this.x=this.manager.app.renderer.screen.width/2-this.xOffset;const t=this.getChart(),i=this.manager.chartManager.chartView;if(!t||!i||!Ie.layout){this.visible=!1;return}if(this.visible=!0,!t.getNotedata().at(-1)){this.overlay.height=0;return}const n=_.chart.CMod?i.getSecondFromYPos(-this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(-this.manager.app.renderer.screen.height/2,!0),a=_.chart.CMod?i.getSecondFromYPos(this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(this.manager.app.renderer.screen.height/2,!0),o=this.getYFromRange(t,n,a);this.overlay.y=o.startY,this.overlay.height=o.endY-o.startY,this.overlay.height=Math.max(2,this.overlay.height);const l=this.manager.chartManager.selection.notes;if(l.length<1)this.selectionOverlay.visible=!1;else{this.selectionOverlay.visible=!0;let c,d;_.chart.CMod?(c=Yp(l.map(u=>u.second)),d=qp(l.map(u=>t.getSecondsFromBeat(dr(u))))):(c=Yp(l.map(u=>u.beat)),d=qp(l.map(u=>dr(u))));const h=this.getYFromRange(t,c,d);this.selectionOverlay.y=h.startY,this.selectionOverlay.height=h.endY-h.startY,this.selectionOverlay.height=Math.max(2,this.selectionOverlay.height)}(this.manager.app.renderer.screen.height!=this.lastHeight||this.lastCMod!=_.chart.CMod)&&(this.lastCMod=_.chart.CMod,this.lastHeight=this.manager.app.renderer.screen.height,this.updateDimensions(),this.populate())}getYFromRange(e,t,i){const s=e.getLastBeat(),n=e.getLastSecond();let a=Nt(0,s,t),o=Nt(0,s,i);_.chart.CMod&&(a=Nt(-e.timingData.getOffset(),n,t),o=Nt(-e.timingData.getOffset(),n,i)),a=Be(a,0,1),o=Be(o,0,1),a>o&&([a,o]=[o,a]);const l=(a-.5)*this.container.height,c=(o-.5)*this.container.height;return{startY:l,endY:c}}updateDimensions(){if(!this.getChart())return;const t=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=t+this.backingVerticalPadding,this.backing.width=this.backingWidth,this.overlay.width=this.backingWidth,this.selectionOverlay.width=this.backingWidth,this.pivot.x=this.backing.width/2}populate(){}getChart(){return this.manager.chartManager.loadedChart}}class US extends by{npsGraph;graphGradient=null;graphWidth=40;npsText=new De("",{fontName:"Main",fontSize:12});constructor(e){super(e,60,40),this.graphWidth=40,this.graphGradient=this.makeGradient(),this.npsGraph=new An,this.container.addChild(this.npsGraph),this.npsText.visible=!1,this.npsText.anchor.x=1,this.npsText.anchor.y=.5,et(this.npsText,"text-color"),this.addChild(this.npsText),q.on("userOptionUpdated",i=>{(i=="chart.npsGraph.color1"||i=="chart.npsGraph.color2")&&(this.graphGradient=this.makeGradient(),this.populate())}),this.on("mouseleave",()=>{this.hideNpsDisplay()}),this.on("mouseenter",()=>{this.showNpsDisplay()}),this.on("mousemove",i=>{this.updateNpsDisplay(i)}),this.populate()}updateNpsDisplay(e){const t=this.getChart();if(!t){this.npsText.visible=!1;return}if(!t.getNotedata().at(-1)){this.npsText.visible=!1;return}const s=t.getNPSGraph();let n=this.npsGraph.toLocal(e.global).y/this.npsGraph.height;n=Be(n,0,1);let a=Ht(0,t.getLastBeat(),n);if(_.chart.CMod){const c=Ht(-t.timingData.getOffset(),t.getLastSecond(),n);a=t.timingData.getBeatFromSeconds(c)}const o=Math.floor(t.timingData.getMeasure(a)),l=s[o]??0;this.npsText.text=l.toFixed(1)+" nps",this.npsText.position.y=this.getYFromBeat(a)-this.npsGraph.height/2,this.npsText.position.x=-this.backing.width/2-10,this.npsText.visible=!0}hideNpsDisplay(){this.npsText.visible=!1}showNpsDisplay(){const e=this.getChart();if(!e){this.npsText.visible=!1;return}if(!e.getNotedata().at(-1)){this.npsText.visible=!1;return}this.npsText.visible=!0}update(){if(!_.chart.npsGraph.enabled){this.visible=!1;return}this.visible=!0;const e=this.manager.getChildByName("note-layout");e!==void 0&&e.visible?this.xOffset=e.backingWidth+28:this.xOffset=20,this.npsText.scale.y=_.chart.reverse?-1:1,super.update()}populate(){const e=this.getChart();if(!e)return;const t=this.manager.app.renderer.screen.height-40;if(e.getNotedata().length==0)return;const i=e.getMaxNPS(),s=e.getNPSGraph(),n=e.getLastBeat();this.npsGraph.clear(),this.graphGradient?this.npsGraph.beginTextureFill({texture:this.graphGradient}):this.npsGraph.beginFill(0,1),this.npsGraph.pivot.x=this.backing.width/2,this.npsGraph.pivot.y=t/2;const a=s.length,o=this.getYFromBeat(0);this.npsGraph.moveTo(0,o);for(let h=0;h{this.popup?.contains(t.target)||(this.persistent=!1,this.close())},q.on("snapChanged",this.onSnapChange),this.popup.style.display="none",setTimeout(()=>this.movePosition(e)),this.moveInterval=setInterval(()=>this.movePosition(e),150),this.active=!0)}static movePosition(e){this.popup.style.display="";const t=e.getBounds(),i=t.left+t.width/2,s=200,n=s/2+15,a=window.innerWidth-s/2-15;this.popup.style.left=`${Be(i,n,a)}px`;const o=document.getElementById("pixi").offsetTop+9,l=(t.top+t.height+o)/2;this.popup.style.top=`${t.top+t.height+o}px`,l+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${t.top-t.height/2}px`)}static build(){const e=document.createElement("div");e.classList.add("popup");const t=document.createElement("div");t.classList.add("popup-zoomer"),t.style.width="200px",t.style.backgroundColor="#333333",e.appendChild(t),this.zoomer=t;const i=document.createElement("div");i.innerText="Snap Options",i.classList.add("popup-title"),t.appendChild(i);const s=document.createElement("div");s.classList.add("popup-flex"),t.appendChild(s);const n=document.createElement("div");n.classList.add("popup-row");const a=document.createElement("div");a.innerText="Snap to nearest ";const o=ot.create(_.chart.snap==0?0:Math.round(4/_.chart.snap),1,0,0,1e3);o.onChange=f=>{if(f===void 0){this.updateValues();return}f==0?_.chart.snap=0:_.chart.snap=4/f,this.updateValues()};const l=document.createElement("div");l.innerText=this.suffixSnap()+" note",n.replaceChildren(a,o.view,l);const c=document.createElement("div");c.classList.add("popup-row");const d=document.createElement("div");d.innerText="Snap every";const h=ot.create(_.chart.snap,.001,3,0);h.onChange=f=>{if(f===void 0){this.updateValues();return}f==0?_.chart.snap=0:_.chart.snap=f,this.updateValues()};const u=document.createElement("div");u.innerText=" beats",c.replaceChildren(d,h.view,u),s.replaceChildren(n,c),this.beatInput=h,this.divInput=o,this.divLabel=l;const p=document.createElement("div");return p.innerText="click to edit",p.style.marginTop="4px",p.style.height="10px",t.appendChild(p),p.classList.add("popup-desc"),this.editText=p,e}static updateValues(){document.activeElement==this.divInput.input||document.activeElement==this.beatInput.input||(this.divInput.setValue(_.chart.snap==0?0:Math.round(4/_.chart.snap)),this.divLabel.innerText=this.suffixSnap()+" note",this.beatInput.setValue(_.chart.snap))}static suffixSnap(){const e=_.chart.snap==0?0:Math.round(4/_.chart.snap);return e%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}static close(){if(!this.popup||!this.active||this.persistent)return;window.removeEventListener("click",this.clickOutside,!0),this.popup.classList.add("exiting");const e=this.popup;setTimeout(()=>e.remove(),200),this.active=!1,this.persistent=!1,clearInterval(this.moveInterval),clearInterval(this.updateInterval),q.off("timingModified",this.onSnapChange)}static select(){this.persistent=!0,this.zoomer.classList.add("selected"),this.editText.style.transform="scale(0)",this.editText.style.height="0px",setTimeout(()=>window.addEventListener("click",this.clickOutside,!0),200)}}const HS={fontName:"Main",fontSize:10,fill:["#ffffff"]},wy={4:15157287,8:4033015,12:11152884,16:8577607,24:14167723,32:15376696,48:15699179,64:7071886,96:8553090,192:8553090};class GS extends Ee{renderer;children=[];constructor(e){super(),this.renderer=e;for(let t=0;t<2;t++){const i=new Ee,s=new An,n=new De("4",HS);i.x=(t-.5)*(this.renderer.chart.gameType.notefieldWidth+48),s.rotation=Math.PI/4,s.lineStyle(1,0,1),s.beginFill(16777215),s.drawRect(-12,-12,24,24),s.endFill(),n.anchor.set(.5),i.addChild(s,n),this.addChild(i),i.eventMode="static",i.on("mouseenter",()=>Ph.open(s)),i.on("mousedown",()=>Ph.select()),i.on("mouseleave",()=>Ph.close())}}update(){this.y=this.renderer.getActualReceptorYPos(),this.visible=this.renderer.chartManager.getMode()!=Y.Play;for(let e=0;e<2;e++){const t=this.children[e],i=t.children[0];i.tint=wy[4/_.chart.snap]??7368816;const s=t.children[1];s.text=""+(_.chart.snap==0||4/_.chart.snap%1!=0?"":4/_.chart.snap)}}}class VS extends by{barContainer=new hd(1500,{position:!0,scale:!0,tint:!0},16384,!0);bars;barTexture;constructor(e){super(e),this.addChild(this.backing),this.addChild(this.container),this.visible=!1,this.name="note-layout",this.backing.tint=0,this.backing.alpha=.3,this.barTexture=Ft.create({resolution:this.manager.app.renderer.resolution}),this.bars=new Oe(this.barTexture),this.bars.anchor.set(.5),this.container.addChild(this.bars),this.populate()}update(){if(!_.chart.noteLayout.enabled){this.visible=!1;return}this.visible=!0,super.update()}populate(){const e=this.getChart();if(!e){Ki(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}let t=0;const i=e.gameType.numCols,s=e.getNotedata().at(-1),n=this.manager.app.renderer.screen.height-40;if(this.barTexture.resize(i*6,n),this.backingWidth=i*6+8,this.updateDimensions(),!s){Ki(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}const a=s.beat+(Le(s)?s.hold:0),o=e.getSecondsFromBeat(a),l=e.timingData.getOffset();e.getNotedata().forEach(c=>{let d=this.barContainer.children[t];d||(d=new Oe(ie.WHITE),d.width=4,this.barContainer.addChild(d)),d.anchor.set(.5),d.height=1,d.x=(c.col+.5)*6;let h=Nt(0,a,c.beat);if(_.chart.CMod&&(h=Nt(l,o,c.second)),d.y=h*n,d.tint=wy[c.quant],c.type=="Mine"&&(d.tint=8421504),t++,Le(c)){let u=this.barContainer.children[t];u||(u=new Oe(ie.WHITE),u.width=4,u.height=2,this.barContainer.addChild(u)),u.anchor.x=.5,u.anchor.y=0,u.x=(c.col+.5)*6;const p=(_.chart.CMod?e.getSecondsFromBeat(c.beat+c.hold)/o:(c.beat+c.hold)/a)*n+1;u.y=d.y,u.height=p-d.y,c.type=="Hold"&&(u.tint=10526880),c.type=="Roll"&&(u.tint=11379586),t++}}),Ki(this.barContainer.children,(c,d)=>d>=t),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture})}}const Ye=300,rt=150,bf=[.045,.09,.18,.37,.18,.09,.045];class WS extends Aa{max=0;barlines=new Ee;backgroundRect=new jt("noBorder");background=new Ee;backgroundLines=new Ee;statText=new Ee;meanText;medianText;modeText;stddevText;errorMS=[];texts=new Ee;showEase=0;toggled=!1;drag=!1;dragStart=0;lastMode=this.manager.chartManager.getMode();constructor(e){super(e),this.visible=!1,this.background.addChild(this.backgroundRect),et(this.backgroundRect,"widget-bg"),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.on("mousedown",()=>{this.manager.chartManager.getMode()!=Y.Play&&(this.drag=!0,this.dragStart=Date.now(),Rt.stop("play-widget"))}),window.addEventListener("mousemove",f=>{this.drag&&(this.showEase+=f.movementY/-400)}),window.addEventListener("mouseup",()=>{this.drag&&(Date.now()-this.dragStart>400?this.toggled=this.showEase>.5:this.toggled=!this.toggled,Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:this.toggled?1:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")),this.drag=!1}),this.on("mouseenter",()=>{!this.toggled&&this.manager.chartManager.getMode()!=Y.Play&&Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:.05}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")}),this.on("mouseleave",()=>{!this.toggled&&this.manager.chartManager.getMode()!=Y.Play&&Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")});const t=new De("Early",{fontName:"Main",fontSize:15});t.x=-Ye/2+5,t.y=-rt-40,t.alpha=.3,this.background.addChild(t),et(t,"text-color");const i=new De("Late",{fontName:"Main",fontSize:15});i.anchor.x=1,i.x=Ye/2-5,i.y=-rt-40,i.alpha=.3,this.background.addChild(i),et(i,"text-color"),this.meanText=new De("-",{fontName:"Main",fontSize:15}),this.meanText.anchor.x=.5,this.meanText.x=Ye/4*-1.5,this.meanText.y=-rt-70,this.statText.addChild(this.meanText),this.medianText=new De("-",{fontName:"Main",fontSize:15}),this.medianText.anchor.x=.5,this.medianText.x=Ye/4*-.5,this.medianText.y=-rt-70,this.statText.addChild(this.medianText),this.modeText=new De("-",{fontName:"Main",fontSize:15}),this.modeText.anchor.x=.5,this.modeText.x=Ye/4*.5,this.modeText.y=-rt-70,this.statText.addChild(this.modeText),this.stddevText=new De("-",{fontName:"Main",fontSize:15}),this.stddevText.anchor.x=.5,this.stddevText.x=Ye/4*1.5,this.stddevText.y=-rt-70,this.statText.addChild(this.stddevText);const s=new De("Mean",{fontName:"Main",fontSize:10});s.anchor.x=.5,s.x=Ye/4*-1.5,s.y=-rt-80,this.statText.addChild(s);const n=new De("Median",{fontName:"Main",fontSize:10});n.anchor.x=.5,n.x=Ye/4*-.5,n.y=-rt-80,this.statText.addChild(n);const a=new De("Mode",{fontName:"Main",fontSize:10});a.anchor.x=.5,a.x=Ye/4*.5,a.y=-rt-80,this.statText.addChild(a);const o=new De("Std Dev.",{fontName:"Main",fontSize:10});o.anchor.x=.5,o.x=Ye/4*1.5,o.y=-rt-80,this.statText.addChild(o),this.statText.children.forEach(f=>{et(f,"text-color")});const l=new Ee,c=new jt("noBorder");c.tint=3355443,c.alpha=.3,c.width=Ye/2-10,c.height=30,c.y=-25,c.x=-Ye/4,c.pivot.x=(Ye/2-10)/2,c.pivot.y=15;const d=new De("Adjust song offset",{fontName:"Main",fontSize:12});d.anchor.set(.5),d.x=-Ye/4,d.y=-25,l.addChild(c,d),l.eventMode="static",l.addEventListener("mouseenter",()=>{c.alpha=.6}),l.addEventListener("mousedown",f=>{f.stopImmediatePropagation(),this.adjustOffset("song")}),l.addEventListener("mouseleave",()=>{c.alpha=.3}),this.statText.addChild(l),et(d,"text-color");const h=new Ee,u=new jt("noBorder");u.tint=3355443,u.alpha=.3,u.width=Ye/2-10,u.height=30,u.y=-25,u.x=Ye/4,u.pivot.x=(Ye/2-10)/2,u.pivot.y=15,u.eventMode="static",h.addEventListener("mouseenter",()=>{u.alpha=.6}),h.addEventListener("mouseleave",()=>{u.alpha=.3});const p=new De("Adjust global offset",{fontName:"Main",fontSize:12});p.anchor.set(.5),p.x=Ye/4,p.y=-25,h.addChild(u,p),et(p,"text-color"),h.eventMode="static",h.addEventListener("mouseenter",()=>{u.alpha=.6}),h.addEventListener("mousedown",f=>{f.stopImmediatePropagation(),this.adjustOffset("global")}),h.addEventListener("mouseleave",()=>{u.alpha=.3}),this.statText.addChild(h),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.addChild(this.statText),this.addChild(this.barlines),this.addChild(this.texts)}update(){this.visible=!!this.manager.chartManager.gameStats,this.x=-this.manager.chartManager.app.renderer.screen.width/2+20+Ye/2,this.y=this.manager.chartManager.app.renderer.screen.height/2-20,this.backgroundRect.width=Ye+10,this.backgroundRect.height=rt+260,this.backgroundRect.x=-Ye/2-5,this.backgroundRect.y=-rt-260,this.visible=!!this.manager.chartManager.gameStats;for(const e of this.barlines.children)_.general.smoothAnimations?e.height=(e.targetHeight-e.height)*.2+e.height:e.height=e.targetHeight;this.lastMode!=this.manager.chartManager.getMode()&&(this.lastMode=this.manager.chartManager.getMode(),Rt.animate(this,{0:{showEase:"inherit"},1:{showEase:this.manager.chartManager.getMode()==Y.Play?1:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")),_.general.smoothAnimations?this.y+=(1-Math.abs(this.showEase))*400:this.manager.chartManager.getMode()!=Y.Play&&(this.y+=400)}newLine(){const e=new Oe(ie.WHITE);return e.smoothCount=0,e.targetHeight=0,e.anchor.y=1,e.anchor.x=.5,e.height=0,e.visible=!1,e}startPlay(){const e=this.manager.chartManager.gameStats;this.max=0,this.errorMS=[],this.meanText.text="-",this.medianText.text="-",this.modeText.text="-",this.stddevText.text="-",Ki(this.barlines.children,()=>!0),Ki(this.backgroundLines.children,()=>!0),Ki(this.texts.children,()=>!0);const t=Je.getCollection(_.play.timingCollection),i=t.getStandardWindows().length+1,s=Math.round(t.maxWindowMS());for(let f=0;fw.type==m&&!w.fake).length),g.alpha=.8,y.alpha=.8,y.name=m,this.texts.addChild(g),this.texts.addChild(y),g.x=-Ye/2+160,y.x=-Ye/2+290,g.y=80/l*n-rt-220,y.y=80/l*n++-rt-220,g.anchor.y=.5,y.anchor.y=.5,y.anchor.x=1}const c=new De("Max Combo",{fontName:"Main",fontSize:15});et(c,"text-color");const d=new De("0",{fontName:"Main",fontSize:15});et(d,"text-color"),c.alpha=.8,d.alpha=.8,d.name="Combo",this.texts.addChild(c),this.texts.addChild(d),c.x=-Ye/2+160,d.x=-Ye/2+290,c.y=80/l*n-rt-220,d.y=80/l*n++-rt-220,c.anchor.y=.5,d.anchor.y=.5,d.anchor.x=1;const h=new De("0.00 / 0.00",{fontName:"Main",fontSize:20});et(h,"text-color"),h.alpha=.8,h.x=-Ye/2+225,h.y=-rt-112,h.name="Score",this.texts.addChild(h),h.anchor.set(.5);const u=new De("Score / Current Score",{fontName:"Main",fontSize:13});et(u,"text-color"),u.alpha=.5,u.x=-Ye/2+225,u.y=-rt-135,this.texts.addChild(u),u.anchor.set(.5);const p=new De("Play Statistics",{fontName:"Main",fontSize:13});p.y=-rt-245,p.anchor.set(.5),et(p,"text-color"),this.texts.addChild(p),e.onJudge((f,m)=>{let g="";(Pi(m)||Zi(m))&&(g=m.id),ws(m)&&(g=m.noteType),_l(m)&&(g="Mine");const y=this.texts.getChildByName(g);if(ws(m)){const b=y.text.split(" / ")[1];y.text=e.getCount(m)+" / "+b}else bn(m)||(y.text=e.getCount(m)+"");if(this.texts.getChildByName("Combo").text=e.getMaxCombo()+"",this.texts.getChildByName("Score").text=ae(e.getScore()*100,2).toFixed(2)+" / "+ae(e.getCumulativeScore()*100,2).toFixed(2),Pi(m)||!Zi(m)||f==null)return;const w=Math.round(f*1e3);for(let b=-3;b<=3;b++)this.barlines.children[w+s+b]&&(this.barlines.children[w+s+b].smoothCount+=bf[b+3],this.barlines.children[w+s+b].visible=!0,this.barlines.children[w+s+b].smoothCount>this.max&&(this.modeText.text=w+"ms",this.max=this.barlines.children[w+s+b].smoothCount));this.errorMS.push(f*1e3),this.meanText.text=LA(this.errorMS).toFixed(2)+"ms",this.medianText.text=xl(this.errorMS).toFixed(2)+"ms",this.stddevText.text=Yg(this.errorMS).toFixed(2)+"ms",this.redraw()})}redraw(){for(const e of this.barlines.children)e.targetHeight=e.smoothCount*(rt-20)/this.max}adjustOffset(e){const t=this.manager.chartManager.gameStats;if(!t)return;const i=Math.round(t.getMedian()*1e3)/1e3;if(i==0)return;t.applyOffset(-i),this.barlines.children.forEach(o=>{o.smoothCount=0});const s=Je.getCollection(_.play.timingCollection),n=Math.round(s.maxWindowMS());t.getDataPoints().forEach(o=>{if(Pi(o.judgement)||!Zi(o.judgement)||o.error===null)return;const l=Math.round(o.error*1e3);for(let c=-3;c<=3;c++)this.barlines.children[l+n+c]&&(this.barlines.children[l+n+c].smoothCount+=bf[c+3],this.barlines.children[l+n+c].visible=!0,this.barlines.children[l+n+c].smoothCount>this.max&&(this.modeText.text=l+"ms",this.max=this.barlines.children[l+n+c].smoothCount))}),this.redraw();const a=e=="global"?_.play.offset:this.manager.app.chartManager.loadedChart.timingData.getOffset();if(e=="global")_.play.offset=ae(_.play.offset-i,3);else if(e=="song"){const o=this.manager.app.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.app.chartManager.loadedChart.timingData:this.manager.app.chartManager.loadedSM.timingData;o.setOffset(ae(o.getOffset()-i,3))}Se.create(`Adjusted ${e} offset from ${ae(a,3).toFixed(3)} to ${ae(a-i,3).toFixed(3)}`),this.manager.app.chartManager.setBeat(this.manager.app.chartManager.getBeat())}}class zS extends Aa{registeredSpinners=[];registeredToggles=[];registeredCheckboxes=[];changeRow;warpRow;fakeRow;view;collapseButton;lastSpeedMod=_.chart.CMod;rateSpinner;enteredMain=!1;constructor(e){super(e),this.visible=!1;const t=document.createElement("div");t.id="playback-options",_.general.showPlaybackOptions||t.classList.add("collapsed"),t.style.height="0px",document.getElementById("menubar")?.insertAdjacentElement("afterend",t),this.view=t;const i=document.createElement("button");i.classList.add("po-collapse"),i.tabIndex=-1;const s=Ae.getIcon("CHEVRON",18);i.appendChild(s),_.general.showPlaybackOptions&&i.classList.add("toggled"),this.collapseButton=i,i.onclick=()=>{_.general.showPlaybackOptions=!_.general.showPlaybackOptions,t.classList.toggle("collapsed"),i.classList.toggle("toggled",!t.classList.contains("collapsed")),i.blur()},i.style.display="none",Pt(i,{onShow(O){O.setContent((t.classList.contains("collapsed")?"Show ":"Hide ")+"playback options")}});const n=this.createRow("Zoom"),a=this.createSpinner({value:_.chart.zoom*100,step:10,altStep:2,min:10,hardMin:0,onChange:O=>_.chart.zoom=O/100,getValue:()=>_.chart.zoom*100});n.appendChild(a),t.appendChild(n);const o=document.createElement("div"),l=document.createElement("h1");l.innerText="a",o.appendChild(l),Re.createKeybindTooltip(n)`Adjust playfield size ${"zoomOut"}/${"zoomIn"}`,t.appendChild(this.createSeparator());const c=this.createRow("Playback"),d=this.createSpinner({value:_.audio.rate*100,step:10,altStep:2,min:10,hardMin:0,onChange:O=>_.audio.rate=O/100,getValue:()=>_.audio.rate*100});c.appendChild(d),t.appendChild(c),this.rateSpinner=this.registeredSpinners.at(-1),Re.createKeybindTooltip(c)`Adjust audio playback rate ${"rateDown"}/${"rateUp"}`;const h=document.createElement("div");h.style.gap="5px",h.style.display="flex",h.style.alignItems="center";const u=this.createCheckbox({getValue:()=>_.audio.assistTick,value:_.audio.assistTick,onEl:Ae.getIcon("CLAP",18),offEl:Ae.getIcon("X_CLAP",18),onChange:O=>_.audio.assistTick=O});h.appendChild(u),Re.createKeybindTooltip(u)`Toggle assist tick ${"assistTick"}`;const p=this.createCheckbox({getValue:()=>_.audio.metronome,value:_.audio.metronome,onEl:Ae.getIcon("METRONOME",18),offEl:Ae.getIcon("X_METRONOME",18),onChange:O=>_.audio.metronome=O});h.appendChild(p),t.appendChild(h),Re.createKeybindTooltip(p)`Toggle metronome ${"metronome"}`,t.appendChild(this.createSeparator());const f=this.createRow("Scroll"),m=Ae.getIcon("DBL_CHEVRON",16);m.style.padding="2px";const g=Ae.getIcon("DBL_CHEVRON",16);g.style.padding="2px",g.style.transform="rotate(180deg)";const y=this.createToggle({values:[m,g],value:_.chart.reverse?1:0,getValue:()=>_.chart.reverse?1:0,onChange:(O,W)=>_.chart.reverse=W!=0});f.appendChild(y),t.appendChild(f),Re.createKeybindTooltip(f)`Change scroll direction ${"reverse"}`;const w=this.createRow("Speedmod"),b=this.createToggle({values:["X","C"],value:_.chart.CMod?1:0,getValue:()=>_.chart.CMod?1:0,onChange:O=>_.chart.CMod=O!="X"});Re.createKeybindTooltip(b)`Change speedmod type ${"XMod"}/${"CMod"}`;const v=this.createSpinner({value:_.chart.speed,step:25,altStep:5,min:10,hardMin:10,hardMax:35e3,onChange:O=>_.chart.speed=O,getValue:()=>_.chart.speed});w.appendChild(b),w.appendChild(v),t.appendChild(w),Re.createKeybindTooltip(v)`Adjust scroll speed ${"increaseScrollSpeed"}/${"decreaseScrollSpeed"}`,t.appendChild(this.createSeparator());const E=this.createRow("Speed Changes"),C=this.createToggle({values:["On","Off"],value:_.chart.doSpeedChanges?0:1,getValue:()=>_.chart.doSpeedChanges?0:1,onChange:O=>_.chart.doSpeedChanges=O=="On"});E.appendChild(C),t.appendChild(E),Re.createKeybindTooltip(E)`Allow scroll/speed events (XMod only) ${"doSpeedChanges"}`,this.changeRow=E;const I=this.createRow("Warped Notes"),L=this.createCheckbox({getValue:()=>_.chart.hideWarpedArrows,value:_.chart.hideWarpedArrows,onEl:Ae.getIcon("X_EYE",18),offEl:Ae.getIcon("EYE",18),onChange:O=>_.chart.hideWarpedArrows=O});I.appendChild(L),t.appendChild(I),Re.createKeybindTooltip(I)`Show/hide warped notes (CMod only) ${"hideWarpedArrows"}`,this.warpRow=I;const k=this.createRow("Faked Notes"),N=this.createCheckbox({getValue:()=>_.chart.hideFakedArrows,value:_.chart.hideFakedArrows,onEl:Ae.getIcon("X_EYE",18),offEl:Ae.getIcon("EYE",18),onChange:O=>_.chart.hideFakedArrows=O});k.appendChild(N),t.appendChild(k),Re.createKeybindTooltip(k)`Show/hide faked notes (CMod only) ${"hideFakedArrows"}`,this.fakeRow=k;const G=Ae.getIcon("VOLUME",22);G.style.marginLeft="auto",G.style.marginRight="-16px",G.style.height="22px",G.style.width="22px",G.style.alignSelf="center",t.appendChild(G);const A=this.createRow("Master"),S=this.createSpinner({value:_.audio.masterVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.masterVolume=O/100,getValue:()=>_.audio.masterVolume*100});A.appendChild(S),t.appendChild(A);const x=this.createRow("Song"),D=this.createSpinner({value:_.audio.songVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.songVolume=O/100,getValue:()=>_.audio.songVolume*100});x.appendChild(D),t.appendChild(x);const $=this.createRow("FX"),R=this.createSpinner({value:_.audio.soundEffectVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.soundEffectVolume=O/100,getValue:()=>_.audio.soundEffectVolume*100});$.appendChild(R),t.appendChild($),this.changeRow.style.setProperty("--w",this.changeRow.offsetWidth+"px"),this.warpRow.style.setProperty("--w",this.warpRow.offsetWidth+"px"),this.fakeRow.style.setProperty("--w",this.fakeRow.offsetWidth+"px"),this.changeRow.classList.toggle("hidden",_.chart.CMod),this.warpRow.classList.toggle("hidden",!_.chart.CMod),this.fakeRow.classList.toggle("hidden",!_.chart.CMod),Ie.playbackOptions||(t.style.display="none",i.style.display="none")}createRow(e){const t=document.createElement("div");t.classList.add("playback-options-row");const i=document.createElement("div");return i.classList.add("playback-options-label"),i.innerText=e,t.appendChild(i),t}createSeparator(){const e=document.createElement("div");return e.classList.add("po-separator"),e}createSpinner(e){const t=document.createElement("div");t.classList.add("po-spinner");const i=c=>{let d=_.general.spinnerStep;return c.getModifierState("Shift")?d=e.altStep??(e.step!==void 0?e.step/10:_.general.spinnerStep):d=e.step??_.general.spinnerStep,d},s=document.createElement("button");s.classList.add("po-spinner-btn"),s.innerText="-",s.onclick=c=>{l.currentValue-=i(c),e.min!==void 0&&l.currentValue{l.currentValue+=i(c),e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),o(!0)};const a=document.createElement("input");a.classList.add("po-spinner-input"),a.type="text";const o=(c=!0)=>{e.hardMin!==void 0&&l.currentValuee.hardMax&&(l.currentValue=e.hardMax),c&&e.onChange(l.currentValue),a.value=l.currentValue.toFixed()};a.onwheel=c=>{l.currentValue+=i(c)*c.deltaY/100*(_.chart.scroll.invertZoomScroll?-1:1)*_.chart.scroll.scrollSensitivity,e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),e.min!==void 0&&l.currentValue{c.key=="Enter"&&a.blur(),c.key=="Escape"&&(l.currentValue=e.getValue(),o(!1))},a.onfocus=()=>{a.select()},a.onblur=()=>{const c=this.parseString(a);if(c==null){l.currentValue=e.getValue(),o(!1);return}l.currentValue=c,o()},a.ondragstart=c=>c.preventDefault(),this.registeredSpinners.push(l),t}createToggle(e){const t=document.createElement("div");if(t.classList.add("po-toggle"),e.values.length==0)return t;const i=document.createElement("div");i.classList.add("po-toggle-highlight");const s=e.values.map((l,c)=>{if(typeof l=="string"){const d=document.createElement("div");return d.classList.add("po-toggle-item"),d.innerText=l,t.appendChild(d),d.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},d}else return l.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},t.appendChild(l),l});t.style.visibility="hidden",document.body.appendChild(t);const n=l=>{i.style.left=s[l].getBoundingClientRect().left-s[0].getBoundingClientRect().left+"px",i.style.width=s[l].getBoundingClientRect().width+"px",i.style.height=s[l].getBoundingClientRect().height+"px"},a=(l=!0)=>{l&&e.onChange(e.values[o.currentValue],o.currentValue),[...t.querySelectorAll(".active")].forEach(c=>c.classList.remove("active")),n(o.currentValue),s[o.currentValue].classList.add("active")},o={currentValue:e.value??0,options:e,update:a};return this.registeredToggles.push(o),a(!1),t.remove(),t.style.visibility="",t.appendChild(i),t}createCheckbox(e){const t=document.createElement("div");t.classList.add("ico-checkbox");const i=(n=!0)=>{n&&e.onChange(s.currentValue),s.options.onEl.style.display=s.currentValue?"":"none",s.options.offEl.style.display=s.currentValue?"none":""},s={currentValue:e.value??!0,options:e,update:i};return t.onclick=()=>{s.currentValue=!s.currentValue,i()},this.registeredCheckboxes.push(s),i(!1),t.replaceChildren(s.options.onEl,s.options.offEl),t}update(){!this.enteredMain&&this.manager.chartManager.loadedChart!==void 0&&(this.enteredMain=!0,this.view.style.height="",this.collapseButton.style.display="",document.getElementById("menubar")?.appendChild(this.collapseButton));for(const t of this.registeredSpinners)t.currentValue!=t.options.getValue()&&document.activeElement!=t.input&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredToggles)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredCheckboxes)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));const e=this.manager.chartManager.getMode()==Y.Play||this.manager.chartManager.getMode()==Y.Record;this.rateSpinner.btnMinus.disabled=e,this.rateSpinner.btnPlus.disabled=e,this.rateSpinner.input.disabled=e,_.chart.CMod!=this.lastSpeedMod&&(this.lastSpeedMod=_.chart.CMod,this.changeRow.classList.toggle("hidden",_.chart.CMod),this.warpRow.classList.toggle("hidden",!_.chart.CMod),this.fakeRow.classList.toggle("hidden",!_.chart.CMod))}parseString(e){try{const t=br.evaluate(e.value);return isFinite(t)?t:0}catch{return null}}}class ga extends Ee{pool=[];options;constructor(e){super(),this.options=e}createChild(){if(this.pool.length==0&&this.options.maxPoolSize!==void 0&&this.children.length>=this.options.maxPoolSize)return;const e=this.pool.pop()??this.options.create();return this.addChild(e),e._disabledTime=Date.now(),e}destroyChild(e){this.children.includes(e)&&(e.removeFromParent(),e.removeAllListeners(),e.eventMode="auto",e._disabledTime=Date.now(),this.pool.push(e))}destroyAll(){this.children.forEach(e=>e._disabledTime=Date.now()),this.pool.push(...this.children),this.children.forEach(e=>{e.removeAllListeners(),e.eventMode="auto"}),this.removeChildren()}_render(e){super._render(e);const t=Date.now();for(;t-this.pool[0]?._disabledTime>(this.options.destroyTimer??5e3);)this.pool.shift().destroy()}}const Hr={BPMS:9182254,STOPS:4934913,DELAYS:217453,WARPS:9243998,FAKES:4868682,COMBOS:939078,SPEEDS:2968693,LABELS:7747359,SCROLLS:3557006,TIMESIGNATURES:5392684,TICKCOUNTS:1594906,BGCHANGES:8460415,FGCHANGES:8857115,ATTACKS:1856083};class jS extends Ee{renderer;areaPool=new ga({create:()=>{const e=new Oe(ie.WHITE);return Object.assign(e,{alpha:.2,width:this.renderer.chart.gameType.notefieldWidth+128}),e.anchor.set(.5,0),e}});timingAreaMap=new Map;timingEvents=[];timingDirty=!0;constructor(e){super(),this.renderer=e,this.addChild(this.areaPool);const t=()=>this.timingDirty=!0;q.on("timingModified",t),this.on("destroyed",()=>q.off("timingModified",t))}update(e,t){this.timingDirty&&(this.timingAreaMap.clear(),this.areaPool.destroyAll(),this.timingDirty=!1,this.timingEvents=this.renderer.chart.timingData.getTimingData("STOPS","WARPS","DELAYS","FAKES")),this.visible=this.renderer.shouldDisplayBarlines();for(const i of this.timingEvents){if(i.beat>t)break;if(this.shouldDrawEvent(i,e,t)&&!this.timingAreaMap.has(i)){const s=this.areaPool.createChild();if(!s)break;s.tint=Hr[i.type],this.timingAreaMap.set(i,s)}}for(const[i,s]of this.timingAreaMap.entries()){if(!this.shouldDrawEvent(i,e,t)){this.timingAreaMap.delete(i),this.areaPool.destroyChild(s);continue}let n=_.chart.CMod?this.renderer.getYPosFromSecond(i.second):this.renderer.getYPosFromBeat(i.beat),a=n;switch(i.type){case"STOPS":case"DELAYS":{_.chart.CMod&&i.value>0?a=this.renderer.getYPosFromSecond(i.second+i.value):i.value<0&&(a=this.renderer.getYPosFromBeat(this.renderer.chart.getBeatFromSeconds(i.second+1e-4)));break}case"FAKES":{a=this.renderer.getYPosFromBeat(i.beat+i.value);break}case"WARPS":{_.chart.CMod||(a=this.renderer.getYPosFromBeat(i.beat+i.value));break}}a0)||e.type=="WARPS"&&_.chart.CMod?!1:e.beat<=i}}class Bh{static active=!1;static popup;static clickOutside;static moveInterval;static exitTimeout;static draggedElement;static dragOffsetX=0;static dragOffsetY=0;static grid;static leftovers;static boundaryCache=[];static open(){this.active||(this.popup=this.build(),document.getElementById("popups")?.appendChild(this.popup),this.clickOutside=e=>{!this.popup?.contains(e.target)&&!this.draggedElement?.contains(e.target)&&!document.getElementById("toggle-tracks")?.contains(e.target)&&this.close()},setTimeout(()=>window.addEventListener("click",this.clickOutside,!0)),this.popup.style.transitionDuration="0s",setTimeout(()=>this.movePosition()),clearTimeout(this.exitTimeout),this.moveInterval=setInterval(()=>this.movePosition(),150),this.active=!0)}static build(){const e=document.createElement("div");e.classList.add("popup"),e.id="timing-track-order";const t=document.createElement("div");t.classList.add("popup-zoomer"),e.appendChild(t);const i=document.createElement("div");i.classList.add("container"),t.appendChild(i);const s=document.createElement("div");s.classList.add("track-grid-options");const n=document.createElement("button");n.classList.add("delete"),n.innerText="Reset",n.onclick=()=>{_.chart.timingEventOrder=structuredClone(Ko.chart.timingEventOrder),this.clearBoundaries(),this.grid?.replaceChildren(),this.leftovers?.replaceChildren();const l=[...ur];for(const d of _.chart.timingEventOrder.left){const h=this.makeDraggableTrack(d);h.classList.add("left"),this.grid?.appendChild(h),l.splice(l.indexOf(d),1)}const c=document.createElement("div");c.classList.add("draggable-track"),c.innerText="PLAYFIELD",c.style.backgroundColor="#2D2D2D",c.style.padding="20px 10px",c.style.writingMode="horizontal-tb",c.addEventListener("mousedown",d=>this.startDragging(d,c)),c.dataset.type="PLAYFIELD",this.grid?.appendChild(c);for(const d of _.chart.timingEventOrder.right){const h=this.makeDraggableTrack(d);h.classList.add("right"),this.grid?.appendChild(h),l.splice(l.indexOf(d),1)}for(const d of l)this.leftovers?.appendChild(this.makeLeftoverTrack(d))},this.grid=document.createElement("div"),this.grid.classList.add("track-grid"),i.appendChild(this.grid),i.appendChild(s);const a=[...ur];for(const l of _.chart.timingEventOrder.left){const c=this.makeDraggableTrack(l);c.classList.add("left"),this.grid.appendChild(c),a.splice(a.indexOf(l),1)}const o=document.createElement("div");o.classList.add("draggable-track"),o.innerText="PLAYFIELD",o.style.backgroundColor="#2D2D2D",o.style.padding="20px 10px",o.style.writingMode="horizontal-tb",o.addEventListener("mousedown",l=>this.startDragging(l,o)),o.dataset.type="PLAYFIELD",this.grid.appendChild(o);for(const l of _.chart.timingEventOrder.right){const c=this.makeDraggableTrack(l);c.classList.add("right"),this.grid.appendChild(c),a.splice(a.indexOf(l),1)}this.leftovers=document.createElement("div"),this.leftovers.classList.add("track-selector"),s.appendChild(this.leftovers),s.appendChild(n);for(const l of a)this.leftovers.appendChild(this.makeLeftoverTrack(l));return e}static makeDraggableTrack(e){const t=document.createElement("div");t.classList.add("draggable-track");const i=document.createElement("div");i.classList.add("draggable-track-text"),i.innerText=e,t.style.backgroundColor=Gc(Hr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(i);let s=!0;const n=Ae.getIcon("TRASH",16);return n.addEventListener("click",()=>{if(!s)return;s=!1,this.deleteTrack(e),t.classList.add("exiting"),setTimeout(()=>t.remove(),400);const a=this.makeLeftoverTrack(e);a.classList.add("entering"),setTimeout(()=>a.classList.remove("entering"),400),this.leftovers?.appendChild(a),this.clearBoundaries()}),t.appendChild(n),t.addEventListener("mousedown",a=>{s&&(n.contains(a.target)||this.startDragging(a,t))}),t.dataset.type=e,t}static makeLeftoverTrack(e){const t=document.createElement("div");t.classList.add("leftover-track");const i=Ae.getIcon("PLUS",8);t.append(i);const s=document.createElement("div");s.classList.add("leftover-track-text"),s.innerText=e,t.style.backgroundColor=Gc(Hr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(s);let n=0,a=0,o=!1,l=!1;return t.addEventListener("mousedown",()=>{o=!0}),t.addEventListener("mousemove",c=>{if(!(!o||l)&&(n+=c.movementX,a+=c.movementY,n*n+a*a>15)){l=!0;const d=this.makeDraggableTrack(e);this.grid?.appendChild(d),this.clearBoundaries();const h=t.getBoundingClientRect(),u=this.getClosestSlot(h.left),p=_.chart.timingEventOrder.left.concat(["PLAYFIELD"],_.chart.timingEventOrder.right);p.splice(u,0,e),this.saveOptions(p),p.forEach(f=>{const m=this.grid?.querySelector(`div[data-type=${f}]`);this.grid?.appendChild(m),f!="PLAYFIELD"&&(m?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(f)&&m?.classList.add("left"),_.chart.timingEventOrder.right.includes(f)&&m?.classList.add("right"))}),this.startDragging(c,d,c.clientX,c.clientY),_.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove()}}),t.addEventListener("mouseup",()=>{if(!o||l)return;l=!0,_.chart.timingEventOrder.right.push(e),_.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove();const c=this.makeDraggableTrack(e);c.classList.add("entering"),c.classList.add("right"),setTimeout(()=>c.classList.remove("entering"),400),this.grid?.appendChild(c),this.clearBoundaries()}),t}static startDragging(e,t,i,s){if(!this.popup)return;this.draggedElement=t.cloneNode(!0),this.draggedElement.style.position="fixed";const n=t.getBoundingClientRect(),a=this.popup.getBoundingClientRect();!i||!s?(this.dragOffsetX=e.clientX-n.left,this.dragOffsetY=e.clientY-n.top,this.draggedElement.style.left=n.left-a.left+"px",this.draggedElement.style.top=n.top-a.top+"px"):(this.dragOffsetX=n.width/2,this.dragOffsetY=n.height/4*3,this.draggedElement.style.left=i-n.width/2-a.left+"px",this.draggedElement.style.top=s-n.height/4*3-a.top+"px",this.draggedElement.classList.add("entering")),this.draggedElement.style.boxShadow="6px 6px 6px #222",this.draggedElement.style.transition="none",t.style.opacity="0.03",this.popup.appendChild(this.draggedElement);const o=_.chart.timingEventOrder.left.concat(["PLAYFIELD"],_.chart.timingEventOrder.right),l=t.dataset.type;let c=o.indexOf(l);const d=o.indexOf(l),h=p=>{this.draggedElement.style.left=p.clientX-this.dragOffsetX-a.left+"px",this.draggedElement.style.top=p.clientY-this.dragOffsetY-a.top+"px";let f=this.getClosestSlot(p.clientX-this.dragOffsetX);Math.abs(p.clientY-this.dragOffsetY-a.top-(n.top-a.top))>140&&(f=d),c!=f&&(o.splice(c,1),o.splice(f,0,l),this.saveOptions(o),o.forEach(m=>{const g=this.grid?.querySelector(`div[data-type=${m}]`);this.grid?.appendChild(g),m!="PLAYFIELD"&&(g?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(m)&&g?.classList.add("left"),_.chart.timingEventOrder.right.includes(m)&&g?.classList.add("right"))}),l!="PLAYFIELD"&&(this.draggedElement?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(l)&&this.draggedElement?.classList.add("left"),_.chart.timingEventOrder.right.includes(l)&&this.draggedElement?.classList.add("right")),c=f)};window.addEventListener("mousemove",h);const u=()=>{this.draggedElement?.remove(),this.draggedElement=void 0,window.removeEventListener("mousemove",h),t.style.opacity="",this.clearBoundaries(),window.removeEventListener("mouseup",u)};window.addEventListener("mouseup",u)}static saveOptions(e){const t=e.indexOf("PLAYFIELD");t!=-1&&(_.chart.timingEventOrder.left=e.slice(0,t),_.chart.timingEventOrder.right=e.slice(t+1))}static deleteTrack(e){const t=_.chart.timingEventOrder.left.indexOf(e);t!=-1&&_.chart.timingEventOrder.left.splice(t,1);const i=_.chart.timingEventOrder.right.indexOf(e);i!=-1&&_.chart.timingEventOrder.right.splice(i,1)}static movePosition(){if(!this.popup)return;const e=document.getElementById("toggle-tracks");if(!e)return;this.popup.style.display="";const t=e.getBoundingClientRect(),i=t.left+t.width/2,s=this.popup.clientWidth,n=s/2+15,a=window.innerWidth-s/2-15;this.popup.style.left=`${Be(i,n,a)}px`;const o=t.top+t.height/2;this.popup.style.top=`${t.top+t.height}px`,o+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${t.top-t.height/2}px`),setTimeout(()=>this.popup.style.transitionDuration="",10)}static getClosestSlot(e){this.boundaryCache.length==0&&this.getBoundaries();let t=-1,i=999999,s=999999;for(let n=0;ns)break;s=a}return t}static getBoundaries(){if(this.grid){for(const e of this.grid.children)this.boundaryCache.push([e,e.getBoundingClientRect()]);this.boundaryCache.sort((e,t)=>e[1].left-t[1].left)}}static clearBoundaries(){this.boundaryCache=[]}static close(){!this.popup||!this.active||(window.removeEventListener("click",this.clickOutside,!0),this.popup.classList.add("exiting"),this.exitTimeout=setTimeout(()=>this.popup.remove(),200),this.active=!1,clearInterval(this.moveInterval),this.clearBoundaries())}}class $S extends Aa{view;playbackBar;skipStart;skipEnd;play;playIcon;stopIcon;record;playtest;timeCounter;beatCounter;min;sec;millis;beat;beatDropdown;editBar;editSteps;editTiming;stepsContainer;timingContainer;editChoiceContainer;addTimingEvent;toggleTimingTracks;detectSync;offsetCounter;offset;noteArrows=[];noteArrowMask;lastTime=null;lastBeat=null;lastOffset=null;lastMode=Y.Edit;lastTimingMode=Ne.Off;lastHover=0;lastPlaying=!1;hovering=!1;trackingMovement=!0;idleFrames=0;lastBounds;constructor(e){super(e);const t=document.createElement("div");t.id="status-widget",document.getElementById("view-wrapper")?.appendChild(t),Ie.viewMode&&t.classList.add("collapsed"),this.playbackBar=document.createElement("div"),this.playbackBar.classList.add("playback-bar"),this.editBar=document.createElement("div"),this.editBar.classList.add("edit-bar"),this.skipStart=document.createElement("button"),this.skipStart.tabIndex=-1;const i=Ae.getIcon("SKIP_START",36);this.skipStart.appendChild(i),this.skipStart.onclick=()=>{this.manager.chartManager.setBeat(0),this.skipStart.blur()},Re.createKeybindTooltip(this.skipStart)`Skip to start ${"jumpSongStart"}`,this.skipEnd=document.createElement("button"),this.skipEnd.tabIndex=-1;const s=Ae.getIcon("SKIP_END",36);this.skipEnd.appendChild(s),this.skipEnd.onclick=()=>{this.manager.chartManager.setBeat(this.manager.chartManager.loadedChart.getBeatFromSeconds(this.manager.chartManager.chartAudio.getSongLength())),this.skipEnd.blur()},Re.createKeybindTooltip(this.skipEnd)`Skip to end ${"jumpSongEnd"}`,this.play=document.createElement("button"),this.play.tabIndex=-1;const n=Ae.getIcon("PLAY",40);this.play.appendChild(n),this.playIcon=n;const a=Ae.getIcon("STOP",32);this.play.appendChild(a),this.stopIcon=a,this.stopIcon.style.display="none",this.play.onclick=()=>{(this.manager.chartManager.getMode()==Y.Record||this.manager.chartManager.getMode()==Y.Play)&&this.manager.chartManager.setMode(Y.Edit),this.manager.chartManager.playPause(),this.play.blur()},Re.createKeybindTooltip(this.play)`Play/Pause ${"playback"}`,this.record=document.createElement("button"),this.record.tabIndex=-1;const o=Ae.getIcon("RECORD",36,void 0,"red");this.record.appendChild(o),this.record.onclick=()=>{this.manager.chartManager.setMode(Y.Record),this.record.blur()},Re.createKeybindTooltip(this.record)`Record ${"recordMode"}`,(Ie.viewMode||!Ie.recordMode)&&(this.record.style.display="none"),this.playtest=document.createElement("button"),this.playtest.tabIndex=-1;const l=Ae.getIcon("PLAYTEST",30);this.playtest.appendChild(l),this.playtest.onclick=()=>{this.manager.chartManager.setMode(Y.Play),this.playtest.blur()},Re.createKeybindTooltip(this.playtest)`Playtest ${"playMode"}`,Ie.playMode||(this.playtest.style.display="none");const c=document.createElement("div");c.classList.add("playback-separator"),this.timeCounter=document.createElement("div"),this.timeCounter.classList.add("playback-counter");const d=document.createElement("div");d.style.display="flex",d.classList.add("playback-counter-main");const h=document.createElement("div");h.classList.add("inlineEdit"),h.innerText="00",h.spellcheck=!1,h.contentEditable="true",h.style.maxWidth="27px",h.onkeydown=A=>{A.key=="Enter"&&h.blur(),A.key=="Escape"&&(h.innerText=Math.floor(Math.abs(this.manager.chartManager.getTime())/60).toString().padStart(2,"0"),h.blur())},h.onfocus=()=>setTimeout(()=>this.selectText(h),25),h.onblur=()=>this.updateTime(),h.ondragstart=A=>A.preventDefault();const u=document.createElement("div");u.classList.add("inlineEdit"),u.innerText="00",u.spellcheck=!1,u.contentEditable="true",u.style.maxWidth="18px",u.onkeydown=A=>{A.key=="Enter"&&u.blur(),A.key=="Escape"&&(u.innerText=Math.floor(Math.abs(this.manager.chartManager.getTime())%60).toString().padStart(2,"0"),u.blur())},u.onfocus=()=>setTimeout(()=>this.selectText(u),25),u.onblur=()=>this.updateTime(),u.ondragstart=A=>A.preventDefault();const p=document.createElement("div");p.classList.add("inlineEdit"),p.innerText="000",p.spellcheck=!1,p.contentEditable="true",p.style.maxWidth="27px",p.onkeydown=A=>{A.key=="Enter"&&p.blur(),A.key=="Escape"&&(p.innerText=(ae(Math.abs(this.manager.chartManager.getTime())%1,3)*1e3).toString().padStart(3,"0"),p.blur())},p.onfocus=()=>setTimeout(()=>this.selectText(p),25),p.onblur=()=>this.updateTime(),p.ondragstart=A=>A.preventDefault(),this.min=h,this.sec=u,this.millis=p;const f=document.createElement("div");f.classList.add("playback-counter-label"),f.innerText="Time",d.appendChild(h),d.appendChild(document.createTextNode(":")),d.appendChild(u),d.appendChild(document.createTextNode(".")),d.appendChild(p),this.timeCounter.appendChild(d),this.timeCounter.appendChild(f);const m=document.createElement("div");m.classList.add("playback-separator"),this.beatCounter=document.createElement("div"),this.beatCounter.classList.add("playback-counter");const g=document.createElement("div");g.classList.add("playback-counter-main","inlineEdit"),g.innerText="0.000",g.spellcheck=!1,g.contentEditable="true",g.onkeydown=A=>{if(A.key=="Enter"&&g.blur(),A.key=="Escape"){if(this.beatDropdown.value=="Measure"){const S=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.getBeat())??this.manager.chartManager.getBeat()/4;g.innerText=ae(S,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.getBeat(),3).toFixed(3);g.blur()}},g.onfocus=()=>{setTimeout(()=>this.selectText(g),25)},g.onblur=()=>this.updateBeat(),g.ondragstart=A=>A.preventDefault(),this.beat=g,this.beatDropdown=gi.create(["Beat","Measure"],"Beat"),this.beatDropdown.view.querySelector(".dropdown-selected").classList.add("playback-counter-label"),this.beatCounter.appendChild(g),this.beatCounter.appendChild(this.beatDropdown.view),this.beatDropdown.onChange(()=>{if(this.beatDropdown.value=="Measure"){const A=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.getBeat())??this.manager.chartManager.getBeat()/4;g.innerText=ae(A,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.getBeat(),3).toFixed(3)}),this.playbackBar.appendChild(this.skipStart),this.playbackBar.appendChild(this.skipEnd),this.playbackBar.appendChild(this.play),this.playbackBar.appendChild(this.record),this.playbackBar.appendChild(this.playtest),this.playbackBar.appendChild(c),this.playbackBar.appendChild(this.timeCounter),this.playbackBar.appendChild(m),this.playbackBar.appendChild(this.beatCounter),this.editSteps=document.createElement("button"),this.editSteps.tabIndex=-1,this.editSteps.classList.add("edit-fancy-button");const y=Ae.getIcon("FEET",24);y.style.marginBottom="2px",this.editSteps.appendChild(y),this.editSteps.appendChild(document.createTextNode("Edit Steps")),this.editSteps.onclick=()=>{this.manager.chartManager.editTimingMode=Ne.Off,this.editSteps.blur()},this.editSteps.classList.add("active"),this.editTiming=document.createElement("button"),this.editTiming.tabIndex=-1,this.editTiming.classList.add("edit-fancy-button");const w=Ae.getIcon("METRONOME",24);w.style.marginBottom="2px",this.editTiming.appendChild(w),this.editTiming.appendChild(document.createTextNode("Edit Timing")),this.editTiming.onclick=()=>{this.manager.chartManager.editTimingMode=Ne.Edit,this.editTiming.blur()};const b=document.createElement("div");b.classList.add("playback-separator");const v=document.createElement("div");v.classList.add("edit-bar-left"),v.appendChild(this.editSteps),v.appendChild(this.editTiming),v.appendChild(b),this.editBar.appendChild(v),this.editChoiceContainer=document.createElement("div"),this.editChoiceContainer.classList.add("edit-choice-container"),this.stepsContainer=document.createElement("div"),this.stepsContainer.classList.add("edit-steps-container"),this.timingContainer=document.createElement("div"),this.timingContainer.classList.add("edit-timing-container"),this.editChoiceContainer.appendChild(this.stepsContainer),this.editChoiceContainer.appendChild(this.timingContainer),this.addTimingEvent=document.createElement("button"),this.addTimingEvent.tabIndex=-1;const E=Ae.getIcon("ADD_EVENT",32);this.addTimingEvent.appendChild(E),this.addTimingEvent.onclick=()=>{this.manager.chartManager.editTimingMode==Ne.Add?this.manager.chartManager.editTimingMode=Ne.Edit:this.manager.chartManager.editTimingMode=Ne.Add,this.addTimingEvent.blur()},this.timingContainer.appendChild(this.addTimingEvent),Pt(this.addTimingEvent,{content:"Add timing events"}),this.toggleTimingTracks=document.createElement("button"),this.toggleTimingTracks.tabIndex=-1;const C=Ae.getIcon("EYE",32);this.toggleTimingTracks.appendChild(C),this.toggleTimingTracks.onclick=()=>{Bh.active?Bh.close():Bh.open(),this.toggleTimingTracks.blur()},this.toggleTimingTracks.id="toggle-tracks",this.timingContainer.appendChild(this.toggleTimingTracks),Pt(this.toggleTimingTracks,{content:"Toggle timing track visibility"}),this.detectSync=document.createElement("button"),this.detectSync.tabIndex=-1;const I=Ae.getIcon("DETECT_SYNC",32);this.detectSync.appendChild(I),this.detectSync.onclick=()=>{this.manager.app.windowManager.openWindow(new gy(this.manager.app)),this.detectSync.blur()},this.detectSync.id="detect-sync",this.timingContainer.appendChild(this.detectSync),Re.createKeybindTooltip(this.detectSync)`Detect audio sync ${"detectSync"}`;const L=document.createElement("div");L.classList.add("playback-separator"),this.timingContainer.appendChild(L),this.offsetCounter=document.createElement("div"),this.offsetCounter.classList.add("playback-counter");const k=document.createElement("div");k.classList.add("playback-counter-label"),k.innerText="Offset";const N=document.createElement("div");N.classList.add("playback-counter-main","inlineEdit"),N.innerText="0.000",N.spellcheck=!1,N.contentEditable="true",N.onkeydown=A=>{A.key=="Enter"&&N.blur(),A.key=="Escape"&&(N.innerText=ae(this.manager.chartManager.loadedChart?.timingData.getOffset()??0,3).toFixed(3),N.blur())},N.tabIndex=-1,N.onfocus=()=>{setTimeout(()=>this.selectText(N),25)},N.onblur=()=>this.updateOffset(),N.ondragstart=A=>A.preventDefault(),this.offset=N,this.offsetCounter.appendChild(N),this.offsetCounter.appendChild(k),this.timingContainer.appendChild(this.offsetCounter),this.editBar.appendChild(this.editChoiceContainer);const G=document.createElement("div");G.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(G),q.on("resize",()=>{this.trackingMovement=!0,this.idleFrames=5}),q.on("noteskinLoaded",()=>{this.stepsContainer.replaceChildren(),this.noteArrows.forEach(S=>{this.removeChild(S.sprite),this.removeChild(S.bg),this.removeChild(S.highlight)}),this.noteArrows=[];const A=document.createElement("div");if(A.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(A),!!this.manager.chartManager.loadedChart){for(const S of this.manager.chartManager.loadedChart.gameType.editNoteTypes){if(vd.includes(S))continue;const x=this.manager.chartManager.chartView.getNotefield().createNote({type:S,beat:0,col:0,quant:4,second:0,warped:!1,fake:!1});x.scale.set(.5);const D=new Oe(ie.WHITE);et(D,"widget-bg"),D.width=48,D.height=48,D.anchor.set(.5);const $=new jt("noBorder");$.alpha=0,$.width=48,$.height=48,$.pivot.x=24,$.pivot.y=24;const R=document.createElement("button");R.tabIndex=-1,R.style.height="48px",R.style.width="48px",R.classList.add("note-placeholder"),R.onclick=()=>{this.manager.chartManager.setEditingNoteType(S),R.blur()},Re.createKeybindTooltip(R)`${"\\"+S} ${"noteType"+S}`;const O={element:R,sprite:x,type:S,bg:D,highlight:$,hovered:!1};R.onmouseover=()=>{O.hovered=!0},R.onmouseleave=()=>{O.hovered=!1},this.addChild(D),this.addChild(x),this.addChild($);const W=R.getBoundingClientRect();x.position.y=W.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,x.position.x=W.left-this.manager.app.view.clientWidth/2+24,D.position=x.position,this.noteArrows.push(O)}this.stepsContainer.replaceChildren(...this.noteArrows.map(S=>S.element),A),this.trackingMovement=!0,this.idleFrames=5}}),this.noteArrowMask=new Oe(ie.WHITE),this.noteArrowMask.height=48,this.noteArrowMask.width=2500,this.noteArrowMask.anchor.y=1,this.noteArrowMask.anchor.x=.5,this.addChild(this.noteArrowMask),this.mask=this.noteArrowMask,t.onmouseenter=()=>{this.lastHover=Date.now(),this.hovering=!0,this.view.style.opacity="",this.view.style.transition=""},t.onmouseleave=()=>this.hovering=!1,t.appendChild(this.playbackBar),t.appendChild(this.editBar),this.view=t,t.style.display="none"}update(){this.view.style.display=this.manager.chartManager.loadedSM&&Ie.status?"":"none";const e=this.manager.chartManager.getTime();this.lastTime!=e&&(document.activeElement!=this.min&&(this.min.innerText=(e<0?"-":"")+Math.floor(Math.abs(e)/60).toString().padStart(2,"0")),document.activeElement!=this.sec&&(this.sec.innerText=Math.floor(Math.abs(e)%60).toString().padStart(2,"0")),document.activeElement!=this.millis&&(this.millis.innerText=(ae(Math.abs(e)%1,3)*1e3).toString().padStart(3,"0")),this.lastTime=e);const t=this.manager.chartManager.getBeat();if(this.lastBeat!=t){if(document.activeElement!=this.beat)if(this.beatDropdown.value=="Measure"){const h=this.manager.chartManager.loadedChart?.timingData?.getMeasure(t)??t/4;this.beat.innerText=ae(h,3).toFixed(3)}else this.beat.innerText=ae(t,3).toFixed(3);this.lastBeat=t}const i=this.manager.chartManager.loadedChart?.timingData.getOffset()??0;this.lastOffset!=i&&document.activeElement!=this.offset&&(this.offset.innerText=ae(i,3).toFixed(3));const s=this.manager.chartManager.getMode(),n=this.manager.chartManager.editTimingMode;if(this.lastMode!=s){switch(s){case Y.Edit:this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!1,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",this.record.style.background="",this.playtest.style.background="",this.view.style.opacity="",this.view.style.transition="",this.view.classList.remove("collapsed"),this.beatDropdown.disabled=!1;break;case Y.Record:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!1,this.record.style.background="rgba(170, 0, 0, 0.35)",this.playtest.disabled=!0,this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Ne.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case Y.Play:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!0,this.playtest.disabled=!1,this.playtest.style.background="rgba(12, 97, 31, 0.35)",this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Ne.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case Y.View:this.lastHover=Date.now(),this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!0,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",n!=Ne.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0}this.trackingMovement=!0,this.idleFrames=5,this.lastMode=s}if(this.lastTimingMode!=n){switch(n){case Ne.Off:this.visible=!0,this.stepsContainer.style.transform="",this.timingContainer.style.transform="",this.editSteps.classList.add("active"),this.editTiming.classList.remove("active"),this.offset.tabIndex=-1;break;case Ne.Add:this.addTimingEvent.classList.add("active");break;case Ne.Edit:this.addTimingEvent.classList.remove("active"),this.offset.tabIndex=0}(this.lastTimingMode==Ne.Off&&n!=Ne.Off||this.lastTimingMode!=Ne.Off&&n==Ne.Off)&&this.manager.chartManager.clearSelections(),this.trackingMovement=!0,this.idleFrames=5,this.lastTimingMode=n,this.stepsContainer.style.transform=n==Ne.Off?"":"translateY(-48px)",this.timingContainer.style.transform=n==Ne.Off?"":"translateY(-48px)",this.editSteps.classList.toggle("active",n==Ne.Off),this.editTiming.classList.toggle("active",n!=Ne.Off)}const a=this.manager.chartManager.chartAudio.isPlaying();if(this.lastPlaying!=a&&(this.playIcon.style.display=a?"none":"",this.stopIcon.style.display=a?"":"none",this.lastPlaying=a),(s==Y.Play||s==Y.Record)&&this.view.style.opacity==""&&!this.hovering&&Date.now()-this.lastHover>3e3&&(this.view.style.opacity="0.2",this.view.style.transition="2s cubic-bezier(.11,.72,.51,1.14)"),this.trackingMovement){const h=this.noteArrows[0];if(h){const p=h.element.getBoundingClientRect();this.noteArrows.forEach((f,m)=>{f.sprite.position.y=p.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,f.sprite.position.x=p.left-this.manager.app.view.clientWidth/2+24+m*48,f.bg.position=f.sprite.position,f.highlight.position=f.sprite.position}),this.lastBounds&&Math.abs(this.lastBounds.top-p.top)+Math.abs(this.lastBounds.left-p.left)==0&&(this.idleFrames--,this.idleFrames<0&&(this.trackingMovement=!1,this.lastBounds=void 0,n!=Ne.Off&&(this.visible=!1))),this.lastBounds=p}const u=this.view.getBoundingClientRect();this.noteArrowMask.y=u.bottom-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top}const o=this.manager.chartManager.getEditingNoteType(),l=Qe.getColor("editable-overlay-hover"),c=Qe.getColor("editable-overlay-active"),d=new B(l).setAlpha(0);this.noteArrows.forEach(h=>{let u=o==h.type?c:h.hovered?l:d;_.general.smoothAnimations&&(u=new B(RS(new B(h.highlight.tint).setAlpha(h.highlight.alpha),u,.3))),h.highlight.tint=u.toNumber(),h.highlight.alpha=u.alpha})}selectText(e){const t=window.getSelection(),i=document.createRange();!t||!i||(i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i))}updateTime(){this.millis.innerText=this.millis.innerText.padEnd(3,"0").slice(0,3);const e=this.parseString(this.min),t=this.parseString(this.sec),i=this.parseString(this.millis);if(e===null||t===null||i===null){this.lastTime=null;return}let s=e*60+t+i/1e3;s>9999999&&(s=9999999),s<0&&(s=0),this.manager.chartManager.setTime(s),this.lastTime=null}updateBeat(){let e=this.parseString(this.beat);if(e===null){this.lastBeat=null;return}this.beatDropdown.value=="Measure"&&(e=this.manager.chartManager.loadedChart?.timingData?.getBeatFromMeasure(e)??e*4),e>9999999&&(e=9999999),e<0&&(e=0),this.manager.chartManager.setBeat(e),this.lastBeat=null}updateOffset(){let e=this.parseString(this.offset);if(e===null){this.lastOffset=null;return}e>9999999&&(e=9999999),e<-9999999&&(e=-9999999),this.lastOffset=null,!(!this.manager.chartManager.loadedChart||!this.manager.chartManager.loadedSM)&&((this.manager.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.chartManager.loadedChart.timingData:this.manager.chartManager.loadedSM.timingData).setOffset(e),this.manager.chartManager.setBeat(this.manager.chartManager.getBeat()))}parseString(e){try{const t=br.evaluate(e.innerText);return isFinite(t)?t:0}catch{return null}}}class XS extends Ee{app;chartManager;children=[];constructor(e){super(),this.app=e.app,this.chartManager=e,this.addChild(new VS(this)),this.addChild(new WS(this)),this.addChild(new $S(this)),this.addChild(new ma(this)),this.addChild(new US(this)),this.addChild(new zS(this)),this.zIndex=2}update(){this.x=this.app.renderer.screen.width/2,this.y=this.app.renderer.screen.height/2,this.children.forEach(e=>e.update())}startPlay(){this.children.forEach(e=>e.startPlay())}endPlay(){this.children.forEach(e=>e.endPlay())}}const Wc=Array(85).fill(void 0).map((r,e)=>33+e),_y=[];for(const r of Wc)for(const e of Wc)_y.push([r,e]);const zc="<~".split("").map(r=>r.charCodeAt(0)),jc="~>".split("").map(r=>r.charCodeAt(0));function YS(r,e,t,i=!1,s=!1,n=!1){let a;typeof r=="string"?a=r.split("").map(h=>h.charCodeAt(0)):a=[...new Uint8Array(r)];const o=4-a.length%4;for(let h=0;ho.charCodeAt(0)):i=[...new Uint8Array(r)],e){if(i.at(-1)!=jc.at(-1)||i.at(-2)!=jc.at(-2))return!1;i.at(0)==zc.at(0)&&i.at(1)==zc.at(1)?i=i.slice(2,-2):i=i.slice(void 0,-2)}for(let o=0;o<4;o++)i.push("u".charCodeAt(0));let s=[],n=[];for(const o of i)if(o>=33&&117>=o){if(n.push(o),n.length==5){let l=0;for(const c of n)l=85*l+(c-33);if(l>2**32-1)return!1;s.push(l>>24&255),s.push(l>>16&255),s.push(l>>8&255),s.push(l&255),n=[]}}else if(o==122){if(n.length!=0)return!1;s.push(0),s.push(0),s.push(0),s.push(0)}else if(o==121){if(n.length!=0)return!1;s.push(32),s.push(32),s.push(32),s.push(32)}else if(!t.includes(String.fromCharCode(o)))return!1;const a=4-n.length;return a&&(s=s.slice(void 0,-a)),s}function hi(r){let e=0,t=0,i=129;for(;i&128;){const s=r.shift();if(!s)break;e=e|(s&127)<<7*t++,i=s}return e}function ci(r){const e=[];let t=!1;for(;!t;){let i=r&127;r=r>>7,t=r==0,t||(i=i|128),e.push(i)}return e}const qS=["Hold","Mine","Roll","Lift","Fake"];function KS(r){if(r.startsWith("ArrowVortex:notes:")){const e=Od(r.slice(18));if(e!==!1){const t=Array.from(e);if(t.shift()!=0)return;const i=hi(t),s=[];for(let n=0;n4)continue;const h=qS[d];if(l==c){if(h=="Hold"||h=="Roll")continue;s.push({type:h,beat:l/48,col:o})}else{if(h=="Mine"||h=="Fake"||h=="Lift")continue;s.push({type:h,beat:l/48,hold:(c-l)/48,col:o})}}else s.push({type:"Tap",beat:hi(t)/48,col:o})}return s}}}function ZS(r){const e=[0];e.push(...ci(r.length));for(const t of r)if(t.type=="Tap"){const i=Math.round(t.beat*48);e.push(t.col),e.push(...ci(i))}else{e.push(t.col+128);const i=Math.round(t.beat*48);let s=0;Le(t)&&(s=t.hold);const n=Math.round(s*48)+i;e.push(...ci(i)),e.push(...ci(n)),e.push(["Hold","Mine","Roll","Lift","Fake"].indexOf(t.type))}return"ArrowVortex:notes:"+Dd(e).map(t=>String.fromCharCode(t)).join("")}const Al=["BPMS","STOPS","DELAYS","WARPS","TIMESIGNATURES","TICKCOUNTS","COMBOS","SPEEDS","SCROLLS","FAKES","LABELS","ATTACKS","BGCHANGES","FGCHANGES"];function xr(r){const e=new ArrayBuffer(4);return new DataView(e).setUint32(0,r,!0),Array.from(new Uint8Array(e))}function Tr(r){const e=new Uint8Array(r.splice(0,4));return new DataView(e.buffer).getUint32(0,!0)}function Rr(r){const e=new ArrayBuffer(8);return new DataView(e).setFloat64(0,r,!0),Array.from(new Uint8Array(e))}function Lr(r){const e=new Uint8Array(r.splice(0,8)),t=new DataView(e.buffer);return ae(t.getFloat64(0,!0),3)}function JS(r){return[r.length,...r.split("").map(e=>e.charCodeAt(0))]}function QS(r){const e=r.shift();if(!e)return"";let t="";for(let i=0;ie.charCodeAt(0)))}function Ar(r){const e=hi(r);if(!e)return"";let t="";for(let i=0;i{if(e.type=="ATTACKS"||e.type=="BGCHANGES"||e.type=="FGCHANGES")return!0;const t=Math.round(e.beat*48)/48;if(Math.abs(t-e.beat)>5e-4)return!0;if(e.type=="FAKES"||e.type=="WARPS"){const i=Math.round(e.value*48)/48;if(Math.abs(i-e.value)>5e-4)return!0}return e.type=="LABELS"&&e.value.length>255||e.type=="TIMESIGNATURES"&&(e.upper>2**32-1||e.lower>2**32-1)||e.type=="COMBOS"&&(e.hitMult>2**32-1||e.missMult>2**32-1)?!0:e.type=="TICKCOUNTS"&&e.value>2**32-1})?iC(r):tC(r)}function tC(r){const e=[],t=new Map;r.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type)?.push(i)});for(const[i,s]of t.entries())if(!(i=="ATTACKS"||i=="BGCHANGES"||i=="FGCHANGES")){e.push(s.length),e.push(Al.indexOf(i));for(const n of s)switch(e.push(...xr(Math.round(n.beat*48))),n.type){case"BPMS":case"STOPS":case"DELAYS":case"SCROLLS":e.push(...Rr(n.value));break;case"FAKES":case"WARPS":e.push(...xr(Math.round(n.value*48)));break;case"TIMESIGNATURES":e.push(...xr(Math.round(n.upper))),e.push(...xr(Math.round(n.lower)));break;case"COMBOS":e.push(...xr(Math.round(n.hitMult))),e.push(...xr(Math.round(n.missMult)));break;case"TICKCOUNTS":e.push(...xr(Math.round(n.value)));break;case"SPEEDS":e.push(...Rr(n.value)),e.push(...Rr(n.delay)),e.push(...xr(n.unit=="B"?0:1));break;case"LABELS":e.push(...JS(n.value))}}return e.push(0),"ArrowVortex:tempo:"+Dd(e).map(i=>String.fromCharCode(i)).join("")}function iC(r){const e=[],t=new Map;r.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type)?.push(i)});for(const[i,s]of t.entries()){e.push(...ci(s.length)),e.push(Al.indexOf(i));for(const n of s)switch(e.push(...ci(Math.round((n.type=="ATTACKS"?n.second:n.beat)*1e3))),n.type){case"BPMS":case"STOPS":case"DELAYS":case"SCROLLS":case"FAKES":case"WARPS":e.push(...Rr(n.value));break;case"TIMESIGNATURES":e.push(...ci(Math.round(n.upper))),e.push(...ci(Math.round(n.lower)));break;case"COMBOS":e.push(...ci(Math.round(n.hitMult))),e.push(...ci(Math.round(n.missMult)));break;case"TICKCOUNTS":e.push(...ci(Math.round(n.value)));break;case"SPEEDS":e.push(...Rr(n.value)),e.push(...Rr(n.delay)),e.push(n.unit=="B"?0:1);break;case"LABELS":e.push(...Er(n.value));break;case"ATTACKS":e.push(...Rr(n.value)),e.push(n.endType=="LEN"?0:1),e.push(...Er(n.mods));break;case"BGCHANGES":case"FGCHANGES":e.push((n.crossFade?1:0)+((n.stretchRewind?1:0)<<1)+((n.stretchNoLoop?1:0)<<2)),e.push(...Er(n.file)),e.push(...Rr(n.updateRate)),e.push(...Er(n.effect)),e.push(...Er(n.file2)),e.push(...Er(n.transition)),e.push(...Er(n.color1)),e.push(...Er(n.color2))}}return"SMEditor:tempo:"+Dd(e).map(i=>String.fromCharCode(i)).join("")}function rC(r){if(r.startsWith("SMEditor:tempo:"))return nC(r);if(r.startsWith("ArrowVortex:tempo:"))return sC(r)}function sC(r){if(!r.startsWith("ArrowVortex:tempo:"))return;const e=Od(r.slice(18)),t=[];if(e===!1)return;const i=Array.from(e);try{for(;;){const s=i.shift();if(s===void 0)return;if(s==0)break;const n=i.shift();if(n===void 0)return;const a=Al[n];for(let o=0;o0,stretchRewind:(c&2)>0,stretchNoLoop:(c&4)>0,effect:Ar(i),file2:Ar(i),transition:Ar(i),color1:Ar(i),color2:Ar(i)})}}}}}catch{return}return t}const aC={"dance-single":[{x:-1,y:0},{x:0,y:-1},{x:0,y:1},{x:1,y:0}]},ut={DOUBLESTEP:850,BRACKETJACK:20,JACK:30,JUMP:30,BRACKETTAP:400,HOLDSWITCH:20,MINE:1e4,FOOTSWITCH:5e3,MISSED_FOOTSWITCH:500,FACING:2,DISTANCE:6,SPIN:1e3,SIDESWITCH:130},wf=[1,2,3,4],oC="LlRr";class lC{id=0;neighbors=new Map;state;constructor(e,t){this.state=e,this.id=t}}class hC{nodes=[];states=[];startNode=0;endNode=0;stateNodeMap=new Map;addOrGetExistingNode(e){this.stateNodeMap.get(e.rowIndex)==null&&this.stateNodeMap.set(e.rowIndex,new Map);for(const[n,a]of this.stateNodeMap.get(e.rowIndex))if(dC(e,this.states[n]))return this.nodes[a];const t=this.states.length,i=this.nodes.length;this.states.push(e);const s=new lC(e,i);return this.nodes.push(s),this.stateNodeMap.get(e.rowIndex)?.set(t,i),s}addEdge(e,t,i){e.neighbors.set(t.id,i)}}class cC{app;permuteCache=new Map;layout;constructor(e,t){this.app=e,this.layout=aC[t]}help(){console.log(`Currently only compatible with dance-single. Available commands: analyze(): analyze the current chart -clear(): clear parity highlights`)}getActionCost(e,t,i,s){const n=i[s],a=t.second-e.second;let o=0;const l=new Array(t.columns.length).fill(0);for(let O=0;OO!=0))for(const O of t.movedFeet)switch(O){case 1:case 2:e.columns.includes(3)||e.columns.includes(4)||(o+=500);break;case 3:case 4:e.columns.includes(1)||e.columns.includes(4)||(o+=500);break}const p=t.movedFeet.has(1)||t.movedFeet.has(2),f=t.movedFeet.has(3)||t.movedFeet.has(4),m=(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4));let g=!1,y=!1;if(m||(c!=-1&&p&&(e.columns[c]==1&&!t.holdFeet.has(1)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0),e.columns[d]==2&&!t.holdFeet.has(2)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0)),h!=-1&&f&&(e.columns[h]==3&&!t.holdFeet.has(3)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(y=!0),e.columns[u]==4&&!t.holdFeet.has(4)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(y=!0))),p!=f&&(p||f)&&t.holdFeet.size==0&&!m){let O=!1;p&&!g&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(O=!0),f&&!y&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(O=!0);const W=i[s-1];if(W!==void 0)for(const V of W.holds){if(V===void 0)continue;const F=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(n.second),U=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(W.second);V.beat+V.hold>U&&V.beat+V.hold=F&&(O=!1)}O&&(o+=ut.DOUBLESTEP),g&&t.movedFeet.has(1)&&t.movedFeet.has(2)&&(o+=ut.BRACKETJACK),y&&t.movedFeet.has(3)&&t.movedFeet.has(4)&&(o+=ut.BRACKETJACK)}p&&f&&n.notes.filter(O=>O!==void 0).length>=2&&(o+=ut.JUMP/a);let w=-1,b=-1,v=-1,E=-1;for(let O=0;O0&&(o+=N*ut.FACING),G>0&&(o+=G*ut.FACING),A>0&&(o+=A*ut.FACING),S>0&&(o+=S*ut.FACING);const x=this.averagePoint(e.columns.indexOf(1),e.columns.indexOf(2)),D=this.averagePoint(e.columns.indexOf(3),e.columns.indexOf(4)),$=this.averagePoint(w,b),R=this.averagePoint(v,E);if(R.x<$.x&&D.xx.y&&(o+=ut.SPIN),R.x<$.x&&D.x$.y&&D.y=.25&&!n.mines.some(O=>O!==void 0)&&!n.fakeMines.some(O=>O!==void 0)){const O=a-.25;for(let W=0;WO!==void 0)||n.fakeMines.some(O=>O!==void 0))&&(o+=ut.MISSED_FOOTSWITCH),a<=.15&&p!=f){const O=.15-a;(g||y)&&(o+=(1/O-1/.15)*ut.JACK)}for(const O of t.movedFeet){const W=e.columns.indexOf(O);W!=-1&&(o+=Math.sqrt(this.getDistanceSq(this.layout[W],this.layout[t.columns.indexOf(O)]))*ut.DISTANCE/a)}return t.columns=l,o}calculatePermuteColumnKey(e){let t=0;for(let i=0;i<4;i++)(e.notes[i]!==void 0||e.holds[i]!==void 0)&&(t+=Math.pow(2,i));return t}getPermuteColumns(e){const t=this.calculatePermuteColumnKey(e);let i=this.permuteCache.get(t);return i==null&&(i=this.permuteColumn(e,new Array(4).fill(0),0),this.permuteCache.set(t,i)),this.permuteCache.get(t)}permuteColumn(e,t,i){if(i>=t.length){let n=-1,a=-1,o=-1,l=-1;for(let c=0;c0?d.fake||d.warped?l[d.col]=d.second:o[d.col]=d.second:d.fake||d.warped?a[d.col]=d.second:n[d.col]=d.second;continue}d.fake||d.warped||(i!=d.second&&(i!=null&&c.push({notes:s,holds:t.map(h=>{if(!(h===void 0||h.second>=i))return h}),holdTails:new Set(t.filter(h=>!(h===void 0||Math.abs(h.beat+h.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(h=>h.col)),mines:o,fakeMines:l,second:i}),i=d.second,s=[],o=n,l=a,n=[],a=[],t=t.map(h=>{if(!(h===void 0||d.beat>h.beat+h.hold))return h})),s[d.col]=d,Le(d)&&(t[d.col]=d))}return c.push({notes:s,holds:t.map(d=>{if(!(d===void 0||d.second>=i))return d}),holdTails:new Set(t.filter(d=>!(d===void 0||Math.abs(d.beat+d.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(d=>d.col)),mines:o,fakeMines:l,second:i}),c}analyze(){const e=this.app.chartManager.loadedChart?.getNotedata();if(!e)return[];const t=this.createRows(e),i=this.buildStateGraph(t);this.analyzeGraph(t,i)}analyzeGraph(e,t){const i=this.computeCheapestPath(t);for(let s=0;s0;){const d=n.shift(),h=t.addOrGetExistingNode(d),u=this.getPermuteColumns(e[l]);for(const p of u){const f=this.initResultState(d,e[l],l,p),m=this.getActionCost(d,f,e,l),g=t.addOrGetExistingNode(f);t.addEdge(h,g,m),c.add(g.id)}}for(const d of c)n.push(t.nodes[d].state)}const a={rowIndex:e.length,second:e[e.length-1].second+1,columns:[],movedFeet:new Set,holdFeet:new Set},o=t.addOrGetExistingNode(a);for(t.endNode=o.id;n.length>0;){const l=n.shift(),c=t.addOrGetExistingNode(l);t.addEdge(c,o,0)}return t}initResultState(e,t,i,s){const n={rowIndex:i,second:t.second,columns:s,movedFeet:new Set,holdFeet:new Set};for(let a=0;a<4;a++)s[a]!=null&&((t.holds[a]==null||e.columns[a]!=s[a])&&n.movedFeet.add(s[a]),t.holds[a]!=null&&n.holdFeet.add(s[a]));return n}computeCheapestPath(e){const t=e.startNode,i=e.endNode,s=[],n=Array(e.nodes.length).fill(Number.MAX_VALUE),a=Array(e.nodes.length).fill(-1);n[t]=0;for(let l=0;l<=i;l++){const c=e.nodes[l];for(const[d,h]of c.neighbors)n[l]+ht.parity=void 0)}}function dC(r,e){return!(r.second!==e.second||r.rowIndex!==e.rowIndex||!uC(r.columns,e.columns)||!_f(r.movedFeet,e.movedFeet)||!_f(r.holdFeet,e.holdFeet))}function uC(r,e){if(r.length!==e.length)return!1;for(let t=0;tthis.fitContextMenu(t)),this.menuElement.classList.add("entering"),clearTimeout(this.closeTimeout),setTimeout(()=>this.menuElement?.classList.remove("entering"),300),this.menuElement.style.left=t.clientX+"px",this.menuElement.style.top=t.clientY+"px")}static fitContextMenu(e){this.menuElement.style.display="";const t=this.menuElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-20,s=window.innerWidth-t.right-20;i<0&&(this.menuElement.style.top=e.clientY+i+"px"),s<0&&(this.menuElement.style.left=e.clientX+s+"px"),this.menuElement.style.transformOrigin=`${Math.max(0,-s)}px ${Math.max(0,-i)}px`}static close(){this.menuElement&&(this.menuElement.classList.add("exiting"),this.closeTimeout=setTimeout(()=>this.menuElement.replaceChildren(),300))}static buildMenu(e){const t=document.createElement("div");if(t.appendChild(this.createElement(e,{type:"selection",id:"cut"})),t.appendChild(this.createElement(e,{type:"selection",id:"copy"})),t.appendChild(this.createElement(e,{type:"selection",id:"paste"})),t.appendChild(this.createElement(e,{type:"selection",id:"pasteReplace"})),e.chartManager.getMode()==X.Edit&&e.chartManager.hasNoteSelection()){const i=document.createElement("div");i.classList.add("separator"),t.appendChild(i),$n.selection.options.slice(0,-4).forEach(s=>{t.appendChild(this.createElement(e,s))})}this.menuElement=t,t.id="context-menu",document.getElementById("context-menu")?.replaceWith(this.menuElement)}static createElement(e,t){if(t.type=="separator"){const i=document.createElement("div");return i.classList.add("separator"),i}if(t.type=="selection"||t.type=="checkbox"||t.type=="dropdown"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");let a;if(t.type=="selection"||t.type=="checkbox"){const o=Tt[t.id];a=document.createElement("div"),a.innerText=Re.getKeybindString(t.id),a.classList.add("keybind","unselectable"),n.innerText=o?.label??t.id;let l=o?.disabled??!0;typeof l=="function"&&(l=l(e)),l&&i.classList.add("disabled"),i.addEventListener("click",()=>{l||(o?.callback(e),this.close())})}else a=Ae.getIcon("CHEVRON",16),a.style.transform="rotate(-90deg)",n.innerText=typeof t.title=="function"?t.title(e):t.title;if(s.appendChild(n),s.appendChild(a),i.appendChild(s),i.classList.add("menu-item"),s.classList.add("menu-item-title","menu-hover"),n.classList.add("title","unselectable"),t.type=="dropdown"){const o=document.createElement("div");i.appendChild(o),o.classList.add("menubar-dropdown"),t.options.map(l=>this.createElement(e,l)).forEach(l=>o.appendChild(l))}if(t.type=="checkbox"){let o=t.checked;typeof o=="function"&&(o=o(e)),o&&(n.innerText="✓ "+n.innerText)}return i}if(t.type=="menu"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");return i.appendChild(s),s.innerText=t.title,i.appendChild(n),s.classList.add("title","unselectable"),i.classList.add("menu-item","menu-main"),s.classList.add("menu-hover"),n.classList.add("menubar-dropdown","unselectable"),i.onmouseenter=()=>{n.replaceChildren(...t.options.map(a=>this.createElement(e,a)))},i.onmouseleave=()=>{n.replaceChildren()},i}return document.createElement("div")}}const fC={fontName:"Main",fontSize:20,fill:["#ffffff"]};class mC extends Ee{renderer;barlineMap=new Map;barlineLabelMap=new Map;barlinePool=new ga({create:()=>{const e=new Oe(ie.WHITE);return et(e,"text-color"),e}});barlineLabelPool=new ga({create:()=>{const e=new De("",fC);return et(e,"text-color"),e}});constructor(e){super(),this.renderer=e;const t=()=>{this.barlineMap.clear(),this.barlineLabelMap.clear(),this.barlinePool.destroyAll(),this.barlineLabelPool.destroyAll()};K.on("timeSigChanged",t),this.on("destroyed",()=>K.off("timeSigChanged",t)),this.addChild(this.barlinePool,this.barlineLabelPool)}update(e,t){this.visible=this.renderer.shouldDisplayBarlines();for(const[i,s]of this.getBarlineBeats(e,t)){if(!this.barlineMap.has(i)){const n=this.barlinePool.createChild();if(!n)continue;Object.assign(n,{width:this.renderer.chart.gameType.notefieldWidth+128,height:s?4:1,visible:!0}),n.anchor.set(.5),this.barlineMap.set(i,n)}if(s&&!this.barlineLabelMap.has(i)){const n=this.barlineLabelPool.createChild();if(!n)continue;Object.assign(n,{x:(this.renderer.chart.gameType.notefieldWidth+128)/-2-16,text:`${Math.round(this.renderer.chart.timingData.getMeasure(i))}`,visible:!0}),n.anchor.set(1,.5),this.barlineLabelMap.set(i,n)}}for(const[i,s]of this.barlineMap.entries()){if(it){this.barlineMap.delete(i),this.barlinePool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}for(const[i,s]of this.barlineLabelMap.entries()){if(it){this.barlineLabelMap.delete(i),this.barlineLabelPool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}}*getBarlineBeats(e,t){e=Math.max(0,e);const i=this.renderer.chart.timingData,s=i.getTimingData("TIMESIGNATURES");let n=i.getEventAtBeat("TIMESIGNATURES",e),a=n?s.findIndex(u=>u.beat==n.beat):-1,o=i.getDivisionLength(e);const l=i.getDivisionOfMeasure(e)%1*o;let c=Math.max(0,e-l);c=s[a+1]?.beat&&(a++,n=s[a],c=n.beat,o=i.getDivisionLength(c),d=0,h=n.upper)}}class gC extends Ee{previewArea=new Oe(ie.WHITE);previewText=new De("SONG PREVIEW",{fontName:"Main",fontSize:13});renderer;constructor(e){super(),this.renderer=e,Object.assign(this.previewArea,{alpha:.2,tint:11052482,width:this.renderer.chart.gameType.notefieldWidth+96,height:64}),this.previewText.x=-this.previewArea.width/2+5,this.previewArea.anchor.x=.5,et(this.previewText,"text-color"),this.addChild(this.previewArea,this.previewText)}update(e,t){const i=Number(this.renderer.chart.sm.properties.SAMPLESTART),s=Number(this.renderer.chart.sm.properties.SAMPLELENGTH);if(Number.isNaN(i)||Number.isNaN(s)||!this.renderer.shouldDisplayBarlines()||this.renderer.chart.timingData.getBeatFromSeconds(i+s)t){this.visible=!1;return}this.visible=!0;let n=this.renderer.getYPosFromSecond(i),a=this.renderer.getYPosFromSecond(i+s);a=0){l.visible=!1;continue}if(Math.abs(e[n].beat-t)>20&&Math.abs(e[n+1].beat-t)>20&&!(t>e[n].beat&&tO!=0))for(const O of t.movedFeet)switch(O){case 1:case 2:e.columns.includes(3)||e.columns.includes(4)||(o+=500);break;case 3:case 4:e.columns.includes(1)||e.columns.includes(4)||(o+=500);break}const p=t.movedFeet.has(1)||t.movedFeet.has(2),f=t.movedFeet.has(3)||t.movedFeet.has(4),m=(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4));let g=!1,y=!1;if(m||(c!=-1&&p&&(e.columns[c]==1&&!t.holdFeet.has(1)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0),e.columns[d]==2&&!t.holdFeet.has(2)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0)),h!=-1&&f&&(e.columns[h]==3&&!t.holdFeet.has(3)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(y=!0),e.columns[u]==4&&!t.holdFeet.has(4)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(y=!0))),p!=f&&(p||f)&&t.holdFeet.size==0&&!m){let O=!1;p&&!g&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(O=!0),f&&!y&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(O=!0);const W=i[s-1];if(W!==void 0)for(const V of W.holds){if(V===void 0)continue;const F=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(n.second),U=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(W.second);V.beat+V.hold>U&&V.beat+V.hold=F&&(O=!1)}O&&(o+=ut.DOUBLESTEP),g&&t.movedFeet.has(1)&&t.movedFeet.has(2)&&(o+=ut.BRACKETJACK),y&&t.movedFeet.has(3)&&t.movedFeet.has(4)&&(o+=ut.BRACKETJACK)}p&&f&&n.notes.filter(O=>O!==void 0).length>=2&&(o+=ut.JUMP/a);let w=-1,b=-1,v=-1,E=-1;for(let O=0;O0&&(o+=N*ut.FACING),G>0&&(o+=G*ut.FACING),A>0&&(o+=A*ut.FACING),S>0&&(o+=S*ut.FACING);const x=this.averagePoint(e.columns.indexOf(1),e.columns.indexOf(2)),D=this.averagePoint(e.columns.indexOf(3),e.columns.indexOf(4)),$=this.averagePoint(w,b),R=this.averagePoint(v,E);if(R.x<$.x&&D.xx.y&&(o+=ut.SPIN),R.x<$.x&&D.x$.y&&D.y=.25&&!n.mines.some(O=>O!==void 0)&&!n.fakeMines.some(O=>O!==void 0)){const O=a-.25;for(let W=0;WO!==void 0)||n.fakeMines.some(O=>O!==void 0))&&(o+=ut.MISSED_FOOTSWITCH),a<=.15&&p!=f){const O=.15-a;(g||y)&&(o+=(1/O-1/.15)*ut.JACK)}for(const O of t.movedFeet){const W=e.columns.indexOf(O);W!=-1&&(o+=Math.sqrt(this.getDistanceSq(this.layout[W],this.layout[t.columns.indexOf(O)]))*ut.DISTANCE/a)}return t.columns=l,o}calculatePermuteColumnKey(e){let t=0;for(let i=0;i<4;i++)(e.notes[i]!==void 0||e.holds[i]!==void 0)&&(t+=Math.pow(2,i));return t}getPermuteColumns(e){const t=this.calculatePermuteColumnKey(e);let i=this.permuteCache.get(t);return i==null&&(i=this.permuteColumn(e,new Array(4).fill(0),0),this.permuteCache.set(t,i)),this.permuteCache.get(t)}permuteColumn(e,t,i){if(i>=t.length){let n=-1,a=-1,o=-1,l=-1;for(let c=0;c0?d.fake||d.warped?l[d.col]=d.second:o[d.col]=d.second:d.fake||d.warped?a[d.col]=d.second:n[d.col]=d.second;continue}d.fake||d.warped||(i!=d.second&&(i!=null&&c.push({notes:s,holds:t.map(h=>{if(!(h===void 0||h.second>=i))return h}),holdTails:new Set(t.filter(h=>!(h===void 0||Math.abs(h.beat+h.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(h=>h.col)),mines:o,fakeMines:l,second:i}),i=d.second,s=[],o=n,l=a,n=[],a=[],t=t.map(h=>{if(!(h===void 0||d.beat>h.beat+h.hold))return h})),s[d.col]=d,Le(d)&&(t[d.col]=d))}return c.push({notes:s,holds:t.map(d=>{if(!(d===void 0||d.second>=i))return d}),holdTails:new Set(t.filter(d=>!(d===void 0||Math.abs(d.beat+d.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(d=>d.col)),mines:o,fakeMines:l,second:i}),c}analyze(){const e=this.app.chartManager.loadedChart?.getNotedata();if(!e)return[];const t=this.createRows(e),i=this.buildStateGraph(t);this.analyzeGraph(t,i)}analyzeGraph(e,t){const i=this.computeCheapestPath(t);for(let s=0;s0;){const d=n.shift(),h=t.addOrGetExistingNode(d),u=this.getPermuteColumns(e[l]);for(const p of u){const f=this.initResultState(d,e[l],l,p),m=this.getActionCost(d,f,e,l),g=t.addOrGetExistingNode(f);t.addEdge(h,g,m),c.add(g.id)}}for(const d of c)n.push(t.nodes[d].state)}const a={rowIndex:e.length,second:e[e.length-1].second+1,columns:[],movedFeet:new Set,holdFeet:new Set},o=t.addOrGetExistingNode(a);for(t.endNode=o.id;n.length>0;){const l=n.shift(),c=t.addOrGetExistingNode(l);t.addEdge(c,o,0)}return t}initResultState(e,t,i,s){const n={rowIndex:i,second:t.second,columns:s,movedFeet:new Set,holdFeet:new Set};for(let a=0;a<4;a++)s[a]!=null&&((t.holds[a]==null||e.columns[a]!=s[a])&&n.movedFeet.add(s[a]),t.holds[a]!=null&&n.holdFeet.add(s[a]));return n}computeCheapestPath(e){const t=e.startNode,i=e.endNode,s=[],n=Array(e.nodes.length).fill(Number.MAX_VALUE),a=Array(e.nodes.length).fill(-1);n[t]=0;for(let l=0;l<=i;l++){const c=e.nodes[l];for(const[d,h]of c.neighbors)n[l]+ht.parity=void 0)}}function dC(r,e){return!(r.second!==e.second||r.rowIndex!==e.rowIndex||!uC(r.columns,e.columns)||!_f(r.movedFeet,e.movedFeet)||!_f(r.holdFeet,e.holdFeet))}function uC(r,e){if(r.length!==e.length)return!1;for(let t=0;tthis.fitContextMenu(t)),this.menuElement.classList.add("entering"),clearTimeout(this.closeTimeout),setTimeout(()=>this.menuElement?.classList.remove("entering"),300),this.menuElement.style.left=t.clientX+"px",this.menuElement.style.top=t.clientY+"px")}static fitContextMenu(e){this.menuElement.style.display="";const t=this.menuElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-20,s=window.innerWidth-t.right-20;i<0&&(this.menuElement.style.top=e.clientY+i+"px"),s<0&&(this.menuElement.style.left=e.clientX+s+"px"),this.menuElement.style.transformOrigin=`${Math.max(0,-s)}px ${Math.max(0,-i)}px`}static close(){this.menuElement&&(this.menuElement.classList.add("exiting"),this.closeTimeout=setTimeout(()=>this.menuElement.replaceChildren(),300))}static buildMenu(e){const t=document.createElement("div");if(t.appendChild(this.createElement(e,{type:"selection",id:"cut"})),t.appendChild(this.createElement(e,{type:"selection",id:"copy"})),t.appendChild(this.createElement(e,{type:"selection",id:"paste"})),t.appendChild(this.createElement(e,{type:"selection",id:"pasteReplace"})),e.chartManager.getMode()==Y.Edit&&e.chartManager.hasNoteSelection()){const i=document.createElement("div");i.classList.add("separator"),t.appendChild(i),$n.selection.options.slice(0,-4).forEach(s=>{t.appendChild(this.createElement(e,s))})}this.menuElement=t,t.id="context-menu",document.getElementById("context-menu")?.replaceWith(this.menuElement)}static createElement(e,t){if(t.type=="separator"){const i=document.createElement("div");return i.classList.add("separator"),i}if(t.type=="selection"||t.type=="checkbox"||t.type=="dropdown"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");let a;if(t.type=="selection"||t.type=="checkbox"){const o=Tt[t.id];a=document.createElement("div"),a.innerText=Re.getKeybindString(t.id),a.classList.add("keybind","unselectable"),n.innerText=o?.label??t.id;let l=o?.disabled??!0;typeof l=="function"&&(l=l(e)),l&&i.classList.add("disabled"),i.addEventListener("click",()=>{l||(o?.callback(e),this.close())})}else a=Ae.getIcon("CHEVRON",16),a.style.transform="rotate(-90deg)",n.innerText=typeof t.title=="function"?t.title(e):t.title;if(s.appendChild(n),s.appendChild(a),i.appendChild(s),i.classList.add("menu-item"),s.classList.add("menu-item-title","menu-hover"),n.classList.add("title","unselectable"),t.type=="dropdown"){const o=document.createElement("div");i.appendChild(o),o.classList.add("menubar-dropdown"),t.options.map(l=>this.createElement(e,l)).forEach(l=>o.appendChild(l))}if(t.type=="checkbox"){let o=t.checked;typeof o=="function"&&(o=o(e)),o&&(n.innerText="✓ "+n.innerText)}return i}if(t.type=="menu"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");return i.appendChild(s),s.innerText=t.title,i.appendChild(n),s.classList.add("title","unselectable"),i.classList.add("menu-item","menu-main"),s.classList.add("menu-hover"),n.classList.add("menubar-dropdown","unselectable"),i.onmouseenter=()=>{n.replaceChildren(...t.options.map(a=>this.createElement(e,a)))},i.onmouseleave=()=>{n.replaceChildren()},i}return document.createElement("div")}}const fC={fontName:"Main",fontSize:20,fill:["#ffffff"]};class mC extends Ee{renderer;barlineMap=new Map;barlineLabelMap=new Map;barlinePool=new ga({create:()=>{const e=new Oe(ie.WHITE);return et(e,"text-color"),e}});barlineLabelPool=new ga({create:()=>{const e=new De("",fC);return et(e,"text-color"),e}});constructor(e){super(),this.renderer=e;const t=()=>{this.barlineMap.clear(),this.barlineLabelMap.clear(),this.barlinePool.destroyAll(),this.barlineLabelPool.destroyAll()};q.on("timeSigChanged",t),this.on("destroyed",()=>q.off("timeSigChanged",t)),this.addChild(this.barlinePool,this.barlineLabelPool)}update(e,t){this.visible=this.renderer.shouldDisplayBarlines();for(const[i,s]of this.getBarlineBeats(e,t)){if(!this.barlineMap.has(i)){const n=this.barlinePool.createChild();if(!n)continue;Object.assign(n,{width:this.renderer.chart.gameType.notefieldWidth+128,height:s?4:1,visible:!0}),n.anchor.set(.5),this.barlineMap.set(i,n)}if(s&&!this.barlineLabelMap.has(i)){const n=this.barlineLabelPool.createChild();if(!n)continue;Object.assign(n,{x:(this.renderer.chart.gameType.notefieldWidth+128)/-2-16,text:`${Math.round(this.renderer.chart.timingData.getMeasure(i))}`,visible:!0}),n.anchor.set(1,.5),this.barlineLabelMap.set(i,n)}}for(const[i,s]of this.barlineMap.entries()){if(it){this.barlineMap.delete(i),this.barlinePool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}for(const[i,s]of this.barlineLabelMap.entries()){if(it){this.barlineLabelMap.delete(i),this.barlineLabelPool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}}*getBarlineBeats(e,t){e=Math.max(0,e);const i=this.renderer.chart.timingData,s=i.getTimingData("TIMESIGNATURES");let n=i.getEventAtBeat("TIMESIGNATURES",e),a=n?s.findIndex(u=>u.beat==n.beat):-1,o=i.getDivisionLength(e);const l=i.getDivisionOfMeasure(e)%1*o;let c=Math.max(0,e-l);c=s[a+1]?.beat&&(a++,n=s[a],c=n.beat,o=i.getDivisionLength(c),d=0,h=n.upper)}}class gC extends Ee{previewArea=new Oe(ie.WHITE);previewText=new De("SONG PREVIEW",{fontName:"Main",fontSize:13});renderer;constructor(e){super(),this.renderer=e,Object.assign(this.previewArea,{alpha:.2,tint:11052482,width:this.renderer.chart.gameType.notefieldWidth+96,height:64}),this.previewText.x=-this.previewArea.width/2+5,this.previewArea.anchor.x=.5,et(this.previewText,"text-color"),this.addChild(this.previewArea,this.previewText)}update(e,t){const i=Number(this.renderer.chart.sm.properties.SAMPLESTART),s=Number(this.renderer.chart.sm.properties.SAMPLELENGTH);if(Number.isNaN(i)||Number.isNaN(s)||!this.renderer.shouldDisplayBarlines()||this.renderer.chart.timingData.getBeatFromSeconds(i+s)t){this.visible=!1;return}this.visible=!0;let n=this.renderer.getYPosFromSecond(i),a=this.renderer.getYPosFromSecond(i+s);a=0){l.visible=!1;continue}if(Math.abs(e[n].beat-t)>20&&Math.abs(e[n+1].beat-t)>20&&!(t>e[n].beat&&te[n].beat&&te[n+1].beat&&(l.text.y=l.box.height),l.x=(n%4-1.5)*150}for(const[n,a]of this.scrollMap.entries())if(!a.marked){this.scrollMap.delete(n),a.destroy();continue}const i=this.renderer.findFirstOnScreenScroll(),s=this.renderer.findLastOnScreenScroll();{const n=this.scrollMap.get(i);n&&(n.text.text+=` start`,n.box.tint==16777215&&(n.box.tint=16777096),n.text.tint=16777096)}{const n=this.scrollMap.get(s);n&&(n.text.text+=` -end`,n.box.tint==16777215&&(n.box.tint=8978431),n.text.tint=8978431)}this.receptors.y=this.renderer.getActualReceptorYPos(),this.topBound.y=this.renderer.getUpperBound(),this.bottomBound.y=this.renderer.getLowerBound(),this.topBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()-_.chart.maxDrawBeatsBack),this.bottomBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()+_.chart.maxDrawBeats),this.topScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getTopOnScreenBeat()),this.bottomScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getBottomOnScreenBeat()),this.topScreenBeatText.y=this.topScreenBeat.y,this.topScreenBeatText.text=ae(this.renderer.getTopOnScreenBeat(),3)+"",this.bottomScreenBeatText.y=this.bottomScreenBeat.y,this.bottomScreenBeatText.text=ae(this.renderer.getBottomOnScreenBeat(),3)+""}inBounds(e){const t=this.renderer.chartManager.app.renderer.screen.height/this.scale.y;return Math.abs(e)this.renderer.getVisualBeat()),this.trackVariable(()=>this.renderer.getVisualTime()),this.trackVariable(()=>this.getSpeed(),s=>{this.speed=s,clearTimeout(this.lastSpeedTimeout),this.lastSpeedTimeout=setTimeout(()=>{this.blockCache.clear(),this.lastSpeed=this.speed,this.drawDirty=!0},200)}),this.trackVariable(()=>_.chart.zoom),this.trackVariable(()=>_.chart.CMod),this.trackVariable(()=>_.chart.doSpeedChanges),this.trackVariable(()=>_.chart.waveform.allowFilter),this.trackVariable(()=>_.chart.reverse),this.trackVariable(()=>_.chart.waveform.antialiasing,s=>{this.filters=s?[new gc]:[]}),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.width,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.height,()=>this.resizeWaveform()),this.trackVariable(()=>_.chart.waveform.filteredColor),this.trackVariable(()=>_.chart.waveform.color),this.trackVariable(()=>_.chart.waveform.speedChanges),this.trackVariable(()=>_.chart.receptorYPos),this.trackVariable(()=>_.chart.waveform.lineHeight,()=>{_.chart.waveform.lineHeight<=0&&(_.chart.waveform.lineHeight=1),this.updateLineHeight()}),this.trackVariable(()=>_.chart.zoom,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.chartAudio.hasFilters()),this.anchor.set(.5),this.renderer.chartManager.chartAudio.onUpdate(()=>this.getData()),this.getData(),this.resizeWaveform(),this.filters=_.chart.waveform.antialiasing?[new gc]:[];const t=()=>this.drawDirty=!0,i=()=>{this.getData(),this.resizeWaveform(),this.renderer.chartManager.chartAudio.onUpdate(()=>this.getData())};K.on("timingModified",t),this.on("destroyed",()=>{K.off("timingModified",t)}),K.on("audioLoaded",i),this.on("destroyed",()=>{K.off("audioLoaded",i)})}getData(){this.rawData=this.renderer.chartManager.chartAudio.getRawData(),this.filteredRawData=this.renderer.chartManager.chartAudio.getFilteredRawData(),this.sampleRate=this.renderer.chartManager.chartAudio.getSampleRate(),this.blockCache.clear(),this.drawDirty=!0}resizeWaveform(){this.waveformTex.resize(Be((this.rawData?.length??0)*288*_.chart.zoom,1,this.renderer.chartManager.app.renderer.screen.width),this.renderer.chartManager.app.renderer.screen.height)}update(){this.visible=_.chart.waveform.enabled&&this.renderer.shouldDisplayBarlines(),_.chart.waveform.enabled&&((this.drawDirty||this.variableChanged())&&(this.colorCache.toHexa()!=_.chart.waveform.color&&(this.colorCache=pa(_.chart.waveform.color)),this.filteredColorCache.toHexa()!=_.chart.waveform.filteredColor&&(this.filteredColorCache=pa(_.chart.waveform.filteredColor)),this.drawDirty=!1,this.renderData(),this.renderer.chartManager.app.renderer.render(this.lineContainer,{renderTexture:this.waveformTex})),this.scale.set(1/_.chart.zoom))}trackVariable(e,t){this.trackedVariables.set(e,{value:e(),cb:t})}variableChanged(){let e=!1;for(const[t,i]of this.trackedVariables.entries())t()!=i.value&&(this.trackedVariables.get(t).value=t(),this.trackedVariables.get(t).cb?.(t()),e=!0);return e}getSample(e,t,i){if(t<0)return 0;const s=this.sampleRate/(this.lastSpeed*4),n=Math.floor(t*this.lastSpeed*4);if(this.blockCache.get(i)?.[n]!==void 0)return this.blockCache.get(i)[n];const a=Math.floor(n*s),o=e.slice(a,Math.floor(a+s)).reduce((l,c)=>l+Math.abs(c),0)/s;return this.blockCache.has(i)||this.blockCache.set(i,[]),this.blockCache.get(i)[n]=o,o}renderData(){this.resetPool();const e=_.chart.waveform.allowFilter&&this.renderer.chartManager.chartAudio.hasFilters(),t={data:{bpms:[],bpmIndex:0,timing:[],timingIndex:0,offset:0,lastBeat:-999,timingData:null},init(i){if(this.data.bpms=i.getTimingData("BPMS"),this.data.timing=i.getBeatTiming(),this.data.offset=i.getOffset(),this.data.bpms[0]?.beat!==0){const s=this.data.bpms[0]??{value:120,type:"BPMS",beat:0};s.beat=0,this.data.bpms.unshift(s)}this.data.timing.length==0&&this.data.timing.unshift({beat:0,secondBefore:-this.data.offset,secondAfter:-this.data.offset,secondClamp:-this.data.offset,secondOf:-this.data.offset,warped:!1,bpm:120}),this.data.timingData=i},getBPM(i){for(;i>this.data.bpms[this.data.bpmIndex+1]?.beat;)this.data.bpmIndex++;return this.data.bpms[this.data.bpmIndex].value},getSecond(i){const s=Math.floor(i*1e3)/1e3;if(i<=0)return-this.data.offset+i*60/this.getBPM(i);if(s>=this.data.timing[this.data.timingIndex+1]?.beat){for(;s>=this.data.timing[this.data.timingIndex+1]?.beat;)this.data.timingIndex++;return this.data.timingData.getSecondsFromBeat(i)}else{const n=this.data.timing[this.data.timingIndex];let o=(i-n.beat)*60/n.bpm;return n.warped&&(o=0),Math.max(n.secondClamp,n.secondAfter+o)}}};if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const i=_.chart.speed,s=this.renderer.getCurrentSpeedMult(),n=this.renderer.getTopOnScreenBeat(),a=this.renderer.getBottomOnScreenBeat(),o=Math.min(n,a),l=Math.max(n,a),c=this.renderer.findFirstOnScreenScroll(),d=this.renderer.findLastOnScreenScroll(),h=[...this.renderer.chart.timingData.getTimingData("SCROLLS")];h[0]?.beat!=0&&h.unshift({type:"SCROLLS",beat:0,value:h[0]?.value??1}),t.init(this.renderer.chart.timingData);const u=h.findIndex(b=>b.beat==c.beat),p=h.findIndex(b=>b.beat==d.beat),f=100/i/Math.abs(s)/64/_.chart.zoom,m=this.renderer.chartManager.app.renderer.screen.height;let g=o,y=Math.round(this.renderer.getYPosFromBeat(g)*_.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);for(const b of h.slice(u,p+1)){if(b.value==0)continue;const v=f/Math.abs(b.value);b.beat!=c.beat?g=b.beat:g=Math.round((g-b.beat)/v)*v+b.beat,y=Math.round(this.renderer.getYPosFromBeat(g)*_.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);const E=this.renderer.getScrollDirection(b.value),C=h[h.indexOf(b)+1]?.beat??Number.MAX_VALUE;for(;gm){if(E>0){g=C;break}g+=v*(y-m),y=m;continue}g+=v*_.chart.waveform.lineHeight,y+=E*_.chart.waveform.lineHeight,w=t.getSecond(g),this.drawLine(w,y,e)}}}else if(_.chart.CMod){let i=this.renderer.getSecondFromYPos((-this.parent.y+(_.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/_.chart.zoom);const s=this.renderer.getPixelsToSecondsRatio()/_.chart.zoom;i=Math.floor(i/s)*s;const n=a=>{i+=s*_.chart.waveform.lineHeight,this.drawLine(i,a,e)};if(_.chart.reverse)for(let a=this.renderer.chartManager.app.renderer.screen.height;a>=0;a-=_.chart.waveform.lineHeight)n(a);else for(let a=0;a<=this.renderer.chartManager.app.renderer.screen.height;a+=_.chart.waveform.lineHeight)n(a)}else{let i=this.renderer.getBeatFromYPos((-this.parent.y+(_.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/_.chart.zoom);t.init(this.renderer.chart.timingData);const s=this.renderer.getPixelsToEffectiveBeatsRatio()/_.chart.zoom;i=Math.floor(i/s)*s;let n=this.renderer.chart.getSecondsFromBeat(i);const a=o=>{i+=s*_.chart.waveform.lineHeight,n=t.getSecond(i),this.drawLine(n,o,e)};if(_.chart.reverse)for(let o=this.renderer.chartManager.app.renderer.screen.height;o>=0;o-=_.chart.waveform.lineHeight)a(o);else for(let o=0;o<=this.renderer.chartManager.app.renderer.screen.height;o+=_.chart.waveform.lineHeight)a(o)}this.purgePool()}drawLine(e,t,i){if(!(e<0))for(let s=0;st>=this.poolSearch)}updateLineHeight(){for(const e of this.lineContainer.children){const t=e;t.height=_.chart.waveform.lineHeight}}getLine(){if(this.lineContainer.children[this.poolSearch]){const t=this.lineContainer.children[this.poolSearch];return t.visible=!0,this.poolSearch++,t}const e=new Oe(ie.WHITE);return e.height=_.chart.waveform.lineHeight,e.anchor.set(.5),e.visible=!0,this.poolSearch++,this.lineContainer.addChild(e),e}getSpeed(){return Math.min(_.chart.speed,wC)}}const xC="/smeditor/assets/missing-81d55ba9.png",xy=ie.from(xC),TC={HoldBodyTopOffset:0,HoldBodyBottomOffset:0,RollBodyTopOffset:0,RollBodyBottomOffset:0};class EC{renderer;options;objects=[];updateHooks=new Set;hooks={};metrics;constructor(e,t){this.renderer=e,this.options=t,this.options.init?.(e),this.metrics={...TC,...this.options.metrics}}update(e){this.options.update?.(e),this.updateHooks.forEach(({item:t,cb:i})=>{t.destroyed||i(e)})}getPlaceholderSprite(){const e=new Oe(xy);return e.anchor.set(.5),e}getBlankSprite(){return new Oe(ie.EMPTY)}getElement(e,t={}){try{return this.options.load?this.options.load.bind(this)(e,{noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})??this.getPlaceholderSprite():this.loadElement(e,t)??this.getPlaceholderSprite()}catch(i){return console.error(i),_.debug.showNoteskinErrors&&Se.createFormatted("Noteskin Error: "+i,"error"),this.getPlaceholderSprite()}}loadElement(e,t={}){const i=this.followRedirs(e);return i===void 0?(_.debug.showNoteskinErrors&&Se.createFormatted(`Noteskin element ${e.columnName} ${e.element} failed to load for noteskin: Redirect loop`,"error"),this.getPlaceholderSprite()):i({noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})}followRedirs(e){const t=[e];let i=e;for(;;){const s=this.options.elements[i.columnName]?.[i.element];if(s===void 0)return;if(typeof s=="function")return s;if(i={columnName:s.columnName??i.columnName,columnNumber:s.columnNumber??i.columnNumber,element:s.element},t.some(n=>i.columnName==n.columnName&&i.element==n.element))return;t.push(i)}}on(e,t,i){this.hooks[t]===void 0&&(this.hooks[t]=new Set);const s={item:e,cb:i};this.hooks[t].add(s),e.once("destroyed",()=>this.hooks[t].delete(s))}onUpdate(e,t){const i={item:e,cb:t};this.updateHooks.add(i),e.once("destroyed",()=>this.updateHooks.delete(i))}broadcast(e){if(this.hooks[e.type]===void 0)return;this.hooks[e.type].forEach(({item:i,cb:s})=>{i.destroyed||s(e)})}}const AC="/smeditor/assets/hold_judgement-82934f15.png";class ps extends Ee{children=[];static held_tex;static dropped_tex;notefield;constructor(e){super(),ps.held_tex||this.loadTex(),this.notefield=e}async loadTex(){const e=await Ks.load(AC),t=e.height,i=e.width;ps.held_tex=new ie(e,new ke(0,0,i,t/2)),ps.dropped_tex=new ie(e,new ke(0,t/2,i,t/2))}update(){this.y=this.notefield.renderer.getActualReceptorYPos()+(_.chart.reverse?-48:48);for(const e of this.children){const t=(Date.now()-e.createTime)/1e3;if(t<.1){const i=1-(1-t/.1)*(1-t/.1);e.scale.set(.3*i)}else if(t>.6&&t<.8){const i=(t-.6)/.2*(t-.6)/.2;e.scale.set(.3*(1-i))}}Ki(this.children,e=>Date.now()-e.createTime>800)}addJudge(e,t){if(!bn(t)&&!ws(t))return;const i=new Oe(bn(t)?ps.dropped_tex:ps.held_tex);i.anchor.set(.5),i.x=this.notefield.getColumnX(e),i.createTime=Date.now(),i.scale.set(0),this.addChild(i)}}const SC={L:233724,l:11261687,R:16559363,r:16442809};class CC extends Ee{notefield;arrowMap=new Map;notesDirty=!1;children=[];constructor(e){super(),this.notefield=e,this.sortableChildren=!0;const t=()=>{this.arrowMap.clear(),this.removeChildren()},i=()=>this.notesDirty=!0;K.on("timeSigChanged",t),K.on("chartModified",i),this.on("destroyed",()=>{K.off("timeSigChanged",t),K.on("chartModified",i)})}update(e,t){const i=this.notefield.renderer.chart.getNotedata();if(this.notesDirty){for(const[s,n]of this.arrowMap.entries())i.includes(s)||(n.destroy(),this.arrowMap.delete(s));this.notesDirty=!1}for(const s of i){if(s.beat>t)break;if(this.shouldDisplayNote(s,e,t)&&!this.arrowMap.has(s)){const n=new Ee,a=this.notefield.createNote(s);Object.assign(n,{x:this.notefield.getColumnX(s.col),zIndex:s.beat});const o=new Oe(ie.WHITE),l=a.getBounds();o.x=l.x,o.y=l.y,o.width=l.width,o.height=l.height,o.alpha=0;const c=new Oe(ie.WHITE);c.x=l.x,c.y=l.y,c.width=l.width,c.height=l.height,c.alpha=0,this.notefield.renderer.registerDragNote(n,s),n.wrapper=a,n.selection=o,n.parity=c,n.lastActive=!1,this.arrowMap.set(s,n),n.addChild(a,o,c),this.addChild(n)}}for(const[s,n]of this.arrowMap.entries()){if(!this.shouldDisplayNote(s,e,t)){n.destroy(),this.arrowMap.delete(s);continue}if(n.y=this.notefield.renderer.getActualReceptorYPos(),(!Le(s)||!s.gameplay?.lastHoldActivation||this.notefield.renderer.getVisualBeat()t)&&!this.arrowMap.has(n)){const a={...n,beat:n.beat+i,col:n.col+s},o=new Ee,l=this.notefield.createNote(a);Object.assign(o,{x:this.notefield.getColumnX(a.col),zIndex:a.beat,alpha:.4});const c=new Oe(ie.WHITE),d=l.getBounds();c.x=d.x,c.y=d.y,c.width=d.width,c.height=d.height,c.alpha=0,this.notefield.renderer.registerDragNote(l,a),o.wrapper=l,o.selection=c,this.arrowMap.set(n,o),o.addChild(l,c),this.addChild(o)}for(const[n,a]of this.arrowMap.entries()){if(n.beat+i+(Le(n)?n.hold:0)t){a.destroy(),this.arrowMap.delete(n);continue}const o=n.beat+i;if(a.y=this.notefield.renderer.getYPosFromBeat(o),a.selection.alpha=Math.sin(Date.now()/320)*.1+.3,Le(n)){const l=this.notefield.renderer.getYPosFromBeat(o+(Le(n)?n.hold:0))-a.y,c=a.wrapper.object;c.setLength(l),c.setBrightness(1);const d=a.wrapper.getLocalBounds();a.selection.x=d.x,a.selection.y=d.y,a.selection.width=d.width,a.selection.height=d.height}}}}const PC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAZ5QTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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Hupk8izVuSNXutvVPRFm2mk5ALCnZ1oli0yZSEHQ8m11owFsMGGYSsh90BG8vOyB10WjmydXXD3gvglTxCexSQkT5+HZbMaEkbd2p4BjeyPqkcoxMyqId67S8OW4tnMPvEZtim1l80bam5XQkQQmK+KL2kWbKamce721GN8uPYwgt4dQgRfYipFB7l/Yy2ifSaXgEh8TltdULCNXcP/xWCsHLTMhxXuAXmQzirwqURPbaUTcA3Wvoarj6/WbQgl33BnDIk41HIOSqxKD7p1SmpVy3yfaE05142tJSVHCPFR1Y/y6zRamvEX1JFLEQQCSJB5B9BfgCwNDJ0if9eSgAAAABJRU5ErkJggg==";class RC extends sg{offsetY=0;setY=0;_last=0;_lastTop=!1;constructor(e){super(e,0,0,0,0),this.scale.cb=()=>{this.refresh()}}cropBottom(e,t=!1){this._last==e&&!this._lastTop&&!t||(this._last=e,this._lastTop=!1,this._height=this.texture.height-e/Math.abs(this.scale.y),this._bottomHeight=0,this.offsetY=0,this.topHeight=this.texture.height-e/Math.abs(this.scale.y),this._updateY())}cropTop(e,t=!1){this._last==e&&this._lastTop&&!t||(this._last=e,this._lastTop=!0,this._height=this.texture.height-e/Math.abs(this.scale.y),this._topHeight=0,this.bottomHeight=this.texture.height-e/Math.abs(this.scale.y),this.offsetY=e/Math.abs(this.scale.y),this._updateY())}get y(){return this.setY}set y(e){this.setY=e,this._updateY()}_updateY(){super.y=this.setY+this.offsetY*Math.abs(this.scale.y)}refresh(){this._lastTop?this.cropTop(this._last,!0):this.cropBottom(this._last,!0)}}class Ty extends RC{constructor(e,t=64){super(e),this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.texture.on("update",()=>{this.width=this.texture.width,this.height=this.texture.height,this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.refresh()})}}class rM extends Ty{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(e,t){super(e[0],t),this.textures=e}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Et.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Et.shared.add(this._tickerUpdate,this,Gr.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(e){this.stop(),this.currentFrame=e}gotoAndPlay(e){this.currentFrame=e,this.play()}update(e){if(!this._playing)return;const t=this.animationSpeed*e,i=this.currentFrame;this._currentTime+=t,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this.texture=this._textures[e],this.onFrameChange?.(this.currentFrame))}destroy(e){this.stop(),super.destroy(e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(e){this._textures=e,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let e=Math.floor(this._currentTime)%this._textures.length;return e<0&&(e+=this._textures.length),e}set currentFrame(e){if(e<0||e>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${e}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Et.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(Et.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}const LC={Fake:ie.from(PC),Lift:ie.from(BC)};class xf extends Ee{object;icon;constructor(e){super(),this.object=e,this.icon=new Oe(LC[e.note.type]),this.icon.anchor.set(.5),this.icon.scale.set(.3),this.icon.alpha=.8,this.icon.visible=!1,this.addChild(e,this.icon),e.nf.noteskin===void 0?K.on("noteskinLoaded",()=>this.loadEventHandler()):this.loadEventHandler()}loadEventHandler(){this.object.nf.noteskin.onUpdate(this,e=>{if(!_.chart.drawIcons){this.icon.visible=!1;return}if(this.object.nf.noteskinOptions?.hideIcons?.includes(this.object.note.type)){this.icon.visible=!1;return}this.icon.visible=!0,this.object.note.type=="Fake"&&(this.icon.visible=e.chartManager.getMode()!=X.Play)})}}class DC extends Ee{type="note";note;nf;constructor(e,t){super(),this.note=t,this.nf=e,this.nf.noteskin===void 0?K.on("noteskinLoaded",()=>{this.loadElement(t)}):this.loadElement(t)}loadElement(e){const t=this.nf.noteskin.getElement({element:e.type,columnName:this.nf.getColumnName(e.col),columnNumber:e.col},{note:e});this.addChild(t)}}function OC(r){return r.cropTop!==void 0}class FC extends Ee{type="hold";note;active;inactive;wasActive=!1;lastLength=null;elements;metrics;ns;nf;loaded=!1;constructor(e,t){super();const i=new Ee,s=new Ee;this.note=t,this.ns=e.noteskin,this.nf=e,this.metrics=this.ns.metrics,i.visible=!1,this.active=i,this.inactive=s,this.addChild(s,i),e.noteskin===void 0?K.on("noteskinLoaded",()=>{this.loadElements()}):this.loadElements()}loadElements(){if(!this.loaded){this.elements={};for(const e of["Active","Inactive"]){this.elements[e]={};for(const t of["BottomCap","Body","TopCap","Head"]){const i=this.getNoteskinElement(`${e} ${t}`);t=="BottomCap"?OC(i)?this.elements[e][t]=i:(_.debug.showNoteskinErrors&&Se.createFormatted(`Noteskin Error: invalid tail found for ${e} ${t}!`,"error"),this.elements[e][t]=new Ty(xy,64)):this.elements[e][t]=i,(e=="Active"?this.active:this.inactive).addChild(this.elements[e][t])}}this.loaded=!0}}getNoteskinElement(e){return this.ns.getElement({element:`${this.note.type} ${e}`,columnName:this.nf.getColumnName(this.note.col),columnNumber:this.note.col},{note:this.note})}setActive(e){this.wasActive!=e&&(this.wasActive=e,this.active.visible=e,this.inactive.visible=!e)}setBrightness(e){if(!this.loaded)return;const t=["Active","Inactive"],i=["Body","TopCap","BottomCap"];for(const s of t)for(const n of i)"tint"in this.elements[s][n]&&(this.elements[s][n].tint=Rd(e*255,e*255,e*255))}setLength(e){if(!this.loaded||this.lastLength==e)return;this.lastLength=e;const t=this.metrics[`${this.note.type}BodyBottomOffset`],i=this.metrics[`${this.note.type}BodyTopOffset`],s=["Active","Inactive"],n=e>=0?1:-1,a=Math.abs(e);for(const o of s){this.elements[o].Body.height=Math.max(0,a+t-i),this.elements[o].Body.y=a+t,this.elements[o].BottomCap.y=a+t,this.elements[o].BottomCap.y<0?(this.elements[o].BottomCap.cropTop(-this.elements[o].BottomCap.y),e<0&&(this.elements[o].BottomCap.y-=this.elements[o].BottomCap.y/Math.abs(this.elements[o].BottomCap.scale.y))):this.elements[o].BottomCap.cropTop(0),this.elements[o].TopCap.y=i;const l=Math.abs(this.elements[o].BottomCap.scale.y);this.elements[o].BottomCap.scale.y=e<0?-l:l;const c=Math.abs(this.elements[o].TopCap.scale.y);this.elements[o].TopCap.scale.y=e<0?-c:c,this.elements[o].Body.height*=n,this.elements[o].Body.y*=n,this.elements[o].BottomCap.y*=n,this.elements[o].TopCap.y*=n}}}class Tf extends Ee{noteskinOptions;noteskin;gameType;renderer;receptors;notes;selectionNotes;flashes;holdJudges;ghostNote;ghostNoteEntry;columnX=[];constructor(e){super(),this.renderer=e,this.gameType=e.chart.gameType,nt.getNoteskin(this.gameType,_.chart.noteskin.name).then(t=>{if(!t){Se.createFormatted("Couldn't find an available noteskin!","error");return}let i=0;for(let s=0;s=e&&this.ghostNoteEntry.beat<=t&&this.ghostNoteEntry.beat>=0))}onJudgement(e,t){this.noteskin!==void 0&&(this.holdJudges.addJudge(e,t),Zi(t)&&this.noteskin.broadcast({type:"hit",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),ws(t)&&this.noteskin.broadcast({type:"held",columnName:this.getColumnName(e),columnNumber:e}),bn(t)&&this.noteskin.broadcast({type:"letgo",columnName:this.getColumnName(e),columnNumber:e}),Pi(t)&&this.noteskin.broadcast({type:"miss",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),_l(t)&&this.noteskin.broadcast({type:"hitmine",columnName:this.getColumnName(e),columnNumber:e}))}startPlay(){}endPlay(){if(this.noteskin!==void 0)for(let e=0;eDate.now()-e.createTime>5e3),_.general.smoothAnimations?this.currentMedian.x=(this.currentMedian.x-this.target)*.8+this.target:this.currentMedian.x=this.target}addBar(e,t){if(e==null||!Pi(t)&&!Zi(t))return;const i=new Oe(ie.WHITE);i.width=UC,i.height=Ef,i.anchor.set(.5),i.x=e*400,i.tint=t.color,i.createTime=Date.now(),i.miss=Pi(t),i.ms=Math.round(e*1e3),this.errorText.tint=t.color,this.errorText.text=(e*1e3).toFixed(1)+"ms",this.errorTextTime=Date.now(),this.barlines.addChild(i),this.target=xl(this.barlines.children.filter(s=>!s.miss).map(s=>s.ms))*.4}reset(){this.currentMedian.x=0,this.target=0,Ki(this.barlines.children,()=>!0)}}class VC extends Oe{createTime=-1;active=!1;type=Yg;constructor(){super(),this.anchor.set(.5)}update(){if(this.y=_.chart.reverse?40:-40,this.visible=this.active,this.active){const e=(Date.now()-this.createTime)/1e3;let t=1.2;if(Je.getCollection(_.play.timingCollection).shouldHideNote(this.type)||(t=.8),e<.1){const i=1-(1-e/.1)*(1-e/.1),s=(1-t)*i+t;this.scale.x=.4*s,this.scale.y=.4*s}else if(e>.6&&e<.8){const i=(e-.6)/.2*(e-.6)/.2;this.scale.x=.4*(1-i),this.scale.y=.4*(1-i)}else e>.8&&(this.active=!1)}}doJudge(e,t){if(e==null&&(e=0),!Zi(t)&&!Pi(t))return;const i=t.judgementTexture.getTexture(e,t);i&&(this.texture=i,this.texture.updateUvs(),this.active=!0,this.type=t,this.createTime=Date.now(),_.play.judgementTilt?this.rotation=Be(e,-.05,.05)*300/180*Math.PI:this.rotation=0)}reset(){this.active=!1}}const Af={BPMS:{title:"BPM Event",rows:[{label:"Tempo",key:"value",input:{type:"spinner",precision:3}}]},STOPS:{title:"Stop Event",description:"Stops for a number of seconds. Notes on this beat are hit before the stop occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},WARPS:{title:"Warp Event",description:"Warps ahead a number of beats. Warped notes do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},DELAYS:{title:"Delay Event",description:"Stops for a number of seconds. Notes on this beat are hit after the delay occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},SCROLLS:{title:"Scroll Event",description:"Notes after this event will scroll at the specified speed.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}}]},TICKCOUNTS:{title:"Tickcount Event",description:"Number of ticks per beat in a hold. Only applies to pump gamemodes.",rows:[{label:"Ticks",key:"value",input:{type:"spinner",step:1,precision:0,min:0}}]},FAKES:{title:"Fake Event",description:"Creates an area of notes that cannot be hit and do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},LABELS:{title:"Label Event",rows:[{label:"Label",key:"value",input:{type:"text"}}]},SPEEDS:{title:"Speed Event",width:200,description:"The entire playfield scrolls at the specified speed. Can slowly ease over a certain amount of time.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}},{label:"Ease time",key:"delay",input:{type:"spinner",precision:3,min:0}},{label:"Ease unit",key:"unit",input:{type:"dropdown",items:["Beats","Seconds"],transformers:{serialize:r=>r=="B"?"Beats":"Seconds",deserialize:r=>r=="Beats"?"B":"T"}}}]},TIMESIGNATURES:{title:"Time Signature Event",width:200,rows:[{label:"Upper",key:"upper",input:{type:"spinner",step:1,precision:0,min:1}},{label:"Lower",key:"lower",input:{type:"spinner",step:1,precision:0,min:1}}]},COMBOS:{title:"Combo Event",width:200,description:"Multiplies the combo gained from hitting/missing notes after this event.",rows:[{label:"Hit multiplier",key:"hitMult",input:{type:"spinner",step:1,precision:0,min:0}},{label:"Miss multiplier",key:"missMult",input:{type:"spinner",step:1,precision:0,min:0}}]},ATTACKS:{title:"Attack Event",width:200,description:"Applies a modifier to the playfield. Can specify the length of the applied attack in seconds or the end time of the attack.",rows:[{label:"Timing type",key:"endType",input:{type:"dropdown",items:["Length","End"],transformers:{serialize:r=>r=="LEN"?"Length":"End",deserialize:r=>r=="Length"?"LEN":"END"}}},{label:"Seconds",key:"value",input:{type:"spinner",precision:3}},{label:"Mods",key:"mods",input:{type:"text"}}]},BGCHANGES:{title:"BG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]},FGCHANGES:{title:"FG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]}};class Bt{static activePopup;timingBox;popup;zoomer;editText;timingData;rows=[];onTimingChange;clickOutside;moveInterval;modifyBox;cachedEvent;onConfirm=()=>{};persistent=!1;constructor(e,t,i=!1){e.popup=this,this.timingBox=e,this.timingData=t,this.cachedEvent=this.timingBox.event,this.modifyBox=i,this.popup=this.build(),this.popup.style.transitionDuration="0s",setTimeout(()=>this.movePosition()),this.onTimingChange=this.updateValues.bind(this),this.clickOutside=s=>{this.popup.contains(s.target)||this.close()},K.on("timingModified",this.onTimingChange),Bt.activePopup?.persistent?e.popup=void 0:(document.getElementById("popups")?.appendChild(this.popup),this.moveInterval=setInterval(()=>this.movePosition(),150),Bt.activePopup?.close(),Bt.activePopup=this)}movePosition(){const e=this.timingBox.backgroundObj.getBounds(),t=e.left+e.width/2,i=Af[this.timingBox.event.type].width??150,s=i/2+15,n=window.innerWidth-i/2-15;this.popup.style.left=`${Be(t,s,n)}px`;const a=document.getElementById("pixi").offsetTop+9,o=e.top+a+e.height/2;this.popup.style.top=`${e.top+e.height+a}px`,o+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${e.top-e.height/2+a}px`),setTimeout(()=>this.popup.style.transitionDuration="",10)}build(){const e=Af[this.timingBox.event.type],t=document.createElement("div");t.classList.add("popup");const i=document.createElement("div");i.classList.add("popup-zoomer"),i.style.width=e.width?`${e.width}px`:"150px",i.style.backgroundColor=Gc(Hr[this.timingBox.event.type].toString(16).padStart(6,"0"),"#333333",.75),this.zoomer=i,t.appendChild(i);const s=document.createElement("div");if(s.innerText=e.title,s.classList.add("popup-title"),i.appendChild(s),e.description){const d=document.createElement("div");d.innerText=e.description,i.appendChild(d),d.classList.add("popup-desc")}const n=document.createElement("div");n.classList.add("popup-grid"),i.appendChild(n),e.rows.forEach(d=>n.append(...this.buildRow(d)));const a=document.createElement("div");a.innerText="click to edit",a.style.marginTop="4px",a.style.height="10px",i.appendChild(a),a.classList.add("popup-desc"),this.editText=a;const o=document.createElement("div");o.classList.add("popup-options");const l=document.createElement("button");l.innerText="Ok",l.onclick=()=>{this.close(),this.onConfirm(this.timingBox.event)},l.classList.add("confirm"),o.append(l);const c=document.createElement("button");return c.innerText="Delete",c.onclick=()=>{this.modifyBox||this.timingData.delete([{type:this.timingBox.event.type,[this.timingBox.event.type=="ATTACKS"?"second":"beat"]:this.timingBox.event.type=="ATTACKS"?this.timingBox.event.second:this.timingBox.event.beat}]),this.close()},c.classList.add("delete"),o.append(c),i.append(o),t}buildRow(e){const t=structuredClone(this.timingBox.event),i=document.createElement("div");i.innerText=e.label,i.classList.add("popup-label");const s=[];switch(s.push(i),e.input.type){case"spinner":{const n=ot.create(t[e.key],e.input.step,e.input.precision,e.input.min,e.input.max);n.onChange=a=>{a!==void 0&&this.modifyEvent(e.key,a)},this.rows.push({data:e,el:n}),s.push(n.view);break}case"text":{const n=document.createElement("input");n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{this.modifyEvent(e.key,n.value)},n.value=t[e.key],this.rows.push({data:e,el:n}),s.push(n);break}case"dropdown":{if(e.input.transformers){const n=e.input.transformers.deserialize,a=e.input.transformers.serialize,o=gi.create(e.input.items,a(t[e.key]));o.onChange(l=>{this.modifyEvent(e.key,n(l))}),this.rows.push({data:e,el:o}),s.push(o.view)}else{const n=gi.create(e.input.items,t[e.key]);n.onChange(a=>{this.modifyEvent(e.key,a)}),this.rows.push({data:e,el:n}),s.push(n.view)}break}case"checkbox":{const n=document.createElement("input");n.type="checkbox",n.checked=t[e.key],n.onchange=()=>{this.modifyEvent(e.key,n.checked)},this.rows.push({data:e,el:n}),s.push(n);break}}return s}modifyEvent(e,t){this.modifyBox?Object.assign(this.timingBox.event,{[e]:t}):this.timingData.modify([[structuredClone(this.timingBox.event),Object.assign(this.timingBox.event,{[e]:t})]])}updateValues(){const e=this.timingData.getEventAtBeat(this.timingBox.event.type,this.timingBox.event.beat,!1);if(!this.timingBox||!e||e.beat!=this.timingBox.event.beat){this.close();return}this.rows.forEach(t=>{switch(t.data.input.type){case"spinner":{t.el.setValue(e[t.data.key]);break}case"text":{t.el.value=e[t.data.key];break}case"dropdown":{const i=t.el;t.data.input.transformers?i.setSelected(t.data.input.transformers.serialize(e[t.data.key])):i.setSelected(e[t.data.key]);break}case"checkbox":{t.el.checked=e[t.data.key];break}}})}close(){this.persistent=!1,K.off("timingModified",this.onTimingChange),window.removeEventListener("click",this.clickOutside),clearInterval(this.moveInterval),this.popup.classList.add("exiting"),setTimeout(()=>this.popup.remove(),200),this.timingBox.popup=void 0,Bt.activePopup=void 0}select(){this.persistent=!0,this.zoomer.classList.add("selected"),this.editText.style.transform="scale(0)",this.editText.style.height="0px",setTimeout(()=>window.addEventListener("click",this.clickOutside),200)}detach(){clearInterval(this.moveInterval)}getEvent(){return this.cachedEvent}attach(e){clearInterval(this.moveInterval),this.moveInterval=setInterval(()=>this.movePosition(),150),this.timingBox=e,this.cachedEvent=this.timingBox.event}}const $c={fontName:"Main",fontSize:15},Dr={BPMS:55,STOPS:55,DELAYS:55,WARPS:55,FAKES:55,COMBOS:40,SPEEDS:80,LABELS:80,SCROLLS:55,TIMESIGNATURES:40,TICKCOUNTS:40,BGCHANGES:55,FGCHANGES:55,ATTACKS:55};class WC extends Ee{tracks=new Ee;renderer;timingBoxMap=new Map;wasEditingTiming=!1;boxPool=new ga({create:()=>{const e=new Ee;return e.textObj=new De("",$c),e.backgroundObj=new jt,e.selection=new jt("onlyBorder"),e.selection.tint=3841008,e.addChild(e.backgroundObj,e.textObj,e.selection),e}});ghostBox;timingDirty=!1;constructor(e){super(),this.renderer=e,this.boxPool.sortableChildren=!0,this.sortableChildren=!0,this.addChild(this.tracks,this.boxPool);const t=()=>this.timingDirty=!0;K.on("timingModified",t),this.on("destroyed",()=>K.off("timingModified",t))}update(e,t){this.renderer.chartManager.editTimingMode!=Ne.Add&&(this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0),this.updateTracks(),this.updateBoxes(e,t)}createTrack(e,t){const i=Object.assign(new Oe(ie.WHITE),{alpha:0,width:Dr[e],name:e,height:5e3,x:t,type:e,lastX:0,tint:2503250,targetAlpha:0});return i.anchor.y=.5,this.tracks.addChild(i),i}initializeBox(e,t){if(Rt.stop(e.animationId),Object.assign(e,{event:t,isChartTiming:this.renderer.chart.timingData.isPropertyChartSpecific(t.type),lastX:void 0,lastAnchor:void 0,animationId:void 0,zIndex:t.beat,eventMode:"static"}),e.textObj.text=this.getLabelFromEvent(t),e.textObj.anchor.set(.5,.55),e.backgroundObj.width=e.textObj.width+10,e.backgroundObj.height=25,e.backgroundObj.position.x=-e.backgroundObj.width/2,e.backgroundObj.position.y=-25/2,e.selection.width=e.textObj.width+10,e.selection.height=25,e.selection.position=e.backgroundObj.position,e.popup=void 0,Bt.activePopup){const i=Bt.activePopup.getEvent();i.type=="ATTACKS"&&t.type=="ATTACKS"&&i.second==t.second&&(Bt.activePopup.attach(e),e.popup=Bt.activePopup),i.type!="ATTACKS"&&t.type!="ATTACKS"&&i.type==t.type&&i.beat==t.beat&&(Bt.activePopup.attach(e),e.popup=Bt.activePopup)}}addDragListeners(e,t){e.on("mouseenter",()=>{e?.popup?.persistent!==!0&&(this.renderer.chartManager.eventSelection.timingEvents.length>0||this.renderer.isDragSelecting()||(e.popup?.close(),this.renderer.chartManager.getMode()==X.Edit&&(new Bt(e,this.getTargetTimingData(e.event.isChartTiming)),e.popup&&(e.popup.onConfirm=()=>{this.renderer.chartManager.removeEventFromSelection(t)}))))}),e.on("mouseleave",()=>{e?.popup?.persistent!==!0&&e.popup?.close()});let i=0,s;const n=a=>{const o=s,l=this.toLocal(a.global);if(Math.abs(l.y-i)<32){this.renderer.chartManager.eventSelection.shift&&(this.renderer.chartManager.eventSelection.shift={beatShift:0});return}e.popup?.close();const c=this.renderer.getBeatFromYPos(l.y),d=_.chart.snap==0?1/1e3:_.chart.snap;let h=Math.round(c/d)*d;Math.abs(h-c)>Math.abs(c-o.beat)&&(h=o.beat),this.renderer.chartManager.eventSelection.shift||={beatShift:0},this.renderer.chartManager.eventSelection.shift.beatShift=Math.max(-Math.min(...this.renderer.chartManager.eventSelection.timingEvents.map(u=>u.beat)),h-o.beat)};e.on("pointerdown",a=>{if(Uc(a)){this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t),Bt.activePopup?.close();return}if(a.stopImmediatePropagation(),this.renderer.chartManager.isEventInSelection(t)?(a.getModifierState("Control")||a.getModifierState("Meta"))&&this.renderer.chartManager.removeEventFromSelection(t):(!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")&&this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t)),this.renderer.chartManager.getMode()==X.Edit&&this.renderer.chartManager.eventSelection.timingEvents.length==1&&(e?.popup||(Bt.activePopup?.close(),new Bt(e,this.getTargetTimingData(e.event.isChartTiming)),e.popup.onConfirm=()=>{this.renderer.chartManager.removeEventFromSelection(t)})),e.popup&&!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")?e.popup.select():e.popup?.close(),i=e.y,s=t,this.renderer.chartManager.editTimingMode==Ne.Add)return;this.renderer.on("pointermove",n);const o=()=>{this.renderer.off("pointermove",n),this.renderer.off("pointerup",o),(this.renderer.chartManager.eventSelection.shift?.beatShift??0)!=0&&this.renderer.chartManager.modifyEventSelection(l=>(l.type=="ATTACKS"&&(l.second=this.renderer.chart.timingData.getSecondsFromBeat(l.beat+this.renderer.chartManager.eventSelection.shift.beatShift)),l.beat+=this.renderer.chartManager.eventSelection.shift.beatShift,l)),this.renderer.chartManager.eventSelection.shift=void 0};this.renderer.on("pointerup",o)})}updateTracks(){const e=_.chart.timingEventOrder.left,t=_.chart.timingEventOrder.right,i=this.renderer.chartManager.editTimingMode!=Ne.Off&&this.renderer.chartManager.getMode()==X.Edit;this.tracks.children.forEach(n=>n.visible=!1);let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;for(let n=e.length-1;n>=0;n--){const a=e[n],o=this.tracks.getChildByName(a)??this.createTrack(a,s);o.visible=!0,o.lastX!=s&&(o.lastX=s,o.targetAlpha=n%2==0?.1:0,Rt.animate(o,{0:{x:"inherit","anchor.x":"inherit"},1:{x:s,"anchor.x":1}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-x`),Rt.animate(o,{0:{alpha:"inherit"},1:{alpha:i?o.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-alpha`)),s-=Dr[a]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let n=0;n{},`track-${a}-x`),Rt.animate(o,{0:{alpha:"inherit"},1:{alpha:i?o.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-alpha`)),s+=Dr[a]}if(this.wasEditingTiming!=i){this.wasEditingTiming=i;for(const n of this.tracks.children)Rt.animate(n,{0:{alpha:"inherit"},1:{alpha:i?n.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${n.type}-alpha`)}}updateBoxes(e,t){this.timingDirty&&(this.timingBoxMap.clear(),this.boxPool.destroyAll(),this.timingDirty=!1);const i=this.renderer.chartManager.editTimingMode!=Ne.Off&&this.renderer.chartManager.getMode()==X.Edit;this.boxPool.visible=this.renderer.shouldDisplayBarlines(),this.ghostBox&&(this.ghostBox.visible=this.renderer.shouldDisplayBarlines()&&i);for(const n of this.renderer.chart.timingData.getTimingData()){if(tn.beat)&&!this.timingBoxMap.has(n)){const a=this.boxPool.createChild();if(!a)break;this.initializeBox(a,n),this.addDragListeners(a,n),this.timingBoxMap.set(n,a)}}const s={beat:-Number.MAX_SAFE_INTEGER,second:-Number.MAX_SAFE_INTEGER,leftOffset:0,rightOffset:0};for(const[n,a]of this.timingBoxMap.entries()){if(n.beatt||!_.chart.timingEventOrder.left.includes(n.type)&&!_.chart.timingEventOrder.right.includes(n.type)){this.timingBoxMap.delete(n),a.popup?.persistent?a.popup?.detach():a.popup?.close(),this.boxPool.destroyChild(a);continue}let o=0,l=0;const c=a.backgroundObj.width,d=_.chart.timingEventOrder.right.includes(n.type)?"right":"left";i?(o=this.tracks.getChildByName(n.type)?.x??a.x,o+=Dr[n.type]/2*(o>0?1:-1),l=.5):(o=(d=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80),d=="left"&&(o-=30),(s.beat!=n.beat||n.second&&s.second!=n.second)&&(s.leftOffset=0,s.rightOffset=0,s.beat=n.beat,s.second=n.second),d=="left"?(o-=s.leftOffset,s.leftOffset+=c+5):(o+=s.rightOffset,s.rightOffset+=c+5),l=d=="right"?0:1),a.lastX===void 0||a.lastAnchor===void 0?(a.x=o,a.pivot.x=(l-.5)*c):(a.lastX!=o||a.lastAnchor!=l)&&(a.animationId=Rt.animate(a,{0:{x:"inherit","pivot.x":"inherit"},1:{x:o,"pivot.x":(l-.5)*c}},.3,Zt(0,0,.16,1.01),()=>{},a.animationId)),a.lastX=o,a.lastAnchor=l,a.y=_.chart.CMod&&n.type=="ATTACKS"?this.renderer.getYPosFromSecond(n.second):this.renderer.getYPosFromBeat(n.beat);const h=this.renderer.chartManager.getMode()!=X.Play&&this.renderer.chartManager.isEventInSelection(n);if(a.backgroundObj.tint=h?Ld(Hr[n.type]??0,Math.sin(Date.now()/320)*.4+1.5):Hr[n.type]??0,a.selection.alpha=h?1:0,a.visible=!h||!this.renderer.chartManager.eventSelection.shift,this.renderer.chartManager.editTimingMode!=Ne.Off){const u=this.renderer.selectionTest(a);!h&&u&&this.renderer.chartManager.addEventToDragSelection(n),h&&!u&&this.renderer.chartManager.removeEventFromDragSelection(n)}}}updateGhostEvent(e){const t=_.chart.snap==0?.001:_.chart.snap,i=Math.round(this.renderer.getBeatFromYPos(e.y)/t)*t,s=this.ghostBox?.popup?this.ghostBox.event.type:this.getClosestTrack(e.x)?.name;if(!s){this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0;return}if(!this.ghostBox){const o=new Ee;o.textObj=new De("",$c),o.backgroundObj=new jt,o.selection=new jt("onlyBorder"),o.guideLine=new Oe(ie.WHITE),o.selection.tint=3841008,o.selection.alpha=0,o.addChild(o.guideLine,o.backgroundObj,o.textObj,o.selection),this.addChild(o),o.visible=this.renderer.shouldDisplayBarlines(),o.textObj.anchor.set(.5,.55),o.backgroundObj.height=25,o.selection.height=25,o.guideLine.height=1,o.guideLine.anchor.y=.5,this.ghostBox=o}!this.ghostBox?.popup&&(this.ghostBox.event?.beat!=i||this.ghostBox.event?.type!=s)&&(this.ghostBox.event=structuredClone(this.renderer.chart.timingData.getEventAtBeat(s,i))??this.renderer.chart.timingData.getDefaultEvent(s,i),this.ghostBox.event.beat=i,s=="ATTACKS"&&(this.ghostBox.event.second=this.renderer.chart.getSecondsFromBeat(i)),this.ghostBox.textObj.text=this.getLabelFromEvent(this.ghostBox.event),this.ghostBox.backgroundObj.width=this.ghostBox.textObj.width+10,this.ghostBox.selection.width=this.ghostBox.textObj.width+10),this.ghostBox.alpha=this.ghostBox?.popup?1:.4,this.ghostBox.selection.alpha=this.ghostBox?.popup?1:0,this.ghostBox.name=s;const n=this.renderer.getYPosFromBeat(this.ghostBox?.popup?this.ghostBox.event.beat:i);let a=this.tracks.getChildByName(s).x;a+=Dr[s]/2*(a>0?1:-1),this.ghostBox.position.x=a,this.ghostBox.backgroundObj.tint=Hr[s]??0,this.ghostBox.backgroundObj.position.x=-this.ghostBox.backgroundObj.width/2,this.ghostBox.backgroundObj.position.y=-25/2,this.ghostBox.guideLine.anchor.x=a<0?0:1,this.ghostBox.guideLine.width=Math.abs(this.ghostBox.position.x)+192-this.ghostBox.backgroundObj.width/2,this.ghostBox.guideLine.position.x=(a<0?1:-1)*this.ghostBox.backgroundObj.width/2,this.ghostBox.y=n,this.ghostBox.selection.position=this.ghostBox.backgroundObj.position}placeGhostEvent(){if(!this.ghostBox)return;const e=this.renderer.chart.timingData.getEventAtBeat(this.ghostBox.event.type,this.ghostBox.event.beat,!1);this.ghostBox.event.type=="ATTACKS"&&this.ghostBox.event.second==e?.second||this.ghostBox.event.type!="ATTACKS"&&this.ghostBox.event.beat==e?.beat||(this.renderer.chartManager.clearSelections(),this.ghostBox.event.isChartTiming=this.renderer.chart.timingData.isPropertyChartSpecific(this.ghostBox.event.type),new Bt(this.ghostBox,this.getTargetTimingData(this.ghostBox.event.isChartTiming),!0),this.ghostBox.popup?.select(),this.ghostBox.popup.onConfirm=t=>{this.getTargetTimingData(this.ghostBox.event.isChartTiming).insert([t])})}getClosestTrack(e){let t=Number.MAX_SAFE_INTEGER,i=this.tracks.children[0];for(const s of this.tracks.children){const n=Math.abs(s.x+(.5-s.anchor.x)*s.width-e);ni.width))return i}getLabelFromEvent(e){let t="";switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":t=ae(e.value,3).toString();break;case"SPEEDS":t=`${ae(e.value,3)}/${ae(e.delay,3)}/${e.unit}`;break;case"LABELS":t=e.value;break;case"TIMESIGNATURES":t=`${ae(e.upper,3)}/${ae(e.lower,3)}`;break;case"COMBOS":t=`${ae(e.hitMult,3)}/${ae(e.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":t=e.file;break;case"ATTACKS":t=`${e.mods}`}return t}getTargetTimingData(e){return e?this.renderer.chart.timingData:this.renderer.chart.timingData.simfileTimingData}}class zC extends Ee{children=[];renderer;timingBoxMap=new Map;trackPosCache=new Map;timingBoxPool=new ga({create:()=>{const e=new Ee;return e.guideLine=new Oe(ie.WHITE),e.textObj=new De("",$c),e.backgroundObj=new jt,e.addChild(e.guideLine,e.backgroundObj,e.textObj),e}});constructor(e){super(),this.renderer=e,this.timingBoxPool.sortableChildren=!0,this.addChild(this.timingBoxPool)}update(e,t){if(!this.renderer.chartManager.eventSelection.shift){this.timingBoxPool.destroyAll(),this.timingBoxMap.clear(),this.trackPosCache.clear();return}const i=this.renderer.chartManager.eventSelection.shift.beatShift;for(const s of this.renderer.chartManager.eventSelection.timingEvents)if(!(ts.beat+i)&&!this.timingBoxMap.has(s)){const n=this.timingBoxPool.createChild();if(!n)continue;this.timingBoxMap.set(s,n);let a="";switch(s.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":a=ae(s.value,3).toString();break;case"SPEEDS":a=`${ae(s.value,3)}/${ae(s.delay,3)}/${s.unit}`;break;case"LABELS":a=s.value;break;case"TIMESIGNATURES":a=`${ae(s.upper,3)}/${ae(s.lower,3)}`;break;case"COMBOS":a=`${ae(s.hitMult,3)}/${ae(s.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":a=s.file;break;case"ATTACKS":a=`${s.mods} (${s.endType}=${s.value})`}const o=_.chart.timingEventOrder.right.includes(s.type)?"right":"left";if(Object.assign(n,{alpha:.4,isChartTiming:this.renderer.chart.timingData.isPropertyChartSpecific(s.type),zIndex:s.beat}),n.textObj.text=a,n.textObj.anchor.set(.5,.55),n.backgroundObj.width=n.textObj.width+10,n.backgroundObj.height=25,n.backgroundObj.tint=Hr[s.type]??0,n.backgroundObj.position.x=-n.backgroundObj.width/2,n.backgroundObj.position.y=-n.backgroundObj.height/2,n.guideLine.height=1,n.guideLine.anchor.set(o=="left"?0:1,.5),n.guideLine.width=Math.abs(n.position.x)+192-n.backgroundObj.width/2,n.guideLine.position.x=(o=="left"?1:-1)*n.backgroundObj.width/2,this.renderer.chartManager.editTimingMode!=Ne.Off){let l=this.getTrackPos(s.type);l+=Dr[s.type]/2*(l>0?1:-1),n.position.x=l,n.pivot.x=0}else{let l=(o=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80);o=="left"&&(l-=30),n.position.x=l,n.pivot.x=o=="right"?-n.backgroundObj.width/2:n.backgroundObj.width/2}}for(const[s,n]of this.timingBoxMap.entries()){if(ts.beat+i){this.timingBoxPool.destroyChild(n),this.timingBoxMap.delete(s);continue}n.y=_.chart.CMod&&s.second?this.renderer.getYPosFromSecond(s.second):this.renderer.getYPosFromBeat(s.beat+i)}}getTrackPos(e){if(this.trackPosCache.has(e))return this.trackPosCache.get(e);const t=_.chart.timingEventOrder.left,i=_.chart.timingEventOrder.right;let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;for(let n=t.length-1;n>=0;n--){const a=t[n];this.trackPosCache.set(a,s),s-=Dr[a]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let n=0;n{if(this.editingCol!=-1){const a=_.chart.snap==0?.020833333333333332:_.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}};let i=0;const s=()=>{if(!this.chartManager.selection.shift&&!this.selectionBounds||i==0)return;const n=this.getYPosFromBeat(Math.max(0,this.chartManager.getBeat()+i));this.chartManager.setBeat(Math.max(0,this.chartManager.getBeat()+i)),this.selectionBounds&&(_.chart.reverse?this.selectionBounds.start.y-=_.chart.receptorYPos/_.chart.zoom+n:this.selectionBounds.start.y+=_.chart.receptorYPos/_.chart.zoom-n,this.selectionBoundary.update())};this.chartManager.app.ticker.add(s),window.addEventListener("keydown",t),this.on("destroyed",()=>{window.removeEventListener("keydown",t),this.removeAllListeners(),this.chartManager.app.ticker.remove(s)}),this.on("pointerdown",n=>{Uc(n)||this.chartManager.getMode()==X.Play||this.chartManager.getMode()==X.View||(this.chartManager.editTimingMode==Ne.Add&&this.lastMousePos?this.timingTracks.placeGhostEvent():this.chartManager.editTimingMode==Ne.Off&&_.chart.mousePlacement&&this.lastMouseBeat!=-1&&this.lastMouseCol!=-1&&!n.getModifierState("Shift")?(this.chartManager.clearSelections(),this.editingCol=this.lastMouseCol,this.chartManager.setNote(this.lastMouseCol,"mouse",this.lastMouseBeat)):(!n.getModifierState("Control")&&!n.getModifierState("Meta")&&!n.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager[this.chartManager.editTimingMode==Ne.Off?"startDragSelection":"startDragEventSelection"](),this.selectionBounds={start:this.toLocal(n.global),end:this.toLocal(n.global)},this.selectionBoundary.update()))}),this.on("mousemove",n=>{if(this.lastMousePos=this.toLocal(n.global),this.editingCol!=-1){const a=_.chart.snap==0?.020833333333333332:_.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}this.selectionBounds&&(this.selectionBounds.end=this.toLocal(n.global),this.selectionBoundary.update()),i=Math.max(0,this.lastMousePos.y-this.getLowerBound()+100)/600,this.lastMousePos.y<0&&(i=Math.min(0,this.lastMousePos.y-this.getUpperBound()-100)/600),_.chart.reverse&&(i=Math.max(0,this.getUpperBound()-this.lastMousePos.y+100)/600,this.lastMousePos.y>0&&(i=Math.min(0,this.getLowerBound()-this.lastMousePos.y-100)/600))}),this.on("pointerup",()=>{this.editingCol!=-1&&(this.chartManager.endEditing(this.editingCol),this.editingCol=-1),this.chartManager[this.chartManager.editTimingMode==Ne.Off?"endDragSelection":"endDragEventSelection"](),this.selectionBounds=void 0,this.selectionBoundary.update(),i=0})}isDragSelecting(){return!!this.selectionBounds}doJudgement(e,t,i){this.chartManager.getMode()==X.Play&&(this.judgement.doJudge(t,i),this.timingBar.addBar(t,i)),this.notefield.onJudgement(e.col,i)}startPlay(){this.notefield.startPlay()}endPlay(){this.notefield.endPlay(),this.timingBar.reset(),this.judgement.reset()}update(){if(this.destroyed)return;this.speedMult=_.chart.doSpeedChanges?this.getCurrentSpeedMult():1;const e=this.getTopOnScreenBeat(),t=this.getBottomOnScreenBeat(),i=Math.min(e,t),s=Math.max(e,t);if(this.scale.x=_.chart.zoom,this.scale.y=_.chart.zoom,this.children.forEach(n=>n.update(i,s)),this.notefield.alpha=this.chartManager.editTimingMode==Ne.Off||this.chartManager.getMode()==X.Play?1:.3,_.chart.mousePlacement&&this.lastMousePos&&this.chartManager.getMode()!=X.Play){const n=_.chart.snap==0?.020833333333333332:_.chart.snap,a=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/n)*n;let o=-1;for(let l=0;ld-c/2){o=l;break}}(a!=this.lastMouseBeat||o!=this.lastMouseCol||this.chartManager.getEditingNoteType()!=this.lastNoteType)&&(this.lastMouseBeat=a,this.lastMouseCol=o,this.lastNoteType=this.chartManager.getEditingNoteType(),this.editingCol!=-1&&this.chartManager.editHoldBeat(this.editingCol,a,!1),o===-1?(this.lastMouseBeat=-1,this.lastMouseCol=-1,this.notefield.setGhostNote()):this.notefield.setGhostNote(this.chart.computeNote({beat:a,col:this.lastMouseCol,type:this.chartManager.getEditingNoteType()})))}this.lastMousePos&&this.chartManager.editTimingMode==Ne.Add&&this.timingTracks.updateGhostEvent(this.lastMousePos)}getTimeWithOffset(){let e=this.chartManager.getTime();return(this.chartManager.getMode()==X.Play||this.chartManager.getMode()==X.Record)&&(e+=_.play.offset*_.audio.rate),e}getBeatWithOffset(){let e=this.chartManager.getBeat();return(this.chartManager.getMode()==X.Play||this.chartManager.getMode()==X.Record)&&(e=this.chart.getBeatFromSeconds(this.getTimeWithOffset())),e}getVisualTime(){let e=this.chartManager.getTime();return(this.chartManager.getMode()==X.Play||this.chartManager.getMode()==X.Record)&&(e+=(_.play.offset+_.play.visualOffset)*_.audio.rate),e}getVisualBeat(){let e=this.chartManager.getBeat();return(this.chartManager.getMode()==X.Play||this.chartManager.getMode()==X.Record)&&(e=this.chart.getBeatFromSeconds(this.getVisualTime())),e}getYPosFromBeat(e){const t=this.getVisualTime(),i=this.getVisualBeat(),s=_.chart.reverse?-1:1;return _.chart.CMod?(this.chart.getSecondsFromBeat(e)-t)*this.getSecondsToPixelsRatio()*s+this.getActualReceptorYPos():i==e?this.getActualReceptorYPos():(_.chart.doSpeedChanges?this.chart.timingData.getEffectiveBeat(e)-this.chart.timingData.getEffectiveBeat(i):e-i)*this.getEffectiveBeatsToPixelsRatio()*s+this.getActualReceptorYPos()}getYPosFromSecond(e){const t=this.getVisualTime(),i=_.chart.reverse?-1:1;return _.chart.CMod?(e-t)*this.getSecondsToPixelsRatio()*i+this.getActualReceptorYPos():this.getYPosFromBeat(this.chart.timingData.getBeatFromSeconds(e))}getSecondFromYPos(e){const t=_.chart.reverse?-1:1;if(_.chart.CMod){const i=this.getPixelsToSecondsRatio(),s=this.getVisualTime(),a=(e-this.getActualReceptorYPos())*i*t;return s+a}return this.chart.getSecondsFromBeat(this.getBeatFromYPos(e))}getBeatFromYPos(e,t){const i=this.getVisualBeat(),s=_.chart.reverse?-1:1;if(_.chart.CMod)return this.chart.getBeatFromSeconds(this.getSecondFromYPos(e));const a=(e-this.getActualReceptorYPos())*this.getPixelsToEffectiveBeatsRatio()*s;if(_.chart.doSpeedChanges&&!t){const o=this.chart.timingData.getEffectiveBeat(i)+a;return this.chart.getBeatFromEffectiveBeat(o)}return i+a}getColumnFromXPos(e){const t=this.chart.gameType;let i=null;for(let s=0;si)return s-1;i=n}return t.numCols-1}getActualReceptorYPos(){return _.chart.receptorYPos/_.chart.zoom*(_.chart.reverse?-1:1)}getEffectiveBeatsToPixelsRatio(){return _.chart.speed/100*64*this.speedMult}getPixelsToEffectiveBeatsRatio(){return 1/this.getEffectiveBeatsToPixelsRatio()}getSecondsToPixelsRatio(){return _.chart.speed/100*64*4}getPixelsToSecondsRatio(){return 1/this.getSecondsToPixelsRatio()}isNegScroll(e){return _.chart.doSpeedChanges&&(this.speedMult<0||(this.chart.timingData.getEventAtBeat("SCROLLS",e)?.value??1)<0||(this.chart.timingData.getEventAtBeat("BPMS",e)?.value??120)<0)}getUpperBound(){return-this.y/_.chart.zoom-64}getLowerBound(){return(this.chartManager.app.renderer.screen.height-this.y)/_.chart.zoom+64}findFirstOnScreenScroll(){const e=[...this.chart.timingData.getTimingData("SCROLLS")];e[0]?.beat!=0&&e.splice(0,0,{beat:0,value:e[0]?.value??1,type:"SCROLLS"});let t=Lt(e,this.getVisualBeat()-_.chart.maxDrawBeatsBack,i=>i.beat);for(;ts.beat);const i=Lt(e,this.getVisualBeat()-_.chart.maxDrawBeatsBack,s=>s.beat);for(;t>=i;){const s=e[t];t--;const n=s===void 0?-1/0*this.getScrollDirection(e[0]?.value??1):this.getYPosFromBeat(s.beat??0),a=e[t+2]===void 0?1/0*this.getScrollDirection(s.value):this.getYPosFromBeat(e[t+2].beat);if(this.isAreaOnScreen(n,a))return s}return{beat:0,value:1,type:"SCROLLS"}}getTopOnScreenBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=this.findFirstOnScreenScroll(),t=1/Math.abs(this.getEffectiveBeatsToPixelsRatio())*_.chart.zoom,i=this.getYPosFromBeat(e.beat),s=t/Math.abs(e.value)*_.chart.zoom,n=this.getScrollDirection(e.value),a=n==1?this.getUpperBound():this.getLowerBound(),o=n*(a-i)*s+e.beat;return Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,o)}return _.chart.CMod?this.getBeatFromYPos(this.getUpperBound()):Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,this.getBeatFromYPos(this.getUpperBound()))}getBottomOnScreenBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=this.findLastOnScreenScroll(),t=this.getCurrentSpeedMult(),i=100/_.chart.speed/Math.abs(t)/64/_.chart.zoom,s=this.getYPosFromBeat(e.beat),n=i/Math.abs(e.value)*_.chart.zoom,a=this.getScrollDirection(e.value),o=a==1?this.getLowerBound():this.getUpperBound(),l=a*(o-s)*n+e.beat;return Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,l)}return _.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}isAreaOnScreen(e,t){ti}getCurrentSpeedMult(){return this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime())}getScrollDirection(e){let t=1;return this.getCurrentSpeedMult()<0&&(t*=-1),_.chart.reverse&&(t*=-1),e<0&&(t*=-1),t}getUpperBoundBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=_.chart.speed,t=this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime()),i=t>=0!=_.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/_.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Lt(s,this.getVisualBeat()-_.chart.maxDrawBeatsBack,m=>m.beat);for(this.getVisualBeat()-_.chart.maxDrawBeatsBack0&&w>a&&(ga||!s[l-1]||s[l-1].beat0?s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)>f?this.getVisualBeat()-_.chart.maxDrawBeatsBack:Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,c+u*(f-d)):s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)=0!=_.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/_.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Lt(s,this.getVisualBeat()+_.chart.maxDrawBeats,m=>m.beat);for(;l=0&&(s[l].beat??0)>this.getVisualBeat()-_.chart.maxDrawBeatsBack;){const m=s[l],g=this.getYPosFromBeat(m?.beat??0),y=s[l+1]?.beat??this.getVisualBeat()+_.chart.maxDrawBeats,w=this.getYPosFromBeat(y);if((m?.value??1)*i>0&&go||!s[l+1]||s[l+1].beat>this.getVisualBeat()+_.chart.maxDrawBeatsBack||s[l+1].value==0)||(m?.value??1)*i<0&&g>o&&(wthis.getVisualBeat()+_.chart.maxDrawBeatsBack||s[l+1].value==0))break;l--}const c=s[l]?.beat??0,d=this.getYPosFromBeat(c),h=s[l]?.value??1,u=n/Math.abs(h)*_.chart.zoom,p=_.chart.reverse?o:a,f=_.chart.reverse?a:o;return h*i>0?s[l+1]?.value==0&&this.getYPosFromBeat(s[l+1].beat)p?this.getVisualBeat()+_.chart.maxDrawBeats:Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,c+u*(d-p))}return _.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}selectionTest(e){if(!this.selectionBounds)return!1;const t=this.selectionBoundary.getBounds(),i=e.getBounds(),s=16*_.chart.zoom;return t.x+t.width>i.x+s&&t.xi.y+s&&t.y{const d=o,h=this.toLocal(c.global);if(Math.abs(h.y-a-n)**2+Math.abs(h.x-s)**2<32*32){this.chartManager.selection.shift&&(this.chartManager.selection.shift={columnShift:0,beatShift:0});return}const u=this.getBeatFromYPos(h.y-a),p=_.chart.snap==0?1/48:_.chart.snap;let f=Math.round(u/p)*p;Math.abs(f-u)>Math.abs(u-d.beat)&&(f=d.beat);const m=this.getColumnFromXPos(h.x);this.chartManager.selection.shift||={columnShift:0,beatShift:0},i!=m-d.col&&(i=m-d.col,this.chartManager.selection.notes.every(g=>{const y=g.col+i;return y>=0&&yg.beat)),f-d.beat)};e.on("pointerdown",c=>{if(this.chartManager.getMode()==X.View)return;if(Uc(c)){this.chartManager.isNoteInSelection(t)||(this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),pC.open(this.chartManager.app,c),c.preventDefault();return}if(_.chart.mousePlacement&&!c.getModifierState("Meta")&&!c.getModifierState("Control")&&!c.getModifierState("Shift")&&!this.chartManager.isNoteInSelection(t))return;c.stopImmediatePropagation(),this.chartManager.isNoteInSelection(t)?(c.getModifierState("Control")||c.getModifierState("Meta"))&&this.chartManager.removeNoteFromSelection(t):(!c.getModifierState("Control")&&!c.getModifierState("Meta")&&!c.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),s=e.x,n=e.y,a=this.toLocal(c.global).y-e.y,o=t,this.on("pointermove",l);const d=()=>{this.off("pointermove",l),this.off("pointerup",d),((this.chartManager.selection.shift?.beatShift??0)!=0||(this.chartManager.selection.shift?.columnShift??0)!=0)&&this.chartManager.modifySelection(h=>(h.beat+=this.chartManager.selection.shift.beatShift,h.col+=this.chartManager.selection.shift.columnShift,h)),this.chartManager.selection.shift=void 0};this.on("pointerup",d)}),e.on("destroyed",()=>{e?.removeAllListeners()})}getNotefield(){return this.notefield}swapNoteskin(e){_.chart.noteskin.name=e,_.chart.lastNoteskins[this.chart.gameType.id]=e,this.reloadNotefield()}reloadNotefield(){const e=new Tf(this);this.addChildAt(e,this.children.indexOf(this.notefield)),this.notefield.destroy(),this.notefield=e}getSelectionBounds(){return this.selectionBounds}shouldDisplayBarlines(){return(this.chartManager.getMode()!=X.Play||!_.play.hideBarlines)&&Ie.barlines}}class Fd extends AudioBufferSourceNode{started=!1;start(e,t,i){this.started||super.start(e,t,i),this.started=!0}stop(e){this.started&&super.stop(e),this.started=!1}static create(e){const t=e;return t.started=!1,Object.setPrototypeOf(t,Fd.prototype),t}}class $C extends BiquadFilterNode{enabled=!1;static create(e){const t=e;return t.enabled=!1,t}}class fo{_audioAnalyzer;_filteredAudioAnalyzer;_freqData;_filteredFreqData;_gainNode;type;_audioContext=new AudioContext;_source;_playbackTime=0;_startTimestamp=0;_rate=1;_isPlaying=!1;_buffer;_filteredBuffer;_loadedBuffer;_delay;_loadListeners=[];_updateListeners=[];_volume=1;_destroyed=!1;_renderTimeout;_filters=[this.createFilter({type:"highpass",frequency:20,Q:.71}),this.createFilter({type:"lowshelf",frequency:75,gain:0}),this.createFilter({type:"peaking",frequency:100,gain:0,Q:.6}),this.createFilter({type:"peaking",frequency:250,gain:0,Q:.3}),this.createFilter({type:"peaking",frequency:1040,gain:0,Q:.41}),this.createFilter({type:"peaking",frequency:2500,gain:0,Q:.2}),this.createFilter({type:"highshelf",frequency:7500,gain:0}),this.createFilter({type:"lowpass",frequency:2e4,Q:.71})];_filtersEnabled=!1;loaded;constructor(e,t){this.type=t??"",this._filters[0].gain.value=-25,this._audioAnalyzer=this._audioContext.createAnalyser(),this._audioAnalyzer.fftSize=4096,this._audioAnalyzer.maxDecibels=0,this._freqData=new Uint8Array(this._audioAnalyzer.frequencyBinCount),this._filteredAudioAnalyzer=this._audioContext.createAnalyser(),this._filteredAudioAnalyzer.fftSize=4096,this._filteredAudioAnalyzer.maxDecibels=0,this._filteredFreqData=new Uint8Array(this._filteredAudioAnalyzer.frequencyBinCount),this._gainNode=this._audioContext.createGain(),this._buffer=this._audioContext.createBuffer(2,1,44100),this._filteredBuffer=this._audioContext.createBuffer(2,1,44100),this._loadedBuffer=this._audioContext.createBuffer(2,1,44100),this.initSource(),this.loaded=new Promise(i=>{e&&Se.create("Loading audio..."),this.decodeData(e).then(s=>{if(s)return this._loadedBuffer=s,Se.create("Loaded audio"),s}).then(async s=>(await this.renderBuffer(s),await this.renderFilteredBuffer(s),s)).catch(s=>{s.name=="EncodingError"?Se.createFormatted("Failed to load audio: file format not supported","error"):Se.createFormatted("Failed to load audio: "+s.message,"error")}).finally(()=>{this.initSource(),this.callLoadListeners(),this.callUpdateListeners(),i()})})}async renderBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();return i.buffer=e,i.connect(t.destination),i.start(),await t.startRendering().then(s=>{this._buffer=s}).catch(()=>{Se.createFormatted("Failed to load audio: audio rendering failed","error")})}async renderFilteredBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();i.buffer=e;let s=i;for(const n of this._filters){if(!n.enabled)continue;const a=t.createBiquadFilter();a.type=n.type,a.Q.setValueAtTime(n.Q.value,0),a.frequency.setValueAtTime(n.frequency.value,0),a.gain.setValueAtTime(n.gain.value,0),s.connect(a),s=a}return s.connect(t.destination),i.start(),await t.startRendering().then(n=>{this._filteredBuffer=n}).catch(()=>{Se.createFormatted("Failed to load audio: audio rendering failed","error")})}createFilter(e){const t=$C.create(this._audioContext.createBiquadFilter());return t.type=e.type,e.Q!==void 0&&(t.Q.value=e.Q),e.gain!==void 0&&(t.gain.value=e.gain),e.frequency!==void 0&&(t.frequency.value=e.frequency),t}getFilters(){return this._filters}getFilter(e){return this._filters[e]}updateFilter(e,t){this._filters[e]&&(t.Q!==void 0&&(this._filters[e].Q.value=t.Q),t.frequency!==void 0&&(this._filters[e].frequency.value=t.frequency),t.gain!==void 0&&(this._filters[e].gain.value=t.gain),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500))}enableFilter(e){this._filters[e].enabled=!0,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=!0}disableFilter(e){this._filters[e].enabled=!1,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=this._filters.some(t=>t.enabled)}hasFilters(){return this._filtersEnabled}onLoad(e){this._loadListeners.push(e)}offLoad(e){this._loadListeners=this._loadListeners.filter(t=>t!=e)}onUpdate(e){this._updateListeners.push(e)}offUpdate(e){this._updateListeners=this._updateListeners.filter(t=>t!=e)}getSongLength(){return this._buffer.length/this._buffer.sampleRate}getFrequencyData(){return this._destroyed?new Uint8Array:(this._audioAnalyzer.getByteFrequencyData(this._freqData),this._freqData)}getFilteredFrequencyData(){return this._destroyed?new Uint8Array:(this._filteredAudioAnalyzer.getByteFrequencyData(this._filteredFreqData),this._filteredFreqData)}getSampleRate(){return this._buffer.sampleRate}getFFTSize(){return this._audioAnalyzer.fftSize}getRawData(){if(this._destroyed)return[];const e=[];for(let t=0;ti.enabled)?this._filters.filter(i=>i.enabled).map(i=>{const s=new Float32Array(e.length);return i.getFrequencyResponse(t,s,new Float32Array(e.length)),[...s]}).reduce((i,s)=>i.map((n,a)=>n*s[a])):new Array(e.length).fill(1)}callLoadListeners(){this._loadListeners.forEach(e=>e())}callUpdateListeners(){this._updateListeners.forEach(e=>e())}async decodeData(e){return new Promise((t,i)=>{if(!e){t();return}(async()=>{try{t(await this._audioContext.decodeAudioData(e))}catch(s){if(this.type==".ogg"){const n=(await Ke(()=>import("./OggDec-2941c3fd.js"),[])).default;try{t(await n.decodeOggData(e))}catch(a){i(a)}return}i(s)}})()})}initSource(){for(const t of this._filters)t.disconnect();this._audioAnalyzer.disconnect(),this._filteredAudioAnalyzer.disconnect(),this._gainNode.disconnect(),this._audioContext.destination.disconnect(),this._source?.stop(),this._source=Fd.create(this._audioContext.createBufferSource()),this._source.buffer=this._buffer,this._source.connect(this._audioAnalyzer);let e=this._audioAnalyzer;for(const t of this._filters)t.enabled&&(e.connect(t),e=t);e.connect(this._filteredAudioAnalyzer),_.audio.allowFilter?this._filteredAudioAnalyzer.connect(this._gainNode):this._audioAnalyzer.connect(this._gainNode),this._gainNode.connect(this._audioContext.destination),this._source.playbackRate.value=this._rate,this._isPlaying&&(this.pause(),this.play())}volume(e){this._destroyed||this._volume!=e&&(this._volume=e,this._gainNode.gain.setValueAtTime(e,this._audioContext.currentTime))}rate(e){this._destroyed||this._rate!=e&&(this._rate=e,this._source&&(this._isPlaying&&(this._playbackTime+=(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value),this._startTimestamp=this._audioContext.currentTime,this._source.playbackRate.value=e))}play(){this._destroyed||this._source&&(this._isPlaying||(this.initSource(),this._playbackTime<=this._buffer.duration&&(this._playbackTime<0?(clearTimeout(this._delay),this._delay=setInterval(()=>{this.seek()>0&&(clearInterval(this._delay),this._source?.start(0,0))})):this._source.start(0,this._playbackTime)),this._startTimestamp=this._audioContext.currentTime,this._isPlaying=!0))}seek(e){if(!this._destroyed&&this._source){if(e===void 0)return this._isPlaying?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:this._playbackTime;this._isPlaying?(this.stop(),this._playbackTime=e,this.play()):this._playbackTime=e}}pause(){this._destroyed||this.stop(!0)}stop(e){this._destroyed||this._source&&this._isPlaying&&(clearTimeout(this._delay),this._isPlaying=!1,this._playbackTime<=this._buffer.duration&&this._source.stop(),this._playbackTime=e?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:0)}}class YC{judgementCounts=new Map;holdJudgementCounts=new Map;dancePoints=0;maxCumulativeDancePoints=0;maxDancePoints=0;chartManager;notedata;dataPoints=[];handlers=[];combo=0;missCombo=0;maxCombo=0;bestJudge;constructor(e){this.notedata=e.loadedChart.getNotedata(),this.chartManager=e,this.bestJudge=Je.getCollection(_.play.timingCollection).getStandardWindows()[0],this.calculateMaxDP()}onJudge(e){this.handlers.push(e)}applyOffset(e){this.dataPoints=this.dataPoints.map(t=>Pi(t.judgement)||!Zi(t.judgement)?t:{...t,error:t.error!==null?t.error+e:null})}addDataPoint(e,t,i){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1),this.dancePoints+=t.dancePoints;const s=this.chartManager.loadedChart.timingData.getEventAtBeat("COMBOS",e[0].beat),n=s?.hitMult??1,a=s?.missMult??1;_l(t)||(this.maxCumulativeDancePoints+=Je.getCollection(_.play.timingCollection).getMaxDancePoints()),Pi(t)?(this.chartManager.loadedChart.gameType.gameLogic.usesHoldTicks||(this.maxCumulativeDancePoints+=e.filter(Le).reduce((o,l)=>o+Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(l.type),0)),this.combo=0,this.missCombo+=a,this.bestJudge=void 0):Zi(t)&&(Je.getCollection(_.play.timingCollection).shouldHideNote(t)?(this.combo+=e.length*n,this.combo>this.maxCombo&&(this.maxCombo=this.combo),this.missCombo=0,this.bestJudge&&t.getTimingWindowMS()>this.bestJudge.getTimingWindowMS()&&(this.bestJudge=t)):(this.bestJudge=void 0,this.combo=0)),this.handlers.forEach(o=>o(i,t)),this.dataPoints.push({second:e[0].second,error:i,judgement:t,notes:e})}addHoldDataPoint(e,t){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1);const i=Je.getCollection(_.play.timingCollection).getHeldJudgement(e);this.holdJudgementCounts.has(i)||this.holdJudgementCounts.set(i,[0,0]);const s=this.holdJudgementCounts.get(i);ws(t)?s[0]++:s[1]++,this.holdJudgementCounts.set(i,s),this.dancePoints+=t.dancePoints,this.maxCumulativeDancePoints+=Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(e.type),this.handlers.forEach(n=>n(0,t)),bn(t)&&(this.bestJudge=void 0)}getScore(){return this.maxDancePoints==0?0:this.dancePoints/this.maxDancePoints}getCumulativeScore(){return this.maxCumulativeDancePoints==0?0:this.dancePoints/this.maxCumulativeDancePoints}getDataPoints(){return this.dataPoints}getMedian(){return xl(this.dataPoints.filter(e=>!Pi(e.judgement)&&Zi(e.judgement)&&e.error!=null).map(e=>e.error))}getMaxCombo(){return this.maxCombo}calculateMaxDP(){this.maxDancePoints=this.chartManager.loadedChart.gameType.gameLogic.calculateMaxDP(this.notedata,this.chartManager.loadedChart.timingData)}getCount(e){return this.judgementCounts.get(e)??0}getCombo(){return this.combo}getMissCombo(){return this.missCombo}getBestJudge(){return this.bestJudge}}const ai=[1,2,3,4,6,8,12,16,24,48,-1];var X=(r=>(r.View="View Mode",r.Edit="Edit Mode",r.Play="Play Mode",r.Record="Record Mode",r))(X||{}),Ne=(r=>(r[r.Off=0]="Off",r[r.Edit=1]="Edit",r[r.Add=2]="Add",r))(Ne||{});class sM{app;chartAudio=new fo;chartView;widgetManager;assistTick=new fs.Howl({src:BE,volume:.5});me_high=new fs.Howl({src:Ng,volume:.5});me_low=new fs.Howl({src:Ug,volume:.5});mine=new fs.Howl({src:RE,volume:.5});loadedSM;smPath="";loadedChart;selection={notes:[],inProgressNotes:[]};eventSelection={timingEvents:[],inProgressTimingEvents:[]};editTimingMode=0;beat=0;time=0;holdEditing=[];editNoteTypeIndex=0;partialScroll=0;noteIndex=0;lastMetronomeDivision=-1;lastMetronomeMeasure=-1;lastSong=null;mode="Edit Mode";lastMode="Edit Mode";noChartTextA;noChartTextB;loadingText;shiftPressed=0;virtualClipboard="";startRegion;endRegion;gameStats;constructor(e){this.app=e,document.addEventListener("keydown",i=>{i.key=="Shift"&&this.shiftPressed++}),document.addEventListener("keyup",i=>{i.key=="Shift"&&(this.shiftPressed=Math.max(this.shiftPressed-1,0))}),document.addEventListener("cut",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),this.eventSelection.timingEvents.length>0?this.deleteEventSelection():this.deleteSelection(),i.preventDefault()},!0),document.addEventListener("copy",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),i.preventDefault(),i.stopImmediatePropagation()},!0),document.addEventListener("paste",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=i.clipboardData?.getData("text/plain");s&&this.paste(s,this.shiftPressed>0),i.preventDefault(),i.stopImmediatePropagation()},!0),e.view.addEventListener?.("wheel",i=>{if(!(this.loadedSM==null||this.loadedChart==null||this.chartView==null))if(i.preventDefault(),Si&&i.metaKey||!Si&&i.ctrlKey){const s=i.deltaY/5*_.chart.scroll.scrollSensitivity*(_.chart.scroll.invertZoomScroll?-1:1);_.chart.speed=Be(_.chart.speed*Math.pow(1.01,s),10,35e3)}else{if(this.mode=="Play Mode"||this.mode=="Record Mode")return;let s=this.beat;const n=_.chart.snap,a=_.chart.speed*(_.chart.reverse&&_.chart.scroll.invertReverseScroll?-1:1),o=i.deltaY/a*_.chart.scroll.scrollSensitivity;if(n==0?(this.partialScroll=0,s=this.beat+o):_.chart.scroll.scrollSnapEveryScroll?i.deltaY<0?s=Math.round((this.beat-n)/n)*n:s=Math.round((this.beat+n)/n)*n:(this.partialScroll+=o,Math.abs(this.partialScroll)>n&&(this.partialScroll<0?s=Math.round((this.beat+Math.ceil(this.partialScroll/n)*n)/n)*n:s=Math.round((this.beat+Math.floor(this.partialScroll/n)*n)/n)*n,this.partialScroll%=n)),s=Math.max(0,s),s!=this.beat&&this.setBeat(s),!this.holdEditing.every(l=>l==null))for(let l=0;l{this.noChartTextB.tint=8952234}),this.noChartTextB.on("mouseleave",()=>{this.noChartTextB.tint=5596791}),this.noChartTextB.on("mousedown",()=>{this.app.windowManager.openWindow(new ry(e,We.getGameType("dance-single")))}),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.app.stage.addChild(this.noChartTextB),this.loadingText=new De("Loading simfile...",{fontName:"Main",fontSize:20}),this.loadingText.anchor.set(.5),this.loadingText.tint=5592405,this.app.stage.addChild(this.loadingText),this.loadingText.visible=!1;const t=()=>{this.noChartTextA.x=this.app.renderer.screen.width/2,this.noChartTextA.y=this.app.renderer.screen.height/2-20,this.noChartTextB.x=this.app.renderer.screen.width/2,this.noChartTextB.y=this.app.renderer.screen.height/2+10,this.loadingText.x=this.app.renderer.screen.width/2,this.loadingText.y=this.app.renderer.screen.height/2};t(),this.app.ticker.add(()=>{const i=performance.now();this.widgetManager.update(),this.loadedSM&&this.loadedChart&&this.chartView&&this.chartView.update(),ma.instance?.addDrawUpdateTimeValue(performance.now()-i)}),setInterval(()=>{if(!this.loadedSM||!this.loadedChart||!this.chartView)return;const i=performance.now(),s=this.chartAudio.seek();if(this.chartAudio.isPlaying()&&(this.setTime(s,!0),!this.holdEditing.every(d=>!d)))for(let d=0;d.3&&this.editHoldBeat(d,p,!1)}const n=this.loadedChart.getNotedata();let a=!1;for(;this.noteIndexn[this.noteIndex].second+_.play.effectOffset;)this.mode!="Record Mode"&&this.chartAudio.isPlaying()&&this.loadedChart.gameType.gameLogic.shouldAssistTick(n[this.noteIndex])&&(this.mode!="Play Mode"&&this.chartView.doJudgement(n[this.noteIndex],0,Yg),!a&&_.audio.assistTick&&Ie.assist&&(this.assistTick.play(),a=!0)),this.noteIndex++;const o=this.loadedChart.getBeatFromSeconds(this.time+_.play.effectOffset),l=Math.floor(this.loadedChart.timingData.getDivisionOfMeasure(o)),c=Math.floor(this.loadedChart.timingData.getMeasure(o));(c!=this.lastMetronomeMeasure||l!=this.lastMetronomeDivision)&&(this.lastMetronomeDivision=l,this.lastMetronomeMeasure=c,this.chartAudio.isPlaying()&&_.audio.metronome&&Ie.assist&&(l==0?this.me_high.play():this.me_low.play())),this.mode=="Play Mode"&&this.loadedChart.gameType.gameLogic.update(this),this.updateSoundProperties(),NS(),ma.instance?.addUpdateTimeValue(performance.now()-i)},5),K.on("resize",()=>{this.chartView&&(this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2),t()}),K.on("chartModified",()=>{this.loadedChart&&(this.loadedChart.recalculateStats(),K.emit("chartModifiedAfter"))}),window.addEventListener("keyup",i=>{if(this.mode=="Edit Mode"&&i.code.startsWith("Digit")){let s=parseInt(i.code.slice(5))-1;s==-1&&(s=9),this.endEditing(s)}},!0),window.addEventListener("keydown",i=>{const s=Re.getKeyNameFromCode(i.code);if(this.mode=="Edit Mode"&&!i.target.classList.contains("inlineEdit")&&!(i.target instanceof HTMLTextAreaElement)&&!(i.target instanceof HTMLInputElement)){if(i.code.startsWith("Digit")&&!i.repeat&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!i.ctrlKey){let n=parseInt(i.code.slice(5))-1;n==-1&&(n=9),n<(this.loadedChart?.gameType.numCols??4)&&(this.setNote(n,"key"),i.preventDefault(),i.stopImmediatePropagation())}if(!this.holdEditing.every(n=>n==null)){const n=["cursorUp","cursorDown","previousNote","nextNote","previousMeasure","nextMeasure","jumpChartStart","jumpChartEnd","jumpSongStart","jumpSongEnd"];for(const a of n)if(Re.getCombosForKeybind(a).map(o=>o.key).includes(s)){i.preventDefault(),i.stopImmediatePropagation(),Tt[a].callback(this.app);for(let o=0;oo.key).includes(s)){this.holdEditing=[];return}}}},!0),window.addEventListener("keydown",i=>{this.mode!="Play Mode"&&this.mode!="Record Mode"||i.key=="Escape"&&(this.setMode(this.lastMode),this.chartAudio.pause())},!0)}getBeat(){return this.beat}getTime(){return this.time}setBeat(e){this.loadedChart&&(this.beat=e,this.time=this.loadedChart.getSecondsFromBeat(this.beat),this.chartAudio.seek(this.time),this.getAssistTickIndex())}setTime(e,t){this.loadedChart&&(this.time=e,this.beat=this.loadedChart.getBeatFromSeconds(this.time),t||(this.chartAudio.seek(this.time),this.getAssistTickIndex()))}async loadSM(e){if(FS.close(),mt.instance.isDirty()){const s=new Tl(this.app,"Save","Do you wish to save the current file?",[{label:"Cancel",type:"default"},{label:"No",type:"default"},{label:"Yes",type:"confirm"}]);this.app.windowManager.openWindow(s);const n=await s.resolved;if(n=="Cancel")return;n=="Yes"&&this.save()}if(!e){this.smPath="",this.loadedSM=void 0,this.chartAudio.stop(),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.chartView?.destroy({children:!0});return}this.chartAudio.stop(),this.lastSong=null,this.smPath=e,this.time=0,this.beat=0,this.loadingText.visible=!0;const t=await Ue.getFileHandle(this.smPath);if(!t){Se.createFormatted("Couldn't load the file at "+this.smPath,"error"),this.app.windowManager.openWindow(new my(this.app)),this.loadingText.visible=!1;return}const i=await t.getFile();this.loadedSM=new dy(i),await this.loadedSM.loaded,this.loadingText.visible=!1,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,this.editTimingMode=0,K.emit("smLoaded"),await this.loadChart(),K.emit("smLoadedAfter"),this.time==0&&this.setBeat(0),hy.addSM(this.smPath,this.loadedSM)}async loadChart(e){if(this.loadedSM==null)return;if(e==null){if(this.loadedChart){const s=this.loadedSM.charts[this.loadedChart.gameType.id];s&&s.length>0&&(e=s.at(-1))}if(!e)for(const s of We.getPriority()){const n=this.loadedSM.charts[s.id];if(n&&n.length>0){e=n.at(-1);break}}if(!e){this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.beat=0,this.time=0,this.loadedChart=void 0,this.chartView=void 0,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,K.emit("chartLoaded"),K.emit("chartModified");return}}if(e==this.loadedChart)return;this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.clearSelections(),this.loadedChart=e,this.beat=this.loadedChart.getBeatFromSeconds(this.time),mt.instance.reset(),_.play.timingCollection=_.play.defaultTimingCollection[e.gameType.id]??"ITG";const t=We.getGameType(_.chart.noteskin.type),i={type:e.gameType.id,name:_.chart.lastNoteskins[e.gameType.id]??"default"};if(t){const s=nt.getNoteskinData(t,_.chart.noteskin.name);s?.gameTypes.includes(e.gameType.id)&&(i.name=s.id)}if(_.chart.noteskin=i,_.chart.lastNoteskins[e.gameType.id]=i.name,this.getAssistTickIndex(),this.chartView=new jC(this),this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2,(this.mode=="Play Mode"||this.mode=="Record Mode")&&this.setMode(this.lastMode),Ie.viewMode&&this.setMode("View Mode"),this.loadedChart.getMusicPath()!=this.lastSong){this.lastSong=this.loadedChart.getMusicPath();const s=this.chartAudio.isPlaying();await this.loadAudio(),K.emit("audioLoaded"),s&&this.chartAudio.play()}this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,Se.create("Loaded chart "+e.difficulty+" "+e.meter+" "+e.gameType.id),K.emit("chartLoaded"),K.emit("audioLoaded"),K.emit("chartModified"),this.loadedChart.gameType.id=="dance-single"?window.Parity=new cC(this.app,this.loadedChart.gameType.id):window.Parity=void 0,Ie.autoPlay&&this.playPause()}async loadAudio(){if(!this.loadedSM||!this.loadedChart)return;this.chartAudio.stop(),this.chartAudio?.destroy();const e=this.loadedChart.getMusicPath();if(e==""){Se.createFormatted("Failed to load audio: no audio file","error"),this.chartAudio=new fo(void 0);return}const t=await this.getAudioHandle(e);if(t==null){Se.createFormatted("Failed to load audio: couldn't find audio file "+e,"error"),this.chartAudio=new fo(void 0);return}const i=await t.getFile();this.chartAudio=new fo(await i.arrayBuffer(),$i(i.name)),this.chartAudio.seek(this.time),this.getAssistTickIndex()}async getAudioHandle(e){let t=await Ue.getFileHandleRelativeTo(this.smPath,e);if(t)return t;try{const i=await Ue.getDirectoryFiles(Ot(this.smPath));if(t=i.filter(s=>s.name.toLowerCase()==zi(e).toLowerCase())[0],t)return Se.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn"),t;t=i.filter(s=>fl.includes($i(s.name)))[0],t&&Se.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn")}catch{return}return t}getAudio(){return this.chartAudio}updateSoundProperties(){this.setEffectVolume(_.audio.soundEffectVolume*_.audio.masterVolume),this.setVolume(_.audio.songVolume*_.audio.masterVolume),this.setRate(_.audio.rate)}setRate(e){this.chartAudio.rate(e)}setVolume(e){this.chartAudio.volume(e)}setEffectVolume(e){this.assistTick.volume()!=e&&this.assistTick.volume(e),this.me_high.volume()!=e&&this.me_high.volume(e),this.me_low.volume()!=e&&this.me_low.volume(e),this.mine.volume()!=e&&this.mine.volume(e)}getAssistTickIndex(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null||this.loadedChart.getNotedata().length==0){this.noteIndex=0;return}this.noteIndex=Lt(this.loadedChart.getNotedata(),this.time,e=>e.second)+1,this.noteIndex>=1&&this.time<=this.loadedChart.getNotedata()[this.noteIndex-1].second&&this.noteIndex--}playPause(){this.chartAudio.isPlaying()?this.chartAudio.pause():this.chartAudio.play()}getClosestTick(e,t){if(!this.loadedChart)return 0;const i=Math.max(.001,4/t),s=this.loadedChart.timingData.getBeatOfMeasure(e),n=e-s,a=Math.round(s/i)*i;return Math.max(0,n+a)}snapToNearestTick(e){this.setBeat(Math.max(0,this.getClosestTick(e,4/_.chart.snap)))}snapToPreviousTick(){if(!this.loadedChart)return;const e=Math.max(.001,_.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),s=Math.floor((this.beat-i)/e)*e,n=Math.abs(s-(this.beat-i))<5e-4?s-e:s,a=n+i;if(n<0){const o=this.loadedChart.timingData.getBeatFromMeasure(t-1),l=Math.round((a-o)/e)*e;this.setBeat(Math.max(0,o+l));return}this.setBeat(Math.max(0,a))}snapToNextTick(){if(!this.loadedChart)return;const e=Math.max(.001,_.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),a=Math.floor((this.beat-i+5e-4)/e)*e+e+i,o=this.loadedChart.timingData.getBeatFromMeasure(t+1);if(a>o){this.setBeat(o);return}this.setBeat(a)}previousSnap(){let e=this.getSnapIndex()-1;e=(e+ai.length)%ai.length,_.chart.snap=ai[e]==-1?0:1/ai[e],K.emit("snapChanged")}nextSnap(){let e=this.getSnapIndex();(e==ai.length-1||Math.abs(1/_.chart.snap-ai[e])<=5e-4)&&e++,e=(e+ai.length)%ai.length,_.chart.snap=ai[e]==-1?0:1/ai[e],K.emit("snapChanged")}getSnapIndex(){return _.chart.snap==0?ai.length-1:ai.findIndex(e=>1/e<=_.chart.snap)}removeDuplicateBeats(e){if(e.length===0)return e;const t=[e[0]];for(let i=1;ii.beat+i.hold),t=this.loadedChart.getNotedata().map(i=>i.beat).concat(e).sort((i,s)=>i-s);return this.removeDuplicateBeats(t)}previousNote(){const e=this.getRows();if(e.length==0)return;let t=Lt(e,this.beat);this.beat==e[t]&&t--,this.setBeat(e[Math.max(0,t)])}nextNote(){const e=this.getRows();if(e.length==0)return;let t=Lt(e,this.beat);this.beat>=e[t]&&t++,this.setBeat(e[Math.min(e.length-1,t)])}firstNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();e.length!=0&&this.setBeat(e[0].beat)}lastNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();if(e.length==0)return;const t=e[e.length-1];this.setBeat(dr(t))}truncateHold(e,t){const i=Be(Math.round((t-Math.max(.020833333333333332,_.chart.snap))*48)/48,e.beat,e.beat+e.hold-.020833333333333332);return i==e.beat?{beat:e.beat,col:e.col,type:"Tap"}:{beat:e.beat,col:e.col,type:e.type,hold:i-e.beat}}setNote(e,t,i=this.beat){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;i=Math.max(0,Math.round(i*48)/48);const s=this.loadedChart.getNotedata().filter(o=>o.col!=e?!1:Math.abs(o.beat-i)<.003?!0:Le(o)&&o.beat==i),n=this.loadedChart.getNotedata().filter(o=>Le(o)&&o.col==e&&i>o.beat&&i<=o.beat+o.hold).map(o=>({oldNote:o,newNote:this.truncateHold(o,i)})),a={startBeat:i,endBeat:i,roll:!1,originalNote:void 0,type:t,removedNotes:s,truncatedHolds:n,direction:null};this.holdEditing[e]=a,s.length==0&&(a.originalNote={beat:i,col:e,type:this.getEditingNoteType()}),this.getAssistTickIndex(),this.app.actionHistory.run({action:()=>{a.removedNotes.forEach(o=>{this.loadedChart.removeNote(o),this.removeNoteFromSelection(o)}),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.oldNote,o.newNote)),a.originalNote&&this.loadedChart.addNote(a.originalNote)},undo:()=>{a.originalNote&&this.loadedChart.removeNote(a.originalNote),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.newNote,o.oldNote)),a.removedNotes.forEach(o=>this.loadedChart.addNote(o))}})}editHoldBeat(e,t,i){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const s=this.holdEditing[e];if(s==null||t==s.startBeat&&t==s.endBeat)return;if(s.direction===null&&(ta.beat==s.originalNote.beat&&a.col==s.originalNote.col||a.col!=e?!1:a.beat>=s.startBeat&&a.beat<=s.endBeat?!0:Le(a)&&a.beat+a.hold>=s.startBeat&&a.beat+a.hold<=s.endBeat);s.removedNotes=s.removedNotes.concat(n),n.forEach(a=>this.loadedChart.removeNote(a)),this.getAssistTickIndex()}endEditing(e){this.holdEditing[e]=void 0}previousNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex-1+e)%e}nextNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex+1+e)%e}getEditingNoteType(){return this.loadedChart?.gameType.editNoteTypes[this.editNoteTypeIndex]??null}setEditingNoteType(e){if(!this.loadedChart)return;const i=(this.loadedChart?.gameType.editNoteTypes).indexOf(e);i!=-1&&(this.editNoteTypeIndex=i)}getMode(){return this.mode}setMode(e){if(!this.loadedChart||!this.chartView)return;if(this.mode==e){(e=="Play Mode"||e=="Record Mode")&&(this.setMode(this.lastMode),this.getAssistTickIndex(),this.chartAudio.pause());return}(this.mode=="View Mode"||this.mode=="Edit Mode")&&(this.lastMode=this.mode),this.mode=e;const t=this.loadedChart.getNotedata();if(this.mode=="Play Mode"){t.forEach(i=>{i.gameplay={hideNote:!1,hasHit:!1}});for(const i of t)if(i.secondi.gameplay=void 0))}judgeCol(e){if(!(!this.loadedChart||!this.chartView)){if(this.mode=="Play Mode")this.loadedChart.gameType.gameLogic.keyDown(this,e);else if(this.mode=="Record Mode"){const t=this.loadedChart.getBeatFromSeconds(this.time+_.play.offset),i=_.chart.snap==0?1/48:_.chart.snap,s=Math.round(t/i)*i;this.setNote(e,"key",s)}}}judgeColUp(e){!this.loadedChart||!this.chartView||(this.mode=="Play Mode"?this.loadedChart.gameType.gameLogic.keyUp(this,e):this.mode=="Record Mode"&&this.endEditing(e))}async save(){if(!this.loadedSM)return;let e,t;if(window.nw){const s=window.nw.require("path"),n=s.parse(this.smPath);e=s.resolve(n.dir,n.name+".sm"),t=s.resolve(n.dir,n.name+".ssc")}else{const s=Ot(this.smPath),n=zi(this.smPath),a=n.includes(".")?n.split(".").slice(0,-1).join("."):n;e=s+"/"+a+".sm",t=s+"/"+a+".ssc"}let i=null;!this.loadedSM.usesChartTiming()&&await Ue.getFileHandle(e)&&await Ue.writeFile(e,this.loadedSM.serialize("sm")).catch(s=>{const n=s.message;n.includes(qo.GONE[0])||(i=n)}),(this.loadedSM.requiresSSC()||await Ue.getFileHandle(t))&&await Ue.writeFile(t,this.loadedSM.serialize("ssc")).catch(s=>{const n=s.message;n.includes(qo.GONE[0])||(i=n)}),i==null?this.loadedSM.usesChartTiming()?Se.create("Saved. No SM file since split timing was used."):Se.create("Saved"):Se.createFormatted("Failed to save file: "+i,"error"),mt.instance.setLimit()}hasSelection(){return this.hasNoteSelection()||this.hasEventSelection()}hasNoteSelection(){return this.selection.notes.length>0||this.startRegion!==void 0&&this.endRegion!==void 0}hasEventSelection(){return this.eventSelection.timingEvents.length>0}hasRange(){return this.selection.notes.length>1||this.eventSelection.timingEvents.length>1||this.startRegion!==void 0&&this.endRegion!==void 0}clearSelections(){this.selection={notes:[],inProgressNotes:[]},this.eventSelection={timingEvents:[],inProgressTimingEvents:[]}}startDragSelection(){this.selection.inProgressNotes=[]}endDragSelection(){let e=0,t=0;const i=[],s=this.selection.inProgressNotes,n=this.selection.notes,a=(o,l)=>o.beat==l.beat?o.col-l.col:o.beat-l.beat;if(s.length==0||n.length==0){this.selection.notes=s.concat(n),this.selection.inProgressNotes=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.selection.notes=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.selection.notes=i.concat(s.slice(e));break}this.selection.inProgressNotes=[]}startDragEventSelection(){this.eventSelection.inProgressTimingEvents=[]}endDragEventSelection(){let e=0,t=0;const i=[],s=this.eventSelection.inProgressTimingEvents,n=this.eventSelection.timingEvents,a=(o,l)=>o.beat-l.beat;if(s.length==0||n.length==0){this.eventSelection.timingEvents=s.concat(n),this.eventSelection.inProgressTimingEvents=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.eventSelection.timingEvents=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.eventSelection.timingEvents=i.concat(s.slice(e));break}this.eventSelection.inProgressTimingEvents=[]}addNoteToDragSelection(e){this.addNoteSelection(this.selection.inProgressNotes,e)}removeNoteFromDragSelection(e){this.removeNoteSelection(this.selection.inProgressNotes,e)}addEventToDragSelection(e){this.addEventSelection(this.eventSelection.inProgressTimingEvents,e)}removeEventFromDragSelection(e){this.removeEventSelection(this.eventSelection.inProgressTimingEvents,e)}addNoteToSelection(e){this.addNoteSelection(this.selection.notes,e)}removeNoteFromSelection(e){this.removeNoteSelection(this.selection.notes,e)}setNoteSelection(e){this.selection.inProgressNotes=[],this.selection.notes=[...e].sort((t,i)=>t.beat==i.beat?t.col-i.col:t.beat-i.beat)}addEventToSelection(e){this.addEventSelection(this.eventSelection.timingEvents,e)}removeEventFromSelection(e){this.removeEventSelection(this.eventSelection.timingEvents,e)}setEventSelection(e){this.eventSelection.inProgressTimingEvents=[],this.eventSelection.timingEvents=e.sort((t,i)=>t.beat-i.beat)}isNoteInSelection(e){return this.getNoteSelectionIndex(this.selection.notes,e)!=-1||this.getNoteSelectionIndex(this.selection.inProgressNotes,e)!=-1}isEventInSelection(e){return this.getEventSelectionIndex(this.eventSelection.timingEvents,e)!=-1||this.getEventSelectionIndex(this.eventSelection.inProgressTimingEvents,e)!=-1}addNoteSelection(e,t){let i=io(e,t.beat,s=>s.beat);for(;e[i]&&(e[i].beats.beat);for(;e[i]&&e[i].beat==t.beat;){if(jp(e[i],t))return i;i++}return-1}addEventSelection(e,t){let i=io(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat<=t.beat;)i++;e.splice(i,0,t)}removeEventSelection(e,t){const i=this.getEventSelectionIndex(e,t);i!=-1&&e.splice(i,1)}getEventSelectionIndex(e,t){let i=io(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat==t.beat;){if(jp(e[i],t))return i;i++}return-1}selectRegion(){if(this.loadedChart){if(this.endRegion!==void 0&&(this.startRegion=void 0,this.endRegion=void 0),this.startRegion===void 0){this.clearSelections(),this.startRegion=this.beat;return}this.endRegion=this.beat,this.endRegione.beat>=this.startRegion&&e.beat<=this.endRegion)):this.setEventSelection(ur.flatMap(e=>this.loadedChart.timingData.getColumn(e).events).filter(e=>e.beat>=this.startRegion&&e.beat<=this.endRegion))}}modifySelection(e){if(!this.loadedChart)return;const t=this.selection.notes,i=structuredClone(this.selection.notes).map(e).sort((o,l)=>o.beat==l.beat?o.col-l.col:o.beat-l.beat);if(i.length==0)return;const s=[];for(const o of i){const l=s.at(-1);l!==void 0&&l.beat==o.beat&&l.col==o.col||s.push(o)}if(s.length==0)return;const{removedNotes:n,truncatedHolds:a}=this.checkConflicts(s,t);this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(t.concat(n),!1),a.forEach(o=>this.loadedChart.modifyNote(o.oldNote,o.newNote,!1)),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(s))},undo:()=>{this.loadedChart.removeNotes(s,!1),a.forEach(o=>this.loadedChart.modifyNote(o.newNote,o.oldNote,!1)),this.loadedChart.addNotes(n,!1),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(t))}})}checkConflicts(e,t=[]){if(e.length==0)return{removedNotes:[],truncatedHolds:[]};const i=this.loadedChart.getNotedata(),s=this.loadedChart.gameType.numCols,n=new Array(s).fill(0).map(d=>[]);for(const d of i)n[d.col].push(d);const a=new Array(s).fill(0).map(d=>[]);for(const d of e)d.col>s||a[d.col].push(d);const o=[],l=[],c=[];for(let d=0;da[d][0].beat<=(Le(u)?u.beat+u.hold:u.beat));for(const u of a[d])for(;n[d][h];){const p=n[d][h],f=Le(u)?u.beat+u.hold:u.beat;if(!t.includes(p)&&!c.includes(p)&&(u.beat<=p.beat&&f>=p.beat?(c.push(p),o.push(p)):Le(p)&&p.beat+p.hold>=u.beat&&p.beatf)break;h++}}return o.sort((d,h)=>d.beat==h.beat?d.col-h.col:d.beat-h.beat),l.sort((d,h)=>d.newNote.beat==h.newNote.beat?d.newNote.col-h.newNote.col:d.newNote.beat-h.newNote.beat),{removedNotes:o,truncatedHolds:l}}modifyEventSelection(e){!this.loadedChart||!this.loadedSM||this.loadedChart.timingData.modify(this.eventSelection.timingEvents.map(t=>[t,e(structuredClone(t))]))}deleteSelection(){if(this.selection.notes.length==0)return;const e=this.selection.notes;this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(e),this.clearSelections()},undo:()=>{this.selection.notes=this.loadedChart.addNotes(e)}})}deleteEventSelection(){this.eventSelection.timingEvents.length!=0&&(!this.loadedChart||!this.loadedSM||this.loadedChart.timingData.delete(this.eventSelection.timingEvents))}paste(e,t=!1){if(this.loadedChart&&(e.startsWith("ArrowVortex:notes:")&&(this.pasteNotes(e,t)||this.pasteNotes(this.virtualClipboard,t)),e.startsWith("ArrowVortex:tempo:")||e.startsWith("SMEditor:tempo:"))){this.pasteTempo(e)||this.pasteTempo(this.virtualClipboard);return}}pasteNotes(e,t=!1){if(!this.loadedChart)return!0;const i=KS(e);return!i||i.length==0?!1:(this.insertNotes(i.map(s=>(s.beat+=this.beat,s.beat=Math.round(s.beat*48)/48,s)),t),!0)}insertNotes(e,t=!1){e.sort((n,a)=>n.beat==a.beat?n.col-a.col:n.beat-a.beat);const{removedNotes:i,truncatedHolds:s}=this.checkConflicts(e);if(t){const n=e.map(d=>dr(d));let a=0;for(const d of n)d>a&&(a=d);const o=new Array(this.loadedChart.gameType.numCols).fill(0).map((d,h)=>({type:"Hold",hold:a-e[0].beat,col:h,beat:e[0].beat})),{removedNotes:l,truncatedHolds:c}=this.checkConflicts(o);l.forEach(d=>{i.includes(d)||i.push(d)}),c.forEach(d=>{const h=s.find(u=>u.oldNote==d.oldNote);if(h){const u=Le(h.newNote)?h.newNote.hold:0,p=Le(h.newNote)?h.newNote.hold:0,f=Math.min(u,p);f==0?h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:"Tap"}:h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:h.newNote.type,hold:f}}}),i.sort((d,h)=>d.beat==h.beat?d.col-h.col:d.beat-h.beat),s.sort((d,h)=>d.newNote.beat==h.newNote.beat?d.newNote.col-h.newNote.col:d.newNote.beat-h.newNote.beat)}this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(i,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.oldNote,n.newNote,!1)}),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(e))},undo:()=>{this.loadedChart.removeNotes(e,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.newNote,n.oldNote,!1)}),this.setNoteSelection(this.loadedChart.addNotes(i)),this.clearSelections()}})}pasteTempo(e){if(!this.loadedChart||!this.loadedSM)return!0;const t=rC(e);if(!t||t.length==0)return!1;const i=this.loadedChart.timingData;return t.forEach(s=>{s.type=="ATTACKS"?s.second+=this.time:s.beat+=this.beat}),t.forEach(s=>s.isChartTiming=i.isPropertyChartSpecific(s.type)),i.insert(t),!0}copy(){if(this.selection.notes.length!=0){const e=Math.min(...this.selection.notes.map(s=>s.beat)),t=structuredClone(this.selection.notes).map(s=>(s.beat-=e,s)).sort((s,n)=>s.beat==n.beat?s.col-n.col:s.beat-n.beat),i=ZS(t);return this.virtualClipboard=i,i}else if(this.eventSelection.timingEvents.length!=0){const e=Math.min(...this.eventSelection.timingEvents.map(n=>n.beat)),t=this.loadedChart.timingData.getSecondsFromBeat(e),i=structuredClone(this.eventSelection.timingEvents).map(n=>n.type=="ATTACKS"?(n.second-=t,n):(n.beat-=e,n)).sort((n,a)=>n.type!=a.type?n.type.localeCompare(a.type):n.type=="ATTACKS"?n.second-a.second:n.beat-a.beat),s=eC(i);return this.virtualClipboard=s,s}}}export{id as $,mt as A,jt as B,pC as C,ma as D,K as E,Ie as F,We as G,Oe as H,Ae as I,ke as J,Tt as K,Rt as L,$n as M,nt as N,_ as O,Zt as P,Me as Q,sd as R,dy as S,Qe as T,Gr as U,Rd as V,Se as W,Ty as X,Be as Y,ZC as Z,rM as _,Re as a,bm as a0,ze as a1,Wt as a2,X0 as a3,qo as a4,kE as a5,Wr as a6,wn as a7,Ke as a8,Ee as b,Et as c,sM as d,$i as e,Ue as f,ya as g,my as h,KC as i,Cr as j,dl as k,tM as l,B as m,kd as n,FS as o,iM as p,gi as q,yS as r,ie as s,Pt as t,Pe as u,Ji as v,Ft as w,JC as x,Xi as y,Ac as z}; +end`,n.box.tint==16777215&&(n.box.tint=8978431),n.text.tint=8978431)}this.receptors.y=this.renderer.getActualReceptorYPos(),this.topBound.y=this.renderer.getUpperBound(),this.bottomBound.y=this.renderer.getLowerBound(),this.topBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()-_.chart.maxDrawBeatsBack),this.bottomBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()+_.chart.maxDrawBeats),this.topScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getTopOnScreenBeat()),this.bottomScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getBottomOnScreenBeat()),this.topScreenBeatText.y=this.topScreenBeat.y,this.topScreenBeatText.text=ae(this.renderer.getTopOnScreenBeat(),3)+"",this.bottomScreenBeatText.y=this.bottomScreenBeat.y,this.bottomScreenBeatText.text=ae(this.renderer.getBottomOnScreenBeat(),3)+""}inBounds(e){const t=this.renderer.chartManager.app.renderer.screen.height/this.scale.y;return Math.abs(e)this.renderer.getVisualBeat()),this.trackVariable(()=>this.renderer.getVisualTime()),this.trackVariable(()=>_.chart.speed),this.trackVariable(()=>this.getSpeed(),s=>{this.speed=s,clearTimeout(this.lastSpeedTimeout),this.lastSpeedTimeout=setTimeout(()=>{this.blockCache.clear(),this.lastSpeed=this.speed,this.drawDirty=!0},200)}),this.trackVariable(()=>_.chart.zoom),this.trackVariable(()=>_.chart.CMod),this.trackVariable(()=>_.chart.doSpeedChanges),this.trackVariable(()=>_.chart.waveform.allowFilter),this.trackVariable(()=>_.chart.reverse),this.trackVariable(()=>_.chart.waveform.antialiasing,s=>{this.filters=s?[new gc]:[]}),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.width,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.height,()=>this.resizeWaveform()),this.trackVariable(()=>_.chart.waveform.filteredColor),this.trackVariable(()=>_.chart.waveform.color),this.trackVariable(()=>_.chart.waveform.speedChanges),this.trackVariable(()=>_.chart.receptorYPos),this.trackVariable(()=>_.chart.waveform.lineHeight,()=>{_.chart.waveform.lineHeight<=0&&(_.chart.waveform.lineHeight=1),this.updateLineHeight()}),this.trackVariable(()=>_.chart.zoom,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.chartAudio.hasFilters()),this.anchor.set(.5),this.renderer.chartManager.chartAudio.onUpdate(()=>this.getData()),this.getData(),this.resizeWaveform(),this.filters=_.chart.waveform.antialiasing?[new gc]:[];const t=()=>this.drawDirty=!0,i=()=>{this.getData(),this.resizeWaveform(),this.renderer.chartManager.chartAudio.onUpdate(()=>this.getData())};q.on("timingModified",t),this.on("destroyed",()=>{q.off("timingModified",t)}),q.on("audioLoaded",i),this.on("destroyed",()=>{q.off("audioLoaded",i)})}getData(){this.rawData=this.renderer.chartManager.chartAudio.getRawData(),this.filteredRawData=this.renderer.chartManager.chartAudio.getFilteredRawData(),this.sampleRate=this.renderer.chartManager.chartAudio.getSampleRate(),this.blockCache.clear(),this.drawDirty=!0}resizeWaveform(){this.waveformTex.resize(Be((this.rawData?.length??0)*288*_.chart.zoom,1,this.renderer.chartManager.app.renderer.screen.width),this.renderer.chartManager.app.renderer.screen.height)}update(){this.visible=_.chart.waveform.enabled&&this.renderer.shouldDisplayBarlines(),_.chart.waveform.enabled&&((this.drawDirty||this.variableChanged())&&(this.colorCache.toHexa()!=_.chart.waveform.color&&(this.colorCache=pa(_.chart.waveform.color)),this.filteredColorCache.toHexa()!=_.chart.waveform.filteredColor&&(this.filteredColorCache=pa(_.chart.waveform.filteredColor)),this.drawDirty=!1,this.renderData(),this.renderer.chartManager.app.renderer.render(this.lineContainer,{renderTexture:this.waveformTex})),this.scale.set(1/_.chart.zoom))}trackVariable(e,t){this.trackedVariables.set(e,{value:e(),cb:t})}variableChanged(){let e=!1;for(const[t,i]of this.trackedVariables.entries())t()!=i.value&&(this.trackedVariables.get(t).value=t(),this.trackedVariables.get(t).cb?.(t()),e=!0);return e}getSample(e,t,i){if(t<0)return 0;const s=this.sampleRate/(this.lastSpeed*4),n=Math.floor(t*this.lastSpeed*4);if(this.blockCache.get(i)?.[n]!==void 0)return this.blockCache.get(i)[n];const a=Math.floor(n*s),o=e.slice(a,Math.floor(a+s)).reduce((l,c)=>l+Math.abs(c),0)/s;return this.blockCache.has(i)||this.blockCache.set(i,[]),this.blockCache.get(i)[n]=o,o}renderData(){this.resetPool();const e=_.chart.waveform.allowFilter&&this.renderer.chartManager.chartAudio.hasFilters(),t={data:{bpms:[],bpmIndex:0,timing:[],timingIndex:0,offset:0,lastBeat:-999,timingData:null},init(i){if(this.data.bpms=i.getTimingData("BPMS"),this.data.timing=i.getBeatTiming(),this.data.offset=i.getOffset(),this.data.bpms[0]?.beat!==0){const s=this.data.bpms[0]??{value:120,type:"BPMS",beat:0};s.beat=0,this.data.bpms.unshift(s)}this.data.timing.length==0&&this.data.timing.unshift({beat:0,secondBefore:-this.data.offset,secondAfter:-this.data.offset,secondClamp:-this.data.offset,secondOf:-this.data.offset,warped:!1,bpm:120}),this.data.timingData=i},getBPM(i){for(;i>this.data.bpms[this.data.bpmIndex+1]?.beat;)this.data.bpmIndex++;return this.data.bpms[this.data.bpmIndex].value},getSecond(i){const s=Math.floor(i*1e3)/1e3;if(i<=0)return-this.data.offset+i*60/this.getBPM(i);if(s>=this.data.timing[this.data.timingIndex+1]?.beat){for(;s>=this.data.timing[this.data.timingIndex+1]?.beat;)this.data.timingIndex++;return this.data.timingData.getSecondsFromBeat(i)}else{const n=this.data.timing[this.data.timingIndex];let o=(i-n.beat)*60/n.bpm;return n.warped&&(o=0),Math.max(n.secondClamp,n.secondAfter+o)}}};if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const i=_.chart.speed,s=this.renderer.getCurrentSpeedMult(),n=this.renderer.getTopOnScreenBeat(),a=this.renderer.getBottomOnScreenBeat(),o=Math.min(n,a),l=Math.max(n,a),c=this.renderer.findFirstOnScreenScroll(),d=this.renderer.findLastOnScreenScroll(),h=[...this.renderer.chart.timingData.getTimingData("SCROLLS")];h[0]?.beat!=0&&h.unshift({type:"SCROLLS",beat:0,value:h[0]?.value??1}),t.init(this.renderer.chart.timingData);const u=h.findIndex(b=>b.beat==c.beat),p=h.findIndex(b=>b.beat==d.beat),f=100/i/Math.abs(s)/64/_.chart.zoom,m=this.renderer.chartManager.app.renderer.screen.height;let g=o,y=Math.round(this.renderer.getYPosFromBeat(g)*_.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);for(const b of h.slice(u,p+1)){if(b.value==0)continue;const v=f/Math.abs(b.value);b.beat!=c.beat?g=b.beat:g=Math.round((g-b.beat)/v)*v+b.beat,y=Math.round(this.renderer.getYPosFromBeat(g)*_.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);const E=this.renderer.getScrollDirection(b.value),C=h[h.indexOf(b)+1]?.beat??Number.MAX_VALUE;for(;gm){if(E>0){g=C;break}g+=v*(y-m),y=m;continue}g+=v*_.chart.waveform.lineHeight,y+=E*_.chart.waveform.lineHeight,w=t.getSecond(g),this.drawLine(w,y,e)}}}else if(_.chart.CMod){let i=this.renderer.getSecondFromYPos((-this.parent.y+(_.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/_.chart.zoom);const s=this.renderer.getPixelsToSecondsRatio()/_.chart.zoom;i=Math.floor(i/s)*s;const n=a=>{i+=s*_.chart.waveform.lineHeight,this.drawLine(i,a,e)};if(_.chart.reverse)for(let a=this.renderer.chartManager.app.renderer.screen.height;a>=0;a-=_.chart.waveform.lineHeight)n(a);else for(let a=0;a<=this.renderer.chartManager.app.renderer.screen.height;a+=_.chart.waveform.lineHeight)n(a)}else{let i=this.renderer.getBeatFromYPos((-this.parent.y+(_.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/_.chart.zoom);t.init(this.renderer.chart.timingData);const s=this.renderer.getPixelsToEffectiveBeatsRatio()/_.chart.zoom;i=Math.floor(i/s)*s;let n=this.renderer.chart.getSecondsFromBeat(i);const a=o=>{i+=s*_.chart.waveform.lineHeight,n=t.getSecond(i),this.drawLine(n,o,e)};if(_.chart.reverse)for(let o=this.renderer.chartManager.app.renderer.screen.height;o>=0;o-=_.chart.waveform.lineHeight)a(o);else for(let o=0;o<=this.renderer.chartManager.app.renderer.screen.height;o+=_.chart.waveform.lineHeight)a(o)}this.purgePool()}drawLine(e,t,i){if(!(e<0))for(let s=0;st>=this.poolSearch)}updateLineHeight(){for(const e of this.lineContainer.children){const t=e;t.height=_.chart.waveform.lineHeight}}getLine(){if(this.lineContainer.children[this.poolSearch]){const t=this.lineContainer.children[this.poolSearch];return t.visible=!0,this.poolSearch++,t}const e=new Oe(ie.WHITE);return e.height=_.chart.waveform.lineHeight,e.anchor.set(.5),e.visible=!0,this.poolSearch++,this.lineContainer.addChild(e),e}getSpeed(){return Math.min(_.chart.speed,wC)}}const xC="/smeditor/assets/missing-81d55ba9.png",xy=ie.from(xC),TC={HoldBodyTopOffset:0,HoldBodyBottomOffset:0,RollBodyTopOffset:0,RollBodyBottomOffset:0};class EC{renderer;options;objects=[];updateHooks=new Set;hooks={};metrics;constructor(e,t){this.renderer=e,this.options=t,this.options.init?.(e),this.metrics={...TC,...this.options.metrics}}update(e){this.options.update?.(e),this.updateHooks.forEach(({item:t,cb:i})=>{t.destroyed||i(e)})}getPlaceholderSprite(){const e=new Oe(xy);return e.anchor.set(.5),e}getBlankSprite(){return new Oe(ie.EMPTY)}getElement(e,t={}){try{return this.options.load?this.options.load.bind(this)(e,{noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})??this.getPlaceholderSprite():this.loadElement(e,t)??this.getPlaceholderSprite()}catch(i){return console.error(i),_.debug.showNoteskinErrors&&Se.createFormatted("Noteskin Error: "+i,"error"),this.getPlaceholderSprite()}}loadElement(e,t={}){const i=this.followRedirs(e);return i===void 0?(_.debug.showNoteskinErrors&&Se.createFormatted(`Noteskin element ${e.columnName} ${e.element} failed to load for noteskin: Redirect loop`,"error"),this.getPlaceholderSprite()):i({noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})}followRedirs(e){const t=[e];let i=e;for(;;){const s=this.options.elements[i.columnName]?.[i.element];if(s===void 0)return;if(typeof s=="function")return s;if(i={columnName:s.columnName??i.columnName,columnNumber:s.columnNumber??i.columnNumber,element:s.element},t.some(n=>i.columnName==n.columnName&&i.element==n.element))return;t.push(i)}}on(e,t,i){this.hooks[t]===void 0&&(this.hooks[t]=new Set);const s={item:e,cb:i};this.hooks[t].add(s),e.once("destroyed",()=>this.hooks[t].delete(s))}onUpdate(e,t){const i={item:e,cb:t};this.updateHooks.add(i),e.once("destroyed",()=>this.updateHooks.delete(i))}broadcast(e){if(this.hooks[e.type]===void 0)return;this.hooks[e.type].forEach(({item:i,cb:s})=>{i.destroyed||s(e)})}}const AC="/smeditor/assets/hold_judgement-82934f15.png";class ps extends Ee{children=[];static held_tex;static dropped_tex;notefield;constructor(e){super(),ps.held_tex||this.loadTex(),this.notefield=e}async loadTex(){const e=await Ks.load(AC),t=e.height,i=e.width;ps.held_tex=new ie(e,new ke(0,0,i,t/2)),ps.dropped_tex=new ie(e,new ke(0,t/2,i,t/2))}update(){this.y=this.notefield.renderer.getActualReceptorYPos()+(_.chart.reverse?-48:48);for(const e of this.children){const t=(Date.now()-e.createTime)/1e3;if(t<.1){const i=1-(1-t/.1)*(1-t/.1);e.scale.set(.3*i)}else if(t>.6&&t<.8){const i=(t-.6)/.2*(t-.6)/.2;e.scale.set(.3*(1-i))}}Ki(this.children,e=>Date.now()-e.createTime>800)}addJudge(e,t){if(!bn(t)&&!ws(t))return;const i=new Oe(bn(t)?ps.dropped_tex:ps.held_tex);i.anchor.set(.5),i.x=this.notefield.getColumnX(e),i.createTime=Date.now(),i.scale.set(0),this.addChild(i)}}const SC={L:233724,l:11261687,R:16559363,r:16442809};class CC extends Ee{notefield;arrowMap=new Map;notesDirty=!1;children=[];constructor(e){super(),this.notefield=e,this.sortableChildren=!0;const t=()=>{this.arrowMap.clear(),this.removeChildren()},i=()=>this.notesDirty=!0;q.on("timeSigChanged",t),q.on("chartModified",i),this.on("destroyed",()=>{q.off("timeSigChanged",t),q.on("chartModified",i)})}update(e,t){const i=this.notefield.renderer.chart.getNotedata();if(this.notesDirty){for(const[s,n]of this.arrowMap.entries())i.includes(s)||(n.destroy(),this.arrowMap.delete(s));this.notesDirty=!1}for(const s of i){if(s.beat>t)break;if(this.shouldDisplayNote(s,e,t)&&!this.arrowMap.has(s)){const n=new Ee,a=this.notefield.createNote(s);Object.assign(n,{x:this.notefield.getColumnX(s.col),zIndex:s.beat});const o=new Oe(ie.WHITE),l=a.getBounds();o.x=l.x,o.y=l.y,o.width=l.width,o.height=l.height,o.alpha=0;const c=new Oe(ie.WHITE);c.x=l.x,c.y=l.y,c.width=l.width,c.height=l.height,c.alpha=0,this.notefield.renderer.registerDragNote(n,s),n.wrapper=a,n.selection=o,n.parity=c,n.lastActive=!1,this.arrowMap.set(s,n),n.addChild(a,o,c),this.addChild(n)}}for(const[s,n]of this.arrowMap.entries()){if(!this.shouldDisplayNote(s,e,t)){n.destroy(),this.arrowMap.delete(s);continue}if(n.y=this.notefield.renderer.getActualReceptorYPos(),(!Le(s)||!s.gameplay?.lastHoldActivation||this.notefield.renderer.getVisualBeat(){e=="chart.allowReceptorDrag"&&(this.eventMode=_.chart.allowReceptorDrag?"static":"passive")};constructor(e){super(),this.notefield=e;for(let s=0;s{!this.dragStart||!this.dragOptionsStart||(_.chart.receptorXPos=Math.round(this.dragOptionsStart[0]+s.global.x-this.dragStart.x),_.chart.receptorYPos=Math.round(this.dragOptionsStart[1]+s.global.y-this.dragStart.y))},i=()=>{this.notefield.renderer.off("pointermove",t),this.notefield.renderer.off("pointerup",i)};this.on("pointerdown",s=>{this.dragStart=new We(s.globalX,s.globalY),this.dragOptionsStart=[_.chart.receptorXPos,_.chart.receptorYPos],s.preventDefault(),s.stopImmediatePropagation(),this.notefield.renderer.on("pointermove",t),this.notefield.renderer.on("pointerup",i)}),q.on("userOptionUpdated",this.optionUpdate),this.optionUpdate("chart.allowReceptorDrag")}destroy(){q.off("userOptionUpdated",this.optionUpdate)}update(){this.y=this.notefield.renderer.getActualReceptorYPos()}}class IC extends Ee{notefield;arrowMap=new Map;children=[];lastBeatShift=0;lastColShift=0;constructor(e){super(),this.notefield=e,this.sortableChildren=!0}update(e,t){if(!this.notefield.renderer.chartManager.selection.shift){this.removeChildren(),this.arrowMap.clear();return}const i=this.notefield.renderer.chartManager.selection.shift.beatShift,s=this.notefield.renderer.chartManager.selection.shift.columnShift;if(this.lastBeatShift!=i||this.lastColShift!=s){this.lastBeatShift=i,this.lastColShift=s;for(const[n,a]of this.arrowMap.entries()){const o=this.notefield.renderer.chartManager.loadedChart.computeNote({...n,beat:n.beat+i,col:n.col+s});a.x=this.notefield.getColumnX(o.col),a.wrapper.destroy(),a.wrapper.alpha=.4,a.wrapper=this.notefield.createNote(o);const l=a.wrapper.getBounds();a.selection.x=l.x,a.selection.y=l.y,a.selection.width=l.width,a.selection.height=l.height,a.addChild(a.wrapper,a.selection)}}for(const n of this.notefield.renderer.chartManager.selection.notes)if(!(n.beat+i+(Le(n)?n.hold:0)t)&&!this.arrowMap.has(n)){const a={...n,beat:n.beat+i,col:n.col+s},o=new Ee,l=this.notefield.createNote(a);Object.assign(o,{x:this.notefield.getColumnX(a.col),zIndex:a.beat,alpha:.4});const c=new Oe(ie.WHITE),d=l.getBounds();c.x=d.x,c.y=d.y,c.width=d.width,c.height=d.height,c.alpha=0,this.notefield.renderer.registerDragNote(l,a),o.wrapper=l,o.selection=c,this.arrowMap.set(n,o),o.addChild(l,c),this.addChild(o)}for(const[n,a]of this.arrowMap.entries()){if(n.beat+i+(Le(n)?n.hold:0)t){a.destroy(),this.arrowMap.delete(n);continue}const o=n.beat+i;if(a.y=this.notefield.renderer.getYPosFromBeat(o),a.selection.alpha=Math.sin(Date.now()/320)*.1+.3,Le(n)){const l=this.notefield.renderer.getYPosFromBeat(o+(Le(n)?n.hold:0))-a.y,c=a.wrapper.object;c.setLength(l),c.setBrightness(1);const d=a.wrapper.getLocalBounds();a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mrZJnEoZXST1iTC2qq8EQ0lMzliv9eYBWSUSBlpu1y/e/P9KrU3g9+WAtJFzfbURm78QR4eJOIQbeZyzuyPIKumzAMWeH3wcDsqKc2BXztrOQhI9RNhnz65lbB9KvySZkwVb/T39mO+f6ajj7oDr5yv22IE3GzkBvsXvLHZ/yI7fGeAREr7FX7bMByafmFtNCPvM1naIcC8uoBBOSlXDHotHupk8izVuSNXutvVPRFm2mk5ALCnZ1oli0yZSEHQ8m11owFsMGGYSsh90BG8vOyB10WjmydXXD3gvglTxCexSQkT5+HZbMaEkbd2p4BjeyPqkcoxMyqId67S8OW4tnMPvEZtim1l80bam5XQkQQmK+KL2kWbKamce721GN8uPYwgt4dQgRfYipFB7l/Yy2ifSaXgEh8TltdULCNXcP/xWCsHLTMhxXuAXmQzirwqURPbaUTcA3Wvoarj6/WbQgl33BnDIk41HIOSqxKD7p1SmpVy3yfaE05142tJSVHCPFR1Y/y6zRamvEX1JFLEQQCSJB5B9BfgCwNDJ0if9eSgAAAABJRU5ErkJggg==";class RC extends sg{offsetY=0;setY=0;_last=0;_lastTop=!1;constructor(e){super(e,0,0,0,0),this.scale.cb=()=>{this.refresh()}}cropBottom(e,t=!1){this._last==e&&!this._lastTop&&!t||(this._last=e,this._lastTop=!1,this._height=this.texture.height-e/Math.abs(this.scale.y),this._bottomHeight=0,this.offsetY=0,this.topHeight=this.texture.height-e/Math.abs(this.scale.y),this._updateY())}cropTop(e,t=!1){this._last==e&&this._lastTop&&!t||(this._last=e,this._lastTop=!0,this._height=this.texture.height-e/Math.abs(this.scale.y),this._topHeight=0,this.bottomHeight=this.texture.height-e/Math.abs(this.scale.y),this.offsetY=e/Math.abs(this.scale.y),this._updateY())}get y(){return this.setY}set y(e){this.setY=e,this._updateY()}_updateY(){super.y=this.setY+this.offsetY*Math.abs(this.scale.y)}refresh(){this._lastTop?this.cropTop(this._last,!0):this.cropBottom(this._last,!0)}}class Ty extends RC{constructor(e,t=64){super(e),this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.texture.on("update",()=>{this.width=this.texture.width,this.height=this.texture.height,this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.refresh()})}}class rM extends Ty{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(e,t){super(e[0],t),this.textures=e}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Et.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Et.shared.add(this._tickerUpdate,this,Gr.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(e){this.stop(),this.currentFrame=e}gotoAndPlay(e){this.currentFrame=e,this.play()}update(e){if(!this._playing)return;const t=this.animationSpeed*e,i=this.currentFrame;this._currentTime+=t,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this.texture=this._textures[e],this.onFrameChange?.(this.currentFrame))}destroy(e){this.stop(),super.destroy(e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(e){this._textures=e,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let e=Math.floor(this._currentTime)%this._textures.length;return e<0&&(e+=this._textures.length),e}set currentFrame(e){if(e<0||e>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${e}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Et.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(Et.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}const LC={Fake:ie.from(PC),Lift:ie.from(BC)};class xf extends Ee{object;icon;constructor(e){super(),this.object=e,this.icon=new Oe(LC[e.note.type]),this.icon.anchor.set(.5),this.icon.scale.set(.3),this.icon.alpha=.8,this.icon.visible=!1,this.addChild(e,this.icon),e.nf.noteskin===void 0?q.on("noteskinLoaded",()=>this.loadEventHandler()):this.loadEventHandler()}loadEventHandler(){this.object.nf.noteskin.onUpdate(this,e=>{if(!_.chart.drawIcons){this.icon.visible=!1;return}if(this.object.nf.noteskinOptions?.hideIcons?.includes(this.object.note.type)){this.icon.visible=!1;return}this.icon.visible=!0,this.object.note.type=="Fake"&&(this.icon.visible=e.chartManager.getMode()!=Y.Play)})}}class DC extends Ee{type="note";note;nf;constructor(e,t){super(),this.note=t,this.nf=e,this.nf.noteskin===void 0?q.on("noteskinLoaded",()=>{this.loadElement(t)}):this.loadElement(t)}loadElement(e){const t=this.nf.noteskin.getElement({element:e.type,columnName:this.nf.getColumnName(e.col),columnNumber:e.col},{note:e});this.addChild(t)}}function OC(r){return r.cropTop!==void 0}class FC extends Ee{type="hold";note;active;inactive;wasActive=!1;lastLength=null;elements;metrics;ns;nf;loaded=!1;constructor(e,t){super();const i=new Ee,s=new Ee;this.note=t,this.ns=e.noteskin,this.nf=e,this.metrics=this.ns.metrics,i.visible=!1,this.active=i,this.inactive=s,this.addChild(s,i),e.noteskin===void 0?q.on("noteskinLoaded",()=>{this.loadElements()}):this.loadElements()}loadElements(){if(!this.loaded){this.elements={};for(const e of["Active","Inactive"]){this.elements[e]={};for(const t of["BottomCap","Body","TopCap","Head"]){const i=this.getNoteskinElement(`${e} ${t}`);t=="BottomCap"?OC(i)?this.elements[e][t]=i:(_.debug.showNoteskinErrors&&Se.createFormatted(`Noteskin Error: invalid tail found for ${e} ${t}!`,"error"),this.elements[e][t]=new Ty(xy,64)):this.elements[e][t]=i,(e=="Active"?this.active:this.inactive).addChild(this.elements[e][t])}}this.loaded=!0}}getNoteskinElement(e){return this.ns.getElement({element:`${this.note.type} ${e}`,columnName:this.nf.getColumnName(this.note.col),columnNumber:this.note.col},{note:this.note})}setActive(e){this.wasActive!=e&&(this.wasActive=e,this.active.visible=e,this.inactive.visible=!e)}setBrightness(e){if(!this.loaded)return;const t=["Active","Inactive"],i=["Body","TopCap","BottomCap"];for(const s of t)for(const n of i)"tint"in this.elements[s][n]&&(this.elements[s][n].tint=Rd(e*255,e*255,e*255))}setLength(e){if(!this.loaded||this.lastLength==e)return;this.lastLength=e;const t=this.metrics[`${this.note.type}BodyBottomOffset`],i=this.metrics[`${this.note.type}BodyTopOffset`],s=["Active","Inactive"],n=e>=0?1:-1,a=Math.abs(e);for(const o of s){this.elements[o].Body.height=Math.max(0,a+t-i),this.elements[o].Body.y=a+t,this.elements[o].BottomCap.y=a+t,this.elements[o].BottomCap.y<0?(this.elements[o].BottomCap.cropTop(-this.elements[o].BottomCap.y),e<0&&(this.elements[o].BottomCap.y-=this.elements[o].BottomCap.y/Math.abs(this.elements[o].BottomCap.scale.y))):this.elements[o].BottomCap.cropTop(0),this.elements[o].TopCap.y=i;const l=Math.abs(this.elements[o].BottomCap.scale.y);this.elements[o].BottomCap.scale.y=e<0?-l:l;const c=Math.abs(this.elements[o].TopCap.scale.y);this.elements[o].TopCap.scale.y=e<0?-c:c,this.elements[o].Body.height*=n,this.elements[o].Body.y*=n,this.elements[o].BottomCap.y*=n,this.elements[o].TopCap.y*=n}}}class Tf extends Ee{noteskinOptions;noteskin;gameType;renderer;receptors;notes;selectionNotes;flashes;holdJudges;ghostNote;ghostNoteEntry;columnX=[];constructor(e){super(),this.renderer=e,this.gameType=e.chart.gameType,nt.getNoteskin(this.gameType,_.chart.noteskin.name).then(t=>{if(!t){Se.createFormatted("Couldn't find an available noteskin!","error");return}let i=0;for(let s=0;s=e&&this.ghostNoteEntry.beat<=t&&this.ghostNoteEntry.beat>=0))}onJudgement(e,t){this.noteskin!==void 0&&(this.holdJudges.addJudge(e,t),Zi(t)&&this.noteskin.broadcast({type:"hit",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),ws(t)&&this.noteskin.broadcast({type:"held",columnName:this.getColumnName(e),columnNumber:e}),bn(t)&&this.noteskin.broadcast({type:"letgo",columnName:this.getColumnName(e),columnNumber:e}),Pi(t)&&this.noteskin.broadcast({type:"miss",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),_l(t)&&this.noteskin.broadcast({type:"hitmine",columnName:this.getColumnName(e),columnNumber:e}))}startPlay(){}endPlay(){if(this.noteskin!==void 0)for(let e=0;eDate.now()-e.createTime>5e3),_.general.smoothAnimations?this.currentMedian.x=(this.currentMedian.x-this.target)*.8+this.target:this.currentMedian.x=this.target}addBar(e,t){if(e==null||!Pi(t)&&!Zi(t))return;const i=new Oe(ie.WHITE);i.width=UC,i.height=Ef,i.anchor.set(.5),i.x=e*400,i.tint=t.color,i.createTime=Date.now(),i.miss=Pi(t),i.ms=Math.round(e*1e3),this.errorText.tint=t.color,this.errorText.text=(e*1e3).toFixed(1)+"ms",this.errorTextTime=Date.now(),this.barlines.addChild(i),this.target=xl(this.barlines.children.filter(s=>!s.miss).map(s=>s.ms))*.4}reset(){this.currentMedian.x=0,this.target=0,Ki(this.barlines.children,()=>!0)}}class VC extends Oe{createTime=-1;active=!1;type=Xg;constructor(){super(),this.anchor.set(.5)}update(){if(this.y=_.chart.reverse?40:-40,this.visible=this.active,this.active){const e=(Date.now()-this.createTime)/1e3;let t=1.2;if(Je.getCollection(_.play.timingCollection).shouldHideNote(this.type)||(t=.8),e<.1){const i=1-(1-e/.1)*(1-e/.1),s=(1-t)*i+t;this.scale.x=.4*s,this.scale.y=.4*s}else if(e>.6&&e<.8){const i=(e-.6)/.2*(e-.6)/.2;this.scale.x=.4*(1-i),this.scale.y=.4*(1-i)}else e>.8&&(this.active=!1)}}doJudge(e,t){if(e==null&&(e=0),!Zi(t)&&!Pi(t))return;const i=t.judgementTexture.getTexture(e,t);i&&(this.texture=i,this.texture.updateUvs(),this.active=!0,this.type=t,this.createTime=Date.now(),_.play.judgementTilt?this.rotation=Be(e,-.05,.05)*300/180*Math.PI:this.rotation=0)}reset(){this.active=!1}}const Af={BPMS:{title:"BPM Event",rows:[{label:"Tempo",key:"value",input:{type:"spinner",precision:3}}]},STOPS:{title:"Stop Event",description:"Stops for a number of seconds. Notes on this beat are hit before the stop occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},WARPS:{title:"Warp Event",description:"Warps ahead a number of beats. Warped notes do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},DELAYS:{title:"Delay Event",description:"Stops for a number of seconds. Notes on this beat are hit after the delay occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},SCROLLS:{title:"Scroll Event",description:"Notes after this event will scroll at the specified speed.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}}]},TICKCOUNTS:{title:"Tickcount Event",description:"Number of ticks per beat in a hold. Only applies to pump gamemodes.",rows:[{label:"Ticks",key:"value",input:{type:"spinner",step:1,precision:0,min:0}}]},FAKES:{title:"Fake Event",description:"Creates an area of notes that cannot be hit and do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},LABELS:{title:"Label Event",rows:[{label:"Label",key:"value",input:{type:"text"}}]},SPEEDS:{title:"Speed Event",width:200,description:"The entire playfield scrolls at the specified speed. Can slowly ease over a certain amount of time.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}},{label:"Ease time",key:"delay",input:{type:"spinner",precision:3,min:0}},{label:"Ease unit",key:"unit",input:{type:"dropdown",items:["Beats","Seconds"],transformers:{serialize:r=>r=="B"?"Beats":"Seconds",deserialize:r=>r=="Beats"?"B":"T"}}}]},TIMESIGNATURES:{title:"Time Signature Event",width:200,rows:[{label:"Upper",key:"upper",input:{type:"spinner",step:1,precision:0,min:1}},{label:"Lower",key:"lower",input:{type:"spinner",step:1,precision:0,min:1}}]},COMBOS:{title:"Combo Event",width:200,description:"Multiplies the combo gained from hitting/missing notes after this event.",rows:[{label:"Hit multiplier",key:"hitMult",input:{type:"spinner",step:1,precision:0,min:0}},{label:"Miss multiplier",key:"missMult",input:{type:"spinner",step:1,precision:0,min:0}}]},ATTACKS:{title:"Attack Event",width:200,description:"Applies a modifier to the playfield. Can specify the length of the applied attack in seconds or the end time of the attack.",rows:[{label:"Timing type",key:"endType",input:{type:"dropdown",items:["Length","End"],transformers:{serialize:r=>r=="LEN"?"Length":"End",deserialize:r=>r=="Length"?"LEN":"END"}}},{label:"Seconds",key:"value",input:{type:"spinner",precision:3}},{label:"Mods",key:"mods",input:{type:"text"}}]},BGCHANGES:{title:"BG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]},FGCHANGES:{title:"FG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]}};class Bt{static activePopup;timingBox;popup;zoomer;editText;timingData;rows=[];onTimingChange;clickOutside;moveInterval;modifyBox;cachedEvent;onConfirm=()=>{};persistent=!1;constructor(e,t,i=!1){e.popup=this,this.timingBox=e,this.timingData=t,this.cachedEvent=this.timingBox.event,this.modifyBox=i,this.popup=this.build(),this.popup.style.transitionDuration="0s",setTimeout(()=>this.movePosition()),this.onTimingChange=this.updateValues.bind(this),this.clickOutside=s=>{this.popup.contains(s.target)||this.close()},q.on("timingModified",this.onTimingChange),Bt.activePopup?.persistent?e.popup=void 0:(document.getElementById("popups")?.appendChild(this.popup),this.moveInterval=setInterval(()=>this.movePosition(),150),Bt.activePopup?.close(),Bt.activePopup=this)}movePosition(){const e=this.timingBox.backgroundObj.getBounds(),t=e.left+e.width/2,i=Af[this.timingBox.event.type].width??150,s=i/2+15,n=window.innerWidth-i/2-15;this.popup.style.left=`${Be(t,s,n)}px`;const a=document.getElementById("pixi").offsetTop+9,o=e.top+a+e.height/2;this.popup.style.top=`${e.top+e.height+a}px`,o+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${e.top-e.height/2+a}px`),setTimeout(()=>this.popup.style.transitionDuration="",10)}build(){const e=Af[this.timingBox.event.type],t=document.createElement("div");t.classList.add("popup");const i=document.createElement("div");i.classList.add("popup-zoomer"),i.style.width=e.width?`${e.width}px`:"150px",i.style.backgroundColor=Gc(Hr[this.timingBox.event.type].toString(16).padStart(6,"0"),"#333333",.75),this.zoomer=i,t.appendChild(i);const s=document.createElement("div");if(s.innerText=e.title,s.classList.add("popup-title"),i.appendChild(s),e.description){const d=document.createElement("div");d.innerText=e.description,i.appendChild(d),d.classList.add("popup-desc")}const n=document.createElement("div");n.classList.add("popup-grid"),i.appendChild(n),e.rows.forEach(d=>n.append(...this.buildRow(d)));const a=document.createElement("div");a.innerText="click to edit",a.style.marginTop="4px",a.style.height="10px",i.appendChild(a),a.classList.add("popup-desc"),this.editText=a;const o=document.createElement("div");o.classList.add("popup-options");const l=document.createElement("button");l.innerText="Ok",l.onclick=()=>{this.close(),this.onConfirm(this.timingBox.event)},l.classList.add("confirm"),o.append(l);const c=document.createElement("button");return c.innerText="Delete",c.onclick=()=>{this.modifyBox||this.timingData.delete([{type:this.timingBox.event.type,[this.timingBox.event.type=="ATTACKS"?"second":"beat"]:this.timingBox.event.type=="ATTACKS"?this.timingBox.event.second:this.timingBox.event.beat}]),this.close()},c.classList.add("delete"),o.append(c),i.append(o),t}buildRow(e){const t=structuredClone(this.timingBox.event),i=document.createElement("div");i.innerText=e.label,i.classList.add("popup-label");const s=[];switch(s.push(i),e.input.type){case"spinner":{const n=ot.create(t[e.key],e.input.step,e.input.precision,e.input.min,e.input.max);n.onChange=a=>{a!==void 0&&this.modifyEvent(e.key,a)},this.rows.push({data:e,el:n}),s.push(n.view);break}case"text":{const n=document.createElement("input");n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{this.modifyEvent(e.key,n.value)},n.value=t[e.key],this.rows.push({data:e,el:n}),s.push(n);break}case"dropdown":{if(e.input.transformers){const n=e.input.transformers.deserialize,a=e.input.transformers.serialize,o=gi.create(e.input.items,a(t[e.key]));o.onChange(l=>{this.modifyEvent(e.key,n(l))}),this.rows.push({data:e,el:o}),s.push(o.view)}else{const n=gi.create(e.input.items,t[e.key]);n.onChange(a=>{this.modifyEvent(e.key,a)}),this.rows.push({data:e,el:n}),s.push(n.view)}break}case"checkbox":{const n=document.createElement("input");n.type="checkbox",n.checked=t[e.key],n.onchange=()=>{this.modifyEvent(e.key,n.checked)},this.rows.push({data:e,el:n}),s.push(n);break}}return s}modifyEvent(e,t){this.modifyBox?Object.assign(this.timingBox.event,{[e]:t}):this.timingData.modify([[structuredClone(this.timingBox.event),Object.assign(this.timingBox.event,{[e]:t})]])}updateValues(){const e=this.timingData.getEventAtBeat(this.timingBox.event.type,this.timingBox.event.beat,!1);if(!this.timingBox||!e||e.beat!=this.timingBox.event.beat){this.close();return}this.rows.forEach(t=>{switch(t.data.input.type){case"spinner":{t.el.setValue(e[t.data.key]);break}case"text":{t.el.value=e[t.data.key];break}case"dropdown":{const i=t.el;t.data.input.transformers?i.setSelected(t.data.input.transformers.serialize(e[t.data.key])):i.setSelected(e[t.data.key]);break}case"checkbox":{t.el.checked=e[t.data.key];break}}})}close(){this.persistent=!1,q.off("timingModified",this.onTimingChange),window.removeEventListener("click",this.clickOutside),clearInterval(this.moveInterval),this.popup.classList.add("exiting"),setTimeout(()=>this.popup.remove(),200),this.timingBox.popup=void 0,Bt.activePopup=void 0}select(){this.persistent=!0,this.zoomer.classList.add("selected"),this.editText.style.transform="scale(0)",this.editText.style.height="0px",setTimeout(()=>window.addEventListener("click",this.clickOutside),200)}detach(){clearInterval(this.moveInterval)}getEvent(){return this.cachedEvent}attach(e){clearInterval(this.moveInterval),this.moveInterval=setInterval(()=>this.movePosition(),150),this.timingBox=e,this.cachedEvent=this.timingBox.event}}const $c={fontName:"Main",fontSize:15},Dr={BPMS:55,STOPS:55,DELAYS:55,WARPS:55,FAKES:55,COMBOS:40,SPEEDS:80,LABELS:80,SCROLLS:55,TIMESIGNATURES:40,TICKCOUNTS:40,BGCHANGES:55,FGCHANGES:55,ATTACKS:55};class WC extends Ee{tracks=new Ee;renderer;timingBoxMap=new Map;wasEditingTiming=!1;boxPool=new ga({create:()=>{const e=new Ee;return e.textObj=new De("",$c),e.backgroundObj=new jt,e.selection=new jt("onlyBorder"),e.selection.tint=3841008,e.addChild(e.backgroundObj,e.textObj,e.selection),e}});ghostBox;timingDirty=!1;constructor(e){super(),this.renderer=e,this.boxPool.sortableChildren=!0,this.sortableChildren=!0,this.addChild(this.tracks,this.boxPool);const t=()=>this.timingDirty=!0;q.on("timingModified",t),this.on("destroyed",()=>q.off("timingModified",t))}update(e,t){this.renderer.chartManager.editTimingMode!=Ne.Add&&(this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0),this.updateTracks(),this.updateBoxes(e,t)}createTrack(e,t){const i=Object.assign(new Oe(ie.WHITE),{alpha:0,width:Dr[e],name:e,height:5e3,x:t,type:e,lastX:0,tint:2503250,targetAlpha:0});return i.anchor.y=.5,this.tracks.addChild(i),i}initializeBox(e,t){if(Rt.stop(e.animationId),Object.assign(e,{event:t,isChartTiming:this.renderer.chart.timingData.isPropertyChartSpecific(t.type),lastX:void 0,lastAnchor:void 0,animationId:void 0,zIndex:t.beat,eventMode:"static"}),e.textObj.text=this.getLabelFromEvent(t),e.textObj.anchor.set(.5,.55),e.backgroundObj.width=e.textObj.width+10,e.backgroundObj.height=25,e.backgroundObj.position.x=-e.backgroundObj.width/2,e.backgroundObj.position.y=-25/2,e.selection.width=e.textObj.width+10,e.selection.height=25,e.selection.position=e.backgroundObj.position,e.popup=void 0,Bt.activePopup){const i=Bt.activePopup.getEvent();i.type=="ATTACKS"&&t.type=="ATTACKS"&&i.second==t.second&&(Bt.activePopup.attach(e),e.popup=Bt.activePopup),i.type!="ATTACKS"&&t.type!="ATTACKS"&&i.type==t.type&&i.beat==t.beat&&(Bt.activePopup.attach(e),e.popup=Bt.activePopup)}}addDragListeners(e,t){e.on("mouseenter",()=>{e?.popup?.persistent!==!0&&(this.renderer.chartManager.eventSelection.timingEvents.length>0||this.renderer.isDragSelecting()||(e.popup?.close(),this.renderer.chartManager.getMode()==Y.Edit&&(new Bt(e,this.getTargetTimingData(e.event.isChartTiming)),e.popup&&(e.popup.onConfirm=()=>{this.renderer.chartManager.removeEventFromSelection(t)}))))}),e.on("mouseleave",()=>{e?.popup?.persistent!==!0&&e.popup?.close()});let i=0,s;const n=a=>{const o=s,l=this.toLocal(a.global);if(Math.abs(l.y-i)<32){this.renderer.chartManager.eventSelection.shift&&(this.renderer.chartManager.eventSelection.shift={beatShift:0});return}e.popup?.close();const c=this.renderer.getBeatFromYPos(l.y),d=_.chart.snap==0?1/1e3:_.chart.snap;let h=Math.round(c/d)*d;Math.abs(h-c)>Math.abs(c-o.beat)&&(h=o.beat),this.renderer.chartManager.eventSelection.shift||={beatShift:0},this.renderer.chartManager.eventSelection.shift.beatShift=Math.max(-Math.min(...this.renderer.chartManager.eventSelection.timingEvents.map(u=>u.beat)),h-o.beat)};e.on("pointerdown",a=>{if(Uc(a)){this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t),Bt.activePopup?.close();return}if(a.stopImmediatePropagation(),this.renderer.chartManager.isEventInSelection(t)?(a.getModifierState("Control")||a.getModifierState("Meta"))&&this.renderer.chartManager.removeEventFromSelection(t):(!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")&&this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t)),this.renderer.chartManager.getMode()==Y.Edit&&this.renderer.chartManager.eventSelection.timingEvents.length==1&&(e?.popup||(Bt.activePopup?.close(),new Bt(e,this.getTargetTimingData(e.event.isChartTiming)),e.popup.onConfirm=()=>{this.renderer.chartManager.removeEventFromSelection(t)})),e.popup&&!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")?e.popup.select():e.popup?.close(),i=e.y,s=t,this.renderer.chartManager.editTimingMode==Ne.Add)return;this.renderer.on("pointermove",n);const o=()=>{this.renderer.off("pointermove",n),this.renderer.off("pointerup",o),(this.renderer.chartManager.eventSelection.shift?.beatShift??0)!=0&&this.renderer.chartManager.modifyEventSelection(l=>(l.type=="ATTACKS"&&(l.second=this.renderer.chart.timingData.getSecondsFromBeat(l.beat+this.renderer.chartManager.eventSelection.shift.beatShift)),l.beat+=this.renderer.chartManager.eventSelection.shift.beatShift,l)),this.renderer.chartManager.eventSelection.shift=void 0};this.renderer.on("pointerup",o)})}updateTracks(){const e=_.chart.timingEventOrder.left,t=_.chart.timingEventOrder.right,i=this.renderer.chartManager.editTimingMode!=Ne.Off&&this.renderer.chartManager.getMode()==Y.Edit;this.tracks.children.forEach(n=>n.visible=!1);let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;for(let n=e.length-1;n>=0;n--){const a=e[n],o=this.tracks.getChildByName(a)??this.createTrack(a,s);o.visible=!0,o.lastX!=s&&(o.lastX=s,o.targetAlpha=n%2==0?.1:0,Rt.animate(o,{0:{x:"inherit","anchor.x":"inherit"},1:{x:s,"anchor.x":1}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-x`),Rt.animate(o,{0:{alpha:"inherit"},1:{alpha:i?o.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-alpha`)),s-=Dr[a]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let n=0;n{},`track-${a}-x`),Rt.animate(o,{0:{alpha:"inherit"},1:{alpha:i?o.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-alpha`)),s+=Dr[a]}if(this.wasEditingTiming!=i){this.wasEditingTiming=i;for(const n of this.tracks.children)Rt.animate(n,{0:{alpha:"inherit"},1:{alpha:i?n.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${n.type}-alpha`)}}updateBoxes(e,t){this.timingDirty&&(this.timingBoxMap.clear(),this.boxPool.destroyAll(),this.timingDirty=!1);const i=this.renderer.chartManager.editTimingMode!=Ne.Off&&this.renderer.chartManager.getMode()==Y.Edit;this.boxPool.visible=this.renderer.shouldDisplayBarlines(),this.ghostBox&&(this.ghostBox.visible=this.renderer.shouldDisplayBarlines()&&i);for(const n of this.renderer.chart.timingData.getTimingData()){if(tn.beat)&&!this.timingBoxMap.has(n)){const a=this.boxPool.createChild();if(!a)break;this.initializeBox(a,n),this.addDragListeners(a,n),this.timingBoxMap.set(n,a)}}const s={beat:-Number.MAX_SAFE_INTEGER,second:-Number.MAX_SAFE_INTEGER,leftOffset:0,rightOffset:0};for(const[n,a]of this.timingBoxMap.entries()){if(n.beatt||!_.chart.timingEventOrder.left.includes(n.type)&&!_.chart.timingEventOrder.right.includes(n.type)){this.timingBoxMap.delete(n),a.popup?.persistent?a.popup?.detach():a.popup?.close(),this.boxPool.destroyChild(a);continue}let o=0,l=0;const c=a.backgroundObj.width,d=_.chart.timingEventOrder.right.includes(n.type)?"right":"left";i?(o=this.tracks.getChildByName(n.type)?.x??a.x,o+=Dr[n.type]/2*(o>0?1:-1),l=.5):(o=(d=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80),d=="left"&&(o-=30),(s.beat!=n.beat||n.second&&s.second!=n.second)&&(s.leftOffset=0,s.rightOffset=0,s.beat=n.beat,s.second=n.second),d=="left"?(o-=s.leftOffset,s.leftOffset+=c+5):(o+=s.rightOffset,s.rightOffset+=c+5),l=d=="right"?0:1),a.lastX===void 0||a.lastAnchor===void 0?(a.x=o,a.pivot.x=(l-.5)*c):(a.lastX!=o||a.lastAnchor!=l)&&(a.animationId=Rt.animate(a,{0:{x:"inherit","pivot.x":"inherit"},1:{x:o,"pivot.x":(l-.5)*c}},.3,Zt(0,0,.16,1.01),()=>{},a.animationId)),a.lastX=o,a.lastAnchor=l,a.y=_.chart.CMod&&n.type=="ATTACKS"?this.renderer.getYPosFromSecond(n.second):this.renderer.getYPosFromBeat(n.beat);const h=this.renderer.chartManager.getMode()!=Y.Play&&this.renderer.chartManager.isEventInSelection(n);if(a.backgroundObj.tint=h?Ld(Hr[n.type]??0,Math.sin(Date.now()/320)*.4+1.5):Hr[n.type]??0,a.selection.alpha=h?1:0,a.visible=!h||!this.renderer.chartManager.eventSelection.shift,this.renderer.chartManager.editTimingMode!=Ne.Off){const u=this.renderer.selectionTest(a);!h&&u&&this.renderer.chartManager.addEventToDragSelection(n),h&&!u&&this.renderer.chartManager.removeEventFromDragSelection(n)}}}updateGhostEvent(e){const t=_.chart.snap==0?.001:_.chart.snap,i=Math.round(this.renderer.getBeatFromYPos(e.y)/t)*t,s=this.ghostBox?.popup?this.ghostBox.event.type:this.getClosestTrack(e.x)?.name;if(!s){this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0;return}if(!this.ghostBox){const o=new Ee;o.textObj=new De("",$c),o.backgroundObj=new jt,o.selection=new jt("onlyBorder"),o.guideLine=new Oe(ie.WHITE),o.selection.tint=3841008,o.selection.alpha=0,o.addChild(o.guideLine,o.backgroundObj,o.textObj,o.selection),this.addChild(o),o.visible=this.renderer.shouldDisplayBarlines(),o.textObj.anchor.set(.5,.55),o.backgroundObj.height=25,o.selection.height=25,o.guideLine.height=1,o.guideLine.anchor.y=.5,this.ghostBox=o}!this.ghostBox?.popup&&(this.ghostBox.event?.beat!=i||this.ghostBox.event?.type!=s)&&(this.ghostBox.event=structuredClone(this.renderer.chart.timingData.getEventAtBeat(s,i))??this.renderer.chart.timingData.getDefaultEvent(s,i),this.ghostBox.event.beat=i,s=="ATTACKS"&&(this.ghostBox.event.second=this.renderer.chart.getSecondsFromBeat(i)),this.ghostBox.textObj.text=this.getLabelFromEvent(this.ghostBox.event),this.ghostBox.backgroundObj.width=this.ghostBox.textObj.width+10,this.ghostBox.selection.width=this.ghostBox.textObj.width+10),this.ghostBox.alpha=this.ghostBox?.popup?1:.4,this.ghostBox.selection.alpha=this.ghostBox?.popup?1:0,this.ghostBox.name=s;const n=this.renderer.getYPosFromBeat(this.ghostBox?.popup?this.ghostBox.event.beat:i);let a=this.tracks.getChildByName(s).x;a+=Dr[s]/2*(a>0?1:-1),this.ghostBox.position.x=a,this.ghostBox.backgroundObj.tint=Hr[s]??0,this.ghostBox.backgroundObj.position.x=-this.ghostBox.backgroundObj.width/2,this.ghostBox.backgroundObj.position.y=-25/2,this.ghostBox.guideLine.anchor.x=a<0?0:1,this.ghostBox.guideLine.width=Math.abs(this.ghostBox.position.x)+192-this.ghostBox.backgroundObj.width/2,this.ghostBox.guideLine.position.x=(a<0?1:-1)*this.ghostBox.backgroundObj.width/2,this.ghostBox.y=n,this.ghostBox.selection.position=this.ghostBox.backgroundObj.position}placeGhostEvent(){if(!this.ghostBox)return;const e=this.renderer.chart.timingData.getEventAtBeat(this.ghostBox.event.type,this.ghostBox.event.beat,!1);this.ghostBox.event.type=="ATTACKS"&&this.ghostBox.event.second==e?.second||this.ghostBox.event.type!="ATTACKS"&&this.ghostBox.event.beat==e?.beat||(this.renderer.chartManager.clearSelections(),this.ghostBox.event.isChartTiming=this.renderer.chart.timingData.isPropertyChartSpecific(this.ghostBox.event.type),new Bt(this.ghostBox,this.getTargetTimingData(this.ghostBox.event.isChartTiming),!0),this.ghostBox.popup?.select(),this.ghostBox.popup.onConfirm=t=>{this.getTargetTimingData(this.ghostBox.event.isChartTiming).insert([t])})}getClosestTrack(e){let t=Number.MAX_SAFE_INTEGER,i=this.tracks.children[0];for(const s of this.tracks.children){const n=Math.abs(s.x+(.5-s.anchor.x)*s.width-e);ni.width))return i}getLabelFromEvent(e){let t="";switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":t=ae(e.value,3).toString();break;case"SPEEDS":t=`${ae(e.value,3)}/${ae(e.delay,3)}/${e.unit}`;break;case"LABELS":t=e.value;break;case"TIMESIGNATURES":t=`${ae(e.upper,3)}/${ae(e.lower,3)}`;break;case"COMBOS":t=`${ae(e.hitMult,3)}/${ae(e.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":t=e.file;break;case"ATTACKS":t=`${e.mods}`}return t}getTargetTimingData(e){return e?this.renderer.chart.timingData:this.renderer.chart.timingData.simfileTimingData}}class zC extends Ee{children=[];renderer;timingBoxMap=new Map;trackPosCache=new Map;timingBoxPool=new ga({create:()=>{const e=new Ee;return e.guideLine=new Oe(ie.WHITE),e.textObj=new De("",$c),e.backgroundObj=new jt,e.addChild(e.guideLine,e.backgroundObj,e.textObj),e}});constructor(e){super(),this.renderer=e,this.timingBoxPool.sortableChildren=!0,this.addChild(this.timingBoxPool)}update(e,t){if(!this.renderer.chartManager.eventSelection.shift){this.timingBoxPool.destroyAll(),this.timingBoxMap.clear(),this.trackPosCache.clear();return}const i=this.renderer.chartManager.eventSelection.shift.beatShift;for(const s of this.renderer.chartManager.eventSelection.timingEvents)if(!(ts.beat+i)&&!this.timingBoxMap.has(s)){const n=this.timingBoxPool.createChild();if(!n)continue;this.timingBoxMap.set(s,n);let a="";switch(s.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":a=ae(s.value,3).toString();break;case"SPEEDS":a=`${ae(s.value,3)}/${ae(s.delay,3)}/${s.unit}`;break;case"LABELS":a=s.value;break;case"TIMESIGNATURES":a=`${ae(s.upper,3)}/${ae(s.lower,3)}`;break;case"COMBOS":a=`${ae(s.hitMult,3)}/${ae(s.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":a=s.file;break;case"ATTACKS":a=`${s.mods} (${s.endType}=${s.value})`}const o=_.chart.timingEventOrder.right.includes(s.type)?"right":"left";if(Object.assign(n,{alpha:.4,isChartTiming:this.renderer.chart.timingData.isPropertyChartSpecific(s.type),zIndex:s.beat}),n.textObj.text=a,n.textObj.anchor.set(.5,.55),n.backgroundObj.width=n.textObj.width+10,n.backgroundObj.height=25,n.backgroundObj.tint=Hr[s.type]??0,n.backgroundObj.position.x=-n.backgroundObj.width/2,n.backgroundObj.position.y=-n.backgroundObj.height/2,n.guideLine.height=1,n.guideLine.anchor.set(o=="left"?0:1,.5),n.guideLine.width=Math.abs(n.position.x)+192-n.backgroundObj.width/2,n.guideLine.position.x=(o=="left"?1:-1)*n.backgroundObj.width/2,this.renderer.chartManager.editTimingMode!=Ne.Off){let l=this.getTrackPos(s.type);l+=Dr[s.type]/2*(l>0?1:-1),n.position.x=l,n.pivot.x=0}else{let l=(o=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80);o=="left"&&(l-=30),n.position.x=l,n.pivot.x=o=="right"?-n.backgroundObj.width/2:n.backgroundObj.width/2}}for(const[s,n]of this.timingBoxMap.entries()){if(ts.beat+i){this.timingBoxPool.destroyChild(n),this.timingBoxMap.delete(s);continue}n.y=_.chart.CMod&&s.second?this.renderer.getYPosFromSecond(s.second):this.renderer.getYPosFromBeat(s.beat+i)}}getTrackPos(e){if(this.trackPosCache.has(e))return this.trackPosCache.get(e);const t=_.chart.timingEventOrder.left,i=_.chart.timingEventOrder.right;let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;for(let n=t.length-1;n>=0;n--){const a=t[n];this.trackPosCache.set(a,s),s-=Dr[a]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let n=0;n{if(this.editingCol!=-1){const a=_.chart.snap==0?.020833333333333332:_.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}};let i=0;const s=()=>{if(!this.chartManager.selection.shift&&!this.selectionBounds||i==0)return;const n=this.getYPosFromBeat(Math.max(0,this.chartManager.getBeat()+i));this.chartManager.setBeat(Math.max(0,this.chartManager.getBeat()+i)),this.selectionBounds&&(_.chart.reverse?this.selectionBounds.start.y-=_.chart.receptorYPos/_.chart.zoom+n:this.selectionBounds.start.y+=_.chart.receptorYPos/_.chart.zoom-n,this.selectionBoundary.update())};this.chartManager.app.ticker.add(s),window.addEventListener("keydown",t),this.on("destroyed",()=>{window.removeEventListener("keydown",t),this.removeAllListeners(),this.chartManager.app.ticker.remove(s)}),this.on("pointerdown",n=>{Uc(n)||this.chartManager.getMode()==Y.Play||this.chartManager.getMode()==Y.View||(this.chartManager.editTimingMode==Ne.Add&&this.lastMousePos?this.timingTracks.placeGhostEvent():this.chartManager.editTimingMode==Ne.Off&&_.chart.mousePlacement&&this.lastMouseBeat!=-1&&this.lastMouseCol!=-1&&!n.getModifierState("Shift")?(this.chartManager.clearSelections(),this.editingCol=this.lastMouseCol,this.chartManager.setNote(this.lastMouseCol,"mouse",this.lastMouseBeat)):(!n.getModifierState("Control")&&!n.getModifierState("Meta")&&!n.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager[this.chartManager.editTimingMode==Ne.Off?"startDragSelection":"startDragEventSelection"](),this.selectionBounds={start:this.toLocal(n.global),end:this.toLocal(n.global)},this.selectionBoundary.update()))}),this.on("mousemove",n=>{if(this.lastMousePos=this.toLocal(n.global),this.editingCol!=-1){const a=_.chart.snap==0?.020833333333333332:_.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}this.selectionBounds&&(this.selectionBounds.end=this.toLocal(n.global),this.selectionBoundary.update()),i=Math.max(0,this.lastMousePos.y-this.getLowerBound()+100)/600,this.lastMousePos.y<0&&(i=Math.min(0,this.lastMousePos.y-this.getUpperBound()-100)/600),_.chart.reverse&&(i=Math.max(0,this.getUpperBound()-this.lastMousePos.y+100)/600,this.lastMousePos.y>0&&(i=Math.min(0,this.getLowerBound()-this.lastMousePos.y-100)/600))}),this.on("pointerup",()=>{this.editingCol!=-1&&(this.chartManager.endEditing(this.editingCol),this.editingCol=-1),this.chartManager[this.chartManager.editTimingMode==Ne.Off?"endDragSelection":"endDragEventSelection"](),this.selectionBounds=void 0,this.selectionBoundary.update(),i=0})}isDragSelecting(){return!!this.selectionBounds}doJudgement(e,t,i){this.chartManager.getMode()==Y.Play&&(this.judgement.doJudge(t,i),this.timingBar.addBar(t,i)),this.notefield.onJudgement(e.col,i)}startPlay(){this.notefield.startPlay()}endPlay(){this.notefield.endPlay(),this.timingBar.reset(),this.judgement.reset()}update(){if(this.destroyed)return;this.x=this.chartManager.app.renderer.screen.width/2+_.chart.receptorXPos,this.speedMult=_.chart.doSpeedChanges?this.getCurrentSpeedMult():1;const e=this.getTopOnScreenBeat(),t=this.getBottomOnScreenBeat(),i=Math.min(e,t),s=Math.max(e,t);if(this.scale.x=_.chart.zoom,this.scale.y=_.chart.zoom,this.children.forEach(n=>n.update(i,s)),this.notefield.alpha=this.chartManager.editTimingMode==Ne.Off||this.chartManager.getMode()==Y.Play?1:.3,_.chart.mousePlacement&&this.lastMousePos&&this.chartManager.getMode()!=Y.Play){const n=_.chart.snap==0?.020833333333333332:_.chart.snap,a=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/n)*n;let o=-1;for(let l=0;ld-c/2){o=l;break}}(a!=this.lastMouseBeat||o!=this.lastMouseCol||this.chartManager.getEditingNoteType()!=this.lastNoteType)&&(this.lastMouseBeat=a,this.lastMouseCol=o,this.lastNoteType=this.chartManager.getEditingNoteType(),this.editingCol!=-1&&this.chartManager.editHoldBeat(this.editingCol,a,!1),o===-1?(this.lastMouseBeat=-1,this.lastMouseCol=-1,this.notefield.setGhostNote()):this.notefield.setGhostNote(this.chart.computeNote({beat:a,col:this.lastMouseCol,type:this.chartManager.getEditingNoteType()})))}this.lastMousePos&&this.chartManager.editTimingMode==Ne.Add&&this.timingTracks.updateGhostEvent(this.lastMousePos)}getTimeWithOffset(){let e=this.chartManager.getTime();return(this.chartManager.getMode()==Y.Play||this.chartManager.getMode()==Y.Record)&&(e+=_.play.offset*_.audio.rate),e}getBeatWithOffset(){let e=this.chartManager.getBeat();return(this.chartManager.getMode()==Y.Play||this.chartManager.getMode()==Y.Record)&&(e=this.chart.getBeatFromSeconds(this.getTimeWithOffset())),e}getVisualTime(){let e=this.chartManager.getTime();return(this.chartManager.getMode()==Y.Play||this.chartManager.getMode()==Y.Record)&&(e+=(_.play.offset+_.play.visualOffset)*_.audio.rate),e}getVisualBeat(){let e=this.chartManager.getBeat();return(this.chartManager.getMode()==Y.Play||this.chartManager.getMode()==Y.Record)&&(e=this.chart.getBeatFromSeconds(this.getVisualTime())),e}getYPosFromBeat(e){const t=this.getVisualTime(),i=this.getVisualBeat(),s=_.chart.reverse?-1:1;return _.chart.CMod?(this.chart.getSecondsFromBeat(e)-t)*this.getSecondsToPixelsRatio()*s+this.getActualReceptorYPos():i==e?this.getActualReceptorYPos():(_.chart.doSpeedChanges?this.chart.timingData.getEffectiveBeat(e)-this.chart.timingData.getEffectiveBeat(i):e-i)*this.getEffectiveBeatsToPixelsRatio()*s+this.getActualReceptorYPos()}getYPosFromSecond(e){const t=this.getVisualTime(),i=_.chart.reverse?-1:1;return _.chart.CMod?(e-t)*this.getSecondsToPixelsRatio()*i+this.getActualReceptorYPos():this.getYPosFromBeat(this.chart.timingData.getBeatFromSeconds(e))}getSecondFromYPos(e){const t=_.chart.reverse?-1:1;if(_.chart.CMod){const i=this.getPixelsToSecondsRatio(),s=this.getVisualTime(),a=(e-this.getActualReceptorYPos())*i*t;return s+a}return this.chart.getSecondsFromBeat(this.getBeatFromYPos(e))}getBeatFromYPos(e,t){const i=this.getVisualBeat(),s=_.chart.reverse?-1:1;if(_.chart.CMod)return this.chart.getBeatFromSeconds(this.getSecondFromYPos(e));const a=(e-this.getActualReceptorYPos())*this.getPixelsToEffectiveBeatsRatio()*s;if(_.chart.doSpeedChanges&&!t){const o=this.chart.timingData.getEffectiveBeat(i)+a;return this.chart.getBeatFromEffectiveBeat(o)}return i+a}getColumnFromXPos(e){const t=this.chart.gameType;let i=null;for(let s=0;si)return s-1;i=n}return t.numCols-1}getActualReceptorYPos(){return _.chart.receptorYPos/_.chart.zoom*(_.chart.reverse?-1:1)}getEffectiveBeatsToPixelsRatio(){return _.chart.speed/100*64*this.speedMult}getPixelsToEffectiveBeatsRatio(){return 1/this.getEffectiveBeatsToPixelsRatio()}getSecondsToPixelsRatio(){return _.chart.speed/100*64*4}getPixelsToSecondsRatio(){return 1/this.getSecondsToPixelsRatio()}isNegScroll(e){return _.chart.doSpeedChanges&&(this.speedMult<0||(this.chart.timingData.getEventAtBeat("SCROLLS",e)?.value??1)<0||(this.chart.timingData.getEventAtBeat("BPMS",e)?.value??120)<0)}getUpperBound(){return-this.y/_.chart.zoom-64}getLowerBound(){return(this.chartManager.app.renderer.screen.height-this.y)/_.chart.zoom+64}findFirstOnScreenScroll(){const e=[...this.chart.timingData.getTimingData("SCROLLS")];e[0]?.beat!=0&&e.splice(0,0,{beat:0,value:e[0]?.value??1,type:"SCROLLS"});let t=Lt(e,this.getVisualBeat()-_.chart.maxDrawBeatsBack,i=>i.beat);for(;ts.beat);const i=Lt(e,this.getVisualBeat()-_.chart.maxDrawBeatsBack,s=>s.beat);for(;t>=i;){const s=e[t];t--;const n=s===void 0?-1/0*this.getScrollDirection(e[0]?.value??1):this.getYPosFromBeat(s.beat??0),a=e[t+2]===void 0?1/0*this.getScrollDirection(s.value):this.getYPosFromBeat(e[t+2].beat);if(this.isAreaOnScreen(n,a))return s}return{beat:0,value:1,type:"SCROLLS"}}getTopOnScreenBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=this.findFirstOnScreenScroll(),t=1/Math.abs(this.getEffectiveBeatsToPixelsRatio()),i=this.getYPosFromBeat(e.beat),s=t/Math.abs(e.value),n=this.getScrollDirection(e.value),a=n==1?this.getUpperBound():this.getLowerBound(),o=n*(a-i)*s+e.beat;return Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,o)}return _.chart.CMod?this.getBeatFromYPos(this.getUpperBound()):Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,this.getBeatFromYPos(this.getUpperBound()))}getBottomOnScreenBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=this.findLastOnScreenScroll(),t=1/Math.abs(this.getEffectiveBeatsToPixelsRatio()),i=this.getYPosFromBeat(e.beat),s=t/Math.abs(e.value),n=this.getScrollDirection(e.value),a=n==1?this.getLowerBound():this.getUpperBound(),o=n*(a-i)*s+e.beat;return Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,o)}return _.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}isAreaOnScreen(e,t){ti}getCurrentSpeedMult(){return this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime())}getScrollDirection(e){let t=1;return this.getCurrentSpeedMult()<0&&(t*=-1),_.chart.reverse&&(t*=-1),e<0&&(t*=-1),t}getUpperBoundBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=_.chart.speed,t=this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime()),i=t>=0!=_.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/_.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Lt(s,this.getVisualBeat()-_.chart.maxDrawBeatsBack,m=>m.beat);for(this.getVisualBeat()-_.chart.maxDrawBeatsBack0&&w>a&&(ga||!s[l-1]||s[l-1].beat0?s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)>f?this.getVisualBeat()-_.chart.maxDrawBeatsBack:Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,c+u*(f-d)):s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)=0!=_.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/_.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Lt(s,this.getVisualBeat()+_.chart.maxDrawBeats,m=>m.beat);for(;l=0&&(s[l].beat??0)>this.getVisualBeat()-_.chart.maxDrawBeatsBack;){const m=s[l],g=this.getYPosFromBeat(m?.beat??0),y=s[l+1]?.beat??this.getVisualBeat()+_.chart.maxDrawBeats,w=this.getYPosFromBeat(y);if((m?.value??1)*i>0&&go||!s[l+1]||s[l+1].beat>this.getVisualBeat()+_.chart.maxDrawBeatsBack||s[l+1].value==0)||(m?.value??1)*i<0&&g>o&&(wthis.getVisualBeat()+_.chart.maxDrawBeatsBack||s[l+1].value==0))break;l--}const c=s[l]?.beat??0,d=this.getYPosFromBeat(c),h=s[l]?.value??1,u=n/Math.abs(h)*_.chart.zoom,p=_.chart.reverse?o:a,f=_.chart.reverse?a:o;return h*i>0?s[l+1]?.value==0&&this.getYPosFromBeat(s[l+1].beat)p?this.getVisualBeat()+_.chart.maxDrawBeats:Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,c+u*(d-p))}return _.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}selectionTest(e){if(!this.selectionBounds)return!1;const t=this.selectionBoundary.getBounds(),i=e.getBounds(),s=16*_.chart.zoom;return t.x+t.width>i.x+s&&t.xi.y+s&&t.y{const d=o,h=this.toLocal(c.global);if(Math.abs(h.y-a-n)**2+Math.abs(h.x-s)**2<32*32){this.chartManager.selection.shift&&(this.chartManager.selection.shift={columnShift:0,beatShift:0});return}const u=this.getBeatFromYPos(h.y-a),p=_.chart.snap==0?1/48:_.chart.snap;let f=Math.round(u/p)*p;Math.abs(f-u)>Math.abs(u-d.beat)&&(f=d.beat);const m=this.getColumnFromXPos(h.x);this.chartManager.selection.shift||={columnShift:0,beatShift:0},i!=m-d.col&&(i=m-d.col,this.chartManager.selection.notes.every(g=>{const y=g.col+i;return y>=0&&yg.beat)),f-d.beat)};e.on("pointerdown",c=>{if(this.chartManager.getMode()==Y.View)return;if(Uc(c)){this.chartManager.isNoteInSelection(t)||(this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),pC.open(this.chartManager.app,c),c.preventDefault();return}if(_.chart.mousePlacement&&!c.getModifierState("Meta")&&!c.getModifierState("Control")&&!c.getModifierState("Shift")&&!this.chartManager.isNoteInSelection(t))return;c.stopImmediatePropagation(),this.chartManager.isNoteInSelection(t)?(c.getModifierState("Control")||c.getModifierState("Meta"))&&this.chartManager.removeNoteFromSelection(t):(!c.getModifierState("Control")&&!c.getModifierState("Meta")&&!c.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),s=e.x,n=e.y,a=this.toLocal(c.global).y-e.y,o=t,this.on("pointermove",l);const d=()=>{this.off("pointermove",l),this.off("pointerup",d),((this.chartManager.selection.shift?.beatShift??0)!=0||(this.chartManager.selection.shift?.columnShift??0)!=0)&&this.chartManager.modifySelection(h=>(h.beat+=this.chartManager.selection.shift.beatShift,h.col+=this.chartManager.selection.shift.columnShift,h)),this.chartManager.selection.shift=void 0};this.on("pointerup",d)}),e.on("destroyed",()=>{e?.removeAllListeners()})}getNotefield(){return this.notefield}swapNoteskin(e){_.chart.noteskin.name=e,_.chart.lastNoteskins[this.chart.gameType.id]=e,this.reloadNotefield()}reloadNotefield(){const e=new Tf(this);this.addChildAt(e,this.children.indexOf(this.notefield)),this.notefield.destroy(),this.notefield=e}getSelectionBounds(){return this.selectionBounds}shouldDisplayBarlines(){return(this.chartManager.getMode()!=Y.Play||!_.play.hideBarlines)&&Ie.barlines}}class Fd extends AudioBufferSourceNode{started=!1;start(e,t,i){this.started||super.start(e,t,i),this.started=!0}stop(e){this.started&&super.stop(e),this.started=!1}static create(e){const t=e;return t.started=!1,Object.setPrototypeOf(t,Fd.prototype),t}}class $C extends BiquadFilterNode{enabled=!1;static create(e){const t=e;return t.enabled=!1,t}}class fo{_audioAnalyzer;_filteredAudioAnalyzer;_freqData;_filteredFreqData;_gainNode;type;_audioContext=new AudioContext;_source;_playbackTime=0;_startTimestamp=0;_rate=1;_isPlaying=!1;_buffer;_filteredBuffer;_loadedBuffer;_delay;_loadListeners=[];_updateListeners=[];_volume=1;_destroyed=!1;_renderTimeout;_filters=[this.createFilter({type:"highpass",frequency:20,Q:.71}),this.createFilter({type:"lowshelf",frequency:75,gain:0}),this.createFilter({type:"peaking",frequency:100,gain:0,Q:.6}),this.createFilter({type:"peaking",frequency:250,gain:0,Q:.3}),this.createFilter({type:"peaking",frequency:1040,gain:0,Q:.41}),this.createFilter({type:"peaking",frequency:2500,gain:0,Q:.2}),this.createFilter({type:"highshelf",frequency:7500,gain:0}),this.createFilter({type:"lowpass",frequency:2e4,Q:.71})];_filtersEnabled=!1;loaded;constructor(e,t){this.type=t??"",this._filters[0].gain.value=-25,this._audioAnalyzer=this._audioContext.createAnalyser(),this._audioAnalyzer.fftSize=4096,this._audioAnalyzer.maxDecibels=0,this._freqData=new Uint8Array(this._audioAnalyzer.frequencyBinCount),this._filteredAudioAnalyzer=this._audioContext.createAnalyser(),this._filteredAudioAnalyzer.fftSize=4096,this._filteredAudioAnalyzer.maxDecibels=0,this._filteredFreqData=new Uint8Array(this._filteredAudioAnalyzer.frequencyBinCount),this._gainNode=this._audioContext.createGain(),this._buffer=this._audioContext.createBuffer(2,1,44100),this._filteredBuffer=this._audioContext.createBuffer(2,1,44100),this._loadedBuffer=this._audioContext.createBuffer(2,1,44100),this.initSource(),this.loaded=new Promise(i=>{e&&Se.create("Loading audio..."),this.decodeData(e).then(s=>{if(s)return this._loadedBuffer=s,Se.create("Loaded audio"),s}).then(async s=>(await this.renderBuffer(s),await this.renderFilteredBuffer(s),s)).catch(s=>{s.name=="EncodingError"?Se.createFormatted("Failed to load audio: file format not supported","error"):Se.createFormatted("Failed to load audio: "+s.message,"error")}).finally(()=>{this.initSource(),this.callLoadListeners(),this.callUpdateListeners(),i()})})}async renderBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();return i.buffer=e,i.connect(t.destination),i.start(),await t.startRendering().then(s=>{this._buffer=s}).catch(()=>{Se.createFormatted("Failed to load audio: audio rendering failed","error")})}async renderFilteredBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();i.buffer=e;let s=i;for(const n of this._filters){if(!n.enabled)continue;const a=t.createBiquadFilter();a.type=n.type,a.Q.setValueAtTime(n.Q.value,0),a.frequency.setValueAtTime(n.frequency.value,0),a.gain.setValueAtTime(n.gain.value,0),s.connect(a),s=a}return s.connect(t.destination),i.start(),await t.startRendering().then(n=>{this._filteredBuffer=n}).catch(()=>{Se.createFormatted("Failed to load audio: audio rendering failed","error")})}createFilter(e){const t=$C.create(this._audioContext.createBiquadFilter());return t.type=e.type,e.Q!==void 0&&(t.Q.value=e.Q),e.gain!==void 0&&(t.gain.value=e.gain),e.frequency!==void 0&&(t.frequency.value=e.frequency),t}getFilters(){return this._filters}getFilter(e){return this._filters[e]}updateFilter(e,t){this._filters[e]&&(t.Q!==void 0&&(this._filters[e].Q.value=t.Q),t.frequency!==void 0&&(this._filters[e].frequency.value=t.frequency),t.gain!==void 0&&(this._filters[e].gain.value=t.gain),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500))}enableFilter(e){this._filters[e].enabled=!0,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=!0}disableFilter(e){this._filters[e].enabled=!1,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=this._filters.some(t=>t.enabled)}hasFilters(){return this._filtersEnabled}onLoad(e){this._loadListeners.push(e)}offLoad(e){this._loadListeners=this._loadListeners.filter(t=>t!=e)}onUpdate(e){this._updateListeners.push(e)}offUpdate(e){this._updateListeners=this._updateListeners.filter(t=>t!=e)}getSongLength(){return this._buffer.length/this._buffer.sampleRate}getFrequencyData(){return this._destroyed?new Uint8Array:(this._audioAnalyzer.getByteFrequencyData(this._freqData),this._freqData)}getFilteredFrequencyData(){return this._destroyed?new Uint8Array:(this._filteredAudioAnalyzer.getByteFrequencyData(this._filteredFreqData),this._filteredFreqData)}getSampleRate(){return this._buffer.sampleRate}getFFTSize(){return this._audioAnalyzer.fftSize}getRawData(){if(this._destroyed)return[];const e=[];for(let t=0;ti.enabled)?this._filters.filter(i=>i.enabled).map(i=>{const s=new Float32Array(e.length);return i.getFrequencyResponse(t,s,new Float32Array(e.length)),[...s]}).reduce((i,s)=>i.map((n,a)=>n*s[a])):new Array(e.length).fill(1)}callLoadListeners(){this._loadListeners.forEach(e=>e())}callUpdateListeners(){this._updateListeners.forEach(e=>e())}async decodeData(e){return new Promise((t,i)=>{if(!e){t();return}(async()=>{try{t(await this._audioContext.decodeAudioData(e))}catch(s){if(this.type==".ogg"){const n=(await Ke(()=>import("./OggDec-2941c3fd.js"),[])).default;try{t(await n.decodeOggData(e))}catch(a){i(a)}return}i(s)}})()})}initSource(){for(const t of this._filters)t.disconnect();this._audioAnalyzer.disconnect(),this._filteredAudioAnalyzer.disconnect(),this._gainNode.disconnect(),this._audioContext.destination.disconnect(),this._source?.stop(),this._source=Fd.create(this._audioContext.createBufferSource()),this._source.buffer=this._buffer,this._source.connect(this._audioAnalyzer);let e=this._audioAnalyzer;for(const t of this._filters)t.enabled&&(e.connect(t),e=t);e.connect(this._filteredAudioAnalyzer),_.audio.allowFilter?this._filteredAudioAnalyzer.connect(this._gainNode):this._audioAnalyzer.connect(this._gainNode),this._gainNode.connect(this._audioContext.destination),this._source.playbackRate.value=this._rate,this._isPlaying&&(this.pause(),this.play())}volume(e){this._destroyed||this._volume!=e&&(this._volume=e,this._gainNode.gain.setValueAtTime(e,this._audioContext.currentTime))}rate(e){this._destroyed||this._rate!=e&&(this._rate=e,this._source&&(this._isPlaying&&(this._playbackTime+=(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value),this._startTimestamp=this._audioContext.currentTime,this._source.playbackRate.value=e))}play(){this._destroyed||this._source&&(this._isPlaying||(this.initSource(),this._playbackTime<=this._buffer.duration&&(this._playbackTime<0?(clearTimeout(this._delay),this._delay=setInterval(()=>{this.seek()>0&&(clearInterval(this._delay),this._source?.start(0,0))})):this._source.start(0,this._playbackTime)),this._startTimestamp=this._audioContext.currentTime,this._isPlaying=!0))}seek(e){if(!this._destroyed&&this._source){if(e===void 0)return this._isPlaying?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:this._playbackTime;this._isPlaying?(this.stop(),this._playbackTime=e,this.play()):this._playbackTime=e}}pause(){this._destroyed||this.stop(!0)}stop(e){this._destroyed||this._source&&this._isPlaying&&(clearTimeout(this._delay),this._isPlaying=!1,this._playbackTime<=this._buffer.duration&&this._source.stop(),this._playbackTime=e?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:0)}}class XC{judgementCounts=new Map;holdJudgementCounts=new Map;dancePoints=0;maxCumulativeDancePoints=0;maxDancePoints=0;chartManager;notedata;dataPoints=[];handlers=[];combo=0;missCombo=0;maxCombo=0;bestJudge;constructor(e){this.notedata=e.loadedChart.getNotedata(),this.chartManager=e,this.bestJudge=Je.getCollection(_.play.timingCollection).getStandardWindows()[0],this.calculateMaxDP()}onJudge(e){this.handlers.push(e)}applyOffset(e){this.dataPoints=this.dataPoints.map(t=>Pi(t.judgement)||!Zi(t.judgement)?t:{...t,error:t.error!==null?t.error+e:null})}addDataPoint(e,t,i){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1),this.dancePoints+=t.dancePoints;const s=this.chartManager.loadedChart.timingData.getEventAtBeat("COMBOS",e[0].beat),n=s?.hitMult??1,a=s?.missMult??1;_l(t)||(this.maxCumulativeDancePoints+=Je.getCollection(_.play.timingCollection).getMaxDancePoints()),Pi(t)?(this.chartManager.loadedChart.gameType.gameLogic.usesHoldTicks||(this.maxCumulativeDancePoints+=e.filter(Le).reduce((o,l)=>o+Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(l.type),0)),this.combo=0,this.missCombo+=a,this.bestJudge=void 0):Zi(t)&&(Je.getCollection(_.play.timingCollection).shouldHideNote(t)?(this.combo+=e.length*n,this.combo>this.maxCombo&&(this.maxCombo=this.combo),this.missCombo=0,this.bestJudge&&t.getTimingWindowMS()>this.bestJudge.getTimingWindowMS()&&(this.bestJudge=t)):(this.bestJudge=void 0,this.combo=0)),this.handlers.forEach(o=>o(i,t)),this.dataPoints.push({second:e[0].second,error:i,judgement:t,notes:e})}addHoldDataPoint(e,t){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1);const i=Je.getCollection(_.play.timingCollection).getHeldJudgement(e);this.holdJudgementCounts.has(i)||this.holdJudgementCounts.set(i,[0,0]);const s=this.holdJudgementCounts.get(i);ws(t)?s[0]++:s[1]++,this.holdJudgementCounts.set(i,s),this.dancePoints+=t.dancePoints,this.maxCumulativeDancePoints+=Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(e.type),this.handlers.forEach(n=>n(0,t)),bn(t)&&(this.bestJudge=void 0)}getScore(){return this.maxDancePoints==0?0:this.dancePoints/this.maxDancePoints}getCumulativeScore(){return this.maxCumulativeDancePoints==0?0:this.dancePoints/this.maxCumulativeDancePoints}getDataPoints(){return this.dataPoints}getMedian(){return xl(this.dataPoints.filter(e=>!Pi(e.judgement)&&Zi(e.judgement)&&e.error!=null).map(e=>e.error))}getMaxCombo(){return this.maxCombo}calculateMaxDP(){this.maxDancePoints=this.chartManager.loadedChart.gameType.gameLogic.calculateMaxDP(this.notedata,this.chartManager.loadedChart.timingData)}getCount(e){return this.judgementCounts.get(e)??0}getCombo(){return this.combo}getMissCombo(){return this.missCombo}getBestJudge(){return this.bestJudge}}const ai=[1,2,3,4,6,8,12,16,24,48,-1];var Y=(r=>(r.View="View Mode",r.Edit="Edit Mode",r.Play="Play Mode",r.Record="Record Mode",r))(Y||{}),Ne=(r=>(r[r.Off=0]="Off",r[r.Edit=1]="Edit",r[r.Add=2]="Add",r))(Ne||{});class sM{app;chartAudio=new fo;chartView;widgetManager;assistTick=new fs.Howl({src:BE,volume:.5});me_high=new fs.Howl({src:Ng,volume:.5});me_low=new fs.Howl({src:Ug,volume:.5});mine=new fs.Howl({src:RE,volume:.5});loadedSM;smPath="";loadedChart;selection={notes:[],inProgressNotes:[]};eventSelection={timingEvents:[],inProgressTimingEvents:[]};editTimingMode=0;beat=0;time=0;holdEditing=[];editNoteTypeIndex=0;partialScroll=0;noteIndex=0;lastMetronomeDivision=-1;lastMetronomeMeasure=-1;lastSong=null;mode="Edit Mode";lastMode="Edit Mode";noChartTextA;noChartTextB;loadingText;shiftPressed=0;virtualClipboard="";startRegion;endRegion;gameStats;constructor(e){this.app=e,document.addEventListener("keydown",i=>{i.key=="Shift"&&this.shiftPressed++}),document.addEventListener("keyup",i=>{i.key=="Shift"&&(this.shiftPressed=Math.max(this.shiftPressed-1,0))}),document.addEventListener("cut",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),this.eventSelection.timingEvents.length>0?this.deleteEventSelection():this.deleteSelection(),i.preventDefault()},!0),document.addEventListener("copy",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),i.preventDefault(),i.stopImmediatePropagation()},!0),document.addEventListener("paste",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=i.clipboardData?.getData("text/plain");s&&this.paste(s,this.shiftPressed>0),i.preventDefault(),i.stopImmediatePropagation()},!0),e.view.addEventListener?.("wheel",i=>{if(!(this.loadedSM==null||this.loadedChart==null||this.chartView==null))if(i.preventDefault(),Si&&i.metaKey||!Si&&i.ctrlKey){const s=i.deltaY/5*_.chart.scroll.scrollSensitivity*(_.chart.scroll.invertZoomScroll?-1:1);_.chart.speed=Be(_.chart.speed*Math.pow(1.01,s),10,35e3)}else{if(this.mode=="Play Mode"||this.mode=="Record Mode")return;let s=this.beat;const n=_.chart.snap,a=_.chart.speed*(_.chart.reverse&&_.chart.scroll.invertReverseScroll?-1:1),o=i.deltaY/a*_.chart.scroll.scrollSensitivity;if(n==0?(this.partialScroll=0,s=this.beat+o):_.chart.scroll.scrollSnapEveryScroll?i.deltaY<0?s=Math.round((this.beat-n)/n)*n:s=Math.round((this.beat+n)/n)*n:(this.partialScroll+=o,Math.abs(this.partialScroll)>n&&(this.partialScroll<0?s=Math.round((this.beat+Math.ceil(this.partialScroll/n)*n)/n)*n:s=Math.round((this.beat+Math.floor(this.partialScroll/n)*n)/n)*n,this.partialScroll%=n)),s=Math.max(0,s),s!=this.beat&&this.setBeat(s),!this.holdEditing.every(l=>l==null))for(let l=0;l{this.noChartTextB.tint=8952234}),this.noChartTextB.on("mouseleave",()=>{this.noChartTextB.tint=5596791}),this.noChartTextB.on("mousedown",()=>{this.app.windowManager.openWindow(new ry(e,ze.getGameType("dance-single")))}),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.app.stage.addChild(this.noChartTextB),this.loadingText=new De("Loading simfile...",{fontName:"Main",fontSize:20}),this.loadingText.anchor.set(.5),this.loadingText.tint=5592405,this.app.stage.addChild(this.loadingText),this.loadingText.visible=!1;const t=()=>{this.noChartTextA.x=this.app.renderer.screen.width/2,this.noChartTextA.y=this.app.renderer.screen.height/2-20,this.noChartTextB.x=this.app.renderer.screen.width/2,this.noChartTextB.y=this.app.renderer.screen.height/2+10,this.loadingText.x=this.app.renderer.screen.width/2,this.loadingText.y=this.app.renderer.screen.height/2};t(),this.app.ticker.add(()=>{const i=performance.now();this.widgetManager.update(),this.loadedSM&&this.loadedChart&&this.chartView&&this.chartView.update(),ma.instance?.addDrawUpdateTimeValue(performance.now()-i)}),setInterval(()=>{if(!this.loadedSM||!this.loadedChart||!this.chartView)return;const i=performance.now(),s=this.chartAudio.seek();if(this.chartAudio.isPlaying()&&(this.setTime(s,!0),!this.holdEditing.every(d=>!d)))for(let d=0;d.3&&this.editHoldBeat(d,p,!1)}const n=this.loadedChart.getNotedata();let a=!1;for(;this.noteIndexn[this.noteIndex].second+_.play.effectOffset;)this.mode!="Record Mode"&&this.chartAudio.isPlaying()&&this.loadedChart.gameType.gameLogic.shouldAssistTick(n[this.noteIndex])&&(this.mode!="Play Mode"&&this.chartView.doJudgement(n[this.noteIndex],0,Xg),!a&&_.audio.assistTick&&Ie.assist&&(this.assistTick.play(),a=!0)),this.noteIndex++;const o=this.loadedChart.getBeatFromSeconds(this.time+_.play.effectOffset),l=Math.floor(this.loadedChart.timingData.getDivisionOfMeasure(o)),c=Math.floor(this.loadedChart.timingData.getMeasure(o));(c!=this.lastMetronomeMeasure||l!=this.lastMetronomeDivision)&&(this.lastMetronomeDivision=l,this.lastMetronomeMeasure=c,this.chartAudio.isPlaying()&&_.audio.metronome&&Ie.assist&&(l==0?this.me_high.play():this.me_low.play())),this.mode=="Play Mode"&&this.loadedChart.gameType.gameLogic.update(this),this.updateSoundProperties(),NS(),ma.instance?.addUpdateTimeValue(performance.now()-i)},5),q.on("resize",()=>{this.chartView&&(this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2),t()}),q.on("chartModified",()=>{this.loadedChart&&(this.loadedChart.recalculateStats(),q.emit("chartModifiedAfter"))}),window.addEventListener("keyup",i=>{if(this.mode=="Edit Mode"&&i.code.startsWith("Digit")){let s=parseInt(i.code.slice(5))-1;s==-1&&(s=9),this.endEditing(s)}},!0),window.addEventListener("keydown",i=>{const s=Re.getKeyNameFromCode(i.code);if(this.mode=="Edit Mode"&&!i.target.classList.contains("inlineEdit")&&!(i.target instanceof HTMLTextAreaElement)&&!(i.target instanceof HTMLInputElement)){if(i.code.startsWith("Digit")&&!i.repeat&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!i.ctrlKey){let n=parseInt(i.code.slice(5))-1;n==-1&&(n=9),n<(this.loadedChart?.gameType.numCols??4)&&(this.setNote(n,"key"),i.preventDefault(),i.stopImmediatePropagation())}if(!this.holdEditing.every(n=>n==null)){const n=["cursorUp","cursorDown","previousNote","nextNote","previousMeasure","nextMeasure","jumpChartStart","jumpChartEnd","jumpSongStart","jumpSongEnd"];for(const a of n)if(Re.getCombosForKeybind(a).map(o=>o.key).includes(s)){i.preventDefault(),i.stopImmediatePropagation(),Tt[a].callback(this.app);for(let o=0;oo.key).includes(s)){this.holdEditing=[];return}}}},!0),window.addEventListener("keydown",i=>{this.mode!="Play Mode"&&this.mode!="Record Mode"||i.key=="Escape"&&(this.setMode(this.lastMode),this.chartAudio.pause())},!0)}getBeat(){return this.beat}getTime(){return this.time}setBeat(e){this.loadedChart&&(this.beat=e,this.time=this.loadedChart.getSecondsFromBeat(this.beat),this.chartAudio.seek(this.time),this.getAssistTickIndex())}setTime(e,t){this.loadedChart&&(this.time=e,this.beat=this.loadedChart.getBeatFromSeconds(this.time),t||(this.chartAudio.seek(this.time),this.getAssistTickIndex()))}async loadSM(e){if(FS.close(),mt.instance.isDirty()){const s=new Tl(this.app,"Save","Do you wish to save the current file?",[{label:"Cancel",type:"default"},{label:"No",type:"default"},{label:"Yes",type:"confirm"}]);this.app.windowManager.openWindow(s);const n=await s.resolved;if(n=="Cancel")return;n=="Yes"&&this.save()}if(!e){this.smPath="",this.loadedSM=void 0,this.chartAudio.stop(),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.chartView?.destroy({children:!0});return}this.chartAudio.stop(),this.lastSong=null,this.smPath=e,this.time=0,this.beat=0,this.loadingText.visible=!0;const t=await Ue.getFileHandle(this.smPath);if(!t){Se.createFormatted("Couldn't load the file at "+this.smPath,"error"),this.app.windowManager.openWindow(new my(this.app)),this.loadingText.visible=!1;return}const i=await t.getFile();this.loadedSM=new dy(i),await this.loadedSM.loaded,this.loadingText.visible=!1,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,this.editTimingMode=0,q.emit("smLoaded"),await this.loadChart(),q.emit("smLoadedAfter"),this.time==0&&this.setBeat(0),hy.addSM(this.smPath,this.loadedSM)}async loadChart(e){if(this.loadedSM==null)return;if(e==null){if(this.loadedChart){const s=this.loadedSM.charts[this.loadedChart.gameType.id];s&&s.length>0&&(e=s.at(-1))}if(!e)for(const s of ze.getPriority()){const n=this.loadedSM.charts[s.id];if(n&&n.length>0){e=n.at(-1);break}}if(!e){this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.beat=0,this.time=0,this.loadedChart=void 0,this.chartView=void 0,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,q.emit("chartLoaded"),q.emit("chartModified");return}}if(e==this.loadedChart)return;this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.clearSelections(),this.loadedChart=e,this.beat=this.loadedChart.getBeatFromSeconds(this.time),mt.instance.reset(),_.play.timingCollection=_.play.defaultTimingCollection[e.gameType.id]??"ITG";const t=ze.getGameType(_.chart.noteskin.type),i={type:e.gameType.id,name:_.chart.lastNoteskins[e.gameType.id]??"default"};if(t){const s=nt.getNoteskinData(t,_.chart.noteskin.name);s?.gameTypes.includes(e.gameType.id)&&(i.name=s.id)}if(_.chart.noteskin=i,_.chart.lastNoteskins[e.gameType.id]=i.name,this.getAssistTickIndex(),this.chartView=new jC(this),this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2,(this.mode=="Play Mode"||this.mode=="Record Mode")&&this.setMode(this.lastMode),Ie.viewMode&&this.setMode("View Mode"),this.loadedChart.getMusicPath()!=this.lastSong){this.lastSong=this.loadedChart.getMusicPath();const s=this.chartAudio.isPlaying();await this.loadAudio(),q.emit("audioLoaded"),s&&this.chartAudio.play()}this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,Se.create("Loaded chart "+e.difficulty+" "+e.meter+" "+e.gameType.id),q.emit("chartLoaded"),q.emit("audioLoaded"),q.emit("chartModified"),this.loadedChart.gameType.id=="dance-single"?window.Parity=new cC(this.app,this.loadedChart.gameType.id):window.Parity=void 0,Ie.autoPlay&&this.playPause()}async loadAudio(){if(!this.loadedSM||!this.loadedChart)return;this.chartAudio.stop(),this.chartAudio?.destroy();const e=this.loadedChart.getMusicPath();if(e==""){Se.createFormatted("Failed to load audio: no audio file","error"),this.chartAudio=new fo(void 0);return}const t=await this.getAudioHandle(e);if(t==null){Se.createFormatted("Failed to load audio: couldn't find audio file "+e,"error"),this.chartAudio=new fo(void 0);return}const i=await t.getFile();this.chartAudio=new fo(await i.arrayBuffer(),$i(i.name)),this.chartAudio.seek(this.time),this.getAssistTickIndex()}async getAudioHandle(e){let t=await Ue.getFileHandleRelativeTo(this.smPath,e);if(t)return t;try{const i=await Ue.getDirectoryFiles(Ot(this.smPath));if(t=i.filter(s=>s.name.toLowerCase()==zi(e).toLowerCase())[0],t)return Se.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn"),t;t=i.filter(s=>fl.includes($i(s.name)))[0],t&&Se.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn")}catch{return}return t}getAudio(){return this.chartAudio}updateSoundProperties(){this.setEffectVolume(_.audio.soundEffectVolume*_.audio.masterVolume),this.setVolume(_.audio.songVolume*_.audio.masterVolume),this.setRate(_.audio.rate)}setRate(e){this.chartAudio.rate(e)}setVolume(e){this.chartAudio.volume(e)}setEffectVolume(e){this.assistTick.volume()!=e&&this.assistTick.volume(e),this.me_high.volume()!=e&&this.me_high.volume(e),this.me_low.volume()!=e&&this.me_low.volume(e),this.mine.volume()!=e&&this.mine.volume(e)}getAssistTickIndex(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null||this.loadedChart.getNotedata().length==0){this.noteIndex=0;return}this.noteIndex=Lt(this.loadedChart.getNotedata(),this.time,e=>e.second)+1,this.noteIndex>=1&&this.time<=this.loadedChart.getNotedata()[this.noteIndex-1].second&&this.noteIndex--}playPause(){this.chartAudio.isPlaying()?this.chartAudio.pause():this.chartAudio.play()}getClosestTick(e,t){if(!this.loadedChart)return 0;const i=Math.max(.001,4/t),s=this.loadedChart.timingData.getBeatOfMeasure(e),n=e-s,a=Math.round(s/i)*i;return Math.max(0,n+a)}snapToNearestTick(e){this.setBeat(Math.max(0,this.getClosestTick(e,4/_.chart.snap)))}snapToPreviousTick(){if(!this.loadedChart)return;const e=Math.max(.001,_.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),s=Math.floor((this.beat-i)/e)*e,n=Math.abs(s-(this.beat-i))<5e-4?s-e:s,a=n+i;if(n<0){const o=this.loadedChart.timingData.getBeatFromMeasure(t-1),l=Math.round((a-o)/e)*e;this.setBeat(Math.max(0,o+l));return}this.setBeat(Math.max(0,a))}snapToNextTick(){if(!this.loadedChart)return;const e=Math.max(.001,_.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),a=Math.floor((this.beat-i+5e-4)/e)*e+e+i,o=this.loadedChart.timingData.getBeatFromMeasure(t+1);if(a>o){this.setBeat(o);return}this.setBeat(a)}previousSnap(){let e=this.getSnapIndex()-1;e=(e+ai.length)%ai.length,_.chart.snap=ai[e]==-1?0:1/ai[e],q.emit("snapChanged")}nextSnap(){let e=this.getSnapIndex();(e==ai.length-1||Math.abs(1/_.chart.snap-ai[e])<=5e-4)&&e++,e=(e+ai.length)%ai.length,_.chart.snap=ai[e]==-1?0:1/ai[e],q.emit("snapChanged")}getSnapIndex(){return _.chart.snap==0?ai.length-1:ai.findIndex(e=>1/e<=_.chart.snap)}removeDuplicateBeats(e){if(e.length===0)return e;const t=[e[0]];for(let i=1;ii.beat+i.hold),t=this.loadedChart.getNotedata().map(i=>i.beat).concat(e).sort((i,s)=>i-s);return this.removeDuplicateBeats(t)}previousNote(){const e=this.getRows();if(e.length==0)return;let t=Lt(e,this.beat);this.beat==e[t]&&t--,this.setBeat(e[Math.max(0,t)])}nextNote(){const e=this.getRows();if(e.length==0)return;let t=Lt(e,this.beat);this.beat>=e[t]&&t++,this.setBeat(e[Math.min(e.length-1,t)])}firstNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();e.length!=0&&this.setBeat(e[0].beat)}lastNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();if(e.length==0)return;const t=e[e.length-1];this.setBeat(dr(t))}truncateHold(e,t){const i=Be(Math.round((t-Math.max(.020833333333333332,_.chart.snap))*48)/48,e.beat,e.beat+e.hold-.020833333333333332);return i==e.beat?{beat:e.beat,col:e.col,type:"Tap"}:{beat:e.beat,col:e.col,type:e.type,hold:i-e.beat}}setNote(e,t,i=this.beat){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;i=Math.max(0,Math.round(i*48)/48);const s=this.loadedChart.getNotedata().filter(o=>o.col!=e?!1:Math.abs(o.beat-i)<.003?!0:Le(o)&&o.beat==i),n=this.loadedChart.getNotedata().filter(o=>Le(o)&&o.col==e&&i>o.beat&&i<=o.beat+o.hold).map(o=>({oldNote:o,newNote:this.truncateHold(o,i)})),a={startBeat:i,endBeat:i,roll:!1,originalNote:void 0,type:t,removedNotes:s,truncatedHolds:n,direction:null};this.holdEditing[e]=a,s.length==0&&(a.originalNote={beat:i,col:e,type:this.getEditingNoteType()}),this.getAssistTickIndex(),this.app.actionHistory.run({action:()=>{a.removedNotes.forEach(o=>{this.loadedChart.removeNote(o),this.removeNoteFromSelection(o)}),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.oldNote,o.newNote)),a.originalNote&&this.loadedChart.addNote(a.originalNote)},undo:()=>{a.originalNote&&this.loadedChart.removeNote(a.originalNote),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.newNote,o.oldNote)),a.removedNotes.forEach(o=>this.loadedChart.addNote(o))}})}editHoldBeat(e,t,i){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const s=this.holdEditing[e];if(s==null||t==s.startBeat&&t==s.endBeat)return;if(s.direction===null&&(ta.beat==s.originalNote.beat&&a.col==s.originalNote.col||a.col!=e?!1:a.beat>=s.startBeat&&a.beat<=s.endBeat?!0:Le(a)&&a.beat+a.hold>=s.startBeat&&a.beat+a.hold<=s.endBeat);s.removedNotes=s.removedNotes.concat(n),n.forEach(a=>this.loadedChart.removeNote(a)),this.getAssistTickIndex()}endEditing(e){this.holdEditing[e]=void 0}previousNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex-1+e)%e}nextNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex+1+e)%e}getEditingNoteType(){return this.loadedChart?.gameType.editNoteTypes[this.editNoteTypeIndex]??null}setEditingNoteType(e){if(!this.loadedChart)return;const i=(this.loadedChart?.gameType.editNoteTypes).indexOf(e);i!=-1&&(this.editNoteTypeIndex=i)}getMode(){return this.mode}setMode(e){if(!this.loadedChart||!this.chartView)return;if(this.mode==e){(e=="Play Mode"||e=="Record Mode")&&(this.setMode(this.lastMode),this.getAssistTickIndex(),this.chartAudio.pause());return}(this.mode=="View Mode"||this.mode=="Edit Mode")&&(this.lastMode=this.mode),this.mode=e;const t=this.loadedChart.getNotedata();if(this.mode=="Play Mode"){t.forEach(i=>{i.gameplay={hideNote:!1,hasHit:!1}});for(const i of t)if(i.secondi.gameplay=void 0))}judgeCol(e){if(!(!this.loadedChart||!this.chartView)){if(this.mode=="Play Mode")this.loadedChart.gameType.gameLogic.keyDown(this,e);else if(this.mode=="Record Mode"){const t=this.loadedChart.getBeatFromSeconds(this.time+_.play.offset),i=_.chart.snap==0?1/48:_.chart.snap,s=Math.round(t/i)*i;this.setNote(e,"key",s)}}}judgeColUp(e){!this.loadedChart||!this.chartView||(this.mode=="Play Mode"?this.loadedChart.gameType.gameLogic.keyUp(this,e):this.mode=="Record Mode"&&this.endEditing(e))}async save(){if(!this.loadedSM)return;let e,t;if(window.nw){const s=window.nw.require("path"),n=s.parse(this.smPath);e=s.resolve(n.dir,n.name+".sm"),t=s.resolve(n.dir,n.name+".ssc")}else{const s=Ot(this.smPath),n=zi(this.smPath),a=n.includes(".")?n.split(".").slice(0,-1).join("."):n;e=s+"/"+a+".sm",t=s+"/"+a+".ssc"}let i=null;!this.loadedSM.usesChartTiming()&&await Ue.getFileHandle(e)&&await Ue.writeFile(e,this.loadedSM.serialize("sm")).catch(s=>{const n=s.message;n.includes(qo.GONE[0])||(i=n)}),(this.loadedSM.requiresSSC()||await Ue.getFileHandle(t))&&await Ue.writeFile(t,this.loadedSM.serialize("ssc")).catch(s=>{const n=s.message;n.includes(qo.GONE[0])||(i=n)}),i==null?this.loadedSM.usesChartTiming()?Se.create("Saved. No SM file since split timing was used."):Se.create("Saved"):Se.createFormatted("Failed to save file: "+i,"error"),mt.instance.setLimit()}hasSelection(){return this.hasNoteSelection()||this.hasEventSelection()}hasNoteSelection(){return this.selection.notes.length>0||this.startRegion!==void 0&&this.endRegion!==void 0}hasEventSelection(){return this.eventSelection.timingEvents.length>0}hasRange(){return this.selection.notes.length>1||this.eventSelection.timingEvents.length>1||this.startRegion!==void 0&&this.endRegion!==void 0}clearSelections(){this.selection={notes:[],inProgressNotes:[]},this.eventSelection={timingEvents:[],inProgressTimingEvents:[]}}startDragSelection(){this.selection.inProgressNotes=[]}endDragSelection(){let e=0,t=0;const i=[],s=this.selection.inProgressNotes,n=this.selection.notes,a=(o,l)=>o.beat==l.beat?o.col-l.col:o.beat-l.beat;if(s.length==0||n.length==0){this.selection.notes=s.concat(n),this.selection.inProgressNotes=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.selection.notes=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.selection.notes=i.concat(s.slice(e));break}this.selection.inProgressNotes=[]}startDragEventSelection(){this.eventSelection.inProgressTimingEvents=[]}endDragEventSelection(){let e=0,t=0;const i=[],s=this.eventSelection.inProgressTimingEvents,n=this.eventSelection.timingEvents,a=(o,l)=>o.beat-l.beat;if(s.length==0||n.length==0){this.eventSelection.timingEvents=s.concat(n),this.eventSelection.inProgressTimingEvents=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.eventSelection.timingEvents=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.eventSelection.timingEvents=i.concat(s.slice(e));break}this.eventSelection.inProgressTimingEvents=[]}addNoteToDragSelection(e){this.addNoteSelection(this.selection.inProgressNotes,e)}removeNoteFromDragSelection(e){this.removeNoteSelection(this.selection.inProgressNotes,e)}addEventToDragSelection(e){this.addEventSelection(this.eventSelection.inProgressTimingEvents,e)}removeEventFromDragSelection(e){this.removeEventSelection(this.eventSelection.inProgressTimingEvents,e)}addNoteToSelection(e){this.addNoteSelection(this.selection.notes,e)}removeNoteFromSelection(e){this.removeNoteSelection(this.selection.notes,e)}setNoteSelection(e){this.selection.inProgressNotes=[],this.selection.notes=[...e].sort((t,i)=>t.beat==i.beat?t.col-i.col:t.beat-i.beat)}addEventToSelection(e){this.addEventSelection(this.eventSelection.timingEvents,e)}removeEventFromSelection(e){this.removeEventSelection(this.eventSelection.timingEvents,e)}setEventSelection(e){this.eventSelection.inProgressTimingEvents=[],this.eventSelection.timingEvents=e.sort((t,i)=>t.beat-i.beat)}isNoteInSelection(e){return this.getNoteSelectionIndex(this.selection.notes,e)!=-1||this.getNoteSelectionIndex(this.selection.inProgressNotes,e)!=-1}isEventInSelection(e){return this.getEventSelectionIndex(this.eventSelection.timingEvents,e)!=-1||this.getEventSelectionIndex(this.eventSelection.inProgressTimingEvents,e)!=-1}addNoteSelection(e,t){let i=io(e,t.beat,s=>s.beat);for(;e[i]&&(e[i].beats.beat);for(;e[i]&&e[i].beat==t.beat;){if(jp(e[i],t))return i;i++}return-1}addEventSelection(e,t){let i=io(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat<=t.beat;)i++;e.splice(i,0,t)}removeEventSelection(e,t){const i=this.getEventSelectionIndex(e,t);i!=-1&&e.splice(i,1)}getEventSelectionIndex(e,t){let i=io(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat==t.beat;){if(jp(e[i],t))return i;i++}return-1}selectRegion(){if(this.loadedChart){if(this.endRegion!==void 0&&(this.startRegion=void 0,this.endRegion=void 0),this.startRegion===void 0){this.clearSelections(),this.startRegion=this.beat;return}this.endRegion=this.beat,this.endRegione.beat>=this.startRegion&&e.beat<=this.endRegion)):this.setEventSelection(ur.flatMap(e=>this.loadedChart.timingData.getColumn(e).events).filter(e=>e.beat>=this.startRegion&&e.beat<=this.endRegion))}}modifySelection(e){if(!this.loadedChart)return;const t=this.selection.notes,i=structuredClone(this.selection.notes).map(e).sort((o,l)=>o.beat==l.beat?o.col-l.col:o.beat-l.beat);if(i.length==0)return;const s=[];for(const o of i){const l=s.at(-1);l!==void 0&&l.beat==o.beat&&l.col==o.col||s.push(o)}if(s.length==0)return;const{removedNotes:n,truncatedHolds:a}=this.checkConflicts(s,t);this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(t.concat(n),!1),a.forEach(o=>this.loadedChart.modifyNote(o.oldNote,o.newNote,!1)),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(s))},undo:()=>{this.loadedChart.removeNotes(s,!1),a.forEach(o=>this.loadedChart.modifyNote(o.newNote,o.oldNote,!1)),this.loadedChart.addNotes(n,!1),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(t))}})}checkConflicts(e,t=[]){if(e.length==0)return{removedNotes:[],truncatedHolds:[]};const i=this.loadedChart.getNotedata(),s=this.loadedChart.gameType.numCols,n=new Array(s).fill(0).map(d=>[]);for(const d of i)n[d.col].push(d);const a=new Array(s).fill(0).map(d=>[]);for(const d of e)d.col>s||a[d.col].push(d);const o=[],l=[],c=[];for(let d=0;da[d][0].beat<=(Le(u)?u.beat+u.hold:u.beat));for(const u of a[d])for(;n[d][h];){const p=n[d][h],f=Le(u)?u.beat+u.hold:u.beat;if(!t.includes(p)&&!c.includes(p)&&(u.beat<=p.beat&&f>=p.beat?(c.push(p),o.push(p)):Le(p)&&p.beat+p.hold>=u.beat&&p.beatf)break;h++}}return o.sort((d,h)=>d.beat==h.beat?d.col-h.col:d.beat-h.beat),l.sort((d,h)=>d.newNote.beat==h.newNote.beat?d.newNote.col-h.newNote.col:d.newNote.beat-h.newNote.beat),{removedNotes:o,truncatedHolds:l}}modifyEventSelection(e){!this.loadedChart||!this.loadedSM||this.loadedChart.timingData.modify(this.eventSelection.timingEvents.map(t=>[t,e(structuredClone(t))]))}deleteSelection(){if(this.selection.notes.length==0)return;const e=this.selection.notes;this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(e),this.clearSelections()},undo:()=>{this.selection.notes=this.loadedChart.addNotes(e)}})}deleteEventSelection(){this.eventSelection.timingEvents.length!=0&&(!this.loadedChart||!this.loadedSM||this.loadedChart.timingData.delete(this.eventSelection.timingEvents))}paste(e,t=!1){if(this.loadedChart&&(e.startsWith("ArrowVortex:notes:")&&(this.pasteNotes(e,t)||this.pasteNotes(this.virtualClipboard,t)),e.startsWith("ArrowVortex:tempo:")||e.startsWith("SMEditor:tempo:"))){this.pasteTempo(e)||this.pasteTempo(this.virtualClipboard);return}}pasteNotes(e,t=!1){if(!this.loadedChart)return!0;const i=KS(e);return!i||i.length==0?!1:(this.insertNotes(i.map(s=>(s.beat+=this.beat,s.beat=Math.round(s.beat*48)/48,s)),t),!0)}insertNotes(e,t=!1){e.sort((n,a)=>n.beat==a.beat?n.col-a.col:n.beat-a.beat);const{removedNotes:i,truncatedHolds:s}=this.checkConflicts(e);if(t){const n=e.map(d=>dr(d));let a=0;for(const d of n)d>a&&(a=d);const o=new Array(this.loadedChart.gameType.numCols).fill(0).map((d,h)=>({type:"Hold",hold:a-e[0].beat,col:h,beat:e[0].beat})),{removedNotes:l,truncatedHolds:c}=this.checkConflicts(o);l.forEach(d=>{i.includes(d)||i.push(d)}),c.forEach(d=>{const h=s.find(u=>u.oldNote==d.oldNote);if(h){const u=Le(h.newNote)?h.newNote.hold:0,p=Le(h.newNote)?h.newNote.hold:0,f=Math.min(u,p);f==0?h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:"Tap"}:h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:h.newNote.type,hold:f}}}),i.sort((d,h)=>d.beat==h.beat?d.col-h.col:d.beat-h.beat),s.sort((d,h)=>d.newNote.beat==h.newNote.beat?d.newNote.col-h.newNote.col:d.newNote.beat-h.newNote.beat)}this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(i,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.oldNote,n.newNote,!1)}),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(e))},undo:()=>{this.loadedChart.removeNotes(e,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.newNote,n.oldNote,!1)}),this.setNoteSelection(this.loadedChart.addNotes(i)),this.clearSelections()}})}pasteTempo(e){if(!this.loadedChart||!this.loadedSM)return!0;const t=rC(e);if(!t||t.length==0)return!1;const i=this.loadedChart.timingData;return t.forEach(s=>{s.type=="ATTACKS"?s.second+=this.time:s.beat+=this.beat}),t.forEach(s=>s.isChartTiming=i.isPropertyChartSpecific(s.type)),i.insert(t),!0}copy(){if(this.selection.notes.length!=0){const e=Math.min(...this.selection.notes.map(s=>s.beat)),t=structuredClone(this.selection.notes).map(s=>(s.beat-=e,s)).sort((s,n)=>s.beat==n.beat?s.col-n.col:s.beat-n.beat),i=ZS(t);return this.virtualClipboard=i,i}else if(this.eventSelection.timingEvents.length!=0){const e=Math.min(...this.eventSelection.timingEvents.map(n=>n.beat)),t=this.loadedChart.timingData.getSecondsFromBeat(e),i=structuredClone(this.eventSelection.timingEvents).map(n=>n.type=="ATTACKS"?(n.second-=t,n):(n.beat-=e,n)).sort((n,a)=>n.type!=a.type?n.type.localeCompare(a.type):n.type=="ATTACKS"?n.second-a.second:n.beat-a.beat),s=eC(i);return this.virtualClipboard=s,s}}}export{id as $,mt as A,jt as B,pC as C,ma as D,q as E,Ie as F,ze as G,Oe as H,Ae as I,ke as J,Tt as K,Rt as L,$n as M,nt as N,_ as O,Zt as P,Me as Q,sd as R,dy as S,Qe as T,Gr as U,Rd as V,Se as W,Ty as X,Be as Y,ZC as Z,rM as _,Re as a,bm as a0,We as a1,Wt as a2,Y0 as a3,qo as a4,kE as a5,Wr as a6,wn as a7,Ke as a8,Ee as b,Et as c,sM as d,$i as e,Ue as f,ya as g,my as h,KC as i,Cr as j,dl as k,tM as l,B as m,kd as n,FS as o,iM as p,gi as q,yS as r,ie as s,Pt as t,Pe as u,Ji as v,Ft as w,JC as x,Yi as y,Ac as z}; diff --git a/HoldBody-c167b8e7.js b/HoldBody-7c69d162.js similarity index 98% rename from HoldBody-c167b8e7.js rename to HoldBody-7c69d162.js index e1a41932..0a74d2d1 100644 --- a/HoldBody-c167b8e7.js +++ b/HoldBody-7c69d162.js @@ -1 +1 @@ -import{H as c,$ as l,a0 as _,J as d,s as o,a1 as p,c as h,U as m}from"./ChartManager-eb846239.js";const s=new p;class n extends c{constructor(t,e=100,i=100){super(t),this.tileTransform=new l,this._width=e,this._height=i,this.uvMatrix=this.texture.uvMatrix||new _(t),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}get clampMargin(){return this.uvMatrix.clampMargin}set clampMargin(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)}get tileScale(){return this.tileTransform.scale}set tileScale(t){this.tileTransform.scale.copyFrom(t)}get tilePosition(){return this.tileTransform.position}set tilePosition(t){this.tileTransform.position.copyFrom(t)}_onTextureUpdate(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215}_render(t){const e=this._texture;!e||!e.valid||(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))}_calculateBounds(){const t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,i,r)}getLocalBounds(t){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new d),t=this._localBoundsRect),this._bounds.getRectangle(t)):super.getLocalBounds.call(this,t)}containsPoint(t){this.worldTransform.applyInverse(t,s);const e=this._width,i=this._height,r=-e*this.anchor._x;if(s.x>=r&&s.x=a&&s.y{this.tileScale.set(e/this.texture.width)}),this.uvRespectAnchor=!0,this.anchor.y=1,this.x=-e/2,this.width=e}}class T extends g{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(t,e){super(t[0],e),this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this._tickerUpdate,this,m.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,i=this.currentFrame;this._currentTime+=e,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this.texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange?.(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(t){this._textures=t,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}set currentFrame(t){if(t<0||t>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}export{T as A,g as H,n as T}; +import{H as c,$ as l,a0 as _,J as d,s as o,a1 as p,c as h,U as m}from"./ChartManager-a4938337.js";const s=new p;class n extends c{constructor(t,e=100,i=100){super(t),this.tileTransform=new l,this._width=e,this._height=i,this.uvMatrix=this.texture.uvMatrix||new _(t),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}get clampMargin(){return this.uvMatrix.clampMargin}set clampMargin(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)}get tileScale(){return this.tileTransform.scale}set tileScale(t){this.tileTransform.scale.copyFrom(t)}get tilePosition(){return this.tileTransform.position}set tilePosition(t){this.tileTransform.position.copyFrom(t)}_onTextureUpdate(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215}_render(t){const e=this._texture;!e||!e.valid||(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))}_calculateBounds(){const t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,i,r)}getLocalBounds(t){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new d),t=this._localBoundsRect),this._bounds.getRectangle(t)):super.getLocalBounds.call(this,t)}containsPoint(t){this.worldTransform.applyInverse(t,s);const e=this._width,i=this._height,r=-e*this.anchor._x;if(s.x>=r&&s.x=a&&s.y{this.tileScale.set(e/this.texture.width)}),this.uvRespectAnchor=!0,this.anchor.y=1,this.x=-e/2,this.width=e}}class T extends g{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(t,e){super(t[0],e),this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this._tickerUpdate,this,m.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,i=this.currentFrame;this._currentTime+=e,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this.texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange?.(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(t){this._textures=t,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}set currentFrame(t){if(t<0||t>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}export{T as A,g as H,n as T}; diff --git a/NodeFileHandler-6a5f8a13.js b/NodeFileHandler-bfbfd5ad.js similarity index 86% rename from NodeFileHandler-6a5f8a13.js rename to NodeFileHandler-bfbfd5ad.js index 18873b01..6459d171 100644 --- a/NodeFileHandler-6a5f8a13.js +++ b/NodeFileHandler-bfbfd5ad.js @@ -1,12 +1,12 @@ -import{a2 as Nr,a3 as Xr,g as ra,a4 as bi,a5 as na,a6 as oi,a7 as ai,W as ia}from"./ChartManager-eb846239.js";var dr={exports:{}};/** +import{a2 as Nr,a3 as Xr,g as ra,a4 as bi,a5 as na,a6 as oi,a7 as ai,W as ia}from"./ChartManager-a4938337.js";var dr={exports:{}};/** * @license * web-streams-polyfill v3.3.3 * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors. * This code is released under the MIT license. * SPDX-License-Identifier: MIT - */var si;function oa(){return si||(si=1,function(C,u){(function(m,p){p(u)})(Nr,function(m){function p(){}function w(e){return typeof e=="object"&&e!==null||typeof e=="function"}const R=p;function _(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch{}}const c=Promise,G=Promise.prototype.then,X=Promise.reject.bind(c);function F(e){return new c(e)}function B(e){return F(t=>t(e))}function g(e){return X(e)}function E(e,t,i){return G.call(e,t,i)}function T(e,t,i){E(E(e,t,i),void 0,R)}function O(e,t){T(e,t)}function Y(e,t){T(e,void 0,t)}function j(e,t,i){return E(e,t,i)}function U(e){E(e,void 0,R)}let H=e=>{if(typeof queueMicrotask=="function")H=queueMicrotask;else{const t=B(void 0);H=i=>E(t,i)}return H(e)};function ee(e,t,i){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,i)}function D(e,t,i){try{return B(ee(e,t,i))}catch(a){return g(a)}}const ft=16384;class te{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const i=this._back;let a=i;i._elements.length===ft-1&&(a={_elements:[],_next:void 0}),i._elements.push(t),a!==i&&(this._back=a,i._next=a),++this._size}shift(){const t=this._front;let i=t;const a=this._cursor;let l=a+1;const h=t._elements,b=h[a];return l===ft&&(i=t._next,l=0),--this._size,this._cursor=l,t!==i&&(this._front=i),h[a]=void 0,b}forEach(t){let i=this._cursor,a=this._front,l=a._elements;for(;(i!==l.length||a._next!==void 0)&&!(i===l.length&&(a=a._next,l=a._elements,i=0,l.length===0));)t(l[i]),++i}peek(){const t=this._front,i=this._cursor;return t._elements[i]}}const qt=Symbol("[[AbortSteps]]"),xt=Symbol("[[ErrorSteps]]"),ct=Symbol("[[CancelSteps]]"),dt=Symbol("[[PullSteps]]"),ht=Symbol("[[ReleaseSteps]]");function Wt(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?pt(e):t._state==="closed"?br(e):vt(e,t._storedError)}function Ve(e,t){const i=e._ownerReadableStream;return pe(i,t)}function ue(e){const t=e._ownerReadableStream;t._state==="readable"?mt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[ht](),t._reader=void 0,e._ownerReadableStream=void 0}function Ge(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function pt(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i})}function vt(e,t){pt(e),mt(e,t)}function br(e){pt(e),J(e)}function mt(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Q(e,t){vt(e,t)}function J(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const bt=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},kt=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Ot(e){return typeof e=="object"||typeof e=="function"}function ae(e,t){if(e!==void 0&&!Ot(e))throw new TypeError(`${t} is not an object.`)}function re(e,t){if(typeof e!="function")throw new TypeError(`${t} is not a function.`)}function Te(e){return typeof e=="object"&&e!==null||typeof e=="function"}function Xe(e,t){if(!Te(e))throw new TypeError(`${t} is not an object.`)}function le(e,t,i){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${i}'.`)}function yt(e,t,i){if(e===void 0)throw new TypeError(`${t} is required in '${i}'.`)}function Je(e){return Number(e)}function we(e){return e===0?0:e}function Oe(e){return we(kt(e))}function _t(e,t){const a=Number.MAX_SAFE_INTEGER;let l=Number(e);if(l=we(l),!bt(l))throw new TypeError(`${t} is not a finite number`);if(l=Oe(l),l<0||l>a)throw new TypeError(`${t} is outside the accepted range of 0 to ${a}, inclusive`);return!bt(l)||l===0?0:l}function wt(e,t){if(!qe(e))throw new TypeError(`${t} is not a ReadableStream.`)}function be(e){return new V(e)}function Dt(e,t){e._reader._readRequests.push(t)}function gt(e,t,i){const l=e._reader._readRequests.shift();i?l._closeSteps():l._chunkSteps(t)}function De(e){return e._reader._readRequests.length}function ze(e){const t=e._reader;return!(t===void 0||!fe(t))}class V{constructor(t){if(le(t,1,"ReadableStreamDefaultReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Wt(this,t),this._readRequests=new te}get closed(){return fe(this)?this._closedPromise:g(o("closed"))}cancel(t=void 0){return fe(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(o("cancel"))}read(){if(!fe(this))return g(o("read"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let t,i;const a=F((h,b)=>{t=h,i=b});return Me(this,{_chunkSteps:h=>t({value:h,done:!1}),_closeSteps:()=>t({value:void 0,done:!0}),_errorSteps:h=>i(h)}),a}releaseLock(){if(!fe(this))throw o("releaseLock");this._ownerReadableStream!==void 0&&ye(this)}}Object.defineProperties(V.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),_(V.prototype.cancel,"cancel"),_(V.prototype.read,"read"),_(V.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function fe(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof V}function Me(e,t){const i=e._ownerReadableStream;i._disturbed=!0,i._state==="closed"?t._closeSteps():i._state==="errored"?t._errorSteps(i._storedError):i._readableStreamController[dt](t)}function ye(e){ue(e);const t=new TypeError("Reader was released");zt(e,t)}function zt(e,t){const i=e._readRequests;e._readRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function o(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}const r=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class n{constructor(t,i){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=i}next(){const t=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?j(this._ongoingPromise,t,t):t(),this._ongoingPromise}return(t){const i=()=>this._returnSteps(t);return this._ongoingPromise?j(this._ongoingPromise,i,i):i()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const t=this._reader;let i,a;const l=F((b,S)=>{i=b,a=S});return Me(t,{_chunkSteps:b=>{this._ongoingPromise=void 0,H(()=>i({value:b,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),i({value:void 0,done:!0})},_errorSteps:b=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),a(b)}}),l}_returnSteps(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;const i=this._reader;if(!this._preventCancel){const a=Ve(i,t);return ue(i),j(a,()=>({value:t,done:!0}))}return ue(i),B({value:t,done:!0})}}const s={next(){return d(this)?this._asyncIteratorImpl.next():g(y("next"))},return(e){return d(this)?this._asyncIteratorImpl.return(e):g(y("return"))}};Object.setPrototypeOf(s,r);function f(e,t){const i=be(e),a=new n(i,t),l=Object.create(s);return l._asyncIteratorImpl=a,l}function d(e){if(!w(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof n}catch{return!1}}function y(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}const x=Number.isNaN||function(e){return e!==e};var L,z,$;function k(e){return e.slice()}function rn(e,t,i,a,l){new Uint8Array(e).set(new Uint8Array(i,a,l),t)}let ge=e=>(typeof e.transfer=="function"?ge=t=>t.transfer():typeof structuredClone=="function"?ge=t=>structuredClone(t,{transfer:[t]}):ge=t=>t,ge(e)),Pe=e=>(typeof e.detached=="boolean"?Pe=t=>t.detached:Pe=t=>t.byteLength===0,Pe(e));function nn(e,t,i){if(e.slice)return e.slice(t,i);const a=i-t,l=new ArrayBuffer(a);return rn(l,0,e,t,a),l}function Mt(e,t){const i=e[t];if(i!=null){if(typeof i!="function")throw new TypeError(`${String(t)} is not a function`);return i}}function gi(e){const t={[Symbol.iterator]:()=>e.iterator},i=async function*(){return yield*t}(),a=i.next;return{iterator:i,nextMethod:a,done:!1}}const yr=($=(L=Symbol.asyncIterator)!==null&&L!==void 0?L:(z=Symbol.for)===null||z===void 0?void 0:z.call(Symbol,"Symbol.asyncIterator"))!==null&&$!==void 0?$:"@@asyncIterator";function on(e,t="sync",i){if(i===void 0)if(t==="async"){if(i=Mt(e,yr),i===void 0){const h=Mt(e,Symbol.iterator),b=on(e,"sync",h);return gi(b)}}else i=Mt(e,Symbol.iterator);if(i===void 0)throw new TypeError("The object is not iterable");const a=ee(i,e,[]);if(!w(a))throw new TypeError("The iterator method must return an object");const l=a.next;return{iterator:a,nextMethod:l,done:!1}}function Si(e){const t=ee(e.nextMethod,e.iterator,[]);if(!w(t))throw new TypeError("The iterator.next() method must return an object");return t}function Ri(e){return!!e.done}function Ei(e){return e.value}function Ci(e){return!(typeof e!="number"||x(e)||e<0)}function an(e){const t=nn(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function _r(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function wr(e,t,i){if(!Ci(i)||i===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:i}),e._queueTotalSize+=i}function Bi(e){return e._queue.peek().value}function Ae(e){e._queue=new te,e._queueTotalSize=0}function sn(e){return e===DataView}function Ti(e){return sn(e.constructor)}function Pi(e){return sn(e)?1:e.BYTES_PER_ELEMENT}class je{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!gr(this))throw Br("view");return this._view}respond(t){if(!gr(this))throw Br("respond");if(le(t,1,"respond"),t=_t(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");$t(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!gr(this))throw Br("respondWithNewView");if(le(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(t.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Nt(this._associatedReadableByteStreamController,t)}}Object.defineProperties(je.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),_(je.prototype.respond,"respond"),_(je.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(je.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Se{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Ue(this))throw Rt("byobRequest");return Cr(this)}get desiredSize(){if(!Ue(this))throw Rt("desiredSize");return yn(this)}close(){if(!Ue(this))throw Rt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const t=this._controlledReadableByteStream._state;if(t!=="readable")throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`);St(this)}enqueue(t){if(!Ue(this))throw Rt("enqueue");if(le(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new TypeError("chunk must be an array buffer view");if(t.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(t.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const i=this._controlledReadableByteStream._state;if(i!=="readable")throw new TypeError(`The stream (in ${i} state) is not in the readable state and cannot be enqueued to`);Lt(this,t)}error(t=void 0){if(!Ue(this))throw Rt("error");ce(this,t)}[ct](t){un(this),Ae(this);const i=this._cancelAlgorithm(t);return Ut(this),i}[dt](t){const i=this._controlledReadableByteStream;if(this._queueTotalSize>0){bn(this,t);return}const a=this._autoAllocateChunkSize;if(a!==void 0){let l;try{l=new ArrayBuffer(a)}catch(b){t._errorSteps(b);return}const h={buffer:l,bufferByteLength:a,byteOffset:0,byteLength:a,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(h)}Dt(i,t),Le(this)}[ht](){if(this._pendingPullIntos.length>0){const t=this._pendingPullIntos.peek();t.readerType="none",this._pendingPullIntos=new te,this._pendingPullIntos.push(t)}}}Object.defineProperties(Se.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),_(Se.prototype.close,"close"),_(Se.prototype.enqueue,"enqueue"),_(Se.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Se.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ue(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof Se}function gr(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof je}function Le(e){if(!xi(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Le(e)),null),a=>(ce(e,a),null))}function un(e){Rr(e),e._pendingPullIntos=new te}function Sr(e,t){let i=!1;e._state==="closed"&&(i=!0);const a=ln(t);t.readerType==="default"?gt(e,a,i):zi(e,a,i)}function ln(e){const t=e.bytesFilled,i=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/i)}function jt(e,t,i,a){e._queue.push({buffer:t,byteOffset:i,byteLength:a}),e._queueTotalSize+=a}function fn(e,t,i,a){let l;try{l=nn(t,i,i+a)}catch(h){throw ce(e,h),h}jt(e,l,0,a)}function cn(e,t){t.bytesFilled>0&&fn(e,t.buffer,t.byteOffset,t.bytesFilled),Ze(e)}function dn(e,t){const i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i;let l=i,h=!1;const b=a%t.elementSize,S=a-b;S>=t.minimumFill&&(l=S-t.bytesFilled,h=!0);const I=e._queue;for(;l>0;){const P=I.peek(),q=Math.min(l,P.byteLength),W=t.byteOffset+t.bytesFilled;rn(t.buffer,W,P.buffer,P.byteOffset,q),P.byteLength===q?I.shift():(P.byteOffset+=q,P.byteLength-=q),e._queueTotalSize-=q,hn(e,q,t),l-=q}return h}function hn(e,t,i){i.bytesFilled+=t}function pn(e){e._queueTotalSize===0&&e._closeRequested?(Ut(e),At(e._controlledReadableByteStream)):Le(e)}function Rr(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Er(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;const t=e._pendingPullIntos.peek();dn(e,t)&&(Ze(e),Sr(e._controlledReadableByteStream,t))}}function Ai(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(e._queueTotalSize===0)return;const i=t._readRequests.shift();bn(e,i)}}function Ii(e,t,i,a){const l=e._controlledReadableByteStream,h=t.constructor,b=Pi(h),{byteOffset:S,byteLength:I}=t,P=i*b;let q;try{q=ge(t.buffer)}catch(M){a._errorSteps(M);return}const W={buffer:q,bufferByteLength:q.byteLength,byteOffset:S,byteLength:I,bytesFilled:0,minimumFill:P,elementSize:b,viewConstructor:h,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(W),gn(l,a);return}if(l._state==="closed"){const M=new h(W.buffer,W.byteOffset,0);a._closeSteps(M);return}if(e._queueTotalSize>0){if(dn(e,W)){const M=ln(W);pn(e),a._chunkSteps(M);return}if(e._closeRequested){const M=new TypeError("Insufficient bytes to fill elements in the given buffer");ce(e,M),a._errorSteps(M);return}}e._pendingPullIntos.push(W),gn(l,a),Le(e)}function Fi(e,t){t.readerType==="none"&&Ze(e);const i=e._controlledReadableByteStream;if(Tr(i))for(;Sn(i)>0;){const a=Ze(e);Sr(i,a)}}function qi(e,t,i){if(hn(e,t,i),i.readerType==="none"){cn(e,i),Er(e);return}if(i.bytesFilled0){const l=i.byteOffset+i.bytesFilled;fn(e,i.buffer,l-a,a)}i.bytesFilled-=a,Sr(e._controlledReadableByteStream,i),Er(e)}function mn(e,t){const i=e._pendingPullIntos.peek();Rr(e),e._controlledReadableByteStream._state==="closed"?Fi(e,i):qi(e,t,i),Le(e)}function Ze(e){return e._pendingPullIntos.shift()}function xi(e){const t=e._controlledReadableByteStream;return t._state!=="readable"||e._closeRequested||!e._started?!1:!!(ze(t)&&De(t)>0||Tr(t)&&Sn(t)>0||yn(e)>0)}function Ut(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function St(e){const t=e._controlledReadableByteStream;if(!(e._closeRequested||t._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){const i=e._pendingPullIntos.peek();if(i.bytesFilled%i.elementSize!==0){const a=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ce(e,a),a}}Ut(e),At(t)}}function Lt(e,t){const i=e._controlledReadableByteStream;if(e._closeRequested||i._state!=="readable")return;const{buffer:a,byteOffset:l,byteLength:h}=t;if(Pe(a))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");const b=ge(a);if(e._pendingPullIntos.length>0){const S=e._pendingPullIntos.peek();if(Pe(S.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Rr(e),S.buffer=ge(S.buffer),S.readerType==="none"&&cn(e,S)}if(ze(i))if(Ai(e),De(i)===0)jt(e,b,l,h);else{e._pendingPullIntos.length>0&&Ze(e);const S=new Uint8Array(b,l,h);gt(i,S,!1)}else Tr(i)?(jt(e,b,l,h),Er(e)):jt(e,b,l,h);Le(e)}function ce(e,t){const i=e._controlledReadableByteStream;i._state==="readable"&&(un(e),Ae(e),Ut(e),Hn(i,t))}function bn(e,t){const i=e._queue.shift();e._queueTotalSize-=i.byteLength,pn(e);const a=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);t._chunkSteps(a)}function Cr(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),i=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),a=Object.create(je.prototype);vi(a,e,i),e._byobRequest=a}return e._byobRequest}function yn(e){const t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function $t(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(i.bytesFilled+t>i.byteLength)throw new RangeError("bytesWritten out of range")}i.buffer=ge(i.buffer),mn(e,t)}function Nt(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(i.byteOffset+i.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(i.bytesFilled+t.byteLength>i.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const l=t.byteLength;i.buffer=ge(t.buffer),mn(e,l)}function _n(e,t,i,a,l,h,b){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Ae(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,t._autoAllocateChunkSize=b,t._pendingPullIntos=new te,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Le(t),null),I=>(ce(t,I),null))}function Wi(e,t,i){const a=Object.create(Se.prototype);let l,h,b;t.start!==void 0?l=()=>t.start(a):l=()=>{},t.pull!==void 0?h=()=>t.pull(a):h=()=>B(void 0),t.cancel!==void 0?b=I=>t.cancel(I):b=()=>B(void 0);const S=t.autoAllocateChunkSize;if(S===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");_n(e,a,l,h,b,i,S)}function vi(e,t,i){e._associatedReadableByteStreamController=t,e._view=i}function Br(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Rt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function ki(e,t){ae(e,t);const i=e?.mode;return{mode:i===void 0?void 0:Oi(i,`${t} has member 'mode' that`)}}function Oi(e,t){if(e=`${e}`,e!=="byob")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Di(e,t){var i;ae(e,t);const a=(i=e?.min)!==null&&i!==void 0?i:1;return{min:_t(a,`${t} has member 'min' that`)}}function wn(e){return new Ie(e)}function gn(e,t){e._reader._readIntoRequests.push(t)}function zi(e,t,i){const l=e._reader._readIntoRequests.shift();i?l._closeSteps(t):l._chunkSteps(t)}function Sn(e){return e._reader._readIntoRequests.length}function Tr(e){const t=e._reader;return!(t===void 0||!$e(t))}class Ie{constructor(t){if(le(t,1,"ReadableStreamBYOBReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ue(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Wt(this,t),this._readIntoRequests=new te}get closed(){return $e(this)?this._closedPromise:g(Ht("closed"))}cancel(t=void 0){return $e(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(Ht("cancel"))}read(t,i={}){if(!$e(this))return g(Ht("read"));if(!ArrayBuffer.isView(t))return g(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return g(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return g(new TypeError("view's buffer must have non-zero byteLength"));if(Pe(t.buffer))return g(new TypeError("view's buffer has been detached"));let a;try{a=Di(i,"options")}catch(P){return g(P)}const l=a.min;if(l===0)return g(new TypeError("options.min must be greater than 0"));if(Ti(t)){if(l>t.byteLength)return g(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(l>t.length)return g(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let h,b;const S=F((P,q)=>{h=P,b=q});return Rn(this,t,l,{_chunkSteps:P=>h({value:P,done:!1}),_closeSteps:P=>h({value:P,done:!0}),_errorSteps:P=>b(P)}),S}releaseLock(){if(!$e(this))throw Ht("releaseLock");this._ownerReadableStream!==void 0&&Mi(this)}}Object.defineProperties(Ie.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),_(Ie.prototype.cancel,"cancel"),_(Ie.prototype.read,"read"),_(Ie.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ie.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof Ie}function Rn(e,t,i,a){const l=e._ownerReadableStream;l._disturbed=!0,l._state==="errored"?a._errorSteps(l._storedError):Ii(l._readableStreamController,t,i,a)}function Mi(e){ue(e);const t=new TypeError("Reader was released");En(e,t)}function En(e,t){const i=e._readIntoRequests;e._readIntoRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function Ht(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Et(e,t){const{highWaterMark:i}=e;if(i===void 0)return t;if(x(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function Yt(e){const{size:t}=e;return t||(()=>1)}function Qt(e,t){ae(e,t);const i=e?.highWaterMark,a=e?.size;return{highWaterMark:i===void 0?void 0:Je(i),size:a===void 0?void 0:ji(a,`${t} has member 'size' that`)}}function ji(e,t){return re(e,t),i=>Je(e(i))}function Ui(e,t){ae(e,t);const i=e?.abort,a=e?.close,l=e?.start,h=e?.type,b=e?.write;return{abort:i===void 0?void 0:Li(i,e,`${t} has member 'abort' that`),close:a===void 0?void 0:$i(a,e,`${t} has member 'close' that`),start:l===void 0?void 0:Ni(l,e,`${t} has member 'start' that`),write:b===void 0?void 0:Hi(b,e,`${t} has member 'write' that`),type:h}}function Li(e,t,i){return re(e,i),a=>D(e,t,[a])}function $i(e,t,i){return re(e,i),()=>D(e,t,[])}function Ni(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Hi(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Cn(e,t){if(!Ke(e))throw new TypeError(`${t} is not a WritableStream.`)}function Yi(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}const Qi=typeof AbortController=="function";function Vi(){if(Qi)return new AbortController}class Fe{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Qt(i,"Second parameter"),l=Ui(t,"First parameter");if(Tn(this),l.type!==void 0)throw new RangeError("Invalid type is specified");const b=Yt(a),S=Et(a,1);uo(this,l,S,b)}get locked(){if(!Ke(this))throw Zt("locked");return et(this)}abort(t=void 0){return Ke(this)?et(this)?g(new TypeError("Cannot abort a stream that already has a writer")):Vt(this,t):g(Zt("abort"))}close(){return Ke(this)?et(this)?g(new TypeError("Cannot close a stream that already has a writer")):_e(this)?g(new TypeError("Cannot close an already-closing stream")):Pn(this):g(Zt("close"))}getWriter(){if(!Ke(this))throw Zt("getWriter");return Bn(this)}}Object.defineProperties(Fe.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),_(Fe.prototype.abort,"abort"),_(Fe.prototype.close,"close"),_(Fe.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Fe.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Bn(e){return new Re(e)}function Gi(e,t,i,a,l=1,h=()=>1){const b=Object.create(Fe.prototype);Tn(b);const S=Object.create(tt.prototype);return Wn(b,S,e,t,i,a,l,h),b}function Tn(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new te,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Ke(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof Fe}function et(e){return e._writer!==void 0}function Vt(e,t){var i;if(e._state==="closed"||e._state==="errored")return B(void 0);e._writableStreamController._abortReason=t,(i=e._writableStreamController._abortController)===null||i===void 0||i.abort(t);const a=e._state;if(a==="closed"||a==="errored")return B(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let l=!1;a==="erroring"&&(l=!0,t=void 0);const h=F((b,S)=>{e._pendingAbortRequest={_promise:void 0,_resolve:b,_reject:S,_reason:t,_wasAlreadyErroring:l}});return e._pendingAbortRequest._promise=h,l||Ar(e,t),h}function Pn(e){const t=e._state;if(t==="closed"||t==="errored")return g(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const i=F((l,h)=>{const b={_resolve:l,_reject:h};e._closeRequest=b}),a=e._writer;return a!==void 0&&e._backpressure&&t==="writable"&&Or(a),lo(e._writableStreamController),i}function Xi(e){return F((i,a)=>{const l={_resolve:i,_reject:a};e._writeRequests.push(l)})}function Pr(e,t){if(e._state==="writable"){Ar(e,t);return}Ir(e)}function Ar(e,t){const i=e._writableStreamController;e._state="erroring",e._storedError=t;const a=e._writer;a!==void 0&&In(a,t),!to(e)&&i._started&&Ir(e)}function Ir(e){e._state="errored",e._writableStreamController[xt]();const t=e._storedError;if(e._writeRequests.forEach(l=>{l._reject(t)}),e._writeRequests=new te,e._pendingAbortRequest===void 0){Gt(e);return}const i=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,i._wasAlreadyErroring){i._reject(t),Gt(e);return}const a=e._writableStreamController[qt](i._reason);T(a,()=>(i._resolve(),Gt(e),null),l=>(i._reject(l),Gt(e),null))}function Ji(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Zi(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Pr(e,t)}function Ki(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const i=e._writer;i!==void 0&&Dn(i)}function eo(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Pr(e,t)}function _e(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function to(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function ro(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function no(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Gt(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;t!==void 0&&vr(t,e._storedError)}function Fr(e,t){const i=e._writer;i!==void 0&&t!==e._backpressure&&(t?yo(i):Or(i)),e._backpressure=t}class Re{constructor(t){if(le(t,1,"WritableStreamDefaultWriter"),Cn(t,"First parameter"),et(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;const i=t._state;if(i==="writable")!_e(t)&&t._backpressure?er(this):zn(this),Kt(this);else if(i==="erroring")kr(this,t._storedError),Kt(this);else if(i==="closed")zn(this),mo(this);else{const a=t._storedError;kr(this,a),On(this,a)}}get closed(){return Ne(this)?this._closedPromise:g(He("closed"))}get desiredSize(){if(!Ne(this))throw He("desiredSize");if(this._ownerWritableStream===void 0)throw Bt("desiredSize");return so(this)}get ready(){return Ne(this)?this._readyPromise:g(He("ready"))}abort(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("abort")):io(this,t):g(He("abort"))}close(){if(!Ne(this))return g(He("close"));const t=this._ownerWritableStream;return t===void 0?g(Bt("close")):_e(t)?g(new TypeError("Cannot close an already-closing stream")):An(this)}releaseLock(){if(!Ne(this))throw He("releaseLock");this._ownerWritableStream!==void 0&&Fn(this)}write(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("write to")):qn(this,t):g(He("write"))}}Object.defineProperties(Re.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),_(Re.prototype.abort,"abort"),_(Re.prototype.close,"close"),_(Re.prototype.releaseLock,"releaseLock"),_(Re.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Re.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ne(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof Re}function io(e,t){const i=e._ownerWritableStream;return Vt(i,t)}function An(e){const t=e._ownerWritableStream;return Pn(t)}function oo(e){const t=e._ownerWritableStream,i=t._state;return _e(t)||i==="closed"?B(void 0):i==="errored"?g(t._storedError):An(e)}function ao(e,t){e._closedPromiseState==="pending"?vr(e,t):bo(e,t)}function In(e,t){e._readyPromiseState==="pending"?Mn(e,t):_o(e,t)}function so(e){const t=e._ownerWritableStream,i=t._state;return i==="errored"||i==="erroring"?null:i==="closed"?0:vn(t._writableStreamController)}function Fn(e){const t=e._ownerWritableStream,i=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");In(e,i),ao(e,i),t._writer=void 0,e._ownerWritableStream=void 0}function qn(e,t){const i=e._ownerWritableStream,a=i._writableStreamController,l=fo(a,t);if(i!==e._ownerWritableStream)return g(Bt("write to"));const h=i._state;if(h==="errored")return g(i._storedError);if(_e(i)||h==="closed")return g(new TypeError("The stream is closing or closed and cannot be written to"));if(h==="erroring")return g(i._storedError);const b=Xi(i);return co(a,t,l),b}const xn={};class tt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!qr(this))throw Wr("abortReason");return this._abortReason}get signal(){if(!qr(this))throw Wr("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(t=void 0){if(!qr(this))throw Wr("error");this._controlledWritableStream._state==="writable"&&kn(this,t)}[qt](t){const i=this._abortAlgorithm(t);return Xt(this),i}[xt](){Ae(this)}}Object.defineProperties(tt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(tt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function qr(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof tt}function Wn(e,t,i,a,l,h,b,S){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._abortReason=void 0,t._abortController=Vi(),t._started=!1,t._strategySizeAlgorithm=S,t._strategyHWM=b,t._writeAlgorithm=a,t._closeAlgorithm=l,t._abortAlgorithm=h;const I=xr(t);Fr(e,I);const P=i(),q=B(P);T(q,()=>(t._started=!0,Jt(t),null),W=>(t._started=!0,Pr(e,W),null))}function uo(e,t,i,a){const l=Object.create(tt.prototype);let h,b,S,I;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.write!==void 0?b=P=>t.write(P,l):b=()=>B(void 0),t.close!==void 0?S=()=>t.close():S=()=>B(void 0),t.abort!==void 0?I=P=>t.abort(P):I=()=>B(void 0),Wn(e,l,h,b,S,I,i,a)}function Xt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function lo(e){wr(e,xn,0),Jt(e)}function fo(e,t){try{return e._strategySizeAlgorithm(t)}catch(i){return Ct(e,i),1}}function vn(e){return e._strategyHWM-e._queueTotalSize}function co(e,t,i){try{wr(e,t,i)}catch(l){Ct(e,l);return}const a=e._controlledWritableStream;if(!_e(a)&&a._state==="writable"){const l=xr(e);Fr(a,l)}Jt(e)}function Jt(e){const t=e._controlledWritableStream;if(!e._started||t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring"){Ir(t);return}if(e._queue.length===0)return;const a=Bi(e);a===xn?ho(e):po(e,a)}function Ct(e,t){e._controlledWritableStream._state==="writable"&&kn(e,t)}function ho(e){const t=e._controlledWritableStream;ro(t),_r(e);const i=e._closeAlgorithm();Xt(e),T(i,()=>(Ki(t),null),a=>(eo(t,a),null))}function po(e,t){const i=e._controlledWritableStream;no(i);const a=e._writeAlgorithm(t);T(a,()=>{Ji(i);const l=i._state;if(_r(e),!_e(i)&&l==="writable"){const h=xr(e);Fr(i,h)}return Jt(e),null},l=>(i._state==="writable"&&Xt(e),Zi(i,l),null))}function xr(e){return vn(e)<=0}function kn(e,t){const i=e._controlledWritableStream;Xt(e),Ar(i,t)}function Zt(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Wr(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function He(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Bt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Kt(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i,e._closedPromiseState="pending"})}function On(e,t){Kt(e),vr(e,t)}function mo(e){Kt(e),Dn(e)}function vr(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function bo(e,t){On(e,t)}function Dn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function er(e){e._readyPromise=F((t,i)=>{e._readyPromise_resolve=t,e._readyPromise_reject=i}),e._readyPromiseState="pending"}function kr(e,t){er(e),Mn(e,t)}function zn(e){er(e),Or(e)}function Mn(e,t){e._readyPromise_reject!==void 0&&(U(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function yo(e){er(e)}function _o(e,t){kr(e,t)}function Or(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function wo(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof Nr<"u")return Nr}const Dr=wo();function go(e){if(!(typeof e=="function"||typeof e=="object")||e.name!=="DOMException")return!1;try{return new e,!0}catch{return!1}}function So(){const e=Dr?.DOMException;return go(e)?e:void 0}function Ro(){const e=function(i,a){this.message=i||"",this.name=a||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return _(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}const Eo=So()||Ro();function jn(e,t,i,a,l,h){const b=be(e),S=Bn(t);e._disturbed=!0;let I=!1,P=B(void 0);return F((q,W)=>{let M;if(h!==void 0){if(M=()=>{const A=h.reason!==void 0?h.reason:new Eo("Aborted","AbortError"),v=[];a||v.push(()=>t._state==="writable"?Vt(t,A):B(void 0)),l||v.push(()=>e._state==="readable"?pe(e,A):B(void 0)),ie(()=>Promise.all(v.map(N=>N())),!0,A)},h.aborted){M();return}h.addEventListener("abort",M)}function me(){return F((A,v)=>{function N(se){se?A():E(ot(),N,v)}N(!1)})}function ot(){return I?B(!0):E(S._readyPromise,()=>F((A,v)=>{Me(b,{_chunkSteps:N=>{P=E(qn(S,N),void 0,p),A(!1)},_closeSteps:()=>A(!0),_errorSteps:v})}))}if(Ce(e,b._closedPromise,A=>(a?de(!0,A):ie(()=>Vt(t,A),!0,A),null)),Ce(t,S._closedPromise,A=>(l?de(!0,A):ie(()=>pe(e,A),!0,A),null)),ne(e,b._closedPromise,()=>(i?de():ie(()=>oo(S)),null)),_e(t)||t._state==="closed"){const A=new TypeError("the destination writable stream closed before all data could be piped to it");l?de(!0,A):ie(()=>pe(e,A),!0,A)}U(me());function ve(){const A=P;return E(P,()=>A!==P?ve():void 0)}function Ce(A,v,N){A._state==="errored"?N(A._storedError):Y(v,N)}function ne(A,v,N){A._state==="closed"?N():O(v,N)}function ie(A,v,N){if(I)return;I=!0,t._state==="writable"&&!_e(t)?O(ve(),se):se();function se(){return T(A(),()=>Be(v,N),at=>Be(!0,at)),null}}function de(A,v){I||(I=!0,t._state==="writable"&&!_e(t)?O(ve(),()=>Be(A,v)):Be(A,v))}function Be(A,v){return Fn(S),ue(b),h!==void 0&&h.removeEventListener("abort",M),A?W(v):q(void 0),null}})}class Ee{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!tr(this))throw nr("desiredSize");return zr(this)}close(){if(!tr(this))throw nr("close");if(!nt(this))throw new TypeError("The stream is not in a state that permits close");Ye(this)}enqueue(t=void 0){if(!tr(this))throw nr("enqueue");if(!nt(this))throw new TypeError("The stream is not in a state that permits enqueue");return rt(this,t)}error(t=void 0){if(!tr(this))throw nr("error");he(this,t)}[ct](t){Ae(this);const i=this._cancelAlgorithm(t);return rr(this),i}[dt](t){const i=this._controlledReadableStream;if(this._queue.length>0){const a=_r(this);this._closeRequested&&this._queue.length===0?(rr(this),At(i)):Tt(this),t._chunkSteps(a)}else Dt(i,t),Tt(this)}[ht](){}}Object.defineProperties(Ee.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),_(Ee.prototype.close,"close"),_(Ee.prototype.enqueue,"enqueue"),_(Ee.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ee.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function tr(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof Ee}function Tt(e){if(!Un(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Tt(e)),null),a=>(he(e,a),null))}function Un(e){const t=e._controlledReadableStream;return!nt(e)||!e._started?!1:!!(xe(t)&&De(t)>0||zr(e)>0)}function rr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ye(e){if(!nt(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(rr(e),At(t))}function rt(e,t){if(!nt(e))return;const i=e._controlledReadableStream;if(xe(i)&&De(i)>0)gt(i,t,!1);else{let a;try{a=e._strategySizeAlgorithm(t)}catch(l){throw he(e,l),l}try{wr(e,t,a)}catch(l){throw he(e,l),l}}Tt(e)}function he(e,t){const i=e._controlledReadableStream;i._state==="readable"&&(Ae(e),rr(e),Hn(i,t))}function zr(e){const t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function Co(e){return!Un(e)}function nt(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Ln(e,t,i,a,l,h,b){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=b,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Tt(t),null),I=>(he(t,I),null))}function Bo(e,t,i,a){const l=Object.create(Ee.prototype);let h,b,S;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.pull!==void 0?b=()=>t.pull(l):b=()=>B(void 0),t.cancel!==void 0?S=I=>t.cancel(I):S=()=>B(void 0),Ln(e,l,h,b,S,i,a)}function nr(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function To(e,t){return Ue(e._readableStreamController)?Ao(e):Po(e)}function Po(e,t){const i=be(e);let a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(ne=>{W=ne});function me(){return a?(l=!0,B(void 0)):(a=!0,Me(i,{_chunkSteps:ie=>{H(()=>{l=!1;const de=ie,Be=ie;h||rt(P._readableStreamController,de),b||rt(q._readableStreamController,Be),a=!1,l&&me()})},_closeSteps:()=>{a=!1,h||Ye(P._readableStreamController),b||Ye(q._readableStreamController),(!h||!b)&&W(void 0)},_errorSteps:()=>{a=!1}}),B(void 0))}function ot(ne){if(h=!0,S=ne,b){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function ve(ne){if(b=!0,I=ne,h){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function Ce(){}return P=Pt(Ce,me,ot),q=Pt(Ce,me,ve),Y(i._closedPromise,ne=>(he(P._readableStreamController,ne),he(q._readableStreamController,ne),(!h||!b)&&W(void 0),null)),[P,q]}function Ao(e){let t=be(e),i=!1,a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(A=>{W=A});function me(A){Y(A._closedPromise,v=>(A!==t||(ce(P._readableStreamController,v),ce(q._readableStreamController,v),(!h||!b)&&W(void 0)),null))}function ot(){$e(t)&&(ue(t),t=be(e),me(t)),Me(t,{_chunkSteps:v=>{H(()=>{a=!1,l=!1;const N=v;let se=v;if(!h&&!b)try{se=an(v)}catch(at){ce(P._readableStreamController,at),ce(q._readableStreamController,at),W(pe(e,at));return}h||Lt(P._readableStreamController,N),b||Lt(q._readableStreamController,se),i=!1,a?Ce():l&&ne()})},_closeSteps:()=>{i=!1,h||St(P._readableStreamController),b||St(q._readableStreamController),P._readableStreamController._pendingPullIntos.length>0&&$t(P._readableStreamController,0),q._readableStreamController._pendingPullIntos.length>0&&$t(q._readableStreamController,0),(!h||!b)&&W(void 0)},_errorSteps:()=>{i=!1}})}function ve(A,v){fe(t)&&(ue(t),t=wn(e),me(t));const N=v?q:P,se=v?P:q;Rn(t,A,1,{_chunkSteps:st=>{H(()=>{a=!1,l=!1;const ut=v?b:h;if(v?h:b)ut||Nt(N._readableStreamController,st);else{let ii;try{ii=an(st)}catch($r){ce(N._readableStreamController,$r),ce(se._readableStreamController,$r),W(pe(e,$r));return}ut||Nt(N._readableStreamController,st),Lt(se._readableStreamController,ii)}i=!1,a?Ce():l&&ne()})},_closeSteps:st=>{i=!1;const ut=v?b:h,cr=v?h:b;ut||St(N._readableStreamController),cr||St(se._readableStreamController),st!==void 0&&(ut||Nt(N._readableStreamController,st),!cr&&se._readableStreamController._pendingPullIntos.length>0&&$t(se._readableStreamController,0)),(!ut||!cr)&&W(void 0)},_errorSteps:()=>{i=!1}})}function Ce(){if(i)return a=!0,B(void 0);i=!0;const A=Cr(P._readableStreamController);return A===null?ot():ve(A._view,!1),B(void 0)}function ne(){if(i)return l=!0,B(void 0);i=!0;const A=Cr(q._readableStreamController);return A===null?ot():ve(A._view,!0),B(void 0)}function ie(A){if(h=!0,S=A,b){const v=k([S,I]),N=pe(e,v);W(N)}return M}function de(A){if(b=!0,I=A,h){const v=k([S,I]),N=pe(e,v);W(N)}return M}function Be(){}return P=Nn(Be,Ce,ie),q=Nn(Be,ne,de),me(t),[P,q]}function Io(e){return w(e)&&typeof e.getReader<"u"}function Fo(e){return Io(e)?xo(e.getReader()):qo(e)}function qo(e){let t;const i=on(e,"async"),a=p;function l(){let b;try{b=Si(i)}catch(I){return g(I)}const S=B(b);return j(S,I=>{if(!w(I))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ri(I))Ye(t._readableStreamController);else{const q=Ei(I);rt(t._readableStreamController,q)}})}function h(b){const S=i.iterator;let I;try{I=Mt(S,"return")}catch(W){return g(W)}if(I===void 0)return B(void 0);let P;try{P=ee(I,S,[b])}catch(W){return g(W)}const q=B(P);return j(q,W=>{if(!w(W))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return t=Pt(a,l,h,0),t}function xo(e){let t;const i=p;function a(){let h;try{h=e.read()}catch(b){return g(b)}return j(h,b=>{if(!w(b))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(b.done)Ye(t._readableStreamController);else{const S=b.value;rt(t._readableStreamController,S)}})}function l(h){try{return B(e.cancel(h))}catch(b){return g(b)}}return t=Pt(i,a,l,0),t}function Wo(e,t){ae(e,t);const i=e,a=i?.autoAllocateChunkSize,l=i?.cancel,h=i?.pull,b=i?.start,S=i?.type;return{autoAllocateChunkSize:a===void 0?void 0:_t(a,`${t} has member 'autoAllocateChunkSize' that`),cancel:l===void 0?void 0:vo(l,i,`${t} has member 'cancel' that`),pull:h===void 0?void 0:ko(h,i,`${t} has member 'pull' that`),start:b===void 0?void 0:Oo(b,i,`${t} has member 'start' that`),type:S===void 0?void 0:Do(S,`${t} has member 'type' that`)}}function vo(e,t,i){return re(e,i),a=>D(e,t,[a])}function ko(e,t,i){return re(e,i),a=>D(e,t,[a])}function Oo(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Do(e,t){if(e=`${e}`,e!=="bytes")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function zo(e,t){return ae(e,t),{preventCancel:!!e?.preventCancel}}function $n(e,t){ae(e,t);const i=e?.preventAbort,a=e?.preventCancel,l=e?.preventClose,h=e?.signal;return h!==void 0&&Mo(h,`${t} has member 'signal' that`),{preventAbort:!!i,preventCancel:!!a,preventClose:!!l,signal:h}}function Mo(e,t){if(!Yi(e))throw new TypeError(`${t} is not an AbortSignal.`)}function jo(e,t){ae(e,t);const i=e?.readable;yt(i,"readable","ReadableWritablePair"),wt(i,`${t} has member 'readable' that`);const a=e?.writable;return yt(a,"writable","ReadableWritablePair"),Cn(a,`${t} has member 'writable' that`),{readable:i,writable:a}}class K{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Qt(i,"Second parameter"),l=Wo(t,"First parameter");if(Mr(this),l.type==="bytes"){if(a.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");const h=Et(a,0);Wi(this,l,h)}else{const h=Yt(a),b=Et(a,1);Bo(this,l,b,h)}}get locked(){if(!qe(this))throw Qe("locked");return xe(this)}cancel(t=void 0){return qe(this)?xe(this)?g(new TypeError("Cannot cancel a stream that already has a reader")):pe(this,t):g(Qe("cancel"))}getReader(t=void 0){if(!qe(this))throw Qe("getReader");return ki(t,"First parameter").mode===void 0?be(this):wn(this)}pipeThrough(t,i={}){if(!qe(this))throw Qe("pipeThrough");le(t,1,"pipeThrough");const a=jo(t,"First parameter"),l=$n(i,"Second parameter");if(xe(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(et(a.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");const h=jn(this,a.writable,l.preventClose,l.preventAbort,l.preventCancel,l.signal);return U(h),a.readable}pipeTo(t,i={}){if(!qe(this))return g(Qe("pipeTo"));if(t===void 0)return g("Parameter 1 is required in 'pipeTo'.");if(!Ke(t))return g(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let a;try{a=$n(i,"Second parameter")}catch(l){return g(l)}return xe(this)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):et(t)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jn(this,t,a.preventClose,a.preventAbort,a.preventCancel,a.signal)}tee(){if(!qe(this))throw Qe("tee");const t=To(this);return k(t)}values(t=void 0){if(!qe(this))throw Qe("values");const i=zo(t,"First parameter");return f(this,i.preventCancel)}[yr](t){return this.values(t)}static from(t){return Fo(t)}}Object.defineProperties(K,{from:{enumerable:!0}}),Object.defineProperties(K.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),_(K.from,"from"),_(K.prototype.cancel,"cancel"),_(K.prototype.getReader,"getReader"),_(K.prototype.pipeThrough,"pipeThrough"),_(K.prototype.pipeTo,"pipeTo"),_(K.prototype.tee,"tee"),_(K.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(K.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(K.prototype,yr,{value:K.prototype.values,writable:!0,configurable:!0});function Pt(e,t,i,a=1,l=()=>1){const h=Object.create(K.prototype);Mr(h);const b=Object.create(Ee.prototype);return Ln(h,b,e,t,i,a,l),h}function Nn(e,t,i){const a=Object.create(K.prototype);Mr(a);const l=Object.create(Se.prototype);return _n(a,l,e,t,i,0,void 0),a}function Mr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function qe(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof K}function xe(e){return e._reader!==void 0}function pe(e,t){if(e._disturbed=!0,e._state==="closed")return B(void 0);if(e._state==="errored")return g(e._storedError);At(e);const i=e._reader;if(i!==void 0&&$e(i)){const l=i._readIntoRequests;i._readIntoRequests=new te,l.forEach(h=>{h._closeSteps(void 0)})}const a=e._readableStreamController[ct](t);return j(a,p)}function At(e){e._state="closed";const t=e._reader;if(t!==void 0&&(J(t),fe(t))){const i=t._readRequests;t._readRequests=new te,i.forEach(a=>{a._closeSteps()})}}function Hn(e,t){e._state="errored",e._storedError=t;const i=e._reader;i!==void 0&&(mt(i,t),fe(i)?zt(i,t):En(i,t))}function Qe(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Yn(e,t){ae(e,t);const i=e?.highWaterMark;return yt(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Je(i)}}const Qn=e=>e.byteLength;_(Qn,"size");class ir{constructor(t){le(t,1,"ByteLengthQueuingStrategy"),t=Yn(t,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Gn(this))throw Vn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Gn(this))throw Vn("size");return Qn}}Object.defineProperties(ir.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ir.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Vn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Gn(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof ir}const Xn=()=>1;_(Xn,"size");class or{constructor(t){le(t,1,"CountQueuingStrategy"),t=Yn(t,"First parameter"),this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Zn(this))throw Jn("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Zn(this))throw Jn("size");return Xn}}Object.defineProperties(or.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(or.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Jn(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Zn(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof or}function Uo(e,t){ae(e,t);const i=e?.cancel,a=e?.flush,l=e?.readableType,h=e?.start,b=e?.transform,S=e?.writableType;return{cancel:i===void 0?void 0:Ho(i,e,`${t} has member 'cancel' that`),flush:a===void 0?void 0:Lo(a,e,`${t} has member 'flush' that`),readableType:l,start:h===void 0?void 0:$o(h,e,`${t} has member 'start' that`),transform:b===void 0?void 0:No(b,e,`${t} has member 'transform' that`),writableType:S}}function Lo(e,t,i){return re(e,i),a=>D(e,t,[a])}function $o(e,t,i){return re(e,i),a=>ee(e,t,[a])}function No(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Ho(e,t,i){return re(e,i),a=>D(e,t,[a])}class ar{constructor(t={},i={},a={}){t===void 0&&(t=null);const l=Qt(i,"Second parameter"),h=Qt(a,"Third parameter"),b=Uo(t,"First parameter");if(b.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(b.writableType!==void 0)throw new RangeError("Invalid writableType specified");const S=Et(h,0),I=Yt(h),P=Et(l,1),q=Yt(l);let W;const M=F(me=>{W=me});Yo(this,M,P,q,S,I),Vo(this,b),b.start!==void 0?W(b.start(this._transformStreamController)):W(void 0)}get readable(){if(!Kn(this))throw ni("readable");return this._readable}get writable(){if(!Kn(this))throw ni("writable");return this._writable}}Object.defineProperties(ar.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ar.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Yo(e,t,i,a,l,h){function b(){return t}function S(M){return Jo(e,M)}function I(M){return Zo(e,M)}function P(){return Ko(e)}e._writable=Gi(b,S,P,I,i,a);function q(){return ea(e)}function W(M){return ta(e,M)}e._readable=Pt(b,q,W,l,h),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,sr(e,!0),e._transformStreamController=void 0}function Kn(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof ar}function ei(e,t){he(e._readable._readableStreamController,t),jr(e,t)}function jr(e,t){lr(e._transformStreamController),Ct(e._writable._writableStreamController,t),Ur(e)}function Ur(e){e._backpressure&&sr(e,!1)}function sr(e,t){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=F(i=>{e._backpressureChangePromise_resolve=i}),e._backpressure=t}class We{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!ur(this))throw fr("desiredSize");const t=this._controlledTransformStream._readable._readableStreamController;return zr(t)}enqueue(t=void 0){if(!ur(this))throw fr("enqueue");ti(this,t)}error(t=void 0){if(!ur(this))throw fr("error");Go(this,t)}terminate(){if(!ur(this))throw fr("terminate");Xo(this)}}Object.defineProperties(We.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),_(We.prototype.enqueue,"enqueue"),_(We.prototype.error,"error"),_(We.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(We.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function ur(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof We}function Qo(e,t,i,a,l){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=i,t._flushAlgorithm=a,t._cancelAlgorithm=l,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Vo(e,t){const i=Object.create(We.prototype);let a,l,h;t.transform!==void 0?a=b=>t.transform(b,i):a=b=>{try{return ti(i,b),B(void 0)}catch(S){return g(S)}},t.flush!==void 0?l=()=>t.flush(i):l=()=>B(void 0),t.cancel!==void 0?h=b=>t.cancel(b):h=()=>B(void 0),Qo(e,i,a,l,h)}function lr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function ti(e,t){const i=e._controlledTransformStream,a=i._readable._readableStreamController;if(!nt(a))throw new TypeError("Readable side is not in a state that permits enqueue");try{rt(a,t)}catch(h){throw jr(i,h),i._readable._storedError}Co(a)!==i._backpressure&&sr(i,!0)}function Go(e,t){ei(e._controlledTransformStream,t)}function ri(e,t){const i=e._transformAlgorithm(t);return j(i,void 0,a=>{throw ei(e._controlledTransformStream,a),a})}function Xo(e){const t=e._controlledTransformStream,i=t._readable._readableStreamController;Ye(i);const a=new TypeError("TransformStream terminated");jr(t,a)}function Jo(e,t){const i=e._transformStreamController;if(e._backpressure){const a=e._backpressureChangePromise;return j(a,()=>{const l=e._writable;if(l._state==="erroring")throw l._storedError;return ri(i,t)})}return ri(i,t)}function Zo(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._readable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return lr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(he(a._readableStreamController,t),Lr(i)),null),h=>(he(a._readableStreamController,h),it(i,h),null)),i._finishPromise}function Ko(e){const t=e._transformStreamController;if(t._finishPromise!==void 0)return t._finishPromise;const i=e._readable;t._finishPromise=F((l,h)=>{t._finishPromise_resolve=l,t._finishPromise_reject=h});const a=t._flushAlgorithm();return lr(t),T(a,()=>(i._state==="errored"?it(t,i._storedError):(Ye(i._readableStreamController),Lr(t)),null),l=>(he(i._readableStreamController,l),it(t,l),null)),t._finishPromise}function ea(e){return sr(e,!1),e._backpressureChangePromise}function ta(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._writable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return lr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(Ct(a._writableStreamController,t),Ur(e),Lr(i)),null),h=>(Ct(a._writableStreamController,h),Ur(e),it(i,h),null)),i._finishPromise}function fr(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function Lr(e){e._finishPromise_resolve!==void 0&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function it(e,t){e._finishPromise_reject!==void 0&&(U(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function ni(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}m.ByteLengthQueuingStrategy=ir,m.CountQueuingStrategy=or,m.ReadableByteStreamController=Se,m.ReadableStream=K,m.ReadableStreamBYOBReader=Ie,m.ReadableStreamBYOBRequest=je,m.ReadableStreamDefaultController=Ee,m.ReadableStreamDefaultReader=V,m.TransformStream=ar,m.TransformStreamDefaultController=We,m.WritableStream=Fe,m.WritableStreamDefaultController=tt,m.WritableStreamDefaultWriter=Re})}(dr,dr.exports)),dr.exports}var Hr={},It={},ui;function aa(){if(ui)return It;ui=1,It.byteLength=c,It.toByteArray=X,It.fromByteArray=g;for(var C=[],u=[],m=typeof Uint8Array<"u"?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,R=p.length;w0)throw new Error("Invalid string. Length must be a multiple of 4");var O=E.indexOf("=");O===-1&&(O=T);var Y=O===T?0:4-O%4;return[O,Y]}function c(E){var T=_(E),O=T[0],Y=T[1];return(O+Y)*3/4-Y}function G(E,T,O){return(T+O)*3/4-O}function X(E){var T,O=_(E),Y=O[0],j=O[1],U=new m(G(E,Y,j)),H=0,ee=j>0?Y-4:Y,D;for(D=0;D>16&255,U[H++]=T>>8&255,U[H++]=T&255;return j===2&&(T=u[E.charCodeAt(D)]<<2|u[E.charCodeAt(D+1)]>>4,U[H++]=T&255),j===1&&(T=u[E.charCodeAt(D)]<<10|u[E.charCodeAt(D+1)]<<4|u[E.charCodeAt(D+2)]>>2,U[H++]=T>>8&255,U[H++]=T&255),U}function F(E){return C[E>>18&63]+C[E>>12&63]+C[E>>6&63]+C[E&63]}function B(E,T,O){for(var Y,j=[],U=T;Uee?ee:H+U));return Y===1?(T=E[O-1],j.push(C[T>>2]+C[T<<4&63]+"==")):Y===2&&(T=(E[O-2]<<8)+E[O-1],j.push(C[T>>10]+C[T>>4&63]+C[T<<2&63]+"=")),j.join("")}return It}var hr={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var li;function sa(){return li||(li=1,hr.read=function(C,u,m,p,w){var R,_,c=w*8-p-1,G=(1<>1,F=-7,B=m?w-1:0,g=m?-1:1,E=C[u+B];for(B+=g,R=E&(1<<-F)-1,E>>=-F,F+=c;F>0;R=R*256+C[u+B],B+=g,F-=8);for(_=R&(1<<-F)-1,R>>=-F,F+=p;F>0;_=_*256+C[u+B],B+=g,F-=8);if(R===0)R=1-X;else{if(R===G)return _?NaN:(E?-1:1)*(1/0);_=_+Math.pow(2,p),R=R-X}return(E?-1:1)*_*Math.pow(2,R-p)},hr.write=function(C,u,m,p,w,R){var _,c,G,X=R*8-w-1,F=(1<>1,g=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=p?0:R-1,T=p?1:-1,O=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(c=isNaN(u)?1:0,_=F):(_=Math.floor(Math.log(u)/Math.LN2),u*(G=Math.pow(2,-_))<1&&(_--,G*=2),_+B>=1?u+=g/G:u+=g*Math.pow(2,1-B),u*G>=2&&(_++,G/=2),_+B>=F?(c=0,_=F):_+B>=1?(c=(u*G-1)*Math.pow(2,w),_=_+B):(c=u*Math.pow(2,B-1)*Math.pow(2,w),_=0));w>=8;C[m+E]=c&255,E+=T,c/=256,w-=8);for(_=_<0;C[m+E]=_&255,E+=T,_/=256,X-=8);C[m+E-T]|=O*128}),hr}/*! + */var si;function oa(){return si||(si=1,function(C,u){(function(p,m){m(u)})(Nr,function(p){function m(){}function _(e){return typeof e=="object"&&e!==null||typeof e=="function"}const R=m;function w(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch{}}const c=Promise,G=Promise.prototype.then,X=Promise.reject.bind(c);function F(e){return new c(e)}function B(e){return F(t=>t(e))}function g(e){return X(e)}function E(e,t,i){return G.call(e,t,i)}function T(e,t,i){E(E(e,t,i),void 0,R)}function O(e,t){T(e,t)}function Y(e,t){T(e,void 0,t)}function j(e,t,i){return E(e,t,i)}function U(e){E(e,void 0,R)}let H=e=>{if(typeof queueMicrotask=="function")H=queueMicrotask;else{const t=B(void 0);H=i=>E(t,i)}return H(e)};function ee(e,t,i){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,i)}function D(e,t,i){try{return B(ee(e,t,i))}catch(a){return g(a)}}const ft=16384;class te{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const i=this._back;let a=i;i._elements.length===ft-1&&(a={_elements:[],_next:void 0}),i._elements.push(t),a!==i&&(this._back=a,i._next=a),++this._size}shift(){const t=this._front;let i=t;const a=this._cursor;let l=a+1;const h=t._elements,b=h[a];return l===ft&&(i=t._next,l=0),--this._size,this._cursor=l,t!==i&&(this._front=i),h[a]=void 0,b}forEach(t){let i=this._cursor,a=this._front,l=a._elements;for(;(i!==l.length||a._next!==void 0)&&!(i===l.length&&(a=a._next,l=a._elements,i=0,l.length===0));)t(l[i]),++i}peek(){const t=this._front,i=this._cursor;return t._elements[i]}}const qt=Symbol("[[AbortSteps]]"),xt=Symbol("[[ErrorSteps]]"),ct=Symbol("[[CancelSteps]]"),dt=Symbol("[[PullSteps]]"),ht=Symbol("[[ReleaseSteps]]");function Wt(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?pt(e):t._state==="closed"?br(e):vt(e,t._storedError)}function Ve(e,t){const i=e._ownerReadableStream;return pe(i,t)}function ue(e){const t=e._ownerReadableStream;t._state==="readable"?mt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[ht](),t._reader=void 0,e._ownerReadableStream=void 0}function Ge(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function pt(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i})}function vt(e,t){pt(e),mt(e,t)}function br(e){pt(e),J(e)}function mt(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Q(e,t){vt(e,t)}function J(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const bt=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},kt=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Ot(e){return typeof e=="object"||typeof e=="function"}function ae(e,t){if(e!==void 0&&!Ot(e))throw new TypeError(`${t} is not an object.`)}function re(e,t){if(typeof e!="function")throw new TypeError(`${t} is not a function.`)}function Te(e){return typeof e=="object"&&e!==null||typeof e=="function"}function Xe(e,t){if(!Te(e))throw new TypeError(`${t} is not an object.`)}function le(e,t,i){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${i}'.`)}function yt(e,t,i){if(e===void 0)throw new TypeError(`${t} is required in '${i}'.`)}function Je(e){return Number(e)}function we(e){return e===0?0:e}function Oe(e){return we(kt(e))}function _t(e,t){const a=Number.MAX_SAFE_INTEGER;let l=Number(e);if(l=we(l),!bt(l))throw new TypeError(`${t} is not a finite number`);if(l=Oe(l),l<0||l>a)throw new TypeError(`${t} is outside the accepted range of 0 to ${a}, inclusive`);return!bt(l)||l===0?0:l}function wt(e,t){if(!qe(e))throw new TypeError(`${t} is not a ReadableStream.`)}function be(e){return new V(e)}function Dt(e,t){e._reader._readRequests.push(t)}function gt(e,t,i){const l=e._reader._readRequests.shift();i?l._closeSteps():l._chunkSteps(t)}function De(e){return e._reader._readRequests.length}function ze(e){const t=e._reader;return!(t===void 0||!fe(t))}class V{constructor(t){if(le(t,1,"ReadableStreamDefaultReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Wt(this,t),this._readRequests=new te}get closed(){return fe(this)?this._closedPromise:g(o("closed"))}cancel(t=void 0){return fe(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(o("cancel"))}read(){if(!fe(this))return g(o("read"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let t,i;const a=F((h,b)=>{t=h,i=b});return Me(this,{_chunkSteps:h=>t({value:h,done:!1}),_closeSteps:()=>t({value:void 0,done:!0}),_errorSteps:h=>i(h)}),a}releaseLock(){if(!fe(this))throw o("releaseLock");this._ownerReadableStream!==void 0&&ye(this)}}Object.defineProperties(V.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),w(V.prototype.cancel,"cancel"),w(V.prototype.read,"read"),w(V.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function fe(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof V}function Me(e,t){const i=e._ownerReadableStream;i._disturbed=!0,i._state==="closed"?t._closeSteps():i._state==="errored"?t._errorSteps(i._storedError):i._readableStreamController[dt](t)}function ye(e){ue(e);const t=new TypeError("Reader was released");zt(e,t)}function zt(e,t){const i=e._readRequests;e._readRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function o(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}const r=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class n{constructor(t,i){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=i}next(){const t=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?j(this._ongoingPromise,t,t):t(),this._ongoingPromise}return(t){const i=()=>this._returnSteps(t);return this._ongoingPromise?j(this._ongoingPromise,i,i):i()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const t=this._reader;let i,a;const l=F((b,S)=>{i=b,a=S});return Me(t,{_chunkSteps:b=>{this._ongoingPromise=void 0,H(()=>i({value:b,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),i({value:void 0,done:!0})},_errorSteps:b=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),a(b)}}),l}_returnSteps(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;const i=this._reader;if(!this._preventCancel){const a=Ve(i,t);return ue(i),j(a,()=>({value:t,done:!0}))}return ue(i),B({value:t,done:!0})}}const s={next(){return d(this)?this._asyncIteratorImpl.next():g(y("next"))},return(e){return d(this)?this._asyncIteratorImpl.return(e):g(y("return"))}};Object.setPrototypeOf(s,r);function f(e,t){const i=be(e),a=new n(i,t),l=Object.create(s);return l._asyncIteratorImpl=a,l}function d(e){if(!_(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof n}catch{return!1}}function y(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}const x=Number.isNaN||function(e){return e!==e};var L,z,$;function k(e){return e.slice()}function rn(e,t,i,a,l){new Uint8Array(e).set(new Uint8Array(i,a,l),t)}let ge=e=>(typeof e.transfer=="function"?ge=t=>t.transfer():typeof structuredClone=="function"?ge=t=>structuredClone(t,{transfer:[t]}):ge=t=>t,ge(e)),Pe=e=>(typeof e.detached=="boolean"?Pe=t=>t.detached:Pe=t=>t.byteLength===0,Pe(e));function nn(e,t,i){if(e.slice)return e.slice(t,i);const a=i-t,l=new ArrayBuffer(a);return rn(l,0,e,t,a),l}function Mt(e,t){const i=e[t];if(i!=null){if(typeof i!="function")throw new TypeError(`${String(t)} is not a function`);return i}}function gi(e){const t={[Symbol.iterator]:()=>e.iterator},i=async function*(){return yield*t}(),a=i.next;return{iterator:i,nextMethod:a,done:!1}}const yr=($=(L=Symbol.asyncIterator)!==null&&L!==void 0?L:(z=Symbol.for)===null||z===void 0?void 0:z.call(Symbol,"Symbol.asyncIterator"))!==null&&$!==void 0?$:"@@asyncIterator";function on(e,t="sync",i){if(i===void 0)if(t==="async"){if(i=Mt(e,yr),i===void 0){const h=Mt(e,Symbol.iterator),b=on(e,"sync",h);return gi(b)}}else i=Mt(e,Symbol.iterator);if(i===void 0)throw new TypeError("The object is not iterable");const a=ee(i,e,[]);if(!_(a))throw new TypeError("The iterator method must return an object");const l=a.next;return{iterator:a,nextMethod:l,done:!1}}function Si(e){const t=ee(e.nextMethod,e.iterator,[]);if(!_(t))throw new TypeError("The iterator.next() method must return an object");return t}function Ri(e){return!!e.done}function Ei(e){return e.value}function Ci(e){return!(typeof e!="number"||x(e)||e<0)}function an(e){const t=nn(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function _r(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function wr(e,t,i){if(!Ci(i)||i===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:i}),e._queueTotalSize+=i}function Bi(e){return e._queue.peek().value}function Ae(e){e._queue=new te,e._queueTotalSize=0}function sn(e){return e===DataView}function Ti(e){return sn(e.constructor)}function Pi(e){return sn(e)?1:e.BYTES_PER_ELEMENT}class je{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!gr(this))throw Br("view");return this._view}respond(t){if(!gr(this))throw Br("respond");if(le(t,1,"respond"),t=_t(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");$t(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!gr(this))throw Br("respondWithNewView");if(le(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(t.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Nt(this._associatedReadableByteStreamController,t)}}Object.defineProperties(je.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),w(je.prototype.respond,"respond"),w(je.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(je.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Se{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Ue(this))throw Rt("byobRequest");return Cr(this)}get desiredSize(){if(!Ue(this))throw Rt("desiredSize");return yn(this)}close(){if(!Ue(this))throw Rt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const t=this._controlledReadableByteStream._state;if(t!=="readable")throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`);St(this)}enqueue(t){if(!Ue(this))throw Rt("enqueue");if(le(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new TypeError("chunk must be an array buffer view");if(t.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(t.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const i=this._controlledReadableByteStream._state;if(i!=="readable")throw new TypeError(`The stream (in ${i} state) is not in the readable state and cannot be enqueued to`);Lt(this,t)}error(t=void 0){if(!Ue(this))throw Rt("error");ce(this,t)}[ct](t){un(this),Ae(this);const i=this._cancelAlgorithm(t);return Ut(this),i}[dt](t){const i=this._controlledReadableByteStream;if(this._queueTotalSize>0){bn(this,t);return}const a=this._autoAllocateChunkSize;if(a!==void 0){let l;try{l=new ArrayBuffer(a)}catch(b){t._errorSteps(b);return}const h={buffer:l,bufferByteLength:a,byteOffset:0,byteLength:a,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(h)}Dt(i,t),Le(this)}[ht](){if(this._pendingPullIntos.length>0){const t=this._pendingPullIntos.peek();t.readerType="none",this._pendingPullIntos=new te,this._pendingPullIntos.push(t)}}}Object.defineProperties(Se.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),w(Se.prototype.close,"close"),w(Se.prototype.enqueue,"enqueue"),w(Se.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Se.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ue(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof Se}function gr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof je}function Le(e){if(!xi(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Le(e)),null),a=>(ce(e,a),null))}function un(e){Rr(e),e._pendingPullIntos=new te}function Sr(e,t){let i=!1;e._state==="closed"&&(i=!0);const a=ln(t);t.readerType==="default"?gt(e,a,i):zi(e,a,i)}function ln(e){const t=e.bytesFilled,i=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/i)}function jt(e,t,i,a){e._queue.push({buffer:t,byteOffset:i,byteLength:a}),e._queueTotalSize+=a}function fn(e,t,i,a){let l;try{l=nn(t,i,i+a)}catch(h){throw ce(e,h),h}jt(e,l,0,a)}function cn(e,t){t.bytesFilled>0&&fn(e,t.buffer,t.byteOffset,t.bytesFilled),Ze(e)}function dn(e,t){const i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i;let l=i,h=!1;const b=a%t.elementSize,S=a-b;S>=t.minimumFill&&(l=S-t.bytesFilled,h=!0);const I=e._queue;for(;l>0;){const P=I.peek(),q=Math.min(l,P.byteLength),W=t.byteOffset+t.bytesFilled;rn(t.buffer,W,P.buffer,P.byteOffset,q),P.byteLength===q?I.shift():(P.byteOffset+=q,P.byteLength-=q),e._queueTotalSize-=q,hn(e,q,t),l-=q}return h}function hn(e,t,i){i.bytesFilled+=t}function pn(e){e._queueTotalSize===0&&e._closeRequested?(Ut(e),At(e._controlledReadableByteStream)):Le(e)}function Rr(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Er(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;const t=e._pendingPullIntos.peek();dn(e,t)&&(Ze(e),Sr(e._controlledReadableByteStream,t))}}function Ai(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(e._queueTotalSize===0)return;const i=t._readRequests.shift();bn(e,i)}}function Ii(e,t,i,a){const l=e._controlledReadableByteStream,h=t.constructor,b=Pi(h),{byteOffset:S,byteLength:I}=t,P=i*b;let q;try{q=ge(t.buffer)}catch(M){a._errorSteps(M);return}const W={buffer:q,bufferByteLength:q.byteLength,byteOffset:S,byteLength:I,bytesFilled:0,minimumFill:P,elementSize:b,viewConstructor:h,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(W),gn(l,a);return}if(l._state==="closed"){const M=new h(W.buffer,W.byteOffset,0);a._closeSteps(M);return}if(e._queueTotalSize>0){if(dn(e,W)){const M=ln(W);pn(e),a._chunkSteps(M);return}if(e._closeRequested){const M=new TypeError("Insufficient bytes to fill elements in the given buffer");ce(e,M),a._errorSteps(M);return}}e._pendingPullIntos.push(W),gn(l,a),Le(e)}function Fi(e,t){t.readerType==="none"&&Ze(e);const i=e._controlledReadableByteStream;if(Tr(i))for(;Sn(i)>0;){const a=Ze(e);Sr(i,a)}}function qi(e,t,i){if(hn(e,t,i),i.readerType==="none"){cn(e,i),Er(e);return}if(i.bytesFilled0){const l=i.byteOffset+i.bytesFilled;fn(e,i.buffer,l-a,a)}i.bytesFilled-=a,Sr(e._controlledReadableByteStream,i),Er(e)}function mn(e,t){const i=e._pendingPullIntos.peek();Rr(e),e._controlledReadableByteStream._state==="closed"?Fi(e,i):qi(e,t,i),Le(e)}function Ze(e){return e._pendingPullIntos.shift()}function xi(e){const t=e._controlledReadableByteStream;return t._state!=="readable"||e._closeRequested||!e._started?!1:!!(ze(t)&&De(t)>0||Tr(t)&&Sn(t)>0||yn(e)>0)}function Ut(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function St(e){const t=e._controlledReadableByteStream;if(!(e._closeRequested||t._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){const i=e._pendingPullIntos.peek();if(i.bytesFilled%i.elementSize!==0){const a=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ce(e,a),a}}Ut(e),At(t)}}function Lt(e,t){const i=e._controlledReadableByteStream;if(e._closeRequested||i._state!=="readable")return;const{buffer:a,byteOffset:l,byteLength:h}=t;if(Pe(a))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");const b=ge(a);if(e._pendingPullIntos.length>0){const S=e._pendingPullIntos.peek();if(Pe(S.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Rr(e),S.buffer=ge(S.buffer),S.readerType==="none"&&cn(e,S)}if(ze(i))if(Ai(e),De(i)===0)jt(e,b,l,h);else{e._pendingPullIntos.length>0&&Ze(e);const S=new Uint8Array(b,l,h);gt(i,S,!1)}else Tr(i)?(jt(e,b,l,h),Er(e)):jt(e,b,l,h);Le(e)}function ce(e,t){const i=e._controlledReadableByteStream;i._state==="readable"&&(un(e),Ae(e),Ut(e),Hn(i,t))}function bn(e,t){const i=e._queue.shift();e._queueTotalSize-=i.byteLength,pn(e);const a=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);t._chunkSteps(a)}function Cr(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),i=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),a=Object.create(je.prototype);vi(a,e,i),e._byobRequest=a}return e._byobRequest}function yn(e){const t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function $t(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(i.bytesFilled+t>i.byteLength)throw new RangeError("bytesWritten out of range")}i.buffer=ge(i.buffer),mn(e,t)}function Nt(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(i.byteOffset+i.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(i.bytesFilled+t.byteLength>i.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const l=t.byteLength;i.buffer=ge(t.buffer),mn(e,l)}function _n(e,t,i,a,l,h,b){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Ae(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,t._autoAllocateChunkSize=b,t._pendingPullIntos=new te,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Le(t),null),I=>(ce(t,I),null))}function Wi(e,t,i){const a=Object.create(Se.prototype);let l,h,b;t.start!==void 0?l=()=>t.start(a):l=()=>{},t.pull!==void 0?h=()=>t.pull(a):h=()=>B(void 0),t.cancel!==void 0?b=I=>t.cancel(I):b=()=>B(void 0);const S=t.autoAllocateChunkSize;if(S===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");_n(e,a,l,h,b,i,S)}function vi(e,t,i){e._associatedReadableByteStreamController=t,e._view=i}function Br(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Rt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function ki(e,t){ae(e,t);const i=e?.mode;return{mode:i===void 0?void 0:Oi(i,`${t} has member 'mode' that`)}}function Oi(e,t){if(e=`${e}`,e!=="byob")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Di(e,t){var i;ae(e,t);const a=(i=e?.min)!==null&&i!==void 0?i:1;return{min:_t(a,`${t} has member 'min' that`)}}function wn(e){return new Ie(e)}function gn(e,t){e._reader._readIntoRequests.push(t)}function zi(e,t,i){const l=e._reader._readIntoRequests.shift();i?l._closeSteps(t):l._chunkSteps(t)}function Sn(e){return e._reader._readIntoRequests.length}function Tr(e){const t=e._reader;return!(t===void 0||!$e(t))}class Ie{constructor(t){if(le(t,1,"ReadableStreamBYOBReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ue(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Wt(this,t),this._readIntoRequests=new te}get closed(){return $e(this)?this._closedPromise:g(Ht("closed"))}cancel(t=void 0){return $e(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(Ht("cancel"))}read(t,i={}){if(!$e(this))return g(Ht("read"));if(!ArrayBuffer.isView(t))return g(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return g(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return g(new TypeError("view's buffer must have non-zero byteLength"));if(Pe(t.buffer))return g(new TypeError("view's buffer has been detached"));let a;try{a=Di(i,"options")}catch(P){return g(P)}const l=a.min;if(l===0)return g(new TypeError("options.min must be greater than 0"));if(Ti(t)){if(l>t.byteLength)return g(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(l>t.length)return g(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let h,b;const S=F((P,q)=>{h=P,b=q});return Rn(this,t,l,{_chunkSteps:P=>h({value:P,done:!1}),_closeSteps:P=>h({value:P,done:!0}),_errorSteps:P=>b(P)}),S}releaseLock(){if(!$e(this))throw Ht("releaseLock");this._ownerReadableStream!==void 0&&Mi(this)}}Object.defineProperties(Ie.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),w(Ie.prototype.cancel,"cancel"),w(Ie.prototype.read,"read"),w(Ie.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ie.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof Ie}function Rn(e,t,i,a){const l=e._ownerReadableStream;l._disturbed=!0,l._state==="errored"?a._errorSteps(l._storedError):Ii(l._readableStreamController,t,i,a)}function Mi(e){ue(e);const t=new TypeError("Reader was released");En(e,t)}function En(e,t){const i=e._readIntoRequests;e._readIntoRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function Ht(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Et(e,t){const{highWaterMark:i}=e;if(i===void 0)return t;if(x(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function Yt(e){const{size:t}=e;return t||(()=>1)}function Qt(e,t){ae(e,t);const i=e?.highWaterMark,a=e?.size;return{highWaterMark:i===void 0?void 0:Je(i),size:a===void 0?void 0:ji(a,`${t} has member 'size' that`)}}function ji(e,t){return re(e,t),i=>Je(e(i))}function Ui(e,t){ae(e,t);const i=e?.abort,a=e?.close,l=e?.start,h=e?.type,b=e?.write;return{abort:i===void 0?void 0:Li(i,e,`${t} has member 'abort' that`),close:a===void 0?void 0:$i(a,e,`${t} has member 'close' that`),start:l===void 0?void 0:Ni(l,e,`${t} has member 'start' that`),write:b===void 0?void 0:Hi(b,e,`${t} has member 'write' that`),type:h}}function Li(e,t,i){return re(e,i),a=>D(e,t,[a])}function $i(e,t,i){return re(e,i),()=>D(e,t,[])}function Ni(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Hi(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Cn(e,t){if(!Ke(e))throw new TypeError(`${t} is not a WritableStream.`)}function Yi(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}const Qi=typeof AbortController=="function";function Vi(){if(Qi)return new AbortController}class Fe{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Qt(i,"Second parameter"),l=Ui(t,"First parameter");if(Tn(this),l.type!==void 0)throw new RangeError("Invalid type is specified");const b=Yt(a),S=Et(a,1);uo(this,l,S,b)}get locked(){if(!Ke(this))throw Zt("locked");return et(this)}abort(t=void 0){return Ke(this)?et(this)?g(new TypeError("Cannot abort a stream that already has a writer")):Vt(this,t):g(Zt("abort"))}close(){return Ke(this)?et(this)?g(new TypeError("Cannot close a stream that already has a writer")):_e(this)?g(new TypeError("Cannot close an already-closing stream")):Pn(this):g(Zt("close"))}getWriter(){if(!Ke(this))throw Zt("getWriter");return Bn(this)}}Object.defineProperties(Fe.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),w(Fe.prototype.abort,"abort"),w(Fe.prototype.close,"close"),w(Fe.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Fe.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Bn(e){return new Re(e)}function Gi(e,t,i,a,l=1,h=()=>1){const b=Object.create(Fe.prototype);Tn(b);const S=Object.create(tt.prototype);return Wn(b,S,e,t,i,a,l,h),b}function Tn(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new te,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Ke(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof Fe}function et(e){return e._writer!==void 0}function Vt(e,t){var i;if(e._state==="closed"||e._state==="errored")return B(void 0);e._writableStreamController._abortReason=t,(i=e._writableStreamController._abortController)===null||i===void 0||i.abort(t);const a=e._state;if(a==="closed"||a==="errored")return B(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let l=!1;a==="erroring"&&(l=!0,t=void 0);const h=F((b,S)=>{e._pendingAbortRequest={_promise:void 0,_resolve:b,_reject:S,_reason:t,_wasAlreadyErroring:l}});return e._pendingAbortRequest._promise=h,l||Ar(e,t),h}function Pn(e){const t=e._state;if(t==="closed"||t==="errored")return g(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const i=F((l,h)=>{const b={_resolve:l,_reject:h};e._closeRequest=b}),a=e._writer;return a!==void 0&&e._backpressure&&t==="writable"&&Or(a),lo(e._writableStreamController),i}function Xi(e){return F((i,a)=>{const l={_resolve:i,_reject:a};e._writeRequests.push(l)})}function Pr(e,t){if(e._state==="writable"){Ar(e,t);return}Ir(e)}function Ar(e,t){const i=e._writableStreamController;e._state="erroring",e._storedError=t;const a=e._writer;a!==void 0&&In(a,t),!to(e)&&i._started&&Ir(e)}function Ir(e){e._state="errored",e._writableStreamController[xt]();const t=e._storedError;if(e._writeRequests.forEach(l=>{l._reject(t)}),e._writeRequests=new te,e._pendingAbortRequest===void 0){Gt(e);return}const i=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,i._wasAlreadyErroring){i._reject(t),Gt(e);return}const a=e._writableStreamController[qt](i._reason);T(a,()=>(i._resolve(),Gt(e),null),l=>(i._reject(l),Gt(e),null))}function Ji(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Zi(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Pr(e,t)}function Ki(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const i=e._writer;i!==void 0&&Dn(i)}function eo(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Pr(e,t)}function _e(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function to(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function ro(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function no(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Gt(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;t!==void 0&&vr(t,e._storedError)}function Fr(e,t){const i=e._writer;i!==void 0&&t!==e._backpressure&&(t?yo(i):Or(i)),e._backpressure=t}class Re{constructor(t){if(le(t,1,"WritableStreamDefaultWriter"),Cn(t,"First parameter"),et(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;const i=t._state;if(i==="writable")!_e(t)&&t._backpressure?er(this):zn(this),Kt(this);else if(i==="erroring")kr(this,t._storedError),Kt(this);else if(i==="closed")zn(this),mo(this);else{const a=t._storedError;kr(this,a),On(this,a)}}get closed(){return Ne(this)?this._closedPromise:g(He("closed"))}get desiredSize(){if(!Ne(this))throw He("desiredSize");if(this._ownerWritableStream===void 0)throw Bt("desiredSize");return so(this)}get ready(){return Ne(this)?this._readyPromise:g(He("ready"))}abort(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("abort")):io(this,t):g(He("abort"))}close(){if(!Ne(this))return g(He("close"));const t=this._ownerWritableStream;return t===void 0?g(Bt("close")):_e(t)?g(new TypeError("Cannot close an already-closing stream")):An(this)}releaseLock(){if(!Ne(this))throw He("releaseLock");this._ownerWritableStream!==void 0&&Fn(this)}write(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("write to")):qn(this,t):g(He("write"))}}Object.defineProperties(Re.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),w(Re.prototype.abort,"abort"),w(Re.prototype.close,"close"),w(Re.prototype.releaseLock,"releaseLock"),w(Re.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Re.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ne(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof Re}function io(e,t){const i=e._ownerWritableStream;return Vt(i,t)}function An(e){const t=e._ownerWritableStream;return Pn(t)}function oo(e){const t=e._ownerWritableStream,i=t._state;return _e(t)||i==="closed"?B(void 0):i==="errored"?g(t._storedError):An(e)}function ao(e,t){e._closedPromiseState==="pending"?vr(e,t):bo(e,t)}function In(e,t){e._readyPromiseState==="pending"?Mn(e,t):_o(e,t)}function so(e){const t=e._ownerWritableStream,i=t._state;return i==="errored"||i==="erroring"?null:i==="closed"?0:vn(t._writableStreamController)}function Fn(e){const t=e._ownerWritableStream,i=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");In(e,i),ao(e,i),t._writer=void 0,e._ownerWritableStream=void 0}function qn(e,t){const i=e._ownerWritableStream,a=i._writableStreamController,l=fo(a,t);if(i!==e._ownerWritableStream)return g(Bt("write to"));const h=i._state;if(h==="errored")return g(i._storedError);if(_e(i)||h==="closed")return g(new TypeError("The stream is closing or closed and cannot be written to"));if(h==="erroring")return g(i._storedError);const b=Xi(i);return co(a,t,l),b}const xn={};class tt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!qr(this))throw Wr("abortReason");return this._abortReason}get signal(){if(!qr(this))throw Wr("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(t=void 0){if(!qr(this))throw Wr("error");this._controlledWritableStream._state==="writable"&&kn(this,t)}[qt](t){const i=this._abortAlgorithm(t);return Xt(this),i}[xt](){Ae(this)}}Object.defineProperties(tt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(tt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function qr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof tt}function Wn(e,t,i,a,l,h,b,S){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._abortReason=void 0,t._abortController=Vi(),t._started=!1,t._strategySizeAlgorithm=S,t._strategyHWM=b,t._writeAlgorithm=a,t._closeAlgorithm=l,t._abortAlgorithm=h;const I=xr(t);Fr(e,I);const P=i(),q=B(P);T(q,()=>(t._started=!0,Jt(t),null),W=>(t._started=!0,Pr(e,W),null))}function uo(e,t,i,a){const l=Object.create(tt.prototype);let h,b,S,I;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.write!==void 0?b=P=>t.write(P,l):b=()=>B(void 0),t.close!==void 0?S=()=>t.close():S=()=>B(void 0),t.abort!==void 0?I=P=>t.abort(P):I=()=>B(void 0),Wn(e,l,h,b,S,I,i,a)}function Xt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function lo(e){wr(e,xn,0),Jt(e)}function fo(e,t){try{return e._strategySizeAlgorithm(t)}catch(i){return Ct(e,i),1}}function vn(e){return e._strategyHWM-e._queueTotalSize}function co(e,t,i){try{wr(e,t,i)}catch(l){Ct(e,l);return}const a=e._controlledWritableStream;if(!_e(a)&&a._state==="writable"){const l=xr(e);Fr(a,l)}Jt(e)}function Jt(e){const t=e._controlledWritableStream;if(!e._started||t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring"){Ir(t);return}if(e._queue.length===0)return;const a=Bi(e);a===xn?ho(e):po(e,a)}function Ct(e,t){e._controlledWritableStream._state==="writable"&&kn(e,t)}function ho(e){const t=e._controlledWritableStream;ro(t),_r(e);const i=e._closeAlgorithm();Xt(e),T(i,()=>(Ki(t),null),a=>(eo(t,a),null))}function po(e,t){const i=e._controlledWritableStream;no(i);const a=e._writeAlgorithm(t);T(a,()=>{Ji(i);const l=i._state;if(_r(e),!_e(i)&&l==="writable"){const h=xr(e);Fr(i,h)}return Jt(e),null},l=>(i._state==="writable"&&Xt(e),Zi(i,l),null))}function xr(e){return vn(e)<=0}function kn(e,t){const i=e._controlledWritableStream;Xt(e),Ar(i,t)}function Zt(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Wr(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function He(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Bt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Kt(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i,e._closedPromiseState="pending"})}function On(e,t){Kt(e),vr(e,t)}function mo(e){Kt(e),Dn(e)}function vr(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function bo(e,t){On(e,t)}function Dn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function er(e){e._readyPromise=F((t,i)=>{e._readyPromise_resolve=t,e._readyPromise_reject=i}),e._readyPromiseState="pending"}function kr(e,t){er(e),Mn(e,t)}function zn(e){er(e),Or(e)}function Mn(e,t){e._readyPromise_reject!==void 0&&(U(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function yo(e){er(e)}function _o(e,t){kr(e,t)}function Or(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function wo(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof Nr<"u")return Nr}const Dr=wo();function go(e){if(!(typeof e=="function"||typeof e=="object")||e.name!=="DOMException")return!1;try{return new e,!0}catch{return!1}}function So(){const e=Dr?.DOMException;return go(e)?e:void 0}function Ro(){const e=function(i,a){this.message=i||"",this.name=a||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return w(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}const Eo=So()||Ro();function jn(e,t,i,a,l,h){const b=be(e),S=Bn(t);e._disturbed=!0;let I=!1,P=B(void 0);return F((q,W)=>{let M;if(h!==void 0){if(M=()=>{const A=h.reason!==void 0?h.reason:new Eo("Aborted","AbortError"),v=[];a||v.push(()=>t._state==="writable"?Vt(t,A):B(void 0)),l||v.push(()=>e._state==="readable"?pe(e,A):B(void 0)),ie(()=>Promise.all(v.map(N=>N())),!0,A)},h.aborted){M();return}h.addEventListener("abort",M)}function me(){return F((A,v)=>{function N(se){se?A():E(ot(),N,v)}N(!1)})}function ot(){return I?B(!0):E(S._readyPromise,()=>F((A,v)=>{Me(b,{_chunkSteps:N=>{P=E(qn(S,N),void 0,m),A(!1)},_closeSteps:()=>A(!0),_errorSteps:v})}))}if(Ce(e,b._closedPromise,A=>(a?de(!0,A):ie(()=>Vt(t,A),!0,A),null)),Ce(t,S._closedPromise,A=>(l?de(!0,A):ie(()=>pe(e,A),!0,A),null)),ne(e,b._closedPromise,()=>(i?de():ie(()=>oo(S)),null)),_e(t)||t._state==="closed"){const A=new TypeError("the destination writable stream closed before all data could be piped to it");l?de(!0,A):ie(()=>pe(e,A),!0,A)}U(me());function ve(){const A=P;return E(P,()=>A!==P?ve():void 0)}function Ce(A,v,N){A._state==="errored"?N(A._storedError):Y(v,N)}function ne(A,v,N){A._state==="closed"?N():O(v,N)}function ie(A,v,N){if(I)return;I=!0,t._state==="writable"&&!_e(t)?O(ve(),se):se();function se(){return T(A(),()=>Be(v,N),at=>Be(!0,at)),null}}function de(A,v){I||(I=!0,t._state==="writable"&&!_e(t)?O(ve(),()=>Be(A,v)):Be(A,v))}function Be(A,v){return Fn(S),ue(b),h!==void 0&&h.removeEventListener("abort",M),A?W(v):q(void 0),null}})}class Ee{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!tr(this))throw nr("desiredSize");return zr(this)}close(){if(!tr(this))throw nr("close");if(!nt(this))throw new TypeError("The stream is not in a state that permits close");Ye(this)}enqueue(t=void 0){if(!tr(this))throw nr("enqueue");if(!nt(this))throw new TypeError("The stream is not in a state that permits enqueue");return rt(this,t)}error(t=void 0){if(!tr(this))throw nr("error");he(this,t)}[ct](t){Ae(this);const i=this._cancelAlgorithm(t);return rr(this),i}[dt](t){const i=this._controlledReadableStream;if(this._queue.length>0){const a=_r(this);this._closeRequested&&this._queue.length===0?(rr(this),At(i)):Tt(this),t._chunkSteps(a)}else Dt(i,t),Tt(this)}[ht](){}}Object.defineProperties(Ee.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),w(Ee.prototype.close,"close"),w(Ee.prototype.enqueue,"enqueue"),w(Ee.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ee.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function tr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof Ee}function Tt(e){if(!Un(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Tt(e)),null),a=>(he(e,a),null))}function Un(e){const t=e._controlledReadableStream;return!nt(e)||!e._started?!1:!!(xe(t)&&De(t)>0||zr(e)>0)}function rr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ye(e){if(!nt(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(rr(e),At(t))}function rt(e,t){if(!nt(e))return;const i=e._controlledReadableStream;if(xe(i)&&De(i)>0)gt(i,t,!1);else{let a;try{a=e._strategySizeAlgorithm(t)}catch(l){throw he(e,l),l}try{wr(e,t,a)}catch(l){throw he(e,l),l}}Tt(e)}function he(e,t){const i=e._controlledReadableStream;i._state==="readable"&&(Ae(e),rr(e),Hn(i,t))}function zr(e){const t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function Co(e){return!Un(e)}function nt(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Ln(e,t,i,a,l,h,b){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=b,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Tt(t),null),I=>(he(t,I),null))}function Bo(e,t,i,a){const l=Object.create(Ee.prototype);let h,b,S;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.pull!==void 0?b=()=>t.pull(l):b=()=>B(void 0),t.cancel!==void 0?S=I=>t.cancel(I):S=()=>B(void 0),Ln(e,l,h,b,S,i,a)}function nr(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function To(e,t){return Ue(e._readableStreamController)?Ao(e):Po(e)}function Po(e,t){const i=be(e);let a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(ne=>{W=ne});function me(){return a?(l=!0,B(void 0)):(a=!0,Me(i,{_chunkSteps:ie=>{H(()=>{l=!1;const de=ie,Be=ie;h||rt(P._readableStreamController,de),b||rt(q._readableStreamController,Be),a=!1,l&&me()})},_closeSteps:()=>{a=!1,h||Ye(P._readableStreamController),b||Ye(q._readableStreamController),(!h||!b)&&W(void 0)},_errorSteps:()=>{a=!1}}),B(void 0))}function ot(ne){if(h=!0,S=ne,b){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function ve(ne){if(b=!0,I=ne,h){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function Ce(){}return P=Pt(Ce,me,ot),q=Pt(Ce,me,ve),Y(i._closedPromise,ne=>(he(P._readableStreamController,ne),he(q._readableStreamController,ne),(!h||!b)&&W(void 0),null)),[P,q]}function Ao(e){let t=be(e),i=!1,a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(A=>{W=A});function me(A){Y(A._closedPromise,v=>(A!==t||(ce(P._readableStreamController,v),ce(q._readableStreamController,v),(!h||!b)&&W(void 0)),null))}function ot(){$e(t)&&(ue(t),t=be(e),me(t)),Me(t,{_chunkSteps:v=>{H(()=>{a=!1,l=!1;const N=v;let se=v;if(!h&&!b)try{se=an(v)}catch(at){ce(P._readableStreamController,at),ce(q._readableStreamController,at),W(pe(e,at));return}h||Lt(P._readableStreamController,N),b||Lt(q._readableStreamController,se),i=!1,a?Ce():l&&ne()})},_closeSteps:()=>{i=!1,h||St(P._readableStreamController),b||St(q._readableStreamController),P._readableStreamController._pendingPullIntos.length>0&&$t(P._readableStreamController,0),q._readableStreamController._pendingPullIntos.length>0&&$t(q._readableStreamController,0),(!h||!b)&&W(void 0)},_errorSteps:()=>{i=!1}})}function ve(A,v){fe(t)&&(ue(t),t=wn(e),me(t));const N=v?q:P,se=v?P:q;Rn(t,A,1,{_chunkSteps:st=>{H(()=>{a=!1,l=!1;const ut=v?b:h;if(v?h:b)ut||Nt(N._readableStreamController,st);else{let ii;try{ii=an(st)}catch($r){ce(N._readableStreamController,$r),ce(se._readableStreamController,$r),W(pe(e,$r));return}ut||Nt(N._readableStreamController,st),Lt(se._readableStreamController,ii)}i=!1,a?Ce():l&&ne()})},_closeSteps:st=>{i=!1;const ut=v?b:h,cr=v?h:b;ut||St(N._readableStreamController),cr||St(se._readableStreamController),st!==void 0&&(ut||Nt(N._readableStreamController,st),!cr&&se._readableStreamController._pendingPullIntos.length>0&&$t(se._readableStreamController,0)),(!ut||!cr)&&W(void 0)},_errorSteps:()=>{i=!1}})}function Ce(){if(i)return a=!0,B(void 0);i=!0;const A=Cr(P._readableStreamController);return A===null?ot():ve(A._view,!1),B(void 0)}function ne(){if(i)return l=!0,B(void 0);i=!0;const A=Cr(q._readableStreamController);return A===null?ot():ve(A._view,!0),B(void 0)}function ie(A){if(h=!0,S=A,b){const v=k([S,I]),N=pe(e,v);W(N)}return M}function de(A){if(b=!0,I=A,h){const v=k([S,I]),N=pe(e,v);W(N)}return M}function Be(){}return P=Nn(Be,Ce,ie),q=Nn(Be,ne,de),me(t),[P,q]}function Io(e){return _(e)&&typeof e.getReader<"u"}function Fo(e){return Io(e)?xo(e.getReader()):qo(e)}function qo(e){let t;const i=on(e,"async"),a=m;function l(){let b;try{b=Si(i)}catch(I){return g(I)}const S=B(b);return j(S,I=>{if(!_(I))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ri(I))Ye(t._readableStreamController);else{const q=Ei(I);rt(t._readableStreamController,q)}})}function h(b){const S=i.iterator;let I;try{I=Mt(S,"return")}catch(W){return g(W)}if(I===void 0)return B(void 0);let P;try{P=ee(I,S,[b])}catch(W){return g(W)}const q=B(P);return j(q,W=>{if(!_(W))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return t=Pt(a,l,h,0),t}function xo(e){let t;const i=m;function a(){let h;try{h=e.read()}catch(b){return g(b)}return j(h,b=>{if(!_(b))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(b.done)Ye(t._readableStreamController);else{const S=b.value;rt(t._readableStreamController,S)}})}function l(h){try{return B(e.cancel(h))}catch(b){return g(b)}}return t=Pt(i,a,l,0),t}function Wo(e,t){ae(e,t);const i=e,a=i?.autoAllocateChunkSize,l=i?.cancel,h=i?.pull,b=i?.start,S=i?.type;return{autoAllocateChunkSize:a===void 0?void 0:_t(a,`${t} has member 'autoAllocateChunkSize' that`),cancel:l===void 0?void 0:vo(l,i,`${t} has member 'cancel' that`),pull:h===void 0?void 0:ko(h,i,`${t} has member 'pull' that`),start:b===void 0?void 0:Oo(b,i,`${t} has member 'start' that`),type:S===void 0?void 0:Do(S,`${t} has member 'type' that`)}}function vo(e,t,i){return re(e,i),a=>D(e,t,[a])}function ko(e,t,i){return re(e,i),a=>D(e,t,[a])}function Oo(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Do(e,t){if(e=`${e}`,e!=="bytes")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function zo(e,t){return ae(e,t),{preventCancel:!!e?.preventCancel}}function $n(e,t){ae(e,t);const i=e?.preventAbort,a=e?.preventCancel,l=e?.preventClose,h=e?.signal;return h!==void 0&&Mo(h,`${t} has member 'signal' that`),{preventAbort:!!i,preventCancel:!!a,preventClose:!!l,signal:h}}function Mo(e,t){if(!Yi(e))throw new TypeError(`${t} is not an AbortSignal.`)}function jo(e,t){ae(e,t);const i=e?.readable;yt(i,"readable","ReadableWritablePair"),wt(i,`${t} has member 'readable' that`);const a=e?.writable;return yt(a,"writable","ReadableWritablePair"),Cn(a,`${t} has member 'writable' that`),{readable:i,writable:a}}class K{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Qt(i,"Second parameter"),l=Wo(t,"First parameter");if(Mr(this),l.type==="bytes"){if(a.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");const h=Et(a,0);Wi(this,l,h)}else{const h=Yt(a),b=Et(a,1);Bo(this,l,b,h)}}get locked(){if(!qe(this))throw Qe("locked");return xe(this)}cancel(t=void 0){return qe(this)?xe(this)?g(new TypeError("Cannot cancel a stream that already has a reader")):pe(this,t):g(Qe("cancel"))}getReader(t=void 0){if(!qe(this))throw Qe("getReader");return ki(t,"First parameter").mode===void 0?be(this):wn(this)}pipeThrough(t,i={}){if(!qe(this))throw Qe("pipeThrough");le(t,1,"pipeThrough");const a=jo(t,"First parameter"),l=$n(i,"Second parameter");if(xe(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(et(a.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");const h=jn(this,a.writable,l.preventClose,l.preventAbort,l.preventCancel,l.signal);return U(h),a.readable}pipeTo(t,i={}){if(!qe(this))return g(Qe("pipeTo"));if(t===void 0)return g("Parameter 1 is required in 'pipeTo'.");if(!Ke(t))return g(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let a;try{a=$n(i,"Second parameter")}catch(l){return g(l)}return xe(this)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):et(t)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jn(this,t,a.preventClose,a.preventAbort,a.preventCancel,a.signal)}tee(){if(!qe(this))throw Qe("tee");const t=To(this);return k(t)}values(t=void 0){if(!qe(this))throw Qe("values");const i=zo(t,"First parameter");return f(this,i.preventCancel)}[yr](t){return this.values(t)}static from(t){return Fo(t)}}Object.defineProperties(K,{from:{enumerable:!0}}),Object.defineProperties(K.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),w(K.from,"from"),w(K.prototype.cancel,"cancel"),w(K.prototype.getReader,"getReader"),w(K.prototype.pipeThrough,"pipeThrough"),w(K.prototype.pipeTo,"pipeTo"),w(K.prototype.tee,"tee"),w(K.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(K.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(K.prototype,yr,{value:K.prototype.values,writable:!0,configurable:!0});function Pt(e,t,i,a=1,l=()=>1){const h=Object.create(K.prototype);Mr(h);const b=Object.create(Ee.prototype);return Ln(h,b,e,t,i,a,l),h}function Nn(e,t,i){const a=Object.create(K.prototype);Mr(a);const l=Object.create(Se.prototype);return _n(a,l,e,t,i,0,void 0),a}function Mr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function qe(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof K}function xe(e){return e._reader!==void 0}function pe(e,t){if(e._disturbed=!0,e._state==="closed")return B(void 0);if(e._state==="errored")return g(e._storedError);At(e);const i=e._reader;if(i!==void 0&&$e(i)){const l=i._readIntoRequests;i._readIntoRequests=new te,l.forEach(h=>{h._closeSteps(void 0)})}const a=e._readableStreamController[ct](t);return j(a,m)}function At(e){e._state="closed";const t=e._reader;if(t!==void 0&&(J(t),fe(t))){const i=t._readRequests;t._readRequests=new te,i.forEach(a=>{a._closeSteps()})}}function Hn(e,t){e._state="errored",e._storedError=t;const i=e._reader;i!==void 0&&(mt(i,t),fe(i)?zt(i,t):En(i,t))}function Qe(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Yn(e,t){ae(e,t);const i=e?.highWaterMark;return yt(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Je(i)}}const Qn=e=>e.byteLength;w(Qn,"size");class ir{constructor(t){le(t,1,"ByteLengthQueuingStrategy"),t=Yn(t,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Gn(this))throw Vn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Gn(this))throw Vn("size");return Qn}}Object.defineProperties(ir.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ir.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Vn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Gn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof ir}const Xn=()=>1;w(Xn,"size");class or{constructor(t){le(t,1,"CountQueuingStrategy"),t=Yn(t,"First parameter"),this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Zn(this))throw Jn("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Zn(this))throw Jn("size");return Xn}}Object.defineProperties(or.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(or.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Jn(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Zn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof or}function Uo(e,t){ae(e,t);const i=e?.cancel,a=e?.flush,l=e?.readableType,h=e?.start,b=e?.transform,S=e?.writableType;return{cancel:i===void 0?void 0:Ho(i,e,`${t} has member 'cancel' that`),flush:a===void 0?void 0:Lo(a,e,`${t} has member 'flush' that`),readableType:l,start:h===void 0?void 0:$o(h,e,`${t} has member 'start' that`),transform:b===void 0?void 0:No(b,e,`${t} has member 'transform' that`),writableType:S}}function Lo(e,t,i){return re(e,i),a=>D(e,t,[a])}function $o(e,t,i){return re(e,i),a=>ee(e,t,[a])}function No(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Ho(e,t,i){return re(e,i),a=>D(e,t,[a])}class ar{constructor(t={},i={},a={}){t===void 0&&(t=null);const l=Qt(i,"Second parameter"),h=Qt(a,"Third parameter"),b=Uo(t,"First parameter");if(b.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(b.writableType!==void 0)throw new RangeError("Invalid writableType specified");const S=Et(h,0),I=Yt(h),P=Et(l,1),q=Yt(l);let W;const M=F(me=>{W=me});Yo(this,M,P,q,S,I),Vo(this,b),b.start!==void 0?W(b.start(this._transformStreamController)):W(void 0)}get readable(){if(!Kn(this))throw ni("readable");return this._readable}get writable(){if(!Kn(this))throw ni("writable");return this._writable}}Object.defineProperties(ar.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ar.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Yo(e,t,i,a,l,h){function b(){return t}function S(M){return Jo(e,M)}function I(M){return Zo(e,M)}function P(){return Ko(e)}e._writable=Gi(b,S,P,I,i,a);function q(){return ea(e)}function W(M){return ta(e,M)}e._readable=Pt(b,q,W,l,h),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,sr(e,!0),e._transformStreamController=void 0}function Kn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof ar}function ei(e,t){he(e._readable._readableStreamController,t),jr(e,t)}function jr(e,t){lr(e._transformStreamController),Ct(e._writable._writableStreamController,t),Ur(e)}function Ur(e){e._backpressure&&sr(e,!1)}function sr(e,t){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=F(i=>{e._backpressureChangePromise_resolve=i}),e._backpressure=t}class We{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!ur(this))throw fr("desiredSize");const t=this._controlledTransformStream._readable._readableStreamController;return zr(t)}enqueue(t=void 0){if(!ur(this))throw fr("enqueue");ti(this,t)}error(t=void 0){if(!ur(this))throw fr("error");Go(this,t)}terminate(){if(!ur(this))throw fr("terminate");Xo(this)}}Object.defineProperties(We.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),w(We.prototype.enqueue,"enqueue"),w(We.prototype.error,"error"),w(We.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(We.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function ur(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof We}function Qo(e,t,i,a,l){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=i,t._flushAlgorithm=a,t._cancelAlgorithm=l,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Vo(e,t){const i=Object.create(We.prototype);let a,l,h;t.transform!==void 0?a=b=>t.transform(b,i):a=b=>{try{return ti(i,b),B(void 0)}catch(S){return g(S)}},t.flush!==void 0?l=()=>t.flush(i):l=()=>B(void 0),t.cancel!==void 0?h=b=>t.cancel(b):h=()=>B(void 0),Qo(e,i,a,l,h)}function lr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function ti(e,t){const i=e._controlledTransformStream,a=i._readable._readableStreamController;if(!nt(a))throw new TypeError("Readable side is not in a state that permits enqueue");try{rt(a,t)}catch(h){throw jr(i,h),i._readable._storedError}Co(a)!==i._backpressure&&sr(i,!0)}function Go(e,t){ei(e._controlledTransformStream,t)}function ri(e,t){const i=e._transformAlgorithm(t);return j(i,void 0,a=>{throw ei(e._controlledTransformStream,a),a})}function Xo(e){const t=e._controlledTransformStream,i=t._readable._readableStreamController;Ye(i);const a=new TypeError("TransformStream terminated");jr(t,a)}function Jo(e,t){const i=e._transformStreamController;if(e._backpressure){const a=e._backpressureChangePromise;return j(a,()=>{const l=e._writable;if(l._state==="erroring")throw l._storedError;return ri(i,t)})}return ri(i,t)}function Zo(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._readable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return lr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(he(a._readableStreamController,t),Lr(i)),null),h=>(he(a._readableStreamController,h),it(i,h),null)),i._finishPromise}function Ko(e){const t=e._transformStreamController;if(t._finishPromise!==void 0)return t._finishPromise;const i=e._readable;t._finishPromise=F((l,h)=>{t._finishPromise_resolve=l,t._finishPromise_reject=h});const a=t._flushAlgorithm();return lr(t),T(a,()=>(i._state==="errored"?it(t,i._storedError):(Ye(i._readableStreamController),Lr(t)),null),l=>(he(i._readableStreamController,l),it(t,l),null)),t._finishPromise}function ea(e){return sr(e,!1),e._backpressureChangePromise}function ta(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._writable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return lr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(Ct(a._writableStreamController,t),Ur(e),Lr(i)),null),h=>(Ct(a._writableStreamController,h),Ur(e),it(i,h),null)),i._finishPromise}function fr(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function Lr(e){e._finishPromise_resolve!==void 0&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function it(e,t){e._finishPromise_reject!==void 0&&(U(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function ni(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}p.ByteLengthQueuingStrategy=ir,p.CountQueuingStrategy=or,p.ReadableByteStreamController=Se,p.ReadableStream=K,p.ReadableStreamBYOBReader=Ie,p.ReadableStreamBYOBRequest=je,p.ReadableStreamDefaultController=Ee,p.ReadableStreamDefaultReader=V,p.TransformStream=ar,p.TransformStreamDefaultController=We,p.WritableStream=Fe,p.WritableStreamDefaultController=tt,p.WritableStreamDefaultWriter=Re})}(dr,dr.exports)),dr.exports}var Hr={},It={},ui;function aa(){if(ui)return It;ui=1,It.byteLength=c,It.toByteArray=X,It.fromByteArray=g;for(var C=[],u=[],p=typeof Uint8Array<"u"?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,R=m.length;_0)throw new Error("Invalid string. Length must be a multiple of 4");var O=E.indexOf("=");O===-1&&(O=T);var Y=O===T?0:4-O%4;return[O,Y]}function c(E){var T=w(E),O=T[0],Y=T[1];return(O+Y)*3/4-Y}function G(E,T,O){return(T+O)*3/4-O}function X(E){var T,O=w(E),Y=O[0],j=O[1],U=new p(G(E,Y,j)),H=0,ee=j>0?Y-4:Y,D;for(D=0;D>16&255,U[H++]=T>>8&255,U[H++]=T&255;return j===2&&(T=u[E.charCodeAt(D)]<<2|u[E.charCodeAt(D+1)]>>4,U[H++]=T&255),j===1&&(T=u[E.charCodeAt(D)]<<10|u[E.charCodeAt(D+1)]<<4|u[E.charCodeAt(D+2)]>>2,U[H++]=T>>8&255,U[H++]=T&255),U}function F(E){return C[E>>18&63]+C[E>>12&63]+C[E>>6&63]+C[E&63]}function B(E,T,O){for(var Y,j=[],U=T;Uee?ee:H+U));return Y===1?(T=E[O-1],j.push(C[T>>2]+C[T<<4&63]+"==")):Y===2&&(T=(E[O-2]<<8)+E[O-1],j.push(C[T>>10]+C[T>>4&63]+C[T<<2&63]+"=")),j.join("")}return It}var hr={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var li;function sa(){return li||(li=1,hr.read=function(C,u,p,m,_){var R,w,c=_*8-m-1,G=(1<>1,F=-7,B=p?_-1:0,g=p?-1:1,E=C[u+B];for(B+=g,R=E&(1<<-F)-1,E>>=-F,F+=c;F>0;R=R*256+C[u+B],B+=g,F-=8);for(w=R&(1<<-F)-1,R>>=-F,F+=m;F>0;w=w*256+C[u+B],B+=g,F-=8);if(R===0)R=1-X;else{if(R===G)return w?NaN:(E?-1:1)*(1/0);w=w+Math.pow(2,m),R=R-X}return(E?-1:1)*w*Math.pow(2,R-m)},hr.write=function(C,u,p,m,_,R){var w,c,G,X=R*8-_-1,F=(1<>1,g=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=m?0:R-1,T=m?1:-1,O=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(c=isNaN(u)?1:0,w=F):(w=Math.floor(Math.log(u)/Math.LN2),u*(G=Math.pow(2,-w))<1&&(w--,G*=2),w+B>=1?u+=g/G:u+=g*Math.pow(2,1-B),u*G>=2&&(w++,G/=2),w+B>=F?(c=0,w=F):w+B>=1?(c=(u*G-1)*Math.pow(2,_),w=w+B):(c=u*Math.pow(2,B-1)*Math.pow(2,_),w=0));_>=8;C[p+E]=c&255,E+=T,c/=256,_-=8);for(w=w<<_|c,X+=_;X>0;C[p+E]=w&255,E+=T,w/=256,X-=8);C[p+E-T]|=O*128}),hr}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */var fi;function ua(){return fi||(fi=1,function(C){const u=aa(),m=sa(),p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;C.Buffer=c,C.SlowBuffer=U,C.INSPECT_MAX_BYTES=50;const w=2147483647;C.kMaxLength=w,c.TYPED_ARRAY_SUPPORT=R(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function R(){try{const o=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(o,r),o.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function _(o){if(o>w)throw new RangeError('The value "'+o+'" is invalid for option "size"');const r=new Uint8Array(o);return Object.setPrototypeOf(r,c.prototype),r}function c(o,r,n){if(typeof o=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(o)}return G(o,r,n)}c.poolSize=8192;function G(o,r,n){if(typeof o=="string")return g(o,r);if(ArrayBuffer.isView(o))return T(o);if(o==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(V(o,ArrayBuffer)||o&&V(o.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(o,SharedArrayBuffer)||o&&V(o.buffer,SharedArrayBuffer)))return O(o,r,n);if(typeof o=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const s=o.valueOf&&o.valueOf();if(s!=null&&s!==o)return c.from(s,r,n);const f=Y(o);if(f)return f;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof o[Symbol.toPrimitive]=="function")return c.from(o[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}c.from=function(o,r,n){return G(o,r,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function X(o){if(typeof o!="number")throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function F(o,r,n){return X(o),o<=0?_(o):r!==void 0?typeof n=="string"?_(o).fill(r,n):_(o).fill(r):_(o)}c.alloc=function(o,r,n){return F(o,r,n)};function B(o){return X(o),_(o<0?0:j(o)|0)}c.allocUnsafe=function(o){return B(o)},c.allocUnsafeSlow=function(o){return B(o)};function g(o,r){if((typeof r!="string"||r==="")&&(r="utf8"),!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const n=H(o,r)|0;let s=_(n);const f=s.write(o,r);return f!==n&&(s=s.slice(0,f)),s}function E(o){const r=o.length<0?0:j(o.length)|0,n=_(r);for(let s=0;s=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return o|0}function U(o){return+o!=o&&(o=0),c.alloc(+o)}c.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==c.prototype},c.compare=function(r,n){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),V(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),!c.isBuffer(r)||!c.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let s=r.length,f=n.length;for(let d=0,y=Math.min(s,f);df.length?(c.isBuffer(y)||(y=c.from(y)),y.copy(f,d)):Uint8Array.prototype.set.call(f,y,d);else if(c.isBuffer(y))y.copy(f,d);else throw new TypeError('"list" argument must be an Array of Buffers');d+=y.length}return f};function H(o,r){if(c.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||V(o,ArrayBuffer))return o.byteLength;if(typeof o!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);const n=o.length,s=arguments.length>2&&arguments[2]===!0;if(!s&&n===0)return 0;let f=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return be(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return De(o).length;default:if(f)return s?-1:be(o).length;r=(""+r).toLowerCase(),f=!0}}c.byteLength=H;function ee(o,r,n){let s=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,r>>>=0,n<=r))return"";for(o||(o="utf8");;)switch(o){case"hex":return br(this,r,n);case"utf8":case"utf-8":return Ve(this,r,n);case"ascii":return pt(this,r,n);case"latin1":case"binary":return vt(this,r,n);case"base64":return Wt(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mt(this,r,n);default:if(s)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),s=!0}}c.prototype._isBuffer=!0;function D(o,r,n){const s=o[r];o[r]=o[n],o[n]=s}c.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;nn&&(r+=" ... "),""},p&&(c.prototype[p]=c.prototype.inspect),c.prototype.compare=function(r,n,s,f,d){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),!c.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(n===void 0&&(n=0),s===void 0&&(s=r?r.length:0),f===void 0&&(f=0),d===void 0&&(d=this.length),n<0||s>r.length||f<0||d>this.length)throw new RangeError("out of range index");if(f>=d&&n>=s)return 0;if(f>=d)return-1;if(n>=s)return 1;if(n>>>=0,s>>>=0,f>>>=0,d>>>=0,this===r)return 0;let y=d-f,x=s-n;const L=Math.min(y,x),z=this.slice(f,d),$=r.slice(n,s);for(let k=0;k2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,fe(n)&&(n=f?0:o.length-1),n<0&&(n=o.length+n),n>=o.length){if(f)return-1;n=o.length-1}else if(n<0)if(f)n=0;else return-1;if(typeof r=="string"&&(r=c.from(r,s)),c.isBuffer(r))return r.length===0?-1:te(o,r,n,s,f);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(o,r,n):Uint8Array.prototype.lastIndexOf.call(o,r,n):te(o,[r],n,s,f);throw new TypeError("val must be string, number or Buffer")}function te(o,r,n,s,f){let d=1,y=o.length,x=r.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(o.length<2||r.length<2)return-1;d=2,y/=2,x/=2,n/=2}function L($,k){return d===1?$[k]:$.readUInt16BE(k*d)}let z;if(f){let $=-1;for(z=n;zy&&(n=y-x),z=n;z>=0;z--){let $=!0;for(let k=0;kf&&(s=f)):s=f;const d=r.length;s>d/2&&(s=d/2);let y;for(y=0;y>>0,isFinite(s)?(s=s>>>0,f===void 0&&(f="utf8")):(f=s,s=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const d=this.length-n;if((s===void 0||s>d)&&(s=d),r.length>0&&(s<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");let y=!1;for(;;)switch(f){case"hex":return qt(this,r,n,s);case"utf8":case"utf-8":return xt(this,r,n,s);case"ascii":case"latin1":case"binary":return ct(this,r,n,s);case"base64":return dt(this,r,n,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,r,n,s);default:if(y)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),y=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Wt(o,r,n){return r===0&&n===o.length?u.fromByteArray(o):u.fromByteArray(o.slice(r,n))}function Ve(o,r,n){n=Math.min(o.length,n);const s=[];let f=r;for(;f239?4:d>223?3:d>191?2:1;if(f+x<=n){let L,z,$,k;switch(x){case 1:d<128&&(y=d);break;case 2:L=o[f+1],(L&192)===128&&(k=(d&31)<<6|L&63,k>127&&(y=k));break;case 3:L=o[f+1],z=o[f+2],(L&192)===128&&(z&192)===128&&(k=(d&15)<<12|(L&63)<<6|z&63,k>2047&&(k<55296||k>57343)&&(y=k));break;case 4:L=o[f+1],z=o[f+2],$=o[f+3],(L&192)===128&&(z&192)===128&&($&192)===128&&(k=(d&15)<<18|(L&63)<<12|(z&63)<<6|$&63,k>65535&&k<1114112&&(y=k))}}y===null?(y=65533,x=1):y>65535&&(y-=65536,s.push(y>>>10&1023|55296),y=56320|y&1023),s.push(y),f+=x}return Ge(s)}const ue=4096;function Ge(o){const r=o.length;if(r<=ue)return String.fromCharCode.apply(String,o);let n="",s=0;for(;ss)&&(n=s);let f="";for(let d=r;ds&&(r=s),n<0?(n+=s,n<0&&(n=0)):n>s&&(n=s),nn)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r+--n],d=1;for(;n>0&&(d*=256);)f+=this[r+--n]*d;return f},c.prototype.readUint8=c.prototype.readUInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]|this[r+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]<<8|this[r+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},c.prototype.readBigUInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,d=this[++r]+this[++r]*2**8+this[++r]*2**16+s*2**24;return BigInt(f)+(BigInt(d)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],d=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+s;return(BigInt(f)<>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y=d&&(f-=Math.pow(2,8*n)),f},c.prototype.readIntBE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=n,d=1,y=this[r+--f];for(;f>0&&(d*=256);)y+=this[r+--f]*d;return d*=128,y>=d&&(y-=Math.pow(2,8*n)),y},c.prototype.readInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},c.prototype.readInt16LE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r]|this[r+1]<<8;return s&32768?s|4294901760:s},c.prototype.readInt16BE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r+1]|this[r]<<8;return s&32768?s|4294901760:s},c.prototype.readInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},c.prototype.readInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},c.prototype.readBigInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(s<<24);return(BigInt(f)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=(n<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(f)<>>0,n||Q(r,4,this.length),m.read(this,r,!0,23,4)},c.prototype.readFloatBE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),m.read(this,r,!1,23,4)},c.prototype.readDoubleLE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),m.read(this,r,!0,52,8)},c.prototype.readDoubleBE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),m.read(this,r,!1,52,8)};function J(o,r,n,s,f,d){if(!c.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>f||ro.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=1,y=0;for(this[n]=r&255;++y>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=s-1,y=1;for(this[n+d]=r&255;--d>=0&&(y*=256);)this[n+d]=r/y&255;return n+s},c.prototype.writeUint8=c.prototype.writeUInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,255,0),this[n]=r&255,n+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=r&255,n+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4};function bt(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,n}function kt(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n+7]=d,d=d>>8,o[n+6]=d,d=d>>8,o[n+5]=d,d=d>>8,o[n+4]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n+3]=y,y=y>>8,o[n+2]=y,y=y>>8,o[n+1]=y,y=y>>8,o[n]=y,n+8}c.prototype.writeBigUInt64LE=ye(function(r,n=0){return bt(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ye(function(r,n=0){return kt(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=0,y=1,x=0;for(this[n]=r&255;++d>0)-x&255;return n+s},c.prototype.writeIntBE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=s-1,y=1,x=0;for(this[n+d]=r&255;--d>=0&&(y*=256);)r<0&&x===0&&this[n+d+1]!==0&&(x=1),this[n+d]=(r/y>>0)-x&255;return n+s},c.prototype.writeInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,127,-128),r<0&&(r=255+r+1),this[n]=r&255,n+1},c.prototype.writeInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),this[n]=r&255,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24,n+4},c.prototype.writeInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4},c.prototype.writeBigInt64LE=ye(function(r,n=0){return bt(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ye(function(r,n=0){return kt(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ot(o,r,n,s,f,d){if(n+s>o.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function ae(o,r,n,s,f){return r=+r,n=n>>>0,f||Ot(o,r,n,4),m.write(o,r,n,s,23,4),n+4}c.prototype.writeFloatLE=function(r,n,s){return ae(this,r,n,!0,s)},c.prototype.writeFloatBE=function(r,n,s){return ae(this,r,n,!1,s)};function re(o,r,n,s,f){return r=+r,n=n>>>0,f||Ot(o,r,n,8),m.write(o,r,n,s,52,8),n+8}c.prototype.writeDoubleLE=function(r,n,s){return re(this,r,n,!0,s)},c.prototype.writeDoubleBE=function(r,n,s){return re(this,r,n,!1,s)},c.prototype.copy=function(r,n,s,f){if(!c.isBuffer(r))throw new TypeError("argument should be a Buffer");if(s||(s=0),!f&&f!==0&&(f=this.length),n>=r.length&&(n=r.length),n||(n=0),f>0&&f=this.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),r.length-n>>0,s=s===void 0?this.length:s>>>0,r||(r=0);let d;if(typeof r=="number")for(d=n;d2**32?f=le(String(n)):typeof n=="bigint"&&(f=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(f=le(f)),f+="n"),s+=` It must be ${r}. Received ${f}`,s},RangeError);function le(o){let r="",n=o.length;const s=o[0]==="-"?1:0;for(;n>=s+4;n-=3)r=`_${o.slice(n-3,n)}${r}`;return`${o.slice(0,n)}${r}`}function yt(o,r,n){we(r,"offset"),(o[r]===void 0||o[r+n]===void 0)&&Oe(r,o.length-(n+1))}function Je(o,r,n,s,f,d){if(o>n||o3?r===0||r===BigInt(0)?x=`>= 0${y} and < 2${y} ** ${(d+1)*8}${y}`:x=`>= -(2${y} ** ${(d+1)*8-1}${y}) and < 2 ** ${(d+1)*8-1}${y}`:x=`>= ${r}${y} and <= ${n}${y}`,new Te.ERR_OUT_OF_RANGE("value",x,o)}yt(s,f,d)}function we(o,r){if(typeof o!="number")throw new Te.ERR_INVALID_ARG_TYPE(r,"number",o)}function Oe(o,r,n){throw Math.floor(o)!==o?(we(o,n),new Te.ERR_OUT_OF_RANGE(n||"offset","an integer",o)):r<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${r}`,o)}const _t=/[^+/0-9A-Za-z-_]/g;function wt(o){if(o=o.split("=")[0],o=o.trim().replace(_t,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function be(o,r){r=r||1/0;let n;const s=o.length;let f=null;const d=[];for(let y=0;y55295&&n<57344){if(!f){if(n>56319){(r-=3)>-1&&d.push(239,191,189);continue}else if(y+1===s){(r-=3)>-1&&d.push(239,191,189);continue}f=n;continue}if(n<56320){(r-=3)>-1&&d.push(239,191,189),f=n;continue}n=(f-55296<<10|n-56320)+65536}else f&&(r-=3)>-1&&d.push(239,191,189);if(f=null,n<128){if((r-=1)<0)break;d.push(n)}else if(n<2048){if((r-=2)<0)break;d.push(n>>6|192,n&63|128)}else if(n<65536){if((r-=3)<0)break;d.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((r-=4)<0)break;d.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return d}function Dt(o){const r=[];for(let n=0;n>8,f=n%256,d.push(f),d.push(s);return d}function De(o){return u.toByteArray(wt(o))}function ze(o,r,n,s){let f;for(f=0;f=r.length||f>=o.length);++f)r[f+n]=o[f];return f}function V(o,r){return o instanceof r||o!=null&&o.constructor!=null&&o.constructor.name!=null&&o.constructor.name===r.name}function fe(o){return o!==o}const Me=function(){const o="0123456789abcdef",r=new Array(256);for(let n=0;n<16;++n){const s=n*16;for(let f=0;f<16;++f)r[s+f]=o[n]+o[f]}return r}();function ye(o){return typeof BigInt>"u"?zt:o}function zt(){throw new Error("BigInt not supported")}}(Hr)),Hr}const la=65536;if(!globalThis.ReadableStream)try{const C=Xr,{emitWarning:u}=C;try{C.emitWarning=()=>{},Object.assign(globalThis,Xr),C.emitWarning=u}catch(m){throw C.emitWarning=u,m}}catch{Object.assign(globalThis,oa())}try{const{Blob:C}=ua();C&&!C.prototype.stream&&(C.prototype.stream=function(m){let p=0;const w=this;return new ReadableStream({type:"bytes",async pull(R){const c=await w.slice(p,Math.min(w.size,p+la)).arrayBuffer();p+=c.byteLength,R.enqueue(new Uint8Array(c)),p===w.size&&R.close()}})})}catch{}/*! fetch-blob. MIT License. Jimmy Wärting */const ci=65536;async function*Yr(C,u=!0){for(const m of C)if("stream"in m)yield*m.stream();else if(ArrayBuffer.isView(m))if(u){let p=m.byteOffset;const w=m.byteOffset+m.byteLength;for(;p!==w;){const R=Math.min(w-p,ci),_=m.buffer.slice(p,p+R);p+=_.byteLength,yield new Uint8Array(_)}}else yield m;else{let p=0,w=m;for(;p!==w.size;){const _=await w.slice(p,Math.min(w.size,p+ci)).arrayBuffer();p+=_.byteLength,yield new Uint8Array(_)}}}const yi=class Jr{#e=[];#t="";#r=0;#n="transparent";constructor(u=[],m={}){if(typeof u!="object"||u===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof u[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof m!="object"&&typeof m!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");m===null&&(m={});const p=new TextEncoder;for(const R of u){let _;ArrayBuffer.isView(R)?_=new Uint8Array(R.buffer.slice(R.byteOffset,R.byteOffset+R.byteLength)):R instanceof ArrayBuffer?_=new Uint8Array(R.slice(0)):R instanceof Jr?_=R:_=p.encode(`${R}`),this.#r+=ArrayBuffer.isView(_)?_.byteLength:_.size,this.#e.push(_)}this.#n=`${m.endings===void 0?"transparent":m.endings}`;const w=m.type===void 0?"":String(m.type);this.#t=/^[\x20-\x7E]*$/.test(w)?w:""}get size(){return this.#r}get type(){return this.#t}async text(){const u=new TextDecoder;let m="";for await(const p of Yr(this.#e,!1))m+=u.decode(p,{stream:!0});return m+=u.decode(),m}async arrayBuffer(){const u=new Uint8Array(this.size);let m=0;for await(const p of Yr(this.#e,!1))u.set(p,m),m+=p.length;return u.buffer}stream(){const u=Yr(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(m){const p=await u.next();p.done?m.close():m.enqueue(p.value)},async cancel(){await u.return()}})}slice(u=0,m=this.size,p=""){const{size:w}=this;let R=u<0?Math.max(w+u,0):Math.min(u,w),_=m<0?Math.max(w+m,0):Math.min(m,w);const c=Math.max(_-R,0),G=this.#e,X=[];let F=0;for(const g of G){if(F>=c)break;const E=ArrayBuffer.isView(g)?g.byteLength:g.size;if(R&&E<=R)R-=E,_-=E;else{let T;ArrayBuffer.isView(g)?(T=g.subarray(R,Math.min(E,_)),F+=T.byteLength):(T=g.slice(R,Math.min(E,_)),F+=T.size),_-=E,X.push(T),R=0}}const B=new Jr([],{type:String(p).toLowerCase()});return B.#r=c,B.#e=X,B}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](u){return u&&typeof u=="object"&&typeof u.constructor=="function"&&(typeof u.stream=="function"||typeof u.arrayBuffer=="function")&&/^(Blob|File)$/.test(u[Symbol.toStringTag])}};Object.defineProperties(yi.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});const Zr=yi;/*! node-domexception. MIT License. Jimmy Wärting */if(!globalThis.DOMException)try{const{MessageChannel:C}=Xr,u=new C().port1,m=new ArrayBuffer;u.postMessage(m,[m,m])}catch(C){C.constructor.name==="DOMException"&&(globalThis.DOMException=C.constructor)}var fa=globalThis.DOMException;const Z=ra(fa),ca=class extends Zr{#e=0;#t="";constructor(u,m,p={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(u,p),p===null&&(p={});const w=p.lastModified===void 0?Date.now():Number(p.lastModified);Number.isNaN(w)||(this.#e=w),this.#t=String(m)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](u){return!!u&&u instanceof Zr&&/^(File)$/.test(u[Symbol.toStringTag])}},da=ca;var en=nw.require("fs");en.statSync;const ha=en.createReadStream,pa=en.promises;var ma=nw.require("path");const ba=ma.basename,{stat:_i}=pa,ya=(C,u)=>_i(C).then(m=>_a(m,C,u)),_a=(C,u,m="")=>new da([new tn({path:u,size:C.size,lastModified:C.mtimeMs,start:0})],ba(u),{type:m,lastModified:C.mtimeMs});class tn{#e;#t;constructor(u){this.#e=u.path,this.#t=u.start,this.size=u.size,this.lastModified=u.lastModified}slice(u,m){return new tn({path:this.#e,lastModified:this.lastModified,size:m-u,start:this.#t+u})}async*stream(){const{mtimeMs:u}=await _i(this.#e);if(u>this.lastModified)throw new Z("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*ha(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}const wa=globalThis&&globalThis.__classPrivateFieldGet||function(C,u,m,p){if(m==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof u=="function"?C!==u||!p:!u.has(C))throw new TypeError("Cannot read private member from an object whose class did not declare it");return m==="m"?p:m==="a"?p.call(C):p?p.value:u.get(C)};let Kr,wi;var ga=nw.require("path");const pr=ga.join;var oe=nw.require("fs").promises;const{INVALID:Sa,GONE:ke,MISMATCH:di,MOD_ERR:hi,SYNTAX:Qr}=bi;class Ra{constructor(u,m,p){this.position=0,this.fileHandle=u,this.path=m,this.size=p,this.position=0}async abort(){await this.fileHandle.close()}async write(u){try{await oe.stat(this.path)}catch(p){if(p.code==="ENOENT")throw await this.fileHandle.close().catch(),new Z(...ke)}if(na(u)){if(u.type==="write"){if(typeof u.position=="number"&&u.position>=0&&(this.position=u.position),!("data"in u))throw await this.fileHandle.close(),new Z(...Qr("write requires a data argument"));u=u.data}else if(u.type==="seek")if(Number.isInteger(u.position)&&u.position>=0){if(this.size=0){await this.fileHandle.truncate(u.size),this.size=u.size,this.position>this.size&&(this.position=this.size);return}else throw await this.fileHandle.close(),new Z(...Qr("truncate requires a size argument"))}if(u instanceof ArrayBuffer)u=new Uint8Array(u);else if(typeof u=="string")u=Buffer.from(u);else if(u instanceof Zr){for await(const p of u.stream()){const w=await this.fileHandle.writev([p],this.position);this.position+=w.bytesWritten,this.size+=w.bytesWritten}return}const m=await this.fileHandle.writev([u],this.position);this.position+=m.bytesWritten,this.size+=m.bytesWritten}async close(){await this.fileHandle.close(),await oe.stat(this.path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)})}}class Ft{constructor(u,m){Kr.add(this),this.kind="file",this.writable=!0,this._path=u,this.name=m}async getFile(){return await oe.stat(this._path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)}),await ya(this._path)}async isSameEntry(u){return this._path===wa(this,Kr,"m",wi).apply(u)}async createWritable(){const u=await oe.open(this._path,"r+").catch(p=>{throw p.code==="ENOENT"?new Z(...ke):p}),{size:m}=await u.stat();return new Ra(u,this._path,m)}}Kr=new WeakSet,wi=function(){return this._path};class lt{constructor(u="",m=""){this.kind="directory",this.writable=!0,this.name=m,this._path=u}async isSameEntry(u){return this._path===u._path}async*entries(){const u=this._path,m=await oe.readdir(u).catch(p=>{throw p.code==="ENOENT"?new Z(...ke):p});for(const p of m){const w=pr(u,p),R=await oe.lstat(w);R.isFile()?yield[p,new Ft(w,p)]:R.isDirectory()&&(yield[p,new lt(w,p)])}}async getDirectoryHandle(u,m={}){const p=pr(this._path,u),w=await oe.lstat(p).catch(_=>{if(_.code!=="ENOENT")throw _}),R=w?.isDirectory();if(w&&R)return new lt(p,u);if(w&&!R)throw new Z(...di);if(!m.create)throw new Z(...ke);return await oe.mkdir(p),new lt(p,u)}async getFileHandle(u,m={}){const p=pr(this._path,u),w=await oe.lstat(p).catch(_=>{if(_.code!=="ENOENT")throw _}),R=w?.isFile();if(w&&R)return new Ft(p,u);if(w&&!R)throw new Z(...di);if(!m.create)throw new Z(...ke);return await(await oe.open(p,"w")).close(),new Ft(p,u)}async queryPermission(){return"granted"}async removeEntry(u,m){const p=pr(this._path,u);(await oe.lstat(p).catch(R=>{throw R.code==="ENOENT"?new Z(...ke):R})).isDirectory()?m.recursive?await oe.rm(p,{recursive:!0}).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.rmdir(p).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.unlink(p)}}const{join:Ea,dirname:Vr,extname:Ca,basename:pi}=window.nw.require("path"),mr=window.nw.require("fs").promises,{GONE:Gr,MISMATCH:mi}=bi;class Aa{async handleDropEvent(u,m){u.stopPropagation(),u.preventDefault();const p=u.dataTransfer.items;return console.log(p),""}async getDirectoryHandle(u,m){try{const p=await mr.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),w=p?.isDirectory();if(p&&w)return new oi(new lt(u,Vr(u)));if(p&&!w)throw new DOMException(...mi);if(!m?.create)throw new DOMException(...Gr);return await mr.mkdir(u),new oi(new lt(u,Vr(u)))}catch(p){console.error(`Failed to get directory ${u}): `+p);return}}async hasFile(u){try{return await this.getFileHandle(u),!0}catch{return!1}}async getFileHandle(u,m){try{const p=await mr.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),w=p?.isFile();if(p&&w)return new ai(new Ft(u,pi(u)));if(p&&!w)throw new DOMException(...mi);if(!m?.create)throw new DOMException(...Gr);return await(await mr.open(u,"w")).close(),new ai(new Ft(u,pi(u)))}catch(p){console.error("Failed to get file "+u+": "+p);return}}async getFileHandleRelativeTo(u,m){try{Ca(u)!=""&&(u=Vr(u));const p=await this.getDirectoryHandle(u);if(!p)throw new DOMException(...Gr);return p.getFileHandle(m)}catch(p){console.error("Failed to get relative file "+m+": "+p);return}}async getDirectoryFiles(u){try{let m;if(typeof u=="string"){if(m=await this.getDirectoryHandle(u),!m)return[]}else m=u;const p=[];for await(const w of m.values())w.kind=="file"&&p.push(w);return p}catch(m){return console.error(m),[]}}async getDirectoryFolders(u){try{let m;if(typeof u=="string"){if(m=await this.getDirectoryHandle(u),!m)return[]}else m=u;const p=[];for await(const w of m.values())w.kind=="directory"&&p.push(w);return p}catch(m){return console.error(m),[]}}async writeFile(u,m){let p;if(typeof u=="string"){if(p=await this.getFileHandle(u,{create:!0}),!p){ia.createFormatted("Failed to write to "+u+"!","error");return}}else p=u;await this.writeHandle(p,m)}async writeHandle(u,m){const p=await u.createWritable();await p.write(m),await p.close()}getRelativePath(u,m){return Ea(u,m)}}export{Aa as NodeFileHandler}; + */var fi;function ua(){return fi||(fi=1,function(C){const u=aa(),p=sa(),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;C.Buffer=c,C.SlowBuffer=U,C.INSPECT_MAX_BYTES=50;const _=2147483647;C.kMaxLength=_,c.TYPED_ARRAY_SUPPORT=R(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function R(){try{const o=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(o,r),o.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function w(o){if(o>_)throw new RangeError('The value "'+o+'" is invalid for option "size"');const r=new Uint8Array(o);return Object.setPrototypeOf(r,c.prototype),r}function c(o,r,n){if(typeof o=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(o)}return G(o,r,n)}c.poolSize=8192;function G(o,r,n){if(typeof o=="string")return g(o,r);if(ArrayBuffer.isView(o))return T(o);if(o==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(V(o,ArrayBuffer)||o&&V(o.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(o,SharedArrayBuffer)||o&&V(o.buffer,SharedArrayBuffer)))return O(o,r,n);if(typeof o=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const s=o.valueOf&&o.valueOf();if(s!=null&&s!==o)return c.from(s,r,n);const f=Y(o);if(f)return f;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof o[Symbol.toPrimitive]=="function")return c.from(o[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}c.from=function(o,r,n){return G(o,r,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function X(o){if(typeof o!="number")throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function F(o,r,n){return X(o),o<=0?w(o):r!==void 0?typeof n=="string"?w(o).fill(r,n):w(o).fill(r):w(o)}c.alloc=function(o,r,n){return F(o,r,n)};function B(o){return X(o),w(o<0?0:j(o)|0)}c.allocUnsafe=function(o){return B(o)},c.allocUnsafeSlow=function(o){return B(o)};function g(o,r){if((typeof r!="string"||r==="")&&(r="utf8"),!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const n=H(o,r)|0;let s=w(n);const f=s.write(o,r);return f!==n&&(s=s.slice(0,f)),s}function E(o){const r=o.length<0?0:j(o.length)|0,n=w(r);for(let s=0;s=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return o|0}function U(o){return+o!=o&&(o=0),c.alloc(+o)}c.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==c.prototype},c.compare=function(r,n){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),V(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),!c.isBuffer(r)||!c.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let s=r.length,f=n.length;for(let d=0,y=Math.min(s,f);df.length?(c.isBuffer(y)||(y=c.from(y)),y.copy(f,d)):Uint8Array.prototype.set.call(f,y,d);else if(c.isBuffer(y))y.copy(f,d);else throw new TypeError('"list" argument must be an Array of Buffers');d+=y.length}return f};function H(o,r){if(c.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||V(o,ArrayBuffer))return o.byteLength;if(typeof o!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);const n=o.length,s=arguments.length>2&&arguments[2]===!0;if(!s&&n===0)return 0;let f=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return be(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return De(o).length;default:if(f)return s?-1:be(o).length;r=(""+r).toLowerCase(),f=!0}}c.byteLength=H;function ee(o,r,n){let s=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,r>>>=0,n<=r))return"";for(o||(o="utf8");;)switch(o){case"hex":return br(this,r,n);case"utf8":case"utf-8":return Ve(this,r,n);case"ascii":return pt(this,r,n);case"latin1":case"binary":return vt(this,r,n);case"base64":return Wt(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mt(this,r,n);default:if(s)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),s=!0}}c.prototype._isBuffer=!0;function D(o,r,n){const s=o[r];o[r]=o[n],o[n]=s}c.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;nn&&(r+=" ... "),""},m&&(c.prototype[m]=c.prototype.inspect),c.prototype.compare=function(r,n,s,f,d){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),!c.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(n===void 0&&(n=0),s===void 0&&(s=r?r.length:0),f===void 0&&(f=0),d===void 0&&(d=this.length),n<0||s>r.length||f<0||d>this.length)throw new RangeError("out of range index");if(f>=d&&n>=s)return 0;if(f>=d)return-1;if(n>=s)return 1;if(n>>>=0,s>>>=0,f>>>=0,d>>>=0,this===r)return 0;let y=d-f,x=s-n;const L=Math.min(y,x),z=this.slice(f,d),$=r.slice(n,s);for(let k=0;k2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,fe(n)&&(n=f?0:o.length-1),n<0&&(n=o.length+n),n>=o.length){if(f)return-1;n=o.length-1}else if(n<0)if(f)n=0;else return-1;if(typeof r=="string"&&(r=c.from(r,s)),c.isBuffer(r))return r.length===0?-1:te(o,r,n,s,f);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(o,r,n):Uint8Array.prototype.lastIndexOf.call(o,r,n):te(o,[r],n,s,f);throw new TypeError("val must be string, number or Buffer")}function te(o,r,n,s,f){let d=1,y=o.length,x=r.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(o.length<2||r.length<2)return-1;d=2,y/=2,x/=2,n/=2}function L($,k){return d===1?$[k]:$.readUInt16BE(k*d)}let z;if(f){let $=-1;for(z=n;zy&&(n=y-x),z=n;z>=0;z--){let $=!0;for(let k=0;kf&&(s=f)):s=f;const d=r.length;s>d/2&&(s=d/2);let y;for(y=0;y>>0,isFinite(s)?(s=s>>>0,f===void 0&&(f="utf8")):(f=s,s=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const d=this.length-n;if((s===void 0||s>d)&&(s=d),r.length>0&&(s<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");let y=!1;for(;;)switch(f){case"hex":return qt(this,r,n,s);case"utf8":case"utf-8":return xt(this,r,n,s);case"ascii":case"latin1":case"binary":return ct(this,r,n,s);case"base64":return dt(this,r,n,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,r,n,s);default:if(y)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),y=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Wt(o,r,n){return r===0&&n===o.length?u.fromByteArray(o):u.fromByteArray(o.slice(r,n))}function Ve(o,r,n){n=Math.min(o.length,n);const s=[];let f=r;for(;f239?4:d>223?3:d>191?2:1;if(f+x<=n){let L,z,$,k;switch(x){case 1:d<128&&(y=d);break;case 2:L=o[f+1],(L&192)===128&&(k=(d&31)<<6|L&63,k>127&&(y=k));break;case 3:L=o[f+1],z=o[f+2],(L&192)===128&&(z&192)===128&&(k=(d&15)<<12|(L&63)<<6|z&63,k>2047&&(k<55296||k>57343)&&(y=k));break;case 4:L=o[f+1],z=o[f+2],$=o[f+3],(L&192)===128&&(z&192)===128&&($&192)===128&&(k=(d&15)<<18|(L&63)<<12|(z&63)<<6|$&63,k>65535&&k<1114112&&(y=k))}}y===null?(y=65533,x=1):y>65535&&(y-=65536,s.push(y>>>10&1023|55296),y=56320|y&1023),s.push(y),f+=x}return Ge(s)}const ue=4096;function Ge(o){const r=o.length;if(r<=ue)return String.fromCharCode.apply(String,o);let n="",s=0;for(;ss)&&(n=s);let f="";for(let d=r;ds&&(r=s),n<0?(n+=s,n<0&&(n=0)):n>s&&(n=s),nn)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r+--n],d=1;for(;n>0&&(d*=256);)f+=this[r+--n]*d;return f},c.prototype.readUint8=c.prototype.readUInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]|this[r+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]<<8|this[r+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},c.prototype.readBigUInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,d=this[++r]+this[++r]*2**8+this[++r]*2**16+s*2**24;return BigInt(f)+(BigInt(d)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],d=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+s;return(BigInt(f)<>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y=d&&(f-=Math.pow(2,8*n)),f},c.prototype.readIntBE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=n,d=1,y=this[r+--f];for(;f>0&&(d*=256);)y+=this[r+--f]*d;return d*=128,y>=d&&(y-=Math.pow(2,8*n)),y},c.prototype.readInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},c.prototype.readInt16LE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r]|this[r+1]<<8;return s&32768?s|4294901760:s},c.prototype.readInt16BE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r+1]|this[r]<<8;return s&32768?s|4294901760:s},c.prototype.readInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},c.prototype.readInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},c.prototype.readBigInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(s<<24);return(BigInt(f)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=(n<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(f)<>>0,n||Q(r,4,this.length),p.read(this,r,!0,23,4)},c.prototype.readFloatBE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),p.read(this,r,!1,23,4)},c.prototype.readDoubleLE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),p.read(this,r,!0,52,8)},c.prototype.readDoubleBE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),p.read(this,r,!1,52,8)};function J(o,r,n,s,f,d){if(!c.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>f||ro.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=1,y=0;for(this[n]=r&255;++y>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=s-1,y=1;for(this[n+d]=r&255;--d>=0&&(y*=256);)this[n+d]=r/y&255;return n+s},c.prototype.writeUint8=c.prototype.writeUInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,255,0),this[n]=r&255,n+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=r&255,n+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4};function bt(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,n}function kt(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n+7]=d,d=d>>8,o[n+6]=d,d=d>>8,o[n+5]=d,d=d>>8,o[n+4]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n+3]=y,y=y>>8,o[n+2]=y,y=y>>8,o[n+1]=y,y=y>>8,o[n]=y,n+8}c.prototype.writeBigUInt64LE=ye(function(r,n=0){return bt(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ye(function(r,n=0){return kt(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=0,y=1,x=0;for(this[n]=r&255;++d>0)-x&255;return n+s},c.prototype.writeIntBE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=s-1,y=1,x=0;for(this[n+d]=r&255;--d>=0&&(y*=256);)r<0&&x===0&&this[n+d+1]!==0&&(x=1),this[n+d]=(r/y>>0)-x&255;return n+s},c.prototype.writeInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,127,-128),r<0&&(r=255+r+1),this[n]=r&255,n+1},c.prototype.writeInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),this[n]=r&255,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24,n+4},c.prototype.writeInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4},c.prototype.writeBigInt64LE=ye(function(r,n=0){return bt(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ye(function(r,n=0){return kt(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ot(o,r,n,s,f,d){if(n+s>o.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function ae(o,r,n,s,f){return r=+r,n=n>>>0,f||Ot(o,r,n,4),p.write(o,r,n,s,23,4),n+4}c.prototype.writeFloatLE=function(r,n,s){return ae(this,r,n,!0,s)},c.prototype.writeFloatBE=function(r,n,s){return ae(this,r,n,!1,s)};function re(o,r,n,s,f){return r=+r,n=n>>>0,f||Ot(o,r,n,8),p.write(o,r,n,s,52,8),n+8}c.prototype.writeDoubleLE=function(r,n,s){return re(this,r,n,!0,s)},c.prototype.writeDoubleBE=function(r,n,s){return re(this,r,n,!1,s)},c.prototype.copy=function(r,n,s,f){if(!c.isBuffer(r))throw new TypeError("argument should be a Buffer");if(s||(s=0),!f&&f!==0&&(f=this.length),n>=r.length&&(n=r.length),n||(n=0),f>0&&f=this.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),r.length-n>>0,s=s===void 0?this.length:s>>>0,r||(r=0);let d;if(typeof r=="number")for(d=n;d2**32?f=le(String(n)):typeof n=="bigint"&&(f=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(f=le(f)),f+="n"),s+=` It must be ${r}. Received ${f}`,s},RangeError);function le(o){let r="",n=o.length;const s=o[0]==="-"?1:0;for(;n>=s+4;n-=3)r=`_${o.slice(n-3,n)}${r}`;return`${o.slice(0,n)}${r}`}function yt(o,r,n){we(r,"offset"),(o[r]===void 0||o[r+n]===void 0)&&Oe(r,o.length-(n+1))}function Je(o,r,n,s,f,d){if(o>n||o3?r===0||r===BigInt(0)?x=`>= 0${y} and < 2${y} ** ${(d+1)*8}${y}`:x=`>= -(2${y} ** ${(d+1)*8-1}${y}) and < 2 ** ${(d+1)*8-1}${y}`:x=`>= ${r}${y} and <= ${n}${y}`,new Te.ERR_OUT_OF_RANGE("value",x,o)}yt(s,f,d)}function we(o,r){if(typeof o!="number")throw new Te.ERR_INVALID_ARG_TYPE(r,"number",o)}function Oe(o,r,n){throw Math.floor(o)!==o?(we(o,n),new Te.ERR_OUT_OF_RANGE(n||"offset","an integer",o)):r<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${r}`,o)}const _t=/[^+/0-9A-Za-z-_]/g;function wt(o){if(o=o.split("=")[0],o=o.trim().replace(_t,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function be(o,r){r=r||1/0;let n;const s=o.length;let f=null;const d=[];for(let y=0;y55295&&n<57344){if(!f){if(n>56319){(r-=3)>-1&&d.push(239,191,189);continue}else if(y+1===s){(r-=3)>-1&&d.push(239,191,189);continue}f=n;continue}if(n<56320){(r-=3)>-1&&d.push(239,191,189),f=n;continue}n=(f-55296<<10|n-56320)+65536}else f&&(r-=3)>-1&&d.push(239,191,189);if(f=null,n<128){if((r-=1)<0)break;d.push(n)}else if(n<2048){if((r-=2)<0)break;d.push(n>>6|192,n&63|128)}else if(n<65536){if((r-=3)<0)break;d.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((r-=4)<0)break;d.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return d}function Dt(o){const r=[];for(let n=0;n>8,f=n%256,d.push(f),d.push(s);return d}function De(o){return u.toByteArray(wt(o))}function ze(o,r,n,s){let f;for(f=0;f=r.length||f>=o.length);++f)r[f+n]=o[f];return f}function V(o,r){return o instanceof r||o!=null&&o.constructor!=null&&o.constructor.name!=null&&o.constructor.name===r.name}function fe(o){return o!==o}const Me=function(){const o="0123456789abcdef",r=new Array(256);for(let n=0;n<16;++n){const s=n*16;for(let f=0;f<16;++f)r[s+f]=o[n]+o[f]}return r}();function ye(o){return typeof BigInt>"u"?zt:o}function zt(){throw new Error("BigInt not supported")}}(Hr)),Hr}const la=65536;if(!globalThis.ReadableStream)try{const C=Xr,{emitWarning:u}=C;try{C.emitWarning=()=>{},Object.assign(globalThis,Xr),C.emitWarning=u}catch(p){throw C.emitWarning=u,p}}catch{Object.assign(globalThis,oa())}try{const{Blob:C}=ua();C&&!C.prototype.stream&&(C.prototype.stream=function(p){let m=0;const _=this;return new ReadableStream({type:"bytes",async pull(R){const c=await _.slice(m,Math.min(_.size,m+la)).arrayBuffer();m+=c.byteLength,R.enqueue(new Uint8Array(c)),m===_.size&&R.close()}})})}catch{}/*! fetch-blob. MIT License. Jimmy Wärting */const ci=65536;async function*Yr(C,u=!0){for(const p of C)if("stream"in p)yield*p.stream();else if(ArrayBuffer.isView(p))if(u){let m=p.byteOffset;const _=p.byteOffset+p.byteLength;for(;m!==_;){const R=Math.min(_-m,ci),w=p.buffer.slice(m,m+R);m+=w.byteLength,yield new Uint8Array(w)}}else yield p;else{let m=0,_=p;for(;m!==_.size;){const w=await _.slice(m,Math.min(_.size,m+ci)).arrayBuffer();m+=w.byteLength,yield new Uint8Array(w)}}}const yi=class Jr{#e=[];#t="";#r=0;#n="transparent";constructor(u=[],p={}){if(typeof u!="object"||u===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof u[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof p!="object"&&typeof p!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");p===null&&(p={});const m=new TextEncoder;for(const R of u){let w;ArrayBuffer.isView(R)?w=new Uint8Array(R.buffer.slice(R.byteOffset,R.byteOffset+R.byteLength)):R instanceof ArrayBuffer?w=new Uint8Array(R.slice(0)):R instanceof Jr?w=R:w=m.encode(`${R}`),this.#r+=ArrayBuffer.isView(w)?w.byteLength:w.size,this.#e.push(w)}this.#n=`${p.endings===void 0?"transparent":p.endings}`;const _=p.type===void 0?"":String(p.type);this.#t=/^[\x20-\x7E]*$/.test(_)?_:""}get size(){return this.#r}get type(){return this.#t}async text(){const u=new TextDecoder;let p="";for await(const m of Yr(this.#e,!1))p+=u.decode(m,{stream:!0});return p+=u.decode(),p}async arrayBuffer(){const u=new Uint8Array(this.size);let p=0;for await(const m of Yr(this.#e,!1))u.set(m,p),p+=m.length;return u.buffer}stream(){const u=Yr(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(p){const m=await u.next();m.done?p.close():p.enqueue(m.value)},async cancel(){await u.return()}})}slice(u=0,p=this.size,m=""){const{size:_}=this;let R=u<0?Math.max(_+u,0):Math.min(u,_),w=p<0?Math.max(_+p,0):Math.min(p,_);const c=Math.max(w-R,0),G=this.#e,X=[];let F=0;for(const g of G){if(F>=c)break;const E=ArrayBuffer.isView(g)?g.byteLength:g.size;if(R&&E<=R)R-=E,w-=E;else{let T;ArrayBuffer.isView(g)?(T=g.subarray(R,Math.min(E,w)),F+=T.byteLength):(T=g.slice(R,Math.min(E,w)),F+=T.size),w-=E,X.push(T),R=0}}const B=new Jr([],{type:String(m).toLowerCase()});return B.#r=c,B.#e=X,B}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](u){return u&&typeof u=="object"&&typeof u.constructor=="function"&&(typeof u.stream=="function"||typeof u.arrayBuffer=="function")&&/^(Blob|File)$/.test(u[Symbol.toStringTag])}};Object.defineProperties(yi.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});const Zr=yi;/*! node-domexception. MIT License. Jimmy Wärting */if(!globalThis.DOMException)try{const{MessageChannel:C}=Xr,u=new C().port1,p=new ArrayBuffer;u.postMessage(p,[p,p])}catch(C){C.constructor.name==="DOMException"&&(globalThis.DOMException=C.constructor)}var fa=globalThis.DOMException;const Z=ra(fa),ca=class extends Zr{#e=0;#t="";constructor(u,p,m={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(u,m),m===null&&(m={});const _=m.lastModified===void 0?Date.now():Number(m.lastModified);Number.isNaN(_)||(this.#e=_),this.#t=String(p)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](u){return!!u&&u instanceof Zr&&/^(File)$/.test(u[Symbol.toStringTag])}},da=ca;var en=nw.require("fs");en.statSync;const ha=en.createReadStream,pa=en.promises;var ma=nw.require("path");const ba=ma.basename,{stat:_i}=pa,ya=(C,u)=>_i(C).then(p=>_a(p,C,u)),_a=(C,u,p="")=>new da([new tn({path:u,size:C.size,lastModified:C.mtimeMs,start:0})],ba(u),{type:p,lastModified:C.mtimeMs});class tn{#e;#t;constructor(u){this.#e=u.path,this.#t=u.start,this.size=u.size,this.lastModified=u.lastModified}slice(u,p){return new tn({path:this.#e,lastModified:this.lastModified,size:p-u,start:this.#t+u})}async*stream(){const{mtimeMs:u}=await _i(this.#e);if(u>this.lastModified)throw new Z("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*ha(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}const wa=globalThis&&globalThis.__classPrivateFieldGet||function(C,u,p,m){if(p==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof u=="function"?C!==u||!m:!u.has(C))throw new TypeError("Cannot read private member from an object whose class did not declare it");return p==="m"?m:p==="a"?m.call(C):m?m.value:u.get(C)};let Kr,wi;var ga=nw.require("path");const pr=ga.join;var oe=nw.require("fs").promises;const{INVALID:Sa,GONE:ke,MISMATCH:di,MOD_ERR:hi,SYNTAX:Qr}=bi;class Ra{constructor(u,p,m){this.position=0,this.fileHandle=u,this.path=p,this.size=m,this.position=0}async abort(){await this.fileHandle.close()}async write(u){try{await oe.stat(this.path)}catch(m){if(m.code==="ENOENT")throw await this.fileHandle.close().catch(),new Z(...ke)}if(na(u)){if(u.type==="write"){if(typeof u.position=="number"&&u.position>=0&&(this.position=u.position),!("data"in u))throw await this.fileHandle.close(),new Z(...Qr("write requires a data argument"));u=u.data}else if(u.type==="seek")if(Number.isInteger(u.position)&&u.position>=0){if(this.size=0){await this.fileHandle.truncate(u.size),this.size=u.size,this.position>this.size&&(this.position=this.size);return}else throw await this.fileHandle.close(),new Z(...Qr("truncate requires a size argument"))}if(u instanceof ArrayBuffer)u=new Uint8Array(u);else if(typeof u=="string")u=Buffer.from(u);else if(u instanceof Zr){for await(const m of u.stream()){const _=await this.fileHandle.writev([m],this.position);this.position+=_.bytesWritten,this.size+=_.bytesWritten}return}const p=await this.fileHandle.writev([u],this.position);this.position+=p.bytesWritten,this.size+=p.bytesWritten}async close(){await this.fileHandle.close(),await oe.stat(this.path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)})}}class Ft{constructor(u,p){Kr.add(this),this.kind="file",this.writable=!0,this._path=u,this.name=p}async getFile(){return await oe.stat(this._path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)}),await ya(this._path)}async isSameEntry(u){return this._path===wa(this,Kr,"m",wi).apply(u)}async createWritable(){const u=await oe.open(this._path,"r+").catch(m=>{throw m.code==="ENOENT"?new Z(...ke):m}),{size:p}=await u.stat();return new Ra(u,this._path,p)}}Kr=new WeakSet,wi=function(){return this._path};class lt{constructor(u="",p=""){this.kind="directory",this.writable=!0,this.name=p,this._path=u}async isSameEntry(u){return this._path===u._path}async*entries(){const u=this._path,p=await oe.readdir(u).catch(m=>{throw m.code==="ENOENT"?new Z(...ke):m});for(const m of p){const _=pr(u,m),R=await oe.lstat(_);R.isFile()?yield[m,new Ft(_,m)]:R.isDirectory()&&(yield[m,new lt(_,m)])}}async getDirectoryHandle(u,p={}){const m=pr(this._path,u),_=await oe.lstat(m).catch(w=>{if(w.code!=="ENOENT")throw w}),R=_?.isDirectory();if(_&&R)return new lt(m,u);if(_&&!R)throw new Z(...di);if(!p.create)throw new Z(...ke);return await oe.mkdir(m),new lt(m,u)}async getFileHandle(u,p={}){const m=pr(this._path,u),_=await oe.lstat(m).catch(w=>{if(w.code!=="ENOENT")throw w}),R=_?.isFile();if(_&&R)return new Ft(m,u);if(_&&!R)throw new Z(...di);if(!p.create)throw new Z(...ke);return await(await oe.open(m,"w")).close(),new Ft(m,u)}async queryPermission(){return"granted"}async removeEntry(u,p){const m=pr(this._path,u);(await oe.lstat(m).catch(R=>{throw R.code==="ENOENT"?new Z(...ke):R})).isDirectory()?p.recursive?await oe.rm(m,{recursive:!0}).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.rmdir(m).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.unlink(m)}}const{join:Ea,dirname:Vr,extname:Ca,basename:pi}=window.nw.require("path"),mr=window.nw.require("fs").promises,{GONE:Gr,MISMATCH:mi}=bi;class Aa{async handleDropEvent(u,p){u.stopPropagation(),u.preventDefault();const m=u.dataTransfer.items;return console.log(m),""}async getDirectoryHandle(u,p){try{const m=await mr.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),_=m?.isDirectory();if(m&&_)return new oi(new lt(u,Vr(u)));if(m&&!_)throw new DOMException(...mi);if(!p?.create)throw new DOMException(...Gr);return await mr.mkdir(u),new oi(new lt(u,Vr(u)))}catch(m){console.error(`Failed to get directory ${u}): `+m);return}}async hasFile(u){try{return await this.getFileHandle(u),!0}catch{return!1}}async getFileHandle(u,p){try{const m=await mr.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),_=m?.isFile();if(m&&_)return new ai(new Ft(u,pi(u)));if(m&&!_)throw new DOMException(...mi);if(!p?.create)throw new DOMException(...Gr);return await(await mr.open(u,"w")).close(),new ai(new Ft(u,pi(u)))}catch(m){console.error("Failed to get file "+u+": "+m);return}}async getFileHandleRelativeTo(u,p){try{Ca(u)!=""&&(u=Vr(u));const m=await this.getDirectoryHandle(u);if(!m)throw new DOMException(...Gr);return await m.getFileHandle(p)}catch(m){console.error("Failed to get relative file "+p+": "+m);return}}async getDirectoryFiles(u){try{let p;if(typeof u=="string"){if(p=await this.getDirectoryHandle(u),!p)return[]}else p=u;const m=[];for await(const _ of p.values())_.kind=="file"&&m.push(_);return m}catch(p){return console.error(p),[]}}async getDirectoryFolders(u){try{let p;if(typeof u=="string"){if(p=await this.getDirectoryHandle(u),!p)return[]}else p=u;const m=[];for await(const _ of p.values())_.kind=="directory"&&m.push(_);return m}catch(p){return console.error(p),[]}}async writeFile(u,p){let m;if(typeof u=="string"){if(m=await this.getFileHandle(u,{create:!0}),!m){ia.createFormatted("Failed to write to "+u+"!","error");return}}else m=u;await this.writeHandle(m,p)}async writeHandle(u,p){const m=p instanceof Blob?p.size:p.length,_=await u.createWritable();await _.write(p),await _.truncate(m),await _.close()}getRelativePath(u,p){return Ea(u,p)}}export{Aa as NodeFileHandler}; diff --git a/Noteskin-d1f8b157.js b/Noteskin-0136a2b5.js similarity index 99% rename from Noteskin-d1f8b157.js rename to Noteskin-0136a2b5.js index f3392bce..e8316152 100644 --- a/Noteskin-d1f8b157.js +++ b/Noteskin-0136a2b5.js @@ -1 +1 @@ -import{s as B,b as n,Z as Q,H as C,Q as s,L as a,X as D}from"./ChartManager-eb846239.js";import{A as i}from"./AnimatedSprite-b2d4070f.js";import{H as h}from"./HoldBody-c167b8e7.js";const w="/smeditor/assets/hold-3ccaaf09.png",E="/smeditor/assets/mine-590d445e.png",l=B.from(w),f=B.from(E);class c extends n{hold=new i(Q(l,2,1,72,128)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",g=>{if(A==g.columnNumber){const t=new C(f);t.alpha=0,t.anchor.set(.5),t.blendMode=s.ADD,this.addChild(t),a.animate(t,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>t.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2AMCA0EQRNFRVXD/A8fmWv/F6vTuCOGj+CBUMGgAAMDw4p4UKpHiXpsB3HsGfg7g1/+QfL68furfGUiWrnc1MogPfmZgVQsgtZ2Bqmbg1wwq8XA1sf1DAACM3+v8oILv84Pxr97ZPwAAxL2UQyUlNVwzyQ2XfW5//0DV5gevAfx9ftDH8n/wAJUPYeYVqf39AwAA+wfrtVbbzf52fAyf7ADSzwa2IX7vawAAAABJRU5ErkJggg==",I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACAAgMAAADG74f5AAAACVBMVEUAAAAAAACoqKjq2/gjAAAAAXRSTlMAQObYZgAAACRJREFUeNpjGAWDAjBGNSA4TEsdhrfAKBgFo2C0/BgtP0Y6AACvVTE5zX7vswAAAABJRU5ErkJggg==",d="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAUVBMVE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irAOumwlwAvJ+YMD+9wMF/P0AN98A3tIRiCAAegEizEB6ASAIkF4ACCOQ3oEliECAhwosHwPgmQPZ+mv0yTZH+4CrAdc9QDYDVwcGAcDUr8AgAJj7ACYA8N6F62bWu8B5T6HsXfBeha53wXsXut4F710oexe8d8H7SvDehaKHUPQQih5C0UOo+v7PNoWih4C+ENAXAvpK+AHvB+fO94M/swhlD6HoIRQ9hKKvhPQUjgFL93x+heNA+gg18MxaIH3WAomzDnhuJsAJyPuBAfvfDxTw9wPcfAN4S0cgggDoBYgwA+kFgCBAegEgjEB6B5YgAgEeKrB8DIBnDmTrr9En2xztA54GPPcA2Qw8HRgEAFO/AoMAYO4DmADAexeem1nvAuc9hbJ3wXsVut4F713oehe8d6HsXfDeBe8rwXsXih5C0UMoeghFD6Hq+z/bFIoeAvpCQF8I6CvhB7wfnDvfD37JIpQ9hKKHUPQQir4S0lM4Bizd+/0VjgPpI9TAO2uB9FkLJM464L2ZACcg7wcG7H8/UMDfD3DzDeAtHYEIAqAXIMIMpBcAggDpBYAwAukdWIIIBHiowPIxAJ45kK2/Rp9sc7QPeBvw3gNkM/B2YBAATP0KDAKAuQ9gAgDvXXhvZr0LnPcUyt4F71Xoehe8d6HrXfDehbJ3wXsXvK8E710oeghFD6HoIRQ9hKrv/2xTKHoI6AsBfSGgr4Sf/37wD9JlHdUacfGtAAAAAElFTkSuQmCC",M=B.from(F),U=Q(B.from(v),8,1,64,64)[0],m=Q(B.from(H),1,8,64,64),p=Q(B.from(d),1,8,64,64),u=Q(B.from(P),1,8,64,64),K=B.from(I),R=B.from(r),X={Left:90,Down:0,Up:180,Right:-90,UpLeft:135,UpRight:-135,DownRight:-45,DownLeft:45},L=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Y={elements:{Left:{Receptor:o=>{let e;const A=new i(Q(M,2,1,64,64)[0]);return A.width=64,A.height=64,A.anchor.set(.5),o.noteskin.on(A,"ghosttap",g=>{g.columnNumber==o.columnNumber&&(a.finish(e),e=a.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),o.noteskin.onUpdate(A,g=>{const t=(g.getVisualBeat()%1+1)%1;A.currentFrame=t<.2?0:1}),A},Tap:o=>{const e=m[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:o=>new c(o.noteskin,o.columnNumber),Fake:{element:"Tap"},Lift:o=>{const e=u[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:o=>{const e=new i(U);return e.anchor.set(.5),e.width=64,e.height=64,o.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":o=>{const e=p[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(K),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new C(B.EMPTY),"Hold Inactive TopCap":()=>new C(B.EMPTY),"Hold Active BottomCap":()=>new D(B.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(R),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new C(B.EMPTY),"Roll Inactive TopCap":()=>new C(B.EMPTY),"Roll Active BottomCap":()=>new D(B.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(o,e){const A=o.columnName;o.columnName="Left";const g=this.loadElement(o,e);return L.includes(o.element)&&(g.rotation=X[A]*Math.PI/180),g},hideIcons:["Lift"]};export{Y as default}; +import{s as B,b as n,Z as Q,H as C,Q as s,L as a,X as D}from"./ChartManager-a4938337.js";import{A as i}from"./AnimatedSprite-fe6fab2d.js";import{H as h}from"./HoldBody-7c69d162.js";const w="/smeditor/assets/hold-3ccaaf09.png",E="/smeditor/assets/mine-590d445e.png",l=B.from(w),f=B.from(E);class c extends n{hold=new i(Q(l,2,1,72,128)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",g=>{if(A==g.columnNumber){const t=new C(f);t.alpha=0,t.anchor.set(.5),t.blendMode=s.ADD,this.addChild(t),a.animate(t,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>t.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2AMCA0EQRNFRVXD/A8fmWv/F6vTuCOGj+CBUMGgAAMDw4p4UKpHiXpsB3HsGfg7g1/+QfL68furfGUiWrnc1MogPfmZgVQsgtZ2Bqmbg1wwq8XA1sf1DAACM3+v8oILv84Pxr97ZPwAAxL2UQyUlNVwzyQ2XfW5//0DV5gevAfx9ftDH8n/wAJUPYeYVqf39AwAA+wfrtVbbzf52fAyf7ADSzwa2IX7vawAAAABJRU5ErkJggg==",I="data:image/png;base64,iVBORw0KGgoA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AAAAAAAAAAPB9ZLhrTy+q2bKKBPoc6SXcD9Hz4/Nftv8lpbQEelv3Y19NxdnnXmrp2d+33ntz96K2bZupBM+Pz3/R/lP560savYfa8xyeJr4+r3VYs3OA/OrDy9vrow0PjZ8fn9+//+rdf5r9M3n3t57TquLqe526s299as7e2mTR8+PzX7H/pZxTWcT3B9jPac/i6kudirPvb75etzZtGjw/Pv8V+0+fPvl+AHac02G+Aerb/X4A8fnj+0+fPvEE4AnAOwDvAP6vAA2+BevNvwLUuf96DtU0+BWg3ANwD+AhEryJkjvfBMb7+P7/bwK5C6cHAAAAAAAAAAAAAAAAAAAAAADAl/kFHH4jM43eaVYAAAAASUVORK5CYII=",F="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABAAQMAAADoGO08AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAANlJREFUeNrN04GGpWAYBuAnIUAAH47ObRzE3lbABuxtBexttBYHsAF7MKYBL/LDYDA/eSjpy/u9vuiMx1X311XzfNUyXXWMV7t9WCHqt36DaFi7HaKBPX7nG8P5iz/nHo3nb/6eRzR1T57rEt38559HVH7yrqLygzcVlTsvFZWRQ0VlYFdR6dlUVDpWFRVQ0Q14RMk1Sq5Rco2Sa5RcIweMRAtMRDPMRBMsRCMcRMNKtxP12/WSp5G8H/OFmBlipoz5j9hscrPrbRvavrSNajvXtrLt7bCLnzkfnOqGiVWVifMAAAAASUVORK5CYII=",H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAOVBMVEUAAAD///+oqKiAgECAaUCAQECAQHBAUIBAgIBAgEBAQEAAAAD/AAD/pAD//wAA/wAA//8AQP//AL9uhIRbAAAAAXRSTlMAQObYZgAABlBJREFUeNrt2IeqxMYaBOF7vSk5v//DGhprJYq/QGow4aAmD6qPOMsy/zv33+7/37X9599FqPpfswhlD6HoIRQ9hKKvhPQUjgFLd7t9heNA+gg1cMtaIH3WAomzDrhtBuAE/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r),X={Left:90,Down:0,Up:180,Right:-90,UpLeft:135,UpRight:-135,DownRight:-45,DownLeft:45},L=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Y={elements:{Left:{Receptor:o=>{let e;const A=new i(Q(M,2,1,64,64)[0]);return A.width=64,A.height=64,A.anchor.set(.5),o.noteskin.on(A,"ghosttap",g=>{g.columnNumber==o.columnNumber&&(a.finish(e),e=a.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),o.noteskin.onUpdate(A,g=>{const t=(g.getVisualBeat()%1+1)%1;A.currentFrame=t<.2?0:1}),A},Tap:o=>{const e=m[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:o=>new c(o.noteskin,o.columnNumber),Fake:{element:"Tap"},Lift:o=>{const e=u[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:o=>{const e=new i(U);return e.anchor.set(.5),e.width=64,e.height=64,o.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":o=>{const e=p[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(K),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new C(B.EMPTY),"Hold Inactive TopCap":()=>new C(B.EMPTY),"Hold Active BottomCap":()=>new D(B.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(R),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new C(B.EMPTY),"Roll Inactive TopCap":()=>new C(B.EMPTY),"Roll Active BottomCap":()=>new D(B.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(o,e){const A=o.columnName;o.columnName="Left";const g=this.loadElement(o,e);return L.includes(o.element)&&(g.rotation=X[A]*Math.PI/180),g},hideIcons:["Lift"]};export{Y as default}; diff --git a/Noteskin-6e682e6f.js b/Noteskin-1189f7fb.js similarity index 97% rename from Noteskin-6e682e6f.js rename to Noteskin-1189f7fb.js index 1e6ae284..d6518ff7 100644 --- a/Noteskin-6e682e6f.js +++ b/Noteskin-1189f7fb.js @@ -1 +1 @@ -import{Z as d,s as i,b as f,w as u,O as T,J as g,H as l,Q as m,L as p,_ as R}from"./ChartManager-eb846239.js";import{A as w}from"./AnimatedSprite-b2d4070f.js";import{A as U}from"./HoldBody-c167b8e7.js";const L="/smeditor/assets/Center-df4c129b.png",B="/smeditor/assets/DownLeft-63c88ff1.png",y="/smeditor/assets/DownRight-bcd0e463.png",M="/smeditor/assets/UpLeft-ef9a2609.png",O="/smeditor/assets/UpRight-7924deeb.png",I="/smeditor/assets/Center-461a85de.png",E="/smeditor/assets/DownLeft-4943410c.png",S="/smeditor/assets/DownRight-d5c3b98a.png",F="/smeditor/assets/UpLeft-be2bb52b.png",$="/smeditor/assets/UpRight-2e4dc3f1.png",N="/smeditor/assets/Center-274a1642.png",P="/smeditor/assets/DownLeft-15647c81.png",V="/smeditor/assets/DownRight-9aba7559.png",j="/smeditor/assets/UpLeft-36744666.png",k="/smeditor/assets/UpRight-af6dd110.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":j,"./roll/UpRight.png":k})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const Y=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(Y),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-5a0beefb.png",J="/smeditor/assets/flash-d0eff0a1.png",z="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-55cccb8c.png",Z=d(i.from(J),5,1,128,128)[0],q=i.from(z),C=d(i.from(Q),5,2,96,96),G=["w0","w1","w2","w3"];class K extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(Z),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!G.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(q);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const H=(r.getVisualBeat()%1+1)%1;s.alpha=(1-H)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new K(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new U(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new R(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; +import{Z as d,s as i,b as f,w as u,O as T,J as g,H as l,Q as m,L as p,_ as R}from"./ChartManager-a4938337.js";import{A as w}from"./AnimatedSprite-fe6fab2d.js";import{A as U}from"./HoldBody-7c69d162.js";const L="/smeditor/assets/Center-df4c129b.png",B="/smeditor/assets/DownLeft-63c88ff1.png",y="/smeditor/assets/DownRight-bcd0e463.png",M="/smeditor/assets/UpLeft-ef9a2609.png",O="/smeditor/assets/UpRight-7924deeb.png",I="/smeditor/assets/Center-461a85de.png",E="/smeditor/assets/DownLeft-4943410c.png",S="/smeditor/assets/DownRight-d5c3b98a.png",F="/smeditor/assets/UpLeft-be2bb52b.png",$="/smeditor/assets/UpRight-2e4dc3f1.png",N="/smeditor/assets/Center-274a1642.png",P="/smeditor/assets/DownLeft-15647c81.png",V="/smeditor/assets/DownRight-9aba7559.png",j="/smeditor/assets/UpLeft-36744666.png",k="/smeditor/assets/UpRight-af6dd110.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":j,"./roll/UpRight.png":k})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const Y=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(Y),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-5a0beefb.png",J="/smeditor/assets/flash-d0eff0a1.png",z="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-55cccb8c.png",Z=d(i.from(J),5,1,128,128)[0],q=i.from(z),C=d(i.from(Q),5,2,96,96),G=["w0","w1","w2","w3"];class K extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(Z),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!G.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(q);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const H=(r.getVisualBeat()%1+1)%1;s.alpha=(1-H)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new K(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new U(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new R(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; diff --git a/Noteskin-2e3fb130.js b/Noteskin-2e945f65.js similarity index 99% rename from Noteskin-2e3fb130.js rename to Noteskin-2e945f65.js index 41e1cc48..d14a3277 100644 --- a/Noteskin-2e3fb130.js +++ b/Noteskin-2e945f65.js @@ -1,4 +1,4 @@ -import{s as r,u as I,v as E,b as P,w as v,O as m,x as w,y as c,z as Q,H as a,J as p,Z as L,L as C,Q as x,X as l}from"./ChartManager-eb846239.js";import{A as H}from"./AnimatedSprite-b2d4070f.js";import{H as d}from"./HoldBody-c167b8e7.js";const b="/smeditor/assets/downBodyActive-dd1fd694.png",G="/smeditor/assets/downBodyInactive-c781a303.png",y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+NUWXVAPj/mu4PsD+fN94/4yeZqXHPr+NWn415nAtSPtVe/vplbP2BGBOjfaag8ll2frBgQqH2hBe5FIDICt/jDrgIQETjGH3oZiITANX4pAMYvf+wPZ8r4lfdfegZQ+kKoQ/wmTwHKCBQ/QDqjHCh0BKqfHs5+AOP4za8Csh8AO36Xy8DsB8CN3+19gOwHyH6A7AcAjN8VAAuC7AcwRpD9AMYIsh/AGEH2AxgjyH6AwZP9AJM3AAUE2Q9gjCD7AYwRZD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39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",Y="/smeditor/assets/leftBodyActive-75d41033.png",V="/smeditor/assets/leftBodyInactive-bbc074cd.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZPvAZjqCQsAfGEBgC8sAPCFBQC+sADAFxYA+MICAF9YAOD7xh74f+evLpcB/+/81XYAhRQgKnwFCQz4ta/w0AIAX1gA4AvPApTgR5/WGvDjrTN4CmrAjwXfWwIDfjz4nhIY8GPC95LAgB8XvocEBnztqaYBX3udIczTQOoDFBOA+gA5gvoA1AcY17VTH2B8TuoDBAPinYv6AIEloD5A8Hs+9QEGBvUBiq0DZB7tUx9AGD7TQOAjAPARAPgIAHwEAD4CjIRPFBEA+MICAF9YAOALCwB8YQGALyxAS/hMAZMJAHxhAYAfI/YV4fccU3jkoz6AMHzvQbEBP2Y+6gMIw/fMYcCPCd8rlwE/LnyPnJbZXm8YFVcsDfi68GcJcP/980RxAZ6Px6mFBL0XM7xX/6quNv7YKiTQkeDXFkWUwPsLHaJ8gcSw+gBIMF6CLbnmsJrmnOj1fP68/93h6cSaQOeZQWv4P13Q09wTIoFvPg/4iwRAAr98XvAXC5BJAsVYCn+VAEhQB/5qAZCgBvxNAiBBfvj/rgP8F1lWDIHfSQAkyA2/iQBIkBd+MwGQICf8zYPAiAPD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HXDXwXgyZ0lVHEAcwsEvSczvGf/qs42vtoDgEAEwbtDQDgE3j/oEOUHJEauDwCCwQiO9FqT1bzyuX4f/7DntnHmBIaHP+8FAALnfh7hbwUAgin+18Fbwt8DIA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",X="/smeditor/assets/rightBodyActive-07f95372.png",K="/smeditor/assets/rightBodyInactive-fdefc2a4.png",R="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABA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L4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7B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InwDCNwPMHv5PX0EjT/guwCEU28B4CdwHCJeAAOESECBcAgKES0CAcAkIEC4BAcIlIEC4BAQIl8CnhYdLsFwFIIEWQIIEAb4LmQS3cVz5L/zp8fWusBLOCxxWDf/eEFMOi0RsA1tJQ4BF2kYSUW8N+24mSDxjGHcn0O4gXAASEIAEBCDB0gKcTi8kSBXgX/gkCBTgfegkMAP8SIKajCrBUgKczw8kSK8AJNACtAMC2CISgAQEmEECArShkEAFIIEWQAIzAAkMgSQgAAkIQAICdJZgBHkI0EmCUSoHATpIMFLb8D+DPkpwuSbBZy8zzz4TqAAVKgEBSEAAEhBg96m4Q39dXoKhKsBXAXccrpaWYLgWcC3oASbrZSUoFa/9Zjt16zZqD64EU2o8p1bP7RPRypIVwGDYLvwlBWhQlptJUDv8pi1g9lJ5azuYrWWXyr9wMwkah99DgjLNRVtL0Cn8lhKU6S7cSoLO4beQoGyzXry2BIOE7z5ADwmEP6cANcul8CdatIvwswXYUwLhT7x4F+EDAAAAAAAAAAAAAAAAAAAAwD38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AM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GBHwAAAAAAAAAAAAAAAAAAAAAOBGPgB2WwC5W8OZ7AAAAABJRU5ErkJggg==",o0="/smeditor/assets/bodyActive-889762ad.png",g0="/smeditor/assets/bodyInactive-5d99335a.png",e0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+AMCwUON+iUkUgAAAcOSURBVHja7Z1/iBVVFMfvXadIWKiEhSRJMtTWcKEf9sO31mI/iKL8QVEUCFKwJVmozwgKIiiIfLpuhrVQCEJRFK4VSfRDKn+U2Q9YiSzJMAyDBStYMKp90z++f173zdyZc+6Ze+85X9h/xJ1zZuZ+PjNv3tt3tHKUxoYNafu/ranvA22zS42C+2qqZZXXyMtQo/a/f6uvX69dnKdEESZV1Sdlsp+20VT0PwKkP0Eg819LMilrdcowkQUSoZ+3BTQF/auB9J+JQOTfBYmsomZ7thBYgMQATQ9WepNJzUoNYKJ/FZD+qQgknipJYpW1W9nq2AKJ0M/bAtol/YNA+rsRCJwAEuhDDyMOLZAI/bwtoF3Rfx+Q/nMQyPsDSJ5PvbziyALODMDtdX+ozwW0C/pXAumfhkDcSQviWnWK/F/XPWVlmwMLODFAaNfdpoc9BWEAE/0rgPT3IJA2bkFae50yv+Oqt6xsR7YAugFCvfanHvfmpQFM9N8LpP88BMJ+syCsUx3I72L3mJVXES2QCP28LaCx6L8bSP/5CGT9akFWXh2MbWD1mpXXkSyQCP28LaAx6L8TSP8FCET9YkGUbR3MbUHrZOVNBAskQj9vC2go/cuB9F+IQNLPFiQVreNim2XrZGUH0AKJ0M/bAhpC/1Ig/RchEPSTBUFl67jcdtE6WdkJsADIALG/187hPQJdlv7bgPTPQSDnRwtyoHUoatjWycq7JS1Q2gDyVz5x3AvoMvTfCqT/YgRiDlsQg1GHstZhoAXeK2GBUgbg9jm7mO8FdFH6b67vBxW8RO0AN/2d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ge3kp6g8P5R/44kL2P3SHst5eiPoPl/L+/fLAtOrfdT0TAMh8/qySX1/r7K+NbgPPftmuf9f1TABMAPIE4Nk/rOdiVGvlH9g52d86+W4+Z52ov/Poex691r/reu4GBIgYKkDkuLdvS/8hKq8LKHB+Vv4PX3VdQJEzd1aqrzqvXeT9X+UTStV1Af+3f+h6JgCAiCEAAAgAAGANAKKnbvevom73r6Jud62ibvdvyz80PRMAABUAAAgAAGANAOj+dP849EwAAFQAACAAACCu6me4GzDuHYC7AbkbEACoAABAAABALHAdQOTwPACeBwAAVAAAIAAAgDUAiBPuCeB5AABABQAAAgAAWAMAuj/d/+fTMwEAUAEAgAAAgLiqn+F5AHHvADwPgOcBAAAVAAAIAACIBa4DiByeB8DzAACACQCghNFIJR8OdfZD49vAQn534TnLM9L6h60nAEDm+XOVfH9fZ79vfBv4KL776ZNH/kLrH7aeAAC5+4/HjfTF7r+318y/2F33TLMNFLv/P19+rH9oegIARPKGAVBkMsl1+nyi0s9mSbv+Sdh6AgDkiUC5BjAaWZ3e6vy9awAt+3ddTwCAHACDgUrf/iKgzM2N26o/i4AQZvdveARXnfevGwBV563rHgBV5/2z7Mf4h6onAEBeA1BOAP2+7h+47/q6CSBL2vW3YesJABBJfAHgfBVAPgB9S4TDRDcCL5eywxOlf+75Bl3XEwCgmwA8I3aa5hq5SfNU9fkzzwTwROmfJVnQegKA7i8OkUlfHiFPjuVr/tNUPgCPPdesp0n6oO6/YbXKH9Sd6/of2+Og9QQAeErkY6VctwbwWLkGsFqZrfp3XU8AgFzxd3QB0NvV+e8qd9H12ncdgmvVv+t67gYEiJh/AchBW6zwsfy0AAAAAElFTkSuQmCC",i0="/smeditor/assets/frame-d599a2fe.png",C0="/smeditor/assets/parts-b37af2cf.png",s0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAYAAAD1Xam+AAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbI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V1Af+3f+h6JgCAiCEAAAgAAGANAKKnbvevom73r6Jud62ibvdvyz80PRMAABUAAAgAAGANAOj+dP849EwAAFQAACAAACCu6me4GzDuHYC7AbkbEACoAABAAABALHAdQOTwPACeBwAAVAAAIAAAgDUAiBPuCeB5AABABQAAAgAAWAMAuj/d/+fTMwEAUAEAgAAAgLiqn+F5AHHvADwPgOcBAAAVAAAIAACIBa4DiByeB8DzAACACQCghNFIJR8OdfZD49vAQn534TnLM9L6h60nAEDm+XOVfH9fZ79vfBv4KL776ZNH/kLrH7aeAAC5+4/HjfTF7r+318y/2F33TLMNFLv/P19+rH9oegIARPKGAVBkMsl1+nyi0s9mSbv+Sdh6AgDkiUC5BjAaWZ3e6vy9awAt+3ddTwCAHACDgUrf/iKgzM2N26o/i4AQZvdveARXnfevGwBV563rHgBV5/2z7Mf4h6onAEBeA1BOAP2+7h+47/q6CSBL2vW3YesJABBJfAHgfBVAPgB9S4TDRDcCL5eywxOlf+75Bl3XEwCgmwA8I3aa5hq5SfNU9fkzzwTwROmfJVnQegKA7i8OkUlfHiFPjuVr/tNUPgCPPdesp0n6oO6/YbXKH9Sd6/of2+Og9QQAeErkY6VctwbwWLkGsFqZrfp3XU8AgFzxd3QB0NvV+e8qd9H12ncdgmvVv+t67gYEiJh/AchBW6zwsfy0AAAAAElFTkSuQmCC",u=`precision mediump float; +import{s as r,u as I,v as E,b as P,w as v,O as m,x as w,y as c,z as Q,H as a,J as p,Z as L,L as C,Q as x,X as l}from"./ChartManager-a4938337.js";import{A as H}from"./AnimatedSprite-fe6fab2d.js";import{H as d}from"./HoldBody-7c69d162.js";const b="/smeditor/assets/downBodyActive-dd1fd694.png",G="/smeditor/assets/downBodyInactive-c781a303.png",y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4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UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",Y="/smeditor/assets/leftBodyActive-75d41033.png",V="/smeditor/assets/leftBodyInactive-bbc074cd.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZP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q2p4bKxbAAAAAElFTkSuQmCC",X="/smeditor/assets/rightBodyActive-07f95372.png",K="/smeditor/assets/rightBodyInactive-fdefc2a4.png",R="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6A/AP0BvAFZoxb9AYJLQH8A52sA+gO016c/QMBr0h8g4P7X8xYx5QzAFhEBkAABkAABkAABkAABkAABdEJ/AEJ/AOJTAgQQlwABxCVAAHEJEGDCVtCzBAggLgECiEvgvj/AUgiWg3lar+dzA3+NDf0BBlzTchCt69EfAAnoD4AE9AdAgkJ/ACQo9AcIIZ51PfoDIAH9AUhf3t5fNAWYfaBiXa/n+ufgP+12m/QCAL8dvqkAXvoDzDwaHl3PGn6TAC3vIx4kAP5y+KWUcvabr/v91+nXHh+e3a6Sgd8H/6IAkSQAfj/8PwWIIAHwb4N/VQALCTIlOvwmAZAgL/xmAZAgJ/xFAiBBPvhN5wDXCt1yTqAc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IOB7S5CqP8AXf9sOFy1jpD9AEfgZJRDwvSU4HOGPrg38PPazj6ktj4ghVoARNe0z4Y+agSNWAov+AA8St49egTokdx8pQW9Jj5kzLBr8P0vt/dc6LMP7dne6unU7KPkUEAn+o70/ykowOr6tC9i2ee/b/xP+5bqFR7O701a1Z8qnopg7YuafvdMfdPcdOp+KMOgI8CtJcCafWj3oSPArSHA2n1o56IjwM0vQkk+tGnRk+BklaM2nVgx6FvzAESafmj1o4MfK59Ew6Fvn5csRfph8ajEwZ/gh8qmFgwZ+gHxq0aCBHySfB7O47HYwfAUgCgQCIACBAAQCEAhAIACBAAQCEAhAIACBAAQCZI8rFT4OHUwsVoAWkC7ta2y2gDNAnXoXWd0DzP7XsQiQTALHrmXHZhi0p+MxkKgiwMqmCxm7l91H1kOdy5oufAN/RwADCSqVt2U/1j1dgmq1jRXO9U+ToGJha5XCjuESVK1qrlTZM0yCyiXt1Uq7uktQvZ9Bxdq+bhI4NLOoWtx5WQKXTiaVq3ubJXBqY1O9vPu0BG49jBzq+2/kyFuAKxKUz49Th48bufEW4IwEtL4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYh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IOE7z5ADwmEP6cANcul8CdatIvwswXYUwLhT7x4F+EDAAAAAAAAAAAAAAAAAAAAwD38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJ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y/2F33TLMNFLv/P19+rH9oegIARPKGAVBkMsl1+nyi0s9mSbv+Sdh6AgDkiUC5BjAaWZ3e6vy9awAt+3ddTwCAHACDgUrf/iKgzM2N26o/i4AQZvdveARXnfevGwBV563rHgBV5/2z7Mf4h6onAEBeA1BOAP2+7h+47/q6CSBL2vW3YesJABBJfAHgfBVAPgB9S4TDRDcCL5eywxOlf+75Bl3XEwCgmwA8I3aa5hq5SfNU9fkzzwTwROmfJVnQegKA7i8OkUlfHiFPjuVr/tNUPgCPPdesp0n6oO6/YbXKH9Sd6/of2+Og9QQAeErkY6VctwbwWLkGsFqZrfp3XU8AgFzxd3QB0NvV+e8qd9H12ncdgmvVv+t67gYEiJh/AchBW6zwsfy0AAAAAElFTkSuQmCC",i0="/smeditor/assets/frame-d599a2fe.png",C0="/smeditor/assets/parts-b37af2cf.png",s0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAYAAAD1Xam+AAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDa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JfAHgfBVAPgB9S4TDRDcCL5eywxOlf+75Bl3XEwCgmwA8I3aa5hq5SfNU9fkzzwTwROmfJVnQegKA7i8OkUlfHiFPjuVr/tNUPgCPPdesp0n6oO6/YbXKH9Sd6/of2+Og9QQAeErkY6VctwbwWLkGsFqZrfp3XU8AgFzxd3QB0NvV+e8qd9H12ncdgmvVv+t67gYEiJh/AchBW6zwsfy0AAAAAElFTkSuQmCC",u=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-76755dcc.js b/Noteskin-4163467c.js similarity index 99% rename from Noteskin-76755dcc.js rename to Noteskin-4163467c.js index 7a69b667..679fca21 100644 --- a/Noteskin-76755dcc.js +++ b/Noteskin-4163467c.js @@ -1,4 +1,4 @@ -import{s as a,u as h,v as d,b as u,w as x,O as g,x as w,y as f,z as p,H as s,J as E,L as A,P as F,Q as I,V as G,X as v,Y as H}from"./ChartManager-eb846239.js";import{H as B}from"./HoldBody-c167b8e7.js";const P="/smeditor/assets/frame-d599a2fe.png",N="/smeditor/assets/parts-b37af2cf.png",k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAIAAABdtOgoAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAB1lJREFUeJztnD2uLDUQhV22ewa4CRIheyAk4q2EJbAo1kGERExKxAKIkEiuYGa627g8c9Hj9neG5yuE2iMq9Lj/6rhO/bg8ef3GAkn86hTKZtRC+XrC+V/8/OV28LNf0/fvPg+3G71/u0+ff/wW7/P03U84bqdf/PGvpfzw7oDzR5EcVvFLCQCAFoSxDYoHqOcqSUvnBWOIBgDHNSQWVtuiYBre+R/f7e+SVrSAzrvsTnJZmYIcAKQgcSNb6y+bRVoqX0WcrgEQ75PZAta115T2JZkVUZVw4QvU9BjKFpvoeCW6Im3Beu9mJJkVXeCxI0le1Ur0cTD5i/jeEs7bwdUBAKddKvACYGEx9Tb8ossytm/IZYYV50qeSyhbTi8z6cfVHOE+OVW/gFHT5BZAFBdMUN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AANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAMSURBVBhXY0ACDAwAAA4AAXqxuTAAAAAASUVORK5CYII=",Y="/smeditor/assets/frameChrome-2ea8bbf3.png",L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAMSURBVBhXY0ACDAwAAA4AAXqxuTAAAAAASUVORK5CYII=",V="/smeditor/assets/frameChrome-2ea8bbf3.png",T=`precision mediump float; +import{s as a,u as h,v as d,b as u,w as x,O as g,x as w,y as f,z as p,H as s,J as E,L as A,P as F,Q as I,V as G,X as v,Y as H}from"./ChartManager-a4938337.js";import{H as B}from"./HoldBody-7c69d162.js";const P="/smeditor/assets/frame-d599a2fe.png",N="/smeditor/assets/parts-b37af2cf.png",k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAIAAABdtOgoAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAB1lJREFUeJztnD2uLDUQhV22ewa4CRIheyAk4q2EJbAo1kGERExKxAKIkEiuYGa627g8c9Hj9neG5yuE2iMq9Lj/6rhO/bg8ef3GAkn86hTKZtRC+XrC+V/8/OV28LNf0/fvPg+3G71/u0+ff/wW7/P03U84bqdf/PGvpfzw7oDzR5EcVvFLCQCAFoSxDYoHqOcqSUvnBWOIBgDHNSQWVtuiYBre+R/f7e+SVrSAzrvsTnJZmYIcAKQgcSNb6y+bRVoqX0WcrgEQ75PZAta115T2JZkVUZVw4QvU9BjKFpvoeCW6Im3Beu9mJJkVXeCxI0le1Ur0cTD5i/jeEs7bwdUBAKddKvACYGEx9Tb8ossytm/IZYYV50qeSyhbTi8z6cfVHOE+OVW/gFHT5BZAFBdMUNZhIWxWtIA6aEbftb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AACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAMSURBVBhXY0ACDAwAAA4AAXqxuTAAAAAASUVORK5CYII=",Y="/smeditor/assets/frameChrome-2ea8bbf3.png",L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAMSURBVBhXY0ACDAwAAA4AAXqxuTAAAAAASUVORK5CYII=",V="/smeditor/assets/frameChrome-2ea8bbf3.png",T=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-38a763d9.js b/Noteskin-44caf370.js similarity index 98% rename from Noteskin-38a763d9.js rename to Noteskin-44caf370.js index 0214635a..28c1920e 100644 --- a/Noteskin-38a763d9.js +++ b/Noteskin-44caf370.js @@ -1 +1 @@ -import{s as o,b as r,Z as i,H as g,Q as c,L as l,X as B}from"./ChartManager-eb846239.js";import{A as s}from"./AnimatedSprite-b2d4070f.js";import{H as h}from"./HoldBody-c167b8e7.js";const D="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAOLSURBVHhe7ZvLitRAGEY7KuMFbyiiggsviCheVuozCF72vogrV658EffqwmdQV/aAOsioC0FFFG/gBZ32O6FqiLEnJN0hxNR34JB0VZLOn6n6U6nOjIwxxhhjjDHGGGOMMcYYY4wxxhhjjDEDIgvL0WQyWV1PgSzLJmE1J9X486AV/DotFuLnBCD4n7oIK/mHhOPPQvDb5CG5UQ79IhD8D/lCfqFAJBs/DWCzVo7JS5J1GOpFyNOe+CbvyqeSDkD8F2Vq8S/RALZo5ZS8It/KoabDPO1J0v5eeVuO5Xp5Ul6WqcW/GBvAackFeCdpDIcl6XBIkPaey0W5R96Rj2SxAaQW/7jYAMgAH+UFyUWI6RDifSOmkL5D7y3fz0l7BH9P7pT0gGIDSDH+fxrAp7A8IzdJDkDKYLC0LD/Lvl8Eznm7PCIZ3JHSOefvkj84ge8Iy3IDWCv+r/K95Bj/Q/yc+265VVbFX9kAYg9gx8fyVljyuc8Q/Al5NSz5DPSAJg2gGP9r+UrSCH7LPkM8/PEPyP2yKv5aDYAdH8ibYcnnPsN5n5PXwrIYxywNgP1eyiX5Rv6SfWaD3Cd5sjkoq+Ifkx7qQBqkJ3CQeeQYVSk0pqpp+zaRY3DObcF50fP5489jnezR1vfUulXVbQB/wTRiU9lNck8+Ls/K8yUpo45ttMv041Sp/foM8fN4uUvSQ0nPRSmjrtNH0JkaQFN0m4nBMzDj3kx6vl6SMurYZiHsMyS41ZB6ecQ8KmnsRSmjjm3YthM6aQABvovezcCMe3M5A1BGXRy5DxE6AfdkBmjcn4tSRh3bdMZQL7SpSZcNIM4n8CjJ08T9kpRRxzZtDuD6BFOxDFJ5pOTJoihl1LFNZ3TSAMIAjcCYTGI+gUfKGyUpo45t+Kmy74O6pjAy5zGT6dhn8klJyqhjmzpPC60wUwNggNZUdpP0boJ9KMsZgDLq2Ea7TD9Oldqvz8RO8EEyn8DkUlHKqGObzhp/3QbAdswoMUiZR45R9Yeirq3vaTO7cV6MzJlkmcc6o/u2vqdWh6DneCrYU8H+MUhWxZ/Mj0H+OTjhn4P9QkjCL4QQND3Ar4SlFX/+Shipzi+FJvxSKBeAwZJfC08w/jzY0AiGmPbWIk+Hmf8xZGU1YF2EVILPKU81px6/McYYY4wxxhhjjDHGGGOMMcaYQcEbQWHVpAhvwpiEcQNImtHoDycKQp3RP5gyAAAAAElFTkSuQmCC",d="/smeditor/assets/mine-590d445e.png",C=o.from(D),m=o.from(d);class f extends r{hold=new s(i(C,2,1,64,64)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",n=>{if(A==n.columnNumber){const a=new g(m);a.alpha=0,a.anchor.set(.5),a.blendMode=c.ADD,this.addChild(a),l.animate(a,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>a.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2AMCA0EQRNFRVXD/A8fmWv/F6vTuCOGj+CBUMGgAAMDw4p4UKpHiXpsB3HsGfg7g1/+QfL68furfGUiWrnc1MogPfmZgVQsgtZ2Bqmbg1wwq8XA1sf1DAACM3+v8oILv84Pxr97ZPwAAxL2UQyUlNVwzyQ2XfW5//0DV5gevAfx9ftDH8n/wAJUPYeYVqf39AwAA+wfrtVbbzf52fAyf7ADSzwa2IX7vawAAAABJRU5ErkJggg==",E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACAAgMAAADG74f5AAAACVBMVEUAAAAAAACoqKjq2/gjAAAAAXRSTlMAQObYZgAAACRJREFUeNpjGAWDAjBGNSA4TEsdhrfAKBgFo2C0/BgtP0Y6AACvVTE5zX7vswAAAABJRU5ErkJggg==",P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAEhQTFRFAAAA/gAAAAAACgoKCQkJCAgIBwcHBgYGBQUFBAQEAwMDAgICAQEBBQAACQAADg4OCwsLAED/AP8A//8A/wC//6MAAP//qKio3mg4lAAAABh0Uk5TAP//////////////////////////////6dxENgAAAlJJREFUeJzt2NlOwzAQhWHgkn3n/R+vdAPE0kKhYHtk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nXmrp2d+33ntz96K2bZupBM+Pz3/R/lP560savYfa8xyeJr4+r3VYs3OA/OrDy9vrow0PjZ8fn9+//+rdf5r9M3n3t57TquLqe526s299as7e2mTR8+PzX7H/pZxTWcT3B9jPac/i6kudirPvb75etzZtGjw/Pv8V+0+fPvl+AHac02G+Aerb/X4A8fnj+0+fPvEE4AnAOwDvAP6vAA2+BevNvwLUuf96DtU0+BWg3ANwD+AhEryJkjvfBMb7+P7/bwK5C6cHAAAAAAAAAAAAAAAAAAAAAADAl/kFHH4jM43eaVYAAAAASUVORK5CYII=",v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABAAgMAAACvuJfsAAAACVBMVEVlAEsAAAD////TJSq6AAAAAXRSTlMAQObYZgAAACxJREFUSMdjYBgFo2CoAa5VKGABOp+BA1W9Ajp/VMGoAnorIJhoR8EoGGoAAAiuLhkqD4nBAAAAAElFTkSuQmCC",Q="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",U=i(o.from(v),2,1,64,64)[0],R=i(o.from(M),8,1,64,64)[0],I=i(o.from(Q),1,8,64,64),H=i(o.from(P),1,8,64,64),T=i(o.from(p),1,8,64,64),u=o.from(E),V=o.from(w),S={elements:{Left:{Receptor:t=>{let e;const A=new s(U);return A.width=64,A.height=64,A.anchor.set(.5),t.noteskin.on(A,"ghosttap",n=>{n.columnNumber==t.columnNumber&&(l.finish(e),e=l.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),t.noteskin.onUpdate(A,n=>{const a=(n.getVisualBeat()%1+1)%1;A.currentFrame=a<.2?0:1}),A},Tap:t=>{const e=I[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:t=>new f(t.noteskin,t.columnNumber),Fake:{element:"Tap"},Lift:t=>{const e=T[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:t=>{const e=new s(R);return e.anchor.set(.5),e.width=64,e.height=64,t.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":t=>{const e=H[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(u),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new g(o.EMPTY),"Hold Inactive TopCap":()=>new g(o.EMPTY),"Hold Active BottomCap":()=>new B(o.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(V),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new g(o.EMPTY),"Roll Inactive TopCap":()=>new g(o.EMPTY),"Roll Active BottomCap":()=>new B(o.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(t,e){return t.columnName="Left",this.loadElement(t,e)},hideIcons:["Lift"]};export{S as default}; +import{s as o,b as r,Z as i,H as g,Q as c,L as l,X as B}from"./ChartManager-a4938337.js";import{A as s}from"./AnimatedSprite-fe6fab2d.js";import{H as h}from"./HoldBody-7c69d162.js";const D="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAOLSURBVHhe7ZvLitRAGEY7KuMFbyiiggsviCheVuozCF72vogrV658EffqwmdQV/aAOsioC0FFFG/gBZ32O6FqiLEnJN0hxNR34JB0VZLOn6n6U6nOjIwxxhhjjDHGGGOMMcYYY4wxxhhjjDEDIgvL0WQyWV1PgSzLJmE1J9X486AV/DotFuLnBCD4n7oIK/mHhOPPQvDb5CG5UQ79IhD8D/lCfqFAJBs/DWCzVo7JS5J1GOpFyNOe+CbvyqeSDkD8F2Vq8S/RALZo5ZS8It/KoabDPO1J0v5eeVuO5Xp5Ul6WqcW/GBvAackFeCdpDIcl6XBIkPaey0W5R96Rj2SxAaQW/7jYAMgAH+UFyUWI6RDifSOmkL5D7y3fz0l7BH9P7pT0gGIDSDH+fxrAp7A8IzdJDkDKYLC0LD/Lvl8Eznm7PCIZ3JHSOefvkj84ge8Iy3IDWCv+r/K95Bj/Q/yc+265VVbFX9kAYg9gx8fyVljyuc8Q/Al5NSz5DPSAJg2gGP9r+UrSCH7LPkM8/PEPyP2yKv5aDYAdH8ibYcnnPsN5n5PXwrIYxywNgP1eyiX5Rv6SfWaD3Cd5sjkoq+Ifkx7qQBqkJ3CQeeQYVSk0pqpp+zaRY3DObcF50fP5489jnezR1vfUulXVbQB/wTRiU9lNck8+Ls/K8yUpo45ttMv041Sp/foM8fN4uUvSQ0nPRSmjrtNH0JkaQFN0m4nBMzDj3kx6vl6SMurYZiHsMyS41ZB6ecQ8KmnsRSmjjm3YthM6aQABvovezcCMe3M5A1BGXRy5DxE6AfdkBmjcn4tSRh3bdMZQL7SpSZcNIM4n8CjJ08T9kpRRxzZtDuD6BFOxDFJ5pOTJoihl1LFNZ3TSAMIAjcCYTGI+gUfKGyUpo45t+Kmy74O6pjAy5zGT6dhn8klJyqhjmzpPC60wUwNggNZUdpP0boJ9KMsZgDLq2Ea7TD9Oldqvz8RO8EEyn8DkUlHKqGObzhp/3QbAdswoMUiZR45R9Yeirq3vaTO7cV6MzJlkmcc6o/u2vqdWh6DneCrYU8H+MUhWxZ/Mj0H+OTjhn4P9QkjCL4QQND3Ar4SlFX/+Shipzi+FJvxSKBeAwZJfC08w/jzY0AiGmPbWIk+Hmf8xZGU1YF2EVILPKU81px6/McYYY4wxxhhjjDHGGGOMMcaYQcEbQWHVpAhvwpiEcQNImtHoDycKQp3RP5gyAAAAAElFTkSuQmCC",d="/smeditor/assets/mine-590d445e.png",C=o.from(D),m=o.from(d);class f extends r{hold=new s(i(C,2,1,64,64)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",n=>{if(A==n.columnNumber){const a=new g(m);a.alpha=0,a.anchor.set(.5),a.blendMode=c.ADD,this.addChild(a),l.animate(a,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>a.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2AMCA0EQRNFRVXD/A8fmWv/F6vTuCOGj+CBUMGgAAMDw4p4UKpHiXpsB3HsGfg7g1/+QfL68furfGUiWrnc1MogPfmZgVQsgtZ2Bqmbg1wwq8XA1sf1DAACM3+v8oILv84Pxr97ZPwAAxL2UQyUlNVwzyQ2XfW5//0DV5gevAfx9ftDH8n/wAJUPYeYVqf39AwAA+wfrtVbbzf52fAyf7ADSzwa2IX7vawAAAABJRU5ErkJggg==",E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACAAgMAAADG74f5AAAACVBMVEUAAAAAAACoqKjq2/gjAAAAAXRSTlMAQObYZgAAACRJREFUeNpjGAWDAjBGNSA4TEsdhrfAKBgFo2C0/BgtP0Y6AACvVTE5zX7vswAAAABJRU5ErkJggg==",P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAEhQTFRFAAAA/gAAAAAACgoKCQkJCAgIBwcHBgYGBQUFBAQEAwMDAgICAQEBBQAACQAADg4OCwsLAED/AP8A//8A/wC//6MAAP//qKio3mg4lAAAABh0Uk5TAP//////////////////////////////6dxENgAAAlJJREFUeJzt2NlOwzAQhWHgkn3n/R+vdAPE0kKhYHtkepEqynEiR6N/KrUyjb+pJQt75vCgMA4B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P560savYfa8xyeJr4+r3VYs3OA/OrDy9vrow0PjZ8fn9+//+rdf5r9M3n3t57TquLqe526s299as7e2mTR8+PzX7H/pZxTWcT3B9jPac/i6kudirPvb75etzZtGjw/Pv8V+0+fPvl+AHac02G+Aerb/X4A8fnj+0+fPvEE4AnAOwDvAP6vAA2+BevNvwLUuf96DtU0+BWg3ANwD+AhEryJkjvfBMb7+P7/bwK5C6cHAAAAAAAAAAAAAAAAAAAAAADAl/kFHH4jM43eaVYAAAAASUVORK5CYII=",v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABAAgMAAACvuJfsAAAACVBMVEVlAEsAAAD////TJSq6AAAAAXRSTlMAQObYZgAAACxJREFUSMdjYBgFo2CoAa5VKGABOp+BA1W9Ajp/VMGoAnorIJhoR8EoGGoAAAiuLhkqD4nBAAAAAElFTkSuQmCC",Q="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",U=i(o.from(v),2,1,64,64)[0],R=i(o.from(M),8,1,64,64)[0],I=i(o.from(Q),1,8,64,64),H=i(o.from(P),1,8,64,64),T=i(o.from(p),1,8,64,64),u=o.from(E),V=o.from(w),S={elements:{Left:{Receptor:t=>{let e;const A=new s(U);return A.width=64,A.height=64,A.anchor.set(.5),t.noteskin.on(A,"ghosttap",n=>{n.columnNumber==t.columnNumber&&(l.finish(e),e=l.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),t.noteskin.onUpdate(A,n=>{const a=(n.getVisualBeat()%1+1)%1;A.currentFrame=a<.2?0:1}),A},Tap:t=>{const e=I[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:t=>new f(t.noteskin,t.columnNumber),Fake:{element:"Tap"},Lift:t=>{const e=T[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:t=>{const e=new s(R);return e.anchor.set(.5),e.width=64,e.height=64,t.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":t=>{const e=H[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(u),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new g(o.EMPTY),"Hold Inactive TopCap":()=>new g(o.EMPTY),"Hold Active BottomCap":()=>new B(o.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(V),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new g(o.EMPTY),"Roll Inactive TopCap":()=>new g(o.EMPTY),"Roll Active BottomCap":()=>new B(o.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(t,e){return t.columnName="Left",this.loadElement(t,e)},hideIcons:["Lift"]};export{S as default}; diff --git a/Noteskin-42c53605.js b/Noteskin-5b1b2407.js similarity index 99% rename from Noteskin-42c53605.js rename to Noteskin-5b1b2407.js index a05dae4d..ae2bc66f 100644 --- a/Noteskin-42c53605.js +++ b/Noteskin-5b1b2407.js @@ -1 +1 @@ -import{s as o,b as w,w as C,O as B,Z as u,H as l,V as I,J as x,Q as L,L as h,X as T}from"./ChartManager-eb846239.js";import{A as v}from"./AnimatedSprite-b2d4070f.js";import{H as m}from"./HoldBody-c167b8e7.js";const N="/smeditor/assets/tapCenter-103680e8.png",V="/smeditor/assets/tapDownLeft-17ba3b42.png",y="/smeditor/assets/liftCenter-9712ce74.png",E="/smeditor/assets/liftDownLeft-0205bdc8.png",Q="/smeditor/assets/fakeCenter-581c6a3b.png",R="/smeditor/assets/fakeDownLeft-e3208bb3.png",Z="/smeditor/assets/base-29930c78.png",b="/smeditor/assets/overlay-f63a3b18.png",D="/smeditor/assets/underlay-95144bef.png",d={Tap:{DownLeft:o.from(V),Center:o.from(N)},Lift:{DownLeft:o.from(E),Center:o.from(y)},Fake:{DownLeft:o.from(R),Center:o.from(Q)},Mine:{Base:o.from(Z),Overlay:o.from(b),Underlay:o.from(D)}};class s{static downLeftTex;static downLeftContainer=new w;static centerTex;static centerContainer=new w;static mineTex;static mineContainer=new w;static loaded=!1;static async initArrowTex(){this.loaded||(s.downLeftTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.centerTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.mineTex=C.create({width:128*9,height:128,resolution:B.performance.resolution}),this.layoutRow(this.downLeftContainer,d.Tap.DownLeft,0),this.layoutRow(this.downLeftContainer,d.Fake.DownLeft,1),this.layoutRow(this.downLeftContainer,d.Lift.DownLeft,2),this.layoutRow(this.centerContainer,d.Tap.Center,0),this.layoutRow(this.centerContainer,d.Fake.Center,1),this.layoutRow(this.centerContainer,d.Lift.Center,2),this.createMines(this.mineContainer),this.loaded=!0)}static layoutRow(t,a,e){const n=u(a,6,9,128,128);for(let A=0;A<9;A++){const c=new v(n[A]);c.x=A*128,c.y=e*128,t.addChild(c)}}static createMines(t){const a=u(d.Mine.Base,1,9,128,128).map(A=>A[0]),e=u(d.Mine.Overlay,1,9,128,128).map(A=>A[0]),n=u(d.Mine.Underlay,1,9,128,128).map(A=>A[0]);for(let A=0;A<9;A++){const c=new l(n[A]);c.x=A*128+64,c.y=64,c.name="u"+A,c.anchor.set(.5);const p=new l(a[A]);p.x=A*128+64,p.y=64,p.name="b"+A,p.anchor.set(.5);const g=new l(e[A]);g.x=A*128+64,g.y=64,g.name="o"+A,g.anchor.set(.5),t.addChild(c,p,g)}}static setArrowTexTime(t){if(!this.loaded)return;const a=t.chartManager.chartView.getVisualBeat(),e=(a%1+1)%1,n=Math.floor(e*6);this.downLeftContainer.children.forEach(A=>A.currentFrame=n),this.centerContainer.children.forEach(A=>A.currentFrame=n),t.renderer.render(s.downLeftContainer,{renderTexture:s.downLeftTex}),t.renderer.render(s.centerContainer,{renderTexture:s.centerTex}),t.renderer.render(s.mineContainer,{renderTexture:s.mineTex});for(let A=0;A<9;A++)this.mineContainer.getChildByName("u"+A).tint=I(Math.round(255-153*e),0,0),this.mineContainer.getChildByName("b"+A).rotation=80/180*Math.PI*a,this.mineContainer.getChildByName("o"+A).rotation=-40/180*Math.PI*a}static setNoteTex(t,a,e){if(a===void 0)return o.WHITE;if(a.type=="Mine"){const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant);t.texture=new o(this.mineTex.baseTexture,new x(Math.min(8,n)*128,0,128,128))}else{const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant),A=this.getNoteRow(a.type),c=e=="Center"?this.centerTex:this.downLeftTex;t.texture=new o(c.baseTexture,new x(Math.min(8,n)*128,A*128,128,128))}}static getNoteRow(t){switch(t){case"Fake":return 1;case"Lift":return 2;default:return 0}}}const q="/smeditor/assets/centerReceptor-44665c43.png",Y="/smeditor/assets/downLeftReceptor-9be8faae.png",U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGo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Active-59a3b423.png",O="/smeditor/assets/capInactive-efc3b952.png";class f extends l{constructor(t,a=64,e=!1){super(t),this.scale.set(a/this.texture.width),this.anchor.x=.5,e&&(this.rotation=Math.PI),this.texture.on("update",()=>{this.scale.set(a/this.texture.width)})}}const P="/smeditor/assets/flash-5a32532f.png",G="/smeditor/assets/mine-590d445e.png",S={w0:[1,1,1,1],w2:[1,1,.3,1],w3:[0,1,.4,1],w4:[.3,.8,1,1],w5:[.8,0,.6,1],held:[1,1,1,1]},z=o.from(P),X=o.from(G);class F extends w{standard=new l(z);standardAnim;anims=new Set;constructor(t,a){super(),this.standard.blendMode=L.ADD;const e=.5;t.on(this,"hit",n=>{if(a==n.columnNumber){const A=S[n.judgement.id]??[1,1,1,1];this.standard.tint=I(A[0]*255,A[1]*255,A[2]*255),h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12)}}),t.on(this,"held",n=>{a==n.columnNumber&&(this.standard.tint=16777215,h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12))}),t.on(this,"holdon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"holdoff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"rollon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"rolloff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"hitmine",n=>{if(a==n.columnNumber){const A=new l(X);A.alpha=0,A.anchor.set(.5),A.blendMode=L.ADD,this.addChild(A),h.animate(A,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>A.destroy())}}),this.standard.alpha=0,this.standard.anchor.set(.5),this.addChild(this.standard)}}const k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7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Ky2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAShJREFUeNrs3T1OAkEAhuEPHCEEEgq0sDBGK49g4wG8h8fyHh7AxiNYaYyFhVKQQBSy7HqGJYFszPP085OZd+rpNU2TNq7ub96r5XpaxoOc3F5meDpJkmzmq3w+vuTnY5Fe6WdfjkbH6Zd+0kt3NEmzrbP9rdLUzf6WqeqMzqc5u7vOYDZOkqy/lvl+eku12qRMhovXh+eLNnOWHfYxSzIOXdT6Pnd5qpVz7qzqEAHwjwhAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAB0JYDi2DqrHOIy5/GBdFct2g74AwAA//8DANl4L31+t8K2AAAAAElFTkSuQmCC",M="/smeditor/assets/capActive-e83fb138.png",W="/smeditor/assets/capInactive-4622d5f2.png",j=o.from(Y),$=o.from(q),i={hold:{active:{body:o.from(U),cap:o.from(K)},inactive:{body:o.from(H),cap:o.from(O)}},roll:{active:{body:o.from(k),cap:o.from(M)},inactive:{body:o.from(J),cap:o.from(W)}}},_={Center:0,DownLeft:0,UpLeft:90,UpRight:180,DownRight:270},AA=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head"],nA={elements:{DownLeft:{Receptor:r=>{const t=new l(r.columnName=="Center"?$:j);t.width=72,t.height=72,t.anchor.set(.5);let a;return r.noteskin.on(t,"ghosttap",e=>{e.columnNumber==r.columnNumber&&(h.finish(a),a=h.animate(t,{0:{width:54,height:54},1:{width:72,height:72}},.11))}),r.noteskin.onUpdate(t,e=>{const n=e.getVisualBeat();let A=204;(n%1+1)%1>.2&&(A=102),t.tint=I(A,A,A)}),t},Tap:r=>{const t=new l(o.WHITE);return s.setNoteTex(t,r.note,r.columnName),t.anchor.set(.5),t.width=72,t.height=72,t},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:r=>new F(r.noteskin,r.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new m(i.hold.active.body),"Hold Inactive Body":()=>new m(i.hold.inactive.body),"Hold Active TopCap":()=>new f(i.hold.active.cap,64,!0),"Hold Inactive TopCap":()=>new f(i.hold.inactive.cap,64,!0),"Hold Active BottomCap":()=>new T(i.hold.active.cap),"Hold Inactive BottomCap":()=>new T(i.hold.inactive.cap),"Roll Active Head":{element:"Tap"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new m(i.roll.active.body),"Roll Inactive Body":()=>new m(i.roll.inactive.body),"Roll Active TopCap":()=>new f(i.roll.active.cap,64,!0),"Roll Inactive TopCap":()=>new f(i.roll.inactive.cap,64,!0),"Roll Active BottomCap":()=>new T(i.roll.active.cap),"Roll Inactive BottomCap":()=>new T(i.roll.inactive.cap)}},load:function(r,t){const a=r.columnName;r.columnName="DownLeft";const e=this.loadElement(r,t);return AA.includes(r.element)&&(e.rotation=_[a]*Math.PI/180),e},init(){s.initArrowTex()},update(r){s.setArrowTexTime(r.chartManager.app)},hideIcons:["Lift","Fake"]};export{nA as default}; +import{s as o,b as w,w as C,O as B,Z as u,H as l,V as I,J as x,Q as L,L as h,X as T}from"./ChartManager-a4938337.js";import{A as v}from"./AnimatedSprite-fe6fab2d.js";import{H as m}from"./HoldBody-7c69d162.js";const N="/smeditor/assets/tapCenter-103680e8.png",V="/smeditor/assets/tapDownLeft-17ba3b42.png",y="/smeditor/assets/liftCenter-9712ce74.png",E="/smeditor/assets/liftDownLeft-0205bdc8.png",Q="/smeditor/assets/fakeCenter-581c6a3b.png",R="/smeditor/assets/fakeDownLeft-e3208bb3.png",Z="/smeditor/assets/base-29930c78.png",b="/smeditor/assets/overlay-f63a3b18.png",D="/smeditor/assets/underlay-95144bef.png",d={Tap:{DownLeft:o.from(V),Center:o.from(N)},Lift:{DownLeft:o.from(E),Center:o.from(y)},Fake:{DownLeft:o.from(R),Center:o.from(Q)},Mine:{Base:o.from(Z),Overlay:o.from(b),Underlay:o.from(D)}};class s{static downLeftTex;static downLeftContainer=new w;static centerTex;static centerContainer=new w;static mineTex;static mineContainer=new w;static loaded=!1;static async initArrowTex(){this.loaded||(s.downLeftTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.centerTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.mineTex=C.create({width:128*9,height:128,resolution:B.performance.resolution}),this.layoutRow(this.downLeftContainer,d.Tap.DownLeft,0),this.layoutRow(this.downLeftContainer,d.Fake.DownLeft,1),this.layoutRow(this.downLeftContainer,d.Lift.DownLeft,2),this.layoutRow(this.centerContainer,d.Tap.Center,0),this.layoutRow(this.centerContainer,d.Fake.Center,1),this.layoutRow(this.centerContainer,d.Lift.Center,2),this.createMines(this.mineContainer),this.loaded=!0)}static layoutRow(t,a,e){const n=u(a,6,9,128,128);for(let A=0;A<9;A++){const c=new v(n[A]);c.x=A*128,c.y=e*128,t.addChild(c)}}static createMines(t){const a=u(d.Mine.Base,1,9,128,128).map(A=>A[0]),e=u(d.Mine.Overlay,1,9,128,128).map(A=>A[0]),n=u(d.Mine.Underlay,1,9,128,128).map(A=>A[0]);for(let A=0;A<9;A++){const c=new l(n[A]);c.x=A*128+64,c.y=64,c.name="u"+A,c.anchor.set(.5);const p=new l(a[A]);p.x=A*128+64,p.y=64,p.name="b"+A,p.anchor.set(.5);const g=new l(e[A]);g.x=A*128+64,g.y=64,g.name="o"+A,g.anchor.set(.5),t.addChild(c,p,g)}}static setArrowTexTime(t){if(!this.loaded)return;const a=t.chartManager.chartView.getVisualBeat(),e=(a%1+1)%1,n=Math.floor(e*6);this.downLeftContainer.children.forEach(A=>A.currentFrame=n),this.centerContainer.children.forEach(A=>A.currentFrame=n),t.renderer.render(s.downLeftContainer,{renderTexture:s.downLeftTex}),t.renderer.render(s.centerContainer,{renderTexture:s.centerTex}),t.renderer.render(s.mineContainer,{renderTexture:s.mineTex});for(let A=0;A<9;A++)this.mineContainer.getChildByName("u"+A).tint=I(Math.round(255-153*e),0,0),this.mineContainer.getChildByName("b"+A).rotation=80/180*Math.PI*a,this.mineContainer.getChildByName("o"+A).rotation=-40/180*Math.PI*a}static setNoteTex(t,a,e){if(a===void 0)return o.WHITE;if(a.type=="Mine"){const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant);t.texture=new o(this.mineTex.baseTexture,new x(Math.min(8,n)*128,0,128,128))}else{const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant),A=this.getNoteRow(a.type),c=e=="Center"?this.centerTex:this.downLeftTex;t.texture=new o(c.baseTexture,new x(Math.min(8,n)*128,A*128,128,128))}}static getNoteRow(t){switch(t){case"Fake":return 1;case"Lift":return 2;default:return 0}}}const q="/smeditor/assets/centerReceptor-44665c43.png",Y="/smeditor/assets/downLeftReceptor-9be8faae.png",U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQ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zyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAASdJREFUeNrs3TFqAkEYhuEvy8IKgQ2SwjK1l7DxADZe02prGy9hndIiiDYqqOMZVlCW8Dz9DD//vP18lFLSx3w+/z2fz19N02Q6naZt29zv94zH48xms0wmk7xCKSWllHRdl9VqldPplKqqMgS32y1N02S5XGaxWLx0rt1ul81mk/1+n6qqcjwes91uc7lcMhqNDuv1+qfPffUTM3wn+QxD1Ps9n0n1as+DdX1HAPwjAhAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAEMJoLa2warf8Zh/8YH0UB36HngAAAD//wMAIFk3fb/ypPcAAAAASUVORK5CYII=",H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG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zt3tICwaNPQaINGQ5nn28yffeffzNk1T5tjv9z/X6/Wzqqq0bZvdbpckGYYhx+Mx5/M5RVHkWcqyfOr+Sz0ej4zjmLnznHtG0zTpui7b7TZJ0vd9TqdTbrdb6rq+HA6H7zl7bhbc4yvJR1ij2e/5vuCQuzmv1v0VAfCPCEAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAKwlgI2xrdbmFY/5Gx9Ir9Vl7oI/AAAA//8DAOX/Ln1VvXQfAAAAAElFTkSuQmCC",K="/smeditor/assets/capActive-59a3b423.png",O="/smeditor/assets/capInactive-efc3b952.png";class f extends l{constructor(t,a=64,e=!1){super(t),this.scale.set(a/this.texture.width),this.anchor.x=.5,e&&(this.rotation=Math.PI),this.texture.on("update",()=>{this.scale.set(a/this.texture.width)})}}const P="/smeditor/assets/flash-5a32532f.png",G="/smeditor/assets/mine-590d445e.png",S={w0:[1,1,1,1],w2:[1,1,.3,1],w3:[0,1,.4,1],w4:[.3,.8,1,1],w5:[.8,0,.6,1],held:[1,1,1,1]},z=o.from(P),X=o.from(G);class F extends w{standard=new l(z);standardAnim;anims=new Set;constructor(t,a){super(),this.standard.blendMode=L.ADD;const e=.5;t.on(this,"hit",n=>{if(a==n.columnNumber){const A=S[n.judgement.id]??[1,1,1,1];this.standard.tint=I(A[0]*255,A[1]*255,A[2]*255),h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12)}}),t.on(this,"held",n=>{a==n.columnNumber&&(this.standard.tint=16777215,h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12))}),t.on(this,"holdon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"holdoff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"rollon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"rolloff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"hitmine",n=>{if(a==n.columnNumber){const A=new l(X);A.alpha=0,A.anchor.set(.5),A.blendMode=L.ADD,this.addChild(A),h.animate(A,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>A.destroy())}}),this.standard.alpha=0,this.standard.anchor.set(.5),this.addChild(this.standard)}}const k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+z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ABIAAEAACQAB0JYDi2DqrHOIy5/GBdFct2g74AwAA//8DANl4L31+t8K2AAAAAElFTkSuQmCC",M="/smeditor/assets/capActive-e83fb138.png",W="/smeditor/assets/capInactive-4622d5f2.png",j=o.from(Y),$=o.from(q),i={hold:{active:{body:o.from(U),cap:o.from(K)},inactive:{body:o.from(H),cap:o.from(O)}},roll:{active:{body:o.from(k),cap:o.from(M)},inactive:{body:o.from(J),cap:o.from(W)}}},_={Center:0,DownLeft:0,UpLeft:90,UpRight:180,DownRight:270},AA=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head"],nA={elements:{DownLeft:{Receptor:r=>{const t=new l(r.columnName=="Center"?$:j);t.width=72,t.height=72,t.anchor.set(.5);let a;return r.noteskin.on(t,"ghosttap",e=>{e.columnNumber==r.columnNumber&&(h.finish(a),a=h.animate(t,{0:{width:54,height:54},1:{width:72,height:72}},.11))}),r.noteskin.onUpdate(t,e=>{const n=e.getVisualBeat();let A=204;(n%1+1)%1>.2&&(A=102),t.tint=I(A,A,A)}),t},Tap:r=>{const t=new l(o.WHITE);return s.setNoteTex(t,r.note,r.columnName),t.anchor.set(.5),t.width=72,t.height=72,t},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:r=>new F(r.noteskin,r.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new m(i.hold.active.body),"Hold Inactive Body":()=>new m(i.hold.inactive.body),"Hold Active TopCap":()=>new f(i.hold.active.cap,64,!0),"Hold Inactive TopCap":()=>new f(i.hold.inactive.cap,64,!0),"Hold Active BottomCap":()=>new T(i.hold.active.cap),"Hold Inactive BottomCap":()=>new T(i.hold.inactive.cap),"Roll Active Head":{element:"Tap"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new m(i.roll.active.body),"Roll Inactive Body":()=>new m(i.roll.inactive.body),"Roll Active TopCap":()=>new f(i.roll.active.cap,64,!0),"Roll Inactive TopCap":()=>new f(i.roll.inactive.cap,64,!0),"Roll Active BottomCap":()=>new T(i.roll.active.cap),"Roll Inactive BottomCap":()=>new T(i.roll.inactive.cap)}},load:function(r,t){const a=r.columnName;r.columnName="DownLeft";const e=this.loadElement(r,t);return AA.includes(r.element)&&(e.rotation=_[a]*Math.PI/180),e},init(){s.initArrowTex()},update(r){s.setArrowTexTime(r.chartManager.app)},hideIcons:["Lift","Fake"]};export{nA as default}; diff --git a/Noteskin-42298fb1.js b/Noteskin-5d1a05aa.js similarity index 99% rename from Noteskin-42298fb1.js rename to Noteskin-5d1a05aa.js index ca33591b..277e57e5 100644 --- a/Noteskin-42298fb1.js +++ b/Noteskin-5d1a05aa.js @@ -1,4 +1,4 @@ -import{s as B,u as I,v as E,b as v,w as l,O as P,x as w,y as c,z as f,H as r,J as p,Z as F,L as s,Q as y,X as D}from"./ChartManager-eb846239.js";import{A as x}from"./AnimatedSprite-b2d4070f.js";import{H as m}from"./HoldBody-c167b8e7.js";const U="/smeditor/assets/downBodyActive-dd1fd694.png",b="/smeditor/assets/downBodyInactive-c781a303.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+N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wkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",G="/smeditor/assets/leftBodyActive-75d41033.png",R="/smeditor/assets/leftBodyInactive-bbc074cd.png",J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZPvAZjqCQsAfGEBgC8sAPCFBQC+sADAFxYA+MICAF9YAOD7xh74f+evLpcB/+/81XYAhRQgKnwFCQz4ta/w0AIAX1gA4AvPApTgR5/WGvDjrTN4CmrAjwXfWwIDfjz4nhIY8GPC95LAgB8XvocEBnztqaYBX3udIczTQOoDFBOA+gA5gvoA1AcY17VTH2B8TuoDBAPinYv6AIEloD5A8Hs+9QEGBvUBiq0DZB7tUx9AGD7TQOAjAPARAPgIAHwEAD4CjIRPFBEA+MICAF9YAOALCwB8YQGALyxAS/hMAZMJAHxhAYAfI/YV4fccU3jkoz6AMHzv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qzwvREY4ccL3xOBEX7M8L0QGOHHDd8DgRG+9qmmEb72PEOYbwNZH6AYANYHyFGsD8D6AON27awPML4n6wMEC8S7F+sDBEbA+gAJjvmsDyAcfqbnDD8PkHm0z/oAwuFzGkj4ACB8ABA+AAgfAIQPgJHhU0UAEL4wAMIXBkD4wgAIXxgA4QsDaBk+p4DJABC+MADCj1FLxfB7jik8+rE+gHD43oNiI/yY/VgfQDh8zx5G+DHD9+plhB83fI+ellmvdxgVZyyN8HXDXwXgyZ0lVHEAcwsEvSczvGf/qs42vtoDgEAEwbtDQDgE3j/oEOUHJEauDwCCwQiO9FqT1bzyuX4f/7DntnHmBIaHP+8FAALnfh7hbwUAgin+18Fbwt8DIA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",Y="/smeditor/assets/rightBodyActive-07f95372.png",Z="/smeditor/assets/rightBodyInactive-fdefc2a4.png",K="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/H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n4f7X83O9+XNr9v5w+cdv6DPwWiAkzzlaAAyJZDQXEQyuECcsDJmViATmKR+UogAfSAFy5wAH7ADBaww3B0PhbQ03h0PhSUp/GcethVOXjKqVw4QgrEwWj0wLN2Qn0w2gsc+QamFEfDbecTbucTnnY+pp8sjgkNLT+ffpyoPadU5tMFGKDz4ZLysFx1CO5g0eJhudeLFVqtjA+WNecV22OIR4LiyOjmfOiF8cHSm/rkdnsY9mAxAPD8iaAHmPyBoAW4fC/oADZfCxqAz7eC+gKFsBDenyBvUCgBs3wnqADTfCUoALLlUAABpKERFIDFS2DYFTELL60tQXfZ2PzZpTfFdULPs/k1QSsvVy2r+4x0PhZU9xmlK6HcVVHF0HJLd7MbCOkEJ93shiKkwAPaACfQANBeCSwANTcCCYCthcBdsBgav8hEd8Mjb8unGoDI55MFQOXj6Rwg8+kCDND5cAkFdM3spbwW0OdPBeW14/Ii5cHC5t5ze5HzREAANH8kAACePxH0AJM/ELQAl+8FHcDma0ED8PlW8AT4F0zxmObwVcrYAAAAAElFTkSuQmCC",V="/smeditor/assets/upBodyInactive-87a7969e.png",z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAHgAeQB3paCnMQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI5IlF3wK8AAAPCSURBVHja7Z1bbsIwFETNKBtAYoFV11C6iNI1VF0gEjug/YUoRbWxfR8zV+oHH9TG58QhUe6wK6v6PJ1+bl+/vryX2tofrtXvuZxRelXL+BHm2DL+1/fH3eu343F3+xq9Fykr/N7/u+Uzj/hsEHxuCcAM/3KGOQTr8VGMytP5NKIEoQXw+GWKVQIIPrcEEHxuCTBr4pGuob1L0HMtMeMIj3gDxasEvXeIxfM2b32peTmjesz94dptDWacDuyuP4LcZ/Byx45aAOubTJklgOBzSwDB55YAgs8tAQSfWwIIPrcEEHxuCSD43BJA8LklgOBzSwBm+PvDNeWDniE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AAQCEAhAIACBAAQCEAhAIACBAAQCZI8rFT4OHUwsVoAWkC7ta2y2gDNAnXoXWd0DzP7XsQiQTALHrmXHZhi0p+MxkKgiwMqmCxm7l91H1kOdy5oufAN/RwADCSqVt2U/1j1dgmq1jRXO9U+ToGJha5XCjuESVK1qrlTZM0yCyiXt1Uq7uktQvZ9Bxdq+bhI4NLOoWtx5WQKXTiaVq3ubJXBqY1O9vPu0BG49jBzq+2/kyFuAKxKUz49Th48bufEW4IwEtL4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFH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RRF4S7Le5nMayGFBTIpa3HGajzBaKQBDBi56/d+J8NCDa57eO9Vu2zKVo/L/1+czw9ffvPz718b/vL0+PrhsdPp5f1DZY+fdbDc44dfk6Ml7xtAb1SA4PAJEB4+AcLDX3IGSA4zvgIIf+IKIDwVAAQAAUAAEAAEAAFAABAABAABQAAQAAQAAbAbQ50I8t6A9uciDsIfi9broAWES0CAcAkIYBcAAoAAyNwOEiD8XgABgsPfNp8P0D0AM4DwCSD8fhyFaBsofAIInwDCNwPMHv5PX0EjT/guwCEU28B4CdwHCJeAAOESECBcAgKES0CAcAkIEC4BAcIlIEC4BAQIl8CnhYdLsFwFIIEWQIIEAb4LmQS3cVz5L/zp8fWusBLOCxxWDf/eEFMOi0RsA1tJQ4BF2kYSUW8N+24mSDxjGHcn0O4gXAASEIAEBCDB0gKcTi8kSBXgX/gkCBTgfegkMAP8SIKajCrBUgKczw8kSK8AJNACtAMC2CISgAQEmEECArShkEAFIIEWQAIzAAkMgSQgAAkIQAICdJZgBHkI0EmCUSoHATpIMFLb8D+DPkpwuSbBZy8zzz4TqAAVKgEBSEAAEhBg96m4Q39dXoKhKsBXAXccrpaWYLgWcC3oASbrZSUoFa/9Zjt16zZqD64EU2o8p1bP7RPRypIVwGDYLvwlBWhQlptJUDv8pi1g9lJ5azuYrWWXyr9wMwkah99DgjLNRVtL0Cn8lhKU6S7cSoLO4beQoGyzXry2BIOE7z5ADwmEP6cANcul8CdatIvwswXYUwLhT7x4F+EDAAAAAAAAAAAAAAAAAAAAwD38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoC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QLgHwBkC8A8gVAvgDIF8BUieQnnQA9H9ogf5FLQI+HNsj/nVAPhhy5QZP8YvcByBcA+dUDIL9wAFHk/2UdE+lhlEb+2AiiPYnUyB8XQcTH0I48SfvlN3rvoh0gfx95PL8c2xZ9AmxXCLLgS3oJGBLBLPkZ9w72OmF75mOZdGnbVjppoyPoPfaHRTBS/pQTt+AxDItgtPxRJ29PIL97BDPkWzEHiWCWfAEEiGCmfAHEvLQNdSKAWBEM9yGAOBFMcSGAGBHwAAAAAAAAAAAAAAAAAAAAAOBGPgB2WwC5W8OZ7AAAAABJRU5ErkJggg==",o0="/smeditor/assets/bodyActive-889762ad.png",g0="/smeditor/assets/bodyInactive-5d99335a.png",a0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+AMCwUON+iUkUgAAAcOSURBVHja7Z1/iBVVFMfvXadIWKiEhSRJMtTWcKEf9sO31mI/iKL8QVEUCFKwJVmozwgKIiiIfLpuhrVQCEJRFK4VSfRDKn+U2Q9YiSzJMAyDBStYMKp90z++f173zdyZc+6Ze+85X9h/xJ1zZuZ+PjNv3tt3tHKUxoYNafu/ranvA22zS42C+2qqZZXXyMtQo/a/f6uvX69dnKdEESZV1Sdlsp+20VT0PwKkP0Eg819LMilrdcowkQUSoZ+3BTQF/auB9J+JQOTfBYmsomZ7thBYgMQATQ9WepNJzUoNYKJ/FZD+qQgknipJYpW1W9nq2AKJ0M/bAtol/YNA+rsRCJwAEuhDDyMOLZAI/bwtoF3Rfx+Q/nMQyPsDSJ5PvbziyALODMDtdX+ozwW0C/pXAumfhkDcSQviWnWK/F/XPWVlmwMLODFAaNfdpoc9BWEAE/0rgPT3IJA2bkFae50yv+Oqt6xsR7YAugFCvfanHvfmpQFM9N8LpP88BMJ+syCsUx3I72L3mJVXES2QCP28LaCx6L8bSP/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/Ez8/501/Or8cv/SpKSk/ldXWFj+uGb/WP5Y/Vn9/6RD/vb+gP/Xq6ur/2JiZGT+vXL/ZP5k/WX9/6pPjP/bsbGx/25ucHD+w37/cP5w/XH9/7BbmP/et7e3/Xl5eXn9x4b/ef15/Hr8/7NjoP/hu7u7hYX/zZT/hf+F/ob+/7pxrv/lwsLC/Y+dj4/90Zz/j/2P/JD8/755tv/oxMjE/5iqmZn/16j/mf+Z/pr+/8SFwv/syc/J/6CzoqD+267/oP6i/qD8/8mLyP/vytTK2fi5aQAAAOV0Uk5T////AP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////xt8+5oAAAYhSURBVHic7Zt3bBxFFIefHSGEEL33hN5DTyWQgtMIaYReHHrvvYbeO4RO6DgNcBqkk0o66aST0EQXchxzHMbA2/fN3l12LXHDH4d0u9LNT59uz37zefe8I70pkf94lHidXxJ+zrJOGuRwrWyQw2nZMIdTslEO18jG8NpgLP3nJ9qxaTBWyyY551fJZp71R45EgNf5JbI5XBWMdbIFbBOolS3h6mBMy1bwumBMydZwDeM28PfBGBWwLZzit27nWX/k8BWwPfxDMNbJDvCPwVgrO8I/BWNadoJ/DsaU7Az/Eow1sgu8JhijAnaFfw3GKtnNs/7I4SNAXw3hL0WCYhvBX4lOX2R3+GvR6YvsAX8j9lfcE/5W7CrYC14qOn3JEaBX0d7wd2JX3T6e9cdOKN/z9bUvvEys2P3g5WIC9odXiAk4AF4pJuBAeJWYgIPgeRIv4GB4tZiAxp71x04o3/P1dQg8X6zYQ+EFYgIOgxeKCTgcXiQm4Ah4sZiAI+HpEi/gKHiJmIAmnvXHTijf8/XVFJ4hVmwzeKaYgObwLDEBLeDZYgJawnPEBBwNT5B4Aa3guWICjvGsP3ZC+Z1vnzgWnkipreFJwfRF2sCTg+mLtIWn8D3eDp7K/4Hj4JHB9LMF2P+RMnga/3fae9YfOXwFdIBHUWpHeDQCOsFjENA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7lfuPP+yi4uL/wAAAQH/ihr0Af8B4R/h4n8A6UPpJf+mgICA/w0NDQ3/kCX2Df8N5Cjk74UA7E7sMf+shoaG/ygoKSn/oDv8Kf8p7jru/I8V82XzT/+8lJSU/zk5OTn/qkj/Of859UP1/5Ul+HH4YP/GnJyc/UpKS0v9sVj/S/1L/Ez8/501/X39cv/SpKSk/ldXWFj+uGb/WP5Y/Vn9/6RD/pL+gP/Xq6ur/2JiZGT+vXL/ZP5k/WX9/6pP/qP+jP/bsbGx/25ucHD+w37/cP5w/XH9/7Bb/rL+mP/et7e3/Xl5eXn9x4b/ef15/Hr8/7Nj/r7+oP/hu7u7hYX/zZT/hf+F/ob+/7px/8r/rv/lwsLC/Y+dj4/90Zz/j/2P/JD8/755/tX+tv/oxMjE/5iqmZn/16j/mf+Z/pr+/8SF/93/wv/syc/J/6CzoqD+267/oP6i/qD8/8mL/+L+yP/vytTKfd22ZwAAAPV0Uk5T////AP////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////90oRikAAAGVUlEQVR4nO2bd4xUVRSHz0qMMcbYe8Ne6Ci9g3TsvYO9914XCyr23qUjHelIRzrSkY50pOOwDMu6rqs573z3zQ4zJs71jzWZd5N3f/nIm9lzP2Z2303OzZH/OHK87s8JX2dZLGWSuEj2T+JCOSCJC+TAJM6Xg5I4LgcncZ4cksQxOcyz/pQRCfC6P0cOh2PBXCxHwLuCuUiOhPOCuVCOgncHc4EcDceDOV+Ogffwr8fC+bzLcfBefurxnvWnDF8BJ8CbgrlYToQ3B3ORnARvCeZCORneGswFcgq8LZjzpSy8PZjjciq8I5jz5DR4ZzDH5HTP+lOGjwC9zoBXiS5f5Ex4tejyRc6C14guX+RseK3o8kXOgdeJ/S+fC68X+1ScB28Q+xSVgzeKferKe9afdkGZ3q9XBXiRmICK8GIxAZXgJWICKsNLxQRUgZeJCagKLxcTcD68QkzABfBKMQHVPOtP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qAb3E5MQHdYW1pVQA9YO0xVQE9YO0xVwHewdpiqgF6wdpiqgN6wdpiqgD6e9addUKb369UX1qZmFdAP1qZmFdAf1qZmFTAA1h5jFTAQ1h5jFfA9rD3GKmAQrD3GKmAwrD3GKmCIZ/1pF5Tp/XoNhbWtXQUMg7WtXQUMh7WtXQWMgLXLXAWMhLXLXAX8AGuXuQoYBWuXuQoYDWuXuQoY41l/2gVldr+9YizclM3QOLgZm6HxcHM2QxPgFmyGJsIt2Qz9CLdiMzQJbs1maDLchs3QFM/6U4avgKlwXQRMg+shYDpcHwEz4AYImAk3RMBPcCMEzIIbI2A23AQBczzrTxm+Av6CyyBgLlwNAfPg6giYD9dAwAK4JgIWwrUQ8DNcGwGL4DoIWOxZf8rwFbAELoeApXB5BCyDKyBgOVwRASvgSghYCVdGwC9wFQSsgqsiYLVn/SnDdzO0hixLriXdgch1pDswuZ50Byo3kO7A5UbSHcj8lXQnRDeR7gTpZrLUBGwh3ZHXraQ7EruNdEdmt5PuSO0O0h253Um6I7m/ke6McIw8lNxFlpoA97rE7wIbf5Lu8PQfpDs8/TvpDk/vJd3h6T2kOzy9m3SHp93CS+3w9P9NwN85VJDW1dBaWwAAAABJRU5ErkJggg==",u=`precision mediump float; +import{s as B,u as I,v as E,b as v,w as l,O as P,x as w,y as c,z as f,H as r,J as p,Z as F,L as s,Q as y,X as D}from"./ChartManager-a4938337.js";import{A as x}from"./AnimatedSprite-fe6fab2d.js";import{H as m}from"./HoldBody-7c69d162.js";const U="/smeditor/assets/downBodyActive-dd1fd694.png",b="/smeditor/assets/downBodyInactive-c781a303.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3W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Lp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",G="/smeditor/assets/leftBodyActive-75d41033.png",R="/smeditor/assets/leftBodyInactive-bbc074cd.png",J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZPvAZjqCQsAfGEBgC8sAPCFBQC+sADAFxYA+MICAF9YAOD7xh74f+evLpcB/+/81XYAh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DMfh1Hl/cA9QtJL9ieH9ieH9ieHygAsuVQAAGk4eyBJwZgb0gIJIB+QScPnRWP8/XP76Vx9thfGKseaKyfX1x8UJE8+BhHyicqdT4UTJ4pxSH24Vf5bDl4XFc+/usBbYATaABorwQWgJobwba/QG3xEFs38FSzyUVtXqGTxTYft32HTucbneQGJroAb/WyW7joEgroN7ENBRBANtHNBAzAthGOBAhAN1JOBAQw2UqKFwPAbDsvXV7tvJ7svxZ7rtud17P931ZQbn4f7X83O9+XNr9v5w+cdv6DPwWiAkzzlaAAyJZDQXEQyuECcsDJmViATmKR+UogAfSAFy5wAH7ADBaww3B0PhbQ03h0PhSUp/GcethVOXjKqVw4QgrEwWj0wLN2Qn0w2gsc+QamFEfDbecTbucTnnY+pp8sjgkNLT+ffpyoPadU5tMFGKDz4ZLysFx1CO5g0eJhudeLFVqtjA+WNecV22OIR4LiyOjmfOiF8cHSm/rkdnsY9mAxAPD8iaAHmPyBoAW4fC/oADZfCxqAz7eC+gKFsBDenyBvUCgBs3wnqADTfCUoALLlUAABpKERFIDFS2DYFTELL60tQXfZ2PzZpTfFdULPs/k1QSsvVy2r+4x0PhZU9xmlK6HcVVHF0HJLd7MbCOkEJ93shiKkwAPaACfQANBeCSwANTcCCYCthcBdsBgav8hEd8Mjb8unGoDI55MFQOXj6Rwg8+kCDND5cAkFdM3spbwW0OdPBeW14/Ii5cHC5t5ze5HzREAANH8kAACePxH0AJM/ELQAl+8FHcDma0ED8PlW8AT4F0zxmObwVcrYAAAAAElFTkSuQmCC",V="/smeditor/assets/upBodyInactive-87a7969e.png",z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAHgAeQB3paCnMQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI5IlF3wK8AAAPCSURBVHja7Z1bbsIwFETNKBtAYoFV11C6iNI1VF0gEjug/YUoRbWxfR8zV+oHH9TG58QhUe6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z4Y+agSNWAov+AA8St49egTokdx8pQW9Jj5kzLBr8P0vt/dc6LMP7dne6unU7KPkUEAn+o70/ykowOr6tC9i2ee/b/xP+5bqFR7O701a1Z8qnopg7YuafvdMfdPcdOp+KMOgI8CtJcCafWj3oSPArSHA2n1o56IjwM0vQkk+tGnRk+BklaM2nVgx6FvzAESafmj1o4MfK59Ew6Fvn5csRfph8ajEwZ/gh8qmFgwZ+gHxq0aCBHySfB7O47HYwfAUgCgQCIACBAAQCEAhAIACBAAQCEAhAIACBAAQCZI8rFT4OHUwsVoAWkC7ta2y2gDNAnXoXWd0DzP7XsQiQTALHrmXHZhi0p+MxkKgiwMqmCxm7l91H1kOdy5oufAN/RwADCSqVt2U/1j1dgmq1jRXO9U+ToGJha5XCjuESVK1qrlTZM0yCyiXt1Uq7uktQvZ9Bxdq+bhI4NLOoWtx5WQKXTiaVq3ubJXBqY1O9vPu0BG49jBzq+2/kyFuAKxKUz49Th48bufEW4IwEtL4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAA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D38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgT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90f3/5gr++L7Zv/Kn5+f/y4uLy//pED9L/8v8D7w/ZEb99T3Vf/Al5eX/xcXFxf/li34F/8X5y/n+IkD7sHuPP+yi4uL/wAAAQH/ihr0Af8B4R/h4n8A6K/oJf+mgICA/w0NDQ3/kCX2Df8N5Cjk74UA67nrMf+shoaG/ygoKSn/oDv8Kf8p7jru/I8V9c/1T/+8lJSU/zk5OTn/qkj/Of859UP1/5Ul+tz6YP/GnJyc/UpKS0v9sVj/S/1L/Ez8/501/Or8cv/SpKSk/ldXWFj+uGb/WP5Y/Vn9/6RD/vb+gP/Xq6ur/2JiZGT+vXL/ZP5k/WX9/6pPjP/bsbGx/25ucHD+w37/cP5w/XH9/7BbmP/et7e3/Xl5eXn9x4b/ef15/Hr8/7NjoP/hu7u7hYX/zZT/hf+F/ob+/7pxrv/lwsLC/Y+dj4/90Zz/j/2P/JD8/755tv/oxMjE/5iqmZn/16j/mf+Z/pr+/8SFwv/syc/J/6CzoqD+267/oP6i/qD8/8mLyP/vytTK2fi5aQAAAOV0Uk5T////AP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////xt8+5oAAAYhSURBVHic7Zt3bBxFFIefHSGEEL33hN5DTyWQgtMIaYReHHrvvYbeO4RO6DgNcBqkk0o66aST0EQXchxzHMbA2/fN3l12LXHDH4d0u9LNT59uz37zefe8I70pkf94lHidXxJ+zrJOGuRwrWyQw2nZMIdTslEO18jG8NpgLP3nJ9qxaTBWyyY551fJZp71R45EgNf5JbI5XBWMdbIFbBOolS3h6mBMy1bwumBMydZwDeM28PfBGBWwLZzit27nWX/k8BWwPfxDMNbJDvCPwVgrO8I/BWNadoJ/DsaU7Az/Eow1sgu8JhijAnaFfw3GKtnNs/7I4SNAXw3hL0WCYhvBX4lOX2R3+GvR6YvsAX8j9lfcE/5W7CrYC14qOn3JEaBX0d7wd2JX3T6e9cdOKN/z9bUvvEys2P3g5WIC9odXiAk4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jvr6+/3FxcnL+xID/cv5y/XP9/7Fd/rX+mv/fuLi4/2dnaGj+v3b/aP5o/Wn9/6xT/qj+kP/cs7Oz/VxcXl78umr/Xvxe+1/7/6ZH/Zz9hP/Yra2t/U5OT0/9s1z/T/1P/FD8/585/YP9dv/Upqam/z8/Pz//rU7/P/8/90f3/5gr+Xf5Zv/Kn5+f/y4uLy//pED9L/8v8D7w/ZEb9Wv1Vf/Al5eX/xcXFxf/li34F/8X5y/n+IkD7lfuPP+yi4uL/wAAAQH/ihr0Af8B4R/h4n8A6UPpJf+mgICA/w0NDQ3/kCX2Df8N5Cjk74UA7E7sMf+shoaG/ygoKSn/oDv8Kf8p7jru/I8V82XzT/+8lJSU/zk5OTn/qkj/Of859UP1/5Ul+HH4YP/GnJyc/UpKS0v9sVj/S/1L/Ez8/501/X39cv/SpKSk/ldXWFj+uGb/WP5Y/Vn9/6RD/pL+gP/Xq6ur/2JiZGT+vXL/ZP5k/WX9/6pP/qP+jP/bsbGx/25ucHD+w37/cP5w/XH9/7Bb/rL+mP/et7e3/Xl5eXn9x4b/ef15/Hr8/7Nj/r7+oP/hu7u7hYX/zZT/hf+F/ob+/7px/8r/rv/lwsLC/Y+dj4/90Zz/j/2P/JD8/755/tX+tv/oxMjE/5iqmZn/16j/mf+Z/pr+/8SF/93/wv/syc/J/6CzoqD+267/oP6i/qD8/8mL/+L+yP/vytTKfd22ZwAAAPV0Uk5T////AP////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////90oRikAAAGVUlEQVR4nO2bd4xUVRSHz0qMMcbYe8Ne6Ci9g3TsvYO9914XCyr23qUjHelIRzrSkY50pOOwDMu6rqs573z3zQ4zJs71jzWZd5N3f/nIm9lzP2Z2303OzZH/OHK87s8JX2dZLGWSuEj2T+JCOSCJC+TAJM6Xg5I4LgcncZ4cksQxOcyz/pQRCfC6P0cOh2PBXCxHwLuCuUiOhPOCu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UCSAjASQWScg2gwxZ70A19xkH8nisPnJPrJFYXOUfaQLw+YpE1cQNleZuHx5G84N5njYDWbi8sJuMRMXC7vJSk2Aa2+zdrbisP3N2tmKwvY4a2crDNvnrLusIGyvs+6yfPkEtu6yuHwKW3dZnnwGW3dZTD73rD9l+G6GvoC1oVEfhb6EtaFRH4W+grWhUR+Fvoa1v1Afhb6Btb9QH4W+hbW/UB+FOsHaX6iPQp1h7S/UR6EunvWnXVCm9+vVFW4rJqAb3E5MQHdYW1pVQA9YO0xVQE9YO0xVwHewdpiqgF6wdpiqgN6wdpiqgD6e9addUKb369UX1qZmFdAP1qZmFdAf1qZmFTAA1h5jFTAQ1h5jFfA9rD3GKmAQrD3GKmAwrD3GKmCIZ/1pF5Tp/XoNhbWtXQUMg7WtXQUMh7WtXQWMgLXLXAWMhLXLXAX8AGuXuQoYBWuXuQoYDWuXuQoY41l/2gVldr+9YizclM3QOLgZm6HxcHM2QxPgFmyGJsIt2Qz9CLdiMzQJbs1maDLchs3QFM/6U4avgKlwXQRMg+shYDpcHwEz4AYImAk3RMBPcCMEzIIbI2A23AQBczzrTxm+Av6CyyBgLlwNAfPg6giYD9dAwAK4JgIWwrUQ8DNcGwGL4DoIWOxZf8rwFbAELoeApXB5BCyDKyBgOVwRASvgSghYCVdGwC9wFQSsgqsiYLVn/SnDdzO0hixLriXdgch1pDswuZ50Byo3kO7A5UbSHcj8lXQnRDeR7gTpZrLUBGwh3ZHXraQ7EruNdEdmt5PuSO0O0h253Um6I7m/ke6McIw8lNxFlpoA97rE7wIbf5Lu8PQfpDs8/TvpDk/vJd3h6T2kOzy9m3SHp93CS+3w9P9NwN85VJDW1dBaWwAAAABJRU5ErkJggg==",u=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-ff479165.js b/Noteskin-63e31f76.js similarity index 98% rename from Noteskin-ff479165.js rename to Noteskin-63e31f76.js index 294c9fbc..dc52f3ce 100644 --- a/Noteskin-ff479165.js +++ b/Noteskin-63e31f76.js @@ -1,4 +1,4 @@ -import{s,u as v,v as w,b as h,w as x,O as B,x as u,y as D,z as b,H as r,L as l,P as A,Q as H,Z as T,X as d}from"./ChartManager-eb846239.js";import{A as C}from"./AnimatedSprite-b2d4070f.js";import{H as m}from"./HoldBody-c167b8e7.js";const I="/smeditor/assets/0-c5249fef.png",U="/smeditor/assets/1-0e354907.png",M="/smeditor/assets/2-ce5f7b2f.png",P="/smeditor/assets/3-648105cf.png",y="/smeditor/assets/4-da345826.png",F="/smeditor/assets/5-f6bb9779.png",O="/smeditor/assets/6-12d00670.png",Y="/smeditor/assets/7-00801dd0.png",G="/smeditor/assets/8-9a73d4f3.png",Q="/smeditor/assets/0-0543793c.png",z="/smeditor/assets/1-84dd19f7.png",L="/smeditor/assets/2-3b873573.png",_="/smeditor/assets/3-e5952ffa.png",N="/smeditor/assets/4-1f9a4a43.png",E="/smeditor/assets/5-b9acdc27.png",j="/smeditor/assets/6-565a7261.png",W="/smeditor/assets/7-dd1c0ecf.png",R="/smeditor/assets/8-94163432.png",X="/smeditor/assets/frame-d599a2fe.png",S="/smeditor/assets/parts-b37af2cf.png",k=`precision mediump float; +import{s,u as v,v as w,b as h,w as x,O as B,x as u,y as D,z as b,H as r,L as l,P as A,Q as H,Z as T,X as d}from"./ChartManager-a4938337.js";import{A as C}from"./AnimatedSprite-fe6fab2d.js";import{H as m}from"./HoldBody-7c69d162.js";const I="/smeditor/assets/0-c5249fef.png",U="/smeditor/assets/1-0e354907.png",M="/smeditor/assets/2-ce5f7b2f.png",P="/smeditor/assets/3-648105cf.png",y="/smeditor/assets/4-da345826.png",F="/smeditor/assets/5-f6bb9779.png",O="/smeditor/assets/6-12d00670.png",Y="/smeditor/assets/7-00801dd0.png",G="/smeditor/assets/8-9a73d4f3.png",Q="/smeditor/assets/0-0543793c.png",z="/smeditor/assets/1-84dd19f7.png",L="/smeditor/assets/2-3b873573.png",_="/smeditor/assets/3-e5952ffa.png",N="/smeditor/assets/4-1f9a4a43.png",E="/smeditor/assets/5-b9acdc27.png",j="/smeditor/assets/6-565a7261.png",W="/smeditor/assets/7-dd1c0ecf.png",R="/smeditor/assets/8-94163432.png",X="/smeditor/assets/frame-d599a2fe.png",S="/smeditor/assets/parts-b37af2cf.png",k=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-803fa9d7.js b/Noteskin-657b4cb0.js similarity index 97% rename from Noteskin-803fa9d7.js rename to Noteskin-657b4cb0.js index 6a820a91..7361ac31 100644 --- a/Noteskin-803fa9d7.js +++ b/Noteskin-657b4cb0.js @@ -1 +1 @@ -import{Z as d,s as i,b as f,w as u,O as T,J as g,H as l,Q as m,L as p,_ as R}from"./ChartManager-eb846239.js";import{A as w}from"./AnimatedSprite-b2d4070f.js";import{A as U}from"./HoldBody-c167b8e7.js";const L="/smeditor/assets/Center-1b6bfec9.png",B="/smeditor/assets/DownLeft-242c6bf3.png",y="/smeditor/assets/DownRight-a869fa38.png",M="/smeditor/assets/UpLeft-d457a441.png",O="/smeditor/assets/UpRight-fda6b516.png",I="/smeditor/assets/Center-cb4b6c25.png",E="/smeditor/assets/DownLeft-94341616.png",S="/smeditor/assets/DownRight-3c57e4fa.png",F="/smeditor/assets/UpLeft-752b6821.png",$="/smeditor/assets/UpRight-91e454bc.png",N="/smeditor/assets/Center-55e9b68a.png",P="/smeditor/assets/DownLeft-19d91486.png",V="/smeditor/assets/DownRight-e2cf2b7d.png",j="/smeditor/assets/UpLeft-28515625.png",k="/smeditor/assets/UpRight-8a892589.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":j,"./roll/UpRight.png":k})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const Y=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(Y),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-0a59df78.png",J="/smeditor/assets/flash-e524b5bd.png",z="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-feed8aa6.png",Z=d(i.from(J),5,1,128,128)[0],q=i.from(z),C=d(i.from(Q),5,2,96,96),G=["w0","w1","w2","w3"];class K extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(Z),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!G.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(q);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const H=(r.getVisualBeat()%1+1)%1;s.alpha=(1-H)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new K(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new U(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new R(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; +import{Z as d,s as i,b as f,w as u,O as T,J as g,H as l,Q as m,L as p,_ as R}from"./ChartManager-a4938337.js";import{A as w}from"./AnimatedSprite-fe6fab2d.js";import{A as U}from"./HoldBody-7c69d162.js";const L="/smeditor/assets/Center-1b6bfec9.png",B="/smeditor/assets/DownLeft-242c6bf3.png",y="/smeditor/assets/DownRight-a869fa38.png",M="/smeditor/assets/UpLeft-d457a441.png",O="/smeditor/assets/UpRight-fda6b516.png",I="/smeditor/assets/Center-cb4b6c25.png",E="/smeditor/assets/DownLeft-94341616.png",S="/smeditor/assets/DownRight-3c57e4fa.png",F="/smeditor/assets/UpLeft-752b6821.png",$="/smeditor/assets/UpRight-91e454bc.png",N="/smeditor/assets/Center-55e9b68a.png",P="/smeditor/assets/DownLeft-19d91486.png",V="/smeditor/assets/DownRight-e2cf2b7d.png",j="/smeditor/assets/UpLeft-28515625.png",k="/smeditor/assets/UpRight-8a892589.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":j,"./roll/UpRight.png":k})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const Y=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(Y),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-0a59df78.png",J="/smeditor/assets/flash-e524b5bd.png",z="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-feed8aa6.png",Z=d(i.from(J),5,1,128,128)[0],q=i.from(z),C=d(i.from(Q),5,2,96,96),G=["w0","w1","w2","w3"];class K extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(Z),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!G.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(q);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const H=(r.getVisualBeat()%1+1)%1;s.alpha=(1-H)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new K(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new U(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new R(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; diff --git a/Noteskin-5725b491.js b/Noteskin-69c5b4b7.js similarity index 99% rename from Noteskin-5725b491.js rename to Noteskin-69c5b4b7.js index 464c1589..9d74de3b 100644 --- a/Noteskin-5725b491.js +++ b/Noteskin-69c5b4b7.js @@ -1,4 +1,4 @@ -import{s as a,Z as T,u as B,v as N,b as p,w as f,O as u,x as y,y as V,z as E,H as r,J as Q,V as x,L as c,Q as w,X as h,Y as L}from"./ChartManager-eb846239.js";import{A as C}from"./AnimatedSprite-b2d4070f.js";import{H as m}from"./HoldBody-c167b8e7.js";const H="/smeditor/assets/frame-d599a2fe.png",P="/smeditor/assets/parts-b37af2cf.png",b=`precision mediump float; +import{s as a,Z as T,u as B,v as N,b as p,w as f,O as u,x as y,y as V,z as E,H as r,J as Q,V as x,L as c,Q as w,X as h,Y as L}from"./ChartManager-a4938337.js";import{A as C}from"./AnimatedSprite-fe6fab2d.js";import{H as m}from"./HoldBody-7c69d162.js";const H="/smeditor/assets/frame-d599a2fe.png",P="/smeditor/assets/parts-b37af2cf.png",b=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-f717025c.js b/Noteskin-7e011e81.js similarity index 99% rename from Noteskin-f717025c.js rename to Noteskin-7e011e81.js index 0a740ff8..2321d867 100644 --- a/Noteskin-f717025c.js +++ b/Noteskin-7e011e81.js @@ -1,4 +1,4 @@ -import{s as e,u as D,v as H,b as l,w as E,O as f,x as Q,y as I,z as c,H as a,J,Z as d,L as s,Q as h,X as v}from"./ChartManager-eb846239.js";import{A as F}from"./AnimatedSprite-b2d4070f.js";import{H as P}from"./HoldBody-c167b8e7.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",Y="/smeditor/assets/downBodyInactive-c781a303.png",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU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8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",b="/smeditor/assets/leftBodyActive-75d41033.png",z="/smeditor/assets/leftBodyInactive-bbc074cd.png",x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZPvAZjqCQsAfGEBgC8sAPCFBQC+sADAFxYA+MICAF9YAOD7xh74f+evLpcB/+/81XYAhRQgKnwFCQz4ta/w0AIAX1gA4AvP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P756v73T6efzTfP9gmTrV5XxbvTEyhd8r4FFlPZ98zYat8skHwI4NnDH8EWB69rRRbyDzJ98TQe9eNuKNVNjteyDw6DH3OgvwqAjH/Gij/q1nATYlrSgDvizP+aoWws8VWNoxAKd6ACB8ABA+AAgfAIQPAMIHAOEDgPABQPhjayH89/2r4zLCf9+/2hVAIQFEDV8BgRF+7U94aACELwyA8IXPApTCj35aa4Qfb57BE6gRfqzwvREY4ccL3xOBEX7M8L0QGOHHDd8DgRG+9qmmEb72PEOYbwNZH6AYANYHyFGsD8D6AON27awPML4n6wMEC8S7F+sDBEbA+gAJjvmsDyAcfqbnDD8PkHm0z/oAwuFzGkj4ACB8ABA+AAgfAIQPgJHhU0UAEL4wAMIXBkD4wgAIXxgA4QsDaBk+p4DJABC+MADCj1FLxfB7jik8+rE+gHD43oNiI/yY/VgfQDh8zx5G+DHD9+plhB83fI+ellmvdxgVZyyN8HXDXwXgyZ0lVHEAcwsEvSczvGf/qs42vtoDgEAEwbtDQDgE3j/oEOUHJEauDwCCwQiO9FqT1bzyuX4f/7DntnHmBIaHP+8FAALnfh7hbwUAgin+18Fbwt8DIA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",y="/smeditor/assets/rightBodyActive-07f95372.png",R="/smeditor/assets/rightBodyInactive-fdefc2a4.png",X="data:image/png;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AsuVQAAGk4eyBJwZgb0gIJIB+QScPnRWP8/XP76Vx9thfGKseaKyfX1x8UJE8+BhHyicqdT4UTJ4pxSH24Vf5bDl4XFc+/usBbYATaABorwQWgJobwba/QG3xEFs38FSzyUVtXqGTxTYft32HTucbneQGJroAb/WyW7joEgroN7ENBRBANtHNBAzAthGOBAhAN1JOBAQw2UqKFwPAbDsvXV7tvJ7svxZ7rtud17P931ZQbn4f7X83O9+XNr9v5w+cdv6DPwWiAkzzlaAAyJZDQXEQyuECcsDJmViATmKR+UogAfSAFy5wAH7ADBaww3B0PhbQ03h0PhSUp/GcethVOXjKqVw4QgrEwWj0wLN2Qn0w2gsc+QamFEfDbecTbucTnnY+pp8sjgkNLT+ffpyoPadU5tMFGKDz4ZLysFx1CO5g0eJhudeLFVqtjA+WNecV22OIR4LiyOjmfOiF8cHSm/rkdnsY9mAxAPD8iaAHmPyBoAW4fC/oADZfCxqAz7eC+gKFsBDenyBvUCgBs3wnqADTfCUoALLlUAABpKERFIDFS2DYFTELL60tQXfZ2PzZpTfFdULPs/k1QSsvVy2r+4x0PhZU9xmlK6HcVVHF0HJLd7MbCOkEJ93shiKkwAPaACfQANBeCSwANTcCCYCthcBdsBgav8hEd8Mjb8unGoDI55MFQOXj6Rwg8+kCDND5cAkFdM3spbwW0OdPBeW14/Ii5cHC5t5ze5HzREAANH8kAACePxH0AJM/ELQAl+8FHcDma0ED8PlW8AT4F0zxmObwVcrYAAAAAElFTkSuQmCC",j="/smeditor/assets/upBodyInactive-87a7969e.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAHgAeQB3paCnMQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI5IlF3wK8AAAPCSURBVHja7Z1bbsIwFETNKBtAYoFV11C6iNI1VF0gEjug/YUoRbWxfR8zV+oHH9TG58QhUe6wK6v6PJ1+bl+/vryX2tofrtXvuZxRel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AvMv7uiZXHUwyMcAAAAASUVORK5CYII=",I0="/smeditor/assets/frame-d599a2fe.png",c0="/smeditor/assets/parts-b37af2cf.png",r0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAYAAAD1Xam+AAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4I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w as E,O as f,x as Q,y as I,z as c,H as a,J,Z as d,L as s,Q as h,X as v}from"./ChartManager-a4938337.js";import{A as F}from"./AnimatedSprite-fe6fab2d.js";import{H as P}from"./HoldBody-7c69d162.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",Y="/smeditor/assets/downBodyInactive-c781a303.png",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+NUWXVAPj/mu4PsD+fN94/4yeZqXHPr+NWn415nAtSPtVe/vplbP2BGBOjfaag8ll2frBgQqH2hBe5FIDICt/jDrgIQETjGH3oZiITANX4pAMYvf+wPZ8r4lfdfegZQ+kKoQ/wmTwHKCBQ/QDqjHCh0BKqfHs5+AOP4za8Csh8AO36Xy8DsB8CN3+19gOwHyH6A7AcAjN8VAAuC7AcwRpD9AMYIsh/AGEH2AxgjyH6AwZP9AJM3AAUE2Q9gjCD7AYwRZD+AMYLsBzBGkP0AxgiyH8AYQfYDGCPIfgBjBNkPYIwg+wEKDlj2A+AdyyZngOwHyH6ALs/J2Q+Q/QDZD8D6IjD7AXDiD7sKyH4AjPhDLwOzH2B8/FIA2Q/A+T5D9gMYx2/yFJD9ADzxVwG4/v/zrggY469pt7v1w9O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WAzzas++1dI7eP+rb22dc3e9X/TCYE6J9pmLmXpdcADAjUPtACdxGIjMAtftspABGBY/zWYyASAtf404+BLhvJdKwtPQYqfSBUIX7LQ4AyAsV3D+8oG4WOQPWt45kPYBx/+Skg8wGw45ccAzMfADd+2fMAmQ+Q+QCZDwAYvxQAC4LMBzBGkPkAxggyH8AYQeYDfFyZDyD0t2Q+gHF86IcAJQSZD2CMIPMBjBFkPoAxgswHMEaQ+QDGCDIfwBhB5gMYI8h8AGMEmQ9gjCDzATIfoC1+5gM03hNkPsDkDct8AMy9zHwAsvj0F4GZD4ATv+0UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",b="/smeditor/assets/leftBodyActive-75d41033.png",z="/smeditor/assets/leftBodyInactive-bbc074cd.png",x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZi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ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",y="/smeditor/assets/rightBodyActive-07f95372.png",R="/smeditor/assets/rightBodyInactive-fdefc2a4.png",X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6A/AP0BvAFZoxb9AYJLQH8A52sA+gO016c/QMBr0h8g4P7X8xYx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7WXP8FV5DABNXUJ82fOUACSYAJrg6cNrwgCQrQToT1xrSbCT4ACmjz8njwGgMgOIJoDgPoBSwWMAqIYBeEuAXfTwx1Xs3AsiCb4CjwGgZRJAX8YE0J42svgaYfA6jwGgeQ0gmAC64COx4HkkGKoxgZ01PF0AugDohjX5/PixN0tlI7+LHb8deTdZgq/CYwBomTUA507C81727PoaeJ3HAFDZFTwFeSI4JQC6I7UTtfvUuwOD+wCYwBgAuoUE0JvAORkNINwFWI84UIKvwGMAqCwBHIfPcRw9GROAjCSBZurwlzVs+enDazwGgHTtJ0qA6BrAU1mELb8dFl7jMQBUZgASNIBcagDDG1lKr4Dww/x/miXBOjSLcSMAAAAASUVORK5CYII=",G=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-092cf15a.js b/Noteskin-8c62d8ce.js similarity index 98% rename from Noteskin-092cf15a.js rename to Noteskin-8c62d8ce.js index 8518a91c..360d3050 100644 --- a/Noteskin-092cf15a.js +++ b/Noteskin-8c62d8ce.js @@ -1 +1 @@ -import{s as i,Z as b,b as g,H as l,Q as B,L as r,P as A,O as y,w as I,J as R,X as v}from"./ChartManager-eb846239.js";import{A as u}from"./AnimatedSprite-b2d4070f.js";import{T as $,H as f}from"./HoldBody-c167b8e7.js";const M="/smeditor/assets/active-d06e5c33.png",U="/smeditor/assets/downBodyActive-8cf886d3.png",F="/smeditor/assets/downBodyInactive-7465edd0.png",L="/smeditor/assets/downBottomCapActive-b10d1f0d.png",k="/smeditor/assets/downBottomCapInactive-12cafebe.png",P="/smeditor/assets/inactive-a4aecb82.png",O="/smeditor/assets/leftBodyActive-5d89f111.png",D="/smeditor/assets/leftBodyInactive-1110dc77.png",S="/smeditor/assets/leftBottomCapActive-f759c91c.png",j="/smeditor/assets/leftBottomCapInactive-a4ac7bba.png",V="/smeditor/assets/rightBodyActive-8af7624b.png",Y="/smeditor/assets/rightBodyInactive-695480aa.png",z="/smeditor/assets/rightBottomCapActive-6edeea1e.png",X="/smeditor/assets/rightBottomCapInactive-d674960e.png",q="/smeditor/assets/upBodyActive-c813881f.png",J="/smeditor/assets/upBodyInactive-0222237a.png",Q="/smeditor/assets/upBottomCapActive-19e4c05d.png",W="/smeditor/assets/upBottomCapInactive-23aae747.png",Z="/smeditor/assets/active-29dd632a.png",G="/smeditor/assets/downBodyActive-77f6502e.png",K="/smeditor/assets/downBodyInactive-a5759c62.png",tt="/smeditor/assets/downBottomCapActive-57ef4d54.png",et="/smeditor/assets/downBottomCapInactive-13ddf252.png",ot="/smeditor/assets/inactive-48f23de3.png",st="/smeditor/assets/leftBodyActive-fd4e902b.png",at="/smeditor/assets/leftBodyInactive-8fe6311e.png",nt="/smeditor/assets/leftBottomCapActive-057c49fb.png",it="/smeditor/assets/leftBottomCapInactive-df6350c7.png",ct="/smeditor/assets/rightBodyActive-751fadec.png",lt="/smeditor/assets/rightBodyInactive-46202369.png",rt="/smeditor/assets/rightBottomCapActive-a736d803.png",dt="/smeditor/assets/rightBottomCapInactive-a64cea2c.png",pt="/smeditor/assets/upBodyActive-b06d82f3.png",ht="/smeditor/assets/upBodyInactive-4ef75342.png",mt="/smeditor/assets/upBottomCapActive-07fb7c6e.png",_t="/smeditor/assets/upBottomCapInactive-75f78aac.png",gt="/smeditor/assets/hold-4cf23d59.png",vt="/smeditor/assets/mine-f6147b04.png",ft="/smeditor/assets/particles-18ec6c1d.png",wt="/smeditor/assets/w0-6f86addb.png",ut="/smeditor/assets/w1-c8c43b0f.png",bt="/smeditor/assets/w2-37282ba8.png",Bt="/smeditor/assets/w3-3c2ca2d8.png",At="/smeditor/assets/w4-ce0f95de.png",yt="/smeditor/assets/w5-23173d4f.png",Ct="/smeditor/assets/hold-4cf23d59.png",xt="/smeditor/assets/mine-f6147b04.png",It="/smeditor/assets/particles-18ec6c1d.png",Tt=i.from(Ct),Nt=b(i.from(xt),16,1,160,1024)[0],Ht=i.from(It),N=["w0","w1","w2","w3","w4","w5"],H={};N.forEach(t=>H[t]=i.from(new URL(Object.assign({"./flash/hold.png":gt,"./flash/mine.png":vt,"./flash/particles.png":ft,"./flash/w0.png":wt,"./flash/w1.png":ut,"./flash/w2.png":bt,"./flash/w3.png":Bt,"./flash/w4.png":At,"./flash/w5.png":yt})[`./flash/${t}.png`],self.location).href));class Et extends g{holdExplosion=new l(Tt);particles=new l(Ht);mine=new u(Nt);standard={};anims=new Set;particleAnim;mineAnim;constructor(e,s,n){super();const a=.5;N.forEach(o=>{const c=new l(H[o]);c.anchor.set(.5),c.alpha=0,c.blendMode=B.ADD,this.standard[o]=c,this.addChild(c)}),e.on(this,"hit",o=>{if(s==o.columnNumber){const c=this.standard[o.judgement.id];if(!c)return;this.anims.forEach(d=>r.finish(d)),this.anims.clear(),this.anims.add(r.animate(c,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12))}}),e.on(this,"held",o=>{s==o.columnNumber&&(this.anims.forEach(c=>r.finish(c)),this.anims.clear(),this.anims.add(r.animate(this.standard.w0,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12)))}),e.on(this,"holdon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"holdoff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.on(this,"rollon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"rolloff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.onUpdate(this,()=>{this.holdExplosion.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.holdExplosion.visible=!1,this.holdExplosion.anchor.set(.5),this.holdExplosion.scale.set(.5),this.addChild(this.holdExplosion),this.particles.alpha=0,this.particles.blendMode=B.ADD,this.particles.anchor.set(.5),e.on(this,"hit",o=>{if(s==o.columnNumber){if(this.particles.rotation=Math.random()*Math.PI*2,r.finish(this.particleAnim),!["w0","w1","w2","w3"].includes(o.judgement.id))return;this.particleAnim=r.animate(this.particles,{0:{alpha:.6,"scale.x":1*a,"scale.y":1*a},"0.7":{alpha:.6,"scale.x":1.2*a,"scale.y":1.2*a},1:{alpha:0,"scale.x":1.2*a,"scale.y":1.2*a}},.185,A(.16,.73,.63,.75))}}),this.addChild(this.particles),this.mine.anchor.x=.5,this.mine.scale.set(.5),this.mine.rotation=-C[n]*Math.PI/180,this.mine.animationSpeed=1/3,this.mine.alpha=0,this.addChild(this.mine),e.on(this,"hitmine",o=>{s==o.columnNumber&&(r.finish(this.mineAnim),this.mine.anchor.y=y.chart.reverse?1:0,this.mine.currentFrame=0,this.mine.play(),this.mineAnim=r.animate(this.mine,{0:{alpha:1},"0.5":{alpha:1},1:{alpha:0}},.6))})}}const Rt="/smeditor/assets/colors-63f923d2.png",$t="/smeditor/assets/mask-f1b4d033.png",Mt="/smeditor/assets/note-07e5d79f.png",Ut="/smeditor/assets/outline-72e881a7.png",Ft="/smeditor/assets/stroke-1f54ba14.png",Lt="/smeditor/assets/top-74da30ae.png",_={};["colors","mask","note","outline","stroke","top"].forEach(t=>_[t]=i.from(new URL(Object.assign({"./tap/colors.png":Rt,"./tap/mask.png":$t,"./tap/note.png":Mt,"./tap/outline.png":Ut,"./tap/stroke.png":Ft,"./tap/top.png":Lt})[`./tap/${t}.png`],self.location).href));const kt=b(_.top,4,1,384,384)[0],T=[-80,0,80];class p{static arrowFrameTex;static arrowFrameContainer=new g;static arrowTex;static arrowContainer=new g;static loaded=!1;static async initArrowTex(){if(!this.loaded){p.arrowFrameTex=I.create({width:64,height:64,resolution:y.performance.resolution}),p.arrowTex=I.create({width:64*3,height:64,resolution:y.performance.resolution});{const e=new l(_.note);e.width=64,e.height=64;const s=new l(_.outline);s.width=64,s.height=64;const n=new l(_.stroke);n.width=64,n.height=64,this.arrowFrameContainer.addChild(e,s,n)}for(let e=0;e<3;e++){const s=new l(this.arrowFrameTex);s.x=e*64;const n=new l(_.mask);n.scale.set(1/6),n.x=e*64,n.y=32,n.anchor.y=.5,n.alpha=1;const a=new $(_.colors,256,1024);a.tileScale.y=1/4,a.uvRespectAnchor=!0,a.x=e*64,a.y=32,a.tilePosition.y=128+T[e],a.anchor.y=.5,a.height=64,a.width=64,a.alpha=1,a.mask=n,a.name="c"+e;const o=new u(kt);o.scale.set(1/6),o.x=e*64,o.y=32,o.anchor.y=.5,o.alpha=1,o.name="t"+e,this.arrowContainer.addChild(s,a,n,o)}this.loaded=!0}}static setArrowTexTime(e){if(!this.loaded)return;const s=e.chartManager.chartView.getVisualBeat(),n=(s%1+1)%1,a=(s%4+4)%4;for(let o=0;o<3;o++)this.arrowContainer.getChildByName("c"+o).tilePosition.y=128+T[o]-a/4*256,this.arrowContainer.getChildByName("t"+o).currentFrame=Math.floor(n*4);e.renderer.render(p.arrowFrameContainer,{renderTexture:p.arrowFrameTex}),e.renderer.render(p.arrowContainer,{renderTexture:p.arrowTex})}static setNoteTex(e,s){let n=[4,8].indexOf(s?.quant??4);n==-1&&(n=2),e.texture=new i(p.arrowTex.baseTexture,new R(n*64,0,64,64))}}const Pt="/smeditor/assets/mine-335f4545.png",Ot="/smeditor/assets/spark-2c59cc0e.png",Dt="/smeditor/assets/receptor-a0a69b2b.png",St="/smeditor/assets/receptorFlash-c7675c53.png",jt=i.from(Dt),Vt=i.from(St),Yt=i.from(Pt),zt=b(i.from(Ot),4,4,160,128).flat(),Xt={Left:0,Down:5,Up:8,Right:13},h={},m={},w={Hold:{Active:i.from(new URL("/smeditor/assets/active-d06e5c33.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-a4aecb82.png",self.location).href)},Roll:{Active:i.from(new URL("/smeditor/assets/active-29dd632a.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-48f23de3.png",self.location).href)}};for(const t of["Left","Down","Up","Right"])for(const e of["Body","BottomCap"])for(const s of["Active","Inactive"])h[t]===void 0&&(h[t]={}),h[t][s]===void 0&&(h[t][s]={}),h[t][s][e]=i.from(new URL(Object.assign({"./hold/active.png":M,"./hold/downBodyActive.png":U,"./hold/downBodyInactive.png":F,"./hold/downBottomCapActive.png":L,"./hold/downBottomCapInactive.png":k,"./hold/inactive.png":P,"./hold/leftBodyActive.png":O,"./hold/leftBodyInactive.png":D,"./hold/leftBottomCapActive.png":S,"./hold/leftBottomCapInactive.png":j,"./hold/rightBodyActive.png":V,"./hold/rightBodyInactive.png":Y,"./hold/rightBottomCapActive.png":z,"./hold/rightBottomCapInactive.png":X,"./hold/upBodyActive.png":q,"./hold/upBodyInactive.png":J,"./hold/upBottomCapActive.png":Q,"./hold/upBottomCapInactive.png":W})[`./hold/${t.toLowerCase()}${e}${s}.png`],self.location).href),m[t]===void 0&&(m[t]={}),m[t][s]===void 0&&(m[t][s]={}),m[t][s][e]=i.from(new URL(Object.assign({"./roll/active.png":Z,"./roll/downBodyActive.png":G,"./roll/downBodyInactive.png":K,"./roll/downBottomCapActive.png":tt,"./roll/downBottomCapInactive.png":et,"./roll/inactive.png":ot,"./roll/leftBodyActive.png":st,"./roll/leftBodyInactive.png":at,"./roll/leftBottomCapActive.png":nt,"./roll/leftBottomCapInactive.png":it,"./roll/rightBodyActive.png":ct,"./roll/rightBodyInactive.png":lt,"./roll/rightBottomCapActive.png":rt,"./roll/rightBottomCapInactive.png":dt,"./roll/upBodyActive.png":pt,"./roll/upBodyInactive.png":ht,"./roll/upBottomCapActive.png":mt,"./roll/upBottomCapInactive.png":_t})[`./roll/${t.toLowerCase()}${e}${s}.png`],self.location).href);const C={Left:90,Down:0,Up:180,Right:-90},qt=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Zt={elements:{Left:{Receptor:t=>{let e,s;const n=b(jt,2,1,404,404),a=new g,o=new u(n[0]);o.width=64,o.height=64,o.anchor.set(.5),t.noteskin.on(o,"ghosttap",d=>{d.columnNumber==t.columnNumber&&(r.finish(e),e=r.animate(o,{0:{alpha:.9,width:.85*64,height:.85*64},1:{alpha:1,width:64,height:64}},.11))});const c=new l(Vt);return c.blendMode=B.ADD,c.width=64,c.height=64,c.anchor.set(.5),c.alpha=0,t.noteskin.on(a,"press",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:0,width:.85*64,height:.85*64},1:{alpha:.6,width:64,height:64}},.12,A(.5,1,.89,1)))}),t.noteskin.on(a,"lift",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:"inherit",width:"inherit",height:"inherit"},1:{alpha:0,width:64*1.2,height:64}},.12,A(.11,0,.5,1)))}),t.noteskin.onUpdate(a,d=>{const x=d.chart.getNotedata()[0]?.beat;if(x===void 0||d.getVisualBeat(){const e=new l(i.WHITE);return p.setNoteTex(e,t.note),e.anchor.set(.5),e},NoteFlash:t=>new Et(t.noteskin,t.columnNumber,t.columnName),Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:t=>{const e=new g,s=new l(Yt);s.anchor.set(.5),s.width=64,s.height=64,s.rotation=C[t.columnName]*Math.PI/180;const n=new u(zt);return n.anchor.set(.5),n.scale.set(.5),e.addChild(s,n),t.noteskin.onUpdate(e,a=>{const o=a.getVisualTime();n.currentFrame=((Math.floor(o*20)+Xt[t.columnName])%16+16)%16}),e},"Hold Active Head":()=>{const t=new l(w.Hold.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Inactive Head":()=>{const t=new l(w.Hold.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Active Body":t=>new f(h[t.columnName].Active.Body),"Hold Inactive Body":t=>new f(h[t.columnName].Inactive.Body),"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>new v(h[t.columnName].Active.BottomCap),"Hold Inactive BottomCap":t=>new v(h[t.columnName].Inactive.BottomCap),"Roll Active Head":()=>{const t=new l(w.Roll.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Inactive Head":()=>{const t=new l(w.Roll.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Active Body":t=>new f(m[t.columnName].Active.Body),"Roll Inactive Body":t=>new f(m[t.columnName].Inactive.Body),"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":t=>new v(m[t.columnName].Active.BottomCap),"Roll Inactive BottomCap":t=>new v(m[t.columnName].Inactive.BottomCap)}},load:function(t,e){const s=t.columnName;t.columnName="Left";const n=this.loadElement(t,e);return qt.includes(t.element)&&(n.rotation=C[s]*Math.PI/180),n},init(){p.initArrowTex()},update(t){p.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-16,RollBodyBottomOffset:-16}};export{Zt as default,C as rotationMap}; +import{s as i,Z as b,b as g,H as l,Q as B,L as r,P as A,O as y,w as I,J as R,X as v}from"./ChartManager-a4938337.js";import{A as u}from"./AnimatedSprite-fe6fab2d.js";import{T as $,H as f}from"./HoldBody-7c69d162.js";const M="/smeditor/assets/active-d06e5c33.png",U="/smeditor/assets/downBodyActive-8cf886d3.png",F="/smeditor/assets/downBodyInactive-7465edd0.png",L="/smeditor/assets/downBottomCapActive-b10d1f0d.png",k="/smeditor/assets/downBottomCapInactive-12cafebe.png",P="/smeditor/assets/inactive-a4aecb82.png",O="/smeditor/assets/leftBodyActive-5d89f111.png",D="/smeditor/assets/leftBodyInactive-1110dc77.png",S="/smeditor/assets/leftBottomCapActive-f759c91c.png",j="/smeditor/assets/leftBottomCapInactive-a4ac7bba.png",V="/smeditor/assets/rightBodyActive-8af7624b.png",Y="/smeditor/assets/rightBodyInactive-695480aa.png",z="/smeditor/assets/rightBottomCapActive-6edeea1e.png",X="/smeditor/assets/rightBottomCapInactive-d674960e.png",q="/smeditor/assets/upBodyActive-c813881f.png",J="/smeditor/assets/upBodyInactive-0222237a.png",Q="/smeditor/assets/upBottomCapActive-19e4c05d.png",W="/smeditor/assets/upBottomCapInactive-23aae747.png",Z="/smeditor/assets/active-29dd632a.png",G="/smeditor/assets/downBodyActive-77f6502e.png",K="/smeditor/assets/downBodyInactive-a5759c62.png",tt="/smeditor/assets/downBottomCapActive-57ef4d54.png",et="/smeditor/assets/downBottomCapInactive-13ddf252.png",ot="/smeditor/assets/inactive-48f23de3.png",st="/smeditor/assets/leftBodyActive-fd4e902b.png",at="/smeditor/assets/leftBodyInactive-8fe6311e.png",nt="/smeditor/assets/leftBottomCapActive-057c49fb.png",it="/smeditor/assets/leftBottomCapInactive-df6350c7.png",ct="/smeditor/assets/rightBodyActive-751fadec.png",lt="/smeditor/assets/rightBodyInactive-46202369.png",rt="/smeditor/assets/rightBottomCapActive-a736d803.png",dt="/smeditor/assets/rightBottomCapInactive-a64cea2c.png",pt="/smeditor/assets/upBodyActive-b06d82f3.png",ht="/smeditor/assets/upBodyInactive-4ef75342.png",mt="/smeditor/assets/upBottomCapActive-07fb7c6e.png",_t="/smeditor/assets/upBottomCapInactive-75f78aac.png",gt="/smeditor/assets/hold-4cf23d59.png",vt="/smeditor/assets/mine-f6147b04.png",ft="/smeditor/assets/particles-18ec6c1d.png",wt="/smeditor/assets/w0-6f86addb.png",ut="/smeditor/assets/w1-c8c43b0f.png",bt="/smeditor/assets/w2-37282ba8.png",Bt="/smeditor/assets/w3-3c2ca2d8.png",At="/smeditor/assets/w4-ce0f95de.png",yt="/smeditor/assets/w5-23173d4f.png",Ct="/smeditor/assets/hold-4cf23d59.png",xt="/smeditor/assets/mine-f6147b04.png",It="/smeditor/assets/particles-18ec6c1d.png",Tt=i.from(Ct),Nt=b(i.from(xt),16,1,160,1024)[0],Ht=i.from(It),N=["w0","w1","w2","w3","w4","w5"],H={};N.forEach(t=>H[t]=i.from(new URL(Object.assign({"./flash/hold.png":gt,"./flash/mine.png":vt,"./flash/particles.png":ft,"./flash/w0.png":wt,"./flash/w1.png":ut,"./flash/w2.png":bt,"./flash/w3.png":Bt,"./flash/w4.png":At,"./flash/w5.png":yt})[`./flash/${t}.png`],self.location).href));class Et extends g{holdExplosion=new l(Tt);particles=new l(Ht);mine=new u(Nt);standard={};anims=new Set;particleAnim;mineAnim;constructor(e,s,n){super();const a=.5;N.forEach(o=>{const c=new l(H[o]);c.anchor.set(.5),c.alpha=0,c.blendMode=B.ADD,this.standard[o]=c,this.addChild(c)}),e.on(this,"hit",o=>{if(s==o.columnNumber){const c=this.standard[o.judgement.id];if(!c)return;this.anims.forEach(d=>r.finish(d)),this.anims.clear(),this.anims.add(r.animate(c,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12))}}),e.on(this,"held",o=>{s==o.columnNumber&&(this.anims.forEach(c=>r.finish(c)),this.anims.clear(),this.anims.add(r.animate(this.standard.w0,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12)))}),e.on(this,"holdon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"holdoff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.on(this,"rollon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"rolloff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.onUpdate(this,()=>{this.holdExplosion.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.holdExplosion.visible=!1,this.holdExplosion.anchor.set(.5),this.holdExplosion.scale.set(.5),this.addChild(this.holdExplosion),this.particles.alpha=0,this.particles.blendMode=B.ADD,this.particles.anchor.set(.5),e.on(this,"hit",o=>{if(s==o.columnNumber){if(this.particles.rotation=Math.random()*Math.PI*2,r.finish(this.particleAnim),!["w0","w1","w2","w3"].includes(o.judgement.id))return;this.particleAnim=r.animate(this.particles,{0:{alpha:.6,"scale.x":1*a,"scale.y":1*a},"0.7":{alpha:.6,"scale.x":1.2*a,"scale.y":1.2*a},1:{alpha:0,"scale.x":1.2*a,"scale.y":1.2*a}},.185,A(.16,.73,.63,.75))}}),this.addChild(this.particles),this.mine.anchor.x=.5,this.mine.scale.set(.5),this.mine.rotation=-C[n]*Math.PI/180,this.mine.animationSpeed=1/3,this.mine.alpha=0,this.addChild(this.mine),e.on(this,"hitmine",o=>{s==o.columnNumber&&(r.finish(this.mineAnim),this.mine.anchor.y=y.chart.reverse?1:0,this.mine.currentFrame=0,this.mine.play(),this.mineAnim=r.animate(this.mine,{0:{alpha:1},"0.5":{alpha:1},1:{alpha:0}},.6))})}}const Rt="/smeditor/assets/colors-63f923d2.png",$t="/smeditor/assets/mask-f1b4d033.png",Mt="/smeditor/assets/note-07e5d79f.png",Ut="/smeditor/assets/outline-72e881a7.png",Ft="/smeditor/assets/stroke-1f54ba14.png",Lt="/smeditor/assets/top-74da30ae.png",_={};["colors","mask","note","outline","stroke","top"].forEach(t=>_[t]=i.from(new URL(Object.assign({"./tap/colors.png":Rt,"./tap/mask.png":$t,"./tap/note.png":Mt,"./tap/outline.png":Ut,"./tap/stroke.png":Ft,"./tap/top.png":Lt})[`./tap/${t}.png`],self.location).href));const kt=b(_.top,4,1,384,384)[0],T=[-80,0,80];class p{static arrowFrameTex;static arrowFrameContainer=new g;static arrowTex;static arrowContainer=new g;static loaded=!1;static async initArrowTex(){if(!this.loaded){p.arrowFrameTex=I.create({width:64,height:64,resolution:y.performance.resolution}),p.arrowTex=I.create({width:64*3,height:64,resolution:y.performance.resolution});{const e=new l(_.note);e.width=64,e.height=64;const s=new l(_.outline);s.width=64,s.height=64;const n=new l(_.stroke);n.width=64,n.height=64,this.arrowFrameContainer.addChild(e,s,n)}for(let e=0;e<3;e++){const s=new l(this.arrowFrameTex);s.x=e*64;const n=new l(_.mask);n.scale.set(1/6),n.x=e*64,n.y=32,n.anchor.y=.5,n.alpha=1;const a=new $(_.colors,256,1024);a.tileScale.y=1/4,a.uvRespectAnchor=!0,a.x=e*64,a.y=32,a.tilePosition.y=128+T[e],a.anchor.y=.5,a.height=64,a.width=64,a.alpha=1,a.mask=n,a.name="c"+e;const o=new u(kt);o.scale.set(1/6),o.x=e*64,o.y=32,o.anchor.y=.5,o.alpha=1,o.name="t"+e,this.arrowContainer.addChild(s,a,n,o)}this.loaded=!0}}static setArrowTexTime(e){if(!this.loaded)return;const s=e.chartManager.chartView.getVisualBeat(),n=(s%1+1)%1,a=(s%4+4)%4;for(let o=0;o<3;o++)this.arrowContainer.getChildByName("c"+o).tilePosition.y=128+T[o]-a/4*256,this.arrowContainer.getChildByName("t"+o).currentFrame=Math.floor(n*4);e.renderer.render(p.arrowFrameContainer,{renderTexture:p.arrowFrameTex}),e.renderer.render(p.arrowContainer,{renderTexture:p.arrowTex})}static setNoteTex(e,s){let n=[4,8].indexOf(s?.quant??4);n==-1&&(n=2),e.texture=new i(p.arrowTex.baseTexture,new R(n*64,0,64,64))}}const Pt="/smeditor/assets/mine-335f4545.png",Ot="/smeditor/assets/spark-2c59cc0e.png",Dt="/smeditor/assets/receptor-a0a69b2b.png",St="/smeditor/assets/receptorFlash-c7675c53.png",jt=i.from(Dt),Vt=i.from(St),Yt=i.from(Pt),zt=b(i.from(Ot),4,4,160,128).flat(),Xt={Left:0,Down:5,Up:8,Right:13},h={},m={},w={Hold:{Active:i.from(new URL("/smeditor/assets/active-d06e5c33.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-a4aecb82.png",self.location).href)},Roll:{Active:i.from(new URL("/smeditor/assets/active-29dd632a.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-48f23de3.png",self.location).href)}};for(const t of["Left","Down","Up","Right"])for(const e of["Body","BottomCap"])for(const s of["Active","Inactive"])h[t]===void 0&&(h[t]={}),h[t][s]===void 0&&(h[t][s]={}),h[t][s][e]=i.from(new URL(Object.assign({"./hold/active.png":M,"./hold/downBodyActive.png":U,"./hold/downBodyInactive.png":F,"./hold/downBottomCapActive.png":L,"./hold/downBottomCapInactive.png":k,"./hold/inactive.png":P,"./hold/leftBodyActive.png":O,"./hold/leftBodyInactive.png":D,"./hold/leftBottomCapActive.png":S,"./hold/leftBottomCapInactive.png":j,"./hold/rightBodyActive.png":V,"./hold/rightBodyInactive.png":Y,"./hold/rightBottomCapActive.png":z,"./hold/rightBottomCapInactive.png":X,"./hold/upBodyActive.png":q,"./hold/upBodyInactive.png":J,"./hold/upBottomCapActive.png":Q,"./hold/upBottomCapInactive.png":W})[`./hold/${t.toLowerCase()}${e}${s}.png`],self.location).href),m[t]===void 0&&(m[t]={}),m[t][s]===void 0&&(m[t][s]={}),m[t][s][e]=i.from(new URL(Object.assign({"./roll/active.png":Z,"./roll/downBodyActive.png":G,"./roll/downBodyInactive.png":K,"./roll/downBottomCapActive.png":tt,"./roll/downBottomCapInactive.png":et,"./roll/inactive.png":ot,"./roll/leftBodyActive.png":st,"./roll/leftBodyInactive.png":at,"./roll/leftBottomCapActive.png":nt,"./roll/leftBottomCapInactive.png":it,"./roll/rightBodyActive.png":ct,"./roll/rightBodyInactive.png":lt,"./roll/rightBottomCapActive.png":rt,"./roll/rightBottomCapInactive.png":dt,"./roll/upBodyActive.png":pt,"./roll/upBodyInactive.png":ht,"./roll/upBottomCapActive.png":mt,"./roll/upBottomCapInactive.png":_t})[`./roll/${t.toLowerCase()}${e}${s}.png`],self.location).href);const C={Left:90,Down:0,Up:180,Right:-90},qt=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Zt={elements:{Left:{Receptor:t=>{let e,s;const n=b(jt,2,1,404,404),a=new g,o=new u(n[0]);o.width=64,o.height=64,o.anchor.set(.5),t.noteskin.on(o,"ghosttap",d=>{d.columnNumber==t.columnNumber&&(r.finish(e),e=r.animate(o,{0:{alpha:.9,width:.85*64,height:.85*64},1:{alpha:1,width:64,height:64}},.11))});const c=new l(Vt);return c.blendMode=B.ADD,c.width=64,c.height=64,c.anchor.set(.5),c.alpha=0,t.noteskin.on(a,"press",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:0,width:.85*64,height:.85*64},1:{alpha:.6,width:64,height:64}},.12,A(.5,1,.89,1)))}),t.noteskin.on(a,"lift",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:"inherit",width:"inherit",height:"inherit"},1:{alpha:0,width:64*1.2,height:64}},.12,A(.11,0,.5,1)))}),t.noteskin.onUpdate(a,d=>{const x=d.chart.getNotedata()[0]?.beat;if(x===void 0||d.getVisualBeat(){const e=new l(i.WHITE);return p.setNoteTex(e,t.note),e.anchor.set(.5),e},NoteFlash:t=>new Et(t.noteskin,t.columnNumber,t.columnName),Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:t=>{const e=new g,s=new l(Yt);s.anchor.set(.5),s.width=64,s.height=64,s.rotation=C[t.columnName]*Math.PI/180;const n=new u(zt);return n.anchor.set(.5),n.scale.set(.5),e.addChild(s,n),t.noteskin.onUpdate(e,a=>{const o=a.getVisualTime();n.currentFrame=((Math.floor(o*20)+Xt[t.columnName])%16+16)%16}),e},"Hold Active Head":()=>{const t=new l(w.Hold.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Inactive Head":()=>{const t=new l(w.Hold.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Active Body":t=>new f(h[t.columnName].Active.Body),"Hold Inactive Body":t=>new f(h[t.columnName].Inactive.Body),"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>new v(h[t.columnName].Active.BottomCap),"Hold Inactive BottomCap":t=>new v(h[t.columnName].Inactive.BottomCap),"Roll Active Head":()=>{const t=new l(w.Roll.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Inactive Head":()=>{const t=new l(w.Roll.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Active Body":t=>new f(m[t.columnName].Active.Body),"Roll Inactive Body":t=>new f(m[t.columnName].Inactive.Body),"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":t=>new v(m[t.columnName].Active.BottomCap),"Roll Inactive BottomCap":t=>new v(m[t.columnName].Inactive.BottomCap)}},load:function(t,e){const s=t.columnName;t.columnName="Left";const n=this.loadElement(t,e);return qt.includes(t.element)&&(n.rotation=C[s]*Math.PI/180),n},init(){p.initArrowTex()},update(t){p.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-16,RollBodyBottomOffset:-16}};export{Zt as default,C as rotationMap}; diff --git a/Noteskin-c09b95ff.js b/Noteskin-9f92ab0e.js similarity index 99% rename from Noteskin-c09b95ff.js rename to Noteskin-9f92ab0e.js index b153fc2f..bb087b01 100644 --- a/Noteskin-c09b95ff.js +++ b/Noteskin-9f92ab0e.js @@ -1,4 +1,4 @@ -import{s as o,u as v,v as p,b as C,w as c,O as l,x as m,y as f,z as h,H as i,J as G,L as B,P as F,Q as H,V as U,X as E,Y as u}from"./ChartManager-eb846239.js";import{H as D}from"./HoldBody-c167b8e7.js";const Y="/smeditor/assets/parts-0c8fa692.png",b="/smeditor/assets/frame-d599a2fe.png",x="/smeditor/assets/parts-b37af2cf.png",J="/smeditor/assets/parts-9668caec.png",T=`precision mediump float; +import{s as o,u as v,v as p,b as C,w as c,O as l,x as m,y as f,z as h,H as i,J as G,L as B,P as F,Q as H,V as U,X as E,Y as u}from"./ChartManager-a4938337.js";import{H as D}from"./HoldBody-7c69d162.js";const Y="/smeditor/assets/parts-0c8fa692.png",b="/smeditor/assets/frame-d599a2fe.png",x="/smeditor/assets/parts-b37af2cf.png",J="/smeditor/assets/parts-9668caec.png",T=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-64efdd72.js b/Noteskin-b2279a2b.js similarity index 99% rename from Noteskin-64efdd72.js rename to Noteskin-b2279a2b.js index fccb72b0..587fe6e0 100644 --- a/Noteskin-64efdd72.js +++ b/Noteskin-b2279a2b.js @@ -1,4 +1,4 @@ -import{s as e,u as v,v as U,b as c,w,O as m,x as l,y as Q,z as h,H as i,J as u,L as C,P as F,Q as x,V as G,X as f,Y as b}from"./ChartManager-eb846239.js";import{H as E}from"./HoldBody-c167b8e7.js";const S="/smeditor/assets/parts-0c8fa692.png",M="/smeditor/assets/frame-d599a2fe.png",T="/smeditor/assets/parts-b37af2cf.png",K="/smeditor/assets/parts-9668caec.png",P=`precision mediump float; +import{s as e,u as v,v as U,b as c,w,O as m,x as l,y as Q,z as h,H as i,J as u,L as C,P as F,Q as x,V as G,X as f,Y as b}from"./ChartManager-a4938337.js";import{H as E}from"./HoldBody-7c69d162.js";const S="/smeditor/assets/parts-0c8fa692.png",M="/smeditor/assets/frame-d599a2fe.png",T="/smeditor/assets/parts-b37af2cf.png",K="/smeditor/assets/parts-9668caec.png",P=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-da5b9f1d.js b/Noteskin-b32d01e2.js similarity index 99% rename from Noteskin-da5b9f1d.js rename to Noteskin-b32d01e2.js index e3882331..a13967b6 100644 --- a/Noteskin-da5b9f1d.js +++ b/Noteskin-b32d01e2.js @@ -1,4 +1,4 @@ -import{s as o,u as H,v as r,b as G,w as E,O as f,x as Q,y as I,z as c,H as C,J as F,Z as K,L as a,Q as u,X as P}from"./ChartManager-eb846239.js";import{A as h}from"./AnimatedSprite-b2d4070f.js";import{H as v}from"./HoldBody-c167b8e7.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",k="/smeditor/assets/downBodyInactive-c781a303.png",Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU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0UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",p="/smeditor/assets/leftBodyActive-75d41033.png",b="/smeditor/assets/leftBodyInactive-bbc074cd.png",O="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZP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q2p4bKxbAAAAAElFTkSuQmCC",x="/smeditor/assets/rightBodyActive-07f95372.png",y="/smeditor/assets/rightBodyInactive-fdefc2a4.png",T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6A/AP0BvAFZoxb9AYJLQH8A52sA+gO016c/QMBr0h8g4P7X8xYx5QzAFhEBkAABkAABkAABkAABkAABdEJ/AEJ/AOJTAgQQlwABxCVAAHEJEGDCVtCzBAggLgECiEvgvj/AUgiWg3lar+dzA3+NDf0BBlzTchCt69EfAAnoD4AE9AdAgkJ/ACQo9AcIIZ51PfoDIAH9AUhf3t5fNAWYfaBiXa/n+ufgP+12m/QCAL8dvqkAXvoDzDwaHl3PGn6TAC3vIx4kAP5y+KWUcvabr/v91+nXHh+e3a6Sgd8H/6IAkSQAfj/8PwWIIAHwb4N/VQALCTIlOvwmAZAgL/xmAZAgJ/xFAiBBPvhN5wDXCt1yTqAc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8PbJ8PbJ8PbJ8PbJ8P/N8+H7i44L+fOBofLCx/Y+J/ETIREMDkV0F4MQDMfh1Hl/cA9QtJL9ieH9ieH9ieHygAsuVQAAGk4eyBJwZgb0gIJIB+QScPnRWP8/XP76Vx9thfGKseaKyfX1x8UJE8+BhHyicqdT4UTJ4pxSH24Vf5bDl4XFc+/usBbYATaABorwQWgJobwba/QG3xEFs38FSzyUVtXqGTxTYft32HTucbneQGJroAb/WyW7joEgroN7ENBRBANtHNBAzAthGOBAhAN1JOBAQw2UqKFwPAbDsvXV7tvJ7svxZ7rtud17P931ZQbn4f7X83O9+XNr9v5w+cdv6DPwWiAkzzlaAAyJZDQXEQyuECcsDJmViATmKR+UogAfSAFy5wAH7ADBaww3B0PhbQ03h0PhSUp/GcethVOXjKqVw4QgrEwWj0wLN2Qn0w2gsc+QamFEfDbecTbucTnnY+pp8sjgkNLT+ffpyoPadU5tMFGKDz4ZLysFx1CO5g0eJhudeLFVqtjA+WNecV22OIR4LiyOjmfOiF8cHSm/rkdnsY9mAxAPD8iaAHmPyBoAW4fC/oADZfCxqAz7eC+gKFsBDenyBvUCgBs3wnqADTfCUoALLlUAABpKERFIDFS2DYFTELL60tQXfZ2PzZpTfFdULPs/k1QSsvVy2r+4x0PhZU9xmlK6HcVVHF0HJLd7MbCOkEJ93shiKkwAPaACfQANBeCSwANTcCCYCthcBdsBgav8hEd8Mjb8unGoDI55MFQOXj6Rwg8+kCDND5cAkFdM3spbwW0OdPBeW14/Ii5cHC5t5ze5HzREAANH8kAACePxH0AJM/ELQAl+8FHcDma0ED8PlW8AT4F0zxmObwVcrYAAAAAElFTkSuQmCC",j="/smeditor/assets/upBodyInactive-87a7969e.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAHgAeQB3paCnMQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI5IlF3wK8AAAPCSURBVHja7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iD70DtzQB+uS8Qe+GfrA4XQFBzCbDlQJjCYmoygk/tSpSrAPUGgBSBgBV4hAkSBQVmoBbsLBT4cAcBNv4ed9ALiJSPl5FwFuckUA6z/wkwH80WqAXVEABkcDGD0NcHgVgPUNYMb1TQCIAlJxtTCPqJUAUCbMqZSggpaAgpbQCpDQCpCggpTQCpDQCpDQClgMk5JgmIQEw6QkoPCz1h+YGLTO62qDAQAAAABJRU5ErkJggg==",a0="/smeditor/assets/parts-9a3f637b.png",Q0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAYAAAD1Xam+AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADKZJREFUeJztnU2IJVcVx099vNf1Xvc4MaF7MowOjhFEQUz8WCW0JCAITkARIUpwQEUNJhs3koCIMCvBLEQRdKerIW4UXYkI40aQWQgudCO6UKKSqJl+H/1eVV3vqbqnuvp2B+45t5me4p0fHKom5OS9fpnzv/977qnXOSiDZvkrMPA/e4Pxhgt7X7wMSdB/4I2lgdfsFeN1d8V4vgjKn8FNM4Nt8OMp+GhQ/r+WqfnncmSvOfzbXTFuPvpqUL756teMmSVgZpmNAuqDKdSzi1DceS4of/06mHoBUC9duPuLT4R9fge/+6vNr6GaG6hmANVBBuUshysvvC0ovzCfMmY1BbOagFlPAPBqo7z6zaD827dvm9P++f7+flB+HvIvKfcxhy5WLug+lIWLpXcfyArGsIbRsSgZf61mZQbzMoWFjbmLRZUG5xv8Wdf27/raCsAqt0U0too4Cc8vvajaa3D+2rjA+wRqDBOmvU1+NbJhP6/ahr3ivanvXVmqAAyd04r/kJF/WvEvwtNPK368hkIFP3fR3JfhAoDFb9apDSx+W0zl2NbSdnB6v+j7IhCeb6C2ObUVgHpl34t971UaLgDgir8RgZ4QxHB4GP4XQAVg6FDB94uf4wCo4JfefSBU8Hile44ALKqkcwCLMmE7ACjd6m+dBJRWAGprocdMASAR6AkBKx9X/7It/tq+9ypnOID6qPD79zEsl+H/A1UAhs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PCK0/IV35CXoaUEpz9Cdo/nX5wr0/kTYrvzyfO/p71qgADB2p9SeEzT9C2vwjpnnFGv09+QYqUfOPkO79u3xh86/jnJp/hArA0DlnByBt/hHRDkDY/Ovyhef/R6+PIXfv3Md/zxoVgKET6wCEzT8idgvAffz35BuoRc0/4ty3AOoAlCikzwAQ594DkHX/iWb1jyjA6C2AXf1jHID2AJQ4Bt8DaGcA5G8gbg+eCI//unx0AFnEFqBxAPImZiwqAEMnpviRuFHyqNUfkQz/HH8DEeKBRFZA1OqPnKP9R1QABk5xPe7328PDsvN/4gH4elT+tZ0yKj/94ctR+eO9uM/vwhPXovKX+a1zOf8nVAAUZYNRAVCUDUYFQFE2GBUARdlgVAAUZYNRAVCUDUYFQFE2mP8D644ti6CF+lcAAAAASUVORK5CYII=",I0="/smeditor/assets/frame-d599a2fe.png",c0="/smeditor/assets/parts-b37af2cf.png",D0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAIAAAB6Pz7pAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACxZJREFUeJztXb1uJEUQnp5Ze9cnJCR0EgkBOTnxBQS8AGSgk0gQPADvQE5AdikJEQ9wGRcS8gikJOdde36wp+eneuqnq2a8fXuov8BerWt6er31df12z654z9F13bueQoDT6bR458WLVw8/X//zPX3B30dS/s2/L+e3wEc8/rUcwMt/+WaWd+CvPy2HH8f/8VdyOsev/iTlf/v0JRZ+wMev6PF//4b+vB99R3/eX374lpT/7OuSlH/z8yek/PHzL0j558//IOV35LsZT48r8FrD2Wvb8Luinl674Cb0V3yohr9PC4g8qbKtmb8wKrTU2whc13J3Zt5uHn/Ok3a02IjD4fDws22Hu0wvMgFS4Qq9I2scJECo0SR2RdOLYCH6K96X7TiLWXWEO7i2YSTo8V3Fj0XK90Q0WPMlAQqZAwsCFKPvkAmQCv4/DVS5c/MbBPbW4eEK3YGbMcNXk+6otK5s75nhmYlaCdAPOgzprZITF3XXgDmAYRjs98Q8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DkeKodYSwBloUwGUfipDcJ1hjAngUyHulGu0AsuGa4/wBTjZtfVontJAAAAABJRU5ErkJggg==",M=`precision mediump float; +import{s as o,u as H,v as r,b as G,w as E,O as f,x as Q,y as I,z as c,H as C,J as F,Z as K,L as a,Q as u,X as P}from"./ChartManager-a4938337.js";import{A as h}from"./AnimatedSprite-fe6fab2d.js";import{H as v}from"./HoldBody-7c69d162.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",k="/smeditor/assets/downBodyInactive-c781a303.png",Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+NUWXVAPj/mu4PsD+fN94/4yeZqXHPr+NWn415nAtSPtVe/vplbP2BGBOjfaag8ll2frBgQqH2hBe5FIDICt/jDrgIQETjGH3oZiITANX4pAMYvf+wPZ8r4lfdfegZQ+kKoQ/wmTwHKCBQ/QDqjHCh0BKqfHs5+AOP4za8Csh8AO36Xy8DsB8CN3+19gOwHyH6A7AcAjN8VAAuC7AcwRpD9AMYIsh/AGEH2AxgjyH6AwZP9AJM3AAUE2Q9gjCD7AYwRZD+AMYLsBzBGkP0AxgiyH8AYQfYDGCPIfgBjBNkPYIwg+wEKDlj2A+AdyyZngOwHyH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O9FqT1bzyuX4f/7DntnHmBIaHP+8FAALnfh7hbwUAgin+18Fbwt8DIA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",x="/smeditor/assets/rightBodyActive-07f95372.png",y="/smeditor/assets/rightBodyInactive-fdefc2a4.png",T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4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jASAFmBa/otMgCcHm4HGWZFOlGcsACdfo7MXnSjPHYvCyXsL4Pq106/W8vgcAVj5Ejo/s0Kz8kwhjJO/vR2ec7xIhmYCpMKWLJACYy9Qp7zoOB+LAuG4A+y68goI0+W2ANZ2aAe22mggFsIwvAsE136PTIBUgCu6fkOMGmYXKIwBilGhP2DkPQH0MPcCWesA3c7U//xAAKz9RSZAOnAPcOH0ylgHOHcM0JY2VTETwNrS09g+79u3b8n3MwFSAQXBg8pxBDBngeBAccbAHWEatBXaECNqrJkAJZjP0GdnrQNIc5piAIhcCEsIFAQPK/ANI8+dDcosfDWIATSwHo3YehdI36O9ygIME9C4Qx0+GlEs/PVZIOgF5UJYWuBeIBmcBWAIA10gTTHMxwCFuhTQlWfeFG/uBVoQIHL5IgjOhbDkeKodYSwBloUwGUfipDcJ1hjAngUyHulGu0AsuGa4/wBTjZtfVontJAAAAABJRU5ErkJggg==",M=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-73e877f6.js b/Noteskin-f9326759.js similarity index 99% rename from Noteskin-73e877f6.js rename to Noteskin-f9326759.js index e634dfd8..68b6d4fb 100644 --- a/Noteskin-73e877f6.js +++ b/Noteskin-f9326759.js @@ -1,4 +1,4 @@ -import{s as a,Z as T,u,v as Q,b as d,w as C,O as f,x as E,y as N,z as y,H as r,J as D,V as B,L as c,Q as v,X as p,Y as H}from"./ChartManager-eb846239.js";import{A as I}from"./AnimatedSprite-b2d4070f.js";import{H as h}from"./HoldBody-c167b8e7.js";const P="/smeditor/assets/frame-d599a2fe.png",Y="/smeditor/assets/parts-b37af2cf.png",Z=`precision mediump float; +import{s as a,Z as T,u,v as Q,b as d,w as C,O as f,x as E,y as N,z as y,H as r,J as D,V as B,L as c,Q as v,X as p,Y as H}from"./ChartManager-a4938337.js";import{A as I}from"./AnimatedSprite-fe6fab2d.js";import{H as h}from"./HoldBody-7c69d162.js";const P="/smeditor/assets/frame-d599a2fe.png",Y="/smeditor/assets/parts-b37af2cf.png",Z=`precision mediump float; varying vec2 vUvs; diff --git a/app.js b/app.js index 345b6654..7ab5fe72 100644 --- a/app.js +++ b/app.js @@ -1,4 +1,4 @@ -import{g as St,F as W,M as Yt,K as Kt,a as Nt,I as Zt,G as Jt,N as Qt,O as k,E as Ne,T as Ae,t as er,e as fe,l as tr,C as Je,b as rr,R as nr,c as sr,D as Qe,U as ir,B as or,d as ar,A as et,i as lr,f as tt,h as cr,j as rt,k as hr,m as fr,n as ur,o as dr,W as nt,p as pr}from"./ChartManager-eb846239.js";var be={exports:{}};const mr="2.0.0",At=256,Er=Number.MAX_SAFE_INTEGER||9007199254740991,wr=16,gr=At-6,vr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Ee={MAX_LENGTH:At,MAX_SAFE_COMPONENT_LENGTH:wr,MAX_SAFE_BUILD_LENGTH:gr,MAX_SAFE_INTEGER:Er,RELEASE_TYPES:vr,SEMVER_SPEC_VERSION:mr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const $r=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};var we=$r;(function(i,e){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:o}=Ee,f=we;e=i.exports={};const u=e.re=[],$=e.safeRe=[],l=e.src=[],c=e.t={};let m=0;const R="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",o],[R,s]],I=B=>{for(const[V,q]of _)B=B.split(`${V}*`).join(`${V}{0,${q}}`).split(`${V}+`).join(`${V}{1,${q}}`);return B},T=(B,V,q)=>{const te=I(V),b=m++;f(B,b,V),c[B]=b,l[b]=V,u[b]=new RegExp(V,q?"g":void 0),$[b]=new RegExp(te,q?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*"),T("NUMERICIDENTIFIERLOOSE","\\d+"),T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${R}*`),T("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),T("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),T("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),T("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),T("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),T("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),T("BUILDIDENTIFIER",`${R}+`),T("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),T("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),T("FULL",`^${l[c.FULLPLAIN]}$`),T("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),T("LOOSE",`^${l[c.LOOSEPLAIN]}$`),T("GTLT","((?:<|>)?=?)"),T("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),T("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),T("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),T("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),T("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),T("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),T("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),T("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),T("COERCERTL",l[c.COERCE],!0),T("COERCERTLFULL",l[c.COERCEFULL],!0),T("LONETILDE","(?:~>?)"),T("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",T("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),T("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),T("LONECARET","(?:\\^)"),T("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",T("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),T("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),T("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),T("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),T("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",T("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),T("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),T("STAR","(<|>)?=?\\s*\\*"),T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(be,be.exports);var oe=be.exports;const Rr=Object.freeze({loose:!0}),Ir=Object.freeze({}),yr=i=>i?typeof i!="object"?Rr:i:Ir;var De=yr;const st=/^[0-9]+$/,Ot=(i,e)=>{const t=st.test(i),s=st.test(e);return t&&s&&(i=+i,e=+e),i===e?0:t&&!s?-1:s&&!t?1:iOt(e,i);var Ct={compareIdentifiers:Ot,rcompareIdentifiers:Lr};const ue=we,{MAX_LENGTH:it,MAX_SAFE_INTEGER:de}=Ee,{safeRe:ot,t:at}=oe,Tr=De,{compareIdentifiers:ne}=Ct;let Sr=class Z{constructor(e,t){if(t=Tr(t),e instanceof Z){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>it)throw new TypeError(`version is longer than ${it} characters`);ue("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const s=e.trim().match(t.loose?ot[at.LOOSE]:ot[at.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>de||this.major<0)throw new TypeError("Invalid major version");if(this.minor>de||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>de||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){const f=+o;if(f>=0&&f=0;)typeof this.prerelease[f]=="number"&&(this.prerelease[f]++,f=-2);if(f===-1){if(t===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(t){let f=[t,o];s===!1&&(f=[t]),ne(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=f):this.prerelease=f}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var U=Sr;const lt=U,Nr=(i,e,t=!1)=>{if(i instanceof lt)return i;try{return new lt(i,e)}catch(s){if(!t)return null;throw s}};var se=Nr;const Ar=se,Or=(i,e)=>{const t=Ar(i,e);return t?t.version:null};var Cr=Or;const Pr=se,_r=(i,e)=>{const t=Pr(i.trim().replace(/^[=v]+/,""),e);return t?t.version:null};var xr=_r;const ct=U,br=(i,e,t,s,o)=>{typeof t=="string"&&(o=s,s=t,t=void 0);try{return new ct(i instanceof ct?i.version:i,t).inc(e,s,o).version}catch{return null}};var Dr=br;const ht=se,Fr=(i,e)=>{const t=ht(i,null,!0),s=ht(e,null,!0),o=t.compare(s);if(o===0)return null;const f=o>0,u=f?t:s,$=f?s:t,l=!!u.prerelease.length;if(!!$.prerelease.length&&!l)return!$.patch&&!$.minor?"major":u.patch?"patch":u.minor?"minor":"major";const m=l?"pre":"";return t.major!==s.major?m+"major":t.minor!==s.minor?m+"minor":t.patch!==s.patch?m+"patch":"prerelease"};var jr=Fr;const Gr=U,kr=(i,e)=>new Gr(i,e).major;var Wr=kr;const Mr=U,Ur=(i,e)=>new Mr(i,e).minor;var Vr=Ur;const Xr=U,Hr=(i,e)=>new Xr(i,e).patch;var Br=Hr;const qr=se,zr=(i,e)=>{const t=qr(i,e);return t&&t.prerelease.length?t.prerelease:null};var Yr=zr;const ft=U,Kr=(i,e,t)=>new ft(i,t).compare(new ft(e,t));var Y=Kr;const Zr=Y,Jr=(i,e,t)=>Zr(e,i,t);var Qr=Jr;const en=Y,tn=(i,e)=>en(i,e,!0);var rn=tn;const ut=U,nn=(i,e,t)=>{const s=new ut(i,t),o=new ut(e,t);return s.compare(o)||s.compareBuild(o)};var Fe=nn;const sn=Fe,on=(i,e)=>i.sort((t,s)=>sn(t,s,e));var an=on;const ln=Fe,cn=(i,e)=>i.sort((t,s)=>ln(s,t,e));var hn=cn;const fn=Y,un=(i,e,t)=>fn(i,e,t)>0;var ge=un;const dn=Y,pn=(i,e,t)=>dn(i,e,t)<0;var je=pn;const mn=Y,En=(i,e,t)=>mn(i,e,t)===0;var Pt=En;const wn=Y,gn=(i,e,t)=>wn(i,e,t)!==0;var _t=gn;const vn=Y,$n=(i,e,t)=>vn(i,e,t)>=0;var Ge=$n;const Rn=Y,In=(i,e,t)=>Rn(i,e,t)<=0;var ke=In;const yn=Pt,Ln=_t,Tn=ge,Sn=Ge,Nn=je,An=ke,On=(i,e,t,s)=>{switch(e){case"===":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i===t;case"!==":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i!==t;case"":case"=":case"==":return yn(i,t,s);case"!=":return Ln(i,t,s);case">":return Tn(i,t,s);case">=":return Sn(i,t,s);case"<":return Nn(i,t,s);case"<=":return An(i,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};var xt=On;const Cn=U,Pn=se,{safeRe:pe,t:me}=oe,_n=(i,e)=>{if(i instanceof Cn)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;e=e||{};let t=null;if(!e.rtl)t=i.match(e.includePrerelease?pe[me.COERCEFULL]:pe[me.COERCE]);else{const l=e.includePrerelease?pe[me.COERCERTLFULL]:pe[me.COERCERTL];let c;for(;(c=l.exec(i))&&(!t||t.index+t[0].length!==i.length);)(!t||c.index+c[0].length!==t.index+t[0].length)&&(t=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(t===null)return null;const s=t[2],o=t[3]||"0",f=t[4]||"0",u=e.includePrerelease&&t[5]?`-${t[5]}`:"",$=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Pn(`${s}.${o}.${f}${u}${$}`,e)};var xn=_n;class bn{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(e,t)}return this}}var Dn=bn,Oe,dt;function K(){if(dt)return Oe;dt=1;const i=/\s+/g;class e{constructor(p,y){if(y=o(y),p instanceof e)return p.loose===!!y.loose&&p.includePrerelease===!!y.includePrerelease?p:new e(p.raw,y);if(p instanceof f)return this.raw=p.value,this.set=[[p]],this.formatted=void 0,this;if(this.options=y,this.loose=!!y.loose,this.includePrerelease=!!y.includePrerelease,this.raw=p.trim().replace(i," "),this.set=this.raw.split("||").map(w=>this.parseRange(w.trim())).filter(w=>w.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const w=this.set[0];if(this.set=this.set.filter(L=>!B(L[0])),this.set.length===0)this.set=[w];else if(this.set.length>1){for(const L of this.set)if(L.length===1&&V(L[0])){this.set=[L];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let p=0;p0&&(this.formatted+="||");const y=this.set[p];for(let w=0;w0&&(this.formatted+=" "),this.formatted+=y[w].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(p){const w=((this.options.includePrerelease&&I)|(this.options.loose&&T))+":"+p,L=s.get(w);if(L)return L;const g=this.options.loose,N=g?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];p=p.replace(N,ce(this.options.includePrerelease)),u("hyphen replace",p),p=p.replace(l[c.COMPARATORTRIM],m),u("comparator trim",p),p=p.replace(l[c.TILDETRIM],R),u("tilde trim",p),p=p.replace(l[c.CARETTRIM],_),u("caret trim",p);let O=p.split(" ").map(D=>te(D,this.options)).join(" ").split(/\s+/).map(D=>Le(D,this.options));g&&(O=O.filter(D=>(u("loose invalid filter",D,this.options),!!D.match(l[c.COMPARATORLOOSE])))),u("range list",O);const A=new Map,x=O.map(D=>new f(D,this.options));for(const D of x){if(B(D))return[D];A.set(D.value,D)}A.size>1&&A.has("")&&A.delete("");const G=[...A.values()];return s.set(w,G),G}intersects(p,y){if(!(p instanceof e))throw new TypeError("a Range is required");return this.set.some(w=>q(w,y)&&p.set.some(L=>q(L,y)&&w.every(g=>L.every(N=>g.intersects(N,y)))))}test(p){if(!p)return!1;if(typeof p=="string")try{p=new $(p,this.options)}catch{return!1}for(let y=0;yE.value==="<0.0.0-0",V=E=>E.value==="",q=(E,p)=>{let y=!0;const w=E.slice();let L=w.pop();for(;y&&w.length;)y=w.every(g=>L.intersects(g,p)),L=w.pop();return y},te=(E,p)=>(u("comp",E,p),E=ae(E,p),u("caret",E),E=H(E,p),u("tildes",E),E=le(E,p),u("xrange",E),E=ye(E,p),u("stars",E),E),b=E=>!E||E.toLowerCase()==="x"||E==="*",H=(E,p)=>E.trim().split(/\s+/).map(y=>Re(y,p)).join(" "),Re=(E,p)=>{const y=p.loose?l[c.TILDELOOSE]:l[c.TILDE];return E.replace(y,(w,L,g,N,O)=>{u("tilde",E,w,L,g,N,O);let A;return b(L)?A="":b(g)?A=`>=${L}.0.0 <${+L+1}.0.0-0`:b(N)?A=`>=${L}.${g}.0 <${L}.${+g+1}.0-0`:O?(u("replaceTilde pr",O),A=`>=${L}.${g}.${N}-${O} <${L}.${+g+1}.0-0`):A=`>=${L}.${g}.${N} <${L}.${+g+1}.0-0`,u("tilde return",A),A})},ae=(E,p)=>E.trim().split(/\s+/).map(y=>X(y,p)).join(" "),X=(E,p)=>{u("caret",E,p);const y=p.loose?l[c.CARETLOOSE]:l[c.CARET],w=p.includePrerelease?"-0":"";return E.replace(y,(L,g,N,O,A)=>{u("caret",E,L,g,N,O,A);let x;return b(g)?x="":b(N)?x=`>=${g}.0.0${w} <${+g+1}.0.0-0`:b(O)?g==="0"?x=`>=${g}.${N}.0${w} <${g}.${+N+1}.0-0`:x=`>=${g}.${N}.0${w} <${+g+1}.0.0-0`:A?(u("replaceCaret pr",A),g==="0"?N==="0"?x=`>=${g}.${N}.${O}-${A} <${g}.${N}.${+O+1}-0`:x=`>=${g}.${N}.${O}-${A} <${g}.${+N+1}.0-0`:x=`>=${g}.${N}.${O}-${A} <${+g+1}.0.0-0`):(u("no pr"),g==="0"?N==="0"?x=`>=${g}.${N}.${O}${w} <${g}.${N}.${+O+1}-0`:x=`>=${g}.${N}.${O}${w} <${g}.${+N+1}.0-0`:x=`>=${g}.${N}.${O} <${+g+1}.0.0-0`),u("caret return",x),x})},le=(E,p)=>(u("replaceXRanges",E,p),E.split(/\s+/).map(y=>Ie(y,p)).join(" ")),Ie=(E,p)=>{E=E.trim();const y=p.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return E.replace(y,(w,L,g,N,O,A)=>{u("xRange",E,w,L,g,N,O,A);const x=b(g),G=x||b(N),D=G||b(O),ee=D;return L==="="&&ee&&(L=""),A=p.includePrerelease?"-0":"",x?L===">"||L==="<"?w="<0.0.0-0":w="*":L&&ee?(G&&(N=0),O=0,L===">"?(L=">=",G?(g=+g+1,N=0,O=0):(N=+N+1,O=0)):L==="<="&&(L="<",G?g=+g+1:N=+N+1),L==="<"&&(A="-0"),w=`${L+g}.${N}.${O}${A}`):G?w=`>=${g}.0.0${A} <${+g+1}.0.0-0`:D&&(w=`>=${g}.${N}.0${A} <${g}.${+N+1}.0-0`),u("xRange return",w),w})},ye=(E,p)=>(u("replaceStars",E,p),E.trim().replace(l[c.STAR],"")),Le=(E,p)=>(u("replaceGTE0",E,p),E.trim().replace(l[p.includePrerelease?c.GTE0PRE:c.GTE0],"")),ce=E=>(p,y,w,L,g,N,O,A,x,G,D,ee)=>(b(w)?y="":b(L)?y=`>=${w}.0.0${E?"-0":""}`:b(g)?y=`>=${w}.${L}.0${E?"-0":""}`:N?y=`>=${y}`:y=`>=${y}${E?"-0":""}`,b(x)?A="":b(G)?A=`<${+x+1}.0.0-0`:b(D)?A=`<${x}.${+G+1}.0-0`:ee?A=`<=${x}.${G}.${D}-${ee}`:E?A=`<${x}.${G}.${+D+1}-0`:A=`<=${A}`,`${y} ${A}`.trim()),J=(E,p,y)=>{for(let w=0;w0){const L=E[w].semver;if(L.major===p.major&&L.minor===p.minor&&L.patch===p.patch)return!0}return!1}return!0};return Oe}var Ce,pt;function ve(){if(pt)return Ce;pt=1;const i=Symbol("SemVer ANY");class e{static get ANY(){return i}constructor(m,R){if(R=t(R),m instanceof e){if(m.loose===!!R.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),u("comparator",m,R),this.options=R,this.loose=!!R.loose,this.parse(m),this.semver===i?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(m){const R=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],_=m.match(R);if(!_)throw new TypeError(`Invalid comparator: ${m}`);this.operator=_[1]!==void 0?_[1]:"",this.operator==="="&&(this.operator=""),_[2]?this.semver=new $(_[2],this.options.loose):this.semver=i}toString(){return this.value}test(m){if(u("Comparator.test",m,this.options.loose),this.semver===i||m===i)return!0;if(typeof m=="string")try{m=new $(m,this.options)}catch{return!1}return f(m,this.operator,this.semver,this.options)}intersects(m,R){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(m.value,R).test(this.value):m.operator===""?m.value===""?!0:new l(this.value,R).test(m.semver):(R=t(R),R.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!R.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||f(this.semver,"<",m.semver,R)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||f(this.semver,">",m.semver,R)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}Ce=e;const t=De,{safeRe:s,t:o}=oe,f=xt,u=we,$=U,l=K();return Ce}const Fn=K(),jn=(i,e,t)=>{try{e=new Fn(e,t)}catch{return!1}return e.test(i)};var $e=jn;const Gn=K(),kn=(i,e)=>new Gn(i,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));var Wn=kn;const Mn=U,Un=K(),Vn=(i,e,t)=>{let s=null,o=null,f=null;try{f=new Un(e,t)}catch{return null}return i.forEach(u=>{f.test(u)&&(!s||o.compare(u)===-1)&&(s=u,o=new Mn(s,t))}),s};var Xn=Vn;const Hn=U,Bn=K(),qn=(i,e,t)=>{let s=null,o=null,f=null;try{f=new Bn(e,t)}catch{return null}return i.forEach(u=>{f.test(u)&&(!s||o.compare(u)===1)&&(s=u,o=new Hn(s,t))}),s};var zn=qn;const Pe=U,Yn=K(),mt=ge,Kn=(i,e)=>{i=new Yn(i,e);let t=new Pe("0.0.0");if(i.test(t)||(t=new Pe("0.0.0-0"),i.test(t)))return t;t=null;for(let s=0;s{const $=new Pe(u.semver.version);switch(u.operator){case">":$.prerelease.length===0?$.patch++:$.prerelease.push(0),$.raw=$.format();case"":case">=":(!f||mt($,f))&&(f=$);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),f&&(!t||mt(t,f))&&(t=f)}return t&&i.test(t)?t:null};var Zn=Kn;const Jn=K(),Qn=(i,e)=>{try{return new Jn(i,e).range||"*"}catch{return null}};var es=Qn;const ts=U,bt=ve(),{ANY:rs}=bt,ns=K(),ss=$e,Et=ge,wt=je,is=ke,os=Ge,as=(i,e,t,s)=>{i=new ts(i,s),e=new ns(e,s);let o,f,u,$,l;switch(t){case">":o=Et,f=is,u=wt,$=">",l=">=";break;case"<":o=wt,f=os,u=Et,$="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ss(i,e,s))return!1;for(let c=0;c{I.semver===rs&&(I=new bt(">=0.0.0")),R=R||I,_=_||I,o(I.semver,R.semver,s)?R=I:u(I.semver,_.semver,s)&&(_=I)}),R.operator===$||R.operator===l||(!_.operator||_.operator===$)&&f(i,_.semver))return!1;if(_.operator===l&&u(i,_.semver))return!1}return!0};var We=as;const ls=We,cs=(i,e,t)=>ls(i,e,">",t);var hs=cs;const fs=We,us=(i,e,t)=>fs(i,e,"<",t);var ds=us;const gt=K(),ps=(i,e,t)=>(i=new gt(i,t),e=new gt(e,t),i.intersects(e,t));var ms=ps;const Es=$e,ws=Y;var gs=(i,e,t)=>{const s=[];let o=null,f=null;const u=i.sort((m,R)=>ws(m,R,t));for(const m of u)Es(m,e,t)?(f=m,o||(o=m)):(f&&s.push([o,f]),f=null,o=null);o&&s.push([o,null]);const $=[];for(const[m,R]of s)m===R?$.push(m):!R&&m===u[0]?$.push("*"):R?m===u[0]?$.push(`<=${R}`):$.push(`${m} - ${R}`):$.push(`>=${m}`);const l=$.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{if(i===e)return!0;i=new vt(i,t),e=new vt(e,t);let s=!1;e:for(const o of i.set){for(const f of e.set){const u=Rs(o,f,t);if(s=s||u!==null,u)continue e}if(s)return!1}return!0},$s=[new Me(">=0.0.0-0")],$t=[new Me(">=0.0.0")],Rs=(i,e,t)=>{if(i===e)return!0;if(i.length===1&&i[0].semver===_e){if(e.length===1&&e[0].semver===_e)return!0;t.includePrerelease?i=$s:i=$t}if(e.length===1&&e[0].semver===_e){if(t.includePrerelease)return!0;e=$t}const s=new Set;let o,f;for(const I of i)I.operator===">"||I.operator===">="?o=Rt(o,I,t):I.operator==="<"||I.operator==="<="?f=It(f,I,t):s.add(I.semver);if(s.size>1)return null;let u;if(o&&f){if(u=Ue(o.semver,f.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||f.operator!=="<="))return null}for(const I of s){if(o&&!ie(I,String(o),t)||f&&!ie(I,String(f),t))return null;for(const T of e)if(!ie(I,String(T),t))return!1;return!0}let $,l,c,m,R=f&&!t.includePrerelease&&f.semver.prerelease.length?f.semver:!1,_=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;R&&R.prerelease.length===1&&f.operator==="<"&&R.prerelease[0]===0&&(R=!1);for(const I of e){if(m=m||I.operator===">"||I.operator===">=",c=c||I.operator==="<"||I.operator==="<=",o){if(_&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===_.major&&I.semver.minor===_.minor&&I.semver.patch===_.patch&&(_=!1),I.operator===">"||I.operator===">="){if($=Rt(o,I,t),$===I&&$!==o)return!1}else if(o.operator===">="&&!ie(o.semver,String(I),t))return!1}if(f){if(R&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===R.major&&I.semver.minor===R.minor&&I.semver.patch===R.patch&&(R=!1),I.operator==="<"||I.operator==="<="){if(l=It(f,I,t),l===I&&l!==f)return!1}else if(f.operator==="<="&&!ie(f.semver,String(I),t))return!1}if(!I.operator&&(f||o)&&u!==0)return!1}return!(o&&c&&!f&&u!==0||f&&m&&!o&&u!==0||_||R)},Rt=(i,e,t)=>{if(!i)return e;const s=Ue(i.semver,e.semver,t);return s>0?i:s<0||e.operator===">"&&i.operator===">="?e:i},It=(i,e,t)=>{if(!i)return e;const s=Ue(i.semver,e.semver,t);return s<0?i:s>0||e.operator==="<"&&i.operator==="<="?e:i};var Is=vs;const xe=oe,yt=Ee,ys=U,Lt=Ct,Ls=se,Ts=Cr,Ss=xr,Ns=Dr,As=jr,Os=Wr,Cs=Vr,Ps=Br,_s=Yr,xs=Y,bs=Qr,Ds=rn,Fs=Fe,js=an,Gs=hn,ks=ge,Ws=je,Ms=Pt,Us=_t,Vs=Ge,Xs=ke,Hs=xt,Bs=xn,qs=ve(),zs=K(),Ys=$e,Ks=Wn,Zs=Xn,Js=zn,Qs=Zn,ei=es,ti=We,ri=hs,ni=ds,si=ms,ii=gs,oi=Is;var ai={parse:Ls,valid:Ts,clean:Ss,inc:Ns,diff:As,major:Os,minor:Cs,patch:Ps,prerelease:_s,compare:xs,rcompare:bs,compareLoose:Ds,compareBuild:Fs,sort:js,rsort:Gs,gt:ks,lt:Ws,eq:Ms,neq:Us,gte:Vs,lte:Xs,cmp:Hs,coerce:Bs,Comparator:qs,Range:zs,satisfies:Ys,toComparators:Ks,maxSatisfying:Zs,minSatisfying:Js,minVersion:Qs,validRange:ei,outside:ti,gtr:ri,ltr:ni,intersects:si,simplifyRange:ii,subset:oi,SemVer:ys,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:yt.SEMVER_SPEC_VERSION,RELEASE_TYPES:yt.RELEASE_TYPES,compareIdentifiers:Lt.compareIdentifiers,rcompareIdentifiers:Lt.rcompareIdentifiers};const li=St(ai);var Dt={exports:{}};(function(i){(function(){function e(r,n,h){return r.call.apply(r.bind,arguments)}function t(r,n,h){if(!r)throw Error();if(2=n.f?C():r.fonts.load(Re(n.a),n.h).then(function(F){1<=F.length?S():setTimeout(P,25)},function(){C()})}P()}),d=null,v=new Promise(function(S,C){d=setTimeout(C,n.f)});Promise.race([v,a]).then(function(){d&&(clearTimeout(d),d=null),n.g(n.a)},function(){n.j(n.a)})};function N(r,n,h,a,d,v,S){this.v=r,this.B=n,this.c=h,this.a=a,this.s=S||"BESbswy",this.f={},this.w=d||3e3,this.u=v||null,this.m=this.j=this.h=this.g=null,this.g=new y(this.c,this.s),this.h=new y(this.c,this.s),this.j=new y(this.c,this.s),this.m=new y(this.c,this.s),r=new H(this.a.c+",serif",X(this.a)),r=L(r),this.g.a.style.cssText=r,r=new H(this.a.c+",sans-serif",X(this.a)),r=L(r),this.h.a.style.cssText=r,r=new H("serif",X(this.a)),r=L(r),this.j.a.style.cssText=r,r=new H("sans-serif",X(this.a)),r=L(r),this.m.a.style.cssText=r,w(this.g),w(this.h),w(this.j),w(this.m)}var O={D:"serif",C:"sans-serif"},A=null;function x(){if(A===null){var r=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);A=!!r&&(536>parseInt(r[1],10)||parseInt(r[1],10)===536&&11>=parseInt(r[2],10))}return A}N.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),D(this)};function G(r,n,h){for(var a in O)if(O.hasOwnProperty(a)&&n===r.f[O[a]]&&h===r.f[O[a]])return!0;return!1}function D(r){var n=r.g.a.offsetWidth,h=r.h.a.offsetWidth,a;(a=n===r.f.serif&&h===r.f["sans-serif"])||(a=x()&&G(r,n,h)),a?o()-r.A>=r.w?x()&&G(r,n,h)&&(r.u===null||r.u.hasOwnProperty(r.a.c))?Te(r,r.v):Te(r,r.B):ee(r):Te(r,r.v)}function ee(r){setTimeout(s(function(){D(this)},r),50)}function Te(r,n){setTimeout(s(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),n(this.a)},r),0)}function Se(r,n,h){this.c=r,this.a=n,this.f=0,this.m=this.j=!1,this.s=h}var he=null;Se.prototype.g=function(r){var n=this.a;n.g&&m(n.f,[n.a.c("wf",r.c,X(r).toString(),"active")],[n.a.c("wf",r.c,X(r).toString(),"loading"),n.a.c("wf",r.c,X(r).toString(),"inactive")]),J(n,"fontactive",r),this.m=!0,Ve(this)},Se.prototype.h=function(r){var n=this.a;if(n.g){var h=R(n.f,n.a.c("wf",r.c,X(r).toString(),"active")),a=[],d=[n.a.c("wf",r.c,X(r).toString(),"loading")];h||a.push(n.a.c("wf",r.c,X(r).toString(),"inactive")),m(n.f,a,d)}J(n,"fontinactive",r),Ve(this)};function Ve(r){--r.f==0&&r.j&&(r.m?(r=r.a,r.g&&m(r.f,[r.a.c("wf","active")],[r.a.c("wf","loading"),r.a.c("wf","inactive")]),J(r,"active")):ce(r.a))}function Xe(r){this.j=r,this.a=new E,this.h=0,this.f=this.g=!0}Xe.prototype.load=function(r){this.c=new f(this.j,r.context||this.j),this.g=r.events!==!1,this.f=r.classes!==!1,jt(this,new ye(this.c,r),r)};function Ft(r,n,h,a,d){var v=--r.h==0;(r.f||r.g)&&setTimeout(function(){var S=d||null,C=a||null||{};if(h.length===0&&v)ce(n.a);else{n.f+=h.length,v&&(n.j=v);var P,F=[];for(P=0;Pthis.createElement(o));t.replaceChildren(...s)}createElement(e){if(e.type=="separator"){const t=document.createElement("div");return t.classList.add("separator"),t}if(e.type=="selection"||e.type=="checkbox"||e.type=="dropdown"){const t=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");let f;if(e.type=="selection"||e.type=="checkbox"){const u=Kt[e.id]??{label:e.id,combos:[],callback:()=>{}};f=document.createElement("div"),f.innerText=Nt.getKeybindString(e.id),f.classList.add("keybind","unselectable"),o.innerText=u.label;let $=u.disabled;typeof $=="function"&&($=$(this.app)),$&&t.classList.add("disabled"),t.addEventListener("click",()=>{if($)return;u.callback(this.app),t.closest(".menu-main").querySelector(".menubar-dropdown").replaceChildren()})}else f=Zt.getIcon("CHEVRON",16),f.style.transform="rotate(-90deg)",o.innerText=typeof e.title=="function"?e.title(this.app):e.title;if(s.appendChild(o),s.appendChild(f),t.appendChild(s),t.classList.add("menu-item"),s.classList.add("menu-item-title","menu-hover"),o.classList.add("title","unselectable"),e.type=="dropdown"){const u=document.createElement("div");t.appendChild(u),u.classList.add("menubar-dropdown"),e.options.map($=>this.createElement($)).forEach($=>u.appendChild($))}if(e.type=="checkbox"){let u=e.checked;typeof u=="function"&&(u=u(this.app)),u&&(o.innerText="✓ "+o.innerText)}return t}if(e.type=="menu"){const t=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");return t.appendChild(s),s.innerText=e.title,t.appendChild(o),s.classList.add("title","unselectable"),t.classList.add("menu-item","menu-main"),s.classList.add("menu-hover"),o.classList.add("menubar-dropdown","unselectable"),t.onmouseenter=()=>{o.replaceChildren(...e.options.map(f=>this.createElement(f)))},t.onmouseleave=()=>{o.replaceChildren()},t}return document.createElement("div")}}class ui{view;windows=[];app;constructor(e,t){this.app=e,this.view=t}unfocusAll(){for(const e of this.view.querySelectorAll(".focused"))e.classList.remove("focused")}getFocusedWindow(){for(const e of this.windows)if(e.windowElement.classList.contains("focused"))return e;return null}isBlocked(){return!this.windows.every(e=>!e.options.blocking)}openWindow(e){if(e.options.win_id){const t=this.getWindowById(e.options.win_id);if(t){t.focus();return}}e.addToManager(this),this.windows.push(e)}removeWindow(e){this.windows.splice(this.windows.indexOf(e),1)}getWindowById(e){for(const t of this.windows)if(t.options.win_id==e)return t}}class di{options=k;events=Ne;themes=Ae;renderer;ticker;stage;view;chartManager;windowManager;menubarManager;actionHistory;lastWidth=window.innerWidth;lastHeight=window.innerHeight;constructor(){if(er.setDefaultProps({duration:[200,100],theme:"sm"}),window.nw){const e=nw.Window.get();nw.App.on("open",t=>{if(!t||t?.length===0){nw.Window.open(window.location.href);return}let s="";for(let o of t)if(o.startsWith("file://")&&(o=o.substring(7)),fe(o)==".ssc"){s=o;break}else s==""&&fe(o)==".sm"&&(s=o);s!=""&&(this.chartManager.loadSM(s),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}),window.addEventListener("keydown",t=>{t.key=="r"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.reload()),t.code=="KeyW"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.close()),process.versions["nw-flavor"]=="sdk"&&t.code=="KeyI"&&t.metaKey&&t.altKey&&(t.preventDefault(),e.showDevTools())}),e.on("enter-fullscreen",()=>{k.app.fullscreen=e.isFullscreen}),e.on("resize",(t,s)=>{e.isFullscreen||(k.app.width=t,k.app.height=s)}),e.on("restore",()=>{k.app.fullscreen=e.isFullscreen}),this.checkAppVersion()}if(k.loadOptions(),tr(),Nt.load(this),window.nw){const e=nw.Window.get();k.app.fullscreen?e.enterFullscreen():e.resizeTo(k.app.width,k.app.height)}if(setInterval(()=>k.saveOptions(),1e4),k.general.smoothAnimations&&document.body.classList.add("animated"),this.registerFonts(),this.view=document.getElementById("pixi"),document.oncontextmenu=e=>{e.preventDefault(),this.chartManager.loadedChart&&e.target==this.view&&Je.open(this,e)},this.view.onmousedown=()=>{Je.close()},this.stage=new rr,this.stage.sortableChildren=!0,this.renderer=new nr({backgroundColor:1579292,antialias:k.performance.antialiasing,width:this.view.clientWidth,height:this.view.clientHeight,resolution:k.performance.resolution,autoDensity:!0,view:this.view,powerPreference:"low-power"}),this.ticker=new sr,this.ticker.maxFPS=0,this.ticker.add(()=>{const e=performance.now();this.renderer.render(this.stage),Qe.instance?.addFrameTimeValue(performance.now()-e),performance.memory?.usedJSHeapSize&&Qe.instance?.addMemoryTimeValue(performance.memory.usedJSHeapSize),pr()},ir.LOW),this.ticker.start(),or.init(this.renderer),this.chartManager=new ar(this),this.menubarManager=new fi(this,document.getElementById("menubar")),this.windowManager=new ui(this,document.getElementById("windows")),this.actionHistory=new et(this),this.registerListeners(),!W.hidePoweredByText&&lr()){const e=document.getElementById("embed");e.appendChild(document.createTextNode("Powered by "));const t=document.createElement("a");if(t.href="https://tillvit.github.io/smeditor/",t.innerText="SMEditor",t.target="_blank",e.appendChild(t),W.url!=null){e.appendChild(document.createTextNode(" | Open this chart in a "));const s=document.createElement("a"),o=new URL(location.origin+"/smeditor/app/");s.innerText="new tab",s.target="_blank",o.searchParams.append("url",W.url),W.chartType!==null&&o.searchParams.append("chartType",W.chartType),W.chartIndex!==null&&o.searchParams.append("chartIndex",W.chartIndex+""),s.href=o.toString(),e.appendChild(s)}}tt.initFileSystem().then(()=>{if(W.url){this.chartManager.loadSM(W.url).then(()=>{const e=this.chartManager.loadedSM;if(!e)return;let t;if(W.chartType!=null&&(t=e.charts[W.chartType],t===void 0)){nt.createFormatted(`Couldn't find chart with type ${W.chartType}`,"warn");return}if(t===void 0){const o=Object.keys(e.charts);if(o.length==0||(t=e.charts[o[0]],t.length==0))return}let s;if(W.chartIndex!=null&&(s=t.at(W.chartIndex),s===void 0)){nt.createFormatted(`Couldn't find chart with index ${W.chartIndex}`,"warn");return}s===void 0&&(s=t.at(-1),!s)||this.chartManager.loadChart(s)});return}this.windowManager.openWindow(new cr(this))}),window.onbeforeunload=e=>{if(et.instance.isDirty()&&k.general.warnBeforeExit)return e.preventDefault(),e.returnValue="Are you sure you want to exit?"},window.onunload=()=>{k.saveOptions()},Ae.loadTheme(k.general.theme)}registerFonts(){rt.from("Main",{fontFamily:"Assistant",fontSize:20,fill:"white"},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio}),rt.from("Fancy",{fontFamily:"Assistant",fontSize:40,fontWeight:"700",fill:["#dddddd","#ffffff"],fillGradientType:hr.LINEAR_VERTICAL,stroke:11184810,strokeThickness:3},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio})}registerListeners(){this.view.addEventListener("mousedown",()=>{this.windowManager.unfocusAll()}),Ne.on("themeChanged",()=>{this.renderer.background.color=new fr(Ae.getCurrentTheme()["editor-bg"]).toNumber()}),window.addEventListener("keydown",function(e){e.code=="Enter"&&e.target instanceof HTMLButtonElement&&e.preventDefault()}),window.addEventListener("dragstart",function(e){e.target instanceof HTMLImageElement&&e.preventDefault()}),setInterval(()=>{const e=window.innerWidth,t=window.innerHeight-document.getElementById("menubar").clientHeight-document.getElementById("playback-options").clientHeight;(this.lastHeight!=t||this.lastWidth!=e)&&(this.lastHeight=t,this.lastWidth=e,this.onResize(e,t),Ne.emit("resize"))},100),window.addEventListener("dragover",e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"}),window.addEventListener("drop",e=>{if(window.nw){e.stopPropagation(),e.preventDefault();let t="";for(const s of e.dataTransfer.files)if(s.path)if(fe(s.path)==".ssc"){t=s.path;break}else t==""&&fe(s.path)==".sm"&&(t=s.path);t!=""&&(this.chartManager.loadSM(t),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}else tt.handleDropEvent(e).then(t=>{const s=new ur(this,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:o=>{this.chartManager.loadSM(o),this.windowManager.getWindowById("select_sm_initial")?.closeWindow()},onload:()=>{s.getAcceptableFile(t??"").then(o=>s.selectPath(o))}});this.windowManager.openWindow(s)})})}onResize(e,t){this.renderer.screen.width=e,this.renderer.screen.height=t,this.view.width=e*this.renderer.resolution,this.view.height=t*this.renderer.resolution,this.view.style.width=`${e}px`,this.view.style.height=`${t}px`}checkAppVersion(){if(!window.nw)return;const e=nw.require("nw.gui"),t={stable:3,beta:2,alpha:1,nightly:0};let s="win";process.platform=="darwin"?s=nw.require("os").arch()=="arm64"?"mac-arm":"mac-x64":process.platform=="linux"&&(s="linux"),fetch("/smeditor/assets/app/versions.json").then(o=>o.json()).then(o=>{o=o.sort((u,$)=>t[u.type]!=t[$.type]?t[$.type]-t[u.type]:$.date-u.date);const f=o[0];li.lt(e.App.manifest.version,f.version)&&localStorage.getItem("downloadedVersion")!==f.version&&dr.open(f.version,f.downloads[s])})}}document.querySelector("body").innerHTML=`
+import{g as St,F as W,M as Yt,K as Kt,a as Nt,I as Zt,G as Jt,N as Qt,O as k,E as Ne,T as Ae,t as er,e as fe,l as tr,C as Je,b as rr,R as nr,c as sr,D as Qe,U as ir,B as or,d as ar,A as et,i as lr,f as tt,h as cr,j as rt,k as hr,m as fr,n as ur,o as dr,W as nt,p as pr}from"./ChartManager-a4938337.js";var be={exports:{}};const mr="2.0.0",At=256,Er=Number.MAX_SAFE_INTEGER||9007199254740991,wr=16,gr=At-6,vr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Ee={MAX_LENGTH:At,MAX_SAFE_COMPONENT_LENGTH:wr,MAX_SAFE_BUILD_LENGTH:gr,MAX_SAFE_INTEGER:Er,RELEASE_TYPES:vr,SEMVER_SPEC_VERSION:mr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const $r=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};var we=$r;(function(i,e){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:o}=Ee,f=we;e=i.exports={};const u=e.re=[],$=e.safeRe=[],l=e.src=[],c=e.t={};let m=0;const R="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",o],[R,s]],I=B=>{for(const[V,q]of _)B=B.split(`${V}*`).join(`${V}{0,${q}}`).split(`${V}+`).join(`${V}{1,${q}}`);return B},T=(B,V,q)=>{const te=I(V),b=m++;f(B,b,V),c[B]=b,l[b]=V,u[b]=new RegExp(V,q?"g":void 0),$[b]=new RegExp(te,q?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*"),T("NUMERICIDENTIFIERLOOSE","\\d+"),T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${R}*`),T("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),T("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),T("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),T("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),T("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),T("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),T("BUILDIDENTIFIER",`${R}+`),T("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),T("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),T("FULL",`^${l[c.FULLPLAIN]}$`),T("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),T("LOOSE",`^${l[c.LOOSEPLAIN]}$`),T("GTLT","((?:<|>)?=?)"),T("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),T("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),T("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),T("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),T("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),T("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),T("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),T("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),T("COERCERTL",l[c.COERCE],!0),T("COERCERTLFULL",l[c.COERCEFULL],!0),T("LONETILDE","(?:~>?)"),T("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",T("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),T("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),T("LONECARET","(?:\\^)"),T("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",T("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),T("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),T("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),T("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),T("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",T("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),T("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),T("STAR","(<|>)?=?\\s*\\*"),T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(be,be.exports);var oe=be.exports;const Rr=Object.freeze({loose:!0}),Ir=Object.freeze({}),yr=i=>i?typeof i!="object"?Rr:i:Ir;var De=yr;const st=/^[0-9]+$/,Ot=(i,e)=>{const t=st.test(i),s=st.test(e);return t&&s&&(i=+i,e=+e),i===e?0:t&&!s?-1:s&&!t?1:iOt(e,i);var Ct={compareIdentifiers:Ot,rcompareIdentifiers:Lr};const ue=we,{MAX_LENGTH:it,MAX_SAFE_INTEGER:de}=Ee,{safeRe:ot,t:at}=oe,Tr=De,{compareIdentifiers:ne}=Ct;let Sr=class Z{constructor(e,t){if(t=Tr(t),e instanceof Z){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>it)throw new TypeError(`version is longer than ${it} characters`);ue("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const s=e.trim().match(t.loose?ot[at.LOOSE]:ot[at.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>de||this.major<0)throw new TypeError("Invalid major version");if(this.minor>de||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>de||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){const f=+o;if(f>=0&&f=0;)typeof this.prerelease[f]=="number"&&(this.prerelease[f]++,f=-2);if(f===-1){if(t===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(t){let f=[t,o];s===!1&&(f=[t]),ne(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=f):this.prerelease=f}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var U=Sr;const lt=U,Nr=(i,e,t=!1)=>{if(i instanceof lt)return i;try{return new lt(i,e)}catch(s){if(!t)return null;throw s}};var se=Nr;const Ar=se,Or=(i,e)=>{const t=Ar(i,e);return t?t.version:null};var Cr=Or;const Pr=se,_r=(i,e)=>{const t=Pr(i.trim().replace(/^[=v]+/,""),e);return t?t.version:null};var xr=_r;const ct=U,br=(i,e,t,s,o)=>{typeof t=="string"&&(o=s,s=t,t=void 0);try{return new ct(i instanceof ct?i.version:i,t).inc(e,s,o).version}catch{return null}};var Dr=br;const ht=se,Fr=(i,e)=>{const t=ht(i,null,!0),s=ht(e,null,!0),o=t.compare(s);if(o===0)return null;const f=o>0,u=f?t:s,$=f?s:t,l=!!u.prerelease.length;if(!!$.prerelease.length&&!l)return!$.patch&&!$.minor?"major":u.patch?"patch":u.minor?"minor":"major";const m=l?"pre":"";return t.major!==s.major?m+"major":t.minor!==s.minor?m+"minor":t.patch!==s.patch?m+"patch":"prerelease"};var jr=Fr;const Gr=U,kr=(i,e)=>new Gr(i,e).major;var Wr=kr;const Mr=U,Ur=(i,e)=>new Mr(i,e).minor;var Vr=Ur;const Xr=U,Hr=(i,e)=>new Xr(i,e).patch;var Br=Hr;const qr=se,zr=(i,e)=>{const t=qr(i,e);return t&&t.prerelease.length?t.prerelease:null};var Yr=zr;const ft=U,Kr=(i,e,t)=>new ft(i,t).compare(new ft(e,t));var Y=Kr;const Zr=Y,Jr=(i,e,t)=>Zr(e,i,t);var Qr=Jr;const en=Y,tn=(i,e)=>en(i,e,!0);var rn=tn;const ut=U,nn=(i,e,t)=>{const s=new ut(i,t),o=new ut(e,t);return s.compare(o)||s.compareBuild(o)};var Fe=nn;const sn=Fe,on=(i,e)=>i.sort((t,s)=>sn(t,s,e));var an=on;const ln=Fe,cn=(i,e)=>i.sort((t,s)=>ln(s,t,e));var hn=cn;const fn=Y,un=(i,e,t)=>fn(i,e,t)>0;var ge=un;const dn=Y,pn=(i,e,t)=>dn(i,e,t)<0;var je=pn;const mn=Y,En=(i,e,t)=>mn(i,e,t)===0;var Pt=En;const wn=Y,gn=(i,e,t)=>wn(i,e,t)!==0;var _t=gn;const vn=Y,$n=(i,e,t)=>vn(i,e,t)>=0;var Ge=$n;const Rn=Y,In=(i,e,t)=>Rn(i,e,t)<=0;var ke=In;const yn=Pt,Ln=_t,Tn=ge,Sn=Ge,Nn=je,An=ke,On=(i,e,t,s)=>{switch(e){case"===":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i===t;case"!==":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i!==t;case"":case"=":case"==":return yn(i,t,s);case"!=":return Ln(i,t,s);case">":return Tn(i,t,s);case">=":return Sn(i,t,s);case"<":return Nn(i,t,s);case"<=":return An(i,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};var xt=On;const Cn=U,Pn=se,{safeRe:pe,t:me}=oe,_n=(i,e)=>{if(i instanceof Cn)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;e=e||{};let t=null;if(!e.rtl)t=i.match(e.includePrerelease?pe[me.COERCEFULL]:pe[me.COERCE]);else{const l=e.includePrerelease?pe[me.COERCERTLFULL]:pe[me.COERCERTL];let c;for(;(c=l.exec(i))&&(!t||t.index+t[0].length!==i.length);)(!t||c.index+c[0].length!==t.index+t[0].length)&&(t=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(t===null)return null;const s=t[2],o=t[3]||"0",f=t[4]||"0",u=e.includePrerelease&&t[5]?`-${t[5]}`:"",$=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Pn(`${s}.${o}.${f}${u}${$}`,e)};var xn=_n;class bn{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(e,t)}return this}}var Dn=bn,Oe,dt;function K(){if(dt)return Oe;dt=1;const i=/\s+/g;class e{constructor(p,y){if(y=o(y),p instanceof e)return p.loose===!!y.loose&&p.includePrerelease===!!y.includePrerelease?p:new e(p.raw,y);if(p instanceof f)return this.raw=p.value,this.set=[[p]],this.formatted=void 0,this;if(this.options=y,this.loose=!!y.loose,this.includePrerelease=!!y.includePrerelease,this.raw=p.trim().replace(i," "),this.set=this.raw.split("||").map(w=>this.parseRange(w.trim())).filter(w=>w.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const w=this.set[0];if(this.set=this.set.filter(L=>!B(L[0])),this.set.length===0)this.set=[w];else if(this.set.length>1){for(const L of this.set)if(L.length===1&&V(L[0])){this.set=[L];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let p=0;p0&&(this.formatted+="||");const y=this.set[p];for(let w=0;w0&&(this.formatted+=" "),this.formatted+=y[w].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(p){const w=((this.options.includePrerelease&&I)|(this.options.loose&&T))+":"+p,L=s.get(w);if(L)return L;const g=this.options.loose,N=g?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];p=p.replace(N,ce(this.options.includePrerelease)),u("hyphen replace",p),p=p.replace(l[c.COMPARATORTRIM],m),u("comparator trim",p),p=p.replace(l[c.TILDETRIM],R),u("tilde trim",p),p=p.replace(l[c.CARETTRIM],_),u("caret trim",p);let O=p.split(" ").map(D=>te(D,this.options)).join(" ").split(/\s+/).map(D=>Le(D,this.options));g&&(O=O.filter(D=>(u("loose invalid filter",D,this.options),!!D.match(l[c.COMPARATORLOOSE])))),u("range list",O);const A=new Map,x=O.map(D=>new f(D,this.options));for(const D of x){if(B(D))return[D];A.set(D.value,D)}A.size>1&&A.has("")&&A.delete("");const G=[...A.values()];return s.set(w,G),G}intersects(p,y){if(!(p instanceof e))throw new TypeError("a Range is required");return this.set.some(w=>q(w,y)&&p.set.some(L=>q(L,y)&&w.every(g=>L.every(N=>g.intersects(N,y)))))}test(p){if(!p)return!1;if(typeof p=="string")try{p=new $(p,this.options)}catch{return!1}for(let y=0;yE.value==="<0.0.0-0",V=E=>E.value==="",q=(E,p)=>{let y=!0;const w=E.slice();let L=w.pop();for(;y&&w.length;)y=w.every(g=>L.intersects(g,p)),L=w.pop();return y},te=(E,p)=>(u("comp",E,p),E=ae(E,p),u("caret",E),E=H(E,p),u("tildes",E),E=le(E,p),u("xrange",E),E=ye(E,p),u("stars",E),E),b=E=>!E||E.toLowerCase()==="x"||E==="*",H=(E,p)=>E.trim().split(/\s+/).map(y=>Re(y,p)).join(" "),Re=(E,p)=>{const y=p.loose?l[c.TILDELOOSE]:l[c.TILDE];return E.replace(y,(w,L,g,N,O)=>{u("tilde",E,w,L,g,N,O);let A;return b(L)?A="":b(g)?A=`>=${L}.0.0 <${+L+1}.0.0-0`:b(N)?A=`>=${L}.${g}.0 <${L}.${+g+1}.0-0`:O?(u("replaceTilde pr",O),A=`>=${L}.${g}.${N}-${O} <${L}.${+g+1}.0-0`):A=`>=${L}.${g}.${N} <${L}.${+g+1}.0-0`,u("tilde return",A),A})},ae=(E,p)=>E.trim().split(/\s+/).map(y=>X(y,p)).join(" "),X=(E,p)=>{u("caret",E,p);const y=p.loose?l[c.CARETLOOSE]:l[c.CARET],w=p.includePrerelease?"-0":"";return E.replace(y,(L,g,N,O,A)=>{u("caret",E,L,g,N,O,A);let x;return b(g)?x="":b(N)?x=`>=${g}.0.0${w} <${+g+1}.0.0-0`:b(O)?g==="0"?x=`>=${g}.${N}.0${w} <${g}.${+N+1}.0-0`:x=`>=${g}.${N}.0${w} <${+g+1}.0.0-0`:A?(u("replaceCaret pr",A),g==="0"?N==="0"?x=`>=${g}.${N}.${O}-${A} <${g}.${N}.${+O+1}-0`:x=`>=${g}.${N}.${O}-${A} <${g}.${+N+1}.0-0`:x=`>=${g}.${N}.${O}-${A} <${+g+1}.0.0-0`):(u("no pr"),g==="0"?N==="0"?x=`>=${g}.${N}.${O}${w} <${g}.${N}.${+O+1}-0`:x=`>=${g}.${N}.${O}${w} <${g}.${+N+1}.0-0`:x=`>=${g}.${N}.${O} <${+g+1}.0.0-0`),u("caret return",x),x})},le=(E,p)=>(u("replaceXRanges",E,p),E.split(/\s+/).map(y=>Ie(y,p)).join(" ")),Ie=(E,p)=>{E=E.trim();const y=p.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return E.replace(y,(w,L,g,N,O,A)=>{u("xRange",E,w,L,g,N,O,A);const x=b(g),G=x||b(N),D=G||b(O),ee=D;return L==="="&&ee&&(L=""),A=p.includePrerelease?"-0":"",x?L===">"||L==="<"?w="<0.0.0-0":w="*":L&&ee?(G&&(N=0),O=0,L===">"?(L=">=",G?(g=+g+1,N=0,O=0):(N=+N+1,O=0)):L==="<="&&(L="<",G?g=+g+1:N=+N+1),L==="<"&&(A="-0"),w=`${L+g}.${N}.${O}${A}`):G?w=`>=${g}.0.0${A} <${+g+1}.0.0-0`:D&&(w=`>=${g}.${N}.0${A} <${g}.${+N+1}.0-0`),u("xRange return",w),w})},ye=(E,p)=>(u("replaceStars",E,p),E.trim().replace(l[c.STAR],"")),Le=(E,p)=>(u("replaceGTE0",E,p),E.trim().replace(l[p.includePrerelease?c.GTE0PRE:c.GTE0],"")),ce=E=>(p,y,w,L,g,N,O,A,x,G,D,ee)=>(b(w)?y="":b(L)?y=`>=${w}.0.0${E?"-0":""}`:b(g)?y=`>=${w}.${L}.0${E?"-0":""}`:N?y=`>=${y}`:y=`>=${y}${E?"-0":""}`,b(x)?A="":b(G)?A=`<${+x+1}.0.0-0`:b(D)?A=`<${x}.${+G+1}.0-0`:ee?A=`<=${x}.${G}.${D}-${ee}`:E?A=`<${x}.${G}.${+D+1}-0`:A=`<=${A}`,`${y} ${A}`.trim()),J=(E,p,y)=>{for(let w=0;w0){const L=E[w].semver;if(L.major===p.major&&L.minor===p.minor&&L.patch===p.patch)return!0}return!1}return!0};return Oe}var Ce,pt;function ve(){if(pt)return Ce;pt=1;const i=Symbol("SemVer ANY");class e{static get ANY(){return i}constructor(m,R){if(R=t(R),m instanceof e){if(m.loose===!!R.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),u("comparator",m,R),this.options=R,this.loose=!!R.loose,this.parse(m),this.semver===i?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(m){const R=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],_=m.match(R);if(!_)throw new TypeError(`Invalid comparator: ${m}`);this.operator=_[1]!==void 0?_[1]:"",this.operator==="="&&(this.operator=""),_[2]?this.semver=new $(_[2],this.options.loose):this.semver=i}toString(){return this.value}test(m){if(u("Comparator.test",m,this.options.loose),this.semver===i||m===i)return!0;if(typeof m=="string")try{m=new $(m,this.options)}catch{return!1}return f(m,this.operator,this.semver,this.options)}intersects(m,R){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(m.value,R).test(this.value):m.operator===""?m.value===""?!0:new l(this.value,R).test(m.semver):(R=t(R),R.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!R.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||f(this.semver,"<",m.semver,R)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||f(this.semver,">",m.semver,R)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}Ce=e;const t=De,{safeRe:s,t:o}=oe,f=xt,u=we,$=U,l=K();return Ce}const Fn=K(),jn=(i,e,t)=>{try{e=new Fn(e,t)}catch{return!1}return e.test(i)};var $e=jn;const Gn=K(),kn=(i,e)=>new Gn(i,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));var Wn=kn;const Mn=U,Un=K(),Vn=(i,e,t)=>{let s=null,o=null,f=null;try{f=new Un(e,t)}catch{return null}return i.forEach(u=>{f.test(u)&&(!s||o.compare(u)===-1)&&(s=u,o=new Mn(s,t))}),s};var Xn=Vn;const Hn=U,Bn=K(),qn=(i,e,t)=>{let s=null,o=null,f=null;try{f=new Bn(e,t)}catch{return null}return i.forEach(u=>{f.test(u)&&(!s||o.compare(u)===1)&&(s=u,o=new Hn(s,t))}),s};var zn=qn;const Pe=U,Yn=K(),mt=ge,Kn=(i,e)=>{i=new Yn(i,e);let t=new Pe("0.0.0");if(i.test(t)||(t=new Pe("0.0.0-0"),i.test(t)))return t;t=null;for(let s=0;s{const $=new Pe(u.semver.version);switch(u.operator){case">":$.prerelease.length===0?$.patch++:$.prerelease.push(0),$.raw=$.format();case"":case">=":(!f||mt($,f))&&(f=$);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),f&&(!t||mt(t,f))&&(t=f)}return t&&i.test(t)?t:null};var Zn=Kn;const Jn=K(),Qn=(i,e)=>{try{return new Jn(i,e).range||"*"}catch{return null}};var es=Qn;const ts=U,bt=ve(),{ANY:rs}=bt,ns=K(),ss=$e,Et=ge,wt=je,is=ke,os=Ge,as=(i,e,t,s)=>{i=new ts(i,s),e=new ns(e,s);let o,f,u,$,l;switch(t){case">":o=Et,f=is,u=wt,$=">",l=">=";break;case"<":o=wt,f=os,u=Et,$="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ss(i,e,s))return!1;for(let c=0;c{I.semver===rs&&(I=new bt(">=0.0.0")),R=R||I,_=_||I,o(I.semver,R.semver,s)?R=I:u(I.semver,_.semver,s)&&(_=I)}),R.operator===$||R.operator===l||(!_.operator||_.operator===$)&&f(i,_.semver))return!1;if(_.operator===l&&u(i,_.semver))return!1}return!0};var We=as;const ls=We,cs=(i,e,t)=>ls(i,e,">",t);var hs=cs;const fs=We,us=(i,e,t)=>fs(i,e,"<",t);var ds=us;const gt=K(),ps=(i,e,t)=>(i=new gt(i,t),e=new gt(e,t),i.intersects(e,t));var ms=ps;const Es=$e,ws=Y;var gs=(i,e,t)=>{const s=[];let o=null,f=null;const u=i.sort((m,R)=>ws(m,R,t));for(const m of u)Es(m,e,t)?(f=m,o||(o=m)):(f&&s.push([o,f]),f=null,o=null);o&&s.push([o,null]);const $=[];for(const[m,R]of s)m===R?$.push(m):!R&&m===u[0]?$.push("*"):R?m===u[0]?$.push(`<=${R}`):$.push(`${m} - ${R}`):$.push(`>=${m}`);const l=$.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{if(i===e)return!0;i=new vt(i,t),e=new vt(e,t);let s=!1;e:for(const o of i.set){for(const f of e.set){const u=Rs(o,f,t);if(s=s||u!==null,u)continue e}if(s)return!1}return!0},$s=[new Me(">=0.0.0-0")],$t=[new Me(">=0.0.0")],Rs=(i,e,t)=>{if(i===e)return!0;if(i.length===1&&i[0].semver===_e){if(e.length===1&&e[0].semver===_e)return!0;t.includePrerelease?i=$s:i=$t}if(e.length===1&&e[0].semver===_e){if(t.includePrerelease)return!0;e=$t}const s=new Set;let o,f;for(const I of i)I.operator===">"||I.operator===">="?o=Rt(o,I,t):I.operator==="<"||I.operator==="<="?f=It(f,I,t):s.add(I.semver);if(s.size>1)return null;let u;if(o&&f){if(u=Ue(o.semver,f.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||f.operator!=="<="))return null}for(const I of s){if(o&&!ie(I,String(o),t)||f&&!ie(I,String(f),t))return null;for(const T of e)if(!ie(I,String(T),t))return!1;return!0}let $,l,c,m,R=f&&!t.includePrerelease&&f.semver.prerelease.length?f.semver:!1,_=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;R&&R.prerelease.length===1&&f.operator==="<"&&R.prerelease[0]===0&&(R=!1);for(const I of e){if(m=m||I.operator===">"||I.operator===">=",c=c||I.operator==="<"||I.operator==="<=",o){if(_&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===_.major&&I.semver.minor===_.minor&&I.semver.patch===_.patch&&(_=!1),I.operator===">"||I.operator===">="){if($=Rt(o,I,t),$===I&&$!==o)return!1}else if(o.operator===">="&&!ie(o.semver,String(I),t))return!1}if(f){if(R&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===R.major&&I.semver.minor===R.minor&&I.semver.patch===R.patch&&(R=!1),I.operator==="<"||I.operator==="<="){if(l=It(f,I,t),l===I&&l!==f)return!1}else if(f.operator==="<="&&!ie(f.semver,String(I),t))return!1}if(!I.operator&&(f||o)&&u!==0)return!1}return!(o&&c&&!f&&u!==0||f&&m&&!o&&u!==0||_||R)},Rt=(i,e,t)=>{if(!i)return e;const s=Ue(i.semver,e.semver,t);return s>0?i:s<0||e.operator===">"&&i.operator===">="?e:i},It=(i,e,t)=>{if(!i)return e;const s=Ue(i.semver,e.semver,t);return s<0?i:s>0||e.operator==="<"&&i.operator==="<="?e:i};var Is=vs;const xe=oe,yt=Ee,ys=U,Lt=Ct,Ls=se,Ts=Cr,Ss=xr,Ns=Dr,As=jr,Os=Wr,Cs=Vr,Ps=Br,_s=Yr,xs=Y,bs=Qr,Ds=rn,Fs=Fe,js=an,Gs=hn,ks=ge,Ws=je,Ms=Pt,Us=_t,Vs=Ge,Xs=ke,Hs=xt,Bs=xn,qs=ve(),zs=K(),Ys=$e,Ks=Wn,Zs=Xn,Js=zn,Qs=Zn,ei=es,ti=We,ri=hs,ni=ds,si=ms,ii=gs,oi=Is;var ai={parse:Ls,valid:Ts,clean:Ss,inc:Ns,diff:As,major:Os,minor:Cs,patch:Ps,prerelease:_s,compare:xs,rcompare:bs,compareLoose:Ds,compareBuild:Fs,sort:js,rsort:Gs,gt:ks,lt:Ws,eq:Ms,neq:Us,gte:Vs,lte:Xs,cmp:Hs,coerce:Bs,Comparator:qs,Range:zs,satisfies:Ys,toComparators:Ks,maxSatisfying:Zs,minSatisfying:Js,minVersion:Qs,validRange:ei,outside:ti,gtr:ri,ltr:ni,intersects:si,simplifyRange:ii,subset:oi,SemVer:ys,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:yt.SEMVER_SPEC_VERSION,RELEASE_TYPES:yt.RELEASE_TYPES,compareIdentifiers:Lt.compareIdentifiers,rcompareIdentifiers:Lt.rcompareIdentifiers};const li=St(ai);var Dt={exports:{}};(function(i){(function(){function e(r,n,h){return r.call.apply(r.bind,arguments)}function t(r,n,h){if(!r)throw Error();if(2=n.f?C():r.fonts.load(Re(n.a),n.h).then(function(F){1<=F.length?S():setTimeout(P,25)},function(){C()})}P()}),d=null,v=new Promise(function(S,C){d=setTimeout(C,n.f)});Promise.race([v,a]).then(function(){d&&(clearTimeout(d),d=null),n.g(n.a)},function(){n.j(n.a)})};function N(r,n,h,a,d,v,S){this.v=r,this.B=n,this.c=h,this.a=a,this.s=S||"BESbswy",this.f={},this.w=d||3e3,this.u=v||null,this.m=this.j=this.h=this.g=null,this.g=new y(this.c,this.s),this.h=new y(this.c,this.s),this.j=new y(this.c,this.s),this.m=new y(this.c,this.s),r=new H(this.a.c+",serif",X(this.a)),r=L(r),this.g.a.style.cssText=r,r=new H(this.a.c+",sans-serif",X(this.a)),r=L(r),this.h.a.style.cssText=r,r=new H("serif",X(this.a)),r=L(r),this.j.a.style.cssText=r,r=new H("sans-serif",X(this.a)),r=L(r),this.m.a.style.cssText=r,w(this.g),w(this.h),w(this.j),w(this.m)}var O={D:"serif",C:"sans-serif"},A=null;function x(){if(A===null){var r=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);A=!!r&&(536>parseInt(r[1],10)||parseInt(r[1],10)===536&&11>=parseInt(r[2],10))}return A}N.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),D(this)};function G(r,n,h){for(var a in O)if(O.hasOwnProperty(a)&&n===r.f[O[a]]&&h===r.f[O[a]])return!0;return!1}function D(r){var n=r.g.a.offsetWidth,h=r.h.a.offsetWidth,a;(a=n===r.f.serif&&h===r.f["sans-serif"])||(a=x()&&G(r,n,h)),a?o()-r.A>=r.w?x()&&G(r,n,h)&&(r.u===null||r.u.hasOwnProperty(r.a.c))?Te(r,r.v):Te(r,r.B):ee(r):Te(r,r.v)}function ee(r){setTimeout(s(function(){D(this)},r),50)}function Te(r,n){setTimeout(s(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),n(this.a)},r),0)}function Se(r,n,h){this.c=r,this.a=n,this.f=0,this.m=this.j=!1,this.s=h}var he=null;Se.prototype.g=function(r){var n=this.a;n.g&&m(n.f,[n.a.c("wf",r.c,X(r).toString(),"active")],[n.a.c("wf",r.c,X(r).toString(),"loading"),n.a.c("wf",r.c,X(r).toString(),"inactive")]),J(n,"fontactive",r),this.m=!0,Ve(this)},Se.prototype.h=function(r){var n=this.a;if(n.g){var h=R(n.f,n.a.c("wf",r.c,X(r).toString(),"active")),a=[],d=[n.a.c("wf",r.c,X(r).toString(),"loading")];h||a.push(n.a.c("wf",r.c,X(r).toString(),"inactive")),m(n.f,a,d)}J(n,"fontinactive",r),Ve(this)};function Ve(r){--r.f==0&&r.j&&(r.m?(r=r.a,r.g&&m(r.f,[r.a.c("wf","active")],[r.a.c("wf","loading"),r.a.c("wf","inactive")]),J(r,"active")):ce(r.a))}function Xe(r){this.j=r,this.a=new E,this.h=0,this.f=this.g=!0}Xe.prototype.load=function(r){this.c=new f(this.j,r.context||this.j),this.g=r.events!==!1,this.f=r.classes!==!1,jt(this,new ye(this.c,r),r)};function Ft(r,n,h,a,d){var v=--r.h==0;(r.f||r.g)&&setTimeout(function(){var S=d||null,C=a||null||{};if(h.length===0&&v)ce(n.a);else{n.f+=h.length,v&&(n.j=v);var P,F=[];for(P=0;Pthis.createElement(o));t.replaceChildren(...s)}createElement(e){if(e.type=="separator"){const t=document.createElement("div");return t.classList.add("separator"),t}if(e.type=="selection"||e.type=="checkbox"||e.type=="dropdown"){const t=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");let f;if(e.type=="selection"||e.type=="checkbox"){const u=Kt[e.id]??{label:e.id,combos:[],callback:()=>{}};f=document.createElement("div"),f.innerText=Nt.getKeybindString(e.id),f.classList.add("keybind","unselectable"),o.innerText=u.label;let $=u.disabled;typeof $=="function"&&($=$(this.app)),$&&t.classList.add("disabled"),t.addEventListener("click",()=>{if($)return;u.callback(this.app),t.closest(".menu-main").querySelector(".menubar-dropdown").replaceChildren()})}else f=Zt.getIcon("CHEVRON",16),f.style.transform="rotate(-90deg)",o.innerText=typeof e.title=="function"?e.title(this.app):e.title;if(s.appendChild(o),s.appendChild(f),t.appendChild(s),t.classList.add("menu-item"),s.classList.add("menu-item-title","menu-hover"),o.classList.add("title","unselectable"),e.type=="dropdown"){const u=document.createElement("div");t.appendChild(u),u.classList.add("menubar-dropdown"),e.options.map($=>this.createElement($)).forEach($=>u.appendChild($))}if(e.type=="checkbox"){let u=e.checked;typeof u=="function"&&(u=u(this.app)),u&&(o.innerText="✓ "+o.innerText)}return t}if(e.type=="menu"){const t=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");return t.appendChild(s),s.innerText=e.title,t.appendChild(o),s.classList.add("title","unselectable"),t.classList.add("menu-item","menu-main"),s.classList.add("menu-hover"),o.classList.add("menubar-dropdown","unselectable"),t.onmouseenter=()=>{o.replaceChildren(...e.options.map(f=>this.createElement(f)))},t.onmouseleave=()=>{o.replaceChildren()},t}return document.createElement("div")}}class ui{view;windows=[];app;constructor(e,t){this.app=e,this.view=t}unfocusAll(){for(const e of this.view.querySelectorAll(".focused"))e.classList.remove("focused")}getFocusedWindow(){for(const e of this.windows)if(e.windowElement.classList.contains("focused"))return e;return null}isBlocked(){return!this.windows.every(e=>!e.options.blocking)}openWindow(e){if(e.options.win_id){const t=this.getWindowById(e.options.win_id);if(t){t.focus();return}}e.addToManager(this),this.windows.push(e)}removeWindow(e){this.windows.splice(this.windows.indexOf(e),1)}getWindowById(e){for(const t of this.windows)if(t.options.win_id==e)return t}}class di{options=k;events=Ne;themes=Ae;renderer;ticker;stage;view;chartManager;windowManager;menubarManager;actionHistory;lastWidth=window.innerWidth;lastHeight=window.innerHeight;constructor(){if(er.setDefaultProps({duration:[200,100],theme:"sm"}),window.nw){const e=nw.Window.get();nw.App.on("open",t=>{if(!t||t?.length===0){nw.Window.open(window.location.href);return}let s="";for(let o of t)if(o.startsWith("file://")&&(o=o.substring(7)),fe(o)==".ssc"){s=o;break}else s==""&&fe(o)==".sm"&&(s=o);s!=""&&(this.chartManager.loadSM(s),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}),window.addEventListener("keydown",t=>{t.key=="r"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.reload()),t.code=="KeyW"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.close()),process.versions["nw-flavor"]=="sdk"&&t.code=="KeyI"&&t.metaKey&&t.altKey&&(t.preventDefault(),e.showDevTools())}),e.on("enter-fullscreen",()=>{k.app.fullscreen=e.isFullscreen}),e.on("resize",(t,s)=>{e.isFullscreen||(k.app.width=t,k.app.height=s)}),e.on("restore",()=>{k.app.fullscreen=e.isFullscreen}),this.checkAppVersion()}if(k.loadOptions(),tr(),Nt.load(this),window.nw){const e=nw.Window.get();k.app.fullscreen?e.enterFullscreen():e.resizeTo(k.app.width,k.app.height)}if(setInterval(()=>k.saveOptions(),1e4),k.general.smoothAnimations&&document.body.classList.add("animated"),this.registerFonts(),this.view=document.getElementById("pixi"),document.oncontextmenu=e=>{e.preventDefault(),this.chartManager.loadedChart&&e.target==this.view&&Je.open(this,e)},this.view.onmousedown=()=>{Je.close()},this.stage=new rr,this.stage.sortableChildren=!0,this.renderer=new nr({backgroundColor:1579292,antialias:k.performance.antialiasing,width:this.view.clientWidth,height:this.view.clientHeight,resolution:k.performance.resolution,autoDensity:!0,view:this.view,powerPreference:"low-power"}),this.ticker=new sr,this.ticker.maxFPS=0,this.ticker.add(()=>{const e=performance.now();this.renderer.render(this.stage),Qe.instance?.addFrameTimeValue(performance.now()-e),performance.memory?.usedJSHeapSize&&Qe.instance?.addMemoryTimeValue(performance.memory.usedJSHeapSize),pr()},ir.LOW),this.ticker.start(),or.init(this.renderer),this.chartManager=new ar(this),this.menubarManager=new fi(this,document.getElementById("menubar")),this.windowManager=new ui(this,document.getElementById("windows")),this.actionHistory=new et(this),this.registerListeners(),!W.hidePoweredByText&&lr()){const e=document.getElementById("embed");e.appendChild(document.createTextNode("Powered by "));const t=document.createElement("a");if(t.href="https://tillvit.github.io/smeditor/",t.innerText="SMEditor",t.target="_blank",e.appendChild(t),W.url!=null){e.appendChild(document.createTextNode(" | Open this chart in a "));const s=document.createElement("a"),o=new URL(location.origin+"/smeditor/app/");s.innerText="new tab",s.target="_blank",o.searchParams.append("url",W.url),W.chartType!==null&&o.searchParams.append("chartType",W.chartType),W.chartIndex!==null&&o.searchParams.append("chartIndex",W.chartIndex+""),s.href=o.toString(),e.appendChild(s)}}tt.initFileSystem().then(()=>{if(W.url){this.chartManager.loadSM(W.url).then(()=>{const e=this.chartManager.loadedSM;if(!e)return;let t;if(W.chartType!=null&&(t=e.charts[W.chartType],t===void 0)){nt.createFormatted(`Couldn't find chart with type ${W.chartType}`,"warn");return}if(t===void 0){const o=Object.keys(e.charts);if(o.length==0||(t=e.charts[o[0]],t.length==0))return}let s;if(W.chartIndex!=null&&(s=t.at(W.chartIndex),s===void 0)){nt.createFormatted(`Couldn't find chart with index ${W.chartIndex}`,"warn");return}s===void 0&&(s=t.at(-1),!s)||this.chartManager.loadChart(s)});return}this.windowManager.openWindow(new cr(this))}),window.onbeforeunload=e=>{if(et.instance.isDirty()&&k.general.warnBeforeExit)return e.preventDefault(),e.returnValue="Are you sure you want to exit?"},window.onunload=()=>{k.saveOptions()},Ae.loadTheme(k.general.theme)}registerFonts(){rt.from("Main",{fontFamily:"Assistant",fontSize:20,fill:"white"},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio}),rt.from("Fancy",{fontFamily:"Assistant",fontSize:40,fontWeight:"700",fill:["#dddddd","#ffffff"],fillGradientType:hr.LINEAR_VERTICAL,stroke:11184810,strokeThickness:3},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio})}registerListeners(){this.view.addEventListener("mousedown",()=>{this.windowManager.unfocusAll()}),Ne.on("themeChanged",()=>{this.renderer.background.color=new fr(Ae.getCurrentTheme()["editor-bg"]).toNumber()}),window.addEventListener("keydown",function(e){e.code=="Enter"&&e.target instanceof HTMLButtonElement&&e.preventDefault()}),window.addEventListener("dragstart",function(e){e.target instanceof HTMLImageElement&&e.preventDefault()}),setInterval(()=>{const e=window.innerWidth,t=window.innerHeight-document.getElementById("menubar").clientHeight-document.getElementById("playback-options").clientHeight;(this.lastHeight!=t||this.lastWidth!=e)&&(this.lastHeight=t,this.lastWidth=e,this.onResize(e,t),Ne.emit("resize"))},100),window.addEventListener("dragover",e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"}),window.addEventListener("drop",e=>{if(window.nw){e.stopPropagation(),e.preventDefault();let t="";for(const s of e.dataTransfer.files)if(s.path)if(fe(s.path)==".ssc"){t=s.path;break}else t==""&&fe(s.path)==".sm"&&(t=s.path);t!=""&&(this.chartManager.loadSM(t),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}else tt.handleDropEvent(e).then(t=>{const s=new ur(this,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:o=>{this.chartManager.loadSM(o),this.windowManager.getWindowById("select_sm_initial")?.closeWindow()},onload:()=>{s.getAcceptableFile(t??"").then(o=>s.selectPath(o))}});this.windowManager.openWindow(s)})})}onResize(e,t){this.renderer.screen.width=e,this.renderer.screen.height=t,this.view.width=e*this.renderer.resolution,this.view.height=t*this.renderer.resolution,this.view.style.width=`${e}px`,this.view.style.height=`${t}px`}checkAppVersion(){if(!window.nw)return;const e=nw.require("nw.gui"),t={stable:3,beta:2,alpha:1,nightly:0};let s="win";process.platform=="darwin"?s=nw.require("os").arch()=="arm64"?"mac-arm":"mac-x64":process.platform=="linux"&&(s="linux"),fetch("/smeditor/assets/app/versions.json").then(o=>o.json()).then(o=>{o=o.sort((u,$)=>t[u.type]!=t[$.type]?t[$.type]-t[u.type]:$.date-u.date);const f=o[0];li.lt(e.App.manifest.version,f.version)&&localStorage.getItem("downloadedVersion")!==f.version&&dr.open(f.version,f.downloads[s])})}}document.querySelector("body").innerHTML=`
diff --git a/app/index.html b/app/index.html index 74f8b036..06af7ccb 100644 --- a/app/index.html +++ b/app/index.html @@ -24,7 +24,7 @@ SMEditor - + diff --git a/downloader-df03ddd3.js b/downloader-0aae82d5.js similarity index 97% rename from downloader-df03ddd3.js rename to downloader-0aae82d5.js index 951ae036..e293dff2 100644 --- a/downloader-df03ddd3.js +++ b/downloader-0aae82d5.js @@ -1 +1 @@ -import{a8 as w,a4 as b}from"./ChartManager-eb846239.js";const{GONE:v}=b,E=/constructor/i.test(window.HTMLElement)||window.safari||window.WebKitPoint;class j{constructor(e="unknown"){this.kind="file",this.writable=!0,this.name=e}async getFile(){throw new DOMException(...v)}async createWritable(e={}){var t;if(e.keepExistingData)throw new TypeError("Option keepExistingData is not implemented");const h=globalThis.TransformStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).TransformStream,p=globalThis.WritableStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).WritableStream,s=await((t=navigator.serviceWorker)===null||t===void 0?void 0:t.getRegistration()),o=document.createElement("a"),i=new h,u=i.writable;if(o.download=this.name,E||!s){let a=[];i.readable.pipeTo(new p({write(r){a.push(new Blob([r]))},close(){const r=new Blob(a,{type:"application/octet-stream; charset=utf-8"});a=[],o.href=URL.createObjectURL(r),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:a,readablePort:r}=new k(p),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),f={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},g=setTimeout(()=>s.active.postMessage(0),1e4);i.readable.pipeThrough(new h({transform(l,_){if(l instanceof Uint8Array)return _.enqueue(l);const R=new Response(l).body.getReader(),m=W=>R.read().then(y=>y.done?0:m(_.enqueue(y.value)));return m()}})).pipeTo(a).finally(()=>{clearInterval(g)}),s.active.postMessage({url:s.scope+n,headers:f,readablePort:r},[r]);const c=document.createElement("iframe");c.hidden=!0,c.src=s.scope+n,document.body.appendChild(c)}return u.getWriter()}async isSameEntry(e){return this===e}}const P=0,T=0,M=1,S=1,L=2;class O{constructor(e){this._readyPending=!1,this._port=e,this._resetReady(),this._port.onmessage=t=>this._onMessage(t.data)}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:P,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:L}),this._port.close()}abort(e){this._port.postMessage({type:S,reason:e}),this._port.close()}_onMessage(e){e.type===T&&this._resolveReady(),e.type===M&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class k{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new O(t.port2))}}export{j as FileHandle}; +import{a8 as w,a4 as b}from"./ChartManager-a4938337.js";const{GONE:v}=b,E=/constructor/i.test(window.HTMLElement)||window.safari||window.WebKitPoint;class j{constructor(e="unknown"){this.kind="file",this.writable=!0,this.name=e}async getFile(){throw new DOMException(...v)}async createWritable(e={}){var t;if(e.keepExistingData)throw new TypeError("Option keepExistingData is not implemented");const h=globalThis.TransformStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).TransformStream,p=globalThis.WritableStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).WritableStream,s=await((t=navigator.serviceWorker)===null||t===void 0?void 0:t.getRegistration()),o=document.createElement("a"),i=new h,u=i.writable;if(o.download=this.name,E||!s){let a=[];i.readable.pipeTo(new p({write(r){a.push(new Blob([r]))},close(){const r=new Blob(a,{type:"application/octet-stream; charset=utf-8"});a=[],o.href=URL.createObjectURL(r),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:a,readablePort:r}=new k(p),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),f={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},g=setTimeout(()=>s.active.postMessage(0),1e4);i.readable.pipeThrough(new h({transform(l,_){if(l instanceof Uint8Array)return _.enqueue(l);const R=new Response(l).body.getReader(),m=W=>R.read().then(y=>y.done?0:m(_.enqueue(y.value)));return m()}})).pipeTo(a).finally(()=>{clearInterval(g)}),s.active.postMessage({url:s.scope+n,headers:f,readablePort:r},[r]);const c=document.createElement("iframe");c.hidden=!0,c.src=s.scope+n,document.body.appendChild(c)}return u.getWriter()}async isSameEntry(e){return this===e}}const P=0,T=0,M=1,S=1,L=2;class O{constructor(e){this._readyPending=!1,this._port=e,this._resetReady(),this._port.onmessage=t=>this._onMessage(t.data)}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:P,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:L}),this._port.close()}abort(e){this._port.postMessage({type:S,reason:e}),this._port.close()}_onMessage(e){e.type===T&&this._resolveReady(),e.type===M&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class k{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new O(t.port2))}}export{j as FileHandle}; diff --git a/embed.js b/embed.js index c440a53f..b6aba9d2 100644 --- a/embed.js +++ b/embed.js @@ -1 +1 @@ -import{t as I,q as T,r as E,S as P,G as R}from"./ChartManager-eb846239.js";const m=new Set;document.addEventListener("DOMContentLoaded",()=>{const c=document.getElementById("output-url"),w=document.getElementById("output-iframe"),o=document.getElementById("sm-url"),b=document.getElementById("chart-container");let r=document.getElementById("loading-output");const f=document.getElementById("option-grid");let h,p,k="",d,u;I.setDefaultProps({duration:[200,100]}),I(c,{content:"Click to copy to clipboard",placement:"bottom"});function i(e,t){const n=r.cloneNode(!0);r.parentNode.replaceChild(n,r),r=n,r.innerText=e,t=="error"?r.style.color="rgba(222, 44, 44, 0.9)":r.style.color=""}function s(){const e=new URL(`${location.origin}/smeditor/app/`);p!==void 0&&e.searchParams.set("url",p),u!==void 0&&e.searchParams.set("chartType",u),d!==void 0&&e.searchParams.set("chartIndex",d+""),m.size>0&&e.searchParams.set("flags",[...m.values()].join("")),c.value=e.toString(),k!=e.toString()&&(w.src=e.toString()),k=e.toString()}s(),c.onclick=e=>{e.preventDefault(),c.blur(),navigator.clipboard.writeText(c.value),setTimeout(()=>c.select(),10)},c.onselect=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)},c.ondblclick=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)};let g;function L(){if(!o.checkValidity())return;p=void 0,s();const e=o.value;if(e===""){o.classList.remove("invalid","ok"),i("");return}o.classList.remove("invalid","ok"),i("Loading...");const t=new AbortController,n=setTimeout(()=>{o.classList.add("invalid"),t.abort(),i("Failed to load the specified URL!","error")},5e3);fetch(e,{signal:t.signal}).then(a=>{if(!a.ok){o.classList.add("invalid"),i("Failed to load the specified URL!","error");return}clearTimeout(n),a.text().then(async S=>{const B=new URL(e),D=new File([S],B.pathname.split("/").pop()??"song.sm");i("Loading charts...");const y=new P(D);await y.loaded,y.properties.TITLE===void 0&&i("Invalid file provided!","error"),h=y,p=e,d=void 0,u=void 0,i(""),s(),C()}),o.classList.add("ok")}).catch(()=>{o.classList.add("invalid"),i("Failed to load the specified URL!","error")})}o.onkeydown=e=>{o.classList.remove("invalid"),o.classList.remove("ok"),i(""),clearTimeout(g),g=setTimeout(()=>L(),1e3),(e.key=="Enter"||e.key=="Escape")&&o.blur()},o.onblur=()=>{o.checkValidity()&&(clearInterval(g),L())};const v=T.create([]);v.onChange(e=>{const t=e.split(" ")?.[0]??"dance-single",n=h?.charts[t]??[];l.setItems(n.map(a=>`${a.difficulty} ${a.meter}`)),l.setSelected(l.getItems().at(-1)),n.length!=0&&(console.log(n.length),t!="dance-single"?u=t:u=void 0,s())});const l=T.create([]);l.onChange((e,t)=>{d!=l.getItems().length-1?d=t:d=void 0,s()}),b.appendChild(v.view),b.appendChild(l.view);function C(){v.setItems(R.getPriority().map(t=>{const n=h.charts[t.id]??[];return t.id+" ("+n.length+")"}));const e=h?.charts["dance-single"]??[];l.setItems(e.map(t=>`${t.difficulty} ${t.meter}`)),l.setSelected(l.getItems().at(-1))}Object.entries(E).forEach(([e,t])=>{const n=document.createElement("label");n.classList.add("option");const a=document.createElement("input");a.type="checkbox",n.replaceChildren(a,document.createTextNode(t.name)),a.onchange=()=>{a.checked?m.add(t.char):m.delete(t.char),s()},f.appendChild(n)});const U=document.getElementById("enable-all");U.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!0}for(const e of Object.values(E).map(t=>t.char))m.add(e);s()};const x=document.getElementById("disable-all");x.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!1}m.clear(),s()}}); +import{t as I,q as T,r as E,S as P,G as R}from"./ChartManager-a4938337.js";const m=new Set;document.addEventListener("DOMContentLoaded",()=>{const c=document.getElementById("output-url"),w=document.getElementById("output-iframe"),o=document.getElementById("sm-url"),b=document.getElementById("chart-container");let r=document.getElementById("loading-output");const f=document.getElementById("option-grid");let h,p,k="",d,u;I.setDefaultProps({duration:[200,100]}),I(c,{content:"Click to copy to clipboard",placement:"bottom"});function i(e,t){const n=r.cloneNode(!0);r.parentNode.replaceChild(n,r),r=n,r.innerText=e,t=="error"?r.style.color="rgba(222, 44, 44, 0.9)":r.style.color=""}function s(){const e=new URL(`${location.origin}/smeditor/app/`);p!==void 0&&e.searchParams.set("url",p),u!==void 0&&e.searchParams.set("chartType",u),d!==void 0&&e.searchParams.set("chartIndex",d+""),m.size>0&&e.searchParams.set("flags",[...m.values()].join("")),c.value=e.toString(),k!=e.toString()&&(w.src=e.toString()),k=e.toString()}s(),c.onclick=e=>{e.preventDefault(),c.blur(),navigator.clipboard.writeText(c.value),setTimeout(()=>c.select(),10)},c.onselect=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)},c.ondblclick=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)};let g;function L(){if(!o.checkValidity())return;p=void 0,s();const e=o.value;if(e===""){o.classList.remove("invalid","ok"),i("");return}o.classList.remove("invalid","ok"),i("Loading...");const t=new AbortController,n=setTimeout(()=>{o.classList.add("invalid"),t.abort(),i("Failed to load the specified URL!","error")},5e3);fetch(e,{signal:t.signal}).then(a=>{if(!a.ok){o.classList.add("invalid"),i("Failed to load the specified URL!","error");return}clearTimeout(n),a.text().then(async S=>{const B=new URL(e),D=new File([S],B.pathname.split("/").pop()??"song.sm");i("Loading charts...");const y=new P(D);await y.loaded,y.properties.TITLE===void 0&&i("Invalid file provided!","error"),h=y,p=e,d=void 0,u=void 0,i(""),s(),C()}),o.classList.add("ok")}).catch(()=>{o.classList.add("invalid"),i("Failed to load the specified URL!","error")})}o.onkeydown=e=>{o.classList.remove("invalid"),o.classList.remove("ok"),i(""),clearTimeout(g),g=setTimeout(()=>L(),1e3),(e.key=="Enter"||e.key=="Escape")&&o.blur()},o.onblur=()=>{o.checkValidity()&&(clearInterval(g),L())};const v=T.create([]);v.onChange(e=>{const t=e.split(" ")?.[0]??"dance-single",n=h?.charts[t]??[];l.setItems(n.map(a=>`${a.difficulty} ${a.meter}`)),l.setSelected(l.getItems().at(-1)),n.length!=0&&(console.log(n.length),t!="dance-single"?u=t:u=void 0,s())});const l=T.create([]);l.onChange((e,t)=>{d!=l.getItems().length-1?d=t:d=void 0,s()}),b.appendChild(v.view),b.appendChild(l.view);function C(){v.setItems(R.getPriority().map(t=>{const n=h.charts[t.id]??[];return t.id+" ("+n.length+")"}));const e=h?.charts["dance-single"]??[];l.setItems(e.map(t=>`${t.difficulty} ${t.meter}`)),l.setSelected(l.getItems().at(-1))}Object.entries(E).forEach(([e,t])=>{const n=document.createElement("label");n.classList.add("option");const a=document.createElement("input");a.type="checkbox",n.replaceChildren(a,document.createTextNode(t.name)),a.onchange=()=>{a.checked?m.add(t.char):m.delete(t.char),s()},f.appendChild(n)});const U=document.getElementById("enable-all");U.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!0}for(const e of Object.values(E).map(t=>t.char))m.add(e);s()};const x=document.getElementById("disable-all");x.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!1}m.clear(),s()}}); diff --git a/embed/index.html b/embed/index.html index 497c4922..3f0598e8 100644 --- a/embed/index.html +++ b/embed/index.html @@ -16,7 +16,7 @@ SMEditor - + diff --git a/memory-5b775533.js b/memory-5d567038.js similarity index 98% rename from memory-5b775533.js rename to memory-5d567038.js index 74082c87..9040002d 100644 --- a/memory-5b775533.js +++ b/memory-5d567038.js @@ -1 +1 @@ -import{a4 as c,a5 as y}from"./ChartManager-eb846239.js";let n=globalThis.File,p=globalThis.Blob;const b=o=>{n=o},m=o=>{p=o},{INVALID:z,GONE:s,MISMATCH:w,MOD_ERR:E,SYNTAX:l,DISALLOWED:O}=c;class D{constructor(e,i){this.fileHandle=e,this.file=i?e.file:new n([],e.file.name,e.file),this.size=i?e.file.size:0,this.position=0}async write(e){if(!this.fileHandle.file)throw new DOMException(...s);let i=this.file;if(y(e)){if(e.type==="write"){if(typeof e.position=="number"&&e.position>=0&&(this.position=e.position,this.size=0){if(this.size=0){i=e.sizei.size&&(this.position=i.size),this.file=i;return}else throw new DOMException(...l("truncate requires a size argument"))}e=new p([e]);let t=this.file;const a=t.slice(0,this.position),d=t.slice(this.position+e.size);let r=this.position-a.size;r<0&&(r=0),t=new n([a,new Uint8Array(r),e,d],t.name),this.size=t.size,this.position+=e.size,this.file=t}async close(){if(!this.fileHandle.file)throw new DOMException(...s);this.fileHandle.file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this.kind="file",this.deleted=!1,this.file=i,this.name=e,this.writable=t}async getFile(){if(this.deleted||this.file===null)throw new DOMException(...s);return this.file}async createWritable(e){if(!this.writable)throw new DOMException(...O);if(this.deleted)throw new DOMException(...s);return new D(this,!!e?.keepExistingData)}async isSameEntry(e){return this===e}destroy(){this.deleted=!0,this.file=null}}class h{constructor(e,i=!0){this.kind="directory",this.deleted=!1,this._entries={},this.name=e,this.writable=i}async*entries(){if(this.deleted)throw new DOMException(...s);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i={}){if(this.deleted)throw new DOMException(...s);const t=this._entries[e];if(t){if(t instanceof f)throw new DOMException(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new DOMException(...s)}}async getFileHandle(e,i={}){const t=this._entries[e];if(t){if(t instanceof f)return t;throw new DOMException(...w)}else{if(i.create)return this._entries[e]=new f(e);throw new DOMException(...s)}}async removeEntry(e,i={}){const t=this._entries[e];if(!t)throw new DOMException(...s);t.destroy(i.recursive),delete this._entries[e]}destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new DOMException(...E);i.destroy(e)}this._entries={},this.deleted=!0}}const M=new h(""),g=()=>M;export{f as FileHandle,h as FolderHandle,g as default,m as setBlobImpl,b as setFileImpl}; +import{a4 as c,a5 as y}from"./ChartManager-a4938337.js";let n=globalThis.File,p=globalThis.Blob;const b=o=>{n=o},m=o=>{p=o},{INVALID:z,GONE:s,MISMATCH:w,MOD_ERR:E,SYNTAX:l,DISALLOWED:O}=c;class D{constructor(e,i){this.fileHandle=e,this.file=i?e.file:new n([],e.file.name,e.file),this.size=i?e.file.size:0,this.position=0}async write(e){if(!this.fileHandle.file)throw new DOMException(...s);let i=this.file;if(y(e)){if(e.type==="write"){if(typeof e.position=="number"&&e.position>=0&&(this.position=e.position,this.size=0){if(this.size=0){i=e.sizei.size&&(this.position=i.size),this.file=i;return}else throw new DOMException(...l("truncate requires a size argument"))}e=new p([e]);let t=this.file;const a=t.slice(0,this.position),d=t.slice(this.position+e.size);let r=this.position-a.size;r<0&&(r=0),t=new n([a,new Uint8Array(r),e,d],t.name),this.size=t.size,this.position+=e.size,this.file=t}async close(){if(!this.fileHandle.file)throw new DOMException(...s);this.fileHandle.file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this.kind="file",this.deleted=!1,this.file=i,this.name=e,this.writable=t}async getFile(){if(this.deleted||this.file===null)throw new DOMException(...s);return this.file}async createWritable(e){if(!this.writable)throw new DOMException(...O);if(this.deleted)throw new DOMException(...s);return new D(this,!!e?.keepExistingData)}async isSameEntry(e){return this===e}destroy(){this.deleted=!0,this.file=null}}class h{constructor(e,i=!0){this.kind="directory",this.deleted=!1,this._entries={},this.name=e,this.writable=i}async*entries(){if(this.deleted)throw new DOMException(...s);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i={}){if(this.deleted)throw new DOMException(...s);const t=this._entries[e];if(t){if(t instanceof f)throw new DOMException(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new DOMException(...s)}}async getFileHandle(e,i={}){const t=this._entries[e];if(t){if(t instanceof f)return t;throw new DOMException(...w)}else{if(i.create)return this._entries[e]=new f(e);throw new DOMException(...s)}}async removeEntry(e,i={}){const t=this._entries[e];if(!t)throw new DOMException(...s);t.destroy(i.recursive),delete this._entries[e]}destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new DOMException(...E);i.destroy(e)}this._entries={},this.deleted=!0}}const M=new h(""),g=()=>M;export{f as FileHandle,h as FolderHandle,g as default,m as setBlobImpl,b as setFileImpl}; diff --git a/sw.js b/sw.js index a2b0e24a..6a494249 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const n=(n,l)=>(n=new URL(n+".js",l).href,e[n]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=n,s.onload=e,document.head.appendChild(s)}else s=n,importScripts(n),e()})).then((()=>{let s=e[n];if(!s)throw new Error(`Module ${n} didn’t register its module`);return s})));self.define=(l,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const u=s=>n(s,r),t={module:{uri:r},exports:a,require:u};e[r]=Promise.all(l.map((s=>t[s]||u(s)))).then((s=>(i(...s),a)))}}define(["./workbox-1ab968a5"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"AnimatedSprite-b2d4070f.js",revision:null},{url:"app.js",revision:"69c8242185e59b756e0be9de64eb13f9"},{url:"app/index.html",revision:"70d5796828420386762e9592be8a5ff0"},{url:"assets/ChartManager-00dfcf8b.css",revision:null},{url:"assets/index-2cc54569.css",revision:null},{url:"assets/index-8c6c3f75.css",revision:null},{url:"assets/index-d7a91955.css",revision:null},{url:"assets/SafariFileWorker-557e53c3.js",revision:null},{url:"ChartManager-eb846239.js",revision:null},{url:"downloader-df03ddd3.js",revision:null},{url:"embed.js",revision:"34c700e475ddd980874be4cebadd4a09"},{url:"embed/index.html",revision:"7318d7d4dce380d7dc813fae863bc736"},{url:"FileSystemWritableFileStream-e4c13ad9.js",revision:null},{url:"HoldBody-c167b8e7.js",revision:null},{url:"index.html",revision:"690fec91f615869495043a6ce70b86a8"},{url:"memory-5b775533.js",revision:null},{url:"NodeFileHandler-6a5f8a13.js",revision:null},{url:"Noteskin-092cf15a.js",revision:null},{url:"Noteskin-2e3fb130.js",revision:null},{url:"Noteskin-38a763d9.js",revision:null},{url:"Noteskin-42298fb1.js",revision:null},{url:"Noteskin-42c53605.js",revision:null},{url:"Noteskin-5725b491.js",revision:null},{url:"Noteskin-64efdd72.js",revision:null},{url:"Noteskin-6e682e6f.js",revision:null},{url:"Noteskin-73e877f6.js",revision:null},{url:"Noteskin-76755dcc.js",revision:null},{url:"Noteskin-803fa9d7.js",revision:null},{url:"Noteskin-c09b95ff.js",revision:null},{url:"Noteskin-d1f8b157.js",revision:null},{url:"Noteskin-da5b9f1d.js",revision:null},{url:"Noteskin-f717025c.js",revision:null},{url:"Noteskin-ff479165.js",revision:null},{url:"OggDec-2941c3fd.js",revision:null},{url:"registerSW.js",revision:"21684c117fd68cc7dc1643829ea87c07"},{url:"web-streams-ponyfill-4a0f4950.js",revision:null},{url:"assets/0-0543793c.png",revision:null},{url:"assets/0-c5249fef.png",revision:null},{url:"assets/1-0e354907.png",revision:null},{url:"assets/1-84dd19f7.png",revision:null},{url:"assets/2-3b873573.png",revision:null},{url:"assets/2-ce5f7b2f.png",revision:null},{url:"assets/3-648105cf.png",revision:null},{url:"assets/3-e5952ffa.png",revision:null},{url:"assets/4-1f9a4a43.png",revision:null},{url:"assets/4-da345826.png",revision:null},{url:"assets/5-b9acdc27.png",revision:null},{url:"assets/5-f6bb9779.png",revision:null},{url:"assets/6-12d00670.png",revision:null},{url:"assets/6-565a7261.png",revision:null},{url:"assets/7-00801dd0.png",revision:null},{url:"assets/7-dd1c0ecf.png",revision:null},{url:"assets/8-94163432.png",revision:null},{url:"assets/8-9a73d4f3.png",revision:null},{url:"assets/active-29dd632a.png",revision:null},{url:"assets/active-d06e5c33.png",revision:null},{url:"assets/analyze-738fe825.mp4",revision:null},{url:"assets/app/versions.json",revision:"223594f6ecde2ce4e9ed61e4f47c9378"},{url:"assets/assist_tick-b8aada2a.ogg",revision:null},{url:"assets/av-05878b27.mp4",revision:null},{url:"assets/banner-fa29dd27.png",revision:null},{url:"assets/base-29930c78.png",revision:null},{url:"assets/body-0862c984.png",revision:null},{url:"assets/bodyActive-105f1d12.png",revision:null},{url:"assets/bodyActive-56c9977a.png",revision:null},{url:"assets/bodyActive-614d0188.png",revision:null},{url:"assets/bodyActive-889762ad.png",revision:null},{url:"assets/bodyActive-b3d95e51.png",revision:null},{url:"assets/bodyInactive-1234f594.png",revision:null},{url:"assets/bodyInactive-5d99335a.png",revision:null},{url:"assets/bodyInactive-72253162.png",revision:null},{url:"assets/bodyInactive-cfc41138.png",revision:null},{url:"assets/bodyInactive-e5ca65be.png",revision:null},{url:"assets/bottomCapActive-32ba7c5b.png",revision:null},{url:"assets/bottomCapActive-50553ab4.png",revision:null},{url:"assets/bottomCapActive-58c18c0b.png",revision:null},{url:"assets/bottomCapActive-75c2fd66.png",revision:null},{url:"assets/bottomCapInactive-177e377e.png",revision:null},{url:"assets/bottomCapInactive-d275b2b2.png",revision:null},{url:"assets/bottomCapInactive-d8fa251d.png",revision:null},{url:"assets/bottomCapInactive-e990106f.png",revision:null},{url:"assets/cap-8cc2992c.png",revision:null},{url:"assets/cap-e2813a45.png",revision:null},{url:"assets/capActive-59a3b423.png",revision:null},{url:"assets/capActive-e83fb138.png",revision:null},{url:"assets/capInactive-4622d5f2.png",revision:null},{url:"assets/capInactive-efc3b952.png",revision:null},{url:"assets/Center-1b6bfec9.png",revision:null},{url:"assets/Center-274a1642.png",revision:null},{url:"assets/Center-461a85de.png",revision:null},{url:"assets/Center-55e9b68a.png",revision:null},{url:"assets/Center-cb4b6c25.png",revision:null},{url:"assets/Center-df4c129b.png",revision:null},{url:"assets/centerReceptor-44665c43.png",revision:null},{url:"assets/colors-63f923d2.png",revision:null},{url:"assets/decent-79d4c208.png",revision:null},{url:"assets/decent-cc4ef7ea.png",revision:null},{url:"assets/decent-f3f8a110.png",revision:null},{url:"assets/downBodyActive-77f6502e.png",revision:null},{url:"assets/downBodyActive-8cf886d3.png",revision:null},{url:"assets/downBodyActive-dd1fd694.png",revision:null},{url:"assets/downBodyInactive-7465edd0.png",revision:null},{url:"assets/downBodyInactive-a5759c62.png",revision:null},{url:"assets/downBodyInactive-c781a303.png",revision:null},{url:"assets/downBottomCapActive-57ef4d54.png",revision:null},{url:"assets/downBottomCapActive-b10d1f0d.png",revision:null},{url:"assets/downBottomCapInactive-12cafebe.png",revision:null},{url:"assets/downBottomCapInactive-13ddf252.png",revision:null},{url:"assets/DownLeft-15647c81.png",revision:null},{url:"assets/DownLeft-19d91486.png",revision:null},{url:"assets/DownLeft-242c6bf3.png",revision:null},{url:"assets/DownLeft-4943410c.png",revision:null},{url:"assets/DownLeft-63c88ff1.png",revision:null},{url:"assets/DownLeft-94341616.png",revision:null},{url:"assets/downLeftReceptor-9be8faae.png",revision:null},{url:"assets/DownRight-3c57e4fa.png",revision:null},{url:"assets/DownRight-9aba7559.png",revision:null},{url:"assets/DownRight-a869fa38.png",revision:null},{url:"assets/DownRight-bcd0e463.png",revision:null},{url:"assets/DownRight-d5c3b98a.png",revision:null},{url:"assets/DownRight-e2cf2b7d.png",revision:null},{url:"assets/embed-8c85cbda.png",revision:null},{url:"assets/eq-6befbaef.mp4",revision:null},{url:"assets/excellent-30398c95.png",revision:null},{url:"assets/excellent-84718ac0.png",revision:null},{url:"assets/excellent-ab7ec4d8.png",revision:null},{url:"assets/exportlua-6de45f3b.png",revision:null},{url:"assets/fakeCenter-581c6a3b.png",revision:null},{url:"assets/fakeDownLeft-e3208bb3.png",revision:null},{url:"assets/fantastic-1755e773.png",revision:null},{url:"assets/fantastic-65c1c0cf.png",revision:null},{url:"assets/fantastic-ebaa2496.png",revision:null},{url:"assets/flash-5a32532f.png",revision:null},{url:"assets/flash-ac45db5d.png",revision:null},{url:"assets/flash-be9c0562.png",revision:null},{url:"assets/flash-d0eff0a1.png",revision:null},{url:"assets/flash-e524b5bd.png",revision:null},{url:"assets/flashBright-d5407f78.png",revision:null},{url:"assets/font/Assistant-Hebrew.woff2",revision:"e99c63e8dcd7799e8adf32df82b46376"},{url:"assets/font/Assistant-Latin.woff2",revision:"a416191c7641acf049f804b685235d3d"},{url:"assets/font/Assistant-LatinExt.woff2",revision:"2423d82cdbc6a34b99d5bbacf82623c7"},{url:"assets/frame-d599a2fe.png",revision:null},{url:"assets/frameChrome-2ea8bbf3.png",revision:null},{url:"assets/git-67477794.png",revision:null},{url:"assets/great-0e864574.png",revision:null},{url:"assets/great-cf911e79.png",revision:null},{url:"assets/great-f56818a7.png",revision:null},{url:"assets/hold_judgement-82934f15.png",revision:null},{url:"assets/hold-0c4ffc42.png",revision:null},{url:"assets/hold-160934d9.png",revision:null},{url:"assets/hold-3ccaaf09.png",revision:null},{url:"assets/hold-3f899175.png",revision:null},{url:"assets/hold-4cf23d59.png",revision:null},{url:"assets/hold-5651661d.png",revision:null},{url:"assets/hold-7b947e11.png",revision:null},{url:"assets/icon/favicon.ico",revision:"7bcbdd2344641a21b0f6f9393b491d65"},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"assets/icon/logo.png",revision:"3170c21a8539047fffea9eb4bd912d8e"},{url:"assets/icon/mac.icns",revision:"ac52a49fb658a942abeaa019bd05e9aa"},{url:"assets/inactive-48f23de3.png",revision:null},{url:"assets/inactive-a4aecb82.png",revision:null},{url:"assets/judgementITG-5390eacd.png",revision:null},{url:"assets/judgementWaterfall-5bb3f994.png",revision:null},{url:"assets/leftBodyActive-5d89f111.png",revision:null},{url:"assets/leftBodyActive-75d41033.png",revision:null},{url:"assets/leftBodyActive-fd4e902b.png",revision:null},{url:"assets/leftBodyInactive-1110dc77.png",revision:null},{url:"assets/leftBodyInactive-8fe6311e.png",revision:null},{url:"assets/leftBodyInactive-bbc074cd.png",revision:null},{url:"assets/leftBottomCapActive-057c49fb.png",revision:null},{url:"assets/leftBottomCapActive-f759c91c.png",revision:null},{url:"assets/leftBottomCapInactive-a4ac7bba.png",revision:null},{url:"assets/leftBottomCapInactive-df6350c7.png",revision:null},{url:"assets/lift-6db682e7.png",revision:null},{url:"assets/liftCenter-9712ce74.png",revision:null},{url:"assets/liftDownLeft-0205bdc8.png",revision:null},{url:"assets/mask-f1b4d033.png",revision:null},{url:"assets/metronome_high-6fa54e52.ogg",revision:null},{url:"assets/metronome_low-4db4e760.ogg",revision:null},{url:"assets/mine-0e34ec01.png",revision:null},{url:"assets/mine-335f4545.png",revision:null},{url:"assets/mine-590d445e.png",revision:null},{url:"assets/mine-b65ce42d.ogg",revision:null},{url:"assets/missing-81d55ba9.png",revision:null},{url:"assets/mode-cac62e2a.png",revision:null},{url:"assets/mouse-ef7f3cf3.mp4",revision:null},{url:"assets/note-07e5d79f.png",revision:null},{url:"assets/outline-72e881a7.png",revision:null},{url:"assets/overlay-f63a3b18.png",revision:null},{url:"assets/particles-18ec6c1d.png",revision:null},{url:"assets/parts-0c8fa692.png",revision:null},{url:"assets/parts-9668caec.png",revision:null},{url:"assets/parts-9a3f637b.png",revision:null},{url:"assets/parts-b37af2cf.png",revision:null},{url:"assets/playtest-f34f5856.mp4",revision:null},{url:"assets/popup-b6da9784.mp4",revision:null},{url:"assets/pref-fdc09174.mp4",revision:null},{url:"assets/press-55cccb8c.png",revision:null},{url:"assets/press-feed8aa6.png",revision:null},{url:"assets/preview-0f9b00cd.png",revision:null},{url:"assets/preview-17ffcc02.png",revision:null},{url:"assets/preview-26b1bdce.png",revision:null},{url:"assets/preview-2fd7d50c.png",revision:null},{url:"assets/preview-3514cbb3.png",revision:null},{url:"assets/preview-40b76b28.png",revision:null},{url:"assets/preview-4f79831b.png",revision:null},{url:"assets/preview-5d9781d2.png",revision:null},{url:"assets/preview-5ecfc22a.png",revision:null},{url:"assets/preview-72ea0444.png",revision:null},{url:"assets/preview-747db171.png",revision:null},{url:"assets/preview-9fe2bd96.png",revision:null},{url:"assets/preview-b8f75a15.png",revision:null},{url:"assets/preview-d67630f1.png",revision:null},{url:"assets/preview-d6d59d37.png",revision:null},{url:"assets/preview-d763e667.png",revision:null},{url:"assets/preview-f113aacc.png",revision:null},{url:"assets/receptor-13e43ffb.png",revision:null},{url:"assets/receptor-30ecd7a2.png",revision:null},{url:"assets/receptor-3e38f29b.png",revision:null},{url:"assets/receptor-59597a1d.png",revision:null},{url:"assets/receptor-6fa92e51.png",revision:null},{url:"assets/receptor-a0a69b2b.png",revision:null},{url:"assets/receptor-a4713728.png",revision:null},{url:"assets/receptor-d5ef8593.png",revision:null},{url:"assets/receptorFlash-c7675c53.png",revision:null},{url:"assets/receptors-0a59df78.png",revision:null},{url:"assets/receptors-5a0beefb.png",revision:null},{url:"assets/rightBodyActive-07f95372.png",revision:null},{url:"assets/rightBodyActive-751fadec.png",revision:null},{url:"assets/rightBodyActive-8af7624b.png",revision:null},{url:"assets/rightBodyInactive-46202369.png",revision:null},{url:"assets/rightBodyInactive-695480aa.png",revision:null},{url:"assets/rightBodyInactive-fdefc2a4.png",revision:null},{url:"assets/rightBottomCapActive-6edeea1e.png",revision:null},{url:"assets/rightBottomCapActive-a736d803.png",revision:null},{url:"assets/rightBottomCapInactive-a64cea2c.png",revision:null},{url:"assets/rightBottomCapInactive-d674960e.png",revision:null},{url:"assets/scrolls-a04758c8.mp4",revision:null},{url:"assets/spark-2c59cc0e.png",revision:null},{url:"assets/stroke-1f54ba14.png",revision:null},{url:"assets/svg/ADD_EVENT.svg",revision:"3bf1426558fe2c59723905769f9dbf44"},{url:"assets/svg/ADD_FILE.svg",revision:"0cbb4c6f95ccdae8e5c5e358e021874e"},{url:"assets/svg/CHEVRON.svg",revision:"e379dea6fdc3e7faa1033e01f5c9551f"},{url:"assets/svg/CLAP.svg",revision:"6e0ec4a2e34e1fc5643b1492deac520c"},{url:"assets/svg/CLOSE_WINDOW.svg",revision:"5a830a27cc07aae3a21deb2f5a6fa9b9"},{url:"assets/svg/COPY.svg",revision:"94fe4e617349ad3c89cede7ee900d391"},{url:"assets/svg/DBL_CHEVRON.svg",revision:"5baff238d099cd65a6b54bc41d92dc59"},{url:"assets/svg/DETECT_SYNC.svg",revision:"b9b6cc287adf7fef4485899835ea3c13"},{url:"assets/svg/DOWNLOAD.svg",revision:"67c6e0e66d510bfe9590a9f8154ddf43"},{url:"assets/svg/EDIT.svg",revision:"89ac21574175ba70a0ba09ca6ba784ba"},{url:"assets/svg/EYE.svg",revision:"d4400c91178716f68e9099e237c7c671"},{url:"assets/svg/FEET.svg",revision:"01607729992f69dd5731642a118c7677"},{url:"assets/svg/FOLDER.svg",revision:"5618bc8736afa888944207dac0d53c33"},{url:"assets/svg/HIGHPASS.svg",revision:"3d3c3465decabcb2d9e2c50ee7b0d047"},{url:"assets/svg/HIGHSHELF.svg",revision:"8d348b68061c498d9dca385be140eb95"},{url:"assets/svg/IMAGE_FILE.svg",revision:"33f6364c93e7c51a2fb539c536607659"},{url:"assets/svg/LINK_BROKEN.svg",revision:"d00f815ad8fd2dee1188d5b395f78e19"},{url:"assets/svg/LINK.svg",revision:"cea24cc83a677857158c8dcdf32d0228"},{url:"assets/svg/LOWPASS.svg",revision:"12694371d2572549fed0a48ed11cdee3"},{url:"assets/svg/LOWSHELF.svg",revision:"9b2e2fbf2c76fd115cb794bf2c4b4999"},{url:"assets/svg/MENU_VERTICAL.svg",revision:"4a0ffba6dfc324979b6204dd2354e8eb"},{url:"assets/svg/METRONOME.svg",revision:"6605cb1d1ec6821ccf0d73011739ae00"},{url:"assets/svg/MINIMIZE.svg",revision:"efea4d82097ceef2d001fc91325417da"},{url:"assets/svg/PEAKING.svg",revision:"ded7f8e515e7a552aab770eaf0edf93a"},{url:"assets/svg/PLAY.svg",revision:"47a3f485918a09effbcd1f99fbcc2ce3"},{url:"assets/svg/PLAYTEST.svg",revision:"ae455e6518022d467b0dd79269e9a8af"},{url:"assets/svg/PLUS.svg",revision:"f4694d31eb7f609c2510a9fe36dd4f12"},{url:"assets/svg/RECORD.svg",revision:"c94e7371259bc6a865996560b6656268"},{url:"assets/svg/REVERT.svg",revision:"ecd1fc1b8b0811062e3fc9a887bec68d"},{url:"assets/svg/SKIP_END.svg",revision:"43f4154ca656d2017a2b41a1dfacd671"},{url:"assets/svg/SKIP_START.svg",revision:"690fdfb6d41b25ccb4bd5aa9f65b81f1"},{url:"assets/svg/SM_FILE.svg",revision:"0c5917f0b2e2b7401097071030cc7bd1"},{url:"assets/svg/SPEED.svg",revision:"c8ecff8943040cee73642d289f25c5c9"},{url:"assets/svg/STOP.svg",revision:"2dd4917e08b23080980202ed52b8a7eb"},{url:"assets/svg/TRASH.svg",revision:"55f80a8cf8bb4aed29a3089807064464"},{url:"assets/svg/UNKNOWN_FILE.svg",revision:"d1196a02d693ed3d3f0d064f5c3d1815"},{url:"assets/svg/UPLOAD.svg",revision:"3009c00a98d4a6fe2d0ebbb1e626ee43"},{url:"assets/svg/VOLUME.svg",revision:"b971f09af774996aeeee9749ddb6949a"},{url:"assets/svg/X_CLAP.svg",revision:"00875c090478341862b257d3655922d8"},{url:"assets/svg/X_EYE.svg",revision:"0bf002a7e35febde50e7b2ce116c2139"},{url:"assets/svg/X_METRONOME.svg",revision:"abcb5baff6f1683403a1362b5f0ee561"},{url:"assets/tap-69a9f81d.png",revision:null},{url:"assets/tap-c1e36633.png",revision:null},{url:"assets/tapCenter-103680e8.png",revision:null},{url:"assets/tapDownLeft-17ba3b42.png",revision:null},{url:"assets/timesig-9e28e1f2.png",revision:null},{url:"assets/top-74da30ae.png",revision:null},{url:"assets/underlay-95144bef.png",revision:null},{url:"assets/upBodyActive-b06d82f3.png",revision:null},{url:"assets/upBodyActive-c813881f.png",revision:null},{url:"assets/upBodyInactive-0222237a.png",revision:null},{url:"assets/upBodyInactive-4ef75342.png",revision:null},{url:"assets/upBodyInactive-87a7969e.png",revision:null},{url:"assets/upBottomCapActive-07fb7c6e.png",revision:null},{url:"assets/upBottomCapActive-19e4c05d.png",revision:null},{url:"assets/upBottomCapInactive-23aae747.png",revision:null},{url:"assets/upBottomCapInactive-75f78aac.png",revision:null},{url:"assets/UpLeft-28515625.png",revision:null},{url:"assets/UpLeft-36744666.png",revision:null},{url:"assets/UpLeft-752b6821.png",revision:null},{url:"assets/UpLeft-be2bb52b.png",revision:null},{url:"assets/UpLeft-d457a441.png",revision:null},{url:"assets/UpLeft-ef9a2609.png",revision:null},{url:"assets/upleftBodyActive-bc79d60f.png",revision:null},{url:"assets/upleftBodyInactive-f60085c6.png",revision:null},{url:"assets/UpRight-2e4dc3f1.png",revision:null},{url:"assets/UpRight-7924deeb.png",revision:null},{url:"assets/UpRight-8a892589.png",revision:null},{url:"assets/UpRight-91e454bc.png",revision:null},{url:"assets/UpRight-af6dd110.png",revision:null},{url:"assets/UpRight-fda6b516.png",revision:null},{url:"assets/uprightBodyActive-3d912f52.png",revision:null},{url:"assets/uprightBodyInactive-01c6c977.png",revision:null},{url:"assets/w0-6f86addb.png",revision:null},{url:"assets/w1-c8c43b0f.png",revision:null},{url:"assets/w2-37282ba8.png",revision:null},{url:"assets/w3-3c2ca2d8.png",revision:null},{url:"assets/w4-ce0f95de.png",revision:null},{url:"assets/w5-23173d4f.png",revision:null},{url:"assets/way_off-8bc3fd65.png",revision:null},{url:"assets/way_off-bc2cdf11.png",revision:null},{url:"assets/way_off-cc9a5377.png",revision:null},{url:"assets/white_fantastic-6c519378.png",revision:null},{url:"assets/white_fantastic-9f83da7a.png",revision:null},{url:"assets/white_fantastic-b65b4f11.png",revision:null},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"manifest.json",revision:"1d72161daa4e530e15d85baf4906bf4c"}],{ignoreURLParametersMatching:[/^flags/,/^url/,/^chartIndex/,/^chartType/]}),s.cleanupOutdatedCaches()})); +if(!self.define){let s,e={};const n=(n,l)=>(n=new URL(n+".js",l).href,e[n]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=n,s.onload=e,document.head.appendChild(s)}else s=n,importScripts(n),e()})).then((()=>{let s=e[n];if(!s)throw new Error(`Module ${n} didn’t register its module`);return s})));self.define=(l,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const u=s=>n(s,r),t={module:{uri:r},exports:a,require:u};e[r]=Promise.all(l.map((s=>t[s]||u(s)))).then((s=>(i(...s),a)))}}define(["./workbox-1ab968a5"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"AnimatedSprite-fe6fab2d.js",revision:null},{url:"app.js",revision:"0143db4404f376caf291dd339ad749b7"},{url:"app/index.html",revision:"16b0d60c2f71d1dc0fde7fa0a469f256"},{url:"assets/ChartManager-00dfcf8b.css",revision:null},{url:"assets/index-2cc54569.css",revision:null},{url:"assets/index-8c6c3f75.css",revision:null},{url:"assets/index-d7a91955.css",revision:null},{url:"assets/SafariFileWorker-557e53c3.js",revision:null},{url:"ChartManager-a4938337.js",revision:null},{url:"downloader-0aae82d5.js",revision:null},{url:"embed.js",revision:"aa8ab1d6f6b08e6a664cecf417f78b61"},{url:"embed/index.html",revision:"15a18568a164754d6636ac48207c252b"},{url:"FileSystemWritableFileStream-e4c13ad9.js",revision:null},{url:"HoldBody-7c69d162.js",revision:null},{url:"index.html",revision:"690fec91f615869495043a6ce70b86a8"},{url:"memory-5d567038.js",revision:null},{url:"NodeFileHandler-bfbfd5ad.js",revision:null},{url:"Noteskin-0136a2b5.js",revision:null},{url:"Noteskin-1189f7fb.js",revision:null},{url:"Noteskin-2e945f65.js",revision:null},{url:"Noteskin-4163467c.js",revision:null},{url:"Noteskin-44caf370.js",revision:null},{url:"Noteskin-5b1b2407.js",revision:null},{url:"Noteskin-5d1a05aa.js",revision:null},{url:"Noteskin-63e31f76.js",revision:null},{url:"Noteskin-657b4cb0.js",revision:null},{url:"Noteskin-69c5b4b7.js",revision:null},{url:"Noteskin-7e011e81.js",revision:null},{url:"Noteskin-8c62d8ce.js",revision:null},{url:"Noteskin-9f92ab0e.js",revision:null},{url:"Noteskin-b2279a2b.js",revision:null},{url:"Noteskin-b32d01e2.js",revision:null},{url:"Noteskin-f9326759.js",revision:null},{url:"OggDec-2941c3fd.js",revision:null},{url:"registerSW.js",revision:"21684c117fd68cc7dc1643829ea87c07"},{url:"web-streams-ponyfill-4a0f4950.js",revision:null},{url:"assets/0-0543793c.png",revision:null},{url:"assets/0-c5249fef.png",revision:null},{url:"assets/1-0e354907.png",revision:null},{url:"assets/1-84dd19f7.png",revision:null},{url:"assets/2-3b873573.png",revision:null},{url:"assets/2-ce5f7b2f.png",revision:null},{url:"assets/3-648105cf.png",revision:null},{url:"assets/3-e5952ffa.png",revision:null},{url:"assets/4-1f9a4a43.png",revision:null},{url:"assets/4-da345826.png",revision:null},{url:"assets/5-b9acdc27.png",revision:null},{url:"assets/5-f6bb9779.png",revision:null},{url:"assets/6-12d00670.png",revision:null},{url:"assets/6-565a7261.png",revision:null},{url:"assets/7-00801dd0.png",revision:null},{url:"assets/7-dd1c0ecf.png",revision:null},{url:"assets/8-94163432.png",revision:null},{url:"assets/8-9a73d4f3.png",revision:null},{url:"assets/active-29dd632a.png",revision:null},{url:"assets/active-d06e5c33.png",revision:null},{url:"assets/analyze-738fe825.mp4",revision:null},{url:"assets/app/versions.json",revision:"223594f6ecde2ce4e9ed61e4f47c9378"},{url:"assets/assist_tick-b8aada2a.ogg",revision:null},{url:"assets/av-05878b27.mp4",revision:null},{url:"assets/banner-fa29dd27.png",revision:null},{url:"assets/base-29930c78.png",revision:null},{url:"assets/body-0862c984.png",revision:null},{url:"assets/bodyActive-105f1d12.png",revision:null},{url:"assets/bodyActive-56c9977a.png",revision:null},{url:"assets/bodyActive-614d0188.png",revision:null},{url:"assets/bodyActive-889762ad.png",revision:null},{url:"assets/bodyActive-b3d95e51.png",revision:null},{url:"assets/bodyInactive-1234f594.png",revision:null},{url:"assets/bodyInactive-5d99335a.png",revision:null},{url:"assets/bodyInactive-72253162.png",revision:null},{url:"assets/bodyInactive-cfc41138.png",revision:null},{url:"assets/bodyInactive-e5ca65be.png",revision:null},{url:"assets/bottomCapActive-32ba7c5b.png",revision:null},{url:"assets/bottomCapActive-50553ab4.png",revision:null},{url:"assets/bottomCapActive-58c18c0b.png",revision:null},{url:"assets/bottomCapActive-75c2fd66.png",revision:null},{url:"assets/bottomCapInactive-177e377e.png",revision:null},{url:"assets/bottomCapInactive-d275b2b2.png",revision:null},{url:"assets/bottomCapInactive-d8fa251d.png",revision:null},{url:"assets/bottomCapInactive-e990106f.png",revision:null},{url:"assets/cap-8cc2992c.png",revision:null},{url:"assets/cap-e2813a45.png",revision:null},{url:"assets/capActive-59a3b423.png",revision:null},{url:"assets/capActive-e83fb138.png",revision:null},{url:"assets/capInactive-4622d5f2.png",revision:null},{url:"assets/capInactive-efc3b952.png",revision:null},{url:"assets/Center-1b6bfec9.png",revision:null},{url:"assets/Center-274a1642.png",revision:null},{url:"assets/Center-461a85de.png",revision:null},{url:"assets/Center-55e9b68a.png",revision:null},{url:"assets/Center-cb4b6c25.png",revision:null},{url:"assets/Center-df4c129b.png",revision:null},{url:"assets/centerReceptor-44665c43.png",revision:null},{url:"assets/colors-63f923d2.png",revision:null},{url:"assets/decent-79d4c208.png",revision:null},{url:"assets/decent-cc4ef7ea.png",revision:null},{url:"assets/decent-f3f8a110.png",revision:null},{url:"assets/downBodyActive-77f6502e.png",revision:null},{url:"assets/downBodyActive-8cf886d3.png",revision:null},{url:"assets/downBodyActive-dd1fd694.png",revision:null},{url:"assets/downBodyInactive-7465edd0.png",revision:null},{url:"assets/downBodyInactive-a5759c62.png",revision:null},{url:"assets/downBodyInactive-c781a303.png",revision:null},{url:"assets/downBottomCapActive-57ef4d54.png",revision:null},{url:"assets/downBottomCapActive-b10d1f0d.png",revision:null},{url:"assets/downBottomCapInactive-12cafebe.png",revision:null},{url:"assets/downBottomCapInactive-13ddf252.png",revision:null},{url:"assets/DownLeft-15647c81.png",revision:null},{url:"assets/DownLeft-19d91486.png",revision:null},{url:"assets/DownLeft-242c6bf3.png",revision:null},{url:"assets/DownLeft-4943410c.png",revision:null},{url:"assets/DownLeft-63c88ff1.png",revision:null},{url:"assets/DownLeft-94341616.png",revision:null},{url:"assets/downLeftReceptor-9be8faae.png",revision:null},{url:"assets/DownRight-3c57e4fa.png",revision:null},{url:"assets/DownRight-9aba7559.png",revision:null},{url:"assets/DownRight-a869fa38.png",revision:null},{url:"assets/DownRight-bcd0e463.png",revision:null},{url:"assets/DownRight-d5c3b98a.png",revision:null},{url:"assets/DownRight-e2cf2b7d.png",revision:null},{url:"assets/embed-8c85cbda.png",revision:null},{url:"assets/eq-6befbaef.mp4",revision:null},{url:"assets/excellent-30398c95.png",revision:null},{url:"assets/excellent-84718ac0.png",revision:null},{url:"assets/excellent-ab7ec4d8.png",revision:null},{url:"assets/exportlua-6de45f3b.png",revision:null},{url:"assets/fakeCenter-581c6a3b.png",revision:null},{url:"assets/fakeDownLeft-e3208bb3.png",revision:null},{url:"assets/fantastic-1755e773.png",revision:null},{url:"assets/fantastic-65c1c0cf.png",revision:null},{url:"assets/fantastic-ebaa2496.png",revision:null},{url:"assets/flash-5a32532f.png",revision:null},{url:"assets/flash-ac45db5d.png",revision:null},{url:"assets/flash-be9c0562.png",revision:null},{url:"assets/flash-d0eff0a1.png",revision:null},{url:"assets/flash-e524b5bd.png",revision:null},{url:"assets/flashBright-d5407f78.png",revision:null},{url:"assets/font/Assistant-Hebrew.woff2",revision:"e99c63e8dcd7799e8adf32df82b46376"},{url:"assets/font/Assistant-Latin.woff2",revision:"a416191c7641acf049f804b685235d3d"},{url:"assets/font/Assistant-LatinExt.woff2",revision:"2423d82cdbc6a34b99d5bbacf82623c7"},{url:"assets/frame-d599a2fe.png",revision:null},{url:"assets/frameChrome-2ea8bbf3.png",revision:null},{url:"assets/git-67477794.png",revision:null},{url:"assets/great-0e864574.png",revision:null},{url:"assets/great-cf911e79.png",revision:null},{url:"assets/great-f56818a7.png",revision:null},{url:"assets/hold_judgement-82934f15.png",revision:null},{url:"assets/hold-0c4ffc42.png",revision:null},{url:"assets/hold-160934d9.png",revision:null},{url:"assets/hold-3ccaaf09.png",revision:null},{url:"assets/hold-3f899175.png",revision:null},{url:"assets/hold-4cf23d59.png",revision:null},{url:"assets/hold-5651661d.png",revision:null},{url:"assets/hold-7b947e11.png",revision:null},{url:"assets/icon/favicon.ico",revision:"7bcbdd2344641a21b0f6f9393b491d65"},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"assets/icon/logo.png",revision:"3170c21a8539047fffea9eb4bd912d8e"},{url:"assets/icon/mac.icns",revision:"ac52a49fb658a942abeaa019bd05e9aa"},{url:"assets/inactive-48f23de3.png",revision:null},{url:"assets/inactive-a4aecb82.png",revision:null},{url:"assets/judgementITG-5390eacd.png",revision:null},{url:"assets/judgementWaterfall-5bb3f994.png",revision:null},{url:"assets/leftBodyActive-5d89f111.png",revision:null},{url:"assets/leftBodyActive-75d41033.png",revision:null},{url:"assets/leftBodyActive-fd4e902b.png",revision:null},{url:"assets/leftBodyInactive-1110dc77.png",revision:null},{url:"assets/leftBodyInactive-8fe6311e.png",revision:null},{url:"assets/leftBodyInactive-bbc074cd.png",revision:null},{url:"assets/leftBottomCapActive-057c49fb.png",revision:null},{url:"assets/leftBottomCapActive-f759c91c.png",revision:null},{url:"assets/leftBottomCapInactive-a4ac7bba.png",revision:null},{url:"assets/leftBottomCapInactive-df6350c7.png",revision:null},{url:"assets/lift-6db682e7.png",revision:null},{url:"assets/liftCenter-9712ce74.png",revision:null},{url:"assets/liftDownLeft-0205bdc8.png",revision:null},{url:"assets/mask-f1b4d033.png",revision:null},{url:"assets/metronome_high-6fa54e52.ogg",revision:null},{url:"assets/metronome_low-4db4e760.ogg",revision:null},{url:"assets/mine-0e34ec01.png",revision:null},{url:"assets/mine-335f4545.png",revision:null},{url:"assets/mine-590d445e.png",revision:null},{url:"assets/mine-b65ce42d.ogg",revision:null},{url:"assets/missing-81d55ba9.png",revision:null},{url:"assets/mode-cac62e2a.png",revision:null},{url:"assets/mouse-ef7f3cf3.mp4",revision:null},{url:"assets/note-07e5d79f.png",revision:null},{url:"assets/outline-72e881a7.png",revision:null},{url:"assets/overlay-f63a3b18.png",revision:null},{url:"assets/particles-18ec6c1d.png",revision:null},{url:"assets/parts-0c8fa692.png",revision:null},{url:"assets/parts-9668caec.png",revision:null},{url:"assets/parts-9a3f637b.png",revision:null},{url:"assets/parts-b37af2cf.png",revision:null},{url:"assets/playtest-f34f5856.mp4",revision:null},{url:"assets/popup-b6da9784.mp4",revision:null},{url:"assets/pref-fdc09174.mp4",revision:null},{url:"assets/press-55cccb8c.png",revision:null},{url:"assets/press-feed8aa6.png",revision:null},{url:"assets/preview-0f9b00cd.png",revision:null},{url:"assets/preview-17ffcc02.png",revision:null},{url:"assets/preview-26b1bdce.png",revision:null},{url:"assets/preview-2fd7d50c.png",revision:null},{url:"assets/preview-3514cbb3.png",revision:null},{url:"assets/preview-40b76b28.png",revision:null},{url:"assets/preview-4f79831b.png",revision:null},{url:"assets/preview-5d9781d2.png",revision:null},{url:"assets/preview-5ecfc22a.png",revision:null},{url:"assets/preview-72ea0444.png",revision:null},{url:"assets/preview-747db171.png",revision:null},{url:"assets/preview-9fe2bd96.png",revision:null},{url:"assets/preview-b8f75a15.png",revision:null},{url:"assets/preview-d67630f1.png",revision:null},{url:"assets/preview-d6d59d37.png",revision:null},{url:"assets/preview-d763e667.png",revision:null},{url:"assets/preview-f113aacc.png",revision:null},{url:"assets/receptor-13e43ffb.png",revision:null},{url:"assets/receptor-30ecd7a2.png",revision:null},{url:"assets/receptor-3e38f29b.png",revision:null},{url:"assets/receptor-59597a1d.png",revision:null},{url:"assets/receptor-6fa92e51.png",revision:null},{url:"assets/receptor-a0a69b2b.png",revision:null},{url:"assets/receptor-a4713728.png",revision:null},{url:"assets/receptor-d5ef8593.png",revision:null},{url:"assets/receptorFlash-c7675c53.png",revision:null},{url:"assets/receptors-0a59df78.png",revision:null},{url:"assets/receptors-5a0beefb.png",revision:null},{url:"assets/rightBodyActive-07f95372.png",revision:null},{url:"assets/rightBodyActive-751fadec.png",revision:null},{url:"assets/rightBodyActive-8af7624b.png",revision:null},{url:"assets/rightBodyInactive-46202369.png",revision:null},{url:"assets/rightBodyInactive-695480aa.png",revision:null},{url:"assets/rightBodyInactive-fdefc2a4.png",revision:null},{url:"assets/rightBottomCapActive-6edeea1e.png",revision:null},{url:"assets/rightBottomCapActive-a736d803.png",revision:null},{url:"assets/rightBottomCapInactive-a64cea2c.png",revision:null},{url:"assets/rightBottomCapInactive-d674960e.png",revision:null},{url:"assets/scrolls-a04758c8.mp4",revision:null},{url:"assets/spark-2c59cc0e.png",revision:null},{url:"assets/stroke-1f54ba14.png",revision:null},{url:"assets/svg/ADD_EVENT.svg",revision:"3bf1426558fe2c59723905769f9dbf44"},{url:"assets/svg/ADD_FILE.svg",revision:"0cbb4c6f95ccdae8e5c5e358e021874e"},{url:"assets/svg/CHEVRON.svg",revision:"e379dea6fdc3e7faa1033e01f5c9551f"},{url:"assets/svg/CLAP.svg",revision:"6e0ec4a2e34e1fc5643b1492deac520c"},{url:"assets/svg/CLOSE_WINDOW.svg",revision:"5a830a27cc07aae3a21deb2f5a6fa9b9"},{url:"assets/svg/COPY.svg",revision:"94fe4e617349ad3c89cede7ee900d391"},{url:"assets/svg/DBL_CHEVRON.svg",revision:"5baff238d099cd65a6b54bc41d92dc59"},{url:"assets/svg/DETECT_SYNC.svg",revision:"b9b6cc287adf7fef4485899835ea3c13"},{url:"assets/svg/DOWNLOAD.svg",revision:"67c6e0e66d510bfe9590a9f8154ddf43"},{url:"assets/svg/EDIT.svg",revision:"89ac21574175ba70a0ba09ca6ba784ba"},{url:"assets/svg/EYE.svg",revision:"d4400c91178716f68e9099e237c7c671"},{url:"assets/svg/FEET.svg",revision:"01607729992f69dd5731642a118c7677"},{url:"assets/svg/FOLDER.svg",revision:"5618bc8736afa888944207dac0d53c33"},{url:"assets/svg/HIGHPASS.svg",revision:"3d3c3465decabcb2d9e2c50ee7b0d047"},{url:"assets/svg/HIGHSHELF.svg",revision:"8d348b68061c498d9dca385be140eb95"},{url:"assets/svg/IMAGE_FILE.svg",revision:"33f6364c93e7c51a2fb539c536607659"},{url:"assets/svg/LINK_BROKEN.svg",revision:"d00f815ad8fd2dee1188d5b395f78e19"},{url:"assets/svg/LINK.svg",revision:"cea24cc83a677857158c8dcdf32d0228"},{url:"assets/svg/LOWPASS.svg",revision:"12694371d2572549fed0a48ed11cdee3"},{url:"assets/svg/LOWSHELF.svg",revision:"9b2e2fbf2c76fd115cb794bf2c4b4999"},{url:"assets/svg/MENU_VERTICAL.svg",revision:"4a0ffba6dfc324979b6204dd2354e8eb"},{url:"assets/svg/METRONOME.svg",revision:"6605cb1d1ec6821ccf0d73011739ae00"},{url:"assets/svg/MINIMIZE.svg",revision:"efea4d82097ceef2d001fc91325417da"},{url:"assets/svg/PEAKING.svg",revision:"ded7f8e515e7a552aab770eaf0edf93a"},{url:"assets/svg/PLAY.svg",revision:"47a3f485918a09effbcd1f99fbcc2ce3"},{url:"assets/svg/PLAYTEST.svg",revision:"ae455e6518022d467b0dd79269e9a8af"},{url:"assets/svg/PLUS.svg",revision:"f4694d31eb7f609c2510a9fe36dd4f12"},{url:"assets/svg/RECORD.svg",revision:"c94e7371259bc6a865996560b6656268"},{url:"assets/svg/REVERT.svg",revision:"ecd1fc1b8b0811062e3fc9a887bec68d"},{url:"assets/svg/SKIP_END.svg",revision:"43f4154ca656d2017a2b41a1dfacd671"},{url:"assets/svg/SKIP_START.svg",revision:"690fdfb6d41b25ccb4bd5aa9f65b81f1"},{url:"assets/svg/SM_FILE.svg",revision:"0c5917f0b2e2b7401097071030cc7bd1"},{url:"assets/svg/SPEED.svg",revision:"c8ecff8943040cee73642d289f25c5c9"},{url:"assets/svg/STOP.svg",revision:"2dd4917e08b23080980202ed52b8a7eb"},{url:"assets/svg/TRASH.svg",revision:"55f80a8cf8bb4aed29a3089807064464"},{url:"assets/svg/UNKNOWN_FILE.svg",revision:"d1196a02d693ed3d3f0d064f5c3d1815"},{url:"assets/svg/UPLOAD.svg",revision:"3009c00a98d4a6fe2d0ebbb1e626ee43"},{url:"assets/svg/VOLUME.svg",revision:"b971f09af774996aeeee9749ddb6949a"},{url:"assets/svg/X_CLAP.svg",revision:"00875c090478341862b257d3655922d8"},{url:"assets/svg/X_EYE.svg",revision:"0bf002a7e35febde50e7b2ce116c2139"},{url:"assets/svg/X_METRONOME.svg",revision:"abcb5baff6f1683403a1362b5f0ee561"},{url:"assets/tap-69a9f81d.png",revision:null},{url:"assets/tap-c1e36633.png",revision:null},{url:"assets/tapCenter-103680e8.png",revision:null},{url:"assets/tapDownLeft-17ba3b42.png",revision:null},{url:"assets/timesig-9e28e1f2.png",revision:null},{url:"assets/top-74da30ae.png",revision:null},{url:"assets/underlay-95144bef.png",revision:null},{url:"assets/upBodyActive-b06d82f3.png",revision:null},{url:"assets/upBodyActive-c813881f.png",revision:null},{url:"assets/upBodyInactive-0222237a.png",revision:null},{url:"assets/upBodyInactive-4ef75342.png",revision:null},{url:"assets/upBodyInactive-87a7969e.png",revision:null},{url:"assets/upBottomCapActive-07fb7c6e.png",revision:null},{url:"assets/upBottomCapActive-19e4c05d.png",revision:null},{url:"assets/upBottomCapInactive-23aae747.png",revision:null},{url:"assets/upBottomCapInactive-75f78aac.png",revision:null},{url:"assets/UpLeft-28515625.png",revision:null},{url:"assets/UpLeft-36744666.png",revision:null},{url:"assets/UpLeft-752b6821.png",revision:null},{url:"assets/UpLeft-be2bb52b.png",revision:null},{url:"assets/UpLeft-d457a441.png",revision:null},{url:"assets/UpLeft-ef9a2609.png",revision:null},{url:"assets/upleftBodyActive-bc79d60f.png",revision:null},{url:"assets/upleftBodyInactive-f60085c6.png",revision:null},{url:"assets/UpRight-2e4dc3f1.png",revision:null},{url:"assets/UpRight-7924deeb.png",revision:null},{url:"assets/UpRight-8a892589.png",revision:null},{url:"assets/UpRight-91e454bc.png",revision:null},{url:"assets/UpRight-af6dd110.png",revision:null},{url:"assets/UpRight-fda6b516.png",revision:null},{url:"assets/uprightBodyActive-3d912f52.png",revision:null},{url:"assets/uprightBodyInactive-01c6c977.png",revision:null},{url:"assets/w0-6f86addb.png",revision:null},{url:"assets/w1-c8c43b0f.png",revision:null},{url:"assets/w2-37282ba8.png",revision:null},{url:"assets/w3-3c2ca2d8.png",revision:null},{url:"assets/w4-ce0f95de.png",revision:null},{url:"assets/w5-23173d4f.png",revision:null},{url:"assets/way_off-8bc3fd65.png",revision:null},{url:"assets/way_off-bc2cdf11.png",revision:null},{url:"assets/way_off-cc9a5377.png",revision:null},{url:"assets/white_fantastic-6c519378.png",revision:null},{url:"assets/white_fantastic-9f83da7a.png",revision:null},{url:"assets/white_fantastic-b65b4f11.png",revision:null},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"manifest.json",revision:"1d72161daa4e530e15d85baf4906bf4c"}],{ignoreURLParametersMatching:[/^flags/,/^url/,/^chartIndex/,/^chartType/]}),s.cleanupOutdatedCaches()}));