@drincs/pixi-vn-ink 0.11.0 → 0.11.2

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 CHANGED
@@ -95,21 +95,6 @@ import startLabel from './ink_labels/start.ink?raw'
95
95
  importInkText([startLabel, ...])
96
96
  ```
97
97
 
98
- ## *ink* features in development
99
-
100
- The following features are in development and will be added in the future:
101
-
102
- ( Add a like or comment to the issue to show your interest )
103
-
104
- * [Functions and Game Queries](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#9-game-queries-and-functions) (issue [#11](https://github.com/DRincs-Productions/pixi-vn-ink/issues/11)):
105
- * [User-created functions](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#5-functions) (issue [#32](https://github.com/DRincs-Productions/pixi-vn-ink/issues/32))
106
- * `CHOICE_COUNT()`
107
- * `TURNS()`
108
- * `TURNS_SINCE()`
109
- * `SEED_RANDOM()`
110
- * [`LIST`](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#1-basic-lists) (issue [#15](https://github.com/DRincs-Productions/pixi-vn-ink/issues/15))
111
- * [`Tunnels`](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#1-tunnels) (issue [#38](https://github.com/DRincs-Productions/pixi-vn-ink/issues/38))
112
-
113
98
  ## *ink* syntax that will be ignored by Pixi’VN
114
99
 
115
100
  The following syntax will be ignored by Pixi’VN. You can use them in your ***ink* script** ( For example if you want test your script with **Inky editor** ), but they will be ignored by Pixi’VN.
@@ -134,66 +119,3 @@ Hello // ❌ This will be ignored
134
119
  My name is John // ✅ This will be handled
135
120
  -> DONE // ✅ This will be handled
136
121
  ```
