@drincs/pixi-vn-json 1.14.0 → 1.16.1
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/README.md +1 -3
- package/dist/{PixiVNJsonLabelStep-Bce6KGwp.d.ts → PixiVNJsonLabelStep-BrRDO4iZ.d.ts} +570 -10
- package/dist/{PixiVNJsonLabelStep-GNKlmb4l.d.cts → PixiVNJsonLabelStep-D1MiCvp5.d.cts} +570 -10
- package/dist/actions.cjs +2 -2
- package/dist/actions.d.cts +7 -5
- package/dist/actions.d.ts +7 -5
- package/dist/actions.mjs +2 -2
- package/dist/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +6 -1
- package/dist/core.d.ts +6 -1
- package/dist/core.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +2 -2
- package/dist/interpreter.cjs +1 -1
- package/dist/interpreter.d.cts +2 -1
- package/dist/interpreter.d.ts +2 -1
- package/dist/interpreter.mjs +1 -1
- package/dist/schema.d.cts +3 -2
- package/dist/schema.d.ts +3 -2
- package/dist/translator.d.cts +2 -1
- package/dist/translator.d.ts +2 -1
- package/package.json +2 -2
- package/scripts/generate-entrance-transition-schemas.mjs +28 -2
- package/scripts/schema-generator.mjs +13 -1
package/dist/actions.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var core=require('@drincs/pixi-vn-json/core'),canvas=require('@drincs/pixi-vn/canvas'),translator=require('@drincs/pixi-vn-json/translator'),narration=require('@drincs/pixi-vn/narration'),sound=require('@drincs/pixi-vn/sound'),pixiVn=require('@drincs/pixi-vn'),storage=require('@drincs/pixi-vn/storage');async function je(e){let i=core.JsonUnifier.getLogichValue(e,{});if(i)switch(i.type){case "assets":switch(i.operationType){case "load":await canvas.Assets.load(i.aliases);break;case "lazyload":canvas.Assets.backgroundLoad(i.aliases);break}break;case "bundle":switch(i.operationType){case "load":await canvas.Assets.loadBundle(i.aliases);break;case "lazyload":canvas.Assets.backgroundLoadBundle(i.aliases);break}break}}var a;(o=>(o.log=(r,...p)=>console.log(`[Pixi\u2019VN Json] ${r}`,...p),o.warn=(r,...p)=>console.warn(`[Pixi\u2019VN Json] ${r}`,...p),o.error=(r,...p)=>console.error(`[Pixi\u2019VN Json] ${r}`,...p),o.info=(r,...p)=>console.info(`[Pixi\u2019VN Json] ${r}`,...p)))(a||={});async function J(e,i,t){switch(t.type){case "fade":await canvas.showWithFade(i.alias,e,t.props,t.priority);break;case "dissolve":await canvas.showWithDissolve(i.alias,e,t.props,t.priority);break;case "movein":case "moveout":await canvas.moveIn(i.alias,e,t.props,t.priority);break;case "zoomin":case "zoomout":await canvas.zoomIn(i.alias,e,t.props,t.priority);break;case "pushin":case "pushout":await canvas.pushIn(i.alias,e,t.props,t.priority);break}}function v(e){if(e.transition)switch(e.transition.type){case "fade":canvas.removeWithFade(e.alias,e.transition.props,e.transition.priority);break;case "dissolve":canvas.removeWithDissolve(e.alias,e.transition.props,e.transition.priority);break;case "movein":case "moveout":canvas.moveOut(e.alias,e.transition.props,e.transition.priority);break;case "zoomin":case "zoomout":canvas.zoomOut(e.alias,e.transition.props,e.transition.priority);break;case "pushin":case "pushout":canvas.pushOut(e.alias,e.transition.props,e.transition.priority);break}else canvas.canvas.remove(e.alias);}async function Re(e){switch(e.operationType){case "show":if(e.transition){let i=new canvas.ImageSprite(e.props,e.url||e.alias);await J(i,e,e.transition);}else await canvas.showImage(e.alias,e.url,e.props);break;case "edit":{let i=canvas.canvas.find(e.alias);i?e.props&&await i.setMemory({...i.memory,...e.props}):a.error(`Image with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function ze(e){switch(e.operationType){case "show":if(e.transition){let i=new canvas.VideoSprite(e.props,e.url||e.alias);await J(i,e,e.transition);}else await canvas.showVideo(e.alias,e.url,e.props);break;case "edit":{let i=canvas.canvas.find(e.alias);i?e.props&&await i.setMemory({...i.memory,...e.props}):a.error(`Video with alias ${e.alias} not found.`);break}case "remove":v(e);break;case "pause":case "resume":{let i=canvas.canvas.find(e.alias);i?i.paused=e.operationType==="pause":a.error(`Video with alias ${e.alias} not found.`);break}}}async function De(e){switch(e.operationType){case "show":if(e.transition){let i=new canvas.ImageContainer(e.props,e.urls);await J(i,e,e.transition);}else await canvas.showImageContainer(e.alias,e.urls,e.props);break;case "edit":{let i=canvas.canvas.find(e.alias);i?e.props&&await i.setMemory({...i.memory,...e.props}):a.error(`ImageContainer with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function _e(e){switch(e.operationType){case "show":if(e.props=e.props||{},e.props.text=translator.translator.t(e.text),e.transition){let i=new canvas.Text(e.props);await J(i,e,e.transition);}else canvas.showText(e.alias,e.text,e.props);break;case "edit":{let i=canvas.canvas.find(e.alias);i?e.props&&await i.setMemory({...i.memory,...e.props}):a.error(`Text with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Me(e){switch(e.operationType){case "edit":try{let i=canvas.canvas.find(e.alias);i?e.props&&i.setMemory({...i.memory,...e.props}):a.error(`Canvas Element with alias ${e.alias} not found.`);}catch(i){a.error(`There was an error while trying to edit the canvas element with alias ${e.alias}.`,i);}break;case "remove":v(e);break}}function Ge(e){e.operationType==="clear"&&canvas.canvas.removeAll();}async function $e(e){e.type==="shake"&&await canvas.shakeEffect(e.alias,e.props,e.priority);}function Fe(e){switch(e.type){case "animate":canvas.canvas.animate(e.alias,e.keyframes,e.options,e.priority);break;case "animate-sequence":canvas.canvas.animate(e.alias,e.sequence,e.options,e.priority);break}}var ue={type:"object",properties:{isRenderGroup:{type:"boolean"},blendMode:{enum:["inherit","normal","add","multiply","screen","darken","lighten","erase","color-dodge","color-burn","linear-burn","linear-dodge","linear-light","hard-light","soft-light","pin-light","difference","exclusion","overlay","saturation","color","luminosity","normal-npm","add-npm","screen-npm","none","subtract","divide","vivid-light","hard-mix","negation","min","max"]},tint:{type:["string","number","object"]},alpha:{type:"number"},angle:{type:"number"},children:{type:"object"},parent:{type:"object"},renderable:{type:"boolean"},rotation:{type:"number"},scale:{type:["number","object"]},pivot:{type:["number","object"]},origin:{type:["number","object"]},position:{type:"object"},skew:{type:"object"},visible:{type:"boolean"},x:{type:"number"},y:{type:"number"},boundsArea:{type:"object"},accessible:{type:"boolean"},accessibleTitle:{type:"string"},accessibleHint:{type:"string"},tabIndex:{type:"number"},accessibleType:{enum:["object","label","a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]},accessiblePointerEvents:{enum:["inherit","none","auto","visiblePainted","visibleFill","visibleStroke","visible","painted","fill","stroke","all"]},accessibleText:{type:"string"},accessibleChildren:{type:"boolean"},cullArea:{type:"object"},cullable:{type:"boolean"},cullableChildren:{type:"boolean"},cursor:{anyOf:[{const:"none"},{const:"progress"},{const:"auto"},{const:"default"},{const:"context-menu"},{const:"help"},{const:"pointer"},{const:"wait"},{const:"cell"},{const:"crosshair"},{const:"text"},{const:"vertical-text"},{const:"alias"},{const:"copy"},{const:"move"},{const:"no-drop"},{const:"not-allowed"},{const:"e-resize"},{const:"n-resize"},{const:"ne-resize"},{const:"nw-resize"},{const:"s-resize"},{const:"se-resize"},{const:"sw-resize"},{const:"w-resize"},{const:"ns-resize"},{const:"ew-resize"},{const:"nesw-resize"},{const:"col-resize"},{const:"nwse-resize"},{const:"row-resize"},{const:"all-scroll"},{const:"zoom-in"},{const:"zoom-out"},{const:"grab"},{const:"grabbing"},{type:"string"}]},eventMode:{enum:["none","auto","passive","static","dynamic"]},interactive:{type:"boolean"},interactiveChildren:{type:"boolean"},hitArea:{type:"object"},width:{type:"number"},height:{type:"number"},mask:{type:["number","object"]},filters:{type:"object"},label:{type:"string"},zIndex:{type:"number"},sortDirty:{type:"boolean"},sortableChildren:{type:"boolean"},pixivnId:{type:"string"},index:{type:"number"},parentLabel:{type:"string"},onEvents:{type:"object"},align:{type:["number","object"]},xAlign:{type:"number"},yAlign:{type:"number"},percentagePosition:{type:["number","object"]},percentageX:{type:"number"},percentageY:{type:"number"}},required:["pixivnId"],additionalProperties:false};var me={dissolve:{type:"object",properties:{completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},fade:{type:"object",properties:{completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},movein:{type:"object",properties:{direction:{enum:["left","right","up","down"]},completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},zoomin:{type:"object",properties:{direction:{enum:["left","right","up","down"]},completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},pushin:{type:"object",properties:{direction:{enum:["left","right","up","down"]},completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false}};var Ye=["dissolve","fade","movein","zoomin","pushin"];async function Ke(e,i,t,n){switch(t){case "dissolve":return canvas.showWithDissolve(e,i,n);case "fade":return canvas.showWithFade(e,i,n);case "movein":return canvas.moveIn(e,i,n);case "zoomin":return canvas.zoomIn(e,i,n);case "pushin":return canvas.pushIn(e,i,n)}}function tt(e){switch(e.type){case "input":narration.narration.input.request({type:e.valueType},e.defaultValue);break;case "dialogue":narration.narration.dialogue=void 0;break}}function at(e){switch(e.operationType){case "play":e.url?sound.sound.play(e.alias,e.url,e.props):sound.sound.play(e.alias,e.props);break;case "stop":switch(e.type){case "sound":sound.sound.stop(e.alias);break;case "all":sound.sound.stopAll();break}break;case "pause":switch(e.type){case "sound":sound.sound.pause(e.alias);break;case "channel":sound.sound.channels.find(e.alias).pauseAll();break;case "all":sound.sound.pauseAll();break}break;case "resume":switch(e.type){case "sound":sound.sound.resume(e.alias);break;case "channel":sound.sound.channels.find(e.alias).resumeAll();break;case "all":sound.sound.resumeAll();break}break;case "edit":Object.entries(e.props).forEach(([i,t])=>{let n=sound.sound.find(e.alias);n&&(i==="volume"?n.volume.value=t:n.paused=t);});break}}var w="___param___";var h=class e{static init(i){i.loadAssets&&(e._loadAssets=i.loadAssets),i.soundOperation&&(e._soundOperation=i.soundOperation),i.imageOperation&&(e._imageOperation=i.imageOperation),i.videoOperation&&(e._videoOperation=i.videoOperation),i.imageContainerOperation&&(e._imageContainerOperation=i.imageContainerOperation),i.textOperation&&(e._textOperation=i.textOperation),i.canvasElementOperation&&(e._canvasElementOperation=i.canvasElementOperation),i.setStorageValue&&(e._setStorageValue=i.setStorageValue),i.setInitialStorageValue&&(e._setInitialStorageValue=i.setInitialStorageValue),i.narrationOperation&&(e._narrationOperation=i.narrationOperation),i.effectOperation&&(e._effectOperation=i.effectOperation),i.animateOperation&&(e._animateOperation=i.animateOperation),i.canvasOperation&&(e._canvasOperation=i.canvasOperation),i.getLogichValue&&(e._getLogichValue=i.getLogichValue),i.getConditionalStep&&(e._getConditionalStep=i.getConditionalStep);}static _loadAssets=()=>{};static get loadAssets(){return e._loadAssets}static _soundOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get soundOperation(){return e._soundOperation}static _imageOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageOperation(){return e._imageOperation}static _videoOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get videoOperation(){return e._videoOperation}static _imageContainerOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageContainerOperation(){return e._imageContainerOperation}static _textOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get textOperation(){return e._textOperation}static _canvasElementOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasElementOperation(){return e._canvasElementOperation}static _setStorageValue=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setStorageValue(){return e._setStorageValue}static _setInitialStorageValue=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setInitialStorageValue(){return e._setInitialStorageValue}static _narrationOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get narrationOperation(){return e._narrationOperation}static _effectOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get effectOperation(){return e._effectOperation}static _animateOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get animateOperation(){return e._animateOperation}static _canvasOperation=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasOperation(){return e._canvasOperation}static _getLogichValue=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getLogichValue(){return e._getLogichValue}static _getConditionalStep=()=>{throw a.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getConditionalStep(){return e._getConditionalStep}};function z(e,i){if(i&&typeof i=="object"&&typeof e.functionName=="string"&&e.functionName in i){let t=i[e.functionName];if(typeof t=="function"){let n=e.args.map(o=>h.getLogichValue(o,i));return t(...n)}else a.warn(`getLogichValue function ${e.functionName} not found in props`);}}function D(e,i){let t=core.JsonUnifier.getLogichValue(e,i);return t&&typeof t=="object"&&"type"in t?core.JsonUnifier.getLogichValue(t,i):t}function wt(e,i={}){let t=D(e.value,i);switch(e.storageType){case "flagStorage":storage.storage.flags.set(e.key,e.value);break;case "storage":storage.storage.set(e.key,t);break;case "tempstorage":storage.storage.temp.set(e.key,t);break;case "params":{let n=storage.storage.get(`${w}${narration.narration.labels.opened.length-1}`)||[];n.length>e.key&&(n[e.key]=t),storage.storage.temp.set(`${w}${narration.narration.labels.opened.length-1}`,n);break}}}function St(e,i={}){let t=D(e.value,i);switch(e.storageType){case "storage":case "tempstorage":storage.storage.default={[e.key]:t};break}}function A(e,i={}){let t=k(e,i);if(t&&typeof t=="object"&&"type"in t)switch(t.type){case "value":return Pe(t,i);case "arithmetic":case "arithmeticsingle":return Ve(t,i);case "compare":case "union":return ve(t,i);case "function":return z(t,i)}return t}function Ve(e,i){let t=core.JsonUnifier.getLogichValue(e.leftValue,i);switch(e.type){case "arithmetic":{let n=core.JsonUnifier.getLogichValue(e.rightValue,i);switch(e.operator){case "*":return t*n;case "/":return t/n;case "+":return typeof t=="string"||typeof n=="string"?`${t}${n}`:Array.isArray(t)&&Array.isArray(n)?[...t,...n]:Array.isArray(t)?[...t,n]:Array.isArray(n)?[t,...n]:t+n;case "-":if(Array.isArray(t)&&Array.isArray(n))return t.filter(o=>!n.includes(o));if(Array.isArray(t))return t.filter(o=>o!==n);if(Array.isArray(n)){a.warn("getValueFromArithmeticOperations cannot subtract array from non-array");return}return t-n;case "%":return t%n;case "POW":return t**n;case "RANDOM":return narration.narration.getRandomNumber(t,n);case "INTERSECTION":if(Array.isArray(t)&&Array.isArray(n))return t.filter(o=>n.includes(o));a.warn("getValueFromArithmeticOperations cannot intersect non-array values");return;default:a.warn("getValueFromArithmeticOperations unknown operator",e);return}}case "arithmeticsingle":switch(e.operator){case "INT":return Number(t);case "FLOOR":return Math.floor(t);}break}}function Pe(e,i){if(e&&typeof e=="object"&&"type"in e&&e.type==="value"&&e.storageOperationType==="get")switch(e.storageType){case "storage":case "tempstorage":return e.key==="_input_value_"?narration.narration.input.value:storage.storage.get(e.key);case "flagStorage":return storage.storage.flags.get(e.key);case "label":return narration.narration.queries.timesLabelOpened(e.label);case "choice":return narration.narration.queries.timesChoiceMade(e.index);case "logic":return core.JsonUnifier.getLogichValue(e.operation,i);case "params":{let t=storage.storage.get(`${w}${narration.narration.labels.opened.length-1}`)||[];if(t&&t.length>e.key)return t[e.key];a.warn("getValue params not found");return}}return e}function ve(e,i){if(!e)return false;if(typeof e!="object"||!("type"in e))return !!e;switch(e.type){case "compare":{let t=core.JsonUnifier.getLogichValue(e.leftValue,i),n=core.JsonUnifier.getLogichValue(e.rightValue,i);switch(e.operator){case "==":return Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every(o=>n.includes(o)):t===n;case "!=":return Array.isArray(t)&&Array.isArray(n)?t.length!==n.length||!t.every(o=>n.includes(o)):t!==n;case "<":return typeof t=="string"&&typeof n=="string"?t.localeCompare(n)<0:Array.isArray(t)&&Array.isArray(n)?t.length<n.length:t<n;case "<=":return typeof t=="string"&&typeof n=="string"?t.localeCompare(n)<=0:Array.isArray(t)&&Array.isArray(n)?t.length<=n.length:t<=n;case ">":return typeof t=="string"&&typeof n=="string"?t.localeCompare(n)>0:Array.isArray(t)&&Array.isArray(n)?t.length>n.length:t>n;case ">=":return typeof t=="string"&&typeof n=="string"?t.localeCompare(n)>=0:Array.isArray(t)&&Array.isArray(n)?t.length>=n.length:t>=n;case "CONTAINS":return Array.isArray(t)&&Array.isArray(n)?n.every(o=>t.includes(o)):Array.isArray(t)?t.includes(n):t.toString().includes(n.toString())}break}case "value":{let t=core.JsonUnifier.getLogichValue(e,i);return Array.isArray(t)?t.length>0:t&&typeof t=="object"?Object.keys(t).length>0:!!t}case "union":return Ne(e,i)}return !!e}function Ne(e,i){if(e.unionType==="not"){let n=A(e.condition,i);return Array.isArray(n)?n.length===0:n&&typeof n=="object"?Object.keys(n).length===0:!n}let t=n=>core.JsonUnifier.getLogichValue(n,i)||false;return e.unionType==="and"?e.conditions.every(t):e.conditions.some(t)}function Te(e,i){return Math.floor(Math.random()*(i-e+1)+e)}function k(e,i={}){if(Array.isArray(e)||!e)return e;if(e&&typeof e=="object"&&"type"in e)switch(e.type){case "resulttocombine":return Je(e,i);case "ifelse":return core.JsonUnifier.getLogichValue(e.condition,i)?core.JsonUnifier.getLogichValue(e.then,i):core.JsonUnifier.getLogichValue(e.else,i);case "stepswitch":{let t=core.JsonUnifier.getLogichValue(e.elements,i)||[];if(t.length===0){a.error("getValueFromConditionalStatements elements.length === 0");return}switch(e.choiceType){case "random":{let n=Te(0,t.length-1);return core.JsonUnifier.getLogichValue(t[n],i)}case "loop":{let n=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return n>t.length-1?(n=n%t.length,core.JsonUnifier.getLogichValue(t[n],i)):core.JsonUnifier.getLogichValue(t[n],i)}case "sequential":{let n,o=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return e.end==="lastItem"&&(n=core.JsonUnifier.getLogichValue(t[t.length-1],i)),o>t.length-1?n:core.JsonUnifier.getLogichValue(t[o],i)}case "sequentialrandom":{let n=narration.NarrationManagerStatic.getRandomNumber(0,t.length-1,{nestedId:e.nestedId,onceOnly:true});if(n===void 0&&e.end==="lastItem"){let o=narration.NarrationManagerStatic.getCurrentStepTimesCounterData(e.nestedId);if(!o?.usedRandomNumbers){a.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}let r=o.usedRandomNumbers[`0-${t.length-1}`];return core.JsonUnifier.getLogichValue(t[r[r.length-1]],i)}if(n===void 0){a.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}return core.JsonUnifier.getLogichValue(t[n],i)}}}}return e}function _(e,i={}){if(e.conditionalStep){let t=pixiVn.createExportableElement(core.JsonUnifier.getLogichValue(e.conditionalStep,i));if(t?.glueEnabled===void 0&&delete t?.glueEnabled,t?.goNextStep===void 0&&delete t?.goNextStep,t?.end===void 0&&delete t?.end,t?.choices===void 0&&delete t?.choices,t?.dialogue===void 0&&delete t?.dialogue,t?.labelToOpen===void 0&&delete t?.labelToOpen,t?.operations===void 0&&delete t?.operations,t){let n={...e,conditionalStep:void 0,...t};return _(n,i)}else narration.narration.dialogGlue&&(narration.narration.dialogGlue=false);}return e}function Je(e,i){let t=e.firstItem,n=(e.secondConditionalItem??[]).flatMap(r=>Array.isArray(r)?r.map(p=>core.JsonUnifier.getLogichValue(p,i)):[core.JsonUnifier.getLogichValue(r,i)]),o=t?[t,...n]:n;if(o.length===0){a.warn("combinateResult toCheck.length === 0");return}if(typeof o[0]=="string")return translator.translator.t(o);if(typeof o[0]=="object"){let r=o,p,V=false,P=r.map((c,f)=>{c=_(c,i);let l=core.JsonUnifier.getLogichValue(c.dialogue,i)||"";return f===0?(p=core.JsonUnifier.getLogichValue(c.glueEnabled,i)||false,l):(typeof l=="object"&&"text"in l&&(l=`${l.character}: ${l.text}`),p===false&&V&&(l=`
|
|
1
|
+
'use strict';var core=require('@drincs/pixi-vn-json/core'),canvas=require('@drincs/pixi-vn/canvas'),translator=require('@drincs/pixi-vn-json/translator'),narration=require('@drincs/pixi-vn/narration'),sound=require('@drincs/pixi-vn/sound'),pixiVn=require('@drincs/pixi-vn'),storage=require('@drincs/pixi-vn/storage');async function xe(e){let t=core.JsonUnifier.getLogichValue(e,{});if(t)switch(t.type){case "assets":switch(t.operationType){case "load":await canvas.Assets.load(t.aliases);break;case "lazyload":canvas.Assets.backgroundLoad(t.aliases);break}break;case "bundle":switch(t.operationType){case "load":await canvas.Assets.loadBundle(t.aliases);break;case "lazyload":canvas.Assets.backgroundLoadBundle(t.aliases);break}break}}var r;(a=>(a.log=(o,...y)=>console.log(`[Pixi\u2019VN Json] ${o}`,...y),a.warn=(o,...y)=>console.warn(`[Pixi\u2019VN Json] ${o}`,...y),a.error=(o,...y)=>console.error(`[Pixi\u2019VN Json] ${o}`,...y),a.info=(o,...y)=>console.info(`[Pixi\u2019VN Json] ${o}`,...y)))(r||={});async function N(e,t,n){let{alias:i}=t,{props:a,priority:o}=n;switch(n.type){case "fade":await canvas.transitions.showWithFade(i,e,a,o);break;case "dissolve":await canvas.transitions.showWithDissolve(i,e,a,o);break;case "movein":case "moveout":await canvas.transitions.moveIn(i,e,a,o);break;case "zoomin":case "zoomout":await canvas.transitions.zoomIn(i,e,a,o);break;case "pushin":case "pushout":await canvas.transitions.pushIn(i,e,a,o);break;case "wipein":case "wipeout":await canvas.transitions.wipeIn(i,e,a,o);break;case "irisin":case "irisout":await canvas.transitions.irisIn(i,e,a,o);break;case "splitin":case "splitout":await canvas.transitions.splitIn(i,e,a,o);break;case "blurin":case "blurout":await canvas.transitions.blurIn(i,e,a,o);break;case "pixelatein":case "pixelateout":await canvas.transitions.pixelateIn(i,e,a,o);break;case "flashin":case "flashout":await canvas.transitions.flashIn(i,e,a,o);break;case "glitchin":case "glitchout":await canvas.transitions.glitchIn(i,e,a,o);break;case "twistin":case "twistout":await canvas.transitions.twistIn(i,e,a,o);break;case "warpin":case "warpout":await canvas.transitions.warpIn(i,e,a,o);break;case "ripplein":case "rippleout":await canvas.transitions.rippleIn(i,e,a,o);break;case "noisedissolvein":case "noisedissolveout":await canvas.transitions.noiseDissolveIn(i,e,a,o);break;case "tvin":case "tvout":await canvas.transitions.tvIn(i,e,a,o);break;case "pinchin":case "pinchout":await canvas.transitions.pinchIn(i,e,a,o);break}}async function je(e){switch(e.operationType){case "show":if(e.transition){let t=e.source,n;typeof t=="string"?n={spritesheet:t}:t?.spritesheet||t?.frames?.length?n=t:n={...t,spritesheet:e.alias};let i=new canvas.AnimatedSprite({autoPlay:true,...e.props},n);await i.load(),await N(i,e,e.transition);}else await canvas.showAnimatedSprite(e.alias,e.source,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t&&e.props?await t.setMemory({...t.memory,...e.props}):t||r.error(`AnimatedSprite with alias ${e.alias} not found.`);break}case "remove":P(e);break;case "pause":case "resume":{let t=canvas.canvas.find(e.alias);t?e.operationType==="pause"?t.stop():t.play():r.error(`AnimatedSprite with alias ${e.alias} not found.`);break}case "goto":{if(!Number.isInteger(e.frame)||e.frame<0)throw new RangeError("AnimatedSprite frame must be a non-negative integer.");let t=canvas.canvas.find(e.alias);if(t){if(!t.haveEmptyTexture&&e.frame>=t.totalFrames)throw new RangeError(`AnimatedSprite frame must be less than ${t.totalFrames}.`);t.setFrame(e.frame);}else r.error(`AnimatedSprite with alias ${e.alias} not found.`);break}}}function P(e){let{transition:t,alias:n}=e;if(!t){canvas.canvas.remove(n);return}let{props:i,priority:a}=t;switch(t.type){case "fade":canvas.transitions.removeWithFade(n,i,a);break;case "dissolve":canvas.transitions.removeWithDissolve(n,i,a);break;case "movein":case "moveout":canvas.transitions.moveOut(n,i,a);break;case "zoomin":case "zoomout":canvas.transitions.zoomOut(n,i,a);break;case "pushin":case "pushout":canvas.transitions.pushOut(n,i,a);break;case "wipein":case "wipeout":canvas.transitions.wipeOut(n,i,a);break;case "irisin":case "irisout":canvas.transitions.irisOut(n,i,a);break;case "splitin":case "splitout":canvas.transitions.splitOut(n,i,a);break;case "blurin":case "blurout":canvas.transitions.blurOut(n,i,a);break;case "pixelatein":case "pixelateout":canvas.transitions.pixelateOut(n,i,a);break;case "flashin":case "flashout":canvas.transitions.flashOut(n,i,a);break;case "glitchin":case "glitchout":canvas.transitions.glitchOut(n,i,a);break;case "twistin":case "twistout":canvas.transitions.twistOut(n,i,a);break;case "warpin":case "warpout":canvas.transitions.warpOut(n,i,a);break;case "ripplein":case "rippleout":canvas.transitions.rippleOut(n,i,a);break;case "noisedissolvein":case "noisedissolveout":canvas.transitions.noiseDissolveOut(n,i,a);break;case "tvin":case "tvout":canvas.transitions.tvOut(n,i,a);break;case "pinchin":case "pinchout":canvas.transitions.pinchOut(n,i,a);break}}async function Ne(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.ImageSprite(e.props,e.url||e.alias);await N(t,e,e.transition);}else await canvas.showImage(e.alias,e.url,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):r.error(`Image with alias ${e.alias} not found.`);break}case "remove":P(e);break}}async function Se(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.VideoSprite(e.props,e.url||e.alias);await N(t,e,e.transition);}else await canvas.showVideo(e.alias,e.url,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):r.error(`Video with alias ${e.alias} not found.`);break}case "remove":P(e);break;case "pause":case "resume":{let t=canvas.canvas.find(e.alias);t?t.paused=e.operationType==="pause":r.error(`Video with alias ${e.alias} not found.`);break}}}async function Te(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.ImageContainer(e.props,e.urls);await N(t,e,e.transition);}else await canvas.showImageContainer(e.alias,e.urls,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):r.error(`ImageContainer with alias ${e.alias} not found.`);break}case "remove":P(e);break}}async function ke(e){switch(e.operationType){case "show":if(e.props=e.props||{},e.props.text=translator.translator.t(e.text),e.transition){let t=new canvas.Text(e.props);await N(t,e,e.transition);}else canvas.showText(e.alias,e.text,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):r.error(`Text with alias ${e.alias} not found.`);break}case "remove":P(e);break}}async function Ce(e){switch(e.operationType){case "edit":try{let t=canvas.canvas.find(e.alias);t?e.props&&t.setMemory({...t.memory,...e.props}):r.error(`Canvas Element with alias ${e.alias} not found.`);}catch(t){r.error(`There was an error while trying to edit the canvas element with alias ${e.alias}.`,t);}break;case "remove":P(e);break}}function Ie(e){e.operationType==="clear"&&canvas.canvas.removeAll();}async function Je(e){switch(e.type){case "shake":await canvas.effects.shakeEffect(e.alias,e.props,e.priority);break;case "bounce":await canvas.effects.bounceEffect(e.alias,e.props,e.priority);break;case "pulse":await canvas.effects.pulseEffect(e.alias,e.props,e.priority);break;case "hop":await canvas.effects.hopEffect(e.alias,e.props,e.priority);break;case "wiggle":await canvas.effects.wiggleEffect(e.alias,e.props,e.priority);break;case "nod":await canvas.effects.nodEffect(e.alias,e.props,e.priority);break;case "sway":await canvas.effects.swayEffect(e.alias,e.props,e.priority);break;case "punch":await canvas.effects.punchEffect(e.alias,e.props,e.priority);break;case "glitch":await canvas.effects.glitchEffect(e.alias,e.props,e.priority);break;case "chromatic-aberration":await canvas.effects.chromaticAberrationEffect(e.alias,e.props,e.priority);break;case "shockwave":await canvas.effects.shockwaveEffect(e.alias,e.props,e.priority);break;case "radial-blur":await canvas.effects.radialBlurEffect(e.alias,e.props,e.priority);break;case "blur-pulse":await canvas.effects.blurPulseEffect(e.alias,e.props,e.priority);break;case "vignette-pulse":await canvas.effects.vignettePulseEffect(e.alias,e.props,e.priority);break;case "desaturate":await canvas.effects.desaturateEffect(e.alias,e.props,e.priority);break;case "glow-pulse":await canvas.effects.glowPulseEffect(e.alias,e.props,e.priority);break}}function Ae(e){switch(e.type){case "animate":canvas.canvas.animate(e.alias,e.keyframes,e.options,e.priority);break;case "animate-sequence":canvas.canvas.animate(e.alias,e.sequence,e.options,e.priority);break}}var oe={type:"object",properties:{isRenderGroup:{type:"boolean"},blendMode:{enum:["inherit","normal","add","multiply","screen","darken","lighten","erase","color-dodge","color-burn","linear-burn","linear-dodge","linear-light","hard-light","soft-light","pin-light","difference","exclusion","overlay","saturation","color","luminosity","normal-npm","add-npm","screen-npm","none","subtract","divide","vivid-light","hard-mix","negation","min","max"]},tint:{type:["string","number","object"]},alpha:{type:"number"},angle:{type:"number"},children:{type:"object"},parent:{type:"object"},renderable:{type:"boolean"},rotation:{type:"number"},scale:{type:["number","object"]},pivot:{type:["number","object"]},origin:{type:["number","object"]},position:{type:"object"},skew:{type:"object"},visible:{type:"boolean"},x:{type:"number"},y:{type:"number"},boundsArea:{type:"object"},accessible:{type:"boolean"},accessibleTitle:{type:"string"},accessibleHint:{type:"string"},tabIndex:{type:"number"},accessibleType:{enum:["object","label","a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]},accessiblePointerEvents:{enum:["inherit","none","auto","visiblePainted","visibleFill","visibleStroke","visible","painted","fill","stroke","all"]},accessibleText:{type:"string"},accessibleChildren:{type:"boolean"},cullArea:{type:"object"},cullable:{type:"boolean"},cullableChildren:{type:"boolean"},cursor:{anyOf:[{const:"none"},{const:"progress"},{const:"auto"},{const:"default"},{const:"context-menu"},{const:"help"},{const:"pointer"},{const:"wait"},{const:"cell"},{const:"crosshair"},{const:"text"},{const:"vertical-text"},{const:"alias"},{const:"copy"},{const:"move"},{const:"no-drop"},{const:"not-allowed"},{const:"e-resize"},{const:"n-resize"},{const:"ne-resize"},{const:"nw-resize"},{const:"s-resize"},{const:"se-resize"},{const:"sw-resize"},{const:"w-resize"},{const:"ns-resize"},{const:"ew-resize"},{const:"nesw-resize"},{const:"col-resize"},{const:"nwse-resize"},{const:"row-resize"},{const:"all-scroll"},{const:"zoom-in"},{const:"zoom-out"},{const:"grab"},{const:"grabbing"},{type:"string"}]},eventMode:{enum:["none","auto","passive","static","dynamic"]},interactive:{type:"boolean"},interactiveChildren:{type:"boolean"},hitArea:{type:"object"},width:{type:"number"},height:{type:"number"},mask:{type:["number","object"]},filters:{type:"object"},label:{type:"string"},zIndex:{type:"number"},sortDirty:{type:"boolean"},sortableChildren:{type:"boolean"},pixivnId:{type:"string"},index:{type:"number"},parentLabel:{type:"string"},onEvents:{type:"object"},align:{type:["number","object"]},xAlign:{type:"number"},yAlign:{type:"number"},percentagePosition:{type:["number","object"]},percentageX:{type:"number"},percentageY:{type:"number"}},required:["pixivnId"],additionalProperties:false};var re={dissolve:{type:"object",properties:{completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},fade:{type:"object",properties:{completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},movein:{type:"object",properties:{direction:{enum:["left","right","up","down"]},motionBlur:{anyOf:[{type:"number"},{const:false},{const:true}]},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},zoomin:{type:"object",properties:{direction:{enum:["left","right","up","down"]},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},pushin:{type:"object",properties:{direction:{enum:["left","right","up","down"]},motionBlur:{anyOf:[{type:"number"},{const:false},{const:true}]},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},wipein:{type:"object",properties:{angle:{type:"number"},direction:{enum:["left","right","up","down"]},invert:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},irisin:{type:"object",properties:{origin:{type:"object"},aspect:{type:"number"},direction:{enum:["expand","contract"]},invert:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},splitin:{type:"object",properties:{direction:{enum:["inward","outward"]},orientation:{enum:["horizontal","vertical"]},origin:{type:"number"},invert:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},blurin:{type:"object",properties:{strength:{type:"number"},quality:{type:"number"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},pixelatein:{type:"object",properties:{pixelSize:{type:"number"},direction:{enum:["up-left","up-right","down-left","down-right"]},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},flashin:{type:"object",properties:{color:{type:["string","number","object"]},maxAlpha:{type:"number"},holdDuration:{type:"number"},pulses:{type:"number"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},glitchin:{type:"object",properties:{strength:{type:"number"},bursts:{type:"number"},slices:{type:"number"},rgbSplit:{type:"number"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},twistin:{type:"object",properties:{angle:{type:"number"},radius:{type:"number"},origin:{type:"object"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},warpin:{type:"object",properties:{strength:{type:"number"},origin:{type:"object"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},ripplein:{type:"object",properties:{origin:{type:"object"},amplitude:{type:"number"},wavelength:{type:"number"},speed:{type:"number"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},noisedissolvein:{type:"object",properties:{edge:{enum:["hard","soft"]},noiseScale:{type:"number"},seed:{type:"number"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},tvin:{type:"object",properties:{lineThickness:{type:"number"},brightness:{type:"number"},scanlines:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false},pinchin:{type:"object",properties:{strength:{type:"number"},mode:{enum:["pinch","bulge"]},radius:{type:"number"},origin:{type:"object"},fadeComponent:{type:"boolean"},completeOnContinue:{type:"boolean"},animateOldComponentOut:{type:"boolean"},delay:{type:["number","object"]},stiffness:{type:"number"},damping:{type:"number"},mass:{type:"number"},duration:{type:"number"},visualDuration:{type:"number"},bounce:{type:"number"},velocity:{type:"number"},restSpeed:{type:"number"},restDelta:{type:"number"},bounceStiffness:{type:"number"},bounceDamping:{type:"number"},min:{type:"number"},max:{type:"number"},power:{type:"number"},timeConstant:{type:"number"},isSync:{type:"boolean"},elapsed:{type:"number"},type:{anyOf:[{const:false},{const:"keyframes"},{type:"object"},{const:"decay"},{const:"spring"},{const:"tween"},{const:"inertia"}]},autoplay:{type:"boolean"},startTime:{type:"number"},from:{},inherit:{type:"boolean"},skipAnimations:{type:"boolean"},path:{type:"object"},when:{anyOf:[{type:"string"},{const:false}]},delayChildren:{type:["number","object"]},staggerChildren:{type:"number"},staggerDirection:{type:"number"},repeat:{type:"number"},repeatType:{enum:["loop","reverse","mirror"]},repeatDelay:{type:"number"},ease:{anyOf:[{type:"object"},{const:"linear"},{const:"easeIn"},{const:"easeOut"},{const:"easeInOut"},{const:"circIn"},{const:"circOut"},{const:"circInOut"},{const:"backIn"},{const:"backOut"},{const:"backInOut"},{const:"anticipate"},{type:"object"},{type:"object"}]},times:{type:"object"},reduceMotion:{type:"boolean"},aliasToRemoveAfter:{type:["string","object"]},tickerAliasToResume:{type:["string","object"]},tickerIdToResume:{type:["string","object"]}},additionalProperties:false}};var _e=["dissolve","fade","movein","zoomin","pushin","wipein","irisin","splitin","blurin","pixelatein","flashin","glitchin","twistin","warpin","ripplein","noisedissolvein","tvin","pinchin"];async function Ge(e,t,n,i){switch(n){case "dissolve":return canvas.transitions.showWithDissolve(e,t,i);case "fade":return canvas.transitions.showWithFade(e,t,i);case "movein":return canvas.transitions.moveIn(e,t,i);case "zoomin":return canvas.transitions.zoomIn(e,t,i);case "pushin":return canvas.transitions.pushIn(e,t,i);case "wipein":return canvas.transitions.wipeIn(e,t,i);case "irisin":return canvas.transitions.irisIn(e,t,i);case "splitin":return canvas.transitions.splitIn(e,t,i);case "blurin":return canvas.transitions.blurIn(e,t,i);case "pixelatein":return canvas.transitions.pixelateIn(e,t,i);case "flashin":return canvas.transitions.flashIn(e,t,i);case "glitchin":return canvas.transitions.glitchIn(e,t,i);case "twistin":return canvas.transitions.twistIn(e,t,i);case "warpin":return canvas.transitions.warpIn(e,t,i);case "ripplein":return canvas.transitions.rippleIn(e,t,i);case "noisedissolvein":return canvas.transitions.noiseDissolveIn(e,t,i);case "tvin":return canvas.transitions.tvIn(e,t,i);case "pinchin":return canvas.transitions.pinchIn(e,t,i)}}function Ue(e){switch(e.type){case "input":narration.narration.input.request({type:e.valueType},e.defaultValue);break;case "dialogue":narration.narration.dialogue=void 0;break}}function Be(e){switch(e.operationType){case "play":e.url?sound.sound.play(e.alias,e.url,e.props):sound.sound.play(e.alias,e.props);break;case "stop":switch(e.type){case "sound":sound.sound.stop(e.alias);break;case "all":sound.sound.stopAll();break}break;case "pause":switch(e.type){case "sound":sound.sound.pause(e.alias);break;case "channel":sound.sound.channels.find(e.alias).pauseAll();break;case "all":sound.sound.pauseAll();break}break;case "resume":switch(e.type){case "sound":sound.sound.resume(e.alias);break;case "channel":sound.sound.channels.find(e.alias).resumeAll();break;case "all":sound.sound.resumeAll();break}break;case "edit":{let t=sound.sound.find(e.alias);if(!t)break;for(let[n,i]of Object.entries(e.props))switch(n){case "volume":t.volume.value=i;break;case "playbackRate":t.playbackRate=i;break;case "mute":t.mute=i;break;case "loop":t.loop=i;break;case "paused":t.paused=i;break}break}}}var k="___param___";var O=class e{static init(t){t.loadAssets&&(e._loadAssets=t.loadAssets),t.soundOperation&&(e._soundOperation=t.soundOperation),t.imageOperation&&(e._imageOperation=t.imageOperation),t.videoOperation&&(e._videoOperation=t.videoOperation),t.animatedSpriteOperation&&(e._animatedSpriteOperation=t.animatedSpriteOperation),t.imageContainerOperation&&(e._imageContainerOperation=t.imageContainerOperation),t.textOperation&&(e._textOperation=t.textOperation),t.canvasElementOperation&&(e._canvasElementOperation=t.canvasElementOperation),t.setStorageValue&&(e._setStorageValue=t.setStorageValue),t.setInitialStorageValue&&(e._setInitialStorageValue=t.setInitialStorageValue),t.narrationOperation&&(e._narrationOperation=t.narrationOperation),t.effectOperation&&(e._effectOperation=t.effectOperation),t.animateOperation&&(e._animateOperation=t.animateOperation),t.canvasOperation&&(e._canvasOperation=t.canvasOperation),t.getLogichValue&&(e._getLogichValue=t.getLogichValue),t.getConditionalStep&&(e._getConditionalStep=t.getConditionalStep);}static _loadAssets=()=>{};static get loadAssets(){return e._loadAssets}static _soundOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get soundOperation(){return e._soundOperation}static _imageOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageOperation(){return e._imageOperation}static _videoOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get videoOperation(){return e._videoOperation}static _animatedSpriteOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get animatedSpriteOperation(){return e._animatedSpriteOperation}static _imageContainerOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageContainerOperation(){return e._imageContainerOperation}static _textOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get textOperation(){return e._textOperation}static _canvasElementOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasElementOperation(){return e._canvasElementOperation}static _setStorageValue=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setStorageValue(){return e._setStorageValue}static _setInitialStorageValue=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setInitialStorageValue(){return e._setInitialStorageValue}static _narrationOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get narrationOperation(){return e._narrationOperation}static _effectOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get effectOperation(){return e._effectOperation}static _animateOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get animateOperation(){return e._animateOperation}static _canvasOperation=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasOperation(){return e._canvasOperation}static _getLogichValue=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getLogichValue(){return e._getLogichValue}static _getConditionalStep=()=>{throw r.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getConditionalStep(){return e._getConditionalStep}};function _(e,t){if(t&&typeof t=="object"&&typeof e.functionName=="string"&&e.functionName in t){let n=t[e.functionName];if(typeof n=="function"){let i=e.args.map(a=>O.getLogichValue(a,t));return n(...i)}else r.warn(`getLogichValue function ${e.functionName} not found in props`);}}function G(e,t){let n=core.JsonUnifier.getLogichValue(e,t);return n&&typeof n=="object"&&"type"in n?core.JsonUnifier.getLogichValue(n,t):n}function ft(e,t={}){let n=G(e.value,t);switch(e.storageType){case "flagStorage":storage.storage.flags.set(e.key,e.value);break;case "storage":storage.storage.set(e.key,n);break;case "tempstorage":storage.storage.temp.set(e.key,n);break;case "params":{let i=storage.storage.get(`${k}${narration.narration.labels.opened.length-1}`)||[];i.length>e.key&&(i[e.key]=n),storage.storage.temp.set(`${k}${narration.narration.labels.opened.length-1}`,i);break}}}function gt(e,t={}){let n=G(e.value,t);switch(e.storageType){case "storage":case "tempstorage":storage.storage.default={[e.key]:n};break}}function D(e,t={}){let n=E(e,t);if(n&&typeof n=="object"&&"type"in n)switch(n.type){case "value":return ue(n,t);case "arithmetic":case "arithmeticsingle":return ce(n,t);case "compare":case "union":return ye(n,t);case "function":return _(n,t)}return n}function ce(e,t){let n=core.JsonUnifier.getLogichValue(e.leftValue,t);switch(e.type){case "arithmetic":{let i=core.JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "*":return n*i;case "/":return n/i;case "+":return typeof n=="string"||typeof i=="string"?`${n}${i}`:Array.isArray(n)&&Array.isArray(i)?[...n,...i]:Array.isArray(n)?[...n,i]:Array.isArray(i)?[n,...i]:n+i;case "-":if(Array.isArray(n)&&Array.isArray(i))return n.filter(a=>!i.includes(a));if(Array.isArray(n))return n.filter(a=>a!==i);if(Array.isArray(i)){r.warn("getValueFromArithmeticOperations cannot subtract array from non-array");return}return n-i;case "%":return n%i;case "POW":return n**i;case "RANDOM":return narration.narration.getRandomNumber(n,i);case "INTERSECTION":if(Array.isArray(n)&&Array.isArray(i))return n.filter(a=>i.includes(a));r.warn("getValueFromArithmeticOperations cannot intersect non-array values");return;default:r.warn("getValueFromArithmeticOperations unknown operator",e);return}}case "arithmeticsingle":switch(e.operator){case "INT":return Number(n);case "FLOOR":return Math.floor(n);}break}}function ue(e,t){if(e&&typeof e=="object"&&"type"in e&&e.type==="value"&&e.storageOperationType==="get")switch(e.storageType){case "storage":case "tempstorage":return e.key==="_input_value_"?narration.narration.input.value:storage.storage.get(e.key);case "flagStorage":return storage.storage.flags.get(e.key);case "label":return narration.narration.queries.timesLabelOpened(e.label);case "choice":return narration.narration.queries.timesChoiceMade(e.index);case "logic":return core.JsonUnifier.getLogichValue(e.operation,t);case "params":{let n=storage.storage.get(`${k}${narration.narration.labels.opened.length-1}`)||[];if(n&&n.length>e.key)return n[e.key];r.warn("getValue params not found");return}}return e}function ye(e,t){if(!e)return false;if(typeof e!="object"||!("type"in e))return !!e;switch(e.type){case "compare":{let n=core.JsonUnifier.getLogichValue(e.leftValue,t),i=core.JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "==":return Array.isArray(n)&&Array.isArray(i)?n.length===i.length&&n.every(a=>i.includes(a)):n===i;case "!=":return Array.isArray(n)&&Array.isArray(i)?n.length!==i.length||!n.every(a=>i.includes(a)):n!==i;case "<":return typeof n=="string"&&typeof i=="string"?n.localeCompare(i)<0:Array.isArray(n)&&Array.isArray(i)?n.length<i.length:n<i;case "<=":return typeof n=="string"&&typeof i=="string"?n.localeCompare(i)<=0:Array.isArray(n)&&Array.isArray(i)?n.length<=i.length:n<=i;case ">":return typeof n=="string"&&typeof i=="string"?n.localeCompare(i)>0:Array.isArray(n)&&Array.isArray(i)?n.length>i.length:n>i;case ">=":return typeof n=="string"&&typeof i=="string"?n.localeCompare(i)>=0:Array.isArray(n)&&Array.isArray(i)?n.length>=i.length:n>=i;case "CONTAINS":return Array.isArray(n)&&Array.isArray(i)?i.every(a=>n.includes(a)):Array.isArray(n)?n.includes(i):n.toString().includes(i.toString())}break}case "value":{let n=core.JsonUnifier.getLogichValue(e,t);return Array.isArray(n)?n.length>0:n&&typeof n=="object"?Object.keys(n).length>0:!!n}case "union":return le(e,t)}return !!e}function le(e,t){if(e.unionType==="not"){let i=D(e.condition,t);return Array.isArray(i)?i.length===0:i&&typeof i=="object"?Object.keys(i).length===0:!i}let n=i=>core.JsonUnifier.getLogichValue(i,t)||false;return e.unionType==="and"?e.conditions.every(n):e.conditions.some(n)}function me(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function E(e,t={}){if(Array.isArray(e)||!e)return e;if(e&&typeof e=="object"&&"type"in e)switch(e.type){case "resulttocombine":return be(e,t);case "ifelse":return core.JsonUnifier.getLogichValue(e.condition,t)?core.JsonUnifier.getLogichValue(e.then,t):core.JsonUnifier.getLogichValue(e.else,t);case "stepswitch":{let n=core.JsonUnifier.getLogichValue(e.elements,t)||[];if(n.length===0){r.error("getValueFromConditionalStatements elements.length === 0");return}switch(e.choiceType){case "random":{let i=me(0,n.length-1);return core.JsonUnifier.getLogichValue(n[i],t)}case "loop":{let i=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return i>n.length-1?(i=i%n.length,core.JsonUnifier.getLogichValue(n[i],t)):core.JsonUnifier.getLogichValue(n[i],t)}case "sequential":{let i,a=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return e.end==="lastItem"&&(i=core.JsonUnifier.getLogichValue(n[n.length-1],t)),a>n.length-1?i:core.JsonUnifier.getLogichValue(n[a],t)}case "sequentialrandom":{let i=narration.NarrationManagerStatic.getRandomNumber(0,n.length-1,{nestedId:e.nestedId,onceOnly:true});if(i===void 0&&e.end==="lastItem"){let a=narration.NarrationManagerStatic.getCurrentStepTimesCounterData(e.nestedId);if(!a?.usedRandomNumbers){r.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}let o=a.usedRandomNumbers[`0-${n.length-1}`];return core.JsonUnifier.getLogichValue(n[o[o.length-1]],t)}if(i===void 0){r.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}return core.JsonUnifier.getLogichValue(n[i],t)}}}}return e}function $(e,t={}){if(e.conditionalStep){let n=pixiVn.createExportableElement(core.JsonUnifier.getLogichValue(e.conditionalStep,t));if(n?.glueEnabled===void 0&&delete n?.glueEnabled,n?.goNextStep===void 0&&delete n?.goNextStep,n?.end===void 0&&delete n?.end,n?.choices===void 0&&delete n?.choices,n?.dialogue===void 0&&delete n?.dialogue,n?.labelToOpen===void 0&&delete n?.labelToOpen,n?.operations===void 0&&delete n?.operations,n){let i={...e,conditionalStep:void 0,...n};return $(i,t)}else narration.narration.dialogGlue&&(narration.narration.dialogGlue=false);}return e}function be(e,t){let n=e.firstItem,i=(e.secondConditionalItem??[]).flatMap(o=>Array.isArray(o)?o.map(y=>core.JsonUnifier.getLogichValue(y,t)):[core.JsonUnifier.getLogichValue(o,t)]),a=n?[n,...i]:i;if(a.length===0){r.warn("combinateResult toCheck.length === 0");return}if(typeof a[0]=="string")return translator.translator.t(a);if(typeof a[0]=="object"){let o=a,y,w=false,j=o.map((c,v)=>{c=$(c,t);let b=core.JsonUnifier.getLogichValue(c.dialogue,t)||"";return v===0?(y=core.JsonUnifier.getLogichValue(c.glueEnabled,t)||false,b):(typeof b=="object"&&"text"in b&&(b=`${b.character}: ${b.text}`),y===false&&w&&(b=`
|
|
2
2
|
|
|
3
|
-
${
|
|
3
|
+
${b}`),b&&(w=true),y=core.JsonUnifier.getLogichValue(c.glueEnabled,t)||false,b)}),x=core.JsonUnifier.getLogichValue(j[0],t),V=typeof x=="object"&&"character"in x?x.character:void 0,S=j.flatMap(c=>{let v;c&&typeof c=="object"&&"text"in c?v=c.text:v=c;let b;return Array.isArray(v)?b=v.map(U=>{let W=core.JsonUnifier.getLogichValue(U,t);return translator.translator.t(`${W}`)}):b=core.JsonUnifier.getLogichValue(v,t)||"",translator.translator.t(b)}),I=o.find(c=>c.end),F=o.find(c=>c.choices),R=false,L=false;o.length>0&&(o[0].glueEnabled&&o[0].goNextStep&&o[0].dialogue===void 0&&(narration.narration.dialogGlue=true),R=o[o.length-1].glueEnabled,L=o.reverse().find(c=>!(c.operations&&(!c.dialogue||!c.choices)))?.goNextStep);let q=o.find(c=>c.labelToOpen),J=[];return o.forEach(c=>{c.operations&&(J=[...J,...c.operations]);}),{dialogue:V?{character:V,text:S}:S,end:I?.end,choices:F?.choices,glueEnabled:R,goNextStep:L,labelToOpen:q?.labelToOpen,operations:J}}}exports.VariableGetter=void 0;(a=>{let e=new Set;function t(o){e.add(o);}a.add=t;function n(){e.clear();}a.clear=n;function i(o,y={}){let w=V=>D(V,y)??void 0,j=E(o,y);if(e.size===0)return w(j);let x=w;for(let V of e){let S=x;x=I=>V(I,S)??void 0;}return x(j)}a.getLogichValue=i;})(exports.VariableGetter||={});exports.ENTRANCE_TRANSITION_TYPES=_e;exports.animateOperation=Ae;exports.animatedSpriteOperation=je;exports.canvasElementOperation=Ce;exports.canvasOperation=Ie;exports.containerMemorySchema=oe;exports.effectOperation=Je;exports.entranceTransitionKeySchemas=re;exports.executeEntranceTransition=Ge;exports.getConditionalStep=$;exports.getLogichValue=D;exports.getValueFromConditionalStatements=E;exports.imageContainerOperation=Te;exports.imageOperation=Ne;exports.loadAssets=xe;exports.narrationOperation=Ue;exports.setInitialStorageValue=gt;exports.setStorageValue=ft;exports.soundOperation=Be;exports.textOperation=ke;exports.videoOperation=Se;
|
package/dist/actions.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, d as PixiVNJsonArithmeticOperations, e as PixiVNJsonConditions, m as PixiVNJsonFunction, f as PixiVNJsonConditionalStatements, l as PixiVNJsonConditionalResultToCombine, b as PixiVNJsonOnlyStorageSet, a as PixiVNJsonValueSet } from './PixiVNJsonIfElse-CgOnelja.cjs';
|
|
2
|
-
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString,
|
|
2
|
+
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString, r as PixiVNJsonCanvasAnimate, h as PixiVNJsonCanvasAnimatedSpriteShow, i as PixiVNJsonAnimatedSpriteEdit, j as PixiVNJsonAnimatedSpriteControl, e as PixiVNJsonCanvasRemove, o as PixiVNJsonUnknownEdit, s as PixiVNJsonCanvasClear, q as PixiVNJsonCanvasEffect, k as PixiVNJsonCanvasImageContainerShow, l as PixiVNJsonImageContainerEdit, c as PixiVNJsonCanvasImageVideoShow, d as PixiVNJsonImageEdit, m as PixiVNJsonCanvasTextShow, n as PixiVNJsonTextEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume, p as PixiVNJsonNarration, b as PixiVNJsonSound, t as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-D1MiCvp5.cjs';
|
|
3
3
|
import { ImageSpriteMemory, VideoSpriteMemory, ContainerMemory, ContainerChild, CanvasBaseInterface } from '@drincs/pixi-vn/canvas';
|
|
4
4
|
import { StepLabelPropsType } from '@drincs/pixi-vn/narration';
|
|
5
5
|
import { StorageElementType } from '@drincs/pixi-vn/storage';
|
|
@@ -17,6 +17,8 @@ import 'pixi.js';
|
|
|
17
17
|
*/
|
|
18
18
|
declare function loadAssets(origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString): Promise<void>;
|
|
19
19
|
|
|
20
|
+
/** Handles show, edit, remove, pause, resume, and frame selection for animated sprites. */
|
|
21
|
+
declare function animatedSpriteOperation(operation: PixiVNJsonCanvasAnimatedSpriteShow | PixiVNJsonAnimatedSpriteEdit | PixiVNJsonAnimatedSpriteControl | PixiVNJsonCanvasRemove): Promise<void>;
|
|
20
22
|
/**
|
|
21
23
|
* Handles show, edit, and remove operations for {@link ImageSprite} canvas elements.
|
|
22
24
|
*
|
|
@@ -100,7 +102,7 @@ declare const entranceTransitionKeySchemas: Record<string, object>;
|
|
|
100
102
|
* they're shared with removal — but are still "entrance" transitions in the sense that
|
|
101
103
|
* {@link entranceTransitionKeySchemas} validates them the same way for a `show`-style command.
|
|
102
104
|
*/
|
|
103
|
-
declare const ENTRANCE_TRANSITION_TYPES: readonly ["dissolve", "fade", "movein", "zoomin", "pushin"];
|
|
105
|
+
declare const ENTRANCE_TRANSITION_TYPES: readonly ["dissolve", "fade", "movein", "zoomin", "pushin", "wipein", "irisin", "splitin", "blurin", "pixelatein", "flashin", "glitchin", "twistin", "warpin", "ripplein", "noisedissolvein", "tvin", "pinchin"];
|
|
104
106
|
/**
|
|
105
107
|
* One of {@link ENTRANCE_TRANSITION_TYPES}.
|
|
106
108
|
*/
|
|
@@ -108,8 +110,8 @@ type EntranceTransitionType = (typeof ENTRANCE_TRANSITION_TYPES)[number];
|
|
|
108
110
|
/**
|
|
109
111
|
* Runs an entrance transition on a canvas element — the same dispatch this package's own
|
|
110
112
|
* interpreter uses internally (see `@/actions/canvas`) for the built-in
|
|
111
|
-
* `image`/`video`/`text`/`imagecontainer` `show` operations (`showWithDissolve`,
|
|
112
|
-
* `moveIn`, `zoomIn`,
|
|
113
|
+
* `image`/`video`/`text`/`imagecontainer` `show` operations (`transitions.showWithDissolve`,
|
|
114
|
+
* `transitions.showWithFade`, `transitions.moveIn`, `transitions.zoomIn`, ...), exposed here so a third-party canvas-component library (e.g.
|
|
113
115
|
* `pixi-vn-spine`) can reuse it for its own custom operation/command instead of re-implementing
|
|
114
116
|
* the type → function mapping.
|
|
115
117
|
*
|
|
@@ -188,4 +190,4 @@ declare function getValueFromConditionalStatements<T>(statement: PixiVNJsonCondi
|
|
|
188
190
|
*/
|
|
189
191
|
declare function getConditionalStep(originalStep: PixiVNJsonLabelStep, props?: StepLabelPropsType): PixiVNJsonLabelStep;
|
|
190
192
|
|
|
191
|
-
export { ENTRANCE_TRANSITION_TYPES, type EntranceTransitionType, animateOperation, canvasElementOperation, canvasOperation, containerMemorySchema, effectOperation, entranceTransitionKeySchemas, executeEntranceTransition, getConditionalStep, getLogichValue, getValueFromConditionalStatements, imageContainerOperation, imageOperation, loadAssets, narrationOperation, setInitialStorageValue, setStorageValue, soundOperation, textOperation, videoOperation };
|
|
193
|
+
export { ENTRANCE_TRANSITION_TYPES, type EntranceTransitionType, animateOperation, animatedSpriteOperation, canvasElementOperation, canvasOperation, containerMemorySchema, effectOperation, entranceTransitionKeySchemas, executeEntranceTransition, getConditionalStep, getLogichValue, getValueFromConditionalStatements, imageContainerOperation, imageOperation, loadAssets, narrationOperation, setInitialStorageValue, setStorageValue, soundOperation, textOperation, videoOperation };
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, d as PixiVNJsonArithmeticOperations, e as PixiVNJsonConditions, m as PixiVNJsonFunction, f as PixiVNJsonConditionalStatements, l as PixiVNJsonConditionalResultToCombine, b as PixiVNJsonOnlyStorageSet, a as PixiVNJsonValueSet } from './PixiVNJsonIfElse-CgOnelja.js';
|
|
2
|
-
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString,
|
|
2
|
+
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString, r as PixiVNJsonCanvasAnimate, h as PixiVNJsonCanvasAnimatedSpriteShow, i as PixiVNJsonAnimatedSpriteEdit, j as PixiVNJsonAnimatedSpriteControl, e as PixiVNJsonCanvasRemove, o as PixiVNJsonUnknownEdit, s as PixiVNJsonCanvasClear, q as PixiVNJsonCanvasEffect, k as PixiVNJsonCanvasImageContainerShow, l as PixiVNJsonImageContainerEdit, c as PixiVNJsonCanvasImageVideoShow, d as PixiVNJsonImageEdit, m as PixiVNJsonCanvasTextShow, n as PixiVNJsonTextEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume, p as PixiVNJsonNarration, b as PixiVNJsonSound, t as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-BrRDO4iZ.js';
|
|
3
3
|
import { ImageSpriteMemory, VideoSpriteMemory, ContainerMemory, ContainerChild, CanvasBaseInterface } from '@drincs/pixi-vn/canvas';
|
|
4
4
|
import { StepLabelPropsType } from '@drincs/pixi-vn/narration';
|
|
5
5
|
import { StorageElementType } from '@drincs/pixi-vn/storage';
|
|
@@ -17,6 +17,8 @@ import 'pixi.js';
|
|
|
17
17
|
*/
|
|
18
18
|
declare function loadAssets(origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString): Promise<void>;
|
|
19
19
|
|
|
20
|
+
/** Handles show, edit, remove, pause, resume, and frame selection for animated sprites. */
|
|
21
|
+
declare function animatedSpriteOperation(operation: PixiVNJsonCanvasAnimatedSpriteShow | PixiVNJsonAnimatedSpriteEdit | PixiVNJsonAnimatedSpriteControl | PixiVNJsonCanvasRemove): Promise<void>;
|
|
20
22
|
/**
|
|
21
23
|
* Handles show, edit, and remove operations for {@link ImageSprite} canvas elements.
|
|
22
24
|
*
|
|
@@ -100,7 +102,7 @@ declare const entranceTransitionKeySchemas: Record<string, object>;
|
|
|
100
102
|
* they're shared with removal — but are still "entrance" transitions in the sense that
|
|
101
103
|
* {@link entranceTransitionKeySchemas} validates them the same way for a `show`-style command.
|
|
102
104
|
*/
|
|
103
|
-
declare const ENTRANCE_TRANSITION_TYPES: readonly ["dissolve", "fade", "movein", "zoomin", "pushin"];
|
|
105
|
+
declare const ENTRANCE_TRANSITION_TYPES: readonly ["dissolve", "fade", "movein", "zoomin", "pushin", "wipein", "irisin", "splitin", "blurin", "pixelatein", "flashin", "glitchin", "twistin", "warpin", "ripplein", "noisedissolvein", "tvin", "pinchin"];
|
|
104
106
|
/**
|
|
105
107
|
* One of {@link ENTRANCE_TRANSITION_TYPES}.
|
|
106
108
|
*/
|
|
@@ -108,8 +110,8 @@ type EntranceTransitionType = (typeof ENTRANCE_TRANSITION_TYPES)[number];
|
|
|
108
110
|
/**
|
|
109
111
|
* Runs an entrance transition on a canvas element — the same dispatch this package's own
|
|
110
112
|
* interpreter uses internally (see `@/actions/canvas`) for the built-in
|
|
111
|
-
* `image`/`video`/`text`/`imagecontainer` `show` operations (`showWithDissolve`,
|
|
112
|
-
* `moveIn`, `zoomIn`,
|
|
113
|
+
* `image`/`video`/`text`/`imagecontainer` `show` operations (`transitions.showWithDissolve`,
|
|
114
|
+
* `transitions.showWithFade`, `transitions.moveIn`, `transitions.zoomIn`, ...), exposed here so a third-party canvas-component library (e.g.
|
|
113
115
|
* `pixi-vn-spine`) can reuse it for its own custom operation/command instead of re-implementing
|
|
114
116
|
* the type → function mapping.
|
|
115
117
|
*
|
|
@@ -188,4 +190,4 @@ declare function getValueFromConditionalStatements<T>(statement: PixiVNJsonCondi
|
|
|
188
190
|
*/
|
|
189
191
|
declare function getConditionalStep(originalStep: PixiVNJsonLabelStep, props?: StepLabelPropsType): PixiVNJsonLabelStep;
|
|
190
192
|
|
|
191
|
-
export { ENTRANCE_TRANSITION_TYPES, type EntranceTransitionType, animateOperation, canvasElementOperation, canvasOperation, containerMemorySchema, effectOperation, entranceTransitionKeySchemas, executeEntranceTransition, getConditionalStep, getLogichValue, getValueFromConditionalStatements, imageContainerOperation, imageOperation, loadAssets, narrationOperation, setInitialStorageValue, setStorageValue, soundOperation, textOperation, videoOperation };
|
|
193
|
+
export { ENTRANCE_TRANSITION_TYPES, type EntranceTransitionType, animateOperation, animatedSpriteOperation, canvasElementOperation, canvasOperation, containerMemorySchema, effectOperation, entranceTransitionKeySchemas, executeEntranceTransition, getConditionalStep, getLogichValue, getValueFromConditionalStatements, imageContainerOperation, imageOperation, loadAssets, narrationOperation, setInitialStorageValue, setStorageValue, soundOperation, textOperation, videoOperation };
|