@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
4 lines • 867 kB
JavaScript
var wA=Object.create;var ap=Object.defineProperty;var PA=Object.getOwnPropertyDescriptor;var BA=Object.getOwnPropertyNames;var RA=Object.getPrototypeOf,MA=Object.prototype.hasOwnProperty;var g=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ai=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),fc=(r,t)=>{for(var e in t)ap(r,e,{get:t[e],enumerable:!0})},DA=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of BA(t))!MA.call(r,s)&&s!==e&&ap(r,s,{get:()=>t[s],enumerable:!(i=PA(t,s))||i.enumerable});return r};var up=(r,t,e)=>(e=r!=null?wA(RA(r)):{},DA(t||!r||!r.__esModule?ap(e,"default",{value:r,enumerable:!0}):e,r));var p,lp,Pa,L,C=g(()=>{"use strict";p=(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))(p||{}),lp=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},Pa=(r,t)=>lp(r).priority??t,L={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(lp).forEach(t=>{t.type.forEach(e=>this._removeHandlers[e]?.(t))}),this},add(...r){return r.map(lp).forEach(t=>{t.type.forEach(e=>{let i=this._addHandlers,s=this._queue;i[e]?i[e]?.(t):(s[e]=s[e]||[],s[e]?.push(t))})}),this},handle(r,t,e){let i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=t,s[r]=e;let n=this._queue;return n[r]&&(n[r]?.forEach(o=>t(o)),delete n[r]),this},handleByMap(r,t){return this.handle(r,e=>{e.name&&(t[e.name]=e.ref)},e=>{e.name&&delete t[e.name]})},handleByNamedList(r,t,e=-1){return this.handle(r,i=>{t.findIndex(n=>n.name===i.name)>=0||(t.push({name:i.name,value:i.ref}),t.sort((n,o)=>Pa(o.value,e)-Pa(n.value,e)))},i=>{let s=t.findIndex(n=>n.name===i.name);s!==-1&&t.splice(s,1)})},handleByList(r,t,e=-1){return this.handle(r,i=>{t.includes(i.ref)||(t.push(i.ref),t.sort((s,n)=>Pa(n,e)-Pa(s,e)))},i=>{let s=t.indexOf(i.ref);s!==-1&&t.splice(s,1)})},mixin(r,...t){for(let e of t)Object.defineProperties(r.prototype,Object.getOwnPropertyDescriptors(e))}}});var d1=Ai((MM,cp)=>{"use strict";var FA=Object.prototype.hasOwnProperty,Re="~";function Ba(){}Object.create&&(Ba.prototype=Object.create(null),new Ba().__proto__||(Re=!1));function GA(r,t,e){this.fn=r,this.context=t,this.once=e||!1}function h1(r,t,e,i,s){if(typeof e!="function")throw new TypeError("The listener must be a function");var n=new GA(e,i||r,s),o=Re?Re+t:t;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 pc(r,t){--r._eventsCount===0?r._events=new Ba:delete r._events[t]}function ye(){this._events=new Ba,this._eventsCount=0}ye.prototype.eventNames=function(){var t=[],e,i;if(this._eventsCount===0)return t;for(i in e=this._events)FA.call(e,i)&&t.push(Re?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};ye.prototype.listeners=function(t){var e=Re?Re+t:t,i=this._events[e];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};ye.prototype.listenerCount=function(t){var e=Re?Re+t:t,i=this._events[e];return i?i.fn?1:i.length:0};ye.prototype.emit=function(t,e,i,s,n,o){var a=Re?Re+t:t;if(!this._events[a])return!1;var u=this._events[a],l=arguments.length,c,h;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,i),!0;case 4:return u.fn.call(u.context,e,i,s),!0;case 5:return u.fn.call(u.context,e,i,s,n),!0;case 6:return u.fn.call(u.context,e,i,s,n,o),!0}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(t,u[h].fn,void 0,!0),l){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,e);break;case 3:u[h].fn.call(u[h].context,e,i);break;case 4:u[h].fn.call(u[h].context,e,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!0};ye.prototype.on=function(t,e,i){return h1(this,t,e,i,!1)};ye.prototype.once=function(t,e,i){return h1(this,t,e,i,!0)};ye.prototype.removeListener=function(t,e,i,s){var n=Re?Re+t:t;if(!this._events[n])return this;if(!e)return pc(this,n),this;var o=this._events[n];if(o.fn)o.fn===e&&(!s||o.once)&&(!i||o.context===i)&&pc(this,n);else{for(var a=0,u=[],l=o.length;a<l;a++)(o[a].fn!==e||s&&!o[a].once||i&&o[a].context!==i)&&u.push(o[a]);u.length?this._events[n]=u.length===1?u[0]:u:pc(this,n)}return this};ye.prototype.removeAllListeners=function(t){var e;return t?(e=Re?Re+t:t,this._events[e]&&pc(this,e)):(this._events=new Ba,this._eventsCount=0),this};ye.prototype.off=ye.prototype.removeListener;ye.prototype.addListener=ye.prototype.on;ye.prefixed=Re;ye.EventEmitter=ye;typeof cp<"u"&&(cp.exports=ye)});var f1,St,le=g(()=>{"use strict";f1=up(d1(),1),St=f1.default});var UA,jr,ce,er,v1,p1,hp,IA,mc,T1,S1,m1,g1,x1,Ra,kA,OA,LA,NA,pp,_1,HA,dp,fp,b1,mp,hr,y1,E1,C1=g(()=>{"use strict";UA={grad:.9,turn:360,rad:360/(2*Math.PI)},jr=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},ce=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*r)/e+0},er=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),r>e?e:r>t?r:t},v1=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},p1=function(r){return{r:er(r.r,0,255),g:er(r.g,0,255),b:er(r.b,0,255),a:er(r.a)}},hp=function(r){return{r:ce(r.r),g:ce(r.g),b:ce(r.b),a:ce(r.a,3)}},IA=/^#([0-9a-f]{3,8})$/i,mc=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},T1=function(r){var t=r.r,e=r.g,i=r.b,s=r.a,n=Math.max(t,e,i),o=n-Math.min(t,e,i),a=o?n===t?(e-i)/o:n===e?2+(i-t)/o:4+(t-e)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:s}},S1=function(r){var t=r.h,e=r.s,i=r.v,s=r.a;t=t/360*6,e/=100,i/=100;var n=Math.floor(t),o=i*(1-e),a=i*(1-(t-n)*e),u=i*(1-(1-t+n)*e),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}},m1=function(r){return{h:v1(r.h),s:er(r.s,0,100),l:er(r.l,0,100),a:er(r.a)}},g1=function(r){return{h:ce(r.h),s:ce(r.s),l:ce(r.l),a:ce(r.a,3)}},x1=function(r){return S1((e=(t=r).s,{h:t.h,s:(e*=((i=t.l)<50?i:100-i)/100)>0?2*e/(i+e)*100:0,v:i+e,a:t.a}));var t,e,i},Ra=function(r){return{h:(t=T1(r)).h,s:(s=(200-(e=t.s))*(i=t.v)/100)>0&&s<200?e*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,e,i,s},kA=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,OA=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,LA=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,NA=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pp={string:[[function(r){var t=IA.exec(r);return t?(r=t[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?ce(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?ce(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=LA.exec(r)||NA.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:p1({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(r){var t=kA.exec(r)||OA.exec(r);if(!t)return null;var e,i,s=m1({h:(e=t[1],i=t[2],i===void 0&&(i="deg"),Number(e)*(UA[i]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return x1(s)},"hsl"]],object:[[function(r){var t=r.r,e=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return jr(t)&&jr(e)&&jr(i)?p1({r:Number(t),g:Number(e),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var t=r.h,e=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!jr(t)||!jr(e)||!jr(i))return null;var o=m1({h:Number(t),s:Number(e),l:Number(i),a:Number(n)});return x1(o)},"hsl"],[function(r){var t=r.h,e=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!jr(t)||!jr(e)||!jr(i))return null;var o=(function(a){return{h:v1(a.h),s:er(a.s,0,100),v:er(a.v,0,100),a:er(a.a)}})({h:Number(t),s:Number(e),v:Number(i),a:Number(n)});return S1(o)},"hsv"]]},_1=function(r,t){for(var e=0;e<t.length;e++){var i=t[e][0](r);if(i)return[i,t[e][1]]}return[null,void 0]},HA=function(r){return typeof r=="string"?_1(r.trim(),pp.string):typeof r=="object"&&r!==null?_1(r,pp.object):[null,void 0]},dp=function(r,t){var e=Ra(r);return{h:e.h,s:er(e.s+100*t,0,100),l:e.l,a:e.a}},fp=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},b1=function(r,t){var e=Ra(r);return{h:e.h,s:e.s,l:er(e.l+100*t,0,100),a:e.a}},mp=(function(){function r(t){this.parsed=HA(t)[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 ce(fp(this.rgba),2)},r.prototype.isDark=function(){return fp(this.rgba)<.5},r.prototype.isLight=function(){return fp(this.rgba)>=.5},r.prototype.toHex=function(){return t=hp(this.rgba),e=t.r,i=t.g,s=t.b,o=(n=t.a)<1?mc(ce(255*n)):"","#"+mc(e)+mc(i)+mc(s)+o;var t,e,i,s,n,o},r.prototype.toRgb=function(){return hp(this.rgba)},r.prototype.toRgbString=function(){return t=hp(this.rgba),e=t.r,i=t.g,s=t.b,(n=t.a)<1?"rgba("+e+", "+i+", "+s+", "+n+")":"rgb("+e+", "+i+", "+s+")";var t,e,i,s,n},r.prototype.toHsl=function(){return g1(Ra(this.rgba))},r.prototype.toHslString=function(){return t=g1(Ra(this.rgba)),e=t.h,i=t.s,s=t.l,(n=t.a)<1?"hsla("+e+", "+i+"%, "+s+"%, "+n+")":"hsl("+e+", "+i+"%, "+s+"%)";var t,e,i,s,n},r.prototype.toHsv=function(){return t=T1(this.rgba),{h:ce(t.h),s:ce(t.s),v:ce(t.v),a:ce(t.a,3)};var t},r.prototype.invert=function(){return hr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},r.prototype.saturate=function(t){return t===void 0&&(t=.1),hr(dp(this.rgba,t))},r.prototype.desaturate=function(t){return t===void 0&&(t=.1),hr(dp(this.rgba,-t))},r.prototype.grayscale=function(){return hr(dp(this.rgba,-1))},r.prototype.lighten=function(t){return t===void 0&&(t=.1),hr(b1(this.rgba,t))},r.prototype.darken=function(t){return t===void 0&&(t=.1),hr(b1(this.rgba,-t))},r.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},r.prototype.alpha=function(t){return typeof t=="number"?hr({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):ce(this.rgba.a,3);var e},r.prototype.hue=function(t){var e=Ra(this.rgba);return typeof t=="number"?hr({h:t,s:e.s,l:e.l,a:e.a}):ce(e.h)},r.prototype.isEqual=function(t){return this.toHex()===hr(t).toHex()},r})(),hr=function(r){return r instanceof mp?r:new mp(r)},y1=[],E1=function(r){r.forEach(function(t){y1.indexOf(t)<0&&(t(mp,pp),y1.push(t))})}});function A1(r,t){var e={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 e)i[e[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 e)n[f]=new r(e[f]).toRgb();for(var m in e){var x=(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));x<h&&(h=x,d=m)}return d}},t.string.push([function(o){var a=o.toLowerCase(),u=a==="transparent"?"#0000":e[a];return u?new r(u).toRgb():null},"name"])}var w1=g(()=>{"use strict"});var dn,$,Lt=g(()=>{"use strict";C1();w1();E1([A1]);dn=class Ma{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}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(t){return this.value=t,this}set value(t){if(t instanceof Ma)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,e){let i=typeof t;if(i!==typeof e)return!1;if(i==="number"||i==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?!1:t.every((n,o)=>n===e[o]);if(t!==null&&e!==null){let n=Object.keys(t),o=Object.keys(e);return n.length!==o.length?!1:n.every(a=>t[a]===e[a])}return t===e}toRgba(){let[t,e,i,s]=this._components;return{r:t,g:e,b:i,a:s}}toRgb(){let[t,e,i]=this._components;return{r:t,g:e,b:i}}toRgbaString(){let[t,e,i]=this.toUint8RgbArray();return`rgba(${t},${e},${i},${this.alpha})`}toUint8RgbArray(t){let[e,i,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(e*255),t[1]=Math.round(i*255),t[2]=Math.round(s*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);let[e,i,s,n]=this._components;return t[0]=e,t[1]=i,t[2]=s,t[3]=n,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);let[e,i,s]=this._components;return t[0]=e,t[1]=i,t[2]=s,t}toNumber(){return this._int}toBgrNumber(){let[t,e,i]=this.toUint8RgbArray();return(i<<16)+(e<<8)+t}toLittleEndianNumber(){let t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){let[e,i,s,n]=Ma._temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,this._refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=!0){if(t===1)return(255<<24)+this._int;if(t===0)return e?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return e&&(i=i*t+.5|0,s=s*t+.5|0,n=n*t+.5|0),(t*255<<24)+(i<<16)+(s<<8)+n}toHex(){let t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){let e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this._value=null,this}_normalize(t){let e,i,s,n;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){let o=t;e=(o>>16&255)/255,i=(o>>8&255)/255,s=(o&255)/255,n=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[e,i,s,n=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[e,i,s,n=255]=t,e/=255,i/=255,s/=255,n/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){let a=Ma.HEX_PATTERN.exec(t);a&&(t=`#${a[2]}`)}let o=hr(t);o.isValid()&&({r:e,g:i,b:s,a:n}=o.rgba,e/=255,i/=255,s/=255)}if(e!==void 0)this._components[0]=e,this._components[1]=i,this._components[2]=s,this._components[3]=n,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);let[t,e,i]=this._components;this._int=(t*255<<16)+(e*255<<8)+(i*255|0)}_clamp(t,e=0,i=1){return typeof t=="number"?Math.min(Math.max(t,e),i):(t.forEach((s,n)=>{t[n]=Math.min(Math.max(s,e),i)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Ma||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};dn.shared=new dn;dn._temp=new dn;dn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;$=dn});var gp,xp=g(()=>{"use strict";gp={cullArea:null,cullable:!1,cullableChildren:!0}});var _p,bp,yp,gc=g(()=>{"use strict";_p=Math.PI*2,bp=180/Math.PI,yp=Math.PI/180});var st,vp,Me=g(()=>{"use strict";st=class r{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e}clone(){return new r(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return vp.x=0,vp.y=0,vp}},vp=new st});var M,WA,VA,nt=g(()=>{"use strict";gc();Me();M=class r{constructor(t=1,e=0,i=0,s=1,n=0,o=0){this.array=null,this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=o}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,e,i,s,n,o){return this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(t,e){this.array||(this.array=new Float32Array(9));let i=e||this.array;return t?(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(t,e){e=e||new st;let i=t.x,s=t.y;return e.x=this.a*i+this.c*s+this.tx,e.y=this.b*i+this.d*s+this.ty,e}applyInverse(t,e){e=e||new st;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=t.x,h=t.y;return e.x=o*l*c+-n*l*h+(u*n-a*o)*l,e.y=i*l*h+-s*l*c+(-u*i+a*s)*l,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),s=this.a,n=this.c,o=this.tx;return this.a=s*e-this.b*i,this.b=s*i+this.b*e,this.c=n*e-this.d*i,this.d=n*i+this.d*e,this.tx=o*e-this.ty*i,this.ty=o*i+this.ty*e,this}append(t){let e=this.a,i=this.b,s=this.c,n=this.d;return this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*n,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*n,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*n+this.ty,this}appendFrom(t,e){let i=t.a,s=t.b,n=t.c,o=t.d,a=t.tx,u=t.ty,l=e.a,c=e.b,h=e.c,d=e.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+e.tx,this.ty=a*c+u*d+e.ty,this}setTransform(t,e,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=t-(i*this.a+s*this.c),this.ty=e-(i*this.b+s*this.d),this}prepend(t){let e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){let i=this.a,s=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this}decompose(t){let e=this.a,i=this.b,s=this.c,n=this.d,o=t.pivot,a=-Math.atan2(-s,n),u=Math.atan2(i,e),l=Math.abs(a+u);return l<1e-5||Math.abs(_p-l)<1e-5?(t.rotation=u,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=u),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(s*s+n*n),t.position.x=this.tx+(o.x*e+o.y*s),t.position.y=this.ty+(o.x*i+o.y*n),t}invert(){let t=this.a,e=this.b,i=this.c,s=this.d,n=this.tx,o=t*s-e*i;return this.a=s/o,this.b=-e/o,this.c=-i/o,this.d=t/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(t*this.ty-e*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 t=new r;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}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 VA.identity()}static get shared(){return WA.identity()}},WA=new M,VA=new M});var Et,wi=g(()=>{"use strict";Et=class r{constructor(t,e,i){this._x=e||0,this._y=i||0,this._observer=t}clone(t){return new r(t??this._observer,this._x,this._y)}set(t=0,e=t){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.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(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}});function tt(r="default"){return Da[r]===void 0&&(Da[r]=-1),++Da[r]}function zA(){for(let r in Da)delete Da[r]}var Da,jt=g(()=>{"use strict";Da={default:-1}});var P1,V,Tp,fn,U,xt=g(()=>{"use strict";P1=new Set,V="8.0.0",Tp="8.3.4",fn={quiet:!1,noColor:!1},U=((r,t,e=3)=>{if(fn.quiet||P1.has(t))return;let i=new Error().stack,s=`${t}
Deprecated since v${r}`,n=typeof console.groupCollapsed=="function"&&!fn.noColor;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",s):(i=i.split(`
`).splice(e).join(`
`),n?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",s),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",s),console.warn(i))),P1.add(t)});Object.defineProperties(U,{quiet:{get:()=>fn.quiet,set:r=>{fn.quiet=r},enumerable:!0,configurable:!1},noColor:{get:()=>fn.noColor,set:r=>{fn.noColor=r},enumerable:!0,configurable:!1}})});function k(...r){Sp!==B1&&(Sp++,Sp===B1?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...r))}var Sp,B1,mt=g(()=>{"use strict";Sp=0,B1=500});var Ke,Pi=g(()=>{"use strict";Ke={_registeredResources:new Set,register(r){this._registeredResources.add(r)},unregister(r){this._registeredResources.delete(r)},release(){this._registeredResources.forEach(r=>r.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(r){return this._registeredResources.has(r)},reset(){this._registeredResources.clear()}}});var Fa,Ep=g(()=>{"use strict";Fa=class{constructor(t,e){this._pool=[],this._count=0,this._index=0,this._classType=t,e&&this.prepopulate(e)}prepopulate(t){for(let e=0;e<t;e++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){let e;return this._index>0?e=this._pool[--this._index]:(e=new this._classType,this._count++),e.init?.(t),e}return(t){t.reset?.(),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let t=0;t<this._index;t++)this._pool[t].destroy();this._pool.length=0,this._count=0,this._index=0}}});var xc,Ct,dr=g(()=>{"use strict";Pi();Ep();xc=class{constructor(){this._poolsByClass=new Map}prepopulate(t,e){this.getPool(t).prepopulate(e)}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new Fa(t)),this._poolsByClass.get(t)}stats(){let t={};return this._poolsByClass.forEach(e=>{let i=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[i]={free:e.totalFree,used:e.totalUsed,size:e.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}},Ct=new xc;Ke.register(Ct)});var Cp,Ap=g(()=>{"use strict";xt();Cp={get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(r){typeof r=="boolean"&&r===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(r===!0?{}:r))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(r){U("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(r)}}});function Ga(r,t,e){let i=r.length,s;if(t>=i||e===0)return;e=t+e>i?i-t:e;let n=i-e;for(s=t;s<n;++s)r[s]=r[s+e];r.length=n}var _c=g(()=>{"use strict"});var wp,Pp=g(()=>{"use strict";_c();xt();wp={allowChildren:!0,removeChildren(r=0,t){let e=t??this.children.length,i=e-r,s=[];if(i>0&&i<=e){for(let o=e-1;o>=r;o--){let a=this.children[o];a&&(s.push(a),a.parent=null)}Ga(this.children,r,e);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 t=this.getChildAt(r);return this.removeChild(t)},getChildAt(r){if(r<0||r>=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]},setChildIndex(r,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(r),this.addChildAt(r,t)},getChildIndex(r){let t=this.children.indexOf(r);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(r,t){this.allowChildren||U(V,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:e}=this;if(t<0||t>e.length)throw new Error(`${r}addChildAt: The index ${t} supplied is out of bounds ${e.length}`);let i=r.parent===this;if(r.parent){let n=r.parent.children.indexOf(r);if(i){if(n===t)return r;r.parent.children.splice(n,1)}else r.removeFromParent()}t===e.length?e.push(r):e.splice(t,0,r),r.parent=this,r.didChange=!0,r._updateFlags=15;let s=this.renderGroup||this.parentRenderGroup;return s&&s.addChild(r),this.sortableChildren&&(this.sortDirty=!0),i||(this.emit("childAdded",r,this,t),r.emit("added",this)),r},swapChildren(r,t){if(r===t)return;let e=this.getChildIndex(r),i=this.getChildIndex(t);this.children[e]=t,this.children[i]=r;let s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...r){return r.length===1?this.reparentChildAt(r[0],this.children.length):(r.forEach(t=>this.reparentChildAt(t,this.children.length)),r[0])},reparentChildAt(r,t){if(r.parent===this)return this.setChildIndex(r,t),r;let e=r.worldTransform.clone();r.removeFromParent(),this.addChildAt(r,t);let i=this.worldTransform.clone();return i.invert(),e.prepend(i),r.setFromMatrix(e),r},replaceChild(r,t){r.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(r)),t.setFromMatrix(r.localTransform),t.updateLocalTransform(),this.removeChild(r)}}});var Bp,Rp=g(()=>{"use strict";Bp={collectRenderables(r,t,e){this.parentRenderLayer&&this.parentRenderLayer!==e||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(r,t,e):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,r):this.collectRenderablesWithEffects(r,t,e))},collectRenderablesSimple(r,t,e){let i=this.children,s=i.length;for(let n=0;n<s;n++)i[n].collectRenderables(r,t,e)},collectRenderablesWithEffects(r,t,e){let{renderPipes:i}=t;for(let s=0;s<this.effects.length;s++){let n=this.effects[s];i[n.pipe].push(n,this,r)}this.collectRenderablesSimple(r,t,e);for(let s=this.effects.length-1;s>=0;s--){let n=this.effects[s];i[n.pipe].pop(n,this,r)}}}});var Br,Ua=g(()=>{"use strict";Br=class{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}});var bc,Ia,Mp=g(()=>{"use strict";C();dr();bc=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let e=0;e<this._tests.length;e++){let i=this._tests[e];if(i.test(t))return Ct.get(i.maskClass,t)}return t}returnMaskEffect(t){Ct.return(t)}},Ia=new bc;L.handleByList(p.MaskEffect,Ia._effectClasses)});var Dp,Fp=g(()=>{"use strict";Ua();Mp();Dp={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){let r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=!0)},addEffect(r){this.effects.indexOf(r)===-1&&(this.effects.push(r),this.effects.sort((e,i)=>e.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(r){let t=this.effects.indexOf(r);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(r){let t=this._maskEffect;t?.mask!==r&&(t&&(this.removeEffect(t),Ia.returnMaskEffect(t),this._maskEffect=null),r!=null&&(this._maskEffect=Ia.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 t=this._filterEffect||(this._filterEffect=new Br);r=r;let e=r?.length>0,i=t.filters?.length>0,s=e!==i;r=Array.isArray(r)?r.slice(0):r,t.filters=Object.freeze(r),s&&(e?this.addEffect(t):(this.removeEffect(t),t.filters=r??null))},get filters(){return this._filterEffect?.filters},set filterArea(r){this._filterEffect||(this._filterEffect=new Br),this._filterEffect.filterArea=r},get filterArea(){return this._filterEffect?.filterArea}}});var Gp,Up=g(()=>{"use strict";xt();Gp={label:null,get name(){return U(V,"Container.name property has been removed, use Container.label instead"),this.label},set name(r){U(V,"Container.name property has been removed, use Container.label instead"),this.label=r},getChildByName(r,t=!1){return this.getChildByLabel(r,t)},getChildByLabel(r,t=!1){let e=this.children;for(let i=0;i<e.length;i++){let s=e[i];if(s.label===r||r instanceof RegExp&&r.test(s.label))return s}if(t)for(let i=0;i<e.length;i++){let n=e[i].getChildByLabel(r,!0);if(n)return n}return null},getChildrenByLabel(r,t=!1,e=[]){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))&&e.push(n)}if(t)for(let s=0;s<i.length;s++)i[s].getChildrenByLabel(r,!0,e);return e}}});var yc,K,$t=g(()=>{"use strict";Me();yc=[new st,new st,new st,new st],K=class r{constructor(t=0,e=0,i=0,s=0){this.type="rectangle",this.x=Number(t),this.y=Number(e),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(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height}strokeContains(t,e,i,s=.5){let{width:n,height:o}=this;if(n<=0||o<=0)return!1;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,x=a+c,_=a+n-c,b=u+c,y=u+o-c;return t>=h&&t<=d&&e>=f&&e<=m&&!(t>x&&t<_&&e>b&&e<y)}intersects(t,e){if(!e){let D=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=D)return!1;let P=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>P}let i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return!1;let a=yc[0].set(t.left,t.top),u=yc[1].set(t.left,t.bottom),l=yc[2].set(t.right,t.top),c=yc[3].set(t.right,t.bottom);if(l.x<=a.x||u.y<=a.y)return!1;let h=Math.sign(e.a*e.d-e.b*e.c);if(h===0||(e.apply(a,a),e.apply(u,u),e.apply(l,l),e.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!1;let d=h*(u.y-a.y),f=h*(a.x-u.x),m=d*i+f*n,x=d*s+f*n,_=d*i+f*o,b=d*s+f*o;if(Math.max(m,x,_,b)<=d*a.x+f*a.y||Math.min(m,x,_,b)>=d*c.x+f*c.y)return!1;let y=h*(a.y-l.y),v=h*(l.x-a.x),T=y*i+v*n,E=y*s+v*n,S=y*i+v*o,w=y*s+v*o;return!(Math.max(T,E,S,w)<=y*a.x+v*a.y||Math.min(T,E,S,w)>=y*c.x+v*c.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this}fit(t){let e=Math.max(this.x,t.x),i=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(i-e,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(t=1,e=.001){let i=Math.ceil((this.x+this.width-e)*t)/t,s=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=i-this.x,this.height=s-this.y,this}scale(t,e=t){return this.x*=t,this.y*=e,this.width*=t,this.height*=e,this}enlarge(t){let e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=i-e,this.y=s,this.height=n-s,this}getBounds(t){return t||(t=new r),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;let e=t.x,i=t.y,s=t.x+t.width,n=t.y+t.height;return e>=this.x&&e<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(t,e,i,s){return this.x=t,this.y=e,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 R1,_t,he=g(()=>{"use strict";nt();$t();R1=new M,_t=class r{constructor(t=1/0,e=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=R1,this.minX=t,this.minY=e,this.maxX=i,this.maxY=s}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new K);let t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=R1,this}set(t,e,i,s){this.minX=t,this.minY=e,this.maxX=i,this.maxY=s}addFrame(t,e,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,x=this.maxY,_=o*t+u*e+c,b=a*t+l*e+h;_<d&&(d=_),b<f&&(f=b),_>m&&(m=_),b>x&&(x=b),_=o*i+u*e+c,b=a*i+l*e+h,_<d&&(d=_),b<f&&(f=b),_>m&&(m=_),b>x&&(x=b),_=o*t+u*s+c,b=a*t+l*s+h,_<d&&(d=_),b<f&&(f=b),_>m&&(m=_),b>x&&(x=b),_=o*i+u*s+c,b=a*i+l*s+h,_<d&&(d=_),b<f&&(f=b),_>m&&(m=_),b>x&&(x=b),this.minX=d,this.minY=f,this.maxX=m,this.maxY=x}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e)}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){let e=this.minX,i=this.minY,s=this.maxX,n=this.maxY,{a:o,b:a,c:u,d:l,tx:c,ty:h}=t,d=o*e+u*i+c,f=a*e+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*e+u*n+c,f=a*e+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(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,i,s){return this.minX<t&&(this.minX=t),this.maxX>e&&(this.maxX=e),this.minY<i&&(this.minY=i),this.maxY>s&&(this.maxY=s),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,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(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){let e=this.maxX-this.minX;this.minX=t,this.maxX=t+e}get y(){return this.minY}set y(t){let e=this.maxY-this.minY;this.minY=t,this.maxY=t+e}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}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(t,e,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 x=e;x<i;x+=2){let _=t[x],b=t[x+1],y=l*_+h*b+f,v=c*_+d*b+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(t,e){return this.minX<=t&&this.minY<=e&&this.maxX>=t&&this.maxY>=e}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}});var Zt,We,Bi=g(()=>{"use strict";nt();dr();he();Zt=Ct.getPool(M),We=Ct.getPool(_t)});var XA,Ip,kp=g(()=>{"use strict";nt();he();Bi();XA=new M,Ip={getFastGlobalBounds(r,t){t||(t=new _t),t.clear(),this._getGlobalBoundsRecursive(!!r,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);let e=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(e.worldTransform),t},_getGlobalBoundsRecursive(r,t,e){let i=t;if(r&&this.parentRenderLayer&&this.parentRenderLayer!==e||this.localDisplayStatus!==7||!this.measurable)return;let s=!!this.effects.length;if((this.renderGroup||s)&&(i=We.get().clear()),this.boundsArea)t.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,e)}if(s){let n=!1,o=this.renderGroup||this.parentRenderGroup;for(let a=0;a<this.effects.length;a++)this.effects[a].addBounds&&(n||(n=!0,i.applyMatrix(o.worldTransform)),this.effects[a].addBounds(i,!0));n&&i.applyMatrix(o.worldTransform.copyTo(XA).invert()),t.addBounds(i),We.return(i)}else this.renderGroup&&(t.addBounds(i,this.relativeGroupTransform),We.return(i))}}});function $r(r,t,e){e.clear();let i,s;return r.parent?t?i=r.parent.worldTransform:(s=Zt.get().identity(),i=ka(r,s)):i=M.IDENTITY,M1(r,e,i,t),s&&Zt.return(s),e.isValid||e.set(0,0,0,0),e}function M1(r,t,e,i){if(!r.visible||!r.measurable)return;let s;i?s=r.worldTransform:(r.updateLocalTransform(),s=Zt.get(),s.appendFrom(r.localTransform,e));let n=t,o=!!r.effects.length;if(o&&(t=We.get().clear()),r.boundsArea)t.addRect(r.boundsArea,s);else{let a=r.bounds;a&&!a.isEmpty()&&(t.matrix=s,t.addBounds(a));for(let u=0;u<r.children.length;u++)M1(r.children[u],t,s,i)}if(o){for(let a=0;a<r.effects.length;a++)r.effects[a].addBounds?.(t);n.addBounds(t,M.IDENTITY),We.return(t)}i||Zt.return(s)}function ka(r,t){let e=r.parent;return e&&(ka(e,t),e.updateLocalTransform(),t.append(e.localTransform)),t}var ss=g(()=>{"use strict";nt();Bi()});function De(r,t){if(r===16777215||!t)return t;if(t===16777215||!r)return r;let e=r>>16&255,i=r>>8&255,s=r&255,n=t>>16&255,o=t>>8&255,a=t&255,u=e*n/255|0,l=i*o/255|0,c=s*a/255|0;return(u<<16)+(l<<8)+c}var Ri=g(()=>{"use strict"});function ns(r,t){return r===D1?t:t===D1?r:De(r,t)}var D1,vc=g(()=>{"use strict";Ri();D1=16777215});function ve(r){return((r&255)<<16)+(r&65280)+(r>>16&255)}var Op,Mi=g(()=>{"use strict";nt();ss();Bi();vc();Op={getGlobalAlpha(r){if(r)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,e=this.parent;for(;e;)t*=e.alpha,e=e.parent;return t},getGlobalTransform(r=new M,t){if(t)return r.copyFrom(this.worldTransform);this.updateLocalTransform();let e=ka(this,Zt.get().identity());return r.appendFrom(this.localTransform,e),Zt.return(e),r},getGlobalTint(r){if(r)return this.renderGroup?ve(this.renderGroup.worldColor):this.parentRenderGroup?ve(ns(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,e=this.parent;for(;e;)t=ns(t,e.localColor),e=e.parent;return ve(t)}}});function os(r,t,e){return t.clear(),e||(e=M.IDENTITY),F1(r,t,e,r,!0),t.isValid||t.set(0,0,0,0),t}function F1(r,t,e,i,s){let n;if(s)n=Zt.get(),n=e.copyTo(n);else{if(!r.visible||!r.measurable)return;r.updateLocalTransform();let u=r.localTransform;n=Zt.get(),n.appendFrom(u,e)}let o=t,a=!!r.effects.length;if(a&&(t=We.get().clear()),r.boundsArea)t.addRect(r.boundsArea,n);else{r.renderPipeId&&(t.matrix=n,t.addBounds(r.bounds));let u=r.children;for(let l=0;l<u.length;l++)F1(u[l],t,n,i,!1)}if(a){for(let u=0;u<r.effects.length;u++)r.effects[u].addLocalBounds?.(t,i);o.addBounds(t,M.IDENTITY),We.return(t)}Zt.return(n)}var Oa=g(()=>{"use strict";nt();Bi()});function Tc(r,t){let e=r.children;for(let i=0;i<e.length;i++){let s=e[i],n=s.uid,o=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=t.index;(t.data[a]!==n||t.data[a+1]!==o)&&(t.data[t.index]=n,t.data[t.index+1]=o,t.didChange=!0),t.index=a+2,s.children.length&&Tc(s,t)}return t.didChange}var Lp=g(()=>{"use strict"});var YA,Np,Hp=g(()=>{"use strict";nt();he();ss();Oa();Lp();YA=new M,Np={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(r,t){let e=Math.sign(this.scale.x)||1;t!==0?this.scale.x=r/t*e:this.scale.x=e},_setHeight(r,t){let e=Math.sign(this.scale.y)||1;t!==0?this.scale.y=r/t*e:this.scale.y=e},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new _t});let r=this._localBoundsCacheData;return r.index=1,r.didChange=!1,r.data[0]!==this._didViewChangeTick&&(r.didChange=!0,r.data[0]=this._didViewChangeTick),Tc(this,r),r.didChange&&os(this,r.localBounds,YA),r.localBounds},getBounds(r,t){return $r(this,r,t||new _t)}}});var Wp,Vp=g(()=>{"use strict";Wp={_onRender:null,set onRender(r){let t=this.renderGroup||this.parentRenderGroup;if(!r){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=r},get onRender(){return this._onRender}}});function jA(r,t){return r._zIndex-t._zIndex}var zp,Xp=g(()=>{"use strict";zp={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(r){this._zIndex!==r&&(this._zIndex=r,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(jA))}}});var Yp,jp=g(()=>{"use strict";Me();Bi();Yp={getGlobalPosition(r=new st,t=!1){return this.parent?this.parent.toGlobal(this._position,r,t):(r.x=this._position.x,r.y=this._position.y),r},toGlobal(r,t,e=!1){let i=this.getGlobalTransform(Zt.get(),e);return t=i.apply(r,t),Zt.return(i),t},toLocal(r,t,e,i){t&&(r=t.toGlobal(r,e,i));let s=this.getGlobalTransform(Zt.get(),i);return e=s.applyInverse(r,e),Zt.return(s),e}}});var qr,La=g(()=>{"use strict";jt();qr=class{constructor(){this.uid=tt("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}});function Rr(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 Sc(r){return!(r&r-1)&&!!r}function $A(r){let t=(r>65535?1:0)<<4;r>>>=t;let e=(r>255?1:0)<<3;return r>>>=e,t|=e,e=(r>15?1:0)<<2,r>>>=e,t|=e,e=(r>3?1:0)<<1,r>>>=e,t|=e,t|r>>1}var pn=g(()=>{"use strict"});function me(r){let t={};for(let e in r)r[e]!==void 0&&(t[e]=r[e]);return t}var Di=g(()=>{"use strict"});function qA(r){let t=G1[r];return t===void 0&&(G1[r]=tt("resource")),t}var G1,U1,Qt,Mr=g(()=>{"use strict";le();jt();xt();G1=Object.create(null);U1=class I1 extends St{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...I1.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){U(V,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){let t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.mi