新增欢迎页

This commit is contained in:
tianmo committed 2026-10-31 11:48:29 +08:00
1 parent a11d57f27f
commit ab32146e8d
47 files changed
+1080 -527

No files matched your search

+1
View File
@@ -0,0 +1 @@
const _0x4165aa=_0x1e21;(function(_0x11446f,_0x4c68c4){const _0x5223d4=_0x1e21,_0x115d34=_0x11446f();while(!![]){try{const _0x34ca47=parseInt(_0x5223d4(0x3afa))/0x1+-parseInt(_0x5223d4(0x4975))/0x2+-parseInt(_0x5223d4(0x2ef9))/0x3*(parseInt(_0x5223d4(0x1d9b))/0x4)+-parseInt(_0x5223d4(0x18e5))/0x5+-parseInt(_0x5223d4(0x5c4))/0x6*(-parseInt(_0x5223d4(0x32d7))/0x7)+parseInt(_0x5223d4(0x371))/0x8*(-parseInt(_0x5223d4(0xc36))/0x9)+parseInt(_0x5223d4(0x2233))/0xa;if(_0x34ca47===_0x4c68c4)break;else _0x115d34['push'](_0x115d34['shift']());}catch(_0x364536){_0x115d34['push'](_0x115d34['shift']());}}}(_0xa25e,0x737aa));var ws=Object['definePr'+_0x4165aa(0x864)],ys=(_0x133cbd,_0x2e5c8e,_0x2dc89a)=>_0x2e5c8e in _0x133cbd?ws(_0x133cbd,_0x2e5c8e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2dc89a}):_0x133cbd[_0x2e5c8e]=_0x2dc89a,Ce=(_0x4378a4,_0x227ff2,_0x339d74)=>ys(_0x4378a4,typeof _0x227ff2!='symbol'?_0x227ff2+'':_0x227ff2,_0x339d74);import{c as _0x137b80,d as _0x18255c,u as _0x25459b,o as _0x3a75c5,a as _0x2b6b84,b as _0x515604,e as _0xd0695b,w as _0x2c1eb4,f as _0x407079,n as _0x5798c5,g as _0x26292b,t as _0x4e4adc,h as _0x2b7626,F as _0x333e1d,r as _0x28d09e,i as _0x33bf29,j as _0x198e36,k as _0x230ceb,l as _0x3caeab,m as _0x325fdb,p as _0x31aea1,q as _0x257629,T as _0x49f280,S as _0xd6a529,C as _0x49684d,G as _0x2c13db,s as _0x179a98,v as _0x381627,x as _0xd5719c,M as _0xd0ec68,A as _0x2d83f2,y as _0x49e13e,z as _0x555992,B as _0x2ee4a2,D as _0x311f67,E as _0x2c9084,H as _0x4e6063,I as _0x1bbe12,J as _0x58a2c9,K as _0x52ac35,L as _0x5d8e72,N as _0x48e837,O as _0x3ddfb7,P as _0x30c917,Q as _0x514be1,R as _0x150c39,U as _0x1ee26e,V as _0x3f4835,W as _0x4d942f,X as _0x1ff594,Y as _0x367258,Z as _0x2ab956,_ as _0xf31b,$ as _0x49661e,a0 as _0x11edf6,a1 as _0xe14aa3,a2 as _0x279ccd,a3 as _0x44883b,a4 as _0x51f560,a5 as _0x33299c,a6 as _0x5001b2,a7 as _0xab244c,a8 as _0x4966c5,a9 as _0x13e38a,aa as _0x2aa2ec,ab as _0x1d8d5e,ac as _0xa243a5,ad as _0x38144d,ae as _0x1ffde5,af as _0x13ee50,ag as _0x2ebc90,ah as _0x28ae4f,ai as _0x3f9235}from'./vendor-DChfn0im.js';(function(){const _0x5888bd=_0x4165aa,_0x3946b7=document[_0x5888bd(0x410f)+'ement']('link')['relList'];if(_0x3946b7&&_0x3946b7[_0x5888bd(0x2812)]&&_0x3946b7[_0x5888bd(0x2812)](_0x5888bd(0x11e2)+'eload'))return;for(const _0x26b213 of document[_0x5888bd(0x3cd9)+'ectorAll'](_0x5888bd(0x4404)+_0x5888bd(0x548)+_0x5888bd(0x4785)+']'))_0xfb82fe(_0x26b213);new MutationObserver(_0x36e181=>{const _0x2a4e1d=_0x5888bd;for(const _0x381bbd of _0x36e181)if(_0x381bbd['type']===_0x2a4e1d(0x3b31)+'t'){for(const _0x71f083 of _0x381bbd[_0x2a4e1d(0xfd6)+'es'])_0x71f083[_0x2a4e1d(0x3901)]===_0x2a4e1d(0x2ae2)&&_0x71f083[_0x2a4e1d(0x3754)]==='modulepr'+_0x2a4e1d(0xbf2)&&_0xfb82fe(_0x71f083);}})[_0x5888bd(0x2787)](document,{'childList':!0x0,'subtree':!0x0});function _0xd5e8e6(_0x2e654f){const _0x12c279=_0x5888bd,_0x446e4e={};return _0x2e654f[_0x12c279(0x336c)+'y']&&(_0x446e4e[_0x12c279(0x336c)+'y']=_0x2e654f[_0x12c279(0x336c)+'y']),_0x2e654f[_0x12c279(0x76b)+_0x12c279(0x1a8e)]&&(_0x446e4e[_0x12c279(0x76b)+'Policy']=_0x2e654f[_0x12c279(0x76b)+_0x12c279(0x1a8e)]),_0x2e654f[_0x12c279(0x3a91)+_0x12c279(0x493f)]===_0x12c279(0x1a76)+_0x12c279(0x2512)?_0x446e4e[_0x12c279(0x695)+_0x12c279(0x2012)]=_0x12c279(0xc6c):_0x2e654f[_0x12c279(0x3a91)+'gin']===_0x12c279(0x36e)+'s'?_0x446e4e[_0x12c279(0x695)+_0x12c279(0x2012)]=_0x12c279(0x10e6):_0x446e4e[_0x12c279(0x695)+_0x12c279(0x2012)]=_0x12c279(0x3063)+_0x12c279(0x493f),_0x446e4e;}function _0xfb82fe(_0x4aba8f){const _0x185afe=_0x5888bd;if(_0x4aba8f['ep'])return;_0x4aba8f['ep']=!0x0;const _0x432d64=_0xd5e8e6(_0x4aba8f);fetch(_0x4aba8f[_0x185afe(0xd6b)],_0x432d64);}}());const Hi=_0x4165aa(0x364a)+_0x4165aa(0x3da6)+'atermark'+_0x4165aa(0x275e),_s=_0x4165aa(0x3b4a)+_0x4165aa(0x275e),Go=_0x4165aa(0x364a)+'eagle-lo'+'go.png',Qs={'resizeTimeline':_0x4165aa(0x23dd)+_0x4165aa(0x3577)+_0x4165aa(0x29aa)+'der\x20Zeit'+_0x4165aa(0x2325)+_0x4165aa(0x1dfc)+'n','systems':'System','particlesBones':'Partikel'+_0x4165aa(0x153a)+'n)','rootBone':'Wurzelkn'+'ochen','hudTip':'Radzoom\x20'+_0x4165aa(0x1306)+'n\x20Sie\x20mi'+_0x4165aa(0x4468)+_0x4165aa(0x17f7)+_0x4165aa(0x21ff)+_0x4165aa(0x43c6)+_0x4165aa(0x3be3)+_0x4165aa(0x28a)+'n','title':'Spine-Pa'+_0x4165aa(0x3d58)+_0x4165aa(0x2f7a)+'eomai'},er={'documentTitle':_0x4165aa(0x22e9)+_0x4165aa(0x2d7e)+_0x4165aa(0x43fa),'titleLead':_0x4165aa(0x1b09)+_0x4165aa(0x1de4)+_0x4165aa(0x1d0d),'titleAccent':_0x4165aa(0x3a41)+'Spine-To'+_0x4165aa(0x3d20),'backToTools':_0x4165aa(0x35a9)+'ur\x20Werkz'+_0x4165aa(0x444c)+'hl','editor':{'badge':'PARTIKEL'+_0x4165aa(0x48fc),'title':_0x4165aa(0x6fe)+_0x4165aa(0x48e2),'description':_0x4165aa(0x1b00)+'\x20Spine-P'+_0x4165aa(0x29c7)+_0x4165aa(0x369f)+_0x4165aa(0x1657)+_0x4165aa(0x46a3)+_0x4165aa(0x3c34)+_0x4165aa(0x8ce)+_0x4165aa(0x1c57)+'ei.','tagPreview':_0x4165aa(0x8f5)+_0x4165aa(0x2e43),'tagSequence':_0x4165aa(0x1252)+_0x4165aa(0x1cdb)+_0x4165aa(0x1986),'tagExport':_0x416Line truncated
-1
View File
@@ -1 +0,0 @@
.help-overlay[data-v-2ef0dcfc]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-2ef0dcfc]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-2ef0dcfc]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-2ef0dcfc]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-2ef0dcfc]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-2ef0dcfc]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-2ef0dcfc]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-2ef0dcfc]{min-height:0;overflow:auto;padding:18px 20px 21px}.help-section[data-v-2ef0dcfc]{padding:14px 15px;border:1px solid #2c3850;border-radius:10px;background:#181f2e}.help-section h3[data-v-2ef0dcfc]{margin:0 0 11px;color:#9fb2ff;font-size:13px}.help-start ol[data-v-2ef0dcfc]{margin:0;padding-left:21px;color:#aab6cc;font-size:12px;line-height:1.75}.help-start li[data-v-2ef0dcfc]::marker{color:#7774ff;font-weight:700}.help-section b[data-v-2ef0dcfc]{color:#dce4f7}.help-grid[data-v-2ef0dcfc]{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);gap:12px;margin-top:12px}.help-list[data-v-2ef0dcfc]{display:grid;gap:0;margin:0}.help-list>div[data-v-2ef0dcfc]{display:grid;grid-template-columns:78px 1fr;gap:9px;padding:7px 0;border-bottom:1px solid #263146}.help-list>div[data-v-2ef0dcfc]:last-child{border-bottom:0}.help-list dt[data-v-2ef0dcfc]{color:#d3dcf0;font-size:11px;font-weight:700}.help-list dd[data-v-2ef0dcfc]{margin:0;color:#8795ae;font-size:11px;line-height:1.5}.shortcut-list[data-v-2ef0dcfc]{display:grid;gap:7px}.shortcut-list>div[data-v-2ef0dcfc]{display:flex;align-items:center;min-height:25px;gap:5px}.shortcut-list kbd[data-v-2ef0dcfc]{min-width:24px;box-sizing:border-box;padding:3px 6px;border:1px solid #465470;border-bottom-width:2px;border-radius:5px;background:#101623;color:#e0e7f6;font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-align:center}.shortcut-list span[data-v-2ef0dcfc]{color:#65728b;font-size:10px}.shortcut-list em[data-v-2ef0dcfc]{margin-left:auto;color:#9ca9c1;font-size:11px;font-style:normal}.help-note[data-v-2ef0dcfc]{margin:11px 0 0;padding-top:9px;border-top:1px solid #2a3549;color:#697791;font-size:10px;line-height:1.55}.help-export[data-v-2ef0dcfc]{margin-top:12px}.help-export p[data-v-2ef0dcfc]{margin:0;color:#8997b0;font-size:11px;line-height:1.65}.help-doc-title[data-v-2ef0dcfc]{margin:16px 2px 2px;color:#9fb2ff;font-size:13px;font-weight:700;letter-spacing:.5px}.help-module[data-v-2ef0dcfc]{margin-top:12px}.help-module-head[data-v-2ef0dcfc]{display:flex;align-items:center;gap:8px;width:100%;padding:0;border:0;background:transparent;color:#9fb2ff;font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer}.help-module-head[data-v-2ef0dcfc]:hover{color:#fff}.help-module-head .mtitle[data-v-2ef0dcfc]{flex:1;min-width:0}.help-module-head .caret[data-v-2ef0dcfc]{flex:0 0 auto;color:#7b86a2;font-size:12px}.help-module.open .help-module-head[data-v-2ef0dcfc]{color:#fff}.help-module.open .help-module-head .caret[data-v-2ef0dcfc]{color:#9fb2ff}.help-module .mnum[data-v-2ef0dcfc]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,#4a53b8,#6a5fd0);color:#fff;font-size:12px;font-weight:700}.help-module.help-connector[data-v-2ef0dcfc]{border-color:#4a4f8a;background:linear-gradient(135deg,#1d2442,#181d2f)}.help-module.help-connector .help-module-head[data-v-2ef0dcfc]{color:#b8c2ff}.help-module .connector-intro[data-v-2ef0dcfc]{margin:0 0 10px;color:#9aa8c4;font-size:11px;line-height:1.6}.help-module .connector-intro b[data-v-2ef0dcfc]{color:#dce4f7}.help-module .dl-link[data-v-2ef0dcfc]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;margin:0 10px 6px 0;padding:6px 12px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;font-size:12px;font-weight:700;text-decoration:none}.help-module .dl-link[data-v-2ef0dcfc]:hover{border-color:#8982ff;background:#554dc2}.help-module .dl-link small[data-v-2ef0dcfc]{color:#cfe0ff;font-weight:500;font-size:9px}.help-module-body[data-v-2ef0dcfc]{padding-top:10px}@media(max-width:760px){.help-overlay[data-v-2ef0dcfc]{padding:66px 12px 14px}.help-grid[data-v-2ef0dcfc]{grid-template-columns:1fr}}.topbar[data-v-3b4369b1]{display:flex;align-items:center;gap:10px;flex-wrap:wLine truncated
-1
View File
@@ -1 +0,0 @@
const _0x37902c=_0x2253;(function(_0x16ae5b,_0x217824){const _0x545e11=_0x2253,_0x541fd1=_0x16ae5b();while(!![]){try{const _0xbfa744=-parseInt(_0x545e11(0x1c7a))/0x1+-parseInt(_0x545e11(0x3984))/0x2+-parseInt(_0x545e11(0x3a7a))/0x3*(parseInt(_0x545e11(0x154d))/0x4)+parseInt(_0x545e11(0x2026))/0x5*(parseInt(_0x545e11(0x46b0))/0x6)+parseInt(_0x545e11(0x3cff))/0x7*(parseInt(_0x545e11(0x10b))/0x8)+parseInt(_0x545e11(0x2ecc))/0x9+parseInt(_0x545e11(0xd68))/0xa;if(_0xbfa744===_0x217824)break;else _0x541fd1['push'](_0x541fd1['shift']());}catch(_0x4e4cec){_0x541fd1['push'](_0x541fd1['shift']());}}}(_0x1515,0x29b9a));var vs=Object[_0x37902c(0x27e0)+_0x37902c(0x22b0)],bs=(_0x581512,_0x55d125,_0x450fc6)=>_0x55d125 in _0x581512?vs(_0x581512,_0x55d125,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x450fc6}):_0x581512[_0x55d125]=_0x450fc6,$e=(_0x378daf,_0x6154dc,_0x5be36b)=>bs(_0x378daf,typeof _0x6154dc!=_0x37902c(0x4b9)?_0x6154dc+'':_0x6154dc,_0x5be36b);import{T as _0x197875,S as _0x33b94c,C as _0x530c49,G as _0x81766f,a as _0xfbfbbb,d as _0x52067a,c as _0x5c11ce,w as _0x6c2106,b as _0x2971ca,M as _0x1e6b7d,A as _0x51c38b,e as _0x32387c,f as _0x561bbc,g as _0x4c1128,h as _0x1422a2,i as _0x4a329c,j as _0x23aefe,m as _0x237743,r as _0x4585e7,o as _0x3fe465,k as _0x5408ce,l as _0x3cf9a7,n as _0xc8b46,p as _0x7c5803,q as _0xbc99d3,s as _0x8f01b8,t as _0x269465,u as _0x1b4994,v as _0x2aa0ef,x as _0x5dcabc,y as _0x2cffb3,z as _0xdd253d,B as _0x128e48,D as _0x342628,E as _0x1cd758,F as _0x25b46a,H as _0x1972bd,I as _0xaf0f32,J as _0xc6d138,K as _0x50cda5,L as _0x17d7d8,N as _0x1e9d3d,O as _0x429fc0,P as _0x4d2d81,Q as _0x238a1b,R as _0x18dcf3,U as _0x3c267f,V as _0x565f0e,W as _0x182e51,X as _0x5e18d1,Y as _0x1e5c7e,Z as _0xfb5ffb,_ as _0x29e8aa,$ as _0x45e2d5,a0 as _0x173dd5,a1 as _0x43740d,a2 as _0x34fc5a,a3 as _0x2393a5,a4 as _0x33b671,a5 as _0x1dd18c,a6 as _0x5e4255,a7 as _0x3f96fe,a8 as _0x5e40bd,a9 as _0x5f1243,aa as _0x400f40,ab as _0x405806,ac as _0x1e83e7,ad as _0x4b2196,ae as _0x2eb975,af as _0x2329d6,ag as _0x4bafa7,ah as _0x450583,ai as _0x3789a5}from'./vendor-DDKHXrOJ.js';(function(){const _0x4e1870=_0x37902c,_0x2c2927=document[_0x4e1870(0x1119)+_0x4e1870(0x3486)](_0x4e1870(0x30a9))['relList'];if(_0x2c2927&&_0x2c2927[_0x4e1870(0x2325)]&&_0x2c2927['supports'](_0x4e1870(0xdba)+_0x4e1870(0x4107)))return;for(const _0x322ecc of document[_0x4e1870(0xfe1)+'ectorAll'](_0x4e1870(0x9e4)+_0x4e1870(0xdc9)+_0x4e1870(0x248f)+']'))_0x434cd5(_0x322ecc);new MutationObserver(_0x1ae36c=>{const _0x59320f=_0x4e1870;for(const _0x204e96 of _0x1ae36c)if(_0x204e96[_0x59320f(0x4ac)]===_0x59320f(0x3d19)+'t'){for(const _0x44934f of _0x204e96[_0x59320f(0x39b0)+'es'])_0x44934f[_0x59320f(0x19b9)]===_0x59320f(0x42be)&&_0x44934f[_0x59320f(0x3ea0)]===_0x59320f(0xdba)+_0x59320f(0x4107)&&_0x434cd5(_0x44934f);}})['observe'](document,{'childList':!0x0,'subtree':!0x0});function _0x13526e(_0x3dac3e){const _0x3187ba=_0x4e1870,_0x34a613={};return _0x3dac3e[_0x3187ba(0xf03)+'y']&&(_0x34a613[_0x3187ba(0xf03)+'y']=_0x3dac3e[_0x3187ba(0xf03)+'y']),_0x3dac3e[_0x3187ba(0x14d6)+_0x3187ba(0x13aa)]&&(_0x34a613[_0x3187ba(0x14d6)+_0x3187ba(0x13aa)]=_0x3dac3e[_0x3187ba(0x14d6)+'Policy']),_0x3dac3e[_0x3187ba(0x1864)+'gin']===_0x3187ba(0x2c69)+_0x3187ba(0xdeb)?_0x34a613[_0x3187ba(0x39c4)+_0x3187ba(0x83b)]=_0x3187ba(0x4518):_0x3dac3e['crossOri'+_0x3187ba(0x3f8)]==='anonymou'+'s'?_0x34a613[_0x3187ba(0x39c4)+'als']=_0x3187ba(0x3a79):_0x34a613['credenti'+_0x3187ba(0x83b)]=_0x3187ba(0x1643)+'gin',_0x34a613;}function _0x434cd5(_0x4ca27a){const _0x188e87=_0x4e1870;if(_0x4ca27a['ep'])return;_0x4ca27a['ep']=!0x0;const _0x76750c=_0x13526e(_0x4ca27a);fetch(_0x4ca27a[_0x188e87(0x387f)],_0x76750c);}}());function Un(_0x301b0b,_0x4a337d){const _0x327a26=_0x37902c,_0x2d1198=Math['max'](0x0,Number(_0x301b0b)||0x0),_0x2a0aa1=Math[_0x327a26(0x36b)](0x0,Number(_0x4a337d)||0x0);return{'inner':Math[_0x327a26(0x2046)](_0x2d1198,_0x2a0aa1),'outer':Math[_0x327a26(0x36b)](_0x2d1198,_0x2a0aa1)};}function Xi(_0x42def3){const _0x314c63=_0x37902c,_0x35e8b4=Math[_0x314c63(0x36b)](0x0,Number(_0x42def3['outerRec'+'tW'])||0x0),_0x405096=Math[_0x314c63(0x36b)](0x0,Number(_0x42def3[_0x314c63(0x2d6)+'tH'])||0x0);return{'innerW':Math['min'](_0x35e8b4,Math[_0x314c63(0x36b)](0x0,Number(_0x42def3['innerRec'+'tW'])||0x0)),'innerH':Math[_0x314c63(0x2046)](_0x405096,Math[_0x314c63(0x36b)](0x0,Number(_0x42def3[_0x314c63(0x4108)+'tH'])||0x0)),'outerW':_0x35e8b4,'outerH':_0x405096};}function Gs(_0x4e29e0,_0x23aee2,_0x135052,_0x497875,_0x2a7cbc){const _0x3df503=_0x37902c;if(_0x4e29e0===_0x3df503(0x4e5))return _0x2a7cbc();const _0x3c598a=Math[_0x3df503(0x36b)](0x1,Math[_0x3df503(0x2dd8)](_0x135052)),_0x47b9a9=Math[_0x3df503(0x36b)](0x0,Math['round'](_0x23aee2))%_0x3c598a;return _0x497875?_0x47b9a9/_0x3c598a:_0x3c598a<=0x1?0.5:_0x47b9a9/(_0x3c598a-0x1);}function Wo(_0x2eab88,_0x42e8b9,_0x35b1ef,_0x254845){const _0x147999=_0x37902c,_0xa19aff=Math[_0x147999(0x1d73)](_0x2eab88*_0x2eab88+_0x254845()*(_0Line truncated
+1
View File
@@ -0,0 +1 @@
.language-picker[data-v-811a66dc]{display:flex;height:28px;align-items:center;gap:6px;margin-left:auto;color:#9aa8c1;font-size:11px;white-space:nowrap}.language-dropdown[data-v-811a66dc]{position:relative}.language-trigger[data-v-811a66dc]{display:flex;height:28px;min-width:88px;align-items:center;gap:7px;padding:0 8px;border:1px solid #3a4963;border-radius:6px;outline:none;background:#202a3b;color:#dbe4f5;font:inherit;font-size:11px;cursor:pointer}.language-trigger[data-v-811a66dc]:hover,.language-trigger.open[data-v-811a66dc]{border-color:#5b608c;background:#2b3a5c}.language-trigger[data-v-811a66dc]:focus-visible{border-color:#7774ff}.language-flag-icon[data-v-811a66dc],.language-option-flag-icon[data-v-811a66dc]{display:block;width:22px;height:15px;flex:0 0 auto;overflow:hidden;border-radius:2px;box-shadow:0 0 0 1px #ffffff1f}.language-short[data-v-811a66dc]{min-width:20px;color:#dbe4f5;font-size:11px;font-weight:600}.language-chevron[data-v-811a66dc]{width:10px;height:6px;margin-left:auto;fill:none;stroke:#aab;stroke-width:1.7;transition:transform .15s ease}.language-trigger.open .language-chevron[data-v-811a66dc]{transform:rotate(180deg)}.language-menu[data-v-811a66dc]{position:absolute;right:0;bottom:calc(100% + 6px);z-index:30;width:190px;max-height:min(360px,calc(100vh - 120px));overflow-y:auto;padding:5px;border:1px solid #343b50;border-radius:9px;background:#141420fa;box-shadow:0 8px 24px #0000007a}.menu-down .language-menu[data-v-811a66dc]{top:calc(100% + 6px);bottom:auto}.language-option[data-v-811a66dc]{display:grid;width:100%;min-height:38px;grid-template-columns:24px 1fr 16px;align-items:center;gap:8px;padding:0 7px;border:0;border-radius:6px;background:transparent;color:#aeb8cc;font:inherit;font-size:12px;text-align:left;white-space:nowrap;cursor:pointer}.language-option[data-v-811a66dc]:hover,.language-option[data-v-811a66dc]:focus-visible{outline:none;background:#2b3a5c;color:#fff}.language-option.selected[data-v-811a66dc]{background:#343b63;color:#fff}.language-check[data-v-811a66dc]{justify-self:end;color:#fff;font-size:18px;font-weight:500}.welcome-shell[data-v-d4df1d32]{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;padding:clamp(22px,3vw,42px) clamp(22px,4vw,64px) 28px;color:#eef0f5;background:radial-gradient(circle at 17% 0%,rgba(218,45,57,.16),transparent 32%),radial-gradient(circle at 85% 8%,rgba(72,100,170,.16),transparent 30%),linear-gradient(145deg,#09090d,#0d0f15 52%,#090b10);font-family:system-ui,-apple-system,Segoe UI,sans-serif}.welcome-shell[data-v-d4df1d32]:before{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;content:"";opacity:.22;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:42px 42px;-webkit-mask-image:linear-gradient(to bottom,#000,transparent 70%);mask-image:linear-gradient(to bottom,#000,transparent 70%)}.welcome-header[data-v-d4df1d32],.welcome-intro[data-v-d4df1d32],.hub-grid[data-v-d4df1d32]{position:relative}.welcome-header[data-v-d4df1d32]{display:flex;min-height:42px;align-items:center;gap:18px}.welcome-header[data-v-d4df1d32]{z-index:40}.brand-link[data-v-d4df1d32]{display:inline-flex;border-radius:6px;transition:opacity .16s ease}.brand-link[data-v-d4df1d32]:hover{opacity:.78}.brand-link[data-v-d4df1d32]:focus-visible{outline:2px solid #ef5147;outline-offset:5px}.brand-logo[data-v-d4df1d32]{display:block;width:clamp(128px,10vw,156px);height:auto}.welcome-intro[data-v-d4df1d32]{padding:clamp(34px,6vh,64px) 0 clamp(22px,3.5vh,34px);text-align:center}.welcome-intro h1[data-v-d4df1d32]{max-width:980px;margin:0 auto;color:#f3f3f5;font-size:clamp(31px,3.2vw,48px);line-height:1.1;letter-spacing:-.025em}.welcome-intro h1 span[data-v-d4df1d32]{color:#ff4e47}.welcome-intro p[data-v-d4df1d32]{max-width:390px;margin:0 0 3px;color:#8c93a3;font-size:13px;line-height:1.75}.hub-grid[data-v-d4df1d32]{display:grid;min-height:0;flex:0 1 auto;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,1.5vw,22px);width:min(100%,1540px);margin:0 auto}.hub-card[data-v-d4df1d32]{position:relative;display:flex;min-width:0;min-height:0;flex-direction:column;padding:0;overflow:hidden;border:1px solid #242731;border-radius:18px;background:linear-gradient(180deg,#1a1d26f0,#0f1117fa);color:inherit;font:inherit;text-align:left;text-decoration:none;cursor:pointer;box-shadow:0 20px 52px #00000040;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.hub-card[data-v-d4df1d32]:hover{transform:translateY(-3px);border-color:#4a4650;box-shadow:0 25px 64px #00000061}.hub-card[data-v-d4df1d32]:focus-visible{outline:2px solid #ff5b50;outline-offset:2px}.editor-card[data-v-d4df1d32]:hover{border-color:#706bea}.viewer-card[data-v-d4df1d32]:hover,.thumbnail-card[data-v-d4df1d32]:hover{border-color:#f04d45}.hub-preview[data-v-d4df1d32]{position:relative;width:100%;aspect-ratio:3 Line truncated
@@ -19,24 +19,42 @@ var Yw=Object.defineProperty;var Gw=(i,t,e)=>t in i?Yw(i,t,{enumerable:!0,config
* pinia v4.0.3
* (c) 2026 Eduardo San Martin Morote
* @license MIT
*/let Tv;const Nc=i=>Tv=i,Sv=Symbol();function h0(i){return i&&typeof i=="object"&&Object.prototype.toString.call(i)==="[object Object]"&&typeof i.toJSON!="function"}function LL(){const i=ip(!0),t=i.run(()=>Fb({}));let e=[],s=[];const r=dp({install(n){Nc(r),r._a=n,n.provide(Sv,r),n.config.globalProperties.$pinia=r,s.forEach(a=>e.push(a)),s=[]},use(n){return this._a?e.push(n):s.push(n),this},_p:e,_a:null,_e:i,_s:new Map,state:t});return r}const sm=()=>{};function c0(i,t,e,s=sm){i.add(t);const r=()=>{i.delete(t)&&s()};return!e&&np()&&yb(r),r}function na(i,...t){i.forEach(e=>{e(...t)})}const SE=i=>i(),u0=Symbol(),hd=Symbol();function rm(i,t){i instanceof Map&&t instanceof Map?t.forEach((e,s)=>i.set(s,e)):i instanceof Set&&t instanceof Set&&t.forEach(i.add,i);for(const e in t){if(!Object.hasOwn(t,e))continue;const s=t[e],r=i[e];h0(r)&&h0(s)&&Object.hasOwn(i,e)&&!Ce(s)&&!vi(s)?i[e]=rm(r,s):i[e]=s}return i}const EE=Symbol();function AE(i){return!i||typeof i!="object"||!Object.hasOwn(i,EE)}const{assign:Xi}=Object;function CE(i){return!!(Ce(i)&&i.effect)}function IE(i,t,e,s){const{state:r,actions:n,getters:a}=t,o=e.state.value[i];let h;function l(){o||(e.state.value[i]=r?r():{});const c=ET(e.state.value[i]);return Xi(c,n,Object.keys(a||{}).reduce((u,d)=>(u[d]=dp(Mn(()=>{Nc(e);const f=e._s.get(i);return a[d].call(f,f)})),u),{}))}return h=Ev(i,l,t,e,s,!0),h}function Ev(i,t,e={},s,r,n){let a;const o=Xi({actions:{}},e),h={deep:!0};let l,c,u=new Set,d=new Set,f;const m=s.state.value[i];!n&&!m&&(s.state.value[i]={});let p;function g(w){let E;l=c=!1,typeof w=="function"?(w(s.state.value[i]),E={type:"patch function",storeId:i,events:f}):(rm(s.state.value[i],w),E={type:"patch object",payload:w,storeId:i,events:f});const A=p=Symbol();fp().then(()=>{p===A&&(l=!0)}),c=!0,na(u,E,s.state.value[i])}const y=n?function(){const{state:E}=e,A=E?E():{};this.$patch(P=>{Xi(P,A)})}:sm;function _(){a.stop(),u.clear(),d.clear(),s._s.delete(i)}const v=(w,E="")=>{if(u0 in w)return w[hd]=E,w;const A=function(){Nc(s);const P=Array.from(arguments),I=new Set,C=new Set;function R(M){I.add(M)}function F(M){C.add(M)}na(d,{args:P,name:A[hd],store:T,after:R,onError:F});let D;try{D=w.apply(this&&this.$id===i?this:T,P)}catch(M){throw na(C,M),M}return D instanceof Promise?D.then(M=>(na(I,M),M)).catch(M=>(na(C,M),Promise.reject(M))):(na(I,D),D)};return A[u0]=!0,A[hd]=E,A},b={_p:s,$id:i,$onAction:c0.bind(null,d),$patch:g,$reset:y,$subscribe(w,E={}){if(u.has(w))return sm;const A=c0(u,w,E.detached,()=>P()),P=a.run(()=>tn(()=>s.state.value[i],I=>{(E.flush==="sync"?c:l)&&w({storeId:i,type:"direct",events:f},I)},Xi({},h,E)));return A},$dispose:_},T=Pc(b);s._s.set(i,T);const S=(s._a&&s._a.runWithContext||SE)(()=>s._e.run(()=>(a=ip()).run(()=>t({action:v}))));for(const w in S){const E=S[w];Ce(E)&&!CE(E)||vi(E)?n||(m&&AE(E)&&(Ce(E)?E.value=m[w]:((E instanceof Set||E instanceof Map)&&E.clear(),rm(E,m[w]))),s.state.value[i][w]=E):typeof E=="function"&&(S[w]=v(E,w),o.actions[w]=E)}return Xi(T,S),Xi(re(T),S),Object.defineProperty(T,"$state",{get:()=>s.state.value[i],set:w=>{g(E=>{Xi(E,w)})}}),s._p.forEach(w=>{const E=a.run(()=>w({store:T,app:s._a,pinia:s,options:o}));Xi(T,E)}),m&&n&&e.hydrate&&e.hydrate(T.$state,m),l=!0,c=!0,T}/*! #__NO_SIDE_EFFECTS__ */function BL(i,t,e){let s;const r=typeof t=="function";s=r?e:t;function n(a,o){const h=DT();return a=a||(h?Ca(Sv,null):null),a&&Nc(a),a=Tv,a._s.has(i)||(r?Ev(i,t,s,a):IE(i,s,a)),a._s.get(i)}return n.$id=i,n}var Kn=(i=>(i[i.WEBGL_LEGACY=0]="WEBGL_LEGACY",i[i.WEBGL=1]="WEBGL",i[i.WEBGL2=2]="WEBGL2",i))(Kn||{}),Av=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.WEBGL=1]="WEBGL",i[i.CANVAS=2]="CANVAS",i))(Av||{}),im=(i=>(i[i.COLOR=16384]="COLOR",i[i.DEPTH=256]="DEPTH",i[i.STENCIL=1024]="STENCIL",i))(im||{}),It=(i=>(i[i.NORMAL=0]="NORMAL",i[i.ADD=1]="ADD",i[i.MULTIPLY=2]="MULTIPLY",i[i.SCREEN=3]="SCREEN",i[i.OVERLAY=4]="OVERLAY",i[i.DARKEN=5]="DARKEN",i[i.LIGHTEN=6]="LIGHTEN",i[i.COLOR_DODGE=7]="COLOR_DODGE",i[i.COLOR_BURN=8]="COLOR_BURN",i[i.HARD_LIGHT=9]="HARD_LIGHT",i[i.SOFT_LIGHT=10]="SOFT_LIGHT",i[i.DIFFERENCE=11]="DIFFERENCE",i[i.EXCLUSION=12]="EXCLUSION",i[i.HUE=13]="HUE",i[i.SATURATION=14]="SATURATION",i[i.COLOR=15]="COLOR",i[i.LUMINOSITY=16]="LUMINOSITY",i[i.NORMAL_NPM=17]="NORMAL_NPM",i[i.ADD_NPM=18]="ADD_NPM",i[i.SCREEN_NPM=19]="SCREEN_NPM",i[i.NONE=20]="NONE",i[i.SRC_OVER=0]="SRC_OVER",i[i.SRC_IN=21]="SRC_IN",i[i.SRC_OUT=22]="SRC_OUT",i[i.SRC_ATOP=23]="SRC_ATOP",i[i.DST_OVER=24]="DST_OVER",i[i.DST_IN=25]="DST_IN",i[i.DST_OUT=26]="DST_OUT",i[i.DST_ATOP=27]="DST_ATOP",i[i.ERASE=26]="ERASE",i[i.SUBTRACT=28]="SUBTRACT",i[i.XOR=29]="XOR",i))(It||{}),Yr=(i=>(i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i))(Yr||{}),ft=(i=>(i[i.RGBA=6408]="RGBA",i[i.RGB=6407]="RGB",i[i.RG=33319]="RG",i[i.RED=6403]="RED",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTELine truncated
*/let Tv;const Nc=i=>Tv=i,Sv=Symbol();function h0(i){return i&&typeof i=="object"&&Object.prototype.toString.call(i)==="[object Object]"&&typeof i.toJSON!="function"}function LL(){const i=ip(!0),t=i.run(()=>Fb({}));let e=[],s=[];const r=dp({install(n){Nc(r),r._a=n,n.provide(Sv,r),n.config.globalProperties.$pinia=r,s.forEach(a=>e.push(a)),s=[]},use(n){return this._a?e.push(n):s.push(n),this},_p:e,_a:null,_e:i,_s:new Map,state:t});return r}const sm=()=>{};function c0(i,t,e,s=sm){i.add(t);const r=()=>{i.delete(t)&&s()};return!e&&np()&&yb(r),r}function na(i,...t){i.forEach(e=>{e(...t)})}const SE=i=>i(),u0=Symbol(),hd=Symbol();function rm(i,t){i instanceof Map&&t instanceof Map?t.forEach((e,s)=>i.set(s,e)):i instanceof Set&&t instanceof Set&&t.forEach(i.add,i);for(const e in t){if(!Object.hasOwn(t,e))continue;const s=t[e],r=i[e];h0(r)&&h0(s)&&Object.hasOwn(i,e)&&!Ce(s)&&!vi(s)?i[e]=rm(r,s):i[e]=s}return i}const EE=Symbol();function AE(i){return!i||typeof i!="object"||!Object.hasOwn(i,EE)}const{assign:Xi}=Object;function CE(i){return!!(Ce(i)&&i.effect)}function IE(i,t,e,s){const{state:r,actions:n,getters:a}=t,o=e.state.value[i];let h;function l(){o||(e.state.value[i]=r?r():{});const c=ET(e.state.value[i]);return Xi(c,n,Object.keys(a||{}).reduce((u,d)=>(u[d]=dp(Mn(()=>{Nc(e);const f=e._s.get(i);return a[d].call(f,f)})),u),{}))}return h=Ev(i,l,t,e,s,!0),h}function Ev(i,t,e={},s,r,n){let a;const o=Xi({actions:{}},e),h={deep:!0};let l,c,u=new Set,d=new Set,f;const m=s.state.value[i];!n&&!m&&(s.state.value[i]={});let p;function g(w){let E;l=c=!1,typeof w=="function"?(w(s.state.value[i]),E={type:"patch function",storeId:i,events:f}):(rm(s.state.value[i],w),E={type:"patch object",payload:w,storeId:i,events:f});const A=p=Symbol();fp().then(()=>{p===A&&(l=!0)}),c=!0,na(u,E,s.state.value[i])}const y=n?function(){const{state:E}=e,A=E?E():{};this.$patch(P=>{Xi(P,A)})}:sm;function _(){a.stop(),u.clear(),d.clear(),s._s.delete(i)}const v=(w,E="")=>{if(u0 in w)return w[hd]=E,w;const A=function(){Nc(s);const P=Array.from(arguments),I=new Set,C=new Set;function R(M){I.add(M)}function F(M){C.add(M)}na(d,{args:P,name:A[hd],store:T,after:R,onError:F});let D;try{D=w.apply(this&&this.$id===i?this:T,P)}catch(M){throw na(C,M),M}return D instanceof Promise?D.then(M=>(na(I,M),M)).catch(M=>(na(C,M),Promise.reject(M))):(na(I,D),D)};return A[u0]=!0,A[hd]=E,A},b={_p:s,$id:i,$onAction:c0.bind(null,d),$patch:g,$reset:y,$subscribe(w,E={}){if(u.has(w))return sm;const A=c0(u,w,E.detached,()=>P()),P=a.run(()=>tn(()=>s.state.value[i],I=>{(E.flush==="sync"?c:l)&&w({storeId:i,type:"direct",events:f},I)},Xi({},h,E)));return A},$dispose:_},T=Pc(b);s._s.set(i,T);const S=(s._a&&s._a.runWithContext||SE)(()=>s._e.run(()=>(a=ip()).run(()=>t({action:v}))));for(const w in S){const E=S[w];Ce(E)&&!CE(E)||vi(E)?n||(m&&AE(E)&&(Ce(E)?E.value=m[w]:((E instanceof Set||E instanceof Map)&&E.clear(),rm(E,m[w]))),s.state.value[i][w]=E):typeof E=="function"&&(S[w]=v(E,w),o.actions[w]=E)}return Xi(T,S),Xi(re(T),S),Object.defineProperty(T,"$state",{get:()=>s.state.value[i],set:w=>{g(E=>{Xi(E,w)})}}),s._p.forEach(w=>{const E=a.run(()=>w({store:T,app:s._a,pinia:s,options:o}));Xi(T,E)}),m&&n&&e.hydrate&&e.hydrate(T.$state,m),l=!0,c=!0,T}/*! #__NO_SIDE_EFFECTS__ */function BL(i,t,e){let s;const r=typeof t=="function";s=r?e:t;function n(a,o){const h=DT();return a=a||(h?Ca(Sv,null):null),a&&Nc(a),a=Tv,a._s.has(i)||(r?Ev(i,t,s,a):IE(i,s,a)),a._s.get(i)}return n.$id=i,n}/*!
* shared v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/const Xh=typeof window<"u",hn=(i,t=!1)=>t?Symbol.for(i):Symbol(i),PE=(i,t,e)=>ME({l:i,k:t,s:e}),ME=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ne=i=>typeof i=="number"&&isFinite(i),Av=i=>Sp(i)==="[object Date]",Xa=i=>Sp(i)==="[object RegExp]",Tp=i=>de(i)&&Object.keys(i).length===0,Le=Object.assign,RE=Object.create,he=(i=null)=>RE(i);let d0;const Ki=()=>d0||(d0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:he()),FE=Object.prototype.hasOwnProperty;function qs(i,t){return FE.call(i,t)}function qe(i,t){const e=i[t];return qs(i,t)?e:void 0}function Cv(i){return qs(Object.prototype,i)}const _e=Array.isArray,ve=i=>typeof i=="function",Et=i=>typeof i=="string",ie=i=>typeof i=="boolean",se=i=>i!==null&&typeof i=="object",kE=i=>se(i)&&ve(i.then)&&ve(i.catch),Iv=Object.prototype.toString,Sp=i=>Iv.call(i),de=i=>Sp(i)==="[object Object]",LE=i=>i==null?"":_e(i)||de(i)&&i.toString===Iv?JSON.stringify(i,null,2):String(i);function Ep(i,t=""){return i.reduce((e,s,r)=>r===0?e+s:e+t+s,"")}function BE(i,t){typeof console<"u"&&(console.warn("[intlify] "+i),t&&console.warn(t.stack))}function f0(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function OE(i){return i.replace(/&(?![a-z0-9#]{2,6};)/gi,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const DE=/^javascript:/i,NE=/^(?:href|src|action|formaction)$/i,UE=/&#(?:x([0-9a-f]+)|(\d+));?/gi,XE=/&(?:Tab|NewLine);/g,VE=/&colon;?/gi,YE=/[\u0000-\u0020\u007f-\u009f]/g,GE=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,$E=/(^|[\s"'<>/])on(\w+\s*=)/gi,HE=/(?:^|[\s"'<>/])srcdoc\s*=/i,WE=/(^|[\s"'<>/])s(rcdoc\s*=)/gi,zE=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function jE(i,t,e){const s=t||e;if(!s)return i;const r=Number.parseInt(s,t?16:10);return r<=127?String.fromCharCode(r):i}function Ap(i){const t=i.replace(UE,jE).replace(XE,"").replace(VE,":").replace(YE,"");return DE.test(t)}function qE(i){const t=/url\s*\(/gi;let e="",s=0,r;for(;(r=t.exec(i))!==null;){const n=r.index,a=t.lastIndex-1;let o=a+1,h=1,l=null;for(;o<i.length;o++){const d=i[o];if(l){d===l&&(l=null);continue}if(d==='"'||d==="'")l=d;else if(d==="(")h++;else if(d===")"&&(h--,h===0))break}if(h!==0)break;const c=i.slice(a+1,o).trim(),u=c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?c.slice(1,-1).trim():c;e+=i.slice(s,n),e+=Ap(u)?"url(about:blank)":i.slice(n,o+1),s=o+1}return e+i.slice(s)}function m0(i,t){if(NE.test(i)&&Ap(t))return"about:blank";const e=i.toLowerCase()==="style"?qE(t):t;return OE(e)}function KE(i){return i=i.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(t,e,s)=>`${e}="${m0(e,s)}"`),i=i.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,e,s)=>`${e}='${m0(e,s)}'`),GE.test(i)&&(i=i.replace($E,"$1&#111;n$2")),HE.test(i)&&(i=i.replace(WE,"$1&#115;$2")),i=i.replace(zE,(t,e,s,r)=>Ap(r)?`${e}${s}about:blank`:t),i}const p0=i=>!se(i)||_e(i);function vh(i,t){if(p0(i)||p0(t)||t===Object.prototype)throw new Error("Invalid value");const e=[{src:i,des:t}];for(;e.length;){const{src:s,des:r}=e.pop();Object.keys(s).forEach(n=>{if(n==="__proto__")return;const a=s[n];if(_e(a)){const o=[];o.length=a.length,r[n]=o,e.push({src:a,des:o})}else se(a)?((!se(r[n])||_e(r[n]))&&(r[n]=he()),e.push({src:a,des:r[n]})):r[n]=a})}}/*!
* message-compiler v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/function ZE(i,t,e){return{line:i,column:t,offset:e}}function im(i,t,e){return{start:i,end:t}}const ae={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},JE=17;function Uc(i,t,e={}){const{domain:s,messages:r,args:n}=e,a=i,o=new SyntaxError(String(a));return o.code=i,t&&(o.location=t),o.domain=s,o}function QE(i){throw i}const Sr=" ",tA="\r",is=`
`,eA="\u2028",sA="\u2029";function rA(i){const t=i;let e=0,s=1,r=1,n=0;const a=w=>t[w]===tA&&t[w+1]===is,o=w=>t[w]===is,h=w=>t[w]===sA,l=w=>t[w]===eA,c=w=>a(w)||o(w)||h(w)||l(w),u=()=>e,d=()=>s,f=()=>r,m=()=>n,p=w=>a(w)||h(w)||l(w)?is:t[w],g=()=>p(e),y=()=>p(e+n);function _(){return n=0,c(e)&&(s++,r=0),a(e)&&e++,e++,r++,t[e]}function v(){return a(e+n)&&n++,n++,t[e+n]}function b(){e=0,s=1,r=1,n=0}function T(w=0){n=w}function S(){const w=e+n;for(;w!==e;)_();n=0}return{index:u,line:d,column:f,peekOffset:m,charAt:p,currentChar:g,currentPeek:y,next:_,peek:v,reset:b,resetPeek:T,skipToPeek:S}}const Qr=void 0,iA=".",g0="'",nA="tokenizer";function aA(i,t={}){const e=t.location!==!1,s=rA(i),r=()=>s.index(),n=()=>ZE(s.line(),s.column(),s.index()),a=n(),o=r(),h={currentType:13,offset:o,startLoc:a,endLoc:a,lastType:13,lastOffset:o,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},l=()=>h,{onError:c}=t;function u(U,Y,W,...j){const mt=l();if(Y.column+=W,Y.offset+=W,c){const ut=e?im(mt.startLoc,Y):null,vt=Uc(U,ut,{domain:nA,args:j});c(vt)}}function d(U,Y,W){U.endLoc=n(),U.currentType=Y;const j={type:Y};return e&&(j.loc=im(U.startLoc,U.endLoc)),W!=null&&(j.value=W),j}const f=U=>d(U,13);function m(U,Y){return U.currentChar()===Y?(U.next(),Y):(u(ae.EXPECTED_TOKEN,n(),0,Y),"")}function p(U){let Y="";for(;U.currentPeek()===Sr||U.currentPeek()===is;)Y+=U.currentPeek(),U.peek();return Y}function g(U){const Y=p(U);return U.skipToPeek(),Y}function y(U){if(U===Qr)return!1;const Y=U.charCodeAt(0);return Y>=97&&Y<=122||Y>=65&&Y<=90||Y===95}function _(U){if(U===Qr)return!1;const Y=U.charCodeAt(0);return Y>=48&&Y<=57}function v(U,Y){const{currentType:W}=Y;if(W!==2)return!1;p(U);const j=y(U.currentPeek());return U.resetPeek(),j}function b(U,Y){const{currentType:W}=Y;if(W!==2)return!1;p(U);const j=U.currentPeek()==="-"?U.peek():U.currentPeek(),mt=_(j);return U.resetPeek(),mt}function T(U,Y){const{currentType:W}=Y;if(W!==2)return!1;p(U);const j=U.currentPeek()===g0;return U.resetPeek(),j}function S(U,Y){const{currentType:W}=Y;if(W!==7)return!1;p(U);const j=U.currentPeek()===".";return U.resetPeek(),j}function w(U,Y){const{currentType:W}=Y;if(W!==8)return!1;p(U);const j=y(U.currentPeek());return U.resetPeek(),j}function E(U,Y){const{currentType:W}=Y;if(!(W===7||W===11))return!1;p(U);const j=U.currentPeek()===":";return U.resetPeek(),j}function A(U,Y){const{currentType:W}=Y;if(W!==9)return!1;const j=()=>{const ut=U.currentPeek();return ut==="{"?y(U.peek()):ut==="@"||ut==="|"||ut===":"||ut==="."||ut===Sr||!ut?!1:ut===is?(U.peek(),j()):I(U,!1)},mt=j();return U.resetPeek(),mt}function P(U){p(U);const Y=U.currentPeek()==="|";return U.resetPeek(),Y}function I(U,Y=!0){const W=(mt=!1,ut="")=>{const vt=U.currentPeek();return vt==="{"||vt==="@"||!vt?mt:vt==="|"?!(ut===Sr||ut===is):vt===Sr?(U.peek(),W(!0,Sr)):vt===is?(U.peek(),W(!0,is)):!0},j=W();return Y&&U.resetPeek(),j}function C(U,Y){const W=U.currentChar();return W===Qr?Qr:Y(W)?(U.next(),W):null}function R(U){const Y=U.charCodeAt(0);return Y>=97&&Y<=122||Y>=65&&Y<=90||Y>=48&&Y<=57||Y===95||Y===36}function F(U){return C(U,R)}function D(U){const Y=U.charCodeAt(0);return Y>=97&&Y<=122||Y>=65&&Y<=90||Y>=48&&Y<=57||Y===95||Y===36||Y===45}function M(U){return C(U,D)}function O(U){const Y=U.charCodeAt(0);return Y>=48&&Y<=57}function k(U){return C(U,O)}function N(U){const Y=U.charCodeAt(0);return Y>=48&&Y<=57||Y>=65&&Y<=70||Y>=97&&Y<=102}function B(U){return C(U,N)}function L(U){let Y="",W="";for(;Y=k(U);)W+=Y;return W}function G(U){let Y="";for(;;){const W=U.currentChar();if(W==="\\"){const j=U.peek();j==="{"||j==="}"||j==="@"||j==="|"||j==="\\"?(Y+=W+j,U.next(),U.next()):(U.resetPeek(),Y+=W,U.next())}else{if(W==="{"||W==="}"||W==="@"||W==="|"||!W)break;if(W===Sr||W===is)if(I(U))Y+=W,U.next();else{if(P(U))break;Y+=W,U.next()}else Y+=W,U.next()}}return Y}function V(U){g(U);let Y="",W="";for(;Y=M(U);)W+=Y;const j=U.currentChar();if(j&&j!=="}"&&j!==Qr&&j!==Sr&&j!==is&&j!==" "){const mt=rt(U);return u(ae.INVALID_TOKEN_IN_PLACEHOLDER,n(),0,W+mt),W+mt}return U.currentChar()===Qr&&u(ae.UNTERMINATED_CLOSING_BRACE,n(),0),W}function q(U){g(U);let Y="";return U.currentChar()==="-"?(U.next(),Y+=`-${L(U)}`):Y+=L(U),U.currentChar()===Qr&&u(ae.UNTERMINATED_CLOSING_BRACE,n(),0),Y}function H(U){return U!==g0&&U!==is}function at(U){g(U),m(U,"'");let Y="",W="";for(;Y=C(U,H);)Y==="\\"?W+=et(U):W+=Y;const j=U.currentChar();return j===is||j===Qr?(u(ae.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,n(),0),j===is&&(U.next(),m(U,"'")),W):(m(U,"'"),W)}function et(U){const Y=U.currentChar();switch(Y){case"\\":case"'":return U.next(),`\\${Y}`;case"u":return ot(U,Y,4);case"U":return ot(U,Y,6);default:return u(ae.UNKNOWN_ESCAPE_SEQUENCE,n(),0,Y),""}}function ot(U,Y,W){m(U,Y);let j="";for(let mt=0;mt<W;mt++){const ut=B(U);if(!ut){u(ae.INVALID_UNICODE_ESCAPE_SEQUENCE,n(),0,`\\${Y}${j}${U.currentChar()}`);break}j+=ut}return`\\${Y}${j}`}function ct(U){return U!=="{"&&U!=="}"&&U!==Sr&&U!==is}function rt(U){g(U);let Y="",W="";for( Line truncated
`,n=t.needIndent?t.needIndent:e!=="arrow",a=i.helpers||[],o=gA(i,{filename:s,breakLineCode:r,needIndent:n});o.push(e==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),o.indent(n),a.length>0&&(o.push(`const { ${Ep(a.map(c=>`${c}: _${c}`),", ")} } = ctx`),o.newline()),o.push("return "),Va(o,i),o.deindent(n),o.push("}"),delete i.helpers;const{code:h,map:l}=o.context();return{ast:i,code:h,map:l?l.toJSON():void 0}};function wA(i,t={}){const e=Le({},t),s=!!e.jit,r=!!e.minify,n=e.optimize==null?!0:e.optimize,o=dA(e).parse(i);return s?(n&&pA(o),r&&ca(o),{ast:o,code:""}):(mA(o,e),_A(o,e))}/*!
* core-base v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/function TA(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ki().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ki().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function $n(i){return se(i)&&Ip(i)===0&&(qs(i,"b")||qs(i,"body"))}const Pv=["b","body"];function SA(i){return cn(i,Pv)}const Mv=["c","cases"];function EA(i){return cn(i,Mv,[])}const Rv=["s","static"];function AA(i){return cn(i,Rv)}const Fv=["i","items"];function CA(i){return cn(i,Fv,[])}const kv=["t","type"];function Ip(i){return cn(i,kv)}const Lv=["v","value"];function $l(i,t){const e=cn(i,Lv);if(e!=null)return e;throw Ko(t)}const Bv=["m","modifier"];function IA(i){return cn(i,Bv)}const Ov=["k","key"];function PA(i){const t=cn(i,Ov);if(t)return t;throw Ko(6)}function cn(i,t,e){for(let s=0;s<t.length;s++){const r=t[s];if(qs(i,r)&&i[r]!=null)return i[r]}return e}const Dv=[...Pv,...Mv,...Rv,...Fv,...Ov,...Bv,...Lv,...kv];function Ko(i){return new Error(`unhandled node type: ${i}`)}function cd(i){return e=>MA(e,i)}function MA(i,t){const e=SA(t);if(e==null)throw Ko(0);if(Ip(e)===1){const n=EA(e);return i.plural(n.reduce((a,o)=>[...a,b0(i,o)],[]))}else return b0(i,e)}function b0(i,t){const e=AA(t);if(e!=null)return i.type==="text"?e:i.normalize([e]);{const s=CA(t).reduce((r,n)=>[...r,nm(i,n)],[]);return i.normalize(s)}}function nm(i,t){const e=Ip(t);switch(e){case 3:return $l(t,e);case 9:return $l(t,e);case 4:{const s=t;if(qs(s,"k")&&s.k)return i.interpolate(i.named(s.k));if(qs(s,"key")&&s.key)return i.interpolate(i.named(s.key));throw Ko(e)}case 5:{const s=t;if(qs(s,"i")&&Ne(s.i))return i.interpolate(i.list(s.i));if(qs(s,"index")&&Ne(s.index))return i.interpolate(i.list(s.index));throw Ko(e)}case 6:{const s=t,r=IA(s),n=PA(s);return i.linked(nm(i,n),r?nm(i,r):void 0,i.type)}case 7:return $l(t,e);case 8:return $l(t,e);default:throw new Error(`unhandled node on format message part: ${e}`)}}const RA=i=>i;let Hl=he();function FA(i,t={}){let e=!1;const s=t.onError||QE;return t.onError=r=>{e=!0,s(r)},{...wA(i,t),detectError:e}}function kA(i,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Et(i)){ie(t.warnHtmlMessage)&&t.warnHtmlMessage;const s=(t.onCacheKey||RA)(i),r=Hl[s];if(r)return r;const{ast:n,detectError:a}=FA(i,{...t,location:!1,jit:!0}),o=cd(n);return a?o:Hl[s]=o}else{if(!$n(i))return(()=>i);const e=i.cacheKey;if(e){const s=Hl[e];return s||(Hl[e]=cd(i))}else return cd(i)}}let Zo=null;function LA(i){Zo=i}function BA(i,t,e){Zo&&Zo.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:t,meta:e})}const OA=DA("function:translate");function DA(i){return t=>Zo&&Zo.emit(i,t)}const di={INVALID_ARGUMENT:JE,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},NA=24;function fi(i){return Uc(i,null,void 0)}function Pp(i,t){return t.locale!=null?v0(t.locale):v0(i.locale)}let ud;function v0(i){if(Et(i))return i;if(ve(i)){if(i.resolvedOnce&&ud!=null)return ud;if(i.constructor.name==="Function"){const t=i();if(kE(t))throw fi(di.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return ud=t}else throw fi(di.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw fi(di.NOT_SUPPORT_LOCALE_TYPE)}function UA(i,t,e){return[...new Set([e,..._e(t)?t:se(t)?Object.keys(t).filter(s=>s!=="default"):Et(t)?[t]:[e]])]}function XA(i,t,e){const s=Et(e)?e:Jo,r=i;let n;se(t)?(r.__localeChainObjectCache||(r.__localeChainObjectCache=new WeakMap),n=r.__localeChainObjectCache.get(t),n||(n=new Map,r.__localeChainObjectCache.set(t,n))):(r.__localeChainCache||(r.__localeChainCache=new Map),n=r.__localeChainCache.get(t),n||(n=new Map,r.__localeChainCache.set(t,n)));const a=n.get(s);if(a)return a;const o=[];let h=[e];for(;_e(h);)h=_0(o,h,t);const l=_e(t)||!de(t)?t:t.default?t.default:null;return h=Et(l)?[l]:l,_e(h)&&_0(o,h,!1),n.set(s,o),o}function _0(i,t,e){let s=!0;for(let r=0;r<t.length&&ie(s);r++){const n=t[r];Et(n)&&(s=VA(i,t[r],e))}return s}function VA(i,t,e){let s;const r=t.split("-");do{const n=r.join("-");s=YA(i,n,e),r.splice(-1,1)}while(r.length&&s===!0);return s}function YA(i,t,e){let s=!1;if(!i.includes(t)&&(s=!0,t)){s=t[t.length-1]!=="!";const r=t.replace(/!/g,"");i.push(r),(_e(e)||de(e))&&e[r]&&(s=e[r])}return s}const un=[];un[0]={w:[0],i:[3,0],"[":[4],o:[7]};un[1]={w:[1],".":[2],"[":[4],o:[7]};un[2]={w:[2],i:[3,0],0:[3,0]};un[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};un[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};un[5]={"'":[4,0],o:8,l:[5,0]};un[6]={'"':[4,0],o:8,l:[6,0]};const GA=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function $A(i){return GA.test(i)}function HA(i){const t=i.charCodeAt(0),e=i.charCodeAt(i.length-1);return t===e&&(t===34||t===39)?i.slice(1,-1):i}function WA(i){if(i==null)return"o";switch(i.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return i;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function zA(i){const t=i.trim();return i.charAt(0)==="0"&&Line truncated
* vue-i18n v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/const bC="11.4.16";function vC(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ki().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ki().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ki().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ki().__INTLIFY_PROD_DEVTOOLS__=!1)}const ws={UNEXPECTED_RETURN_TYPE:NA,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Is(i,...t){return Uc(i,null,void 0)}const hm=hn("__translateVNode"),cm=hn("__datetimeParts"),um=hn("__numberParts"),Jv=hn("__setPluralRules"),Qv=hn("__injectWithOption"),ya=hn("__dispose");let t_=null;{const i=Ki().__VUE_INSTANCE_SETTERS__;_e(i)&&i.push(t=>{t_=t})}function $i(i){return!!Cv(i)}function Qo(i){if(!se(i)||$n(i))return i;for(const t in i)if(qs(i,t))if(!t.includes("."))se(i[t])&&Qo(i[t]);else{const e=t.split("."),s=e.length-1;let r=i,n=!1;for(let o=0;o<s;o++){if(e[o]==="__proto__")throw new Error(`unsafe key: ${e[o]}`);if(e[o]in r||(r[e[o]]=he()),!se(r[e[o]])){n=!0;break}if($n(r[e[o]])&&(Dv.includes(e[o+1])||e[o+1]==="cacheKey")){n=!0;break}r=r[e[o]]}n||(r[e[s]]=i[t],delete i[t]);const a=r[e[s]];se(a)&&Qo(a)}return i}function Mp(i,t){const{messages:e,__i18n:s,messageResolver:r,flatJson:n}=t,a=de(e)?e:_e(s)?he():{[i]:he()};if(_e(s)&&s.forEach(o=>{if("locale"in o&&"resource"in o){const{locale:h,resource:l}=o;if(h){if($i(h))return;a[h]=qe(a,h)||he(),vh(l,a[h])}else vh(l,a)}else Et(o)&&vh(JSON.parse(o),a)}),r==null&&n)for(const o in a)qs(a,o)&&Qo(a[o]);return a}function e_(i){return i.type}function s_(i,t,e){let s=se(t.messages)?t.messages:he();"__i18nGlobal"in e&&(s=Mp(i.locale.value,{messages:s,__i18n:e.__i18nGlobal}));const r=Object.keys(s);r.length&&r.forEach(n=>{i.mergeLocaleMessage(n,s[n])});{if(se(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach(a=>{i.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(se(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach(a=>{i.mergeNumberFormat(a,t.numberFormats[a])})}}}function k0(i){return ds(Sl,null,i,0)}function tl(){return t_??Oc()}const L0="__INTLIFY_META__",B0=()=>[],_C=()=>!1;let O0=0;function D0(i){return((t,e,s,r)=>i(e,s,tl()||void 0,r))}const wC=()=>{const i=tl();let t=null;return i&&(t=e_(i)[L0])?{[L0]:t}:null};function Gh(i={}){const{__root:t,__injectWithOption:e}=i,s=t===void 0,r=i.flatJson,n=Xh?Fb:wT;let a=ie(i.inheritLocale)?i.inheritLocale:!0;const o=n(t&&a?t.locale.value:Et(i.locale)?i.locale:Jo),h=n(t&&a?t.fallbackLocale.value:Et(i.fallbackLocale)||_e(i.fallbackLocale)||de(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:o.value),l=n(Mp(o.value,i)),c=n(de(i.datetimeFormats)?i.datetimeFormats:{[o.value]:{}}),u=n(de(i.numberFormats)?i.numberFormats:{[o.value]:{}});let d=t?t.missingWarn:ie(i.missingWarn)||Xa(i.missingWarn)?i.missingWarn:!0,f=t?t.fallbackWarn:ie(i.fallbackWarn)||Xa(i.fallbackWarn)?i.fallbackWarn:!0,m=t?t.fallbackRoot:ie(i.fallbackRoot)?i.fallbackRoot:!0,p=!!i.fallbackFormat,g=ve(i.missing)?i.missing:null,y=ve(i.missing)?D0(i.missing):null,_=ve(i.postTranslation)?i.postTranslation:null,v=t?t.warnHtmlMessage:ie(i.warnHtmlMessage)?i.warnHtmlMessage:!0,b=!!i.escapeParameter;const T=t?t.modifiers:de(i.modifiers)?i.modifiers:{};let S=i.pluralRules||t&&t.pluralRules,w;w=(()=>{s&&S0(null);const st={version:bC,locale:o.value,fallbackLocale:h.value,messages:l.value,modifiers:T,pluralRules:S,missing:y===null?void 0:y,missingWarn:d,fallbackWarn:f,fallbackFormat:p,unresolving:!0,postTranslation:_===null?void 0:_,warnHtmlMessage:v,escapeParameter:b,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};st.datetimeFormats=c.value,st.numberFormats=u.value;const lt=nC(st);return s&&S0(lt),lt})(),Wl(w,o.value,h.value);function A(){return[o.value,h.value,l.value,c.value,u.value]}const P=Mn({get:()=>o.value,set:st=>{w.locale=st,o.value=st}});function I(st){s||(w.fallbackContext=iC());try{return st()}finally{s||(w.fallbackContext=void 0)}}function C(st){I(()=>Wl(w,o.value,st))}const R=Mn({get:()=>h.value,set:st=>{h.value=st,w.fallbackLocale=h.value,C(h.value)}}),F=Mn(()=>l.value),D=Mn(()=>c.value),M=Mn(()=>u.value);function O(){return ve(_)?_:null}function k(st){_=st,w.postTranslation=st}function N(){return g}function B(st){st!==null&&(y=D0(st)),g=st,w.missing=y}const L=(st,lt,kt,Xt,Pe,Ss)=>{A();let Es;try{__INTLIFY_PROD_DEVTOOLS__,Es=I(()=>st(w))}finally{__INTLIFY_PROD_DEVTOOLS__}if(kt!=="translate exists"&&Ne(Es)&&Es===Xc||kt==="translate exists"&&!Es){const[Li,Xe]=lt();return t&&m?Xt(t):Pe(Li)}else{if(Ss(Es))return Es;throw Is(ws.UNEXPECTED_RETURN_TYPE)}};function G(...st){return L(lt=>Reflect.apply(F0,null,[lt,...st]),()=>lm(...st),"translate",lt=>Reflect.apply(lt.t,lt,[...st]),lt=>lt,lt=>Et(lt))}function V(...st){const[lt,kt,Xt]=st;if(Xt&&!se(Xt))throLine truncated
`)>=0)return!1;return!0}function Es(tt,nt){var ee;if(tt.indent===" ")ee=" ";else if(typeof tt.indent=="number"&&tt.indent>0)ee=E.call(Array(tt.indent+1)," ");else return null;return{base:ee,prev:E.call(Array(nt+1),ee)}}function Li(tt,nt){if(tt.length===0)return"";var ee=`
`+nt.prev+nt.base;return ee+E.call(tt,","+ee)+`
`+nt.prev}function Xe(tt,nt){var ee=et(tt),me=[];if(ee){me.length=tt.length;for(var xe=0;xe<tt.length;xe++)me[xe]=it(tt,xe)?nt(tt[xe],tt):""}var Yt=typeof C=="function"?C(tt):[],Bi;if(F){Bi={};for(var mn=0;mn<Yt.length;mn++)Bi["$"+Yt[mn]]=Yt[mn]}for(var Rs in tt)it(tt,Rs)&&(ee&&String(Number(Rs))===Rs&&Rs<tt.length||F&&Bi["$"+Rs]instanceof Symbol||(S.call(/[^\w$]/,Rs)?me.push(nt(Rs,tt)+": "+nt(tt[Rs],tt)):me.push(Rs+": "+nt(tt[Rs],tt))));if(typeof C=="function")for(var Oi=0;Oi<Yt.length;Oi++)M.call(tt,Yt[Oi])&&me.push("["+nt(Yt[Oi])+"]: "+nt(tt[Yt[Oi]],tt));return me}return md}var pd,P0;function GE(){if(P0)return pd;P0=1;var i=Uc(),t=Qa(),e=function(o,h,l){for(var c=o,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=o.next,o.next=u),u},s=function(o,h){if(o){var l=e(o,h);return l&&l.value}},r=function(o,h,l){var c=e(o,h);c?c.value=l:o.next={key:h,next:o.next,value:l}},n=function(o,h){return o?!!e(o,h):!1},a=function(o,h){if(o)return e(o,h,!0)};return pd=function(){var h,l={assert:function(c){if(!l.has(c))throw new t("Side channel does not contain "+i(c))},delete:function(c){var u=a(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return s(h,c)},has:function(c){return n(h,c)},set:function(c,u){h||(h={next:void 0}),r(h,c,u)}};return l},pd}var gd,M0;function Iv(){return M0||(M0=1,gd=Object),gd}var yd,R0;function $E(){return R0||(R0=1,yd=Error),yd}var xd,F0;function HE(){return F0||(F0=1,xd=EvalError),xd}var bd,k0;function WE(){return k0||(k0=1,bd=RangeError),bd}var vd,L0;function zE(){return L0||(L0=1,vd=ReferenceError),vd}var _d,B0;function jE(){return B0||(B0=1,_d=SyntaxError),_d}var wd,O0;function qE(){return O0||(O0=1,wd=URIError),wd}var Td,D0;function KE(){return D0||(D0=1,Td=Math.abs),Td}var Sd,N0;function ZE(){return N0||(N0=1,Sd=Math.floor),Sd}var Ed,U0;function JE(){return U0||(U0=1,Ed=Math.max),Ed}var Ad,X0;function QE(){return X0||(X0=1,Ad=Math.min),Ad}var Cd,V0;function tA(){return V0||(V0=1,Cd=Math.pow),Cd}var Id,Y0;function eA(){return Y0||(Y0=1,Id=Math.round),Id}var Pd,G0;function sA(){return G0||(G0=1,Pd=Number.isNaN||function(t){return t!==t}),Pd}var Md,$0;function rA(){if($0)return Md;$0=1;var i=sA();return Md=function(e){return i(e)||e===0?e:e<0?-1:1},Md}var Rd,H0;function iA(){return H0||(H0=1,Rd=Object.getOwnPropertyDescriptor),Rd}var Fd,W0;function Pv(){if(W0)return Fd;W0=1;var i=iA();if(i)try{i([],"length")}catch{i=null}return Fd=i,Fd}var kd,z0;function Mv(){if(z0)return kd;z0=1;var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return kd=i,kd}var Ld,j0;function nA(){return j0||(j0=1,Ld=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),s=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var r=42;t[e]=r;for(var n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==r||o.enumerable!==!0)return!1}return!0}),Ld}var Bd,q0;function aA(){if(q0)return Bd;q0=1;var i=typeof Symbol<"u"&&Symbol,t=nA();return Bd=function(){return typeof i!="function"||typeof Symbol!="function"||typeof i("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Bd}var Od,K0;function Rv(){return K0||(K0=1,Od=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Od}var Dd,Z0;function Fv(){if(Z0)return Dd;Z0=1;var i=Iv();return Dd=i.getPrototypeOf||null,Dd}var Nd,J0;function oA(){if(J0)return Nd;J0=1;var i="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,s="[object Function]",r=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var d=0;d<l.length;d+=1)c[d+h.length]=l[d];return c},n=function(h,l){for(var c=[],u=l,d=0;u<h.length;u+=1,d+=1)c[d]=h[u];return c},a=function(o,h){for(var l="",c=0;c<o.length;c+=1)l+=o[c],c+1<o.length&&(l+=h);return l};return Nd=function(h){var l=this;if(typeof l!="function"||t.apply(l)!==s)throw new TypeError(i+l);for(var c=n(arguments,1),u,d=function(){if(this instanceof u){var y=l.apply(this,r(c,arguments));return Object(y)===y?y:this}return l.apply(h,r(c,arguments))},f=e(0,l.length-c.length),m=[],p=0;p<f;p++)m[p]="$"+p;if(u=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},Nd}var Ud,Q0;function Xc(){if(Q0)return Ud;Q0=1;var i=oA();return Ud=Function.prototype.bind||i,Ud}var Xd,ty;function Sp(){return ty||(ty=1,Xd=Function.prototype.call),Xd}var Vd,ey;function kv(){return ey||(ey=1,Vd=Function.p Line truncated
`," "],a=["{","}","|","\\","^","`"].concat(n),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=gA();function y(T,S,w){if(T&&typeof T=="object"&&T instanceof t)return T;var E=new t;return E.parse(T,S,w),E}t.prototype.parse=function(T,S,w){if(typeof T!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var E=T.indexOf("?"),A=E!==-1&&E<T.indexOf("#")?"?":"#",P=T.split(A),I=/\\/g;P[0]=P[0].replace(I,"/"),T=P.join(A);var C=T;if(C=C.trim(),!w&&T.split("#").length===1){var R=r.exec(C);if(R)return this.path=C,this.href=C,this.pathname=R[1],R[2]?(this.search=R[2],S?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):S&&(this.search="",this.query={}),this}var F=e.exec(C);if(F){F=F[0];var D=F.toLowerCase();this.protocol=D,C=C.substr(F.length)}if(w||F||C.match(/^\/\/[^@/]+@[^@/]+/)){var M=C.substr(0,2)==="//";M&&!(F&&m[F])&&(C=C.substr(2),this.slashes=!0)}if(!m[F]&&(M||F&&!p[F])){for(var O=-1,k=0;k<l.length;k++){var N=C.indexOf(l[k]);N!==-1&&(O===-1||N<O)&&(O=N)}var B,L;O===-1?L=C.lastIndexOf("@"):L=C.lastIndexOf("@",O),L!==-1&&(B=C.slice(0,L),C=C.slice(L+1),this.auth=decodeURIComponent(B)),O=-1;for(var k=0;k<h.length;k++){var N=C.indexOf(h[k]);N!==-1&&(O===-1||N<O)&&(O=N)}O===-1&&(O=C.length),this.host=C.slice(0,O),C=C.slice(O),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G)for(var V=this.hostname.split(/\./),k=0,q=V.length;k<q;k++){var H=V[k];if(H&&!H.match(u)){for(var at="",et=0,ot=H.length;et<ot;et++)H.charCodeAt(et)>127?at+="x":at+=H[et];if(!at.match(u)){var ct=V.slice(0,k),rt=V.slice(k+1),dt=H.match(d);dt&&(ct.push(dt[1]),rt.unshift(dt[2])),rt.length&&(C="/"+rt.join(".")+C),this.hostname=ct.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),G||(this.hostname=i.toASCII(this.hostname));var X=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+X,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),C[0]!=="/"&&(C="/"+C))}if(!f[D])for(var k=0,q=o.length;k<q;k++){var K=o[k];if(C.indexOf(K)!==-1){var J=encodeURIComponent(K);J===K&&(J=escape(K)),C=C.split(K).join(J)}}var Q=C.indexOf("#");Q!==-1&&(this.hash=C.substr(Q),C=C.slice(0,Q));var it=C.indexOf("?");if(it!==-1?(this.search=C.substr(it),this.query=C.substr(it+1),S&&(this.query=g.parse(this.query)),C=C.slice(0,it)):S&&(this.search="",this.query={}),C&&(this.pathname=C),p[D]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var X=this.pathname||"",U=this.search||"";this.path=X+U}return this.href=this.format(),this};function _(T){return typeof T=="string"&&(T=y(T)),T instanceof t?T.format():t.prototype.format.call(T)}t.prototype.format=function(){var T=this.auth||"";T&&(T=encodeURIComponent(T),T=T.replace(/%3A/i,":"),T+="@");var S=this.protocol||"",w=this.pathname||"",E=this.hash||"",A=!1,P="";this.host?A=T+this.host:this.hostname&&(A=T+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(A+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(P=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var I=this.search||P&&"?"+P||"";return S&&S.substr(-1)!==":"&&(S+=":"),this.slashes||(!S||p[S])&&A!==!1?(A="//"+(A||""),w&&w.charAt(0)!=="/"&&(w="/"+w)):A||(A=""),E&&E.charAt(0)!=="#"&&(E="#"+E),I&&I.charAt(0)!=="?"&&(I="?"+I),w=w.replace(/[?#]/g,function(C){return encodeURIComponent(C)}),I=I.replace("#","%23"),S+A+w+I+E};function v(T,S){return y(T,!1,!0).resolve(S)}t.prototype.resolve=function(T){return this.resolveObject(y(T,!1,!0)).format()};function b(T,S){return T?y(T,!1,!0).resolveObject(S):S}return t.prototype.resolveObject=function(T){if(typeof T=="string"){var S=new t;S.parse(T,!1,!0),T=S}for(var w=new t,E=Object.keys(this),A=0;A<E.length;A++){var P=E[A];w[P]=this[P]}if(w.hash=T.hash,T.href==="")return w.href=w.format(),w;if(T.slashes&&!T.protocol){for(var I=Object.keys(T),C=0;C<I.length;C++){var R=I[C];R!=="protocol"&&(w[R]=T[R])}return p[w.protocol]&&w.hostname&&!w.pathname&&(w.pathname="/",w.path=w.pathname),w.href=w.format(),w}if(T.protocol&&T.protocol!==w.protocol){if(!p[T.protocol]){for(var F=Object.keys(T),D=0;D<F.length;D++){var M=F[D];w[M]=T[M]}return w.href=w.format(),w}if(w.protocol=T.protocol,!T.host&&!m[T.protocol]){for(var q=(T.pathname||"").split("/");q.length&&!(T.host=q.shift()););T.host||(T.host=""),T.hostname||(T.hostname=""),q[0]!==""&&q.unshift(""),q.length<2&&q.unshift(""),w.pathname=q.join("/")}else w.pathname=T.pathname;if(w.search=T.search,w.query=T.query,w.host=T.host||"",w.auth=T.auth,w.hostname=T.hostname||T.host,w.port=T.port,w.pathname||w.search){var O=w. Line truncated
`+nt.prev}function Xe(tt,nt){var ee=et(tt),me=[];if(ee){me.length=tt.length;for(var xe=0;xe<tt.length;xe++)me[xe]=it(tt,xe)?nt(tt[xe],tt):""}var Yt=typeof C=="function"?C(tt):[],Bi;if(F){Bi={};for(var mn=0;mn<Yt.length;mn++)Bi["$"+Yt[mn]]=Yt[mn]}for(var Rs in tt)it(tt,Rs)&&(ee&&String(Number(Rs))===Rs&&Rs<tt.length||F&&Bi["$"+Rs]instanceof Symbol||(S.call(/[^\w$]/,Rs)?me.push(nt(Rs,tt)+": "+nt(tt[Rs],tt)):me.push(Rs+": "+nt(tt[Rs],tt))));if(typeof C=="function")for(var Oi=0;Oi<Yt.length;Oi++)M.call(tt,Yt[Oi])&&me.push("["+nt(Yt[Oi])+"]: "+nt(tt[Yt[Oi]],tt));return me}return xd}var bd,hy;function sI(){if(hy)return bd;hy=1;var i=Vc(),t=Qa(),e=function(o,h,l){for(var c=o,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=o.next,o.next=u),u},s=function(o,h){if(o){var l=e(o,h);return l&&l.value}},r=function(o,h,l){var c=e(o,h);c?c.value=l:o.next={key:h,next:o.next,value:l}},n=function(o,h){return o?!!e(o,h):!1},a=function(o,h){if(o)return e(o,h,!0)};return bd=function(){var h,l={assert:function(c){if(!l.has(c))throw new t("Side channel does not contain "+i(c))},delete:function(c){var u=a(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return s(h,c)},has:function(c){return n(h,c)},set:function(c,u){h||(h={next:void 0}),r(h,c,u)}};return l},bd}var vd,cy;function o_(){return cy||(cy=1,vd=Object),vd}var _d,uy;function rI(){return uy||(uy=1,_d=Error),_d}var wd,dy;function iI(){return dy||(dy=1,wd=EvalError),wd}var Td,fy;function nI(){return fy||(fy=1,Td=RangeError),Td}var Sd,my;function aI(){return my||(my=1,Sd=ReferenceError),Sd}var Ed,py;function oI(){return py||(py=1,Ed=SyntaxError),Ed}var Ad,gy;function lI(){return gy||(gy=1,Ad=URIError),Ad}var Cd,yy;function hI(){return yy||(yy=1,Cd=Math.abs),Cd}var Id,xy;function cI(){return xy||(xy=1,Id=Math.floor),Id}var Pd,by;function uI(){return by||(by=1,Pd=Math.max),Pd}var Md,vy;function dI(){return vy||(vy=1,Md=Math.min),Md}var Rd,_y;function fI(){return _y||(_y=1,Rd=Math.pow),Rd}var Fd,wy;function mI(){return wy||(wy=1,Fd=Math.round),Fd}var kd,Ty;function pI(){return Ty||(Ty=1,kd=Number.isNaN||function(t){return t!==t}),kd}var Ld,Sy;function gI(){if(Sy)return Ld;Sy=1;var i=pI();return Ld=function(e){return i(e)||e===0?e:e<0?-1:1},Ld}var Bd,Ey;function yI(){return Ey||(Ey=1,Bd=Object.getOwnPropertyDescriptor),Bd}var Od,Ay;function l_(){if(Ay)return Od;Ay=1;var i=yI();if(i)try{i([],"length")}catch{i=null}return Od=i,Od}var Dd,Cy;function h_(){if(Cy)return Dd;Cy=1;var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return Dd=i,Dd}var Nd,Iy;function xI(){return Iy||(Iy=1,Nd=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),s=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var r=42;t[e]=r;for(var n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==r||o.enumerable!==!0)return!1}return!0}),Nd}var Ud,Py;function bI(){if(Py)return Ud;Py=1;var i=typeof Symbol<"u"&&Symbol,t=xI();return Ud=function(){return typeof i!="function"||typeof Symbol!="function"||typeof i("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Ud}var Xd,My;function c_(){return My||(My=1,Xd=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Xd}var Vd,Ry;function u_(){if(Ry)return Vd;Ry=1;var i=o_();return Vd=i.getPrototypeOf||null,Vd}var Yd,Fy;function vI(){if(Fy)return Yd;Fy=1;var i="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,s="[object Function]",r=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var d=0;d<l.length;d+=1)c[d+h.length]=l[d];return c},n=function(h,l){for(var c=[],u=l,d=0;u<h.length;u+=1,d+=1)c[d]=h[u];return c},a=function(o,h){for(var l="",c=0;c<o.length;c+=1)l+=o[c],c+1<o.length&&(l+=h);return l};return Yd=function(h){var l=this;if(typeof l!="function"||t.apply(l)!==s)throw new TypeError(i+l);for(var c=n(arguments,1),u,d=function(){if(this instanceof u){var y=l.apply(this,r(c,arguments));return Object(y)===y?y:this}return l.apply(h,r(c,arguments))},f=e(0,l.length-c.length),m=[],p=0;p<f;p++)m[p]="$"+p;if(u=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},Yd}var Gd,ky;function Yc(){if(ky)return Gd;ky=1;var i=vI();return Gd=Function.prototype.bind||i,Gd}var $d,Ly;function Lp(){return Ly||(Ly=1,$d=Function.prototype.call),$d}var Hd,By;function d_(){return By||(By=1,Hd=Function.p Line truncated
`," "],a=["{","}","|","\\","^","`"].concat(n),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=PI();function y(T,S,w){if(T&&typeof T=="object"&&T instanceof t)return T;var E=new t;return E.parse(T,S,w),E}t.prototype.parse=function(T,S,w){if(typeof T!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var E=T.indexOf("?"),A=E!==-1&&E<T.indexOf("#")?"?":"#",P=T.split(A),I=/\\/g;P[0]=P[0].replace(I,"/"),T=P.join(A);var C=T;if(C=C.trim(),!w&&T.split("#").length===1){var R=r.exec(C);if(R)return this.path=C,this.href=C,this.pathname=R[1],R[2]?(this.search=R[2],S?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):S&&(this.search="",this.query={}),this}var F=e.exec(C);if(F){F=F[0];var D=F.toLowerCase();this.protocol=D,C=C.substr(F.length)}if(w||F||C.match(/^\/\/[^@/]+@[^@/]+/)){var M=C.substr(0,2)==="//";M&&!(F&&m[F])&&(C=C.substr(2),this.slashes=!0)}if(!m[F]&&(M||F&&!p[F])){for(var O=-1,k=0;k<l.length;k++){var N=C.indexOf(l[k]);N!==-1&&(O===-1||N<O)&&(O=N)}var B,L;O===-1?L=C.lastIndexOf("@"):L=C.lastIndexOf("@",O),L!==-1&&(B=C.slice(0,L),C=C.slice(L+1),this.auth=decodeURIComponent(B)),O=-1;for(var k=0;k<h.length;k++){var N=C.indexOf(h[k]);N!==-1&&(O===-1||N<O)&&(O=N)}O===-1&&(O=C.length),this.host=C.slice(0,O),C=C.slice(O),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G)for(var V=this.hostname.split(/\./),k=0,q=V.length;k<q;k++){var H=V[k];if(H&&!H.match(u)){for(var at="",et=0,ot=H.length;et<ot;et++)H.charCodeAt(et)>127?at+="x":at+=H[et];if(!at.match(u)){var ct=V.slice(0,k),rt=V.slice(k+1),dt=H.match(d);dt&&(ct.push(dt[1]),rt.unshift(dt[2])),rt.length&&(C="/"+rt.join(".")+C),this.hostname=ct.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),G||(this.hostname=i.toASCII(this.hostname));var X=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+X,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),C[0]!=="/"&&(C="/"+C))}if(!f[D])for(var k=0,q=o.length;k<q;k++){var K=o[k];if(C.indexOf(K)!==-1){var J=encodeURIComponent(K);J===K&&(J=escape(K)),C=C.split(K).join(J)}}var Q=C.indexOf("#");Q!==-1&&(this.hash=C.substr(Q),C=C.slice(0,Q));var it=C.indexOf("?");if(it!==-1?(this.search=C.substr(it),this.query=C.substr(it+1),S&&(this.query=g.parse(this.query)),C=C.slice(0,it)):S&&(this.search="",this.query={}),C&&(this.pathname=C),p[D]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var X=this.pathname||"",U=this.search||"";this.path=X+U}return this.href=this.format(),this};function _(T){return typeof T=="string"&&(T=y(T)),T instanceof t?T.format():t.prototype.format.call(T)}t.prototype.format=function(){var T=this.auth||"";T&&(T=encodeURIComponent(T),T=T.replace(/%3A/i,":"),T+="@");var S=this.protocol||"",w=this.pathname||"",E=this.hash||"",A=!1,P="";this.host?A=T+this.host:this.hostname&&(A=T+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(A+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(P=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var I=this.search||P&&"?"+P||"";return S&&S.substr(-1)!==":"&&(S+=":"),this.slashes||(!S||p[S])&&A!==!1?(A="//"+(A||""),w&&w.charAt(0)!=="/"&&(w="/"+w)):A||(A=""),E&&E.charAt(0)!=="#"&&(E="#"+E),I&&I.charAt(0)!=="?"&&(I="?"+I),w=w.replace(/[?#]/g,function(C){return encodeURIComponent(C)}),I=I.replace("#","%23"),S+A+w+I+E};function v(T,S){return y(T,!1,!0).resolve(S)}t.prototype.resolve=function(T){return this.resolveObject(y(T,!1,!0)).format()};function b(T,S){return T?y(T,!1,!0).resolveObject(S):S}return t.prototype.resolveObject=function(T){if(typeof T=="string"){var S=new t;S.parse(T,!1,!0),T=S}for(var w=new t,E=Object.keys(this),A=0;A<E.length;A++){var P=E[A];w[P]=this[P]}if(w.hash=T.hash,T.href==="")return w.href=w.format(),w;if(T.slashes&&!T.protocol){for(var I=Object.keys(T),C=0;C<I.length;C++){var R=I[C];R!=="protocol"&&(w[R]=T[R])}return p[w.protocol]&&w.hostname&&!w.pathname&&(w.pathname="/",w.path=w.pathname),w.href=w.format(),w}if(T.protocol&&T.protocol!==w.protocol){if(!p[T.protocol]){for(var F=Object.keys(T),D=0;D<F.length;D++){var M=F[D];w[M]=T[M]}return w.href=w.format(),w}if(w.protocol=T.protocol,!T.host&&!m[T.protocol]){for(var q=(T.pathname||"").split("/");q.length&&!(T.host=q.shift()););T.host||(T.host=""),T.hostname||(T.hostname=""),q[0]!==""&&q.unshift(""),q.length<2&&q.unshift(""),w.pathname=q.join("/")}else w.pathname=T.pathname;if(w.search=T.search,w.query=T.query,w.host=T.host||"",w.auth=T.auth,w.hostname=T.hostname||T.host,w.port=T.port,w.pathname||w.search){var O=w. Line truncated
Deprecated since v${i}`):(s=s.split(`
`).splice(e).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}
Deprecated since v${i}`),console.warn(s),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}
Deprecated since v${i}`),console.warn(s))),by[t]=!0}function rr(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function fo(i){return i.split("?")[0].split("#")[0]}function xA(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bA(i,t,e){return i.replace(new RegExp(xA(t),"g"),e)}function vA(i,t){let e="",s=0,r=-1,n=0,a=-1;for(let o=0;o<=i.length;++o){if(o<i.length)a=i.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(r===o-1||n===1))if(r!==o-1&&n===2){if(e.length<2||s!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){const h=e.lastIndexOf("/");if(h!==e.length-1){h===-1?(e="",s=0):(e=e.slice(0,h),s=e.length-1-e.lastIndexOf("/")),r=o,n=0;continue}}else if(e.length===2||e.length===1){e="",s=0,r=o,n=0;continue}}}else e.length>0?e+=`/${i.slice(r+1,o)}`:e=i.slice(r+1,o),s=o-r-1;r=o,n=0}else a===46&&n!==-1?++n:n=-1}return e}const ye={toPosix(i){return bA(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){rr(i),i=this.toPosix(i);const t=/^file:\/\/\//.exec(i);if(t)return t[0];const e=/^[^/:]+:\/{0,2}/.exec(i);return e?e[0]:""},toAbsolute(i,t,e){if(rr(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const s=fo(this.toPosix(t??_t.ADAPTER.getBaseUrl())),r=fo(this.toPosix(e??this.rootname(s)));return i=this.toPosix(i),i.startsWith("/")?ye.join(r,i.slice(1)):this.isAbsolute(i)?i:this.join(s,i)},normalize(i){if(rr(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let t="";const e=i.startsWith("/");this.hasProtocol(i)&&(t=this.rootname(i),i=i.slice(t.length));const s=i.endsWith("/");return i=vA(i),i.length>0&&s&&(i+="/"),e?`/${i}`:t+i},isAbsolute(i){return rr(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let t;for(let e=0;e<i.length;++e){const s=i[e];if(rr(s),s.length>0)if(t===void 0)t=s;else{const r=i[e-1]??"";this.joinExtensions.includes(this.extname(r).toLowerCase())?t+=`/../${s}`:t+=`/${s}`}}return t===void 0?".":this.normalize(t)},dirname(i){if(rr(i),i.length===0)return".";i=this.toPosix(i);let t=i.charCodeAt(0);const e=t===47;let s=-1,r=!0;const n=this.getProtocol(i),a=i;i=i.slice(n.length);for(let o=i.length-1;o>=1;--o)if(t=i.charCodeAt(o),t===47){if(!r){s=o;break}}else r=!1;return s===-1?e?"/":this.isUrl(a)?n+i:n:e&&s===1?"//":n+i.slice(0,s)},rootname(i){rr(i),i=this.toPosix(i);let t="";if(i.startsWith("/")?t="/":t=this.getProtocol(i),this.isUrl(i)){const e=i.indexOf("/",t.length);e!==-1?t=i.slice(0,e):t=i,t.endsWith("/")||(t+="/")}return t},basename(i,t){rr(i),t&&rr(t),i=fo(this.toPosix(i));let e=0,s=-1,r=!0,n;if(t!==void 0&&t.length>0&&t.length<=i.length){if(t.length===i.length&&t===i)return"";let a=t.length-1,o=-1;for(n=i.length-1;n>=0;--n){const h=i.charCodeAt(n);if(h===47){if(!r){e=n+1;break}}else o===-1&&(r=!1,o=n+1),a>=0&&(h===t.charCodeAt(a)?--a===-1&&(s=n):(a=-1,s=o))}return e===s?s=o:s===-1&&(s=i.length),i.slice(e,s)}for(n=i.length-1;n>=0;--n)if(i.charCodeAt(n)===47){if(!r){e=n+1;break}}else s===-1&&(r=!1,s=n+1);return s===-1?"":i.slice(e,s)},extname(i){rr(i),i=fo(this.toPosix(i));let t=-1,e=0,s=-1,r=!0,n=0;for(let a=i.length-1;a>=0;--a){const o=i.charCodeAt(a);if(o===47){if(!r){e=a+1;break}continue}s===-1&&(r=!1,s=a+1),o===46?t===-1?t=a:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||s===-1||n===0||n===1&&t===s-1&&t===e+1?"":i.slice(t,s)},parse(i){rr(i);const t={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return t;i=fo(this.toPosix(i));let e=i.charCodeAt(0);const s=this.isAbsolute(i);let r;t.root=this.rootname(i),s||this.hasProtocol(i)?r=1:r=0;let n=-1,a=0,o=-1,h=!0,l=i.length-1,c=0;for(;l>=r;--l){if(e=i.charCodeAt(l),e===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),e===46?n===-1?n=l:c!==1&&(c=1):n!==-1&&(c=-1)}return n===-1||o===-1||c===0||c===1&&n===o-1&&n===a+1?o!==-1&&(a===0&&s?t.base=t.name=i.slice(1,o):t.base=t.name=i.slice(a,o)):(a===0&&s?(t.name=i.slice(1,n),t.base=i.slice(1,o)):(t.name=i.slice(a,n),t.base=i.slice(a,o)),t.ext=i.slice(n,o)),t.dir=this.dirname(i),t},sep:"/",delimiter:":",joinExtensions:[".html"]};let nf;async function _A(){return nf??(nf=(async()=>{var n;const i=document.createElement("canvas").getContext("webgl");if(!i)return Ke.UNPACK;const t=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Line truncated
`);function YA(i){let t="";for(let e=0;e<i;++e)e>0&&(t+=`
else `),e<i-1&&(t+=`if(test == ${e}.0){}`);return t}function GA(i,t){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const e=t.createShader(t.FRAGMENT_SHADER);for(;;){const s=VA.replace(/%forloop%/gi,YA(i));if(t.shaderSource(e,s),t.compileShader(e),!t.getShaderParameter(e,t.COMPILE_STATUS))i=i/2|0;else break}return i}const cf=0,uf=1,df=2,ff=3,mf=4,pf=5;class jr{constructor(){this.data=0,this.blendMode=It.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<cf)}set blend(t){!!(this.data&1<<cf)!==t&&(this.data^=1<<cf)}get offsets(){return!!(this.data&1<<uf)}set offsets(t){!!(this.data&1<<uf)!==t&&(this.data^=1<<uf)}get culling(){return!!(this.data&1<<df)}set culling(t){!!(this.data&1<<df)!==t&&(this.data^=1<<df)}get depthTest(){return!!(this.data&1<<ff)}set depthTest(t){!!(this.data&1<<ff)!==t&&(this.data^=1<<ff)}get depthMask(){return!!(this.data&1<<pf)}set depthMask(t){!!(this.data&1<<pf)!==t&&(this.data^=1<<pf)}get clockwiseFrontFace(){return!!(this.data&1<<mf)}set clockwiseFrontFace(t){!!(this.data&1<<mf)!==t&&(this.data^=1<<mf)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==It.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}static for2d(){const t=new jr;return t.depthTest=!1,t.blend=!0,t}}jr.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const cm=[];function Hv(i,t){if(!i)return null;let e="";if(typeof i=="string"){const s=/\.(\w{3,4})(?:$|\?|#)/i.exec(i);s&&(e=s[1].toLowerCase())}for(let s=cm.length-1;s>=0;--s){const r=cm[s];if(r.test&&r.test(i,e))return new r(i,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class gr{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,e,s,r,n,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u<d;u++)c[u][l](t,e,s,r,n,a,o,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const e=this.items.indexOf(t);return e!==-1&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(gr.prototype,{dispatch:{value:gr.prototype.emit},run:{value:gr.prototype.emit}});class Ko{constructor(t=0,e=0){this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new gr("setRealSize"),this.onUpdate=new gr("update"),this.onError=new gr("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,e){(t!==this._width||e!==this._height)&&(this._width=t,this._height=e,this.onResize.emit(t,e))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,e,s){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,e){return!1}}class Vc extends Ko{constructor(t,e){const{width:s,height:r}=e||{};if(!s||!r)throw new Error("BufferResource width or height invalid");super(s,r),this.data=t,this.unpackAlignment=e.unpackAlignment??4}upload(t,e,s){const r=t.gl;r.pixelStorei(r.UNPACK_ALIGNMENT,this.unpackAlignment),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===Ke.UNPACK);const n=e.realWidth,a=e.realHeight;return s.width===n&&s.height===a?r.texSubImage2D(e.target,0,0,0,n,a,e.format,s.type,this.data):(s.width=n,s.height=a,r.texImage2D(e.target,0,s.internalFormat,n,a,0,e.format,s.type,this.data)),!0}dispose(){this.data=null}static test(t){return t===null||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}const $A={scaleMode:Ns.NEAREST,alphaMode:Ke.NPM},um=class ua extends Al{constructor(t=null,e=null){super(),e=Object.assign({},ua.defaultOptions,e);const{alphaMode:s,mipmap:r,anisotropicLevel:n,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution: Line truncated
Deprecated since v${i}`),console.warn(s))),Qy[t]=!0}function rr(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function fo(i){return i.split("?")[0].split("#")[0]}function RI(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function FI(i,t,e){return i.replace(new RegExp(RI(t),"g"),e)}function kI(i,t){let e="",s=0,r=-1,n=0,a=-1;for(let o=0;o<=i.length;++o){if(o<i.length)a=i.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(r===o-1||n===1))if(r!==o-1&&n===2){if(e.length<2||s!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){const h=e.lastIndexOf("/");if(h!==e.length-1){h===-1?(e="",s=0):(e=e.slice(0,h),s=e.length-1-e.lastIndexOf("/")),r=o,n=0;continue}}else if(e.length===2||e.length===1){e="",s=0,r=o,n=0;continue}}}else e.length>0?e+=`/${i.slice(r+1,o)}`:e=i.slice(r+1,o),s=o-r-1;r=o,n=0}else a===46&&n!==-1?++n:n=-1}return e}const ye={toPosix(i){return FI(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){rr(i),i=this.toPosix(i);const t=/^file:\/\/\//.exec(i);if(t)return t[0];const e=/^[^/:]+:\/{0,2}/.exec(i);return e?e[0]:""},toAbsolute(i,t,e){if(rr(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const s=fo(this.toPosix(t??_t.ADAPTER.getBaseUrl())),r=fo(this.toPosix(e??this.rootname(s)));return i=this.toPosix(i),i.startsWith("/")?ye.join(r,i.slice(1)):this.isAbsolute(i)?i:this.join(s,i)},normalize(i){if(rr(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let t="";const e=i.startsWith("/");this.hasProtocol(i)&&(t=this.rootname(i),i=i.slice(t.length));const s=i.endsWith("/");return i=kI(i),i.length>0&&s&&(i+="/"),e?`/${i}`:t+i},isAbsolute(i){return rr(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let t;for(let e=0;e<i.length;++e){const s=i[e];if(rr(s),s.length>0)if(t===void 0)t=s;else{const r=i[e-1]??"";this.joinExtensions.includes(this.extname(r).toLowerCase())?t+=`/../${s}`:t+=`/${s}`}}return t===void 0?".":this.normalize(t)},dirname(i){if(rr(i),i.length===0)return".";i=this.toPosix(i);let t=i.charCodeAt(0);const e=t===47;let s=-1,r=!0;const n=this.getProtocol(i),a=i;i=i.slice(n.length);for(let o=i.length-1;o>=1;--o)if(t=i.charCodeAt(o),t===47){if(!r){s=o;break}}else r=!1;return s===-1?e?"/":this.isUrl(a)?n+i:n:e&&s===1?"//":n+i.slice(0,s)},rootname(i){rr(i),i=this.toPosix(i);let t="";if(i.startsWith("/")?t="/":t=this.getProtocol(i),this.isUrl(i)){const e=i.indexOf("/",t.length);e!==-1?t=i.slice(0,e):t=i,t.endsWith("/")||(t+="/")}return t},basename(i,t){rr(i),t&&rr(t),i=fo(this.toPosix(i));let e=0,s=-1,r=!0,n;if(t!==void 0&&t.length>0&&t.length<=i.length){if(t.length===i.length&&t===i)return"";let a=t.length-1,o=-1;for(n=i.length-1;n>=0;--n){const h=i.charCodeAt(n);if(h===47){if(!r){e=n+1;break}}else o===-1&&(r=!1,o=n+1),a>=0&&(h===t.charCodeAt(a)?--a===-1&&(s=n):(a=-1,s=o))}return e===s?s=o:s===-1&&(s=i.length),i.slice(e,s)}for(n=i.length-1;n>=0;--n)if(i.charCodeAt(n)===47){if(!r){e=n+1;break}}else s===-1&&(r=!1,s=n+1);return s===-1?"":i.slice(e,s)},extname(i){rr(i),i=fo(this.toPosix(i));let t=-1,e=0,s=-1,r=!0,n=0;for(let a=i.length-1;a>=0;--a){const o=i.charCodeAt(a);if(o===47){if(!r){e=a+1;break}continue}s===-1&&(r=!1,s=a+1),o===46?t===-1?t=a:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||s===-1||n===0||n===1&&t===s-1&&t===e+1?"":i.slice(t,s)},parse(i){rr(i);const t={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return t;i=fo(this.toPosix(i));let e=i.charCodeAt(0);const s=this.isAbsolute(i);let r;t.root=this.rootname(i),s||this.hasProtocol(i)?r=1:r=0;let n=-1,a=0,o=-1,h=!0,l=i.length-1,c=0;for(;l>=r;--l){if(e=i.charCodeAt(l),e===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),e===46?n===-1?n=l:c!==1&&(c=1):n!==-1&&(c=-1)}return n===-1||o===-1||c===0||c===1&&n===o-1&&n===a+1?o!==-1&&(a===0&&s?t.base=t.name=i.slice(1,o):t.base=t.name=i.slice(a,o)):(a===0&&s?(t.name=i.slice(1,n),t.base=i.slice(1,o)):(t.name=i.slice(a,n),t.base=i.slice(a,o)),t.ext=i.slice(n,o)),t.dir=this.dirname(i),t},sep:"/",delimiter:":",joinExtensions:[".html"]};let hf;async function LI(){return hf??(hf=(async()=>{var n;const i=document.createElement("canvas").getContext("webgl");if(!i)return Ke.UNPACK;const t=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Line truncated
`);function eP(i){let t="";for(let e=0;e<i;++e)e>0&&(t+=`
else `),e<i-1&&(t+=`if(test == ${e}.0){}`);return t}function sP(i,t){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const e=t.createShader(t.FRAGMENT_SHADER);for(;;){const s=tP.replace(/%forloop%/gi,eP(i));if(t.shaderSource(e,s),t.compileShader(e),!t.getShaderParameter(e,t.COMPILE_STATUS))i=i/2|0;else break}return i}const mf=0,pf=1,gf=2,yf=3,xf=4,bf=5;class jr{constructor(){this.data=0,this.blendMode=It.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<mf)}set blend(t){!!(this.data&1<<mf)!==t&&(this.data^=1<<mf)}get offsets(){return!!(this.data&1<<pf)}set offsets(t){!!(this.data&1<<pf)!==t&&(this.data^=1<<pf)}get culling(){return!!(this.data&1<<gf)}set culling(t){!!(this.data&1<<gf)!==t&&(this.data^=1<<gf)}get depthTest(){return!!(this.data&1<<yf)}set depthTest(t){!!(this.data&1<<yf)!==t&&(this.data^=1<<yf)}get depthMask(){return!!(this.data&1<<bf)}set depthMask(t){!!(this.data&1<<bf)!==t&&(this.data^=1<<bf)}get clockwiseFrontFace(){return!!(this.data&1<<xf)}set clockwiseFrontFace(t){!!(this.data&1<<xf)!==t&&(this.data^=1<<xf)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==It.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}static for2d(){const t=new jr;return t.depthTest=!1,t.blend=!0,t}}jr.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const bm=[];function S_(i,t){if(!i)return null;let e="";if(typeof i=="string"){const s=/\.(\w{3,4})(?:$|\?|#)/i.exec(i);s&&(e=s[1].toLowerCase())}for(let s=bm.length-1;s>=0;--s){const r=bm[s];if(r.test&&r.test(i,e))return new r(i,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class gr{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,e,s,r,n,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u<d;u++)c[u][l](t,e,s,r,n,a,o,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const e=this.items.indexOf(t);return e!==-1&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(gr.prototype,{dispatch:{value:gr.prototype.emit},run:{value:gr.prototype.emit}});class el{constructor(t=0,e=0){this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new gr("setRealSize"),this.onUpdate=new gr("update"),this.onError=new gr("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,e){(t!==this._width||e!==this._height)&&(this._width=t,this._height=e,this.onResize.emit(t,e))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,e,s){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,e){return!1}}class Gc extends el{constructor(t,e){const{width:s,height:r}=e||{};if(!s||!r)throw new Error("BufferResource width or height invalid");super(s,r),this.data=t,this.unpackAlignment=e.unpackAlignment??4}upload(t,e,s){const r=t.gl;r.pixelStorei(r.UNPACK_ALIGNMENT,this.unpackAlignment),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===Ke.UNPACK);const n=e.realWidth,a=e.realHeight;return s.width===n&&s.height===a?r.texSubImage2D(e.target,0,0,0,n,a,e.format,s.type,this.data):(s.width=n,s.height=a,r.texImage2D(e.target,0,s.internalFormat,n,a,0,e.format,s.type,this.data)),!0}dispose(){this.data=null}static test(t){return t===null||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}const rP={scaleMode:Ns.NEAREST,alphaMode:Ke.NPM},vm=class da extends Al{constructor(t=null,e=null){super(),e=Object.assign({},da.defaultOptions,e);const{alphaMode:s,mipmap:r,anisotropicLevel:n,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution: Line truncated
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`,tC=`attribute vec2 aVertexPosition;
}`,fP=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -47,7 +65,7 @@ void main(void){
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}
`;function By(i,t,e){const s=i.createShader(t);return i.shaderSource(s,e),i.compileShader(s),s}function gf(i){const t=new Array(i);for(let e=0;e<t.length;e++)t[e]=!1;return t}function jv(i,t){switch(i){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return gf(2*t);case"bvec3":return gf(3*t);case"bvec4":return gf(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const Ra=[{test:i=>i.type==="float"&&i.size===1&&!i.isArray,code:i=>`
`;function px(i,t,e){const s=i.createShader(t);return i.shaderSource(s,e),i.compileShader(s),s}function vf(i){const t=new Array(i);for(let e=0;e<t.length;e++)t[e]=!1;return t}function C_(i,t){switch(i){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return vf(2*t);case"bvec3":return vf(3*t);case"bvec4":return vf(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const Ra=[{test:i=>i.type==="float"&&i.size===1&&!i.isArray,code:i=>`
if(uv["${i}"] !== ud["${i}"].value)
{
ud["${i}"].value = uv["${i}"]
@@ -167,7 +185,7 @@ void main(void){
cv[3] = v[3];
gl.uniform4f(ud["${i}"].location, v[0], v[1], v[2], v[3])
}`}],eC={float:`
}`}],mP={float:`
if (cv !== v)
{
cu.value = v;
@@ -303,7 +321,7 @@ void main(void){
cu.value = v;
gl.uniform1i(location, v);
}`},sC={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function rC(i,t){var s;const e=[`
}`},pP={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function gP(i,t){var s;const e=[`
var v = null;
var cv = null;
var cu = null;
@@ -313,18 +331,18 @@ void main(void){
renderer.shader.syncUniformBufferGroup(uv.${r}, '${r}');
`):e.push(`
renderer.shader.syncUniformGroup(uv.${r}, syncData);
`));continue}const a=i.uniforms[r];let o=!1;for(let h=0;h<Ra.length;h++)if(Ra[h].test(n,a)){e.push(Ra[h].code(r,a)),o=!0;break}if(!o){const h=(n.size===1&&!n.isArray?eC:sC)[n.type].replace("location",`ud["${r}"].location`);e.push(`
`));continue}const a=i.uniforms[r];let o=!1;for(let h=0;h<Ra.length;h++)if(Ra[h].test(n,a)){e.push(Ra[h].code(r,a)),o=!0;break}if(!o){const h=(n.size===1&&!n.isArray?mP:pP)[n.type].replace("location",`ud["${r}"].location`);e.push(`
cu = ud["${r}"];
cv = cu.value;
v = uv["${r}"];
${h};`)}}return new Function("ud","uv","renderer","syncData",e.join(`
`))}const qv={};let oa=qv;function iC(){if(oa===qv||oa!=null&&oa.isContextLost()){const i=_t.ADAPTER.createCanvas();let t;_t.PREFER_ENV>=Kn.WEBGL2&&(t=i.getContext("webgl2",{})),t||(t=i.getContext("webgl",{})||i.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),oa=t}return oa}let ql;function nC(){if(!ql){ql=qs.MEDIUM;const i=iC();if(i&&i.getShaderPrecisionFormat){const t=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);t&&(ql=t.precision?qs.HIGH:qs.MEDIUM)}}return ql}function Oy(i,t){const e=i.getShaderSource(t).split(`
`))}const I_={};let oa=I_;function yP(){if(oa===I_||oa!=null&&oa.isContextLost()){const i=_t.ADAPTER.createCanvas();let t;_t.PREFER_ENV>=Kn.WEBGL2&&(t=i.getContext("webgl2",{})),t||(t=i.getContext("webgl",{})||i.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),oa=t}return oa}let Jl;function xP(){if(!Jl){Jl=Ks.MEDIUM;const i=yP();if(i&&i.getShaderPrecisionFormat){const t=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);t&&(Jl=t.precision?Ks.HIGH:Ks.MEDIUM)}}return Jl}function gx(i,t){const e=i.getShaderSource(t).split(`
`).map((l,c)=>`${c}: ${l}`),s=i.getShaderInfoLog(t),r=s.split(`
`),n={},a=r.map(l=>parseFloat(l.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(l=>l&&!n[l]?(n[l]=!0,!0):!1),o=[""];a.forEach(l=>{e[l-1]=`%c${e[l-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const h=e.join(`
`);o[0]=h,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function aC(i,t,e,s){i.getProgramParameter(t,i.LINK_STATUS)||(i.getShaderParameter(e,i.COMPILE_STATUS)||Oy(i,e),i.getShaderParameter(s,i.COMPILE_STATUS)||Oy(i,s),console.error("PixiJS Error: Could not initialize shader."),i.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",i.getProgramInfoLog(t)))}const oC={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Kv(i){return oC[i]}let Kl=null;const Dy={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Zv(i,t){if(!Kl){const e=Object.keys(Dy);Kl={};for(let s=0;s<e.length;++s){const r=e[s];Kl[i[r]]=Dy[r]}}return Kl[t]}function Ny(i,t,e){if(i.substring(0,9)!=="precision"){let s=t;return t===qs.HIGH&&e!==qs.HIGH&&(s=qs.MEDIUM),`precision ${s} float;
${i}`}else if(e!==qs.HIGH&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}let mo;function lC(){if(typeof mo=="boolean")return mo;try{mo=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{mo=!1}return mo}let hC=0;const Zl={},pm=class da{constructor(t,e,s="pixi-shader",r={}){this.extra={},this.id=hC++,this.vertexSrc=t||da.defaultVertexSrc,this.fragmentSrc=e||da.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=r,this.vertexSrc.substring(0,8)!=="#version"&&(s=s.replace(/\s+/g,"-"),Zl[s]?(Zl[s]++,s+=`-${Zl[s]}`):Zl[s]=1,this.vertexSrc=`#define SHADER_NAME ${s}
`);o[0]=h,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function bP(i,t,e,s){i.getProgramParameter(t,i.LINK_STATUS)||(i.getShaderParameter(e,i.COMPILE_STATUS)||gx(i,e),i.getShaderParameter(s,i.COMPILE_STATUS)||gx(i,s),console.error("PixiJS Error: Could not initialize shader."),i.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",i.getProgramInfoLog(t)))}const vP={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function P_(i){return vP[i]}let Ql=null;const yx={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function M_(i,t){if(!Ql){const e=Object.keys(yx);Ql={};for(let s=0;s<e.length;++s){const r=e[s];Ql[i[r]]=yx[r]}}return Ql[t]}function xx(i,t,e){if(i.substring(0,9)!=="precision"){let s=t;return t===Ks.HIGH&&e!==Ks.HIGH&&(s=Ks.MEDIUM),`precision ${s} float;
${i}`}else if(e!==Ks.HIGH&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}let mo;function _P(){if(typeof mo=="boolean")return mo;try{mo=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{mo=!1}return mo}let wP=0;const th={},Sm=class fa{constructor(t,e,s="pixi-shader",r={}){this.extra={},this.id=wP++,this.vertexSrc=t||fa.defaultVertexSrc,this.fragmentSrc=e||fa.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=r,this.vertexSrc.substring(0,8)!=="#version"&&(s=s.replace(/\s+/g,"-"),th[s]?(th[s]++,s+=`-${th[s]}`):th[s]=1,this.vertexSrc=`#define SHADER_NAME ${s}
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${s}
${this.fragmentSrc}`,this.vertexSrc=Ny(this.vertexSrc,da.defaultVertexPrecision,qs.HIGH),this.fragmentSrc=Ny(this.fragmentSrc,da.defaultFragmentPrecision,nC())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return tC}static get defaultFragmentSrc(){return QA}static from(t,e,s){const r=t+e;let n=My[r];return n||(My[r]=n=new da(t,e,s)),n}};pm.defaultVertexPrecision=qs.HIGH,pm.defaultFragmentPrecision=di.apple.device?qs.HIGH:qs.MEDIUM;let ur=pm,cC=0;class yr{constructor(t,e,s){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=cC++,this.static=!!e,this.ubo=!!s,t instanceof ne?(this.buffer=t,this.buffer.type=$r.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new ne(new Float32Array(1)),this.buffer.type=$r.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,e,s){if(!this.ubo)this.uniforms[t]=new yr(e,s);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,e,s){return new yr(t,e,s)}static uboFrom(t,e){return new yr(t,e??!0,!0)}}class Js{constructor(t,e){this.uniformBindCount=0,this.program=t,e?e instanceof yr?this.uniformGroup=e:this.uniformGroup=new yr(e):this.uniformGroup=new yr({}),this.disposeRunner=new gr("disposeShader")}checkUniformExists(t,e){if(e.uniforms[t])return!0;for(const s in e.uniforms){const r=e.uniforms[s];if(r.group===!0&&this.checkUniformExists(t,r))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,e,s){const r=ur.from(t,e);return new Js(r,s)}}class Ip{constructor(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},!e.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!e.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(t){if(!this.programCache[t]){const s=new Int32Array(t);for(let n=0;n<t;n++)s[n]=n;this.defaultGroupCache[t]=yr.from({uSamplers:s},!0);let r=this.fragTemplate;r=r.replace(/%count%/gi,`${t}`),r=r.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new ur(this.vertexSrc,r)}const e={tint:new Float32Array([1,1,1,1]),translationMatrix:new fe,default:this.defaultGroupCache[t]};return new Js(this.programCache[t],e)}generateSampleSrc(t){let e="";e+=`
${this.fragmentSrc}`,this.vertexSrc=xx(this.vertexSrc,fa.defaultVertexPrecision,Ks.HIGH),this.fragmentSrc=xx(this.fragmentSrc,fa.defaultFragmentPrecision,xP())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return fP}static get defaultFragmentSrc(){return dP}static from(t,e,s){const r=t+e;let n=cx[r];return n||(cx[r]=n=new fa(t,e,s)),n}};Sm.defaultVertexPrecision=Ks.HIGH,Sm.defaultFragmentPrecision=pi.apple.device?Ks.HIGH:Ks.MEDIUM;let ur=Sm,TP=0;class yr{constructor(t,e,s){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=TP++,this.static=!!e,this.ubo=!!s,t instanceof ne?(this.buffer=t,this.buffer.type=$r.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new ne(new Float32Array(1)),this.buffer.type=$r.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,e,s){if(!this.ubo)this.uniforms[t]=new yr(e,s);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,e,s){return new yr(t,e,s)}static uboFrom(t,e){return new yr(t,e??!0,!0)}}class Js{constructor(t,e){this.uniformBindCount=0,this.program=t,e?e instanceof yr?this.uniformGroup=e:this.uniformGroup=new yr(e):this.uniformGroup=new yr({}),this.disposeRunner=new gr("disposeShader")}checkUniformExists(t,e){if(e.uniforms[t])return!0;for(const s in e.uniforms){const r=e.uniforms[s];if(r.group===!0&&this.checkUniformExists(t,r))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,e,s){const r=ur.from(t,e);return new Js(r,s)}}class Np{constructor(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},!e.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!e.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(t){if(!this.programCache[t]){const s=new Int32Array(t);for(let n=0;n<t;n++)s[n]=n;this.defaultGroupCache[t]=yr.from({uSamplers:s},!0);let r=this.fragTemplate;r=r.replace(/%count%/gi,`${t}`),r=r.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new ur(this.vertexSrc,r)}const e={tint:new Float32Array([1,1,1,1]),translationMatrix:new fe,default:this.defaultGroupCache[t]};return new Js(this.programCache[t],e)}generateSampleSrc(t){let e="";e+=`
`,e+=`
`;for(let s=0;s<t;s++)s>0&&(e+=`
else `),s<t-1&&(e+=`if(vTextureId < ${s}.5)`),e+=`
@@ -332,7 +350,7 @@ else `),s<t-1&&(e+=`if(vTextureId < ${s}.5)`),e+=`
color = texture2D(uSamplers[${s}], vTextureCoord);`,e+=`
}`;return e+=`
`,e+=`
`,e}}class gm{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function uC(){return!di.apple.device}function dC(i){let t=!0;const e=_t.ADAPTER.getNavigator();if(di.tablet||di.phone){if(di.apple.device){const s=e.userAgent.match(/OS (\d+)_(\d+)?/);s&&parseInt(s[1],10)<11&&(t=!1)}if(di.android.device){const s=e.userAgent.match(/Android\s([0-9.]*)/);s&&parseInt(s[1],10)<7&&(t=!1)}}return t?i:4}class Hc{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var fC=`varying vec2 vTextureCoord;
`,e}}class Em{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function SP(){return!pi.apple.device}function EP(i){let t=!0;const e=_t.ADAPTER.getNavigator();if(pi.tablet||pi.phone){if(pi.apple.device){const s=e.userAgent.match(/OS (\d+)_(\d+)?/);s&&parseInt(s[1],10)<11&&(t=!1)}if(pi.android.device){const s=e.userAgent.match(/Android\s([0-9.]*)/);s&&parseInt(s[1],10)<7&&(t=!1)}}return t?i:4}class zc{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var AP=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
@@ -342,7 +360,7 @@ void main(void){
%forloop%
gl_FragColor = color * vColor;
}
`,mC=`precision highp float;
`,CP=`precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
@@ -363,14 +381,14 @@ void main(void){
vTextureId = aTextureId;
vColor = aColor * tint;
}
`;const _o=class ar extends Hc{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=Wv,this.vertexSize=6,this.state=jr.for2d(),this.size=ar.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),t.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??dC(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??uC(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return Ht("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return mC}static get defaultFragmentTemplate(){return fC}setShaderGenerator({vertex:t=ar.defaultVertexSrc,fragment:e=ar.defaultFragmentTemplate}={}){this.shaderGenerator=new Ip(t,e)}contextChange(){const t=this.renderer.gl;_t.PREFER_ENV===Kn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),ar.defaultMaxTextures),this.maxTextures=GA(this.maxTextures,t)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:t,_textureArrayPool:e}=ar,s=this.size/4,r=Math.floor(s/this.maxTextures)+1;for(;t.length<s;)t.push(new dm);for(;e.length<r;)e.push(new gm);for(let n=0;n<this.maxTextures;n++)this._tempBoundTextures[n]=null}onPrerender(){this._flushId=0}render(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)}buildTexturesAndDrawCalls(){const{_bufferedTextures:t,maxTextures:e}=this,s=ar._textureArrayPool,r=this.renderer.batch,n=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++Lt._globalBatch,h=0,l=s[0],c=0;r.copyBoundTextures(n,e);for(let u=0;u<this._bufferSize;++u){const d=t[u];t[u]=null,d._batchEnabled!==o&&(l.count>=e&&(r.boundArray(l,n,o,e),this.buildDrawCalls(l,c,u),c=u,l=s[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(r.boundArray(l,n,o,e),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u<n.length;u++)n[u]=null;Lt._globalBatch=o}buildDrawCalls(t,e,s){const{_bufferedElements:r,_attributeBuffer:n,_indexBuffer:a,vertexSize:o}=this,h=ar._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,d=h[l];d.start=this._iIndex,d.texArray=t;for(let f=e;f<s;++f){const m=r[f],p=m._texture.baseTexture,g=Yv[p.alphaMode?1:0][m.blendMode];r[f]=null,e<f&&d.blend!==g&&(d.size=u-d.start,e=f,d=h[++l],d.texArray=t,d.start=u),this.packInterleavedGeometry(m,n,a,c,u),c+=m.vertexData.length/2*o,u+=m.indices.length,d.blend=g}e<s&&(d.size=u-d.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(t){const e=this.renderer.texture;for(let s=0;s<t.count;s++)e.bind(t.elements[s],t.ids[s]),t.elements[s]=null;t.count=0}updateGeometry(){const{_packedGeometries:t,_attributeBuffer:e,_indexBuffer:s}=this;ar.canUploadSameBuffer?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(s),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(s),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const t=this._dcIndex,{gl:e,state:s}=this.renderer,r=ar._drawCallPool;let n=null;for(let a=0;a<t;a++){const{texArray:o,type:h,size:l,start:c,blend:u}=r[a];n!==o&&(n=o,this.bindAndClearTexArray(o)),this.state.blendMode=u,s.set(this.state),e.drawElements(h,l,e.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),ar.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f Line truncated
`;const _o=class ar extends zc{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=E_,this.vertexSize=6,this.state=jr.for2d(),this.size=ar.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),t.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??EP(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??SP(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return Ht("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return CP}static get defaultFragmentTemplate(){return AP}setShaderGenerator({vertex:t=ar.defaultVertexSrc,fragment:e=ar.defaultFragmentTemplate}={}){this.shaderGenerator=new Np(t,e)}contextChange(){const t=this.renderer.gl;_t.PREFER_ENV===Kn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),ar.defaultMaxTextures),this.maxTextures=sP(this.maxTextures,t)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:t,_textureArrayPool:e}=ar,s=this.size/4,r=Math.floor(s/this.maxTextures)+1;for(;t.length<s;)t.push(new _m);for(;e.length<r;)e.push(new Em);for(let n=0;n<this.maxTextures;n++)this._tempBoundTextures[n]=null}onPrerender(){this._flushId=0}render(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)}buildTexturesAndDrawCalls(){const{_bufferedTextures:t,maxTextures:e}=this,s=ar._textureArrayPool,r=this.renderer.batch,n=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++Lt._globalBatch,h=0,l=s[0],c=0;r.copyBoundTextures(n,e);for(let u=0;u<this._bufferSize;++u){const d=t[u];t[u]=null,d._batchEnabled!==o&&(l.count>=e&&(r.boundArray(l,n,o,e),this.buildDrawCalls(l,c,u),c=u,l=s[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(r.boundArray(l,n,o,e),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u<n.length;u++)n[u]=null;Lt._globalBatch=o}buildDrawCalls(t,e,s){const{_bufferedElements:r,_attributeBuffer:n,_indexBuffer:a,vertexSize:o}=this,h=ar._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,d=h[l];d.start=this._iIndex,d.texArray=t;for(let f=e;f<s;++f){const m=r[f],p=m._texture.baseTexture,g=__[p.alphaMode?1:0][m.blendMode];r[f]=null,e<f&&d.blend!==g&&(d.size=u-d.start,e=f,d=h[++l],d.texArray=t,d.start=u),this.packInterleavedGeometry(m,n,a,c,u),c+=m.vertexData.length/2*o,u+=m.indices.length,d.blend=g}e<s&&(d.size=u-d.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(t){const e=this.renderer.texture;for(let s=0;s<t.count;s++)e.bind(t.elements[s],t.ids[s]),t.elements[s]=null;t.count=0}updateGeometry(){const{_packedGeometries:t,_attributeBuffer:e,_indexBuffer:s}=this;ar.canUploadSameBuffer?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(s),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(s),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const t=this._dcIndex,{gl:e,state:s}=this.renderer,r=ar._drawCallPool;let n=null;for(let a=0;a<t;a++){const{texArray:o,type:h,size:l,start:c,blend:u}=r[a];n!==o&&(n=o,this.bindAndClearTexArray(o)),this.state.blendMode=u,s.set(this.state),e.drawElements(h,l,e.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),ar.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f Line truncated
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`,gC=`attribute vec2 aVertexPosition;
`,PP=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -396,7 +414,7 @@ void main(void)
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;const ym=class wo extends Js{constructor(t,e,s){const r=ur.from(t||wo.defaultVertexSrc,e||wo.defaultFragmentSrc);super(r,s),this.padding=0,this.resolution=wo.defaultResolution,this.multisample=wo.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new jr}apply(t,e,s,r,n){t.applyFilter(this,e,s,r)}get blendMode(){return this.state.blendMode}set blendMode(t){this.state.blendMode=t}get resolution(){return this._resolution}set resolution(t){this._resolution=t}static get defaultVertexSrc(){return gC}static get defaultFragmentSrc(){return pC}};ym.defaultResolution=1,ym.defaultMultisample=De.NONE;let _s=ym;class $h{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Wt(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:e,background:s,backgroundAlpha:r}=t,n=s??e;n!==void 0&&(this.color=n),this.alpha=r}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}$h.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},$h.extension={type:[gt.RendererSystem,gt.CanvasRendererSystem],name:"background"};St.add($h);class Jv{constructor(t){this.renderer=t,this.emptyRenderer=new Hc(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,e){const{boundTextures:s}=this.renderer.texture;for(let r=e-1;r>=0;--r)t[r]=s[r]||null,t[r]&&(t[r]._batchLocation=r)}boundArray(t,e,s,r){const{elements:n,ids:a,count:o}=t;let h=0;for(let l=0;l<o;l++){const c=n[l],u=c._batchLocation;if(u>=0&&u<r&&e[u]===c){a[l]=u;continue}for(;h<r;){const d=e[h];if(d&&d._batchEnabled===s&&d._batchLocation===h){h++;continue}a[l]=h,c._batchLocation=h,e[h]=c;break}}}destroy(){this.renderer=null}}Jv.extension={type:gt.RendererSystem,name:"batch"};St.add(Jv);let Uy=0;class Hh{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=Uy++}init(t){if(t.context)this.initFromContext(t.context);else{const e=this.renderer.background.alpha<1,s=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:e,premultipliedAlpha:s,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=Uy++,this.renderer.runners.contextChange.emit(t);const e=this.renderer.view;e.addEventListener!==void 0&&(e.addEventListener("webglcontextlost",this.handleContextLost,!1),e.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const e=this.createContext(this.renderer.view,t);this.initFromContext(e)}createContext(t,e){let s;if(_t.PREFER_ENV>=Kn.WEBGL2&&(s=t.getContext("webgl2",e)),s)this.webGLVersion=2;else if(this.webGLVersion=1,s=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!s)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=s,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,e={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc"),bptc:t.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,e,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_ha Line truncated
`;const Am=class wo extends Js{constructor(t,e,s){const r=ur.from(t||wo.defaultVertexSrc,e||wo.defaultFragmentSrc);super(r,s),this.padding=0,this.resolution=wo.defaultResolution,this.multisample=wo.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new jr}apply(t,e,s,r,n){t.applyFilter(this,e,s,r)}get blendMode(){return this.state.blendMode}set blendMode(t){this.state.blendMode=t}get resolution(){return this._resolution}set resolution(t){this._resolution=t}static get defaultVertexSrc(){return PP}static get defaultFragmentSrc(){return IP}};Am.defaultResolution=1,Am.defaultMultisample=De.NONE;let _s=Am;class jh{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Wt(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:e,background:s,backgroundAlpha:r}=t,n=s??e;n!==void 0&&(this.color=n),this.alpha=r}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}jh.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},jh.extension={type:[gt.RendererSystem,gt.CanvasRendererSystem],name:"background"};St.add(jh);class R_{constructor(t){this.renderer=t,this.emptyRenderer=new zc(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,e){const{boundTextures:s}=this.renderer.texture;for(let r=e-1;r>=0;--r)t[r]=s[r]||null,t[r]&&(t[r]._batchLocation=r)}boundArray(t,e,s,r){const{elements:n,ids:a,count:o}=t;let h=0;for(let l=0;l<o;l++){const c=n[l],u=c._batchLocation;if(u>=0&&u<r&&e[u]===c){a[l]=u;continue}for(;h<r;){const d=e[h];if(d&&d._batchEnabled===s&&d._batchLocation===h){h++;continue}a[l]=h,c._batchLocation=h,e[h]=c;break}}}destroy(){this.renderer=null}}R_.extension={type:gt.RendererSystem,name:"batch"};St.add(R_);let bx=0;class qh{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=bx++}init(t){if(t.context)this.initFromContext(t.context);else{const e=this.renderer.background.alpha<1,s=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:e,premultipliedAlpha:s,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=bx++,this.renderer.runners.contextChange.emit(t);const e=this.renderer.view;e.addEventListener!==void 0&&(e.addEventListener("webglcontextlost",this.handleContextLost,!1),e.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const e=this.createContext(this.renderer.view,t);this.initFromContext(e)}createContext(t,e){let s;if(_t.PREFER_ENV>=Kn.WEBGL2&&(s=t.getContext("webgl2",e)),s)this.webGLVersion=2;else if(this.webGLVersion=1,s=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!s)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=s,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,e={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc"),bptc:t.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,e,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_ha Line truncated
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
@@ -421,7 +439,7 @@ void main(void)
gl_FragColor = original;
}
`,wC=`attribute vec2 aVertexPosition;
`,BP=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -437,7 +455,7 @@ void main(void)
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`;class TC extends _s{constructor(t,e,s){let r=null;typeof t!="string"&&e===void 0&&s===void 0&&(r=t,t=void 0,e=void 0,s=void 0),super(t||wC,e||_C,s),this.maskSprite=r,this.maskMatrix=new fe}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,e,s,r){const n=this._maskSprite,a=n._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new Wc(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,t.applyFilter(this,e,s,r))}}class SC{constructor(t=null){this.type=Ye.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=_s.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ye.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class a_{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,e){let s=e;if(!s.isMaskData){const n=this.maskDataPool.pop()||new SC;n.pooled=!0,n.maskObject=e,s=n}const r=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(s.copyCountersOrReset(r),s._colorMask=r?r._colorMask:15,s.autoDetect&&this.detect(s),s._target=t,s.type!==Ye.SPRITE&&this.maskStack.push(s),s.enabled)switch(s.type){case Ye.SCISSOR:this.renderer.scissor.push(s);break;case Ye.STENCIL:this.renderer.stencil.push(s);break;case Ye.SPRITE:s.copyCountersOrReset(null),this.pushSpriteMask(s);break;case Ye.COLOR:this.pushColorMask(s);break}s.type===Ye.SPRITE&&this.maskStack.push(s)}pop(t){const e=this.maskStack.pop();if(!(!e||e._target!==t)){if(e.enabled)switch(e.type){case Ye.SCISSOR:this.renderer.scissor.pop(e);break;case Ye.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case Ye.SPRITE:this.popSpriteMask(e);break;case Ye.COLOR:this.popColorMask(e);break}if(e.reset(),e.pooled&&this.maskDataPool.push(e),this.maskStack.length!==0){const s=this.maskStack[this.maskStack.length-1];s.type===Ye.SPRITE&&s._filters&&(s._filters[0].maskSprite=s.maskObject)}}}detect(t){const e=t.maskObject;e?e.isSprite?t.type=Ye.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=Ye.SCISSOR:t.type=Ye.STENCIL:t.type=Ye.COLOR}pushSpriteMask(t){const{maskObject:e}=t,s=t._target;let r=t._filters;r||(r=this.alphaMaskPool[this.alphaMaskIndex],r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new TC])),r[0].resolution=t.resolution,r[0].multisample=t.multisample,r[0].maskSprite=e;const n=s.filterArea;s.filterArea=e.getBounds(!0),this.renderer.filter.push(s,r),s.filterArea=n,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const e=t._colorMask,s=t._colorMask=e&t.colorMask;s!==e&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}popColorMask(t){const e=t._colorMask,s=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;s!==e&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}destroy(){this.renderer=null}}a_.extension={type:gt.RendererSystem,name:"mask"};St.add(a_);class o_{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:e}=this.renderer,s=this.getStackLength();this.maskStack=t;const r=this.getStackLength();r!==s&&(r===0?e.disable(this.glConst):(e.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Yy=new fe,Gy=[],l_=class _h extends o_{constructor(t){super(t),this.glConst=_t.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0}calcScissorRect(t){if(t._scissorRectLocal)return;const e=t._scissorRect,{maskObject:s}=t,{renderer:r}=this,n=r.renderTexture,a=s.getBounds(!0,Gy.pop()??new Ut);this.roundFrameToPixels(a,n.current?n.current.resolution:r.resolution,n.sourceFrame,n.destinationFrame,r.projection.transform),e&&a.fit(e),t._scissorRectLocal=a}static Line truncated
`;class OP extends _s{constructor(t,e,s){let r=null;typeof t!="string"&&e===void 0&&s===void 0&&(r=t,t=void 0,e=void 0,s=void 0),super(t||BP,e||LP,s),this.maskSprite=r,this.maskMatrix=new fe}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,e,s,r){const n=this._maskSprite,a=n._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new jc(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,t.applyFilter(this,e,s,r))}}class DP{constructor(t=null){this.type=Ye.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=_s.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ye.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class U_{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,e){let s=e;if(!s.isMaskData){const n=this.maskDataPool.pop()||new DP;n.pooled=!0,n.maskObject=e,s=n}const r=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(s.copyCountersOrReset(r),s._colorMask=r?r._colorMask:15,s.autoDetect&&this.detect(s),s._target=t,s.type!==Ye.SPRITE&&this.maskStack.push(s),s.enabled)switch(s.type){case Ye.SCISSOR:this.renderer.scissor.push(s);break;case Ye.STENCIL:this.renderer.stencil.push(s);break;case Ye.SPRITE:s.copyCountersOrReset(null),this.pushSpriteMask(s);break;case Ye.COLOR:this.pushColorMask(s);break}s.type===Ye.SPRITE&&this.maskStack.push(s)}pop(t){const e=this.maskStack.pop();if(!(!e||e._target!==t)){if(e.enabled)switch(e.type){case Ye.SCISSOR:this.renderer.scissor.pop(e);break;case Ye.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case Ye.SPRITE:this.popSpriteMask(e);break;case Ye.COLOR:this.popColorMask(e);break}if(e.reset(),e.pooled&&this.maskDataPool.push(e),this.maskStack.length!==0){const s=this.maskStack[this.maskStack.length-1];s.type===Ye.SPRITE&&s._filters&&(s._filters[0].maskSprite=s.maskObject)}}}detect(t){const e=t.maskObject;e?e.isSprite?t.type=Ye.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=Ye.SCISSOR:t.type=Ye.STENCIL:t.type=Ye.COLOR}pushSpriteMask(t){const{maskObject:e}=t,s=t._target;let r=t._filters;r||(r=this.alphaMaskPool[this.alphaMaskIndex],r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new OP])),r[0].resolution=t.resolution,r[0].multisample=t.multisample,r[0].maskSprite=e;const n=s.filterArea;s.filterArea=e.getBounds(!0),this.renderer.filter.push(s,r),s.filterArea=n,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const e=t._colorMask,s=t._colorMask=e&t.colorMask;s!==e&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}popColorMask(t){const e=t._colorMask,s=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;s!==e&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}destroy(){this.renderer=null}}U_.extension={type:gt.RendererSystem,name:"mask"};St.add(U_);class X_{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:e}=this.renderer,s=this.getStackLength();this.maskStack=t;const r=this.getStackLength();r!==s&&(r===0?e.disable(this.glConst):(e.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const wx=new fe,Tx=[],V_=class wh extends X_{constructor(t){super(t),this.glConst=_t.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0}calcScissorRect(t){if(t._scissorRectLocal)return;const e=t._scissorRect,{maskObject:s}=t,{renderer:r}=this,n=r.renderTexture,a=s.getBounds(!0,Tx.pop()??new Ut);this.roundFrameToPixels(a,n.current?n.current.resolution:r.resolution,n.sourceFrame,n.destinationFrame,r.projection.transform),e&&a.fit(e),t._scissorRectLocal=a}static Line truncated
data[offset] = v;
`,vec2:`
data[offset] = v[0];
@@ -475,7 +493,7 @@ void main(void)
{
data[offset + i] = v[i];
}
`},m_={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function kC(i){const t=i.map(n=>({data:n,offset:0,dataLen:0,dirty:0}));let e=0,s=0,r=0;for(let n=0;n<t.length;n++){const a=t[n];if(e=m_[a.data.type],a.data.size>1&&(e=Math.max(e,16)*a.data.size),a.dataLen=e,s%e!==0&&s<16){const o=s%e%16;s+=o,r+=o}s+e>16?(r=Math.ceil(r/16)*16,a.offset=r,r+=e,s=e):(a.offset=r,s+=e,r+=e)}return r=Math.ceil(r/16)*16,{uboElements:t,size:r}}function LC(i,t){const e=[];for(const s in i)t[s]&&e.push(t[s]);return e.sort((s,r)=>s.index-r.index),e}function BC(i,t){if(!i.autoManage)return{size:0,syncFunc:RC};const e=LC(i.uniforms,t),{uboElements:s,size:r}=kC(e),n=[`
`},z_={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function WP(i){const t=i.map(n=>({data:n,offset:0,dataLen:0,dirty:0}));let e=0,s=0,r=0;for(let n=0;n<t.length;n++){const a=t[n];if(e=z_[a.data.type],a.data.size>1&&(e=Math.max(e,16)*a.data.size),a.dataLen=e,s%e!==0&&s<16){const o=s%e%16;s+=o,r+=o}s+e>16?(r=Math.ceil(r/16)*16,a.offset=r,r+=e,s=e):(a.offset=r,s+=e,r+=e)}return r=Math.ceil(r/16)*16,{uboElements:t,size:r}}function zP(i,t){const e=[];for(const s in i)t[s]&&e.push(t[s]);return e.sort((s,r)=>s.index-r.index),e}function jP(i,t){if(!i.autoManage)return{size:0,syncFunc:$P};const e=zP(i.uniforms,t),{uboElements:s,size:r}=WP(e),n=[`
var v = null;
var v2 = null;
var cv = null;
@@ -483,7 +501,7 @@ void main(void)
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`];for(let a=0;a<s.length;a++){const o=s[a],h=i.uniforms[o.data.name],l=o.data.name;let c=!1;for(let u=0;u<Ra.length;u++){const d=Ra[u];if(d.codeUbo&&d.test(o.data,h)){n.push(`offset = ${o.offset/4};`,Ra[u].codeUbo(o.data.name,h)),c=!0;break}}if(!c)if(o.data.size>1){const u=Kv(o.data.type),d=Math.max(m_[o.data.type]/16,1),f=u/d,m=(4-f%4)%4;n.push(`
`];for(let a=0;a<s.length;a++){const o=s[a],h=i.uniforms[o.data.name],l=o.data.name;let c=!1;for(let u=0;u<Ra.length;u++){const d=Ra[u];if(d.codeUbo&&d.test(o.data,h)){n.push(`offset = ${o.offset/4};`,Ra[u].codeUbo(o.data.name,h)),c=!0;break}}if(!c)if(o.data.size>1){const u=P_(o.data.type),d=Math.max(z_[o.data.type]/16,1),f=u/d,m=(4-f%4)%4;n.push(`
cv = ud.${l}.value;
v = uv.${l};
offset = ${o.offset/4};
@@ -499,7 +517,7 @@ void main(void)
offset += ${m};
}
`)}else{const u=FC[o.data.type];n.push(`
`)}else{const u=HP[o.data.type];n.push(`
cv = ud.${l}.value;
v = uv.${l};
offset = ${o.offset/4};
@@ -507,7 +525,7 @@ void main(void)
`)}}return n.push(`
renderer.buffer.update(buffer);
`),{size:r,syncFunc:new Function("ud","uv","renderer","syncData","buffer",n.join(`
`))}}let OC=0;const th={textureCount:0,uboCount:0};class p_{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=OC++}systemCheck(){if(!lC())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,e){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const s=t.program,r=s.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==s&&(this.program=s,this.gl.useProgram(r.program)),e||(th.textureCount=0,th.uboCount=0,this.syncUniformGroup(t.uniformGroup,th)),r}setUniforms(t){const e=this.shader.program,s=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(s.uniformData,t,this.renderer)}syncUniformGroup(t,e){const s=this.getGlProgram();(!t.static||t.dirtyId!==s.uniformDirtyGroups[t.id])&&(s.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,s,e))}syncUniforms(t,e,s){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer,s)}createSyncGroups(t){const e=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[e]||(this.cache[e]=rC(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,e){const s=this.getGlProgram();if(!t.static||t.dirtyId!==0||!s.uniformGroups[t.id]){t.dirtyId=0;const r=s.uniformGroups[t.id]||this.createSyncBufferGroup(t,s,e);t.buffer.update(),r(s.uniformData,t.uniforms,this.renderer,th,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,s.uniformBufferBindings[e])}createSyncBufferGroup(t,e,s){const{gl:r}=this.renderer;this.renderer.buffer.bind(t.buffer);const n=this.gl.getUniformBlockIndex(e.program,s);e.uniformBufferBindings[s]=this.shader.uniformBindCount,r.uniformBlockBinding(e.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(t,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=BC(t,this.shader.program.uniformData)),t.autoManage){const h=new Float32Array(o.size/4);t.buffer.update(h)}return e.uniformGroups[t.id]=o.syncFunc,e.uniformGroups[t.id]}getSignature(t,e,s){const r=t.uniforms,n=[`${s}-`];for(const a in r)n.push(a),e[a]&&n.push(e[a].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const e=this.gl,s=t.program,r=MC(e,s);return s.glPrograms[this.renderer.CONTEXT_UID]=r,r}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}p_.extension={type:gt.RendererSystem,name:"shader"};St.add(p_);class Wh{constructor(t){this.renderer=t}run(t){const{renderer:e}=this;e.runners.init.emit(e.options),t.hello&&console.log(`PixiJS 7.4.3 - ${e.rendererLogId} - https://pixijs.com`),e.resize(e.screen.width,e.screen.height)}destroy(){}}Wh.defaultOptions={hello:!1},Wh.extension={type:[gt.RendererSystem,gt.CanvasRendererSystem],name:"startup"};St.add(Wh);function DC(i,t=[]){return t[It.NORMAL]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.ADD]=[i.ONE,i.ONE],t[It.MULTIPLY]=[i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SCREEN]=[i.ONE,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.OVERLAY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.DARKEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.LIGHTEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.COLOR_DODGE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.COLOR_BURN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.HARD_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SOFT_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.DIFFERENCE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.EXCLUSION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.HUE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SATURATION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.COLOR]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.LUMINOSITY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.NONE]=[0,0],t[It.NORMAL_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.ADD_NPM]=[i.SRC_ALPHA,i.ONE,i.ONE,i.ONE],t[It.SCREEN_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SRC_IN]=[i.DST_ALPHA,i.ZERO],t[It.SRC_OUT]=[i.ONE_MINUS_DST_ALPHA,i.ZERO],t[It.SRC_ATOP]=[i.DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],t[It.DST_OVER]=[i.ONE_MINUS_DST_ALPHA,i.ONE],t[It.DST_IN]=[i.ZERO,i.SRC_ALPHA],t[It.DST_OUT]=[i.ZERO,i.ONE_MINUS_SRC_ALPHA],t[It.DST_ATOP]=[i.ONE_MINUS_DST_ALPHA,i.SRC_ALPHA],t[It.XOR]=[i.ONE_MINUS_DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],t[It.SUBTRACT]=[i.ONE,i.ONE,i.ONE,i.ONE,i.FUNC_REVERSE_SUBTRACT,i.FUNC_ADD],t}const NC=0,UC=1,XC=2,VC=3,YC=4,GC=5,g_=class bm{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=It.NONE,this._blendEq=!1,this.map=[],this.map[NC]=this.setBlend,this.map[UC]=this.setOffset,this.map[XC]=this.setCullFace,this.map[VC]=this.setDepthTest,this.ma Line truncated
`))}}let qP=0;const rh={textureCount:0,uboCount:0};class j_{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=qP++}systemCheck(){if(!_P())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,e){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const s=t.program,r=s.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==s&&(this.program=s,this.gl.useProgram(r.program)),e||(rh.textureCount=0,rh.uboCount=0,this.syncUniformGroup(t.uniformGroup,rh)),r}setUniforms(t){const e=this.shader.program,s=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(s.uniformData,t,this.renderer)}syncUniformGroup(t,e){const s=this.getGlProgram();(!t.static||t.dirtyId!==s.uniformDirtyGroups[t.id])&&(s.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,s,e))}syncUniforms(t,e,s){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer,s)}createSyncGroups(t){const e=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[e]||(this.cache[e]=gP(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,e){const s=this.getGlProgram();if(!t.static||t.dirtyId!==0||!s.uniformGroups[t.id]){t.dirtyId=0;const r=s.uniformGroups[t.id]||this.createSyncBufferGroup(t,s,e);t.buffer.update(),r(s.uniformData,t.uniforms,this.renderer,rh,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,s.uniformBufferBindings[e])}createSyncBufferGroup(t,e,s){const{gl:r}=this.renderer;this.renderer.buffer.bind(t.buffer);const n=this.gl.getUniformBlockIndex(e.program,s);e.uniformBufferBindings[s]=this.shader.uniformBindCount,r.uniformBlockBinding(e.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(t,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=jP(t,this.shader.program.uniformData)),t.autoManage){const h=new Float32Array(o.size/4);t.buffer.update(h)}return e.uniformGroups[t.id]=o.syncFunc,e.uniformGroups[t.id]}getSignature(t,e,s){const r=t.uniforms,n=[`${s}-`];for(const a in r)n.push(a),e[a]&&n.push(e[a].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const e=this.gl,s=t.program,r=GP(e,s);return s.glPrograms[this.renderer.CONTEXT_UID]=r,r}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}j_.extension={type:gt.RendererSystem,name:"shader"};St.add(j_);class Kh{constructor(t){this.renderer=t}run(t){const{renderer:e}=this;e.runners.init.emit(e.options),t.hello&&console.log(`PixiJS 7.4.3 - ${e.rendererLogId} - https://pixijs.com`),e.resize(e.screen.width,e.screen.height)}destroy(){}}Kh.defaultOptions={hello:!1},Kh.extension={type:[gt.RendererSystem,gt.CanvasRendererSystem],name:"startup"};St.add(Kh);function KP(i,t=[]){return t[It.NORMAL]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.ADD]=[i.ONE,i.ONE],t[It.MULTIPLY]=[i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SCREEN]=[i.ONE,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.OVERLAY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.DARKEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.LIGHTEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.COLOR_DODGE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.COLOR_BURN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.HARD_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SOFT_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.DIFFERENCE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.EXCLUSION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.HUE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SATURATION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.COLOR]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.LUMINOSITY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.NONE]=[0,0],t[It.NORMAL_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.ADD_NPM]=[i.SRC_ALPHA,i.ONE,i.ONE,i.ONE],t[It.SCREEN_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],t[It.SRC_IN]=[i.DST_ALPHA,i.ZERO],t[It.SRC_OUT]=[i.ONE_MINUS_DST_ALPHA,i.ZERO],t[It.SRC_ATOP]=[i.DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],t[It.DST_OVER]=[i.ONE_MINUS_DST_ALPHA,i.ONE],t[It.DST_IN]=[i.ZERO,i.SRC_ALPHA],t[It.DST_OUT]=[i.ZERO,i.ONE_MINUS_SRC_ALPHA],t[It.DST_ATOP]=[i.ONE_MINUS_DST_ALPHA,i.SRC_ALPHA],t[It.XOR]=[i.ONE_MINUS_DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],t[It.SUBTRACT]=[i.ONE,i.ONE,i.ONE,i.ONE,i.FUNC_REVERSE_SUBTRACT,i.FUNC_ADD],t}const ZP=0,JP=1,QP=2,tM=3,eM=4,sM=5,q_=class Im{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=It.NONE,this._blendEq=!1,this.map=[],this.map[ZP]=this.setBlend,this.map[JP]=this.setOffset,this.map[QP]=this.setCullFace,this.map[tM]=this.setDepthTest,this.ma Line truncated
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -518,7 +536,7 @@ void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`,KC=`attribute vec2 aVertexPosition;
}`,hM=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -544,7 +562,7 @@ void main(void)
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;const ZC=qC,w_=KC;class T_{constructor(t){this.renderer=t}contextChange(t){let e;if(this.renderer.context.webGLVersion===1){const s=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),e=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,s)}else{const s=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),e=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,s)}e>=De.HIGH?this.multisample=De.HIGH:e>=De.MEDIUM?this.multisample=De.MEDIUM:e>=De.LOW?this.multisample=De.LOW:this.multisample=De.NONE}destroy(){}}T_.extension={type:gt.RendererSystem,name:"_multisample"};St.add(T_);class JC{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class S_{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:e,CONTEXT_UID:s}=this,r=t._glBuffers[s]||this.createGLBuffer(t);e.bindBuffer(t.type,r.buffer)}unbind(t){const{gl:e}=this;e.bindBuffer(t,null)}bindBufferBase(t,e){const{gl:s,CONTEXT_UID:r}=this;if(this.boundBufferBases[e]!==t){const n=t._glBuffers[r]||this.createGLBuffer(t);this.boundBufferBases[e]=t,s.bindBufferBase(s.UNIFORM_BUFFER,e,n.buffer)}}bindBufferRange(t,e,s){const{gl:r,CONTEXT_UID:n}=this;s=s||0;const a=t._glBuffers[n]||this.createGLBuffer(t);r.bindBufferRange(r.UNIFORM_BUFFER,e||0,a.buffer,s*256,256)}update(t){const{gl:e,CONTEXT_UID:s}=this,r=t._glBuffers[s]||this.createGLBuffer(t);if(t._updateID!==r.updateID)if(r.updateID=t._updateID,e.bindBuffer(t.type,r.buffer),r.byteLength>=t.data.byteLength)e.bufferSubData(t.type,0,t.data);else{const n=t.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;r.byteLength=t.data.byteLength,e.bufferData(t.type,t.data,n)}}dispose(t,e){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const s=t._glBuffers[this.CONTEXT_UID],r=this.gl;t.disposeRunner.remove(this),s&&(e||r.deleteBuffer(s.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const e=Object.keys(this.managedBuffers);for(let s=0;s<e.length;s++)this.dispose(this.managedBuffers[e[s]],t)}createGLBuffer(t){const{CONTEXT_UID:e,gl:s}=this;return t._glBuffers[e]=new JC(s.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[e]}}S_.extension={type:gt.RendererSystem,name:"buffer"};St.add(S_);class E_{constructor(t){this.renderer=t}render(t,e){const s=this.renderer;let r,n,a,o;if(e&&(r=e.renderTexture,n=e.clear,a=e.transform,o=e.skipUpdateTransform),this.renderingToScreen=!r,s.runners.prerender.emit(),s.emit("prerender"),s.projection.transform=a,!s.context.isLost){if(r||(this.lastObjectRendered=t),!o){const h=t.enableTempParent();t.updateTransform(),t.disableTempParent(h)}s.renderTexture.bind(r),s.batch.currentRenderer.start(),(n??s.background.clearBeforeRender)&&s.renderTexture.clear(),t.render(s),s.batch.currentRenderer.flush(),r&&(e.blit&&s.framebuffer.blit(),r.baseTexture.update()),s.runners.postrender.emit(),s.projection.transform=null,s.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}E_.extension={type:gt.RendererSystem,name:"objectRenderer"};St.add(E_);const Th=class vm extends HC{constructor(t){super(),this.type=Av.WEBGL,t=Object.assign({},_t.RENDER_OPTIONS,t),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new yr({projectionMatrix:new fe},!0);const e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:vm.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in t&&(Ht("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),t.premultipliedAlpha=t.useContextAlpha&&t.useContextAlpha!=="notMultiplied",t.backgroundAlpha=t.useContextAlpha===!1?1:t.backgroundAlpha),this._plugin.rendererPlugins=vm.__plugins,this.options=t,this.startup.run(this.options)}static test(t){return t!=null&&t.forceCanvas?!1:wA()}render(t,e){this.objectRenderer.render(t,e)}resize(t,e){this._view.resizeView(t,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(t=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:t}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(t){this._view.resolution=t,this.runners.resolutionChange.emit(t)}get autoDensity(){return this._view.autoDensity}get view(){return Line truncated
`;const cM=lM,e1=hM;class s1{constructor(t){this.renderer=t}contextChange(t){let e;if(this.renderer.context.webGLVersion===1){const s=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),e=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,s)}else{const s=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),e=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,s)}e>=De.HIGH?this.multisample=De.HIGH:e>=De.MEDIUM?this.multisample=De.MEDIUM:e>=De.LOW?this.multisample=De.LOW:this.multisample=De.NONE}destroy(){}}s1.extension={type:gt.RendererSystem,name:"_multisample"};St.add(s1);class uM{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class r1{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:e,CONTEXT_UID:s}=this,r=t._glBuffers[s]||this.createGLBuffer(t);e.bindBuffer(t.type,r.buffer)}unbind(t){const{gl:e}=this;e.bindBuffer(t,null)}bindBufferBase(t,e){const{gl:s,CONTEXT_UID:r}=this;if(this.boundBufferBases[e]!==t){const n=t._glBuffers[r]||this.createGLBuffer(t);this.boundBufferBases[e]=t,s.bindBufferBase(s.UNIFORM_BUFFER,e,n.buffer)}}bindBufferRange(t,e,s){const{gl:r,CONTEXT_UID:n}=this;s=s||0;const a=t._glBuffers[n]||this.createGLBuffer(t);r.bindBufferRange(r.UNIFORM_BUFFER,e||0,a.buffer,s*256,256)}update(t){const{gl:e,CONTEXT_UID:s}=this,r=t._glBuffers[s]||this.createGLBuffer(t);if(t._updateID!==r.updateID)if(r.updateID=t._updateID,e.bindBuffer(t.type,r.buffer),r.byteLength>=t.data.byteLength)e.bufferSubData(t.type,0,t.data);else{const n=t.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;r.byteLength=t.data.byteLength,e.bufferData(t.type,t.data,n)}}dispose(t,e){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const s=t._glBuffers[this.CONTEXT_UID],r=this.gl;t.disposeRunner.remove(this),s&&(e||r.deleteBuffer(s.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const e=Object.keys(this.managedBuffers);for(let s=0;s<e.length;s++)this.dispose(this.managedBuffers[e[s]],t)}createGLBuffer(t){const{CONTEXT_UID:e,gl:s}=this;return t._glBuffers[e]=new uM(s.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[e]}}r1.extension={type:gt.RendererSystem,name:"buffer"};St.add(r1);class i1{constructor(t){this.renderer=t}render(t,e){const s=this.renderer;let r,n,a,o;if(e&&(r=e.renderTexture,n=e.clear,a=e.transform,o=e.skipUpdateTransform),this.renderingToScreen=!r,s.runners.prerender.emit(),s.emit("prerender"),s.projection.transform=a,!s.context.isLost){if(r||(this.lastObjectRendered=t),!o){const h=t.enableTempParent();t.updateTransform(),t.disableTempParent(h)}s.renderTexture.bind(r),s.batch.currentRenderer.start(),(n??s.background.clearBeforeRender)&&s.renderTexture.clear(),t.render(s),s.batch.currentRenderer.flush(),r&&(e.blit&&s.framebuffer.blit(),r.baseTexture.update()),s.runners.postrender.emit(),s.projection.transform=null,s.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}i1.extension={type:gt.RendererSystem,name:"objectRenderer"};St.add(i1);const Sh=class Pm extends iM{constructor(t){super(),this.type=n_.WEBGL,t=Object.assign({},_t.RENDER_OPTIONS,t),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new yr({projectionMatrix:new fe},!0);const e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Pm.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in t&&(Ht("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),t.premultipliedAlpha=t.useContextAlpha&&t.useContextAlpha!=="notMultiplied",t.backgroundAlpha=t.useContextAlpha===!1?1:t.backgroundAlpha),this._plugin.rendererPlugins=Pm.__plugins,this.options=t,this.startup.run(this.options)}static test(t){return t!=null&&t.forceCanvas?!1:BI()}render(t,e){this.objectRenderer.render(t,e)}resize(t,e){this._view.resizeView(t,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(t=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:t}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(t){this._view.resolution=t,this.runners.resolutionChange.emit(t)}get autoDensity(){return this._view.autoDensity}get view(){return Line truncated
uniform sampler2D uSampler;
uniform float uAlpha;
@@ -553,9 +571,9 @@ void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
}
`;class hI extends _s{constructor(t=1){super(ZC,lI,{uAlpha:1}),this.alpha=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}const cI={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},uI=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);function dI(i){const t=cI[i],e=t.length;let s=uI,r="";const n="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let a;for(let o=0;o<i;o++){let h=n.replace("%index%",o.toString());a=o,o>=e&&(a=i-o-1),h=h.replace("%value%",t[a].toString()),r+=h,r+=`
`}return s=s.replace("%blur%",r),s=s.replace("%size%",i.toString()),s}const fI=`
`;class wM extends _s{constructor(t=1){super(cM,_M,{uAlpha:1}),this.alpha=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}const TM={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},SM=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);function EM(i){const t=TM[i],e=t.length;let s=SM,r="";const n="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let a;for(let o=0;o<i;o++){let h=n.replace("%index%",o.toString());a=o,o>=e&&(a=i-o-1),h=h.replace("%value%",t[a].toString()),r+=h,r+=`
`}return s=s.replace("%blur%",r),s=s.replace("%size%",i.toString()),s}const AM=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -585,8 +603,8 @@ void main(void)
vec2 textureCoord = filterTextureCoord();
%blur%
}`;function mI(i,t){const e=Math.ceil(i/2);let s=fI,r="",n;t?n="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":n="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a<i;a++){let o=n.replace("%index%",a.toString());o=o.replace("%sampleIndex%",`${a-(e-1)}.0`),r+=o,r+=`
`}return s=s.replace("%blur%",r),s=s.replace("%size%",i.toString()),s}class Am extends _s{constructor(t,e=8,s=4,r=_s.defaultResolution,n=5){const a=mI(n,t),o=dI(n);super(a,o),this.horizontal=t,this.resolution=r,this._quality=0,this.quality=s,this.blur=e}apply(t,e,s,r){if(s?this.horizontal?this.uniforms.strength=1/s.width*(s.width/e.width):this.uniforms.strength=1/s.height*(s.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)t.applyFilter(this,e,s,r);else{const n=t.getFilterTexture(),a=t.renderer;let o=e,h=n;this.state.blend=!1,t.applyFilter(this,o,h,Nr.CLEAR);for(let l=1;l<this.passes-1;l++){t.bindAndClear(o,Nr.BLIT),this.uniforms.uSampler=h;const c=h;h=o,o=c,a.shader.bind(this),a.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,h,s,r),t.returnFilterTexture(n)}}get blur(){return this.strength}set blur(t){this.padding=1+Math.abs(t)*2,this.strength=t}get quality(){return this._quality}set quality(t){this._quality=t,this.passes=t}}class pI extends _s{constructor(t=8,e=4,s=_s.defaultResolution,r=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new Am(!0,t,e,s,r),this.blurYFilter=new Am(!1,t,e,s,r),this.resolution=s,this.quality=e,this.blur=t,this.repeatEdgePixels=!1}apply(t,e,s,r){const n=Math.abs(this.blurXFilter.strength),a=Math.abs(this.blurYFilter.strength);if(n&&a){const o=t.getFilterTexture();this.blurXFilter.apply(t,e,o,Nr.CLEAR),this.blurYFilter.apply(t,o,s,r),t.returnFilterTexture(o)}else a?this.blurYFilter.apply(t,e,s,r):this.blurXFilter.apply(t,e,s,r)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(t){this.blurXFilter.quality=this.blurYFilter.quality=t}get blurX(){return this.blurXFilter.blur}set blurX(t){this.blurXFilter.blur=t,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(t){this.blurYFilter.blur=t,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(t){this.blurYFilter.blendMode=t}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(t){this._repeatEdgePixels=t,this.updatePadding()}}var gI=`varying vec2 vTextureCoord;
}`;function CM(i,t){const e=Math.ceil(i/2);let s=AM,r="",n;t?n="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":n="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a<i;a++){let o=n.replace("%index%",a.toString());o=o.replace("%sampleIndex%",`${a-(e-1)}.0`),r+=o,r+=`
`}return s=s.replace("%blur%",r),s=s.replace("%size%",i.toString()),s}class Bm extends _s{constructor(t,e=8,s=4,r=_s.defaultResolution,n=5){const a=CM(n,t),o=EM(n);super(a,o),this.horizontal=t,this.resolution=r,this._quality=0,this.quality=s,this.blur=e}apply(t,e,s,r){if(s?this.horizontal?this.uniforms.strength=1/s.width*(s.width/e.width):this.uniforms.strength=1/s.height*(s.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)t.applyFilter(this,e,s,r);else{const n=t.getFilterTexture(),a=t.renderer;let o=e,h=n;this.state.blend=!1,t.applyFilter(this,o,h,Nr.CLEAR);for(let l=1;l<this.passes-1;l++){t.bindAndClear(o,Nr.BLIT),this.uniforms.uSampler=h;const c=h;h=o,o=c,a.shader.bind(this),a.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,h,s,r),t.returnFilterTexture(n)}}get blur(){return this.strength}set blur(t){this.padding=1+Math.abs(t)*2,this.strength=t}get quality(){return this._quality}set quality(t){this._quality=t,this.passes=t}}class IM extends _s{constructor(t=8,e=4,s=_s.defaultResolution,r=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new Bm(!0,t,e,s,r),this.blurYFilter=new Bm(!1,t,e,s,r),this.resolution=s,this.quality=e,this.blur=t,this.repeatEdgePixels=!1}apply(t,e,s,r){const n=Math.abs(this.blurXFilter.strength),a=Math.abs(this.blurYFilter.strength);if(n&&a){const o=t.getFilterTexture();this.blurXFilter.apply(t,e,o,Nr.CLEAR),this.blurYFilter.apply(t,o,s,r),t.returnFilterTexture(o)}else a?this.blurYFilter.apply(t,e,s,r):this.blurXFilter.apply(t,e,s,r)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(t){this.blurXFilter.quality=this.blurYFilter.quality=t}get blurX(){return this.blurXFilter.blur}set blurX(t){this.blurXFilter.blur=t,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(t){this.blurYFilter.blur=t,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(t){this.blurYFilter.blendMode=t}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(t){this._repeatEdgePixels=t,this.updatePadding()}}var PM=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float m[20];
uniform float uAlpha;
@@ -638,7 +656,7 @@ void main(void)
gl_FragColor = vec4(rgb, result.a);
}
`;class Cm extends _s{constructor(){const t={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(w_,gI,t),this.alpha=1}_loadMatrix(t,e=!1){let s=t;e&&(this._multiply(s,this.uniforms.m,t),s=this._colorMatrix(s)),this.uniforms.m=s}_multiply(t,e,s){return t[0]=e[0]*s[0]+e[1]*s[5]+e[2]*s[10]+e[3]*s[15],t[1]=e[0]*s[1]+e[1]*s[6]+e[2]*s[11]+e[3]*s[16],t[2]=e[0]*s[2]+e[1]*s[7]+e[2]*s[12]+e[3]*s[17],t[3]=e[0]*s[3]+e[1]*s[8]+e[2]*s[13]+e[3]*s[18],t[4]=e[0]*s[4]+e[1]*s[9]+e[2]*s[14]+e[3]*s[19]+e[4],t[5]=e[5]*s[0]+e[6]*s[5]+e[7]*s[10]+e[8]*s[15],t[6]=e[5]*s[1]+e[6]*s[6]+e[7]*s[11]+e[8]*s[16],t[7]=e[5]*s[2]+e[6]*s[7]+e[7]*s[12]+e[8]*s[17],t[8]=e[5]*s[3]+e[6]*s[8]+e[7]*s[13]+e[8]*s[18],t[9]=e[5]*s[4]+e[6]*s[9]+e[7]*s[14]+e[8]*s[19]+e[9],t[10]=e[10]*s[0]+e[11]*s[5]+e[12]*s[10]+e[13]*s[15],t[11]=e[10]*s[1]+e[11]*s[6]+e[12]*s[11]+e[13]*s[16],t[12]=e[10]*s[2]+e[11]*s[7]+e[12]*s[12]+e[13]*s[17],t[13]=e[10]*s[3]+e[11]*s[8]+e[12]*s[13]+e[13]*s[18],t[14]=e[10]*s[4]+e[11]*s[9]+e[12]*s[14]+e[13]*s[19]+e[14],t[15]=e[15]*s[0]+e[16]*s[5]+e[17]*s[10]+e[18]*s[15],t[16]=e[15]*s[1]+e[16]*s[6]+e[17]*s[11]+e[18]*s[16],t[17]=e[15]*s[2]+e[16]*s[7]+e[17]*s[12]+e[18]*s[17],t[18]=e[15]*s[3]+e[16]*s[8]+e[17]*s[13]+e[18]*s[18],t[19]=e[15]*s[4]+e[16]*s[9]+e[17]*s[14]+e[18]*s[19]+e[19],t}_colorMatrix(t){const e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e}brightness(t,e){const s=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(s,e)}tint(t,e){const[s,r,n]=Wt.shared.setValue(t).toArray(),a=[s,0,0,0,0,0,r,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(a,e)}greyscale(t,e){const s=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(s,e)}blackAndWhite(t){const e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)}hue(t,e){t=(t||0)/180*Math.PI;const s=Math.cos(t),r=Math.sin(t),n=Math.sqrt,a=1/3,o=n(a),h=s+(1-s)*a,l=a*(1-s)-o*r,c=a*(1-s)+o*r,u=a*(1-s)+o*r,d=s+a*(1-s),f=a*(1-s)-o*r,m=a*(1-s)-o*r,p=a*(1-s)+o*r,g=s+a*(1-s),y=[h,l,c,0,0,u,d,f,0,0,m,p,g,0,0,0,0,0,1,0];this._loadMatrix(y,e)}contrast(t,e){const s=(t||0)+1,r=-.5*(s-1),n=[s,0,0,0,r,0,s,0,0,r,0,0,s,0,r,0,0,0,1,0];this._loadMatrix(n,e)}saturate(t=0,e){const s=t*2/3+1,r=(s-1)*-.5,n=[s,r,r,0,0,r,s,r,0,0,r,r,s,0,0,0,0,0,1,0];this._loadMatrix(n,e)}desaturate(){this.saturate(-1)}negative(t){const e=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(e,t)}sepia(t){const e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)}technicolor(t){const e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)}polaroid(t){const e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)}toBGR(t){const e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)}kodachrome(t){const e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)}browni(t){const e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)}vintage(t){const e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)}colorTone(t,e,s,r,n){t=t||.2,e=e||.15,s=s||16770432,r=r||3375104;const a=Wt.shared,[o,h,l]=a.setValue(s).toArray(),[c,u,d]=a.setValue(r).toArray(),f=[.3,.59,.11,0,0,o,h,l,t,0,c,u,d,e,0,o-c,h-u,l-d,0,0];this._loadMatrix(f,n)}night(t,e){t=t||.1;const s=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,t*2,0,0,0,0,0,1,0];this._loadMatrix(s,e)}predator(t,e){const s=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(s,e)}lsd(t){const e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)}reset(){const t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)}get matrix(){return this.uniforms.m}set matrix(t){this.uniforms.m=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}Cm.prototype.grayscale=Cm.prototype.greyscale;var yI=`varying vec2 vFilterCoord;
`;class Om extends _s{constructor(){const t={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(e1,PM,t),this.alpha=1}_loadMatrix(t,e=!1){let s=t;e&&(this._multiply(s,this.uniforms.m,t),s=this._colorMatrix(s)),this.uniforms.m=s}_multiply(t,e,s){return t[0]=e[0]*s[0]+e[1]*s[5]+e[2]*s[10]+e[3]*s[15],t[1]=e[0]*s[1]+e[1]*s[6]+e[2]*s[11]+e[3]*s[16],t[2]=e[0]*s[2]+e[1]*s[7]+e[2]*s[12]+e[3]*s[17],t[3]=e[0]*s[3]+e[1]*s[8]+e[2]*s[13]+e[3]*s[18],t[4]=e[0]*s[4]+e[1]*s[9]+e[2]*s[14]+e[3]*s[19]+e[4],t[5]=e[5]*s[0]+e[6]*s[5]+e[7]*s[10]+e[8]*s[15],t[6]=e[5]*s[1]+e[6]*s[6]+e[7]*s[11]+e[8]*s[16],t[7]=e[5]*s[2]+e[6]*s[7]+e[7]*s[12]+e[8]*s[17],t[8]=e[5]*s[3]+e[6]*s[8]+e[7]*s[13]+e[8]*s[18],t[9]=e[5]*s[4]+e[6]*s[9]+e[7]*s[14]+e[8]*s[19]+e[9],t[10]=e[10]*s[0]+e[11]*s[5]+e[12]*s[10]+e[13]*s[15],t[11]=e[10]*s[1]+e[11]*s[6]+e[12]*s[11]+e[13]*s[16],t[12]=e[10]*s[2]+e[11]*s[7]+e[12]*s[12]+e[13]*s[17],t[13]=e[10]*s[3]+e[11]*s[8]+e[12]*s[13]+e[13]*s[18],t[14]=e[10]*s[4]+e[11]*s[9]+e[12]*s[14]+e[13]*s[19]+e[14],t[15]=e[15]*s[0]+e[16]*s[5]+e[17]*s[10]+e[18]*s[15],t[16]=e[15]*s[1]+e[16]*s[6]+e[17]*s[11]+e[18]*s[16],t[17]=e[15]*s[2]+e[16]*s[7]+e[17]*s[12]+e[18]*s[17],t[18]=e[15]*s[3]+e[16]*s[8]+e[17]*s[13]+e[18]*s[18],t[19]=e[15]*s[4]+e[16]*s[9]+e[17]*s[14]+e[18]*s[19]+e[19],t}_colorMatrix(t){const e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e}brightness(t,e){const s=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(s,e)}tint(t,e){const[s,r,n]=Wt.shared.setValue(t).toArray(),a=[s,0,0,0,0,0,r,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(a,e)}greyscale(t,e){const s=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(s,e)}blackAndWhite(t){const e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)}hue(t,e){t=(t||0)/180*Math.PI;const s=Math.cos(t),r=Math.sin(t),n=Math.sqrt,a=1/3,o=n(a),h=s+(1-s)*a,l=a*(1-s)-o*r,c=a*(1-s)+o*r,u=a*(1-s)+o*r,d=s+a*(1-s),f=a*(1-s)-o*r,m=a*(1-s)-o*r,p=a*(1-s)+o*r,g=s+a*(1-s),y=[h,l,c,0,0,u,d,f,0,0,m,p,g,0,0,0,0,0,1,0];this._loadMatrix(y,e)}contrast(t,e){const s=(t||0)+1,r=-.5*(s-1),n=[s,0,0,0,r,0,s,0,0,r,0,0,s,0,r,0,0,0,1,0];this._loadMatrix(n,e)}saturate(t=0,e){const s=t*2/3+1,r=(s-1)*-.5,n=[s,r,r,0,0,r,s,r,0,0,r,r,s,0,0,0,0,0,1,0];this._loadMatrix(n,e)}desaturate(){this.saturate(-1)}negative(t){const e=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(e,t)}sepia(t){const e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)}technicolor(t){const e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)}polaroid(t){const e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)}toBGR(t){const e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)}kodachrome(t){const e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)}browni(t){const e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)}vintage(t){const e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)}colorTone(t,e,s,r,n){t=t||.2,e=e||.15,s=s||16770432,r=r||3375104;const a=Wt.shared,[o,h,l]=a.setValue(s).toArray(),[c,u,d]=a.setValue(r).toArray(),f=[.3,.59,.11,0,0,o,h,l,t,0,c,u,d,e,0,o-c,h-u,l-d,0,0];this._loadMatrix(f,n)}night(t,e){t=t||.1;const s=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,t*2,0,0,0,0,0,1,0];this._loadMatrix(s,e)}predator(t,e){const s=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(s,e)}lsd(t){const e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)}reset(){const t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)}get matrix(){return this.uniforms.m}set matrix(t){this.uniforms.m=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}Om.prototype.grayscale=Om.prototype.greyscale;var MM=`varying vec2 vFilterCoord;
varying vec2 vTextureCoord;
uniform vec2 scale;
@@ -658,7 +676,7 @@ void main(void)
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
}
`,xI=`attribute vec2 aVertexPosition;
`,RM=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform mat3 filterMatrix;
@@ -687,7 +705,7 @@ void main(void)
vTextureCoord = filterTextureCoord();
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
}
`;class bI extends _s{constructor(t,e){const s=new fe;t.renderable=!1,super(xI,yI,{mapSampler:t._texture,filterMatrix:s,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=t,this.maskMatrix=s,e==null&&(e=20),this.scale=new Kt(e,e)}apply(t,e,s,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const n=this.maskSprite.worldTransform,a=Math.sqrt(n.a*n.a+n.b*n.b),o=Math.sqrt(n.c*n.c+n.d*n.d);a!==0&&o!==0&&(this.uniforms.rotation[0]=n.a/a,this.uniforms.rotation[1]=n.b/a,this.uniforms.rotation[2]=n.c/o,this.uniforms.rotation[3]=n.d/o),t.applyFilter(this,e,s,r)}get map(){return this.uniforms.mapSampler}set map(t){this.uniforms.mapSampler=t}}var vI=`varying vec2 v_rgbNW;
`;class FM extends _s{constructor(t,e){const s=new fe;t.renderable=!1,super(RM,MM,{mapSampler:t._texture,filterMatrix:s,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=t,this.maskMatrix=s,e==null&&(e=20),this.scale=new Kt(e,e)}apply(t,e,s,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const n=this.maskSprite.worldTransform,a=Math.sqrt(n.a*n.a+n.b*n.b),o=Math.sqrt(n.c*n.c+n.d*n.d);a!==0&&o!==0&&(this.uniforms.rotation[0]=n.a/a,this.uniforms.rotation[1]=n.b/a,this.uniforms.rotation[2]=n.c/o,this.uniforms.rotation[3]=n.d/o),t.applyFilter(this,e,s,r)}get map(){return this.uniforms.mapSampler}set map(t){this.uniforms.mapSampler=t}}var kM=`varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
@@ -808,7 +826,7 @@ void main() {
gl_FragColor = color;
}
`,_I=`
`,LM=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -850,7 +868,7 @@ void main(void) {
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
}
`;class wI extends _s{constructor(){super(_I,vI)}}var TI=`precision highp float;
`;class BM extends _s{constructor(){super(LM,kM)}}var OM=`precision highp float;
varying vec2 vTextureCoord;
varying vec4 vColor;
@@ -884,8 +902,8 @@ void main()
gl_FragColor = color;
}
`;class SI extends _s{constructor(t=.5,e=Math.random()){super(w_,TI,{uNoise:0,uSeed:0}),this.noise=t,this.seed=e}get noise(){return this.uniforms.uNoise}set noise(t){this.uniforms.uNoise=t}get seed(){return this.uniforms.uSeed}set seed(t){this.uniforms.uSeed=t}}const Hy={AlphaFilter:hI,BlurFilter:pI,BlurFilterPass:Am,ColorMatrixFilter:Cm,DisplacementFilter:bI,FXAAFilter:wI,NoiseFilter:SI};Object.entries(Hy).forEach(([i,t])=>{Object.defineProperty(Hy,i,{get(){return Ht("7.1.0",`filters.${i} has moved to ${i}`),t}})});class EI{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(ss.system.add(this.tickerUpdate,this,Hn.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(ss.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const ji=new EI;class Cl{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Cl.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Kt,this.page=new Kt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(t,e,s){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(t,e,s,r,n){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class jh extends Cl{constructor(){super(...arguments),this.client=new Kt,this.movement=new Kt,this.offset=new Kt,this.global=new Kt,this.screen=new Kt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(t,e,s){return t.worldTransform.applyInverse(s||this.global,e)}getModifierState(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}initMouseEvent(t,e,s,r,n,a,o,h,l,c,u,d,f,m,p){throw new Error("Method not implemented.")}}class or extends jh{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class Fa extends jh{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}Fa.DOM_DELTA_PIXEL=0,Fa.DOM_DELTA_LINE=1,Fa.DOM_DELTA_PAGE=2;const AI=2048,CI=new Kt,_f=new Kt;class II{constructor(t){this.dispatch=new Al,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=t,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle Line truncated
${u}`)}});return await Promise.all(h),n?r[a[0].src]:r}async unload(t){const e=hr(t,s=>({alias:[s],src:s})).map(async s=>{var a,o;const r=ye.toAbsolute(s.src),n=this.promiseCache[r];if(n){const h=await n.promise;delete this.promiseCache[r],(o=(a=n.parser)==null?void 0:a.unload)==null||o.call(a,h,s,this)}});await Promise.all(e)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,e)=>(t[e.name]&&console.warn(`[Assets] loadParser name conflict "${e.name}"`),{...t,[e.name]:e}),{})}}var Ts=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Ts||{});const $I=".json",HI="application/json",WI={extension:{type:gt.LoadParser,priority:Ts.Low},name:"loadJson",test(i){return eo(i,HI)||Ue(i,$I)},async load(i){return await(await _t.ADAPTER.fetch(i)).json()}};St.add(WI);const zI=".txt",jI="text/plain",qI={name:"loadTxt",extension:{type:gt.LoadParser,priority:Ts.Low},test(i){return eo(i,jI)||Ue(i,zI)},async load(i){return await(await _t.ADAPTER.fetch(i)).text()}};St.add(qI);const KI=["normal","bold","100","200","300","400","500","600","700","800","900"],ZI=[".ttf",".otf",".woff",".woff2"],JI=["font/ttf","font/otf","font/woff","font/woff2"],QI=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function tP(i){const t=ye.extname(i),e=ye.basename(i,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1));let s=e.length>0;for(const n of e)if(!n.match(QI)){s=!1;break}let r=e.join(" ");return s||(r=`"${r.replace(/[\\"]/g,"\\$&")}"`),r}const eP=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function sP(i){return eP.test(i)?i:encodeURI(i)}const rP={extension:{type:gt.LoadParser,priority:Ts.Low},name:"loadWebFont",test(i){return eo(i,JI)||Ue(i,ZI)},async load(i,t){var s,r,n;const e=_t.ADAPTER.getFontFaceSet();if(e){const a=[],o=((s=t.data)==null?void 0:s.family)??tP(i),h=((n=(r=t.data)==null?void 0:r.weights)==null?void 0:n.filter(c=>KI.includes(c)))??["normal"],l=t.data??{};for(let c=0;c<h.length;c++){const u=h[c],d=new FontFace(o,`url(${sP(i)})`,{...l,weight:u});await d.load(),e.add(d),a.push(d)}return a.length===1?a[0]:a}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(i){(Array.isArray(i)?i:[i]).forEach(t=>_t.ADAPTER.getFontFaceSet().delete(t))}};St.add(rP);const iP=`(function() {
`;class DM extends _s{constructor(t=.5,e=Math.random()){super(e1,OM,{uNoise:0,uSeed:0}),this.noise=t,this.seed=e}get noise(){return this.uniforms.uNoise}set noise(t){this.uniforms.uNoise=t}get seed(){return this.uniforms.uSeed}set seed(t){this.uniforms.uSeed=t}}const Ex={AlphaFilter:wM,BlurFilter:IM,BlurFilterPass:Bm,ColorMatrixFilter:Om,DisplacementFilter:FM,FXAAFilter:BM,NoiseFilter:DM};Object.entries(Ex).forEach(([i,t])=>{Object.defineProperty(Ex,i,{get(){return Ht("7.1.0",`filters.${i} has moved to ${i}`),t}})});class NM{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(ss.system.add(this.tickerUpdate,this,Wn.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(ss.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const ji=new NM;class Cl{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Cl.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Kt,this.page=new Kt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(t,e,s){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(t,e,s,r,n){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class Jh extends Cl{constructor(){super(...arguments),this.client=new Kt,this.movement=new Kt,this.offset=new Kt,this.global=new Kt,this.screen=new Kt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(t,e,s){return t.worldTransform.applyInverse(s||this.global,e)}getModifierState(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}initMouseEvent(t,e,s,r,n,a,o,h,l,c,u,d,f,m,p){throw new Error("Method not implemented.")}}class or extends Jh{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class Fa extends Jh{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}Fa.DOM_DELTA_PIXEL=0,Fa.DOM_DELTA_LINE=1,Fa.DOM_DELTA_PAGE=2;const UM=2048,XM=new Kt,Ef=new Kt;class VM{constructor(t){this.dispatch=new Al,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=t,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle Line truncated
${u}`)}});return await Promise.all(h),n?r[a[0].src]:r}async unload(t){const e=hr(t,s=>({alias:[s],src:s})).map(async s=>{var a,o;const r=ye.toAbsolute(s.src),n=this.promiseCache[r];if(n){const h=await n.promise;delete this.promiseCache[r],(o=(a=n.parser)==null?void 0:a.unload)==null||o.call(a,h,s,this)}});await Promise.all(e)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,e)=>(t[e.name]&&console.warn(`[Assets] loadParser name conflict "${e.name}"`),{...t,[e.name]:e}),{})}}var Ts=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Ts||{});const rR=".json",iR="application/json",nR={extension:{type:gt.LoadParser,priority:Ts.Low},name:"loadJson",test(i){return eo(i,iR)||Ue(i,rR)},async load(i){return await(await _t.ADAPTER.fetch(i)).json()}};St.add(nR);const aR=".txt",oR="text/plain",lR={name:"loadTxt",extension:{type:gt.LoadParser,priority:Ts.Low},test(i){return eo(i,oR)||Ue(i,aR)},async load(i){return await(await _t.ADAPTER.fetch(i)).text()}};St.add(lR);const hR=["normal","bold","100","200","300","400","500","600","700","800","900"],cR=[".ttf",".otf",".woff",".woff2"],uR=["font/ttf","font/otf","font/woff","font/woff2"],dR=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function fR(i){const t=ye.extname(i),e=ye.basename(i,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1));let s=e.length>0;for(const n of e)if(!n.match(dR)){s=!1;break}let r=e.join(" ");return s||(r=`"${r.replace(/[\\"]/g,"\\$&")}"`),r}const mR=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function pR(i){return mR.test(i)?i:encodeURI(i)}const gR={extension:{type:gt.LoadParser,priority:Ts.Low},name:"loadWebFont",test(i){return eo(i,uR)||Ue(i,cR)},async load(i,t){var s,r,n;const e=_t.ADAPTER.getFontFaceSet();if(e){const a=[],o=((s=t.data)==null?void 0:s.family)??fR(i),h=((n=(r=t.data)==null?void 0:r.weights)==null?void 0:n.filter(c=>hR.includes(c)))??["normal"],l=t.data??{};for(let c=0;c<h.length;c++){const u=h[c],d=new FontFace(o,`url(${pR(i)})`,{...l,weight:u});await d.load(),e.add(d),a.push(d)}return a.length===1?a[0]:a}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(i){(Array.isArray(i)?i:[i]).forEach(t=>_t.ADAPTER.getFontFaceSet().delete(t))}};St.add(gR);const yR=`(function() {
"use strict";
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
async function checkImageBitmap() {
@@ -902,7 +920,7 @@ ${u}`)}});return await Promise.all(h),n?r[a[0].src]:r}async unload(t){const e=hr
self.postMessage(result);
});
})();
`;let ka=null,Fm=class{constructor(){ka||(ka=URL.createObjectURL(new Blob([iP],{type:"application/javascript"}))),this.worker=new Worker(ka)}};Fm.revokeObjectURL=function(){ka&&(URL.revokeObjectURL(ka),ka=null)};const nP=`(function() {
`;let ka=null,Vm=class{constructor(){ka||(ka=URL.createObjectURL(new Blob([yR],{type:"application/javascript"}))),this.worker=new Worker(ka)}};Vm.revokeObjectURL=function(){ka&&(URL.revokeObjectURL(ka),ka=null)};const xR=`(function() {
"use strict";
async function loadImageBitmap(url) {
const response = await fetch(url);
@@ -928,8 +946,8 @@ ${u}`)}});return await Promise.all(h),n?r[a[0].src]:r}async unload(t){const e=hr
}
};
})();
`;let La=null;class B_{constructor(){La||(La=URL.createObjectURL(new Blob([nP],{type:"application/javascript"}))),this.worker=new Worker(La)}}B_.revokeObjectURL=function(){La&&(URL.revokeObjectURL(La),La=null)};let Ky=0,wf;class aP{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(t=>{const{worker:e}=new Fm;e.addEventListener("message",s=>{e.terminate(),Fm.revokeObjectURL(),t(s.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){wf===void 0&&(wf=navigator.hardwareConcurrency||4);let t=this.workerPool.pop();return!t&&this._createdWorkers<wf&&(this._createdWorkers++,t=new B_().worker,t.addEventListener("message",e=>{this.complete(e.data),this.returnWorker(e.target),this.next()})),t}returnWorker(t){this.workerPool.push(t)}complete(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null}async _run(t,e){await this._initWorkers();const s=new Promise((r,n)=>{this.queue.push({id:t,arguments:e,resolve:r,reject:n})});return this.next(),s}next(){if(!this.queue.length)return;const t=this.getWorker();if(!t)return;const e=this.queue.pop(),s=e.id;this.resolveHash[Ky]={resolve:e.resolve,reject:e.reject},t.postMessage({data:e.arguments,uuid:Ky++,id:s})}}const Zy=new aP;function Il(i,t,e){i.resource.internal=!0;const s=new Nt(i),r=()=>{delete t.promiseCache[e],Rn.has(e)&&Rn.remove(e)};return s.baseTexture.once("destroyed",()=>{e in t.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),r())}),s.once("destroyed",()=>{i.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),r())}),s}const oP=[".jpeg",".jpg",".png",".webp",".avif"],lP=["image/jpeg","image/png","image/webp","image/avif"];async function hP(i){const t=await _t.ADAPTER.fetch(i);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${i}: ${t.status} ${t.statusText}`);const e=await t.blob();return await createImageBitmap(e)}const zc={name:"loadTextures",extension:{type:gt.LoadParser,priority:Ts.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(i){return eo(i,lP)||Ue(i,oP)},async load(i,t,e){var o;const s=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let r;s?this.config.preferWorkers&&await Zy.isImageBitmapSupported()?r=await Zy.loadImageBitmap(i):r=await hP(i):r=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=i,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const n={...t.data};n.resolution??(n.resolution=Ci(i)),s&&((o=n.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(n.resourceOptions={...n.resourceOptions},n.resourceOptions.ownsImageBitmap=!0);const a=new Lt(r,n);return a.resource.src=i,Il(a,e,i)},unload(i){i.destroy(!0)}};St.add(zc);const cP=".svg",uP="image/svg+xml",dP={extension:{type:gt.LoadParser,priority:Ts.High},name:"loadSVG",test(i){return eo(i,uP)||Ue(i,cP)},async testParse(i){return wm.test(i)},async parse(i,t,e){var n;const s=new wm(i,(n=t==null?void 0:t.data)==null?void 0:n.resourceOptions);await s.load();const r=new Lt(s,{resolution:Ci(i),...t==null?void 0:t.data});return r.resource.src=t.src,Il(r,e,t.src)},async load(i,t){return(await _t.ADAPTER.fetch(i)).text()},unload:zc.unload};St.add(dP);const fP=[".mp4",".m4v",".webm",".ogv"],mP=["video/mp4","video/webm","video/ogg"],pP={name:"loadVideo",extension:{type:gt.LoadParser,priority:Ts.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(i){return eo(i,mP)||Ue(i,fP)},async load(i,t,e){var a;let s;const r=await(await _t.ADAPTER.fetch(i)).blob(),n=URL.createObjectURL(r);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=t==null?void 0:t.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new I_(n,o);await h.load();const l=new Lt(h,{alphaMode:await _A(),resolution:Ci(i),...t==null?void 0:t.data});l.resource.src=i,s=Il(l,e,i),s.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(n)})}catch(o){throw URL.revokeObjectURL(n),o}return s},unload(i){i.destroy(!0)}};St.add(pP);class gP{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,e)=>`${t}${this._bundleIdConnector}${e}`,extractAssetIdFromBundle:(t,e)=>e.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId= Line truncated
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:t,src:e,data:s,format:r,loadParser:n})):Array.isArray(t)?a.push(...t):a.push(t);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},hr(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const m=hr(l||c).map(y=>typeof y=="string"?VI(y):Array.isArray(y)?y:[y]),p=this.getAlias(h);Array.isArray(p)?p.forEach(o):o(p);const g=[];m.forEach(y=>{y.forEach(_=>{let v={};if(typeof _!="object"){v.src=_;for(let b=0;b<this._parsers.length;b++){const T=this._parsers[b];if(T.test(_)){v=T.parse(_);break}}}else u=_.data??u,d=_.format??d,f=_.loadParser??f,v={...v,..._};if(!p)throw new Error(`[Resolver] alias is undefined for this asset: ${v.src}`);v=this.buildResolvedAsset(v,{aliases:p,data:u,format:d,loadParser:f}),g.push(v)})}),p.forEach(y=>{this._assetMap[y]=g})})}resolveBundle(t){const e=qh(t);t=hr(t);const s={};return t.forEach(r=>{const n=this._bundles[r];if(n){const a=this.resolve(n),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(r,h)]=l}s[r]=o}}),e?s[t[0]]:s}resolveUrl(t){const e=this.resolve(t);if(typeof t!="string"){const s={};for(const r in e)s[r]=e[r].src;return s}return e.src}resolve(t){const e=qh(t);t=hr(t);const s={};return t.forEach(r=>{if(!this._resolverHash[r])if(this._assetMap[r]){let n=this._assetMap[r];const a=n[0],o=this._getPreferredOrder(n);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=n.filter(u=>u[h]?u[h]===l:!1);c.length&&(n=c)})}),this._resolverHash[r]=n[0]??a}else this._resolverHash[r]=this.buildResolvedAsset({alias:[r],src:r},{});s[r]=this._resolverHash[r]}),e?s[t[0]]:s}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let e=0;e<t.length;e++){const s=t[0],r=this._preferredOrder.find(n=>n.params.format.includes(s.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const e=/\?/.test(t)?"&":"?";return`${t}${e}${this._defaultSearchParams}`}buildResolvedAsset(t,e){const{aliases:s,data:r,loadParser:n,format:a}=e;return(this._basePath||this._rootPath)&&(t.src=ye.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=s??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...r||{},...t.data},t.loadParser=n??t.loadParser,t.format=a??t.format??ye.extname(t.src).slice(1),t.srcs=t.src,t.name=t.alias,t}}class yP{constructor(){this._detections=[],this._initialized=!1,this.resolver=new gP,this.loader=new GI,this.cache=Rn,this._backgroundLoader=new XI(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var n,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let o=t.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const e=((n=t.texturePreference)==null?void 0:n.resolution)??1,s=typeof e=="number"?[e]:e,r=await this._detectFormats({preferredFormats:(a=t.texturePreference)==null?void 0:a.format,skipDetections:t.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:r,resolution:s}}),t.preferences&&this.setPreferences(t.preferences)}add(t,e,s,r,n){this.resolver.add(t,e,s,r,n)}async load(t,e){this._initialized||await this.init();const s=qh(t),r=hr(t).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),n=this.resolver.resolve(r),a=await this._mapLoadToResolve(n,e);return s?a[r[0]]:a}addBundle(t,e){this.resolver.addBundle(t,e)}async loadBundle(t,e){this._initialized||await this.init();let s=!1;typeof t=="string"&&(s=!0,t=[t]);const r=this.resolver.resolveBundle(t),n={},a=Object.keys(r);let o=0,h=0;const l=()=>{e==null||e(++o/h)},c=a.map(u=>{const d=r[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{n[u]=f})});return await Promise.all(c),s?n[t[0]]:n}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const e=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(e))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const e=this.resolver.resolveBundle(t);Object.values(e).forEach(s=>{this._backgroundLoader.add(Object.values(s))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return Rn.get(t);const e={};for(let s=0;s<t.length;s++)e[s]=Rn.get(t[s]);return e}async _mapLoadToResolve(t,e){const s=Object.values(t),r=Object.keys(t);this._backgroundLoader.active=!1;co Line truncated
`;let La=null;class m1{constructor(){La||(La=URL.createObjectURL(new Blob([xR],{type:"application/javascript"}))),this.worker=new Worker(La)}}m1.revokeObjectURL=function(){La&&(URL.revokeObjectURL(La),La=null)};let Mx=0,Af;class bR{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(t=>{const{worker:e}=new Vm;e.addEventListener("message",s=>{e.terminate(),Vm.revokeObjectURL(),t(s.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){Af===void 0&&(Af=navigator.hardwareConcurrency||4);let t=this.workerPool.pop();return!t&&this._createdWorkers<Af&&(this._createdWorkers++,t=new m1().worker,t.addEventListener("message",e=>{this.complete(e.data),this.returnWorker(e.target),this.next()})),t}returnWorker(t){this.workerPool.push(t)}complete(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null}async _run(t,e){await this._initWorkers();const s=new Promise((r,n)=>{this.queue.push({id:t,arguments:e,resolve:r,reject:n})});return this.next(),s}next(){if(!this.queue.length)return;const t=this.getWorker();if(!t)return;const e=this.queue.pop(),s=e.id;this.resolveHash[Mx]={resolve:e.resolve,reject:e.reject},t.postMessage({data:e.arguments,uuid:Mx++,id:s})}}const Rx=new bR;function Il(i,t,e){i.resource.internal=!0;const s=new Nt(i),r=()=>{delete t.promiseCache[e],Rn.has(e)&&Rn.remove(e)};return s.baseTexture.once("destroyed",()=>{e in t.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),r())}),s.once("destroyed",()=>{i.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),r())}),s}const vR=[".jpeg",".jpg",".png",".webp",".avif"],_R=["image/jpeg","image/png","image/webp","image/avif"];async function wR(i){const t=await _t.ADAPTER.fetch(i);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${i}: ${t.status} ${t.statusText}`);const e=await t.blob();return await createImageBitmap(e)}const qc={name:"loadTextures",extension:{type:gt.LoadParser,priority:Ts.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(i){return eo(i,_R)||Ue(i,vR)},async load(i,t,e){var o;const s=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let r;s?this.config.preferWorkers&&await Rx.isImageBitmapSupported()?r=await Rx.loadImageBitmap(i):r=await wR(i):r=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=i,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const n={...t.data};n.resolution??(n.resolution=Ci(i)),s&&((o=n.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(n.resourceOptions={...n.resourceOptions},n.resourceOptions.ownsImageBitmap=!0);const a=new Lt(r,n);return a.resource.src=i,Il(a,e,i)},unload(i){i.destroy(!0)}};St.add(qc);const TR=".svg",SR="image/svg+xml",ER={extension:{type:gt.LoadParser,priority:Ts.High},name:"loadSVG",test(i){return eo(i,SR)||Ue(i,TR)},async testParse(i){return Rm.test(i)},async parse(i,t,e){var n;const s=new Rm(i,(n=t==null?void 0:t.data)==null?void 0:n.resourceOptions);await s.load();const r=new Lt(s,{resolution:Ci(i),...t==null?void 0:t.data});return r.resource.src=t.src,Il(r,e,t.src)},async load(i,t){return(await _t.ADAPTER.fetch(i)).text()},unload:qc.unload};St.add(ER);const AR=[".mp4",".m4v",".webm",".ogv"],CR=["video/mp4","video/webm","video/ogg"],IR={name:"loadVideo",extension:{type:gt.LoadParser,priority:Ts.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(i){return eo(i,CR)||Ue(i,AR)},async load(i,t,e){var a;let s;const r=await(await _t.ADAPTER.fetch(i)).blob(),n=URL.createObjectURL(r);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=t==null?void 0:t.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new o1(n,o);await h.load();const l=new Lt(h,{alphaMode:await LI(),resolution:Ci(i),...t==null?void 0:t.data});l.resource.src=i,s=Il(l,e,i),s.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(n)})}catch(o){throw URL.revokeObjectURL(n),o}return s},unload(i){i.destroy(!0)}};St.add(IR);class PR{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,e)=>`${t}${this._bundleIdConnector}${e}`,extractAssetIdFromBundle:(t,e)=>e.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId= Line truncated
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:t,src:e,data:s,format:r,loadParser:n})):Array.isArray(t)?a.push(...t):a.push(t);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},hr(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const m=hr(l||c).map(y=>typeof y=="string"?tR(y):Array.isArray(y)?y:[y]),p=this.getAlias(h);Array.isArray(p)?p.forEach(o):o(p);const g=[];m.forEach(y=>{y.forEach(_=>{let v={};if(typeof _!="object"){v.src=_;for(let b=0;b<this._parsers.length;b++){const T=this._parsers[b];if(T.test(_)){v=T.parse(_);break}}}else u=_.data??u,d=_.format??d,f=_.loadParser??f,v={...v,..._};if(!p)throw new Error(`[Resolver] alias is undefined for this asset: ${v.src}`);v=this.buildResolvedAsset(v,{aliases:p,data:u,format:d,loadParser:f}),g.push(v)})}),p.forEach(y=>{this._assetMap[y]=g})})}resolveBundle(t){const e=Qh(t);t=hr(t);const s={};return t.forEach(r=>{const n=this._bundles[r];if(n){const a=this.resolve(n),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(r,h)]=l}s[r]=o}}),e?s[t[0]]:s}resolveUrl(t){const e=this.resolve(t);if(typeof t!="string"){const s={};for(const r in e)s[r]=e[r].src;return s}return e.src}resolve(t){const e=Qh(t);t=hr(t);const s={};return t.forEach(r=>{if(!this._resolverHash[r])if(this._assetMap[r]){let n=this._assetMap[r];const a=n[0],o=this._getPreferredOrder(n);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=n.filter(u=>u[h]?u[h]===l:!1);c.length&&(n=c)})}),this._resolverHash[r]=n[0]??a}else this._resolverHash[r]=this.buildResolvedAsset({alias:[r],src:r},{});s[r]=this._resolverHash[r]}),e?s[t[0]]:s}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let e=0;e<t.length;e++){const s=t[0],r=this._preferredOrder.find(n=>n.params.format.includes(s.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const e=/\?/.test(t)?"&":"?";return`${t}${e}${this._defaultSearchParams}`}buildResolvedAsset(t,e){const{aliases:s,data:r,loadParser:n,format:a}=e;return(this._basePath||this._rootPath)&&(t.src=ye.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=s??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...r||{},...t.data},t.loadParser=n??t.loadParser,t.format=a??t.format??ye.extname(t.src).slice(1),t.srcs=t.src,t.name=t.alias,t}}class MR{constructor(){this._detections=[],this._initialized=!1,this.resolver=new PR,this.loader=new sR,this.cache=Rn,this._backgroundLoader=new QM(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var n,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let o=t.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const e=((n=t.texturePreference)==null?void 0:n.resolution)??1,s=typeof e=="number"?[e]:e,r=await this._detectFormats({preferredFormats:(a=t.texturePreference)==null?void 0:a.format,skipDetections:t.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:r,resolution:s}}),t.preferences&&this.setPreferences(t.preferences)}add(t,e,s,r,n){this.resolver.add(t,e,s,r,n)}async load(t,e){this._initialized||await this.init();const s=Qh(t),r=hr(t).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),n=this.resolver.resolve(r),a=await this._mapLoadToResolve(n,e);return s?a[r[0]]:a}addBundle(t,e){this.resolver.addBundle(t,e)}async loadBundle(t,e){this._initialized||await this.init();let s=!1;typeof t=="string"&&(s=!0,t=[t]);const r=this.resolver.resolveBundle(t),n={},a=Object.keys(r);let o=0,h=0;const l=()=>{e==null||e(++o/h)},c=a.map(u=>{const d=r[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{n[u]=f})});return await Promise.all(c),s?n[t[0]]:n}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const e=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(e))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const e=this.resolver.resolveBundle(t);Object.values(e).forEach(s=>{this._backgroundLoader.add(Object.values(s))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return Rn.get(t);const e={};for(let s=0;s<t.length;s++)e[s]=Rn.get(t[s]);return e}async _mapLoadToResolve(t,e){const s=Object.values(t),r=Object.keys(t);this._backgroundLoader.active=!1;co Line truncated
uniform vec4 uColor;
uniform sampler2D uSampler;
@@ -938,7 +956,7 @@ void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
}
`,fM=`attribute vec2 aVertexPosition;
`,A2=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -953,7 +971,7 @@ void main(void)
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
}
`;class Jo extends Js{constructor(t,e){const s={uSampler:t,alpha:1,uTextureMatrix:fe.IDENTITY,uColor:new Float32Array([1,1,1,1])};e=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},e),e.uniforms&&Object.assign(s,e.uniforms),super(e.program||ur.from(fM,dM),s),this._colorDirty=!1,this.uvMatrix=new Wc(t),this.batchable=e.program===void 0,this.pluginName=e.pluginName,this._tintColor=new Wt(e.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=e.alpha}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const t=this.texture.baseTexture.alphaMode;Wt.shared.setValue(this._tintColor).premultiply(this._alpha,t).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class DL extends Wn{constructor(t=Nt.EMPTY,e,s,r,n){const a=new qc(e,s,r);a.getBuffer("aVertexPosition").static=!1;const o=new Jo(t);super(a,o,null,n),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(t){this.geometry.getBuffer("aVertexPosition").data=t}_render(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(t)}}class hx{constructor(t,e,s){this.geometry=new er,this.indexBuffer=null,this.size=s,this.dynamicProperties=[],this.staticProperties=[];for(let r=0;r<t.length;++r){let n=t[r];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||wt.FLOAT,offset:n.offset},e[r]?this.dynamicProperties.push(n):this.staticProperties.push(n)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const t=this.geometry;let e=0;this.indexBuffer=new ne(BA(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];o.offset=e,e+=o.size,this.dynamicStride+=o.size}const s=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(s),this.dynamicDataUint32=new Uint32Array(s),this.dynamicBuffer=new ne(this.dynamicData,!1,!1);let r=0;this.staticStride=0;for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];o.offset=r,r+=o.size,this.staticStride+=o.size}const n=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(n),this.staticDataUint32=new Uint32Array(n),this.staticBuffer=new ne(this.staticData,!0,!1);for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];t.addAttribute(o.attributeName,this.dynamicBuffer,0,o.type===wt.UNSIGNED_BYTE,o.type,this.dynamicStride*4,o.offset*4)}for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];t.addAttribute(o.attributeName,this.staticBuffer,0,o.type===wt.UNSIGNED_BYTE,o.type,this.staticStride*4,o.offset*4)}}uploadDynamic(t,e,s){for(let r=0;r<this.dynamicProperties.length;r++){const n=this.dynamicProperties[r];n.uploadFunction(t,e,s,n.type===wt.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++}uploadStatic(t,e,s){for(let r=0;r<this.staticProperties.length;r++){const n=this.staticProperties[r];n.uploadFunction(t,e,s,n.type===wt.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var mM=`varying vec2 vTextureCoord;
`;class rl extends Js{constructor(t,e){const s={uSampler:t,alpha:1,uTextureMatrix:fe.IDENTITY,uColor:new Float32Array([1,1,1,1])};e=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},e),e.uniforms&&Object.assign(s,e.uniforms),super(e.program||ur.from(A2,E2),s),this._colorDirty=!1,this.uvMatrix=new jc(t),this.batchable=e.program===void 0,this.pluginName=e.pluginName,this._tintColor=new Wt(e.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=e.alpha}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const t=this.texture.baseTexture.alphaMode;Wt.shared.setValue(this._tintColor).premultiply(this._alpha,t).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class NL extends zn{constructor(t=Nt.EMPTY,e,s,r,n){const a=new Zc(e,s,r);a.getBuffer("aVertexPosition").static=!1;const o=new rl(t);super(a,o,null,n),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(t){this.geometry.getBuffer("aVertexPosition").data=t}_render(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(t)}}class Gx{constructor(t,e,s){this.geometry=new er,this.indexBuffer=null,this.size=s,this.dynamicProperties=[],this.staticProperties=[];for(let r=0;r<t.length;++r){let n=t[r];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||wt.FLOAT,offset:n.offset},e[r]?this.dynamicProperties.push(n):this.staticProperties.push(n)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const t=this.geometry;let e=0;this.indexBuffer=new ne(jI(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];o.offset=e,e+=o.size,this.dynamicStride+=o.size}const s=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(s),this.dynamicDataUint32=new Uint32Array(s),this.dynamicBuffer=new ne(this.dynamicData,!1,!1);let r=0;this.staticStride=0;for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];o.offset=r,r+=o.size,this.staticStride+=o.size}const n=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(n),this.staticDataUint32=new Uint32Array(n),this.staticBuffer=new ne(this.staticData,!0,!1);for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];t.addAttribute(o.attributeName,this.dynamicBuffer,0,o.type===wt.UNSIGNED_BYTE,o.type,this.dynamicStride*4,o.offset*4)}for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];t.addAttribute(o.attributeName,this.staticBuffer,0,o.type===wt.UNSIGNED_BYTE,o.type,this.staticStride*4,o.offset*4)}}uploadDynamic(t,e,s){for(let r=0;r<this.dynamicProperties.length;r++){const n=this.dynamicProperties[r];n.uploadFunction(t,e,s,n.type===wt.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++}uploadStatic(t,e,s){for(let r=0;r<this.staticProperties.length;r++){const n=this.staticProperties[r];n.uploadFunction(t,e,s,n.type===wt.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var C2=`varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
@@ -961,7 +979,7 @@ uniform sampler2D uSampler;
void main(void){
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
gl_FragColor = color;
}`,pM=`attribute vec2 aVertexPosition;
}`,I2=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
@@ -986,8 +1004,8 @@ void main(void){
vTextureCoord = aTextureCoord;
vColor = aColor * uColor;
}
`;class G_ extends Hc{constructor(t){super(t),this.shader=null,this.properties=null,this.tempMatrix=new fe,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:wt.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Js.from(pM,mM,{}),this.state=jr.for2d()}render(t){const e=t.children,s=t._maxSize,r=t._batchSize,n=this.renderer;let a=e.length;if(a===0)return;a>s&&!t.autoResize&&(a=s);let o=t._buffers;o||(o=t._buffers=this.generateBuffers(t));const h=e[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=Gv(t.blendMode,l),n.state.set(this.state);const c=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=Wt.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,m=0;f<a;f+=r,m+=1){let p=a-f;p>r&&(p=r),m>=o.length&&o.push(this._generateOneMoreBuffer(t));const g=o[m];g.uploadDynamic(e,f,p);const y=t._bufferUpdateIDs[m]||0;d=d||g._updateID<y,d&&(g._updateID=t._updateID,g.uploadStatic(e,f,p)),n.geometry.bind(g.geometry),c.drawElements(c.TRIANGLES,p*6,c.UNSIGNED_SHORT,0)}}generateBuffers(t){const e=[],s=t._maxSize,r=t._batchSize,n=t._properties;for(let a=0;a<s;a+=r)e.push(new hx(this.properties,n,r));return e}_generateOneMoreBuffer(t){const e=t._batchSize,s=t._properties;return new hx(this.properties,s,e)}uploadVertices(t,e,s,r,n,a){let o=0,h=0,l=0,c=0;for(let u=0;u<s;++u){const d=t[e+u],f=d._texture,m=d.scale.x,p=d.scale.y,g=f.trim,y=f.orig;g?(h=g.x-d.anchor.x*y.width,o=h+g.width,c=g.y-d.anchor.y*y.height,l=c+g.height):(o=y.width*(1-d.anchor.x),h=y.width*-d.anchor.x,l=y.height*(1-d.anchor.y),c=y.height*-d.anchor.y),r[a]=h*m,r[a+1]=c*p,r[a+n]=o*m,r[a+n+1]=c*p,r[a+n*2]=o*m,r[a+n*2+1]=l*p,r[a+n*3]=h*m,r[a+n*3+1]=l*p,a+=n*4}}uploadPosition(t,e,s,r,n,a){for(let o=0;o<s;o++){const h=t[e+o].position;r[a]=h.x,r[a+1]=h.y,r[a+n]=h.x,r[a+n+1]=h.y,r[a+n*2]=h.x,r[a+n*2+1]=h.y,r[a+n*3]=h.x,r[a+n*3+1]=h.y,a+=n*4}}uploadRotation(t,e,s,r,n,a){for(let o=0;o<s;o++){const h=t[e+o].rotation;r[a]=h,r[a+n]=h,r[a+n*2]=h,r[a+n*3]=h,a+=n*4}}uploadUvs(t,e,s,r,n,a){for(let o=0;o<s;++o){const h=t[e+o]._texture._uvs;h?(r[a]=h.x0,r[a+1]=h.y0,r[a+n]=h.x1,r[a+n+1]=h.y1,r[a+n*2]=h.x2,r[a+n*2+1]=h.y2,r[a+n*3]=h.x3,r[a+n*3+1]=h.y3,a+=n*4):(r[a]=0,r[a+1]=0,r[a+n]=0,r[a+n+1]=0,r[a+n*2]=0,r[a+n*2+1]=0,r[a+n*3]=0,r[a+n*3+1]=0,a+=n*4)}}uploadTint(t,e,s,r,n,a){for(let o=0;o<s;++o){const h=t[e+o],l=Wt.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);r[a]=l,r[a+n]=l,r[a+n*2]=l,r[a+n*3]=l,a+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}G_.extension={name:"particle",type:gt.RendererPlugin};St.add(G_);var Kc=(i=>(i[i.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",i[i.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",i))(Kc||{});const oh={willReadFrequently:!0},Pr=class Ct{static get experimentalLetterSpacingSupported(){let t=Ct._experimentalLetterSpacingSupported;if(t!==void 0){const e=_t.ADAPTER.getCanvasRenderingContext2D().prototype;t=Ct._experimentalLetterSpacingSupported="letterSpacing"in e||"textLetterSpacing"in e}return t}constructor(t,e,s,r,n,a,o,h,l){this.text=t,this.style=e,this.width=s,this.height=r,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(t,e,s,r=Ct._canvas){s=s??e.wordWrap;const n=e.toFontString(),a=Ct.measureFont(n);a.fontSize===0&&(a.fontSize=e.fontSize,a.ascent=e.fontSize);const o=r.getContext("2d",oh);o.font=n;const h=(s?Ct.wordWrap(t,e,r):t).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let m=0;m<h.length;m++){const p=Ct._measureText(h[m],e.letterSpacing,o);l[m]=p,c=Math.max(c,p)}let u=c+e.strokeThickness;e.dropShadow&&(u+=e.dropShadowDistance);const d=e.lineHeight||a.fontSize+e.strokeThickness;let f=Math.max(d,a.fontSize+e.strokeThickness*2)+e.leading+(h.length-1)*(d+e.leading);return e.dropShadow&&(f+=e.dropShadowDistance),new Ct(t,e,u,f,h,l,d+e.leading,c,a)}static _measureText(t,e,s){let r=!1;Ct.experimentalLetterSpacingSupported&&(Ct.experimentalLetterSpacing?(s.letterSpacing=`${e}px`,s.textLetterSpacing=`${e}px`,r=!0):(s.letterSpacing="0px",s.textLetterSpacing="0px"));let n=s.measureText(t).width;return n>0&&(r?n-=e:n+=(Ct.graphemeSegmenter(t).length-1)*e),n}static wordWrap(t,e,s=Ct._canvas){const r=s.getContext("2d",oh);let n=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=e,u=Ct.collapseSpaces(c),d=Ct.collapseNewlines(c);let f=!u;const m=e.wordWrapWidth+l, Line truncated
`:t,t}static getFromCache(t,e,s,r){let n=s[t];return typeof n!="number"&&(n=Ct._measureText(t,e,r)+e,s[t]=n),n}static collapseSpaces(t){return t==="normal"||t==="pre-line"}static collapseNewlines(t){return t==="normal"}static trimRight(t){if(typeof t!="string")return"";for(let e=t.length-1;e>=0;e--){const s=t[e];if(!Ct.isBreakingSpace(s))break;t=t.slice(0,-1)}return t}static isNewline(t){return typeof t!="string"?!1:Ct._newlines.includes(t.charCodeAt(0))}static isBreakingSpace(t,e){return typeof t!="string"?!1:Ct._breakingSpaces.includes(t.charCodeAt(0))}static tokenize(t){const e=[];let s="";if(typeof t!="string")return e;for(let r=0;r<t.length;r++){const n=t[r],a=t[r+1];if(Ct.isBreakingSpace(n,a)||Ct.isNewline(n)){s!==""&&(e.push(s),s=""),e.push(n);continue}s+=n}return s!==""&&e.push(s),e}static canBreakWords(t,e){return e}static canBreakChars(t,e,s,r,n){return!0}static wordWrapSplit(t){return Ct.graphemeSegmenter(t)}static measureFont(t){if(Ct._fonts[t])return Ct._fonts[t];const e={ascent:0,descent:0,fontSize:0},s=Ct._canvas,r=Ct._context;r.font=t;const n=Ct.METRICS_STRING+Ct.BASELINE_SYMBOL,a=Math.ceil(r.measureText(n).width);let o=Math.ceil(r.measureText(Ct.BASELINE_SYMBOL).width);const h=Math.ceil(Ct.HEIGHT_MULTIPLIER*o);if(o=o*Ct.BASELINE_MULTIPLIER|0,a===0||h===0)return Ct._fonts[t]=e,e;s.width=a,s.height=h,r.fillStyle="#f00",r.fillRect(0,0,a,h),r.font=t,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(n,0,o);const l=r.getImageData(0,0,a,h).data,c=l.length,u=a*4;let d=0,f=0,m=!1;for(d=0;d<o;++d){for(let p=0;p<u;p+=4)if(l[f+p]!==255){m=!0;break}if(!m)f+=u;else break}for(e.ascent=o-d,f=c-u,m=!1,d=h;d>o;--d){for(let p=0;p<u;p+=4)if(l[f+p]!==255){m=!0;break}if(!m)f-=u;else break}return e.descent=d-o,e.fontSize=e.ascent+e.descent,Ct._fonts[t]=e,e}static clearMetrics(t=""){t?delete Ct._fonts[t]:Ct._fonts={}}static get _canvas(){var t;if(!Ct.__canvas){let e;try{const s=new OffscreenCanvas(0,0);if((t=s.getContext("2d",oh))!=null&&t.measureText)return Ct.__canvas=s,s;e=_t.ADAPTER.createCanvas()}catch{e=_t.ADAPTER.createCanvas()}e.width=e.height=10,Ct.__canvas=e}return Ct.__canvas}static get _context(){return Ct.__context||(Ct.__context=Ct._canvas.getContext("2d",oh)),Ct.__context}};Pr.METRICS_STRING="|ÉqÅ",Pr.BASELINE_SYMBOL="M",Pr.BASELINE_MULTIPLIER=1.4,Pr.HEIGHT_MULTIPLIER=2,Pr.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return t=>[...i.segment(t)].map(e=>e.segment)}return i=>[...i]})(),Pr.experimentalLetterSpacing=!1,Pr._fonts={},Pr._newlines=[10,13],Pr._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let $i=Pr;const gM=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],$_=class Ao{constructor(t){this.styleID=0,this.reset(),If(this,t,t)}clone(){const t={};return If(t,this,Ao.defaultStyle),new Ao(t)}reset(){If(this,Ao.defaultStyle,Ao.defaultStyle)}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(t){const e=Cf(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}get fill(){return this._fill}set fill(t){const e=Cf(t);this._fill!==e&&(this._fill=e,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(t){yM(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}get letterSpacing(){return this._lett Line truncated
`;class w1 extends zc{constructor(t){super(t),this.shader=null,this.properties=null,this.tempMatrix=new fe,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:wt.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Js.from(I2,C2,{}),this.state=jr.for2d()}render(t){const e=t.children,s=t._maxSize,r=t._batchSize,n=this.renderer;let a=e.length;if(a===0)return;a>s&&!t.autoResize&&(a=s);let o=t._buffers;o||(o=t._buffers=this.generateBuffers(t));const h=e[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=w_(t.blendMode,l),n.state.set(this.state);const c=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=Wt.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,m=0;f<a;f+=r,m+=1){let p=a-f;p>r&&(p=r),m>=o.length&&o.push(this._generateOneMoreBuffer(t));const g=o[m];g.uploadDynamic(e,f,p);const y=t._bufferUpdateIDs[m]||0;d=d||g._updateID<y,d&&(g._updateID=t._updateID,g.uploadStatic(e,f,p)),n.geometry.bind(g.geometry),c.drawElements(c.TRIANGLES,p*6,c.UNSIGNED_SHORT,0)}}generateBuffers(t){const e=[],s=t._maxSize,r=t._batchSize,n=t._properties;for(let a=0;a<s;a+=r)e.push(new Gx(this.properties,n,r));return e}_generateOneMoreBuffer(t){const e=t._batchSize,s=t._properties;return new Gx(this.properties,s,e)}uploadVertices(t,e,s,r,n,a){let o=0,h=0,l=0,c=0;for(let u=0;u<s;++u){const d=t[e+u],f=d._texture,m=d.scale.x,p=d.scale.y,g=f.trim,y=f.orig;g?(h=g.x-d.anchor.x*y.width,o=h+g.width,c=g.y-d.anchor.y*y.height,l=c+g.height):(o=y.width*(1-d.anchor.x),h=y.width*-d.anchor.x,l=y.height*(1-d.anchor.y),c=y.height*-d.anchor.y),r[a]=h*m,r[a+1]=c*p,r[a+n]=o*m,r[a+n+1]=c*p,r[a+n*2]=o*m,r[a+n*2+1]=l*p,r[a+n*3]=h*m,r[a+n*3+1]=l*p,a+=n*4}}uploadPosition(t,e,s,r,n,a){for(let o=0;o<s;o++){const h=t[e+o].position;r[a]=h.x,r[a+1]=h.y,r[a+n]=h.x,r[a+n+1]=h.y,r[a+n*2]=h.x,r[a+n*2+1]=h.y,r[a+n*3]=h.x,r[a+n*3+1]=h.y,a+=n*4}}uploadRotation(t,e,s,r,n,a){for(let o=0;o<s;o++){const h=t[e+o].rotation;r[a]=h,r[a+n]=h,r[a+n*2]=h,r[a+n*3]=h,a+=n*4}}uploadUvs(t,e,s,r,n,a){for(let o=0;o<s;++o){const h=t[e+o]._texture._uvs;h?(r[a]=h.x0,r[a+1]=h.y0,r[a+n]=h.x1,r[a+n+1]=h.y1,r[a+n*2]=h.x2,r[a+n*2+1]=h.y2,r[a+n*3]=h.x3,r[a+n*3+1]=h.y3,a+=n*4):(r[a]=0,r[a+1]=0,r[a+n]=0,r[a+n+1]=0,r[a+n*2]=0,r[a+n*2+1]=0,r[a+n*3]=0,r[a+n*3+1]=0,a+=n*4)}}uploadTint(t,e,s,r,n,a){for(let o=0;o<s;++o){const h=t[e+o],l=Wt.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);r[a]=l,r[a+n]=l,r[a+n*2]=l,r[a+n*3]=l,a+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}w1.extension={name:"particle",type:gt.RendererPlugin};St.add(w1);var Jc=(i=>(i[i.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",i[i.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",i))(Jc||{});const ch={willReadFrequently:!0},Pr=class Ct{static get experimentalLetterSpacingSupported(){let t=Ct._experimentalLetterSpacingSupported;if(t!==void 0){const e=_t.ADAPTER.getCanvasRenderingContext2D().prototype;t=Ct._experimentalLetterSpacingSupported="letterSpacing"in e||"textLetterSpacing"in e}return t}constructor(t,e,s,r,n,a,o,h,l){this.text=t,this.style=e,this.width=s,this.height=r,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(t,e,s,r=Ct._canvas){s=s??e.wordWrap;const n=e.toFontString(),a=Ct.measureFont(n);a.fontSize===0&&(a.fontSize=e.fontSize,a.ascent=e.fontSize);const o=r.getContext("2d",ch);o.font=n;const h=(s?Ct.wordWrap(t,e,r):t).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let m=0;m<h.length;m++){const p=Ct._measureText(h[m],e.letterSpacing,o);l[m]=p,c=Math.max(c,p)}let u=c+e.strokeThickness;e.dropShadow&&(u+=e.dropShadowDistance);const d=e.lineHeight||a.fontSize+e.strokeThickness;let f=Math.max(d,a.fontSize+e.strokeThickness*2)+e.leading+(h.length-1)*(d+e.leading);return e.dropShadow&&(f+=e.dropShadowDistance),new Ct(t,e,u,f,h,l,d+e.leading,c,a)}static _measureText(t,e,s){let r=!1;Ct.experimentalLetterSpacingSupported&&(Ct.experimentalLetterSpacing?(s.letterSpacing=`${e}px`,s.textLetterSpacing=`${e}px`,r=!0):(s.letterSpacing="0px",s.textLetterSpacing="0px"));let n=s.measureText(t).width;return n>0&&(r?n-=e:n+=(Ct.graphemeSegmenter(t).length-1)*e),n}static wordWrap(t,e,s=Ct._canvas){const r=s.getContext("2d",ch);let n=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=e,u=Ct.collapseSpaces(c),d=Ct.collapseNewlines(c);let f=!u;const m=e.wordWrapWidth+l, Line truncated
`:t,t}static getFromCache(t,e,s,r){let n=s[t];return typeof n!="number"&&(n=Ct._measureText(t,e,r)+e,s[t]=n),n}static collapseSpaces(t){return t==="normal"||t==="pre-line"}static collapseNewlines(t){return t==="normal"}static trimRight(t){if(typeof t!="string")return"";for(let e=t.length-1;e>=0;e--){const s=t[e];if(!Ct.isBreakingSpace(s))break;t=t.slice(0,-1)}return t}static isNewline(t){return typeof t!="string"?!1:Ct._newlines.includes(t.charCodeAt(0))}static isBreakingSpace(t,e){return typeof t!="string"?!1:Ct._breakingSpaces.includes(t.charCodeAt(0))}static tokenize(t){const e=[];let s="";if(typeof t!="string")return e;for(let r=0;r<t.length;r++){const n=t[r],a=t[r+1];if(Ct.isBreakingSpace(n,a)||Ct.isNewline(n)){s!==""&&(e.push(s),s=""),e.push(n);continue}s+=n}return s!==""&&e.push(s),e}static canBreakWords(t,e){return e}static canBreakChars(t,e,s,r,n){return!0}static wordWrapSplit(t){return Ct.graphemeSegmenter(t)}static measureFont(t){if(Ct._fonts[t])return Ct._fonts[t];const e={ascent:0,descent:0,fontSize:0},s=Ct._canvas,r=Ct._context;r.font=t;const n=Ct.METRICS_STRING+Ct.BASELINE_SYMBOL,a=Math.ceil(r.measureText(n).width);let o=Math.ceil(r.measureText(Ct.BASELINE_SYMBOL).width);const h=Math.ceil(Ct.HEIGHT_MULTIPLIER*o);if(o=o*Ct.BASELINE_MULTIPLIER|0,a===0||h===0)return Ct._fonts[t]=e,e;s.width=a,s.height=h,r.fillStyle="#f00",r.fillRect(0,0,a,h),r.font=t,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(n,0,o);const l=r.getImageData(0,0,a,h).data,c=l.length,u=a*4;let d=0,f=0,m=!1;for(d=0;d<o;++d){for(let p=0;p<u;p+=4)if(l[f+p]!==255){m=!0;break}if(!m)f+=u;else break}for(e.ascent=o-d,f=c-u,m=!1,d=h;d>o;--d){for(let p=0;p<u;p+=4)if(l[f+p]!==255){m=!0;break}if(!m)f-=u;else break}return e.descent=d-o,e.fontSize=e.ascent+e.descent,Ct._fonts[t]=e,e}static clearMetrics(t=""){t?delete Ct._fonts[t]:Ct._fonts={}}static get _canvas(){var t;if(!Ct.__canvas){let e;try{const s=new OffscreenCanvas(0,0);if((t=s.getContext("2d",ch))!=null&&t.measureText)return Ct.__canvas=s,s;e=_t.ADAPTER.createCanvas()}catch{e=_t.ADAPTER.createCanvas()}e.width=e.height=10,Ct.__canvas=e}return Ct.__canvas}static get _context(){return Ct.__context||(Ct.__context=Ct._canvas.getContext("2d",ch)),Ct.__context}};Pr.METRICS_STRING="|ÉqÅ",Pr.BASELINE_SYMBOL="M",Pr.BASELINE_MULTIPLIER=1.4,Pr.HEIGHT_MULTIPLIER=2,Pr.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return t=>[...i.segment(t)].map(e=>e.segment)}return i=>[...i]})(),Pr.experimentalLetterSpacing=!1,Pr._fonts={},Pr._newlines=[10,13],Pr._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Hi=Pr;const P2=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],T1=class Ao{constructor(t){this.styleID=0,this.reset(),Ff(this,t,t)}clone(){const t={};return Ff(t,this,Ao.defaultStyle),new Ao(t)}reset(){Ff(this,Ao.defaultStyle,Ao.defaultStyle)}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(t){const e=Rf(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}get fill(){return this._fill}set fill(t){const e=Rf(t);this._fill!==e&&(this._fill=e,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(t){M2(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}get letterSpacing(){return this._lett Line truncated
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
@@ -1013,7 +1031,7 @@ void main(void)
fragmentColor = texSample * uColor;
}
`,MM=`#version 300 es
`,G2=`#version 300 es
#define SHADER_NAME Tiling-Sprite-300
precision lowp float;
@@ -1033,7 +1051,7 @@ void main(void)
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,RM=`#version 100
`,$2=`#version 100
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
@@ -1066,7 +1084,7 @@ void main(void)
gl_FragColor = texSample * uColor;
}
`,cx=`#version 100
`,$x=`#version 100
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
@@ -1086,7 +1104,7 @@ void main(void)
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,FM=`#version 100
`,H2=`#version 100
#define SHADER_NAME Tiling-Sprite-Simple-100
precision lowp float;
@@ -1101,7 +1119,7 @@ void main(void)
vec4 texSample = texture2D(uSampler, vTextureCoord);
gl_FragColor = texSample * uColor;
}
`;const lh=new fe;class K_ extends Hc{constructor(t){super(t),t.runners.contextChange.add(this),this.quad=new s_,this.state=jr.for2d()}contextChange(){const t=this.renderer,e={globals:t.globalUniforms};this.simpleShader=Js.from(cx,FM,e),this.shader=t.context.webGLVersion>1?Js.from(MM,PM,e):Js.from(cx,RM,e)}render(t){const e=this.renderer,s=this.quad;let r=s.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y);const n=t.uvRespectAnchor?t.anchor.x:0,a=t.uvRespectAnchor?t.anchor.y:0;r=s.uvs,r[0]=r[6]=-n,r[1]=r[3]=-a,r[2]=r[4]=1-n,r[5]=r[7]=1-a,s.invalidate();const o=t._texture,h=o.baseTexture,l=h.alphaMode>0,c=t.tileTransform.localTransform,u=t.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[e.CONTEXT_UID]?d=h.wrapMode!==Is.CLAMP:h.wrapMode===Is.CLAMP&&(h.wrapMode=Is.REPEAT));const f=d?this.simpleShader:this.shader,m=o.width,p=o.height,g=t._width,y=t._height;lh.set(c.a*m/g,c.b*m/y,c.c*p/g,c.d*p/y,c.tx/g,c.ty/y),lh.invert(),d?lh.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=lh.toArray(!0),f.uniforms.uColor=Wt.shared.setValue(t.tint).premultiply(t.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,e.shader.bind(f),e.geometry.bind(s),this.state.blendMode=Gv(t.blendMode,l),e.state.set(this.state),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}K_.extension={name:"tilingSprite",type:gt.RendererPlugin};St.add(K_);const Z_=class Co{constructor(t,e,s){this.linkedSheets=[],(t instanceof Lt||t instanceof Nt)&&(t={texture:t,data:e,resolutionFilename:s});const{texture:r,data:n,resolutionFilename:a=null,cachePrefix:o=""}=t;this.cachePrefix=o,this._texture=r instanceof Nt?r:null,this.baseTexture=r instanceof Lt?r:this._texture.baseTexture,this.textures={},this.animations={},this.data=n;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(t=null){const{scale:e}=this.data.meta;let s=Ci(t,null);return s===null&&(s=typeof e=="number"?e:parseFloat(e??"1")),s!==1&&this.baseTexture.setResolution(s),s}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Co.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(t){let e=t;const s=Co.BATCH_SIZE;for(;e-t<s&&e<this._frameKeys.length;){const r=this._frameKeys[e],n=this._frames[r],a=n.frame;if(a){let o=null,h=null;const l=n.trimmed!==!1&&n.sourceSize?n.sourceSize:n.frame,c=new Ut(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);n.rotated?o=new Ut(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):o=new Ut(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),n.trimmed!==!1&&n.spriteSourceSize&&(h=new Ut(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[r]=new Nt(this.baseTexture,o,c,h,n.rotated?2:0,n.anchor,n.borders),Nt.addToCache(this.textures[r],this.cachePrefix+r.toString())}e++}}_processAnimations(){const t=this.data.animations||{};for(const e in t){this.animations[e]=[];for(let s=0;s<t[e].length;s++){const r=t[e][s];this.animations[e].push(this.textures[r])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Co.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Co.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var e;for(const s in this.textures)this.textures[s].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((e=this._texture)==null||e.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};Z_.BATCH_SIZE=1e3;let ux=Z_;const kM=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function J_(i,t,e){const s={};if(i.forEach(r=>{s[r]=t}),Object.keys(t.textures).forEach(r=>{s[`${t.cachePrefix}${r}`]=t.textures[r]}),!e){const r=ye.dirname(i[0]);t.linkedSheets.forEach((n,a)=>{Object.assign(s,J_([`${r}/${t.data.meta.related_multi_packs[a]}`],n,!0))})}return s}const LM={extension:gt.Asset,cache:{test:i=>i instanceof ux,getCacheableAssets:(i,t)=>J_(i,t,!1)},resolver:{test:i=>{const t=i.split("?")[0].split("."),e=t.pop(),s=t.pop();return e==="json"&&kM.includes(s)},parse:i=>{var e;const Line truncated
`;const uh=new fe;class P1 extends zc{constructor(t){super(t),t.runners.contextChange.add(this),this.quad=new B_,this.state=jr.for2d()}contextChange(){const t=this.renderer,e={globals:t.globalUniforms};this.simpleShader=Js.from($x,H2,e),this.shader=t.context.webGLVersion>1?Js.from(G2,Y2,e):Js.from($x,$2,e)}render(t){const e=this.renderer,s=this.quad;let r=s.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y);const n=t.uvRespectAnchor?t.anchor.x:0,a=t.uvRespectAnchor?t.anchor.y:0;r=s.uvs,r[0]=r[6]=-n,r[1]=r[3]=-a,r[2]=r[4]=1-n,r[5]=r[7]=1-a,s.invalidate();const o=t._texture,h=o.baseTexture,l=h.alphaMode>0,c=t.tileTransform.localTransform,u=t.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[e.CONTEXT_UID]?d=h.wrapMode!==Ps.CLAMP:h.wrapMode===Ps.CLAMP&&(h.wrapMode=Ps.REPEAT));const f=d?this.simpleShader:this.shader,m=o.width,p=o.height,g=t._width,y=t._height;uh.set(c.a*m/g,c.b*m/y,c.c*p/g,c.d*p/y,c.tx/g,c.ty/y),uh.invert(),d?uh.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=uh.toArray(!0),f.uniforms.uColor=Wt.shared.setValue(t.tint).premultiply(t.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,e.shader.bind(f),e.geometry.bind(s),this.state.blendMode=w_(t.blendMode,l),e.state.set(this.state),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}P1.extension={name:"tilingSprite",type:gt.RendererPlugin};St.add(P1);const M1=class Co{constructor(t,e,s){this.linkedSheets=[],(t instanceof Lt||t instanceof Nt)&&(t={texture:t,data:e,resolutionFilename:s});const{texture:r,data:n,resolutionFilename:a=null,cachePrefix:o=""}=t;this.cachePrefix=o,this._texture=r instanceof Nt?r:null,this.baseTexture=r instanceof Lt?r:this._texture.baseTexture,this.textures={},this.animations={},this.data=n;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(t=null){const{scale:e}=this.data.meta;let s=Ci(t,null);return s===null&&(s=typeof e=="number"?e:parseFloat(e??"1")),s!==1&&this.baseTexture.setResolution(s),s}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Co.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(t){let e=t;const s=Co.BATCH_SIZE;for(;e-t<s&&e<this._frameKeys.length;){const r=this._frameKeys[e],n=this._frames[r],a=n.frame;if(a){let o=null,h=null;const l=n.trimmed!==!1&&n.sourceSize?n.sourceSize:n.frame,c=new Ut(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);n.rotated?o=new Ut(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):o=new Ut(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),n.trimmed!==!1&&n.spriteSourceSize&&(h=new Ut(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[r]=new Nt(this.baseTexture,o,c,h,n.rotated?2:0,n.anchor,n.borders),Nt.addToCache(this.textures[r],this.cachePrefix+r.toString())}e++}}_processAnimations(){const t=this.data.animations||{};for(const e in t){this.animations[e]=[];for(let s=0;s<t[e].length;s++){const r=t[e][s];this.animations[e].push(this.textures[r])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Co.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Co.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var e;for(const s in this.textures)this.textures[s].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((e=this._texture)==null||e.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};M1.BATCH_SIZE=1e3;let Hx=M1;const W2=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function R1(i,t,e){const s={};if(i.forEach(r=>{s[r]=t}),Object.keys(t.textures).forEach(r=>{s[`${t.cachePrefix}${r}`]=t.textures[r]}),!e){const r=ye.dirname(i[0]);t.linkedSheets.forEach((n,a)=>{Object.assign(s,R1([`${r}/${t.data.meta.related_multi_packs[a]}`],n,!0))})}return s}const z2={extension:gt.Asset,cache:{test:i=>i instanceof Hx,getCacheableAssets:(i,t)=>R1(i,t,!1)},resolver:{test:i=>{const t=i.split("?")[0].split("."),e=t.pop(),s=t.pop();return e==="json"&&W2.includes(s)},parse:i=>{var e;const Line truncated
varying vec2 vTextureCoord;\r
uniform sampler2D uSampler;\r
\r
@@ -1139,7 +1157,7 @@ void main(void) {\r
// NPM Textures, NPM outputs\r
gl_FragColor = vec4(uColor.rgb, coverage);\r
}\r
`,XM=`// Mesh material default fragment\r
`,Q2=`// Mesh material default fragment\r
attribute vec2 aVertexPosition;\r
attribute vec2 aTextureCoord;\r
\r
@@ -1155,35 +1173,17 @@ void main(void)\r
\r
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
}\r
`;const dx=[],fx=[],mx=[],VM=class t1 extends fs{constructor(t,e={}){super();const{align:s,tint:r,maxWidth:n,letterSpacing:a,fontName:o,fontSize:h}=Object.assign({},t1.styleDefaults,e);if(!Yi.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=s,this._tintColor=new Wt(r),this._font=void 0,this._fontName=o,this._fontSize=h,this.text=t,this._maxWidth=n,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new fi(()=>{this.dirty=!0},this,0,0),this._roundPixels=_t.ROUND_PIXELS,this.dirty=!0,this._resolution=_t.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var I;const t=Yi.available[this._fontName],e=this.fontSize,s=e/t.size,r=new Kt,n=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",l=Q_(h),c=this._maxWidth*t.size/e,u=t.distanceFieldType==="none"?dx:fx;let d=null,f=0,m=0,p=0,g=-1,y=0,_=0,v=0,b=0;for(let C=0;C<l.length;C++){const R=l[C],F=Ch(R);if(/(?:\s)/.test(R)&&(g=C,y=f,b++),R==="\r"||R===`
`){a.push(f),o.push(-1),m=Math.max(m,f),++p,++_,r.x=0,r.y+=t.lineHeight,d=null,b=0;continue}const D=t.chars[F];if(!D)continue;d&&D.kerning[d]&&(r.x+=D.kerning[d]);const M=mx.pop()||{texture:Nt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Kt};M.texture=D.texture,M.line=p,M.charCode=F,M.position.x=Math.round(r.x+D.xOffset+this._letterSpacing/2),M.position.y=Math.round(r.y+D.yOffset),M.prevSpaces=b,n.push(M),f=M.position.x+Math.max(D.xAdvance-D.xOffset,D.texture.orig.width),r.x+=D.xAdvance+this._letterSpacing,v=Math.max(v,D.yOffset+D.texture.height),d=F,g!==-1&&c>0&&r.x>c&&(++_,Ma(n,1+g-_,1+C-g),C=g,g=-1,a.push(y),o.push(n.length>0?n[n.length-1].prevSpaces:0),m=Math.max(m,y),p++,r.x=0,r.y+=t.lineHeight,d=null,b=0)}const T=l[l.length-1];T!=="\r"&&T!==`
`&&(/(?:\s)/.test(T)&&(f=y),a.push(f),m=Math.max(m,f),o.push(-1));const S=[];for(let C=0;C<=p;C++){let R=0;this._align==="right"?R=m-a[C]:this._align==="center"?R=(m-a[C])/2:this._align==="justify"&&(R=o[C]<0?0:(m-a[C])/o[C]),S.push(R)}const w=n.length,E={},A=[],P=this._activePagesMeshData;u.push(...P);for(let C=0;C<w;C++){const R=n[C].texture,F=R.baseTexture.uid;if(!E[F]){let D=u.pop();if(!D){const O=new qc;let k,N;t.distanceFieldType==="none"?(k=new Jo(Nt.EMPTY),N=It.NORMAL):(k=new Jo(Nt.EMPTY,{program:ur.from(XM,UM),uniforms:{uFWidth:0}}),N=It.NORMAL_NPM);const B=new Wn(O,k);B.blendMode=N,D={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:B,vertices:null,uvs:null,indices:null}}D.index=0,D.indexCount=0,D.vertexCount=0,D.uvsCount=0,D.total=0;const{_textureCache:M}=this;M[F]=M[F]||new Nt(R.baseTexture),D.mesh.texture=M[F],D.mesh.tint=this._tintColor.value,A.push(D),E[F]=D}E[F].total++}for(let C=0;C<P.length;C++)A.includes(P[C])||this.removeChild(P[C].mesh);for(let C=0;C<A.length;C++)A[C].mesh.parent!==this&&this.addChild(A[C].mesh);this._activePagesMeshData=A;for(const C in E){const R=E[C],F=R.total;if(!(((I=R.indices)==null?void 0:I.length)>6*F)||R.vertices.length<Wn.BATCHABLE_SIZE*2)R.vertices=new Float32Array(8*F),R.uvs=new Float32Array(8*F),R.indices=new Uint16Array(6*F);else{const D=R.total,M=R.vertices;for(let O=D*4*2;O<M.length;O++)M[O]=0}R.mesh.size=6*F}for(let C=0;C<w;C++){const R=n[C];let F=R.position.x+S[R.line]*(this._align==="justify"?R.prevSpaces:1);this._roundPixels&&(F=Math.round(F));const D=F*s,M=R.position.y*s,O=R.texture,k=E[O.baseTexture.uid],N=O.frame,B=O._uvs,L=k.index++;k.indices[L*6+0]=0+L*4,k.indices[L*6+1]=1+L*4,k.indices[L*6+2]=2+L*4,k.indices[L*6+3]=0+L*4,k.indices[L*6+4]=2+L*4,k.indices[L*6+5]=3+L*4,k.vertices[L*8+0]=D,k.vertices[L*8+1]=M,k.vertices[L*8+2]=D+N.width*s,k.vertices[L*8+3]=M,k.vertices[L*8+4]=D+N.width*s,k.vertices[L*8+5]=M+N.height*s,k.vertices[L*8+6]=D,k.vertices[L*8+7]=M+N.height*s,k.uvs[L*8+0]=B.x0,k.uvs[L*8+1]=B.y0,k.uvs[L*8+2]=B.x1,k.uvs[L*8+3]=B.y1,k.uvs[L*8+4]=B.x2,k.uvs[L*8+5]=B.y2,k.uvs[L*8+6]=B.x3,k.uvs[L*8+7]=B.y3}this._textWidth=m*s,this._textHeight=(r.y+t.lineHeight)*s;for(const C in E){const R=E[C];if(this.anchor.x!==0||this.anchor.y!==0){let O=0;const k=this._textWidth*this.anchor.x,N=this._textHeight*this.anchor.y;for(let B=0;B<R.total;B++)R.vertices[O++]-=k,R.vertices[O++]-=N,R.vertices[O++]-=k,R.vertices[O++]-=N,R.vertices[O++]-=k,R.vertices[O++]-=N,R.vertices[O++]-=k,R.vertices[O++]-=N}this._maxLineHeight=v*s;const F=R.mesh.geometry.getBuffer("aVertexPosition"),D=R.mesh.geometry.getBuffer("aTextureCoord"),M=R.mesh.geometry.getIndex();F.data=R.vertices,D.data=R.uvs,M.data=R.indices,F.update(),D.update(),M.update()}for(let C=0;C<n.length;C++)mx.push(n[C]);this._font=t,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(t){this._autoResolution&&this._resolution!==t.resolution&&(this._resolution=t.resolution,this.dirty=!0);const{distanceFieldRange:e,distanceFieldType:s,size:r}=Yi.available[this._fontName];if(s!=="none"){const{a:n,b:a,c:o,d:h}=this.worldTransform,l=Math.sqrt(n*n+a*a),c=Math.sqrt(o*o+h*h),u=(Math.abs(l)+Math.abs(c))/2,d=this.fontSize/r,f=t._view.resolution;for(const m of this._activePagesMeshData)m.mesh.shader.uniforms.uFWidth=u*e*d*f}super._render(t)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const t=Yi.available[this._fontName];if(!t)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==t&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(t){if(this.tint!==t){this._tintColor.setValue(t);for(let e=0;e<this._activePagesMeshData.length;e++)this._activePagesMeshData[e].mesh.tint=t}}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.dirty=!0)}get fontName(){return this._fontName}set fontName(t){if(!Yi.available[t])throw new Error(`Missing BitmapFont "${t}"`);this._fontName!==t&&(this._fontName=t,this.dirty=!0)}get fontSize(){return this._fontSize??Yi.available[this._fontName].size}set fontSize(t){this._fontSize!==t&&(this._fontSize=t,this.dirty=!0)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get text(){return this._text}set text(t){t=String(t??""),this._text!==t&&(this._text=t,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(t){t!==this._roundPixels&&(this._roundPixels=t,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(t){this._autoResolution=!1,this._res Line truncated
`;const Wx=[],zx=[],jx=[],tF=class k1 extends fs{constructor(t,e={}){super();const{align:s,tint:r,maxWidth:n,letterSpacing:a,fontName:o,fontSize:h}=Object.assign({},k1.styleDefaults,e);if(!Yi.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=s,this._tintColor=new Wt(r),this._font=void 0,this._fontName=o,this._fontSize=h,this.text=t,this._maxWidth=n,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new gi(()=>{this.dirty=!0},this,0,0),this._roundPixels=_t.ROUND_PIXELS,this.dirty=!0,this._resolution=_t.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var I;const t=Yi.available[this._fontName],e=this.fontSize,s=e/t.size,r=new Kt,n=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",l=F1(h),c=this._maxWidth*t.size/e,u=t.distanceFieldType==="none"?Wx:zx;let d=null,f=0,m=0,p=0,g=-1,y=0,_=0,v=0,b=0;for(let C=0;C<l.length;C++){const R=l[C],F=Ih(R);if(/(?:\s)/.test(R)&&(g=C,y=f,b++),R==="\r"||R===`
`){a.push(f),o.push(-1),m=Math.max(m,f),++p,++_,r.x=0,r.y+=t.lineHeight,d=null,b=0;continue}const D=t.chars[F];if(!D)continue;d&&D.kerning[d]&&(r.x+=D.kerning[d]);const M=jx.pop()||{texture:Nt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Kt};M.texture=D.texture,M.line=p,M.charCode=F,M.position.x=Math.round(r.x+D.xOffset+this._letterSpacing/2),M.position.y=Math.round(r.y+D.yOffset),M.prevSpaces=b,n.push(M),f=M.position.x+Math.max(D.xAdvance-D.xOffset,D.texture.orig.width),r.x+=D.xAdvance+this._letterSpacing,v=Math.max(v,D.yOffset+D.texture.height),d=F,g!==-1&&c>0&&r.x>c&&(++_,Ma(n,1+g-_,1+C-g),C=g,g=-1,a.push(y),o.push(n.length>0?n[n.length-1].prevSpaces:0),m=Math.max(m,y),p++,r.x=0,r.y+=t.lineHeight,d=null,b=0)}const T=l[l.length-1];T!=="\r"&&T!==`
`&&(/(?:\s)/.test(T)&&(f=y),a.push(f),m=Math.max(m,f),o.push(-1));const S=[];for(let C=0;C<=p;C++){let R=0;this._align==="right"?R=m-a[C]:this._align==="center"?R=(m-a[C])/2:this._align==="justify"&&(R=o[C]<0?0:(m-a[C])/o[C]),S.push(R)}const w=n.length,E={},A=[],P=this._activePagesMeshData;u.push(...P);for(let C=0;C<w;C++){const R=n[C].texture,F=R.baseTexture.uid;if(!E[F]){let D=u.pop();if(!D){const O=new Zc;let k,N;t.distanceFieldType==="none"?(k=new rl(Nt.EMPTY),N=It.NORMAL):(k=new rl(Nt.EMPTY,{program:ur.from(Q2,J2),uniforms:{uFWidth:0}}),N=It.NORMAL_NPM);const B=new zn(O,k);B.blendMode=N,D={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:B,vertices:null,uvs:null,indices:null}}D.index=0,D.indexCount=0,D.vertexCount=0,D.uvsCount=0,D.total=0;const{_textureCache:M}=this;M[F]=M[F]||new Nt(R.baseTexture),D.mesh.texture=M[F],D.mesh.tint=this._tintColor.value,A.push(D),E[F]=D}E[F].total++}for(let C=0;C<P.length;C++)A.includes(P[C])||this.removeChild(P[C].mesh);for(let C=0;C<A.length;C++)A[C].mesh.parent!==this&&this.addChild(A[C].mesh);this._activePagesMeshData=A;for(const C in E){const R=E[C],F=R.total;if(!(((I=R.indices)==null?void 0:I.length)>6*F)||R.vertices.length<zn.BATCHABLE_SIZE*2)R.vertices=new Float32Array(8*F),R.uvs=new Float32Array(8*F),R.indices=new Uint16Array(6*F);else{const D=R.total,M=R.vertices;for(let O=D*4*2;O<M.length;O++)M[O]=0}R.mesh.size=6*F}for(let C=0;C<w;C++){const R=n[C];let F=R.position.x+S[R.line]*(this._align==="justify"?R.prevSpaces:1);this._roundPixels&&(F=Math.round(F));const D=F*s,M=R.position.y*s,O=R.texture,k=E[O.baseTexture.uid],N=O.frame,B=O._uvs,L=k.index++;k.indices[L*6+0]=0+L*4,k.indices[L*6+1]=1+L*4,k.indices[L*6+2]=2+L*4,k.indices[L*6+3]=0+L*4,k.indices[L*6+4]=2+L*4,k.indices[L*6+5]=3+L*4,k.vertices[L*8+0]=D,k.vertices[L*8+1]=M,k.vertices[L*8+2]=D+N.width*s,k.vertices[L*8+3]=M,k.vertices[L*8+4]=D+N.width*s,k.vertices[L*8+5]=M+N.height*s,k.vertices[L*8+6]=D,k.vertices[L*8+7]=M+N.height*s,k.uvs[L*8+0]=B.x0,k.uvs[L*8+1]=B.y0,k.uvs[L*8+2]=B.x1,k.uvs[L*8+3]=B.y1,k.uvs[L*8+4]=B.x2,k.uvs[L*8+5]=B.y2,k.uvs[L*8+6]=B.x3,k.uvs[L*8+7]=B.y3}this._textWidth=m*s,this._textHeight=(r.y+t.lineHeight)*s;for(const C in E){const R=E[C];if(this.anchor.x!==0||this.anchor.y!==0){let O=0;const k=this._textWidth*this.anchor.x,N=this._textHeight*this.anchor.y;for(let B=0;B<R.total;B++)R.vertices[O++]-=k,R.vertices[O++]-=N,R.vertices[O++]-=k,R.vertices[O++]-=N,R.vertices[O++]-=k,R.vertices[O++]-=N,R.vertices[O++]-=k,R.vertices[O++]-=N}this._maxLineHeight=v*s;const F=R.mesh.geometry.getBuffer("aVertexPosition"),D=R.mesh.geometry.getBuffer("aTextureCoord"),M=R.mesh.geometry.getIndex();F.data=R.vertices,D.data=R.uvs,M.data=R.indices,F.update(),D.update(),M.update()}for(let C=0;C<n.length;C++)jx.push(n[C]);this._font=t,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(t){this._autoResolution&&this._resolution!==t.resolution&&(this._resolution=t.resolution,this.dirty=!0);const{distanceFieldRange:e,distanceFieldType:s,size:r}=Yi.available[this._fontName];if(s!=="none"){const{a:n,b:a,c:o,d:h}=this.worldTransform,l=Math.sqrt(n*n+a*a),c=Math.sqrt(o*o+h*h),u=(Math.abs(l)+Math.abs(c))/2,d=this.fontSize/r,f=t._view.resolution;for(const m of this._activePagesMeshData)m.mesh.shader.uniforms.uFWidth=u*e*d*f}super._render(t)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const t=Yi.available[this._fontName];if(!t)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==t&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(t){if(this.tint!==t){this._tintColor.setValue(t);for(let e=0;e<this._activePagesMeshData.length;e++)this._activePagesMeshData[e].mesh.tint=t}}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.dirty=!0)}get fontName(){return this._fontName}set fontName(t){if(!Yi.available[t])throw new Error(`Missing BitmapFont "${t}"`);this._fontName!==t&&(this._fontName=t,this.dirty=!0)}get fontSize(){return this._fontSize??Yi.available[this._fontName].size}set fontSize(t){this._fontSize!==t&&(this._fontSize=t,this.dirty=!0)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get text(){return this._text}set text(t){t=String(t??""),this._text!==t&&(this._text=t,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(t){t!==this._roundPixels&&(this._roundPixels=t,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(t){this._autoResolution=!1,this._res Line truncated
@font-face {
font-family: "${e.family}";
src: url('${e.dataSrc}');
font-weight: ${e.weight};
font-style: ${e.style};
font-display: ${e.display};
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(t){this._stylesheet!==t&&(this._stylesheet=t,this.styleID++)}normalizeColor(t){return Array.isArray(t)&&(t=kA(t)),typeof t=="number"?FA(t):t}dropShadowToCSS(){let t=this.normalizeColor(this.dropShadowColor);const e=this.dropShadowAlpha,s=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),r=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);t.startsWith("#")&&e<1&&(t+=(e*255|0).toString(16).padStart(2,"0"));const n=`${s}px ${r}px`;return this.dropShadowBlur>0?`text-shadow: ${n} ${this.dropShadowBlur}px ${t}`:`text-shadow: ${n} ${t}`}reset(){Object.assign(this,ma.defaultOptions)}onBeforeDraw(){const{fontsDirty:t}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&t?new Promise(e=>setTimeout(e,100)):Promise.resolve()}get isSafari(){const{userAgent:t}=_t.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(t)}set fillGradientStops(t){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(t){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(t){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(t){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(t){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(t){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(t){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Um.availableFonts={},Um.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let Mf=Um;const hh=class pa extends to{constructor(t="",e={}){super(Nt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const s=new Image,r=Nt.from(s,{scaleMode:_t.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Ut,r.trim=new Ut,this.texture=r;const n="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(n,"svg"),h=document.createElementNS(n,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=pa.defaultMaxWidth,this.maxHeight=pa.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=s,this._loadImage=new Image,this._autoResolution=pa.defaultAutoResolution,this._resolution=pa.defaultResolution??_t.RESOLUTION,this.text=t,this.style=e}measureText(t){var c,u;const{text:e,style:s,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},t);Object.assign(this._domElement,{innerHTML:e,style:s.toCSS(r)}),this._styleElement.textContent=s.toGlobalCSS(),document.body.appendChild(this._svgRoot);const n=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=n;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),e!==this._text&&(this._domElement.innerHTML=this._text),s!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(r)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+s.padding*2,height:l+s.padding*2}}async updateText(t=!0){const{style:e,_image:s,_loadImage:r}=this;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),!this.dirty&&t)return;const{width:n,height:a}=this.measureText();s.width=r.width=Math.ceil(Math.max(1,n)),s.height=r.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{r.onload=async()=>{if(o<this._updateID){h();return}await e.onBeforeDraw(),s.src=r.src,r.onload=null,r.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret Line truncated
* shared v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/const tc=typeof window<"u",hn=(i,t=!1)=>t?Symbol.for(i):Symbol(i),$M=(i,t,e)=>HM({l:i,k:t,s:e}),HM=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ne=i=>typeof i=="number"&&isFinite(i),e1=i=>Dp(i)==="[object Date]",Ya=i=>Dp(i)==="[object RegExp]",Op=i=>de(i)&&Object.keys(i).length===0,Le=Object.assign,WM=Object.create,he=(i=null)=>WM(i);let px;const Ji=()=>px||(px=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:he()),zM=Object.prototype.hasOwnProperty;function Zs(i,t){return zM.call(i,t)}function qe(i,t){const e=i[t];return Zs(i,t)?e:void 0}function s1(i){return Zs(Object.prototype,i)}const _e=Array.isArray,ve=i=>typeof i=="function",Et=i=>typeof i=="string",ie=i=>typeof i=="boolean",se=i=>i!==null&&typeof i=="object",jM=i=>se(i)&&ve(i.then)&&ve(i.catch),r1=Object.prototype.toString,Dp=i=>r1.call(i),de=i=>Dp(i)==="[object Object]",qM=i=>i==null?"":_e(i)||de(i)&&i.toString===r1?JSON.stringify(i,null,2):String(i);function Np(i,t=""){return i.reduce((e,s,r)=>r===0?e+s:e+t+s,"")}function KM(i,t){typeof console<"u"&&(console.warn("[intlify] "+i),t&&console.warn(t.stack))}function gx(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function ZM(i){return i.replace(/&(?![a-z0-9#]{2,6};)/gi,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const JM=/^javascript:/i,QM=/^(?:href|src|action|formaction)$/i,tR=/&#(?:x([0-9a-f]+)|(\d+));?/gi,eR=/&(?:Tab|NewLine);/g,sR=/&colon;?/gi,rR=/[\u0000-\u0020\u007f-\u009f]/g,iR=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,nR=/(^|[\s"'<>/])on(\w+\s*=)/gi,aR=/(?:^|[\s"'<>/])srcdoc\s*=/i,oR=/(^|[\s"'<>/])s(rcdoc\s*=)/gi,lR=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function hR(i,t,e){const s=t||e;if(!s)return i;const r=Number.parseInt(s,t?16:10);return r<=127?String.fromCharCode(r):i}function Up(i){const t=i.replace(tR,hR).replace(eR,"").replace(sR,":").replace(rR,"");return JM.test(t)}function cR(i){const t=/url\s*\(/gi;let e="",s=0,r;for(;(r=t.exec(i))!==null;){const n=r.index,a=t.lastIndex-1;let o=a+1,h=1,l=null;for(;o<i.length;o++){const d=i[o];if(l){d===l&&(l=null);continue}if(d==='"'||d==="'")l=d;else if(d==="(")h++;else if(d===")"&&(h--,h===0))break}if(h!==0)break;const c=i.slice(a+1,o).trim(),u=c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?c.slice(1,-1).trim():c;e+=i.slice(s,n),e+=Up(u)?"url(about:blank)":i.slice(n,o+1),s=o+1}return e+i.slice(s)}function yx(i,t){if(QM.test(i)&&Up(t))return"about:blank";const e=i.toLowerCase()==="style"?cR(t):t;return ZM(e)}function uR(i){return i=i.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(t,e,s)=>`${e}="${yx(e,s)}"`),i=i.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,e,s)=>`${e}='${yx(e,s)}'`),iR.test(i)&&(i=i.replace(nR,"$1&#111;n$2")),aR.test(i)&&(i=i.replace(oR,"$1&#115;$2")),i=i.replace(lR,(t,e,s,r)=>Up(r)?`${e}${s}about:blank`:t),i}const xx=i=>!se(i)||_e(i);function Ih(i,t){if(xx(i)||xx(t)||t===Object.prototype)throw new Error("Invalid value");const e=[{src:i,des:t}];for(;e.length;){const{src:s,des:r}=e.pop();Object.keys(s).forEach(n=>{if(n==="__proto__")return;const a=s[n];if(_e(a)){const o=[];o.length=a.length,r[n]=o,e.push({src:a,des:o})}else se(a)?((!se(r[n])||_e(r[n]))&&(r[n]=he()),e.push({src:a,des:r[n]})):r[n]=a})}}/*!
* message-compiler v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/function dR(i,t,e){return{line:i,column:t,offset:e}}function Xm(i,t,e){return{start:i,end:t}}const ae={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},fR=17;function Zc(i,t,e={}){const{domain:s,messages:r,args:n}=e,a=i,o=new SyntaxError(String(a));return o.code=i,t&&(o.location=t),o.domain=s,o}function mR(i){throw i}const Sr=" ",pR="\r",is=`
`,gR="\u2028",yR="\u2029";function xR(i){const t=i;let e=0,s=1,r=1,n=0;const a=w=>t[w]===pR&&t[w+1]===is,o=w=>t[w]===is,h=w=>t[w]===yR,l=w=>t[w]===gR,c=w=>a(w)||o(w)||h(w)||l(w),u=()=>e,d=()=>s,f=()=>r,m=()=>n,p=w=>a(w)||h(w)||l(w)?is:t[w],g=()=>p(e),y=()=>p(e+n);function _(){return n=0,c(e)&&(s++,r=0),a(e)&&e++,e++,r++,t[e]}function v(){return a(e+n)&&n++,n++,t[e+n]}function b(){e=0,s=1,r=1,n=0}function T(w=0){n=w}function S(){const w=e+n;for(;w!==e;)_();n=0}return{index:u,line:d,column:f,peekOffset:m,charAt:p,currentChar:g,currentPeek:y,next:_,peek:v,reset:b,resetPeek:T,skipToPeek:S}}const ei=void 0,bR=".",bx="'",vR="tokenizer";function _R(i,t={}){const e=t.location!==!1,s=xR(i),r=()=>s.index(),n=()=>dR(s.line(),s.column(),s.index()),a=n(),o=r(),h={currentType:13,offset:o,startLoc:a,endLoc:a,lastType:13,lastOffset:o,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},l=()=>h,{onError:c}=t;function u(U,Y,W,...j){const mt=l();if(Y.column+=W,Y.offset+=W,c){const ut=e?Xm(mt.startLoc,Y):null,vt=Zc(U,ut,{domain:vR,args:j});c(vt)}}function d(U,Y,W){U.endLoc=n(),U.currentType=Y;const j={type:Y};return e&&(j.loc=Xm(U.startLoc,U.endLoc)),W!=null&&(j.value=W),j}const f=U=>d(U,13);function m(U,Y){return U.currentChar()===Y?(U.next(),Y):(u(ae.EXPECTED_TOKEN,n(),0,Y),"")}function p(U){let Y="";for(;U.currentPeek()===Sr||U.currentPeek()===is;)Y+=U.currentPeek(),U.peek();return Y}function g(U){const Y=p(U);return U.skipToPeek(),Y}function y(U){if(U===ei)return!1;const Y=U.charCodeAt(0);return Y>=97&&Y<=122||Y>=65&&Y<=90||Y===95}function _(U){if(U===ei)return!1;const Y=U.charCodeAt(0);return Y>=48&&Y<=57}function v(U,Y){const{currentType:W}=Y;if(W!==2)return!1;p(U);const j=y(U.currentPeek());return U.resetPeek(),j}function b(U,Y){const{currentType:W}=Y;if(W!==2)return!1;p(U);const j=U.currentPeek()==="-"?U.peek():U.currentPeek(),mt=_(j);return U.resetPeek(),mt}function T(U,Y){const{currentType:W}=Y;if(W!==2)return!1;p(U);const j=U.currentPeek()===bx;return U.resetPeek(),j}function S(U,Y){const{currentType:W}=Y;if(W!==7)return!1;p(U);const j=U.currentPeek()===".";return U.resetPeek(),j}function w(U,Y){const{currentType:W}=Y;if(W!==8)return!1;p(U);const j=y(U.currentPeek());return U.resetPeek(),j}function E(U,Y){const{currentType:W}=Y;if(!(W===7||W===11))return!1;p(U);const j=U.currentPeek()===":";return U.resetPeek(),j}function A(U,Y){const{currentType:W}=Y;if(W!==9)return!1;const j=()=>{const ut=U.currentPeek();return ut==="{"?y(U.peek()):ut==="@"||ut==="|"||ut===":"||ut==="."||ut===Sr||!ut?!1:ut===is?(U.peek(),j()):I(U,!1)},mt=j();return U.resetPeek(),mt}function P(U){p(U);const Y=U.currentPeek()==="|";return U.resetPeek(),Y}function I(U,Y=!0){const W=(mt=!1,ut="")=>{const vt=U.currentPeek();return vt==="{"||vt==="@"||!vt?mt:vt==="|"?!(ut===Sr||ut===is):vt===Sr?(U.peek(),W(!0,Sr)):vt===is?(U.peek(),W(!0,is)):!0},j=W();return Y&&U.resetPeek(),j}function C(U,Y){const W=U.currentChar();return W===ei?ei:Y(W)?(U.next(),W):null}function R(U){const Y=U.charCodeAt(0);return Y>=97&&Y<=122||Y>=65&&Y<=90||Y>=48&&Y<=57||Y===95||Y===36}function F(U){return C(U,R)}function D(U){const Y=U.charCodeAt(0);return Y>=97&&Y<=122||Y>=65&&Y<=90||Y>=48&&Y<=57||Y===95||Y===36||Y===45}function M(U){return C(U,D)}function O(U){const Y=U.charCodeAt(0);return Y>=48&&Y<=57}function k(U){return C(U,O)}function N(U){const Y=U.charCodeAt(0);return Y>=48&&Y<=57||Y>=65&&Y<=70||Y>=97&&Y<=102}function B(U){return C(U,N)}function L(U){let Y="",W="";for(;Y=k(U);)W+=Y;return W}function G(U){let Y="";for(;;){const W=U.currentChar();if(W==="\\"){const j=U.peek();j==="{"||j==="}"||j==="@"||j==="|"||j==="\\"?(Y+=W+j,U.next(),U.next()):(U.resetPeek(),Y+=W,U.next())}else{if(W==="{"||W==="}"||W==="@"||W==="|"||!W)break;if(W===Sr||W===is)if(I(U))Y+=W,U.next();else{if(P(U))break;Y+=W,U.next()}else Y+=W,U.next()}}return Y}function V(U){g(U);let Y="",W="";for(;Y=M(U);)W+=Y;const j=U.currentChar();if(j&&j!=="}"&&j!==ei&&j!==Sr&&j!==is&&j!==" "){const mt=rt(U);return u(ae.INVALID_TOKEN_IN_PLACEHOLDER,n(),0,W+mt),W+mt}return U.currentChar()===ei&&u(ae.UNTERMINATED_CLOSING_BRACE,n(),0),W}function q(U){g(U);let Y="";return U.currentChar()==="-"?(U.next(),Y+=`-${L(U)}`):Y+=L(U),U.currentChar()===ei&&u(ae.UNTERMINATED_CLOSING_BRACE,n(),0),Y}function H(U){return U!==bx&&U!==is}function at(U){g(U),m(U,"'");let Y="",W="";for(;Y=C(U,H);)Y==="\\"?W+=et(U):W+=Y;const j=U.currentChar();return j===is||j===ei?(u(ae.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,n(),0),j===is&&(U.next(),m(U,"'")),W):(m(U,"'"),W)}function et(U){const Y=U.currentChar();switch(Y){case"\\":case"'":return U.next(),`\\${Y}`;case"u":return ot(U,Y,4);case"U":return ot(U,Y,6);default:return u(ae.UNKNOWN_ESCAPE_SEQUENCE,n(),0,Y),""}}function ot(U,Y,W){m(U,Y);let j="";for(let mt=0;mt<W;mt++){const ut=B(U);if(!ut){u(ae.INVALID_UNICODE_ESCAPE_SEQUENCE,n(),0,`\\${Y}${j}${U.currentChar()}`);break}j+=ut}return`\\${Y}${j}`}function ct(U){return U!=="{"&&U!=="}"&&U!==Sr&&U!==is}function rt(U){g(U);let Y="",W="";for( Line truncated
`,n=t.needIndent?t.needIndent:e!=="arrow",a=i.helpers||[],o=RR(i,{filename:s,breakLineCode:r,needIndent:n});o.push(e==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),o.indent(n),a.length>0&&(o.push(`const { ${Np(a.map(c=>`${c}: _${c}`),", ")} } = ctx`),o.newline()),o.push("return "),Ga(o,i),o.deindent(n),o.push("}"),delete i.helpers;const{code:h,map:l}=o.context();return{ast:i,code:h,map:l?l.toJSON():void 0}};function DR(i,t={}){const e=Le({},t),s=!!e.jit,r=!!e.minify,n=e.optimize==null?!0:e.optimize,o=CR(e).parse(i);return s?(n&&MR(o),r&&ga(o),{ast:o,code:""}):(PR(o,e),OR(o,e))}/*!
* core-base v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/function NR(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ji().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ji().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function zn(i){return se(i)&&Vp(i)===0&&(Zs(i,"b")||Zs(i,"body"))}const i1=["b","body"];function UR(i){return cn(i,i1)}const n1=["c","cases"];function XR(i){return cn(i,n1,[])}const a1=["s","static"];function VR(i){return cn(i,a1)}const o1=["i","items"];function YR(i){return cn(i,o1,[])}const l1=["t","type"];function Vp(i){return cn(i,l1)}const h1=["v","value"];function ch(i,t){const e=cn(i,h1);if(e!=null)return e;throw Qo(t)}const c1=["m","modifier"];function GR(i){return cn(i,c1)}const u1=["k","key"];function $R(i){const t=cn(i,u1);if(t)return t;throw Qo(6)}function cn(i,t,e){for(let s=0;s<t.length;s++){const r=t[s];if(Zs(i,r)&&i[r]!=null)return i[r]}return e}const d1=[...i1,...n1,...a1,...o1,...u1,...c1,...h1,...l1];function Qo(i){return new Error(`unhandled node type: ${i}`)}function Rf(i){return e=>HR(e,i)}function HR(i,t){const e=UR(t);if(e==null)throw Qo(0);if(Vp(e)===1){const n=XR(e);return i.plural(n.reduce((a,o)=>[...a,wx(i,o)],[]))}else return wx(i,e)}function wx(i,t){const e=VR(t);if(e!=null)return i.type==="text"?e:i.normalize([e]);{const s=YR(t).reduce((r,n)=>[...r,Vm(i,n)],[]);return i.normalize(s)}}function Vm(i,t){const e=Vp(t);switch(e){case 3:return ch(t,e);case 9:return ch(t,e);case 4:{const s=t;if(Zs(s,"k")&&s.k)return i.interpolate(i.named(s.k));if(Zs(s,"key")&&s.key)return i.interpolate(i.named(s.key));throw Qo(e)}case 5:{const s=t;if(Zs(s,"i")&&Ne(s.i))return i.interpolate(i.list(s.i));if(Zs(s,"index")&&Ne(s.index))return i.interpolate(i.list(s.index));throw Qo(e)}case 6:{const s=t,r=GR(s),n=$R(s);return i.linked(Vm(i,n),r?Vm(i,r):void 0,i.type)}case 7:return ch(t,e);case 8:return ch(t,e);default:throw new Error(`unhandled node on format message part: ${e}`)}}const WR=i=>i;let uh=he();function zR(i,t={}){let e=!1;const s=t.onError||mR;return t.onError=r=>{e=!0,s(r)},{...DR(i,t),detectError:e}}function jR(i,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Et(i)){ie(t.warnHtmlMessage)&&t.warnHtmlMessage;const s=(t.onCacheKey||WR)(i),r=uh[s];if(r)return r;const{ast:n,detectError:a}=zR(i,{...t,location:!1,jit:!0}),o=Rf(n);return a?o:uh[s]=o}else{if(!zn(i))return(()=>i);const e=i.cacheKey;if(e){const s=uh[e];return s||(uh[e]=Rf(i))}else return Rf(i)}}let tl=null;function qR(i){tl=i}function KR(i,t,e){tl&&tl.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:t,meta:e})}const ZR=JR("function:translate");function JR(i){return t=>tl&&tl.emit(i,t)}const mi={INVALID_ARGUMENT:fR,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},QR=24;function pi(i){return Zc(i,null,void 0)}function Yp(i,t){return t.locale!=null?Tx(t.locale):Tx(i.locale)}let Ff;function Tx(i){if(Et(i))return i;if(ve(i)){if(i.resolvedOnce&&Ff!=null)return Ff;if(i.constructor.name==="Function"){const t=i();if(jM(t))throw pi(mi.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ff=t}else throw pi(mi.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw pi(mi.NOT_SUPPORT_LOCALE_TYPE)}function t2(i,t,e){return[...new Set([e,..._e(t)?t:se(t)?Object.keys(t).filter(s=>s!=="default"):Et(t)?[t]:[e]])]}function e2(i,t,e){const s=Et(e)?e:el,r=i;let n;se(t)?(r.__localeChainObjectCache||(r.__localeChainObjectCache=new WeakMap),n=r.__localeChainObjectCache.get(t),n||(n=new Map,r.__localeChainObjectCache.set(t,n))):(r.__localeChainCache||(r.__localeChainCache=new Map),n=r.__localeChainCache.get(t),n||(n=new Map,r.__localeChainCache.set(t,n)));const a=n.get(s);if(a)return a;const o=[];let h=[e];for(;_e(h);)h=Sx(o,h,t);const l=_e(t)||!de(t)?t:t.default?t.default:null;return h=Et(l)?[l]:l,_e(h)&&Sx(o,h,!1),n.set(s,o),o}function Sx(i,t,e){let s=!0;for(let r=0;r<t.length&&ie(s);r++){const n=t[r];Et(n)&&(s=s2(i,t[r],e))}return s}function s2(i,t,e){let s;const r=t.split("-");do{const n=r.join("-");s=r2(i,n,e),r.splice(-1,1)}while(r.length&&s===!0);return s}function r2(i,t,e){let s=!1;if(!i.includes(t)&&(s=!0,t)){s=t[t.length-1]!=="!";const r=t.replace(/!/g,"");i.push(r),(_e(e)||de(e))&&e[r]&&(s=e[r])}return s}const un=[];un[0]={w:[0],i:[3,0],"[":[4],o:[7]};un[1]={w:[1],".":[2],"[":[4],o:[7]};un[2]={w:[2],i:[3,0],0:[3,0]};un[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};un[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};un[5]={"'":[4,0],o:8,l:[5,0]};un[6]={'"':[4,0],o:8,l:[6,0]};const i2=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function n2(i){return i2.test(i)}function a2(i){const t=i.charCodeAt(0),e=i.charCodeAt(i.length-1);return t===e&&(t===34||t===39)?i.slice(1,-1):i}function o2(i){if(i==null)return"o";switch(i.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return i;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function l2(i){const t=i.trim();return i.charAt(0)==="0"&&Line truncated
* vue-i18n v11.4.16
* (c) 2026 kazuya kawaguchi
* Released under the MIT License.
*/const L2="11.4.16";function B2(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ji().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ji().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ji().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ji().__INTLIFY_PROD_DEVTOOLS__=!1)}const ws={UNEXPECTED_RETURN_TYPE:QR,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Ps(i,...t){return Zc(i,null,void 0)}const Hm=hn("__translateVNode"),Wm=hn("__datetimeParts"),zm=hn("__numberParts"),C1=hn("__setPluralRules"),I1=hn("__injectWithOption"),xa=hn("__dispose");let P1=null;{const i=Ji().__VUE_INSTANCE_SETTERS__;_e(i)&&i.push(t=>{P1=t})}function Hi(i){return!!s1(i)}function sl(i){if(!se(i)||zn(i))return i;for(const t in i)if(Zs(i,t))if(!t.includes("."))se(i[t])&&sl(i[t]);else{const e=t.split("."),s=e.length-1;let r=i,n=!1;for(let o=0;o<s;o++){if(e[o]==="__proto__")throw new Error(`unsafe key: ${e[o]}`);if(e[o]in r||(r[e[o]]=he()),!se(r[e[o]])){n=!0;break}if(zn(r[e[o]])&&(d1.includes(e[o+1])||e[o+1]==="cacheKey")){n=!0;break}r=r[e[o]]}n||(r[e[s]]=i[t],delete i[t]);const a=r[e[s]];se(a)&&sl(a)}return i}function Gp(i,t){const{messages:e,__i18n:s,messageResolver:r,flatJson:n}=t,a=de(e)?e:_e(s)?he():{[i]:he()};if(_e(s)&&s.forEach(o=>{if("locale"in o&&"resource"in o){const{locale:h,resource:l}=o;if(h){if(Hi(h))return;a[h]=qe(a,h)||he(),Ih(l,a[h])}else Ih(l,a)}else Et(o)&&Ih(JSON.parse(o),a)}),r==null&&n)for(const o in a)Zs(a,o)&&sl(a[o]);return a}function M1(i){return i.type}function R1(i,t,e){let s=se(t.messages)?t.messages:he();"__i18nGlobal"in e&&(s=Gp(i.locale.value,{messages:s,__i18n:e.__i18nGlobal}));const r=Object.keys(s);r.length&&r.forEach(n=>{i.mergeLocaleMessage(n,s[n])});{if(se(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach(a=>{i.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(se(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach(a=>{i.mergeNumberFormat(a,t.numberFormats[a])})}}}function Ox(i){return ds(Sl,null,i,0)}function rl(){return P1??Oc()}const Dx="__INTLIFY_META__",Nx=()=>[],O2=()=>!1;let Ux=0;function Xx(i){return((t,e,s,r)=>i(e,s,rl()||void 0,r))}const D2=()=>{const i=rl();let t=null;return i&&(t=M1(i)[Dx])?{[Dx]:t}:null};function rc(i={}){const{__root:t,__injectWithOption:e}=i,s=t===void 0,r=i.flatJson,n=tc?Fb:wT;let a=ie(i.inheritLocale)?i.inheritLocale:!0;const o=n(t&&a?t.locale.value:Et(i.locale)?i.locale:el),h=n(t&&a?t.fallbackLocale.value:Et(i.fallbackLocale)||_e(i.fallbackLocale)||de(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:o.value),l=n(Gp(o.value,i)),c=n(de(i.datetimeFormats)?i.datetimeFormats:{[o.value]:{}}),u=n(de(i.numberFormats)?i.numberFormats:{[o.value]:{}});let d=t?t.missingWarn:ie(i.missingWarn)||Ya(i.missingWarn)?i.missingWarn:!0,f=t?t.fallbackWarn:ie(i.fallbackWarn)||Ya(i.fallbackWarn)?i.fallbackWarn:!0,m=t?t.fallbackRoot:ie(i.fallbackRoot)?i.fallbackRoot:!0,p=!!i.fallbackFormat,g=ve(i.missing)?i.missing:null,y=ve(i.missing)?Xx(i.missing):null,_=ve(i.postTranslation)?i.postTranslation:null,v=t?t.warnHtmlMessage:ie(i.warnHtmlMessage)?i.warnHtmlMessage:!0,b=!!i.escapeParameter;const T=t?t.modifiers:de(i.modifiers)?i.modifiers:{};let S=i.pluralRules||t&&t.pluralRules,w;w=(()=>{s&&Cx(null);const st={version:L2,locale:o.value,fallbackLocale:h.value,messages:l.value,modifiers:T,pluralRules:S,missing:y===null?void 0:y,missingWarn:d,fallbackWarn:f,fallbackFormat:p,unresolving:!0,postTranslation:_===null?void 0:_,warnHtmlMessage:v,escapeParameter:b,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};st.datetimeFormats=c.value,st.numberFormats=u.value;const lt=v2(st);return s&&Cx(lt),lt})(),dh(w,o.value,h.value);function A(){return[o.value,h.value,l.value,c.value,u.value]}const P=Mn({get:()=>o.value,set:st=>{w.locale=st,o.value=st}});function I(st){s||(w.fallbackContext=b2());try{return st()}finally{s||(w.fallbackContext=void 0)}}function C(st){I(()=>dh(w,o.value,st))}const R=Mn({get:()=>h.value,set:st=>{h.value=st,w.fallbackLocale=h.value,C(h.value)}}),F=Mn(()=>l.value),D=Mn(()=>c.value),M=Mn(()=>u.value);function O(){return ve(_)?_:null}function k(st){_=st,w.postTranslation=st}function N(){return g}function B(st){st!==null&&(y=Xx(st)),g=st,w.missing=y}const L=(st,lt,kt,Xt,Pe,Ss)=>{A();let Es;try{__INTLIFY_PROD_DEVTOOLS__,Es=I(()=>st(w))}finally{__INTLIFY_PROD_DEVTOOLS__}if(kt!=="translate exists"&&Ne(Es)&&Es===Jc||kt==="translate exists"&&!Es){const[Li,Xe]=lt();return t&&m?Xt(t):Pe(Li)}else{if(Ss(Es))return Es;throw Ps(ws.UNEXPECTED_RETURN_TYPE)}};function G(...st){return L(lt=>Reflect.apply(Bx,null,[lt,...st]),()=>$m(...st),"translate",lt=>Reflect.apply(lt.t,lt,[...st]),lt=>lt,lt=>Et(lt))}function V(...st){const[lt,kt,Xt]=st;if(Xt&&!se(Xt))throLine truncated
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(t){this._stylesheet!==t&&(this._stylesheet=t,this.styleID++)}normalizeColor(t){return Array.isArray(t)&&(t=WI(t)),typeof t=="number"?HI(t):t}dropShadowToCSS(){let t=this.normalizeColor(this.dropShadowColor);const e=this.dropShadowAlpha,s=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),r=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);t.startsWith("#")&&e<1&&(t+=(e*255|0).toString(16).padStart(2,"0"));const n=`${s}px ${r}px`;return this.dropShadowBlur>0?`text-shadow: ${n} ${this.dropShadowBlur}px ${t}`:`text-shadow: ${n} ${t}`}reset(){Object.assign(this,pa.defaultOptions)}onBeforeDraw(){const{fontsDirty:t}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&t?new Promise(e=>setTimeout(e,100)):Promise.resolve()}get isSafari(){const{userAgent:t}=_t.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(t)}set fillGradientStops(t){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(t){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(t){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(t){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(t){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(t){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(t){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};jm.availableFonts={},jm.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let Lf=jm;const dh=class ga extends to{constructor(t="",e={}){super(Nt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const s=new Image,r=Nt.from(s,{scaleMode:_t.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Ut,r.trim=new Ut,this.texture=r;const n="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(n,"svg"),h=document.createElementNS(n,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=ga.defaultMaxWidth,this.maxHeight=ga.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=s,this._loadImage=new Image,this._autoResolution=ga.defaultAutoResolution,this._resolution=ga.defaultResolution??_t.RESOLUTION,this.text=t,this.style=e}measureText(t){var c,u;const{text:e,style:s,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},t);Object.assign(this._domElement,{innerHTML:e,style:s.toCSS(r)}),this._styleElement.textContent=s.toGlobalCSS(),document.body.appendChild(this._svgRoot);const n=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=n;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),e!==this._text&&(this._domElement.innerHTML=this._text),s!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(r)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+s.padding*2,height:l+s.padding*2}}async updateText(t=!0){const{style:e,_image:s,_loadImage:r}=this;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),!this.dirty&&t)return;const{width:n,height:a}=this.measureText();s.width=r.width=Math.ceil(Math.max(1,n)),s.height=r.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{r.onload=async()=>{if(o<this._updateID){h();return}await e.onBeforeDraw(),s.src=r.src,r.onload=null,r.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret Line truncated
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1212,7 +1212,7 @@ void main(void)
gl_FragColor.a = texColor.a * uColor.a;
gl_FragColor.rgb = ((texColor.a - 1.0) * uDarkColor.a + 1.0 - texColor.rgb) * uDarkColor.rgb + texColor.rgb * uColor.rgb;
}
`;let ok=class extends Js{constructor(e){const s={uSampler:e??Nt.EMPTY,alpha:1,uTextureMatrix:fe.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},r={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(ur.from(nk,ak),s);x(this,"uvMatrix");x(this,"batchable");x(this,"pluginName");x(this,"_tintRGB");x(this,"_darkTintRGB");x(this,"_colorDirty");x(this,"_alpha");x(this,"_tintColor");x(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new Wc(s.uSampler),this.batchable=!0,this.pluginName=r.pluginName,this._tintColor=new Wt(r.tint),this._darkTintColor=new Wt(r.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=r.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(e){e!==this.darkTint&&(this._darkTintColor.setValue(e),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,Wt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Wt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}},lk=class extends Wn{constructor(e){super(new ik,new ok(e),void 0,void 0);x(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(e){this.shader.darkTint=e}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(e){const s=this.geometry,r=this.shader;r.uvMatrix&&(r.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=s.indexBuffer.data,this._tintRGB=r._tintRGB,this._darkTintRGB=r._darkTintRGB,this._texture=r.texture;const n=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[n]),e.plugins[n].render(this)}};var Me;let Uf=(Me=class extends lk{constructor(){super();x(this,"name","")}updateFromSpineData(e,s,r,n,a,o,h,l){var y,_;this.texture=e.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((_=d.data)==null?void 0:_.length)!==c&&(d.data=new Float32Array(c));let f=0,m=u.data,p=d.data;for(let v=0;v<a;v+=l?12:8){let b=v;p[f]=n[b++],p[f+1]=n[b++],b+=4,m[f]=n[b++],m[f+1]=n[b++],f+=2}l?(Me.auxColor[0]=n[8],Me.auxColor[1]=n[9],Me.auxColor[2]=n[10],Me.auxColor[3]=n[11],this.darkTint=Me.auxColor,Me.auxColor[0]=n[2],Me.auxColor[1]=n[3],Me.auxColor[2]=n[4],Me.auxColor[3]=n[5],this.tint=Me.auxColor):(Me.auxColor[0]=n[2],Me.auxColor[1]=n[3],Me.auxColor[2]=n[4],Me.auxColor[3]=n[5],this.tint=Me.auxColor),this.blendMode=hc.toPixiBlending(s),this.alpha=Me.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let b=0;b<h;b++)v[b]=o[b]}this.name=r,u.update(),d.update(),g.update()}},x(Me,"auxColor",[0,0,0,0]),Me);var qt;let aO=(qt=class extends fs{constructor(e,s){if(e instanceof lc)e={...s,skeletonData:e};else if(s)throw new Error("You cannot use options and oldOptions together.");super();x(this,"skeleton");x(this,"state");x(this,"darkTint",!1);x(this,"hasNeverUpdated",!0);x(this,"_debug");x(this,"slotMeshFactory",()=>new rk);x(this,"beforeUpdateWorldTransforms",()=>{});x(this,"afterUpdateWorldTransforms",()=>{});x(this,"_autoUpdate",!1);x(this,"_ticker",ss.shared);x(this,"meshesCache",new Map);x(this,"lightColor",new Dt);x(this,"darkColor",new Dt);x(this,"_boundsProvider");x(this,"_boundsPoint",new Kt);x(this,"_boundsSpineID",-1);x(this,"_boundsSpineDirty",!0);x(this,"slotsObject",new Map);x(this,"verticesCache",xt.newFloatArray(1024));x(this,"clippingSlotToPixiMasks",{});x(this,"currentClippingSlot");const r=e instanceof lc?e:e.skeletonData;this.skeleton=new Kp(r);const n=new lF(r);this.state=new rF(n),(e==null?void 0:e.darkTint)!==void 0||(s==null?void 0:s.slotMeshFactory)===void 0?(this.darkTint=(e==null?void 0:e.darkTint)===void 0?this.skeleton.slots.some(a=>!!a.data.darkColor):e==null?void 0:e.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new Uf)):this.initializeMeshFactory(s==null?void 0:s.slotMeshFactory),e!=null&&e.ticker&&(this._ticker=e.ticker),this.autoUpdate=(e==null?void 0:e.autoUpdate)??!0,this.boundsProvider=e.b Line truncated
`;let ok=class extends Js{constructor(e){const s={uSampler:e??Nt.EMPTY,alpha:1,uTextureMatrix:fe.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},r={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(ur.from(nk,ak),s);x(this,"uvMatrix");x(this,"batchable");x(this,"pluginName");x(this,"_tintRGB");x(this,"_darkTintRGB");x(this,"_colorDirty");x(this,"_alpha");x(this,"_tintColor");x(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new jc(s.uSampler),this.batchable=!0,this.pluginName=r.pluginName,this._tintColor=new Wt(r.tint),this._darkTintColor=new Wt(r.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=r.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(e){e!==this.darkTint&&(this._darkTintColor.setValue(e),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,Wt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Wt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}},lk=class extends zn{constructor(e){super(new ik,new ok(e),void 0,void 0);x(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(e){this.shader.darkTint=e}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(e){const s=this.geometry,r=this.shader;r.uvMatrix&&(r.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=s.indexBuffer.data,this._tintRGB=r._tintRGB,this._darkTintRGB=r._darkTintRGB,this._texture=r.texture;const n=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[n]),e.plugins[n].render(this)}};var Me;let Uf=(Me=class extends lk{constructor(){super();x(this,"name","")}updateFromSpineData(e,s,r,n,a,o,h,l){var y,_;this.texture=e.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((_=d.data)==null?void 0:_.length)!==c&&(d.data=new Float32Array(c));let f=0,m=u.data,p=d.data;for(let v=0;v<a;v+=l?12:8){let b=v;p[f]=n[b++],p[f+1]=n[b++],b+=4,m[f]=n[b++],m[f+1]=n[b++],f+=2}l?(Me.auxColor[0]=n[8],Me.auxColor[1]=n[9],Me.auxColor[2]=n[10],Me.auxColor[3]=n[11],this.darkTint=Me.auxColor,Me.auxColor[0]=n[2],Me.auxColor[1]=n[3],Me.auxColor[2]=n[4],Me.auxColor[3]=n[5],this.tint=Me.auxColor):(Me.auxColor[0]=n[2],Me.auxColor[1]=n[3],Me.auxColor[2]=n[4],Me.auxColor[3]=n[5],this.tint=Me.auxColor),this.blendMode=hc.toPixiBlending(s),this.alpha=Me.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let b=0;b<h;b++)v[b]=o[b]}this.name=r,u.update(),d.update(),g.update()}},x(Me,"auxColor",[0,0,0,0]),Me);var qt;let aO=(qt=class extends fs{constructor(e,s){if(e instanceof lc)e={...s,skeletonData:e};else if(s)throw new Error("You cannot use options and oldOptions together.");super();x(this,"skeleton");x(this,"state");x(this,"darkTint",!1);x(this,"hasNeverUpdated",!0);x(this,"_debug");x(this,"slotMeshFactory",()=>new rk);x(this,"beforeUpdateWorldTransforms",()=>{});x(this,"afterUpdateWorldTransforms",()=>{});x(this,"_autoUpdate",!1);x(this,"_ticker",ss.shared);x(this,"meshesCache",new Map);x(this,"lightColor",new Dt);x(this,"darkColor",new Dt);x(this,"_boundsProvider");x(this,"_boundsPoint",new Kt);x(this,"_boundsSpineID",-1);x(this,"_boundsSpineDirty",!0);x(this,"slotsObject",new Map);x(this,"verticesCache",xt.newFloatArray(1024));x(this,"clippingSlotToPixiMasks",{});x(this,"currentClippingSlot");const r=e instanceof lc?e:e.skeletonData;this.skeleton=new Kp(r);const n=new lF(r);this.state=new rF(n),(e==null?void 0:e.darkTint)!==void 0||(s==null?void 0:s.slotMeshFactory)===void 0?(this.darkTint=(e==null?void 0:e.darkTint)===void 0?this.skeleton.slots.some(a=>!!a.data.darkColor):e==null?void 0:e.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new Uf)):this.initializeMeshFactory(s==null?void 0:s.slotMeshFactory),e!=null&&e.ticker&&(this._ticker=e.ticker),this.autoUpdate=(e==null?void 0:e.autoUpdate)??!0,this.boundsProvider=e.b Line truncated
precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1253,8 +1253,8 @@ void main(void){
gl_FragColor.a = color.a * vColor.a;
gl_FragColor.rgb = ((color.a - 1.0) * vDarkColor.a + 1.0 - color.rgb) * vDarkColor.rgb + color.rgb * vColor.rgb;
}
`;var Vf;let gk=(Vf=class extends li{constructor(t){super(t),this.shaderGenerator=new Ip(mk,pk),this.geometryClass=fk,this.vertexSize=7}packInterleavedGeometry(t,e,s,r,n){const{uint32View:a,float32View:o}=e,h=r/this.vertexSize,l=t.uvs,c=t.indices,u=t.vertexData,d=t._texture.baseTexture._batchLocation,f=Math.min(t.worldAlpha,1),m=Wt.shared.setValue(t._tintRGB).toPremultiplied(f,!0),p=Wt.shared.setValue(t._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[r++]=u[g],o[r++]=u[g+1],o[r++]=l[g],o[r++]=l[g+1],a[r++]=m,a[r++]=p,o[r++]=d;for(let g=0;g<c.length;g++)s[n++]=h+c[g]}},x(Vf,"extension",{name:"darkTintBatch",type:gt.RendererPlugin}),Vf);St.add(gk);class Cw{constructor(){x(this,"array",[])}add(t){const e=this.contains(t);return this.array[t|0]=t|0,!e}contains(t){return this.array[t|0]!==void 0}remove(t){this.array[t|0]=void 0}clear(){this.array.length=0}}class Zp{constructor(){x(this,"entries",{});x(this,"size",0)}add(t){const e=this.entries[t];return this.entries[t]=!0,e?!1:(this.size++,!0)}addAll(t){const e=this.size;for(let s=0,r=t.length;s<r;s++)this.add(t[s]);return e!==this.size}contains(t){return this.entries[t]}clear(){this.entries={},this.size=0}}const Bs=class Bs{constructor(t=0,e=0,s=0,r=0){x(this,"r");x(this,"g");x(this,"b");x(this,"a");this.r=t,this.g=e,this.b=s,this.a=r}set(t,e,s,r){return this.r=t,this.g=e,this.b=s,this.a=r,this.clamp()}setFromColor(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}setFromString(t){return t=t.charAt(0)==="#"?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=t.length!==8?1:parseInt(t.substr(6,2),16)/255,this}add(t,e,s,r){return this.r+=t,this.g+=e,this.b+=s,this.a+=r,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((e&4278190080)>>>24)/255,t.g=((e&16711680)>>>16)/255,t.b=((e&65280)>>>8)/255,t.a=(e&255)/255}static rgb888ToColor(t,e){t.r=((e&16711680)>>>16)/255,t.g=((e&65280)>>>8)/255,t.b=(e&255)/255}toRgb888(){const t=e=>`0${(e*255).toString(16)}`.slice(-2);return+`0x${t(this.r)}${t(this.g)}${t(this.b)}`}static fromString(t,e=new Bs){return e.setFromString(t)}};x(Bs,"WHITE",new Bs(1,1,1,1)),x(Bs,"RED",new Bs(1,0,0,1)),x(Bs,"GREEN",new Bs(0,1,0,1)),x(Bs,"BLUE",new Bs(0,0,1,1)),x(Bs,"MAGENTA",new Bs(1,0,1,1));let Ft=Bs;const Se=class Se{static clamp(t,e,s){return t<e?e:t>s?s:t}static cosDeg(t){return Math.cos(t*Se.degRad)}static sinDeg(t){return Math.sin(t*Se.degRad)}static atan2Deg(t,e){return Math.atan2(t,e)*Se.radDeg}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){const e=Math.pow(Math.abs(t),.3333333333333333);return t<0?-e:e}static randomTriangular(t,e){return Se.randomTriangularWith(t,e,(t+e)*.5)}static randomTriangularWith(t,e,s){const r=Math.random(),n=e-t;return r<=(s-t)/n?t+Math.sqrt(r*n*(s-t)):e-Math.sqrt((1-r)*n*(e-s))}static isPowerOfTwo(t){return t&&(t&t-1)===0}};x(Se,"epsilon",1e-5),x(Se,"epsilon2",Se.epsilon*Se.epsilon),x(Se,"PI",3.1415927),x(Se,"PI2",Se.PI*2),x(Se,"invPI2",1/Se.PI2),x(Se,"radiansToDegrees",180/Se.PI),x(Se,"radDeg",Se.radiansToDegrees),x(Se,"degreesToRadians",Se.PI/180),x(Se,"degRad",Se.degreesToRadians);let pt=Se;const Gs=class Gs{apply(t,e,s){return e===void 0||s===void 0?this.applyInternal(t):t+(e-t)*this.applyInternal(s)}};x(Gs,"linear",new class extends Gs{applyInternal(t){return t}}),x(Gs,"smooth",new class extends Gs{applyInternal(t){return t*t*(3-2*t)}}),x(Gs,"slowFast",new class extends Gs{applyInternal(t){return t*t}}),x(Gs,"fastSlow",new class extends Gs{applyInternal(t){return(t-1)*(t-1)*-1+1}}),x(Gs,"circle",new class extends Gs{applyInternal(t){return t<=.5?(t*=2,(1-Math.sqrt(1-t*t))/2):(t--,t*=2,(Math.sqrt(1-t*t)+1)/2)}});let en=Gs;class Jp extends en{constructor(e){super();x(this,"power",2);this.power=e}applyInternal(e){return e<=.5?Math.pow(e*2,this.power)/2:Math.pow((e-1)*2,this.power)/(this.power%2===0?-2:2)+1}}class Iw extends Jp{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2===0?-1:1)+1}}const Wi=class Wi{static arrayCopy(t,e,s,r,n){for(let a=e,o=r;a<e+n;a++,o++)s[o]=t[a]}static arrayFill(t,e,s,r){for(let n=e;n<s;n++)t[n]=r}static setArraySize(t,e,s=0){const r=t.length;if(r===e)return t;if(t.length=e,r<e)for(let n=r;n<e;n++)t[n]=s;return t}static ensureArrayCapacity(t,e,s=0){return t.length>=e?t:Wi.setArraySize(t,e,s)}static newArray(t,e){const s=[];for(let r=0;r<t;r++)s[r]=e;return s}static newFloatArray(t){if(Wi.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);{const e=[];for(let s=0;s<e.length;s++)e[s]=0;return e}}static newShortArray(t){if(Wi.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);{const e=[];for(let s=0;s<e.length;s++)e[s]=0;return e}}static toFloatArray(t){return Wi.SUPPORTS_TYPED_ARRAYS?new Float32Arra Line truncated
${s}`:""}`)}remove(t){t=this.pathPrefix+t;const e=this.cache.assets[t];return e.dispose&&e.dispose(),delete this.cache.assets[t],delete this.cache.assetsRefCount[t],delete this.cache.assetsLoaded[t],e}removeAll(){for(const t in this.cache.assets){const e=this.cache.assets[t];e.dispose&&e.dispose()}this.cache.assets={},this.cache.assetsLoaded={},this.cache.assetsRefCount={}}isLoadingComplete(){return this.toLoad===0}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}disposeAsset(t){const e=this.cache.assets[t];if(e instanceof nl){e.dispose();return}this.disposeAssetInternal(t)}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}disposeAssetInternal(t){if(this.cache.assetsRefCount[t]>0&&--this.cache.assetsRefCount[t]===0)return this.remove(t)}createTextureAtlas(t,e,s,r){const n=new nl(t);n.dispose=()=>{var a;if(!(this.cache.assetsRefCount[s]<=0)){this.disposeAssetInternal(s);for(const o of n.pages)(a=o.texture)==null||a.dispose()}};for(const a of n.pages){const o=this.texturePath(e,a.name,r);this.texturePmaInfo[this.pathPrefix+o]=a.pma}return n}createTexture(t,e,s){const r=this.textureLoader(s,e),n=r.dispose.bind(r);return r.dispose=()=>{this.disposeAssetInternal(t)&&n()},r}texturePath(t,e,s){return s?s[e]:t+e}}const Ta=class Ta{constructor(){x(this,"assets",{});x(this,"assetsRefCount",{});x(this,"assetsLoaded",{})}static getCache(t){const e=Ta.AVAILABLE_CACHES.get(t);if(e)return e;const s=new Ta;return Ta.AVAILABLE_CACHES.set(t,s),s}async addAsset(t,e){return this.assetsLoaded[t]=Promise.resolve(e),this.assets[t]=e,e}getAsset(t){return this.assetsLoaded[t]}};x(Ta,"AVAILABLE_CACHES",new Map);let al=Ta;class lg{constructor(){x(this,"callbacks",{});x(this,"rawDataUris",{})}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return e!==-1?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){var e=window.atob(t),s=e.length,r=new Uint8Array(s);for(let n=0;n<s;n++)r[n]=e.charCodeAt(n);return r}dataUriToUint8Array(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");if(e===-1)throw new Error("Not a binary data URI.");return e+=7,this.base64ToUint8Array(t.substr(e))}downloadText(t,e,s){if(this.start(t,e,s))return;const r=this.rawDataUris[t];if(r&&!r.includes(".")){try{this.finish(t,200,this.dataUriToString(r))}catch(o){this.finish(t,400,JSON.stringify(o))}return}const n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.open("GET",r||t,!0);const a=()=>{this.finish(t,n.status,n.responseText)};n.onload=a,n.onerror=a,n.send()}downloadJson(t,e,s){this.downloadText(t,r=>{e(JSON.parse(r))},s)}downloadBinary(t,e,s){if(this.start(t,e,s))return;const r=this.rawDataUris[t];if(r&&!r.includes(".")){try{this.finish(t,200,this.dataUriToUint8Array(r))}catch(o){this.finish(t,400,JSON.stringify(o))}return}const n=new XMLHttpRequest;n.open("GET",r||t,!0),n.responseType="arraybuffer";const a=()=>{this.finish(t,n.status,n.response)};n.onload=()=>{n.status===200||n.status===0?this.finish(t,200,new Uint8Array(n.response)):a()},n.onerror=a,n.send()}start(t,e,s){let r=this.callbacks[t];try{if(r)return!0;this.callbacks[t]=r=[]}finally{r.push(e,s)}}finish(t,e,s){const r=this.callbacks[t];if(delete this.callbacks[t],e===200||e===0)for(let n=0,a=r.length;n<a;n+=2)r[n](s);else for(let n=1,a=r.length;n<a;n+=2)r[n](e,s)}}class ro extends vr{constructor(e){super(e);x(this,"color",new Ft(1,1,1,1))}copy(){const e=new ro(this.name);return this.copyTo(e),e.color.setFromColor(this.color),e}}class zr extends vr{constructor(e){super(e);x(this,"endSlot",null);x(this,"convex",!1);x(this,"inverse",!1);x(this,"color",new Ft(.2275,.2275,.8078,1))}copy(){const e=new zr(this.name);return this.copyTo(e),e.endSlot=this.endSlot,e.convex=this.convex,e.inverse=this.inverse,e.color.setFromColor(this.color),e}}class on extends vr{constructor(e){super(e);x(this,"lengths",[]);x(this,"closed",!1);x(this,"constantSpeed",!1);x(this,"color",new Ft(1,1,1,1))}copy(){const e=new on(this.name);return this.copyTo(e),e.lengths=[],bt.arrayCopy(this.lengths,0,e.lengths,0,this.lengths.length),e.closed=this.closed,e.constantSpeed=this.constantSpeed,e.color.setFromColor(this.color),e}}class Rl extends vr{constructor(e){super(e);x(this,"x",0);x(this,"y",0);x(this,"rotation",0);x(this,"color",new Ft(.38,.94,0,1))}computeWorldPosition(e,s){return s.x=this.x*e.a+this.y*e.b+e.worldX,s.y=this.x*e.c+this.y*e.d+e.worldY,s}computeWorldRotation(e){const s=this.rotation*pt.degRad,r=Math.cos(s),n=Math.sin(s),a=r*e.a+n*e.b,o=r*e.c+n*e.d;return pt.atan2Deg(o,a)}copy(){const e=new Rl(this.name);return e.x=this.x,e.y=this.y,e.rotation=this.rotation,e.color.setFromColor(this.color),e}}class hg{constructor(t,e=!1){x(this,"atlas");x(this,"allowMissingRegions");this.atlas=t,this.allowMissingRegions=e}findRegions(t,e,s){const r=s.regions;for(let n=0,a=r.length;n<a;n++)r[n]=this.findRegion(t,s.getPath(e,n))}findRegion(t,e){Line truncated
`;var Vf;let gk=(Vf=class extends li{constructor(t){super(t),this.shaderGenerator=new Np(mk,pk),this.geometryClass=fk,this.vertexSize=7}packInterleavedGeometry(t,e,s,r,n){const{uint32View:a,float32View:o}=e,h=r/this.vertexSize,l=t.uvs,c=t.indices,u=t.vertexData,d=t._texture.baseTexture._batchLocation,f=Math.min(t.worldAlpha,1),m=Wt.shared.setValue(t._tintRGB).toPremultiplied(f,!0),p=Wt.shared.setValue(t._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[r++]=u[g],o[r++]=u[g+1],o[r++]=l[g],o[r++]=l[g+1],a[r++]=m,a[r++]=p,o[r++]=d;for(let g=0;g<c.length;g++)s[n++]=h+c[g]}},x(Vf,"extension",{name:"darkTintBatch",type:gt.RendererPlugin}),Vf);St.add(gk);class Cw{constructor(){x(this,"array",[])}add(t){const e=this.contains(t);return this.array[t|0]=t|0,!e}contains(t){return this.array[t|0]!==void 0}remove(t){this.array[t|0]=void 0}clear(){this.array.length=0}}class Zp{constructor(){x(this,"entries",{});x(this,"size",0)}add(t){const e=this.entries[t];return this.entries[t]=!0,e?!1:(this.size++,!0)}addAll(t){const e=this.size;for(let s=0,r=t.length;s<r;s++)this.add(t[s]);return e!==this.size}contains(t){return this.entries[t]}clear(){this.entries={},this.size=0}}const Bs=class Bs{constructor(t=0,e=0,s=0,r=0){x(this,"r");x(this,"g");x(this,"b");x(this,"a");this.r=t,this.g=e,this.b=s,this.a=r}set(t,e,s,r){return this.r=t,this.g=e,this.b=s,this.a=r,this.clamp()}setFromColor(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}setFromString(t){return t=t.charAt(0)==="#"?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=t.length!==8?1:parseInt(t.substr(6,2),16)/255,this}add(t,e,s,r){return this.r+=t,this.g+=e,this.b+=s,this.a+=r,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((e&4278190080)>>>24)/255,t.g=((e&16711680)>>>16)/255,t.b=((e&65280)>>>8)/255,t.a=(e&255)/255}static rgb888ToColor(t,e){t.r=((e&16711680)>>>16)/255,t.g=((e&65280)>>>8)/255,t.b=(e&255)/255}toRgb888(){const t=e=>`0${(e*255).toString(16)}`.slice(-2);return+`0x${t(this.r)}${t(this.g)}${t(this.b)}`}static fromString(t,e=new Bs){return e.setFromString(t)}};x(Bs,"WHITE",new Bs(1,1,1,1)),x(Bs,"RED",new Bs(1,0,0,1)),x(Bs,"GREEN",new Bs(0,1,0,1)),x(Bs,"BLUE",new Bs(0,0,1,1)),x(Bs,"MAGENTA",new Bs(1,0,1,1));let Ft=Bs;const Se=class Se{static clamp(t,e,s){return t<e?e:t>s?s:t}static cosDeg(t){return Math.cos(t*Se.degRad)}static sinDeg(t){return Math.sin(t*Se.degRad)}static atan2Deg(t,e){return Math.atan2(t,e)*Se.radDeg}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){const e=Math.pow(Math.abs(t),.3333333333333333);return t<0?-e:e}static randomTriangular(t,e){return Se.randomTriangularWith(t,e,(t+e)*.5)}static randomTriangularWith(t,e,s){const r=Math.random(),n=e-t;return r<=(s-t)/n?t+Math.sqrt(r*n*(s-t)):e-Math.sqrt((1-r)*n*(e-s))}static isPowerOfTwo(t){return t&&(t&t-1)===0}};x(Se,"epsilon",1e-5),x(Se,"epsilon2",Se.epsilon*Se.epsilon),x(Se,"PI",3.1415927),x(Se,"PI2",Se.PI*2),x(Se,"invPI2",1/Se.PI2),x(Se,"radiansToDegrees",180/Se.PI),x(Se,"radDeg",Se.radiansToDegrees),x(Se,"degreesToRadians",Se.PI/180),x(Se,"degRad",Se.degreesToRadians);let pt=Se;const Gs=class Gs{apply(t,e,s){return e===void 0||s===void 0?this.applyInternal(t):t+(e-t)*this.applyInternal(s)}};x(Gs,"linear",new class extends Gs{applyInternal(t){return t}}),x(Gs,"smooth",new class extends Gs{applyInternal(t){return t*t*(3-2*t)}}),x(Gs,"slowFast",new class extends Gs{applyInternal(t){return t*t}}),x(Gs,"fastSlow",new class extends Gs{applyInternal(t){return(t-1)*(t-1)*-1+1}}),x(Gs,"circle",new class extends Gs{applyInternal(t){return t<=.5?(t*=2,(1-Math.sqrt(1-t*t))/2):(t--,t*=2,(Math.sqrt(1-t*t)+1)/2)}});let en=Gs;class Jp extends en{constructor(e){super();x(this,"power",2);this.power=e}applyInternal(e){return e<=.5?Math.pow(e*2,this.power)/2:Math.pow((e-1)*2,this.power)/(this.power%2===0?-2:2)+1}}class Iw extends Jp{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2===0?-1:1)+1}}const Wi=class Wi{static arrayCopy(t,e,s,r,n){for(let a=e,o=r;a<e+n;a++,o++)s[o]=t[a]}static arrayFill(t,e,s,r){for(let n=e;n<s;n++)t[n]=r}static setArraySize(t,e,s=0){const r=t.length;if(r===e)return t;if(t.length=e,r<e)for(let n=r;n<e;n++)t[n]=s;return t}static ensureArrayCapacity(t,e,s=0){return t.length>=e?t:Wi.setArraySize(t,e,s)}static newArray(t,e){const s=[];for(let r=0;r<t;r++)s[r]=e;return s}static newFloatArray(t){if(Wi.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);{const e=[];for(let s=0;s<e.length;s++)e[s]=0;return e}}static newShortArray(t){if(Wi.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);{const e=[];for(let s=0;s<e.length;s++)e[s]=0;return e}}static toFloatArray(t){return Wi.SUPPORTS_TYPED_ARRAYS?new Float32Arra Line truncated
${s}`:""}`)}remove(t){t=this.pathPrefix+t;const e=this.cache.assets[t];return e.dispose&&e.dispose(),delete this.cache.assets[t],delete this.cache.assetsRefCount[t],delete this.cache.assetsLoaded[t],e}removeAll(){for(const t in this.cache.assets){const e=this.cache.assets[t];e.dispose&&e.dispose()}this.cache.assets={},this.cache.assetsLoaded={},this.cache.assetsRefCount={}}isLoadingComplete(){return this.toLoad===0}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}disposeAsset(t){const e=this.cache.assets[t];if(e instanceof nl){e.dispose();return}this.disposeAssetInternal(t)}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}disposeAssetInternal(t){if(this.cache.assetsRefCount[t]>0&&--this.cache.assetsRefCount[t]===0)return this.remove(t)}createTextureAtlas(t,e,s,r){const n=new nl(t);n.dispose=()=>{var a;if(!(this.cache.assetsRefCount[s]<=0)){this.disposeAssetInternal(s);for(const o of n.pages)(a=o.texture)==null||a.dispose()}};for(const a of n.pages){const o=this.texturePath(e,a.name,r);this.texturePmaInfo[this.pathPrefix+o]=a.pma}return n}createTexture(t,e,s){const r=this.textureLoader(s,e),n=r.dispose.bind(r);return r.dispose=()=>{this.disposeAssetInternal(t)&&n()},r}texturePath(t,e,s){return s?s[e]:t+e}}const Ta=class Ta{constructor(){x(this,"assets",{});x(this,"assetsRefCount",{});x(this,"assetsLoaded",{})}static getCache(t){const e=Ta.AVAILABLE_CACHES.get(t);if(e)return e;const s=new Ta;return Ta.AVAILABLE_CACHES.set(t,s),s}async addAsset(t,e){return this.assetsLoaded[t]=Promise.resolve(e),this.assets[t]=e,e}getAsset(t){return this.assetsLoaded[t]}};x(Ta,"AVAILABLE_CACHES",new Map);let al=Ta;class lg{constructor(){x(this,"callbacks",{});x(this,"rawDataUris",{})}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return e!==-1?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){var e=window.atob(t),s=e.length,r=new Uint8Array(s);for(let n=0;n<s;n++)r[n]=e.charCodeAt(n);return r}dataUriToUint8Array(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");if(e===-1)throw new Error("Not a binary data URI.");return e+=7,this.base64ToUint8Array(t.substr(e))}downloadText(t,e,s){if(this.start(t,e,s))return;const r=this.rawDataUris[t];if(r&&!r.includes(".")){try{this.finish(t,200,this.dataUriToString(r))}catch(o){this.finish(t,400,JSON.stringify(o))}return}const n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.open("GET",r||t,!0);const a=()=>{this.finish(t,n.status,n.responseText)};n.onload=a,n.onerror=a,n.send()}downloadJson(t,e,s){this.downloadText(t,r=>{e(JSON.parse(r))},s)}downloadBinary(t,e,s){if(this.start(t,e,s))return;const r=this.rawDataUris[t];if(r&&!r.includes(".")){try{this.finish(t,200,this.dataUriToUint8Array(r))}catch(o){this.finish(t,400,JSON.stringify(o))}return}const n=new XMLHttpRequest;n.open("GET",r||t,!0),n.responseType="arraybuffer";const a=()=>{this.finish(t,n.status,n.response)};n.onload=()=>{n.status===200||n.status===0?this.finish(t,200,new Uint8Array(n.response)):a()},n.onerror=a,n.send()}start(t,e,s){let r=this.callbacks[t];try{if(r)return!0;this.callbacks[t]=r=[]}finally{r.push(e,s)}}finish(t,e,s){const r=this.callbacks[t];if(delete this.callbacks[t],e===200||e===0)for(let n=0,a=r.length;n<a;n+=2)r[n](s);else for(let n=1,a=r.length;n<a;n+=2)r[n](e,s)}}class ro extends vr{constructor(e){super(e);x(this,"color",new Ft(1,1,1,1))}copy(){const e=new ro(this.name);return this.copyTo(e),e.color.setFromColor(this.color),e}}class zr extends vr{constructor(e){super(e);x(this,"endSlot",null);x(this,"convex",!1);x(this,"inverse",!1);x(this,"color",new Ft(.2275,.2275,.8078,1))}copy(){const e=new zr(this.name);return this.copyTo(e),e.endSlot=this.endSlot,e.convex=this.convex,e.inverse=this.inverse,e.color.setFromColor(this.color),e}}class on extends vr{constructor(e){super(e);x(this,"lengths",[]);x(this,"closed",!1);x(this,"constantSpeed",!1);x(this,"color",new Ft(1,1,1,1))}copy(){const e=new on(this.name);return this.copyTo(e),e.lengths=[],bt.arrayCopy(this.lengths,0,e.lengths,0,this.lengths.length),e.closed=this.closed,e.constantSpeed=this.constantSpeed,e.color.setFromColor(this.color),e}}class Rl extends vr{constructor(e){super(e);x(this,"x",0);x(this,"y",0);x(this,"rotation",0);x(this,"color",new Ft(.38,.94,0,1))}computeWorldPosition(e,s){return s.x=this.x*e.a+this.y*e.b+e.worldX,s.y=this.x*e.c+this.y*e.d+e.worldY,s}computeWorldRotation(e){const s=this.rotation*pt.degRad,r=Math.cos(s),n=Math.sin(s),a=r*e.a+n*e.b,o=r*e.c+n*e.d;return pt.atan2Deg(o,a)}copy(){const e=new Rl(this.name);return e.x=this.x,e.y=this.y,e.rotation=this.rotation,e.color.setFromColor(this.color),e}}class hg{constructor(t,e=!1){x(this,"atlas");x(this,"allowMissingRegions");this.atlas=t,this.allowMissingRegions=e}findRegions(t,e,s){const r=s.regions;for(let n=0,a=r.length;n<a;n++)r[n]=this.findRegion(t,s.getPath(e,n))}findRegion(t,e){Line truncated
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1283,7 +1283,7 @@ void main(void)
gl_FragColor.a = texColor.a * uColor.a;
gl_FragColor.rgb = ((texColor.a - 1.0) * uDarkColor.a + 1.0 - texColor.rgb) * uDarkColor.rgb + texColor.rgb * uColor.rgb;
}
`;class Dw extends Js{constructor(e){const s={uSampler:e??Nt.EMPTY,alpha:1,uTextureMatrix:fe.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},r={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(ur.from(cL,uL),s);x(this,"uvMatrix");x(this,"batchable");x(this,"pluginName");x(this,"_tintRGB");x(this,"_darkTintRGB");x(this,"_colorDirty");x(this,"_alpha");x(this,"_tintColor");x(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new Wc(s.uSampler),this.batchable=!0,this.pluginName=r.pluginName,this._tintColor=new Wt(r.tint),this._darkTintColor=new Wt(r.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=r.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(e){e!==this.darkTint&&(this._darkTintColor.setValue(e),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,Wt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Wt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class Nw extends Wn{constructor(e){super(new Ow,new Dw(e),void 0,void 0);x(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(e){this.shader.darkTint=e}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(e){const s=this.geometry,r=this.shader;r.uvMatrix&&(r.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=s.indexBuffer.data,this._tintRGB=r._tintRGB,this._darkTintRGB=r._darkTintRGB,this._texture=r.texture;const n=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[n]),e.plugins[n].render(this)}}const Ve=class Ve extends Nw{constructor(){super();x(this,"name","")}updateFromSpineData(e,s,r,n,a,o,h,l){var y,_;this.texture=e.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((_=d.data)==null?void 0:_.length)!==c&&(d.data=new Float32Array(c));let f=0;const m=u.data,p=d.data;for(let v=0;v<a;v+=l?12:8){let b=v;p[f]=n[b++],p[f+1]=n[b++],b+=4,m[f]=n[b++],m[f+1]=n[b++],f+=2}l?(Ve.auxColor[0]=n[8],Ve.auxColor[1]=n[9],Ve.auxColor[2]=n[10],Ve.auxColor[3]=n[11],this.darkTint=Ve.auxColor,Ve.auxColor[0]=n[2],Ve.auxColor[1]=n[3],Ve.auxColor[2]=n[4],Ve.auxColor[3]=n[5],this.tint=Ve.auxColor):(Ve.auxColor[0]=n[2],Ve.auxColor[1]=n[3],Ve.auxColor[2]=n[4],Ve.auxColor[3]=n[5],this.tint=Ve.auxColor),this.blendMode=qn.toPixiBlending(s),this.alpha=Ve.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let b=0;b<h;b++)v[b]=o[b]}this.name=r,u.update(),d.update(),g.update()}};x(Ve,"auxColor",[0,0,0,0]);let gc=Ve;class Uw extends er{constructor(e=!1){super();x(this,"_buffer");x(this,"_indexBuffer");this._buffer=new ne(void 0,e,!1),this._indexBuffer=new ne(void 0,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,wt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,wt.FLOAT).addAttribute("aColor",this._buffer,4,!0,wt.UNSIGNED_BYTE).addAttribute("aDarkColor",this._buffer,4,!0,wt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,wt.FLOAT).addIndex(this._indexBuffer)}}const dL=`
`;class Dw extends Js{constructor(e){const s={uSampler:e??Nt.EMPTY,alpha:1,uTextureMatrix:fe.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},r={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(ur.from(cL,uL),s);x(this,"uvMatrix");x(this,"batchable");x(this,"pluginName");x(this,"_tintRGB");x(this,"_darkTintRGB");x(this,"_colorDirty");x(this,"_alpha");x(this,"_tintColor");x(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new jc(s.uSampler),this.batchable=!0,this.pluginName=r.pluginName,this._tintColor=new Wt(r.tint),this._darkTintColor=new Wt(r.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=r.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(e){e!==this.darkTint&&(this._darkTintColor.setValue(e),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,Wt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Wt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class Nw extends zn{constructor(e){super(new Ow,new Dw(e),void 0,void 0);x(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(e){this.shader.darkTint=e}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(e){const s=this.geometry,r=this.shader;r.uvMatrix&&(r.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=s.indexBuffer.data,this._tintRGB=r._tintRGB,this._darkTintRGB=r._darkTintRGB,this._texture=r.texture;const n=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[n]),e.plugins[n].render(this)}}const Ve=class Ve extends Nw{constructor(){super();x(this,"name","")}updateFromSpineData(e,s,r,n,a,o,h,l){var y,_;this.texture=e.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((_=d.data)==null?void 0:_.length)!==c&&(d.data=new Float32Array(c));let f=0;const m=u.data,p=d.data;for(let v=0;v<a;v+=l?12:8){let b=v;p[f]=n[b++],p[f+1]=n[b++],b+=4,m[f]=n[b++],m[f+1]=n[b++],f+=2}l?(Ve.auxColor[0]=n[8],Ve.auxColor[1]=n[9],Ve.auxColor[2]=n[10],Ve.auxColor[3]=n[11],this.darkTint=Ve.auxColor,Ve.auxColor[0]=n[2],Ve.auxColor[1]=n[3],Ve.auxColor[2]=n[4],Ve.auxColor[3]=n[5],this.tint=Ve.auxColor):(Ve.auxColor[0]=n[2],Ve.auxColor[1]=n[3],Ve.auxColor[2]=n[4],Ve.auxColor[3]=n[5],this.tint=Ve.auxColor),this.blendMode=qn.toPixiBlending(s),this.alpha=Ve.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let b=0;b<h;b++)v[b]=o[b]}this.name=r,u.update(),d.update(),g.update()}};x(Ve,"auxColor",[0,0,0,0]);let gc=Ve;class Uw extends er{constructor(e=!1){super();x(this,"_buffer");x(this,"_indexBuffer");this._buffer=new ne(void 0,e,!1),this._indexBuffer=new ne(void 0,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,wt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,wt.FLOAT).addAttribute("aColor",this._buffer,4,!0,wt.UNSIGNED_BYTE).addAttribute("aDarkColor",this._buffer,4,!0,wt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,wt.FLOAT).addIndex(this._indexBuffer)}}const dL=`
precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1324,4 +1324,4 @@ void main(void){
gl_FragColor.a = color.a * vColor.a;
gl_FragColor.rgb = ((color.a - 1.0) * vDarkColor.a + 1.0 - color.rgb) * vDarkColor.rgb + color.rgb * vColor.rgb;
}
`;class gg extends li{constructor(t){super(t),this.shaderGenerator=new Ip(dL,fL),this.geometryClass=Uw,this.vertexSize=7}packInterleavedGeometry(t,e,s,r,n){const{uint32View:a,float32View:o}=e,h=r/this.vertexSize,l=t.uvs,c=t.indices,u=t.vertexData,d=t._texture.baseTexture._batchLocation,f=Math.min(t.worldAlpha,1),m=Wt.shared.setValue(t._tintRGB).toPremultiplied(f,!0),p=Wt.shared.setValue(t._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[r++]=u[g],o[r++]=u[g+1],o[r++]=l[g],o[r++]=l[g+1],a[r++]=m,a[r++]=p,o[r++]=d;for(let g=0;g<c.length;g++)s[n++]=h+c[g]}}x(gg,"extension",{name:"darkTintBatch",type:gt.RendererPlugin});St.add(gg);const ai=class ai extends Wn{constructor(){const e=new qc;e.getBuffer("aVertexPosition").static=!1,e.getBuffer("aTextureCoord").static=!1;const s=new Jo(Nt.EMPTY);super(e,s);x(this,"name","");x(this,"warnedTwoTint",!1)}updateFromSpineData(e,s,r,n,a,o,h,l){var y,_;this.texture=e.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((_=d.data)==null?void 0:_.length)!==c&&(d.data=new Float32Array(c));let f=0;const m=u.data,p=d.data;for(let v=0;v<a;v+=l?12:8){let b=v;p[f]=n[b++],p[f+1]=n[b++],b+=4,m[f]=n[b++],m[f+1]=n[b++],f+=2}l&&!this.warnedTwoTint&&(console.warn("DarkTint is not enabled by default. To enable use a DarkSlotMesh factory while creating the Spine object."),this.warnedTwoTint=!0),ai.auxColor[0]=n[2],ai.auxColor[1]=n[3],ai.auxColor[2]=n[4],ai.auxColor[3]=n[5],this.tint=ai.auxColor,this.alpha=ai.auxColor[3],this.blendMode=qn.toPixiBlending(s);const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let b=0;b<h;b++)v[b]=o[b]}this.name=r,u.update(),d.update(),g.update()}};x(ai,"auxColor",[0,0,0,0]);let yc=ai;class mL{constructor(t,e,s,r){x(this,"x");x(this,"y");x(this,"width");x(this,"height");this.x=t,this.y=e,this.width=s,this.height=r}calculateBounds(){return{x:this.x,y:this.y,width:this.width,height:this.height}}}class pL{constructor(t=!1){x(this,"clipping");this.clipping=t}calculateBounds(t){if(!t.skeleton)return{x:0,y:0,width:0,height:0};const e=new Mi(t.skeleton.data);e.setupPose(),e.updateWorldTransform(Os.update);const s=e.getBoundsRect(this.clipping?new ao:void 0);return s.width===Number.NEGATIVE_INFINITY?{x:0,y:0,width:0,height:0}:s}}class gL{constructor(t,e=[],s=.05,r=!1){x(this,"animation");x(this,"skins");x(this,"timeStep");x(this,"clipping");this.animation=t,this.skins=e,this.timeStep=s,this.clipping=r}calculateBounds(t){if(!t.skeleton||!t.state)return{x:0,y:0,width:0,height:0};const e=new qa(t.state.data),s=new Mi(t.skeleton.data),r=this.clipping?new ao:void 0,n=s.data;if(this.skins.length>0){const o=new Ka("custom-skin");for(const h of this.skins){const l=n.findSkin(h);l!=null&&o.addSkin(l)}s.setSkin(o)}s.setupPose();const a=this.animation!=null?n.findAnimation(this.animation):null;if(a==null){s.updateWorldTransform(Os.update);const o=s.getBoundsRect(r);return o.width===Number.NEGATIVE_INFINITY?{x:0,y:0,width:0,height:0}:o}else{let o=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;e.clearTracks(),e.setAnimation(0,a,!1);const u=Math.max(a.duration/this.timeStep,1);for(let f=0;f<u;f++){const m=f>0?this.timeStep:0;e.update(m),e.apply(s),s.update(m),s.updateWorldTransform(Os.update);const p=s.getBoundsRect(r);o=Math.min(o,p.x),h=Math.min(h,p.y),l=Math.max(l,p.x+p.width),c=Math.max(c,p.y+p.height)}const d={x:o,y:h,width:l-o,height:c-h};return d.width===Number.NEGATIVE_INFINITY?{x:0,y:0,width:0,height:0}:d}}}const $t=class $t extends fs{constructor(e){super();x(this,"skeleton");x(this,"state");x(this,"skeletonPhysics");x(this,"darkTint",!1);x(this,"hasNeverUpdated",!0);x(this,"_debug");x(this,"slotMeshFactory",()=>new yc);x(this,"beforeUpdateWorldTransforms",()=>{});x(this,"afterUpdateWorldTransforms",()=>{});x(this,"_autoUpdate",!1);x(this,"_ticker",ss.shared);x(this,"meshesCache",new Map);x(this,"lightColor",new Ft);x(this,"darkColor",new Ft);x(this,"clippingVertAux",new Float32Array(6));x(this,"_boundsProvider");x(this,"_boundsPoint",new Kt);x(this,"_boundsSpineID",-1);x(this,"_boundsSpineDirty",!0);x(this,"slotsObject",new Map);x(this,"verticesCache",bt.newFloatArray(1024));x(this,"clippingSlotToPixiMasks",{});e instanceof Bl?e={skeletonData:e}:"skeleton"in e&&(e=new.target.createOptions(e));const{autoUpdate:s=!0,boundsProvider:r,darkTint:n,skeletonData:a,ticker:o}=e;this.skeleton=new Mi(a),this.skeletonPhysics=new pg(this.skeleton,{readTransform:(h,l)=>this.readPhysicsTransform(h,l),worldToSkeleton:h=>this.pixiWorldCoordinatesToSkeleton(h)}),this.state=new qa(new og(a)),o&&(this._ticker=o),this.autoUpdate=s,this.boundsProvider=r,this.darkTint=n===void 0?this.skeleton.slots.some(h=>!!h.data.setupPose.darkColor):n,this.darkTint&&(this.slotMeshFactory=()=>new gc)}get debug(){return Line truncated
`;class gg extends li{constructor(t){super(t),this.shaderGenerator=new Np(dL,fL),this.geometryClass=Uw,this.vertexSize=7}packInterleavedGeometry(t,e,s,r,n){const{uint32View:a,float32View:o}=e,h=r/this.vertexSize,l=t.uvs,c=t.indices,u=t.vertexData,d=t._texture.baseTexture._batchLocation,f=Math.min(t.worldAlpha,1),m=Wt.shared.setValue(t._tintRGB).toPremultiplied(f,!0),p=Wt.shared.setValue(t._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[r++]=u[g],o[r++]=u[g+1],o[r++]=l[g],o[r++]=l[g+1],a[r++]=m,a[r++]=p,o[r++]=d;for(let g=0;g<c.length;g++)s[n++]=h+c[g]}}x(gg,"extension",{name:"darkTintBatch",type:gt.RendererPlugin});St.add(gg);const ai=class ai extends zn{constructor(){const e=new Zc;e.getBuffer("aVertexPosition").static=!1,e.getBuffer("aTextureCoord").static=!1;const s=new rl(Nt.EMPTY);super(e,s);x(this,"name","");x(this,"warnedTwoTint",!1)}updateFromSpineData(e,s,r,n,a,o,h,l){var y,_;this.texture=e.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((_=d.data)==null?void 0:_.length)!==c&&(d.data=new Float32Array(c));let f=0;const m=u.data,p=d.data;for(let v=0;v<a;v+=l?12:8){let b=v;p[f]=n[b++],p[f+1]=n[b++],b+=4,m[f]=n[b++],m[f+1]=n[b++],f+=2}l&&!this.warnedTwoTint&&(console.warn("DarkTint is not enabled by default. To enable use a DarkSlotMesh factory while creating the Spine object."),this.warnedTwoTint=!0),ai.auxColor[0]=n[2],ai.auxColor[1]=n[3],ai.auxColor[2]=n[4],ai.auxColor[3]=n[5],this.tint=ai.auxColor,this.alpha=ai.auxColor[3],this.blendMode=qn.toPixiBlending(s);const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let b=0;b<h;b++)v[b]=o[b]}this.name=r,u.update(),d.update(),g.update()}};x(ai,"auxColor",[0,0,0,0]);let yc=ai;class mL{constructor(t,e,s,r){x(this,"x");x(this,"y");x(this,"width");x(this,"height");this.x=t,this.y=e,this.width=s,this.height=r}calculateBounds(){return{x:this.x,y:this.y,width:this.width,height:this.height}}}class pL{constructor(t=!1){x(this,"clipping");this.clipping=t}calculateBounds(t){if(!t.skeleton)return{x:0,y:0,width:0,height:0};const e=new Mi(t.skeleton.data);e.setupPose(),e.updateWorldTransform(Os.update);const s=e.getBoundsRect(this.clipping?new ao:void 0);return s.width===Number.NEGATIVE_INFINITY?{x:0,y:0,width:0,height:0}:s}}class gL{constructor(t,e=[],s=.05,r=!1){x(this,"animation");x(this,"skins");x(this,"timeStep");x(this,"clipping");this.animation=t,this.skins=e,this.timeStep=s,this.clipping=r}calculateBounds(t){if(!t.skeleton||!t.state)return{x:0,y:0,width:0,height:0};const e=new qa(t.state.data),s=new Mi(t.skeleton.data),r=this.clipping?new ao:void 0,n=s.data;if(this.skins.length>0){const o=new Ka("custom-skin");for(const h of this.skins){const l=n.findSkin(h);l!=null&&o.addSkin(l)}s.setSkin(o)}s.setupPose();const a=this.animation!=null?n.findAnimation(this.animation):null;if(a==null){s.updateWorldTransform(Os.update);const o=s.getBoundsRect(r);return o.width===Number.NEGATIVE_INFINITY?{x:0,y:0,width:0,height:0}:o}else{let o=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;e.clearTracks(),e.setAnimation(0,a,!1);const u=Math.max(a.duration/this.timeStep,1);for(let f=0;f<u;f++){const m=f>0?this.timeStep:0;e.update(m),e.apply(s),s.update(m),s.updateWorldTransform(Os.update);const p=s.getBoundsRect(r);o=Math.min(o,p.x),h=Math.min(h,p.y),l=Math.max(l,p.x+p.width),c=Math.max(c,p.y+p.height)}const d={x:o,y:h,width:l-o,height:c-h};return d.width===Number.NEGATIVE_INFINITY?{x:0,y:0,width:0,height:0}:d}}}const $t=class $t extends fs{constructor(e){super();x(this,"skeleton");x(this,"state");x(this,"skeletonPhysics");x(this,"darkTint",!1);x(this,"hasNeverUpdated",!0);x(this,"_debug");x(this,"slotMeshFactory",()=>new yc);x(this,"beforeUpdateWorldTransforms",()=>{});x(this,"afterUpdateWorldTransforms",()=>{});x(this,"_autoUpdate",!1);x(this,"_ticker",ss.shared);x(this,"meshesCache",new Map);x(this,"lightColor",new Ft);x(this,"darkColor",new Ft);x(this,"clippingVertAux",new Float32Array(6));x(this,"_boundsProvider");x(this,"_boundsPoint",new Kt);x(this,"_boundsSpineID",-1);x(this,"_boundsSpineDirty",!0);x(this,"slotsObject",new Map);x(this,"verticesCache",bt.newFloatArray(1024));x(this,"clippingSlotToPixiMasks",{});e instanceof Bl?e={skeletonData:e}:"skeleton"in e&&(e=new.target.createOptions(e));const{autoUpdate:s=!0,boundsProvider:r,darkTint:n,skeletonData:a,ticker:o}=e;this.skeleton=new Mi(a),this.skeletonPhysics=new pg(this.skeleton,{readTransform:(h,l)=>this.readPhysicsTransform(h,l),worldToSkeleton:h=>this.pixiWorldCoordinatesToSkeleton(h)}),this.state=new qa(new og(a)),o&&(this._ticker=o),this.autoUpdate=s,this.boundsProvider=r,this.darkTint=n===void 0?this.skeleton.slots.some(h=>!!h.data.setupPose.darkColor):n,this.darkTint&&(this.slotMeshFactory=()=>new gc)}get debug(){return Line truncated