@drincs/pixi-vn 1.9.4 → 1.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas.cjs +2 -2
- package/dist/canvas.d.cts +999 -914
- package/dist/canvas.d.ts +999 -914
- package/dist/canvas.mjs +2 -2
- package/dist/chunk-XLRCR56W.mjs +1 -0
- package/dist/core.d.cts +8 -2
- package/dist/core.d.ts +8 -2
- package/dist/filters.cjs +1 -1
- package/dist/filters.d.cts +16 -2
- package/dist/filters.d.ts +16 -2
- package/dist/filters.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/motion.cjs +1 -1
- package/dist/motion.d.cts +6 -1
- package/dist/motion.d.ts +6 -1
- package/dist/motion.mjs +1 -1
- package/dist/tickers.cjs +1 -1
- package/dist/tickers.d.cts +71 -1
- package/dist/tickers.d.ts +71 -1
- package/dist/tickers.mjs +1 -1
- package/dist/worker.cjs +1 -1
- package/package.json +1 -1
package/dist/canvas.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./chunk-JMOSOAGB.mjs';import {e,d as d$1,g,b as b$1,c,f,a}from'./chunk-HD353M4B.mjs';import {a as a$1}from'./chunk-S7HZUIEI.mjs';import {d,e as e$1}from'./chunk-AW5XWF24.mjs';import {GameUnifier,PixiError}from'@drincs/pixi-vn/core';import be,{Container,Graphics}from'@drincs/pixi-vn/pixi.js';import {drainCompleteOnStepEndQueue,tickers as tickers$1,removeTicker,TickersManagerStatic,RegisteredTickers,runTickersSequence}from'@drincs/pixi-vn/tickers';export*from'@drincs/pixi-vn/tickers';import {initDevtools}from'@pixi/devtools';import {RegisteredFilters,filters}from'@drincs/pixi-vn/filters';var Jt={extension:{type:"sceneProperties",name:"additional-positions"},testNode(t){return "xAlign"in t||"yAlign"in t||"percentageX"in t||"percentageY"in t||"positionType"in t},testProp(t){switch(t){case "xAlign":case "yAlign":case "percentageX":case "percentageY":case "positionType":return true;default:return false}},setProperty(t,e,n){switch(e){case "xAlign":"xAlign"in t&&(t.xAlign=n/100);break;case "yAlign":"yAlign"in t&&(t.yAlign=n/100);break;case "percentageX":"percentageX"in t&&(t.percentageX=n/100);break;case "percentageY":"percentageY"in t&&(t.percentageY=n/100);break}},getProperties(t){return [{value:t.positionType,prop:"positionType",entry:{section:"Transform",type:"text",label:"Position Type"}},{value:t.xAlign*100,prop:"xAlign",entry:{section:"Transform",type:"range",label:"X Align",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.yAlign*100,prop:"yAlign",entry:{section:"Transform",type:"range",label:"Y Align",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}},{value:t.percentageX*100,prop:"percentageX",entry:{section:"Transform",type:"range",label:"X Percentage Position",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.percentageY*100,prop:"percentageY",entry:{section:"Transform",type:"range",label:"Y Percentage Position",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}}]}},Rt=Jt;function kt(t,e){let n=0;return async(...s)=>{let o=Date.now();if(o-n>=e)return n=o,await t(...s)}}var ie=class t{constructor(){}static _app=void 0;static get app(){if(!t._app)throw e$1.error("The canvas is not initialized"),new PixiError("invalid_usage","CanvasManagerStatic.app is undefined");return t._app}static get gameLayer(){let e=t.app.stage.getChildByLabel(a);return e||(e=new be.Container,e.label=a,t.app.stage.addChild(e)),e}static htmlLayers=[];static canvasWidth=300;static canvasHeight=300;static _isInitialized=false;static async init(e,n,s){let{id:o="pixi-vn-canvas",width:g=800,height:I=600,resolution:R=1,autoDensity:_=true,resizeMode:f="contain",...v}=n||{};return t.canvasWidth=g,t.canvasHeight=I,t._app=new be.Application,t.app.init({width:g,height:I,resolution:R,autoDensity:_,...v}).then(()=>{let{app:A=t.app,extensions:w=[],...H}=s||{};if(initDevtools({app:A,extensions:[Rt,...w],...H}),t._isInitialized=true,t.addCanvasIntoHTMLElement(e,o),f==="contain"){let X=kt(async()=>{requestAnimationFrame(()=>t.resize());},10);new ResizeObserver(X).observe(e),t.resize(),setTimeout(()=>t.resize(),750);}t.gameLayer;})}static addCanvasIntoHTMLElement(e,n){t._isInitialized?(e.appendChild(t.app.canvas),t.app.canvas.id=n):e$1.error("GameWindowManager is not initialized");}static addHtmlLayer(e,n,s={}){let{position:o="absolute",pointerEvents:g="none",userSelect:I="none"}=s,R=document.createElement("div");R.setAttribute("id",e),R.style.position=o,R.style.pointerEvents=g,R.style.userSelect=I;let _=n.appendChild(R);return t.htmlLayers.push(R),t.resize(),_}static removeHtmlLayer(e){let n=t.htmlLayers.find(s=>s.id===e);n&&(n.remove(),t.htmlLayers=t.htmlLayers.filter(s=>s.id!==e));}static getHtmlLayer(e){return t.htmlLayers.find(n=>n.id===e)}static async resize(){let e=t.canvasWidth,n=t.canvasHeight,s=t.app.resizeTo,o=t.app.canvas.style;s instanceof HTMLElement||(s=document.documentElement);let g,I;if(s===document.body||s===document.documentElement)g=document.documentElement.clientWidth||window.innerWidth,I=document.documentElement.clientHeight||window.innerHeight;else {let w=s.getBoundingClientRect();g=w.width||s.clientWidth,I=w.height||s.clientHeight;}let R=Math.min(g/e,I/n),_=Math.floor(R*e),f=Math.floor(R*n);o.width=`${_}px`,o.height=`${f}px`;let v=(g-_)/2,A=(I-f)/2;o.marginLeft=`${v}px`,o.marginRight=`${v}px`,o.marginTop=`${A}px`,o.marginBottom=`${A}px`,t.htmlLayers.forEach(w=>{w.style.width=`${_}px`,w.style.height=`${f}px`,w.style.marginLeft=`${v}px`,w.style.marginRight=`${v}px`,w.style.marginTop=`${A}px`,w.style.marginBottom=`${A}px`;});}static get childrenAliasesOrder(){return t.gameLayer.children.filter(e=>e.label).sort((e,n)=>t.gameLayer.getChildIndex(e)-t.gameLayer.getChildIndex(n)).map(e=>e.label)}};var ot=Symbol("SerializableEvent"),De=new d({cacheSize:5});function tn(t){return (e,n,s)=>{let o=s.value;at.add(o,t||`${n}`);}}var at;(g=>{function t(I,R){I[ot]=R,De.get(R)&&e$1.info(`Event "${R}" already exists, it will be overwritten`),De.set(R,I);}g.add=t;function e(I){try{let R=De.get(I);if(!R){e$1.error(`Event "${I}" not found, did you forget to register it with the eventDecorator?`);return}return R}catch(R){e$1.error(`Error while getting Event "${I}"`,R);return}}g.get=e;function n(){return Array.from(De.values())}g.values=n;function s(I){return De.has(I)}g.has=s;function o(){return Array.from(De.keys())}g.keys=o;})(at||={});var ct=at;async function Dt(t,e){if("onEvents"in e)for(let n in e.onEvents){let s=e.onEvents[n],o=ct.get(s);o&&t.on(n,o);}}function Ft(t){let{onEventsHandlers:e={}}=t;return e}function Ce(t,e,n){let s=n[ot];return s&&typeof s=="string"?(e.onEventsHandlers[t]=s,true):(e$1.warn(`The event handler for event "${t}" is not registered with the eventDecorator, it will not be saved in the memory and it will not work after loading the game. Please register the event handler with the eventDecorator to avoid this warning. Read more about it here: https://pixi-vn.com/start/canvas-functions#add-a-listener-to-an-event`),false)}var Fe=new d({cacheSize:5}),Lt=new d({cacheSize:2}),Yt=new d({cacheSize:2});function rn(t={}){return e=>{dt.add(e,t);}}async function fe(t,e,n){let s=n?.ignoreScale||false,o=n?.end;if("isRenderGroup"in e&&e.isRenderGroup!==void 0&&(t.isRenderGroup=e.isRenderGroup),"blendMode"in e&&e.blendMode!==void 0&&(t.blendMode=e.blendMode),"tint"in e&&e.tint!==void 0&&(t.tint=e.tint),"alpha"in e&&e.alpha!==void 0&&(t.alpha=e.alpha),"angle"in e&&e.angle!==void 0&&(t.angle=e.angle),"renderable"in e&&e.renderable!==void 0&&(t.renderable=e.renderable),"rotation"in e&&e.rotation!==void 0&&(t.rotation=e.rotation),!s&&"scale"in e&&e.scale!==void 0&&(typeof e.scale=="number"?t.scale.set(e.scale,e.scale):t.scale.set(e.scale.x,e.scale.y)),"pivot"in e&&e.pivot!==void 0&&(typeof e.pivot=="number"?t.pivot.set(e.pivot,e.pivot):t.pivot.set(e.pivot.x,e.pivot.y)),"position"in e&&e.position!==void 0&&t.position.set(e.position.x,e.position.y),"skew"in e&&e.skew!==void 0&&t.skew.set(e.skew.x,e.skew.y),"visible"in e&&e.visible!==void 0&&(t.visible=e.visible),"x"in e&&e.x!==void 0&&(t.x=e.x),"y"in e&&e.y!==void 0&&(t.y=e.y),"boundsArea"in e&&e.boundsArea!==void 0&&(t.boundsArea=e.boundsArea),"cursor"in e&&e.cursor!==void 0&&(t.cursor=e.cursor),"eventMode"in e&&e.eventMode!==void 0&&(t.eventMode=e.eventMode),"interactive"in e&&e.interactive!==void 0&&(t.interactive=e.interactive),"interactiveChildren"in e&&e.interactiveChildren!==void 0&&(t.interactiveChildren=e.interactiveChildren),"hitArea"in e&&e.hitArea!==void 0&&(t.hitArea=e.hitArea),Dt(t,e),"pixivnFilters"in e&&e.pixivnFilters!==void 0){let g=e.pixivnFilters.map(I=>RegisteredFilters.getInstance(I.filterId,I.args)).filter(I=>!!I);t.filters=g.length>0?g:null;}"align"in e&&e.align!==void 0&&"align"in t&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&"percentagePosition"in t&&(t.percentagePosition=e.percentagePosition),o&&await o(),s||("width"in e&&e.width!==void 0&&(t.width=e.width),"height"in e&&e.height!==void 0&&(t.height=e.height));}var dt;(R=>{function t(_,f={}){let{name:v=_.name,getInstance:A=async(H,X)=>{let Z=new H;return await Z.setMemory(X),Z},copyProperty:w=async(H,X)=>{await H.setMemory(X);}}=f;Fe.get(v)&&e$1.warn(`CanvasElement "${v}" already registered`),_.prototype.pixivnId=v,Fe.set(v,_),Lt.set(v,A),Yt.set(v,w);}R.add=t;function e(_){let f=Fe.get(_);if(!f){e$1.error(`CanvasElement "${_}" not found, did you forget to register it with the canvasComponentDecorator?`);return}return f}R.get=e;async function n(_,f){let v=e(_),A=Lt.get(_);if(!v||!A){e$1.error(`CanvasElement "${_}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{return await A(v,f)}catch(w){e$1.error(`Error while getting CanvasElement instance "${_}"`,w);}}R.getInstance=n;async function s(_,f,v){let A=Yt.get(_);if(!A){e$1.error(`CanvasElement "${_}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{await A(f,v);}catch(w){e$1.error(`Error while copying properties of CanvasElement "${_}"`,w);}}R.copyProperty=s;function o(){return Array.from(Fe.values())}R.values=o;function g(_){return Fe.has(_)}R.has=g;function I(){return Array.from(Fe.keys())}R.keys=I;})(dt||={});var ae=dt;async function Ve(t){let e=await ae.getInstance(t.pixivnId,t);if(!e)throw new PixiError("unregistered_element",`The element ${t.pixivnId} could not be created`,"canvas",t);return e}function pt(t){return "memory"in t?t.memory:t instanceof be.Text?lt(t):t instanceof be.Sprite?ft(t):we(t)}function an(t){let e=t.parent;return {width:t.width,height:t.height,isRenderGroup:t.isRenderGroup,blendMode:t.blendMode,tint:t.tint,alpha:t.alpha,angle:t.angle,renderable:t.renderable,rotation:t.rotation,scale:{x:t.scale.x,y:t.scale.y},pivot:{x:t.pivot.x,y:t.pivot.y},position:{x:t.position.x,y:t.position.y},skew:{x:t.skew.x,y:t.skew.y},visible:t.visible,x:t.x,y:t.y,boundsArea:t.boundsArea,cursor:t.cursor,eventMode:t.eventMode,interactive:t.interactive,interactiveChildren:t.interactiveChildren,hitArea:t.hitArea,index:e?.getChildIndex(t),parentLabel:e?.label,label:t.label,pixivnFilters:cn(t.filters)}}function cn(t){if(!t)return;let e=Array.isArray(t)?t:[t],n=[];for(let s of e){let o=s.pixivnFilterId;if(!o){e$1.warn("A Filter instance without a registered pixivnFilterId can't be saved and will be skipped. Register it with filterDecorator/RegisteredFilters to make it save-compatible.",s);continue}let g=RegisteredFilters.toMemory(o,s);g&&n.push(g);}return n}function ut(t,e){return {url:t.source.label,alias:e===t.source.label?void 0:e}}function we(t,e){let n=dn(t,b$1),o=e?.childrenExport||false?t.children.sort((g,I)=>t.getChildIndex(g)-t.getChildIndex(I)).map(g=>pt(g)):[];return {pixivnId:n,elements:o,onEvents:Ft(t),...an(t)}}function ft(t){let e$1=we(t),n=e$1.pixivnId??e,s="assetsAliases"in t&&Array.isArray(t.assetsAliases)?ut(t.texture,t.assetsAliases[0]):"textureAlias"in t?ut(t.texture,t.textureAlias):ut(t.texture);return {...e$1,pixivnId:n,textureData:s,anchor:{x:t.anchor.x,y:t.anchor.y},roundPixels:t.roundPixels}}function lt(t){let e=we(t),n=e.pixivnId??f;return {...e,pixivnId:n,anchor:{x:t.anchor.x,y:t.anchor.y},text:t.text,resolution:t.resolution,style:ln(t.style),roundPixels:t.roundPixels}}function dn(t,e){return Object.hasOwn(t,"pixivnId")?t.pixivnId:e}function je(t){switch(t.type){case "linear":return {type:"linear",colorStops:t.colorStops,end:{x:t.end.x,y:t.end.y},start:{x:t.start.x,y:t.start.y},textureSpace:t.textureSpace,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height};case "radial":return {type:"radial",colorStops:t.colorStops,textureSpace:t.textureSpace,center:{x:t.center.x,y:t.center.y},innerRadius:t.innerRadius,outerCenter:{x:t.outerCenter.x,y:t.outerCenter.y},outerRadius:t.outerRadius,rotation:t.rotation,scale:t.scale,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height}}}function un(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof be.FillGradient)return je(t);if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof be.FillPattern))return je(t.fill)}}e$1.warn("Unsupported property type for Text.style.fill.",t);}}function pn(t){if(typeof t=="number")return t;if(typeof t=="string")return t;if(Array.isArray(t))return t;if(t instanceof be.Color)return t.toNumber();e$1.warn("Unsupported color type.",t);}function fn(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof be.FillGradient)return je(t);if(typeof t=="object"&&"alignment"in t)return {alignment:t.alignment,alpha:t.alpha,color:pn(t.color),join:t.join,miterLimit:t.miterLimit,width:t.width,cap:t.cap,pixelLine:t.pixelLine,textureSpace:t.textureSpace};if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof be.FillPattern))return je(t.fill)}}e$1.warn("Unsupported property type for Text.style.stroke.",t);}}function ln(t){return {align:t.align,breakWords:t.breakWords,dropShadow:t.dropShadow,fill:un(t.fill),fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontVariant:t.fontVariant,fontWeight:t.fontWeight,leading:t.leading,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,padding:t.padding,stroke:fn(t.stroke),textBaseline:t.textBaseline,trim:t.trim,whiteSpace:t.whiteSpace,wordWrap:t.wordWrap,wordWrapWidth:t.wordWrapWidth}}var Ye=class{tickersPausedByGameLayerRender=[];get app(){return ie.app}get gameLayer(){return ie.gameLayer}get isInitialized(){return ie._isInitialized}get width(){return ie.canvasWidth}get height(){return ie.canvasHeight}get screen(){return this.app.screen}async init(e,n,s){return await ie.init(e,n,s)}get children(){return ie.gameLayer.children}async copyCanvasElementProperty(e,n,s={}){let o=["isRenderGroup","scale","visible","boundsArea","text","resolution","style","height","width"],{ignoreProperties:g=_=>_}=s;if(typeof n=="string"){let _=this.find(n);if(_)n=_;else {e$1.error(`Canvas element ${n} not found`);return}}if(typeof e=="string"){let _=this.find(e);if(_)e=_;else {e$1.error(`Canvas element ${e} not found`);return}}e instanceof be.Container&&(e=e.memory);let I=g(o),R={...e};I.forEach(_=>{_ in R&&delete R[_];}),await ae.copyProperty(n.pixivnId,n,R);}add(e,n,s={}){if(e===a){e$1.error(`The alias ${a} is reserved`);return}let o=this.find(e),g=s?.ignoreOldStyle;o&&!g&&this.copyCanvasElementProperty(o,n);let{zIndex:I=o?.parent?.getChildIndex(o)}=s;o&&!this.canvasElementIsOnCanvas(o)?e$1.error(`The canvas element ${e} exist in the memory but it is not on the canvas, so the zIndex is not set`):o&&this.remove(e,{ignoreTickers:true}),I!==void 0?(n.label=e,this.gameLayer.addChildAt(n,I)):(n.label=e,this.gameLayer.addChild(n));}remove(e,n={}){if(e===a){e$1.error(`The alias ${a} is reserved`);return}let s=n.ignoreTickers;typeof e=="string"&&(e=[e]),e.forEach(o=>{this.gameLayer.getChildrenByLabel(o).forEach(g=>{this.gameLayer.removeChild(g),!s&&tickers$1.unlinkComponent(o);});});}find(e){if(e===a)return this.gameLayer;let n=this.gameLayer.getChildByLabel(e);if(n)return n}canvasElementIsOnCanvas(e){return this.gameLayer.children.includes(e)}removeAll(){this.gameLayer.removeChildren();}editAlias(e,n,s={}){let o=this.find(e);o&&(o.label=n),!s.ignoreTickers&&tickers$1.transfer(e,n,"move");}get currentTickers(){return this.tickers.currentTickers}get currentTickersSteps(){return this.tickers.currentTickersSteps}findTicker(e){return tickers$1.find(e)}addTicker(e,n){return tickers$1.add(e,n)}addTickersSequence(e,n,s=0){return tickers$1.addSequence(e,n,s)}onTickerComplete(e,n){return tickers$1.onComplete(e,n)}unlinkComponentFromTicker(e,n){return tickers$1.unlinkComponent(e,n)}removeAllTickers(){return tickers$1.removeAll()}removeTicker(e,n={stopTicker:true}){return removeTicker(e,n)}pauseTicker(e){return tickers$1.pause(e)}resumeTicker(e){return tickers$1.resume(e)}isTickerPaused(e,n){return tickers$1.isPaused(e,n)}pause(){this.gameLayer.renderable!==false&&(this.gameLayer.renderable=false,this.tickersPausedByGameLayerRender=tickers$1.pause({id:Array.from(TickersManagerStatic._currentTickers.keys())}));}resume(){if(this.gameLayer.renderable===true)return;this.gameLayer.renderable=true;let e=this.tickersPausedByGameLayerRender.filter(n=>TickersManagerStatic._currentTickers.has(n));e.length>0&&tickers$1.resume({id:e}),this.tickersPausedByGameLayerRender=[];}transferTickers(e,n,s="move"){return tickers$1.transfer(e,n,s)}completeTickerOnStepEnd(e){return tickers$1.completeOnStepEnd(e)}async forceCompletionOfTicker(e,n){return tickers$1.forceCompletion(e,n)}tickers=tickers$1;animate(e,n,s,o){return GameUnifier.animate(e,n,s,o)}addLayerInternal(e,n){if(e===a){e$1.error(`The alias ${a} is reserved`);return}return n.label=e,ie.app.stage.addChild(n)}getLayerInternal(e){return ie.app.stage.getChildByLabel(e)}removeLayerInternal(e){let n=ie.app.stage.getChildByLabel(e);n&&ie.app.stage.removeChild(n);}addHtmlLayerInternal(e,n,s){return ie.addHtmlLayer(e,n,s)}removeHtmlLayerInternal(e){return ie.removeHtmlLayer(e)}getHtmlLayerInternal(e){return ie.getHtmlLayer(e)}addLayer(e,n){return this.addLayerInternal(e,n)}getLayer(e){return this.getLayerInternal(e)}removeLayer(e){return this.removeLayerInternal(e)}addHtmlLayer(e,n,s){return this.addHtmlLayerInternal(e,n,s)}removeHtmlLayer(e){return this.removeHtmlLayerInternal(e)}getHtmlLayer(e){return this.getHtmlLayerInternal(e)}layers={get gameLayer(){return ie.gameLayer},add:(e,n)=>this.addLayerInternal(e,n),get:e=>this.getLayerInternal(e),remove:e=>this.removeLayerInternal(e)};htmlLayers={add:(e,n,s)=>this.addHtmlLayerInternal(e,n,s),get:e=>this.getHtmlLayerInternal(e),remove:e=>this.removeHtmlLayerInternal(e)};async extractImage(){let e=this.gameLayer.renderable===false;e&&this.resume();let n;try{n=this.app.renderer.extract.image(this.app.stage);}finally{e&&this.pause();}return (await n).src}clear(){this.tickersPausedByGameLayerRender=[],tickers$1.removeAll(),this.removeAll();}export(){let e=this.gameLayer.renderable===false;e&&this.resume();try{let n={};return this.children.forEach(s=>{s.label&&(n[s.label]=pt(s));}),{tickers:a$1(TickersManagerStatic.currentTickersWithoutCreatedBySteps()),tickersSteps:a$1(TickersManagerStatic.currentTickersSequence()),elements:a$1(n),stage:a$1(we(this.gameLayer)),elementAliasesOrder:a$1(ie.childrenAliasesOrder),tickersToCompleteOnStepEnd:a$1(TickersManagerStatic._tickersToCompleteOnStepEnd)}}finally{e&&this.pause();}}async restore(e){this.clear();try{if(Object.hasOwn(e,"elements")&&Object.hasOwn(e,"elementAliasesOrder")){let n=e.elementAliasesOrder,s={},o=Object.entries(e.elements).map(async([g,I])=>{s[g]=await Ve(I);});await Promise.all(o),n.forEach(g=>{let I=s[g];I&&this.add(g,I);});}else {e$1.error("The data does not have the properties elementAliasesOrder and elements");return}if(Object.hasOwn(e,"stage")&&Object.hasOwn(e,"stage")?fe(this.gameLayer,e.stage,{ignoreScale:!0}):e$1.error("The data does not have the properties stage"),Object.hasOwn(e,"tickers")){let n=e.tickers;Object.entries(n).forEach(([s,o])=>{let g=o.canvasElementAliases;if(g.length!==0){let I=RegisteredTickers.getInstance(o.id,o.args,{duration:o.duration,priority:o.priority,id:s,canvasElementAliases:g});I?(I.canvasElementAliases=g,tickers$1.add(g,I),o.paused&&I.pause()):e$1.error(`Ticker ${o.id} not found`);}});}if(Object.hasOwn(e,"tickersSteps")){let n=e.tickersSteps;Object.entries(n).forEach(([s,o])=>{TickersManagerStatic._currentTickersSequence.set(s,new Map(Object.entries(o))),Object.keys(o).forEach(g=>{runTickersSequence(s,g);});});}if(Object.hasOwn(e,"tickersToCompleteOnStepEnd")){let n=e.tickersToCompleteOnStepEnd,s=n.tikersIds,o=n.stepAlias.map(g=>({id:g.id,alias:g.alias}));TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.length=0,TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.push(...s),TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.length=0,TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.push(...o);}}catch(n){e$1.error("Error importing data",n);}}};var oe=class t{static init(e){t._getScreen=e.getScreen;}static _getScreen;static get screen(){return t._getScreen()}};var b;(_=>{function t(f,v,A,w,H,X=0){return H?f==="width"?v*(oe.screen.width-A)+A-w-X*A:v*(oe.screen.height-A)+A-w-X*A:f==="width"?v*(oe.screen.width-A)+w+X*A:v*(oe.screen.height-A)+w+X*A}_.calculatePositionByAlign=t;function e(f,v,A,w,H,X=0){return H?f==="width"?(v-A+w+X*A)/(oe.screen.width-A):(v-A+w+X*A)/(oe.screen.height-A):f==="width"?(v-w-X*A)/(oe.screen.width-A):(v-w-X*A)/(oe.screen.height-A)}_.calculateAlignByPosition=e;function n(f,v){return f==="width"?v*oe.screen.width:v*oe.screen.height}_.calculatePositionByPercentagePosition=n;function s(f,v){return f==="width"?v/oe.screen.width:v/oe.screen.height}_.calculatePercentagePositionByPosition=s;function o(f,v){if(v=v%360,v<0&&(v+=360),v===0)return {x:f.x,y:f.y};if(v===90)return {x:-f.y,y:f.x};if(v===180)return {x:-f.x,y:-f.y};if(v===270)return {x:f.y,y:-f.x};if(v>0&&v<90){let A=v*Math.PI/180,w=Math.cos(A),H=Math.sin(A),X=f.x*w-f.y*H,Z=f.x*H+f.y*w;return f.x!==0&&Math.sign(X)!==Math.sign(f.x)&&(X=-X),f.y!==0&&Math.sign(Z)!==Math.sign(f.y)&&(Z=-Z),{x:X,y:Z}}else if(v>90&&v<180){let A=(v-90)*Math.PI/180,w=Math.cos(A),H=Math.sin(A),X=-f.y*H-f.x*w,Z=f.y*w-f.x*H;return f.x!==0&&Math.sign(X)!==Math.sign(f.x)&&(X=-X),f.y!==0&&Math.sign(Z)!==Math.sign(f.y)&&(Z=-Z),{x:X,y:Z}}else if(v>180&&v<270){let A=(v-180)*Math.PI/180,w=Math.cos(A),H=Math.sin(A),X=-f.x*w+f.y*H,Z=-f.x*H-f.y*w;return f.x!==0&&Math.sign(X)!==Math.sign(f.x)&&(X=-X),f.y!==0&&Math.sign(Z)!==Math.sign(f.y)&&(Z=-Z),{x:X,y:Z}}else if(v>270&&v<360){let A=(v-270)*Math.PI/180,w=Math.cos(A),H=Math.sin(A),X=f.y*H-f.x*w,Z=-f.y*w-f.x*H;return f.x!==0&&Math.sign(X)!==Math.sign(f.x)&&(X=-X),f.y!==0&&Math.sign(Z)!==Math.sign(f.y)&&(Z=-Z),{x:X,y:Z}}return {x:0,y:0}}_.getSuperPoint=o;function g(f,v){if(v=v%360,v<0&&(v+=360),v===0)return {x:f.x,y:f.y};if(v===90)return {x:f.y,y:-f.x};if(v===180)return {x:-f.x,y:-f.y};if(v===270)return {x:-f.y,y:f.x};if(v>0&&v<90){let A=v*Math.PI/180,w=Math.cos(A),H=Math.sin(A);return {x:f.x*w+f.y*H,y:-f.x*H+f.y*w}}else if(v>90&&v<180){let A=(v-90)*Math.PI/180,w=Math.cos(A),H=Math.sin(A);return {x:f.y*w-f.x*H,y:-f.y*H-f.x*w}}else if(v>180&&v<270){let A=(v-180)*Math.PI/180,w=Math.cos(A),H=Math.sin(A);return {x:-f.x*w-f.y*H,y:f.x*H-f.y*w}}else if(v>270&&v<360){let A=(v-270)*Math.PI/180,w=Math.cos(A),H=Math.sin(A);return {x:-f.y*w+f.x*H,y:f.y*H+f.x*w}}return {x:0,y:0}}_.getPointBySuperPoint=g;function I(f){let v=f.width,A=f.height,w=f.angle%360;return w<0&&(w+=360),w===0||w===180?v:w===90||w===270?A:Math.abs(v*Math.cos(w*Math.PI/180))+Math.abs(A*Math.sin(w*Math.PI/180))}_.getSuperWidth=I;function R(f){let v=f.width,A=f.height,w=f.angle%360;return w<0&&(w+=360),w===0||w===180?A:w===90||w===270?v:Math.abs(A*Math.cos(w*Math.PI/180))+Math.abs(v*Math.sin(w*Math.PI/180))}_.getSuperHeight=R;})(b||={});async function ze(t){if(t!=="EMPTY"){if(!t)throw e$1.error("Texture not found",t),new PixiError("unregistered_asset","Texture not found");if(be.Assets.cache.has(t)){let e=be.Assets.get(t);if(e)return e}return be.Assets.load(t).then(e=>{if(!e)throw e$1.error("Texture not found",t),new PixiError("unregistered_asset","Texture not found");if(!(e instanceof be.Texture))throw e$1.error("File is not a Texture",t),new PixiError("unregistered_asset","File is not a Texture");return e}).catch(e=>{throw e$1.error("Error loading file",e),new PixiError("unknown_element","Error loading file")})}}function ge(t){return t&&(typeof t.align!="number"&&(t.xAlign!==void 0&&(t.align===void 0?(t.align={x:t.xAlign},delete t.xAlign):(t.align.x=t.xAlign,delete t.xAlign)),t.yAlign!==void 0&&(t.align===void 0?(t.align={y:t.yAlign},delete t.yAlign):(t.align.y=t.yAlign,delete t.yAlign))),typeof t.percentagePosition!="number"&&(t.percentageX!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={x:t.percentageX},delete t.percentageX):(t.percentagePosition.x=t.percentageX,delete t.percentageX)),t.percentageY!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={y:t.percentageY},delete t.percentageY):(t.percentagePosition.y=t.percentageY,delete t.percentageY))),t)}var Ae=class t extends be.Sprite{constructor(e$1){if(e$1 instanceof be.Texture)super(e$1);else {let{align:n,percentagePosition:s,...o}=ge(e$1)||{};super(o),n&&(this.align=n),s&&(this.percentagePosition=s);}this.pixivnId=this.constructor.prototype.pixivnId||e;}pixivnId=e;get memory(){return {...ft(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){return await Ze(this,e)}static from(e,n){let s=be.Sprite.from(e,n),o=new t;return o.texture=s.texture,o}onEventsHandlers={};on(e,n,s){return Ce(e,this,n),super.on(e,(...o)=>n(...o,this),s)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return {x:b.calculateAlignByPosition("width",this.x,b.getSuperWidth(this),e.x,n.x<0,this.anchor.x),y:b.calculateAlignByPosition("height",this.y,b.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return b.calculateAlignByPosition("width",this.x,b.getSuperWidth(this),e.x,n.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return b.calculateAlignByPosition("height",this.y,b.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:b.calculatePercentagePositionByPosition("width",this.x),y:b.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return b.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return b.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=b.calculatePositionByAlign("width",this._align.x,b.getSuperWidth(this),e.x,n.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=b.calculatePositionByAlign("height",this._align.y,b.getSuperHeight(this),e.y,n.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=b.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=b.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};ae.add(Ae,{name:e,copyProperty:async(t,e)=>{await Ze(t,e,{ignoreTexture:true});}});async function Ze(t,e,n){e=ge(e);let s=n?.ignoreTexture||false;if(await fe(t,e),!s){let g;if("textureData"in e&&e.textureData&&(g=e.textureData),g&&g.url!=="EMPTY"){let I=g.url;g.alias&&be.Assets.resolver.hasKey(g.alias)&&(I=g.alias);try{let R=await ze(I);R&&(t.texture=R);}catch(R){e$1.error("Error in Sprite.setMemorySprite() while loading texture"),R=new PixiError("unregistered_asset",`Error loading image ${I}`,"canvas",e),GameUnifier.runOnError(R,{});}}}let o=n?.half;o&&await o(),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}var q=class t extends Ae{_textureAlias;get textureAlias(){return this._textureAlias?this._textureAlias:this.texture.source.label}pixivnId=d$1;constructor(e,n){super(e),n&&(this._textureAlias=n);}get memory(){return {...super.memory,pixivnId:this.pixivnId,loadIsStarted:this._loadIsStarted}}async setMemory(e){let n;"textureData"in e&&e.textureData&&(n=e.textureData),"assetsData"in e&&Array.isArray(e.assetsData)&&e.assetsData.length>0&&(n=e.assetsData[0]),n&&n.alias&&(this._textureAlias=n.alias),await Je(this,e),this.reloadPosition();}static from(e,n){let s=be.Sprite.from(e,n),o=new t;return o.texture=s.texture,o}_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){return this._loadIsStarted=true,ze(this.textureAlias).then(e=>{this._loadIsStarted=false,e&&(this.texture=e);}).catch(e=>{this._loadIsStarted=false,e$1.error("Error into ImageSprite.load()"),e=new PixiError("unregistered_asset",`Error loading image ${this.textureAlias}`,"canvas",{...this.memory,label:this.textureAlias},this),GameUnifier.runOnError(e,{});})}set texture(e){super.texture=e,this.reloadPosition();}get texture(){return super.texture}get haveEmptyTexture(){return this.texture._source.label==="EMPTY"}};ae.add(q,{name:d$1,copyProperty:async(t,e)=>{await Je(t,e,{ignoreTexture:true});}});async function Je(t,e,n){return await Ze(t,e,{half:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();},ignoreTexture:n?.ignoreTexture})}var xe=class t extends q{constructor(e,n){if(e instanceof be.Texture){super(e,n);return}let{loop:s,paused:o,currentTime:g,...I}=e||{};super(I,n),s&&(this.loop=s),o&&(this.paused=o),g&&(this.currentTime=g);}pixivnId=g;get memory(){return {...super.memory,pixivnId:this.pixivnId,loop:this.loop,paused:this._paused,currentTime:this.currentTime}}async setMemory(e){await Ht(this,e),this.reloadPosition();}static from(e,n){let s=be.Sprite.from(e,n),o=new t;return o.texture=s.texture,o}async load(){await super.load(),this.loop=this._looop,this.currentTime=this._currentTime,this.paused=this._paused;}_looop=false;get loop(){return this.texture?.source?.resource?.loop||false}set loop(e){this._looop=e,this.texture?.source?.resource&&(this.texture.source.resource.loop=e);}_paused=false;get paused(){return this.texture?.source?.resource?.paused||false}set paused(e){e?this.pause():this.play();}pause(){this._paused=true,this.texture?.source?.resource&&this.texture.source.resource.pause();}play(){this._paused=false,this.texture?.source?.resource?.play&&typeof this.texture.source.resource.play=="function"&&this.texture.source.resource.play();}_currentTime=0;get currentTime(){return this.texture?.source?.resource?.currentTime||0}set currentTime(e){let n=this.duration;n&&e>=n&&(e=0),this._currentTime=e,this.texture?.source?.resource&&(this.texture.source.resource.currentTime=e);}restart(){this.currentTime=0;}get duration(){if(this.texture?.source?.resource)return this.texture.source.resource.duration||0}};ae.add(xe,{name:g,getInstance:async(t,e)=>{let n;"textureData"in e&&e.textureData&&(n=e.textureData);let s=new t(void 0,n?.alias);return await s.setMemory(e),s},copyProperty:async(t,e)=>{await Ht(t,e,{ignoreTexture:true});}});async function Ht(t,e,n){await Je(t,e,{ignoreTexture:n?.ignoreTexture}),"loop"in e&&e.loop!==void 0&&(t.loop=e.loop),"currentTime"in e&&e.currentTime!==void 0&&(t.currentTime=e.currentTime),"paused"in e&&e.paused!==void 0&&(t.paused=e.paused);}var me=class extends Container{constructor(e){let{anchor:n,align:s,percentagePosition:o,...g}=ge(e)||{};super(g),this.pixivnId=this.constructor.prototype.pixivnId||b$1,n&&(this.anchor=n),s&&(this.align=s),o&&(this.percentagePosition=o);}pixivnId=b$1;get memory(){return {...we(this,{childrenExport:true}),anchor:this._anchor?this.anchor:void 0,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await this.importChildren(e),await fe(this,e),this.reloadAnchor(),this.reloadPosition();}async importChildren(e){for(let n=0;n<e.elements.length;n++){let s=e.elements[n],o=await Ve(s);this.addChild(o);}}onEventsHandlers={};on(e,n,s){return Ce(e,this,n),super.on(e,(...o)=>n(...o,this),s)}_anchor;get anchor(){let e=super.pivot.x/this.width,n=super.pivot.y/this.height;return {x:e,y:n}}set anchor(e){typeof e=="number"?this._anchor={x:e,y:e}:this._anchor=e,this.reloadAnchor();}reloadAnchor(){this._anchor&&super.pivot.set(this._anchor.x*this.width,this._anchor.y*this.height);}get pivot(){return super.pivot}set pivot(e){this._anchor=void 0,super.pivot=e;}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return {x:b.calculateAlignByPosition("width",this.x,b.getSuperWidth(this),e.x,n.x<0),y:b.calculateAlignByPosition("height",this.y,b.getSuperHeight(this),e.y,n.y<0)}}set xAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return b.calculateAlignByPosition("width",this.x,b.getSuperWidth(this),e.x,n.x<0)}set yAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return b.calculateAlignByPosition("height",this.y,b.getSuperHeight(this),e.y,n.y<0)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:b.calculatePercentagePositionByPosition("width",this.x),y:b.calculatePercentagePositionByPosition("height",this.y)}}set percentageX(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageX(){return b.calculatePercentagePositionByPosition("width",this.x)}set percentageY(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get percentageY(){return b.calculatePercentagePositionByPosition("height",this.y)}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=b.calculatePositionByAlign("width",this._align.x,b.getSuperWidth(this),e.x,n.x<0)),this._align.y!==void 0&&(super.y=b.calculatePositionByAlign("height",this._align.y,b.getSuperHeight(this),e.y,n.y<0));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=b.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=b.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};ae.add(me,{name:b$1,copyProperty:async(t,e)=>await fe(t,e)});var wn=new Set(["mp4","webm","ogg","ogv","avi","mov","wmv","flv","mkv","m4v","3gp","3g2","ts","mts"]);function He(t){let e=be.Assets.cache.has(t)?be.Assets.get(t):null;return e instanceof be.Texture&&(t=e.source?.label||t),An(t)}function An(t){let e=t.split(".").pop()?.toLowerCase();return e!==void 0&&wn.has(e)}var J=class extends me{constructor(e,n){let{anchor:s,align:o,percentagePosition:g,...I}=ge(e)||{};super(I),n&&n.forEach(R=>{He(R)?this.addChild(new xe(void 0,R)):this.addChild(new q(void 0,R));}),s&&(this.anchor=s),o&&(this.align=o),g&&(this.percentagePosition=g);}get memory(){return {...super.memory,pixivnId:c,loadIsStarted:this._loadIsStarted}}async setMemory(e){await this.importChildren(e),await Ut(this,e),this.reloadAnchor(),this.reloadPosition();}pixivnId=c;_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){this._loadIsStarted=true;let e=this.children.map(n=>n.load());return Promise.all(e).then(()=>{this._loadIsStarted=false,this.reloadAnchor(),this.reloadPosition();}).catch(n=>{this._loadIsStarted=false,e$1.error("Error into ImageContainer.load()",n);})}get texture(){return this.children.length>0?this.children[0].texture:new be.Texture}get haveEmptyTexture(){return this.children.some(e=>e.texture._source.label==="EMPTY")}};ae.add(J,{name:c,copyProperty:async(t,e)=>await Ut(t,e)});async function Ut(t,e){e=ge(e)||{},fe(t,e,{end:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();}});}var Qe=class{constructor(...e){}get memory(){throw new PixiError("not_implemented","The method CanvasBaseItem.memory must be overridden")}setMemory(e){throw new PixiError("not_implemented","The method CanvasBaseItem.setMemory must be overridden")}pixivnId="canvas_element_id_not_set"};var Se=class extends be.Text{constructor(e){let{align:n,percentagePosition:s,...o}=ge(e)||{};super(o),this.pixivnId=this.constructor.prototype.pixivnId||f,n&&(this.align=n),s&&(this.percentagePosition=s);}pixivnId=f;get memory(){return {...lt(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await En(this,e),this.reloadPosition();}onEventsHandlers={};on(e,n,s){return Ce(e,this,n),super.on(e,(...o)=>n(...o,this),s)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return {x:b.calculateAlignByPosition("width",this.x,b.getSuperWidth(this),e.x,n.x<0,this.anchor.x),y:b.calculateAlignByPosition("height",this.y,b.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return b.calculateAlignByPosition("width",this.x,b.getSuperWidth(this),e.x,n.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);return b.calculateAlignByPosition("height",this.y,b.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:b.calculatePercentagePositionByPosition("width",this.x),y:b.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return b.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return b.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=b.getSuperPoint(this.pivot,this.angle),n=b.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=b.calculatePositionByAlign("width",this._align.x,b.getSuperWidth(this),e.x,n.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=b.calculatePositionByAlign("height",this._align.y,b.getSuperHeight(this),e.y,n.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=b.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=b.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};ae.add(Se,{name:f});async function En(t,e){"text"in e&&e.text!==void 0&&(t.text=e.text),await fe(t,e,{end:()=>{"style"in e&&e.style!==void 0&&(t.style=e.style);}}),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"resolution"in e&&e.resolution!==void 0&&(t.resolution=e.resolution),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}function Ue(t,e,n){let s=[0],o=t;for(let g=0;g<n;g++)s.push(o,-o*.6,o*.3,0),o*=e;return s}function Xt(t,e,n,s){let o=n.reduce((v,A)=>A.enabled?v+A.padding:v,0),g=t.x,I=t.y,R=t.x+t.width,_=t.y+t.height;s&&(g=Math.max(g,0),I=Math.max(I,0),R=Math.min(R,s.width),_=Math.min(_,s.height));let f={x:g-o,y:I-o,width:R-g+o*2,height:_-I+o*2};return {x:t.x+e.x*t.width-f.x,y:t.y+e.y*t.height-f.y,area:f}}function gt(t,e,n,s){return Math.max(0,Math.ceil(e-Math.min(t.x,t.y,n-t.x,s-t.y)))}function et(t,e,n,s){let o=Math.min(Math.max(e,0),.5),g=Math.hypot(Math.max(t.x,n-t.x),Math.max(t.y,s-t.y));return Math.ceil(g*o/(1-o))}function tt(t,e,n,s){return s>0?s:Math.hypot(Math.max(t.x,e.width-t.x),Math.max(t.y,e.height-t.y))+n/2}function mt(t){let e=t.filters;return e?Array.isArray(e)?[...e]:[e]:[]}function Rn(t,e){t.filters=[...mt(t),...e];}function kn(t,e){let n=mt(t).filter(s=>!e.includes(s));t.filters=n.length>0?n:null;}function ee(t,e,n,s,o,g){Rn(e,[n]);let I=filters.animate(t,n,s,{duration:o.duration??1,delay:o.delay,ease:o.ease,times:o.times,aliasToRemoveAfter:o.aliasToRemoveAfter,autoplay:o.autoplay},g,void 0,()=>{kn(e,[n]),n.destroy();});return I&&(o.completeOnContinue??true)&&tickers$1.completeOnStepEnd({id:I}),I}function ve(t,e){let n;try{n=u.screen;}catch{n=void 0;}return Xt(t.getBounds(),e,mt(t),n)}async function Bn(t,e={},n){return yt.shakeEffect(t,e,n)}function $t(t){switch(t){case "up":return {axis:"y",sign:-1};case "down":return {axis:"y",sign:1};case "left":return {axis:"x",sign:-1};default:return {axis:"x",sign:1}}}function nt(t,e,n){let s=[0],o=t;for(let g=0;g<n;g++)s.push(g%2===0?o:-o,0),o*=e;return s}function Le(t,e,n,s){let o=[t],g=e;for(let I=0;I<s;I++)o.push(t+g,t),g*=n;return o}var yt;(Xe=>{async function t(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the shake effect can't be applied.`);return}let k={x:M.position.x,y:M.position.y},{shakeType:U="horizontal",maxShockSize:$=10,shocksNumber:j=10,...L}=K,D=j-1;if(D<2){e$1.error("The number of shocks must be at least 3.");return}let W=Math.floor(D/2),Y=Math.ceil(D/2),F=[];for(let N=0;N<W;N++){let te=$*(N+1)/W;U==="horizontal"?N%2!==0?F.push(k.x+te):F.push(k.x-te):N%2!==0?F.push(k.y+te):F.push(k.y-te);}let G=W%2===0;for(let N=Y;N>0;N--){let te=$*(N+1)/(Y-1);U==="horizontal"?N%2===0&&!G||N%2!==0&&G?F.push(k.x-te):F.push(k.x+te):N%2===0&&!G||N%2!==0&&G?F.push(k.y-te):F.push(k.y+te);}let Q;if(U==="horizontal"?(F.push(k.x),Q=u.animate(O,{x:F},L,V)):(F.push(k.y),Q=u.animate(O,{y:F},L,V)),Q)return [Q]}Xe.shakeEffect=t;async function e(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the bounce effect can't be applied.`);return}let{direction:k="up",distance:U=30,bounces:$=4,decay:j=.5,...L}=K,{axis:D,sign:W}=$t(k),Y=D==="x"?M.position.x:M.position.y,F=[Y],G=U;for(let N=0;N<$;N++)F.push(Y+W*G,Y),G*=j;let Q=u.animate(O,{[D]:F},L,V);if(Q)return [Q]}Xe.bounceEffect=e;async function n(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the pulse effect can't be applied.`);return}let{scale:k=1.2,pulses:U=3,decay:$=.6,...j}=K,L=M.scale.x,D=M.scale.y,W=[L],Y=[D],F=k-1;for(let Q=0;Q<U;Q++)W.push(L*(1+F),L),Y.push(D*(1+F),D),F*=$;let G=u.animate(O,{scaleX:W,scaleY:Y},j,V);if(G)return [G]}Xe.pulseEffect=n;async function s(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the hop effect can't be applied.`);return}let{direction:k="up",distance:U=40,secondaryHops:$=0,decay:j=.5,...L}=K,{axis:D,sign:W}=$t(k),Y=D==="x"?M.position.x:M.position.y,F=[Y],G=U;for(let N=0;N<1+$;N++)F.push(Y+W*G,Y),G*=j;let Q=u.animate(O,{[D]:F},L,V);if(Q)return [Q]}Xe.hopEffect=s;async function o(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the wiggle effect can't be applied.`);return}let{angle:k=15,repetitions:U=3,decay:$=.5,...j}=K,L=M.rotation,D=k*Math.PI/180,W=nt(D,$,U).map(F=>L+F),Y=u.animate(O,{rotation:W},j,V);if(Y)return [Y]}Xe.wiggleEffect=o;async function g(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the nod effect can't be applied.`);return}let{axis:k="horizontal",distance:U=15,repetitions:$=3,decay:j=.5,...L}=K,D=k==="horizontal"?"x":"y",W=k==="horizontal"?M.position.x:M.position.y,Y=nt(U,j,$).map(G=>W+G),F=u.animate(O,{[D]:Y},L,V);if(F)return [F]}Xe.nodEffect=g;async function I(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the sway effect can't be applied.`);return}let{axis:k="horizontal",distance:U=10,angle:$=5,repetitions:j=3,decay:L=0,ease:D="easeInOut",...W}=K,Y=k==="horizontal"?"x":"y",F=k==="horizontal"?M.position.x:M.position.y,G=M.rotation,Q=$*Math.PI/180,N=nt(U,L||1,j).map(ce=>F+ce),te=nt(Q,L||1,j).map(ce=>G+ce),ue=u.animate(O,{[Y]:N,rotation:te},{ease:D,...W},V);if(ue)return [ue]}Xe.swayEffect=I;async function R(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the punch effect can't be applied.`);return}let{mode:k="scale",strength:U=.3,overshoot:$=.3,...j}=K,L;if(k==="scale"){let D=W=>[W,W*(1+U),W*(1-U*$),W];L=u.animate(O,{scaleX:D(M.scale.x),scaleY:D(M.scale.y)},j,V);}else {let D=k==="rotation"?M.rotation:k==="x"?M.position.x:M.position.y,W=k==="rotation"?U*Math.PI/180:U,Y=[D,D+W,D-W*$,D];L=u.animate(O,{[k]:Y},j,V);}if(L)return [L]}Xe.punchEffect=R;async function _(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the glitch effect can't be applied.`);return}let{strength:k=40,bursts:U=3,slices:$=8,direction:j=0,rgbSplit:L=6,decay:D=.5,ease:W="linear",...Y}=K,F=new filters.GlitchFilter({slices:$,direction:j,offset:0});F.refresh(),F.padding=Math.ceil(Math.abs(k));let G=[],Q=ee(O,M,F,{offset:Ue(k,D,U)},{ease:W,...Y},V);if(Q&&G.push(Q),L!==0){let N=Ue(L,D,U),te=new filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});te.padding=Math.ceil(Math.abs(L));let ue=ee(O,M,te,{redX:N,blueX:N.map(ce=>-ce)},{ease:W,...Y},V);ue&&G.push(ue);}if(G.length>0)return G}Xe.glitchEffect=_;async function f(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the chromatic aberration effect can't be applied.`);return}let{strength:k=8,axis:U="horizontal",bursts:$=1,decay:j=.5,...L}=K,D=new filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});D.padding=Math.ceil(Math.abs(k));let W=U==="horizontal"?"redX":"redY",Y=U==="horizontal"?"blueX":"blueY",F={[W]:Le(0,k,j,$),[Y]:Le(0,-k,j,$)},G=ee(O,M,D,F,L,V);if(G)return [G]}Xe.chromaticAberrationEffect=f;async function v(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the shockwave effect can't be applied.`);return}let{origin:k={x:.5,y:.5},amplitude:U=30,wavelength:$=160,brightness:j=1,radius:L=-1,speed:D=500,strength:W,...Y}=K,{width:F,height:G}=M.getBounds(),Q=W??tt({x:k.x*F,y:k.y*G},{width:F,height:G},$,L)/D,N=new filters.ShockwaveFilter({center:{x:0,y:0},amplitude:U,wavelength:$,brightness:j,radius:L,speed:D,time:0});N.padding=Math.ceil(Math.abs(U)*1.25);let te=ee(O,M,N,{time:[0,Q]},Y,V),{x:ue,y:ce}=ve(M,k);if(N.center={x:ue,y:ce},te)return [te]}Xe.shockwaveEffect=v;async function A(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the radial blur effect can't be applied.`);return}let{strength:k=.5,bursts:U=1,origin:$={x:.5,y:.5},innerRadius:j=0,radius:L=-1,decay:D=.5,...W}=K,Y=new filters.ZoomBlurFilter({center:{x:0,y:0},innerRadius:j,radius:L,strength:0}),{width:F,height:G}=M.getBounds();Y.padding=et({x:$.x*F,y:$.y*G},k,F,G);let Q=Le(0,k,D,U),N=ee(O,M,Y,{strength:Q},W,V),{x:te,y:ue}=ve(M,$);if(Y.center={x:te,y:ue},N)return [N]}Xe.radialBlurEffect=A;async function w(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the blur pulse effect can't be applied.`);return}let{strength:k=8,pulses:U=3,quality:$,decay:j=.5,...L}=K,D=new filters.BlurFilter({strength:0,quality:$}),W=Le(0,k,j,U),Y=ee(O,M,D,{strength:W},L,V);if(Y)return [Y]}Xe.blurPulseEffect=w;async function H(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the vignette pulse effect can't be applied.`);return}let{strength:k=1,pulses:U=1,radius:$=.5,blur:j=.5,decay:L=.5,...D}=K,W=new filters.CRTFilter({curvature:0,lineWidth:0,lineContrast:0,noise:0,vignetting:$,vignettingBlur:j,vignettingAlpha:0}),Y=Le(0,k,L,U),F=ee(O,M,W,{vignettingAlpha:Y},D,V);if(F)return [F]}Xe.vignettePulseEffect=H;async function X(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the desaturate effect can't be applied.`);return}let{amount:k=0,duration:U=1,holdDuration:$=0,...j}=K,L=U*2+$,D=[0,U/L,(U+$)/L,1],W=new filters.AdjustmentFilter({saturation:1}),Y=ee(O,M,W,{saturation:[1,k,k,1]},{...j,duration:L,times:D},V);if(Y)return [Y]}Xe.desaturateEffect=X;async function Z(O,K={},V){let M=u.find(O);if(!M){e$1.error(`The element with the alias ${O} does not exist. So the glow pulse effect can't be applied.`);return}let{strength:k=4,pulses:U=3,color:$=16777215,distance:j=10,innerStrength:L=0,decay:D=.5,...W}=K,Y=new filters.GlowFilter({outerStrength:0,innerStrength:L,distance:j,color:$}),F=Le(0,k,D,U),G=ee(O,M,Y,{outerStrength:F},W,V);if(G)return [G]}Xe.glowPulseEffect=Z;})(yt||={});function Oe(t){let e=t.getLocalBounds();return {x:e.x,y:e.y,width:e.width,height:e.height}}function xt(t,e){return e.graphics||(e.graphics=new Graphics,t.parent?.addChild(e.graphics),t.mask=e.graphics),Fn(t,e.graphics),e.graphics}function Fn(t,e){e.position.copyFrom(t.position),e.scale.copyFrom(t.scale),e.pivot.copyFrom(t.pivot),e.skew.copyFrom(t.skew),e.rotation=t.rotation;}function Ln(t,e){e.graphics&&(t.mask=null,e.graphics.parent?.removeChild(e.graphics),e.graphics.destroy({children:true}),e.graphics=void 0);}function Pt(t,e,n,s){let o=e.invert?1-n:n,{bounds:g}=e,I=xt(t,s),R=g.x+g.width/2,_=g.y+g.height/2,f=Math.sqrt(g.width**2+g.height**2)||1,v=Math.max(o,0)*f*2,A=e.angle*Math.PI/180;if(I.clear(),v>0){let w=Math.cos(-A),H=Math.sin(-A),X=[[-f,-f],[-f+v,-f],[-f+v,f],[-f,f]].flatMap(([Z,Xe])=>[R+Z*w-Xe*H,_+Z*H+Xe*w]);I.poly(X).fill(16777215);}}function vt(t,e,n,s){let o=e.invert?1-n:n,{bounds:g}=e,I=xt(t,s),R=g.x+g.width*e.originX,_=g.y+g.height*e.originY,f=Math.max(R-g.x,g.x+g.width-R),v=Math.max(_-g.y,g.y+g.height-_),A=Math.sqrt(f**2+v**2)||1,w=Math.max(o,0)*A,H=e.aspect>0?e.aspect:1;I.clear(),w>0&&I.ellipse(R,_,w*H,w).fill(16777215);}function It(t,e,n,s){let g=1-(e.invert?1-n:n),{bounds:I}=e,R=xt(t,s);if(R.clear(),e.orientation==="horizontal"){let _=I.x+I.width*e.origin,f=_-I.x,v=I.x+I.width-_,A=I.x-g*f,w=_+g*v;f>0&&R.rect(A,I.y,f,I.height).fill(16777215),v>0&&R.rect(w,I.y,v,I.height).fill(16777215);}else {let _=I.y+I.height*e.origin,f=_-I.y,v=I.y+I.height-_,A=I.y-g*f,w=_+g*v;f>0&&R.rect(I.x,A,I.width,f).fill(16777215),v>0&&R.rect(I.x,w,I.width,v).fill(16777215);}}function Gt(t,e,n){switch(e.kind){case "wipe":case "iris":case "split":Ln(t,n);break}}function it(t,e,n){let s={...u.find(t)?.memory,...n},o=new J(n,e);return s&&u.copyCanvasElementProperty(s,o),u.add(t,o,{ignoreOldStyle:true,zIndex:n?.zIndex}),o}async function Yn(t,e,n){let s={...u.find(t)?.memory,...n},o=new J(n,e);return o.label=t,await o.load(),s&&u.copyCanvasElementProperty(s,o),u.add(t,o,{ignoreOldStyle:true,zIndex:n?.zIndex}),o}function rt(t,e,n){if(!e)if(be.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:d$1,...n,label:t});let s={...u.find(t)?.memory,...n},o=new q(n,e);return s&&u.copyCanvasElementProperty(s,o),u.add(t,o,{ignoreOldStyle:true,zIndex:n?.zIndex}),o}async function zn(t,e,n){if(!e)if(be.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:d$1,...n,label:t});let s={...u.find(t)?.memory,...n},o=new q(n,e);return o.label=t,await o.load(),s&&u.copyCanvasElementProperty(s,o),u.add(t,o,{ignoreOldStyle:true,zIndex:n?.zIndex}),o}function st(t,e,n){if(!e)if(be.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:g,...n,label:t});let s={...u.find(t)?.memory,...n},o=new xe(n,e);return s&&u.copyCanvasElementProperty(s,o),u.add(t,o,{ignoreOldStyle:true,zIndex:n?.zIndex}),o}async function Hn(t,e,n){if(!e)if(be.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:g,...n,label:t});let s={...u.find(t)?.memory,...n},o=new xe(n,e);return o.label=t,await o.load(),s&&u.copyCanvasElementProperty(s,o),u.add(t,o,{ignoreOldStyle:true,zIndex:n?.zIndex}),o}async function Wn(t,e,n={},s){return le.showWithDissolve(t,e,n,s)}function Xn(t,e={},n){return le.removeWithDissolve(t,e,n)}async function $n(t,e,n={},s){return le.showWithFade(t,e,n,s)}function Gn(t,e={},n){return le.removeWithFade(t,e,n)}async function Vn(t,e,n={},s){return le.moveIn(t,e,n,s)}function jn(t,e={},n){return le.moveOut(t,e,n)}async function Nn(t,e,n={},s){return le.zoomIn(t,e,n,s)}function Kn(t,e={},n){return le.zoomOut(t,e,n)}async function qn(t,e,n={},s){return le.pushIn(t,e,n,s)}function Zn(t,e={direction:"right"},n){return le.pushOut(t,e,n)}var le;(yi=>{function t(r){switch(r.type){case "align":return {xAlign:r.x,yAlign:r.y};case "percentage":return {percentageX:r.x,percentageY:r.y};default:return {x:r.x,y:r.y}}}function e(r,i,a){if(typeof i=="string")return He(i)?st(r,i,{...a.properties,zIndex:a.zIndex}):rt(r,i,{...a.properties,zIndex:a.zIndex});if(Array.isArray(i))return it(r,i,{...a.properties,zIndex:a.zIndex});if(typeof i=="object"&&"value"in i&&"options"in i){if(typeof i.value=="string")return He(i.value)?st(r,i.value,{...i.options,...a.properties,zIndex:a.zIndex}):rt(r,i.value,{...i.options,...a.properties,zIndex:a.zIndex});if(Array.isArray(i.value))return it(r,i.value,{...i.options,...a.properties,zIndex:a.zIndex})}return u.add(r,i,a),i}function n(r){let i=r;return {x:i.x,y:i.y,anchor:i.anchor,scale:i.scale,pivot:i.pivot,skew:i.skew,rotation:i.rotation,angle:i.angle}}function s(r,i,a){let c,d=u.find(r);d&&(c=`${r}_temp_${a}`,u.editAlias(r,c));let p=e(r,i,{zIndex:d?d.parent?.getChildIndex(d):void 0,properties:d?n(d):void 0});return d?.parent?.setChildIndex(d,d.parent.getChildIndex(d)-.1),c&&u.copyCanvasElementProperty(c,r),c&&tickers$1.transfer(c,r,"duplicate"),{component:p,oldComponentAlias:c}}function o(r){switch(r){case "up":return 90;case "down":return 270;case "left":return 180;default:return 0}}function g(r,i,a){let c={},d=P=>{let T=u.find(r);T&&i.apply(T,P,c);},p=filters.animate(r,void 0,{value:[i.from,i.to]},{duration:i.duration??1,delay:i.delay,ease:i.ease,aliasToRemoveAfter:i.aliasToRemoveAfter,tickerIdToResume:i.tickerIdToResume},a,d,()=>{let P=u.find(r);P&&Gt(P,i.config,c);});return p&&d(i.from),p&&(i.completeOnContinue??true)&&tickers$1.completeOnStepEnd({id:p}),p}function I(r,i,a,c,d){let p=Math.max(c,0)/4;a==="in"?(i&&(i.alpha=0),u.animate(r,{alpha:[0,1]},{duration:p,completeOnContinue:false},d)):u.animate(r,{alpha:[1,0]},{duration:p,delay:Math.max(c-p,0),completeOnContinue:false},d);}function R(r,i,a,c,d=false){let p=Math.max(c,1),P=i*2+a,T=d?i+a:P,x=Math.max(P*(p-1)+T,.001),y=[0],m=[0],l=0;for(let h=0;h<p;h++){let C=h===p-1;l+=i,y.push(r),m.push(l/x),l+=a,y.push(r),m.push(l/x),(!C||!d)&&(l+=i,y.push(0),m.push(Math.min(l/x,1)));}return {values:y,times:m,total:x}}async function _(r,i,a={},c){let{completeOnContinue:d=true,tickerIdToResume:p=[],...P}=a,T=[];i||(i=r),typeof p=="string"&&(p=[p]);let x,y=u.find(r);if(y&&(x=`${r}_temp_disolve`,u.editAlias(r,x)),i=e(r,i,{zIndex:y?y.parent?.getChildIndex(y):void 0,properties:y?n(y):void 0}),y?.parent?.setChildIndex(y,y.parent.getChildIndex(y)-.1),x&&u.copyCanvasElementProperty(x,r),x&&tickers$1.transfer(x,r,"duplicate"),i.alpha=0,x){let l=f(x,{...a,autoplay:false,completeOnContinue:d},c);l&&(T.push(...l),p.push(...l));}let m=u.animate(r,{alpha:1},{...P,tickerIdToResume:p,completeOnContinue:d},c);if(m&&T.push(m),(i instanceof q||i instanceof J)&&i.haveEmptyTexture&&await i.load(),T.length>0)return T}yi.showWithDissolve=_;function f(r,i={},a){let{completeOnContinue:c=true,aliasToRemoveAfter:d=[],...p}=i;typeof d=="string"&&(d=[d]),d.push(r);let P=u.animate(r,{alpha:0},{...p,aliasToRemoveAfter:d,completeOnContinue:c},a);if(P)return [P]}yi.removeWithDissolve=f;async function v(r,i,a={},c){let{completeOnContinue:d=true,aliasToRemoveAfter:p=[],...P}=a,T=[];i||(i=r),typeof p=="string"&&(p=[p]);let x=u.find(r);if(!x)return _(r,i,a,c);let y=`${r}_temp_fade`;u.editAlias(r,y),p.push(y),i=e(r,i,{zIndex:x?x.parent?.getChildIndex(x):void 0,properties:n(x)}),x?.parent?.setChildIndex(x,x.parent.getChildIndex(x)-.1),y&&u.copyCanvasElementProperty(y,r),y&&tickers$1.transfer(y,r,"duplicate"),i.alpha=0;let m=u.animate(r,{alpha:1},{...P,aliasToRemoveAfter:p,completeOnContinue:d},c);if(m){let l=f(y,{...a,tickerIdToResume:m,completeOnContinue:d},c);l&&T.push(...l),T.push(m),tickers$1.pause({id:m});}if((i instanceof q||i instanceof J)&&i.haveEmptyTexture&&await i.load(),T.length>0)return T}yi.showWithFade=v;function A(r,i={},a){return f(r,i,a)}yi.removeWithFade=A;async function w(r,i,a={},c){let{direction:d="right",completeOnContinue:p=true,tickerIdToResume:P=[],aliasToRemoveAfter:T=[],removeOldComponentWithMoveOut:x,motionBlur:y,...m}=a,l=[],h;i||(i=r),typeof P=="string"&&(P=[P]),typeof T=="string"&&(T=[T]);let C,E=u.find(r);if(E&&(C=`${r}_temp_movein`,u.editAlias(r,C),E instanceof q||E instanceof J?h=E.positionInfo:h={x:E.x,y:E.y,type:"pixel"}),i=e(r,i,{zIndex:E?E.parent?.getChildIndex(E):void 0}),E?.parent?.setChildIndex(E,E.parent.getChildIndex(E)-.1),C&&u.copyCanvasElementProperty(C,r),C&&tickers$1.transfer(C,r,"move"),(i instanceof q||i instanceof J)&&i.haveEmptyTexture&&await i.load(),h||(i instanceof q||i instanceof J?h=i.positionInfo:h={x:i.x,y:i.y,type:"pixel"}),C)if(x){let re=H(C,{...a,autoplay:false,completeOnContinue:p},c);re&&(l.push(...re),P.push(...re));}else T.push(C);switch(d){case "up":i.y=u.height+i.height;break;case "down":i.y=-i.height;break;case "left":i.x=u.width+i.width;break;case "right":i.x=-i.width;break}let B=tickers$1.pause({canvasAlias:r});P.push(...B);let z=u.animate(r,t(h),{...m,tickerIdToResume:P,aliasToRemoveAfter:T,completeOnContinue:p},c);z&&l.push(z);let ne=te(r,i,d,y,{...m,completeOnContinue:p},c);if(ne&&l.push(ne),l.length>0)return l}yi.moveIn=w;function H(r,i={},a){let{direction:c="right",completeOnContinue:d=true,aliasToRemoveAfter:p=[],motionBlur:P,...T}=i;typeof p=="string"&&(p=[p]),p.push(r);let x=u.find(r);if(!x){e$1.warn(`The canvas component "${r}" is not found.`);return}let y={x:x.x,y:x.y};switch(c){case "up":y.y=-x.height;break;case "down":y.y=u.height+x.height;break;case "left":y.x=-x.width;break;case "right":y.x=u.width+x.width;break}tickers$1.pause({canvasAlias:r});let m=u.animate(r,y,{...T,aliasToRemoveAfter:p,completeOnContinue:d},a),l=te(r,x,c,P,{...T,completeOnContinue:d},a);return ue([m,l])}yi.moveOut=H;async function X(r,i,a={},c){let{direction:d="right",completeOnContinue:p=true,tickerIdToResume:P=[],aliasToRemoveAfter:T=[],...x}=a,y=[],m;i||(i=r),typeof P=="string"&&(P=[P]),typeof T=="string"&&(T=[T]);let l,h=u.find(r);h&&(l=`${r}_temp_zoom`,u.editAlias(r,l),h instanceof q||h instanceof J?m=h.positionInfo:m={x:h.x,y:h.y,type:"pixel"}),i=e(r,i,{zIndex:h?h.parent?.getChildIndex(h):void 0}),h?.parent?.setChildIndex(h,h.parent.getChildIndex(h)-.1),l&&u.copyCanvasElementProperty(l,r),l&&tickers$1.transfer(l,r,"move"),m||(i instanceof q||i instanceof J?m=i.positionInfo:m={x:i.x,y:i.y,type:"pixel"});let C={x:i.pivot.x,y:i.pivot.y},E={x:i.scale.x,y:i.scale.y};if(l)if(a.removeOldComponentWithZoomOut){let ne=Z(l,{...a,autoplay:false,completeOnContinue:p},c);ne&&(y.push(...ne),P.push(...ne));}else T.push(l);(i instanceof q||i instanceof J)&&i.haveEmptyTexture&&await i.load(),d==="up"?(i.pivot.y=u.height-i.y,i.pivot.x=u.width/2-i.x,i.y=u.height,i.x=u.width/2):d==="down"?(i.pivot.y=0-i.y,i.pivot.x=u.width/2-i.x,i.y=0,i.x=u.width/2):d==="left"?(i.pivot.x=u.width-i.x,i.pivot.y=u.height/2-i.y,i.x=u.width,i.y=u.height/2):d==="right"&&(i.pivot.x=0-i.x,i.pivot.y=u.height/2-i.y,i.x=0,i.y=u.height/2),i.pivot=b.getPointBySuperPoint(i.pivot,i.angle),i.scale.set(0);let B=tickers$1.pause({canvasAlias:r});P.push(...B);let z=u.animate(r,{pivotX:C.x,pivotY:C.y,scaleX:E.x,scaleY:E.y,...t(m)},{...x,tickerIdToResume:P,aliasToRemoveAfter:T,completeOnContinue:p},c);if(z&&y.push(z),y.length>0)return y}yi.zoomIn=X;function Z(r,i={},a){let{direction:c="right",completeOnContinue:d=true,aliasToRemoveAfter:p=[],...P}=i;typeof p=="string"&&(p=[p]),p.push(r);let T=u.find(r);if(!T){e$1.warn(`The canvas component "${r}" is not found.`);return}let x={x:T.x,y:T.y},y={x:T.pivot.x,y:T.pivot.y};c==="down"?(x.y=u.height,x.x=u.width/2,y.y=u.height-x.y,y.x=u.width/2-x.x):c==="up"?(x.y=0,x.x=u.width/2,y.y=0-x.y,y.x=u.width/2-x.x):c==="right"?(x.x=u.width,x.y=u.height/2,y.x=u.width-x.x,y.y=u.height/2-x.y):c==="left"&&(x.x=0,x.y=u.height/2,y.x=0-x.x,y.y=u.height/2-x.y),y=b.getPointBySuperPoint(y,T.angle),tickers$1.pause({canvasAlias:r});let m=u.animate(r,{...x,pivotX:y.x,pivotY:y.y,scaleX:0,scaleY:0},{...P,aliasToRemoveAfter:p,completeOnContinue:d},a);if(m)return [m]}yi.zoomOut=Z;async function Xe(r,i,a={},c){let{direction:d="right",completeOnContinue:p=true,tickerIdToResume:P=[],motionBlur:T,...x}=a,y=[],m;i||(i=r),typeof P=="string"&&(P=[P]);let l,h=u.find(r);switch(h&&(l=`${r}_temp_push`,u.editAlias(r,l),h instanceof q||h instanceof J?m=h.positionInfo:m={x:h.x,y:h.y,type:"pixel"}),i=e(r,i,{zIndex:h?h.parent?.getChildIndex(h):void 0}),h?.parent?.setChildIndex(h,h.parent.getChildIndex(h)-.1),l&&u.copyCanvasElementProperty(l,r),l&&tickers$1.transfer(l,r,"move"),m||((i instanceof q||i instanceof J)&&i.haveEmptyTexture?m=i.positionInfo:m={x:i.x,y:i.y,type:"pixel"}),(i instanceof q||i instanceof J)&&i.haveEmptyTexture&&await i.load(),d){case "up":i.y=u.height+i.height;break;case "down":i.y=-i.height;break;case "left":i.x=u.width+i.width;break;case "right":i.x=-i.width;break}let C=tickers$1.pause({canvasAlias:r});if(P.push(...C),l){let z=O(l,{...a,direction:d,completeOnContinue:p});z&&y.push(...z);}let E=u.animate(r,t(m),{...x,tickerIdToResume:P,completeOnContinue:p},c);E&&y.push(E);let B=te(r,i,d,T,{...x,completeOnContinue:p},c);if(B&&y.push(B),y.length>0)return y}yi.pushIn=Xe;function O(r,i={direction:"right"},a){return H(r,i,a)}yi.pushOut=O;async function K(r,i,a={},c){let{angle:d,direction:p="right",invert:P=false,duration:T,delay:x,ease:y,completeOnContinue:m=true}=a,{aliasToRemoveAfter:l=[]}=a;i||(i=r),typeof l=="string"&&(l=[l]);let{component:h,oldComponentAlias:C}=s(r,i,"wipe");C&&l.push(C),(h instanceof q||h instanceof J)&&h.haveEmptyTexture&&await h.load();let E={kind:"wipe",angle:d??o(p),invert:P,bounds:Oe(h)},B=g(r,{config:E,apply:(z,ne,re)=>Pt(z,E,ne,re),from:0,to:1,duration:T,delay:x,ease:y,completeOnContinue:m,aliasToRemoveAfter:l},c);if(B)return [B]}yi.wipeIn=K;function V(r,i={},a){let{angle:c,direction:d="right",invert:p=false,duration:P,delay:T,ease:x,completeOnContinue:y=true}=i,{aliasToRemoveAfter:m=[]}=i;typeof m=="string"&&(m=[m]),m.push(r);let l=u.find(r);if(!l){e$1.warn(`The canvas component "${r}" is not found.`);return}let h={kind:"wipe",angle:c??o(d),invert:p,bounds:Oe(l)},C=g(r,{config:h,apply:(E,B,z)=>Pt(E,h,B,z),from:1,to:0,duration:P,delay:T,ease:x,completeOnContinue:y,aliasToRemoveAfter:m},a);if(C)return [C]}yi.wipeOut=V;async function M(r,i,a={},c){let{origin:d={},aspect:p=1,invert:P=false,duration:T,delay:x,ease:y,completeOnContinue:m=true}=a,{aliasToRemoveAfter:l=[]}=a;i||(i=r),typeof l=="string"&&(l=[l]);let{component:h,oldComponentAlias:C}=s(r,i,"iris");C&&l.push(C),(h instanceof q||h instanceof J)&&h.haveEmptyTexture&&await h.load();let E={kind:"iris",originX:d.x??.5,originY:d.y??.5,aspect:p,invert:P,bounds:Oe(h)},B=g(r,{config:E,apply:(z,ne,re)=>vt(z,E,ne,re),from:0,to:1,duration:T,delay:x,ease:y,completeOnContinue:m,aliasToRemoveAfter:l},c);if(B)return [B]}yi.irisIn=M;function k(r,i={},a){let{origin:c={},aspect:d=1,invert:p=false,duration:P,delay:T,ease:x,completeOnContinue:y=true}=i,{aliasToRemoveAfter:m=[]}=i;typeof m=="string"&&(m=[m]),m.push(r);let l=u.find(r);if(!l){e$1.warn(`The canvas component "${r}" is not found.`);return}let h={kind:"iris",originX:c.x??.5,originY:c.y??.5,aspect:d,invert:p,bounds:Oe(l)},C=g(r,{config:h,apply:(E,B,z)=>vt(E,h,B,z),from:1,to:0,duration:P,delay:T,ease:x,completeOnContinue:y,aliasToRemoveAfter:m},a);if(C)return [C]}yi.irisOut=k;async function U(r,i,a={},c){let{orientation:d="vertical",origin:p=.5,invert:P=false,duration:T,delay:x,ease:y,completeOnContinue:m=true}=a,{aliasToRemoveAfter:l=[]}=a;i||(i=r),typeof l=="string"&&(l=[l]);let{component:h,oldComponentAlias:C}=s(r,i,"split");C&&l.push(C),(h instanceof q||h instanceof J)&&h.haveEmptyTexture&&await h.load();let E={kind:"split",orientation:d,origin:p,invert:P,bounds:Oe(h)},B=g(r,{config:E,apply:(z,ne,re)=>It(z,E,ne,re),from:0,to:1,duration:T,delay:x,ease:y,completeOnContinue:m,aliasToRemoveAfter:l},c);if(B)return [B]}yi.splitIn=U;function $(r,i={},a){let{orientation:c="vertical",origin:d=.5,invert:p=false,duration:P,delay:T,ease:x,completeOnContinue:y=true}=i,{aliasToRemoveAfter:m=[]}=i;typeof m=="string"&&(m=[m]),m.push(r);let l=u.find(r);if(!l){e$1.warn(`The canvas component "${r}" is not found.`);return}let h={kind:"split",orientation:c,origin:d,invert:p,bounds:Oe(l)},C=g(r,{config:h,apply:(E,B,z)=>It(E,h,B,z),from:1,to:0,duration:P,delay:T,ease:x,completeOnContinue:y,aliasToRemoveAfter:m},a);if(C)return [C]}yi.splitOut=$;async function j(r,i,a={},c){let{strength:d=32,quality:p=4,duration:P,delay:T,ease:x,completeOnContinue:y=true,fadeComponent:m=true}=a,{aliasToRemoveAfter:l=[]}=a;i||(i=r),typeof l=="string"&&(l=[l]);let{component:h,oldComponentAlias:C}=s(r,i,"blur");C&&l.push(C),(h instanceof q||h instanceof J)&&h.haveEmptyTexture&&await h.load();let E=P??1;m&&I(r,h,"in",E,c);let B=new filters.BlurFilter({strength:d,quality:p}),z=ee(r,h,B,{strength:[d,0]},{duration:E,delay:T,ease:x,completeOnContinue:y,aliasToRemoveAfter:l},c);if(z)return [z]}yi.blurIn=j;function L(r,i={},a){let{strength:c=32,quality:d=4,duration:p,delay:P,ease:T,completeOnContinue:x=true,fadeComponent:y=true}=i,{aliasToRemoveAfter:m=[]}=i;typeof m=="string"&&(m=[m]),m.push(r);let l=u.find(r);if(!l){e$1.warn(`The canvas component "${r}" is not found.`);return}let h=p??1;y&&I(r,l,"out",h,a);let C=new filters.BlurFilter({strength:0,quality:d}),E=ee(r,l,C,{strength:[0,c]},{duration:h,delay:P,ease:T,completeOnContinue:x,aliasToRemoveAfter:m},a);if(E)return [E]}yi.blurOut=L;async function D(r,i,a={},c){let{pixelSize:d=32,duration:p,delay:P,ease:T,completeOnContinue:x=true,fadeComponent:y=false}=a,{aliasToRemoveAfter:m=[]}=a;i||(i=r),typeof m=="string"&&(m=[m]);let{component:l,oldComponentAlias:h}=s(r,i,"pixelate");h&&m.push(h),(l instanceof q||l instanceof J)&&l.haveEmptyTexture&&await l.load();let C=p??1;y&&I(r,l,"in",C,c);let E=new filters.PixelateFilter(d),B=ee(r,l,E,{sizeX:[d,1],sizeY:[d,1]},{duration:C,delay:P,ease:T,completeOnContinue:x,aliasToRemoveAfter:m},c);if(B)return [B]}yi.pixelateIn=D;function W(r,i={},a){let{pixelSize:c=32,duration:d,delay:p,ease:P,completeOnContinue:T=true,fadeComponent:x=false}=i,{aliasToRemoveAfter:y=[]}=i;typeof y=="string"&&(y=[y]),y.push(r);let m=u.find(r);if(!m){e$1.warn(`The canvas component "${r}" is not found.`);return}let l=d??1;x&&I(r,m,"out",l,a);let h=new filters.PixelateFilter(1),C=ee(r,m,h,{sizeX:[1,c],sizeY:[1,c]},{duration:l,delay:p,ease:P,completeOnContinue:T,aliasToRemoveAfter:y},a);if(C)return [C]}yi.pixelateOut=W;async function Y(r,i,a={},c){let{color:d=16777215,maxAlpha:p=1,duration:P=.3,holdDuration:T=0,pulses:x=1,completeOnContinue:y=true,fadeComponent:m=true,...l}=a;i||(i=r);let h=u.find(r);if(h){let z=N(r,h,i,{color:d,maxAlpha:p,fadeDuration:P,holdDuration:T,pulses:x,completeOnContinue:y,rest:l,priority:c});return z||void 0}let{component:C}=s(r,i,"flash");(C instanceof q||C instanceof J)&&C.haveEmptyTexture&&await C.load(),m&&I(r,C,"in",P,c);let E=[],B=Q(C,{color:d,maxAlpha:p,fadeDuration:P,holdDuration:T,pulses:x,completeOnContinue:y,aliasToRemoveAfter:[],rest:l,priority:c});if(B&&E.push(B),E.length>0)return E}yi.flashIn=Y;function F(r,i={},a){let{color:c=16777215,maxAlpha:d=1,duration:p=.3,holdDuration:P=0,pulses:T=1,completeOnContinue:x=true,fadeComponent:y=true,...m}=i,l=u.find(r);if(!l){e$1.warn(`The canvas component "${r}" is not found.`);return}if(y){let{total:C}=R(d,p,P,T);I(r,l,"out",C,a);}let h=Q(l,{color:c,maxAlpha:d,fadeDuration:p,holdDuration:P,pulses:T,completeOnContinue:x,aliasToRemoveAfter:[r],rest:m,priority:a});if(h)return [h]}yi.flashOut=F;function G(r,i,a=0){let c=r.getBounds(),d=new me,p=new be.Graphics;p.rect(0,0,c.width,c.height).fill(i),d.addChild(p),d.position.set(c.x,c.y),d.alpha=a;let P=`${r.label}_flash_${Math.random().toString(36).slice(2)}`;return u.add(P,d,{zIndex:(r.zIndex??0)+1}),P}function Q(r,i){let a=G(r,i.color),{values:c,times:d,total:p}=R(i.maxAlpha,i.fadeDuration,i.holdDuration,i.pulses,i.endAtPeak??false),P=[...i.aliasToRemoveAfter,a];return u.animate(a,{alpha:c},{...i.rest,duration:p,times:d,aliasToRemoveAfter:P,completeOnContinue:i.completeOnContinue},i.priority)}function N(r,i,a,c){let d=G(i,c.color),{values:p,times:P,total:T}=R(c.maxAlpha,c.fadeDuration,c.holdDuration,c.pulses,true),x=u.animate(d,{alpha:p},{...c.rest,duration:T,times:P,completeOnContinue:false},c.priority);if(setTimeout(()=>{(async()=>{let{component:y,oldComponentAlias:m}=s(r,a,"flash");u.remove(m?[d,m]:[d]),(y instanceof q||y instanceof J)&&y.haveEmptyTexture&&await y.load();let l=G(y,c.color,c.maxAlpha);u.animate(l,{alpha:[c.maxAlpha,0]},{...c.rest,duration:c.fadeDuration,aliasToRemoveAfter:[l],completeOnContinue:c.completeOnContinue},c.priority);})();},T*1e3),x)return [x]}function te(r,i,a,c,d,p){if(!c)return;let P=c===true?40:c,T=a==="up"||a==="down"?"velocityY":"velocityX",x=a==="up"||a==="left"?-1:1,y=new filters.MotionBlurFilter({velocity:{x:0,y:0},kernelSize:15});return ee(r,i,y,{[T]:[0,x*P,0]},{duration:d.duration??.3,delay:d.delay,ease:d.ease,completeOnContinue:d.completeOnContinue,autoplay:d.autoplay},p)}function ue(r){let i=r.filter(a=>!!a);return i.length>0?i:void 0}async function ce(r,i,a,c,d,p,P){let{duration:T,delay:x,ease:y,completeOnContinue:m=true,fadeComponent:l=d}=c,{aliasToRemoveAfter:h=[]}=c;typeof h=="string"&&(h=[h]);let{component:C,oldComponentAlias:E}=s(r,i??r,a);E&&h.push(E),(C instanceof q||C instanceof J)&&C.haveEmptyTexture&&await C.load();let B=T??1;return l&&I(r,C,"in",B,p),ue(P(C,{duration:B,delay:x,ease:y,completeOnContinue:m},h))}function Ie(r,i,a,c,d){let{duration:p,delay:P,ease:T,completeOnContinue:x=true,fadeComponent:y=a}=i,{aliasToRemoveAfter:m=[]}=i;typeof m=="string"&&(m=[m]),m.push(r);let l=u.find(r);if(!l){e$1.warn(`The canvas component "${r}" is not found.`);return}let h=p??1;return y&&I(r,l,"out",h,c),ue(d(l,{duration:h,delay:P,ease:T,completeOnContinue:x},m))}function Tt(r){let{width:i,height:a}=r.getBounds();return Math.hypot(i,a)/2}function $e(r){return {x:r?.x??.5,y:r?.y??.5}}function Ct(r,i,a,c,d,p,P){let{strength:T=40,bursts:x=3,slices:y=8,rgbSplit:m=6}=c,l=B=>{let z=Ue(B,.5,x);return a==="in"?z:z.reverse()},h={...d,ease:d.ease??"linear"},C=new filters.GlitchFilter({slices:y,offset:0});C.refresh(),C.padding=Math.ceil(Math.abs(T));let E=[ee(r,i,C,{offset:l(T)},{...h,aliasToRemoveAfter:p},P)];if(m!==0){let B=l(m),z=new filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});z.padding=Math.ceil(Math.abs(m)),E.push(ee(r,i,z,{redX:B,blueX:B.map(ne=>-ne)},h,P));}return E}async function ii(r,i,a={},c){return ce(r,i,"glitch",a,true,c,(d,p,P)=>Ct(r,d,"in",a,p,P,c))}yi.glitchIn=ii;function ri(r,i={},a){return Ie(r,i,true,a,(c,d,p)=>Ct(r,c,"out",i,d,p,a))}yi.glitchOut=ri;function bt(r,i,a,c,d,p,P){let{angle:T=540,radius:x=Tt(i),origin:y}=c,m=$e(y),l=T*Math.PI/180,h=a==="in"?[l,0]:[0,l],C=new filters.TwistFilter({radius:x,angle:h[0]}),{width:E,height:B}=i.getBounds();C.padding=Math.max(C.padding,gt({x:m.x*E,y:m.y*B},x,E,B));let z=ee(r,i,C,{angle:h},{...d,aliasToRemoveAfter:p},P),{x:ne,y:re}=ve(i,m);return C.offsetX=ne,C.offsetY=re,[z]}async function si(r,i,a={},c){return ce(r,i,"twist",a,true,c,(d,p,P)=>bt(r,d,"in",a,p,P,c))}yi.twistIn=si;function oi(r,i={},a){return Ie(r,i,true,a,(c,d,p)=>bt(r,c,"out",i,d,p,a))}yi.twistOut=oi;function wt(r,i,a,c,d,p,P){let{strength:T=.6,origin:x}=c,y=$e(x),m=a==="in"?[T,0]:[0,T],l=new filters.ZoomBlurFilter({center:{x:0,y:0},strength:m[0]}),{width:h,height:C}=i.getBounds();l.padding=et({x:y.x*h,y:y.y*C},T,h,C);let E=ee(r,i,l,{strength:m},{...d,aliasToRemoveAfter:p},P),{x:B,y:z}=ve(i,y);return l.center={x:B,y:z},[E]}async function ai(r,i,a={},c){return ce(r,i,"warp",a,true,c,(d,p,P)=>wt(r,d,"in",a,p,P,c))}yi.warpIn=ai;function ci(r,i={},a){return Ie(r,i,true,a,(c,d,p)=>wt(r,c,"out",i,d,p,a))}yi.warpOut=ci;function At(r,i,a,c,d,p){let{origin:P,amplitude:T=30,wavelength:x=160,speed:y=500}=a,m=$e(P),{width:l,height:h}=i.getBounds(),C=new filters.ShockwaveFilter({center:{x:0,y:0},amplitude:T,wavelength:x,speed:y,time:0});C.padding=Math.ceil(Math.abs(T)*1.25);let E=tt({x:m.x*l,y:m.y*h},{width:l,height:h},x,-1)/y,B=ee(r,i,C,{time:[0,E]},{...c,aliasToRemoveAfter:d},p),{x:z,y:ne}=ve(i,m);return C.center={x:z,y:ne},[B]}async function di(r,i,a={},c){return ce(r,i,"ripple",a,true,c,(d,p,P)=>At(r,d,a,p,P,c))}yi.rippleIn=di;function ui(r,i={},a){return Ie(r,i,true,a,(c,d,p)=>At(r,c,i,d,p,a))}yi.rippleOut=ui;function St(r,i,a,c,d,p,P){let{edge:T="hard",noiseScale:x=8,seed:y=Math.random()*1e3}=c,[m,l]=T==="hard"?[.25,.75]:[0,1],h=a==="in"?[m,l]:[l,m],C=new filters.SimplexNoiseFilter({strength:h[0],noiseScale:x,offsetZ:y,step:T==="hard"?.5:0});return [ee(r,i,C,{strength:h},{...d,aliasToRemoveAfter:p},P)]}async function pi(r,i,a={},c){return ce(r,i,"noise",a,false,c,(d,p,P)=>St(r,d,"in",a,p,P,c))}yi.noiseDissolveIn=pi;function fi(r,i={},a){return Ie(r,i,false,a,(c,d,p)=>St(r,c,"out",i,d,p,a))}yi.noiseDissolveOut=fi;function Ot(r,i,a,c,d,p,P){let{lineThickness:T=.02,brightness:x=3,scanlines:y=true}=c,m=i.scale.x,l=i.scale.y,h=l*T,C=a==="in"?[0,.45,1]:[0,.55,1],E=a==="in"?[0,m,m]:[m,m,0],B=a==="in"?[h,h,l]:[l,h,h],z=a==="in"?[x,x,1]:[1,x,x];a==="in"&&i.scale.set(0,h);let ne=[u.animate(r,{scaleX:E,scaleY:B},{duration:d.duration,delay:d.delay,ease:d.ease,times:C,completeOnContinue:d.completeOnContinue,aliasToRemoveAfter:p},P),ee(r,i,new filters.AdjustmentFilter({brightness:z[0]}),{brightness:z},{...d,times:C},P)];if(y){let re=a==="in"?[.5,.5,0]:[0,.5,.5];ne.push(ee(r,i,new filters.CRTFilter({curvature:0,vignettingAlpha:0,lineWidth:3,lineContrast:re[0],noise:re[0]}),{lineContrast:re,noise:re},{...d,times:C},P));}return ne}async function li(r,i,a={},c){return ce(r,i,"tv",a,false,c,(d,p,P)=>Ot(r,d,"in",a,p,P,c))}yi.tvIn=li;function hi(r,i={},a){return Ie(r,i,false,a,(c,d,p)=>Ot(r,c,"out",i,d,p,a))}yi.tvOut=hi;function Et(r,i,a,c,d,p,P){let{strength:T=1,mode:x="pinch",radius:y=Tt(i),origin:m}=c,l=(x==="bulge"?1:-1)*T,h=$e(m),C=a==="in"?[l,0]:[0,l],E=new filters.BulgePinchFilter({center:h,radius:y,strength:C[0]});if(x==="bulge"){let{width:Mt,height:_t}=i.getBounds();E.padding=gt({x:h.x*Mt,y:h.y*_t},y,Mt,_t);}let B=ee(r,i,E,{strength:C},{...d,aliasToRemoveAfter:p},P),{x:z,y:ne,area:re}=ve(i,h);return E.center={x:z/re.width,y:ne/re.height},[B]}async function gi(r,i,a={},c){return ce(r,i,"pinch",a,true,c,(d,p,P)=>Et(r,d,"in",a,p,P,c))}yi.pinchIn=gi;function mi(r,i={},a){return Ie(r,i,true,a,(c,d,p)=>Et(r,c,"out",i,d,p,a))}yi.pinchOut=mi;})(le||={});var We=class extends me{constructor(n){super(n);this._memory=n;this.pixivnId=n.pixivnId;}_memory;pixivnId;get memory(){return {...this._memory,...super.memory,elements:[],pixivnId:this.pixivnId}}};function Jn(){return async(e,n)=>{try{let s=e.canvasElementInfo;if(s){let o=new We(s),g=s.zIndex;o.groupColor=16711680;let I=new be.Graphics;I.rect(0,0,300,100).fill({color:16711680,alpha:.5}),o.addChild(I);let R=new be.Text({text:`Error: ${s.label}`,x:10,y:10});o.addChild(R);let _=e.parent;if(_&&"addChild"in _)g!==void 0?_.addChildAt(o,g):_.addChild(o);else {let f=s.parentLabel?u.find(s.parentLabel):void 0;if(f)g!==void 0?f.addChildAt(o,g):f.addChild(o);else {let v=s.label??s.pixivnId;u.add(v,o,{zIndex:g});}}}}catch{}}}function Qn(t,e,n){let s={...u.find(t)?.memory,...n},o=new Se({text:e,...n});return s&&u.copyCanvasElementProperty(s,o),u.add(t,o,{ignoreOldStyle:true,zIndex:n?.zIndex}),o}var {Assets:vo,Color:Io,Rectangle:To,TextStyle:Co,Texture:bo,UPDATE_PRIORITY:wo}=be,u=new Ye;oe.init({getScreen:()=>u.screen});GameUnifier.addOnPreContinue(async()=>{try{let{tikersIds:t,stepAlias:e}=drainCompleteOnStepEndQueue(),n=(async()=>{for(;t.length;){let{id:o}=t.pop()||{};o&&await tickers$1.forceCompletion(o);}})(),s=(async()=>{for(;e.length;){let{alias:o,id:g}=e.pop()||{};o&&g&&await tickers$1.forceCompletion(g,o);}})();await Promise.all([n,s]);}catch{}});
|
|
2
|
-
export{
|
|
1
|
+
import'./chunk-JMOSOAGB.mjs';import {a,e as e$2,d as d$2,b as b$1,c as c$1}from'./chunk-XLRCR56W.mjs';import {e,d as d$1,g,b,c,f as f$1,a as a$1}from'./chunk-HD353M4B.mjs';import {a as a$2}from'./chunk-S7HZUIEI.mjs';import {d,e as e$1}from'./chunk-AW5XWF24.mjs';import {GameUnifier,PixiError}from'@drincs/pixi-vn/core';import we,{Container,Graphics}from'@drincs/pixi-vn/pixi.js';import {drainCompleteOnStepEndQueue,tickers as tickers$1,removeTicker,TickersManagerStatic,RegisteredTickers,runTickersSequence}from'@drincs/pixi-vn/tickers';export*from'@drincs/pixi-vn/tickers';import {initDevtools}from'@pixi/devtools';import {RegisteredFilters,filters}from'@drincs/pixi-vn/filters';var un={extension:{type:"sceneProperties",name:"additional-positions"},testNode(t){return "xAlign"in t||"yAlign"in t||"percentageX"in t||"percentageY"in t||"positionType"in t},testProp(t){switch(t){case "xAlign":case "yAlign":case "percentageX":case "percentageY":case "positionType":return true;default:return false}},setProperty(t,e,i){switch(e){case "xAlign":"xAlign"in t&&(t.xAlign=i/100);break;case "yAlign":"yAlign"in t&&(t.yAlign=i/100);break;case "percentageX":"percentageX"in t&&(t.percentageX=i/100);break;case "percentageY":"percentageY"in t&&(t.percentageY=i/100);break}},getProperties(t){return [{value:t.positionType,prop:"positionType",entry:{section:"Transform",type:"text",label:"Position Type"}},{value:t.xAlign*100,prop:"xAlign",entry:{section:"Transform",type:"range",label:"X Align",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.yAlign*100,prop:"yAlign",entry:{section:"Transform",type:"range",label:"Y Align",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}},{value:t.percentageX*100,prop:"percentageX",entry:{section:"Transform",type:"range",label:"X Percentage Position",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.percentageY*100,prop:"percentageY",entry:{section:"Transform",type:"range",label:"Y Percentage Position",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}}]}},Yt=un;function zt(t,e){let i=0;return async(...s)=>{let a=Date.now();if(a-i>=e)return i=a,await t(...s)}}var ie=class t{constructor(){}static _app=void 0;static get app(){if(!t._app)throw e$1.error("The canvas is not initialized"),new PixiError("invalid_usage","CanvasManagerStatic.app is undefined");return t._app}static get gameLayer(){let e=t.app.stage.getChildByLabel(a$1);return e||(e=new we.Container,e.label=a$1,t.app.stage.addChild(e)),e}static htmlLayers=[];static canvasWidth=300;static canvasHeight=300;static _isInitialized=false;static async init(e,i,s){let{id:a="pixi-vn-canvas",width:p=800,height:y=600,resolution:R=1,autoDensity:S=true,resizeMode:l="contain",...v}=i||{};return t.canvasWidth=p,t.canvasHeight=y,t._app=new we.Application,t.app.init({width:p,height:y,resolution:R,autoDensity:S,...v}).then(()=>{let{app:A=t.app,extensions:b=[],...U}=s||{};if(initDevtools({app:A,extensions:[Yt,...b],...U}),t._isInitialized=true,t.addCanvasIntoHTMLElement(e,a),l==="contain"){let z=zt(async()=>{requestAnimationFrame(()=>t.resize());},10);new ResizeObserver(z).observe(e),t.resize(),setTimeout(()=>t.resize(),750);}t.gameLayer;})}static addCanvasIntoHTMLElement(e,i){t._isInitialized?(e.appendChild(t.app.canvas),t.app.canvas.id=i):e$1.error("GameWindowManager is not initialized");}static addHtmlLayer(e,i,s={}){let{position:a="absolute",pointerEvents:p="none",userSelect:y="none"}=s,R=document.createElement("div");R.setAttribute("id",e),R.style.position=a,R.style.pointerEvents=p,R.style.userSelect=y;let S=i.appendChild(R);return t.htmlLayers.push(R),t.resize(),S}static removeHtmlLayer(e){let i=t.htmlLayers.find(s=>s.id===e);i&&(i.remove(),t.htmlLayers=t.htmlLayers.filter(s=>s.id!==e));}static getHtmlLayer(e){return t.htmlLayers.find(i=>i.id===e)}static async resize(){let e=t.canvasWidth,i=t.canvasHeight,s=t.app.resizeTo,a=t.app.canvas.style;s instanceof HTMLElement||(s=document.documentElement);let p,y;if(s===document.body||s===document.documentElement)p=document.documentElement.clientWidth||window.innerWidth,y=document.documentElement.clientHeight||window.innerHeight;else {let b=s.getBoundingClientRect();p=b.width||s.clientWidth,y=b.height||s.clientHeight;}let R=Math.min(p/e,y/i),S=Math.floor(R*e),l=Math.floor(R*i);a.width=`${S}px`,a.height=`${l}px`;let v=(p-S)/2,A=(y-l)/2;a.marginLeft=`${v}px`,a.marginRight=`${v}px`,a.marginTop=`${A}px`,a.marginBottom=`${A}px`,t.htmlLayers.forEach(b=>{b.style.width=`${S}px`,b.style.height=`${l}px`,b.style.marginLeft=`${v}px`,b.style.marginRight=`${v}px`,b.style.marginTop=`${A}px`,b.style.marginBottom=`${A}px`;});}static get childrenAliasesOrder(){return t.gameLayer.children.filter(e=>e.label).sort((e,i)=>t.gameLayer.getChildIndex(e)-t.gameLayer.getChildIndex(i)).map(e=>e.label)}};var gt=Symbol("SerializableEvent"),Ye=new d({cacheSize:5});function pn(t){return (e,i,s)=>{let a=s.value;mt.add(a,t||`${i}`);}}var mt;(p=>{function t(y,R){y[gt]=R,Ye.get(R)&&e$1.info(`Event "${R}" already exists, it will be overwritten`),Ye.set(R,y);}p.add=t;function e(y){try{let R=Ye.get(y);if(!R){e$1.error(`Event "${y}" not found, did you forget to register it with the eventDecorator?`);return}return R}catch(R){e$1.error(`Error while getting Event "${y}"`,R);return}}p.get=e;function i(){return Array.from(Ye.values())}p.values=i;function s(y){return Ye.has(y)}p.has=s;function a(){return Array.from(Ye.keys())}p.keys=a;})(mt||={});var yt=mt;async function Wt(t,e){if("onEvents"in e)for(let i in e.onEvents){let s=e.onEvents[i],a=yt.get(s);a&&t.on(i,a);}}function Ut(t){let{onEventsHandlers:e={}}=t;return e}function Oe(t,e,i){let s=i[gt];return s&&typeof s=="string"?(e.onEventsHandlers[t]=s,true):(e$1.warn(`The event handler for event "${t}" is not registered with the eventDecorator, it will not be saved in the memory and it will not work after loading the game. Please register the event handler with the eventDecorator to avoid this warning. Read more about it here: https://pixi-vn.com/start/canvas-functions#add-a-listener-to-an-event`),false)}var ze=new d({cacheSize:5}),Xt=new d({cacheSize:2}),$t=new d({cacheSize:2});function gn(t={}){return e=>{xt.add(e,t);}}async function le(t,e,i){let s=i?.ignoreScale||false,a=i?.end;if("isRenderGroup"in e&&e.isRenderGroup!==void 0&&(t.isRenderGroup=e.isRenderGroup),"blendMode"in e&&e.blendMode!==void 0&&(t.blendMode=e.blendMode),"tint"in e&&e.tint!==void 0&&(t.tint=e.tint),"alpha"in e&&e.alpha!==void 0&&(t.alpha=e.alpha),"angle"in e&&e.angle!==void 0&&(t.angle=e.angle),"renderable"in e&&e.renderable!==void 0&&(t.renderable=e.renderable),"rotation"in e&&e.rotation!==void 0&&(t.rotation=e.rotation),!s&&"scale"in e&&e.scale!==void 0&&(typeof e.scale=="number"?t.scale.set(e.scale,e.scale):t.scale.set(e.scale.x,e.scale.y)),"pivot"in e&&e.pivot!==void 0&&(typeof e.pivot=="number"?t.pivot.set(e.pivot,e.pivot):t.pivot.set(e.pivot.x,e.pivot.y)),"position"in e&&e.position!==void 0&&t.position.set(e.position.x,e.position.y),"skew"in e&&e.skew!==void 0&&t.skew.set(e.skew.x,e.skew.y),"visible"in e&&e.visible!==void 0&&(t.visible=e.visible),"x"in e&&e.x!==void 0&&(t.x=e.x),"y"in e&&e.y!==void 0&&(t.y=e.y),"boundsArea"in e&&e.boundsArea!==void 0&&(t.boundsArea=e.boundsArea),"cursor"in e&&e.cursor!==void 0&&(t.cursor=e.cursor),"eventMode"in e&&e.eventMode!==void 0&&(t.eventMode=e.eventMode),"interactive"in e&&e.interactive!==void 0&&(t.interactive=e.interactive),"interactiveChildren"in e&&e.interactiveChildren!==void 0&&(t.interactiveChildren=e.interactiveChildren),"hitArea"in e&&e.hitArea!==void 0&&(t.hitArea=e.hitArea),Wt(t,e),"pixivnFilters"in e&&e.pixivnFilters!==void 0){let p=e.pixivnFilters.map(y=>RegisteredFilters.getInstance(y.filterId,y.args,y.padding)).filter(y=>!!y);t.filters=p.length>0?p:null;}"align"in e&&e.align!==void 0&&"align"in t&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&"percentagePosition"in t&&(t.percentagePosition=e.percentagePosition),a&&await a(),s||("width"in e&&e.width!==void 0&&(t.width=e.width),"height"in e&&e.height!==void 0&&(t.height=e.height));}var xt;(R=>{function t(S,l={}){let{name:v=S.name,getInstance:A=async(U,z)=>{let te=new U;return await te.setMemory(z),te},copyProperty:b=async(U,z)=>{await U.setMemory(z);}}=l;ze.get(v)&&e$1.warn(`CanvasElement "${v}" already registered`),S.prototype.pixivnId=v,ze.set(v,S),Xt.set(v,A),$t.set(v,b);}R.add=t;function e(S){let l=ze.get(S);if(!l){e$1.error(`CanvasElement "${S}" not found, did you forget to register it with the canvasComponentDecorator?`);return}return l}R.get=e;async function i(S,l){let v=e(S),A=Xt.get(S);if(!v||!A){e$1.error(`CanvasElement "${S}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{return await A(v,l)}catch(b){e$1.error(`Error while getting CanvasElement instance "${S}"`,b);}}R.getInstance=i;async function s(S,l,v){let A=$t.get(S);if(!A){e$1.error(`CanvasElement "${S}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{await A(l,v);}catch(b){e$1.error(`Error while copying properties of CanvasElement "${S}"`,b);}}R.copyProperty=s;function a(){return Array.from(ze.values())}R.values=a;function p(S){return ze.has(S)}R.has=p;function y(){return Array.from(ze.keys())}R.keys=y;})(xt||={});var de=xt;async function et(t){let e=await de.getInstance(t.pixivnId,t);if(!e)throw new PixiError("unregistered_element",`The element ${t.pixivnId} could not be created`,"canvas",t);return e}function vt(t){return "memory"in t?t.memory:t instanceof we.Text?Tt(t):t instanceof we.Sprite?It(t):Ae(t)}function xn(t){let e=t.parent;return {width:t.width,height:t.height,isRenderGroup:t.isRenderGroup,blendMode:t.blendMode,tint:t.tint,alpha:t.alpha,angle:t.angle,renderable:t.renderable,rotation:t.rotation,scale:{x:t.scale.x,y:t.scale.y},pivot:{x:t.pivot.x,y:t.pivot.y},position:{x:t.position.x,y:t.position.y},skew:{x:t.skew.x,y:t.skew.y},visible:t.visible,x:t.x,y:t.y,boundsArea:t.boundsArea,cursor:t.cursor,eventMode:t.eventMode,interactive:t.interactive,interactiveChildren:t.interactiveChildren,hitArea:t.hitArea,index:e?.getChildIndex(t),parentLabel:e?.label,label:t.label,pixivnFilters:Pn(t.filters)}}function Pn(t){if(!t)return;let e=Array.isArray(t)?t:[t],i=[];for(let s of e){let a=s.pixivnFilterId;if(!a){e$1.warn("A Filter instance without a registered pixivnFilterId can't be saved and will be skipped. Register it with filterDecorator/RegisteredFilters to make it save-compatible.",s);continue}let p=RegisteredFilters.toMemory(a,s);p&&i.push(p);}return i}function Pt(t,e){return {url:t.source.label,alias:e===t.source.label?void 0:e}}function Ae(t,e){let i=vn(t,b),a=e?.childrenExport||false?t.children.sort((p,y)=>t.getChildIndex(p)-t.getChildIndex(y)).map(p=>vt(p)):[];return {pixivnId:i,elements:a,onEvents:Ut(t),...xn(t)}}function It(t){let e$1=Ae(t),i=e$1.pixivnId??e,s="assetsAliases"in t&&Array.isArray(t.assetsAliases)?Pt(t.texture,t.assetsAliases[0]):"textureAlias"in t?Pt(t.texture,t.textureAlias):Pt(t.texture);return {...e$1,pixivnId:i,textureData:s,anchor:{x:t.anchor.x,y:t.anchor.y},roundPixels:t.roundPixels}}function Tt(t){let e=Ae(t),i=e.pixivnId??f$1;return {...e,pixivnId:i,anchor:{x:t.anchor.x,y:t.anchor.y},text:t.text,resolution:t.resolution,style:bn(t.style),roundPixels:t.roundPixels}}function vn(t,e){return Object.hasOwn(t,"pixivnId")?t.pixivnId:e}function tt(t){switch(t.type){case "linear":return {type:"linear",colorStops:t.colorStops,end:{x:t.end.x,y:t.end.y},start:{x:t.start.x,y:t.start.y},textureSpace:t.textureSpace,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height};case "radial":return {type:"radial",colorStops:t.colorStops,textureSpace:t.textureSpace,center:{x:t.center.x,y:t.center.y},innerRadius:t.innerRadius,outerCenter:{x:t.outerCenter.x,y:t.outerCenter.y},outerRadius:t.outerRadius,rotation:t.rotation,scale:t.scale,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height}}}function In(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof we.FillGradient)return tt(t);if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof we.FillPattern))return tt(t.fill)}}e$1.warn("Unsupported property type for Text.style.fill.",t);}}function Tn(t){if(typeof t=="number")return t;if(typeof t=="string")return t;if(Array.isArray(t))return t;if(t instanceof we.Color)return t.toNumber();e$1.warn("Unsupported color type.",t);}function Cn(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof we.FillGradient)return tt(t);if(typeof t=="object"&&"alignment"in t)return {alignment:t.alignment,alpha:t.alpha,color:Tn(t.color),join:t.join,miterLimit:t.miterLimit,width:t.width,cap:t.cap,pixelLine:t.pixelLine,textureSpace:t.textureSpace};if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof we.FillPattern))return tt(t.fill)}}e$1.warn("Unsupported property type for Text.style.stroke.",t);}}function bn(t){return {align:t.align,breakWords:t.breakWords,dropShadow:t.dropShadow,fill:In(t.fill),fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontVariant:t.fontVariant,fontWeight:t.fontWeight,leading:t.leading,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,padding:t.padding,stroke:Cn(t.stroke),textBaseline:t.textBaseline,trim:t.trim,whiteSpace:t.whiteSpace,wordWrap:t.wordWrap,wordWrapWidth:t.wordWrapWidth}}var Xe=class{tickersPausedByGameLayerRender=[];get app(){return ie.app}get gameLayer(){return ie.gameLayer}get isInitialized(){return ie._isInitialized}get width(){return ie.canvasWidth}get height(){return ie.canvasHeight}get screen(){return this.app.screen}async init(e,i,s){return await ie.init(e,i,s)}get children(){return ie.gameLayer.children}async copyCanvasElementProperty(e,i,s={}){let a=["isRenderGroup","scale","visible","boundsArea","text","resolution","style","height","width"],{ignoreProperties:p=S=>S}=s;if(typeof i=="string"){let S=this.find(i);if(S)i=S;else {e$1.error(`Canvas element ${i} not found`);return}}if(typeof e=="string"){let S=this.find(e);if(S)e=S;else {e$1.error(`Canvas element ${e} not found`);return}}e instanceof we.Container&&(e=e.memory);let y=p(a),R={...e};y.forEach(S=>{S in R&&delete R[S];}),await de.copyProperty(i.pixivnId,i,R);}add(e,i,s={}){if(e===a$1){e$1.error(`The alias ${a$1} is reserved`);return}let a=this.find(e),p=s?.ignoreOldStyle;a&&!p&&this.copyCanvasElementProperty(a,i);let{zIndex:y=a?.parent?.getChildIndex(a)}=s;a&&!this.canvasElementIsOnCanvas(a)?e$1.error(`The canvas element ${e} exist in the memory but it is not on the canvas, so the zIndex is not set`):a&&this.remove(e,{ignoreTickers:true}),y!==void 0?(i.label=e,this.gameLayer.addChildAt(i,y)):(i.label=e,this.gameLayer.addChild(i));}remove(e,i={}){if(e===a$1){e$1.error(`The alias ${a$1} is reserved`);return}let s=i.ignoreTickers;typeof e=="string"&&(e=[e]),e.forEach(a=>{this.gameLayer.getChildrenByLabel(a).forEach(p=>{this.gameLayer.removeChild(p),!s&&tickers$1.unlinkComponent(a);});});}find(e){if(e===a$1)return this.gameLayer;let i=this.gameLayer.getChildByLabel(e);if(i)return i}canvasElementIsOnCanvas(e){return this.gameLayer.children.includes(e)}removeAll(){this.gameLayer.removeChildren();}editAlias(e,i,s={}){let a=this.find(e);a&&(a.label=i),!s.ignoreTickers&&tickers$1.transfer(e,i,"move");}get currentTickers(){return this.tickers.currentTickers}get currentTickersSteps(){return this.tickers.currentTickersSteps}findTicker(e){return tickers$1.find(e)}addTicker(e,i){return tickers$1.add(e,i)}addTickersSequence(e,i,s=0){return tickers$1.addSequence(e,i,s)}onTickerComplete(e,i){return tickers$1.onComplete(e,i)}unlinkComponentFromTicker(e,i){return tickers$1.unlinkComponent(e,i)}removeAllTickers(){return tickers$1.removeAll()}removeTicker(e,i={stopTicker:true}){return removeTicker(e,i)}pauseTicker(e){return tickers$1.pause(e)}resumeTicker(e){return tickers$1.resume(e)}isTickerPaused(e,i){return tickers$1.isPaused(e,i)}pause(){this.gameLayer.renderable!==false&&(this.gameLayer.renderable=false,this.tickersPausedByGameLayerRender=tickers$1.pause({id:Array.from(TickersManagerStatic._currentTickers.keys())}));}resume(){if(this.gameLayer.renderable===true)return;this.gameLayer.renderable=true;let e=this.tickersPausedByGameLayerRender.filter(i=>TickersManagerStatic._currentTickers.has(i));e.length>0&&tickers$1.resume({id:e}),this.tickersPausedByGameLayerRender=[];}transferTickers(e,i,s="move"){return tickers$1.transfer(e,i,s)}completeTickerOnStepEnd(e){return tickers$1.completeOnStepEnd(e)}async forceCompletionOfTicker(e,i){return tickers$1.forceCompletion(e,i)}tickers=tickers$1;animate(e,i,s,a){return GameUnifier.animate(e,i,s,a)}addLayerInternal(e,i){if(e===a$1){e$1.error(`The alias ${a$1} is reserved`);return}return i.label=e,ie.app.stage.addChild(i)}getLayerInternal(e){return ie.app.stage.getChildByLabel(e)}removeLayerInternal(e){let i=ie.app.stage.getChildByLabel(e);i&&ie.app.stage.removeChild(i);}addHtmlLayerInternal(e,i,s){return ie.addHtmlLayer(e,i,s)}removeHtmlLayerInternal(e){return ie.removeHtmlLayer(e)}getHtmlLayerInternal(e){return ie.getHtmlLayer(e)}addLayer(e,i){return this.addLayerInternal(e,i)}getLayer(e){return this.getLayerInternal(e)}removeLayer(e){return this.removeLayerInternal(e)}addHtmlLayer(e,i,s){return this.addHtmlLayerInternal(e,i,s)}removeHtmlLayer(e){return this.removeHtmlLayerInternal(e)}getHtmlLayer(e){return this.getHtmlLayerInternal(e)}layers={get gameLayer(){return ie.gameLayer},add:(e,i)=>this.addLayerInternal(e,i),get:e=>this.getLayerInternal(e),remove:e=>this.removeLayerInternal(e)};htmlLayers={add:(e,i,s)=>this.addHtmlLayerInternal(e,i,s),get:e=>this.getHtmlLayerInternal(e),remove:e=>this.removeHtmlLayerInternal(e)};async extractImage(){let e=this.gameLayer.renderable===false;e&&this.resume();let i;try{i=this.app.renderer.extract.image(this.app.stage);}finally{e&&this.pause();}return (await i).src}clear(){this.tickersPausedByGameLayerRender=[],tickers$1.removeAll(),this.removeAll();}export(){let e=this.gameLayer.renderable===false;e&&this.resume();try{let i={};return this.children.forEach(s=>{s.label&&(i[s.label]=vt(s));}),{tickers:a$2(TickersManagerStatic.currentTickersWithoutCreatedBySteps()),tickersSteps:a$2(TickersManagerStatic.currentTickersSequence()),elements:a$2(i),stage:a$2(Ae(this.gameLayer)),elementAliasesOrder:a$2(ie.childrenAliasesOrder),tickersToCompleteOnStepEnd:a$2(TickersManagerStatic._tickersToCompleteOnStepEnd)}}finally{e&&this.pause();}}async restore(e){this.clear();try{if(Object.hasOwn(e,"elements")&&Object.hasOwn(e,"elementAliasesOrder")){let i=e.elementAliasesOrder,s={},a=Object.entries(e.elements).map(async([p,y])=>{s[p]=await et(y);});await Promise.all(a),i.forEach(p=>{let y=s[p];y&&this.add(p,y);});}else {e$1.error("The data does not have the properties elementAliasesOrder and elements");return}if(Object.hasOwn(e,"stage")&&Object.hasOwn(e,"stage")?le(this.gameLayer,e.stage,{ignoreScale:!0}):e$1.error("The data does not have the properties stage"),Object.hasOwn(e,"tickers")){let i=e.tickers;Object.entries(i).forEach(([s,a])=>{let p=a.canvasElementAliases;if(p.length!==0){let y=RegisteredTickers.getInstance(a.id,a.args,{duration:a.duration,priority:a.priority,id:s,canvasElementAliases:p});y?(y.canvasElementAliases=p,tickers$1.add(p,y),a.paused&&y.pause()):e$1.error(`Ticker ${a.id} not found`);}});}if(Object.hasOwn(e,"tickersSteps")){let i=e.tickersSteps;Object.entries(i).forEach(([s,a])=>{TickersManagerStatic._currentTickersSequence.set(s,new Map(Object.entries(a))),Object.keys(a).forEach(p=>{runTickersSequence(s,p);});});}if(Object.hasOwn(e,"tickersToCompleteOnStepEnd")){let i=e.tickersToCompleteOnStepEnd,s=i.tikersIds,a=i.stepAlias.map(p=>({id:p.id,alias:p.alias}));TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.length=0,TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.push(...s),TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.length=0,TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.push(...a);}}catch(i){e$1.error("Error importing data",i);}}};var ae=class t{static init(e){t._getScreen=e.getScreen;}static _getScreen;static get screen(){return t._getScreen()}};var w;(S=>{function t(l,v,A,b,U,z=0){return U?l==="width"?v*(ae.screen.width-A)+A-b-z*A:v*(ae.screen.height-A)+A-b-z*A:l==="width"?v*(ae.screen.width-A)+b+z*A:v*(ae.screen.height-A)+b+z*A}S.calculatePositionByAlign=t;function e(l,v,A,b,U,z=0){return U?l==="width"?(v-A+b+z*A)/(ae.screen.width-A):(v-A+b+z*A)/(ae.screen.height-A):l==="width"?(v-b-z*A)/(ae.screen.width-A):(v-b-z*A)/(ae.screen.height-A)}S.calculateAlignByPosition=e;function i(l,v){return l==="width"?v*ae.screen.width:v*ae.screen.height}S.calculatePositionByPercentagePosition=i;function s(l,v){return l==="width"?v/ae.screen.width:v/ae.screen.height}S.calculatePercentagePositionByPosition=s;function a(l,v){if(v=v%360,v<0&&(v+=360),v===0)return {x:l.x,y:l.y};if(v===90)return {x:-l.y,y:l.x};if(v===180)return {x:-l.x,y:-l.y};if(v===270)return {x:l.y,y:-l.x};if(v>0&&v<90){let A=v*Math.PI/180,b=Math.cos(A),U=Math.sin(A),z=l.x*b-l.y*U,te=l.x*U+l.y*b;return l.x!==0&&Math.sign(z)!==Math.sign(l.x)&&(z=-z),l.y!==0&&Math.sign(te)!==Math.sign(l.y)&&(te=-te),{x:z,y:te}}else if(v>90&&v<180){let A=(v-90)*Math.PI/180,b=Math.cos(A),U=Math.sin(A),z=-l.y*U-l.x*b,te=l.y*b-l.x*U;return l.x!==0&&Math.sign(z)!==Math.sign(l.x)&&(z=-z),l.y!==0&&Math.sign(te)!==Math.sign(l.y)&&(te=-te),{x:z,y:te}}else if(v>180&&v<270){let A=(v-180)*Math.PI/180,b=Math.cos(A),U=Math.sin(A),z=-l.x*b+l.y*U,te=-l.x*U-l.y*b;return l.x!==0&&Math.sign(z)!==Math.sign(l.x)&&(z=-z),l.y!==0&&Math.sign(te)!==Math.sign(l.y)&&(te=-te),{x:z,y:te}}else if(v>270&&v<360){let A=(v-270)*Math.PI/180,b=Math.cos(A),U=Math.sin(A),z=l.y*U-l.x*b,te=-l.y*b-l.x*U;return l.x!==0&&Math.sign(z)!==Math.sign(l.x)&&(z=-z),l.y!==0&&Math.sign(te)!==Math.sign(l.y)&&(te=-te),{x:z,y:te}}return {x:0,y:0}}S.getSuperPoint=a;function p(l,v){if(v=v%360,v<0&&(v+=360),v===0)return {x:l.x,y:l.y};if(v===90)return {x:l.y,y:-l.x};if(v===180)return {x:-l.x,y:-l.y};if(v===270)return {x:-l.y,y:l.x};if(v>0&&v<90){let A=v*Math.PI/180,b=Math.cos(A),U=Math.sin(A);return {x:l.x*b+l.y*U,y:-l.x*U+l.y*b}}else if(v>90&&v<180){let A=(v-90)*Math.PI/180,b=Math.cos(A),U=Math.sin(A);return {x:l.y*b-l.x*U,y:-l.y*U-l.x*b}}else if(v>180&&v<270){let A=(v-180)*Math.PI/180,b=Math.cos(A),U=Math.sin(A);return {x:-l.x*b-l.y*U,y:l.x*U-l.y*b}}else if(v>270&&v<360){let A=(v-270)*Math.PI/180,b=Math.cos(A),U=Math.sin(A);return {x:-l.y*b+l.x*U,y:l.y*U+l.x*b}}return {x:0,y:0}}S.getPointBySuperPoint=p;function y(l){let v=l.width,A=l.height,b=l.angle%360;return b<0&&(b+=360),b===0||b===180?v:b===90||b===270?A:Math.abs(v*Math.cos(b*Math.PI/180))+Math.abs(A*Math.sin(b*Math.PI/180))}S.getSuperWidth=y;function R(l){let v=l.width,A=l.height,b=l.angle%360;return b<0&&(b+=360),b===0||b===180?A:b===90||b===270?v:Math.abs(A*Math.cos(b*Math.PI/180))+Math.abs(v*Math.sin(b*Math.PI/180))}S.getSuperHeight=R;})(w||={});async function $e(t){if(t!=="EMPTY"){if(!t)throw e$1.error("Texture not found",t),new PixiError("unregistered_asset","Texture not found");if(we.Assets.cache.has(t)){let e=we.Assets.get(t);if(e)return e}return we.Assets.load(t).then(e=>{if(!e)throw e$1.error("Texture not found",t),new PixiError("unregistered_asset","Texture not found");if(!(e instanceof we.Texture))throw e$1.error("File is not a Texture",t),new PixiError("unregistered_asset","File is not a Texture");return e}).catch(e=>{throw e$1.error("Error loading file",e),new PixiError("unknown_element","Error loading file")})}}function ge(t){return t&&(typeof t.align!="number"&&(t.xAlign!==void 0&&(t.align===void 0?(t.align={x:t.xAlign},delete t.xAlign):(t.align.x=t.xAlign,delete t.xAlign)),t.yAlign!==void 0&&(t.align===void 0?(t.align={y:t.yAlign},delete t.yAlign):(t.align.y=t.yAlign,delete t.yAlign))),typeof t.percentagePosition!="number"&&(t.percentageX!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={x:t.percentageX},delete t.percentageX):(t.percentagePosition.x=t.percentageX,delete t.percentageX)),t.percentageY!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={y:t.percentageY},delete t.percentageY):(t.percentagePosition.y=t.percentageY,delete t.percentageY))),t)}var Se=class t extends we.Sprite{constructor(e$1){if(e$1 instanceof we.Texture)super(e$1);else {let{align:i,percentagePosition:s,...a}=ge(e$1)||{};super(a),i&&(this.align=i),s&&(this.percentagePosition=s);}this.pixivnId=this.constructor.prototype.pixivnId||e;}pixivnId=e;get memory(){return {...It(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){return await st(this,e)}static from(e,i){let s=we.Sprite.from(e,i),a=new t;return a.texture=s.texture,a}onEventsHandlers={};on(e,i,s){return Oe(e,this,i),super.on(e,(...a)=>i(...a,this),s)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return {x:w.calculateAlignByPosition("width",this.x,w.getSuperWidth(this),e.x,i.x<0,this.anchor.x),y:w.calculateAlignByPosition("height",this.y,w.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return w.calculateAlignByPosition("width",this.x,w.getSuperWidth(this),e.x,i.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return w.calculateAlignByPosition("height",this.y,w.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:w.calculatePercentagePositionByPosition("width",this.x),y:w.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return w.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return w.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=w.calculatePositionByAlign("width",this._align.x,w.getSuperWidth(this),e.x,i.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=w.calculatePositionByAlign("height",this._align.y,w.getSuperHeight(this),e.y,i.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=w.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=w.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};de.add(Se,{name:e,copyProperty:async(t,e)=>{await st(t,e,{ignoreTexture:true});}});async function st(t,e,i){e=ge(e);let s=i?.ignoreTexture||false;if(await le(t,e),!s){let p;if("textureData"in e&&e.textureData&&(p=e.textureData),p&&p.url!=="EMPTY"){let y=p.url;p.alias&&we.Assets.resolver.hasKey(p.alias)&&(y=p.alias);try{let R=await $e(y);R&&(t.texture=R);}catch(R){e$1.error("Error in Sprite.setMemorySprite() while loading texture"),R=new PixiError("unregistered_asset",`Error loading image ${y}`,"canvas",e),GameUnifier.runOnError(R,{});}}}let a=i?.half;a&&await a(),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}var J=class t extends Se{_textureAlias;get textureAlias(){return this._textureAlias?this._textureAlias:this.texture.source.label}pixivnId=d$1;constructor(e,i){super(e),i&&(this._textureAlias=i);}get memory(){return {...super.memory,pixivnId:this.pixivnId,loadIsStarted:this._loadIsStarted}}async setMemory(e){let i;"textureData"in e&&e.textureData&&(i=e.textureData),"assetsData"in e&&Array.isArray(e.assetsData)&&e.assetsData.length>0&&(i=e.assetsData[0]),i&&i.alias&&(this._textureAlias=i.alias),await ot(this,e),this.reloadPosition();}static from(e,i){let s=we.Sprite.from(e,i),a=new t;return a.texture=s.texture,a}_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){return this._loadIsStarted=true,$e(this.textureAlias).then(e=>{this._loadIsStarted=false,e&&(this.texture=e);}).catch(e=>{this._loadIsStarted=false,e$1.error("Error into ImageSprite.load()"),e=new PixiError("unregistered_asset",`Error loading image ${this.textureAlias}`,"canvas",{...this.memory,label:this.textureAlias},this),GameUnifier.runOnError(e,{});})}set texture(e){super.texture=e,this.reloadPosition();}get texture(){return super.texture}get haveEmptyTexture(){return this.texture._source.label==="EMPTY"}};de.add(J,{name:d$1,copyProperty:async(t,e)=>{await ot(t,e,{ignoreTexture:true});}});async function ot(t,e,i){return await st(t,e,{half:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();},ignoreTexture:i?.ignoreTexture})}var ye=class t extends J{constructor(e,i){if(e instanceof we.Texture){super(e,i);return}let{loop:s,paused:a,currentTime:p,...y}=e||{};super(y,i),s&&(this.loop=s),a&&(this.paused=a),p&&(this.currentTime=p);}pixivnId=g;get memory(){return {...super.memory,pixivnId:this.pixivnId,loop:this.loop,paused:this._paused,currentTime:this.currentTime}}async setMemory(e){await Vt(this,e),this.reloadPosition();}static from(e,i){let s=we.Sprite.from(e,i),a=new t;return a.texture=s.texture,a}async load(){await super.load(),this.loop=this._looop,this.currentTime=this._currentTime,this.paused=this._paused;}_looop=false;get loop(){return this.texture?.source?.resource?.loop||false}set loop(e){this._looop=e,this.texture?.source?.resource&&(this.texture.source.resource.loop=e);}_paused=false;get paused(){return this.texture?.source?.resource?.paused||false}set paused(e){e?this.pause():this.play();}pause(){this._paused=true,this.texture?.source?.resource&&this.texture.source.resource.pause();}play(){this._paused=false,this.texture?.source?.resource?.play&&typeof this.texture.source.resource.play=="function"&&this.texture.source.resource.play();}_currentTime=0;get currentTime(){return this.texture?.source?.resource?.currentTime||0}set currentTime(e){let i=this.duration;i&&e>=i&&(e=0),this._currentTime=e,this.texture?.source?.resource&&(this.texture.source.resource.currentTime=e);}restart(){this.currentTime=0;}get duration(){if(this.texture?.source?.resource)return this.texture.source.resource.duration||0}};de.add(ye,{name:g,getInstance:async(t,e)=>{let i;"textureData"in e&&e.textureData&&(i=e.textureData);let s=new t(void 0,i?.alias);return await s.setMemory(e),s},copyProperty:async(t,e)=>{await Vt(t,e,{ignoreTexture:true});}});async function Vt(t,e,i){await ot(t,e,{ignoreTexture:i?.ignoreTexture}),"loop"in e&&e.loop!==void 0&&(t.loop=e.loop),"currentTime"in e&&e.currentTime!==void 0&&(t.currentTime=e.currentTime),"paused"in e&&e.paused!==void 0&&(t.paused=e.paused);}var Pe=class extends Container{constructor(e){let{anchor:i,align:s,percentagePosition:a,...p}=ge(e)||{};super(p),this.pixivnId=this.constructor.prototype.pixivnId||b,i&&(this.anchor=i),s&&(this.align=s),a&&(this.percentagePosition=a);}pixivnId=b;get memory(){return {...Ae(this,{childrenExport:true}),anchor:this._anchor?this.anchor:void 0,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await this.importChildren(e),await le(this,e),this.reloadAnchor(),this.reloadPosition();}async importChildren(e){for(let i=0;i<e.elements.length;i++){let s=e.elements[i],a=await et(s);this.addChild(a);}}onEventsHandlers={};on(e,i,s){return Oe(e,this,i),super.on(e,(...a)=>i(...a,this),s)}_anchor;get anchor(){let e=super.pivot.x/this.width,i=super.pivot.y/this.height;return {x:e,y:i}}set anchor(e){typeof e=="number"?this._anchor={x:e,y:e}:this._anchor=e,this.reloadAnchor();}reloadAnchor(){this._anchor&&super.pivot.set(this._anchor.x*this.width,this._anchor.y*this.height);}get pivot(){return super.pivot}set pivot(e){this._anchor=void 0,super.pivot=e;}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return {x:w.calculateAlignByPosition("width",this.x,w.getSuperWidth(this),e.x,i.x<0),y:w.calculateAlignByPosition("height",this.y,w.getSuperHeight(this),e.y,i.y<0)}}set xAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return w.calculateAlignByPosition("width",this.x,w.getSuperWidth(this),e.x,i.x<0)}set yAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return w.calculateAlignByPosition("height",this.y,w.getSuperHeight(this),e.y,i.y<0)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:w.calculatePercentagePositionByPosition("width",this.x),y:w.calculatePercentagePositionByPosition("height",this.y)}}set percentageX(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageX(){return w.calculatePercentagePositionByPosition("width",this.x)}set percentageY(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get percentageY(){return w.calculatePercentagePositionByPosition("height",this.y)}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=w.calculatePositionByAlign("width",this._align.x,w.getSuperWidth(this),e.x,i.x<0)),this._align.y!==void 0&&(super.y=w.calculatePositionByAlign("height",this._align.y,w.getSuperHeight(this),e.y,i.y<0));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=w.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=w.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};de.add(Pe,{name:b,copyProperty:async(t,e)=>await le(t,e)});var Fn=new Set(["mp4","webm","ogg","ogv","avi","mov","wmv","flv","mkv","m4v","3gp","3g2","ts","mts"]);function Ge(t){let e=we.Assets.cache.has(t)?we.Assets.get(t):null;return e instanceof we.Texture&&(t=e.source?.label||t),Ln(t)}function Ln(t){let e=t.split(".").pop()?.toLowerCase();return e!==void 0&&Fn.has(e)}var Q=class extends Pe{constructor(e,i){let{anchor:s,align:a,percentagePosition:p,...y}=ge(e)||{};super(y),i&&i.forEach(R=>{Ge(R)?this.addChild(new ye(void 0,R)):this.addChild(new J(void 0,R));}),s&&(this.anchor=s),a&&(this.align=a),p&&(this.percentagePosition=p);}get memory(){return {...super.memory,pixivnId:c,loadIsStarted:this._loadIsStarted}}async setMemory(e){await this.importChildren(e),await jt(this,e),this.reloadAnchor(),this.reloadPosition();}pixivnId=c;_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){this._loadIsStarted=true;let e=this.children.map(i=>i.load());return Promise.all(e).then(()=>{this._loadIsStarted=false,this.reloadAnchor(),this.reloadPosition();}).catch(i=>{this._loadIsStarted=false,e$1.error("Error into ImageContainer.load()",i);})}get texture(){return this.children.length>0?this.children[0].texture:new we.Texture}get haveEmptyTexture(){return this.children.some(e=>e.texture._source.label==="EMPTY")}};de.add(Q,{name:c,copyProperty:async(t,e)=>await jt(t,e)});async function jt(t,e){e=ge(e)||{},le(t,e,{end:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();}});}var at=class{constructor(...e){}get memory(){throw new PixiError("not_implemented","The method CanvasBaseItem.memory must be overridden")}setMemory(e){throw new PixiError("not_implemented","The method CanvasBaseItem.setMemory must be overridden")}pixivnId="canvas_element_id_not_set"};var Ee=class extends we.Text{constructor(e){let{align:i,percentagePosition:s,...a}=ge(e)||{};super(a),this.pixivnId=this.constructor.prototype.pixivnId||f$1,i&&(this.align=i),s&&(this.percentagePosition=s);}pixivnId=f$1;get memory(){return {...Tt(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await Hn(this,e),this.reloadPosition();}onEventsHandlers={};on(e,i,s){return Oe(e,this,i),super.on(e,(...a)=>i(...a,this),s)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return {x:w.calculateAlignByPosition("width",this.x,w.getSuperWidth(this),e.x,i.x<0,this.anchor.x),y:w.calculateAlignByPosition("height",this.y,w.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return w.calculateAlignByPosition("width",this.x,w.getSuperWidth(this),e.x,i.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);return w.calculateAlignByPosition("height",this.y,w.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:w.calculatePercentagePositionByPosition("width",this.x),y:w.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return w.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return w.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=w.getSuperPoint(this.pivot,this.angle),i=w.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=w.calculatePositionByAlign("width",this._align.x,w.getSuperWidth(this),e.x,i.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=w.calculatePositionByAlign("height",this._align.y,w.getSuperHeight(this),e.y,i.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=w.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=w.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};de.add(Ee,{name:f$1});async function Hn(t,e){"text"in e&&e.text!==void 0&&(t.text=e.text),await le(t,e,{end:()=>{"style"in e&&e.style!==void 0&&(t.style=e.style);}}),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"resolution"in e&&e.resolution!==void 0&&(t.resolution=e.resolution),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}function bt(t){let e=t.filters;return e?Array.isArray(e)?[...e]:[e]:[]}function Xn(t,e){t.filters=[...bt(t),...e];}function $n(t,e){let i=bt(t).filter(s=>!e.includes(s));t.filters=i.length>0?i:null;}function ee(t,e,i,s,a,p,y){Xn(e,[i]),y?.();let R=filters.animate(t,i,s,{duration:a.duration??1,delay:a.delay,ease:a.ease,times:a.times,aliasToRemoveAfter:a.aliasToRemoveAfter,autoplay:a.autoplay},p,void 0,()=>{$n(e,[i]),i.destroy();});return R&&(a.completeOnContinue??true)&&tickers$1.completeOnStepEnd({id:R}),R}function Ie(t,e){let i;try{i=f.screen;}catch{i=void 0;}return b$1(t.getBounds(),e,bt(t),i)}async function Gn(t,e={},i){return Ot.shakeEffect(t,e,i)}function Kt(t){switch(t){case "up":return {axis:"y",sign:-1};case "down":return {axis:"y",sign:1};case "left":return {axis:"x",sign:-1};default:return {axis:"x",sign:1}}}function ct(t,e,i){let s=[0],a=t;for(let p=0;p<i;p++)s.push(p%2===0?a:-a,0),a*=e;return s}function He(t,e,i,s){let a=[t],p=e;for(let y=0;y<s;y++)a.push(t+p,t),p*=i;return a}var Ot;(_e=>{async function t(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the shake effect can't be applied.`);return}let B={x:_.position.x,y:_.position.y},{shakeType:W="horizontal",maxShockSize:G=10,shocksNumber:j=10,...H}=q,F=j-1;if(F<2){e$1.error("The number of shocks must be at least 3.");return}let X=Math.floor(F/2),Y=Math.ceil(F/2),L=[];for(let Z=0;Z<X;Z++){let re=G*(Z+1)/X;W==="horizontal"?Z%2!==0?L.push(B.x+re):L.push(B.x-re):Z%2!==0?L.push(B.y+re):L.push(B.y-re);}let N=X%2===0;for(let Z=Y;Z>0;Z--){let re=G*(Z+1)/(Y-1);W==="horizontal"?Z%2===0&&!N||Z%2!==0&&N?L.push(B.x-re):L.push(B.x+re):Z%2===0&&!N||Z%2!==0&&N?L.push(B.y-re):L.push(B.y+re);}let ne;if(W==="horizontal"?(L.push(B.x),ne=f.animate(M,{x:L},H,K)):(L.push(B.y),ne=f.animate(M,{y:L},H,K)),ne)return [ne]}_e.shakeEffect=t;async function e(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the bounce effect can't be applied.`);return}let{direction:B="up",distance:W=30,bounces:G=4,decay:j=.5,...H}=q,{axis:F,sign:X}=Kt(B),Y=F==="x"?_.position.x:_.position.y,L=[Y],N=W;for(let Z=0;Z<G;Z++)L.push(Y+X*N,Y),N*=j;let ne=f.animate(M,{[F]:L},H,K);if(ne)return [ne]}_e.bounceEffect=e;async function i(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the pulse effect can't be applied.`);return}let{scale:B=1.2,pulses:W=3,decay:G=.6,...j}=q,H=_.scale.x,F=_.scale.y,X=[H],Y=[F],L=B-1;for(let ne=0;ne<W;ne++)X.push(H*(1+L),H),Y.push(F*(1+L),F),L*=G;let N=f.animate(M,{scaleX:X,scaleY:Y},j,K);if(N)return [N]}_e.pulseEffect=i;async function s(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the hop effect can't be applied.`);return}let{direction:B="up",distance:W=40,secondaryHops:G=0,decay:j=.5,...H}=q,{axis:F,sign:X}=Kt(B),Y=F==="x"?_.position.x:_.position.y,L=[Y],N=W;for(let Z=0;Z<1+G;Z++)L.push(Y+X*N,Y),N*=j;let ne=f.animate(M,{[F]:L},H,K);if(ne)return [ne]}_e.hopEffect=s;async function a$1(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the wiggle effect can't be applied.`);return}let{angle:B=15,repetitions:W=3,decay:G=.5,...j}=q,H=_.rotation,F=B*Math.PI/180,X=ct(F,G,W).map(L=>H+L),Y=f.animate(M,{rotation:X},j,K);if(Y)return [Y]}_e.wiggleEffect=a$1;async function p(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the nod effect can't be applied.`);return}let{axis:B="horizontal",distance:W=15,repetitions:G=3,decay:j=.5,...H}=q,F=B==="horizontal"?"x":"y",X=B==="horizontal"?_.position.x:_.position.y,Y=ct(W,j,G).map(N=>X+N),L=f.animate(M,{[F]:Y},H,K);if(L)return [L]}_e.nodEffect=p;async function y(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the sway effect can't be applied.`);return}let{axis:B="horizontal",distance:W=10,angle:G=5,repetitions:j=3,decay:H=0,ease:F="easeInOut",...X}=q,Y=B==="horizontal"?"x":"y",L=B==="horizontal"?_.position.x:_.position.y,N=_.rotation,ne=G*Math.PI/180,Z=ct(W,H||1,j).map(xe=>L+xe),re=ct(ne,H||1,j).map(xe=>N+xe),fe=f.animate(M,{[Y]:Z,rotation:re},{ease:F,...X},K);if(fe)return [fe]}_e.swayEffect=y;async function R(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the punch effect can't be applied.`);return}let{mode:B="scale",strength:W=.3,overshoot:G=.3,...j}=q,H;if(B==="scale"){let F=X=>[X,X*(1+W),X*(1-W*G),X];H=f.animate(M,{scaleX:F(_.scale.x),scaleY:F(_.scale.y)},j,K);}else {let F=B==="rotation"?_.rotation:B==="x"?_.position.x:_.position.y,X=B==="rotation"?W*Math.PI/180:W,Y=[F,F+X,F-X*G,F];H=f.animate(M,{[B]:Y},j,K);}if(H)return [H]}_e.punchEffect=R;async function S(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the glitch effect can't be applied.`);return}let{strength:B=40,bursts:W=3,slices:G=8,direction:j=0,rgbSplit:H=6,decay:F=.5,ease:X="linear",...Y}=q,L=new filters.GlitchFilter({slices:G,direction:j,offset:0});L.refresh(),L.padding=Math.ceil(Math.abs(B));let N=[],ne=ee(M,_,L,{offset:a(B,F,W)},{ease:X,...Y},K);if(ne&&N.push(ne),H!==0){let Z=a(H,F,W),re=new filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});re.padding=Math.ceil(Math.abs(H));let fe=ee(M,_,re,{redX:Z,blueX:Z.map(xe=>-xe)},{ease:X,...Y},K);fe&&N.push(fe);}if(N.length>0)return N}_e.glitchEffect=S;async function l(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the chromatic aberration effect can't be applied.`);return}let{strength:B=8,axis:W="horizontal",bursts:G=1,decay:j=.5,...H}=q,F=new filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});F.padding=Math.ceil(Math.abs(B));let X=W==="horizontal"?"redX":"redY",Y=W==="horizontal"?"blueX":"blueY",L={[X]:He(0,B,j,G),[Y]:He(0,-B,j,G)},N=ee(M,_,F,L,H,K);if(N)return [N]}_e.chromaticAberrationEffect=l;async function v(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the shockwave effect can't be applied.`);return}let{origin:B={x:.5,y:.5},amplitude:W=30,wavelength:G=160,brightness:j=1,radius:H=-1,speed:F=500,strength:X,...Y}=q,{width:L,height:N}=_.getBounds(),ne=X??e$2({x:B.x*L,y:B.y*N},{width:L,height:N},G,H)/F,Z=new filters.ShockwaveFilter({center:{x:0,y:0},amplitude:W,wavelength:G,brightness:j,radius:H,speed:F,time:0});Z.padding=Math.ceil(Math.abs(W)*1.25);let re=ee(M,_,Z,{time:[0,ne]},Y,K,()=>{let{x:fe,y:xe}=Ie(_,B);Z.center={x:fe,y:xe};});if(re)return [re]}_e.shockwaveEffect=v;async function A(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the radial blur effect can't be applied.`);return}let{strength:B=.5,bursts:W=1,origin:G={x:.5,y:.5},innerRadius:j=0,radius:H=-1,decay:F=.5,...X}=q,Y=new filters.ZoomBlurFilter({center:{x:0,y:0},innerRadius:j,radius:H,strength:0}),{width:L,height:N}=_.getBounds();Y.padding=d$2({x:G.x*L,y:G.y*N},B,L,N);let ne=He(0,B,F,W),Z=ee(M,_,Y,{strength:ne},X,K,()=>{let{x:re,y:fe}=Ie(_,G);Y.center={x:re,y:fe};});if(Z)return [Z]}_e.radialBlurEffect=A;async function b(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the blur pulse effect can't be applied.`);return}let{strength:B=8,pulses:W=3,quality:G,decay:j=.5,...H}=q,F=new filters.BlurFilter({strength:0,quality:G}),X=He(0,B,j,W),Y=ee(M,_,F,{strength:X},H,K);if(Y)return [Y]}_e.blurPulseEffect=b;async function U(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the vignette pulse effect can't be applied.`);return}let{strength:B=1,pulses:W=1,radius:G=.5,blur:j=.5,decay:H=.5,...F}=q,X=new filters.CRTFilter({curvature:0,lineWidth:0,lineContrast:0,noise:0,vignetting:G,vignettingBlur:j,vignettingAlpha:0}),Y=He(0,B,H,W),L=ee(M,_,X,{vignettingAlpha:Y},F,K);if(L)return [L]}_e.vignettePulseEffect=U;async function z(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the desaturate effect can't be applied.`);return}let{amount:B=0,duration:W=1,holdDuration:G=0,...j}=q,H=W*2+G,F=[0,W/H,(W+G)/H,1],X=new filters.AdjustmentFilter({saturation:1}),Y=ee(M,_,X,{saturation:[1,B,B,1]},{...j,duration:H,times:F},K);if(Y)return [Y]}_e.desaturateEffect=z;async function te(M,q={},K){let _=f.find(M);if(!_){e$1.error(`The element with the alias ${M} does not exist. So the glow pulse effect can't be applied.`);return}let{strength:B=4,pulses:W=3,color:G=16777215,distance:j=10,innerStrength:H=0,decay:F=.5,...X}=q,Y=new filters.GlowFilter({outerStrength:0,innerStrength:H,distance:j,color:G}),L=He(0,B,F,W),N=ee(M,_,Y,{outerStrength:L},X,K);if(N)return [N]}_e.glowPulseEffect=te;})(Ot||={});function Me(t){let e=t.getLocalBounds();return {x:e.x,y:e.y,width:e.width,height:e.height}}function wt(t,e){return e.graphics||(e.graphics=new Graphics,e.graphics.label="",t.parent?.addChild(e.graphics),t.mask=e.graphics),jn(t,e.graphics),e.graphics}function jn(t,e){e.position.copyFrom(t.position),e.scale.copyFrom(t.scale),e.pivot.copyFrom(t.pivot),e.skew.copyFrom(t.skew),e.rotation=t.rotation;}function Nn(t,e){e.graphics&&(t.mask===e.graphics&&(t.mask=null),e.graphics.parent?.removeChild(e.graphics),e.graphics.destroy({children:true}),e.graphics=void 0);}function Kn(t,e,i,s){let a=e.invert?1-i:i,{bounds:p}=e,y=wt(t,s),R=p.x+p.width/2,S=p.y+p.height/2,l=Math.sqrt(p.width**2+p.height**2)||1,v=Math.max(a,0)*l*2,A=e.angle*Math.PI/180;if(y.clear(),v>0){let b=Math.cos(-A),U=Math.sin(-A),z=[[-l,-l],[-l+v,-l],[-l+v,l],[-l,l]].flatMap(([te,_e])=>[R+te*b-_e*U,S+te*U+_e*b]);y.poly(z).fill(16777215);}}function qn(t,e,i,s){let a=e.invert?1-i:i,{bounds:p}=e,y=wt(t,s),R=p.x+p.width*e.originX,S=p.y+p.height*e.originY,l=Math.max(R-p.x,p.x+p.width-R),v=Math.max(S-p.y,p.y+p.height-S),A=Math.sqrt(l**2+v**2)||1,b=Math.max(a,0)*A,U=e.aspect>0?e.aspect:1;if(y.clear(),e.outside){let z=A*Math.max(U,1)*2;y.rect(p.x-z,p.y-z,p.width+z*2,p.height+z*2).fill(16777215),b>0&&y.ellipse(R,S,b*U,b).cut();}else b>0&&y.ellipse(R,S,b*U,b).fill(16777215);}function Zn(t,e,i,s){let a=e.invert?1-i:i,p=1-a,{bounds:y}=e,R=wt(t,s);if(R.clear(),e.direction==="outward"){if(a>0)if(e.orientation==="horizontal"){let S=y.x+y.width*e.origin;R.rect(S-(S-y.x)*a,y.y,y.width*a,y.height).fill(16777215);}else {let S=y.y+y.height*e.origin;R.rect(y.x,S-(S-y.y)*a,y.width,y.height*a).fill(16777215);}return}if(e.orientation==="horizontal"){let S=y.x+y.width*e.origin,l=S-y.x,v=y.x+y.width-S,A=y.x-p*l,b=S+p*v;l>0&&R.rect(A,y.y,l,y.height).fill(16777215),v>0&&R.rect(b,y.y,v,y.height).fill(16777215);}else {let S=y.y+y.height*e.origin,l=S-y.y,v=y.y+y.height-S,A=y.y-p*l,b=S+p*v;l>0&&R.rect(y.x,A,y.width,l).fill(16777215),v>0&&R.rect(y.x,b,y.width,v).fill(16777215);}}function Jn(t,e,i){switch(e.kind){case "wipe":case "iris":case "split":Nn(t,i);break}}function Qn(t,e,i,s){switch(e.kind){case "wipe":return Kn(t,e,i,s);case "iris":return qn(t,e,i,s);case "split":return Zn(t,e,i,s)}}function At(t,e){let i={};return {apply(s){let a=f.find(t);a&&(i.component=a,Qn(a,e,s,i));},cleanup(){let s=i.component??f.find(t);s&&Jn(s,e,i);}}}function dt(t,e,i){let s={...f.find(t)?.memory,...i},a=new Q(i,e);return s&&f.copyCanvasElementProperty(s,a),f.add(t,a,{ignoreOldStyle:true,zIndex:i?.zIndex}),a}async function ei(t,e,i){let s={...f.find(t)?.memory,...i},a=new Q(i,e);return a.label=t,await a.load(),s&&f.copyCanvasElementProperty(s,a),f.add(t,a,{ignoreOldStyle:true,zIndex:i?.zIndex}),a}function ut(t,e,i){if(!e)if(we.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:d$1,...i,label:t});let s={...f.find(t)?.memory,...i},a=new J(i,e);return s&&f.copyCanvasElementProperty(s,a),f.add(t,a,{ignoreOldStyle:true,zIndex:i?.zIndex}),a}async function ti(t,e,i){if(!e)if(we.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:d$1,...i,label:t});let s={...f.find(t)?.memory,...i},a=new J(i,e);return a.label=t,await a.load(),s&&f.copyCanvasElementProperty(s,a),f.add(t,a,{ignoreOldStyle:true,zIndex:i?.zIndex}),a}function ft(t,e,i){if(!e)if(we.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:g,...i,label:t});let s={...f.find(t)?.memory,...i},a=new ye(i,e);return s&&f.copyCanvasElementProperty(s,a),f.add(t,a,{ignoreOldStyle:true,zIndex:i?.zIndex}),a}async function ni(t,e,i){if(!e)if(we.Assets.resolver.hasKey(t))e=t;else throw new PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:g,...i,label:t});let s={...f.find(t)?.memory,...i},a=new ye(i,e);return a.label=t,await a.load(),s&&f.copyCanvasElementProperty(s,a),f.add(t,a,{ignoreOldStyle:true,zIndex:i?.zIndex}),a}async function ii(t,e,i={},s){return pe.showWithDissolve(t,e,i,s)}function ri(t,e={},i){return pe.removeWithDissolve(t,e,i)}async function si(t,e,i={},s){return pe.showWithFade(t,e,i,s)}function oi(t,e={},i){return pe.removeWithFade(t,e,i)}async function ai(t,e,i={},s){return pe.moveIn(t,e,i,s)}function ci(t,e={},i){return pe.moveOut(t,e,i)}async function di(t,e,i={},s){return pe.zoomIn(t,e,i,s)}function ui(t,e={},i){return pe.zoomOut(t,e,i)}async function fi(t,e,i={},s){return pe.pushIn(t,e,i,s)}function li(t,e={direction:"right"},i){return pe.pushOut(t,e,i)}var pe;(Ai=>{function t(r){switch(r.type){case "align":return {xAlign:r.x,yAlign:r.y};case "percentage":return {percentageX:r.x,percentageY:r.y};default:return {x:r.x,y:r.y}}}function e(r,n,o){if(typeof n=="string")return Ge(n)?ft(r,n,{...o.properties,zIndex:o.zIndex}):ut(r,n,{...o.properties,zIndex:o.zIndex});if(Array.isArray(n))return dt(r,n,{...o.properties,zIndex:o.zIndex});if(typeof n=="object"&&"value"in n&&"options"in n){if(typeof n.value=="string")return Ge(n.value)?ft(r,n.value,{...n.options,...o.properties,zIndex:o.zIndex}):ut(r,n.value,{...n.options,...o.properties,zIndex:o.zIndex});if(Array.isArray(n.value))return dt(r,n.value,{...n.options,...o.properties,zIndex:o.zIndex})}return f.add(r,n,o),n}function i(r){let n=r;return {x:n.x,y:n.y,anchor:n.anchor,scale:n.scale,pivot:n.pivot,skew:n.skew,rotation:n.rotation,angle:n.angle}}function s(r,n,o){let c,d=f.find(r);d&&(c=`${r}_temp_${o}`,f.editAlias(r,c));let u=e(r,n,{zIndex:d?d.parent?.getChildIndex(d):void 0,properties:d?i(d):void 0});return d?.parent?.setChildIndex(d,d.parent.getChildIndex(d)-.1),c&&f.copyCanvasElementProperty(c,r),c&&tickers$1.transfer(c,r,"duplicate"),{component:u,oldComponentAlias:c}}function a$1(r,n,o,c){return r?n?c(r)??[]:(o.push(r),[]):[]}function p(r){let{aliasToRemoveAfter:n,animateOldComponentOut:o,...c}=r;return c}function y(r,n){let o=r?[r,...n]:n;return o.length>0?o:void 0}function R(r){switch(r){case "up":return 90;case "down":return 270;case "left":return 180;default:return 0}}function S(r,n,o){let{apply:c,cleanup:d}=At(r,n.config),u=filters.animate(r,void 0,{value:[n.from,n.to]},{duration:n.duration??1,delay:n.delay,ease:n.ease,aliasToRemoveAfter:n.aliasToRemoveAfter,tickerIdToResume:n.tickerIdToResume},o,c,d,{alias:r,config:n.config});return u&&c(n.from),u&&(n.completeOnContinue??true)&&tickers$1.completeOnStepEnd({id:u}),u}function l(r,n,o,c,d,u){let m=Math.max(c,0)/4;o==="in"?(n&&(n.alpha=0),f.animate(r,{alpha:[0,1]},{duration:m,delay:u,completeOnContinue:false},d)):f.animate(r,{alpha:[1,0]},{duration:m,delay:typeof u=="function"?(C,h)=>u(C,h)+Math.max(c-m,0):(u??0)+Math.max(c-m,0),completeOnContinue:false},d);}function v(r,n,o,c,d=false){let u=Math.max(c,1),m=n*2+o,C=d?n+o:m,h=Math.max(m*(u-1)+C,.001),T=[0],P=[0],I=0;for(let x=0;x<u;x++){let g=x===u-1;I+=n,T.push(r),P.push(I/h),I+=o,T.push(r),P.push(I/h),(!g||!d)&&(I+=n,T.push(0),P.push(Math.min(I/h,1)));}return {values:T,times:P,total:h}}async function A(r,n,o={},c){let{completeOnContinue:d=true,tickerIdToResume:u=[],...m}=o,C=[];n||(n=r),typeof u=="string"&&(u=[u]);let h,T=f.find(r);if(T&&(h=`${r}_temp_disolve`,f.editAlias(r,h)),n=e(r,n,{zIndex:T?T.parent?.getChildIndex(T):void 0,properties:T?i(T):void 0}),T?.parent?.setChildIndex(T,T.parent.getChildIndex(T)-.1),h&&f.copyCanvasElementProperty(h,r),h&&tickers$1.transfer(h,r,"duplicate"),n.alpha=0,h){let I=b(h,{...o,autoplay:false,completeOnContinue:d},c);I&&(C.push(...I),u.push(...I));}let P=f.animate(r,{alpha:1},{...m,tickerIdToResume:u,completeOnContinue:d},c);if(P&&C.push(P),C.length>0)return C}Ai.showWithDissolve=A;function b(r,n={},o){let{completeOnContinue:c=true,aliasToRemoveAfter:d=[],...u}=n;typeof d=="string"&&(d=[d]),d.push(r);let m=f.animate(r,{alpha:0},{...u,aliasToRemoveAfter:d,completeOnContinue:c},o);if(m)return [m]}Ai.removeWithDissolve=b;async function U(r,n,o={},c){let{completeOnContinue:d=true,aliasToRemoveAfter:u=[],...m}=o,C=[];n||(n=r),typeof u=="string"&&(u=[u]);let h=f.find(r);if(!h)return A(r,n,o,c);let T=`${r}_temp_fade`;f.editAlias(r,T),u.push(T),n=e(r,n,{zIndex:h?h.parent?.getChildIndex(h):void 0,properties:i(h)}),h?.parent?.setChildIndex(h,h.parent.getChildIndex(h)-.1),T&&f.copyCanvasElementProperty(T,r),T&&tickers$1.transfer(T,r,"duplicate"),n.alpha=0;let P=f.animate(r,{alpha:1},{...m,aliasToRemoveAfter:u,completeOnContinue:d},c);if(P){let I=b(T,{...o,tickerIdToResume:P,completeOnContinue:d},c);I&&C.push(...I),C.push(P),tickers$1.pause({id:P});}if((n instanceof J||n instanceof Q)&&n.haveEmptyTexture&&await n.load(),C.length>0)return C}Ai.showWithFade=U;function z(r,n={},o){return b(r,n,o)}Ai.removeWithFade=z;async function te(r,n,o={},c){let{direction:d="right",completeOnContinue:u=true,tickerIdToResume:m=[],aliasToRemoveAfter:C=[],removeOldComponentWithMoveOut:h,animateOldComponentOut:T=h??false,motionBlur:P,...I}=o,x=[],g;n||(n=r),typeof m=="string"&&(m=[m]),typeof C=="string"&&(C=[C]);let O,k=f.find(r);if(k&&(O=`${r}_temp_movein`,f.editAlias(r,O),k instanceof J||k instanceof Q?g=k.positionInfo:g={x:k.x,y:k.y,type:"pixel"}),n=e(r,n,{zIndex:k?k.parent?.getChildIndex(k):void 0}),k?.parent?.setChildIndex(k,k.parent.getChildIndex(k)-.1),O&&f.copyCanvasElementProperty(O,r),O&&tickers$1.transfer(O,r,"move"),(n instanceof J||n instanceof Q)&&n.haveEmptyTexture&&await n.load(),g||(n instanceof J||n instanceof Q?g=n.positionInfo:g={x:n.x,y:n.y,type:"pixel"}),O)if(T){let se=_e(O,{...I,direction:d,motionBlur:P,autoplay:false,completeOnContinue:u},c);se&&(x.push(...se),m.push(...se));}else C.push(O);switch(d){case "up":n.y=f.height+n.height;break;case "down":n.y=-n.height;break;case "left":n.x=f.width+n.width;break;case "right":n.x=-n.width;break}let D=tickers$1.pause({canvasAlias:r});m.push(...D);let $=f.animate(r,t(g),{...I,tickerIdToResume:m,aliasToRemoveAfter:C,completeOnContinue:u},c);$&&x.push($);let V=lt(r,n,d,P,{...I,completeOnContinue:u},c);if(V&&x.push(V),x.length>0)return x}Ai.moveIn=te;function _e(r,n={},o){let{direction:c="right",completeOnContinue:d=true,aliasToRemoveAfter:u=[],motionBlur:m,...C}=n;typeof u=="string"&&(u=[u]),u.push(r);let h=f.find(r);if(!h){e$1.warn(`The canvas component "${r}" is not found.`);return}let T={x:h.x,y:h.y};switch(c){case "up":T.y=-h.height;break;case "down":T.y=f.height+h.height;break;case "left":T.x=-h.width;break;case "right":T.x=f.width+h.width;break}tickers$1.pause({canvasAlias:r});let P=f.animate(r,T,{...C,aliasToRemoveAfter:u,completeOnContinue:d},o),I=lt(r,h,c,m,{...C,completeOnContinue:d},o);return je([P,I])}Ai.moveOut=_e;async function M(r,n,o={},c){let{direction:d="right",completeOnContinue:u=true,tickerIdToResume:m=[],aliasToRemoveAfter:C=[],removeOldComponentWithZoomOut:h,animateOldComponentOut:T=h??false,...P}=o,I=[],x;n||(n=r),typeof m=="string"&&(m=[m]),typeof C=="string"&&(C=[C]);let g,O=f.find(r);O&&(g=`${r}_temp_zoom`,f.editAlias(r,g),O instanceof J||O instanceof Q?x=O.positionInfo:x={x:O.x,y:O.y,type:"pixel"}),n=e(r,n,{zIndex:O?O.parent?.getChildIndex(O):void 0}),O?.parent?.setChildIndex(O,O.parent.getChildIndex(O)-.1),g&&f.copyCanvasElementProperty(g,r),g&&tickers$1.transfer(g,r,"move"),(n instanceof J||n instanceof Q)&&n.haveEmptyTexture&&await n.load(),x||(n instanceof J||n instanceof Q?x=n.positionInfo:x={x:n.x,y:n.y,type:"pixel"});let k={x:n.pivot.x,y:n.pivot.y},D={x:n.scale.x,y:n.scale.y};if(g)if(T){let se=q(g,{...P,direction:d,autoplay:false,completeOnContinue:u},c);se&&(I.push(...se),m.push(...se));}else C.push(g);(n instanceof J||n instanceof Q)&&n.haveEmptyTexture&&await n.load(),d==="up"?(n.pivot.y=f.height-n.y,n.pivot.x=f.width/2-n.x,n.y=f.height,n.x=f.width/2):d==="down"?(n.pivot.y=0-n.y,n.pivot.x=f.width/2-n.x,n.y=0,n.x=f.width/2):d==="left"?(n.pivot.x=f.width-n.x,n.pivot.y=f.height/2-n.y,n.x=f.width,n.y=f.height/2):d==="right"&&(n.pivot.x=0-n.x,n.pivot.y=f.height/2-n.y,n.x=0,n.y=f.height/2),n.pivot=w.getPointBySuperPoint(n.pivot,n.angle),n.scale.set(0);let $=tickers$1.pause({canvasAlias:r});m.push(...$);let V=f.animate(r,{pivotX:k.x,pivotY:k.y,scaleX:D.x,scaleY:D.y,...t(x)},{...P,tickerIdToResume:m,aliasToRemoveAfter:C,completeOnContinue:u},c);if(V&&I.push(V),I.length>0)return I}Ai.zoomIn=M;function q(r,n={},o){let{direction:c="right",completeOnContinue:d=true,aliasToRemoveAfter:u=[],...m}=n;typeof u=="string"&&(u=[u]),u.push(r);let C=f.find(r);if(!C){e$1.warn(`The canvas component "${r}" is not found.`);return}let h={x:C.x,y:C.y},T={x:C.pivot.x,y:C.pivot.y};c==="down"?(h.y=f.height,h.x=f.width/2,T.y=f.height-h.y,T.x=f.width/2-h.x):c==="up"?(h.y=0,h.x=f.width/2,T.y=0-h.y,T.x=f.width/2-h.x):c==="right"?(h.x=f.width,h.y=f.height/2,T.x=f.width-h.x,T.y=f.height/2-h.y):c==="left"&&(h.x=0,h.y=f.height/2,T.x=0-h.x,T.y=f.height/2-h.y),T=w.getPointBySuperPoint(T,C.angle),tickers$1.pause({canvasAlias:r});let P=f.animate(r,{...h,pivotX:T.x,pivotY:T.y,scaleX:0,scaleY:0},{...m,aliasToRemoveAfter:u,completeOnContinue:d},o);if(P)return [P]}Ai.zoomOut=q;async function K(r,n,o={},c){let{direction:d="right",completeOnContinue:u=true,tickerIdToResume:m=[],aliasToRemoveAfter:C=[],animateOldComponentOut:h=true,motionBlur:T,...P}=o,I=[],x;n||(n=r),typeof m=="string"&&(m=[m]),typeof C=="string"&&(C=[C]);let g,O=f.find(r);switch(O&&(g=`${r}_temp_push`,f.editAlias(r,g),O instanceof J||O instanceof Q?x=O.positionInfo:x={x:O.x,y:O.y,type:"pixel"}),n=e(r,n,{zIndex:O?O.parent?.getChildIndex(O):void 0}),O?.parent?.setChildIndex(O,O.parent.getChildIndex(O)-.1),g&&f.copyCanvasElementProperty(g,r),g&&tickers$1.transfer(g,r,"move"),x||((n instanceof J||n instanceof Q)&&n.haveEmptyTexture?x=n.positionInfo:x={x:n.x,y:n.y,type:"pixel"}),(n instanceof J||n instanceof Q)&&n.haveEmptyTexture&&await n.load(),d){case "up":n.y=f.height+n.height;break;case "down":n.y=-n.height;break;case "left":n.x=f.width+n.width;break;case "right":n.x=-n.width;break}let k=tickers$1.pause({canvasAlias:r});if(m.push(...k),g)if(h){let V=_(g,{...P,direction:d,motionBlur:T,completeOnContinue:u});V&&I.push(...V);}else C.push(g);let D=f.animate(r,t(x),{...P,tickerIdToResume:m,aliasToRemoveAfter:C,completeOnContinue:u},c);D&&I.push(D);let $=lt(r,n,d,T,{...P,completeOnContinue:u},c);if($&&I.push($),I.length>0)return I}Ai.pushIn=K;function _(r,n={direction:"right"},o){return _e(r,n,o)}Ai.pushOut=_;async function B(r,n,o={},c){let{angle:d,direction:u="right",invert:m=false,duration:C,delay:h,ease:T,completeOnContinue:P=true,animateOldComponentOut:I=true}=o,{aliasToRemoveAfter:x=[]}=o;n||(n=r),typeof x=="string"&&(x=[x]);let{component:g,oldComponentAlias:O}=s(r,n,"wipe"),k=a$1(O,I,x,V=>W(V,{...p(o),angle:(d??R(u))+180},c));(g instanceof J||g instanceof Q)&&g.haveEmptyTexture&&await g.load();let D={kind:"wipe",angle:d??R(u),invert:m,bounds:Me(g)},$=S(r,{config:D,from:0,to:1,duration:C,delay:h,ease:T,completeOnContinue:P,aliasToRemoveAfter:x},c);return y($,k)}Ai.wipeIn=B;function W(r,n={},o){let{angle:c,direction:d="right",invert:u=false,duration:m,delay:C,ease:h,completeOnContinue:T=true}=n,{aliasToRemoveAfter:P=[]}=n;typeof P=="string"&&(P=[P]),P.push(r);let I=f.find(r);if(!I){e$1.warn(`The canvas component "${r}" is not found.`);return}let x={kind:"wipe",angle:c??R(d),invert:u,bounds:Me(I)},g=S(r,{config:x,from:1,to:0,duration:m,delay:C,ease:h,completeOnContinue:T,aliasToRemoveAfter:P},o);if(g)return [g]}Ai.wipeOut=W;async function G(r,n,o={},c){let{origin:d={},aspect:u=1,invert:m=false,duration:C,delay:h,ease:T,completeOnContinue:P=true,animateOldComponentOut:I=true,direction:x="expand"}=o,{aliasToRemoveAfter:g=[]}=o;n||(n=r),typeof g=="string"&&(g=[g]);let{component:O,oldComponentAlias:k}=s(r,n,"iris"),D=a$1(k,I,g,se=>j(se,{...p(o),direction:x==="contract"?"expand":"contract"},c));(O instanceof J||O instanceof Q)&&O.haveEmptyTexture&&await O.load();let $={kind:"iris",outside:x==="contract",originX:d.x??.5,originY:d.y??.5,aspect:u,invert:m,bounds:Me(O)},V=S(r,{config:$,from:x==="contract"?1:0,to:x==="contract"?0:1,duration:C,delay:h,ease:T,completeOnContinue:P,aliasToRemoveAfter:g},c);return y(V,D)}Ai.irisIn=G;function j(r,n={},o){let{origin:c={},aspect:d=1,invert:u=false,duration:m,delay:C,ease:h,completeOnContinue:T=true,direction:P="expand"}=n,{aliasToRemoveAfter:I=[]}=n;typeof I=="string"&&(I=[I]),I.push(r);let x=f.find(r);if(!x){e$1.warn(`The canvas component "${r}" is not found.`);return}let g={kind:"iris",outside:P==="contract",originX:c.x??.5,originY:c.y??.5,aspect:d,invert:u,bounds:Me(x)},O=S(r,{config:g,from:P==="contract"?0:1,to:P==="contract"?1:0,duration:m,delay:C,ease:h,completeOnContinue:T,aliasToRemoveAfter:I},o);if(O)return [O]}Ai.irisOut=j;async function H(r,n,o={},c){let{orientation:d="vertical",direction:u="inward",origin:m=.5,invert:C=false,duration:h,delay:T,ease:P,completeOnContinue:I=true,animateOldComponentOut:x=true}=o,{aliasToRemoveAfter:g=[]}=o;n||(n=r),typeof g=="string"&&(g=[g]);let{component:O,oldComponentAlias:k}=s(r,n,"split"),D=a$1(k,x,g,se=>F(se,{...p(o),direction:u==="inward"?"outward":"inward"},c));(O instanceof J||O instanceof Q)&&O.haveEmptyTexture&&await O.load();let $={kind:"split",orientation:d,direction:u,origin:m,invert:C,bounds:Me(O)},V=S(r,{config:$,from:0,to:1,duration:h,delay:T,ease:P,completeOnContinue:I,aliasToRemoveAfter:g},c);return y(V,D)}Ai.splitIn=H;function F(r,n={},o){let{orientation:c="vertical",direction:d="inward",origin:u=.5,invert:m=false,duration:C,delay:h,ease:T,completeOnContinue:P=true}=n,{aliasToRemoveAfter:I=[]}=n;typeof I=="string"&&(I=[I]),I.push(r);let x=f.find(r);if(!x){e$1.warn(`The canvas component "${r}" is not found.`);return}let g={kind:"split",orientation:c,direction:d,origin:u,invert:m,bounds:Me(x)},O=S(r,{config:g,from:1,to:0,duration:C,delay:h,ease:T,completeOnContinue:P,aliasToRemoveAfter:I},o);if(O)return [O]}Ai.splitOut=F;async function X(r,n,o={},c){let{strength:d=32,quality:u=4,duration:m,delay:C,ease:h,completeOnContinue:T=true,fadeComponent:P=true,animateOldComponentOut:I=true}=o,{aliasToRemoveAfter:x=[]}=o;n||(n=r),typeof x=="string"&&(x=[x]);let{component:g,oldComponentAlias:O}=s(r,n,"blur"),k=a$1(O,I,x,se=>Y(se,p(o),c));(g instanceof J||g instanceof Q)&&g.haveEmptyTexture&&await g.load();let D=m??1;P&&l(r,g,"in",D,c);let $=new filters.BlurFilter({strength:d,quality:u}),V=ee(r,g,$,{strength:[d,0]},{duration:D,delay:C,ease:h,completeOnContinue:T,aliasToRemoveAfter:x},c);return y(V,k)}Ai.blurIn=X;function Y(r,n={},o){let{strength:c=32,quality:d=4,duration:u,delay:m,ease:C,completeOnContinue:h=true,fadeComponent:T=true}=n,{aliasToRemoveAfter:P=[]}=n;typeof P=="string"&&(P=[P]),P.push(r);let I=f.find(r);if(!I){e$1.warn(`The canvas component "${r}" is not found.`);return}let x=u??1;T&&l(r,I,"out",x,o);let g=new filters.BlurFilter({strength:0,quality:d}),O=ee(r,I,g,{strength:[0,c]},{duration:x,delay:m,ease:C,completeOnContinue:h,aliasToRemoveAfter:P},o);if(O)return [O]}Ai.blurOut=Y;async function L(r,n,o={},c){let{pixelSize:d=32,direction:u="up-left",duration:m,delay:C,ease:h,completeOnContinue:T=true,fadeComponent:P=false,animateOldComponentOut:I=true}=o,{aliasToRemoveAfter:x=[]}=o;n||(n=r),typeof x=="string"&&(x=[x]);let{component:g,oldComponentAlias:O}=s(r,n,"pixelate"),k=a$1(O,I,x,Ke=>N(Ke,p(o),c));(g instanceof J||g instanceof Q)&&g.haveEmptyTexture&&await g.load();let D=m??1;P&&l(r,g,"in",D,c);let $=ne(d,u,"in"),V=new filters.PixelateFilter([$.sizeX[0],$.sizeY[0]]),se=ee(r,g,V,$,{duration:D,delay:C,ease:h,completeOnContinue:T,aliasToRemoveAfter:x},c);return y(se,k)}Ai.pixelateIn=L;function N(r,n={},o){let{pixelSize:c=32,direction:d="up-left",duration:u,delay:m,ease:C,completeOnContinue:h=true,fadeComponent:T=false}=n,{aliasToRemoveAfter:P=[]}=n;typeof P=="string"&&(P=[P]),P.push(r);let I=f.find(r);if(!I){e$1.warn(`The canvas component "${r}" is not found.`);return}let x=u??1;T&&l(r,I,"out",x,o);let g=ne(c,d,"out"),O=new filters.PixelateFilter([g.sizeX[0],g.sizeY[0]]),k=ee(r,I,O,g,{duration:x,delay:m,ease:C,completeOnContinue:h,aliasToRemoveAfter:P},o);if(k)return [k]}Ai.pixelateOut=N;function ne(r,n,o){let c=o==="in"?1:-1,d=(n.endsWith("left")?1:-1)*c,u=(n.startsWith("up")?1:-1)*c,m=Math.max(1,Math.abs(r)),C=o==="in"?[m,1]:[1,m];return {sizeX:C.map(h=>h*d),sizeY:C.map(h=>h*u)}}async function Z(r,n,o={},c){let{color:d=16777215,maxAlpha:u=1,duration:m=.3,holdDuration:C=0,pulses:h=1,completeOnContinue:T=true,fadeComponent:P=true,...I}=o;n||(n=r);let x=f.find(r);if(x)return xe(r,x,n,{color:d,maxAlpha:u,fadeDuration:m,holdDuration:C,pulses:h,completeOnContinue:T,rest:I,priority:c});let{component:g}=s(r,n,"flash");(g instanceof J||g instanceof Q)&&g.haveEmptyTexture&&await g.load(),P&&l(r,g,"in",m,c);let O=[],k=fe(g,{color:d,maxAlpha:u,fadeDuration:m,holdDuration:C,pulses:h,completeOnContinue:T,aliasToRemoveAfter:[],rest:I,priority:c});if(k&&O.push(k),O.length>0)return O}Ai.flashIn=Z;function re(r,n={},o){let{color:c=16777215,maxAlpha:d=1,duration:u=.3,holdDuration:m=0,pulses:C=1,completeOnContinue:h=true,fadeComponent:T=true,...P}=n,I=f.find(r);if(!I){e$1.warn(`The canvas component "${r}" is not found.`);return}if(T){let{total:g}=v(d,u,m,C);l(r,I,"out",g,o);}let x=fe(I,{color:c,maxAlpha:d,fadeDuration:u,holdDuration:m,pulses:C,completeOnContinue:h,aliasToRemoveAfter:[r],rest:P,priority:o});if(x)return [x]}Ai.flashOut=re;function fe(r,n){let{values:o,times:c,total:d}=v(n.maxAlpha,n.fadeDuration,n.holdDuration,n.pulses,n.endAtPeak??false),u=new filters.ColorOverlayFilter({color:n.color,alpha:0});return ee(r.label,r,u,{alpha:o},{duration:d,times:c,delay:n.rest.delay,ease:n.rest.ease,aliasToRemoveAfter:n.aliasToRemoveAfter,completeOnContinue:n.completeOnContinue},n.priority)}async function xe(r,n,o,c){let{component:d,oldComponentAlias:u}=s(r,o,"flash");if(!u)return;let m=d.alpha,C=n.alpha;d.alpha=0,(d instanceof J||d instanceof Q)&&d.haveEmptyTexture&&await d.load();let{values:h,times:T,total:P}=v(c.maxAlpha,c.fadeDuration,c.holdDuration,c.pulses,true),I=P+c.fadeDuration,x=P/I,g={duration:I,delay:c.rest.delay,ease:c.rest.ease,completeOnContinue:c.completeOnContinue},O=ee(u,n,new filters.ColorOverlayFilter({color:c.color,alpha:0}),{alpha:[...h,c.maxAlpha]},{...g,times:[...T.map(se=>se*x),1],aliasToRemoveAfter:[u]},c.priority),k=ee(r,d,new filters.ColorOverlayFilter({color:c.color,alpha:c.maxAlpha}),{alpha:[c.maxAlpha,c.maxAlpha,0]},{...g,times:[0,x,1],aliasToRemoveAfter:c.rest.aliasToRemoveAfter},c.priority),D={duration:I,delay:c.rest.delay,times:[0,x,x,1],ease:"linear"},$=f.animate(u,{alpha:[C,C,0,0]},D,c.priority),V=f.animate(r,{alpha:[0,0,m,m]},D,c.priority);return c.completeOnContinue&&($&&tickers$1.completeOnStepEnd({id:$}),V&&tickers$1.completeOnStepEnd({id:V})),je([O,k,$,V])}function lt(r,n,o,c,d,u){if(!c)return;let m=c===true?40:c,C=o==="up"||o==="down"?"velocityY":"velocityX",h=o==="up"||o==="left"?-1:1,T=new filters.MotionBlurFilter({velocity:{x:0,y:0},kernelSize:15});return ee(r,n,T,{[C]:[0,h*m,0]},{duration:d.duration??.3,delay:d.delay,ease:d.ease,completeOnContinue:d.completeOnContinue,autoplay:d.autoplay},u)}function je(r){let n=r.filter(o=>!!o);return n.length>0?n:void 0}async function Te(r,n,o,c,d,u,m,C,h=false){let{duration:T,delay:P,ease:I,completeOnContinue:x=true,fadeComponent:g=d,animateOldComponentOut:O=true}=c,{aliasToRemoveAfter:k=[]}=c;typeof k=="string"&&(k=[k]);let{component:D,oldComponentAlias:$}=s(r,n??r,o),V=h&&!!$&&O,se=D.alpha;V&&(D.alpha=0);let Ke=()=>a$1($,O,k,C),pt=V?[]:Ke();(D instanceof J||D instanceof Q)&&D.haveEmptyTexture&&await D.load(),V&&pt.push(...Ke());let We=T??1,Ft=h&&pt.length>0?typeof P=="function"?(cn,dn)=>P(cn,dn)+We:(P??0)+We:P,qe;return V?(qe=f.animate(r,{alpha:[0,se]},{duration:g?We/4:0,delay:Ft},u),qe&&x&&tickers$1.completeOnStepEnd({id:qe})):g&&l(r,D,"in",We,u),je([...m(D,{duration:We,delay:Ft,ease:I,completeOnContinue:x},k),...pt,qe])}function Ce(r,n,o,c,d){let{duration:u,delay:m,ease:C,completeOnContinue:h=true,fadeComponent:T=o}=n,{aliasToRemoveAfter:P=[]}=n;typeof P=="string"&&(P=[P]),P.push(r);let I=f.find(r);if(!I){e$1.warn(`The canvas component "${r}" is not found.`);return}let x=u??1;return T&&l(r,I,"out",x,c,m),je(d(I,{duration:x,delay:m,ease:C,completeOnContinue:h},P))}function St(r){let{width:n,height:o}=r.getBounds();return Math.hypot(n,o)/2}function Ne(r){return {x:r?.x??.5,y:r?.y??.5}}function Et(r,n,o,c,d,u,m){let{strength:C=40,bursts:h=3,slices:T=8,rgbSplit:P=6}=c,I=k=>{let D=a(k,.5,h);return o==="in"?D:D.reverse()},x={...d,ease:d.ease??"linear"},g=new filters.GlitchFilter({slices:T,offset:0});g.refresh(),g.padding=Math.ceil(Math.abs(C));let O=[ee(r,n,g,{offset:I(C)},{...x,aliasToRemoveAfter:u},m)];if(P!==0){let k=I(P),D=new filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});D.padding=Math.ceil(Math.abs(P)),O.push(ee(r,n,D,{redX:k,blueX:k.map($=>-$)},x,m));}return O}async function xi(r,n,o={},c){return Te(r,n,"glitch",o,true,c,(d,u,m)=>Et(r,d,"in",o,u,m,c),d=>nn(d,p(o),c),true)}Ai.glitchIn=xi;function nn(r,n={},o){return Ce(r,n,true,o,(c,d,u)=>Et(r,c,"out",n,d,u,o))}Ai.glitchOut=nn;function Mt(r,n,o,c,d,u,m){let{angle:C=540,radius:h=St(n),origin:T}=c,P=Ne(T),I=C*Math.PI/180,x=o==="in"?[I,0]:[0,I],g=new filters.TwistFilter({radius:h,angle:x[0],offset:{x:0,y:0}}),{width:O,height:k}=n.getBounds();return g.padding=Math.max(g.padding,c$1({x:P.x*O,y:P.y*k},h,O,k)),[ee(r,n,g,{angle:x},{...d,aliasToRemoveAfter:u},m,()=>{let{x:$,y:V}=Ie(n,P);g.offsetX=$,g.offsetY=V;})]}async function Pi(r,n,o={},c){return Te(r,n,"twist",o,true,c,(d,u,m)=>Mt(r,d,"in",o,u,m,c),d=>rn(d,{...p(o),angle:-(o.angle??540)},c))}Ai.twistIn=Pi;function rn(r,n={},o){return Ce(r,n,true,o,(c,d,u)=>Mt(r,c,"out",n,d,u,o))}Ai.twistOut=rn;function _t(r,n,o,c,d,u,m){let{strength:C=.6,origin:h}=c,T=Ne(h),P=o==="in"?[C,0]:[0,C],I=new filters.ZoomBlurFilter({center:{x:0,y:0},strength:P[0]}),{width:x,height:g}=n.getBounds();return I.padding=d$2({x:T.x*x,y:T.y*g},C,x,g),[ee(r,n,I,{strength:P},{...d,aliasToRemoveAfter:u},m,()=>{let{x:k,y:D}=Ie(n,T);I.center={x:k,y:D};})]}async function vi(r,n,o={},c){return Te(r,n,"warp",o,true,c,(d,u,m)=>_t(r,d,"in",o,u,m,c),d=>sn(d,p(o),c),true)}Ai.warpIn=vi;function sn(r,n={},o){return Ce(r,n,true,o,(c,d,u)=>_t(r,c,"out",n,d,u,o))}Ai.warpOut=sn;function Rt(r,n,o,c,d,u){let{origin:m,amplitude:C=30,wavelength:h=160,speed:T=500}=o,P=Ne(m),{width:I,height:x}=n.getBounds(),g=new filters.ShockwaveFilter({center:{x:0,y:0},amplitude:C,wavelength:h,speed:T,time:0});g.padding=Math.ceil(Math.abs(C)*1.25);let O=e$2({x:P.x*I,y:P.y*x},{width:I,height:x},h,-1)/T;return [ee(r,n,g,{time:[0,O]},{...c,aliasToRemoveAfter:d},u,()=>{let{x:D,y:$}=Ie(n,P);g.center={x:D,y:$};})]}async function Ii(r,n,o={},c){return Te(r,n,"ripple",o,true,c,(d,u,m)=>Rt(r,d,o,u,m,c),d=>b(d,{duration:o.duration,delay:o.delay,ease:o.ease,completeOnContinue:o.completeOnContinue},c))}Ai.rippleIn=Ii;function Ti(r,n={},o){return Ce(r,n,true,o,(c,d,u)=>Rt(r,c,n,d,u,o))}Ai.rippleOut=Ti;function kt(r,n,o,c,d,u,m){let{edge:C="hard",noiseScale:h=8,seed:T=Math.random()*1e3}=c,[P,I]=C==="hard"?[.25,.75]:[0,1],x=o==="in"?[P,I]:[I,P],g=new filters.SimplexNoiseFilter({strength:x[0],noiseScale:h,offsetZ:T,step:C==="hard"?.5:0});return [ee(r,n,g,{strength:x},{...d,aliasToRemoveAfter:u},m)]}async function Ci(r,n,o={},c){return Te(r,n,"noise",o,false,c,(d,u,m)=>kt(r,d,"in",o,u,m,c),d=>on(d,p(o),c))}Ai.noiseDissolveIn=Ci;function on(r,n={},o){return Ce(r,n,false,o,(c,d,u)=>kt(r,c,"out",n,d,u,o))}Ai.noiseDissolveOut=on;function Bt(r,n,o,c,d,u,m){let{lineThickness:C=.02,brightness:h=3,scanlines:T=true}=c,P=n.scale.x,I=n.scale.y,x=I*C,g=o==="in"?[0,.45,1]:[0,.55,1],O=o==="in"?[0,P,P]:[P,P,0],k=o==="in"?[x,x,I]:[I,x,x],D=o==="in"?[h,h,1]:[1,h,h];o==="in"&&n.scale.set(0,x);let $=[f.animate(r,{scaleX:O,scaleY:k},{duration:d.duration,delay:d.delay,ease:d.ease,times:g,completeOnContinue:d.completeOnContinue,aliasToRemoveAfter:u},m),ee(r,n,new filters.AdjustmentFilter({brightness:D[0]}),{brightness:D},{...d,times:g},m)];if(T){let V=o==="in"?[.5,.5,0]:[0,.5,.5];$.push(ee(r,n,new filters.CRTFilter({curvature:0,vignettingAlpha:0,lineWidth:3,lineContrast:V[0],noise:V[0]}),{lineContrast:V,noise:V},{...d,times:g},m));}return $}async function bi(r,n,o={},c){return Te(r,n,"tv",o,false,c,(d,u,m)=>Bt(r,d,"in",o,u,m,c),d=>an(d,p(o),c),true)}Ai.tvIn=bi;function an(r,n={},o){return Ce(r,n,false,o,(c,d,u)=>Bt(r,c,"out",n,d,u,o))}Ai.tvOut=an;function Dt(r,n,o,c,d,u,m){let{strength:C=1,mode:h="pinch",radius:T=St(n),origin:P}=c,I=(h==="bulge"?1:-1)*C,x=Ne(P),g=o==="in"?[I,0]:[0,I],O=new filters.BulgePinchFilter({center:x,radius:T,strength:g[0]});if(h==="bulge"){let{width:D,height:$}=n.getBounds();O.padding=c$1({x:x.x*D,y:x.y*$},T,D,$);}return [ee(r,n,O,{strength:g},{...d,aliasToRemoveAfter:u},m,()=>{let{x:D,y:$,area:V}=Ie(n,x);O.center={x:D/V.width,y:$/V.height};})]}async function Oi(r,n,o={},c){return Te(r,n,"pinch",o,true,c,(d,u,m)=>Dt(r,d,"in",o,u,m,c),d=>b(d,{duration:o.duration,delay:o.delay,ease:o.ease,completeOnContinue:o.completeOnContinue},c))}Ai.pinchIn=Oi;function wi(r,n={},o){return Ce(r,n,true,o,(c,d,u)=>Dt(r,c,"out",n,d,u,o))}Ai.pinchOut=wi;})(pe||={});var Ve=class extends Pe{constructor(i){super(i);this._memory=i;this.pixivnId=i.pixivnId;}_memory;pixivnId;get memory(){return {...this._memory,...super.memory,elements:[],pixivnId:this.pixivnId}}};function pi(){return async(e,i)=>{try{let s=e.canvasElementInfo;if(s){let a=new Ve(s),p=s.zIndex;a.groupColor=16711680;let y=new we.Graphics;y.rect(0,0,300,100).fill({color:16711680,alpha:.5}),a.addChild(y);let R=new we.Text({text:`Error: ${s.label}`,x:10,y:10});a.addChild(R);let S=e.parent;if(S&&"addChild"in S)p!==void 0?S.addChildAt(a,p):S.addChild(a);else {let l=s.parentLabel?f.find(s.parentLabel):void 0;if(l)p!==void 0?l.addChildAt(a,p):l.addChild(a);else {let v=s.label??s.pixivnId;f.add(v,a,{zIndex:p});}}}}catch{}}}function hi(t,e,i){let s={...f.find(t)?.memory,...i},a=new Ee({text:e,...i});return s&&f.copyCanvasElementProperty(s,a),f.add(t,a,{ignoreOldStyle:true,zIndex:i?.zIndex}),a}var {Assets:So,Color:Eo,Rectangle:Mo,TextStyle:_o,Texture:Ro,UPDATE_PRIORITY:ko}=we,f=new Xe;ae.init({getScreen:()=>f.screen});GameUnifier.addOnPreContinue(async()=>{try{let{tikersIds:t,stepAlias:e}=drainCompleteOnStepEndQueue(),i=(async()=>{for(;t.length;){let{id:a}=t.pop()||{};a&&await tickers$1.forceCompletion(a);}})(),s=(async()=>{for(;e.length;){let{alias:a,id:p}=e.pop()||{};a&&p&&await tickers$1.forceCompletion(p,a);}})();await Promise.all([i,s]);}catch{}});
|
|
2
|
+
export{So as Assets,at as CanvasBaseItem,ie as CanvasManagerStatic,w as CanvasPropertyUtility,Eo as Color,Pe as Container,Q as ImageContainer,J as ImageSprite,Mo as Rectangle,de as RegisteredCanvasComponents,yt as RegisteredEvents,Se as Sprite,Ee as Text,_o as TextStyle,Ro as Texture,ko as UPDATE_PRIORITY,ye as VideoSprite,ut as addImage,dt as addImageCointainer,Oe as addListenerHandler,ft as addVideo,ge as analizePositionsExtensionProps,f as canvas,gn as canvasComponentDecorator,At as createFilterTransitionApplier,pi as drawCanvasErrorHandler,Ot as effects,pn as eventDecorator,$e as getTexture,ai as moveIn,ci as moveOut,fi as pushIn,li as pushOut,ri as removeWithDissolve,oi as removeWithFade,le as setMemoryContainer,Gn as shakeEffect,ti as showImage,ei as showImageContainer,hi as showText,ni as showVideo,ii as showWithDissolve,si as showWithFade,pe as transitions,di as zoomIn,ui as zoomOut};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function l(e,n,m){let t=[0],r=e;for(let h=0;h<m;h++)t.push(r,-r*.6,r*.3,0),r*=n;return t}function M(e,n,m,t){let r=m.reduce((b,y)=>y.enabled?b+y.padding:b,0),h=e.x,a=e.y,u=e.x+e.width,i=e.y+e.height;t&&(h=Math.max(h,0),a=Math.max(a,0),u=Math.min(u,t.width),i=Math.min(i,t.height));let x={x:h-r,y:a-r,width:u-h+r*2,height:i-a+r*2};return {x:e.x+n.x*e.width-x.x,y:e.y+n.y*e.height-x.y,area:x}}function c(e,n,m,t){return Math.max(0,Math.ceil(n-Math.min(e.x,e.y,m-e.x,t-e.y)))}function g(e,n,m,t){let r=Math.min(Math.max(n,0),.5),h=Math.hypot(Math.max(e.x,m-e.x),Math.max(e.y,t-e.y));return Math.ceil(h*r/(1-r))}function d(e,n,m,t){return t>0?t:Math.hypot(Math.max(e.x,n.width-e.x),Math.max(e.y,n.height-e.y))+m/2}export{l as a,M as b,c,g as d,d as e};
|
package/dist/core.d.cts
CHANGED
|
@@ -147,7 +147,10 @@ declare class GameUnifier {
|
|
|
147
147
|
* tear down whatever `apply` was driving.
|
|
148
148
|
* @returns The id of the ticker.
|
|
149
149
|
*/
|
|
150
|
-
animateFilter: (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void
|
|
150
|
+
animateFilter: (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void, valueRef?: {
|
|
151
|
+
alias: string;
|
|
152
|
+
config: unknown;
|
|
153
|
+
}) => string | undefined;
|
|
151
154
|
/**
|
|
152
155
|
* This function removes one or more canvas components by alias. Used by the `tickers` module's
|
|
153
156
|
* `onComplete` to honor `aliasToRemoveAfter` without importing `@drincs/pixi-vn/canvas` directly
|
|
@@ -352,7 +355,10 @@ declare class GameUnifier {
|
|
|
352
355
|
* instead.
|
|
353
356
|
* @returns The id of the ticker.
|
|
354
357
|
*/
|
|
355
|
-
static get animateFilter(): (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void
|
|
358
|
+
static get animateFilter(): (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void, valueRef?: {
|
|
359
|
+
alias: string;
|
|
360
|
+
config: unknown;
|
|
361
|
+
}) => string | undefined;
|
|
356
362
|
private static _removeCanvasComponent;
|
|
357
363
|
/**
|
|
358
364
|
* Removes one or more canvas components by alias. See the `removeCanvasComponent` option of
|
package/dist/core.d.ts
CHANGED
|
@@ -147,7 +147,10 @@ declare class GameUnifier {
|
|
|
147
147
|
* tear down whatever `apply` was driving.
|
|
148
148
|
* @returns The id of the ticker.
|
|
149
149
|
*/
|
|
150
|
-
animateFilter: (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void
|
|
150
|
+
animateFilter: (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void, valueRef?: {
|
|
151
|
+
alias: string;
|
|
152
|
+
config: unknown;
|
|
153
|
+
}) => string | undefined;
|
|
151
154
|
/**
|
|
152
155
|
* This function removes one or more canvas components by alias. Used by the `tickers` module's
|
|
153
156
|
* `onComplete` to honor `aliasToRemoveAfter` without importing `@drincs/pixi-vn/canvas` directly
|
|
@@ -352,7 +355,10 @@ declare class GameUnifier {
|
|
|
352
355
|
* instead.
|
|
353
356
|
* @returns The id of the ticker.
|
|
354
357
|
*/
|
|
355
|
-
static get animateFilter(): (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void
|
|
358
|
+
static get animateFilter(): (components: string | string[], filter: Filter | undefined, keyframes: any, options?: any, priority?: UPDATE_PRIORITY, apply?: (value: number) => void, cleanup?: () => void, valueRef?: {
|
|
359
|
+
alias: string;
|
|
360
|
+
config: unknown;
|
|
361
|
+
}) => string | undefined;
|
|
356
362
|
private static _removeCanvasComponent;
|
|
357
363
|
/**
|
|
358
364
|
* Removes one or more canvas components by alias. See the `removeCanvasComponent` option of
|