@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
6 lines • 1.02 MB
JavaScript
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var SG=Object.create;var wm=Object.defineProperty;var EG=Object.getOwnPropertyDescriptor;var AG=Object.getOwnPropertyNames;var CG=Object.getPrototypeOf,wG=Object.prototype.hasOwnProperty;var JP=r=>{throw TypeError(r)};var PG=(r,e,t)=>e in r?wm(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t;var Rv=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var p=(r,e)=>()=>(r&&(e=r(r=0)),e);var Wi=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),vs=(r,e)=>{for(var t in e)wm(r,t,{get:e[t],enumerable:true});},MG=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of AG(e))!wG.call(r,s)&&s!==t&&wm(r,s,{get:()=>e[s],enumerable:!(i=EG(e,s))||i.enumerable});return r};var Fh=(r,e,t)=>(t=r!=null?SG(CG(r)):{},MG(wm(t,"default",{value:r,enumerable:true}),r));var w=(r,e,t)=>PG(r,typeof e!="symbol"?e+"":e,t),Bv=(r,e,t)=>e.has(r)||JP("Cannot "+t);var T=(r,e,t)=>(Bv(r,e,"read from private field"),t?t.call(r):e.get(r)),Pe=(r,e,t)=>e.has(r)?JP("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),ee=(r,e,t,i)=>(Bv(r,e,"write to private field"),e.set(r,t),t),$=(r,e,t)=>(Bv(r,e,"access private method"),t);var Pm=(r,e,t,i)=>({set _(s){ee(r,e,s);},get _(){return T(r,e,i)}});var b,Iv,qu,V,P=p(()=>{b=(r=>(r.Application="application",r.WebGLPipes="webgl-pipes",r.WebGLPipesAdaptor="webgl-pipes-adaptor",r.WebGLSystem="webgl-system",r.WebGPUPipes="webgpu-pipes",r.WebGPUPipesAdaptor="webgpu-pipes-adaptor",r.WebGPUSystem="webgpu-system",r.CanvasSystem="canvas-system",r.CanvasPipesAdaptor="canvas-pipes-adaptor",r.CanvasPipes="canvas-pipes",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r.MaskEffect="mask-effect",r.BlendMode="blend-mode",r.TextureSource="texture-source",r.Environment="environment",r.ShapeBuilder="shape-builder",r.Batcher="batcher",r))(b||{}),Iv=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},qu=(r,e)=>Iv(r).priority??e,V={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Iv).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e));}),this},add(...r){return r.map(Iv).forEach(e=>{e.type.forEach(t=>{let i=this._addHandlers,s=this._queue;i[t]?i[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e));});}),this},handle(r,e,t){let 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;let n=this._queue;return n[r]&&(n[r]?.forEach(o=>e(o)),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];})},handleByNamedList(r,e,t=-1){return this.handle(r,i=>{e.findIndex(n=>n.name===i.name)>=0||(e.push({name:i.name,value:i.ref}),e.sort((n,o)=>qu(o.value,t)-qu(n.value,t)));},i=>{let s=e.findIndex(n=>n.name===i.name);s!==-1&&e.splice(s,1);})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>qu(n,t)-qu(s,t)));},i=>{let s=e.indexOf(i.ref);s!==-1&&e.splice(s,1);})},mixin(r,...e){for(let t of e)Object.defineProperties(r.prototype,Object.getOwnPropertyDescriptors(t));}};});var t3=Wi((s6,Dv)=>{var RG=Object.prototype.hasOwnProperty,hr="~";function Gh(){}Object.create&&(Gh.prototype=Object.create(null),new Gh().__proto__||(hr=false));function BG(r,e,t){this.fn=r,this.context=e,this.once=t||false;}function e3(r,e,t,i,s){if(typeof t!="function")throw new TypeError("The listener must be a function");var n=new BG(t,i||r,s),o=hr?hr+e:e;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],n]:r._events[o].push(n):(r._events[o]=n,r._eventsCount++),r}function Mm(r,e){--r._eventsCount===0?r._events=new Gh:delete r._events[e];}function Zt(){this._events=new Gh,this._eventsCount=0;}Zt.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)RG.call(t,i)&&e.push(hr?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};Zt.prototype.listeners=function(e){var t=hr?hr+e:e,i=this._events[t];if(!i)return [];if(i.fn)return [i.fn];for(var s=0,n=i.length,o=new Array(n);s<n;s++)o[s]=i[s].fn;return o};Zt.prototype.listenerCount=function(e){var t=hr?hr+e:e,i=this._events[t];return i?i.fn?1:i.length:0};Zt.prototype.emit=function(e,t,i,s,n,o){var a=hr?hr+e:e;if(!this._events[a])return false;var u=this._events[a],l=arguments.length,c,h;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,true),l){case 1:return u.fn.call(u.context),true;case 2:return u.fn.call(u.context,t),true;case 3:return u.fn.call(u.context,t,i),true;case 4:return u.fn.call(u.context,t,i,s),true;case 5:return u.fn.call(u.context,t,i,s,n),true;case 6:return u.fn.call(u.context,t,i,s,n,o),true}for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];u.fn.apply(u.context,c);}else {var d=u.length,f;for(h=0;h<d;h++)switch(u[h].once&&this.removeListener(e,u[h].fn,void 0,true),l){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,t);break;case 3:u[h].fn.call(u[h].context,t,i);break;case 4:u[h].fn.call(u[h].context,t,i,s);break;default:if(!c)for(f=1,c=new Array(l-1);f<l;f++)c[f-1]=arguments[f];u[h].fn.apply(u[h].context,c);}}return true};Zt.prototype.on=function(e,t,i){return e3(this,e,t,i,false)};Zt.prototype.once=function(e,t,i){return e3(this,e,t,i,true)};Zt.prototype.removeListener=function(e,t,i,s){var n=hr?hr+e:e;if(!this._events[n])return this;if(!t)return Mm(this,n),this;var o=this._events[n];if(o.fn)o.fn===t&&(!s||o.once)&&(!i||o.context===i)&&Mm(this,n);else {for(var a=0,u=[],l=o.length;a<l;a++)(o[a].fn!==t||s&&!o[a].once||i&&o[a].context!==i)&&u.push(o[a]);u.length?this._events[n]=u.length===1?u[0]:u:Mm(this,n);}return this};Zt.prototype.removeAllListeners=function(e){var t;return e?(t=hr?hr+e:e,this._events[t]&&Mm(this,t)):(this._events=new Gh,this._eventsCount=0),this};Zt.prototype.off=Zt.prototype.removeListener;Zt.prototype.addListener=Zt.prototype.on;Zt.prefixed=hr;Zt.EventEmitter=Zt;typeof Dv<"u"&&(Dv.exports=Zt);});var r3,ve,Wt=p(()=>{r3=Fh(t3()),ve=r3.default;});var IG,Ts,kt,Yr,c3,i3,kv,DG,Rm,h3,d3,s3,n3,o3,Uh,kG,OG,FG,GG,Gv,a3,UG,Ov,Fv,u3,Uv,fi,l3,f3,p3=p(()=>{IG={grad:.9,turn:360,rad:360/(2*Math.PI)},Ts=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},kt=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},Yr=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},c3=function(r){return (r=isFinite(r)?r%360:0)>0?r:r+360},i3=function(r){return {r:Yr(r.r,0,255),g:Yr(r.g,0,255),b:Yr(r.b,0,255),a:Yr(r.a)}},kv=function(r){return {r:kt(r.r),g:kt(r.g),b:kt(r.b),a:kt(r.a,3)}},DG=/^#([0-9a-f]{3,8})$/i,Rm=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},h3=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),o=n-Math.min(e,t,i),a=o?n===e?(t-i)/o:n===t?2+(i-e)/o:4+(e-t)/o:0;return {h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:s}},d3=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),o=i*(1-t),a=i*(1-(e-n)*t),u=i*(1-(1-e+n)*t),l=n%6;return {r:255*[i,a,o,o,u,i][l],g:255*[u,i,i,a,o,o][l],b:255*[o,o,u,i,i,a][l],a:s}},s3=function(r){return {h:c3(r.h),s:Yr(r.s,0,100),l:Yr(r.l,0,100),a:Yr(r.a)}},n3=function(r){return {h:kt(r.h),s:kt(r.s),l:kt(r.l),a:kt(r.a,3)}},o3=function(r){return d3((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;},Uh=function(r){return {h:(e=h3(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;},kG=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,OG=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,FG=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,GG=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gv={string:[[function(r){var e=DG.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?kt(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?kt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=FG.exec(r)||GG.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:i3({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=kG.exec(r)||OG.exec(r);if(!e)return null;var t,i,s=s3({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(IG[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return o3(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 Ts(e)&&Ts(t)&&Ts(i)?i3({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(!Ts(e)||!Ts(t)||!Ts(i))return null;var o=s3({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return o3(o)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!Ts(e)||!Ts(t)||!Ts(i))return null;var o=(function(a){return {h:c3(a.h),s:Yr(a.s,0,100),v:Yr(a.v,0,100),a:Yr(a.a)}})({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return d3(o)},"hsv"]]},a3=function(r,e){for(var t=0;t<e.length;t++){var i=e[t][0](r);if(i)return [i,e[t][1]]}return [null,void 0]},UG=function(r){return typeof r=="string"?a3(r.trim(),Gv.string):typeof r=="object"&&r!==null?a3(r,Gv.object):[null,void 0]},Ov=function(r,e){var t=Uh(r);return {h:t.h,s:Yr(t.s+100*e,0,100),l:t.l,a:t.a}},Fv=function(r){return (299*r.r+587*r.g+114*r.b)/1e3/255},u3=function(r,e){var t=Uh(r);return {h:t.h,s:t.s,l:Yr(t.l+100*e,0,100),a:t.a}},Uv=(function(){function r(e){this.parsed=UG(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1};}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return kt(Fv(this.rgba),2)},r.prototype.isDark=function(){return Fv(this.rgba)<.5},r.prototype.isLight=function(){return Fv(this.rgba)>=.5},r.prototype.toHex=function(){return e=kv(this.rgba),t=e.r,i=e.g,s=e.b,o=(n=e.a)<1?Rm(kt(255*n)):"","#"+Rm(t)+Rm(i)+Rm(s)+o;var e,t,i,s,n,o;},r.prototype.toRgb=function(){return kv(this.rgba)},r.prototype.toRgbString=function(){return e=kv(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 n3(Uh(this.rgba))},r.prototype.toHslString=function(){return e=n3(Uh(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=h3(this.rgba),{h:kt(e.h),s:kt(e.s),v:kt(e.v),a:kt(e.a,3)};var e;},r.prototype.invert=function(){return fi({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),fi(Ov(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),fi(Ov(this.rgba,-e))},r.prototype.grayscale=function(){return fi(Ov(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),fi(u3(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),fi(u3(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"?fi({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):kt(this.rgba.a,3);var t;},r.prototype.hue=function(e){var t=Uh(this.rgba);return typeof e=="number"?fi({h:e,s:t.s,l:t.l,a:t.a}):kt(t.h)},r.prototype.isEqual=function(e){return this.toHex()===fi(e).toHex()},r})(),fi=function(r){return r instanceof Uv?r:new Uv(r)},l3=[],f3=function(r){r.forEach(function(e){l3.indexOf(e)<0&&(e(Uv,Gv),l3.push(e));});};});function m3(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(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return "transparent";var a,u,l=i[this.toHex()];if(l)return l;if(o?.closest){var c=this.toRgb(),h=1/0,d="black";if(!n.length)for(var f in t)n[f]=new r(t[f]).toRgb();for(var m in t){var _=(a=c,u=n[m],Math.pow(a.r-u.r,2)+Math.pow(a.g-u.g,2)+Math.pow(a.b-u.b,2));_<h&&(h=_,d=m);}return d}},e.string.push([function(o){var a=o.toLowerCase(),u=a==="transparent"?"#0000":t[a];return u?new r(u).toRgb():null},"name"]);}var g3=p(()=>{});var Ku,te,vt=p(()=>{p3();g3();f3([m3]);Ku=class Lh{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e;}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof Lh)this._value=this._cloneSource(e._value),this._int=e._int,this._components.set(e._components);else {if(e===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,e))&&(this._value=this._cloneSource(e),this._normalize(this._value));}}get value(){return this._value}_cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}_isSourceEqual(e,t){let i=typeof e;if(i!==typeof t)return false;if(i==="number"||i==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?false:e.every((n,o)=>n===t[o]);if(e!==null&&t!==null){let n=Object.keys(e),o=Object.keys(t);return n.length!==o.length?false:n.every(a=>e[a]===t[a])}return e===t}toRgba(){let[e,t,i,s]=this._components;return {r:e,g:t,b:i,a:s}}toRgb(){let[e,t,i]=this._components;return {r:e,g:t,b:i}}toRgbaString(){let[e,t,i]=this.toUint8RgbArray();return `rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){let[t,i,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb),e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(s*255),e}toArray(e){this._arrayRgba||(this._arrayRgba=[]),e||(e=this._arrayRgba);let[t,i,s,n]=this._components;return e[0]=t,e[1]=i,e[2]=s,e[3]=n,e}toRgbArray(e){this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb);let[t,i,s]=this._components;return e[0]=t,e[1]=i,e[2]=s,e}toNumber(){return this._int}toBgrNumber(){let[e,t,i]=this.toUint8RgbArray();return (i<<16)+(t<<8)+e}toLittleEndianNumber(){let e=this._int;return (e>>16)+(e&65280)+((e&255)<<16)}multiply(e){let[t,i,s,n]=Lh._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=true){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=true){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(){let e=this._int.toString(16);return `#${"000000".substring(0,6-e.length)+e}`}toHexa(){let t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}_normalize(e){let t,i,s,n;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){let o=e;t=(o>>16&255)/255,i=(o>>8&255)/255,s=(o&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"){let a=Lh.HEX_PATTERN.exec(e);a&&(e=`#${a[2]}`);}let o=fi(e);o.isValid()&&({r:t,g:i,b:s,a:n}=o.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);let[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)}static isColorLike(e){return typeof e=="number"||typeof e=="string"||e instanceof Number||e instanceof Lh||Array.isArray(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Float32Array||e.r!==void 0&&e.g!==void 0&&e.b!==void 0||e.r!==void 0&&e.g!==void 0&&e.b!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0&&e.a!==void 0}};Ku.shared=new Ku;Ku._temp=new Ku;Ku.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;te=Ku;});var Bm,Lv=p(()=>{Bm={cullArea:null,cullable:false,cullableChildren:true};});var Im,Dm,km,Om=p(()=>{Im=Math.PI*2,Dm=180/Math.PI,km=Math.PI/180;});var ge,Nv,_r=p(()=>{ge=class r{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t;}clone(){return new r(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}toString(){return `[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return Nv.x=0,Nv.y=0,Nv}},Nv=new ge;});var O,LG,NG,Te=p(()=>{Om();_r();O=class r{constructor(e=1,t=0,i=0,s=1,n=0,o=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o;}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,o){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));let 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 ge;let 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 ge;let i=this.a,s=this.b,n=this.c,o=this.d,a=this.tx,u=this.ty,l=1/(i*o+n*-s),c=e.x,h=e.y;return t.x=o*l*c+-n*l*h+(u*n-a*o)*l,t.y=i*l*h+-s*l*c+(-u*i+a*s)*l,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){let t=Math.cos(e),i=Math.sin(e),s=this.a,n=this.c,o=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=o*t-this.ty*i,this.ty=o*i+this.ty*t,this}append(e){let 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}appendFrom(e,t){let i=e.a,s=e.b,n=e.c,o=e.d,a=e.tx,u=e.ty,l=t.a,c=t.b,h=t.c,d=t.d;return this.a=i*l+s*h,this.b=i*c+s*d,this.c=n*l+o*h,this.d=n*c+o*d,this.tx=a*l+u*h+t.tx,this.ty=a*c+u*d+t.ty,this}setTransform(e,t,i,s,n,o,a,u,l){return this.a=Math.cos(a+l)*n,this.b=Math.sin(a+l)*n,this.c=-Math.sin(a-u)*o,this.d=Math.cos(a-u)*o,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d),this}prepend(e){let t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){let 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){let t=this.a,i=this.b,s=this.c,n=this.d,o=e.pivot,a=-Math.atan2(-s,n),u=Math.atan2(i,t),l=Math.abs(a+u);return l<1e-5||Math.abs(Im-l)<1e-5?(e.rotation=u,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=u),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*i+o.y*n),e}invert(){let e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,o=e*s-t*i;return this.a=s/o,this.b=-t/o,this.c=-i/o,this.d=e/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(e*this.ty-t*n)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let e=new r;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}equals(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}toString(){return `[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return NG.identity()}static get shared(){return LG.identity()}},LG=new O,NG=new O;});var ke,tn=p(()=>{ke=class r{constructor(e,t,i){this._x=t||0,this._y=i||0,this._observer=e;}clone(e){return new r(e??this._observer,this._x,this._y)}set(e=0,t=e){return (this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this._observer._onUpdate(this)),this}copyFrom(e){return (this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return `[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this));}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this));}};});function de(r="default"){return Nh[r]===void 0&&(Nh[r]=-1),++Nh[r]}function x3(){for(let r in Nh)delete Nh[r];}var Nh,Pt=p(()=>{Nh={default:-1};});function G(r,e,t=3){if(_3[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))),_3[e]=true;}var _3,Y,Fm,Me=p(()=>{_3={},Y="8.0.0",Fm="8.3.4";});function U(...r){Vv!==b3&&(Vv++,Vv===b3?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...r));}var Vv,b3,Ae=p(()=>{Vv=0,b3=500;});var Ss,Gm=p(()=>{Ss=class{constructor(e,t){this._pool=[],this._count=0,this._index=0,this._classType=e,t&&this.prepopulate(t);}prepopulate(e){for(let t=0;t<e;t++)this._pool[this._index++]=new this._classType;this._count+=e;}get(e){let t;return this._index>0?t=this._pool[--this._index]:t=new this._classType,t.init?.(e),t}return(e){e.reset?.(),this._pool[this._index++]=e;}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){this._pool.length=0,this._index=0;}};});var Vh,He,Xi=p(()=>{Gm();Vh=class{constructor(){this._poolsByClass=new Map;}prepopulate(e,t){this.getPool(e).prepopulate(t);}get(e,t){return this.getPool(e).get(t)}return(e){this.getPool(e.constructor).return(e);}getPool(e){return this._poolsByClass.has(e)||this._poolsByClass.set(e,new Ss(e)),this._poolsByClass.get(e)}stats(){let e={};return this._poolsByClass.forEach(t=>{let i=e[t._classType.name]?t._classType.name+t._classType.ID:t._classType.name;e[i]={free:t.totalFree,used:t.totalUsed,size:t.totalSize};}),e}},He=new Vh;});var Um,Hv=p(()=>{Me();Um={get isCachedAsTexture(){return !!this.renderGroup?.isCachedAsTexture},cacheAsTexture(r){typeof r=="boolean"&&r===false?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(r===true?{}:r));},updateCacheTexture(){this.renderGroup?.updateCacheTexture();},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(r){G("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(r);}};});function Zu(r,e,t){let i=r.length,s;if(e>=i||t===0)return;t=e+t>i?i-e:t;let n=i-t;for(s=e;s<n;++s)r[s]=r[s+t];r.length=n;}var Lm=p(()=>{});var Nm,zv=p(()=>{Lm();Me();Nm={allowChildren:true,removeChildren(r=0,e){let t=e??this.children.length,i=t-r,s=[];if(i>0&&i<=t){for(let o=t-1;o>=r;o--){let a=this.children[o];a&&(s.push(a),a.parent=null);}Zu(this.children,r,t);let n=this.renderGroup||this.parentRenderGroup;n&&n.removeChildren(s);for(let o=0;o<s.length;++o){let a=s[o];a.parentRenderLayer?.detach(a),this.emit("childRemoved",a,this,o),s[o].emit("removed",this);}return s.length>0&&this._didViewChangeTick++,s}else if(i===0&&this.children.length===0)return s;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(r){let e=this.getChildAt(r);return this.removeChild(e)},getChildAt(r){if(r<0||r>=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]},setChildIndex(r,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(r),this.addChildAt(r,e);},getChildIndex(r){let e=this.children.indexOf(r);if(e===-1)throw new Error("The supplied Container must be a child of the caller");return e},addChildAt(r,e){this.allowChildren||G(Y,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:t}=this;if(e<0||e>t.length)throw new Error(`${r}addChildAt: The index ${e} supplied is out of bounds ${t.length}`);if(r.parent){let s=r.parent.children.indexOf(r);if(r.parent===this&&s===e)return r;s!==-1&&r.parent.children.splice(s,1);}e===t.length?t.push(r):t.splice(e,0,r),r.parent=this,r.didChange=true,r._updateFlags=15;let i=this.renderGroup||this.parentRenderGroup;return i&&i.addChild(r),this.sortableChildren&&(this.sortDirty=true),this.emit("childAdded",r,this,e),r.emit("added",this),r},swapChildren(r,e){if(r===e)return;let t=this.getChildIndex(r),i=this.getChildIndex(e);this.children[t]=e,this.children[i]=r;let s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=true),this._didContainerChangeTick++;},removeFromParent(){this.parent?.removeChild(this);},reparentChild(...r){return r.length===1?this.reparentChildAt(r[0],this.children.length):(r.forEach(e=>this.reparentChildAt(e,this.children.length)),r[0])},reparentChildAt(r,e){if(r.parent===this)return this.setChildIndex(r,e),r;let t=r.worldTransform.clone();r.removeFromParent(),this.addChildAt(r,e);let i=this.worldTransform.clone();return i.invert(),t.prepend(i),r.setFromMatrix(t),r},replaceChild(r,e){r.updateLocalTransform(),this.addChildAt(e,this.getChildIndex(r)),e.setFromMatrix(r.localTransform),e.updateLocalTransform(),this.removeChild(r);}};});var Vm,Wv=p(()=>{Vm={collectRenderables(r,e,t){this.parentRenderLayer&&this.parentRenderLayer!==t||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(r,e,t):this.renderGroup?e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,r):this.collectRenderablesWithEffects(r,e,t));},collectRenderablesSimple(r,e,t){let i=this.children,s=i.length;for(let n=0;n<s;n++)i[n].collectRenderables(r,e,t);},collectRenderablesWithEffects(r,e,t){let{renderPipes:i}=e;for(let s=0;s<this.effects.length;s++){let n=this.effects[s];i[n.pipe].push(n,this,r);}this.collectRenderablesSimple(r,e,t);for(let s=this.effects.length-1;s>=0;s--){let n=this.effects[s];i[n.pipe].pop(n,this,r);}}};});var pi,Hh=p(()=>{pi=class{constructor(){this.pipe="filter",this.priority=1;}destroy(){for(let e=0;e<this.filters.length;e++)this.filters[e].destroy();this.filters=null,this.filterArea=null;}};});var zh,Qu,Xv=p(()=>{P();Xi();zh=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=false;}init(){this._initialized||(this._initialized=true,this._effectClasses.forEach(e=>{this.add({test:e.test,maskClass:e});}));}add(e){this._tests.push(e);}getMaskEffect(e){this._initialized||this.init();for(let t=0;t<this._tests.length;t++){let i=this._tests[t];if(i.test(e))return He.get(i.maskClass,e)}return e}returnMaskEffect(e){He.return(e);}},Qu=new zh;V.handleByList(b.MaskEffect,Qu._effectClasses);});var Hm,Yv=p(()=>{Hh();Xv();Hm={_maskEffect:null,_maskOptions:{inverse:false},_filterEffect:null,effects:[],_markStructureAsChanged(){let r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=true);},addEffect(r){this.effects.indexOf(r)===-1&&(this.effects.push(r),this.effects.sort((t,i)=>t.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple());},removeEffect(r){let e=this.effects.indexOf(r);e!==-1&&(this.effects.splice(e,1),this._markStructureAsChanged(),this._updateIsSimple());},set mask(r){let e=this._maskEffect;e?.mask!==r&&(e&&(this.removeEffect(e),Qu.returnMaskEffect(e),this._maskEffect=null),r!=null&&(this._maskEffect=Qu.getMaskEffect(r),this.addEffect(this._maskEffect)));},get mask(){return this._maskEffect?.mask},setMask(r){this._maskOptions={...this._maskOptions,...r},r.mask&&(this.mask=r.mask),this._markStructureAsChanged();},set filters(r){!Array.isArray(r)&&r&&(r=[r]);let e=this._filterEffect||(this._filterEffect=new pi);r=r;let t=r?.length>0,i=e.filters?.length>0,s=t!==i;r=Array.isArray(r)?r.slice(0):r,e.filters=Object.freeze(r),s&&(t?this.addEffect(e):(this.removeEffect(e),e.filters=r??null));},get filters(){return this._filterEffect?.filters},set filterArea(r){this._filterEffect||(this._filterEffect=new pi),this._filterEffect.filterArea=r;},get filterArea(){return this._filterEffect?.filterArea}};});var zm,jv=p(()=>{Me();zm={label:null,get name(){return G(Y,"Container.name property has been removed, use Container.label instead"),this.label},set name(r){G(Y,"Container.name property has been removed, use Container.label instead"),this.label=r;},getChildByName(r,e=false){return this.getChildByLabel(r,e)},getChildByLabel(r,e=false){let t=this.children;for(let i=0;i<t.length;i++){let s=t[i];if(s.label===r||r instanceof RegExp&&r.test(s.label))return s}if(e)for(let i=0;i<t.length;i++){let n=t[i].getChildByLabel(r,true);if(n)return n}return null},getChildrenByLabel(r,e=false,t=[]){let i=this.children;for(let s=0;s<i.length;s++){let n=i[s];(n.label===r||r instanceof RegExp&&r.test(n.label))&&t.push(n);}if(e)for(let s=0;s<i.length;s++)i[s].getChildrenByLabel(r,true,t);return t}};});var Wm;exports.Rectangle=void 0;var xt=p(()=>{_r();Wm=[new ge,new ge,new ge,new ge],exports.Rectangle=class r{constructor(e=0,t=0,i=0,s=0){this.type="rectangle",this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s);}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new r(0,0,0,0)}clone(){return new r(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,t){return this.width<=0||this.height<=0?false:e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height}strokeContains(e,t,i,s=.5){let{width:n,height:o}=this;if(n<=0||o<=0)return false;let a=this.x,u=this.y,l=i*(1-s),c=i-l,h=a-l,d=a+n+l,f=u-l,m=u+o+l,_=a+c,x=a+n-c,g=u+c,y=u+o-c;return e>=h&&e<=d&&t>=f&&t<=m&&!(e>_&&e<x&&t>g&&t<y)}intersects(e,t){if(!t){let k=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=k)return false;let L=this.y<e.y?e.y:this.y;return (this.bottom>e.bottom?e.bottom:this.bottom)>L}let i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return false;let a=Wm[0].set(e.left,e.top),u=Wm[1].set(e.left,e.bottom),l=Wm[2].set(e.right,e.top),c=Wm[3].set(e.right,e.bottom);if(l.x<=a.x||u.y<=a.y)return false;let h=Math.sign(t.a*t.d-t.b*t.c);if(h===0||(t.apply(a,a),t.apply(u,u),t.apply(l,l),t.apply(c,c),Math.max(a.x,u.x,l.x,c.x)<=i||Math.min(a.x,u.x,l.x,c.x)>=s||Math.max(a.y,u.y,l.y,c.y)<=n||Math.min(a.y,u.y,l.y,c.y)>=o))return false;let d=h*(u.y-a.y),f=h*(a.x-u.x),m=d*i+f*n,_=d*s+f*n,x=d*i+f*o,g=d*s+f*o;if(Math.max(m,_,x,g)<=d*a.x+f*a.y||Math.min(m,_,x,g)>=d*c.x+f*c.y)return false;let y=h*(a.y-l.y),v=h*(l.x-a.x),S=y*i+v*n,C=y*s+v*n,E=y*i+v*o,M=y*s+v*o;return !(Math.max(S,C,E,M)<=y*a.x+v*a.y||Math.min(S,C,E,M)>=y*c.x+v*c.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){let 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){let 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}scale(e,t=e){return this.x*=e,this.y*=t,this.width*=e,this.height*=t,this}enlarge(e){let 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}getBounds(e){return e||(e=new r),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return false;let t=e.x,i=e.y,s=e.x+e.width,n=e.y+e.height;return t>=this.x&&t<this.x+this.width&&i>=this.y&&i<this.y+this.height&&s>=this.x&&s<this.x+this.width&&n>=this.y&&n<this.y+this.height}set(e,t,i,s){return this.x=e,this.y=t,this.width=i,this.height=s,this}toString(){return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};});var y3,Re,Xt=p(()=>{Te();xt();y3=new O,Re=class r{constructor(e=1/0,t=1/0,i=-1/0,s=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=y3,this.minX=e,this.minY=t,this.maxX=i,this.maxY=s;}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new exports.Rectangle);let e=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(e.x=0,e.y=0,e.width=0,e.height=0):e.copyFromBounds(this),e}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=y3,this}set(e,t,i,s){this.minX=e,this.minY=t,this.maxX=i,this.maxY=s;}addFrame(e,t,i,s,n){n||(n=this.matrix);let o=n.a,a=n.b,u=n.c,l=n.d,c=n.tx,h=n.ty,d=this.minX,f=this.minY,m=this.maxX,_=this.maxY,x=o*e+u*t+c,g=a*e+l*t+h;x<d&&(d=x),g<f&&(f=g),x>m&&(m=x),g>_&&(_=g),x=o*i+u*t+c,g=a*i+l*t+h,x<d&&(d=x),g<f&&(f=g),x>m&&(m=x),g>_&&(_=g),x=o*e+u*s+c,g=a*e+l*s+h,x<d&&(d=x),g<f&&(f=g),x>m&&(m=x),g>_&&(_=g),x=o*i+u*s+c,g=a*i+l*s+h,x<d&&(d=x),g<f&&(f=g),x>m&&(m=x),g>_&&(_=g),this.minX=d,this.minY=f,this.maxX=m,this.maxY=_;}addRect(e,t){this.addFrame(e.x,e.y,e.x+e.width,e.y+e.height,t);}addBounds(e,t){this.addFrame(e.minX,e.minY,e.maxX,e.maxY,t);}addBoundsMask(e){this.minX=this.minX>e.minX?this.minX:e.minX,this.minY=this.minY>e.minY?this.minY:e.minY,this.maxX=this.maxX<e.maxX?this.maxX:e.maxX,this.maxY=this.maxY<e.maxY?this.maxY:e.maxY;}applyMatrix(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,{a:o,b:a,c:u,d:l,tx:c,ty:h}=e,d=o*t+u*i+c,f=a*t+l*i+h;this.minX=d,this.minY=f,this.maxX=d,this.maxY=f,d=o*s+u*i+c,f=a*s+l*i+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*t+u*n+c,f=a*t+l*n+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*s+u*n+c,f=a*s+l*n+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY;}fit(e){return this.minX<e.left&&(this.minX=e.left),this.maxX>e.right&&(this.maxX=e.right),this.minY<e.top&&(this.minY=e.top),this.maxY>e.bottom&&(this.maxY=e.bottom),this}fitBounds(e,t,i,s){return this.minX<e&&(this.minX=e),this.maxX>t&&(this.maxX=t),this.minY<i&&(this.minY=i),this.maxY>s&&(this.maxY=s),this}pad(e,t=e){return this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new r(this.minX,this.minY,this.maxX,this.maxY)}scale(e,t=e){return this.minX*=e,this.minY*=t,this.maxX*=e,this.maxY*=t,this}get x(){return this.minX}set x(e){let t=this.maxX-this.minX;this.minX=e,this.maxX=e+t;}get y(){return this.minY}set y(e){let t=this.maxY-this.minY;this.minY=e,this.maxY=e+t;}get width(){return this.maxX-this.minX}set width(e){this.maxX=this.minX+e;}get height(){return this.maxY-this.minY}set height(e){this.maxY=this.minY+e;}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(e,t,i,s){let n=this.minX,o=this.minY,a=this.maxX,u=this.maxY;s||(s=this.matrix);let l=s.a,c=s.b,h=s.c,d=s.d,f=s.tx,m=s.ty;for(let _=t;_<i;_+=2){let x=e[_],g=e[_+1],y=l*x+h*g+f,v=c*x+d*g+m;n=y<n?y:n,o=v<o?v:o,a=y>a?y:a,u=v>u?v:u;}this.minX=n,this.minY=o,this.maxX=a,this.maxY=u;}containsPoint(e,t){return this.minX<=e&&this.minY<=t&&this.maxX>=e&&this.maxY>=t}toString(){return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(e){return this.minX=e.minX,this.minY=e.minY,this.maxX=e.maxX,this.maxY=e.maxY,this}};});var pt,dr,rn=p(()=>{Te();Gm();Xt();pt=new Ss(O),dr=new Ss(Re);});var VG,Xm,$v=p(()=>{Te();Xt();rn();VG=new O,Xm={getFastGlobalBounds(r,e){e||(e=new Re),e.clear(),this._getGlobalBoundsRecursive(!!r,e,this.parentRenderLayer),e.isValid||e.set(0,0,0,0);let t=this.renderGroup||this.parentRenderGroup;return e.applyMatrix(t.worldTransform),e},_getGlobalBoundsRecursive(r,e,t){let i=e;if(r&&this.parentRenderLayer&&this.parentRenderLayer!==t||this.localDisplayStatus!==7||!this.measurable)return;let s=!!this.effects.length;if((this.renderGroup||s)&&(i=dr.get().clear()),this.boundsArea)e.addRect(this.boundsArea,this.worldTransform);else {if(this.renderPipeId){let o=this.bounds;i.addFrame(o.minX,o.minY,o.maxX,o.maxY,this.groupTransform);}let n=this.children;for(let o=0;o<n.length;o++)n[o]._getGlobalBoundsRecursive(r,i,t);}if(s){let n=false,o=this.renderGroup||this.parentRenderGroup;for(let a=0;a<this.effects.length;a++)this.effects[a].addBounds&&(n||(n=true,i.applyMatrix(o.worldTransform)),this.effects[a].addBounds(i,true));n&&i.applyMatrix(o.worldTransform.copyTo(VG).invert()),e.addBounds(i),dr.return(i);}else this.renderGroup&&(e.addBounds(i,this.relativeGroupTransform),dr.return(i));}};});function Yi(r,e,t){t.clear();let i,s;return r.parent?e?i=r.parent.worldTransform:(s=pt.get().identity(),i=Ju(r,s)):i=O.IDENTITY,v3(r,t,i,e),s&&pt.return(s),t.isValid||t.set(0,0,0,0),t}function v3(r,e,t,i){if(!r.visible||!r.measurable)return;let s;i?s=r.worldTransform:(r.updateLocalTransform(),s=pt.get(),s.appendFrom(r.localTransform,t));let n=e,o=!!r.effects.length;if(o&&(e=dr.get().clear()),r.boundsArea)e.addRect(r.boundsArea,s);else {r.bounds&&(e.matrix=s,e.addBounds(r.bounds));for(let a=0;a<r.children.length;a++)v3(r.children[a],e,s,i);}if(o){for(let a=0;a<r.effects.length;a++)r.effects[a].addBounds?.(e);n.addBounds(e,O.IDENTITY),dr.return(e);}i||pt.return(s);}function Ju(r,e){let t=r.parent;return t&&(Ju(t,e),t.updateLocalTransform(),e.append(t.localTransform)),e}var ko=p(()=>{Te();rn();});function el(r,e){if(r===16777215||!e)return e;if(e===16777215||!r)return r;let t=r>>16&255,i=r>>8&255,s=r&255,n=e>>16&255,o=e>>8&255,a=e&255,u=t*n/255|0,l=i*o/255|0,c=s*a/255|0;return (u<<16)+(l<<8)+c}var Ym=p(()=>{});function sn(r,e){return r===T3?e:e===T3?r:el(r,e)}var T3,jm=p(()=>{Ym();T3=16777215;});function Es(r){return ((r&255)<<16)+(r&65280)+(r>>16&255)}var $m,qm=p(()=>{Te();ko();rn();jm();$m={getGlobalAlpha(r){if(r)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let e=this.alpha,t=this.parent;for(;t;)e*=t.alpha,t=t.parent;return e},getGlobalTransform(r=new O,e){if(e)return r.copyFrom(this.worldTransform);this.updateLocalTransform();let t=Ju(this,pt.get().identity());return r.appendFrom(this.localTransform,t),pt.return(t),r},getGlobalTint(r){if(r)return this.renderGroup?Es(this.renderGroup.worldColor):this.parentRenderGroup?Es(sn(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let e=this.localColor,t=this.parent;for(;t;)e=sn(e,t.localColor),t=t.parent;return Es(e)}};});function nn(r,e,t){return e.clear(),t||(t=O.IDENTITY),S3(r,e,t,r,true),e.isValid||e.set(0,0,0,0),e}function S3(r,e,t,i,s){let n;if(s)n=pt.get(),n=t.copyTo(n);else {if(!r.visible||!r.measurable)return;r.updateLocalTransform();let u=r.localTransform;n=pt.get(),n.appendFrom(u,t);}let o=e,a=!!r.effects.length;if(a&&(e=dr.get().clear()),r.boundsArea)e.addRect(r.boundsArea,n);else {r.renderPipeId&&(e.matrix=n,e.addBounds(r.bounds));let u=r.children;for(let l=0;l<u.length;l++)S3(u[l],e,n,i,false);}if(a){for(let u=0;u<r.effects.length;u++)r.effects[u].addLocalBounds?.(e,i);o.addBounds(e,O.IDENTITY),dr.return(e);}pt.return(n);}var Wh=p(()=>{Te();rn();});function Xh(r,e){let t=r.children;for(let i=0;i<t.length;i++){let s=t[i],n=s.uid,o=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=e.index;(e.data[a]!==n||e.data[a+1]!==o)&&(e.data[e.index]=n,e.data[e.index+1]=o,e.didChange=true),e.index=a+2,s.children.length&&Xh(s,e);}return e.didChange}var qv=p(()=>{});var HG,Km,Kv=p(()=>{Te();Xt();ko();Wh();qv();HG=new O,Km={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(r,e){let t=Math.sign(this.scale.x)||1;e!==0?this.scale.x=r/e*t:this.scale.x=t;},_setHeight(r,e){let t=Math.sign(this.scale.y)||1;e!==0?this.scale.y=r/e*t:this.scale.y=t;},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:false,localBounds:new Re});let r=this._localBoundsCacheData;return r.index=1,r.didChange=false,r.data[0]!==this._didViewChangeTick&&(r.didChange=true,r.data[0]=this._didViewChangeTick),Xh(this,r),r.didChange&&nn(this,r.localBounds,HG),r.localBounds},getBounds(r,e){return Yi(this,r,e||new Re)}};});var Zm,Zv=p(()=>{Zm={_onRender:null,set onRender(r){let e=this.renderGroup||this.parentRenderGroup;if(!r){this._onRender&&e?.removeOnRender(this),this._onRender=null;return}this._onRender||e?.addOnRender(this),this._onRender=r;},get onRender(){return this._onRender}};});function zG(r,e){return r._zIndex-e._zIndex}var Qm,Qv=p(()=>{Qm={_zIndex:0,sortDirty:false,sortableChildren:false,get zIndex(){return this._zIndex},set zIndex(r){this._zIndex!==r&&(this._zIndex=r,this.depthOfChildModified());},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=true,this.parent.sortDirty=true),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=true);},sortChildren(){this.sortDirty&&(this.sortDirty=false,this.children.sort(zG));}};});var Jm,Jv=p(()=>{_r();rn();Jm={getGlobalPosition(r=new ge,e=false){return this.parent?this.parent.toGlobal(this._position,r,e):(r.x=this._position.x,r.y=this._position.y),r},toGlobal(r,e,t=false){let i=this.getGlobalTransform(pt.get(),t);return e=i.apply(r,e),pt.return(i),e},toLocal(r,e,t,i){e&&(r=e.toGlobal(r,t,i));let s=this.getGlobalTransform(pt.get(),i);return t=s.applyInverse(r,t),pt.return(s),t}};});var on,eg=p(()=>{Pt();on=class{constructor(){this.uid=de("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0;}reset(){this.instructionSize=0;}add(e){this.instructions[this.instructionSize++]=e;}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"]);}};});function mi(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Yh(r){return !(r&r-1)&&!!r}function E3(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}var tl=p(()=>{});function Ot(r){let e={};for(let t in r)r[t]!==void 0&&(e[t]=r[t]);return e}var an=p(()=>{});function WG(r){let e=A3[r];return e===void 0&&(A3[r]=de("resource")),e}var A3,C3,mt,ji=p(()=>{Wt();Pt();Me();A3=Object.create(null);C3=class w3 extends ve{constructor(e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=false,e={...w3.defaultOptions,...e},this.addressMode=e.addressMode,this.addressModeU=e.addressModeU??this.addressModeU,this.addressModeV=e.addressModeV??this.addressModeV,this.addressModeW=e.addressModeW??this.addressModeW,this.scaleMode=e.scaleMode,this.magFilter=e.magFilter??this.magFilter,this.minFilter=e.minFilter??this.minFilter,this.mipmapFilter=e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=e.lodMinClamp,this.lodMaxClamp=e.lodMaxClamp,this.compare=e.compare,this.maxAnisotropy=e.maxAnisotropy??1;}set addressMode(e){this.addressModeU=e,this.addressModeV=e,this.addressModeW=e;}get addressMode(){return this.addressModeU}set wrapMode(e){G(Y,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=e;}get wrapMode(){return this.addressMode}set scaleMode(e){this.magFilter=e,this.minFilter=e,this.mipmapFilter=e;}get scaleMode(){return this.magFilter}set maxAnisotropy(e){this._maxAnisotropy=Math.min(e,16),this._maxAnisotropy>1&&(this.scaleMode="linear");}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null;}_generateResourceId(){let e=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=WG(e),this._resourceId}destroy(){this.destroyed=true,this.emit("destroy"