handler-playable-sdk 1.0.9 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VPC22EHY.js → chunk-NNKOLF5Z.js} +50 -50
- package/dist/cli/brand-dna.mjs +1 -1
- package/dist/cli/canva-import.mjs +1 -1
- package/dist/cli/cleanup-assets.mjs +1 -1
- package/dist/cli/fix-scales.mjs +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/screen-helper.mjs +1 -1
- package/dist/cli/setup-library.mjs +1 -1
- package/dist/cli/student-helper.mjs +1 -1
- package/dist/cli/sync-screens.mjs +1 -1
- package/dist/cli/validate-assets.mjs +1 -1
- package/dist/cli/validate.mjs +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.css +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/pixi/index.cjs +10 -10
- package/dist/pixi/index.css +1 -1
- package/dist/pixi/index.js +1 -1
- package/dist/three/index.cjs +1 -1
- package/dist/three/index.css +1 -1
- package/dist/three/index.js +1 -1
- package/package.json +1 -1
package/dist/pixi/index.css
CHANGED
|
@@ -1137,7 +1137,7 @@
|
|
|
1137
1137
|
/* Fixed Layout Container */
|
|
1138
1138
|
.preview-shell.layout-fixed .preview-main {
|
|
1139
1139
|
display: grid;
|
|
1140
|
-
grid-template-columns: auto 1fr auto;
|
|
1140
|
+
grid-template-columns: auto minmax(400px, 1fr) auto;
|
|
1141
1141
|
grid-template-rows: 1fr auto;
|
|
1142
1142
|
gap: 0;
|
|
1143
1143
|
overflow: hidden;
|
package/dist/pixi/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x39078a,_0x3b7162){var a0_0x7b8192={_0x10212a:0xce,_0x653b8d:0xbc,_0x2381b4:0xdb,_0x573642:0xb1,_0x38f9a4:0xac,_0x1a6485:0x1c7,_0x71a29f:'8Jzw',_0x32c0db:0x1d9,_0x1215f4:0x1c8,_0x421502:0xb6,_0x2b4beb:0xaa,_0x532b4b:0xa4,_0x54038b:0x1dc,_0x123a30:'TtmN',_0x41e129:0x1d4,_0x598844:0x1c7,_0x51e08b:0x1c5,_0x195b6d:0x1c1,_0xf84596:0x1c6,_0x36ef4:0x1cb,_0x57c3f7:'xZ%F',_0x18459d:0x2a9,_0x39dd6a:0x2bb,_0x110a1b:'xZ%F',_0x365d3a:0x2ca,_0x4fe5df:0x2be,_0x133822:0xcb,_0x459e32:0xc1,_0x591698:0xd3,_0x455f11:'3WHc',_0x180324:0x1e4,_0xb1dd00:'&eRx',_0x210f70:0x1dc,_0x3799c2:0xc4,_0x302683:0xd3,_0x38e8bd:0xc1,_0xa3b0cc:0xcd,_0x5c75d4:')DCH',_0x109c25:0x2c6},a0_0x4b50ca={_0x2607fb:0x30e},a0_0x3ef560={_0x2577e3:0x1f3};function _0x3358e9(_0x392d27,_0x1ea711,_0x23509f,_0x2063ca,_0x30f787){return a0_0x5a19(_0x392d27- -a0_0x3ef560._0x2577e3,_0x2063ca);}function _0xeffc1b(_0xe80f32,_0x10389a,_0x3f24f3,_0x5a71c0,_0x207831){return a0_0x5a19(_0x3f24f3- -a0_0x4b50ca._0x2607fb,_0x10389a);}function _0xa928b1(_0x51db09,_0x1ff401,_0x3b054e,_0x47e88e,_0x35f73f){return a0_0x5a19(_0x3b054e-0x183,_0x51db09);}var _0x210b1c=_0x39078a();while(!![]){try{var _0x484cbe=parseInt(_0x3358e9(-a0_0x7b8192._0x10212a,-0xbd,-a0_0x7b8192._0x653b8d,'xZ%F',-a0_0x7b8192._0x2381b4))/(-0x24d4+-0x1e5*0xc+0x3b91)*(parseInt(_0x3358e9(-a0_0x7b8192._0x573642,-0xbb,-0xb2,'swqm',-a0_0x7b8192._0x38f9a4))/(0x3f*0x26+0x845*0x1+0x1f5*-0x9))+parseInt(_0xeffc1b(-a0_0x7b8192._0x1a6485,a0_0x7b8192._0x71a29f,-a0_0x7b8192._0x32c0db,-a0_0x7b8192._0x1215f4,-0x1d1))/(0x26b5+0x57*-0x1b+-0x1d85)*(parseInt(_0x3358e9(-a0_0x7b8192._0x421502,-0xab,-a0_0x7b8192._0x2b4beb,'6PCz',-a0_0x7b8192._0x532b4b))/(0x2e3*0x5+-0x1ca6+-0x1*-0xe3b))+parseInt(_0xeffc1b(-a0_0x7b8192._0x54038b,a0_0x7b8192._0x123a30,-a0_0x7b8192._0x41e129,-a0_0x7b8192._0x598844,-a0_0x7b8192._0x51e08b))/(-0x745+-0x3f*-0x37+-0x29*0x27)+parseInt(_0xeffc1b(-a0_0x7b8192._0x195b6d,a0_0x7b8192._0x123a30,-0x1cd,-a0_0x7b8192._0xf84596,-a0_0x7b8192._0x36ef4))/(-0x4*-0x6d5+-0x1420+-0x72e)*(-parseInt(_0xa928b1(a0_0x7b8192._0x57c3f7,a0_0x7b8192._0x18459d,0x2ac,0x2a6,a0_0x7b8192._0x39dd6a))/(-0xd0f*0x2+-0x1*-0x11fc+-0x829*-0x1))+parseInt(_0xa928b1(a0_0x7b8192._0x110a1b,a0_0x7b8192._0x365d3a,a0_0x7b8192._0x4fe5df,0x2b7,0x2b9))/(-0x973+-0x951+-0x3*-0x644)+parseInt(_0x3358e9(-a0_0x7b8192._0x133822,-a0_0x7b8192._0x459e32,-a0_0x7b8192._0x591698,a0_0x7b8192._0x455f11,-0xde))/(0xb5f+0x25ae+0x1882*-0x2)*(parseInt(_0xeffc1b(-a0_0x7b8192._0x180324,a0_0x7b8192._0xb1dd00,-a0_0x7b8192._0x210f70,-0x1ea,-0x1e1))/(0xf*-0xf1+0x1377+-0x54e))+-parseInt(_0x3358e9(-a0_0x7b8192._0x3799c2,-a0_0x7b8192._0x302683,-a0_0x7b8192._0x38e8bd,']2l(',-a0_0x7b8192._0xa3b0cc))/(-0x1336*-0x2+-0x1*-0x15a+-0x7*0x5ad)*(parseInt(_0xa928b1(a0_0x7b8192._0x5c75d4,0x2ac,0x2bc,a0_0x7b8192._0x109c25,a0_0x7b8192._0x18459d))/(-0x27*0xf1+0x94f+0x1b74));if(_0x484cbe===_0x3b7162)break;else _0x210b1c['push'](_0x210b1c['shift']());}catch(_0x17892b){_0x210b1c['push'](_0x210b1c['shift']());}}}(a0_0x2616,0x16*0x1645+0x9b77+-0x32c*-0x4b));var a0_0x3f0989=(function(){var _0x362b68=!![];return function(_0x1d255d,_0xe9dbb6){var a0_0x1c18a3={_0x1128d8:0x36a,_0x2aacca:0x36d,_0x282e61:0x36b,_0x3c8ca9:0x37a},_0x2cf5af=_0x362b68?function(){function _0x4281aa(_0xe66dde,_0x58132c,_0x46360e,_0x3241c0,_0x224b3d){return a0_0x5a19(_0x3241c0-0x23f,_0xe66dde);}if(_0xe9dbb6){var _0x36a40a=_0xe9dbb6[_0x4281aa('8Jzw',a0_0x1c18a3._0x1128d8,a0_0x1c18a3._0x2aacca,a0_0x1c18a3._0x282e61,a0_0x1c18a3._0x3c8ca9)](_0x1d255d,arguments);return _0xe9dbb6=null,_0x36a40a;}}:function(){};return _0x362b68=![],_0x2cf5af;};}()),a0_0x5b9f31=a0_0x3f0989(this,function(){var a0_0x12eff3={_0x3dad19:0x1da,_0x3880ab:0x1db,_0x4e2bef:0x1e6,_0x52afe6:0x1ce,_0x5bc85e:0x1d4,_0x7d3fcb:0x1dc,_0x4a285e:'#$nF',_0x2855c6:'y8Wr',_0x261fd4:0x254,_0x18ab23:0x240,_0x2d0ba3:0x252,_0x2032e9:0x1e0,_0x49f7d7:0x1e5,_0x3c2a38:0x1ed,_0x4473a3:'1jwj',_0x42a9ef:'RVwf',_0x15d799:0xa8,_0x678ecc:0xba,_0x1ce8ec:0xac,_0x5462f3:0xb0,_0x394b8a:'t2sN',_0x202b19:0xba,_0x4585c0:'rwbr',_0x18e44d:0xb1,_0x10acf9:0xaf,_0x21352a:0x1c6,_0x1d3741:0x1e4,_0x1e9c37:0x1ef,_0xb788c7:0x1dc,_0x1f0bbe:0x1f6,_0x8d854f:0x1ec,_0x5594f9:'Ypij',_0x549fbe:'rwbr',_0x456aa3:0x26e,_0x2e9dc8:0x260,_0x52af7b:0x1f6,_0x3ca738:0x1e0,_0x126588:'KM5H',_0x4be4c0:0x253,_0x505673:0x251,_0x382c7f:0x25e,_0x420e31:0x25a,_0x57e6a6:'[JK1',_0x206f00:0xb5,_0x4f79f0:0xa9,_0x2da624:0xaa,_0x7d35ee:'Ypij',_0x38b030:0x266,_0xdfdc6b:0x270,_0x982560:0x26b},a0_0x22c219={_0x1c2ab4:0x12c},a0_0x5e49a5={_0x1de259:0x316},a0_0x34da37={_0x28dcdc:0x8b},_0x296c5a={};_0x296c5a[_0x276786(-a0_0x12eff3._0x3dad19,-a0_0x12eff3._0x3880ab,-a0_0x12eff3._0x4e2bef,-a0_0x12eff3._0x4e2bef,'[JK1')]=_0x276786(-a0_0x12eff3._0x52afe6,-0x1dc,-a0_0x12eff3._0x5bc85e,-a0_0x12eff3._0x7d3fcb,a0_0x12eff3._0x4a285e)+_0x3c0b8f(a0_0x12eff3._0x2855c6,0x25f,a0_0x12eff3._0x261fd4,a0_0x12eff3._0x18ab23,a0_0x12eff3._0x2d0ba3)+'+$';function _0x1ec583(_0x5bbc00,_0xd785be,_0x5c4b6d,_0x41a19b,_0x30cd0e){return a0_0x5a19(_0xd785be- -a0_0x34da37._0x28dcdc,_0x5bbc00);}function _0x276786(_0x131e80,_0x5c6be2,_0x344da6,_0x119795,_0x2e0a36){return a0_0x5a19(_0x131e80- -a0_0x5e49a5._0x1de259,_0x2e0a36);}var _0x5aca66=_0x296c5a;function _0x3c0b8f(_0x33cfc0,_0x332893,_0x439946,_0x43bbad,_0x48dcfb){return a0_0x5a19(_0x48dcfb-a0_0x22c219._0x1c2ab4,_0x33cfc0);}return a0_0x5b9f31[_0x276786(-0x1e9,-a0_0x12eff3._0x2032e9,-a0_0x12eff3._0x49f7d7,-a0_0x12eff3._0x3c2a38,a0_0x12eff3._0x4473a3)+_0x1ec583(a0_0x12eff3._0x42a9ef,a0_0x12eff3._0x15d799,a0_0x12eff3._0x678ecc,a0_0x12eff3._0x1ce8ec,a0_0x12eff3._0x5462f3)]()[_0x1ec583(a0_0x12eff3._0x394b8a,0xad,a0_0x12eff3._0x202b19,0xa0,0xa8)+'h'](_0x1ec583(a0_0x12eff3._0x4585c0,a0_0x12eff3._0x1ce8ec,a0_0x12eff3._0x18e44d,a0_0x12eff3._0x678ecc,a0_0x12eff3._0x10acf9)+_0x276786(-0x1d8,-0x1c6,-a0_0x12eff3._0x21352a,-a0_0x12eff3._0x1d3741,'3WHc')+'+$')[_0x276786(-a0_0x12eff3._0x1e9c37,-a0_0x12eff3._0xb788c7,-a0_0x12eff3._0x1f0bbe,-a0_0x12eff3._0x8d854f,a0_0x12eff3._0x5594f9)+_0x3c0b8f(a0_0x12eff3._0x549fbe,a0_0x12eff3._0x456aa3,0x271,0x24e,a0_0x12eff3._0x2e9dc8)]()[_0x276786(-a0_0x12eff3._0x8d854f,-a0_0x12eff3._0x52af7b,-0x1e1,-a0_0x12eff3._0x3ca738,'^[h9')+_0x3c0b8f(a0_0x12eff3._0x126588,a0_0x12eff3._0x4be4c0,a0_0x12eff3._0x505673,a0_0x12eff3._0x382c7f,a0_0x12eff3._0x420e31)+'r'](a0_0x5b9f31)[_0x1ec583(a0_0x12eff3._0x57e6a6,a0_0x12eff3._0x206f00,a0_0x12eff3._0x4f79f0,0xa6,a0_0x12eff3._0x2da624)+'h'](_0x5aca66[_0x3c0b8f(a0_0x12eff3._0x7d35ee,0x269,a0_0x12eff3._0x38b030,a0_0x12eff3._0xdfdc6b,a0_0x12eff3._0x982560)]);});a0_0x5b9f31();import{A as a0_0xc1fa47,B as a0_0x459da4,C as a0_0x4eb340,D as a0_0x559a17,b as a0_0x5b15f7,c as a0_0x1d8b1d,d as a0_0x5bfdbb,e as a0_0x2e8e72,f as a0_0x3275c4,g as a0_0x10026f,h as a0_0x58acd3,i as a0_0x20e698,j as a0_0x51aaee,k as a0_0xb44acb,l as a0_0x3053b5,m as a0_0x24cb60,n as a0_0xe48eb0,o as a0_0x432673,p as a0_0x5e9594,q as a0_0x1d272c,r as a0_0x553ade,s as a0_0xbfc4de,t as a0_0x5e64c3,u as a0_0x2db5ba,v as a0_0x579b52,w as a0_0x48086f,x as a0_0x103fdd,y as a0_0x5c41ed,z as a0_0x113ddc}from'../chunk-VPC22EHY.js';function a0_0x2616(){var _0x4004e1=['W4hdOKbTWPG','amkSWR4ScG','vapdPMxdSmo8W7BdGq','WOJdKxr6xuBdLMhcR8kzcqWE','ahNdUHTDCg9hW6JcLCkGWQ0b','W6TcW7uOlW','W7ZdGWq7p8oBW50x','isf/W6ym','p8kMWQOQyW','W5n9W7a4cW','WOhdMhf4xXZcN3FcQSkmdW','WQiAw8kaWQtcMw7dLG','W7RdVr/cIf5IjXa2ea','e8kawmkpW6OIEmo5y3CFqSkD','W7/cMYFcN1JdLmkJbZj8','W7ldGrS5gmoFW68p','W6BcTIZdNmkStxRcJG','CSoGEuhcIq','WQJdTmkMhCkpWO5dAmkTW4RcJG','c3RdSbugfG9XW7ZcMq','W6hdN8kZqNi','amktWP08vG','mtjLW7PlzmkkWP9pxa','bx3cO20FnXDT','BKH2b8kE','r8k1FCowfCkTtw8','W6hdLMNcRvO','a1qGEeO','dmoYASoHkq','W4ldLJlcQ8osW4NdKCo6eYWrWOWu','W7RdHmkPwqRcKmoxb8oMBW','emknx8kiW6WHEmoEshK/tmk6','nSkWW41MnhJcOmketIa','D8oyW6O','WOdcPa8','WRNcKY3dUg/cNmkxqa91','nSoovSk0WQjYiCkq'];a0_0x2616=function(){return _0x4004e1;};return a0_0x2616();}import{a as a0_0x15b52c,b as a0_0x373170,c as a0_0x4df1c4,d as a0_0x581c9d,e as a0_0xffb54f}from'../chunk-I5OOVR5U.js';import'../chunk-PW2FGMCO.js';import'../chunk-HVKF2KYL.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';function a0_0x5a19(_0x3645cc,_0x49b700){_0x3645cc=_0x3645cc-(0x7d6*-0x1+-0x2*0xe6d+0x95*0x41);var _0x509576=a0_0x2616();var _0x59a9ef=_0x509576[_0x3645cc];if(a0_0x5a19['eQRxWb']===undefined){var _0x431c14=function(_0x3a454f){var _0x4de6e3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x6a6000='',_0x414dda='',_0xcb918e=_0x6a6000+_0x431c14;for(var _0x405d22=-0x22ff+0x45a*-0x1+0x59f*0x7,_0x4d3702,_0x2fa0e6,_0x35eb5c=0x523*0x5+-0x103*-0xd+-0x26d6;_0x2fa0e6=_0x3a454f['charAt'](_0x35eb5c++);~_0x2fa0e6&&(_0x4d3702=_0x405d22%(-0x1*-0x301+0x962*0x2+0x1*-0x15c1)?_0x4d3702*(-0x14c+-0x1f3*-0x9+-0xfff)+_0x2fa0e6:_0x2fa0e6,_0x405d22++%(0x92c+-0x6e+-0x8ba))?_0x6a6000+=_0xcb918e['charCodeAt'](_0x35eb5c+(-0x21eb*0x1+-0x199d+0x3b92))-(-0x31e*0xc+-0x237*0x9+0x18d*0x25)!==0x13d6+0x739+0x1b0f*-0x1?String['fromCharCode'](-0x1264+-0x185c+-0x3*-0xe95&_0x4d3702>>(-(0x8b6+0x552+-0xe06)*_0x405d22&0x11ad*0x2+0x6a0+0x14*-0x219)):_0x405d22:0x1*0x473+-0xed3+-0x2*-0x530){_0x2fa0e6=_0x4de6e3['indexOf'](_0x2fa0e6);}for(var _0x1d1086=-0x637*-0x3+0x4*0x7ba+-0x318d,_0x26d0fd=_0x6a6000['length'];_0x1d1086<_0x26d0fd;_0x1d1086++){_0x414dda+='%'+('00'+_0x6a6000['charCodeAt'](_0x1d1086)['toString'](0x19d0+0xee0*-0x1+-0xae0))['slice'](-(-0x241e+0xa08+-0xd0c*-0x2));}return decodeURIComponent(_0x414dda);};var _0x186125=function(_0x4035f1,_0x2b7b7c){var _0x4f8179=[],_0x177422=0x1f10+0x238e+-0x429e,_0x5bc89f,_0x15ff70='';_0x4035f1=_0x431c14(_0x4035f1);var _0x510b39;for(_0x510b39=-0x7*-0x53+-0x8a7*0x3+-0x4*-0x5ec;_0x510b39<-0x3e*0x71+0xff2+0xc6c;_0x510b39++){_0x4f8179[_0x510b39]=_0x510b39;}for(_0x510b39=0x7c*0x4f+-0x19f+-0xb1*0x35;_0x510b39<0x1549*-0x1+0x626+-0x1b*-0x99;_0x510b39++){_0x177422=(_0x177422+_0x4f8179[_0x510b39]+_0x2b7b7c['charCodeAt'](_0x510b39%_0x2b7b7c['length']))%(-0x1*0x1b19+-0x34*0xb+0x1*0x1e55),_0x5bc89f=_0x4f8179[_0x510b39],_0x4f8179[_0x510b39]=_0x4f8179[_0x177422],_0x4f8179[_0x177422]=_0x5bc89f;}_0x510b39=0x58*0x62+0xb85*-0x1+0xe3*-0x19,_0x177422=-0x1*0x829+0xf3*0x1b+-0x68*0x2b;for(var _0x171fa5=0x3*-0x699+0x1a25+-0x65a;_0x171fa5<_0x4035f1['length'];_0x171fa5++){_0x510b39=(_0x510b39+(-0xe3f+0xef9+0xb9*-0x1))%(0x1148+-0xc*0x32f+-0x17*-0xf4),_0x177422=(_0x177422+_0x4f8179[_0x510b39])%(0x377+0x1bbd+0x1e34*-0x1),_0x5bc89f=_0x4f8179[_0x510b39],_0x4f8179[_0x510b39]=_0x4f8179[_0x177422],_0x4f8179[_0x177422]=_0x5bc89f,_0x15ff70+=String['fromCharCode'](_0x4035f1['charCodeAt'](_0x171fa5)^_0x4f8179[(_0x4f8179[_0x510b39]+_0x4f8179[_0x177422])%(0xe7f+0xf*-0x209+0x1108)]);}return _0x15ff70;};a0_0x5a19['xcsbtL']=_0x186125,a0_0x5a19['sCPLsz']={},a0_0x5a19['eQRxWb']=!![];}var _0x515674=_0x509576[-0x6*0x7c+0xc+0x2dc],_0x5eee16=_0x3645cc+_0x515674,_0x247ca9=a0_0x5a19['sCPLsz'][_0x5eee16];if(!_0x247ca9){if(a0_0x5a19['wSfOru']===undefined){var _0x34a930=function(_0x27de0b){this['nkismd']=_0x27de0b,this['QJsWIm']=[0x4+0x9ae*-0x1+0x9ab,0x26a2*-0x1+-0x1bb1+0x4253,-0x1*-0x171a+0xd6*-0xb+-0x2*0x6f4],this['PgQtIP']=function(){return'newState';},this['aDpQsz']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['gTWwAq']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x34a930['prototype']['NxOzZG']=function(){var _0x18b813=new RegExp(this['aDpQsz']+this['gTWwAq']),_0xccae2=_0x18b813['test'](this['PgQtIP']['toString']())?--this['QJsWIm'][0x223+0x1424*-0x1+0x1202]:--this['QJsWIm'][0x135e+0x1f5e+-0x44*0xbf];return this['QyhIMl'](_0xccae2);},_0x34a930['prototype']['QyhIMl']=function(_0xfcfa0d){if(!Boolean(~_0xfcfa0d))return _0xfcfa0d;return this['dKAREl'](this['nkismd']);},_0x34a930['prototype']['dKAREl']=function(_0x45a33d){for(var _0x521107=-0x1283+0xbd8+0x6ab,_0x160c68=this['QJsWIm']['length'];_0x521107<_0x160c68;_0x521107++){this['QJsWIm']['push'](Math['round'](Math['random']())),_0x160c68=this['QJsWIm']['length'];}return _0x45a33d(this['QJsWIm'][-0x2416+0xffb+0x1*0x141b]);},new _0x34a930(a0_0x5a19)['NxOzZG'](),a0_0x5a19['wSfOru']=!![];}_0x59a9ef=a0_0x5a19['xcsbtL'](_0x59a9ef,_0x49b700),a0_0x5a19['sCPLsz'][_0x5eee16]=_0x59a9ef;}else _0x59a9ef=_0x247ca9;return _0x59a9ef;}export{a0_0x15b52c as AssetCache,a0_0x4df1c4 as AssetLoader,a0_0x2db5ba as AssetSystem,a0_0x581c9d as AssetTextures,a0_0xbfc4de as Assets,a0_0x432673 as BaseSystem,a0_0xe48eb0 as GameEngine,a0_0x2e8e72 as GameObject,a0_0x3275c4 as GameObjectManager,a0_0x24cb60 as ObjectFactory,a0_0x5bfdbb as Renderer,a0_0x5e9594 as RuntimeObjectRegistry,a0_0x1d8b1d as Transform,a0_0x459da4 as applyScreenAnchor,a0_0x1d272c as basePixi,a0_0x48086f as clearResponsiveElements,a0_0x5b15f7 as createPixiBase,a0_0x51aaee as getRegisteredFontIds,a0_0x579b52 as globalResponsiveMultipliers,a0_0xffb54f as initAssetTextures,a0_0x5e64c3 as initAssets,a0_0x4eb340 as layout,a0_0x3053b5 as playLottieOverlay,a0_0x20e698 as registerFont,a0_0x373170 as registerType,a0_0x5c41ed as resolveAnchorVec2,a0_0x10026f as resolveFont,a0_0x58acd3 as resolveFontWeight,a0_0x113ddc as resolveScreenAnchorPoint,a0_0xc1fa47 as resolveScreenRatioPoint,a0_0x559a17 as runInitSequence,a0_0xb44acb as setLottieInstance,a0_0x553ade as spawnSceneFromConfig,a0_0x103fdd as updateScreenState};
|
|
1
|
+
(function(_0x57f37b,_0x52273a){var a0_0x4ae6ea={_0x39e14b:0x223,_0x447257:'9klb',_0x181ca7:0x20b,_0xd7a4d1:'tU]M',_0x479817:0x203,_0x339933:0x200,_0x3f2f31:0x1f8,_0x1b622b:0x202,_0x1a824a:'0aQi',_0x3f5502:0x1fc,_0x283735:0x3f,_0x4b952b:0x38,_0x254b6d:0x47e,_0x2723ee:0x46c,_0x25ac39:0x461,_0x3815f8:0x1fa,_0x2593ba:0x1fd,_0xc3b1e2:'4cfT',_0x53a388:0x1ef,_0x5be745:0x1fe,_0x483a66:0x2e,_0x56ce3e:'I!jU',_0x17f350:0x32,_0x3fd9e1:0x26,_0x349606:0x472,_0x366f2c:'0aQi',_0x4a7941:0x475,_0x29cd86:0x26,_0x5d79f0:0x3d,_0x52c106:'!mnN',_0x31cc1f:0x29,_0x4f3792:0x45,_0x1cad6c:0x38,_0x19c215:'zvxp',_0x54fa1d:0x3e,_0x4a98bf:'b3]D',_0x336399:0x38,_0x51b1e1:0x47f,_0x1eb552:0x461},a0_0x3ee4c1={_0x25b163:0x1b5};function _0xd3dd73(_0xc46395,_0x2381d8,_0x46f730,_0xaa8e7c,_0x4352dd){return a0_0x36d1(_0xc46395-0x80,_0x46f730);}function _0x5f18ba(_0x49baee,_0x40a58f,_0x3b5e16,_0x48f36d,_0x2fa226){return a0_0x36d1(_0x48f36d- -a0_0x3ee4c1._0x25b163,_0x3b5e16);}function _0x3e6cb9(_0x55f6f1,_0x4aed28,_0x542835,_0x2d4c52,_0x3471b4){return a0_0x36d1(_0x3471b4-0x2dc,_0x542835);}var _0x54d44f=_0x57f37b();while(!![]){try{var _0x535bd2=-parseInt(_0xd3dd73(0x216,a0_0x4ae6ea._0x39e14b,a0_0x4ae6ea._0x447257,0x21d,0x20a))/(0xc9d+-0x4ee*0x1+-0x3d7*0x2)*(parseInt(_0xd3dd73(0x1fc,a0_0x4ae6ea._0x181ca7,a0_0x4ae6ea._0xd7a4d1,a0_0x4ae6ea._0x479817,a0_0x4ae6ea._0x339933))/(0xd23+0x20e2+-0x2e03))+-parseInt(_0xd3dd73(a0_0x4ae6ea._0x3f2f31,a0_0x4ae6ea._0x1b622b,a0_0x4ae6ea._0x1a824a,a0_0x4ae6ea._0x339933,a0_0x4ae6ea._0x3f5502))/(-0x3d5+-0x11*0x115+0x163d)*(parseInt(_0x5f18ba(-a0_0x4ae6ea._0x283735,-0x35,'[^[n',-a0_0x4ae6ea._0x4b952b,-0x47))/(-0xbc1+0x2143+-0x189*0xe))+parseInt(_0x3e6cb9(a0_0x4ae6ea._0x254b6d,a0_0x4ae6ea._0x2723ee,'tU]M',a0_0x4ae6ea._0x25ac39,0x46d))/(0x1777+0xac0+-0x5b3*0x6)+parseInt(_0xd3dd73(a0_0x4ae6ea._0x3815f8,a0_0x4ae6ea._0x2593ba,a0_0x4ae6ea._0xc3b1e2,a0_0x4ae6ea._0x53a388,a0_0x4ae6ea._0x5be745))/(0x151*0x9+-0x1418+0x845)*(parseInt(_0x5f18ba(-0x2b,-a0_0x4ae6ea._0x483a66,a0_0x4ae6ea._0x56ce3e,-a0_0x4ae6ea._0x17f350,-a0_0x4ae6ea._0x3fd9e1))/(0x2410+-0x740+0x1cc9*-0x1))+-parseInt(_0x3e6cb9(0x461,a0_0x4ae6ea._0x349606,a0_0x4ae6ea._0x366f2c,a0_0x4ae6ea._0x4a7941,0x467))/(0x1*-0x1311+-0x1144+0x245d)*(-parseInt(_0x5f18ba(-a0_0x4ae6ea._0x29cd86,-a0_0x4ae6ea._0x5d79f0,a0_0x4ae6ea._0x52c106,-0x30,-a0_0x4ae6ea._0x31cc1f))/(-0x190f+0x8*0x14b+0xec0))+-parseInt(_0x5f18ba(-a0_0x4ae6ea._0x4f3792,-a0_0x4ae6ea._0x1cad6c,a0_0x4ae6ea._0x19c215,-a0_0x4ae6ea._0x54fa1d,-0x40))/(0x159f+-0x4+-0x1591)+-parseInt(_0x5f18ba(-0x2a,-a0_0x4ae6ea._0x17f350,a0_0x4ae6ea._0x4a98bf,-0x37,-a0_0x4ae6ea._0x336399))/(-0x1*-0x1be7+-0x17f4+-0x8*0x7d)*(parseInt(_0x3e6cb9(a0_0x4ae6ea._0x51b1e1,a0_0x4ae6ea._0x1eb552,'6zQ&',0x462,0x471))/(0x1848+-0xb*0x28f+0x7*0x8f));if(_0x535bd2===_0x52273a)break;else _0x54d44f['push'](_0x54d44f['shift']());}catch(_0x41177b){_0x54d44f['push'](_0x54d44f['shift']());}}}(a0_0x479c,-0x54689+0x8b*-0x1ff1+0x1fe61a));function a0_0x36d1(_0x58ee3c,_0x17ac82){_0x58ee3c=_0x58ee3c-(0x1639*0x1+0x47f*-0x7+0xd3*0xd);var _0x5e63a4=a0_0x479c();var _0x174b19=_0x5e63a4[_0x58ee3c];if(a0_0x36d1['mwRcIi']===undefined){var _0x3fb934=function(_0x2b030c){var _0x193c62='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5bba06='',_0x48a82f='',_0x1b0fa4=_0x5bba06+_0x3fb934;for(var _0x2fa7d8=-0x15b3+-0x1397+-0xe*-0x2f3,_0x2157b4,_0x5848a8,_0x10e1d7=-0x3*-0x943+-0x1*-0x1c1f+0xdfa*-0x4;_0x5848a8=_0x2b030c['charAt'](_0x10e1d7++);~_0x5848a8&&(_0x2157b4=_0x2fa7d8%(-0x4e7+0x111d+-0x2*0x619)?_0x2157b4*(-0x1273+-0x15c3*-0x1+0x70*-0x7)+_0x5848a8:_0x5848a8,_0x2fa7d8++%(0x2129+-0xc6*0xe+-0x1651))?_0x5bba06+=_0x1b0fa4['charCodeAt'](_0x10e1d7+(-0x6aa+0x107*0x4+0x298))-(-0x13*0x112+0xcb6+0x6d*0x12)!==0x10ef+-0xb*-0xa+-0x115d?String['fromCharCode'](0x6c6+-0x14f*-0xa+-0x12dd&_0x2157b4>>(-(0x1640+0x3e2+-0x1a20)*_0x2fa7d8&-0x4cd*-0x1+-0x1885+0x13be)):_0x2fa7d8:-0xced+0x338*0x3+0x345){_0x5848a8=_0x193c62['indexOf'](_0x5848a8);}for(var _0x1fe2fc=0x230b+0x15c5+-0x38d0,_0x4ede11=_0x5bba06['length'];_0x1fe2fc<_0x4ede11;_0x1fe2fc++){_0x48a82f+='%'+('00'+_0x5bba06['charCodeAt'](_0x1fe2fc)['toString'](0x2260+-0x1f0e+0x1*-0x342))['slice'](-(-0x449+-0xa7*0x3+0x640));}return decodeURIComponent(_0x48a82f);};var _0x17cc88=function(_0xf2bfc9,_0x4c53be){var _0x3cced4=[],_0x6a03bb=0x18e*-0x12+-0x107f+-0x2c7b*-0x1,_0x8936b6,_0x4f96c6='';_0xf2bfc9=_0x3fb934(_0xf2bfc9);var _0x1225ab;for(_0x1225ab=0xcd2*0x1+0xaf8*0x1+-0x17ca;_0x1225ab<0xfb+0x38*0x15+-0x1*0x493;_0x1225ab++){_0x3cced4[_0x1225ab]=_0x1225ab;}for(_0x1225ab=-0x1*-0x1b64+-0x14ba+-0x355*0x2;_0x1225ab<0x270*-0x1+0x1ec8*-0x1+0x6*0x5b4;_0x1225ab++){_0x6a03bb=(_0x6a03bb+_0x3cced4[_0x1225ab]+_0x4c53be['charCodeAt'](_0x1225ab%_0x4c53be['length']))%(-0x2*-0xdd6+0x24*-0x68+-0xc0c),_0x8936b6=_0x3cced4[_0x1225ab],_0x3cced4[_0x1225ab]=_0x3cced4[_0x6a03bb],_0x3cced4[_0x6a03bb]=_0x8936b6;}_0x1225ab=-0x2b*0x1f+-0x10c8+0x15fd*0x1,_0x6a03bb=-0x220a*-0x1+-0x2fc*0x5+-0x131e;for(var _0x3e2622=-0x52*-0x76+0x1428+-0x4*0xe7d;_0x3e2622<_0xf2bfc9['length'];_0x3e2622++){_0x1225ab=(_0x1225ab+(0x1490+-0xd91+0x2*-0x37f))%(0x1aac+0x4*0x4eb+-0x2d58),_0x6a03bb=(_0x6a03bb+_0x3cced4[_0x1225ab])%(-0x1*-0x2562+-0x1118+0x9a5*-0x2),_0x8936b6=_0x3cced4[_0x1225ab],_0x3cced4[_0x1225ab]=_0x3cced4[_0x6a03bb],_0x3cced4[_0x6a03bb]=_0x8936b6,_0x4f96c6+=String['fromCharCode'](_0xf2bfc9['charCodeAt'](_0x3e2622)^_0x3cced4[(_0x3cced4[_0x1225ab]+_0x3cced4[_0x6a03bb])%(0x157d+-0x223*-0x5+-0x17c*0x15)]);}return _0x4f96c6;};a0_0x36d1['BCCEjb']=_0x17cc88,a0_0x36d1['pbDbpp']={},a0_0x36d1['mwRcIi']=!![];}var _0x57d263=_0x5e63a4[0x1*0x4e1+0x2*0xe6f+0xa3*-0x35],_0xf22109=_0x58ee3c+_0x57d263,_0x2d9828=a0_0x36d1['pbDbpp'][_0xf22109];if(!_0x2d9828){if(a0_0x36d1['faazBf']===undefined){var _0x1729d8=function(_0x4f7054){this['kSvOiX']=_0x4f7054,this['oxgSbU']=[-0x1179+0x1ff5+-0xe7b,0x812+-0x13e4+0xbd2,-0xe8+0x887+-0x79f*0x1],this['xdgyVC']=function(){return'newState';},this['tRwPlW']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['oWfMap']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1729d8['prototype']['wQozhh']=function(){var _0x4a63c4=new RegExp(this['tRwPlW']+this['oWfMap']),_0x6fac=_0x4a63c4['test'](this['xdgyVC']['toString']())?--this['oxgSbU'][0x7*-0xc5+0x137*0x1f+0x2045*-0x1]:--this['oxgSbU'][-0x221d+0x11b8+0x1065];return this['bXEdZL'](_0x6fac);},_0x1729d8['prototype']['bXEdZL']=function(_0xd0ddab){if(!Boolean(~_0xd0ddab))return _0xd0ddab;return this['qPkeiA'](this['kSvOiX']);},_0x1729d8['prototype']['qPkeiA']=function(_0x5bb3ef){for(var _0x26d6f0=-0x268c+0x2390+0x2fc,_0x28b59e=this['oxgSbU']['length'];_0x26d6f0<_0x28b59e;_0x26d6f0++){this['oxgSbU']['push'](Math['round'](Math['random']())),_0x28b59e=this['oxgSbU']['length'];}return _0x5bb3ef(this['oxgSbU'][-0x18d*-0x15+-0x5*0x77+-0x1e3e]);},new _0x1729d8(a0_0x36d1)['wQozhh'](),a0_0x36d1['faazBf']=!![];}_0x174b19=a0_0x36d1['BCCEjb'](_0x174b19,_0x17ac82),a0_0x36d1['pbDbpp'][_0xf22109]=_0x174b19;}else _0x174b19=_0x2d9828;return _0x174b19;}var a0_0x4b4e00=(function(){var _0x2fc652=!![];return function(_0x2c923a,_0x4a1e81){var a0_0x351757={_0x6feb0f:0x2e4,_0x430ec0:0x2ee,_0x43b034:0x2e9,_0x5176b7:'q1bj',_0x1d7271:0x2e0},a0_0x4a4786={_0x4af801:0x167},_0x42f8d2=_0x2fc652?function(){function _0xc89c9b(_0x3bcf99,_0x1554f0,_0x40b217,_0x4c001c,_0xe374d2){return a0_0x36d1(_0x40b217-a0_0x4a4786._0x4af801,_0x4c001c);}if(_0x4a1e81){var _0x2d533f=_0x4a1e81[_0xc89c9b(a0_0x351757._0x6feb0f,a0_0x351757._0x430ec0,a0_0x351757._0x43b034,a0_0x351757._0x5176b7,a0_0x351757._0x1d7271)](_0x2c923a,arguments);return _0x4a1e81=null,_0x2d533f;}}:function(){};return _0x2fc652=![],_0x42f8d2;};}()),a0_0x50f89a=a0_0x4b4e00(this,function(){var a0_0x1c93b5={_0x12969d:0x92,_0x3063ac:0x80,_0x146054:0x8d,_0x47f449:'Wwmq',_0x3af45c:0x22d,_0x3ff2ce:0x220,_0x206d8a:0x22c,_0x30592f:'()Nb',_0x3a7404:0xb,_0x5be489:0x6,_0x16b629:0xb,_0x247376:0x1b,_0x846ad8:'Rfkd',_0x406c63:0x21b,_0x1584f9:0x20f,_0x4f5124:0x21e,_0x165b77:0x21f,_0x25a810:0x215,_0x35bbc4:0x1f9,_0x194b75:0x207,_0x41ba1c:0x3,_0x8ee6c9:0x2,_0x35d04c:0x4,_0x41e4e4:0x99,_0x4e320c:0x83,_0xfaf46a:'0aQi',_0x4ae5f7:0xa3,_0x4d725e:0xa5,_0x4532e1:0x97,_0x544796:0xa1,_0x418099:'b3]D',_0x2afd9a:'9klb',_0x3da16a:0x1,_0x4f8d23:0x9,_0x236061:0x8,_0x1880a0:'RIim',_0x49f2d7:0x210,_0x5dbe40:0x224,_0x19b9b6:0x3,_0x4d4b58:0x2,_0x304691:0xa,_0x58ad60:0xf},a0_0x18eecc={_0x3d1e20:0x198},a0_0x378473={_0x31f60b:0x225},a0_0x4ba73a={_0xe2aa26:0x8e};function _0x3a8fd2(_0x2a1421,_0x2820e8,_0x58f70c,_0x272698,_0x1ad972){return a0_0x36d1(_0x272698-a0_0x4ba73a._0xe2aa26,_0x2a1421);}function _0x1223a6(_0x41d59e,_0x2149af,_0x2e288a,_0x41a351,_0x4c9839){return a0_0x36d1(_0x41a351- -a0_0x378473._0x31f60b,_0x4c9839);}var _0x2954d2={};_0x2954d2[_0x1223a6(-0x8a,-a0_0x1c93b5._0x12969d,-a0_0x1c93b5._0x3063ac,-a0_0x1c93b5._0x146054,a0_0x1c93b5._0x47f449)]=_0x3a8fd2('b3]D',a0_0x1c93b5._0x3af45c,0x21c,a0_0x1c93b5._0x3ff2ce,a0_0x1c93b5._0x206d8a)+_0x7f72a4(a0_0x1c93b5._0x30592f,-a0_0x1c93b5._0x3a7404,-a0_0x1c93b5._0x5be489,-a0_0x1c93b5._0x16b629,-a0_0x1c93b5._0x247376)+'+$';var _0x1b34e2=_0x2954d2;function _0x7f72a4(_0x29cc18,_0x161f96,_0x3857c4,_0x5df818,_0x1305ad){return a0_0x36d1(_0x5df818- -a0_0x18eecc._0x3d1e20,_0x29cc18);}return a0_0x50f89a['toStr'+_0x3a8fd2(a0_0x1c93b5._0x846ad8,a0_0x1c93b5._0x406c63,a0_0x1c93b5._0x1584f9,a0_0x1c93b5._0x4f5124,a0_0x1c93b5._0x165b77)]()[_0x3a8fd2('tU]M',a0_0x1c93b5._0x25a810,a0_0x1c93b5._0x35bbc4,a0_0x1c93b5._0x194b75,0x202)+'h'](_0x1b34e2[_0x7f72a4('W$9U',-a0_0x1c93b5._0x41ba1c,-a0_0x1c93b5._0x8ee6c9,-a0_0x1c93b5._0x35d04c,-a0_0x1c93b5._0x41ba1c)])[_0x1223a6(-a0_0x1c93b5._0x41e4e4,-0x8e,-a0_0x1c93b5._0x4e320c,-0x8e,a0_0x1c93b5._0xfaf46a)+'ing']()[_0x1223a6(-a0_0x1c93b5._0x4ae5f7,-a0_0x1c93b5._0x4d725e,-a0_0x1c93b5._0x4532e1,-a0_0x1c93b5._0x544796,a0_0x1c93b5._0x418099)+_0x7f72a4(a0_0x1c93b5._0x2afd9a,-0x4,-a0_0x1c93b5._0x3da16a,-a0_0x1c93b5._0x4f8d23,-a0_0x1c93b5._0x236061)+'r'](a0_0x50f89a)[_0x3a8fd2(a0_0x1c93b5._0x1880a0,0x21f,a0_0x1c93b5._0x49f2d7,0x214,a0_0x1c93b5._0x5dbe40)+'h'](_0x1b34e2[_0x7f72a4('c%HC',a0_0x1c93b5._0x19b9b6,a0_0x1c93b5._0x4d4b58,-a0_0x1c93b5._0x304691,-a0_0x1c93b5._0x58ad60)]);});a0_0x50f89a();import{A as a0_0x1aac36,B as a0_0x523fb7,C as a0_0xb362ca,D as a0_0x3f559c,b as a0_0x3d12fb,c as a0_0x3880e7,d as a0_0x5ed32d,e as a0_0x5262a4,f as a0_0x5f1089,g as a0_0x37f916,h as a0_0x30e272,i as a0_0x354b5c,j as a0_0xbe0f69,k as a0_0x356402,l as a0_0x4bdc79,m as a0_0x4bd147,n as a0_0x182455,o as a0_0x511ea5,p as a0_0x1663ce,q as a0_0x5c3763,r as a0_0x2bccbe,s as a0_0x2a8783,t as a0_0x5796b8,u as a0_0x16bc8a,v as a0_0x2cb6ae,w as a0_0xa1e948,x as a0_0x3affc6,y as a0_0x5e20a6,z as a0_0x5c417a}from'../chunk-NNKOLF5Z.js';import{a as a0_0x5d5e29,b as a0_0x53d2d2,c as a0_0x3851bd,d as a0_0x5176e6,e as a0_0x1dd635}from'../chunk-I5OOVR5U.js';import'../chunk-PW2FGMCO.js';function a0_0x479c(){var _0x54213e=['W4DMW6jRDW','WOxdH8kpgSkkWPaWW7LsWPxcQa','W6lcU8oCnWW','tJpdUGHQwgHmxsq','WPb7p0fCWQPfFXvaoSkxsW','ntXmW4JdIsZcUuddLmkq','pmo7lSkfemkjWOFcVmk8F8ku','E8kDW7VcKq8kW7W0W68q','BIzMEcxdRmkaotBdSxhdSW','wmoDfCo8W6i','WQVcVSk8zSoc','ESk3DmoftG','WRmNiG','rmkuuxZdGdC6iCkLW7yGrfy','WOWHWQq2ka','W5LTmCoXuxGvo8o/WOO','WO1lg8kkpW','WONdVrzvWQdcJCkhW5f2gW','pmoZjmkdfmo4WQJcUSkqxmkiFW','pSohWPRdNre','EMy5WPBdNW','WQiLEaFdSmkKA3X/W7pcILHE','FCkBW7ZcMvnzW58DW4yFWR3dIa','bSodad/cKa','qmorW5RdSSoQWOShW7pcLri','WOqaB8oWg07cKu0nttJcSa','qCo0lZZcOevM','WQvfA8k4WPJdIGO','WPy9WRWHzSkZWQhcOuzh','chnKCsyEoW','WPv/o0zDWQjaEc5rnSkXsW','BmoVrCkRWPn9WQa','i8owW6VcG8kO','bq7cNWldU8o9s8oGASok'];a0_0x479c=function(){return _0x54213e;};return a0_0x479c();}import'../chunk-HVKF2KYL.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x5d5e29 as AssetCache,a0_0x3851bd as AssetLoader,a0_0x16bc8a as AssetSystem,a0_0x5176e6 as AssetTextures,a0_0x2a8783 as Assets,a0_0x511ea5 as BaseSystem,a0_0x182455 as GameEngine,a0_0x5262a4 as GameObject,a0_0x5f1089 as GameObjectManager,a0_0x4bd147 as ObjectFactory,a0_0x5ed32d as Renderer,a0_0x1663ce as RuntimeObjectRegistry,a0_0x3880e7 as Transform,a0_0x523fb7 as applyScreenAnchor,a0_0x5c3763 as basePixi,a0_0xa1e948 as clearResponsiveElements,a0_0x3d12fb as createPixiBase,a0_0xbe0f69 as getRegisteredFontIds,a0_0x2cb6ae as globalResponsiveMultipliers,a0_0x1dd635 as initAssetTextures,a0_0x5796b8 as initAssets,a0_0xb362ca as layout,a0_0x4bdc79 as playLottieOverlay,a0_0x354b5c as registerFont,a0_0x53d2d2 as registerType,a0_0x5e20a6 as resolveAnchorVec2,a0_0x37f916 as resolveFont,a0_0x30e272 as resolveFontWeight,a0_0x5c417a as resolveScreenAnchorPoint,a0_0x1aac36 as resolveScreenRatioPoint,a0_0x3f559c as runInitSequence,a0_0x356402 as setLottieInstance,a0_0x2bccbe as spawnSceneFromConfig,a0_0x3affc6 as updateScreenState};
|
package/dist/three/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<button class="debug-btn primary" data-modal-apply>Apply</button>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(r=>{r.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(r=>{r.addEventListener("click",o=>{let d=o.target.dataset.tab;d&&this.switchTab(d)})});let i=this.modal.querySelector("[data-ai-generate]");i==null||i.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let s=this.modal.querySelector("[data-modal-apply]");s==null||s.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",r=>{r.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let n=window.__openAiEditor;if(typeof n!="function"){alert("AI Editor not available. Please check your setup.");return}let i="";e==="edit"&&this.currentAsset?i=`Edit this image: ${this.currentObjectId}`:i=`Create an image for: ${this.currentObjectId}`,n(this.currentObjectId||"unknown",i,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var el={};ca(el,{AspectClass:()=>$n,GameObject:()=>dt,GameObjectManager:()=>Ht,Renderer:()=>ct,ResponsiveUISystem:()=>qe,Transform:()=>lt,animateHandClick:()=>Es,animatePanelEntrance:()=>Ss,createBrushTexture:()=>_s,createEndGamePanel:()=>xs,createHandTutorial:()=>Cs,createThreeBase:()=>ys,createTutorialLabel:()=>As,getAspectClass:()=>$t,getRegisteredFontIds:()=>ws,loadAsset:()=>Nn,loadCharacterFrames:()=>Ms,registerFont:()=>vs,resolveFont:()=>ee,resolveFontWeight:()=>te,updateHandAnimation:()=>Ts});module.exports=Er(el);var W=ge(require("three"),1);var he={};function vt(t,e,n=!1){he[t]||(he[t]=[]),he[t].push({fn:e,once:n})}function Jt(t,e){if(he[t]){if(!e){delete he[t];return}he[t]=he[t].filter(n=>n.fn!==e)}}function wt(t,...e){let n=he[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Jt(t,i.fn)}function B(t,e){vt(t,e,!0)}var _=null,V=[],Ie=null;function ga(t){_=t,V=[],Ie!==null&&(clearTimeout(Ie),Ie=null)}function ha(){var t,e,n;return{endpoint:(_==null?void 0:_.endpoint)||"",transport:(_==null?void 0:_.transport)||"beacon",batchSize:(t=_==null?void 0:_.batchSize)!=null?t:10,flushIntervalMs:(e=_==null?void 0:_.flushIntervalMs)!=null?e:300,maxQueue:(n=_==null?void 0:_.maxQueue)!=null?n:200,debug:!!(_!=null&&_.debug)}}async function pa(t,e,n,i){let a=JSON.stringify(e);if(n==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let s=navigator.sendBeacon(t,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",s,e);return}catch(s){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",s)}try{await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(s){i&&console.warn("[handler.telemetry] fetch failed",s)}}function Zt(t,e){let n=ha();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ua();return}Ie===null&&(Ie=window.setTimeout(()=>{Ie=null,ua()},n.flushIntervalMs))}}async function ua(){let t=ha();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await pa(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await pa(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function ma(t){return Math.max(0,Math.min(1,t))}function Cr(t){let e=String(t!=null?t:"power2.out");if(e==="linear")return n=>n;if(e==="sine.inOut")return n=>.5-Math.cos(Math.PI*n)/2;if(e==="power2.out"||e==="easeOutQuad")return n=>1-(1-n)*(1-n);if(e.startsWith("back.out")){let n=e.match(/back\.out\(([\d.]+)\)/),i=n?Number(n[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return n=>1-(1-n)*(1-n)}function Xe(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Ar(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function fa(t,e,n){try{t[e]=n}catch{}}function Tr(t){let e=t==null?void 0:t.scale;if(!e)return null;let n=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:n,y:i}}function ba(t,e){let n=t==null?void 0:t.scale;if(n)try{typeof n.set=="function"?n.set(e.x,e.y):(typeof n.x=="number"&&(n.x=e.x),typeof n.y=="number"&&(n.y=e.y))}catch{}}function ya(t,e){let n=Tr(t);if(!n)return{from:null,to:null};let i=null,a=null;return typeof e.scale=="number"?(i=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(i=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(i=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),i===null&&a===null?{from:null,to:null}:{from:{x:n.x,y:n.y},to:{x:i!=null?i:n.x,y:a!=null?a:n.y}}}function va(){let t=new Set,e=new WeakMap,n=null,i=()=>{if(n!=null)return;n=requestAnimationFrame(()=>{n=null,o(),t.size>0&&i()})},a=p=>{var g;t.add(p);let c=(g=e.get(p.target))!=null?g:new Set;c.add(p),e.set(p.target,c),i()},s=p=>{t.delete(p);let c=e.get(p.target);c&&(c.delete(p),c.size===0&&e.delete(p.target))},r=p=>{p.killed||(p.killed=!0,s(p))},o=()=>{var c,g;let p=Xe();for(let u of Array.from(t)){if(u.killed||u.paused)continue;let b=p-u.startMs-u.delayMs;if(b<0)continue;let h=u.durationMs>0?b/u.durationMs:1,w=ma(h),v=u.repeat>=0?u.repeat+1:1,y=u.repeat>0?Math.min(Math.floor(h),v-1):0;if(u.repeat>0&&h>=1){let S=h-y;w=ma(S)}let m=u.ease(w);u.yoyo&&y%2===1&&(m=1-m);for(let S of u.props)fa(u.target,S.key,S.from+(S.to-S.from)*m);u.scaleFrom&&u.scaleTo&&ba(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*m,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*m});try{(c=u.onUpdate)==null||c.call(u)}catch{}if(h>=v){r(u);try{(g=u.onComplete)==null||g.call(u)}catch{}}}},l=(p,c,g)=>{var S;let u=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),b=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((S=g==null?void 0:g.delayMsOverride)!=null?S:0)),h=Cr(c.ease),w=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,v=c.yoyo===!0,y=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),m=[];for(let E of Object.keys(c)){if(y.has(E))continue;let C=c[E];typeof C=="number"&&m.push({key:E,from:Ar(p,E),to:C})}let f=ya(p,c);return{target:p,startMs:Xe(),delayMs:b,durationMs:u,ease:h,props:m,scaleFrom:f.from,scaleTo:f.to,repeat:w,yoyo:v,onUpdate:typeof c.onUpdate=="function"?c.onUpdate:void 0,onComplete:typeof c.onComplete=="function"?c.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},d={to(p,c){let g=l(p,c);return a(g),{kill:()=>r(g),pause:()=>{g.paused||(g.paused=!0,g.pauseAtMs=Xe())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Xe(),b=Xe()-u;g.startMs+=b,g.paused=!1,g.pauseAtMs=null},isActive:()=>!g.killed&&!g.paused}},fromTo(p,c,g){return d.set(p,c),d.to(p,g)},set(p,c){if(!p||!c)return;for(let u of Object.keys(c)){let b=c[u];u==="scale"||u==="scaleX"||u==="scaleY"||typeof b=="number"&&fa(p,u,b)}let g=ya(p,c);g.to&&ba(p,g.to)},killTweensOf(p){let c=e.get(p);if(c)for(let g of Array.from(c))r(g)},timeline(p={}){let c=[],g=0,u=!1,b=[],h=y=>{if(typeof y=="number")return Math.max(0,y*1e3);let m=typeof y=="string"?y.trim():"";return m.startsWith("+=")?g+Math.max(0,Number(m.slice(2))*1e3||0):m?Math.max(0,Number(m)*1e3||0):g},w=y=>{c.push(y);let m=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);g=Math.max(g,y.atMs+m)},v={to(y,m,f){return w({kind:"to",target:y,vars:m,atMs:h(f)}),v},fromTo(y,m,f,S){return w({kind:"fromTo",target:y,vars:f,from:m,atMs:h(S)}),v},play(){var y,m;if(u)return v;u=!0,b=[];for(let f of c)f.kind==="fromTo"&&d.set(f.target,(y=f.from)!=null?y:{}),b.push(d.to(f.target,{...f.vars,delay:f.atMs/1e3+((m=f.vars.delay)!=null?m:0)}));return v},pause(){for(let y of b)y.pause();return v},kill(){for(let y of b)y.kill();b=[],u=!1}};return p.paused||v.play(),v}};return d}function wa(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=va()}catch{}}var xa={name:"handler-playable-sdk",version:"1.0.9",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var G=0,kr=G++,Sa=G++,Ea=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,ka=G++,Ma=G++,_a=G++,Pa=G++,Ia=G++,T=kr;function ja(){return T===Sa}function Oa(){return T===Ea}function Ra(){return T===Ca}function za(){return T===Aa}function je(){return T===Ta}function Oe(){return T===La}function $a(){return T===ka}function Ha(){return T===Ma}function Da(){return T===_a}function Qt(){return T===Pa}function en(){return T===Ia}function Na(){let t=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(t==="mraid")try{mraid.getState(),T=Sa;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=Ea;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=Ca)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Aa)}catch{}else if(e==="mintegral")window.gameReady&&(T=Ta);else if(e==="tapjoy")window.TJ_API&&(T=La);else if(e==="tiktok")window.openAppStore&&(T=ka);else if(e==="smadex")try{window.smxTracking&&(T=Ma)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=_a)}catch{}else e==="vungle"?T=Pa:(t==="nucleo"||e==="nucleo")&&(T=Ia)}var xt=ge(require("lottie-web"),1),Fa=xt.default;typeof window!="undefined"&&(window.lottie=xt.default,window.__baseLottie=xt.default);var Mr=require("pixi.js");var tn=require("pixi.js");var _r=null;function nn(t){_r=t}St();an();var Ke=require("pixi.js");St();var zr=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",ln=zr;if(typeof window!="undefined")try{let t=new XMLHttpRequest;if(t.open("GET","./build-settings.json",!1),t.send(),t.status===200&&t.responseText){let e=JSON.parse(t.responseText);e!=null&&e.buildMode&&(ln=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${ln}`))}}catch{}function $r(t){var n,i,a,s,r;if(typeof window!="undefined"&&window.resolveAnchorVec2)return window.resolveAnchorVec2(t);let e={center:{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};if(Array.isArray(t))return{x:(n=t[0])!=null?n:.5,y:(i=t[1])!=null?i:.5};if(t&&typeof t=="object"&&"x"in t&&"y"in t)return{x:(a=t.x)!=null?a:.5,y:(s=t.y)!=null?s:.5};if(typeof t=="string"){let o=t.trim().toLowerCase();return(r=e[o])!=null?r:{x:.5,y:.5}}return null}var fe=class{static async create(e,n,i){var l,d,p,c,g,u,b;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${ln}`);let a=(l=n==null?void 0:n.render)==null?void 0:l.asset;if(!a){console.log(`[ObjectFactory] No asset definition for: ${e}, returning empty container`);let h=new Ke.Container;return this.applyTransform(h,n==null?void 0:n.transform,n),h}let s=(d=n==null?void 0:n.identity)==null?void 0:d.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${e}, configId: ${s}, type: ${a.type}, path: ${a.path}`);let r=await Ce.load(e,a,i,s);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${e}, rawAsset type: ${(p=r==null?void 0:r.constructor)==null?void 0:p.name}`);let o;if(a.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",r,"for object:",e),o=new Ke.Sprite(r),console.log("[ObjectFactory] Created object:",o,"type:",(c=o==null?void 0:o.constructor)==null?void 0:c.name),this.applyTransform(o,n==null?void 0:n.transform,n);else if(a.type==="json")if(console.log("[ObjectFactory] JSON asset for",e,"rawAsset type:",(g=r==null?void 0:r.constructor)==null?void 0:g.name,r),r&&(((u=r.constructor)==null?void 0:u.name)==="Container"||r instanceof Ke.Container)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[a.path,`/assets/${a.path}`,`assets/${a.path}`,`../assets/${a.path}`],w=!1;for(let v of h)try{let y=await fetch(v);if(y.ok){o=await y.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",v,"type:",(b=o==null?void 0:o.constructor)==null?void 0:b.name),w=!0;break}}catch{continue}w||(console.error("[ObjectFactory] Failed to reload JSON from any path"),o=r)}else o=r;else o=r,o&&typeof o=="object"&&("x"in o||"position"in o)&&this.applyTransform(o,n==null?void 0:n.transform,n);return o}static applyTransform(e,n,i){var a,s,r,o;if(!(!n||!e)&&(n.position&&("x"in e&&"y"in e?(e.x=(a=n.position.x)!=null?a:0,e.y=(s=n.position.y)!=null?s:0):"position"in e&&e.position&&e.position.set((r=n.position.x)!=null?r:0,(o=n.position.y)!=null?o:0)),n.scale!==void 0&&"scale"in e&&e.scale&&(typeof e.scale=="object"&&"set"in e.scale?e.scale.set(n.scale):e.scale=n.scale),n.rotation!==void 0&&"rotation"in e&&(e.rotation=n.rotation),n.anchor&&"anchor"in e&&e.anchor)){let l=$r(n.anchor);l&&("set"in e.anchor?e.anchor.set(l.x,l.y):(e.anchor.x=l.x,e.anchor.y=l.y))}}};var Je=class{constructor(){this.config=null}init(e){this.config=e}get(e){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return this.config.objects.get(e)}getAllIds(){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return Array.from(this.config.objects.keys())}has(e){return this.config?this.config.objects.has(e):!1}};var Nr=ge(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Nr);Ze();var Ct=require("pixi.js");Ze();var dn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Je}init(e,n){this.registry.init(e),this.app=n}updateConfig(e){this.registry.init(e),this.instanceCache.clear(),this.readyPromise=null}async ready(){this.readyPromise&&await this.readyPromise;let n=this.registry.getAllIds().filter(a=>!this.instanceCache.has(a));if(n.length===0)return;let i=async a=>{a.length&&(console.log("[Assets] Loading objects:",a),await Promise.all(a.map(async s=>{var o;let r=this.registry.get(s);if(!r){console.warn("[Assets] No config found for object:",s);return}try{let l=await fe.create(s,r,this.app);this.instanceCache.set(s,l),console.log("[Assets] Loaded object:",s,(o=l==null?void 0:l.constructor)==null?void 0:o.name)}catch(l){console.error("[Assets] Failed to load object:",s,l)}})))};return this.readyPromise=(async()=>{await i(n);let a=this.registry.getAllIds().filter(s=>!this.instanceCache.has(s));a.length>0&&(console.warn("[Assets] Retrying missing assets:",a),await i(a)),console.log("[Assets] Ready. Cached objects:",Array.from(this.instanceCache.keys()))})(),this.readyPromise}resetScene(){this.instanceCache.clear(),this.readyPromise=null}async reloadObject(e){let n=this.registry.get(e);if(n){let i=await fe.create(e,n,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},Br=new dn,Gr=new Proxy(Br,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Ze();var qa=require("pixi.js"),J={width:400,height:600,designWidth:400,scaleFactor:1},et={scale:1,position:1},un=[];function Vr(t,e,n,i,a,s,r){un.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function Wr(){un.forEach(({element:t,originalScale:e,positionHelper:n,heightPercent:i})=>{let a=e*J.scaleFactor;n(t,J.width,J.height,i,a,!0,!1)})}function pn(t,e){console.log(`[SCREEN] updateScreenState called: ${t}x${e}`),J.width=t,J.height=e,J.scaleFactor=Math.min(t/J.designWidth,1.15),et.scale=J.scaleFactor,et.position=1,console.log(`[SCREEN] Global multipliers - scale: ${et.scale.toFixed(3)}`),Wr()}var ze={layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}};function Yr(t,e,n){let i=ze[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Xr(){return ze}var Kr={center:{x:.5,y:.5},"center-center":{x:.5,y:.5},middle:{x:.5,y:.5},"middle-center":{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},"left-center":{x:0,y:.5},"right-center":{x:1,y:.5},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};function At(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function tt(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:At(t[0],e.x),y:At(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:At(i.x,e.x),y:At(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Kr[i])!=null?n:e}return e}function gn(t,e,n,i={}){var u,b,h,w,v,y;let a=tt(n),s=(u=i.inset)!=null?u:{},r=(b=i.padding)!=null?b:{x:0,y:0},o=((h=s.left)!=null?h:0)+r.x,l=((w=s.right)!=null?w:0)+r.x,d=((v=s.top)!=null?v:0)+r.y,p=((y=s.bottom)!=null?y:0)+r.y,c=Math.max(0,t-o-l),g=Math.max(0,e-d-p);return{x:o+c*a.x,y:d+g*a.y}}function hn(t,e,n,i={}){var h,w,v,y,m,f;let a=(h=i.inset)!=null?h:{},s=(w=i.padding)!=null?w:{x:0,y:0},r=((v=a.left)!=null?v:0)+s.x,o=((y=a.right)!=null?y:0)+s.x,l=((m=a.top)!=null?m:0)+s.y,d=((f=a.bottom)!=null?f:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=tt(n,{x:.5,y:.5}),u=Math.min(Math.max(g.x,0),1),b=Math.min(Math.max(g.y,0),1);return{x:r+p*u,y:l+c*b}}if(typeof window!="undefined"){let t=window.innerWidth,e=window.innerHeight,n=()=>{let i=window.innerWidth,a=window.innerHeight;(i!==t||a!==e)&&(t=i,e=a,pn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),pn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Yr,window.getDebugConfig=Xr,window.copyConfig=oo,window.applyConfig=Qe,window.applyConfigForRatio=lo,window.positionAtBottom=Va,window.positionAtTop=Qr,window.positionAtCenter=eo,window.positionAtLeft=to,window.positionAtRight=no,window.positionAtBottomLeft=io,window.positionAtBottomRight=ao,window.positionAtTopLeft=so,window.positionAtTopRight=ro,window.applyPositionContract=Zr,console.log("\u{1F3AE} Debug Config Functions Available:"),console.log("\u2022 updateDebugConfig(category, key, value)"),console.log("\u2022 getDebugConfig()"),console.log("\u2022 copyConfig(presetName)"),console.log("\u2022 applyConfig(config)"),console.log("\u2022 applyConfigForRatio(width, height)"),console.log("\u{1F4CD} Positioning Helpers Available (with scale):"),console.log("\u2022 positionAtBottom(element, w, h, percent, scale)"),console.log("\u2022 positionAtTop(element, w, h, percent, scale)"),console.log("\u2022 positionAtCenter(element, w, h, offsetX, offsetY, scale)"),console.log("\u2022 positionAtLeft/Right(element, w, h, percent, scale)"),console.log("\u2022 Corner positions: BottomLeft/Right, TopLeft/Right (all with scale)"),console.log("\u2022 applyPositionContract(element, w, h, contract)"),console.log("Example: positionAtCenter(mySprite, 400, 600, 0, -50, 1.2)")}function Tt(t,e,n=0){return t*e+n}function Lt(t,e,n=0){return t*(1-e)+n}function kt(t,e,n=0){return t*e+n}function Mt(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Jr(t,e){return t*e}function Zr(t,e,n,i){var r,o,l,d,p,c,g,u,b,h,w,v,y,m,f,S,E,C,M,I;let a=0,s=0;switch(i.type){case"top":a=U(e,(o=(r=i.offset)==null?void 0:r.x)!=null?o:0),s=Tt(n,i.percent,(d=(l=i.offset)==null?void 0:l.y)!=null?d:0);break;case"bottom":a=U(e,(c=(p=i.offset)==null?void 0:p.x)!=null?c:0),s=Lt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=kt(e,i.percent,(h=(b=i.offset)==null?void 0:b.x)!=null?h:0),s=U(n,(v=(w=i.offset)==null?void 0:w.y)!=null?v:0);break;case"right":a=Mt(e,i.percent,(m=(y=i.offset)==null?void 0:y.x)!=null?m:0),s=U(n,(S=(f=i.offset)==null?void 0:f.y)!=null?S:0);break;case"center":a=U(e,(C=(E=i.offset)==null?void 0:E.x)!=null?C:0),s=U(n,(I=(M=i.offset)==null?void 0:M.y)!=null?I:0);break}t.position?t.position.set(a,s):(t.x=a,t.y=s),i.scale!==void 0&&i.scale!==1&&t.scale&&(typeof t.scale.set=="function"?t.scale.set(i.scale,i.scale):(t.scale.x=i.scale,t.scale.y=i.scale))}function Va(t,e,n,i=.2,a=1,s=!0,r=!1){let o=Jr(n,i),l=Lt(n,i/2);ce(t,U(e),l);let d=s?a*J.scaleFactor:a;de(t,d),r&&!un.find(p=>p.element===t)&&Vr(t,Va,e,n,i,a,s)}function Qr(t,e,n,i=.1,a=1){ce(t,U(e),Tt(n,i)),de(t,a)}function eo(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function to(t,e,n,i=.1,a=1){ce(t,kt(e,i),U(n)),de(t,a)}function no(t,e,n,i=.1,a=1){ce(t,Mt(e,i),U(n)),de(t,a)}function io(t,e,n,i=.05,a=.05,s=1){ce(t,kt(e,a),Lt(n,i)),de(t,s)}function ao(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),Lt(n,i)),de(t,s)}function so(t,e,n,i=.05,a=.05,s=1){ce(t,kt(e,a),Tt(n,i)),de(t,s)}function ro(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),Tt(n,i)),de(t,s)}function ce(t,e,n){t&&t.position?typeof t.position.set=="function"?t.position.set(e,n):(t.position.x=e,t.position.y=n):t&&(t.x=e,t.y=n)}function de(t,e){e!==1&&t&&t.scale&&(typeof t.scale.set=="function"?t.scale.set(e,e):t.scale.x!==void 0&&t.scale.y!==void 0&&(t.scale.x=e,t.scale.y=e))}var Ae={default:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}},wide:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.9,screen_scale_y:1.1},engine:{scale:1,background_scale:1.1,background_offset_y:0,background_alpha:.95,label_pulse_speed:3,label_pulse_intensity:.03}},square:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.85,screen_scale_y:.85},engine:{scale:1,background_scale:1,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}},tall:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1.1,screen_scale_y:.9},engine:{scale:1,background_scale:.95,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}}};function oo(t){return t&&Ae[t]?JSON.parse(JSON.stringify(Ae[t])):JSON.parse(JSON.stringify(ze))}function Qe(t){Object.keys(t).forEach(e=>{let n=e;ze[n]&&t[n]&&Object.assign(ze[n],t[n])}),console.log("Config applied:",t)}function lo(t,e){let n=t/e;n>1.6?(Qe(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Qe(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Qe(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Qe(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||tt,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||gn,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||hn}bn();function P(t,e){let n=(a,s)=>s===0?a:n(s,a%s),i=n(t,e);return`${t/i}:${e/i}`}var Vc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:P(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:P(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:P(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:P(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:P(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:P(360,780)}],Wc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:P(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:P(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:P(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:P(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:P(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:P(412,915)}],Yc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:P(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:P(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:P(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:P(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:P(800,1280)}],Ka=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:P(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:P(768,1024),mraidScale:.7}];var Xc=[...Ka];var bo=Ka[0];Z();function yo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function vo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}async function wo(t){return await new Promise(e=>{let n=new Image;n.onload=()=>e({width:n.naturalWidth||n.width,height:n.naturalHeight||n.height}),n.onerror=()=>e(null),n.src=t})}async function yn(t){var e,n;try{console.log("[ImageUtils] Fetching image data from URL:",t);let i=await fetch(t);if(!i.ok)return console.warn("[ImageUtils] Fetch failed with status:",i.status,t),null;let a=await i.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let s=await yo(a),r=await wo(s),o=vo(s);return console.log("[ImageUtils] Success resolution:",r==null?void 0:r.width,"x",r==null?void 0:r.height,"mime:",o.mimeType),{base64:o.base64,mimeType:o.mimeType,dataUrl:s,width:(e=r==null?void 0:r.width)!=null?e:0,height:(n=r==null?void 0:r.height)!=null?n:0}}catch(i){return console.error("[ImageUtils] Error fetching image data:",i),null}}async function _t(t,e=30){try{console.log("[ImageUtils] Removing background color...");let n=await new Promise((c,g)=>{let u=new Image;u.onload=()=>c(u),u.onerror=()=>g(new Error("Failed to load image")),u.src=t}),i=document.createElement("canvas");i.width=n.width,i.height=n.height;let a=i.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),t;a.drawImage(n,0,0);let s=a.getImageData(0,0,i.width,i.height),r=s.data,l=[{name:"top-left",offset:0},{name:"top-right",offset:(i.width-1)*4},{name:"bottom-left",offset:(i.height-1)*i.width*4},{name:"bottom-right",offset:((i.height-1)*i.width+(i.width-1))*4}].map(c=>({r:r[c.offset],g:r[c.offset+1],b:r[c.offset+2]})),d=0;for(let c=0;c<r.length;c+=4){let g=r[c],u=r[c+1],b=r[c+2],h=!1;for(let w of l)if(Math.sqrt(Math.pow(g-w.r,2)+Math.pow(u-w.g,2)+Math.pow(b-w.b,2))<e){h=!0;break}h&&(r[c+3]=0,d++)}return console.log(`[ImageUtils] Removed background from ${d} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(s,0,0),i.toDataURL("image/png")}catch(n){return console.error("[ImageUtils] Error removing background:",n),t}}var Qa=require("@google/genai");async function vn(t,e,n=[],i={}){var a,s,r,o,l,d,p;try{if(!(t!=null&&t.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let v=0;v<n.length;v++){let y=n[v];if(!y.base64||!y.mimeType)throw new Error(`Image ${v+1} is missing required data`);if(y.base64.length<1e3&&console.warn(`Image ${v+1} data appears very small, may be corrupted`),!y.mimeType.startsWith("image/"))throw new Error(`Image ${v+1} has invalid MIME type: ${y.mimeType}`)}let c=new Qa.GoogleGenAI({apiKey:t}),g="gemini-2.5-flash",u=[e];n.length>0&&n.forEach((v,y)=>{u.push({inlineData:{data:v.base64,mimeType:v.mimeType}}),console.log(`[Gemini] Added image ${y+1}: ${v.mimeType}, size: ${Math.round(v.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${n.length} images and prompt length: ${e.length}`);let b=await c.models.generateContent({model:g,contents:u}),h="",w=(r=(s=(a=b.candidates)==null?void 0:a[0])==null?void 0:s.content)==null?void 0:r.parts;if(w)for(let v of w)v.text&&(h+=v.text);if(!h.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${h.length}`),h}catch(c){throw console.error("[Gemini] API error:",c),(o=c.message)!=null&&o.includes("Unable to process input image")?new Error("Unable to process the uploaded image. Please ensure it's a valid PNG, JPG, or JPEG file under 10MB and not corrupted."):(l=c.message)!=null&&l.includes("API_KEY_INVALID")?new Error("Invalid Gemini API key. Please check your API key configuration."):(d=c.message)!=null&&d.includes("QUOTA_EXCEEDED")?new Error("Gemini API quota exceeded. Please try again later or check your billing."):(p=c.message)!=null&&p.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):c}}var es=require("@google/genai");async function Pt(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new es.GoogleGenAI({apiKey:t}),s=[{text:e}];n.length>0&&n.forEach((o,l)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${l}`),s.push({inlineData:{mimeType:o.mimeType,data:o.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let r=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:s});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!r.candidates||!r.candidates[0]||!r.candidates[0].content||!r.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let o of r.candidates[0].content.parts)if(o.text)console.log(o.text);else if(o.inlineData){let l=o.inlineData.data,d=o.inlineData.mimeType||"image/png";return console.info("[GEMINI-REAL-SDK] Found inline image data in response"),`data:${d};base64,${l}`}throw new Error("Gemini 2.5 Flash Image returned no image data.")}catch(a){throw console.error("[GEMINI-REAL-SDK] Error in generateImageWithGemini25Flash:",JSON.stringify(a,Object.getOwnPropertyNames(a),2)),a}}var xo=require("pixi.js");Ze();Z();var ns=require("pixi.js");var Eo=require("pixi.js");Z();function jo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function Oo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}function Ro(t){return`
|
|
46
|
+
`,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(r=>{r.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(r=>{r.addEventListener("click",o=>{let d=o.target.dataset.tab;d&&this.switchTab(d)})});let i=this.modal.querySelector("[data-ai-generate]");i==null||i.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let s=this.modal.querySelector("[data-modal-apply]");s==null||s.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",r=>{r.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let n=window.__openAiEditor;if(typeof n!="function"){alert("AI Editor not available. Please check your setup.");return}let i="";e==="edit"&&this.currentAsset?i=`Edit this image: ${this.currentObjectId}`:i=`Create an image for: ${this.currentObjectId}`,n(this.currentObjectId||"unknown",i,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var el={};ca(el,{AspectClass:()=>$n,GameObject:()=>dt,GameObjectManager:()=>Ht,Renderer:()=>ct,ResponsiveUISystem:()=>qe,Transform:()=>lt,animateHandClick:()=>Es,animatePanelEntrance:()=>Ss,createBrushTexture:()=>_s,createEndGamePanel:()=>xs,createHandTutorial:()=>Cs,createThreeBase:()=>ys,createTutorialLabel:()=>As,getAspectClass:()=>$t,getRegisteredFontIds:()=>ws,loadAsset:()=>Nn,loadCharacterFrames:()=>Ms,registerFont:()=>vs,resolveFont:()=>ee,resolveFontWeight:()=>te,updateHandAnimation:()=>Ts});module.exports=Er(el);var W=ge(require("three"),1);var he={};function vt(t,e,n=!1){he[t]||(he[t]=[]),he[t].push({fn:e,once:n})}function Jt(t,e){if(he[t]){if(!e){delete he[t];return}he[t]=he[t].filter(n=>n.fn!==e)}}function wt(t,...e){let n=he[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Jt(t,i.fn)}function B(t,e){vt(t,e,!0)}var _=null,V=[],Ie=null;function ga(t){_=t,V=[],Ie!==null&&(clearTimeout(Ie),Ie=null)}function ha(){var t,e,n;return{endpoint:(_==null?void 0:_.endpoint)||"",transport:(_==null?void 0:_.transport)||"beacon",batchSize:(t=_==null?void 0:_.batchSize)!=null?t:10,flushIntervalMs:(e=_==null?void 0:_.flushIntervalMs)!=null?e:300,maxQueue:(n=_==null?void 0:_.maxQueue)!=null?n:200,debug:!!(_!=null&&_.debug)}}async function pa(t,e,n,i){let a=JSON.stringify(e);if(n==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let s=navigator.sendBeacon(t,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",s,e);return}catch(s){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",s)}try{await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(s){i&&console.warn("[handler.telemetry] fetch failed",s)}}function Zt(t,e){let n=ha();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ua();return}Ie===null&&(Ie=window.setTimeout(()=>{Ie=null,ua()},n.flushIntervalMs))}}async function ua(){let t=ha();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await pa(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await pa(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function ma(t){return Math.max(0,Math.min(1,t))}function Cr(t){let e=String(t!=null?t:"power2.out");if(e==="linear")return n=>n;if(e==="sine.inOut")return n=>.5-Math.cos(Math.PI*n)/2;if(e==="power2.out"||e==="easeOutQuad")return n=>1-(1-n)*(1-n);if(e.startsWith("back.out")){let n=e.match(/back\.out\(([\d.]+)\)/),i=n?Number(n[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return n=>1-(1-n)*(1-n)}function Xe(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Ar(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function fa(t,e,n){try{t[e]=n}catch{}}function Tr(t){let e=t==null?void 0:t.scale;if(!e)return null;let n=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:n,y:i}}function ba(t,e){let n=t==null?void 0:t.scale;if(n)try{typeof n.set=="function"?n.set(e.x,e.y):(typeof n.x=="number"&&(n.x=e.x),typeof n.y=="number"&&(n.y=e.y))}catch{}}function ya(t,e){let n=Tr(t);if(!n)return{from:null,to:null};let i=null,a=null;return typeof e.scale=="number"?(i=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(i=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(i=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),i===null&&a===null?{from:null,to:null}:{from:{x:n.x,y:n.y},to:{x:i!=null?i:n.x,y:a!=null?a:n.y}}}function va(){let t=new Set,e=new WeakMap,n=null,i=()=>{if(n!=null)return;n=requestAnimationFrame(()=>{n=null,o(),t.size>0&&i()})},a=p=>{var g;t.add(p);let c=(g=e.get(p.target))!=null?g:new Set;c.add(p),e.set(p.target,c),i()},s=p=>{t.delete(p);let c=e.get(p.target);c&&(c.delete(p),c.size===0&&e.delete(p.target))},r=p=>{p.killed||(p.killed=!0,s(p))},o=()=>{var c,g;let p=Xe();for(let u of Array.from(t)){if(u.killed||u.paused)continue;let b=p-u.startMs-u.delayMs;if(b<0)continue;let h=u.durationMs>0?b/u.durationMs:1,w=ma(h),v=u.repeat>=0?u.repeat+1:1,y=u.repeat>0?Math.min(Math.floor(h),v-1):0;if(u.repeat>0&&h>=1){let S=h-y;w=ma(S)}let m=u.ease(w);u.yoyo&&y%2===1&&(m=1-m);for(let S of u.props)fa(u.target,S.key,S.from+(S.to-S.from)*m);u.scaleFrom&&u.scaleTo&&ba(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*m,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*m});try{(c=u.onUpdate)==null||c.call(u)}catch{}if(h>=v){r(u);try{(g=u.onComplete)==null||g.call(u)}catch{}}}},l=(p,c,g)=>{var S;let u=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),b=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((S=g==null?void 0:g.delayMsOverride)!=null?S:0)),h=Cr(c.ease),w=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,v=c.yoyo===!0,y=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),m=[];for(let E of Object.keys(c)){if(y.has(E))continue;let C=c[E];typeof C=="number"&&m.push({key:E,from:Ar(p,E),to:C})}let f=ya(p,c);return{target:p,startMs:Xe(),delayMs:b,durationMs:u,ease:h,props:m,scaleFrom:f.from,scaleTo:f.to,repeat:w,yoyo:v,onUpdate:typeof c.onUpdate=="function"?c.onUpdate:void 0,onComplete:typeof c.onComplete=="function"?c.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},d={to(p,c){let g=l(p,c);return a(g),{kill:()=>r(g),pause:()=>{g.paused||(g.paused=!0,g.pauseAtMs=Xe())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Xe(),b=Xe()-u;g.startMs+=b,g.paused=!1,g.pauseAtMs=null},isActive:()=>!g.killed&&!g.paused}},fromTo(p,c,g){return d.set(p,c),d.to(p,g)},set(p,c){if(!p||!c)return;for(let u of Object.keys(c)){let b=c[u];u==="scale"||u==="scaleX"||u==="scaleY"||typeof b=="number"&&fa(p,u,b)}let g=ya(p,c);g.to&&ba(p,g.to)},killTweensOf(p){let c=e.get(p);if(c)for(let g of Array.from(c))r(g)},timeline(p={}){let c=[],g=0,u=!1,b=[],h=y=>{if(typeof y=="number")return Math.max(0,y*1e3);let m=typeof y=="string"?y.trim():"";return m.startsWith("+=")?g+Math.max(0,Number(m.slice(2))*1e3||0):m?Math.max(0,Number(m)*1e3||0):g},w=y=>{c.push(y);let m=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);g=Math.max(g,y.atMs+m)},v={to(y,m,f){return w({kind:"to",target:y,vars:m,atMs:h(f)}),v},fromTo(y,m,f,S){return w({kind:"fromTo",target:y,vars:f,from:m,atMs:h(S)}),v},play(){var y,m;if(u)return v;u=!0,b=[];for(let f of c)f.kind==="fromTo"&&d.set(f.target,(y=f.from)!=null?y:{}),b.push(d.to(f.target,{...f.vars,delay:f.atMs/1e3+((m=f.vars.delay)!=null?m:0)}));return v},pause(){for(let y of b)y.pause();return v},kill(){for(let y of b)y.kill();b=[],u=!1}};return p.paused||v.play(),v}};return d}function wa(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=va()}catch{}}var xa={name:"handler-playable-sdk",version:"1.0.12",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var G=0,kr=G++,Sa=G++,Ea=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,ka=G++,Ma=G++,_a=G++,Pa=G++,Ia=G++,T=kr;function ja(){return T===Sa}function Oa(){return T===Ea}function Ra(){return T===Ca}function za(){return T===Aa}function je(){return T===Ta}function Oe(){return T===La}function $a(){return T===ka}function Ha(){return T===Ma}function Da(){return T===_a}function Qt(){return T===Pa}function en(){return T===Ia}function Na(){let t=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(t==="mraid")try{mraid.getState(),T=Sa;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=Ea;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=Ca)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Aa)}catch{}else if(e==="mintegral")window.gameReady&&(T=Ta);else if(e==="tapjoy")window.TJ_API&&(T=La);else if(e==="tiktok")window.openAppStore&&(T=ka);else if(e==="smadex")try{window.smxTracking&&(T=Ma)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=_a)}catch{}else e==="vungle"?T=Pa:(t==="nucleo"||e==="nucleo")&&(T=Ia)}var xt=ge(require("lottie-web"),1),Fa=xt.default;typeof window!="undefined"&&(window.lottie=xt.default,window.__baseLottie=xt.default);var Mr=require("pixi.js");var tn=require("pixi.js");var _r=null;function nn(t){_r=t}St();an();var Ke=require("pixi.js");St();var zr=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",ln=zr;if(typeof window!="undefined")try{let t=new XMLHttpRequest;if(t.open("GET","./build-settings.json",!1),t.send(),t.status===200&&t.responseText){let e=JSON.parse(t.responseText);e!=null&&e.buildMode&&(ln=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${ln}`))}}catch{}function $r(t){var n,i,a,s,r;if(typeof window!="undefined"&&window.resolveAnchorVec2)return window.resolveAnchorVec2(t);let e={center:{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};if(Array.isArray(t))return{x:(n=t[0])!=null?n:.5,y:(i=t[1])!=null?i:.5};if(t&&typeof t=="object"&&"x"in t&&"y"in t)return{x:(a=t.x)!=null?a:.5,y:(s=t.y)!=null?s:.5};if(typeof t=="string"){let o=t.trim().toLowerCase();return(r=e[o])!=null?r:{x:.5,y:.5}}return null}var fe=class{static async create(e,n,i){var l,d,p,c,g,u,b;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${ln}`);let a=(l=n==null?void 0:n.render)==null?void 0:l.asset;if(!a){console.log(`[ObjectFactory] No asset definition for: ${e}, returning empty container`);let h=new Ke.Container;return this.applyTransform(h,n==null?void 0:n.transform,n),h}let s=(d=n==null?void 0:n.identity)==null?void 0:d.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${e}, configId: ${s}, type: ${a.type}, path: ${a.path}`);let r=await Ce.load(e,a,i,s);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${e}, rawAsset type: ${(p=r==null?void 0:r.constructor)==null?void 0:p.name}`);let o;if(a.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",r,"for object:",e),o=new Ke.Sprite(r),console.log("[ObjectFactory] Created object:",o,"type:",(c=o==null?void 0:o.constructor)==null?void 0:c.name),this.applyTransform(o,n==null?void 0:n.transform,n);else if(a.type==="json")if(console.log("[ObjectFactory] JSON asset for",e,"rawAsset type:",(g=r==null?void 0:r.constructor)==null?void 0:g.name,r),r&&(((u=r.constructor)==null?void 0:u.name)==="Container"||r instanceof Ke.Container)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[a.path,`/assets/${a.path}`,`assets/${a.path}`,`../assets/${a.path}`],w=!1;for(let v of h)try{let y=await fetch(v);if(y.ok){o=await y.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",v,"type:",(b=o==null?void 0:o.constructor)==null?void 0:b.name),w=!0;break}}catch{continue}w||(console.error("[ObjectFactory] Failed to reload JSON from any path"),o=r)}else o=r;else o=r,o&&typeof o=="object"&&("x"in o||"position"in o)&&this.applyTransform(o,n==null?void 0:n.transform,n);return o}static applyTransform(e,n,i){var a,s,r,o;if(!(!n||!e)&&(n.position&&("x"in e&&"y"in e?(e.x=(a=n.position.x)!=null?a:0,e.y=(s=n.position.y)!=null?s:0):"position"in e&&e.position&&e.position.set((r=n.position.x)!=null?r:0,(o=n.position.y)!=null?o:0)),n.scale!==void 0&&"scale"in e&&e.scale&&(typeof e.scale=="object"&&"set"in e.scale?e.scale.set(n.scale):e.scale=n.scale),n.rotation!==void 0&&"rotation"in e&&(e.rotation=n.rotation),n.anchor&&"anchor"in e&&e.anchor)){let l=$r(n.anchor);l&&("set"in e.anchor?e.anchor.set(l.x,l.y):(e.anchor.x=l.x,e.anchor.y=l.y))}}};var Je=class{constructor(){this.config=null}init(e){this.config=e}get(e){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return this.config.objects.get(e)}getAllIds(){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return Array.from(this.config.objects.keys())}has(e){return this.config?this.config.objects.has(e):!1}};var Nr=ge(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Nr);Ze();var Ct=require("pixi.js");Ze();var dn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Je}init(e,n){this.registry.init(e),this.app=n}updateConfig(e){this.registry.init(e),this.instanceCache.clear(),this.readyPromise=null}async ready(){this.readyPromise&&await this.readyPromise;let n=this.registry.getAllIds().filter(a=>!this.instanceCache.has(a));if(n.length===0)return;let i=async a=>{a.length&&(console.log("[Assets] Loading objects:",a),await Promise.all(a.map(async s=>{var o;let r=this.registry.get(s);if(!r){console.warn("[Assets] No config found for object:",s);return}try{let l=await fe.create(s,r,this.app);this.instanceCache.set(s,l),console.log("[Assets] Loaded object:",s,(o=l==null?void 0:l.constructor)==null?void 0:o.name)}catch(l){console.error("[Assets] Failed to load object:",s,l)}})))};return this.readyPromise=(async()=>{await i(n);let a=this.registry.getAllIds().filter(s=>!this.instanceCache.has(s));a.length>0&&(console.warn("[Assets] Retrying missing assets:",a),await i(a)),console.log("[Assets] Ready. Cached objects:",Array.from(this.instanceCache.keys()))})(),this.readyPromise}resetScene(){this.instanceCache.clear(),this.readyPromise=null}async reloadObject(e){let n=this.registry.get(e);if(n){let i=await fe.create(e,n,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},Br=new dn,Gr=new Proxy(Br,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Ze();var qa=require("pixi.js"),J={width:400,height:600,designWidth:400,scaleFactor:1},et={scale:1,position:1},un=[];function Vr(t,e,n,i,a,s,r){un.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function Wr(){un.forEach(({element:t,originalScale:e,positionHelper:n,heightPercent:i})=>{let a=e*J.scaleFactor;n(t,J.width,J.height,i,a,!0,!1)})}function pn(t,e){console.log(`[SCREEN] updateScreenState called: ${t}x${e}`),J.width=t,J.height=e,J.scaleFactor=Math.min(t/J.designWidth,1.15),et.scale=J.scaleFactor,et.position=1,console.log(`[SCREEN] Global multipliers - scale: ${et.scale.toFixed(3)}`),Wr()}var ze={layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}};function Yr(t,e,n){let i=ze[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Xr(){return ze}var Kr={center:{x:.5,y:.5},"center-center":{x:.5,y:.5},middle:{x:.5,y:.5},"middle-center":{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},"left-center":{x:0,y:.5},"right-center":{x:1,y:.5},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};function At(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function tt(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:At(t[0],e.x),y:At(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:At(i.x,e.x),y:At(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Kr[i])!=null?n:e}return e}function gn(t,e,n,i={}){var u,b,h,w,v,y;let a=tt(n),s=(u=i.inset)!=null?u:{},r=(b=i.padding)!=null?b:{x:0,y:0},o=((h=s.left)!=null?h:0)+r.x,l=((w=s.right)!=null?w:0)+r.x,d=((v=s.top)!=null?v:0)+r.y,p=((y=s.bottom)!=null?y:0)+r.y,c=Math.max(0,t-o-l),g=Math.max(0,e-d-p);return{x:o+c*a.x,y:d+g*a.y}}function hn(t,e,n,i={}){var h,w,v,y,m,f;let a=(h=i.inset)!=null?h:{},s=(w=i.padding)!=null?w:{x:0,y:0},r=((v=a.left)!=null?v:0)+s.x,o=((y=a.right)!=null?y:0)+s.x,l=((m=a.top)!=null?m:0)+s.y,d=((f=a.bottom)!=null?f:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=tt(n,{x:.5,y:.5}),u=Math.min(Math.max(g.x,0),1),b=Math.min(Math.max(g.y,0),1);return{x:r+p*u,y:l+c*b}}if(typeof window!="undefined"){let t=window.innerWidth,e=window.innerHeight,n=()=>{let i=window.innerWidth,a=window.innerHeight;(i!==t||a!==e)&&(t=i,e=a,pn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),pn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Yr,window.getDebugConfig=Xr,window.copyConfig=oo,window.applyConfig=Qe,window.applyConfigForRatio=lo,window.positionAtBottom=Va,window.positionAtTop=Qr,window.positionAtCenter=eo,window.positionAtLeft=to,window.positionAtRight=no,window.positionAtBottomLeft=io,window.positionAtBottomRight=ao,window.positionAtTopLeft=so,window.positionAtTopRight=ro,window.applyPositionContract=Zr,console.log("\u{1F3AE} Debug Config Functions Available:"),console.log("\u2022 updateDebugConfig(category, key, value)"),console.log("\u2022 getDebugConfig()"),console.log("\u2022 copyConfig(presetName)"),console.log("\u2022 applyConfig(config)"),console.log("\u2022 applyConfigForRatio(width, height)"),console.log("\u{1F4CD} Positioning Helpers Available (with scale):"),console.log("\u2022 positionAtBottom(element, w, h, percent, scale)"),console.log("\u2022 positionAtTop(element, w, h, percent, scale)"),console.log("\u2022 positionAtCenter(element, w, h, offsetX, offsetY, scale)"),console.log("\u2022 positionAtLeft/Right(element, w, h, percent, scale)"),console.log("\u2022 Corner positions: BottomLeft/Right, TopLeft/Right (all with scale)"),console.log("\u2022 applyPositionContract(element, w, h, contract)"),console.log("Example: positionAtCenter(mySprite, 400, 600, 0, -50, 1.2)")}function Tt(t,e,n=0){return t*e+n}function Lt(t,e,n=0){return t*(1-e)+n}function kt(t,e,n=0){return t*e+n}function Mt(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Jr(t,e){return t*e}function Zr(t,e,n,i){var r,o,l,d,p,c,g,u,b,h,w,v,y,m,f,S,E,C,M,I;let a=0,s=0;switch(i.type){case"top":a=U(e,(o=(r=i.offset)==null?void 0:r.x)!=null?o:0),s=Tt(n,i.percent,(d=(l=i.offset)==null?void 0:l.y)!=null?d:0);break;case"bottom":a=U(e,(c=(p=i.offset)==null?void 0:p.x)!=null?c:0),s=Lt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=kt(e,i.percent,(h=(b=i.offset)==null?void 0:b.x)!=null?h:0),s=U(n,(v=(w=i.offset)==null?void 0:w.y)!=null?v:0);break;case"right":a=Mt(e,i.percent,(m=(y=i.offset)==null?void 0:y.x)!=null?m:0),s=U(n,(S=(f=i.offset)==null?void 0:f.y)!=null?S:0);break;case"center":a=U(e,(C=(E=i.offset)==null?void 0:E.x)!=null?C:0),s=U(n,(I=(M=i.offset)==null?void 0:M.y)!=null?I:0);break}t.position?t.position.set(a,s):(t.x=a,t.y=s),i.scale!==void 0&&i.scale!==1&&t.scale&&(typeof t.scale.set=="function"?t.scale.set(i.scale,i.scale):(t.scale.x=i.scale,t.scale.y=i.scale))}function Va(t,e,n,i=.2,a=1,s=!0,r=!1){let o=Jr(n,i),l=Lt(n,i/2);ce(t,U(e),l);let d=s?a*J.scaleFactor:a;de(t,d),r&&!un.find(p=>p.element===t)&&Vr(t,Va,e,n,i,a,s)}function Qr(t,e,n,i=.1,a=1){ce(t,U(e),Tt(n,i)),de(t,a)}function eo(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function to(t,e,n,i=.1,a=1){ce(t,kt(e,i),U(n)),de(t,a)}function no(t,e,n,i=.1,a=1){ce(t,Mt(e,i),U(n)),de(t,a)}function io(t,e,n,i=.05,a=.05,s=1){ce(t,kt(e,a),Lt(n,i)),de(t,s)}function ao(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),Lt(n,i)),de(t,s)}function so(t,e,n,i=.05,a=.05,s=1){ce(t,kt(e,a),Tt(n,i)),de(t,s)}function ro(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),Tt(n,i)),de(t,s)}function ce(t,e,n){t&&t.position?typeof t.position.set=="function"?t.position.set(e,n):(t.position.x=e,t.position.y=n):t&&(t.x=e,t.y=n)}function de(t,e){e!==1&&t&&t.scale&&(typeof t.scale.set=="function"?t.scale.set(e,e):t.scale.x!==void 0&&t.scale.y!==void 0&&(t.scale.x=e,t.scale.y=e))}var Ae={default:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}},wide:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.9,screen_scale_y:1.1},engine:{scale:1,background_scale:1.1,background_offset_y:0,background_alpha:.95,label_pulse_speed:3,label_pulse_intensity:.03}},square:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.85,screen_scale_y:.85},engine:{scale:1,background_scale:1,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}},tall:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1.1,screen_scale_y:.9},engine:{scale:1,background_scale:.95,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}}};function oo(t){return t&&Ae[t]?JSON.parse(JSON.stringify(Ae[t])):JSON.parse(JSON.stringify(ze))}function Qe(t){Object.keys(t).forEach(e=>{let n=e;ze[n]&&t[n]&&Object.assign(ze[n],t[n])}),console.log("Config applied:",t)}function lo(t,e){let n=t/e;n>1.6?(Qe(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Qe(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Qe(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Qe(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||tt,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||gn,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||hn}bn();function P(t,e){let n=(a,s)=>s===0?a:n(s,a%s),i=n(t,e);return`${t/i}:${e/i}`}var Vc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:P(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:P(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:P(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:P(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:P(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:P(360,780)}],Wc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:P(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:P(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:P(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:P(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:P(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:P(412,915)}],Yc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:P(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:P(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:P(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:P(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:P(800,1280)}],Ka=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:P(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:P(768,1024),mraidScale:.7}];var Xc=[...Ka];var bo=Ka[0];Z();function yo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function vo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}async function wo(t){return await new Promise(e=>{let n=new Image;n.onload=()=>e({width:n.naturalWidth||n.width,height:n.naturalHeight||n.height}),n.onerror=()=>e(null),n.src=t})}async function yn(t){var e,n;try{console.log("[ImageUtils] Fetching image data from URL:",t);let i=await fetch(t);if(!i.ok)return console.warn("[ImageUtils] Fetch failed with status:",i.status,t),null;let a=await i.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let s=await yo(a),r=await wo(s),o=vo(s);return console.log("[ImageUtils] Success resolution:",r==null?void 0:r.width,"x",r==null?void 0:r.height,"mime:",o.mimeType),{base64:o.base64,mimeType:o.mimeType,dataUrl:s,width:(e=r==null?void 0:r.width)!=null?e:0,height:(n=r==null?void 0:r.height)!=null?n:0}}catch(i){return console.error("[ImageUtils] Error fetching image data:",i),null}}async function _t(t,e=30){try{console.log("[ImageUtils] Removing background color...");let n=await new Promise((c,g)=>{let u=new Image;u.onload=()=>c(u),u.onerror=()=>g(new Error("Failed to load image")),u.src=t}),i=document.createElement("canvas");i.width=n.width,i.height=n.height;let a=i.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),t;a.drawImage(n,0,0);let s=a.getImageData(0,0,i.width,i.height),r=s.data,l=[{name:"top-left",offset:0},{name:"top-right",offset:(i.width-1)*4},{name:"bottom-left",offset:(i.height-1)*i.width*4},{name:"bottom-right",offset:((i.height-1)*i.width+(i.width-1))*4}].map(c=>({r:r[c.offset],g:r[c.offset+1],b:r[c.offset+2]})),d=0;for(let c=0;c<r.length;c+=4){let g=r[c],u=r[c+1],b=r[c+2],h=!1;for(let w of l)if(Math.sqrt(Math.pow(g-w.r,2)+Math.pow(u-w.g,2)+Math.pow(b-w.b,2))<e){h=!0;break}h&&(r[c+3]=0,d++)}return console.log(`[ImageUtils] Removed background from ${d} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(s,0,0),i.toDataURL("image/png")}catch(n){return console.error("[ImageUtils] Error removing background:",n),t}}var Qa=require("@google/genai");async function vn(t,e,n=[],i={}){var a,s,r,o,l,d,p;try{if(!(t!=null&&t.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let v=0;v<n.length;v++){let y=n[v];if(!y.base64||!y.mimeType)throw new Error(`Image ${v+1} is missing required data`);if(y.base64.length<1e3&&console.warn(`Image ${v+1} data appears very small, may be corrupted`),!y.mimeType.startsWith("image/"))throw new Error(`Image ${v+1} has invalid MIME type: ${y.mimeType}`)}let c=new Qa.GoogleGenAI({apiKey:t}),g="gemini-2.5-flash",u=[e];n.length>0&&n.forEach((v,y)=>{u.push({inlineData:{data:v.base64,mimeType:v.mimeType}}),console.log(`[Gemini] Added image ${y+1}: ${v.mimeType}, size: ${Math.round(v.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${n.length} images and prompt length: ${e.length}`);let b=await c.models.generateContent({model:g,contents:u}),h="",w=(r=(s=(a=b.candidates)==null?void 0:a[0])==null?void 0:s.content)==null?void 0:r.parts;if(w)for(let v of w)v.text&&(h+=v.text);if(!h.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${h.length}`),h}catch(c){throw console.error("[Gemini] API error:",c),(o=c.message)!=null&&o.includes("Unable to process input image")?new Error("Unable to process the uploaded image. Please ensure it's a valid PNG, JPG, or JPEG file under 10MB and not corrupted."):(l=c.message)!=null&&l.includes("API_KEY_INVALID")?new Error("Invalid Gemini API key. Please check your API key configuration."):(d=c.message)!=null&&d.includes("QUOTA_EXCEEDED")?new Error("Gemini API quota exceeded. Please try again later or check your billing."):(p=c.message)!=null&&p.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):c}}var es=require("@google/genai");async function Pt(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new es.GoogleGenAI({apiKey:t}),s=[{text:e}];n.length>0&&n.forEach((o,l)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${l}`),s.push({inlineData:{mimeType:o.mimeType,data:o.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let r=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:s});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!r.candidates||!r.candidates[0]||!r.candidates[0].content||!r.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let o of r.candidates[0].content.parts)if(o.text)console.log(o.text);else if(o.inlineData){let l=o.inlineData.data,d=o.inlineData.mimeType||"image/png";return console.info("[GEMINI-REAL-SDK] Found inline image data in response"),`data:${d};base64,${l}`}throw new Error("Gemini 2.5 Flash Image returned no image data.")}catch(a){throw console.error("[GEMINI-REAL-SDK] Error in generateImageWithGemini25Flash:",JSON.stringify(a,Object.getOwnPropertyNames(a),2)),a}}var xo=require("pixi.js");Ze();Z();var ns=require("pixi.js");var Eo=require("pixi.js");Z();function jo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function Oo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}function Ro(t){return`
|
|
47
47
|
Analyze these screenshots of a brand or game and extract its "Brand DNA".
|
|
48
48
|
|
|
49
49
|
Provide a concise summary (2-3 sentences) covering:
|
package/dist/three/index.css
CHANGED
|
@@ -1137,7 +1137,7 @@
|
|
|
1137
1137
|
/* Fixed Layout Container */
|
|
1138
1138
|
.preview-shell.layout-fixed .preview-main {
|
|
1139
1139
|
display: grid;
|
|
1140
|
-
grid-template-columns: auto 1fr auto;
|
|
1140
|
+
grid-template-columns: auto minmax(400px, 1fr) auto;
|
|
1141
1141
|
grid-template-rows: 1fr auto;
|
|
1142
1142
|
gap: 0;
|
|
1143
1143
|
overflow: hidden;
|