137
-
138
- ## Differences between native *ink* and Pixi’VN *ink*
139
-
140
- * in this case:
141
-
142
- ```ink
143
- { shuffle:
144
- - 2 of Diamonds.
145
- 'You lose this time!' crowed the croupier.
146
- }
147
- ```
148
-
149
- **In native *ink***, you will see 2 different dialogues, the first one will be `2 of Diamonds.` and the second one will be `'You lose this time!' crowed the croupier.`.
150
-
151
- **In Pixi’VN *ink***, you will not see 2 different dialogues, but the following dialogue: `2 of Diamonds.\n\n'You lose this time!' crowed the croupier.`. In [Markdown](/ink/ink-markdown.md) it will be displayed as:
152
-
153
- ```txt
154
- 2 of Diamonds.
155
- 'You lose this time!' crowed the croupier.
156
- ```
157
-
158
- * if a `weave` (In following example `shove`) is attached to a one time choice, and it is opened with `-> shove` it will not invalidate the one time choice. To invalidate it you will have to select the choice as usual.
159
-
160
- Here is an example:
161
-
162
- ```ink
163
- -> start
164
- === start ===
165
- * [1] -> shove
166
- * (shove) [2] 2
167
- * {shove} [3] -> END
168
- - -> start
169
- -> DONE
170
- ```
171
-
172
- In case you take choice 1, the second time it will be opened `start`:
173
- * if you use **native *ink***, you will only be able to choose choice `3`. The choice `2` is hidden because being "one time" **native *ink*** will know that you have already made this decision with `-> shove`.
174
- * if you use **Pixi’VN *ink***, you will be able to choose choice `2` or `3`. The choice `2` is not hidden because **Pixi’VN *ink*** doesn't know that `shove` is paired with a choice.
175
-
176
- To get the same logic as `start` both in **native *ink*** and **Pixi’VN *ink*** you will have to write the following code:
177
-
178
- ```ink
179
- -> start
180
- === start ===
181
- * [1] -> shove
182
- * (shove) {!shove} [2] 2
183
- * {shove} [3] -> END
184
- - -> start
185
- -> DONE
186
- ```
187
-
188
- ## Using Pixi’VN Features from *ink*
189
-
190
- * [Use Character in *ink*](https://pixi-vn.web.app/ink/ink-character)
191
- * [*ink* knot (or label)](https://pixi-vn.web.app/ink/ink-label)
192
- * [*ink* variables](https://pixi-vn.web.app/ink/ink-variables)
193
- * [*ink* text style](https://pixi-vn.web.app/ink/ink-markdown)
194
- * [Use canvas in *ink*](https://pixi-vn.web.app/ink/ink-canvas)
195
- * [Using sounds and music in *ink*](https://pixi-vn.web.app/ink/ink-sound)
196
- * [Using pause in *ink*](https://pixi-vn.web.app/ink/ink-pause)
197
- * [Use input in *ink*](https://pixi-vn.web.app/ink/ink-input)
198
- * [How translate *ink* text](https://pixi-vn.web.app/ink/ink-translate)
199
- * [Custome Hashtag Script](https://pixi-vn.web.app/ink/ink-hashtag)
@@ -0,0 +1,18 @@
1
+ import {a,c,b as b$1,e,d,f as f$1}from'./chunk-DPFJFU3S.mjs';import {RegisteredLabels,narration,LabelAbstract,NarrationManagerStatic}from'@drincs/pixi-vn/narration';import {storage,SYSTEM_RESERVED_STORAGE_KEYS}from'@drincs/pixi-vn/storage';import {canvas,VideoSprite,showVideo,Assets,Text,showText,ImageSprite,showImage,ImageContainer,showImageContainer,shakeEffect,pushOut,zoomOut,moveOut,removeWithDissolve,removeWithFade,pushIn,zoomIn,moveIn,showWithDissolve,showWithFade}from'@drincs/pixi-vn/canvas';import {sound}from'@drincs/pixi-vn/sound';import {RegisteredCharacters}from'@drincs/pixi-vn/characters';var Mt=Object.defineProperty,Wt=(e,t,u)=>t in e?Mt(e,t,{enumerable:true,configurable:true,writable:true,value:u}):e[t]=u,Y=(e,t,u)=>Wt(e,typeof t!="symbol"?t+"":t,u),U;(e=>(e.log=(t,...u)=>console.log(`[Pixi\u2019VN Json] ${t}`,...u),e.warn=(t,...u)=>console.warn(`[Pixi\u2019VN Json] ${t}`,...u),e.error=(t,...u)=>console.error(`[Pixi\u2019VN Json] ${t}`,...u),e.info=(t,...u)=>console.info(`[Pixi\u2019VN Json] ${t}`,...u)))(U||(U={}));var G=class N{static init(t){t.loadAssets&&(N._loadAssets=t.loadAssets),t.soundOperation&&(N._soundOperation=t.soundOperation),t.imageOperation&&(N._imageOperation=t.imageOperation),t.videoOperation&&(N._videoOperation=t.videoOperation),t.imageContainerOperation&&(N._imageContainerOperation=t.imageContainerOperation),t.textOperation&&(N._textOperation=t.textOperation),t.canvasElementOperation&&(N._canvasElementOperation=t.canvasElementOperation),t.setStorageValue&&(N._setStorageValue=t.setStorageValue),t.setInitialStorageValue&&(N._setInitialStorageValue=t.setInitialStorageValue),t.narrationOperation&&(N._narrationOperation=t.narrationOperation),t.effectOperation&&(N._effectOperation=t.effectOperation),t.animateOperation&&(N._animateOperation=t.animateOperation),t.getLogichValue&&(N._getLogichValue=t.getLogichValue),t.getConditionalStep&&(N._getConditionalStep=t.getConditionalStep);}static get loadAssets(){return N._loadAssets}static get soundOperation(){return N._soundOperation}static get imageOperation(){return N._imageOperation}static get videoOperation(){return N._videoOperation}static get textOperation(){return N._textOperation}static get imageContainerOperation(){return N._imageContainerOperation}static get canvasElementOperation(){return N._canvasElementOperation}static get setStorageValue(){return N._setStorageValue}static get setInitialStorageValue(){return N._setInitialStorageValue}static get narrationOperation(){return N._narrationOperation}static get effectOperation(){return N._effectOperation}static get animateOperation(){return N._animateOperation}static get getLogichValue(){return N._getLogichValue}static get getConditionalStep(){return N._getConditionalStep}};Y(G,"_loadAssets",()=>{}),Y(G,"_soundOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_imageOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_videoOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_imageContainerOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_textOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_canvasElementOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_setStorageValue",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_setInitialStorageValue",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_narrationOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_effectOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_animateOperation",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_getLogichValue",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),Y(G,"_getConditionalStep",()=>{throw U.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new Error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")});var v=G;var Gt=Object.defineProperty,Ut=(e,t,u)=>t in e?Gt(e,t,{enumerable:true,configurable:true,writable:true,value:u}):e[t]=u,$e=(e,t,u)=>Ut(e,typeof t!="symbol"?t+"":t,u);function qt(e){let t="";return e.values.forEach(u=>{if(typeof u=="string")t+=u;else {let r=v.getLogichValue(u);t+=`${r}`;}}),t}var Te=class T{static t(t){return Array.isArray(t)?t.map(u=>T.translate(`${u}`)):T.translate(`${t}`)}static set beforeToTranslate(t){T._beforeToTranslate=t;}static set translate(t){T._translate=t;}static get translate(){return t=>{let u=t;return T._beforeToTranslate&&(u=T._beforeToTranslate(u)),u=T._translate(u),T._afterToTranslate&&(u=T._afterToTranslate(u)),u}}static set afterToTranslate(t){T._afterToTranslate=t;}static addKey(t,u,r){let i=r.defaultValue||"empty_string";typeof u=="string"&&(u=[u]),Array.isArray(u)&&u.forEach(a=>{t[a]===void 0&&(i==="empty_string"?t[a]="":i==="copy_key"&&(T._beforeToTranslate?t[a]=T._beforeToTranslate(a):t[a]=a));});}static getConditionalsThenElse(t,u=[]){if(typeof t=="object"&&t&&"type"in t)if(t.type==="ifelse")t.then&&T.getConditionalsThenElse(t.then,u),t.else&&T.getConditionalsThenElse(t.else,u);else if(t.type==="stepswitch"){if(t.elements)if(Array.isArray(t.elements))t.elements.forEach(r=>{T.getConditionalsThenElse(r,u);});else if(t.elements.type==="ifelse"){let r=[];T.getConditionalsThenElse(t.elements,r),r.forEach(i=>{u.push(...i);});}else if(t.elements.type==="stepswitch"){let r=[];T.getConditionalsThenElse(t.elements,r),r.forEach(i=>{u.push(...i);});}else T.getConditionalsThenElse(t.elements,u);}else t.type==="resulttocombine"?(t.firstItem&&T.getConditionalsThenElse(t.firstItem,u),t.secondConditionalItem&&t.secondConditionalItem.forEach(r=>{T.getConditionalsThenElse(r,u);})):u.push(t);else t&&u.push(t);return u}static async generateJsonTranslation(t,u={},r={}){let{defaultValue:i="copy_key",operationStringConvert:a}=r,d=t.map(async E=>{if(E.choices){let D=[];Array.isArray(E.choices)?D=[E.choices]:D=T.getConditionalsThenElse(E.choices),D.forEach(g=>g.forEach(c=>{if("type"in c){let F=[];c.type==="ifelse"||c.type==="stepswitch"?T.getConditionalsThenElse(c,F):F=[c],F.map(A=>T.getConditionalsThenElse(A.text)).forEach(A=>{Array.isArray(A)&&A.forEach(y=>{Array.isArray(y)?y.forEach(x=>{typeof x=="string"?T.addKey(u,x,{defaultValue:i}):T.getConditionalsThenElse(x).forEach(h=>{Array.isArray(h)?h.forEach(m=>{typeof m=="string"&&T.addKey(u,m,{defaultValue:i});}):typeof h=="string"&&T.addKey(u,h,{defaultValue:i});});}):typeof y=="string"&&T.addKey(u,y,{defaultValue:i});});});}}));}if(E.dialogue){let D=[];Array.isArray(E.dialogue)?D=[E.dialogue]:D=T.getConditionalsThenElse(E.dialogue),D.forEach(g=>{if(typeof g=="string")T.addKey(u,g,{defaultValue:i});else if("text"in g){let c=T.getConditionalsThenElse(g.text);typeof c=="string"&&(c=[c]),c.forEach(F=>{typeof F=="string"?T.addKey(u,F,{defaultValue:i}):T.getConditionalsThenElse(F).forEach(A=>{typeof A=="string"?T.addKey(u,A,{defaultValue:i}):Array.isArray(A)&&A.forEach(y=>{typeof y=="string"?T.addKey(u,y,{defaultValue:i}):T.getConditionalsThenElse(y).forEach(x=>{typeof x=="string"&&T.addKey(u,x,{defaultValue:i});});});});});}});}if(E.operations)for(let D of E.operations){if(D.type==="operationtoconvert"&&a){let g=qt(D),c=await a(g,E,{});if(!c)return;D=c;}D.type==="text"&&D.operationType==="show"&&T.addKey(u,D.text,{defaultValue:i});}E.conditionalStep&&T.getConditionalsThenElse(E.conditionalStep).forEach(D=>{Array.isArray(D)?T.generateJsonTranslation(D,u,r):T.generateJsonTranslation([D],u,r);});});return await Promise.all(d),u}};$e(Te,"_beforeToTranslate"),$e(Te,"_translate",e=>e),$e(Te,"_afterToTranslate");var Yt=Te,H=Yt;var Kt=Object.create,ze=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,eu=Object.getOwnPropertyNames,tu=Object.getPrototypeOf,uu=Object.prototype.hasOwnProperty,nu=(e,t,u)=>t in e?ze(e,t,{enumerable:true,configurable:true,writable:true,value:u}):e[t]=u,At=(e=>typeof a<"u"?a:typeof Proxy<"u"?new Proxy(e,{get:(t,u)=>(typeof a<"u"?a:t)[u]}):e)(function(e){if(typeof a<"u")return a.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),ht=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ru=(e,t,u,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of eu(t))!uu.call(e,i)&&i!==u&&ze(e,i,{get:()=>t[i],enumerable:!(r=Zt(t,i))||r.enumerable});return e},iu=(e,t,u)=>(u=e!=null?Kt(tu(e)):{},ru(ze(u,"default",{value:e,enumerable:true}),e)),He=(e,t,u)=>nu(e,typeof t!="symbol"?t+"":t,u),ou=ht((e,t)=>{(function(u,r){typeof e=="object"?t.exports=e=r():typeof define=="function"&&define.amd?define([],r):u.CryptoJS=r();})(e,function(){var u=u||(function(r,i){var a;if(typeof window<"u"&&window.crypto&&(a=window.crypto),typeof self<"u"&&self.crypto&&(a=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(a=globalThis.crypto),!a&&typeof window<"u"&&window.msCrypto&&(a=window.msCrypto),!a&&typeof global<"u"&&global.crypto&&(a=global.crypto),!a&&typeof At=="function")try{a=At("crypto");}catch{}var d=function(){if(a){if(typeof a.getRandomValues=="function")try{return a.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof a.randomBytes=="function")try{return a.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},E=Object.create||(function(){function p(){}return function(n){var s;return p.prototype=n,s=new p,p.prototype=null,s}})(),D={},g=D.lib={},c=g.Base=(function(){return {extend:function(p){var n=E(this);return p&&n.mixIn(p),(!n.hasOwnProperty("init")||this.init===n.init)&&(n.init=function(){n.$super.init.apply(this,arguments);}),n.init.prototype=n,n.$super=this,n},create:function(){var p=this.extend();return p.init.apply(p,arguments),p},init:function(){},mixIn:function(p){for(var n in p)p.hasOwnProperty(n)&&(this[n]=p[n]);p.hasOwnProperty("toString")&&(this.toString=p.toString);},clone:function(){return this.init.prototype.extend(this)}}})(),F=g.WordArray=c.extend({init:function(p,n){p=this.words=p||[],n!=i?this.sigBytes=n:this.sigBytes=p.length*4;},toString:function(p){return (p||y).stringify(this)},concat:function(p){var n=this.words,s=p.words,o=this.sigBytes,l=p.sigBytes;if(this.clamp(),o%4)for(var B=0;B<l;B++){var O=s[B>>>2]>>>24-B%4*8&255;n[o+B>>>2]|=O<<24-(o+B)%4*8;}else for(var L=0;L<l;L+=4)n[o+L>>>2]=s[L>>>2];return this.sigBytes+=l,this},clamp:function(){var p=this.words,n=this.sigBytes;p[n>>>2]&=4294967295<<32-n%4*8,p.length=r.ceil(n/4);},clone:function(){var p=c.clone.call(this);return p.words=this.words.slice(0),p},random:function(p){for(var n=[],s=0;s<p;s+=4)n.push(d());return new F.init(n,p)}}),A=D.enc={},y=A.Hex={stringify:function(p){for(var n=p.words,s=p.sigBytes,o=[],l=0;l<s;l++){var B=n[l>>>2]>>>24-l%4*8&255;o.push((B>>>4).toString(16)),o.push((B&15).toString(16));}return o.join("")},parse:function(p){for(var n=p.length,s=[],o=0;o<n;o+=2)s[o>>>3]|=parseInt(p.substr(o,2),16)<<24-o%8*4;return new F.init(s,n/2)}},x=A.Latin1={stringify:function(p){for(var n=p.words,s=p.sigBytes,o=[],l=0;l<s;l++){var B=n[l>>>2]>>>24-l%4*8&255;o.push(String.fromCharCode(B));}return o.join("")},parse:function(p){for(var n=p.length,s=[],o=0;o<n;o++)s[o>>>2]|=(p.charCodeAt(o)&255)<<24-o%4*8;return new F.init(s,n)}},h=A.Utf8={stringify:function(p){try{return decodeURIComponent(escape(x.stringify(p)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(p){return x.parse(unescape(encodeURIComponent(p)))}},m=g.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new F.init,this._nDataBytes=0;},_append:function(p){typeof p=="string"&&(p=h.parse(p)),this._data.concat(p),this._nDataBytes+=p.sigBytes;},_process:function(p){var n,s=this._data,o=s.words,l=s.sigBytes,B=this.blockSize,O=B*4,L=l/O;p?L=r.ceil(L):L=r.max((L|0)-this._minBufferSize,0);var $=L*B,_=r.min($*4,l);if($){for(var j=0;j<$;j+=B)this._doProcessBlock(o,j);n=o.splice(0,$),s.sigBytes-=_;}return new F.init(n,_)},clone:function(){var p=c.clone.call(this);return p._data=this._data.clone(),p},_minBufferSize:0});g.Hasher=m.extend({cfg:c.extend(),init:function(p){this.cfg=this.cfg.extend(p),this.reset();},reset:function(){m.reset.call(this),this._doReset();},update:function(p){return this._append(p),this._process(),this},finalize:function(p){p&&this._append(p);var n=this._doFinalize();return n},blockSize:16,_createHelper:function(p){return function(n,s){return new p.init(s).finalize(n)}},_createHmacHelper:function(p){return function(n,s){return new C.HMAC.init(p,s).finalize(n)}}});var C=D.algo={};return D})(Math);return u});}),au=ht((e,t)=>{(function(u,r){typeof e=="object"?t.exports=e=r(ou()):typeof define=="function"&&define.amd?define(["./core"],r):r(u.CryptoJS);})(e,function(u){return (function(){var r=u,i=r.lib,a=i.WordArray,d=i.Hasher,E=r.algo,D=[],g=E.SHA1=d.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(c,F){for(var A=this._hash.words,y=A[0],x=A[1],h=A[2],m=A[3],C=A[4],p=0;p<80;p++){if(p<16)D[p]=c[F+p]|0;else {var n=D[p-3]^D[p-8]^D[p-14]^D[p-16];D[p]=n<<1|n>>>31;}var s=(y<<5|y>>>27)+C+D[p];p<20?s+=(x&h|~x&m)+1518500249:p<40?s+=(x^h^m)+1859775393:p<60?s+=(x&h|x&m|h&m)-1894007588:s+=(x^h^m)-899497514,C=m,m=h,h=x<<30|x>>>2,x=y,y=s;}A[0]=A[0]+y|0,A[1]=A[1]+x|0,A[2]=A[2]+h|0,A[3]=A[3]+m|0,A[4]=A[4]+C|0;},_doFinalize:function(){var c=this._data,F=c.words,A=this._nDataBytes*8,y=c.sigBytes*8;return F[y>>>5]|=128<<24-y%32,F[(y+64>>>9<<4)+14]=Math.floor(A/4294967296),F[(y+64>>>9<<4)+15]=A,c.sigBytes=F.length*4,this._process(),this._hash},clone:function(){var c=d.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=d._createHelper(g),r.HmacSHA1=d._createHmacHelper(g);})(),u.SHA1});}),De;(e=>(e.log=(t,...u)=>console.log(`[Pixi\u2019VN Json] ${t}`,...u),e.warn=(t,...u)=>console.warn(`[Pixi\u2019VN Json] ${t}`,...u),e.error=(t,...u)=>console.error(`[Pixi\u2019VN Json] ${t}`,...u),e.info=(t,...u)=>console.info(`[Pixi\u2019VN Json] ${t}`,...u)))(De||(De={}));function su(e){let t="";return e.values.forEach(u=>{if(typeof u=="string")t+=u;else {let r=v.getLogichValue(u);t+=`${r}`;}}),t}async function Ct(e,t){let u=v.getLogichValue(e);if(u)switch(u.type){case "sound":v.soundOperation(u);break;case "assets":case "bundle":await v.loadAssets(u);break;case "image":await v.imageOperation(u);break;case "video":await v.videoOperation(u);break;case "imagecontainer":await v.imageContainerOperation(u);break;case "text":await v.textOperation(u);break;case "canvaselement":await v.canvasElementOperation(u);break;case "value":v.setStorageValue(u);break;case "operationtoconvert":if(t){let r=su(u),i=await t(r);i&&await Ct(i,t);}break;case "input":case "dialogue":v.narrationOperation(u);break;case "shake":await v.effectOperation(u);break;case "animate":case "animate-sequence":v.animateOperation(u);break}}function lu(e){let t=v.getLogichValue(e);t&&t.type==="value"&&t.storageOperationType==="set"&&(t.storageType==="storage"||t.storageType==="tempstorage")&&v.setInitialStorageValue(t);}async function Me(e,t={}){if(!Array.isArray(e))if(typeof e=="object"||typeof e=="string")e=[e];else {De.error("Error parsing imported Pixi'VN JSON: data is not an object");return}let u=e.map(async i=>{if(typeof i=="string")try{i=JSON.parse(i);}catch(a){De.error("Error parsing imported Pixi'VN JSON",a),i={};}return i}),r=(await Promise.all(u)).map(async i=>{let a=[];if(i.initialOperations)for(let d of i.initialOperations)lu(d);if(i.labels){let d=i.labels;for(let E in d)try{let D=d[E],g=new cu(E,D,void 0,t);RegisteredLabels.add(g);}catch(D){De.error(`Error creating JSON label ${E}`,D);}}return Promise.all(a)});await Promise.all(r);}var pu=iu(au()),dt="___param___";function Du(e){try{if(typeof e>"u")return e;let t=JSON.stringify(e);return JSON.parse(t)}catch(t){throw De.error("Error creating exportable element",e,t),new Error("[Pixi\u2019VN] Error creating exportable element")}}var cu=class extends LabelAbstract{constructor(e,t,u,r={}){u||(u={}),u.onLoadingLabel=async()=>{for(let i of t){let a;if(typeof i=="function"?a=i():a=i,a=v.getConditionalStep(a),a.operations)try{let d=a.operations.map(E=>v.loadAssets(E));await Promise.all(d);}catch(d){De.error("The operation in the onLoadingLabel function of the label has an error:",d);}}},super(e,u),He(this,"_steps"),He(this,"operationStringConvert"),He(this,"skipEmptyDialogs",false),this._steps=t,this.operationStringConvert=r.operationStringConvert,this.skipEmptyDialogs=r.skipEmptyDialogs||false;}get steps(){return this._steps.map(e=>this.stepConverter(e))}get stepCount(){return this._steps.length}getStepById(e){if(e<0||e>=this._steps.length)return;let t=this._steps[e];return this.stepConverter(t)}getStepSha(e){if(e<0||e>=this.steps.length)return;let t=this._steps[e];return (0, pu.default)(t.toString().toLocaleLowerCase()).toString()}getDialogueText(e){let t="";if(Array.isArray(e)){let u=[];e.forEach(r=>{if(typeof r=="string")u.push(r);else if(r&&typeof r=="object"){let i=v.getLogichValue(r);i?(i&&!Array.isArray(i)&&typeof i=="object"&&(i=v.getLogichValue(i)||""),Array.isArray(i)?u=u.map(a=>`${a}`).concat(i):u.push(`${i}`)):u.push(`${r}`);}else u.push(`${r}`);}),t=u;}else {let u=v.getLogichValue(e);u&&!Array.isArray(u)&&typeof u=="object"&&(u=v.getLogichValue(u)),u&&Array.isArray(u)?t=u.map(r=>`${r}`):t=`${u}`;}return t}getDialogue(e){if(e==null)return;let t=v.getLogichValue(e);return t==null?`${t}`:typeof t=="object"&&"character"in t&&"text"in t?{character:t.character,text:H.t(this.getDialogueText(t.text))}:H.t(this.getDialogueText(t))}getChoices(e){return v.getLogichValue(e)?.map(t=>v.getLogichValue(t)).filter(t=>t!==void 0)}stepConverter(e){return async t=>{let u=typeof e=="function"?e():e;u=Du(u),u=v.getConditionalStep(u);let r=this.operationStringConvert?A=>this.operationStringConvert(A,u,t):void 0,{operations:i=[]}=u;for(let A of i)await Ct(A,r);let{labelToOpen:a=[]}=u,d=this.getChoices(u.choices),E=v.getLogichValue(u.glueEnabled),D=this.getDialogue(u.dialogue),g=[];Array.isArray(a)||(a=[a]),a.forEach(A=>{let y=v.getLogichValue(A);y&&g.push(y);});let c=v.getLogichValue(u.goNextStep),F=v.getLogichValue(u.end);if(d){let A=d.map(y=>{let x="";if(Array.isArray(y.text)){let h=[];y.text.forEach(m=>{if(typeof m=="string")h.push(H.t(m));else if(m&&typeof m=="object"){let C=v.getLogichValue(m);C&&!Array.isArray(C)&&typeof C=="object"&&(C=v.getLogichValue(C)||""),C&&(Array.isArray(C)?h=h.concat(H.t(C)):h.push(H.t(C)));}}),x=h;}else typeof y.text=="string"&&(x=H.t(y.text));return {label:y.label,text:x,props:y.props,type:y.type,oneTime:y.oneTime,onlyHaveNoChoice:y.onlyHaveNoChoice,autoSelect:y.autoSelect}});narration.choices=A;}else narration.choices=void 0;D!==void 0&&(narration.dialogue=D,this.skipEmptyDialogs&&typeof D=="string"&&(D===""||RegExp(/^\s+$/).test(D))&&(c=true)),E?storage.setFlag(SYSTEM_RESERVED_STORAGE_KEYS.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,true):E===false&&storage.setFlag(SYSTEM_RESERVED_STORAGE_KEYS.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,false);for(let A of g){let y=A.label;typeof y=="object"&&(y=v.getLogichValue(y)||"");let x=A.params?.map(h=>v.getLogichValue(h));t={...t,...A.props},A.type==="jump"?(narration.openedLabels.length>0&&narration.closeCurrentLabel(),storage.setTempVariable(`${dt}${narration.openedLabels.length}`,x),await narration.call(y,t)):(storage.setTempVariable(`${dt}${narration.openedLabels.length}`,x),await narration.call(y,t));}F==="game_end"?(narration.closeAllLabels(),await narration.continue(t,{runNow:true})):F==="label_end"&&narration.closeCurrentLabel(),c&&await narration.continue(t,{runNow:true});}}};var Ge="___param___";async function Ou(e){let t=v.getLogichValue(e);if(t)switch(t.type){case "assets":switch(t.operationType){case "load":await Assets.load(t.aliases);break;case "lazyload":Assets.backgroundLoad(t.aliases);break}break;case "bundle":switch(t.operationType){case "load":await Assets.loadBundle(t.aliases);break;case "lazyload":Assets.backgroundLoadBundle(t.aliases);break}break}}var W;(e=>(e.log=(t,...u)=>console.log(`[Pixi\u2019VN Json] ${t}`,...u),e.warn=(t,...u)=>console.warn(`[Pixi\u2019VN Json] ${t}`,...u),e.error=(t,...u)=>console.error(`[Pixi\u2019VN Json] ${t}`,...u),e.info=(t,...u)=>console.info(`[Pixi\u2019VN Json] ${t}`,...u)))(W||(W={}));async function we(e,t,u){switch(u.type){case "fade":await showWithFade(t.alias,e,u.props,u.priority);break;case "dissolve":await showWithDissolve(t.alias,e,u.props,u.priority);break;case "movein":case "moveout":await moveIn(t.alias,e,u.props,u.priority);break;case "zoomin":case "zoomout":await zoomIn(t.alias,e,u.props,u.priority);break;case "pushin":case "pushout":await pushIn(t.alias,e,u.props,u.priority);break}}function Fe(e){if(e.transition)switch(e.transition.type){case "fade":removeWithFade(e.alias,e.transition.props,e.transition.priority);break;case "dissolve":removeWithDissolve(e.alias,e.transition.props,e.transition.priority);break;case "movein":case "moveout":moveOut(e.alias,e.transition.props,e.transition.priority);break;case "zoomin":case "zoomout":zoomOut(e.alias,e.transition.props,e.transition.priority);break;case "pushin":case "pushout":pushOut(e.alias,e.transition.props,e.transition.priority);break}else canvas.remove(e.alias);}async function Nu(e){switch(e.operationType){case "show":if(e.transition){let u=new ImageSprite(e.props,e.url||e.alias);await we(u,e,e.transition);}else await showImage(e.alias,e.url,e.props);break;case "edit":let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):W.error(`Image with alias ${e.alias} not found.`);break;case "remove":Fe(e);break}}async function Ju(e){switch(e.operationType){case "show":if(e.transition){let i=new VideoSprite(e.props,e.url||e.alias);await we(i,e,e.transition);}else await showVideo(e.alias,e.url,e.props);break;case "edit":let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):W.error(`Video with alias ${e.alias} not found.`);break;case "remove":Fe(e);break;case "pause":let u=canvas.find(e.alias);u?u.paused=true:W.error(`Video with alias ${e.alias} not found.`);break;case "resume":let r=canvas.find(e.alias);r?r.paused=false:W.error(`Video with alias ${e.alias} not found.`);break}}async function _u(e){switch(e.operationType){case "show":if(e.transition){let u=new ImageContainer(e.props,e.urls);await we(u,e,e.transition);}else await showImageContainer(e.alias,e.urls,e.props);break;case "edit":let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):W.error(`ImageContainer with alias ${e.alias} not found.`);break;case "remove":Fe(e);break}}async function ku(e){switch(e.operationType){case "show":if(e.props=e.props||{},e.props.text=H.t(e.text),e.transition){let u=new Text(e.props);await we(u,e,e.transition);}else showText(e.alias,e.text,e.props);break;case "edit":let t=canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):W.error(`Text with alias ${e.alias} not found.`);break;case "remove":Fe(e);break}}async function Ru(e){switch(e.operationType){case "edit":try{let t=canvas.find(e.alias);t?e.props&&(t.memory={...t.memory,...e.props}):W.error(`Canvas Element with alias ${e.alias} not found.`);}catch(t){W.error(`There was an error while trying to edit the canvas element with alias ${e.alias}.`,t);}break;case "remove":Fe(e);break}}async function Lu(e){e.type==="shake"&&await shakeEffect(e.alias,e.props,e.priority);}function ju(e){switch(e.type){case "animate":canvas.animate(e.alias,e.keyframes,e.options,e.priority);break;case "animate-sequence":canvas.animate(e.alias,e.sequence,e.options,e.priority);break}}function Iu(e){switch(e.type){case "input":narration.requestInput({type:e.valueType},e.defaultValue);break;case "dialogue":narration.dialogue=void 0;break}}function $u(e){switch(e.operationType){case "play":sound.play(e.alias,e.props);break;case "stop":sound.stop(e.alias);break;case "pause":sound.pause(e.alias);break;case "resume":sound.resume(e.alias);break;case "volume":sound.volume(e.alias,e.value);break}}function Hu(e){try{if(typeof e>"u")return e;let t=JSON.stringify(e);return JSON.parse(t)}catch(t){throw W.error("Error creating exportable element",e,t),new Error("[Pixi\u2019VN] Error creating exportable element")}}function zu(e){let t=w(e.value),u;switch(t&&typeof t=="object"&&"type"in t?u=w(t):u=t,e.storageType){case "flagStorage":storage.setFlag(e.key,e.value);break;case "storage":storage.set(e.key,u);break;case "tempstorage":storage.setTempVariable(e.key,u);break;case "params":let r=storage.get(`${Ge}${narration.openedLabels.length-1}`)||[];r&&r.length-1>=e.key&&(r[e.key]=u),storage.setTempVariable(`${Ge}${narration.openedLabels.length-1}`,r);break}}function Mu(e){let t=w(e.value),u;switch(t&&typeof t=="object"&&"type"in t?u=w(t):u=t,e.storageType){case "storage":case "tempstorage":storage.default={[e.key]:u};break}}function w(e){let t=Xu(e);if(t&&typeof t=="object"&&"type"in t)switch(t.type){case "value":return Gu(t);case "arithmetic":case "arithmeticsingle":return Wu(t);case "compare":case "valueCondition":case "union":return Uu(t)}return t}function Wu(e){let t=w(e.leftValue);switch(e.type){case "arithmetic":let u=w(e.rightValue);switch(e.operator){case "*":return t*u;case "/":return t/u;case "+":return t+u;case "-":return t-u;case "%":return t%u;case "POW":return Math.pow(t,u);case "RANDOM":return narration.getRandomNumber(t,u)}case "arithmeticsingle":switch(e.operator){case "INT":return parseInt(t);case "FLOOR":return Math.floor(t);case "FLOAT":return parseFloat(t)}break}}function Gu(e){if(e&&typeof e=="object"&&"type"in e&&e.type==="value"&&e.storageOperationType==="get")switch(e.storageType){case "storage":case "tempstorage":return storage.get(e.key);case "flagStorage":return storage.getFlag(e.key);case "label":return narration.getTimesLabelOpened(e.label);case "choice":return narration.getTimesChoiceMade(e.index);case "logic":return w(e.operation);case "params":let t=storage.get(`${Ge}${narration.openedLabels.length-1}`)||[];if(t&&t.length>e.key)return t[e.key];W.warn("getValue params not found");return}return e}function Uu(e){if(!e)return false;if(typeof e!="object"||!("type"in e))return !!e;switch(e.type){case "compare":let t=w(e.leftValue),u=w(e.rightValue);switch(e.operator){case "==":return t===u;case "!=":return t!==u;case "<":return t<u;case "<=":return t<=u;case ">":return t>u;case ">=":return t>=u;case "CONTAINS":return t.toString().includes(u.toString())}break;case "valueCondition":return !!w(e.value);case "union":return qu(e)}return !!e}function qu(e){if(e.unionType==="not")return !w(e.condition);let t=e.unionType==="and";for(let u=0;u<e.conditions.length;u++)if(t=w(e.conditions[u])||false,e.unionType==="and"){if(!t)return false}else if(t)return true;return t}function Yu(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Xu(e){if(Array.isArray(e)||!e)return e;if(e&&typeof e=="object"&&"type"in e)switch(e.type){case "resulttocombine":return Qu(e);case "ifelse":return w(e.condition)?w(e.then):w(e.else);case "stepswitch":let t=w(e.elements)||[];if(t.length===0){W.error("getValueFromConditionalStatements elements.length === 0");return}switch(e.choiceType){case "random":let u=Yu(0,t.length-1);return w(t[u]);case "loop":let r=NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return r>t.length-1&&(r=r%t.length),w(t[r]);case "sequential":let i,a=NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return e.end=="lastItem"&&(i=w(t[t.length-1])),a>t.length-1?i:w(t[a]);case "sequentialrandom":let d=NarrationManagerStatic.getRandomNumber(0,t.length-1,{nestedId:e.nestedId,onceOnly:true});if(d==null&&e.end=="lastItem"){let E=NarrationManagerStatic.getCurrentStepTimesCounterData(e.nestedId);if(!E||!E?.usedRandomNumbers){W.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}let D=E.usedRandomNumbers[`0-${t.length-1}`];return w(t[D[D.length-1]])}if(d==null){W.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}return w(t[d])}}return e}function Ue(e){if(e.conditionalStep){let t=Hu(w(e.conditionalStep));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 u={...e,conditionalStep:void 0,...t};return Ue(u)}else storage.getFlag(SYSTEM_RESERVED_STORAGE_KEYS.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY)&&storage.setFlag(SYSTEM_RESERVED_STORAGE_KEYS.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,false);}return e}function Qu(e){let t=e.firstItem,u=[];e.secondConditionalItem?.forEach(i=>{if(Array.isArray(i))i.forEach(a=>{let d=w(a);u.push(d);});else {let a=w(i);u.push(a);}});let r=t?[t,...u]:u;if(r.length===0){W.warn("combinateResult toCheck.length === 0");return}if(typeof r[0]=="string")return H.t(r);if(typeof r[0]=="object"){let i=r,a,d=false,E=i.map((C,p)=>{C=Ue(C);let n=w(C.dialogue)||"";return p===0?(a=w(C.glueEnabled)||false,n):(typeof n=="object"&&"text"in n&&(n=n.character+": "+n.text),a===false&&d&&(n=`
2
+
3
+ `+n),n&&(d=true),a=w(C.glueEnabled)||false,n)}),D=w(E[0]),g=typeof D=="object"&&"character"in D?D.character:void 0,c=E.flatMap(C=>{let p;C&&typeof C=="object"&&"text"in C?p=C.text:p=C;let n;return Array.isArray(p)?n=p.map(s=>{let o=w(s);return H.t(`${o}`)}):n=w(p)||"",H.t(n)}),F=i.find(C=>C.end),A=i.find(C=>C.choices),y=false,x=false;i.length>0&&(i[0].glueEnabled&&i[0].goNextStep&&i[0].dialogue===void 0&&storage.setFlag(SYSTEM_RESERVED_STORAGE_KEYS.ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY,true),y=i[i.length-1].glueEnabled,x=i.reverse().find(C=>!(C.operations&&(!C.dialogue||!C.choices)))?.goNextStep);let h=i.find(C=>C.labelToOpen),m=[];return i.forEach(C=>{C.operations&&(m=[...m,...C.operations]);}),{dialogue:g?{character:g,text:c}:c,end:F?.end,choices:A?.choices,glueEnabled:y,goNextStep:x,labelToOpen:h?.labelToOpen,operations:m}}}function qe(){v.init({animateOperation:ju,canvasElementOperation:Ru,effectOperation:Lu,imageContainerOperation:_u,imageOperation:Nu,textOperation:ku,narrationOperation:Iu,loadAssets:Ou,soundOperation:$u,videoOperation:Ju,setStorageValue:zu,setInitialStorageValue:Mu,getLogichValue:w,getConditionalStep:Ue});}var Ku=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Zu=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,en=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Ye={Space_Separator:Ku,ID_Start:Zu,ID_Continue:en},I={isSpaceSeparator(e){return typeof e=="string"&&Ye.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Ye.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||Ye.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},Qe,q,ue,Oe,oe,K,z,et,me,tn=function(t,u){Qe=String(t),q="start",ue=[],Oe=0,oe=1,K=0,z=void 0,et=void 0,me=void 0;do z=un(),on[q]();while(z.type!=="eof");return typeof u=="function"?Ke({"":me},"",u):me};function Ke(e,t,u){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let i=0;i<r.length;i++){let a=String(i),d=Ke(r,a,u);d===void 0?delete r[a]:Object.defineProperty(r,a,{value:d,writable:true,enumerable:true,configurable:true});}else for(let i in r){let a=Ke(r,i,u);a===void 0?delete r[i]:Object.defineProperty(r,i,{value:a,writable:true,enumerable:true,configurable:true});}return u.call(e,t,r)}var S,b,ye,te,V;function un(){for(S="default",b="",ye=false,te=1;;){V=ne();let e=Ft[S]();if(e)return e}}function ne(){if(Qe[Oe])return String.fromCodePoint(Qe.codePointAt(Oe))}function f(){let e=ne();return e===`
4
+ `?(oe++,K=0):e?K+=e.length:K++,e&&(Oe+=e.length),e}var Ft={default(){switch(V){case " ":case "\v":case "\f":case " ":case "\xA0":case "\uFEFF":case `
5
+ `:case "\r":case "\u2028":case "\u2029":f();return;case "/":f(),S="comment";return;case void 0:return f(),k("eof")}if(I.isSpaceSeparator(V)){f();return}return Ft[q]()},comment(){switch(V){case "*":f(),S="multiLineComment";return;case "/":f(),S="singleLineComment";return}throw R(f())},multiLineComment(){switch(V){case "*":f(),S="multiLineCommentAsterisk";return;case void 0:throw R(f())}f();},multiLineCommentAsterisk(){switch(V){case "*":f();return;case "/":f(),S="default";return;case void 0:throw R(f())}f(),S="multiLineComment";},singleLineComment(){switch(V){case `
6
+ `:case "\r":case "\u2028":case "\u2029":f(),S="default";return;case void 0:return f(),k("eof")}f();},value(){switch(V){case "{":case "[":return k("punctuator",f());case "n":return f(),ce("ull"),k("null",null);case "t":return f(),ce("rue"),k("boolean",true);case "f":return f(),ce("alse"),k("boolean",false);case "-":case "+":f()==="-"&&(te=-1),S="sign";return;case ".":b=f(),S="decimalPointLeading";return;case "0":b=f(),S="zero";return;case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":b=f(),S="decimalInteger";return;case "I":return f(),ce("nfinity"),k("numeric",1/0);case "N":return f(),ce("aN"),k("numeric",NaN);case '"':case "'":ye=f()==='"',b="",S="string";return}throw R(f())},identifierNameStartEscape(){if(V!=="u")throw R(f());f();let e=Ze();switch(e){case "$":case "_":break;default:if(!I.isIdStartChar(e))throw Et();break}b+=e,S="identifierName";},identifierName(){switch(V){case "$":case "_":case "\u200C":case "\u200D":b+=f();return;case "\\":f(),S="identifierNameEscape";return}if(I.isIdContinueChar(V)){b+=f();return}return k("identifier",b)},identifierNameEscape(){if(V!=="u")throw R(f());f();let e=Ze();switch(e){case "$":case "_":case "\u200C":case "\u200D":break;default:if(!I.isIdContinueChar(e))throw Et();break}b+=e,S="identifierName";},sign(){switch(V){case ".":b=f(),S="decimalPointLeading";return;case "0":b=f(),S="zero";return;case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":b=f(),S="decimalInteger";return;case "I":return f(),ce("nfinity"),k("numeric",te*(1/0));case "N":return f(),ce("aN"),k("numeric",NaN)}throw R(f())},zero(){switch(V){case ".":b+=f(),S="decimalPoint";return;case "e":case "E":b+=f(),S="decimalExponent";return;case "x":case "X":b+=f(),S="hexadecimal";return}return k("numeric",te*0)},decimalInteger(){switch(V){case ".":b+=f(),S="decimalPoint";return;case "e":case "E":b+=f(),S="decimalExponent";return}if(I.isDigit(V)){b+=f();return}return k("numeric",te*Number(b))},decimalPointLeading(){if(I.isDigit(V)){b+=f(),S="decimalFraction";return}throw R(f())},decimalPoint(){switch(V){case "e":case "E":b+=f(),S="decimalExponent";return}if(I.isDigit(V)){b+=f(),S="decimalFraction";return}return k("numeric",te*Number(b))},decimalFraction(){switch(V){case "e":case "E":b+=f(),S="decimalExponent";return}if(I.isDigit(V)){b+=f();return}return k("numeric",te*Number(b))},decimalExponent(){switch(V){case "+":case "-":b+=f(),S="decimalExponentSign";return}if(I.isDigit(V)){b+=f(),S="decimalExponentInteger";return}throw R(f())},decimalExponentSign(){if(I.isDigit(V)){b+=f(),S="decimalExponentInteger";return}throw R(f())},decimalExponentInteger(){if(I.isDigit(V)){b+=f();return}return k("numeric",te*Number(b))},hexadecimal(){if(I.isHexDigit(V)){b+=f(),S="hexadecimalInteger";return}throw R(f())},hexadecimalInteger(){if(I.isHexDigit(V)){b+=f();return}return k("numeric",te*Number(b))},string(){switch(V){case "\\":f(),b+=nn();return;case '"':if(ye)return f(),k("string",b);b+=f();return;case "'":if(!ye)return f(),k("string",b);b+=f();return;case `
7
+ `:case "\r":throw R(f());case "\u2028":case "\u2029":an(V);break;case void 0:throw R(f())}b+=f();},start(){switch(V){case "{":case "[":return k("punctuator",f())}S="value";},beforePropertyName(){switch(V){case "$":case "_":b=f(),S="identifierName";return;case "\\":f(),S="identifierNameStartEscape";return;case "}":return k("punctuator",f());case '"':case "'":ye=f()==='"',S="string";return}if(I.isIdStartChar(V)){b+=f(),S="identifierName";return}throw R(f())},afterPropertyName(){if(V===":")return k("punctuator",f());throw R(f())},beforePropertyValue(){S="value";},afterPropertyValue(){switch(V){case ",":case "}":return k("punctuator",f())}throw R(f())},beforeArrayValue(){if(V==="]")return k("punctuator",f());S="value";},afterArrayValue(){switch(V){case ",":case "]":return k("punctuator",f())}throw R(f())},end(){throw R(f())}};function k(e,t){return {type:e,value:t,line:oe,column:K}}function ce(e){for(let t of e){if(ne()!==t)throw R(f());f();}}function nn(){switch(ne()){case "b":return f(),"\b";case "f":return f(),"\f";case "n":return f(),`
8
+ `;case "r":return f(),"\r";case "t":return f()," ";case "v":return f(),"\v";case "0":if(f(),I.isDigit(ne()))throw R(f());return "\0";case "x":return f(),rn();case "u":return f(),Ze();case `
9
+ `:case "\u2028":case "\u2029":return f(),"";case "\r":return f(),ne()===`
10
+ `&&f(),"";case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":throw R(f());case void 0:throw R(f())}return f()}function rn(){let e="",t=ne();if(!I.isHexDigit(t)||(e+=f(),t=ne(),!I.isHexDigit(t)))throw R(f());return e+=f(),String.fromCodePoint(parseInt(e,16))}function Ze(){let e="",t=4;for(;t-- >0;){let u=ne();if(!I.isHexDigit(u))throw R(f());e+=f();}return String.fromCodePoint(parseInt(e,16))}var on={start(){if(z.type==="eof")throw fe();Xe();},beforePropertyName(){switch(z.type){case "identifier":case "string":et=z.value,q="afterPropertyName";return;case "punctuator":Pe();return;case "eof":throw fe()}},afterPropertyName(){if(z.type==="eof")throw fe();q="beforePropertyValue";},beforePropertyValue(){if(z.type==="eof")throw fe();Xe();},beforeArrayValue(){if(z.type==="eof")throw fe();if(z.type==="punctuator"&&z.value==="]"){Pe();return}Xe();},afterPropertyValue(){if(z.type==="eof")throw fe();switch(z.value){case ",":q="beforePropertyName";return;case "}":Pe();}},afterArrayValue(){if(z.type==="eof")throw fe();switch(z.value){case ",":q="beforeArrayValue";return;case "]":Pe();}},end(){}};function Xe(){let e;switch(z.type){case "punctuator":switch(z.value){case "{":e={};break;case "[":e=[];break}break;case "null":case "boolean":case "numeric":case "string":e=z.value;break}if(me===void 0)me=e;else {let t=ue[ue.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,et,{value:e,writable:true,enumerable:true,configurable:true});}if(e!==null&&typeof e=="object")ue.push(e),Array.isArray(e)?q="beforeArrayValue":q="beforePropertyName";else {let t=ue[ue.length-1];t==null?q="end":Array.isArray(t)?q="afterArrayValue":q="afterPropertyValue";}}function Pe(){ue.pop();let e=ue[ue.length-1];e==null?q="end":Array.isArray(e)?q="afterArrayValue":q="afterPropertyValue";}function R(e){return Ne(e===void 0?`JSON5: invalid end of input at ${oe}:${K}`:`JSON5: invalid character '${yt(e)}' at ${oe}:${K}`)}function fe(){return Ne(`JSON5: invalid end of input at ${oe}:${K}`)}function Et(){return K-=5,Ne(`JSON5: invalid identifier character at ${oe}:${K}`)}function an(e){console.warn(`JSON5: '${yt(e)}' in strings is not valid ECMAScript; consider escaping`);}function yt(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let u=e.charCodeAt(0).toString(16);return "\\x"+("00"+u).substring(u.length)}return e}function Ne(e){let t=new SyntaxError(e);return t.lineNumber=oe,t.columnNumber=K,t}var sn=function(t,u,r){let i=[],a="",d,E,D="",g;if(u!=null&&typeof u=="object"&&!Array.isArray(u)&&(r=u.space,g=u.quote,u=u.replacer),typeof u=="function")E=u;else if(Array.isArray(u)){d=[];for(let h of u){let m;typeof h=="string"?m=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(m=String(h)),m!==void 0&&d.indexOf(m)<0&&d.push(m);}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),D=" ".substr(0,r)):typeof r=="string"&&(D=r.substr(0,10)),c("",{"":t});function c(h,m){let C=m[h];switch(C!=null&&(typeof C.toJSON5=="function"?C=C.toJSON5(h):typeof C.toJSON=="function"&&(C=C.toJSON(h))),E&&(C=E.call(m,h,C)),C instanceof Number?C=Number(C):C instanceof String?C=String(C):C instanceof Boolean&&(C=C.valueOf()),C){case null:return "null";case true:return "true";case false:return "false"}if(typeof C=="string")return F(C);if(typeof C=="number")return String(C);if(typeof C=="object")return Array.isArray(C)?x(C):A(C)}function F(h){let m={"'":.1,'"':.2},C={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},p="";for(let s=0;s<h.length;s++){let o=h[s];switch(o){case "'":case '"':m[o]++,p+=o;continue;case "\0":if(I.isDigit(h[s+1])){p+="\\x00";continue}}if(C[o]){p+=C[o];continue}if(o<" "){let l=o.charCodeAt(0).toString(16);p+="\\x"+("00"+l).substring(l.length);continue}p+=o;}let n=g||Object.keys(m).reduce((s,o)=>m[s]<m[o]?s:o);return p=p.replace(new RegExp(n,"g"),C[n]),n+p+n}function A(h){if(i.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");i.push(h);let m=a;a=a+D;let C=d||Object.keys(h),p=[];for(let s of C){let o=c(s,h);if(o!==void 0){let l=y(s)+":";D!==""&&(l+=" "),l+=o,p.push(l);}}let n;if(p.length===0)n="{}";else {let s;if(D==="")s=p.join(","),n="{"+s+"}";else {let o=`,
11
+ `+a;s=p.join(o),n=`{
12
+ `+a+s+`,
13
+ `+m+"}";}}return i.pop(),a=m,n}function y(h){if(h.length===0)return F(h);let m=String.fromCodePoint(h.codePointAt(0));if(!I.isIdStartChar(m))return F(h);for(let C=m.length;C<h.length;C++)if(!I.isIdContinueChar(String.fromCodePoint(h.codePointAt(C))))return F(h);return h}function x(h){if(i.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");i.push(h);let m=a;a=a+D;let C=[];for(let n=0;n<h.length;n++){let s=c(String(n),h);C.push(s!==void 0?s:"null");}let p;if(C.length===0)p="[]";else if(D==="")p="["+C.join(",")+"]";else {let n=`,
14
+ `+a,s=C.join(n);p=`[
15
+ `+a+s+`,
16
+ `+m+"]";}return i.pop(),a=m,p}},ln={parse:tn,stringify:sn},pn=ln,Je=pn;var mt="\xA7SPACE\xA7",xt="\xA7DOUBLE_QUOTES\xA7",Bt="\xA7QUOTES\xA7",bt="SPECIAL_\xA7QUOTES\xA7",Tt="\xA7CURLY_BRACKETS1\xA7",St="\xA7CURLY_BRACKETS2\xA7",Dn=["add","play","pause","resume","remove","volume"],ge=class{};c(ge,"handlers",[t=>false]);var _e;(p=>{function e(n,s){let o=ge.handlers;for(let l=0;l<o.length;l++)try{let B=o[l](n,s,y);if(B===!0||typeof B=="string")return B}catch{}return false}function t(n){ge.handlers.push(n);}p.add=t;function u(){ge.handlers=[];}p.clear=u;async function r(n,s,o){try{n=n.replaceAll('\\"',xt),n=n.replaceAll("\\'",Bt),n=n.replaceAll("\\`",bt),n=n.replaceAll("\\{",Tt),n=n.replaceAll("\\}",St),n=n.replaceAll("{"," { "),n=n.replaceAll("}"," } "),n=n.replaceAll(Tt,"{"),n=n.replaceAll(St,"}");let l=[],B,O="";for(let j=0;j<n.length;j++){let M=n[j];M==='"'||M==="'"||M==="`"?B===void 0?(l.push(O),O="",B=M,O+=M):B===M?(B=void 0,O+=M,l.push(O),O=""):O+=M:O+=M;}O!==""&&l.push(O),l.forEach((j,M)=>{M%2===1&&(l[M]=j.replaceAll(" ",mt));}),n=l.join(""),l=n.split(" ").filter(j=>j!==""),l=l.map(j=>j.replaceAll(mt," ").replaceAll(xt,'"').replaceAll(Bt,"'").replaceAll(bt,"`"));let L=e(l,o);if(L===!0)return;if(typeof L=="string")return L.startsWith("#")&&(L=L.substring(1)),p.run(L,s,o);let $=l.length>1?m(l[1]):"",_=l.length>0?m(l[0]):"";switch($){case "image":case "imagecontainer":case "canvaselement":case "video":case "text":return $==="video"&&(_==="pause"||_==="resume")?{type:"video",operationType:_,alias:m(l[2])}:i(l,$);case "sound":return D(l);case "input":if(_==="request"){let j={type:"input",operationType:"request"};if(l.length>2)try{let M=l.slice(2),re=y(M);"type"in re&&typeof re.type=="string"&&(j.valueType=re.type),"default"in re&&(j.defaultValue=re.default);}catch{}return j}break;case "assets":case "bundle":switch(_){case "load":case "lazyload":return {type:$,operationType:_,aliases:l.slice(2)}}break;default:if($)switch(_){case "call":case "jump":s.labelToOpen={label:$,type:_},s.goNextStep=void 0;return;case "shake":let j={};if(l.length>2)try{j=y(l.slice(2));}catch{}return {alias:$,type:_,props:j};case "animate":let re={},Dt={};if(l.length>2){let le=l.slice(2),Ie=[];if(le.includes("options")){let be=le.indexOf("options");Ie=le.slice(be+1),le=le.slice(0,be);}try{re=y(le);}catch{}if(Ie.length>0)try{Dt=y(Ie);}catch{}}return {alias:$,type:_,keyframes:re,options:Dt}}else switch(_){case "pause":return "dialogue"in s&&delete s.dialogue,"goNextStep"in s&&delete s.goNextStep,{type:"dialogue",operationType:"clean"};case "continue":s.goNextStep=!0,s.glueEnabled=!1;return}}}catch(l){throw d.error("Error parsing ink hashtag-command",n),l}d.error("The operation is not valid",n);}p.run=r;function i(n,s){let o=m(n[0]),l=m(n[2]),B=x(n.slice(3));switch(o){case "show":switch(s){case "image":case "video":return a(s,l,B);case "imagecontainer":return E(s,l,B);case "text":return d$1(s,l,B);default:d.error("This show operation is not valid for this type of element",s);}case "edit":return {type:s,operationType:"edit",alias:l,props:h(B)};case "remove":let L={type:s,operationType:"remove",alias:l};if(B.length>1&&B[0]==="with"){let $=n[n.indexOf("with")+1],_=n.slice(n.indexOf("with")+2),j=c($,_);j!==void 0&&(L.transition=j);}return L;default:d.error("The operation type is not valid",o);}}function a(n,s,o){let l,B;return o.length%2===0?(l=s,B=o):(l=m(o[0]),B=o.slice(1)),g({type:n,operationType:"show",alias:s,url:l},B)}function d$1(n,s,o){let l,B;return o.length%2===0?(l=s,B=o):(l=m(o[0]),B=o.slice(1)),g({type:n,operationType:"show",alias:s,text:l},B)}function E(n,s,o){let l=[],B=o.findIndex(_=>_.startsWith("[")),O=o.findIndex(_=>_.endsWith("]"));if(B===-1||O===-1){d.error("Show imagecontainer must have a list of image ulrs",o);return}if(l=o.slice(B,O+1),l.length<2){d.error("Show imagecontainer must have a list of image ulrs",o);return}l[0]==="["?l.shift():l[0]=l[0].substring(1),l[l.length-1]==="]"?l.pop():l[l.length-1]=l[l.length-1].substring(0,l[l.length-1].length-1);let L={type:n,operationType:"show",alias:s,urls:l.map(_=>m(_))},$=o.slice(O+1);return g(L,$)}function D(n){let s=m(n[0]);if(!Dn.includes(s))return;let o=m(n[2]);switch(s){case "play":let l={type:"sound",operationType:"play",alias:o};if(n.length>3){let _=A(n.slice(3));_!==void 0&&(l.props=_);}return l;case "pause":case "resume":return {type:"sound",operationType:s,alias:o};case "stop":case "remove":return {type:"sound",operationType:"stop",alias:o};case "volume":let L=parseFloat(n[3]);return {type:"sound",operationType:"volume",alias:o,value:L}}}function g(n,s){if(s.length>0){if(s.includes("with")&&s.length>s.indexOf("with")+1){let o=s[s.indexOf("with")+1],l=s.slice(s.indexOf("with")+2);s=s.slice(0,s.indexOf("with"));let B=c(o,l);B!==void 0&&(n.transition=B);}if(s.length>0){let o=h(s);n.props=o;}}return n}function c(n,s){switch(n){case "dissolve":case "fade":case "movein":case "moveout":case "zoomin":case "zoomout":case "pushin":case "pushout":break;default:return}let o={type:n};if(s.length>0)try{let l=h(s);o.props=l;}catch{}return o}function A(n){try{return y(n)}catch{return}}function y(n){let s=x(n);return h(s)}function x(n){let s=[],o=0,l="";for(let B=0;B<n.length;B++){let O=n[B];O.startsWith("{")?(o++,l+=O):O.endsWith("}")&&o>0?(o--,l+=O,o===0&&(s.push(l),l="")):o>0?l+=O:s.push(O);}return s}function h(n){if(n.length===0)return {};if(n.length%2!==0)throw d.error("The props list must have a pair number of elements",n),new Error("The props list must have a pair number of elements");let s="{";n.forEach((o,l)=>{if(l%2===0)s+=`"${o}": `;else {switch(o){case "null":case "undefined":case "true":case "false":s+=`${o}`;break;default:C(o)?(o=m(o),s+=`"${o}"`):o.startsWith("{")&&o.endsWith("}")?s+=`${o}`:o.startsWith('"')&&o.endsWith('"')?s+=`${o}`:isNaN(parseFloat(o))?s+=`"${o}"`:s+=`${o}`;}l<n.length-1&&(s+=", ");}}),s+="}";try{return Je.parse(s)}catch(o){throw d.error("Error parsing ink json",s),o}}function m(n){return n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")||n.startsWith("`")&&n.endsWith("`")?n.substring(1,n.length-1):n}function C(n){return !!(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")||n.startsWith("`")&&n.endsWith("`"))}})(_e||(_e={}));var xe=_e;function Gn(e){_e.add(e);}var lt=b$1(e(),1);var ke="global decl",ae="___external_value___";function Be(e,t){if(e.endsWith(".s"))return;if(new RegExp(/.*\.[0-9]+\..*$/).test(e)&&(e=e.split(".").filter(i=>!i.match(/^[0-9]+$/)).join("."),!e.startsWith(".")))return e.replaceAll(".","_|_");if(!new RegExp(/^\.\^.*$/).test(e)&&e.includes("g-")){let r=e.split("g-");return tt(t)+"_|_"+"g-"+r[r.length-1]}let u=0;for(;new RegExp(/^\.\^.*$/).test(e);)u++,e=e.substring(2);if(u=u-1,new RegExp(/^\..*$/).test(e)&&t){let r=e.substring(1);return tt(t,u)+"_|_"+r.replaceAll(".","_|_")}return e.replaceAll(".","_|_")||tt(t,u).replaceAll(".","_|_")}function tt(e,t=0){let u=e.split("_|_");for(;u.length>1&&t>0;)u.pop()?.includes("g-")&&t--,t--;return u.join("_|_")}var vt="\xA7DOUBLE_SLASH_CONVERTOR\xA7";function ee(e){return e.startsWith("^")&&(e=e.substring(1)),e=e.replaceAll("\\\\",vt),e=e.replaceAll("\\n",`
17
+ `),e=e.replaceAll("\\t"," "),e=e.replaceAll(" "," "),e=e.replaceAll(vt,"\\\\"),e}var Vt=["+","-","/","*","%","_","==",">","<",">=","<=","!=","!","&&","||","MIN","MAX"],wt=["+","-","/","*","%","POW","RANDOM"],Pt=["INT","FLOOR","FLOAT"],Ot=["==",">","<",">=","<=","!=","CONTAINS"];function Ae(e,t,u){e=e.map(i=>{if(typeof i=="string"){if(i==="rnd")return "RANDOM";if(i==="?")return "CONTAINS"}return i});let r=[];return e.forEach(i=>{if(typeof i=="object"&&"CNT?"in i)if(new RegExp(/.*\.[0-9]\..*/).test(i["CNT?"])){let a=i["CNT?"].split("."),d$1=a.pop(),E=a.pop();if(E===void 0||d$1===void 0){d.error("Error parsing ink file: Conditional statement is not valid",e);return}let D=parseInt(E),g=a.join(".");if(g.includes("^.")){let F=g.split("."),A=F[F.length-1].replaceAll(".","_|_");F.pop(),g=F.join(".")+"."+A,d$1.includes("c-")&&(g=g+"_|_"+d$1);}else g=g.replaceAll(".","_|_");let c=Be(g,t);if(!c)return;r.push({type:"compare",leftValue:Nt(c),operator:">=",rightValue:{type:"value",value:D}});}else {let a=Be(i["CNT?"],t);if(!a)return;r.push(Nt(a));}else if(typeof i=="object"&&"VAR?"in i)r.push(de(i["VAR?"],u));else if(i==="&&"||i==="||"){if(r.length>=2){let a={type:"union",unionType:i==="&&"?"and":"or",conditions:[r[r.length-2],r[r.length-1]]};r.pop(),r.pop(),r.push(a);}}else if(i==="!")if(r.length===0)d.error("Error parsing ink file: Conditional statement is not valid",e);else {let a={type:"union",unionType:"not",condition:r[r.length-1]};r[r.length-1]=a;}else if(i&&typeof i=="string"&&Ot.includes(i))if(r.length<2)d.error("Error parsing ink file: Conditional statement is not valid",e);else {let a={type:"compare",operator:i,rightValue:r[r.length-1],leftValue:r[r.length-2]};r.pop(),r.pop(),r.push(a);}else if(i&&typeof i=="string"&&wt.includes(i))if(r.length<2)d.error("Error parsing ink file: Conditional statement is not valid",e);else {let a={type:"arithmetic",operator:i,rightValue:r[r.length-1],leftValue:r[r.length-2]};r.pop(),r.pop(),r.push(a);}else if(i&&typeof i=="string"&&Pt.includes(i)){let a={type:"arithmeticsingle",operator:i,leftValue:r[r.length-1]};r.pop(),r.push(a);}else i&&typeof i=="string"?i.startsWith("^")&&r.push(ee(i)):typeof i=="object"&&"^->"in i?i["^->"].includes("$r")||r.push(i["^->"]):r.push(i);}),r}function Nt(e){return {type:"value",storageType:"label",storageOperationType:"get",label:e}}function Jt(e,t,u){return Ae(e,t,u)}function de(e,t,u="storage"){let r=t.indexOf(e);return r>=0?{type:"value",storageType:"params",storageOperationType:"get",key:r}:{type:"value",storageOperationType:"get",storageType:u,key:e}}function ut(e,t,u,r="storage"){let i=t.indexOf(e);return i>=0?{type:"value",storageType:"params",storageOperationType:"set",key:i,value:u}:{type:"value",storageOperationType:"set",storageType:r,key:e,value:u}}function nt(e,t){return t||new RegExp(`${"_|_".replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}c-\\d+$`).test(e)?"call":"jump"}function Re(e,t){t&&(typeof t=="string"?t.startsWith("^")&&e.push(ee(t)):typeof t=="object"&&"type"in t&&t.type!=="value"&&e.push(t));}function rt(e,t,u,r,i={}){let{isNewLine:a=true,isHashtagScript:d=false,isThreads:E=false}=i;return fn(e,t,u,r,{isNewLine:a,isHashtagScript:d,isThreads:E})}function fn(e,t,u,r,i){if(!t)return;let{isNewLine:a,isHashtagScript:d=false,isThreads:E}=i;if(d)Array.isArray(t)&&t.length>0&&e.push({operations:[{type:"operationtoconvert",values:t}],goNextStep:true});else if(typeof t=="string"&&t.startsWith("^")||t&&typeof t=="object"&&"type"in t&&t.type=="value"&&t.storageOperationType==="get"){if(!a&&e.length>0){let D=e[e.length-1];!D.glueEnabled&&!D.operations&&(D.glueEnabled=true,D.labelToOpen||(D.goNextStep=true)),e[e.length-1]=D;}typeof t=="string"?e.push(gn(ee(t))):e.push({dialogue:t});}else if(typeof t=="string"){if(t==="end")e.push({end:"game_end"});else if(t==="done")e.push({end:"label_end",goNextStep:true});else if(t=="<>")if(e.length>0){let D=e[e.length-1];D.glueEnabled=true,D.labelToOpen||(D.goNextStep=true),e[e.length-1]=D;}else e.push({glueEnabled:true,goNextStep:false});}else if(typeof t=="object"){if("type"in t&&t.type!=="value"){if(!a&&e.length>0){let D=e[e.length-1];!D.glueEnabled&&!D.operations&&(D.glueEnabled=true,D.labelToOpen||(D.goNextStep=true)),e[e.length-1]=D;}e.push({conditionalStep:t});}else if("->"in t){let D=a?void 0:true;if(D&&u.includes("c-")&&e.length>0&&e[e.length-1]?.dialogue===void 0&&(D=void 0),!a&&e.length>0){let g=e[e.length-1];g.labelToOpen||(g.goNextStep=true),e[e.length-1]=g;}if(t.params&&t.params.length===0&&delete t.params,t.var)e.push({labelToOpen:{label:de(t["->"],r),type:E?"call":"jump",params:t.params},glueEnabled:D});else {let g=Be(t["->"],u);if(!g)return;e.push({labelToOpen:{label:g,type:nt(g,E),params:t.params},glueEnabled:D});}}"type"in t&&t.type=="value"&&t.storageOperationType==="set"&&(typeof t.value=="string"&&t.value.startsWith("^")&&(t.value=ee(t.value)),e.push({goNextStep:true,operations:[t]}));}}function gn(e){let t;if(e.includes(": ")){let u=e.split(": "),r=u[0],i=u.slice(1).join(": ");RegisteredCharacters.get(r)&&(t=r,e=i);}return t?{dialogue:{character:t,text:e}}:{dialogue:e}}function it(e,t,u,r=true,i=false){return An(e,t,u,r,i)}function An(e,t,u,r,i=false){t&&(typeof t=="string"&&t.startsWith("^")||t&&typeof t=="object"&&"type"in t&&t.type=="value"&&t.storageOperationType==="get"?typeof t=="string"?e.push(ee(t)):e.push(t):typeof t=="object"&&"type"in t&&e.push(t));}function Le(e,t,u){if(e.length===0){d.error("Error parsing ink file: Arithmetic statement is not valid",e);return}let r=Ae(e,t,u);if(r.length===1){let i=r[0];return i&&typeof i=="object"&&"type"in i?{type:"value",storageType:"logic",storageOperationType:"get",operation:i}:i}}function he(e,t,u,r="",i,a,d=void 0){let E=[],D="sequential",g=false,c=true;e.forEach(y=>{y==="%"&&(D="loop"),y==="seq"&&(D="random"),y==="MIN"&&(g=true);});let F=e[e.length-1];return Object.keys(F).forEach(y=>{let x=F[y];if(Array.isArray(x)&&x.length>3){x=x.slice(1,x.length-2);let h=[];se(x,r,i,h,t,t,u,Ce,d,true,a),h.length===1?E.push(h[0]):E.push({type:"resulttocombine",combine:"cross",secondConditionalItem:h});}else Array.isArray(x)&&x.length===3&&(c=false);}),D==="sequential"?{type:"stepswitch",elements:E,choiceType:D,end:c?"lastItem":void 0,nestedId:d}:g&&D==="random"?{type:"stepswitch",elements:E,choiceType:"sequentialrandom",end:c?"lastItem":void 0,nestedId:d}:{type:"stepswitch",elements:E,choiceType:D}}function ot(e="",t=""){let u=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t];return [...new Set([...u,...r])]}function Ce(e,t,u,r,i){if(e.length>0){let a={};_t(e,a,i);for(let[d$1,E]of Object.entries(a)){let D=u+"_|_"+d$1,g={text:E.text.length===1?E.text[0]:E.text,label:D,props:{},type:nt(D,false),oneTime:E.onetime};E.text.length===0&&(g.onlyHaveNoChoice=true,g.autoSelect=true),g.oneTime===false&&delete g.oneTime;let c=at(g,E.conditions,i,u)||g,F=t[t.length-1];if(typeof F=="object"&&F&&"type"in F&&(F={conditionalStep:F}),t.length>0&&typeof F=="object"&&F&&"choices"in F&&F.choices){let A=F.choices;A&&Array.isArray(A)?A.push(c):d.error("Unhandled case: choices is PixiVNJsonConditionalStatements<PixiVNJsonChoices> | undefined",E,A),F.choices=A.sort((y,x)=>{try{let h=y.label.split("."),m=h[h.length-1].replaceAll(".","_|_"),C=x.label.split("."),p=C[C.length-1].replaceAll(".","_|_");if(m.includes("c-")&&p.includes("c-")){let n=m.split("c-")[1],s=parseInt(n),o=p.split("c-")[1],l=parseInt(o);return s-l}}catch{}return 0});}else t.push({choices:[c]});E.preDialog&&(r.preDialog[D]={...E.preDialog});}}}function _t(e,t,u,r){let i=[],a="",d="",E=false,D=[];for(let g=0;g<e.length;g++){let c=e[g];if(typeof c=="string")c.startsWith("^")?i.push(ee(c)):Vt.includes(c)&&D.push(c);else if(Array.isArray(c)&&c.includes("visit")){let F=he(c,Re,(A,y,x)=>{},r,{preDialog:{}},u);i.push(F);}else if(c&&typeof c=="object")if("*"in c&&typeof c["*"]&&typeof c["*"]=="string")c["*"].includes("c")&&(a="c"+c["*"].split("c")[1],c.flg&16&&(E=true));else if("s"in c&&c.s instanceof Array){let F=kt(c.s),A=c.s.includes("<>");F&&(r&&t[r]?(t[r].preDialog={text:F,glue:A},t[r].text=ot(F,t[r].text)):(i.push(F),d=F));}else "CNT?"in c&&D.push(c);else D.push(c);if(a){t[a]?t[a].text=ot(i,t[a].text):t[a]={text:i,onetime:E,conditions:D},d&&(t[a].preDialog={text:d,glue:false});let F=e.slice(g+1);_t(F,t,u,a);return}}}function kt(e){for(let t of e)if(typeof t=="string"){if(t.startsWith("^"))return ee(t)}else if(t instanceof Array){let u=kt(t);if(u)return u}}function at(e,t,u,r,i){if(t.length===0)return;let a=Ae(t,r,u);if(a.length===1){let d={type:"ifelse",condition:a[0],then:e,else:i};return d.else||delete d.else,d}else if(a.length>1){let d={type:"ifelse",condition:{type:"union",unionType:"and",conditions:a},then:e,else:i};return d.else||delete d.else,d}}function Rt(e,t,u,r,i,a,d$1=void 0){if(e.length===0){d.error("Error parsing ink file: Conditional statement is not valid",e);return}let E=[],D=[];if(e.forEach(F=>{Array.isArray(F)?D.push(F):typeof F=="string"&&F==="du"?i.du?E.push(i.du):i.du=E[E.length-1]:(typeof F!="string"||F!=="/ev")&&E.push(F);}),D.length===0){d.error("Error parsing ink file: Conditional statement is not valid",D);return}let g=st(D[0],t,u,r+"_|_"+"then",i,a,`${d$1||""}then`),c;return D.length===2?c=st(D[1],t,u,r+"_|_"+"else",i,a,`${d$1||""}else`):D.length>2&&(D.shift(),D.push("nop"),D=[{b:D}],c=st(D,t,u,r+"_|_"+"else",i,a,`${d$1||""}else`)),i.du=void 0,at(g,E,a,r,c)}function st(e,t,u,r,i,a,d=void 0){let E=[];for(let g of e)typeof g=="object"&&"b"in g&&(g.b=g.b.filter(c=>c!==null&&!(typeof c=="object"&&"->"in c&&new RegExp(/.*\.[0-9]/).test(c["->"]))),se(g.b,r,i,E,t,t,u,Ce,d,true,a));return E.length===1?E[0]:{type:"resulttocombine",combine:"cross",secondConditionalItem:E}}function se(e,t,u,r=[],i,a,d$1,E,D=void 0,g=true,c=[]){let F=false,A=[],y=false,x=false,h=false,m=[],C=[];if(u.preDialog[t]&&(g=false,i(r,"^"+u.preDialog[t].text,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),u.preDialog[t].glue&&i(r,"<>",t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),delete u.preDialog[t]),e.includes("visit")){let n=he(e,a,d$1,t,u,c,D);n&&(!g&&r.length>0&&i(r,"<>",t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),i(r,n,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}));return}let p=e[0];if(p&&typeof p=="object"&&"temp="in p){for(;e[0]&&typeof e[0]=="object"&&"temp="in e[0];)c.push(e[0]["temp="]),e.shift();c=c.reverse();}if(e.forEach((n,s)=>{if(x){if(typeof n=="string"&&n=="/#"){let o=[];se(C,t,u,o,it,it,d$1,E,D,g),i(r,o,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),x=false,C=[];}else C.push(n);return}else if(F)if(Array.isArray(n))A.push(n);else if(n&&typeof n=="object")if("CNT?"in n)s>0&&e[s-1]=="ev"?(y=true,m.push(n)):y?m.push(n):(A.push(n),g=false);else if("VAR="in n||"temp="in n){let o=ut("VAR="in n?n["VAR="]:n["temp="],c,e[s-1],"VAR="in n?"storage":"tempstorage");if(o.value&&typeof o.value=="string"&&o.value=="/str"&&(o.value=e[s-2]),o.value&&typeof o.value=="object"&&"^->"in o.value&&(o.value=o.value["^->"]),A.length>1){let l=Le(A,t,c);A=[],l&&typeof l=="object"&&"type"in l&&l.type=="value"&&"storageType"in l&&l.storageType=="logic"&&(o.value=l.operation);}(typeof o.key!="string"||!o.key.includes("$r"))&&(i(r,o,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),g=true);}else "VAR?"in n?A.push(n):"^->"in n&&(n["^->"].includes("$r")||A.push(n));else if(typeof n=="string"&&n=="/ev")y&&m.push(n),F=false,A.push(n);else if(typeof n=="string"&&n=="out"){if(A.length>0){let o=A[A.length-1];if(o&&typeof o=="object"&&"VAR?"in o){A.pop();let l=de(o["VAR?"],c,"storage");i(r,l,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h});}else {let l=[];for(;A.length>0&&A[A.length-1]!="/ev";)l.push(A.pop());l=l.reverse();let B=Le(l,t,c);A=[],B&&typeof B=="object"&&"type"in B&&B.type=="value"&&"storageType"in B&&B.storageType=="logic"?i(r,{storageOperationType:"get",storageType:"logic",operation:B.operation,type:"value"},t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}):(i(r,"<>",t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),B=`^${B}`,i(r,B,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}));}g=false;}}else A.push(n);else if(typeof n=="string")if(n.startsWith("^"))i(r,n,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),g=false;else if(n=="ev")F=true;else if(n==`
18
+ `)g=true;else if(n=="done"||n=="end")i(r,n,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),g=false;else if(n=="<>")i(r,n,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),g=false;else if(n=="nop"&&y){let o=Rt(m,a,d$1,t,u,c,D);o&&i(r,o,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),y=false,m=[];}else n=="#"?x=true:n=="thread"&&(h=true);else if(n instanceof Array)if(y)m.push(n);else if(n.length>1&&typeof n[n.length-2]=="object"&&n[n.length-2]&&"c"in n[n.length-2]&&typeof n[n.length-1]=="object"&&n[n.length-1]&&"b"in n[n.length-1]){A.pop();let o=[],l=[];for(;A.length>0&&A[A.length-1]!="/ev";)o.push(A.pop());m=[...m,...o.reverse()],y=true,l.push(n.pop()),l.push(n.pop()),m=[...m,...n],m.push(l);}else if(n.length>1&&typeof n[n.length-1]=="object"&&n[n.length-1]&&"#n"in n[n.length-1]){let o=n.pop();if(!o){d.error("Error parsing ink file: el is undefined");return}let l=o["#n"];delete o["#n"],n.push(o),i(r,{"->":t?t+"_|_"+l:l},t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),d$1({[l]:n},t,u);}else se(n,t,u,r,i,a,d$1,E,D,g,c);else if(n&&typeof n=="object")if("->"in n&&typeof n["->"]=="string"&&!new RegExp(/^\.\^\.\^\.\d\.s$/).test(n["->"])){let o=[];A.length>0&&(o=Jt(["ev",...A],t,c)),n.params=o,i(r,n,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),g=false;}else if("*"in n&&typeof n["*"]=="string")n["*"].includes("c")&&(A.push(n),g=false);else if("s"in n&&n.s instanceof Array)A.push(n),g=false;else if("CNT?"in n)A.push(n),g=false;else if("VAR="in n||"temp="in n){let o=[],l=ut("VAR="in n?n["VAR="]:n["temp="],c,void 0,"VAR="in n?"storage":"tempstorage");if(l.key!=="$r"){for(A.pop(),A[A.length-1]=="/ev"&&A.pop();A.length>0&&A[A.length-1]!="/ev";)o.push(A.pop());o=o.reverse(),l.value=Le(o,t,c),A=[],(l.value!==void 0||l.value!==null)&&i(r,l,t,c,{isNewLine:g,isHashtagScript:x,isThreads:h}),g=false;}}else d$1(n,t,u);}),E(A,r,t,u,c),t.includes("_|_")&&r.length==2){let n=r[0],s=r[1];n&&s&&typeof n=="object"&&"dialogue"in n&&typeof s=="object"&&"labelToOpen"in s&&n.dialogue==" "&&s.labelToOpen&&(r.shift(),delete s.glueEnabled,r[0]=s);}}function Lt(e){try{let t={};return jt(e,t),t}catch(t){d.error("Error parsing ink file",t);}}function jt(e,t,u={externalSwitch:void 0}){for(let r of e)if(r)if(r instanceof Array)if(r.includes("visit")){let i=he(r,Re,(a,d,E)=>{},"",{preDialog:{}},[]);i&&(u.externalSwitch=i);}else jt(r,t,u);else typeof r=="object"&&(r&&"VAR="in r&&u.externalSwitch&&(t[ae]||(t[ae]=[]),t[ae].push({operations:[{type:"value",value:u.externalSwitch,key:r["VAR="],storageType:"storage",storageOperationType:"set"}]})),It(r,t));}function It(e,t,u="",r={preDialog:{}}){if(e!==null){for(let[i,a]of Object.entries(e))if(a instanceof Array){let d=[],E={},D=(u?u+"_|_":"")+i;se(a,D,r,d,rt,rt,(g,c,F)=>{It(g,E,c,F);},Ce);for(let[g,c]of Object.entries(E))t[g]=c;d.length>0&&(t[D]=d);}}}function je(e){let{json:t,labelToRemove:u,issues:r,initialVarsToRemove:i}=f$1(e);if(r.forEach(({message:d$1,type:E})=>{E===lt.ErrorType.Error?d.error("Ink compilation error: "+d$1):E===lt.ErrorType.Warning?d.warn("Ink compilation warning: "+d$1):d.info("Ink compilation info: "+d$1);}),!t){d.error("No JSON generated from ink file");return}let a;try{a=Je.parse(t);}catch{d.error("Error parsing ink file");return}return $t(a,{labelToRemove:u,initialVarsToRemove:i})}function $t(e,t={}){let{labelToRemove:u=[],initialVarsToRemove:r=[]}=t,i={};if(i.labels=Lt(e.root),i.labels&&ke in i.labels){let a=i.labels[ke];delete i.labels[ke],a.forEach(d=>{d.operations&&(i.initialOperations=i.initialOperations?[...i.initialOperations,...d.operations]:[...d.operations]);});}if(i.labels&&ae in i.labels){let a=i.labels[ae];delete i.labels[ae],a.forEach(d=>{d.operations&&(i.initialOperations=i.initialOperations?[...i.initialOperations,...d.operations]:[...d.operations]);});}return u.forEach(a=>{i.labels&&a in i.labels&&delete i.labels[a];}),r.forEach(a=>{i.initialOperations&&(i.initialOperations=i.initialOperations.filter(d=>!(d.type==="value"&&d.key===a)));}),i}async function dn(e){Array.isArray(e)||(e=[e]),qe();let t=e.map(async u=>{let r=je(u);return r&&await Me(r,{operationStringConvert:xe.run,skipEmptyDialogs:true}),u});return await Promise.all(t)}async function hn(e){return qe(),await Me(e,{operationStringConvert:xe.run,skipEmptyDialogs:true})}function Cn(e){H.afterToTranslate=t=>pt(t,e);}function En(e){H.beforeToTranslate=t=>pt(t,e);}function pt(e,t){let u=e.match(/\[([^\]]+)\]/);if(u){let r=u[1],i=t(r);return i&&(e=e.replaceAll(u[0],i)),pt(e,t)}return e}function Fn(e){H.translate=e;}async function yn(e,t={},u={}){let r=[];return e.labels&&Object.values(e.labels).forEach(i=>{r=r.concat(i);}),await H.generateJsonTranslation(r,t,{...u,operationStringConvert:xe.run})}export{xe as a,Gn as b,je as c,$t as d,dn as e,hn as f,Cn as g,En as h,Fn as i,yn as j};