handler-playable-sdk 0.5.45 → 0.5.49
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-7PB4AWTL.js → chunk-DSIGEZDQ.js} +63 -53
- 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 +82 -72
- package/dist/index.css +19 -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 +1 -1
- package/dist/pixi/index.css +19 -1
- package/dist/pixi/index.js +1 -1
- package/dist/three/index.cjs +1 -1
- package/dist/three/index.css +19 -1
- package/dist/three/index.js +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1076,18 +1076,29 @@
|
|
|
1076
1076
|
transition: all var(--ui-duration-fast) var(--ui-ease);
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
+
.scene-object-item-wrapper {
|
|
1080
|
+
display: flex;
|
|
1081
|
+
align-items: center;
|
|
1082
|
+
gap: 6px;
|
|
1083
|
+
width: 100%;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1079
1086
|
.scene-object-checkbox {
|
|
1080
1087
|
width: 14px;
|
|
1081
1088
|
height: 14px;
|
|
1082
1089
|
min-width: 14px;
|
|
1083
1090
|
min-height: 14px;
|
|
1084
1091
|
margin: 0;
|
|
1085
|
-
margin-right: 6px;
|
|
1086
1092
|
cursor: pointer;
|
|
1087
1093
|
accent-color: var(--ui-terracotta);
|
|
1088
1094
|
flex-shrink: 0;
|
|
1089
1095
|
}
|
|
1090
1096
|
|
|
1097
|
+
.scene-object-item-wrapper .scene-object-item {
|
|
1098
|
+
flex: 1;
|
|
1099
|
+
margin: 0;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1091
1102
|
.scene-object-label {
|
|
1092
1103
|
white-space: nowrap;
|
|
1093
1104
|
overflow: hidden;
|
|
@@ -1178,6 +1189,13 @@
|
|
|
1178
1189
|
box-shadow: 0 0 0 1px var(--ui-accent-overlay-3);
|
|
1179
1190
|
}
|
|
1180
1191
|
|
|
1192
|
+
.scene-object-item.active {
|
|
1193
|
+
border-color: var(--ui-terracotta);
|
|
1194
|
+
background: var(--ui-accent-overlay-2);
|
|
1195
|
+
box-shadow: 0 0 0 2px var(--ui-terracotta);
|
|
1196
|
+
font-weight: var(--font-weight-semibold);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1181
1199
|
/* Debug Toggle Button in Toolbar */
|
|
1182
1200
|
.debug-toggle {
|
|
1183
1201
|
position: relative;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as J,F as K,G as L,H as M,I as N,J as O,K as P,L as Q,M as R,N as S,O as T,P as U,Q as V,R as W,S as X,T as Y,U as Z,a}from"./chunk-
|
|
1
|
+
import{E as J,F as K,G as L,H as M,I as N,J as O,K as P,L as Q,M as R,N as S,O as T,P as U,Q as V,R as W,S as X,T as Y,U as Z,a}from"./chunk-DSIGEZDQ.js";import"./chunk-I5OOVR5U.js";import{a as u,b as v,c as w,d as x,e as y,f as z,g as A,h as B,i as C,j as D,k as E,l as F,m as G,n as H,o as I}from"./chunk-PW2FGMCO.js";import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q,q as r,r as s,s as t}from"./chunk-HVKF2KYL.js";import"./chunk-E6WJCS24.js";import"./chunk-JXBG6UFL.js";export{U as COLORS,F as ConfigWatcher,O as DebugPanel,E as DefaultReloadStrategy,Y as Handler,X as PlayableLoadingScreen,P as PreviewShell,V as STROKE_WIDTH,W as THEME,d as applyConfigOverride,e as applyConfigOverrides,r as applyConfigsToDisk,B as applyDefaults,a as baseLottie,T as bootstrap,f as clearConfigOverrides,g as clearConfigOverridesForObject,j as configOverrideManager,Q as createPreviewShell,o as deepClone,Z as default,L as defaultPreset,K as deviceGroups,J as devicePresets,G as diffConfigs,p as exportConfigsAsJSON,i as getConfigOverrides,q as getConfigStateSummary,b as getOverrideMode,M as getPresetById,N as getPresetsByCategory,w as loadAllObjectConfigs,u as loadComponentSchemas,x as loadEngineConfig,y as loadGamePromptConfig,C as loadObjectCentricConfig,v as loadObjectConfig,z as loadSceneConfig,l as redoLastConfigChange,H as rehydrateObject,h as removeConfigOverride,s as resetToApplied,t as resetToOriginal,S as setBootstrapDependencies,c as setOverrideMode,I as setupHotReload,R as setupLiveEditBridge,D as toLegacyFormat,m as trackObjectCreation,n as trackObjectDeletion,k as undoLastConfigChange,A as validateObjectConfig};
|
package/dist/pixi/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(s=>{s.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(s=>{s.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 r=this.modal.querySelector("[data-modal-apply]");r==null||r.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",s=>{s.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 t=window.__openAiEditor;if(typeof t!="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}`,t(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 Nr={};Wn(Nr,{AssetCache:()=>ae,AssetLoader:()=>Ce,AssetSystem:()=>Kt,AssetTextures:()=>Te,Assets:()=>ua,BaseSystem:()=>Ze,GameEngine:()=>Yt,GameObject:()=>At,GameObjectManager:()=>Xe,ObjectFactory:()=>Le,Renderer:()=>St,RuntimeObjectRegistry:()=>Qe,Transform:()=>Et,applyScreenAnchor:()=>Zt,basePixi:()=>la,clearResponsiveElements:()=>ha,createPixiBase:()=>Vt,getRegisteredFontIds:()=>aa,globalResponsiveMultipliers:()=>Tt,initAssetTextures:()=>Ht,initAssets:()=>ga,layout:()=>ma,playLottieOverlay:()=>sa,registerFont:()=>ia,registerType:()=>$t,resolveAnchorVec2:()=>$e,resolveFont:()=>ta,resolveFontWeight:()=>na,resolveScreenAnchorPoint:()=>et,resolveScreenRatioPoint:()=>tt,runInitSequence:()=>ba,setLottieInstance:()=>Nt,spawnSceneFromConfig:()=>da,updateScreenState:()=>Jt});module.exports=Sa(Nr);var ea=require("pixi.js");var Se={};function _t(n,e,t=!1){Se[n]||(Se[n]=[]),Se[n].push({fn:e,once:t})}function on(n,e){if(Se[n]){if(!e){delete Se[n];return}Se[n]=Se[n].filter(t=>t.fn!==e)}}function jt(n,...e){let t=Se[n];if(t)for(let i of[...t])i.fn(...e),i.once&&on(n,i.fn)}function J(n,e){_t(n,e,!0)}var $=null,ee=[],He=null;function Jn(n){$=n,ee=[],He!==null&&(clearTimeout(He),He=null)}function Zn(){var n,e,t;return{endpoint:($==null?void 0:$.endpoint)||"",transport:($==null?void 0:$.transport)||"beacon",batchSize:(n=$==null?void 0:$.batchSize)!=null?n:10,flushIntervalMs:(e=$==null?void 0:$.flushIntervalMs)!=null?e:300,maxQueue:(t=$==null?void 0:$.maxQueue)!=null?t:200,debug:!!($!=null&&$.debug)}}async function Kn(n,e,t,i){let a=JSON.stringify(e);if(t==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=navigator.sendBeacon(n,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",r,e);return}catch(r){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",r)}try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(r){i&&console.warn("[handler.telemetry] fetch failed",r)}}function ln(n,e){let t=Zn();if(e&&t.endpoint){if(ee.push(n),ee.length>t.maxQueue&&(ee=ee.slice(ee.length-t.maxQueue)),ee.length>=t.batchSize){Xn();return}He===null&&(He=window.setTimeout(()=>{He=null,Xn()},t.flushIntervalMs))}}async function Xn(){let n=Zn();if(!n.endpoint||ee.length===0)return;let e=ee.splice(0,n.batchSize);await Kn(n.endpoint,{events:e},n.transport,n.debug),ee.length>0&&await Kn(n.endpoint,{events:ee.splice(0,n.batchSize)},n.transport,n.debug)}function Qn(n){return Math.max(0,Math.min(1,n))}function Aa(n){let e=String(n!=null?n:"power2.out");if(e==="linear")return t=>t;if(e==="sine.inOut")return t=>.5-Math.cos(Math.PI*t)/2;if(e==="power2.out"||e==="easeOutQuad")return t=>1-(1-t)*(1-t);if(e.startsWith("back.out")){let t=e.match(/back\.out\(([\d.]+)\)/),i=t?Number(t[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return t=>1-(1-t)*(1-t)}function ut(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Ca(n,e){let t=n==null?void 0:n[e];return typeof t=="number"?t:0}function ei(n,e,t){try{n[e]=t}catch{}}function Ta(n){let e=n==null?void 0:n.scale;if(!e)return null;let t=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:t,y:i}}function ti(n,e){let t=n==null?void 0:n.scale;if(t)try{typeof t.set=="function"?t.set(e.x,e.y):(typeof t.x=="number"&&(t.x=e.x),typeof t.y=="number"&&(t.y=e.y))}catch{}}function ni(n,e){let t=Ta(n);if(!t)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:t.x,y:t.y},to:{x:i!=null?i:t.x,y:a!=null?a:t.y}}}function ii(){let n=new Set,e=new WeakMap,t=null,i=()=>{if(t!=null)return;t=requestAnimationFrame(()=>{t=null,o(),n.size>0&&i()})},a=u=>{var p;n.add(u);let c=(p=e.get(u.target))!=null?p:new Set;c.add(u),e.set(u.target,c),i()},r=u=>{n.delete(u);let c=e.get(u.target);c&&(c.delete(u),c.size===0&&e.delete(u.target))},s=u=>{u.killed||(u.killed=!0,r(u))},o=()=>{var c,p;let u=ut();for(let g of Array.from(n)){if(g.killed||g.paused)continue;let m=u-g.startMs-g.delayMs;if(m<0)continue;let f=g.durationMs>0?m/g.durationMs:1,A=Qn(f),b=g.repeat>=0?g.repeat+1:1,h=g.repeat>0?Math.min(Math.floor(f),b-1):0;if(g.repeat>0&&f>=1){let y=f-h;A=Qn(y)}let v=g.ease(A);g.yoyo&&h%2===1&&(v=1-v);for(let y of g.props)ei(g.target,y.key,y.from+(y.to-y.from)*v);g.scaleFrom&&g.scaleTo&&ti(g.target,{x:g.scaleFrom.x+(g.scaleTo.x-g.scaleFrom.x)*v,y:g.scaleFrom.y+(g.scaleTo.y-g.scaleFrom.y)*v});try{(c=g.onUpdate)==null||c.call(g)}catch{}if(f>=b){s(g);try{(p=g.onComplete)==null||p.call(g)}catch{}}}},l=(u,c,p)=>{var y;let g=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),m=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((y=p==null?void 0:p.delayMsOverride)!=null?y:0)),f=Aa(c.ease),A=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,b=c.yoyo===!0,h=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),v=[];for(let I of Object.keys(c)){if(h.has(I))continue;let P=c[I];typeof P=="number"&&v.push({key:I,from:Ca(u,I),to:P})}let w=ni(u,c);return{target:u,startMs:ut(),delayMs:m,durationMs:g,ease:f,props:v,scaleFrom:w.from,scaleTo:w.to,repeat:A,yoyo:b,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(u,c){let p=l(u,c);return a(p),{kill:()=>s(p),pause:()=>{p.paused||(p.paused=!0,p.pauseAtMs=ut())},resume:()=>{var f;if(!p.paused)return;let g=(f=p.pauseAtMs)!=null?f:ut(),m=ut()-g;p.startMs+=m,p.paused=!1,p.pauseAtMs=null},isActive:()=>!p.killed&&!p.paused}},fromTo(u,c,p){return d.set(u,c),d.to(u,p)},set(u,c){if(!u||!c)return;for(let g of Object.keys(c)){let m=c[g];g==="scale"||g==="scaleX"||g==="scaleY"||typeof m=="number"&&ei(u,g,m)}let p=ni(u,c);p.to&&ti(u,p.to)},killTweensOf(u){let c=e.get(u);if(c)for(let p of Array.from(c))s(p)},timeline(u={}){let c=[],p=0,g=!1,m=[],f=h=>{if(typeof h=="number")return Math.max(0,h*1e3);let v=typeof h=="string"?h.trim():"";return v.startsWith("+=")?p+Math.max(0,Number(v.slice(2))*1e3||0):v?Math.max(0,Number(v)*1e3||0):p},A=h=>{c.push(h);let v=Math.max(0,(typeof h.vars.duration=="number"?h.vars.duration:.5)*1e3);p=Math.max(p,h.atMs+v)},b={to(h,v,w){return A({kind:"to",target:h,vars:v,atMs:f(w)}),b},fromTo(h,v,w,y){return A({kind:"fromTo",target:h,vars:w,from:v,atMs:f(y)}),b},play(){var h,v;if(g)return b;g=!0,m=[];for(let w of c)w.kind==="fromTo"&&d.set(w.target,(h=w.from)!=null?h:{}),m.push(d.to(w.target,{...w.vars,delay:w.atMs/1e3+((v=w.vars.delay)!=null?v:0)}));return b},pause(){for(let h of m)h.pause();return b},kill(){for(let h of m)h.kill();m=[],g=!1}};return u.paused||b.play(),b}};return d}function ai(){if(typeof window=="undefined")return;let n=window;if(!n.gsap)try{n.gsap=ii()}catch{}}var ri={name:"handler-playable-sdk",version:"0.5.45",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 && 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 && 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 Z=0,ka=Z++,si=Z++,oi=Z++,li=Z++,ci=Z++,di=Z++,pi=Z++,ui=Z++,gi=Z++,hi=Z++,fi=Z++,mi=Z++,j=ka;function bi(){return j===si}function yi(){return j===oi}function vi(){return j===li}function wi(){return j===ci}function Ne(){return j===di}function Fe(){return j===pi}function xi(){return j===ui}function Ei(){return j===gi}function Si(){return j===hi}function cn(){return j===fi}function dn(){return j===mi}function Ai(){let n=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(n==="mraid")try{mraid.getState(),j=si;return}catch{}else if(n==="dapi")try{dapi.isReady(),j=oi;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(j=li)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(j=ci)}catch{}else if(e==="mintegral")window.gameReady&&(j=di);else if(e==="tapjoy")window.TJ_API&&(j=pi);else if(e==="tiktok")window.openAppStore&&(j=ui);else if(e==="smadex")try{window.smxTracking&&(j=gi)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(j=hi)}catch{}else e==="vungle"?j=fi:(n==="nucleo"||e==="nucleo")&&(j=mi)}var Ot=Pt(require("lottie-web"),1),Ci=Ot.default;typeof window!="undefined"&&(window.lottie=Ot.default,window.__baseLottie=Ot.default);gn();function D(n,e){let t=(a,r)=>r===0?a:t(r,a%r),i=t(n,e);return`${n/i}:${e/i}`}var vs=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:D(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:D(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:D(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:D(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:D(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:D(360,780)}],ws=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:D(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:D(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:D(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:D(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:D(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:D(412,915)}],xs=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:D(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:D(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:D(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:D(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:D(800,1280)}],Ii=[{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:D(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:D(768,1024),mraidScale:.7}];var Es=[...Ii];var za=Ii[0];ce();var Fa=Pt(require("jszip"),1);function Da(n){return new Promise((e,t)=>{let i=new FileReader;i.onerror=()=>t(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(n)})}function Ha(n){var a;let[e,t]=n.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}async function Na(n){return await new Promise(e=>{let t=new Image;t.onload=()=>e({width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}),t.onerror=()=>e(null),t.src=n})}async function hn(n){var e,t;try{console.log("[ImageUtils] Fetching image data from URL:",n);let i=await fetch(n);if(!i.ok)return console.warn("[ImageUtils] Fetch failed with status:",i.status,n),null;let a=await i.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let r=await Da(a),s=await Na(r),o=Ha(r);return console.log("[ImageUtils] Success resolution:",s==null?void 0:s.width,"x",s==null?void 0:s.height,"mime:",o.mimeType),{base64:o.base64,mimeType:o.mimeType,dataUrl:r,width:(e=s==null?void 0:s.width)!=null?e:0,height:(t=s==null?void 0:s.height)!=null?t:0}}catch(i){return console.error("[ImageUtils] Error fetching image data:",i),null}}async function Rt(n,e=30){try{console.log("[ImageUtils] Removing background color...");let t=await new Promise((c,p)=>{let g=new Image;g.onload=()=>c(g),g.onerror=()=>p(new Error("Failed to load image")),g.src=n}),i=document.createElement("canvas");i.width=t.width,i.height=t.height;let a=i.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),n;a.drawImage(t,0,0);let r=a.getImageData(0,0,i.width,i.height),s=r.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:s[c.offset],g:s[c.offset+1],b:s[c.offset+2]})),d=0;for(let c=0;c<s.length;c+=4){let p=s[c],g=s[c+1],m=s[c+2],f=!1;for(let A of l)if(Math.sqrt(Math.pow(p-A.r,2)+Math.pow(g-A.g,2)+Math.pow(m-A.b,2))<e){f=!0;break}f&&(s[c+3]=0,d++)}return console.log(`[ImageUtils] Removed background from ${d} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(r,0,0),i.toDataURL("image/png")}catch(t){return console.error("[ImageUtils] Error removing background:",t),n}}var Pi=require("@google/genai");async function fn(n,e,t=[],i={}){var a,r,s,o,l,d,u;try{if(!(n!=null&&n.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let b=0;b<t.length;b++){let h=t[b];if(!h.base64||!h.mimeType)throw new Error(`Image ${b+1} is missing required data`);if(h.base64.length<1e3&&console.warn(`Image ${b+1} data appears very small, may be corrupted`),!h.mimeType.startsWith("image/"))throw new Error(`Image ${b+1} has invalid MIME type: ${h.mimeType}`)}let c=new Pi.GoogleGenAI({apiKey:n}),p="gemini-2.5-flash",g=[e];t.length>0&&t.forEach((b,h)=>{g.push({inlineData:{data:b.base64,mimeType:b.mimeType}}),console.log(`[Gemini] Added image ${h+1}: ${b.mimeType}, size: ${Math.round(b.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${t.length} images and prompt length: ${e.length}`);let m=await c.models.generateContent({model:p,contents:g}),f="",A=(s=(r=(a=m.candidates)==null?void 0:a[0])==null?void 0:r.content)==null?void 0:s.parts;if(A)for(let b of A)b.text&&(f+=b.text);if(!f.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${f.length}`),f}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."):(u=c.message)!=null&&u.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):c}}var _i=require("@google/genai");async function zt(n,e,t=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new _i.GoogleGenAI({apiKey:n}),r=[{text:e}];t.length>0&&t.forEach((o,l)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${l}`),r.push({inlineData:{mimeType:o.mimeType,data:o.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let s=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:r});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!s.candidates||!s.candidates[0]||!s.candidates[0].content||!s.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let o of s.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 Wa=require("pixi.js");gt();ce();var Di=require("pixi.js");var Ya=require("pixi.js");ce();function nr(n){return new Promise((e,t)=>{let i=new FileReader;i.onerror=()=>t(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(n)})}function ir(n){var a;let[e,t]=n.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}function ar(n){return`
|
|
46
|
+
`,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(s=>{s.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(s=>{s.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 r=this.modal.querySelector("[data-modal-apply]");r==null||r.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",s=>{s.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 t=window.__openAiEditor;if(typeof t!="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}`,t(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 Nr={};Wn(Nr,{AssetCache:()=>ae,AssetLoader:()=>Ce,AssetSystem:()=>Kt,AssetTextures:()=>Te,Assets:()=>ua,BaseSystem:()=>Ze,GameEngine:()=>Yt,GameObject:()=>At,GameObjectManager:()=>Xe,ObjectFactory:()=>Le,Renderer:()=>St,RuntimeObjectRegistry:()=>Qe,Transform:()=>Et,applyScreenAnchor:()=>Zt,basePixi:()=>la,clearResponsiveElements:()=>ha,createPixiBase:()=>Vt,getRegisteredFontIds:()=>aa,globalResponsiveMultipliers:()=>Tt,initAssetTextures:()=>Ht,initAssets:()=>ga,layout:()=>ma,playLottieOverlay:()=>sa,registerFont:()=>ia,registerType:()=>$t,resolveAnchorVec2:()=>$e,resolveFont:()=>ta,resolveFontWeight:()=>na,resolveScreenAnchorPoint:()=>et,resolveScreenRatioPoint:()=>tt,runInitSequence:()=>ba,setLottieInstance:()=>Nt,spawnSceneFromConfig:()=>da,updateScreenState:()=>Jt});module.exports=Sa(Nr);var ea=require("pixi.js");var Se={};function _t(n,e,t=!1){Se[n]||(Se[n]=[]),Se[n].push({fn:e,once:t})}function on(n,e){if(Se[n]){if(!e){delete Se[n];return}Se[n]=Se[n].filter(t=>t.fn!==e)}}function jt(n,...e){let t=Se[n];if(t)for(let i of[...t])i.fn(...e),i.once&&on(n,i.fn)}function J(n,e){_t(n,e,!0)}var $=null,ee=[],He=null;function Jn(n){$=n,ee=[],He!==null&&(clearTimeout(He),He=null)}function Zn(){var n,e,t;return{endpoint:($==null?void 0:$.endpoint)||"",transport:($==null?void 0:$.transport)||"beacon",batchSize:(n=$==null?void 0:$.batchSize)!=null?n:10,flushIntervalMs:(e=$==null?void 0:$.flushIntervalMs)!=null?e:300,maxQueue:(t=$==null?void 0:$.maxQueue)!=null?t:200,debug:!!($!=null&&$.debug)}}async function Kn(n,e,t,i){let a=JSON.stringify(e);if(t==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=navigator.sendBeacon(n,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",r,e);return}catch(r){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",r)}try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(r){i&&console.warn("[handler.telemetry] fetch failed",r)}}function ln(n,e){let t=Zn();if(e&&t.endpoint){if(ee.push(n),ee.length>t.maxQueue&&(ee=ee.slice(ee.length-t.maxQueue)),ee.length>=t.batchSize){Xn();return}He===null&&(He=window.setTimeout(()=>{He=null,Xn()},t.flushIntervalMs))}}async function Xn(){let n=Zn();if(!n.endpoint||ee.length===0)return;let e=ee.splice(0,n.batchSize);await Kn(n.endpoint,{events:e},n.transport,n.debug),ee.length>0&&await Kn(n.endpoint,{events:ee.splice(0,n.batchSize)},n.transport,n.debug)}function Qn(n){return Math.max(0,Math.min(1,n))}function Aa(n){let e=String(n!=null?n:"power2.out");if(e==="linear")return t=>t;if(e==="sine.inOut")return t=>.5-Math.cos(Math.PI*t)/2;if(e==="power2.out"||e==="easeOutQuad")return t=>1-(1-t)*(1-t);if(e.startsWith("back.out")){let t=e.match(/back\.out\(([\d.]+)\)/),i=t?Number(t[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return t=>1-(1-t)*(1-t)}function ut(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Ca(n,e){let t=n==null?void 0:n[e];return typeof t=="number"?t:0}function ei(n,e,t){try{n[e]=t}catch{}}function Ta(n){let e=n==null?void 0:n.scale;if(!e)return null;let t=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:t,y:i}}function ti(n,e){let t=n==null?void 0:n.scale;if(t)try{typeof t.set=="function"?t.set(e.x,e.y):(typeof t.x=="number"&&(t.x=e.x),typeof t.y=="number"&&(t.y=e.y))}catch{}}function ni(n,e){let t=Ta(n);if(!t)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:t.x,y:t.y},to:{x:i!=null?i:t.x,y:a!=null?a:t.y}}}function ii(){let n=new Set,e=new WeakMap,t=null,i=()=>{if(t!=null)return;t=requestAnimationFrame(()=>{t=null,o(),n.size>0&&i()})},a=u=>{var p;n.add(u);let c=(p=e.get(u.target))!=null?p:new Set;c.add(u),e.set(u.target,c),i()},r=u=>{n.delete(u);let c=e.get(u.target);c&&(c.delete(u),c.size===0&&e.delete(u.target))},s=u=>{u.killed||(u.killed=!0,r(u))},o=()=>{var c,p;let u=ut();for(let g of Array.from(n)){if(g.killed||g.paused)continue;let m=u-g.startMs-g.delayMs;if(m<0)continue;let f=g.durationMs>0?m/g.durationMs:1,A=Qn(f),b=g.repeat>=0?g.repeat+1:1,h=g.repeat>0?Math.min(Math.floor(f),b-1):0;if(g.repeat>0&&f>=1){let y=f-h;A=Qn(y)}let v=g.ease(A);g.yoyo&&h%2===1&&(v=1-v);for(let y of g.props)ei(g.target,y.key,y.from+(y.to-y.from)*v);g.scaleFrom&&g.scaleTo&&ti(g.target,{x:g.scaleFrom.x+(g.scaleTo.x-g.scaleFrom.x)*v,y:g.scaleFrom.y+(g.scaleTo.y-g.scaleFrom.y)*v});try{(c=g.onUpdate)==null||c.call(g)}catch{}if(f>=b){s(g);try{(p=g.onComplete)==null||p.call(g)}catch{}}}},l=(u,c,p)=>{var y;let g=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),m=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((y=p==null?void 0:p.delayMsOverride)!=null?y:0)),f=Aa(c.ease),A=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,b=c.yoyo===!0,h=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),v=[];for(let I of Object.keys(c)){if(h.has(I))continue;let P=c[I];typeof P=="number"&&v.push({key:I,from:Ca(u,I),to:P})}let w=ni(u,c);return{target:u,startMs:ut(),delayMs:m,durationMs:g,ease:f,props:v,scaleFrom:w.from,scaleTo:w.to,repeat:A,yoyo:b,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(u,c){let p=l(u,c);return a(p),{kill:()=>s(p),pause:()=>{p.paused||(p.paused=!0,p.pauseAtMs=ut())},resume:()=>{var f;if(!p.paused)return;let g=(f=p.pauseAtMs)!=null?f:ut(),m=ut()-g;p.startMs+=m,p.paused=!1,p.pauseAtMs=null},isActive:()=>!p.killed&&!p.paused}},fromTo(u,c,p){return d.set(u,c),d.to(u,p)},set(u,c){if(!u||!c)return;for(let g of Object.keys(c)){let m=c[g];g==="scale"||g==="scaleX"||g==="scaleY"||typeof m=="number"&&ei(u,g,m)}let p=ni(u,c);p.to&&ti(u,p.to)},killTweensOf(u){let c=e.get(u);if(c)for(let p of Array.from(c))s(p)},timeline(u={}){let c=[],p=0,g=!1,m=[],f=h=>{if(typeof h=="number")return Math.max(0,h*1e3);let v=typeof h=="string"?h.trim():"";return v.startsWith("+=")?p+Math.max(0,Number(v.slice(2))*1e3||0):v?Math.max(0,Number(v)*1e3||0):p},A=h=>{c.push(h);let v=Math.max(0,(typeof h.vars.duration=="number"?h.vars.duration:.5)*1e3);p=Math.max(p,h.atMs+v)},b={to(h,v,w){return A({kind:"to",target:h,vars:v,atMs:f(w)}),b},fromTo(h,v,w,y){return A({kind:"fromTo",target:h,vars:w,from:v,atMs:f(y)}),b},play(){var h,v;if(g)return b;g=!0,m=[];for(let w of c)w.kind==="fromTo"&&d.set(w.target,(h=w.from)!=null?h:{}),m.push(d.to(w.target,{...w.vars,delay:w.atMs/1e3+((v=w.vars.delay)!=null?v:0)}));return b},pause(){for(let h of m)h.pause();return b},kill(){for(let h of m)h.kill();m=[],g=!1}};return u.paused||b.play(),b}};return d}function ai(){if(typeof window=="undefined")return;let n=window;if(!n.gsap)try{n.gsap=ii()}catch{}}var ri={name:"handler-playable-sdk",version:"0.5.49",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 && 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 && 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 Z=0,ka=Z++,si=Z++,oi=Z++,li=Z++,ci=Z++,di=Z++,pi=Z++,ui=Z++,gi=Z++,hi=Z++,fi=Z++,mi=Z++,j=ka;function bi(){return j===si}function yi(){return j===oi}function vi(){return j===li}function wi(){return j===ci}function Ne(){return j===di}function Fe(){return j===pi}function xi(){return j===ui}function Ei(){return j===gi}function Si(){return j===hi}function cn(){return j===fi}function dn(){return j===mi}function Ai(){let n=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(n==="mraid")try{mraid.getState(),j=si;return}catch{}else if(n==="dapi")try{dapi.isReady(),j=oi;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(j=li)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(j=ci)}catch{}else if(e==="mintegral")window.gameReady&&(j=di);else if(e==="tapjoy")window.TJ_API&&(j=pi);else if(e==="tiktok")window.openAppStore&&(j=ui);else if(e==="smadex")try{window.smxTracking&&(j=gi)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(j=hi)}catch{}else e==="vungle"?j=fi:(n==="nucleo"||e==="nucleo")&&(j=mi)}var Ot=Pt(require("lottie-web"),1),Ci=Ot.default;typeof window!="undefined"&&(window.lottie=Ot.default,window.__baseLottie=Ot.default);gn();function D(n,e){let t=(a,r)=>r===0?a:t(r,a%r),i=t(n,e);return`${n/i}:${e/i}`}var vs=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:D(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:D(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:D(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:D(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:D(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:D(360,780)}],ws=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:D(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:D(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:D(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:D(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:D(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:D(412,915)}],xs=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:D(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:D(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:D(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:D(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:D(800,1280)}],Ii=[{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:D(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:D(768,1024),mraidScale:.7}];var Es=[...Ii];var za=Ii[0];ce();var Fa=Pt(require("jszip"),1);function Da(n){return new Promise((e,t)=>{let i=new FileReader;i.onerror=()=>t(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(n)})}function Ha(n){var a;let[e,t]=n.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}async function Na(n){return await new Promise(e=>{let t=new Image;t.onload=()=>e({width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}),t.onerror=()=>e(null),t.src=n})}async function hn(n){var e,t;try{console.log("[ImageUtils] Fetching image data from URL:",n);let i=await fetch(n);if(!i.ok)return console.warn("[ImageUtils] Fetch failed with status:",i.status,n),null;let a=await i.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let r=await Da(a),s=await Na(r),o=Ha(r);return console.log("[ImageUtils] Success resolution:",s==null?void 0:s.width,"x",s==null?void 0:s.height,"mime:",o.mimeType),{base64:o.base64,mimeType:o.mimeType,dataUrl:r,width:(e=s==null?void 0:s.width)!=null?e:0,height:(t=s==null?void 0:s.height)!=null?t:0}}catch(i){return console.error("[ImageUtils] Error fetching image data:",i),null}}async function Rt(n,e=30){try{console.log("[ImageUtils] Removing background color...");let t=await new Promise((c,p)=>{let g=new Image;g.onload=()=>c(g),g.onerror=()=>p(new Error("Failed to load image")),g.src=n}),i=document.createElement("canvas");i.width=t.width,i.height=t.height;let a=i.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),n;a.drawImage(t,0,0);let r=a.getImageData(0,0,i.width,i.height),s=r.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:s[c.offset],g:s[c.offset+1],b:s[c.offset+2]})),d=0;for(let c=0;c<s.length;c+=4){let p=s[c],g=s[c+1],m=s[c+2],f=!1;for(let A of l)if(Math.sqrt(Math.pow(p-A.r,2)+Math.pow(g-A.g,2)+Math.pow(m-A.b,2))<e){f=!0;break}f&&(s[c+3]=0,d++)}return console.log(`[ImageUtils] Removed background from ${d} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(r,0,0),i.toDataURL("image/png")}catch(t){return console.error("[ImageUtils] Error removing background:",t),n}}var Pi=require("@google/genai");async function fn(n,e,t=[],i={}){var a,r,s,o,l,d,u;try{if(!(n!=null&&n.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let b=0;b<t.length;b++){let h=t[b];if(!h.base64||!h.mimeType)throw new Error(`Image ${b+1} is missing required data`);if(h.base64.length<1e3&&console.warn(`Image ${b+1} data appears very small, may be corrupted`),!h.mimeType.startsWith("image/"))throw new Error(`Image ${b+1} has invalid MIME type: ${h.mimeType}`)}let c=new Pi.GoogleGenAI({apiKey:n}),p="gemini-2.5-flash",g=[e];t.length>0&&t.forEach((b,h)=>{g.push({inlineData:{data:b.base64,mimeType:b.mimeType}}),console.log(`[Gemini] Added image ${h+1}: ${b.mimeType}, size: ${Math.round(b.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${t.length} images and prompt length: ${e.length}`);let m=await c.models.generateContent({model:p,contents:g}),f="",A=(s=(r=(a=m.candidates)==null?void 0:a[0])==null?void 0:r.content)==null?void 0:s.parts;if(A)for(let b of A)b.text&&(f+=b.text);if(!f.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${f.length}`),f}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."):(u=c.message)!=null&&u.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):c}}var _i=require("@google/genai");async function zt(n,e,t=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new _i.GoogleGenAI({apiKey:n}),r=[{text:e}];t.length>0&&t.forEach((o,l)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${l}`),r.push({inlineData:{mimeType:o.mimeType,data:o.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let s=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:r});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!s.candidates||!s.candidates[0]||!s.candidates[0].content||!s.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let o of s.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 Wa=require("pixi.js");gt();ce();var Di=require("pixi.js");var Ya=require("pixi.js");ce();function nr(n){return new Promise((e,t)=>{let i=new FileReader;i.onerror=()=>t(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(n)})}function ir(n){var a;let[e,t]=n.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}function ar(n){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/pixi/index.css
CHANGED
|
@@ -1076,18 +1076,29 @@
|
|
|
1076
1076
|
transition: all var(--ui-duration-fast) var(--ui-ease);
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
+
.scene-object-item-wrapper {
|
|
1080
|
+
display: flex;
|
|
1081
|
+
align-items: center;
|
|
1082
|
+
gap: 6px;
|
|
1083
|
+
width: 100%;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1079
1086
|
.scene-object-checkbox {
|
|
1080
1087
|
width: 14px;
|
|
1081
1088
|
height: 14px;
|
|
1082
1089
|
min-width: 14px;
|
|
1083
1090
|
min-height: 14px;
|
|
1084
1091
|
margin: 0;
|
|
1085
|
-
margin-right: 6px;
|
|
1086
1092
|
cursor: pointer;
|
|
1087
1093
|
accent-color: var(--ui-terracotta);
|
|
1088
1094
|
flex-shrink: 0;
|
|
1089
1095
|
}
|
|
1090
1096
|
|
|
1097
|
+
.scene-object-item-wrapper .scene-object-item {
|
|
1098
|
+
flex: 1;
|
|
1099
|
+
margin: 0;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1091
1102
|
.scene-object-label {
|
|
1092
1103
|
white-space: nowrap;
|
|
1093
1104
|
overflow: hidden;
|
|
@@ -1178,6 +1189,13 @@
|
|
|
1178
1189
|
box-shadow: 0 0 0 1px var(--ui-accent-overlay-3);
|
|
1179
1190
|
}
|
|
1180
1191
|
|
|
1192
|
+
.scene-object-item.active {
|
|
1193
|
+
border-color: var(--ui-terracotta);
|
|
1194
|
+
background: var(--ui-accent-overlay-2);
|
|
1195
|
+
box-shadow: 0 0 0 2px var(--ui-terracotta);
|
|
1196
|
+
font-weight: var(--font-weight-semibold);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1181
1199
|
/* Debug Toggle Button in Toolbar */
|
|
1182
1200
|
.debug-toggle {
|
|
1183
1201
|
position: relative;
|
package/dist/pixi/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x577b0e,_0x53ad8f){var a0_0x537431={_0x1c1872:0x3e6,_0x5a92b1:0x3e8,_0x523a58:0x3ec,_0x30b08e:'jDvB',_0x319f46:0x3ed,_0x4271e1:0x4ec,_0x562163:0x4f3,_0x51b5bf:0x4dd,_0x20a74f:'X1fE',_0x2f8963:0x4e4,_0xe17a68:0x4e4,_0x5df08d:0x4ee,_0x5154c6:0x4f5,_0xf60d70:0x4ed,_0x5313c8:0x3fd,_0xf971e2:'JNdI',_0x216e4b:0x3e7,_0x2588df:0x3e2,_0x107ede:0x3fa,_0x39477d:0x3f1,_0x1dcc00:'A383',_0x2b97ff:0x2b4,_0x38a680:0x2af,_0x37a512:0x2a0,_0x3868f4:0x2b2,_0x4b0e0d:0x3e3,_0x7227f0:'*iss',_0x4094bb:'2deC',_0xff62af:0x2b0,_0x3e5c9a:0x2ac,_0x3bff3e:0x2a6,_0x4f1dac:'@Z#k',_0x582fb0:0x2ae,_0x43ee9b:'w6DS',_0x380a7a:0x2b3,_0x17ace0:0x2b0,_0x5101b8:0x2a7},a0_0x267ac4={_0x259658:0x1ab},a0_0x24ca6f={_0x3ee769:0x3da},a0_0x3c9d05={_0x543265:0x2d9};function _0x165e93(_0xe35bdd,_0x238dc9,_0x4e9cc5,_0x1d7f55,_0x27051a){return a0_0x1780(_0x238dc9-a0_0x3c9d05._0x543265,_0x1d7f55);}function _0x477081(_0x2e8d5a,_0x10a5a0,_0x11a88e,_0x142807,_0x45394c){return a0_0x1780(_0x45394c-a0_0x24ca6f._0x3ee769,_0x142807);}var _0x2dec11=_0x577b0e();function _0x2c2266(_0x22070f,_0x5dbb50,_0x4fd8d8,_0x3451d4,_0x35039d){return a0_0x1780(_0x4fd8d8-a0_0x267ac4._0x259658,_0x22070f);}while(!![]){try{var _0x2c29d1=parseInt(_0x165e93(a0_0x537431._0x1c1872,a0_0x537431._0x5a92b1,a0_0x537431._0x523a58,a0_0x537431._0x30b08e,a0_0x537431._0x319f46))/(-0x1*-0x1b8a+-0xc5*-0x2f+0xa9e*-0x6)*(-parseInt(_0x477081(a0_0x537431._0x4271e1,a0_0x537431._0x562163,a0_0x537431._0x51b5bf,a0_0x537431._0x20a74f,a0_0x537431._0x2f8963))/(0x44+-0x6d*0xc+0x4da))+parseInt(_0x477081(a0_0x537431._0xe17a68,a0_0x537431._0x5df08d,a0_0x537431._0x5154c6,'^jZS',a0_0x537431._0xf60d70))/(0x119d+0x3*-0xf1+-0xec7)+parseInt(_0x165e93(a0_0x537431._0x5313c8,0x3f0,0x3f8,a0_0x537431._0xf971e2,a0_0x537431._0x216e4b))/(-0x1466+-0x6a3*-0x2+0x724)*(parseInt(_0x165e93(a0_0x537431._0x2588df,0x3ed,a0_0x537431._0x107ede,'HosB',a0_0x537431._0x39477d))/(-0x1f*-0x11c+0x2166+-0x43c5))+-parseInt(_0x2c2266(a0_0x537431._0x1dcc00,a0_0x537431._0x2b97ff,a0_0x537431._0x38a680,a0_0x537431._0x37a512,a0_0x537431._0x3868f4))/(0x2*-0x1169+-0xf88+-0x7c*-0x68)*(parseInt(_0x165e93(a0_0x537431._0x4b0e0d,a0_0x537431._0x39477d,0x3f8,a0_0x537431._0x7227f0,0x3e3))/(-0xa26*-0x3+0x920+0x35*-0xbf))+parseInt(_0x2c2266(a0_0x537431._0x4094bb,a0_0x537431._0xff62af,a0_0x537431._0x3e5c9a,a0_0x537431._0x3bff3e,0x2af))/(-0x186c+-0x470*0x2+0x2154)+-parseInt(_0x2c2266(a0_0x537431._0x4f1dac,0x2b7,a0_0x537431._0x582fb0,0x2ad,0x2af))/(-0xdeb*0x1+-0x21f3+0x1*0x2fe7)+parseInt(_0x2c2266(a0_0x537431._0x43ee9b,a0_0x537431._0x380a7a,0x2b3,a0_0x537431._0x17ace0,a0_0x537431._0x5101b8))/(-0x116+-0x5bf*0x1+-0x6df*-0x1);if(_0x2c29d1===_0x53ad8f)break;else _0x2dec11['push'](_0x2dec11['shift']());}catch(_0x222a87){_0x2dec11['push'](_0x2dec11['shift']());}}}(a0_0x2a9b,-0x86*-0x17e9+-0xb58e1+0x85e10));function a0_0x1780(_0x211632,_0x316b52){_0x211632=_0x211632-(-0x209b+0x502+0x1c95);var _0x3d864d=a0_0x2a9b();var _0xb75faa=_0x3d864d[_0x211632];if(a0_0x1780['GEhAxq']===undefined){var _0x16ca65=function(_0x18e8ab){var _0x59a99b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5873ec='',_0x3b6f35='',_0x1fe02d=_0x5873ec+_0x16ca65;for(var _0x23d139=-0x163*0x3+-0x3*0x69b+-0xb*-0x22e,_0x9b0747,_0x530904,_0x1cbbb1=-0x1dcd+-0x1484*-0x1+0x949;_0x530904=_0x18e8ab['charAt'](_0x1cbbb1++);~_0x530904&&(_0x9b0747=_0x23d139%(-0x40+-0x1ac2+0x2*0xd83)?_0x9b0747*(0x1437+-0x1e9+-0x907*0x2)+_0x530904:_0x530904,_0x23d139++%(0x1*0x248+0x20fa+-0x15b*0x1a))?_0x5873ec+=_0x1fe02d['charCodeAt'](_0x1cbbb1+(-0x1b8+0x1e*-0x59+0xf0*0xd))-(0x1*0x2619+-0x2699+-0x3*-0x2e)!==0xc10+0x16da+-0x2*0x1175?String['fromCharCode'](-0x1d7b+0x1cbe+0x1bc&_0x9b0747>>(-(-0x120a+-0x213e+-0x65*-0x82)*_0x23d139&-0x1462+0xdf3*-0x1+0x225b)):_0x23d139:0x38c+-0x11da+0x1*0xe4e){_0x530904=_0x59a99b['indexOf'](_0x530904);}for(var _0x4f181f=-0x1fe9*-0x1+-0x1fcf+0x1*-0x1a,_0x3dc105=_0x5873ec['length'];_0x4f181f<_0x3dc105;_0x4f181f++){_0x3b6f35+='%'+('00'+_0x5873ec['charCodeAt'](_0x4f181f)['toString'](0x50c*-0x5+0x1ca7+-0x35b))['slice'](-(-0x76e+0x157*0xd+0x49*-0x23));}return decodeURIComponent(_0x3b6f35);};var _0xdaaf2c=function(_0x28ed25,_0x3de19b){var _0x1747d4=[],_0x54d910=-0x24b7*-0x1+-0x10b+-0x6*0x5f2,_0x3ad2e7,_0x491bde='';_0x28ed25=_0x16ca65(_0x28ed25);var _0x891ee2;for(_0x891ee2=-0x2*-0x8c6+0x459+-0x13*0x127;_0x891ee2<0x29*0x89+-0x7*0x16f+-0xae8;_0x891ee2++){_0x1747d4[_0x891ee2]=_0x891ee2;}for(_0x891ee2=0xd1d+0x64*-0x20+-0x1*0x9d;_0x891ee2<0x2016+-0x6fe*-0x5+-0x420c;_0x891ee2++){_0x54d910=(_0x54d910+_0x1747d4[_0x891ee2]+_0x3de19b['charCodeAt'](_0x891ee2%_0x3de19b['length']))%(0x1b84+-0x8*0x197+0x1*-0xdcc),_0x3ad2e7=_0x1747d4[_0x891ee2],_0x1747d4[_0x891ee2]=_0x1747d4[_0x54d910],_0x1747d4[_0x54d910]=_0x3ad2e7;}_0x891ee2=0x950+0x681*0x1+-0xfd1,_0x54d910=0x23b*0x8+-0xa64+0x2*-0x3ba;for(var _0xffd6bd=0xf8b+-0x18bd+0x932;_0xffd6bd<_0x28ed25['length'];_0xffd6bd++){_0x891ee2=(_0x891ee2+(-0x200+0x19f0+-0x17ef))%(-0x3b3*0x1+0x33+0x40*0x12),_0x54d910=(_0x54d910+_0x1747d4[_0x891ee2])%(0x1a5b+-0x1d*-0x22+-0x1d35),_0x3ad2e7=_0x1747d4[_0x891ee2],_0x1747d4[_0x891ee2]=_0x1747d4[_0x54d910],_0x1747d4[_0x54d910]=_0x3ad2e7,_0x491bde+=String['fromCharCode'](_0x28ed25['charCodeAt'](_0xffd6bd)^_0x1747d4[(_0x1747d4[_0x891ee2]+_0x1747d4[_0x54d910])%(-0xc8+-0x1*0xaf3+0xcbb)]);}return _0x491bde;};a0_0x1780['cHaFns']=_0xdaaf2c,a0_0x1780['PvPLBg']={},a0_0x1780['GEhAxq']=!![];}var _0x3fe30b=_0x3d864d[-0x1*0x11d7+-0x26fe+0x38d5],_0x1b555f=_0x211632+_0x3fe30b,_0x511afb=a0_0x1780['PvPLBg'][_0x1b555f];if(!_0x511afb){if(a0_0x1780['iuStoV']===undefined){var _0x4c5bc0=function(_0x453591){this['agfPot']=_0x453591,this['RRmMqu']=[-0x12e2+-0x1*-0x16b5+0x6*-0xa3,-0x581*0x1+-0x73f+0xcc0,-0xa5c+0x184f*-0x1+-0x22ab*-0x1],this['LhRlpm']=function(){return'newState';},this['GhAXBD']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['BvZVMx']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4c5bc0['prototype']['dNSdnb']=function(){var _0x11e15b=new RegExp(this['GhAXBD']+this['BvZVMx']),_0x24db72=_0x11e15b['test'](this['LhRlpm']['toString']())?--this['RRmMqu'][-0x184c+0x20f3+0x3*-0x2e2]:--this['RRmMqu'][-0x1d90+0x2097+0x307*-0x1];return this['BIsQzh'](_0x24db72);},_0x4c5bc0['prototype']['BIsQzh']=function(_0x2cb0ac){if(!Boolean(~_0x2cb0ac))return _0x2cb0ac;return this['dCmuQh'](this['agfPot']);},_0x4c5bc0['prototype']['dCmuQh']=function(_0x503a6d){for(var _0x6adf4f=-0x109*-0x15+0xc7*-0x1+-0x1*0x14f6,_0x15c396=this['RRmMqu']['length'];_0x6adf4f<_0x15c396;_0x6adf4f++){this['RRmMqu']['push'](Math['round'](Math['random']())),_0x15c396=this['RRmMqu']['length'];}return _0x503a6d(this['RRmMqu'][-0x38b+0x9d0+-0x1*0x645]);},new _0x4c5bc0(a0_0x1780)['dNSdnb'](),a0_0x1780['iuStoV']=!![];}_0xb75faa=a0_0x1780['cHaFns'](_0xb75faa,_0x316b52),a0_0x1780['PvPLBg'][_0x1b555f]=_0xb75faa;}else _0xb75faa=_0x511afb;return _0xb75faa;}var a0_0x1357a9=(function(){var _0x202a28=!![];return function(_0x17d72b,_0x3e4a43){var _0x256fa9=_0x202a28?function(){if(_0x3e4a43){var _0x57271a=_0x3e4a43['apply'](_0x17d72b,arguments);return _0x3e4a43=null,_0x57271a;}}:function(){};return _0x202a28=![],_0x256fa9;};}()),a0_0x1caec5=a0_0x1357a9(this,function(){var a0_0x3afdc1={_0x3a3101:0x225,_0x3ba162:0x232,_0x1b5eac:0x22c,_0x52fdf2:0x21b,_0x4b8c78:0x22e,_0x59f435:0x20f,_0x205dd9:0x216,_0x41d6c9:0x218,_0x47cf94:'Yv(J',_0x3bc4f2:'EJxp',_0x669a2d:0x229,_0x1aff3a:0x227,_0x293184:0x21d,_0x322261:'!dQM',_0x458732:0x25a,_0x31d9a9:0x254,_0x4bcc0f:0x253,_0x571b22:0x250,_0xd263b2:0x160,_0x15cef0:0x148,_0x1fb4b7:0x151,_0x445177:0x210,_0x2452a2:0x21e,_0x31a7e1:0x219,_0x18495b:'3OKX',_0x10f0a2:0x14f,_0x4438c8:0x149,_0x2c99c3:'HosB',_0x2c2c31:0x13e,_0x1dc150:0x26e,_0x28f2d4:0x276,_0x1803f0:'5aAn',_0x357558:0x136,_0x45ff2a:0x145,_0x253590:0x142},a0_0x28d3c0={_0x57610f:0x32e},a0_0x504a80={_0x29e702:0x250};function _0x4377bb(_0x398037,_0x71648f,_0x5e1ebf,_0x57b6e6,_0x39b5c7){return a0_0x1780(_0x39b5c7- -a0_0x504a80._0x29e702,_0x5e1ebf);}var _0x302c3a={};function _0x23b980(_0x2957ac,_0x3169a4,_0x155d3a,_0x5f0054,_0x260588){return a0_0x1780(_0x2957ac- -0x36c,_0x5f0054);}_0x302c3a['LaKSV']=_0x3f8931(-0x221,-a0_0x3afdc1._0x3a3101,-a0_0x3afdc1._0x3ba162,-a0_0x3afdc1._0x1b5eac,'@Z#k')+_0x3f8931(-a0_0x3afdc1._0x52fdf2,-0x226,-a0_0x3afdc1._0x4b8c78,-a0_0x3afdc1._0x3a3101,'hr@T')+'+$';var _0x3b0d99=_0x302c3a;function _0x3f8931(_0x25394b,_0x9125d5,_0x5565d1,_0x5c79f2,_0x26ca48){return a0_0x1780(_0x5c79f2- -a0_0x28d3c0._0x57610f,_0x26ca48);}return a0_0x1caec5[_0x3f8931(-0x21b,-a0_0x3afdc1._0x59f435,-a0_0x3afdc1._0x205dd9,-a0_0x3afdc1._0x41d6c9,a0_0x3afdc1._0x47cf94)+_0x3f8931(-0x229,-0x21f,-0x22e,-0x227,a0_0x3afdc1._0x3bc4f2)]()[_0x3f8931(-0x213,-a0_0x3afdc1._0x669a2d,-a0_0x3afdc1._0x1aff3a,-a0_0x3afdc1._0x293184,a0_0x3afdc1._0x322261)+'h'](_0x3b0d99['LaKSV'])[_0x23b980(-a0_0x3afdc1._0x458732,-a0_0x3afdc1._0x31d9a9,-a0_0x3afdc1._0x4bcc0f,'gojs',-a0_0x3afdc1._0x571b22)+_0x4377bb(-a0_0x3afdc1._0xd263b2,-a0_0x3afdc1._0x15cef0,'^jZS',-0x154,-a0_0x3afdc1._0x1fb4b7)]()[_0x3f8931(-a0_0x3afdc1._0x205dd9,-a0_0x3afdc1._0x445177,-a0_0x3afdc1._0x2452a2,-a0_0x3afdc1._0x31a7e1,a0_0x3afdc1._0x18495b)+_0x4377bb(-a0_0x3afdc1._0x10f0a2,-a0_0x3afdc1._0x4438c8,a0_0x3afdc1._0x2c99c3,-a0_0x3afdc1._0x2c2c31,-0x14b)+'r'](a0_0x1caec5)[_0x23b980(-a0_0x3afdc1._0x1dc150,-0x26c,-a0_0x3afdc1._0x28f2d4,a0_0x3afdc1._0x1803f0,-0x260)+'h'](_0x4377bb(-a0_0x3afdc1._0x357558,-0x147,']SL!',-a0_0x3afdc1._0x45ff2a,-a0_0x3afdc1._0x253590)+')+)+)'+'+$');});a0_0x1caec5();import{A as a0_0x2e6ae2,B as a0_0x3f1366,C as a0_0x3660d9,D as a0_0x16ffd8,b as a0_0x5a999a,c as a0_0x1cb168,d as a0_0x451a57,e as a0_0x34fe93,f as a0_0x5d8eed,g as a0_0x22bcc2,h as a0_0x2dc7c8,i as a0_0x465c6a,j as a0_0x205572,k as a0_0x4a7873,l as a0_0x23703a,m as a0_0x510062,n as a0_0x472bd9,o as a0_0x34f55d,p as a0_0x1ad1d0,q as a0_0xd1b17d,r as a0_0x3fb12d,s as a0_0x206e0c,t as a0_0x295bae,u as a0_0x3a4460,v as a0_0x4cb47f,w as a0_0x36d914,x as a0_0x2e601f,y as a0_0x56d967,z as a0_0x5a5c77}from'../chunk-7PB4AWTL.js';import{a as a0_0x18d4c7,b as a0_0x5b05fe,c as a0_0x97ce50,d as a0_0x29f9c3,e as a0_0x514548}from'../chunk-I5OOVR5U.js';import'../chunk-PW2FGMCO.js';import'../chunk-HVKF2KYL.js';function a0_0x2a9b(){var _0x189a96=['AMffzH3dUhPBmmkTWOpdS8ky','W7RdRCo9W4mqdCkIW44XqYZcMHG','EItdKCkFDq','p8ktqa','W73dPCo5W4jLz8o+W5KErG','WOuPwCk/W4XHbGRcPGBdMMHy','WRqio1uX','WQ4zkKKVW5RcPt3dTSknjLbb','W6frfXiDWOBdOhRdHbu','WRKMWRjpWOS','p3hcSsBdGZq1vgJcJG','WPRdNmkJ','W50NkSoPW5ZcKxJcI8ocit3dVxO','W64vW5GVma','lSowACkSgrBdONVcTNy','WQtdV8kar3DvW6RcVtDDBG4','W44SWQ3dOmojWONcMCkSW73dSq','WOzoWPatW6voW5FcLai','W5C2WR3dVmkB','p3dcUIBdLdySAMlcPW','kCoVwCowW4DNzmkkixTgW4u0','W4z+Dc7cPG','W5mwW4JdONm','z8okemo6W6mTWPnDAWKwW6O','W71JW6mkW5axj2DgWORdMCk9WPu','WO4fW7fcW70','W6hcP8oKbtW','W6W/W5KJdIe5','a8oxyXhcMSofWO9taW'];a0_0x2a9b=function(){return _0x189a96;};return a0_0x2a9b();}import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x18d4c7 as AssetCache,a0_0x97ce50 as AssetLoader,a0_0x3a4460 as AssetSystem,a0_0x29f9c3 as AssetTextures,a0_0x206e0c as Assets,a0_0x34f55d as BaseSystem,a0_0x472bd9 as GameEngine,a0_0x34fe93 as GameObject,a0_0x5d8eed as GameObjectManager,a0_0x510062 as ObjectFactory,a0_0x451a57 as Renderer,a0_0x1ad1d0 as RuntimeObjectRegistry,a0_0x1cb168 as Transform,a0_0x3f1366 as applyScreenAnchor,a0_0xd1b17d as basePixi,a0_0x36d914 as clearResponsiveElements,a0_0x5a999a as createPixiBase,a0_0x205572 as getRegisteredFontIds,a0_0x4cb47f as globalResponsiveMultipliers,a0_0x514548 as initAssetTextures,a0_0x295bae as initAssets,a0_0x3660d9 as layout,a0_0x23703a as playLottieOverlay,a0_0x465c6a as registerFont,a0_0x5b05fe as registerType,a0_0x56d967 as resolveAnchorVec2,a0_0x22bcc2 as resolveFont,a0_0x2dc7c8 as resolveFontWeight,a0_0x5a5c77 as resolveScreenAnchorPoint,a0_0x2e6ae2 as resolveScreenRatioPoint,a0_0x16ffd8 as runInitSequence,a0_0x4a7873 as setLottieInstance,a0_0x3fb12d as spawnSceneFromConfig,a0_0x2e601f as updateScreenState};
|
|
1
|
+
(function(_0x4bbef9,_0x3fe141){var a0_0xf7fb69={_0xcf9407:0x25,_0x41c43e:'CcmQ',_0x38a584:0x21,_0x195ba0:0x17,_0x53c4e1:0x12,_0x120101:0x11,_0x7e4741:'OE7]',_0x3dafb1:0xd,_0xe97efa:0x1a,_0x3e36a6:0x5,_0x6d33c7:'Mq)j',_0x25d360:0xb,_0x18083e:'@I0&',_0x43abb3:0x23,_0x4d9c8f:0x1d,_0x1ed2fd:0x1e,_0x195f62:0x2c3,_0x24a1aa:'8u^r',_0x1ce4e1:0x27,_0x4356dc:'x3sc',_0x2505d0:0x11,_0x19eee3:0x23b,_0x25aa11:0x238,_0x5b2f94:0x22e,_0x1c806e:0x1c,_0x435883:'e1PB',_0x25243e:0x25,_0x5aa8d9:0x7,_0x18037b:0x2b0,_0x4778da:0x2ad,_0x4c1472:0x2b5,_0x86af11:0x2af,_0xd325:'iycS',_0x326a2c:0x2ba,_0x63b9e3:0x2b6,_0x34f27a:0x2ab,_0x1b45d5:'jPfo'},a0_0x519ee4={_0x144390:0xd2},_0x4125a5=_0x4bbef9();function _0x11317a(_0x35ec6b,_0xced4f3,_0x177f2e,_0x301104,_0x247be4){return a0_0x1e10(_0x177f2e- -a0_0x519ee4._0x144390,_0xced4f3);}function _0x50d48b(_0x5b53c1,_0x1495be,_0x14d3d2,_0x5bd62d,_0x41c578){return a0_0x1e10(_0x5b53c1- -0x321,_0x41c578);}function _0x4d1abe(_0x3f870c,_0x2f5cd6,_0x22af69,_0x4c7764,_0x12d144){return a0_0x1e10(_0x3f870c-0x1cf,_0x12d144);}while(!![]){try{var _0x515e8c=parseInt(_0x11317a(a0_0xf7fb69._0xcf9407,a0_0xf7fb69._0x41c43e,a0_0xf7fb69._0x38a584,a0_0xf7fb69._0x195ba0,a0_0xf7fb69._0x53c4e1))/(-0x16d4+0x403*0x1+0x12d2)*(parseInt(_0x11317a(a0_0xf7fb69._0x120101,a0_0xf7fb69._0x7e4741,a0_0xf7fb69._0x3dafb1,a0_0xf7fb69._0xe97efa,0x15))/(0x171*-0x13+0x1201+0x964))+parseInt(_0x11317a(-a0_0xf7fb69._0x3e36a6,a0_0xf7fb69._0x6d33c7,a0_0xf7fb69._0x25d360,-0x3,a0_0xf7fb69._0x25d360))/(0x1837*0x1+-0x16b6+-0xbf*0x2)+-parseInt(_0x11317a(0x16,a0_0xf7fb69._0x18083e,a0_0xf7fb69._0x43abb3,a0_0xf7fb69._0x4d9c8f,a0_0xf7fb69._0x1ed2fd))/(-0x99f+-0x2509+0x2eac)+-parseInt(_0x4d1abe(a0_0xf7fb69._0x195f62,0x2c8,0x2b8,0x2c6,a0_0xf7fb69._0x24a1aa))/(-0xf1b+-0x5*-0x2b2+-0x2*-0xd3)*(-parseInt(_0x11317a(a0_0xf7fb69._0x1ce4e1,a0_0xf7fb69._0x4356dc,a0_0xf7fb69._0x1ed2fd,a0_0xf7fb69._0x195ba0,a0_0xf7fb69._0x2505d0))/(-0x3b*0x5d+-0x1*-0x164f+0x6d*-0x2))+parseInt(_0x50d48b(-0x237,-a0_0xf7fb69._0x19eee3,-a0_0xf7fb69._0x25aa11,-a0_0xf7fb69._0x5b2f94,'TKW%'))/(0x220b+-0xd0d+0x14f7*-0x1)*(-parseInt(_0x11317a(a0_0xf7fb69._0x1c806e,a0_0xf7fb69._0x435883,0x17,a0_0xf7fb69._0x25243e,a0_0xf7fb69._0x5aa8d9))/(-0x1313*-0x2+-0x1556+-0x10c8))+-parseInt(_0x4d1abe(a0_0xf7fb69._0x18037b,a0_0xf7fb69._0x4778da,a0_0xf7fb69._0x4c1472,a0_0xf7fb69._0x86af11,a0_0xf7fb69._0x4356dc))/(0xa*-0xe9+-0x268c+-0x3ab*-0xd)+-parseInt(_0x4d1abe(a0_0xf7fb69._0x86af11,0x2ac,0x2b8,0x2bb,a0_0xf7fb69._0xd325))/(-0x103*0x21+-0x8b*-0x7+0x1da0)*(-parseInt(_0x4d1abe(a0_0xf7fb69._0x326a2c,a0_0xf7fb69._0x4778da,a0_0xf7fb69._0x63b9e3,a0_0xf7fb69._0x34f27a,a0_0xf7fb69._0x1b45d5))/(-0x235e+0x1c48*0x1+0x721));if(_0x515e8c===_0x3fe141)break;else _0x4125a5['push'](_0x4125a5['shift']());}catch(_0x4e3152){_0x4125a5['push'](_0x4125a5['shift']());}}}(a0_0xc510,-0x92211+-0x47*-0x1ad7+0x951ef));var a0_0x1891b0=(function(){var _0x2822f2=!![];return function(_0x3cc858,_0x3429ad){var _0x1de3f5=_0x2822f2?function(){if(_0x3429ad){var _0x4e900f=_0x3429ad['apply'](_0x3cc858,arguments);return _0x3429ad=null,_0x4e900f;}}:function(){};return _0x2822f2=![],_0x1de3f5;};}()),a0_0x3ba321=a0_0x1891b0(this,function(){var a0_0x281a42={_0x52af62:0x29,_0x3acdf6:0x26,_0x39bfbb:'V#%G',_0x2a7d6c:0x2b,_0x30e8f6:0x1b,_0x4af1a0:0x2a,_0xb43949:0x490,_0x2d8f35:0x493,_0x2ca8f0:'VbH4',_0x402aad:0x484,_0x3e92df:0x2c,_0x13ea02:0x24,_0x1539ed:0x1d,_0xa20fa7:'V#%G',_0x4e55cb:0x44,_0x2b02f7:0x37,_0x2c6ec5:0x41,_0x48c2c5:'e1PB',_0x186217:0x31,_0x5008cd:0x28,_0x1bfdd3:0x499,_0x19ca69:0x496,_0xc7c994:0x4a5,_0x15a5b2:0x49e,_0x218296:0x493,_0x441243:'4lyv',_0x580928:0x499,_0x2ace40:0x460,_0x41269e:0x46f,_0x16f145:0x471,_0x49f221:0x42,_0x21bd74:0x3b,_0x340404:0x48,_0xbee86d:0x40,_0x2b67a0:'yjPj'},a0_0xf5188f={_0xe6c2c7:0x377},a0_0x148be3={_0x3e30f9:0x3ab},a0_0x48a205={_0xc674fa:0x11e};function _0x35d12b(_0x18999d,_0x268676,_0x399b15,_0x2b5be7,_0x4452a4){return a0_0x1e10(_0x268676- -a0_0x48a205._0xc674fa,_0x4452a4);}function _0x57539f(_0x15dbd6,_0x2879a9,_0x4c010c,_0x24d033,_0x3a7cc5){return a0_0x1e10(_0x15dbd6-a0_0x148be3._0x3e30f9,_0x24d033);}var _0xa58c28={};_0xa58c28[_0x35d12b(-a0_0x281a42._0x52af62,-0x25,-a0_0x281a42._0x3acdf6,-a0_0x281a42._0x52af62,a0_0x281a42._0x39bfbb)]=_0x35d12b(-a0_0x281a42._0x2a7d6c,-0x27,-a0_0x281a42._0x30e8f6,-a0_0x281a42._0x4af1a0,'8u^r')+_0x57539f(a0_0x281a42._0xb43949,a0_0x281a42._0x2d8f35,0x49f,a0_0x281a42._0x2ca8f0,a0_0x281a42._0x402aad)+'+$';function _0x404503(_0x23a106,_0x1a9182,_0x5a4970,_0x21a6f6,_0x5b855f){return a0_0x1e10(_0x1a9182-a0_0xf5188f._0xe6c2c7,_0x5a4970);}var _0x9e19c=_0xa58c28;return a0_0x3ba321[_0x35d12b(-a0_0x281a42._0x3e92df,-a0_0x281a42._0x13ea02,-a0_0x281a42._0x1539ed,-a0_0x281a42._0x3acdf6,a0_0x281a42._0xa20fa7)+_0x35d12b(-a0_0x281a42._0x4e55cb,-a0_0x281a42._0x2b02f7,-a0_0x281a42._0x2c6ec5,-0x3e,a0_0x281a42._0x48c2c5)]()[_0x35d12b(-a0_0x281a42._0x2c6ec5,-a0_0x281a42._0x186217,-a0_0x281a42._0x5008cd,-0x36,'Vi[[')+'h'](_0x9e19c['NGExY'])['toStr'+_0x57539f(a0_0x281a42._0x1bfdd3,a0_0x281a42._0x19ca69,a0_0x281a42._0xc7c994,'YG*0',a0_0x281a42._0x15a5b2)]()[_0x57539f(a0_0x281a42._0x218296,a0_0x281a42._0x1bfdd3,0x499,a0_0x281a42._0x441243,a0_0x281a42._0x580928)+'ructo'+'r'](a0_0x3ba321)[_0x404503(a0_0x281a42._0x2ace40,a0_0x281a42._0x41269e,'cwPn',a0_0x281a42._0x16f145,0x46a)+'h'](_0x9e19c[_0x35d12b(-a0_0x281a42._0x49f221,-a0_0x281a42._0x21bd74,-a0_0x281a42._0x340404,-a0_0x281a42._0xbee86d,a0_0x281a42._0x2b67a0)]);});function a0_0x1e10(_0x2be0a5,_0x439647){_0x2be0a5=_0x2be0a5-(0x7*-0x1e2+0xe10+-0x5);var _0x106c84=a0_0xc510();var _0x23f184=_0x106c84[_0x2be0a5];if(a0_0x1e10['CRLMRM']===undefined){var _0x27c3ab=function(_0x4023a6){var _0x166bab='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x38e341='',_0x28665d='',_0x4f1b01=_0x38e341+_0x27c3ab;for(var _0x1f660c=0xe71*-0x1+-0x2*-0x8de+-0x34b*0x1,_0x15872c,_0x4aea87,_0x4e276d=-0x1*-0xcb9+-0x37f+-0x93a;_0x4aea87=_0x4023a6['charAt'](_0x4e276d++);~_0x4aea87&&(_0x15872c=_0x1f660c%(-0xdfb+-0x24b5+0x32b4)?_0x15872c*(0x1*0x1381+0x4d*-0x3a+-0x1cf)+_0x4aea87:_0x4aea87,_0x1f660c++%(-0x4ae*-0x1+0x5b5*-0x5+0x17df))?_0x38e341+=_0x4f1b01['charCodeAt'](_0x4e276d+(0xa2d+0xd*0x220+0x25c3*-0x1))-(0x8*-0x2df+0xf*0x287+-0xee7)!==-0x227*0x5+0x2d*0xb5+-0x6e*0x31?String['fromCharCode'](-0x2ad*0xd+-0x1578+0x3940&_0x15872c>>(-(-0x2221+-0x18f8*0x1+0x3b1b)*_0x1f660c&0x23*-0x27+-0x122f+0x106*0x17)):_0x1f660c:-0x993+-0x1898*0x1+0x222b){_0x4aea87=_0x166bab['indexOf'](_0x4aea87);}for(var _0x1b8b31=0x12*-0x209+-0xb3f*-0x1+-0x43*-0x61,_0x3908a5=_0x38e341['length'];_0x1b8b31<_0x3908a5;_0x1b8b31++){_0x28665d+='%'+('00'+_0x38e341['charCodeAt'](_0x1b8b31)['toString'](0x1*0x1e6d+0x1486+0x7*-0x745))['slice'](-(-0xef8*0x2+0x1a4c+0x2*0x1d3));}return decodeURIComponent(_0x28665d);};var _0x1d409e=function(_0x2c687f,_0x5cc921){var _0x48a953=[],_0x593cb5=-0x122*0x1d+0x9d*-0x14+0x2d1e,_0x1fc237,_0x158376='';_0x2c687f=_0x27c3ab(_0x2c687f);var _0x2895a9;for(_0x2895a9=0xfd7*-0x1+-0x1189+-0xb20*-0x3;_0x2895a9<-0x172*0x11+0x1*-0x1ecb+-0x133*-0x2f;_0x2895a9++){_0x48a953[_0x2895a9]=_0x2895a9;}for(_0x2895a9=0x12f8+0x1*-0x1d+-0x12db;_0x2895a9<0x17c7+0x1*0xfa+-0x17c1;_0x2895a9++){_0x593cb5=(_0x593cb5+_0x48a953[_0x2895a9]+_0x5cc921['charCodeAt'](_0x2895a9%_0x5cc921['length']))%(0x194c+-0x1e98+0x4*0x193),_0x1fc237=_0x48a953[_0x2895a9],_0x48a953[_0x2895a9]=_0x48a953[_0x593cb5],_0x48a953[_0x593cb5]=_0x1fc237;}_0x2895a9=-0x21ba+0xa8c+0xb97*0x2,_0x593cb5=-0x10a*0x22+0x106b*-0x1+0x33bf;for(var _0x38b189=0x3af+0xe3*-0x25+0x1d20;_0x38b189<_0x2c687f['length'];_0x38b189++){_0x2895a9=(_0x2895a9+(0x53*0x14+0x16f+0x1*-0x7ea))%(0x1*0x694+-0x2223+0x1c8f),_0x593cb5=(_0x593cb5+_0x48a953[_0x2895a9])%(-0x2*0x10f1+0x29*-0x73+-0x1*-0x354d),_0x1fc237=_0x48a953[_0x2895a9],_0x48a953[_0x2895a9]=_0x48a953[_0x593cb5],_0x48a953[_0x593cb5]=_0x1fc237,_0x158376+=String['fromCharCode'](_0x2c687f['charCodeAt'](_0x38b189)^_0x48a953[(_0x48a953[_0x2895a9]+_0x48a953[_0x593cb5])%(-0x2346+0x5*0x481+0xdc1)]);}return _0x158376;};a0_0x1e10['fWsNCO']=_0x1d409e,a0_0x1e10['YbYpWe']={},a0_0x1e10['CRLMRM']=!![];}var _0xe57e4d=_0x106c84[-0xa7*0x2+0x195b*0x1+-0x180d],_0x2ba3ff=_0x2be0a5+_0xe57e4d,_0x1194d0=a0_0x1e10['YbYpWe'][_0x2ba3ff];if(!_0x1194d0){if(a0_0x1e10['dbLmTZ']===undefined){var _0x567e79=function(_0x5e3f89){this['NtozJk']=_0x5e3f89,this['wJcFFu']=[-0x1282+0x17f4+-0x571,0xd*0x2+0x2081*-0x1+0x2067,-0x265d+-0xe*-0xd9+0x1a7f],this['bQgurM']=function(){return'newState';},this['cYsYwV']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['wyelNu']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x567e79['prototype']['DGRoVu']=function(){var _0x15a640=new RegExp(this['cYsYwV']+this['wyelNu']),_0x3776eb=_0x15a640['test'](this['bQgurM']['toString']())?--this['wJcFFu'][0x1453+-0x362*-0x5+0x94f*-0x4]:--this['wJcFFu'][0x24dc+0x1ae6+-0x1*0x3fc2];return this['fkkQdx'](_0x3776eb);},_0x567e79['prototype']['fkkQdx']=function(_0x68f876){if(!Boolean(~_0x68f876))return _0x68f876;return this['FhCLsS'](this['NtozJk']);},_0x567e79['prototype']['FhCLsS']=function(_0x19d1a2){for(var _0x22aa6a=0x262a+0x220f+0x4839*-0x1,_0x24945a=this['wJcFFu']['length'];_0x22aa6a<_0x24945a;_0x22aa6a++){this['wJcFFu']['push'](Math['round'](Math['random']())),_0x24945a=this['wJcFFu']['length'];}return _0x19d1a2(this['wJcFFu'][0x1cb3+-0xd3*0x1f+0x3e*-0xd]);},new _0x567e79(a0_0x1e10)['DGRoVu'](),a0_0x1e10['dbLmTZ']=!![];}_0x23f184=a0_0x1e10['fWsNCO'](_0x23f184,_0x439647),a0_0x1e10['YbYpWe'][_0x2ba3ff]=_0x23f184;}else _0x23f184=_0x1194d0;return _0x23f184;}a0_0x3ba321();import{A as a0_0x5b8d4c,B as a0_0x79b9f4,C as a0_0x413f79,D as a0_0x4120a4,b as a0_0x797e0c,c as a0_0x20b80f,d as a0_0x53572b,e as a0_0x12debc,f as a0_0x3be4cf,g as a0_0x4a9ef6,h as a0_0x251ac7,i as a0_0x1c5b02,j as a0_0x1a48c8,k as a0_0x3887e3,l as a0_0x598c69,m as a0_0x14508e,n as a0_0x3035cb,o as a0_0x5894de,p as a0_0x11b3ac,q as a0_0xa1acd0,r as a0_0x5752bd,s as a0_0xc40ef8,t as a0_0x3bf2e1,u as a0_0x3d8fe8,v as a0_0x4751c2,w as a0_0x172f7b,x as a0_0x46d750,y as a0_0x2f8d53,z as a0_0x22ee04}from'../chunk-DSIGEZDQ.js';import{a as a0_0x46bfc4,b as a0_0x3fefa4,c as a0_0x26e079,d as a0_0x4cb555,e as a0_0x30e0c9}from'../chunk-I5OOVR5U.js';import'../chunk-PW2FGMCO.js';import'../chunk-HVKF2KYL.js';import'../chunk-E6WJCS24.js';function a0_0xc510(){var _0x440e22=['W5dcSCkspSoGWODX','lN4VW4VdNaDMtmomcSoVksm','WPddLHZcPmkKWRFdLmo5WQLyftCg','m1JdS8oiW4z8w1i','ANxdT8k0tW','W6FcSmkFW7CPj8khWQCGAcSaW7y','lIWSW4L2','W5jUWQddS8kyaCkLla','yMrr','cSokvgBdNW','oJXFbmk2W4VcQCkB','CLVdSxq+uJJcLqZcV2pdMmoJ','W4RdQmkCWQVcQhSfW7C','W7yAWPzMW6j5W7FdLvZdImoBWRaA','DuddVSoNW5y','WPldGr8','WP7cOLBdL2jJrmoQW73dHSkEWQ8','WPddKrRdPmoSW5tcQSogWPG','WQlcGYpcIGvzmmkyW4ldM2ar','kJ3cH8oLW6WRW4RcT1S3xf5s','ublcHmk5W4LcWOyeWRLKW5pdUa','WRrwzwZcOCkIWRBcNsSGeq','WOBdKmkDW77dTgpcI30ycCk4phe','WQdcJ15wcXfn','WQ9mFhFcUG','WRKNWR4vW4i','WQ4BWOldNSkq','WPqZWPtdKSk7','WO7dNZJdU8ktrh3dT8odW5nD','j8k8WRVcNSk+W6v8WOSBW5BdTmo+','W4RcT8kUqSkTWPddVwxcKq'];a0_0xc510=function(){return _0x440e22;};return a0_0xc510();}import'../chunk-JXBG6UFL.js';export{a0_0x46bfc4 as AssetCache,a0_0x26e079 as AssetLoader,a0_0x3d8fe8 as AssetSystem,a0_0x4cb555 as AssetTextures,a0_0xc40ef8 as Assets,a0_0x5894de as BaseSystem,a0_0x3035cb as GameEngine,a0_0x12debc as GameObject,a0_0x3be4cf as GameObjectManager,a0_0x14508e as ObjectFactory,a0_0x53572b as Renderer,a0_0x11b3ac as RuntimeObjectRegistry,a0_0x20b80f as Transform,a0_0x79b9f4 as applyScreenAnchor,a0_0xa1acd0 as basePixi,a0_0x172f7b as clearResponsiveElements,a0_0x797e0c as createPixiBase,a0_0x1a48c8 as getRegisteredFontIds,a0_0x4751c2 as globalResponsiveMultipliers,a0_0x30e0c9 as initAssetTextures,a0_0x3bf2e1 as initAssets,a0_0x413f79 as layout,a0_0x598c69 as playLottieOverlay,a0_0x1c5b02 as registerFont,a0_0x3fefa4 as registerType,a0_0x2f8d53 as resolveAnchorVec2,a0_0x4a9ef6 as resolveFont,a0_0x251ac7 as resolveFontWeight,a0_0x22ee04 as resolveScreenAnchorPoint,a0_0x5b8d4c as resolveScreenRatioPoint,a0_0x4120a4 as runInitSequence,a0_0x3887e3 as setLottieInstance,a0_0x5752bd as spawnSceneFromConfig,a0_0x46d750 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 Jo={};ra(Jo,{AspectClass:()=>On,GameObject:()=>ot,GameObjectManager:()=>$t,Renderer:()=>rt,ResponsiveUISystem:()=>Ge,Transform:()=>st,animateHandClick:()=>xs,animatePanelEntrance:()=>ws,createBrushTexture:()=>_s,createEndGamePanel:()=>vs,createHandTutorial:()=>Es,createThreeBase:()=>ms,createTutorialLabel:()=>Ss,getAspectClass:()=>zt,getRegisteredFontIds:()=>ys,loadAsset:()=>$n,loadCharacterFrames:()=>Ls,registerFont:()=>bs,resolveFont:()=>Z,resolveFontWeight:()=>Q,updateHandAnimation:()=>Cs});module.exports=xr(Jo);var W=ae(require("three"),1);var he={};function mt(t,e,n=!1){he[t]||(he[t]=[]),he[t].push({fn:e,once:n})}function Xt(t,e){if(he[t]){if(!e){delete he[t];return}he[t]=he[t].filter(n=>n.fn!==e)}}function bt(t,...e){let n=he[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Xt(t,i.fn)}function B(t,e){mt(t,e,!0)}var M=null,V=[],Pe=null;function da(t){M=t,V=[],Pe!==null&&(clearTimeout(Pe),Pe=null)}function pa(){var t,e,n;return{endpoint:(M==null?void 0:M.endpoint)||"",transport:(M==null?void 0:M.transport)||"beacon",batchSize:(t=M==null?void 0:M.batchSize)!=null?t:10,flushIntervalMs:(e=M==null?void 0:M.flushIntervalMs)!=null?e:300,maxQueue:(n=M==null?void 0:M.maxQueue)!=null?n:200,debug:!!(M!=null&&M.debug)}}async function la(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 Jt(t,e){let n=pa();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ca();return}Pe===null&&(Pe=window.setTimeout(()=>{Pe=null,ca()},n.flushIntervalMs))}}async function ca(){let t=pa();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await la(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await la(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function ua(t){return Math.max(0,Math.min(1,t))}function Er(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 We(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Sr(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function ga(t,e,n){try{t[e]=n}catch{}}function Cr(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 ha(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 fa(t,e){let n=Cr(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 ma(){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=We();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=ua(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 E=h-y;w=ua(E)}let f=u.ease(w);u.yoyo&&y%2===1&&(f=1-f);for(let E of u.props)ga(u.target,E.key,E.from+(E.to-E.from)*f);u.scaleFrom&&u.scaleTo&&ha(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*f,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*f});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 E;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+((E=g==null?void 0:g.delayMsOverride)!=null?E:0)),h=Er(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"]),f=[];for(let S of Object.keys(c)){if(y.has(S))continue;let C=c[S];typeof C=="number"&&f.push({key:S,from:Sr(p,S),to:C})}let m=fa(p,c);return{target:p,startMs:We(),delayMs:b,durationMs:u,ease:h,props:f,scaleFrom:m.from,scaleTo:m.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=We())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:We(),b=We()-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"&&ga(p,u,b)}let g=fa(p,c);g.to&&ha(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 f=typeof y=="string"?y.trim():"";return f.startsWith("+=")?g+Math.max(0,Number(f.slice(2))*1e3||0):f?Math.max(0,Number(f)*1e3||0):g},w=y=>{c.push(y);let f=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);g=Math.max(g,y.atMs+f)},v={to(y,f,m){return w({kind:"to",target:y,vars:f,atMs:h(m)}),v},fromTo(y,f,m,E){return w({kind:"fromTo",target:y,vars:m,from:f,atMs:h(E)}),v},play(){var y,f;if(u)return v;u=!0,b=[];for(let m of c)m.kind==="fromTo"&&d.set(m.target,(y=m.from)!=null?y:{}),b.push(d.to(m.target,{...m.vars,delay:m.atMs/1e3+((f=m.vars.delay)!=null?f: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 ba(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=ma()}catch{}}var ya={name:"handler-playable-sdk",version:"0.5.45",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 && 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 && 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,Tr=G++,va=G++,wa=G++,xa=G++,Ea=G++,Sa=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,_a=G++,ka=G++,T=Tr;function Ma(){return T===va}function Pa(){return T===wa}function Ia(){return T===xa}function ja(){return T===Ea}function Ie(){return T===Sa}function je(){return T===Ca}function Oa(){return T===Aa}function Ra(){return T===Ta}function za(){return T===La}function Zt(){return T===_a}function Qt(){return T===ka}function $a(){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=va;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=wa;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=xa)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Ea)}catch{}else if(e==="mintegral")window.gameReady&&(T=Sa);else if(e==="tapjoy")window.TJ_API&&(T=Ca);else if(e==="tiktok")window.openAppStore&&(T=Aa);else if(e==="smadex")try{window.smxTracking&&(T=Ta)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=La)}catch{}else e==="vungle"?T=_a:(t==="nucleo"||e==="nucleo")&&(T=ka)}var yt=ae(require("lottie-web"),1),Da=yt.default;typeof window!="undefined"&&(window.lottie=yt.default,window.__baseLottie=yt.default);var Lr=require("pixi.js");var en=require("pixi.js");var _r=null;function tn(t){_r=t}vt();nn();var Ye=require("pixi.js");vt();var Or=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",on=Or;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&&(on=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${on}`))}}catch{}function Rr(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 Ce=class{static async create(e,n,i){var l,d,p,c,g,u,b;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${on}`);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 Ye.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 Se.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 Ye.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 Ye.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=Rr(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 Ke=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 Dr=ae(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Dr);Xe();var xt=require("pixi.js");Xe();var cn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Ke}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 Ce.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 Ce.create(e,n,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},Nr=new cn,Fr=new Proxy(Nr,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Xe();var Ba=require("pixi.js"),le={width:400,height:600,designWidth:400,scaleFactor:1},St={scale:1,position:1},pn=[];function Ur(t,e,n,i,a,s,r){pn.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function qr(){pn.forEach(({element:t,originalScale:e,positionHelper:n,heightPercent:i})=>{let a=e*le.scaleFactor;n(t,le.width,le.height,i,a,!0,!1)})}function dn(t,e){console.log(`[SCREEN] updateScreenState called: ${t}x${e}`),le.width=t,le.height=e,le.scaleFactor=Math.min(t/le.designWidth,1.15),St.scale=le.scaleFactor,St.position=1,console.log(`[SCREEN] Global multipliers - scale: ${St.scale.toFixed(3)}`),qr()}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 Vr(t,e,n){let i=Ze[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Wr(){return Ze}var Yr={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 Et(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function Ct(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:Et(t[0],e.x),y:Et(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:Et(i.x,e.x),y:Et(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Yr[i])!=null?n:e}return e}function Ga(t,e,n,i={}){var u,b,h,w,v,y;let a=Ct(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 Ua(t,e,n,i={}){var h,w,v,y,f,m;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=((f=a.top)!=null?f:0)+s.y,d=((m=a.bottom)!=null?m:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=Ct(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,dn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),dn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Vr,window.getDebugConfig=Wr,window.copyConfig=so,window.applyConfig=Je,window.applyConfigForRatio=ro,window.positionAtBottom=qa,window.positionAtTop=Jr,window.positionAtCenter=Zr,window.positionAtLeft=Qr,window.positionAtRight=eo,window.positionAtBottomLeft=to,window.positionAtBottomRight=no,window.positionAtTopLeft=io,window.positionAtTopRight=ao,window.applyPositionContract=Xr,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 At(t,e,n=0){return t*e+n}function Tt(t,e,n=0){return t*(1-e)+n}function Lt(t,e,n=0){return t*e+n}function _t(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Kr(t,e){return t*e}function Xr(t,e,n,i){var r,o,l,d,p,c,g,u,b,h,w,v,y,f,m,E,S,C,k,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=At(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=Tt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=Lt(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=_t(e,i.percent,(f=(y=i.offset)==null?void 0:y.x)!=null?f:0),s=U(n,(E=(m=i.offset)==null?void 0:m.y)!=null?E:0);break;case"center":a=U(e,(C=(S=i.offset)==null?void 0:S.x)!=null?C:0),s=U(n,(I=(k=i.offset)==null?void 0:k.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 qa(t,e,n,i=.2,a=1,s=!0,r=!1){let o=Kr(n,i),l=Tt(n,i/2);ce(t,U(e),l);let d=s?a*le.scaleFactor:a;de(t,d),r&&!pn.find(p=>p.element===t)&&Ur(t,qa,e,n,i,a,s)}function Jr(t,e,n,i=.1,a=1){ce(t,U(e),At(n,i)),de(t,a)}function Zr(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function Qr(t,e,n,i=.1,a=1){ce(t,Lt(e,i),U(n)),de(t,a)}function eo(t,e,n,i=.1,a=1){ce(t,_t(e,i),U(n)),de(t,a)}function to(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),Tt(n,i)),de(t,s)}function no(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),Tt(n,i)),de(t,s)}function io(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),At(n,i)),de(t,s)}function ao(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),At(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 so(t){return t&&Ae[t]?JSON.parse(JSON.stringify(Ae[t])):JSON.parse(JSON.stringify(Ze))}function Je(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 ro(t,e){let n=t/e;n>1.6?(Je(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Je(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Je(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Je(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||Ct,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||Ga,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||Ua}hn();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 Gc=[{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)}],Uc=[{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)}],qc=[{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 Vc=[...Ka];var fo=Ka[0];pe();var wo=ae(require("jszip"),1);function bo(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 yo(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 vo(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 fn(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 bo(a),r=await vo(s),o=yo(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 kt(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 Ja=require("@google/genai");async function mn(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 Ja.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 Za=require("@google/genai");async function Mt(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Za.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");Xe();pe();var es=require("pixi.js");var Eo=require("pixi.js");pe();function Mo(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 Po(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 Io(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 Jo={};ra(Jo,{AspectClass:()=>On,GameObject:()=>ot,GameObjectManager:()=>$t,Renderer:()=>rt,ResponsiveUISystem:()=>Ge,Transform:()=>st,animateHandClick:()=>xs,animatePanelEntrance:()=>ws,createBrushTexture:()=>_s,createEndGamePanel:()=>vs,createHandTutorial:()=>Es,createThreeBase:()=>ms,createTutorialLabel:()=>Ss,getAspectClass:()=>zt,getRegisteredFontIds:()=>ys,loadAsset:()=>$n,loadCharacterFrames:()=>Ls,registerFont:()=>bs,resolveFont:()=>Z,resolveFontWeight:()=>Q,updateHandAnimation:()=>Cs});module.exports=xr(Jo);var W=ae(require("three"),1);var he={};function mt(t,e,n=!1){he[t]||(he[t]=[]),he[t].push({fn:e,once:n})}function Xt(t,e){if(he[t]){if(!e){delete he[t];return}he[t]=he[t].filter(n=>n.fn!==e)}}function bt(t,...e){let n=he[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Xt(t,i.fn)}function B(t,e){mt(t,e,!0)}var M=null,V=[],Pe=null;function da(t){M=t,V=[],Pe!==null&&(clearTimeout(Pe),Pe=null)}function pa(){var t,e,n;return{endpoint:(M==null?void 0:M.endpoint)||"",transport:(M==null?void 0:M.transport)||"beacon",batchSize:(t=M==null?void 0:M.batchSize)!=null?t:10,flushIntervalMs:(e=M==null?void 0:M.flushIntervalMs)!=null?e:300,maxQueue:(n=M==null?void 0:M.maxQueue)!=null?n:200,debug:!!(M!=null&&M.debug)}}async function la(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 Jt(t,e){let n=pa();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ca();return}Pe===null&&(Pe=window.setTimeout(()=>{Pe=null,ca()},n.flushIntervalMs))}}async function ca(){let t=pa();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await la(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await la(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function ua(t){return Math.max(0,Math.min(1,t))}function Er(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 We(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Sr(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function ga(t,e,n){try{t[e]=n}catch{}}function Cr(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 ha(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 fa(t,e){let n=Cr(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 ma(){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=We();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=ua(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 E=h-y;w=ua(E)}let f=u.ease(w);u.yoyo&&y%2===1&&(f=1-f);for(let E of u.props)ga(u.target,E.key,E.from+(E.to-E.from)*f);u.scaleFrom&&u.scaleTo&&ha(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*f,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*f});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 E;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+((E=g==null?void 0:g.delayMsOverride)!=null?E:0)),h=Er(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"]),f=[];for(let S of Object.keys(c)){if(y.has(S))continue;let C=c[S];typeof C=="number"&&f.push({key:S,from:Sr(p,S),to:C})}let m=fa(p,c);return{target:p,startMs:We(),delayMs:b,durationMs:u,ease:h,props:f,scaleFrom:m.from,scaleTo:m.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=We())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:We(),b=We()-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"&&ga(p,u,b)}let g=fa(p,c);g.to&&ha(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 f=typeof y=="string"?y.trim():"";return f.startsWith("+=")?g+Math.max(0,Number(f.slice(2))*1e3||0):f?Math.max(0,Number(f)*1e3||0):g},w=y=>{c.push(y);let f=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);g=Math.max(g,y.atMs+f)},v={to(y,f,m){return w({kind:"to",target:y,vars:f,atMs:h(m)}),v},fromTo(y,f,m,E){return w({kind:"fromTo",target:y,vars:m,from:f,atMs:h(E)}),v},play(){var y,f;if(u)return v;u=!0,b=[];for(let m of c)m.kind==="fromTo"&&d.set(m.target,(y=m.from)!=null?y:{}),b.push(d.to(m.target,{...m.vars,delay:m.atMs/1e3+((f=m.vars.delay)!=null?f: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 ba(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=ma()}catch{}}var ya={name:"handler-playable-sdk",version:"0.5.49",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 && 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 && 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,Tr=G++,va=G++,wa=G++,xa=G++,Ea=G++,Sa=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,_a=G++,ka=G++,T=Tr;function Ma(){return T===va}function Pa(){return T===wa}function Ia(){return T===xa}function ja(){return T===Ea}function Ie(){return T===Sa}function je(){return T===Ca}function Oa(){return T===Aa}function Ra(){return T===Ta}function za(){return T===La}function Zt(){return T===_a}function Qt(){return T===ka}function $a(){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=va;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=wa;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=xa)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Ea)}catch{}else if(e==="mintegral")window.gameReady&&(T=Sa);else if(e==="tapjoy")window.TJ_API&&(T=Ca);else if(e==="tiktok")window.openAppStore&&(T=Aa);else if(e==="smadex")try{window.smxTracking&&(T=Ta)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=La)}catch{}else e==="vungle"?T=_a:(t==="nucleo"||e==="nucleo")&&(T=ka)}var yt=ae(require("lottie-web"),1),Da=yt.default;typeof window!="undefined"&&(window.lottie=yt.default,window.__baseLottie=yt.default);var Lr=require("pixi.js");var en=require("pixi.js");var _r=null;function tn(t){_r=t}vt();nn();var Ye=require("pixi.js");vt();var Or=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",on=Or;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&&(on=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${on}`))}}catch{}function Rr(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 Ce=class{static async create(e,n,i){var l,d,p,c,g,u,b;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${on}`);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 Ye.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 Se.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 Ye.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 Ye.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=Rr(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 Ke=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 Dr=ae(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Dr);Xe();var xt=require("pixi.js");Xe();var cn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Ke}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 Ce.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 Ce.create(e,n,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},Nr=new cn,Fr=new Proxy(Nr,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Xe();var Ba=require("pixi.js"),le={width:400,height:600,designWidth:400,scaleFactor:1},St={scale:1,position:1},pn=[];function Ur(t,e,n,i,a,s,r){pn.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function qr(){pn.forEach(({element:t,originalScale:e,positionHelper:n,heightPercent:i})=>{let a=e*le.scaleFactor;n(t,le.width,le.height,i,a,!0,!1)})}function dn(t,e){console.log(`[SCREEN] updateScreenState called: ${t}x${e}`),le.width=t,le.height=e,le.scaleFactor=Math.min(t/le.designWidth,1.15),St.scale=le.scaleFactor,St.position=1,console.log(`[SCREEN] Global multipliers - scale: ${St.scale.toFixed(3)}`),qr()}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 Vr(t,e,n){let i=Ze[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Wr(){return Ze}var Yr={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 Et(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function Ct(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:Et(t[0],e.x),y:Et(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:Et(i.x,e.x),y:Et(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Yr[i])!=null?n:e}return e}function Ga(t,e,n,i={}){var u,b,h,w,v,y;let a=Ct(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 Ua(t,e,n,i={}){var h,w,v,y,f,m;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=((f=a.top)!=null?f:0)+s.y,d=((m=a.bottom)!=null?m:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=Ct(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,dn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),dn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Vr,window.getDebugConfig=Wr,window.copyConfig=so,window.applyConfig=Je,window.applyConfigForRatio=ro,window.positionAtBottom=qa,window.positionAtTop=Jr,window.positionAtCenter=Zr,window.positionAtLeft=Qr,window.positionAtRight=eo,window.positionAtBottomLeft=to,window.positionAtBottomRight=no,window.positionAtTopLeft=io,window.positionAtTopRight=ao,window.applyPositionContract=Xr,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 At(t,e,n=0){return t*e+n}function Tt(t,e,n=0){return t*(1-e)+n}function Lt(t,e,n=0){return t*e+n}function _t(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Kr(t,e){return t*e}function Xr(t,e,n,i){var r,o,l,d,p,c,g,u,b,h,w,v,y,f,m,E,S,C,k,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=At(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=Tt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=Lt(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=_t(e,i.percent,(f=(y=i.offset)==null?void 0:y.x)!=null?f:0),s=U(n,(E=(m=i.offset)==null?void 0:m.y)!=null?E:0);break;case"center":a=U(e,(C=(S=i.offset)==null?void 0:S.x)!=null?C:0),s=U(n,(I=(k=i.offset)==null?void 0:k.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 qa(t,e,n,i=.2,a=1,s=!0,r=!1){let o=Kr(n,i),l=Tt(n,i/2);ce(t,U(e),l);let d=s?a*le.scaleFactor:a;de(t,d),r&&!pn.find(p=>p.element===t)&&Ur(t,qa,e,n,i,a,s)}function Jr(t,e,n,i=.1,a=1){ce(t,U(e),At(n,i)),de(t,a)}function Zr(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function Qr(t,e,n,i=.1,a=1){ce(t,Lt(e,i),U(n)),de(t,a)}function eo(t,e,n,i=.1,a=1){ce(t,_t(e,i),U(n)),de(t,a)}function to(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),Tt(n,i)),de(t,s)}function no(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),Tt(n,i)),de(t,s)}function io(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),At(n,i)),de(t,s)}function ao(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),At(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 so(t){return t&&Ae[t]?JSON.parse(JSON.stringify(Ae[t])):JSON.parse(JSON.stringify(Ze))}function Je(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 ro(t,e){let n=t/e;n>1.6?(Je(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Je(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Je(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Je(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||Ct,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||Ga,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||Ua}hn();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 Gc=[{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)}],Uc=[{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)}],qc=[{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 Vc=[...Ka];var fo=Ka[0];pe();var wo=ae(require("jszip"),1);function bo(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 yo(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 vo(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 fn(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 bo(a),r=await vo(s),o=yo(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 kt(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 Ja=require("@google/genai");async function mn(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 Ja.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 Za=require("@google/genai");async function Mt(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Za.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");Xe();pe();var es=require("pixi.js");var Eo=require("pixi.js");pe();function Mo(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 Po(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 Io(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
|
@@ -1076,18 +1076,29 @@
|
|
|
1076
1076
|
transition: all var(--ui-duration-fast) var(--ui-ease);
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
+
.scene-object-item-wrapper {
|
|
1080
|
+
display: flex;
|
|
1081
|
+
align-items: center;
|
|
1082
|
+
gap: 6px;
|
|
1083
|
+
width: 100%;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1079
1086
|
.scene-object-checkbox {
|
|
1080
1087
|
width: 14px;
|
|
1081
1088
|
height: 14px;
|
|
1082
1089
|
min-width: 14px;
|
|
1083
1090
|
min-height: 14px;
|
|
1084
1091
|
margin: 0;
|
|
1085
|
-
margin-right: 6px;
|
|
1086
1092
|
cursor: pointer;
|
|
1087
1093
|
accent-color: var(--ui-terracotta);
|
|
1088
1094
|
flex-shrink: 0;
|
|
1089
1095
|
}
|
|
1090
1096
|
|
|
1097
|
+
.scene-object-item-wrapper .scene-object-item {
|
|
1098
|
+
flex: 1;
|
|
1099
|
+
margin: 0;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1091
1102
|
.scene-object-label {
|
|
1092
1103
|
white-space: nowrap;
|
|
1093
1104
|
overflow: hidden;
|
|
@@ -1178,6 +1189,13 @@
|
|
|
1178
1189
|
box-shadow: 0 0 0 1px var(--ui-accent-overlay-3);
|
|
1179
1190
|
}
|
|
1180
1191
|
|
|
1192
|
+
.scene-object-item.active {
|
|
1193
|
+
border-color: var(--ui-terracotta);
|
|
1194
|
+
background: var(--ui-accent-overlay-2);
|
|
1195
|
+
box-shadow: 0 0 0 2px var(--ui-terracotta);
|
|
1196
|
+
font-weight: var(--font-weight-semibold);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1181
1199
|
/* Debug Toggle Button in Toolbar */
|
|
1182
1200
|
.debug-toggle {
|
|
1183
1201
|
position: relative;
|