/*
 howler.js v2.2.4 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com  Spatial Plugin  @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var $lime_init=function(Nb,aa){var jb=function(Ua,Qa){(function(Sa,wa){function I(a,b){a=Object.create(a);for(var c in b)a[c]=b[c];b.toString!==Object.prototype.toString&&(a.toString=b.toString);return a}function La(a){return a instanceof Array?new wg(a):a.iterator()}function m(a,b){if(b==null)return null;b.__id__==null&&(b.__id__=wa.$haxeUID++);var c;a.hx__closures__==null?a.hx__closures__={}:c=a.hx__closures__[b.__id__];c==null&&(c=b.bind(a),a.hx__closures__[b.__id__]=c);return c}Sa.lime=Sa.lime||
{};var t={},E=function(){return w.__string_rec(this,"")},R=R||{},B,sa=function(){};t["lime.app.IModule"]=sa;sa.__name__="lime.app.IModule";sa.__isInterface__=!0;sa.prototype={__registerLimeModule:null,__unregisterLimeModule:null,__class__:sa};var ua=function(){this.onExit=new km};t["lime.app.Module"]=ua;ua.__name__="lime.app.Module";ua.__interfaces__=[sa];ua.prototype={onExit:null,__registerLimeModule:function(a){},__unregisterLimeModule:function(a){},__class__:ua};var Ba=function(a){this.gameDeviceCache=
new Od;this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=0;this.framePeriod=-1;ld.init();this.accelerometer=aj.registerSensor(Hz.ACCELEROMETER,0)};t["lime._internal.backend.html5.HTML5Application"]=Ba;Ba.__name__="lime._internal.backend.html5.HTML5Application";Ba.prototype={accelerometer:null,currentUpdate:null,deltaTime:null,framePeriod:null,gameDeviceCache:null,hidden:null,lastUpdate:null,nextUpdate:null,parent:null,convertKeyCode:function(a){if(a>=65&&a<=90)return a+32;switch(a){case 12:return 1073741980;
case 16:return 1073742049;case 17:return 1073742048;case 18:return 1073742050;case 19:return 1073741896;case 20:return 1073741881;case 33:return 1073741899;case 34:return 1073741902;case 35:return 1073741901;case 36:return 1073741898;case 37:return 1073741904;case 38:return 1073741906;case 39:return 1073741903;case 40:return 1073741905;case 41:return 1073741943;case 43:return 1073741940;case 44:return 1073741894;case 45:return 1073741897;case 46:return 127;case 91:return 1073742051;case 92:return 1073742055;
case 93:return 1073742055;case 95:return 1073742106;case 96:return 1073741922;case 97:return 1073741913;case 98:return 1073741914;case 99:return 1073741915;case 100:return 1073741916;case 101:return 1073741917;case 102:return 1073741918;case 103:return 1073741919;case 104:return 1073741920;case 105:return 1073741921;case 106:return 1073741909;case 107:return 1073741911;case 108:return 1073741923;case 109:return 1073741910;case 110:return 1073741923;case 111:return 1073741908;case 112:return 1073741882;
case 113:return 1073741883;case 114:return 1073741884;case 115:return 1073741885;case 116:return 1073741886;case 117:return 1073741887;case 118:return 1073741888;case 119:return 1073741889;case 120:return 1073741890;case 121:return 1073741891;case 122:return 1073741892;case 123:return 1073741893;case 124:return 1073741928;case 125:return 1073741929;case 126:return 1073741930;case 127:return 1073741931;case 128:return 1073741932;case 129:return 1073741933;case 130:return 1073741934;case 131:return 1073741935;
case 132:return 1073741936;case 133:return 1073741937;case 134:return 1073741938;case 135:return 1073741939;case 144:return 1073741907;case 145:return 1073741895;case 160:return 94;case 161:return 33;case 163:return 35;case 164:return 36;case 166:return 1073742094;case 167:return 1073742095;case 168:return 1073742097;case 169:return 41;case 170:return 42;case 171:return 96;case 172:return 1073741898;case 173:return 45;case 174:return 1073741953;case 175:return 1073741952;case 176:return 1073742082;
case 177:return 1073742083;case 178:return 1073742084;case 179:return 1073742085;case 180:return 1073742089;case 181:return 1073742086;case 182:return 1073741953;case 183:return 1073741952;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 193:return 63;case 194:return 1073741923;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39;case 223:return 96;case 224:return 1073742051;case 226:return 92}return a},
exec:function(){window.addEventListener("keydown",m(this,this.handleKeyEvent),!1);window.addEventListener("keyup",m(this,this.handleKeyEvent),!1);window.addEventListener("focus",m(this,this.handleWindowEvent),!1);window.addEventListener("blur",m(this,this.handleWindowEvent),!1);window.addEventListener("resize",m(this,this.handleWindowEvent),!1);window.addEventListener("beforeunload",m(this,this.handleWindowEvent),!1);Object.prototype.hasOwnProperty.call(window,"Accelerometer")&&window.addEventListener("devicemotion",
m(this,this.handleSensorEvent),!1);CanvasRenderingContext2D.prototype.isPointInStroke||(CanvasRenderingContext2D.prototype.isPointInStroke=function(f,g,h){return!1});CanvasRenderingContext2D.prototype.isPointInPath||(CanvasRenderingContext2D.prototype.isPointInPath=function(f,g,h){return!1});"performance"in window==0&&(window.performance={});if("now"in window.performance==0){var a=Date.now();performance.timing&&performance.timing.navigationStart&&(a=performance.timing.navigationStart);window.performance.now=
function(){return Date.now()-a}}for(var b=0,c=["ms","moz","webkit","o"],d=0;d<c.length&&!window.requestAnimationFrame;++d)window.requestAnimationFrame=window[c[d]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[c[d]+"CancelAnimationFrame"]||window[c[d]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(f,g){var h=window.performance.now(),n=Math.max(0,16-(h-b));g=window.setTimeout(function(){f(h+n)},n);b=h+n;return g});window.cancelAnimationFrame||
(window.cancelAnimationFrame=function(f){clearTimeout(f)});window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=window.performance.now();this.handleApplicationEvent();return 0},exit:function(){},getDeviceOrientation:function(){if(window.screen.orientation!=null)switch(window.screen.orientation.type){case "landscape-primary":return 1;case "landscape-secondary":return 2;case "portrait-primary":return 3;case "portrait-secondary":return 4}return 0},handleApplicationEvent:function(a){a=
0;for(var b=this.parent.__windows;a<b.length;){var c=b[a];++a;c.__backend.updateSize()}this.updateGameDevices();this.currentUpdate=window.performance.now();if(this.currentUpdate>=this.nextUpdate){this.deltaTime=this.currentUpdate-this.lastUpdate;a=0;for(b=this.parent.__windows;a<b.length;)c=b[a],++a,this.parent.onUpdate.dispatch(this.deltaTime|0),c.context!=null&&c.onRender.dispatch(c.context);this.nextUpdate=this.framePeriod<0?this.currentUpdate:this.currentUpdate-this.currentUpdate%this.framePeriod+
this.framePeriod;this.lastUpdate=this.currentUpdate}window.requestAnimationFrame(m(this,this.handleApplicationEvent))},handleKeyEvent:function(a){if(this.parent.__window!=null){var b=this.convertKeyCode(a.keyCode!=null?a.keyCode:a.which),c=(a.shiftKey?3:0)|(a.ctrlKey?192:0)|(a.altKey?768:0)|(a.metaKey?3072:0);a.type=="keydown"?(this.parent.__window.onKeyDown.dispatch(b,c),this.parent.__window.onKeyDown.canceled&&a.cancelable&&a.preventDefault()):(this.parent.__window.onKeyUp.dispatch(b,c),this.parent.__window.onKeyUp.canceled&&
a.cancelable&&a.preventDefault())}},handleSensorEvent:function(a){this.accelerometer.onUpdate.dispatch(a.accelerationIncludingGravity.x,a.accelerationIncludingGravity.y,a.accelerationIncludingGravity.z)},handleWindowEvent:function(a){if(this.parent.__window!=null)switch(a.type){case "blur":this.hidden||(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),this.hidden=!0);break;case "focus":this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),
this.hidden=!1);break;case "resize":this.parent.__window.__backend.handleResizeEvent(a);break;case "visibilitychange":window.document.hidden?this.hidden||(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),this.hidden=!0):this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),this.hidden=!1)}},updateGameDevices:function(){var a=Te.__getDeviceData();if(a!=null)for(var b,c,d,f,g,h=0,n=a.length;h<n;)if(b=h++,f=a[b],f!=null){if(!this.gameDeviceCache.h.hasOwnProperty(b)){g=
new Rv;g.id=b;g.connected=f.connected;c=0;for(d=f.buttons.length;c<d;){var l=c++;g.buttons.push(f.buttons[l].value)}c=0;for(d=f.axes.length;c<d;)l=c++,g.axes.push(f.axes[l]);f.mapping=="standard"&&(g.isGamepad=!0);this.gameDeviceCache.h[b]=g;f.connected&&(Te.__connect(b),g.isGamepad&&sf.__connect(b))}g=this.gameDeviceCache.h[b];d=Te.devices.h[b];c=sf.devices.h[b];if(f.connected){for(var q=0,u=f.buttons.length;q<u;){var v=q++;l=f.buttons[v].value;if(l!=g.buttons[v]){if(v==6)d.onAxisMove.dispatch(f.axes.length,
l),c!=null&&c.onAxisMove.dispatch(4,l);else if(v==7)d.onAxisMove.dispatch(f.axes.length+1,l),c!=null&&c.onAxisMove.dispatch(5,l);else if(l>0?d.onButtonDown.dispatch(v):d.onButtonUp.dispatch(v),c!=null){switch(v){case 0:b=0;break;case 1:b=1;break;case 2:b=2;break;case 3:b=3;break;case 4:b=9;break;case 5:b=10;break;case 8:b=4;break;case 9:b=6;break;case 10:b=7;break;case 11:b=8;break;case 12:b=11;break;case 13:b=12;break;case 14:b=13;break;case 15:b=14;break;case 16:b=5;break;default:continue}l>0?c.onButtonDown.dispatch(b):
c.onButtonUp.dispatch(b)}g.buttons[v]=l}}b=0;for(l=f.axes.length;b<l;)q=b++,f.axes[q]!=g.axes[q]&&(d.onAxisMove.dispatch(q,f.axes[q]),c!=null&&c.onAxisMove.dispatch(q,f.axes[q]),g.axes[q]=f.axes[q])}else g.connected&&(g.connected=!1,Te.__disconnect(b),sf.__disconnect(b))}},__class__:Ba};var Na=function(){this.onDeviceOrientationChange=new Sv;this.onDisplayOrientationChange=new Tv;this.onCreateWindow=new Uv;this.onUpdate=new km;this.onExit=new km;Na.current==null&&(Na.current=this);this.meta=new G;
this.modules=[];this.__windowByID=new Od;this.__windows=[];this.__backend=new Ba(this);this.__registerLimeModule(this);this.__preloader=new Vv;this.__preloader.onProgress.add(m(this,this.onPreloadProgress));this.__preloader.onComplete.add(m(this,this.onPreloadComplete))};t["lime.app.Application"]=Na;Na.__name__="lime.app.Application";Na.__super__=ua;Na.prototype=I(ua.prototype,{meta:null,modules:null,onUpdate:null,onCreateWindow:null,onDisplayOrientationChange:null,onDeviceOrientationChange:null,
preloader:null,window:null,windows:null,__backend:null,__preloader:null,__window:null,__windowByID:null,__windows:null,addModule:function(a){a.__registerLimeModule(this);this.modules.push(a)},createWindow:function(a){a=this.__createWindow(a);this.__addWindow(a);return a},exec:function(){Na.current=this;return this.__backend.exec()},onGamepadAxisMove:function(a,b,c){},onGamepadButtonDown:function(a,b){},onGamepadButtonUp:function(a,b){},onGamepadConnect:function(a){},onGamepadDisconnect:function(a){},
onJoystickAxisMove:function(a,b,c){},onJoystickButtonDown:function(a,b){},onJoystickButtonUp:function(a,b){},onJoystickConnect:function(a){},onJoystickDisconnect:function(a){},onJoystickHatMove:function(a,b,c){},onKeyDown:function(a,b){},onKeyUp:function(a,b){},onModuleExit:function(a){},onMouseDown:function(a,b,c){},onMouseMove:function(a,b){},onMouseMoveRelative:function(a,b){},onMouseUp:function(a,b,c){},onMouseWheel:function(a,b,c){},onPreloadComplete:function(){},onPreloadProgress:function(a,
b){},onRenderContextLost:function(){},onRenderContextRestored:function(a){},onTextEdit:function(a,b,c){},onTextInput:function(a){},onTouchCancel:function(a){},onTouchEnd:function(a){},onTouchMove:function(a){},onTouchStart:function(a){},onWindowActivate:function(){},onWindowClose:function(){},onWindowCreate:function(){},onWindowDeactivate:function(){},onWindowDropFile:function(a){},onWindowEnter:function(){},onWindowExpose:function(){},onWindowFocusIn:function(){},onWindowFocusOut:function(){},onWindowFullscreen:function(){},
onWindowLeave:function(){},onWindowMove:function(a,b){},onWindowMinimize:function(){},onWindowResize:function(a,b){},onWindowRestore:function(){},removeModule:function(a){a!=null&&(a.__unregisterLimeModule(this),V.remove(this.modules,a))},render:function(a){},update:function(a){},__addWindow:function(a){if(a!=null){this.__windows.push(a);this.__windowByID.h[a.id]=a;var b=this;a.onClose.add(function(){b.__onWindowClose(a)},!1,-1E4);this.__window==null&&(this.__window=a,a.onActivate.add(m(this,this.onWindowActivate)),
a.onRenderContextLost.add(m(this,this.onRenderContextLost)),a.onRenderContextRestored.add(m(this,this.onRenderContextRestored)),a.onDeactivate.add(m(this,this.onWindowDeactivate)),a.onDropFile.add(m(this,this.onWindowDropFile)),a.onEnter.add(m(this,this.onWindowEnter)),a.onExpose.add(m(this,this.onWindowExpose)),a.onFocusIn.add(m(this,this.onWindowFocusIn)),a.onFocusOut.add(m(this,this.onWindowFocusOut)),a.onFullscreen.add(m(this,this.onWindowFullscreen)),a.onKeyDown.add(m(this,this.onKeyDown)),a.onKeyUp.add(m(this,
this.onKeyUp)),a.onLeave.add(m(this,this.onWindowLeave)),a.onMinimize.add(m(this,this.onWindowMinimize)),a.onMouseDown.add(m(this,this.onMouseDown)),a.onMouseMove.add(m(this,this.onMouseMove)),a.onMouseMoveRelative.add(m(this,this.onMouseMoveRelative)),a.onMouseUp.add(m(this,this.onMouseUp)),a.onMouseWheel.add(m(this,this.onMouseWheel)),a.onMove.add(m(this,this.onWindowMove)),a.onRender.add(m(this,this.render)),a.onResize.add(m(this,this.onWindowResize)),a.onRestore.add(m(this,this.onWindowRestore)),
a.onTextEdit.add(m(this,this.onTextEdit)),a.onTextInput.add(m(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(a)}},__createWindow:function(a){a=new lm(this,a);return a.id==-1?null:a},__registerLimeModule:function(a){a.onUpdate.add(m(this,this.update));a.onExit.add(m(this,this.onModuleExit),!1,0);a.onExit.add(m(this,this.__onModuleExit),!1,-1E3);for(a=sf.devices.iterator();a.hasNext();){var b=a.next();this.__onGamepadConnect(b)}sf.onConnect.add(m(this,this.__onGamepadConnect));
for(a=Te.devices.iterator();a.hasNext();)b=a.next(),this.__onJoystickConnect(b);Te.onConnect.add(m(this,this.__onJoystickConnect));Ue.onCancel.add(m(this,this.onTouchCancel));Ue.onStart.add(m(this,this.onTouchStart));Ue.onMove.add(m(this,this.onTouchMove));Ue.onEnd.add(m(this,this.onTouchEnd))},__removeWindow:function(a){a!=null&&this.__windowByID.h.hasOwnProperty(a.id)&&(this.__window==a&&(this.__window=null),V.remove(this.__windows,a),this.__windowByID.remove(a.id),a.close(),this.__checkForAllWindowsClosed())},
__checkForAllWindowsClosed:function(){this.__windows.length==0&&Rb.exit(0)},__onGamepadConnect:function(a){this.onGamepadConnect(a);var b=this,c=function(h,n){b.onGamepadAxisMove(a,h,n)};a.onAxisMove.add(c);var d=this;c=function(h){d.onGamepadButtonDown(a,h)};a.onButtonDown.add(c);var f=this;c=function(h){f.onGamepadButtonUp(a,h)};a.onButtonUp.add(c);var g=this;a.onDisconnect.add(function(){g.onGamepadDisconnect(a)})},__onJoystickConnect:function(a){this.onJoystickConnect(a);var b=this,c=function(n,
l){b.onJoystickAxisMove(a,n,l)};a.onAxisMove.add(c);var d=this;c=function(n){d.onJoystickButtonDown(a,n)};a.onButtonDown.add(c);var f=this;c=function(n){f.onJoystickButtonUp(a,n)};a.onButtonUp.add(c);var g=this;a.onDisconnect.add(function(){g.onJoystickDisconnect(a)});var h=this;c=function(n,l){h.onJoystickHatMove(a,n,l)};a.onHatMove.add(c)},__onModuleExit:function(a){this.onExit.canceled||(this.__unregisterLimeModule(this),this.__backend.exit(),Na.current==this&&(Na.current=null))},__onWindowClose:function(a){if(this.__window==
a)this.onWindowClose();this.__removeWindow(a)},__unregisterLimeModule:function(a){a.onUpdate.remove(m(this,this.update));a.onExit.remove(m(this,this.__onModuleExit));a.onExit.remove(m(this,this.onModuleExit));sf.onConnect.remove(m(this,this.__onGamepadConnect));Te.onConnect.remove(m(this,this.__onJoystickConnect));Ue.onCancel.remove(m(this,this.onTouchCancel));Ue.onStart.remove(m(this,this.onTouchStart));Ue.onMove.remove(m(this,this.onTouchMove));Ue.onEnd.remove(m(this,this.onTouchEnd))},get_preloader:function(){return this.__preloader},
get_window:function(){return this.__window},get_windows:function(){return this.__windows},get_deviceOrientation:function(){return this.__backend.getDeviceOrientation()},__class__:Na,__properties__:{get_windows:"get_windows",get_window:"get_window",get_preloader:"get_preloader",get_deviceOrientation:"get_deviceOrientation"}});var ic=function(){};t.ApplicationMain=ic;ic.__name__="ApplicationMain";ic.main=function(){Rb.__registerEntryPoint("TilBuci",ic.create)};ic.create=function(a){var b=new Lo;S.init(a);
b.meta.h.build="102";b.meta.h.company="VAR";b.meta.h.file="TilBuci";b.meta.h.name="TilBuci";b.meta.h.packageName="br.com.tilbuci";b.meta.h.version="1.0.0";var c={allowHighDPI:!0,alwaysOnTop:!1,borderless:!1,element:null,frameRate:60,height:0,hidden:!1,maximized:!1,minimized:!1,parameters:{},resizable:!0,title:"TilBuci",width:0,x:null,y:null,context:{antialiasing:0,background:0,colorDepth:32,depth:!0,hardware:!0,stencil:!0,type:null,vsync:!1}};if(b.__window==null&&a!=null)for(var d=0,f=y.fields(a);d<
f.length;){var g=f[d];++d;Object.prototype.hasOwnProperty.call(c,g)?c[g]=y.field(a,g):Object.prototype.hasOwnProperty.call(c.context,g)&&(c.context[g]=y.field(a,g))}b.createWindow(c);var h=new Tq(new O);b.__preloader.onProgress.add(function(l,q){h.update(l,q)});b.__preloader.onComplete.add(function(){h.start()});var n=b.__window.stage;h.onComplete.add(function(){ic.start(n)});d=0;for(f=S.preloadLibraries;d<f.length;)a=f[d],++d,b.__preloader.addLibrary(a);d=0;for(f=S.preloadLibraryNames;d<f.length;)a=
f[d],++d,b.__preloader.addLibraryName(a);b.__preloader.load();b.exec()};ic.start=function(a){if(a.__uncaughtErrorEvents.__enabled)try{var b=a.getChildAt(0);b!=null&&b instanceof zb||(b=new ek,a.addChild(b));new Rf(b);a.dispatchEvent(new pa("resize",!1,!1));a.window.__fullscreen&&a.dispatchEvent(new Ej("fullScreen",!1,!1,!0,!0))}catch(c){Pb.lastError=c,b=ba.caught(c).unwrap(),a.__handleError(b)}else b=a.getChildAt(0),b!=null&&b instanceof zb||(b=new ek,a.addChild(b)),new Rf(b),a.dispatchEvent(new pa("resize",
!1,!1)),a.window.__fullscreen&&a.dispatchEvent(new Ej("fullScreen",!1,!1,!0,!0))};var Db=function(){};t["openfl.events.IEventDispatcher"]=Db;Db.__name__="openfl.events.IEventDispatcher";Db.__isInterface__=!0;Db.prototype={addEventListener:null,dispatchEvent:null,hasEventListener:null,removeEventListener:null,willTrigger:null,__class__:Db};var qa=function(a){a!=null&&(this.__targetDispatcher=a)};t["openfl.events.EventDispatcher"]=qa;qa.__name__="openfl.events.EventDispatcher";qa.__interfaces__=[Db];
qa.prototype={__eventMap:null,__iterators:null,__targetDispatcher:null,addEventListener:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);if(b!=null)if(this.__eventMap==null&&(this.__eventMap=new G,this.__iterators=new G),Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)){l=this.__eventMap.h[a];for(var g=0,h=l.length;g<h;){var n=g++;if(l[n].match(b,c))return}a=this.__iterators.h[a];for(g=0;g<a.length;)h=a[g],++g,h.active&&h.copy();this.__addListenerByPriority(l,new mm(b,c,
d,f))}else{var l=[];l.push(new mm(b,c,d,f));h=new Mo(l);this.__eventMap.h[a]=l;this.__iterators.h[a]=[h]}},dispatchEvent:function(a){a.target=this.__targetDispatcher!=null?this.__targetDispatcher:this;return this.__dispatchEvent(a)},hasEventListener:function(a){return this.__eventMap==null?!1:Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)},removeEventListener:function(a,b,c){c==null&&(c=!1);if(this.__eventMap!=null&&b!=null){var d=this.__eventMap.h[a];if(d!=null){for(var f=this.__iterators.h[a],
g=0,h=d.length;g<h;){var n=g++;if(d[n].match(b,c)){for(b=0;b<f.length;)c=f[b],++b,c.remove(d[n],n);d.splice(n,1);break}}d.length==0&&(d=this.__eventMap,f=a,Object.prototype.hasOwnProperty.call(d.h,f)&&delete d.h[f],d=this.__iterators,f=a,Object.prototype.hasOwnProperty.call(d.h,f)&&delete d.h[f]);0>=Object.keys(this.__eventMap.h).length&&(this.__iterators=this.__eventMap=null)}}},toString:function(){return"[object "+w.getClass(this).__name__.split(".").pop()+"]"},willTrigger:function(a){return this.hasEventListener(a)},
__dispatchEvent:function(a){if(this.__eventMap==null||a==null)return!0;var b=a.type,c=this.__eventMap.h[b];if(c==null)return!0;a.target==null&&(a.target=this.__targetDispatcher!=null?this.__targetDispatcher:this);a.currentTarget=this;var d=a.eventPhase==1;b=this.__iterators.h[b];var f=b[0];f.active&&(f=new Mo(c),b.push(f));f.start();for(var g=f;g.hasNext();){var h=g.next();if(h!=null&&h.useCapture==d){if(h.useWeakReference&&h.weakRefCallback!=null){var n=h.weakRefCallback.deref();if(n==null)n=f.index-
1,c.splice(n,1),f.remove(h,n);else if(Pa.get_current()!=null&&Pa.get_current().stage!=null&&Pa.get_current().stage.__uncaughtErrorEvents.__enabled)try{n(a)}catch(l){Pb.lastError=l,h=ba.caught(l).unwrap(),a instanceof xl||Pa.get_current().stage.__handleError(h)}else n(a)}else if(Pa.get_current()!=null&&Pa.get_current().stage!=null&&Pa.get_current().stage.__uncaughtErrorEvents.__enabled)try{h.callback(a)}catch(l){Pb.lastError=l,h=ba.caught(l).unwrap(),a instanceof xl||Pa.get_current().stage.__handleError(h)}else h.callback(a);
if(a.__isCanceledNow)break}}f.stop();f!=b[0]?V.remove(b,f):f.reset(c);return!a.isDefaultPrevented()},__removeAllListeners:function(){this.__iterators=this.__eventMap=null},__addListenerByPriority:function(a,b){for(var c=a.length,d=c,f=0;f<c;){var g=f++;if(a[g].priority<b.priority){d=g;break}}a.splice(d,0,b)},__class__:qa};var kc=function(){};t["openfl.display.IBitmapDrawable"]=kc;kc.__name__="openfl.display.IBitmapDrawable";kc.__isInterface__=!0;kc.prototype={__blendMode:null,__drawableType:null,
__isMask:null,__renderable:null,__renderTransform:null,__transform:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__getBounds:null,__update:null,__updateTransforms:null,__mask:null,__scrollRect:null,__class__:kc};var tb={__properties__:{set_length:"set_length",get_length:"get_length",set_fixed:"set_fixed",get_fixed:"get_fixed"},concat:function(a,b){return a.concat(b)},copy:function(a){return a.copy()},every:function(a,b,c){for(var d=0,f=a.get_length();d<f;){var g=d++;a.__tempIndex=
g;if(c!=null){if(b.apply(c,[a.get(g),g,a])==0)break}else if(b(a.get(g),g,a)==0)break}return a.__tempIndex==a.get_length()-1},filter:function(a,b){return a.filter(b)},get:function(a,b){return a.get(b)},indexOf:function(a,b,c){c==null&&(c=0);return a.indexOf(b,c)},insertAt:function(a,b,c){a.insertAt(b,c)},iterator:function(a){return a.iterator()},join:function(a,b){b==null&&(b=",");return a.join(b)},lastIndexOf:function(a,b,c){return a.lastIndexOf(b,c)},pop:function(a){return a.pop()},removeAt:function(a,
b){return a.removeAt(b)},reverse:function(a){return a.reverse()},set:function(a,b,c){return a.set(b,c)},shift:function(a){return a.shift()},slice:function(a,b,c){b==null&&(b=0);return a.slice(b,c)},some:function(a,b,c){for(var d=0,f=a.get_length();d<f;){var g=d++;a.__tempIndex=g;if(c!=null){if(b.apply(c,[a.get(g),g,a])==1)break}else if(b(a.get(g),g,a))break;g==a.get_length()-1&&a.__tempIndex++}return a.__tempIndex<a.get_length()-1},sort:function(a,b){a.sort(b)},splice:function(a,b,c){for(var d=arguments.length,
f=Array(d>3?d-3:0),g=3;g<d;++g)f[g-3]=arguments[g];a.__tempIndex=b;for(d=0;d<f.length;)g=f[d++],a.insertAt(a.__tempIndex,g),a.__tempIndex++;return a.splice(a.__tempIndex,c)},toString:function(a){return a!=null?a.toString():null},ofValues:function(){for(var a=arguments.length,b=Array(a>0?a-0:0),c=0;c<a;++c)b[c-0]=arguments[c];a=tb.toNullVector(null);c=0;for(var d=b.length;c<d;){var f=c++;a.set(f,b[f])}return a},convert:function(a){return a},toBoolVector:function(a,b,c,d){return new bj(b,c,d)},toIntVector:function(a,
b,c,d){return new cj(b,c,d)},toFloatVector:function(a,b,c,d){return new dj(b,c,d,!0)},toFunctionVector:function(a,b,c,d){return new ej(b,c,d)},toObjectVector:function(a,b,c,d){return new Fi(b,c,d,!0)},toNullVector:function(a,b,c,d){return new Fi(b,c,d,!0)},fromBoolVector:function(a){return a},fromIntVector:function(a){return a},fromFloatVector:function(a){return a},fromFunctionVector:function(a){return a},fromObjectVector:function(a){return a},get_fixed:function(a){return a.fixed},set_fixed:function(a,
b){return a.fixed=b},get_length:function(a){return a.get_length()},set_length:function(a,b){return a.set_length(b)}},dc=function(a,b,c){this.__pool=new Ta;this.inactiveObjects=this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList=new hb;a!=null&&(this.create=a);b!=null&&(this.clean=b);c!=null&&this.set_size(c)};t["lime.utils.ObjectPool"]=dc;dc.__name__="lime.utils.ObjectPool";dc.prototype={activeObjects:null,inactiveObjects:null,__inactiveObject0:null,__inactiveObject1:null,
__inactiveObjectList:null,__pool:null,__size:null,add:function(a){a==null||this.__pool.exists(a)||(this.__pool.set(a,!1),this.clean(a),this.__inactiveObject0==null?this.__inactiveObject0=a:this.__inactiveObject1==null?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++)},clean:function(a){},clear:function(){this.__pool=new Ta;this.inactiveObjects=this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList.clear()},create:function(){return null},
get:function(){var a=null;if(this.inactiveObjects>0)this.__inactiveObject0!=null?(a=this.__inactiveObject0,this.__inactiveObject0=null):this.__inactiveObject1!=null?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=this.__inactiveObjectList.pop(),this.__inactiveObjectList.length>0&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),this.__inactiveObjectList.length>0&&(this.__inactiveObject1=this.__inactiveObjectList.pop())),this.inactiveObjects--,this.activeObjects++;else if(this.__size==
null||this.activeObjects<this.__size)a=this.create(),a!=null&&(this.__pool.set(a,!0),this.activeObjects++);return a},release:function(a){this.activeObjects--;this.__size==null||this.activeObjects+this.inactiveObjects<this.__size?(this.clean(a),this.__inactiveObject0==null?this.__inactiveObject0=a:this.__inactiveObject1==null?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++):this.__pool.remove(a)},remove:function(a){a!=null&&this.__pool.exists(a)&&(this.__pool.remove(a),
this.__inactiveObject0==a?(this.__inactiveObject0=null,this.inactiveObjects--):this.__inactiveObject1==a?(this.__inactiveObject1=null,this.inactiveObjects--):this.__inactiveObjectList.remove(a)?this.inactiveObjects--:this.activeObjects--)},__addInactive:function(a){this.__inactiveObject0==null?this.__inactiveObject0=a:this.__inactiveObject1==null?this.__inactiveObject1=a:this.__inactiveObjectList.add(a);this.inactiveObjects++},__getInactive:function(){if(this.__inactiveObject0!=null){var a=this.__inactiveObject0;
this.__inactiveObject0=null}else this.__inactiveObject1!=null?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=this.__inactiveObjectList.pop(),this.__inactiveObjectList.length>0&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),this.__inactiveObjectList.length>0&&(this.__inactiveObject1=this.__inactiveObjectList.pop()));this.inactiveObjects--;this.activeObjects++;return a},__removeInactive:function(a){if(!(a<=0||this.inactiveObjects==0)&&(this.__inactiveObject0!=null&&(this.__pool.remove(this.__inactiveObject0),
this.__inactiveObject0=null,this.inactiveObjects--,--a),a!=0&&this.inactiveObjects!=0&&(this.__inactiveObject1!=null&&(this.__pool.remove(this.__inactiveObject1),this.__inactiveObject1=null,this.inactiveObjects--,--a),a!=0&&this.inactiveObjects!=0)))for(var b=this.__inactiveObjectList.h;b!=null;){var c=b.item;b=b.next;this.__pool.remove(c);this.__inactiveObjectList.remove(c);this.inactiveObjects--;--a;if(a==0||this.inactiveObjects==0)break}},get_size:function(){return this.__size},set_size:function(a){if(a==
null)this.__size=null;else{var b=this.inactiveObjects+this.activeObjects;this.__size=a;if(b>a)this.__removeInactive(b-a);else if(a>b)for(var c=0,d=a-b;c<d;)if(c++,b=this.create(),b!=null)this.__pool.set(b,!1),this.__inactiveObjectList.add(b),this.inactiveObjects++;else break}return a},__class__:dc,__properties__:{set_size:"set_size",get_size:"get_size"}};var ja=function(){};t["haxe.IMap"]=ja;ja.__name__="haxe.IMap";ja.__isInterface__=!0;ja.prototype={get:null,set:null,exists:null,remove:null,keys:null,
iterator:null,keyValueIterator:null,__class__:ja};var Ta=function(){this.h={__keys__:{}}};t["haxe.ds.ObjectMap"]=Ta;Ta.__name__="haxe.ds.ObjectMap";Ta.__interfaces__=[ja];Ta.prototype={h:null,set:function(a,b){var c=a.__id__;c==null&&(c=a.__id__=wa.$haxeUID++);this.h[c]=b;this.h.__keys__[c]=a},get:function(a){return this.h[a.__id__]},exists:function(a){return this.h.__keys__[a.__id__]!=null},remove:function(a){a=a.__id__;if(this.h.__keys__[a]==null)return!1;delete this.h[a];delete this.h.__keys__[a];
return!0},keys:function(){var a=[],b;for(b in this.h.__keys__)this.h.hasOwnProperty(b)&&a.push(this.h.__keys__[b]);return new wg(a)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=this.it.next();return this.ref[a.__id__]}}},keyValueIterator:function(){return new yl(this)},toString:function(){var a="[";for(var b=this.keys();b.hasNext();){var c=b.next();a+=H.string(H.string(c));a+=" => ";a+=H.string(H.string(this.h[c.__id__]));
b.hasNext()&&(a+=", ")}return a+"]"},__class__:Ta};var hb=function(){this.length=0};t["haxe.ds.List"]=hb;hb.__name__="haxe.ds.List";hb.prototype={h:null,q:null,length:null,add:function(a){a=new Uq(a,null);this.h==null?this.h=a:this.q.next=a;this.q=a;this.length++},push:function(a){this.h=a=new Uq(a,this.h);this.q==null&&(this.q=a);this.length++},pop:function(){if(this.h==null)return null;var a=this.h.item;this.h=this.h.next;this.h==null&&(this.q=null);this.length--;return a},isEmpty:function(){return this.h==
null},clear:function(){this.q=this.h=null;this.length=0},remove:function(a){for(var b=null,c=this.h;c!=null;){if(c.item==a)return b==null?this.h=c.next:b.next=c.next,this.q==c&&(this.q=b),this.length--,!0;b=c;c=c.next}return!1},iterator:function(){return new Wv(this.h)},__class__:hb};var ma=function(){this.__hasClippingLayer=!1;qa.call(this);this.__alpha=this.__drawableType=1;this.__blendMode=10;this.__cacheAsBitmap=!1;this.__transform=new gb;this.__visible=!0;this.__rotationSine=this.__rotation=
0;this.__worldAlpha=this.__scaleY=this.__scaleX=this.__rotationCosine=1;this.__worldBlendMode=10;this.__worldTransform=new gb;this.__worldColorTransform=new wc;this.__renderTransform=new gb;this.__worldVisible=!0;this.set_name("instance"+ ++ma.__instanceCount);ma.__initStage!=null&&(this.stage=ma.__initStage,ma.__initStage=null,this.stage.addChild(this))};t["openfl.display.DisplayObject"]=ma;ma.__name__="openfl.display.DisplayObject";ma.__interfaces__=[kc];ma.__calculateAbsoluteTransform=function(a,
b,c){c.a=a.a*b.a+a.b*b.c;c.b=a.a*b.b+a.b*b.d;c.c=a.c*b.a+a.d*b.c;c.d=a.c*b.b+a.d*b.d;c.tx=a.tx*b.a+a.ty*b.c+b.tx;c.ty=a.tx*b.b+a.ty*b.d+b.ty};ma.__super__=qa;ma.prototype=I(qa.prototype,{__hasClippingLayer:null,opaqueBackground:null,parent:null,stage:null,__alpha:null,__blendMode:null,__cacheAsBitmap:null,__cacheAsBitmapMatrix:null,__cacheBitmap:null,__cacheBitmapBackground:null,__cacheBitmapColorTransform:null,__cacheBitmapData:null,__cacheBitmapData2:null,__cacheBitmapData3:null,__cacheBitmapMatrix:null,
__cacheBitmapRenderer:null,__cairo:null,__children:null,__customRenderClear:null,__customRenderEvent:null,__drawableType:null,__filters:null,__graphics:null,__interactive:null,__isCacheBitmapRender:null,__isMask:null,__loaderInfo:null,__mask:null,__maskTarget:null,__metaData:null,__name:null,__objectTransform:null,__renderable:null,__renderDirty:null,__renderParent:null,__renderTransform:null,__renderTransformCache:null,__renderTransformChanged:null,__rotation:null,__rotationCosine:null,__rotationSine:null,
__scale9Grid:null,__scaleX:null,__scaleY:null,__scrollRect:null,__shader:null,__tempPoint:null,__transform:null,__transformDirty:null,__visible:null,__worldAlpha:null,__worldAlphaChanged:null,__worldBlendMode:null,__worldClip:null,__worldClipChanged:null,__worldColorTransform:null,__worldShader:null,__worldScale9Grid:null,__worldTransform:null,__worldVisible:null,__worldVisibleChanged:null,__worldTransformInvalid:null,__worldZ:null,__canvas:null,__context:null,__style:null,addEventListener:function(a,
b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":Object.prototype.hasOwnProperty.call(ma.__broadcastEvents.h,a)||(ma.__broadcastEvents.h[a]=[]);var g=ma.__broadcastEvents.h[a];g.indexOf(this)==-1&&g.push(this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":this.__customRenderEvent==null&&(this.__customRenderEvent=new fk(null),
this.__customRenderEvent.objectColorTransform=new wc,this.__customRenderEvent.objectMatrix=new gb,this.__customRenderClear=!0)}qa.prototype.addEventListener.call(this,a,b,c,d,f)},dispatchEvent:function(a){if(a instanceof Ic){var b=this.__getRenderTransform();a.stageX=a.localX*b.a+a.localY*b.c+b.tx;b=this.__getRenderTransform();a.stageY=a.localX*b.b+a.localY*b.d+b.ty}else a instanceof Sf&&(b=this.__getRenderTransform(),a.stageX=a.localX*b.a+a.localY*b.c+b.tx,b=this.__getRenderTransform(),a.stageY=
a.localX*b.b+a.localY*b.d+b.ty);a.target=this;return this.__dispatchWithCapture(a)},getBounds:function(a){var b=gb.__pool.get();if(a!=null&&a!=this){b.copyFrom(this.__getWorldTransform());var c=gb.__pool.get();c.copyFrom(a.__getWorldTransform());c.invert();b.concat(c);gb.__pool.release(c)}else b.identity();a=new Ia;this.__getBounds(a,b);gb.__pool.release(b);return a},getRect:function(a){return this.getBounds(a)},globalToLocal:function(a){return this.__globalToLocal(a,new Ea)},hitTestObject:function(a){if(a!=
null&&a.parent!=null&&this.parent!=null){var b=this.getBounds(this);a=a.getBounds(this);return b.intersects(a)}return!1},hitTestPoint:function(a,b,c){c==null&&(c=!1);return this.stage!=null?this.__hitTest(a,b,c,null,!1,this):!1},invalidate:function(){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},localToGlobal:function(a){return this.__getRenderTransform().transformPoint(a)},removeEventListener:function(a,b,c){c==null&&(c=!1);qa.prototype.removeEventListener.call(this,
a,b,c);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":this.hasEventListener(a)||Object.prototype.hasOwnProperty.call(ma.__broadcastEvents.h,a)&&V.remove(ma.__broadcastEvents.h[a],this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":this.hasEventListener("clearDOM")||this.hasEventListener("renderCairo")||this.hasEventListener("renderCanvas")||this.hasEventListener("renderDOM")||
this.hasEventListener("renderOpenGL")||(this.__customRenderEvent=null)}},__cleanup:function(){this.__cairo=null;this.__canvas!=null&&(this.__canvas.width=0,this.__canvas.height=0,this.__canvas=null);this.__context!=null&&(this.__context.clearRect(0,0,0,0),this.__context=null);this.__graphics!=null&&this.__graphics.__cleanup();this.__cacheBitmap!=null&&(this.__cacheBitmap.__cleanup(),this.__cacheBitmap=null);this.__cacheBitmapData!=null&&(this.__cacheBitmapData.dispose(),this.__cacheBitmapData=null);
this.__cacheBitmapData2!=null&&(this.__cacheBitmapData2.dispose(),this.__cacheBitmapData2=null);this.__cacheBitmapData3!=null&&(this.__cacheBitmapData3.dispose(),this.__cacheBitmapData3=null)},__dispatch:function(a){if(this.__eventMap!=null&&this.hasEventListener(a.type)){var b=qa.prototype.__dispatchEvent.call(this,a);return a.__isCanceled?!0:b}return!0},__dispatchChildren:function(a){},__dispatchEvent:function(a){var b=a.bubbles?this.parent:null,c=qa.prototype.__dispatchEvent.call(this,a);if(a.__isCanceled)return!0;
b!=null&&b!=this&&(a.eventPhase=3,a.target==null&&(a.target=this),b.__dispatchEvent(a));return c},__dispatchWithCapture:function(a){a.target==null&&(a.target=this);if(this.parent!=null)if(a.eventPhase=1,this.parent==this.stage)this.parent.__dispatch(a);else{for(var b=ma.__tempStack.get(),c=this.parent,d=0;c!=null;)b.set(d,c),c=c.parent,++d;c=0;for(var f=d;c<f;){var g=c++;b.get(d-g-1).__dispatch(a)}ma.__tempStack.release(b)}a.eventPhase=2;return this.__dispatchEvent(a)},__enterFrame:function(a){},
__getBounds:function(a,b){this.__graphics!=null&&this.__graphics.__getBounds(a,b)},__getCursor:function(){return null},__getFilterBounds:function(a,b){this.__getRenderBounds(a,b);if(this.__filters!=null){b=Ia.__pool.get();for(var c=0,d=this.__filters;c<d.length;){var f=d[c];++c;b.__expand(-f.__leftExtension,-f.__topExtension,f.__leftExtension+f.__rightExtension,f.__topExtension+f.__bottomExtension)}a.width+=b.width;a.height+=b.height;a.x+=b.x;a.y+=b.y;Ia.__pool.release(b)}},__getInteractive:function(a){return!1},
__getLocalBounds:function(a){this.__getBounds(a,this.__transform);a.x-=this.__transform.tx;a.y-=this.__transform.ty},__getRenderBounds:function(a,b){if(this.__scrollRect==null)this.__getBounds(a,b);else{var c=Ia.__pool.get();c.copyFrom(this.__scrollRect);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ia.__pool.release(c)}},__getRenderTransform:function(){this.__getWorldTransform();return this.__renderTransform},__getWorldTransform:function(){if(this.__transformDirty||this.__worldTransformInvalid){var a=
[],b=this;if(this.parent==null)this.__update(!0,!1);else for(;b!=this.stage&&(a.push(b),b=b.parent,b!=null););for(var c=a.length;--c>=0;)b=a[c],b.__update(!0,!1)}return this.__worldTransform},__globalToLocal:function(a,b){this.__getRenderTransform();if(a==b){var c=this.__renderTransform,d=c.a*c.d-c.b*c.c;if(d==0)a.x=-c.tx,a.y=-c.ty;else{var f=1/d*(c.c*(c.ty-a.y)+c.d*(a.x-c.tx));a.y=1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));a.x=f}}else c=this.__renderTransform,d=c.a*c.d-c.b*c.c,b.x=d==0?-c.tx:1/d*(c.c*(c.ty-
a.y)+c.d*(a.x-c.tx)),c=this.__renderTransform,d=c.a*c.d-c.b*c.c,b.y=d==0?-c.ty:1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));return b},__hitTest:function(a,b,c,d,f,g){if(this.__graphics!=null){if(!g.__visible||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;if(this.__graphics.__hitTest(a,b,c,this.__getRenderTransform()))return d==null||f||d.push(g),!0}return!1},__hitTestMask:function(a,b){return this.__graphics!=null&&this.__graphics.__hitTest(a,b,!0,this.__getRenderTransform())?
!0:!1},__readGraphicsData:function(a,b){this.__graphics!=null&&this.__graphics.__readGraphicsData(a)},__setParentRenderDirty:function(){var a=this.__renderParent!=null?this.__renderParent:this.parent;a==null||a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())},__setRenderDirty:function(){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__setStageReference:function(a){this.stage=a},__setTransformDirty:function(){this.__transformDirty||(this.__transformDirty=
!0,this.__setWorldTransformInvalid(),this.__setParentRenderDirty())},__setWorldTransformInvalid:function(){this.__worldTransformInvalid=!0},__stopAllMovieClips:function(){},__update:function(a,b){var c=this.__renderParent!=null?this.__renderParent:this.parent;this.__isMask&&c==null&&(c=this.__maskTarget);this.__renderable=this.__visible&&this.__scaleX!=0&&this.__scaleY!=0&&!this.__isMask&&(c==null||!c.__isMask);this.__updateTransforms();this.__worldTransformInvalid=this.__transformDirty=!1;if(!a)if(ma.__supportDOM&&
(this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache),this.__renderTransformCache==null?this.__renderTransformCache=this.__renderTransform.clone():this.__renderTransformCache.copyFrom(this.__renderTransform)),c!=null){if(ma.__supportDOM){var d=c.__worldVisible&&this.__visible;this.__worldVisibleChanged=this.__worldVisible!=d;this.__worldVisible=d}d=this.get_alpha()*c.__worldAlpha;this.__worldAlphaChanged=this.__worldAlpha!=d;this.__worldAlpha=d;this.__objectTransform!=
null?(this.__worldColorTransform.__copyFrom(this.__objectTransform.__colorTransform),this.__worldColorTransform.__combine(c.__worldColorTransform)):this.__worldColorTransform.__copyFrom(c.__worldColorTransform);this.__worldBlendMode=this.__blendMode==null||this.__blendMode==10?c.__worldBlendMode:this.__blendMode;this.__worldShader=this.__shader==null?c.__shader:this.__shader;this.__worldScale9Grid=this.__scale9Grid==null?c.__scale9Grid:this.__scale9Grid}else this.__worldAlpha=this.get_alpha(),ma.__supportDOM&&
(this.__worldVisibleChanged=this.__worldVisible!=this.__visible,this.__worldVisible=this.__visible),this.__worldAlphaChanged=this.__worldAlpha!=this.get_alpha(),this.__objectTransform!=null?this.__worldColorTransform.__copyFrom(this.__objectTransform.__colorTransform):this.__worldColorTransform.__identity(),this.__worldBlendMode=this.__blendMode,this.__worldShader=this.__shader,this.__worldScale9Grid=this.__scale9Grid;b&&this.get_mask()!=null&&this.get_mask().__update(a,!0)},__updateTransforms:function(a){var b=
a!=null;a=b?a:this.__transform;this.__worldTransform==null&&(this.__worldTransform=new gb);this.__renderTransform==null&&(this.__renderTransform=new gb);var c=this.__renderParent!=null?this.__renderParent:this.parent;if(b||this.parent==null)this.__worldTransform.copyFrom(a);else{var d=this.parent.__worldTransform,f=this.__worldTransform;f.a=a.a*d.a+a.b*d.c;f.b=a.a*d.b+a.b*d.d;f.c=a.c*d.a+a.d*d.c;f.d=a.c*d.b+a.d*d.d;f.tx=a.tx*d.a+a.ty*d.c+d.tx;f.ty=a.tx*d.b+a.ty*d.d+d.ty}b||c==null?this.__renderTransform.copyFrom(a):
(d=c.__renderTransform,f=this.__renderTransform,f.a=a.a*d.a+a.b*d.c,f.b=a.a*d.b+a.b*d.d,f.c=a.c*d.a+a.d*d.c,f.d=a.c*d.b+a.d*d.d,f.tx=a.tx*d.a+a.ty*d.c+d.tx,f.ty=a.tx*d.b+a.ty*d.d+d.ty);this.__scrollRect!=null&&(b=this.__renderTransform,a=-this.__scrollRect.x,c=-this.__scrollRect.y,b.tx=a*b.a+c*b.c+b.tx,b.ty=a*b.b+c*b.d+b.ty)},__setMask:function(a){a!=this.__mask&&(this.__setTransformDirty(),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));if(this.__mask!=null){this.__mask.__isMask=
!1;this.__mask.__maskTarget=null;this.__mask.__setTransformDirty();var b=this.__mask;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}a!=null&&(a.__isMask=!0,a.__maskTarget=this,a.__setWorldTransformInvalid());this.__cacheBitmap!=null&&this.__cacheBitmap.get_clippingLayer()!=a&&this.__cacheBitmap.set_clippingLayer(a);this.__mask=a},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=a?a=0:a>1?a=1:a<0&&(a=0);a==this.__alpha||this.get_cacheAsBitmap()||this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__alpha=a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){a==null&&(a=10);a==this.__blendMode||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__blendMode=a},get_cacheAsBitmap:function(){return this.__filters==null?this.__cacheAsBitmap:!0},set_cacheAsBitmap:function(a){a==this.__cacheAsBitmap||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());
return this.__cacheAsBitmap=a},get_cacheAsBitmapMatrix:function(){return this.__cacheAsBitmapMatrix},set_cacheAsBitmapMatrix:function(a){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__cacheAsBitmapMatrix=a!=null?a.clone():a},get_filters:function(){return this.__filters==null?[]:this.__filters.slice()},set_filters:function(a){if(a!=null&&a.length>0){for(var b=[],c=0;c<a.length;){var d=a[c];++c;d=d.clone();d.__renderDirty=!0;b.push(d)}this.__filters=b;this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty())}else this.__filters!=null&&(this.__filters=null,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_height:function(){var a=Ia.__pool.get();this.__getLocalBounds(a);var b=a.height;Ia.__pool.release(a);return b},set_height:function(a){var b=Ia.__pool.get(),c=gb.__pool.get();c.identity();this.__getBounds(b,c);a!=b.height?this.set_scaleY(a/b.height):this.set_scaleY(1);Ia.__pool.release(b);gb.__pool.release(c);
return a},get_loaderInfo:function(){return this.stage!=null?md.current.__loaderInfo:null},get_mask:function(){return this.__mask},set_mask:function(a){if(a==this.__mask)return a;a!=null&&a.__maskTarget!=null&&a.__maskTarget.set_mask(null);this.__setMask(a);return this.__mask},get_metaData:function(){return this.__metaData},set_metaData:function(a){return this.__metaData=a},get_clippingLayer:function(){return this.__hasClippingLayer?this.__mask:null},set_clippingLayer:function(a){this.__hasClippingLayer=
a!=null;this.__setMask(a);return this.__mask},get_mouseX:function(){var a=this.stage!=null?this.stage.__mouseX:md.current.stage.__mouseX,b=this.stage!=null?this.stage.__mouseY:md.current.stage.__mouseY,c=this.__getRenderTransform(),d=c.a*c.d-c.b*c.c;return d==0?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx))},get_mouseY:function(){var a=this.stage!=null?this.stage.__mouseX:md.current.stage.__mouseX,b=this.stage!=null?this.stage.__mouseY:md.current.stage.__mouseY,c=this.__getRenderTransform(),d=c.a*c.d-c.b*
c.c;return d==0?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a))},get_name:function(){return this.__name},set_name:function(a){return this.__name=a},get_root:function(){return this.stage!=null?md.current:null},get_rotation:function(){return this.__rotation},set_rotation:function(a){if(a!=this.__rotation){a%=360;a>180?a-=360:a<-180&&(a+=360);this.__rotation=a;var b=Math.PI/180*this.__rotation;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);this.__transform.a=this.__rotationCosine*this.__scaleX;
this.__transform.b=this.__rotationSine*this.__scaleX;this.__transform.c=-this.__rotationSine*this.__scaleY;this.__transform.d=this.__rotationCosine*this.__scaleY;this.__setTransformDirty()}return a},get_scale9Grid:function(){return this.__scale9Grid==null?null:this.__scale9Grid.clone()},set_scale9Grid:function(a){if(a==null&&this.__scale9Grid==null||a!=null&&this.__scale9Grid!=null&&this.__scale9Grid.equals(a))return a;a!=null?(this.__scale9Grid==null&&(this.__scale9Grid=new Ia),this.__scale9Grid.copyFrom(a)):
this.__scale9Grid=null;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_scaleX:function(){return this.__scaleX},set_scaleX:function(a){if(a!=this.__scaleX)if(this.__scaleX=a,this.__rotation==0)a!=this.__transform.a&&this.__setTransformDirty(),this.__transform.a=a;else{var b=this.__rotationCosine*a,c=this.__rotationSine*a;this.__transform.a==b&&this.__transform.b==c||this.__setTransformDirty();this.__transform.a=b;this.__transform.b=c}return a},get_scaleY:function(){return this.__scaleY},
set_scaleY:function(a){if(a!=this.__scaleY)if(this.__scaleY=a,this.__rotation==0)a!=this.__transform.d&&this.__setTransformDirty(),this.__transform.d=a;else{var b=-this.__rotationSine*a,c=this.__rotationCosine*a;this.__transform.d==c&&this.__transform.c==b||this.__setTransformDirty();this.__transform.c=b;this.__transform.d=c}return a},get_scrollRect:function(){return this.__scrollRect==null?null:this.__scrollRect.clone()},set_scrollRect:function(a){if(a==null&&this.__scrollRect==null||a!=null&&this.__scrollRect!=
null&&this.__scrollRect.equals(a))return a;a!=null?(this.__scrollRect==null&&(this.__scrollRect=new Ia),this.__scrollRect.copyFrom(a),this.__scrollRect.width<0&&(this.__scrollRect.width=0),this.__scrollRect.height<0&&(this.__scrollRect.height=0)):this.__scrollRect=null;this.__setTransformDirty();ma.__supportDOM&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__scrollRect},get_shader:function(){return this.__shader},set_shader:function(a){this.__shader=a;this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_transform:function(){this.__objectTransform==null&&(this.__objectTransform=new Vq(this));return this.__objectTransform},set_transform:function(a){if(a==null)throw new Ce("Parameter transform must be non-null.");this.__objectTransform==null&&(this.__objectTransform=new Vq(this));this.__setTransformDirty();if(a.__hasMatrix){var b=a.__displayObject.__transform;this.__objectTransform.__setTransform(b.a,b.b,b.c,b.d,b.tx,b.ty)}else this.__objectTransform.__hasMatrix=
!1;if(!this.__objectTransform.__colorTransform.__equals(a.__colorTransform,!0)||!this.get_cacheAsBitmap()&&this.__objectTransform.__colorTransform.alphaMultiplier!=a.__colorTransform.alphaMultiplier)this.__objectTransform.__colorTransform.__copyFrom(a.get_colorTransform()),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__objectTransform},get_visible:function(){return this.__visible},set_visible:function(a){a==this.__visible||this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty());return this.__visible=a},get_width:function(){var a=Ia.__pool.get();this.__getLocalBounds(a);var b=a.width;Ia.__pool.release(a);return b},set_width:function(a){var b=Ia.__pool.get(),c=gb.__pool.get();c.identity();this.__getBounds(b,c);a!=b.width?this.set_scaleX(a/b.width):this.set_scaleX(1);Ia.__pool.release(b);gb.__pool.release(c);return a},get_x:function(){return this.__transform.tx},set_x:function(a){a!=a&&(a=0);a!=this.__transform.tx&&this.__setTransformDirty();
return this.__transform.tx=a},get_y:function(){return this.__transform.ty},set_y:function(a){a!=a&&(a=0);a!=this.__transform.ty&&this.__setTransformDirty();return this.__transform.ty=a},__class__:ma,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_transform:"set_transform",get_transform:"get_transform",set_shader:"set_shader",get_shader:"get_shader",set_scrollRect:"set_scrollRect",
get_scrollRect:"get_scrollRect",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_scale9Grid:"set_scale9Grid",get_scale9Grid:"get_scale9Grid",set_rotation:"set_rotation",get_rotation:"get_rotation",get_root:"get_root",set_name:"set_name",get_name:"get_name",get_mouseY:"get_mouseY",get_mouseX:"get_mouseX",set_clippingLayer:"set_clippingLayer",get_clippingLayer:"get_clippingLayer",set_metaData:"set_metaData",get_metaData:"get_metaData",set_mask:"set_mask",
get_mask:"get_mask",get_loaderInfo:"get_loaderInfo",set_height:"set_height",get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmapMatrix:"set_cacheAsBitmapMatrix",get_cacheAsBitmapMatrix:"get_cacheAsBitmapMatrix",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_blendMode:"set_blendMode",get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var Ja=function(){ma.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=
!0;this.needsSoftKeyboard=!1;this.__tabEnabled=null;this.__tabIndex=-1};t["openfl.display.InteractiveObject"]=Ja;Ja.__name__="openfl.display.InteractiveObject";Ja.__super__=ma;Ja.prototype=I(ma.prototype,{doubleClickEnabled:null,focusRect:null,mouseEnabled:null,needsSoftKeyboard:null,softKeyboardInputAreaOfInterest:null,__tabEnabled:null,__tabIndex:null,requestSoftKeyboard:function(){md.notImplemented({fileName:"openfl/display/InteractiveObject.hx",lineNumber:1255,className:"openfl.display.InteractiveObject",
methodName:"requestSoftKeyboard"});return!1},__allowMouseFocus:function(){return this.mouseEnabled?this.get_tabEnabled():!1},__getInteractive:function(a){a!=null&&(a.push(this),this.parent!=null&&this.parent.__getInteractive(a));return!0},__hitTest:function(a,b,c,d,f,g){return!g.get_visible()||this.__isMask||f&&!this.mouseEnabled?!1:ma.prototype.__hitTest.call(this,a,b,c,d,f,g)},__tabTest:function(a){this.get_tabEnabled()&&a.push(this)},get_tabEnabled:function(){return this.__tabEnabled==1?!0:!1},
set_tabEnabled:function(a){this.__tabEnabled!=a&&(this.__tabEnabled=a,this.dispatchEvent(new pa("tabEnabledChange",!0,!1)));return this.__tabEnabled},get_tabIndex:function(){return this.__tabIndex},set_tabIndex:function(a){if(this.__tabIndex!=a){if(a<-1)throw new we("Parameter tabIndex must be a non-negative number; got "+a);this.__tabIndex=a;this.dispatchEvent(new pa("tabIndexChange",!0,!1))}return this.__tabIndex},__class__:Ja,__properties__:I(ma.prototype.__properties__,{set_tabIndex:"set_tabIndex",
get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var zb=function(){Ja.call(this);this.__tabChildren=this.mouseChildren=!0;this.__children=[];this.__removedChildren=tb.toObjectVector(null)};t["openfl.display.DisplayObjectContainer"]=zb;zb.__name__="openfl.display.DisplayObjectContainer";zb.__super__=Ja;zb.prototype=I(Ja.prototype,{mouseChildren:null,__removedChildren:null,__tabChildren:null,addChild:function(a){return this.addChildAt(a,this.get_numChildren())},
addChildAt:function(a,b){if(a==null)throw a=new Ce("Error #2007: Parameter child must be non-null."),a.errorID=2007,a;if(a==this)throw a=new Cb("Error #2024: An object cannot be added as a child of itself."),a.errorID=2024,a;if(a.stage==a)throw a=new Cb("Error #3783: A Stage object cannot be added as the child of another object."),a.errorID=3783,a;if(b>this.__children.length||b<0)throw ba.thrown("Invalid index position "+b);if(a.parent==this)this.__children[b]!=a&&(V.remove(this.__children,a),this.__children.splice(b,
0,a),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));else{a.parent!=null&&a.parent.removeChild(a);this.__children.splice(b,0,a);a.parent=this;(b=this.stage!=null&&a.stage==null)&&a.__setStageReference(this.stage);a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());var c=new pa("added");c.bubbles=!0;c.target=a;a.__dispatchWithCapture(c);b&&(c=new pa("addedToStage",
!1,!1),a.__dispatchWithCapture(c),a.__dispatchChildren(c))}return a},areInaccessibleObjectsUnderPoint:function(a){return!1},contains:function(a){for(;a!=this&&a!=null;)a=a.parent;return a==this},getChildAt:function(a){return a>=0&&a<this.__children.length?this.__children[a]:null},getChildByName:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},getChildIndex:function(a){for(var b=0,c=this.__children.length;b<c;){var d=b++;if(this.__children[d]==
a)return d}return-1},getObjectsUnderPoint:function(a){var b=[];this.__hitTest(a.x,a.y,!1,b,!1,this);b.reverse();return b},removeChild:function(a){if(a!=null&&a.parent==this){a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());var b=new pa("removed",!0);a.__dispatchWithCapture(b);this.stage!=null&&(a.stage!=null&&this.stage.get_focus()==a&&this.stage.set_focus(null),b=new pa("removedFromStage",
!1,!1),a.__dispatchWithCapture(b),a.__dispatchChildren(b),a.__setStageReference(null));a.parent=null;V.remove(this.__children,a);this.__removedChildren.push(a);a.__setTransformDirty()}return a},removeChildAt:function(a){return a>=0&&a<this.__children.length?this.removeChild(this.__children[a]):null},removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);if(b==2147483647&&(b=this.__children.length-1,b<0))return;if(!(a>this.__children.length-1)){if(b<a||a<0||b>this.__children.length)throw new we("The supplied index is out of bounds.");
for(b-=a;b>=0;)this.removeChildAt(a),--b}},resolve:function(a){if(this.__children==null)return null;for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},setChildIndex:function(a,b){b>=0&&b<=this.__children.length&&a.parent==this&&(V.remove(this.__children,a),this.__children.splice(b,0,a))},stopAllMovieClips:function(){this.__stopAllMovieClips()},swapChildren:function(a,b){if(a.parent==this&&b.parent==this){var c=this.__children.indexOf(a),d=this.__children.indexOf(b);
this.__children[c]=b;this.__children[d]=a;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},swapChildrenAt:function(a,b){var c=this.__children[a];this.__children[a]=this.__children[b];this.__children[b]=c;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__cleanup:function(){Ja.prototype.__cleanup.call(this);for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__cleanup()}for(a=this.__removedChildren.iterator();a.hasNext();)b=a.next(),b.stage==
null&&b.__cleanup();this.__removedChildren.set_length(0)},__cleanupRemovedChildren:function(){for(var a=this.__removedChildren.iterator();a.hasNext();){var b=a.next();b.stage==null&&b.__cleanup()}this.__removedChildren.set_length(0)},__dispatchChildren:function(a){if(this.__children!=null)for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;a.target=d;if(!d.__dispatchWithCapture(a))break;d.__dispatchChildren(a)}},__enterFrame:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];
++b;d.__enterFrame(a)}},__getBounds:function(a,b){Ja.prototype.__getBounds.call(this,a,b);if(this.__children.length!=0){for(var c=gb.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(g.__scaleX!=0||g.__scaleY!=0){var h=g.__transform;c.a=h.a*b.a+h.b*b.c;c.b=h.a*b.b+h.b*b.d;c.c=h.c*b.a+h.d*b.c;c.d=h.c*b.b+h.d*b.d;c.tx=h.tx*b.a+h.ty*b.c+b.tx;c.ty=h.tx*b.b+h.ty*b.d+b.ty;g.__getBounds(a,c)}}gb.__pool.release(c)}},__getFilterBounds:function(a,b){Ja.prototype.__getFilterBounds.call(this,
a,b);if(this.__scrollRect==null&&this.__children.length!=0){for(var c=gb.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(g.__scaleX!=0&&g.__scaleY!=0&&!g.__isMask){var h=g.__transform;c.a=h.a*b.a+h.b*b.c;c.b=h.a*b.b+h.b*b.d;c.c=h.c*b.a+h.d*b.c;c.d=h.c*b.b+h.d*b.d;c.tx=h.tx*b.a+h.ty*b.c+b.tx;c.ty=h.tx*b.b+h.ty*b.d+b.ty;h=Ia.__pool.get();g.__getFilterBounds(h,c);a.__expand(h.x,h.y,h.width,h.height);Ia.__pool.release(h)}}gb.__pool.release(c)}},__getRenderBounds:function(a,b){if(this.__scrollRect!=
null)Ja.prototype.__getRenderBounds.call(this,a,b);else if(Ja.prototype.__getBounds.call(this,a,b),this.__children.length!=0){for(var c=gb.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(g.__scaleX!=0&&g.__scaleY!=0&&!g.__isMask){var h=g.__transform;c.a=h.a*b.a+h.b*b.c;c.b=h.a*b.b+h.b*b.d;c.c=h.c*b.a+h.d*b.c;c.d=h.c*b.b+h.d*b.d;c.tx=h.tx*b.a+h.ty*b.c+b.tx;c.ty=h.tx*b.b+h.ty*b.d+b.ty;g.__getRenderBounds(a,c)}}gb.__pool.release(c)}},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||
this.__isMask||f&&!this.mouseEnabled&&!this.mouseChildren||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;if(this.__scrollRect!=null){var h=Ea.__pool.get();h.setTo(a,b);var n=this.__getRenderTransform(),l=n.a*n.d-n.b*n.c;if(l==0)h.x=-n.tx,h.y=-n.ty;else{var q=1/l*(n.c*(n.ty-h.y)+n.d*(h.x-n.tx));h.y=1/l*(n.a*(h.y-n.ty)+n.b*(n.tx-h.x));h.x=q}if(!this.__scrollRect.containsPoint(h))return Ea.__pool.release(h),!1;Ea.__pool.release(h)}h=this.__children.length;if(f)if(d==null||!this.mouseChildren)for(;--h>=
0;){if(this.__children[h].__hitTest(a,b,c,null,!0,this.__children[h]))return d!=null&&d.push(g),!0}else{if(d!=null){f=d.length;for(l=!1;--h>=0&&!(((n=this.__children[h].__getInteractive(null))||this.mouseEnabled&&!l)&&this.__children[h].__hitTest(a,b,c,d,!0,this.__children[h])&&(l=!0,n&&d.length>f)););if(l)return d.splice(f,0,g),!0}}else{for(l=!1;--h>=0&&(!this.__children[h].__hitTest(a,b,c,d,!1,this.__children[h])||(l=!0,d!=null)););return l}return!1},__hitTestMask:function(a,b){for(var c=this.__children.length;--c>=
0;)if(this.__children[c].__hitTestMask(a,b))return!0;return!1},__readGraphicsData:function(a,b){Ja.prototype.__readGraphicsData.call(this,a,b);if(b)for(var c=0,d=this.__children;c<d.length;){var f=d[c];++c;f.__readGraphicsData(a,b)}},__setStageReference:function(a){Ja.prototype.__setStageReference.call(this,a);if(this.__children!=null)for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__setStageReference(a)}},__setWorldTransformInvalid:function(){if(!this.__worldTransformInvalid&&(this.__worldTransformInvalid=
!0,this.__children!=null))for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__setWorldTransformInvalid()}},__stopAllMovieClips:function(){for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__stopAllMovieClips()}},__tabTest:function(a){Ja.prototype.__tabTest.call(this,a);if(this.get_tabChildren())for(var b,c=0,d=this.__children;c<d.length;){var f=d[c];++c;if(b=f.__getInteractive(null))b=f,b.__tabTest(a)}},__update:function(a,b){Ja.prototype.__update.call(this,a,b);if(b){b=0;for(var c=
this.__children;b<c.length;){var d=c[b];++b;d.__update(a,!0)}}},get_numChildren:function(){return this.__children.length},get_tabChildren:function(){return this.__tabChildren},set_tabChildren:function(a){this.__tabChildren!=a&&(this.__tabChildren=a,this.dispatchEvent(new pa("tabChildrenChange",!0,!1)));return this.__tabChildren},__class__:zb,__properties__:I(Ja.prototype.__properties__,{set_tabChildren:"set_tabChildren",get_tabChildren:"get_tabChildren",get_numChildren:"get_numChildren"})});var Da=
function(){zb.call(this);this.__drawableType=4;this.__buttonMode=!1;this.useHandCursor=!0;if(this.__pendingBindLibrary!=null){var a=this.__pendingBindLibrary,b=this.__pendingBindClassName;this.__pendingBindClassName=this.__pendingBindLibrary=null;a.bind(b,this)}else Da.__constructor!=null&&(a=Da.__constructor,Da.__constructor=null,a(this))};t["openfl.display.Sprite"]=Da;Da.__name__="openfl.display.Sprite";Da.fromTimeline=function(a){var b=new Da;a.initializeSprite(b);return b};Da.__super__=zb;Da.prototype=
I(zb.prototype,{dropTarget:null,hitArea:null,useHandCursor:null,__buttonMode:null,__pendingBindClassName:null,__pendingBindLibrary:null,startDrag:function(a,b){a==null&&(a=!1);this.stage!=null&&this.stage.__startDrag(this,a,b)},stopDrag:function(){this.stage!=null&&this.stage.__stopDrag(this)},__setStageReference:function(a){this.stage!=a&&this.stage!=null&&this.stage.__dragObject==this&&this.stopDrag();zb.prototype.__setStageReference.call(this,a)},__bind:function(a,b){this.__worldTransform==null?
(this.__pendingBindLibrary=a,this.__pendingBindClassName=b):a!=null&&b!=null&&a.bind(b,this)||Vb.error('Cannot bind class name "'+b+'"',{fileName:"openfl/display/Sprite.hx",lineNumber:297,className:"openfl.display.Sprite",methodName:"__bind"})},__getCursor:function(){return this.__buttonMode&&this.useHandCursor?"button":null},__hitTest:function(a,b,c,d,f,g){if(f&&!this.mouseEnabled&&!this.mouseChildren)return!1;if(!g.get_visible()||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,
b))return this.__hitTestHitArea(a,b,c,d,f,g);if(this.__scrollRect!=null){var h=Ea.__pool.get();h.setTo(a,b);var n=this.__getRenderTransform(),l=n.a*n.d-n.b*n.c;if(l==0)h.x=-n.tx,h.y=-n.ty;else{var q=1/l*(n.c*(n.ty-h.y)+n.d*(h.x-n.tx));h.y=1/l*(n.a*(h.y-n.ty)+n.b*(n.tx-h.x));h.x=q}if(!this.__scrollRect.containsPoint(h))return Ea.__pool.release(h),this.__hitTestHitArea(a,b,c,d,!0,g);Ea.__pool.release(h)}return zb.prototype.__hitTest.call(this,a,b,c,d,f,g)?d!=null?f:!0:this.hitArea==null&&this.__graphics!=
null&&this.__graphics.__hitTest(a,b,c,this.__getRenderTransform())?(d==null||f&&!this.mouseEnabled||d.push(g),!0):this.__hitTestHitArea(a,b,c,d,f,g)},__hitTestHitArea:function(a,b,c,d,f,g){return this.hitArea==null||this.hitArea.mouseEnabled?!1:(this.hitArea.mouseEnabled=!0,a=this.hitArea.__hitTest(a,b,c,null,!0,g),this.hitArea.mouseEnabled=!1,d!=null&&a&&(d[d.length]=g),a)},__hitTestMask:function(a,b){return zb.prototype.__hitTestMask.call(this,a,b)||this.__graphics!=null&&this.__graphics.__hitTest(a,
b,!0,this.__getRenderTransform())?!0:!1},get_graphics:function(){this.__graphics==null&&(this.__graphics=new Mh(this));return this.__graphics},get_tabEnabled:function(){return this.__tabEnabled==null?this.__buttonMode:this.__tabEnabled},get_buttonMode:function(){return this.__buttonMode},set_buttonMode:function(a){return this.__buttonMode=a},__class__:Da,__properties__:I(zb.prototype.__properties__,{get_graphics:"get_graphics",set_buttonMode:"set_buttonMode",get_buttonMode:"get_buttonMode"})});var da=
function(){};t["feathers.core.IValidating"]=da;da.__name__="feathers.core.IValidating";da.__isInterface__=!0;da.prototype={get_depth:null,validateNow:null,__class__:da,__properties__:{get_depth:"get_depth"}};var Vd=function(){this._ignoreInvalidationFlags=this._setInvalidationFlagsOnly=!1;this._depth=-1;this._validationQueue=null;this._setInvalidCount=0;this._delayedInvalidationFlags=new cf;this._invalidationFlags=new cf;this._validating=this._allInvalid=this._allInvalidDelayed=!1;Da.call(this);this.addEventListener("addedToStage",
m(this,this.validatingSprite_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.validatingSprite_removedFromStageHandler))};t["feathers.core.ValidatingSprite"]=Vd;Vd.__name__="feathers.core.ValidatingSprite";Vd.__interfaces__=[da];Vd.__super__=Da;Vd.prototype=I(Da.prototype,{_validating:null,get_validating:function(){return this._validating},_allInvalid:null,_allInvalidDelayed:null,_invalidationFlags:null,_delayedInvalidationFlags:null,_setInvalidCount:null,_validationQueue:null,
_depth:null,get_depth:function(){return this._depth},isInvalid:function(a){return this._allInvalid?!0:a==null?this._invalidationFlags.keys().hasNext():this._invalidationFlags.exists(a)},_ignoreInvalidationFlags:null,runWithoutInvalidation:function(a){var b=this._ignoreInvalidationFlags;this._ignoreInvalidationFlags=!0;a();this._ignoreInvalidationFlags=b},_setInvalidationFlagsOnly:null,runWithInvalidationFlagsOnly:function(a){var b=this._setInvalidationFlagsOnly;this._setInvalidationFlagsOnly=!0;a();
this._setInvalidationFlagsOnly=b},setInvalid:function(a){if(!this._ignoreInvalidationFlags)if(this._setInvalidationFlagsOnly)a==null?this._allInvalid=!0:this.setInvalidationFlag(a);else{var b=this.isInvalid(),c=!1;this._validating&&(c=this._delayedInvalidationFlags.keys().hasNext());a==null?this._validating?this._allInvalidDelayed=!0:this._allInvalid=!0:this._validating?this._delayedInvalidationFlags.set(a,!0):a==null||this._invalidationFlags.exists(a)||this._invalidationFlags.set(a,!0);if(this._validationQueue!=
null)if(this._validating){if(!c){this._setInvalidCount++;if(this._setInvalidCount>=10)throw a=w.getClass(this),new ob(a.__name__+" returned to validation queue too many times during validation. This may be an infinite loop. Try to avoid doing anything that calls setInvalid() during validation.");this._validationQueue.addControl(this)}}else b||(this._setInvalidCount=0,this._validationQueue.addControl(this))}},validateNow:function(){if(this.isInvalid()&&!this._validating){this._validating=!0;this.update();
this._allInvalid=this._allInvalidDelayed;this._allInvalidDelayed=!1;this._invalidationFlags.clear();for(var a=this._delayedInvalidationFlags.keys();a.hasNext();){var b=a.next();this._invalidationFlags.set(b,!0)}this._delayedInvalidationFlags.clear();this._validating=!1}},setInvalidationFlag:function(a){this._ignoreInvalidationFlags||this._invalidationFlags.exists(a)||this._invalidationFlags.set(a,!0)},update:function(){},validatingSprite_addedToStageHandler:function(a){this._depth=Zg.getDisplayObjectDepthFromStage(this);
this._validationQueue=gk.forStage(this.stage);this._validationQueue!=null&&this.isInvalid()&&(this._setInvalidCount=0,this._validationQueue.addControl(this))},validatingSprite_removedFromStageHandler:function(a){this._depth=-1;this._validationQueue=null},__class__:Vd,__properties__:I(Da.prototype.__properties__,{get_depth:"get_depth",get_validating:"get_validating"})});var dd=function(){};t["feathers.core.IDisplayObject"]=dd;dd.__name__="feathers.core.IDisplayObject";dd.__isInterface__=!0;dd.__interfaces__=
[Db];dd.prototype={get_x:null,set_x:null,get_y:null,set_y:null,get_alpha:null,set_alpha:null,get_width:null,set_width:null,get_height:null,set_height:null,get_scaleX:null,set_scaleX:null,get_scaleY:null,set_scaleY:null,get_visible:null,set_visible:null,parent:null,stage:null,__class__:dd,__properties__:{set_visible:"set_visible",get_visible:"get_visible",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_height:"set_height",get_height:"get_height",
set_width:"set_width",get_width:"get_width",set_alpha:"set_alpha",get_alpha:"get_alpha",set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}};var rb=function(){};t["feathers.core.IMeasureObject"]=rb;rb.__name__="feathers.core.IMeasureObject";rb.__isInterface__=!0;rb.__interfaces__=[dd];rb.prototype={get_explicitWidth:null,get_explicitHeight:null,get_explicitMinWidth:null,get_explicitMinHeight:null,get_explicitMaxWidth:null,get_explicitMaxHeight:null,get_minWidth:null,set_minWidth:null,get_minHeight:null,
set_minHeight:null,get_maxWidth:null,set_maxWidth:null,get_maxHeight:null,set_maxHeight:null,resetWidth:null,resetHeight:null,resetMinWidth:null,resetMinHeight:null,resetMaxWidth:null,resetMaxHeight:null,__class__:rb,__properties__:{set_maxHeight:"set_maxHeight",get_maxHeight:"get_maxHeight",set_maxWidth:"set_maxWidth",get_maxWidth:"get_maxWidth",set_minHeight:"set_minHeight",get_minHeight:"get_minHeight",set_minWidth:"set_minWidth",get_minWidth:"get_minWidth",get_explicitMaxHeight:"get_explicitMaxHeight",
get_explicitMaxWidth:"get_explicitMaxWidth",get_explicitMinHeight:"get_explicitMinHeight",get_explicitMinWidth:"get_explicitMinWidth",get_explicitHeight:"get_explicitHeight",get_explicitWidth:"get_explicitWidth"}};var Ad=function(){this._explicitWidth=this._explicitHeight=this._explicitMinWidth=this._explicitMinHeight=this._explicitMaxWidth=this._explicitMaxHeight=null;this.scaledActualMaxHeight=1/0;this.scaledActualMaxWidth=1/0;this.scaledActualWidth=this.scaledActualHeight=this.scaledActualMinWidth=
this.scaledActualMinHeight=0;this.actualMaxHeight=1/0;this.actualMaxWidth=1/0;this.actualWidth=this.actualHeight=this.actualMinWidth=this.actualMinHeight=0;Vd.call(this)};t["feathers.core.MeasureSprite"]=Ad;Ad.__name__="feathers.core.MeasureSprite";Ad.__interfaces__=[rb];Ad.__super__=Vd;Ad.prototype=I(Vd.prototype,{actualWidth:null,actualHeight:null,actualMinWidth:null,actualMinHeight:null,actualMaxWidth:null,actualMaxHeight:null,scaledActualWidth:null,scaledActualHeight:null,scaledActualMinWidth:null,
scaledActualMinHeight:null,scaledActualMaxWidth:null,scaledActualMaxHeight:null,get_width:function(){return this.scaledActualWidth},set_width:function(a){this.get_scaleX()!=1&&(a/=this.get_scaleX());this.set_explicitWidth(a);return this.scaledActualWidth},get_height:function(){return this.scaledActualHeight},set_height:function(a){this.get_scaleY()!=1&&(a/=this.get_scaleY());this.set_explicitHeight(a);return this.scaledActualHeight},set_scaleX:function(a){Vd.prototype.set_scaleX.call(this,a);this.saveMeasurements(this.actualWidth,
this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight);return this.get_scaleX()},set_scaleY:function(a){Vd.prototype.set_scaleY.call(this,a);this.saveMeasurements(this.actualWidth,this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight);return this.get_scaleY()},_explicitWidth:null,get_explicitWidth:function(){return this._explicitWidth},set_explicitWidth:function(a){if(this._explicitWidth==a)return this._explicitWidth;
this._explicitWidth=a;a==null?(this.scaledActualWidth=this.actualWidth=0,this.setInvalid(x.SIZE)):this.saveMeasurements(a,this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight)&&this.setInvalid(x.SIZE);return this._explicitWidth},_explicitHeight:null,get_explicitHeight:function(){return this._explicitHeight},set_explicitHeight:function(a){if(this._explicitHeight==a)return this._explicitHeight;this._explicitHeight=a;a==null?(this.scaledActualHeight=this.actualHeight=
0,this.setInvalid(x.SIZE)):this.saveMeasurements(this.actualWidth,a,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight)&&this.setInvalid(x.SIZE);return this._explicitHeight},_explicitMinWidth:null,get_explicitMinWidth:function(){return this._explicitMinWidth},set_explicitMinWidth:function(a){if(this._explicitMinWidth==a)return this._explicitMinWidth;var b=this._explicitMinWidth;this._explicitMinWidth=a;if(a==null)this.scaledActualMinWidth=this.actualMinWidth=0,this.setInvalid(x.SIZE);
else{var c=this.actualWidth;this.saveMeasurements(this.actualWidth,this.actualHeight,a,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight);this._explicitWidth==null&&(c<a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMinWidth},_explicitMinHeight:null,get_explicitMinHeight:function(){return this._explicitMinHeight},set_explicitMinHeight:function(a){if(this._explicitMinHeight==a)return this._explicitMinHeight;var b=this._explicitMinHeight;this._explicitMinHeight=a;if(a==null)this.scaledActualMinHeight=
this.actualMinHeight=0,this.setInvalid(x.SIZE);else{var c=this.actualHeight;this.saveMeasurements(this.actualWidth,this.actualHeight,this.actualMinWidth,a,this.actualMaxWidth,this.actualMaxHeight);this._explicitHeight==null&&(c<a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMinHeight},get_minWidth:function(){return this.scaledActualMinWidth},set_minWidth:function(a){this.get_scaleX()!=1&&(a/=this.get_scaleX());this.set_explicitMinWidth(a);return this.scaledActualMinWidth},get_minHeight:function(){return this.scaledActualMinHeight},
set_minHeight:function(a){this.get_scaleY()!=1&&(a/=this.get_scaleY());this.set_explicitMinHeight(a);return this.scaledActualMinHeight},_explicitMaxWidth:null,get_explicitMaxWidth:function(){return this._explicitMaxWidth},set_explicitMaxWidth:function(a){if(this._explicitMaxWidth==a)return this._explicitMaxWidth;var b=this._explicitMaxWidth;this._explicitMaxWidth=a;if(a==null)this.actualMaxWidth=1/0,this.scaledActualMaxWidth=1/0,this.setInvalid(x.SIZE);else{var c=this.actualWidth;this.saveMeasurements(this.actualWidth,
this.actualHeight,this.actualMinWidth,this.actualMinHeight,a,this.actualMaxHeight);this._explicitWidth==null&&(c>a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMaxWidth},_explicitMaxHeight:null,get_explicitMaxHeight:function(){return this._explicitMaxHeight},set_explicitMaxHeight:function(a){if(this._explicitMaxHeight==a)return this._explicitMaxHeight;var b=this._explicitMaxHeight;this._explicitMaxHeight=a;if(a==null)this.actualMaxHeight=1/0,this.scaledActualMaxHeight=1/0,this.setInvalid(x.SIZE);
else{var c=this.actualHeight;this.saveMeasurements(this.actualWidth,this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,a);this._explicitHeight==null&&(c>a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMaxHeight},get_maxWidth:function(){return this.scaledActualMaxWidth},set_maxWidth:function(a){this.get_scaleX()!=1&&(a/=this.get_scaleX());this.set_explicitMaxWidth(a);return this.scaledActualMaxWidth},get_maxHeight:function(){return this.scaledActualMaxHeight},set_maxHeight:function(a){this.get_scaleY()!=
1&&(a/=this.get_scaleY());this.set_explicitMaxHeight(a);return this.scaledActualMaxHeight},resetWidth:function(){this.set_explicitWidth(null)},resetHeight:function(){this.set_explicitHeight(null)},resetMinWidth:function(){this.set_explicitMinWidth(null)},resetMinHeight:function(){this.set_explicitMinHeight(null)},resetMaxWidth:function(){this.set_explicitMaxWidth(null)},resetMaxHeight:function(){this.set_explicitMaxHeight(null)},__getBoundsHelperMatrix1:null,__getBoundsHelperMatrix2:null,getBounds:function(a){this.__getBoundsHelperMatrix1==
null?this.__getBoundsHelperMatrix1=new gb:this.__getBoundsHelperMatrix1.identity();if(a!=null&&a!=this){this.__getBoundsHelperMatrix2==null&&(this.__getBoundsHelperMatrix2=new gb);var b=this.__getWorldTransform();this.__getBoundsHelperMatrix1.copyFrom(b);a=a.__getWorldTransform();this.__getBoundsHelperMatrix2.copyFrom(a);this.__getBoundsHelperMatrix2.invert();this.__getBoundsHelperMatrix1.concat(this.__getBoundsHelperMatrix2);this.__getBoundsHelperMatrix2.identity()}a=this.__getBoundsHelperMatrix1.tx;
b=this.__getBoundsHelperMatrix1.ty;var c=this.actualWidth*this.__getBoundsHelperMatrix1.a+this.actualHeight*this.__getBoundsHelperMatrix1.c+this.__getBoundsHelperMatrix1.tx-a,d=this.actualWidth*this.__getBoundsHelperMatrix1.b+this.actualHeight*this.__getBoundsHelperMatrix1.d+this.__getBoundsHelperMatrix1.ty-b;this.__getBoundsHelperMatrix1.identity();return new Ia(a,b,c,d)},saveMeasurements:function(a,b,c,d,f,g){d==null&&(d=0);c==null&&(c=0);f==null&&(f=1/0);g==null&&(g=1/0);this._explicitMinWidth!=
null&&(c=this._explicitMinWidth);this._explicitMinHeight!=null&&(d=this._explicitMinHeight);this._explicitMaxWidth!=null?f=this._explicitMaxWidth:f==null&&(f=1/0);this._explicitMaxHeight!=null?g=this._explicitMaxHeight:g==null&&(g=1/0);this._explicitMaxWidth==null&&f<c&&(f=c);this._explicitMinWidth==null&&c>f&&(c=f);this._explicitMaxHeight==null&&g<d&&(g=d);this._explicitMinHeight==null&&d>g&&(d=g);this._explicitWidth!=null?a=this._explicitWidth:a<c?a=c:a>f&&(a=f);this._explicitHeight!=null?b=this._explicitHeight:
b<d?b=d:b>g&&(b=g);var h=this.get_scaleX();h<0&&(h=-h);var n=this.get_scaleY();n<0&&(n=-n);var l=!1;this.actualWidth!=a&&(this.actualWidth=a,l=!0);this.actualHeight!=b&&(this.actualHeight=b,l=!0);this.actualMinWidth!=c&&(this.actualMinWidth=c,l=!0);this.actualMinHeight!=d&&(this.actualMinHeight=d,l=!0);this.actualMaxWidth!=f&&(this.actualMaxWidth=f,l=!0);this.actualMaxHeight!=g&&(this.actualMaxHeight=g,l=!0);a=this.scaledActualWidth;b=this.scaledActualHeight;this.scaledActualWidth=this.actualWidth*
h;this.scaledActualHeight=this.actualHeight*n;this.scaledActualMinWidth=this.actualMinWidth*h;this.scaledActualMinHeight=this.actualMinHeight*n;this.scaledActualMaxWidth=this.actualMaxWidth*h;this.scaledActualMaxHeight=this.actualMaxHeight*n;if(a!=this.scaledActualWidth||b!=this.scaledActualHeight)l=!0,Y.dispatch(this,"resize");return l},__class__:Ad,__properties__:I(Vd.prototype.__properties__,{set_maxHeight:"set_maxHeight",get_maxHeight:"get_maxHeight",set_maxWidth:"set_maxWidth",get_maxWidth:"get_maxWidth",
set_explicitMaxHeight:"set_explicitMaxHeight",get_explicitMaxHeight:"get_explicitMaxHeight",set_explicitMaxWidth:"set_explicitMaxWidth",get_explicitMaxWidth:"get_explicitMaxWidth",set_minHeight:"set_minHeight",get_minHeight:"get_minHeight",set_minWidth:"set_minWidth",get_minWidth:"get_minWidth",set_explicitMinHeight:"set_explicitMinHeight",get_explicitMinHeight:"get_explicitMinHeight",set_explicitMinWidth:"set_explicitMinWidth",get_explicitMinWidth:"get_explicitMinWidth",set_explicitHeight:"set_explicitHeight",
get_explicitHeight:"get_explicitHeight",set_explicitWidth:"set_explicitWidth",get_explicitWidth:"get_explicitWidth"})});var T=function(){};t["feathers.layout.ILayoutObject"]=T;T.__name__="feathers.layout.ILayoutObject";T.__isInterface__=!0;T.__interfaces__=[Db];T.prototype={get_includeInLayout:null,set_includeInLayout:null,get_layoutData:null,set_layoutData:null,__class__:T,__properties__:{set_layoutData:"set_layoutData",get_layoutData:"get_layoutData",set_includeInLayout:"set_includeInLayout",get_includeInLayout:"get_includeInLayout"}};
var Bd=function(){};t["feathers.style.IStyleObject"]=Bd;Bd.__name__="feathers.style.IStyleObject";Bd.__isInterface__=!0;Bd.prototype={get_themeEnabled:null,set_themeEnabled:null,__class__:Bd,__properties__:{set_themeEnabled:"set_themeEnabled",get_themeEnabled:"get_themeEnabled"}};var nd=function(){};t["feathers.style.IVariantStyleObject"]=nd;nd.__name__="feathers.style.IVariantStyleObject";nd.__isInterface__=!0;nd.__interfaces__=[Bd];nd.prototype={get_styleContext:null,get_variant:null,set_variant:null,
__class__:nd,__properties__:{set_variant:"set_variant",get_variant:"get_variant",get_styleContext:"get_styleContext"}};var Fa=function(){};t["feathers.core.IUIControl"]=Fa;Fa.__name__="feathers.core.IUIControl";Fa.__isInterface__=!0;Fa.__interfaces__=[dd];Fa.prototype={get_enabled:null,set_enabled:null,get_toolTip:null,set_toolTip:null,initializeNow:null,dispose:null,__class__:Fa,__properties__:{set_toolTip:"set_toolTip",get_toolTip:"get_toolTip",set_enabled:"set_enabled",get_enabled:"get_enabled"}};
var fa=function(){this._restrictedStyles=[];this._styleProviderStyles=[];this._applyingStyles=this._clearingStyles=!1;this._focusPaddingTop=this._focusPaddingRight=this._focusPaddingBottom=this._focusPaddingLeft=0;this._focusRectSkin=null;this._alwaysShowFocus=!1;this._currentFocusRectSkin=null;this._focusEnabled=!0;this._disabledAlpha=this._focusManager=null;this._explicitAlpha=1;this._includeInLayout=!0;this._currentStyleProvider=this._customStyleProvider=null;this._themeEnabled=!0;this._toolTip=
null;this._enabled=!0;this._waitingToApplyStyles=this._initializing=this._initialized=this._created=!1;Ad.call(this);this.set_tabEnabled(w.__implements(this,qd));this.addEventListener("addedToStage",m(this,this.feathersControl_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.feathersControl_removedFromStageHandler));this.addEventListener("focusIn",m(this,this.feathersControl_focusInHandler));this.addEventListener("focusOut",m(this,this.feathersControl_focusOutHandler))};
t["feathers.core.FeathersControl"]=fa;fa.__name__="feathers.core.FeathersControl";fa.__interfaces__=[T,nd,Fa];fa.__super__=Ad;fa.prototype=I(Ad.prototype,{_waitingToApplyStyles:null,_initializing:null,_initialized:null,get_initialized:function(){return this._initialized},_created:null,get_created:function(){return this._created},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){if(this._enabled==a)return this._enabled;(this._enabled=a)||this._disabledAlpha==null?Ad.prototype.set_alpha.call(this,
this._explicitAlpha):this._enabled||this._disabledAlpha==null||Ad.prototype.set_alpha.call(this,this._disabledAlpha);this.setInvalid(x.STATE);this._enabled?Y.dispatch(this,"enable"):Y.dispatch(this,"disable");return this._enabled},_toolTip:null,get_toolTip:function(){return this._toolTip},set_toolTip:function(a){return this._toolTip==a?this._toolTip:this._toolTip=a},_themeEnabled:null,get_themeEnabled:function(){return this._themeEnabled},set_themeEnabled:function(a){if(this._themeEnabled==a)return this._themeEnabled;
this._themeEnabled=a;this._initialized&&this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0;this.setInvalid(x.STYLES);return this._themeEnabled},_currentStyleProvider:null,_customStyleProvider:null,get_styleProvider:function(){return this._customStyleProvider!=null?this._customStyleProvider:this._currentStyleProvider},set_styleProvider:function(a){if(this._customStyleProvider==a)return this._customStyleProvider;this._customStyleProvider!=null&&this._customStyleProvider.removeEventListener("clear",
m(this,this.feathersControl_customStyleProvider_clearHandler));this._customStyleProvider=a;this._customStyleProvider!=null&&this._customStyleProvider.addEventListener("clear",m(this,this.feathersControl_customStyleProvider_clearHandler),!1,0,!0);this._initialized&&this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0;this.setInvalid(x.STYLES);return this._customStyleProvider},get_styleContext:function(){return null},_includeInLayout:null,get_includeInLayout:function(){return this._includeInLayout},
set_includeInLayout:function(a){if(this._includeInLayout==a)return this._includeInLayout;this._includeInLayout=a;Y.dispatch(this,"layoutDataChange");return this._includeInLayout},_layoutData:null,get_layoutData:function(){return this._layoutData},set_layoutData:function(a){if(!this.setStyle("layoutData"))return this._layoutData;this._previousClearStyle=m(this,this.clearStyle_layoutData);return this.setLayoutDataInternal(a)},_explicitAlpha:null,set_alpha:function(a){this._explicitAlpha=a;(this._enabled||
this._disabledAlpha==null)&&Ad.prototype.set_alpha.call(this,a);return this._explicitAlpha},_disabledAlpha:null,get_disabledAlpha:function(){return this._disabledAlpha},set_disabledAlpha:function(a){if(!this.setStyle("disabledAlpha"))return this._disabledAlpha;this._previousClearStyle=m(this,this.clearStyle_disabledAlpha);this._disabledAlpha=a;this._enabled||this._disabledAlpha==null?Ad.prototype.set_alpha.call(this,this._explicitAlpha):this._enabled||this._disabledAlpha==null||Ad.prototype.set_alpha.call(this,
this._disabledAlpha);return this._disabledAlpha},_focusManager:null,get_focusManager:function(){return this._focusManager},set_focusManager:function(a){if(this._focusManager==a)return this._focusManager;this._focusManager!=null&&this.showFocus(!1);return this._focusManager=a},_focusOwner:null,get_focusOwner:function(){return this._focusOwner},set_focusOwner:function(a){return this._focusOwner==a?this._focusOwner:this._focusOwner=a},get_rawTabEnabled:function(){return Ad.prototype.get_tabEnabled.call(this)},
_focusEnabled:null,get_focusEnabled:function(){return this._enabled?this._focusEnabled:!1},set_focusEnabled:function(a){return this._focusEnabled==a?this._focusEnabled:this._focusEnabled=a},get_tabEnabled:function(){return this._enabled?Ad.prototype.get_tabEnabled.call(this):!1},_currentFocusRectSkin:null,_alwaysShowFocus:null,get_alwaysShowFocus:function(){return this._alwaysShowFocus},set_alwaysShowFocus:function(a){if(!this.setStyle("alwaysShowFocus"))return this._alwaysShowFocus;var b=this._focusManager!=
null&&w.__implements(this,qd)&&this._focusManager.get_focus()==this||this._focusRectSkin.parent!=null;b&&this.showFocus(!1);this._alwaysShowFocus=a;b&&this.showFocus(!0);return this._alwaysShowFocus},_focusRectSkin:null,get_focusRectSkin:function(){return this._focusRectSkin},set_focusRectSkin:function(a){if(!this.setStyle("focusRectSkin"))return this._focusRectSkin;this.showFocus(!1);this._previousClearStyle=m(this,this.clearStyle_focusRectSkin);return this._focusRectSkin=a},_focusPaddingTop:null,
get_focusPaddingTop:function(){return this._focusPaddingTop},set_focusPaddingTop:function(a){if(!this.setStyle("focusPaddingTop"))return this._focusPaddingTop;this._previousClearStyle=m(this,this.clearStyle_focusPaddingTop);return this._focusPaddingTop=a},_focusPaddingRight:null,get_focusPaddingRight:function(){return this._focusPaddingRight},set_focusPaddingRight:function(a){if(!this.setStyle("focusPaddingRight"))return this._focusPaddingRight;this._previousClearStyle=m(this,this.clearStyle_focusPaddingRight);
return this._focusPaddingRight=a},_focusPaddingBottom:null,get_focusPaddingBottom:function(){return this._focusPaddingBottom},set_focusPaddingBottom:function(a){if(!this.setStyle("focusPaddingBottom"))return this._focusPaddingBottom;this._previousClearStyle=m(this,this.clearStyle_focusPaddingBottom);return this._focusPaddingBottom=a},_focusPaddingLeft:null,get_focusPaddingLeft:function(){return this._focusPaddingLeft},set_focusPaddingLeft:function(a){if(!this.setStyle("focusPaddingLeft"))return this._focusPaddingLeft;
this._previousClearStyle=m(this,this.clearStyle_focusPaddingLeft);return this._focusPaddingLeft=a},setFocusPadding:function(a){this.set_focusPaddingTop(a);this.set_focusPaddingRight(a);this.set_focusPaddingBottom(a);this.set_focusPaddingLeft(a)},showFocus:function(a){this._currentFocusRectSkin=this.getCurrentFocusRectSkin();this._focusManager!=null&&this._currentFocusRectSkin!=null&&(a?(this._focusManager.get_focusPane().addChild(this._currentFocusRectSkin),this.addEventListener("enterFrame",m(this,
this.feathersControl_focusRect_enterFrameHandler)),this.positionFocusRect()):this._currentFocusRectSkin.parent!=null&&(this.removeEventListener("enterFrame",m(this,this.feathersControl_focusRect_enterFrameHandler)),this._currentFocusRectSkin.parent.removeChild(this._currentFocusRectSkin)))},getCurrentFocusRectSkin:function(){return this._focusRectSkin},clearStyle_layoutData:function(){return this.setLayoutDataInternal(null)},clearStyle_focusRectSkin:function(){this.showFocus(!1);return this._focusRectSkin=
null},clearStyle_disabledAlpha:function(){this._disabledAlpha=null;Ad.prototype.set_alpha.call(this,this._explicitAlpha);return this._disabledAlpha},clearStyle_focusPaddingTop:function(){return this._focusPaddingTop=0},clearStyle_focusPaddingRight:function(){return this._focusPaddingRight=0},clearStyle_focusPaddingBottom:function(){return this._focusPaddingBottom=0},clearStyle_focusPaddingLeft:function(){return this._focusPaddingLeft=0},positionFocusRect:function(){if(this._focusManager!=null&&this._currentFocusRectSkin!=
null&&this._currentFocusRectSkin.parent!=null){var a=new Ea(-this._focusPaddingLeft,-this._focusPaddingTop);a=this.localToGlobal(a);a=this._focusManager.get_focusPane().globalToLocal(a);this._currentFocusRectSkin.set_x(a.x);this._currentFocusRectSkin.set_y(a.y);a.setTo(this.actualWidth+this._focusPaddingRight,this.actualHeight+this._focusPaddingBottom);a=this.localToGlobal(a);a=this._focusManager.get_focusPane().globalToLocal(a);this._currentFocusRectSkin.set_width(a.x-this._currentFocusRectSkin.get_x());
this._currentFocusRectSkin.set_height(a.y-this._currentFocusRectSkin.get_y())}},setLayoutDataInternal:function(a){if(this._layoutData==a)return this._layoutData;this._layoutData!=null&&this._layoutData.removeEventListener("change",m(this,this.feathersControl_layoutData_changeHandler));this._layoutData=a;this._layoutData!=null&&this._layoutData.addEventListener("change",m(this,this.feathersControl_layoutData_changeHandler),!1,0,!0);Y.dispatch(this,"layoutDataChange");return this._layoutData},_variant:null,
get_variant:function(){return this._variant},set_variant:function(a){if(this._variant==a)return this._variant;this._variant=a;this._initialized&&this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0;this.setInvalid(x.STYLES);return this._variant},_applyingStyles:null,_clearingStyles:null,_styleProviderStyles:null,_restrictedStyles:null,validateNow:function(){if(!this._initialized){if(this._initializing)throw new ob("A component cannot validate until after it has finished initializing.");
this.initializeNow()}this._waitingToApplyStyles&&this.applyStyles();Ad.prototype.validateNow.call(this);this._created||(this._created=!0,Y.dispatch(this,"creationComplete"))},initializeNow:function(){this._initialized||this._initializing||(this._initializing=this._waitingToApplyStyles=!0,this.initialize(),this.setInvalid(),this._initializing=!1,this._initialized=!0,Y.dispatch(this,"initialize"))},move:function(a,b){this.set_x(a);this.set_y(b)},setSize:function(a,b){this.set_width(a);this.set_height(b)},
dispose:function(){this.clearStyles();for(var a=0,b=this.get_numChildren();a<b;){var c=a++;c=this.getChildAt(c);w.__implements(c,Fa)&&c.dispose()}},initialize:function(){},setStyle:function(a,b){a=b==null?No.Name(a):No.NameAndState(a,b);b=this.containsStyleDef(this._restrictedStyles,a);if(this._applyingStyles&&b)return!1;this._applyingStyles?this._clearingStyles||this.containsStyleDef(this._styleProviderStyles,a)||this._styleProviderStyles.push(a):b||(!this._clearingStyles&&this.containsStyleDef(this._styleProviderStyles,
a)&&V.remove(this._styleProviderStyles,a),this._restrictedStyles.push(a));return!0},isStyleRestricted:function(a,b){a=b==null?No.Name(a):No.NameAndState(a,b);return this.containsStyleDef(this._restrictedStyles,a)},containsStyleDef:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(ab.enumEq(b,d))return!0}return!1},applyStyles:function(){if(!this._initialized)throw new ob("Cannot apply styles until after a Feathers UI component has initialized.");this._waitingToApplyStyles=!1;var a=this._customStyleProvider;
if(a==null){var b=bc.getTheme(this);b!=null&&(a=b.getStyleProvider(this))}this._themeEnabled&&a==null&&(b=bc.get_fallbackTheme(),b!=null&&(a=b.getStyleProvider(this)));a==null&&(a=this._currentStyleProvider);this._currentStyleProvider!=a&&(this._currentStyleProvider!=null&&(this._currentStyleProvider.removeEventListener("stylesChange",m(this,this.feathersControl_styleProvider_stylesChangeHandler)),this._currentStyleProvider.removeEventListener("clear",m(this,this.feathersControl_styleProvider_clearHandler))),
this._currentStyleProvider=a,this._currentStyleProvider!=null&&(this._currentStyleProvider.addEventListener("stylesChange",m(this,this.feathersControl_styleProvider_stylesChangeHandler),!1,0,!0),this._currentStyleProvider.addEventListener("clear",m(this,this.feathersControl_styleProvider_clearHandler),!1,0,!0)));a=this._applyingStyles;this._applyingStyles=!0;this.clearStyles();this._currentStyleProvider!=null&&this._currentStyleProvider.applyStyles(this);this._applyingStyles=a},_previousClearStyle:null,
clearStyles:function(){var a=this._clearingStyles;this._clearingStyles=!0;for(var b=0,c=this._styleProviderStyles;b<c.length;){var d=c[b];++b;switch(d._hx_index){case 0:d="clearStyle_"+d.name;var f=y.field(this,d);if(f==null)throw new Cb("Missing @style method: '"+d+"'");f.apply(this,[]);break;case 1:f=d.state,y.field(this,d.name).apply(this,[f,null])}}this._styleProviderStyles=[];this._clearingStyles=a},clearStyleProvider:function(){this._currentStyleProvider!=null&&(this._currentStyleProvider.removeEventListener("stylesChange",
m(this,this.feathersControl_styleProvider_stylesChangeHandler)),this._currentStyleProvider.removeEventListener("clear",m(this,this.feathersControl_styleProvider_clearHandler)),this._currentStyleProvider=null,this._waitingToApplyStyles=!0)},feathersControl_addedToStageHandler:function(a){this._initialized||this.initializeNow();this._waitingToApplyStyles&&this.applyStyles()},feathersControl_removedFromStageHandler:function(a){this.showFocus(!1);this.clearStyleProvider()},feathersControl_focusInHandler:function(a){a=
null;w.__implements(this,qd)&&(a=this);this._focusManager!=null&&(this._focusManager.get_showFocusIndicator()||this.get_alwaysShowFocus())&&this._focusManager.get_focus()==a&&this.showFocus(!0)},feathersControl_focusOutHandler:function(a){this._focusManager!=null&&this.showFocus(!1)},feathersControl_styleProvider_stylesChangeHandler:function(a){a.affectsTarget(this)&&(this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0)},feathersControl_customStyleProvider_clearHandler:function(a){this._customStyleProvider.removeEventListener("clear",
m(this,this.feathersControl_customStyleProvider_clearHandler));this._customStyleProvider=null},feathersControl_styleProvider_clearHandler:function(a){this.clearStyleProvider();this.stage!=null&&this.applyStyles()},feathersControl_layoutData_changeHandler:function(a){Y.dispatch(this,"layoutDataChange")},feathersControl_focusRect_enterFrameHandler:function(a){this.positionFocusRect()},__class__:fa,__properties__:I(Ad.prototype.__properties__,{set_variant:"set_variant",get_variant:"get_variant",set_focusPaddingLeft:"set_focusPaddingLeft",
get_focusPaddingLeft:"get_focusPaddingLeft",set_focusPaddingBottom:"set_focusPaddingBottom",get_focusPaddingBottom:"get_focusPaddingBottom",set_focusPaddingRight:"set_focusPaddingRight",get_focusPaddingRight:"get_focusPaddingRight",set_focusPaddingTop:"set_focusPaddingTop",get_focusPaddingTop:"get_focusPaddingTop",set_focusRectSkin:"set_focusRectSkin",get_focusRectSkin:"get_focusRectSkin",set_alwaysShowFocus:"set_alwaysShowFocus",get_alwaysShowFocus:"get_alwaysShowFocus",set_focusEnabled:"set_focusEnabled",
get_focusEnabled:"get_focusEnabled",get_rawTabEnabled:"get_rawTabEnabled",set_focusOwner:"set_focusOwner",get_focusOwner:"get_focusOwner",set_focusManager:"set_focusManager",get_focusManager:"get_focusManager",set_disabledAlpha:"set_disabledAlpha",get_disabledAlpha:"get_disabledAlpha",set_layoutData:"set_layoutData",get_layoutData:"get_layoutData",set_includeInLayout:"set_includeInLayout",get_includeInLayout:"get_includeInLayout",get_styleContext:"get_styleContext",set_styleProvider:"set_styleProvider",
get_styleProvider:"get_styleProvider",set_themeEnabled:"set_themeEnabled",get_themeEnabled:"get_themeEnabled",set_toolTip:"set_toolTip",get_toolTip:"get_toolTip",set_enabled:"set_enabled",get_enabled:"get_enabled",get_created:"get_created",get_initialized:"get_initialized"})});var pb=function(){this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__maskSkin=null;this._layoutActive=this._layoutChanged=!1;this._xmlContent=null;this._autoSizeMode=Ve.CONTENT;this._currentBackgroundSkin=
this._backgroundSkinMeasurements=this._currentMaskSkin=null;this._ignoreChildChanges=this._ignoreChangesButSetFlags=this._ignoreLayoutChanges=!1;this._layoutMeasurements=new Sb;this._layoutResult=new Kg;this.items=[];this.initializeLayoutGroupTheme();fa.call(this);this.addEventListener("addedToStage",m(this,this.layoutGroup_addedToStageHandler))};t["feathers.controls.LayoutGroup"]=pb;pb.__name__="feathers.controls.LayoutGroup";pb.__super__=fa;pb.prototype=I(fa.prototype,{items:null,_layoutResult:null,
_layoutMeasurements:null,_ignoreChildChanges:null,_ignoreChangesButSetFlags:null,_ignoreLayoutChanges:null,_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_currentMaskSkin:null,_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this.stage!=null&&(this._autoSizeMode==Ve.STAGE?(this.stage.addEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler),
!1,0,!0),this.addEventListener("removedFromStage",m(this,this.layoutGroup_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.layoutGroup_removedFromStageHandler))));return this._autoSizeMode},_disabledOverlay:null,_currentLayout:null,get_numChildren:function(){return this.items.length},get__numChildren:function(){return fa.prototype.get_numChildren.call(this)},addChildAt:function(a,
b){var c=this.items.indexOf(a);if(c==b)return a;var d=this.getPrivateIndexForPublicIndex(b);c>=0&&this.items.splice(c,1);this.items.splice(b,0,a);b=this._addChildAt(a,d);a.addEventListener("resize",m(this,this.layoutGroup_child_resizeHandler));w.__implements(a,T)&&a.addEventListener("layoutDataChange",m(this,this.layoutGroup_child_layoutDataChangeHandler),!1,0,!0);this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);return b},_addChild:function(a){return fa.prototype.addChildAt.call(this,
a,this.get__numChildren())},_addChildAt:function(a,b){return fa.prototype.addChildAt.call(this,a,b)},removeChild:function(a){if(a==null||a.parent!=this)return a;V.remove(this.items,a);var b=this._removeChild(a);a.removeEventListener("resize",m(this,this.layoutGroup_child_resizeHandler));w.__implements(a,T)&&a.removeEventListener("layoutDataChange",m(this,this.layoutGroup_child_layoutDataChangeHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);return b},
_removeChild:function(a){return fa.prototype.removeChild.call(this,a)},removeChildAt:function(a){return a>=0&&a<this.items.length?this.removeChild(this.items[a]):null},_removeChildAt:function(a){return fa.prototype.removeChildAt.call(this,a)},getChildIndex:function(a){return this.items.indexOf(a)},_getChildIndex:function(a){return fa.prototype.getChildIndex.call(this,a)},getChildByName:function(a){for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},_getChildByName:function(a){return fa.prototype.getChildByName.call(this,
a)},removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);if(b==2147483647&&(b=this.items.length-1,b<0))return;if(!(a>this.items.length-1)){if(b<a||a<0||b>this.items.length)throw new we("The supplied index is out of bounds.");for(b-=a;b>=0;)this.removeChildAt(a),--b}},_removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);fa.prototype.removeChildren.call(this,a,b)},setChildIndex:function(a,b){this.getChildIndex(a)!=b&&(this._setChildIndex(a,this.getPrivateIndexForPublicIndex(b)),
V.remove(this.items,a),this.items.splice(b,0,a),this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},_setChildIndex:function(a,b){fa.prototype.setChildIndex.call(this,a,b)},getChildAt:function(a){return this.items[a]},_getChildAt:function(a){return fa.prototype.getChildAt.call(this,a)},readjustLayout:function(){this.setInvalid(x.LAYOUT)},initializeLayoutGroupTheme:function(){Xv.initialize()},getPrivateIndexForPublicIndex:function(a){return this.items.length>
0?a+this._getChildIndex(this.items[0]):this.get__numChildren()>0?a+this.get__numChildren():a},_xmlContent:null,get_xmlContent:function(){return this._xmlContent},set_xmlContent:function(a){if(this._xmlContent==a)return this._xmlContent;if(this._xmlContent!=null)for(var b=0,c=this._xmlContent;b<c.length;){var d=c[b];++b;this.removeChild(d)}this._xmlContent=a;if(this._xmlContent!=null)for(b=0,c=this._xmlContent;b<c.length;)d=c[b],++b,this.addChild(d);this.setInvalid(x.STYLES);return this._xmlContent},
_layoutActive:null,_layoutChanged:null,collectChildren:function(a){if(a==null)return this.items.slice();for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;a.push(d)}return a},validateNow:function(){var a=this._ignoreChangesButSetFlags;this._ignoreChangesButSetFlags=!0;fa.prototype.validateNow.call(this);this._ignoreChangesButSetFlags=a},update:function(){var a=this;this._ignoreChangesButSetFlags=!1;var b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STYLES),f=this.isInvalid(x.STATE);
(d||f)&&this.refreshBackgroundSkin();d&&(this.refreshMaskSkin(),this.refreshLayout());if(c||b||d||f)this.refreshViewPortBounds(),this.runWithInvalidationFlagsOnly(function(){a._layoutActive=!0;var g=0;do if(a._layoutChanged=!1,a.handleLayout(),++g,g>=10){a._layoutActive=!1;g=w.getClass(a).__name__;var h=a.get_layout()!=null?w.getClass(a.get_layout()).__name__:"The layout";throw new ob(""+g+" is stuck in an infinite loop during layout. "+h+" may be dispatching Event.CHANGE too frequently.");}while(a._layoutChanged);
a._layoutActive=!1}),this.refreshBackgroundLayout(),this.refreshDisabledOverlay(),this.refreshMaskLayout(),this.validateChildren()},refreshDisabledOverlay:function(){this._enabled||(this._disabledOverlay==null?(this._disabledOverlay=new Da,this._disabledOverlay.get_graphics().beginFill(16711935,0),this._disabledOverlay.get_graphics().drawRect(0,0,1,1),this._disabledOverlay.get_graphics().endFill(),this._addChild(this._disabledOverlay)):this._setChildIndex(this._disabledOverlay,this.get__numChildren()-
1));this._disabledOverlay!=null&&(this._disabledOverlay.set_visible(!this._enabled),this._disabledOverlay.set_x(0),this._disabledOverlay.set_y(0),this._disabledOverlay.set_width(this.actualWidth),this._disabledOverlay.set_height(this.actualHeight))},refreshLayout:function(){var a=this.get_layout();this._currentLayout!=a&&(this._currentLayout!=null&&this._currentLayout.removeEventListener("change",m(this,this.layoutGroup_layout_changeHandler)),this._currentLayout=a,this._currentLayout!=null&&this._currentLayout.addEventListener("change",
m(this,this.layoutGroup_layout_changeHandler)))},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==
null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this._addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this._removeChild(a))},refreshMaskSkin:function(){var a=this._currentMaskSkin;
this._currentMaskSkin=this.getCurrentMaskSkin();this._currentMaskSkin!=a&&(this.removeCurrentMaskSkin(a),this.addCurrentMaskSkin(this._currentMaskSkin))},getCurrentMaskSkin:function(){return this.get_maskSkin()},addCurrentMaskSkin:function(a){a!=null&&(w.__implements(a,Fa)&&a.initializeNow(),w.__implements(a,qb)&&a.set_uiContext(this),this._addChild(a),this.set_mask(a))},removeCurrentMaskSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this._removeChild(a),this.set_mask(null))},
refreshViewPortBounds:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;this._currentBackgroundSkin!=null&&(df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow());var h=this._autoSizeMode==Ve.CONTENT||
this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ea);var q=this.globalToLocal(new Ea(this.stage.stageWidth,this.stage.stageHeight));n=q.x-l.x;l=q.y-l.y}this._layoutMeasurements.width=a&&!h?n:this.get_explicitWidth();this._layoutMeasurements.height=b&&!h?l:this.get_explicitHeight();a=this.get_explicitMinWidth();c&&(a=0);c=this.get_explicitMinHeight();d&&(c=0);d=this.get_explicitMaxWidth();f&&(d=1/0);f=this.get_explicitMaxHeight();g&&(f=1/0);this._backgroundSkinMeasurements!=null&&(this._backgroundSkinMeasurements.width!=
null?this._backgroundSkinMeasurements.width>a&&(a=this._backgroundSkinMeasurements.width):this._backgroundSkinMeasurements.minWidth!=null&&this._backgroundSkinMeasurements.minWidth>a&&(a=this._backgroundSkinMeasurements.minWidth),this._backgroundSkinMeasurements.height!=null?this._backgroundSkinMeasurements.height>c&&(c=this._backgroundSkinMeasurements.height):this._backgroundSkinMeasurements.minHeight!=null&&this._backgroundSkinMeasurements.minHeight>c&&(c=this._backgroundSkinMeasurements.minHeight));
this._layoutMeasurements.minWidth=a;this._layoutMeasurements.minHeight=c;this._layoutMeasurements.maxWidth=d;this._layoutMeasurements.maxHeight=f},handleLayout:function(){this._currentLayout!=null?this.handleCustomLayout():this.handleManualLayout();this.handleLayoutResult()},handleCustomLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._layoutResult.reset();this._currentLayout.layout(this.items,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},
handleManualLayout:function(){var a=this._layoutMeasurements.width;a==null&&(a=0);var b=this._layoutMeasurements.height;b==null&&(b=0);var c=this._ignoreChildChanges;this._ignoreChildChanges=!0;for(var d=0,f=this.items;d<f.length;){var g=f[d];++d;if(!w.__implements(g,T)||g.get_includeInLayout()){w.__implements(g,da)&&g.validateNow();var h=g.get_x()+g.get_width();g=g.get_y()+g.get_height();a<h&&(a=h);b<g&&(b=g)}}this._ignoreChildChanges=c;this._layoutResult.contentX=0;this._layoutResult.contentY=0;
this._layoutResult.contentWidth=a;this._layoutResult.contentHeight=b;this._layoutMeasurements.width!=null?this._layoutResult.viewPortWidth=this._layoutMeasurements.width:(this._layoutMeasurements.minWidth!=null&&a<this._layoutMeasurements.minWidth?a=this._layoutMeasurements.minWidth:this._layoutMeasurements.maxWidth!=null&&a>this._layoutMeasurements.maxWidth&&(a=this._layoutMeasurements.maxWidth),this._layoutResult.viewPortWidth=a);this._layoutMeasurements.height!=null?this._layoutResult.viewPortHeight=
this._layoutMeasurements.height:(this._layoutMeasurements.minHeight!=null&&b<this._layoutMeasurements.minHeight?b=this._layoutMeasurements.minHeight:this._layoutMeasurements.maxHeight!=null&&b>this._layoutMeasurements.maxHeight&&(b=this._layoutMeasurements.maxHeight),this._layoutResult.viewPortHeight=b)},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},refreshMaskLayout:function(){this._currentMaskSkin!=null&&
(this._currentMaskSkin.set_x(0),this._currentMaskSkin.set_y(0),this._currentMaskSkin.set_width(this.actualWidth),this._currentMaskSkin.set_height(this.actualHeight),w.__implements(this._currentMaskSkin,da)&&this._currentMaskSkin.validateNow())},refreshBackgroundLayout:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),
this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},validateChildren:function(){w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();for(var a=0,b=this.items;a<b.length;){var c=b[a];++a;w.__implements(c,da)&&c.validateNow()}},layoutGroup_addedToStageHandler:function(a){this._autoSizeMode==Ve.STAGE&&(this.setInvalid(x.SIZE),
this.addEventListener("removedFromStage",m(this,this.layoutGroup_removedFromStageHandler)),this.stage.addEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler),!1,0,!0))},layoutGroup_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.layoutGroup_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler))},layoutGroup_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},layoutGroup_child_resizeHandler:function(a){this._ignoreChildChanges||
(this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},layoutGroup_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},layoutGroup_layout_changeHandler:function(a){this._ignoreLayoutChanges||(this._layoutActive?this._layoutChanged=!0:this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},__layout:null,get_layout:function(){return this.__layout},
set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=
m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=
m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__maskSkin:null,get_maskSkin:function(){return this.__maskSkin},set_maskSkin:function(a){if(!this.setStyle("maskSkin")||this.__maskSkin==a)return this.__maskSkin;this._previousClearStyle=m(this,this.clearStyle_maskSkin);this.__maskSkin=
a;this.setInvalid(x.STYLES);return this.__maskSkin},clearStyle_maskSkin:function(){this.set_maskSkin(null);return this.get_maskSkin()},get_styleContext:function(){return pb},__class__:pb,__properties__:I(fa.prototype.__properties__,{set_xmlContent:"set_xmlContent",get_xmlContent:"get_xmlContent",get__numChildren:"get__numChildren",set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode",set_maskSkin:"set_maskSkin",get_maskSkin:"get_maskSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",
get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout"})});var Mb=function(){};t["feathers.core.IFocusManagerAware"]=Mb;Mb.__name__="feathers.core.IFocusManagerAware";Mb.__isInterface__=!0;Mb.prototype={get_focusManager:null,set_focusManager:null,__class__:Mb,__properties__:{set_focusManager:"set_focusManager",get_focusManager:"get_focusManager"}};var Va=function(){this.__scaleManager=
null;this._scaleFactor=1;Va._topLevelApplication==null&&(Va._topLevelApplication=this);this.initializeApplicationTheme();pb.call(this);this.addEventListener("addedToStage",m(this,this.application_addedToStageHandler),!1,100)};t["feathers.controls.Application"]=Va;Va.__name__="feathers.controls.Application";Va.__interfaces__=[Mb];Va.__properties__={get_topLevelApplication:"get_topLevelApplication"};Va.get_topLevelApplication=function(){return Va._topLevelApplication};Va.defaultPopUpContainerFactory=
function(){return new Da};Va.__super__=pb;Va.prototype=I(pb.prototype,{_scaleFactor:null,get_scaleFactor:function(){return this._scaleFactor},_currentScaleManager:null,popUpContainerFactory:null,_applicationPopUpContainer:null,_applicationFocusManager:null,_applicationToolTipManager:null,initializeApplicationTheme:function(){Wq.initialize()},update:function(){var a=this.isInvalid(x.SIZE),b=this.isInvalid(x.STYLES);(a||b)&&this.refreshScaleManager();pb.prototype.update.call(this)},refreshScaleManager:function(){var a=
this,b=this._currentScaleManager;this._currentScaleManager=this.get_scaleManager();this._currentScaleManager!=b&&(b!=null&&(b.removeEventListener("change",m(this,this.application_scaleManager_changeHandler)),b.set_target(null)),this._currentScaleManager!=null&&(this._currentScaleManager.addEventListener("change",m(this,this.application_scaleManager_changeHandler),!1,0,!0),this.runWithInvalidationFlagsOnly(function(){a._currentScaleManager.set_target(a)})))},refreshDimensions:function(){if(this._currentScaleManager!=
null){this._scaleFactor=this._currentScaleManager.getScale();this.set_scaleX(this._scaleFactor);this.set_scaleY(this._scaleFactor);var a=this._currentScaleManager.getBounds();this.set_x(a.x);this.set_y(a.y);this.set_width(a.width);this.set_height(a.height);this._applicationPopUpContainer!=null&&(this._applicationPopUpContainer.set_scaleX(this._scaleFactor),this._applicationPopUpContainer.set_scaleY(this._scaleFactor))}},preparePopUpManager:function(){if(this._applicationPopUpContainer==null){var a=
this.popUpContainerFactory;a==null&&(a=Va.defaultPopUpContainerFactory);this._applicationPopUpContainer=a()}this._applicationPopUpContainer.set_scaleX(this._scaleFactor);this._applicationPopUpContainer.set_scaleY(this._scaleFactor);this.stage.addChild(this._applicationPopUpContainer);Aa.forStage(this.stage).set_root(this._applicationPopUpContainer)},cleanupPopUpManager:function(){var a=Aa.forStage(this.stage);a.get_root()==this._applicationPopUpContainer&&a.set_root(this.stage);this.stage.removeChild(this._applicationPopUpContainer);
this._applicationPopUpContainer=null},prepareFocusManager:function(){Cd.hasRoot(this.stage)||(this._applicationFocusManager=Cd.addRoot(this.stage))},cleanupFocusManager:function(){this._applicationFocusManager!=null&&(this._applicationFocusManager=null,Cd.removeRoot(this.stage))},prepareToolTipManager:function(){be.hasRoot(this.stage)||(this._applicationToolTipManager=be.addRoot(this.stage))},cleanupToolTipManager:function(){this._applicationToolTipManager!=null&&(this._applicationToolTipManager=
null,be.removeRoot(this.stage))},application_addedToStageHandler:function(a){this.addEventListener("removedFromStage",m(this,this.application_removedFromStageHandler));this.prepareFocusManager();this.preparePopUpManager();this.prepareToolTipManager()},application_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.application_removedFromStageHandler));this.cleanupToolTipManager();this.cleanupPopUpManager();this.cleanupFocusManager()},application_scaleManager_changeHandler:function(a){this.refreshDimensions()},
get_styleContext:function(){return Va},__scaleManager:null,get_scaleManager:function(){return this.__scaleManager},set_scaleManager:function(a){if(!this.setStyle("scaleManager")||this.__scaleManager==a)return this.__scaleManager;this._previousClearStyle=m(this,this.clearStyle_scaleManager);this.__scaleManager=a;this.setInvalid(x.STYLES);return this.__scaleManager},clearStyle_scaleManager:function(){this.set_scaleManager(null);return this.get_scaleManager()},__class__:Va,__properties__:I(pb.prototype.__properties__,
{set_scaleManager:"set_scaleManager",get_scaleManager:"get_scaleManager",get_scaleFactor:"get_scaleFactor"})});var ya=function(){w.__cast(bc.get_fallbackTheme(),pn).set_darkMode(!0);Va.call(this);this.set_layout(new Gi);ya.mode="player";ya.movie="";ya.scene="";var a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"mode")&&y.field(this.get_loaderInfo().parameters,"mode")=="editor"&&(ya.mode="editor");a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,
"movie")&&(ya.movie=y.field(this.get_loaderInfo().parameters,"movie"),a=this.get_loaderInfo().parameters,Object.prototype.hasOwnProperty.call(a,"scene")&&(ya.scene=y.field(this.get_loaderInfo().parameters,"scene")));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"decrypt")&&(Ob.customDecrypt=y.field(this.get_loaderInfo().parameters,"decrypt"));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"us")?(a=this.get_loaderInfo().parameters,a=Object.prototype.hasOwnProperty.call(a,
"uk")):a=!1;a?(ya.us=y.field(this.get_loaderInfo().parameters,"us"),ya.uk=y.field(this.get_loaderInfo().parameters,"uk")):ya.us=ya.uk="";if(this.stage==null)this.addEventListener("addedToStage",m(this,this.onStage));else this.onStage()};t.Main=ya;ya.__name__="Main";ya.__super__=Va;ya.prototype=I(Va.prototype,{_player:null,_editor:null,onStage:function(a){this.hasEventListener("addedToStage")&&this.removeEventListener("addedToStage",m(this,this.onStage));ya.mode=="editor"?(this._editor=new Hi("editor.json"),
this._editor.registerPlugin(new Oo),this._editor.registerPlugin(new Po),this._editor.registerPlugin(new Qo),this._editor.registerPlugin(new Ro),this._editor.registerPlugin(new oe),this.addChild(this._editor)):(this.stage.set_scaleMode(2),ya.mode="player",this._player=new cg("player.json","player","landscape"),this._player.registerPlugin(new Oo),this._player.registerPlugin(new Po),this._player.registerPlugin(new Qo),this._player.registerPlugin(new Ro),this._player.registerPlugin(new oe),this._player.setSize(this.stage.stageWidth,
this.stage.stageHeight),this.stage.addChild(this._player),this.stage.addEventListener("resize",m(this,this.onStageResize)));this.debug()},onStageResize:function(a){this._player.setSize(this.stage.stageWidth,this.stage.stageHeight)},debug:function(){},__class__:ya});var Rf=function(a){a.addChild(this);ya.call(this);this.dispatchEvent(new pa("addedToStage",!1,!1))};t.DocumentClass=Rf;Rf.__name__="DocumentClass";Rf.__super__=ya;Rf.prototype=I(ya.prototype,{__class__:Rf});var qc=function(){};t.DateTools=
qc;qc.__name__="DateTools";qc.__format_get=function(a,b){switch(b){case "%":return"%";case "A":return qc.DAY_NAMES[a.getDay()];case "B":return qc.MONTH_NAMES[a.getMonth()];case "C":return N.lpad(H.string(a.getFullYear()/100|0),"0",2);case "D":return qc.__format(a,"%m/%d/%y");case "F":return qc.__format(a,"%Y-%m-%d");case "M":return N.lpad(H.string(a.getMinutes()),"0",2);case "R":return qc.__format(a,"%H:%M");case "S":return N.lpad(H.string(a.getSeconds()),"0",2);case "T":return qc.__format(a,"%H:%M:%S");
case "Y":return H.string(a.getFullYear());case "a":return qc.DAY_SHORT_NAMES[a.getDay()];case "d":return N.lpad(H.string(a.getDate()),"0",2);case "e":return H.string(a.getDate());case "b":case "h":return qc.MONTH_SHORT_NAMES[a.getMonth()];case "H":case "k":return N.lpad(H.string(a.getHours()),b=="H"?"0":" ",2);case "I":case "l":return a=a.getHours()%12,N.lpad(H.string(a==0?12:a),b=="I"?"0":" ",2);case "m":return N.lpad(H.string(a.getMonth()+1),"0",2);case "n":return"\n";case "p":return a.getHours()>
11?"PM":"AM";case "r":return qc.__format(a,"%I:%M:%S %p");case "s":return H.string(a.getTime()/1E3|0);case "t":return"\t";case "u":return b=a.getDay(),b==0?"7":b==null?"null":""+b;case "w":return H.string(a.getDay());case "y":return N.lpad(H.string(a.getFullYear()%100),"0",2);default:throw new qn("Date.format %"+b+"- not implemented yet.",null,{fileName:"DateTools.hx",lineNumber:101,className:"DateTools",methodName:"__format_get"});}};qc.__format=function(a,b){for(var c="",d=0;;){var f=b.indexOf("%",
d);if(f<0)break;var g=f-d;c+=g==null?V.substr(b,d,null):V.substr(b,d,g);c+=H.string(qc.__format_get(a,V.substr(b,f+1,1)));d=f+2}g=b.length-d;return c+=g==null?V.substr(b,d,null):V.substr(b,d,g)};qc.format=function(a,b){return qc.__format(a,b)};var Wa=function(a,b){this.r=new RegExp(a,b.split("u").join(""))};t.EReg=Wa;Wa.__name__="EReg";Wa.prototype={r:null,match:function(a){this.r.global&&(this.r.lastIndex=0);this.r.m=this.r.exec(a);this.r.s=a;return this.r.m!=null},matched:function(a){if(this.r.m!=
null&&a>=0&&a<this.r.m.length)return this.r.m[a];throw ba.thrown("EReg::matched");},matchedRight:function(){if(this.r.m==null)throw ba.thrown("No string matched");var a=this.r.m.index+this.r.m[0].length;return V.substr(this.r.s,a,this.r.s.length-a)},matchedPos:function(){if(this.r.m==null)throw ba.thrown("No string matched");return{pos:this.r.m.index,len:this.r.m[0].length}},matchSub:function(a,b,c){c==null&&(c=-1);if(this.r.global){if(this.r.lastIndex=b,this.r.m=this.r.exec(c<0?a:V.substr(a,0,b+
c)),c=this.r.m!=null)this.r.s=a}else if(c=this.match(c<0?V.substr(a,b,null):V.substr(a,b,c)))this.r.s=a,this.r.m.index+=b;return c},split:function(a){return a.replace(this.r,"#__delim__#").split("#__delim__#")},map:function(a,b){var c=0,d="";do{if(c>=a.length)break;else if(!this.matchSub(a,c)){d+=H.string(V.substr(a,c,null));break}var f=this.matchedPos();d+=H.string(V.substr(a,c,f.pos-c));d+=H.string(b(this));f.len==0?(d+=H.string(V.substr(a,f.pos,1)),c=f.pos+1):c=f.pos+f.len}while(this.r.global);
!this.r.global&&c>0&&c<a.length&&(d+=H.string(V.substr(a,c,null)));return d},__class__:Wa};var V=function(){};t.HxOverrides=V;V.__name__="HxOverrides";V.dateStr=function(a){var b=a.getMonth()+1,c=a.getDate(),d=a.getHours(),f=a.getMinutes(),g=a.getSeconds();return a.getFullYear()+"-"+(b<10?"0"+b:""+b)+"-"+(c<10?"0"+c:""+c)+" "+(d<10?"0"+d:""+d)+":"+(f<10?"0"+f:""+f)+":"+(g<10?"0"+g:""+g)};V.strDate=function(a){switch(a.length){case 8:a=a.split(":");var b=new Date;b.setTime(0);b.setUTCHours(a[0]);b.setUTCMinutes(a[1]);
b.setUTCSeconds(a[2]);return b;case 10:return a=a.split("-"),new Date(a[0],a[1]-1,a[2],0,0,0);case 19:return a=a.split(" "),b=a[0].split("-"),a=a[1].split(":"),new Date(b[0],b[1]-1,b[2],a[0],a[1],a[2]);default:throw ba.thrown("Invalid date format : "+a);}};V.cca=function(a,b){a=a.charCodeAt(b);if(a==a)return a};V.substr=function(a,b,c){if(c==null)c=a.length;else if(c<0)if(b==0)c=a.length+c;else return"";return a.substr(b,c)};V.remove=function(a,b){b=a.indexOf(b);if(b==-1)return!1;a.splice(b,1);return!0};
V.keyValueIter=function(a){return new Xq(a)};V.now=function(){return Date.now()};var M=function(a,b){this.min=a;this.max=b};t.IntIterator=M;M.__name__="IntIterator";M.prototype={min:null,max:null,hasNext:function(){return this.min<this.max},next:function(){return this.min++},__class__:M};var ib=function(){};t.Lambda=ib;ib.__name__="Lambda";ib.array=function(a){var b=[];for(a=La(a);a.hasNext();){var c=a.next();b.push(c)}return b};ib.count=function(a,b){var c=0;if(b==null)for(b=La(a);b.hasNext();)b.next(),
++c;else for(a=La(a);a.hasNext();){var d=a.next();b(d)&&++c}return c};var S=function(){};t.ManifestResources=S;S.__name__="ManifestResources";S.init=function(a){S.preloadLibraries=[];S.preloadLibraryNames=[];S.rootPath=null;a!=null&&Object.prototype.hasOwnProperty.call(a,"rootPath")&&(S.rootPath=y.field(a,"rootPath"),N.endsWith(S.rootPath,"/")||(S.rootPath+="/"));S.rootPath==null&&(S.rootPath="./");a=xe.parse('{"name":null,"assets":"aoy4:pathy24:assets%2Fbuild-base.jsony4:sizei216y4:typey4:TEXTy2:idR1y7:preloadtgoR0y19:assets%2Fbuild.jsonR2i224R3R4R5R7R6tgoR0y26:assets%2Ficons%2FbtAll.pngR2i4176R3y5:IMAGER5R8R6tgoR0y27:assets%2Ficons%2FbtBack.pngR2i923R3R9R5R10R6tgoR0y29:assets%2Ficons%2FbtBlocks.pngR2i441R3R9R5R11R6tgoR0y27:assets%2Ficons%2FbtBool.pngR2i425R3R9R5R12R6tgoR0y28:assets%2Ficons%2FbtClose.pngR2i1090R3R9R5R13R6tgoR0y27:assets%2Ficons%2FbtCode.pngR2i772R3R9R5R14R6tgoR0y31:assets%2Ficons%2FbtCompress.pngR2i612R3R9R5R15R6tgoR0y35:assets%2Ficons%2FbtContraptions.pngR2i836R3R9R5R16R6tgoR0y27:assets%2Ficons%2FbtCopy.pngR2i559R3R9R5R17R6tgoR0y27:assets%2Ficons%2FbtData.pngR2i969R3R9R5R18R6tgoR0y26:assets%2Ficons%2FbtDel.pngR2i524R3R9R5R19R6tgoR0y34:assets%2Ficons%2FbtDistributeH.pngR2i4391R3R9R5R20R6tgoR0y34:assets%2Ficons%2FbtDistributeV.pngR2i4367R3R9R5R21R6tgoR0y27:assets%2Ficons%2FbtDown.pngR2i450R3R9R5R22R6tgoR0y27:assets%2Ficons%2FbtEdit.pngR2i720R3R9R5R23R6tgoR0y31:assets%2Ficons%2FbtExchange.pngR2i730R3R9R5R24R6tgoR0y29:assets%2Ficons%2FbtExpand.pngR2i595R3R9R5R25R6tgoR0y28:assets%2Ficons%2FbtFloat.pngR2i501R3R9R5R26R6tgoR0y29:assets%2Ficons%2FbtFolder.pngR2i484R3R9R5R27R6tgoR0y33:assets%2Ficons%2FbtFullscreen.pngR2i725R3R9R5R28R6tgoR0y30:assets%2Ficons%2FbtInteger.pngR2i501R3R9R5R29R6tgoR0y31:assets%2Ficons%2FbtKeyframe.pngR2i704R3R9R5R30R6tgoR0y27:assets%2Ficons%2FbtLeft.pngR2i497R3R9R5R31R6tgoR0y27:assets%2Ficons%2FbtLock.pngR2i380R3R9R5R32R6tgoR0y28:assets%2Ficons%2FbtMedia.pngR2i833R3R9R5R33R6tgoR0y28:assets%2Ficons%2FbtMovie.pngR2i847R3R9R5R34R6tgoR0y33:assets%2Ficons%2FbtMovieScene.pngR2i1084R3R9R5R35R6tgoR0y32:assets%2Ficons%2FbtNarrative.pngR2i642R3R9R5R36R6tgoR0y27:assets%2Ficons%2FbtNone.pngR2i4899R3R9R5R37R6tgoR0y28:assets%2Ficons%2FbtNotes.pngR2i777R3R9R5R38R6tgoR0y25:assets%2Ficons%2FbtOk.pngR2i2027R3R9R5R39R6tgoR0y31:assets%2Ficons%2FbtOpenfile.pngR2i728R3R9R5R40R6tgoR0y28:assets%2Ficons%2FbtPaste.pngR2i4453R3R9R5R41R6tgoR0y28:assets%2Ficons%2FbtPause.pngR2i441R3R9R5R42R6tgoR0y27:assets%2Ficons%2FbtPlay.pngR2i614R3R9R5R43R6tgoR0y29:assets%2Ficons%2FbtPlugin.pngR2i971R3R9R5R44R6tgoR0y27:assets%2Ficons%2FbtPlus.pngR2i894R3R9R5R45R6tgoR0y28:assets%2Ficons%2FbtRight.pngR2i498R3R9R5R46R6tgoR0y28:assets%2Ficons%2FbtScene.pngR2i1287R3R9R5R47R6tgoR0y29:assets%2Ficons%2FbtScreen.pngR2i884R3R9R5R48R6tgoR0y38:assets%2Ficons%2FbtSelectionBottom.pngR2i4041R3R9R5R49R6tgoR0y38:assets%2Ficons%2FbtSelectionCenter.pngR2i4087R3R9R5R50R6tgoR0y36:assets%2Ficons%2FbtSelectionLeft.pngR2i4057R3R9R5R51R6tgoR0y38:assets%2Ficons%2FbtSelectionMiddle.pngR2i4101R3R9R5R52R6tgoR0y37:assets%2Ficons%2FbtSelectionRight.pngR2i4070R3R9R5R53R6tgoR0y35:assets%2Ficons%2FbtSelectionTop.pngR2i4076R3R9R5R54R6tgoR0y28:assets%2Ficons%2FbtSetup.pngR2i1544R3R9R5R55R6tgoR0y34:assets%2Ficons%2FbtStageBottom.pngR2i4166R3R9R5R56R6tgoR0y34:assets%2Ficons%2FbtStageCenter.pngR2i4374R3R9R5R57R6tgoR0y32:assets%2Ficons%2FbtStageLeft.pngR2i4241R3R9R5R58R6tgoR0y34:assets%2Ficons%2FbtStageMiddle.pngR2i4268R3R9R5R59R6tgoR0y33:assets%2Ficons%2FbtStageRight.pngR2i4227R3R9R5R60R6tgoR0y31:assets%2Ficons%2FbtStageTop.pngR2i4199R3R9R5R61R6tgoR0y27:assets%2Ficons%2FbtStop.pngR2i443R3R9R5R62R6tgoR0y29:assets%2Ficons%2FbtString.pngR2i425R3R9R5R63R6tgoR0y31:assets%2Ficons%2FbtToCenter.pngR2i420R3R9R5R64R6tgoR0y29:assets%2Ficons%2FbtToDown.pngR2i429R3R9R5R65R6tgoR0y29:assets%2Ficons%2FbtToggle.pngR2i1026R3R9R5R66R6tgoR0y29:assets%2Ficons%2FbtToLeft.pngR2i429R3R9R5R67R6tgoR0y31:assets%2Ficons%2FbtToMiddle.pngR2i430R3R9R5R68R6tgoR0y30:assets%2Ficons%2FbtToRight.pngR2i414R3R9R5R69R6tgoR0y28:assets%2Ficons%2FbtToTop.pngR2i431R3R9R5R70R6tgoR0y25:assets%2Ficons%2FbtUp.pngR2i461R3R9R5R71R6tgoR0y32:assets%2Ficons%2FbtVariables.pngR2i822R3R9R5R72R6tgoR0y31:assets%2Ficons%2FbtVisitors.pngR2i902R3R9R5R73R6tgoR0y32:assets%2Ficons%2FbtWorkspace.pngR2i605R3R9R5R74R6tgoR0y30:assets%2Ficons%2FbtZoom100.pngR2i818R3R9R5R75R6tgoR0y30:assets%2Ficons%2FbtZoomFit.pngR2i671R3R9R5R76R6tgoR0y28:assets%2Ficons%2FbtZoomM.pngR2i837R3R9R5R77R6tgoR0y28:assets%2Ficons%2FbtZoomP.pngR2i896R3R9R5R78R6tgoR0y25:assets%2Ficons%2Fbuci.pngR2i731219R3R9R5R79R6tgoR0y34:assets%2Ficons%2FicContraption.pngR2i1727R3R9R5R80R6tgoR0y27:assets%2Ficons%2FicData.pngR2i483R3R9R5R81R6tgoR0y28:assets%2Ficons%2FicDebug.pngR2i488R3R9R5R82R6tgoR0y29:assets%2Ficons%2FicGoogle.pngR2i453R3R9R5R83R6tgoR0y28:assets%2Ficons%2FicInput.pngR2i375R3R9R5R84R6tgoR0y32:assets%2Ficons%2FicNarrative.pngR2i464R3R9R5R85R6tgoR0y29:assets%2Ficons%2FiconDown.pngR2i280R3R9R5R86R6tgoR0y31:assets%2Ficons%2FiconFolder.pngR2i268R3R9R5R87R6tgoR0y40:assets%2Ficons%2FiconInteractingDown.pngR2i994R3R9R5R88R6tgoR0y38:assets%2Ficons%2FiconInteractingUp.pngR2i1015R3R9R5R89R6tgoR0y34:assets%2Ficons%2FiconLandscape.pngR2i350R3R9R5R90R6tgoR0y29:assets%2Ficons%2FiconLock.pngR2i381R3R9R5R91R6tgoR0y30:assets%2Ficons%2FiconMinus.pngR2i473R3R9R5R92R6tgoR0y29:assets%2Ficons%2FiconMove.pngR2i448R3R9R5R93R6tgoR0y29:assets%2Ficons%2FiconPlus.pngR2i468R3R9R5R94R6tgoR0y33:assets%2Ficons%2FiconPortrait.pngR2i288R3R9R5R95R6tgoR0y34:assets%2Ficons%2FiconPublished.pngR2i435R3R9R5R96R6tgoR0y31:assets%2Ficons%2FiconResize.pngR2i537R3R9R5R97R6tgoR0y32:assets%2Ficons%2FiconResizeH.pngR2i441R3R9R5R98R6tgoR0y32:assets%2Ficons%2FiconResizeV.pngR2i427R3R9R5R99R6tgoR0y27:assets%2Ficons%2FiconUp.pngR2i254R3R9R5R100R6tgoR0y32:assets%2Ficons%2FiconUpLevel.pngR2i368R3R9R5R101R6tgoR0y30:assets%2Ficons%2FicReplace.pngR2i452R3R9R5R102R6tgoR0y29:assets%2Ficons%2FicServer.pngR2i416R3R9R5R103R6tgoR0y28:assets%2Ficons%2FicShare.pngR2i417R3R9R5R104R6tgoR0y31:assets%2Ficons%2FicSnippets.pngR2i434R3R9R5R105R6tgoR0y29:assets%2Ficons%2FicSystem.pngR2i422R3R9R5R106R6tgoR0y29:assets%2Ficons%2FicTarget.pngR2i3525R3R9R5R107R6tgoR0y27:assets%2Ficons%2FicText.pngR2i420R3R9R5R108R6tgoR0y28:assets%2Ficons%2FicTimer.pngR2i429R3R9R5R109R6tgoR0y27:assets%2Ficons%2FicUser.pngR2i384R3R9R5R110R6tgoR0y30:assets%2Ficons%2FtilBuci01.pngR2i4225R3R9R5R111R6tgoR0y30:assets%2Ficons%2FtilBuci02.pngR2i4241R3R9R5R112R6tgoR0y30:assets%2Ficons%2FtilBuci03.pngR2i4278R3R9R5R113R6tgoR0y30:assets%2Ficons%2FtilBuci04.pngR2i4096R3R9R5R114R6tgoR0y30:assets%2Ficons%2FtilBuci05.pngR2i4211R3R9R5R115R6tgoR0y32:assets%2Flanguage%2Fdefault.jsonR2i155698R3R4R5R116R6tgoR0y21:assets%2Flicense.htmlR2i20302R3R4R5R117R6tgoR0R7R2i224R3R4R5y9:buildInfoR6tgoR0R117R2i20302R3R4R5y7:licenseR6tgoR0R116R2i155698R3R4R5y11:langDefaultR6tgoR0R79R2i731219R3R9R5y4:buciR6tgoR0R111R2i4225R3R9R5y9:tilBuci01R6tgoR0R112R2i4241R3R9R5y9:tilBuci02R6tgoR0R113R2i4278R3R9R5y9:tilBuci03R6tgoR0R114R2i4096R3R9R5y9:tilBuci04R6tgoR0R115R2i4211R3R9R5y9:tilBuci05R6tgoR0R10R2i923R3R9R5y6:btBackR6tgoR0R13R2i1090R3R9R5y7:btCloseR6tgoR0R39R2i2027R3R9R5y4:btOkR6tgoR0R34R2i847R3R9R5y7:btMovieR6tgoR0R47R2i1287R3R9R5y7:btSceneR6tgoR0R35R2i1084R3R9R5y12:btMovieSceneR6tgoR0R18R2i969R3R9R5y6:btDataR6tgoR0R81R2i483R3R9R5y6:icDataR6tgoR0R84R2i375R3R9R5y7:icInputR6tgoR0R106R2i422R3R9R5y8:icSystemR6tgoR0R102R2i452R3R9R5y9:icReplaceR6tgoR0R105R2i434R3R9R5y10:icSnippetsR6tgoR0R108R2i420R3R9R5y6:icTextR6tgoR0R109R2i429R3R9R5y7:icTimerR6tgoR0R110R2i384R3R9R5y6:icUserR6tgoR0R82R2i488R3R9R5y7:icDebugR6tgoR0R104R2i417R3R9R5y7:icShareR6tgoR0R83R2i453R3R9R5y8:icGoogleR6tgoR0R80R2i1727R3R9R5y13:icContraptionR6tgoR0R85R2i464R3R9R5y11:icNarrativeR6tgoR0R103R2i416R3R9R5y8:icServerR6tgoR0R45R2i894R3R9R5y6:btPlusR6tgoR0R44R2i971R3R9R5y8:btPluginR6tgoR0R55R2i1544R3R9R5y7:btSetupR6tgoR0R66R2i1026R3R9R5y8:btToggleR6tgoR0R78R2i896R3R9R5y7:btZoomPR6tgoR0R77R2i837R3R9R5y7:btZoomMR6tgoR0R76R2i671R3R9R5y9:btZoomFitR6tgoR0R75R2i818R3R9R5y9:btZoom100R6tgoR0R33R2i833R3R9R5y7:btMediaR6tgoR0R27R2i484R3R9R5y8:btFolderR6tgoR0R87R2i268R3R9R5y10:iconFolderR6tgoR0R101R2i368R3R9R5y11:iconUpLevelR6tgoR0R96R2i435R3R9R5y13:iconPublishedR6tgoR0R43R2i614R3R9R5y6:btPlayR6tgoR0R42R2i441R3R9R5y7:btPauseR6tgoR0R62R2i443R3R9R5y6:btStopR6tgoR0R31R2i497R3R9R5y6:btLeftR6tgoR0R46R2i498R3R9R5y7:btRightR6tgoR0R71R2i461R3R9R5y4:btUpR6tgoR0R22R2i450R3R9R5y6:btDownR6tgoR0R30R2i704R3R9R5y10:btKeyframeR6tgoR0R28R2i725R3R9R5y12:btFullscreenR6tgoR0R74R2i605R3R9R5y11:btWorkspaceR6tgoR0R48R2i884R3R9R5y8:btScreenR6tgoR0R40R2i728R3R9R5y10:btOpenfileR6tgoR0R17R2i559R3R9R5y6:btCopyR6tgoR0R41R2i4453R3R9R5y7:btPasteR6tgoR0R37R2i4899R3R9R5y6:btNoneR6tgoR0R8R2i4176R3R9R5y5:btAllR6tgoR0R58R2i4241R3R9R5y11:btStageLeftR6tgoR0R57R2i4374R3R9R5y13:btStageCenterR6tgoR0R60R2i4227R3R9R5y12:btStageRightR6tgoR0R61R2i4199R3R9R5y10:btStageTopR6tgoR0R59R2i4268R3R9R5y13:btStageMiddleR6tgoR0R56R2i4166R3R9R5y13:btStageBottomR6tgoR0R51R2i4057R3R9R5y15:btSelectionLeftR6tgoR0R50R2i4087R3R9R5y17:btSelectionCenterR6tgoR0R53R2i4070R3R9R5y16:btSelectionRightR6tgoR0R54R2i4076R3R9R5y14:btSelectionTopR6tgoR0R52R2i4101R3R9R5y17:btSelectionMiddleR6tgoR0R49R2i4041R3R9R5y17:btSelectionBottomR6tgoR0R20R2i4391R3R9R5y13:btDistributeHR6tgoR0R21R2i4367R3R9R5y13:btDistributeVR6tgoR0R12R2i425R3R9R5y6:btBoolR6tgoR0R29R2i501R3R9R5y9:btIntegerR6tgoR0R26R2i501R3R9R5y7:btFloatR6tgoR0R63R2i425R3R9R5y8:btStringR6tgoR0R72R2i822R3R9R5y11:btVariablesR6tgoR0R67R2i429R3R9R5y8:btToLeftR6tgoR0R69R2i414R3R9R5y9:btToRightR6tgoR0R64R2i420R3R9R5y10:btToCenterR6tgoR0R70R2i431R3R9R5y7:btToTopR6tgoR0R65R2i429R3R9R5y8:btToDownR6tgoR0R68R2i430R3R9R5y10:btToMiddleR6tgoR0R24R2i730R3R9R5y10:btExchangeR6tgoR0R73R2i902R3R9R5y10:btVisitorsR6tgoR0R16R2i836R3R9R5y14:btContraptionsR6tgoR0R36R2i642R3R9R5y11:btNarrativeR6tgoR0R93R2i448R3R9R5y8:iconMoveR6tgoR0R98R2i441R3R9R5y11:iconResizeHR6tgoR0R99R2i427R3R9R5y11:iconResizeVR6tgoR0R97R2i537R3R9R5y10:iconResizeR6tgoR0R94R2i468R3R9R5y8:iconPlusR6tgoR0R92R2i473R3R9R5y9:iconMinusR6tgoR0R86R2i280R3R9R5y8:iconDownR6tgoR0R100R2i254R3R9R5y6:iconUpR6tgoR0R91R2i381R3R9R5y8:iconLockR6tgoR0R90R2i350R3R9R5y9:landscapeR6tgoR0R95R2i288R3R9R5y8:portraitR6tgoR0R11R2i441R3R9R5y8:btBlocksR6tgoR0R14R2i772R3R9R5y6:btCodeR6tgoR0R19R2i524R3R9R5y5:btDelR6tgoR0R23R2i720R3R9R5y6:btEditR6tgoR0R25R2i595R3R9R5y8:btExpandR6tgoR0R15R2i612R3R9R5y10:btCompressR6tgoR0R38R2i777R3R9R5y7:btNotesR6tgoR0R32R2i380R3R9R5y6:btLockR6tgoR0R107R2i3525R3R9R5y8:icTargetR6tgh","rootPath":null,"version":2,"libraryArgs":[],"libraryType":null}',
S.rootPath);a=ed.fromManifest(a);mb.registerLibrary("default",a);a=mb.getLibrary("default");a!=null?S.preloadLibraries.push(a):S.preloadLibraryNames.push("default")};Math.__name__="Math";var O=function(){Da.call(this);this.stage!=null&&(this.get_graphics().beginFill(6710886),this.get_graphics().drawRect(0,0,this.stage.stageWidth,this.stage.stageHeight),this.get_graphics().endFill());this.addEventListener("complete",m(this,this.onComplete));this.addEventListener("progress",m(this,this.onProgress))};
t.Preloader=O;O.__name__="Preloader";O.__super__=Da;O.prototype=I(Da.prototype,{onProgress:function(a){if(this.stage!=null&&(this.get_graphics().clear(),this.get_graphics().beginFill(6710886),this.get_graphics().drawRect(0,0,this.stage.stageWidth,this.stage.stageHeight),this.get_graphics().endFill(),a.bytesTotal>0)){var b=a.bytesLoaded/a.bytesTotal*this.stage.stageWidth;a=a.bytesLoaded/a.bytesTotal*this.stage.stageHeight;this.get_graphics().beginFill(0);this.get_graphics().drawRect(this.stage.stageWidth/
2-b/2,this.stage.stageHeight/2-a/2,b,a);this.get_graphics().endFill()}},onComplete:function(a){this.get_graphics().clear();a.preventDefault();this.dispatchEvent(new pa("unload"))},__class__:O});var y=function(){};t.Reflect=y;y.__name__="Reflect";y.field=function(a,b){try{return a[b]}catch(c){return Pb.lastError=c,null}};y.getProperty=function(a,b){var c;if(a==null)return null;var d=a.__properties__?c=a.__properties__["get_"+b]:!1;return d?a[c]():a[b]};y.setProperty=function(a,b,c){var d;var f=a.__properties__?
d=a.__properties__["set_"+b]:!1;if(f)a[d](c);else a[b]=c};y.fields=function(a){var b=[];if(a!=null){var c=Object.prototype.hasOwnProperty,d;for(d in a)d!="__id__"&&d!="hx__closures__"&&c.call(a,d)&&b.push(d)}return b};y.isFunction=function(a){return typeof a=="function"?!(a.__name__||a.__ename__):!1};y.compare=function(a,b){return a==b?0:a>b?1:-1};y.isObject=function(a){if(a==null)return!1;var b=typeof a;return b=="string"||b=="object"&&a.__enum__==null?!0:b=="function"?(a.__name__||a.__ename__)!=
null:!1};y.isEnumValue=function(a){return a!=null?a.__enum__!=null:!1};y.deleteField=function(a,b){if(!Object.prototype.hasOwnProperty.call(a,b))return!1;delete a[b];return!0};y.makeVarArgs=function(a){return function(){var b=arguments;b=Array.prototype.slice.call(b);return a(b)}};var H=function(){};t.Std=H;H.__name__="Std";H.string=function(a){return w.__string_rec(a,"")};H.parseInt=function(a){a=parseInt(a);return isNaN(a)?null:a};H.random=function(a){return a<=0?0:Math.floor(Math.random()*a)};
var nb=function(){this.b=""};t.StringBuf=nb;nb.__name__="StringBuf";nb.prototype={b:null,__class__:nb};var N=function(){};t.StringTools=N;N.__name__="StringTools";N.htmlEscape=function(a,b){for(var c="",d=0,f=a;d<f.length;){a=f;var g=d++,h=a.charCodeAt(g);h>=55296&&h<=56319&&(h=h-55232<<10|a.charCodeAt(g+1)&1023);a=h;a>=65536&&++d;switch(a){case 34:c=b?c+"&quot;":c+String.fromCodePoint(a);break;case 38:c+="&amp;";break;case 39:c=b?c+"&#039;":c+String.fromCodePoint(a);break;case 60:c+="&lt;";break;
case 62:c+="&gt;";break;default:c+=String.fromCodePoint(a)}}return c};N.htmlUnescape=function(a){return a.split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#039;").join("'").split("&amp;").join("&")};N.startsWith=function(a,b){return a.length>=b.length?a.lastIndexOf(b,0)==0:!1};N.endsWith=function(a,b){var c=b.length,d=a.length;return d>=c?a.indexOf(b,d-c)==d-c:!1};N.isSpace=function(a,b){a=V.cca(a,b);return a>8&&a<14?!0:a==32};N.ltrim=function(a){for(var b=a.length,
c=0;c<b&&N.isSpace(a,c);)++c;return c>0?V.substr(a,c,b-c):a};N.rtrim=function(a){for(var b=a.length,c=0;c<b&&N.isSpace(a,b-c-1);)++c;return c>0?V.substr(a,0,b-c):a};N.trim=function(a){return N.ltrim(N.rtrim(a))};N.lpad=function(a,b,c){if(b.length<=0)return a;var d="";for(c-=a.length;d.length<c;)d+=b==null?"null":""+b;return d+(a==null?"null":""+a)};N.rpad=function(a,b,c){if(b.length<=0)return a;for(a=a==null?"null":""+a;a.length<c;)a+=b==null?"null":""+b;return a};N.replace=function(a,b,c){return a.split(b).join(c)};
N.hex=function(a,b){var c="";do c="0123456789ABCDEF".charAt(a&15)+c,a>>>=4;while(a>0);if(b!=null)for(;c.length<b;)c="0"+c;return c};var ac=R.ValueType={__ename__:"ValueType",__constructs__:null,TNull:{_hx_name:"TNull",_hx_index:0,__enum__:"ValueType",toString:E},TInt:{_hx_name:"TInt",_hx_index:1,__enum__:"ValueType",toString:E},TFloat:{_hx_name:"TFloat",_hx_index:2,__enum__:"ValueType",toString:E},TBool:{_hx_name:"TBool",_hx_index:3,__enum__:"ValueType",toString:E},TObject:{_hx_name:"TObject",_hx_index:4,
__enum__:"ValueType",toString:E},TFunction:{_hx_name:"TFunction",_hx_index:5,__enum__:"ValueType",toString:E},TClass:(B=function(a){return{_hx_index:6,c:a,__enum__:"ValueType",toString:E}},B._hx_name="TClass",B.__params__=["c"],B),TEnum:(B=function(a){return{_hx_index:7,e:a,__enum__:"ValueType",toString:E}},B._hx_name="TEnum",B.__params__=["e"],B),TUnknown:{_hx_name:"TUnknown",_hx_index:8,__enum__:"ValueType",toString:E}};ac.__constructs__=[ac.TNull,ac.TInt,ac.TFloat,ac.TBool,ac.TObject,ac.TFunction,
ac.TClass,ac.TEnum,ac.TUnknown];var ab=function(){};t.Type=ab;ab.__name__="Type";ab.resolveEnum=function(a){return R[a]};ab.createInstance=function(a,b){return new (Function.prototype.bind.apply(a,[null].concat(b)))};ab.createEnum=function(a,b,c){var d=y.field(a,b);if(d==null)throw ba.thrown("No such constructor "+b);if(y.isFunction(d)){if(c==null)throw ba.thrown("Constructor "+b+" need parameters");return d.apply(a,c)}if(c!=null&&c.length!=0)throw ba.thrown("Constructor "+b+" does not need parameters");
return d};ab.getInstanceFields=function(a){var b=[],c;for(c in a.prototype)b.push(c);V.remove(b,"__class__");V.remove(b,"__properties__");return b};ab.typeof=function(a){switch(typeof a){case "boolean":return ac.TBool;case "function":return a.__name__||a.__ename__?ac.TObject:ac.TFunction;case "number":return Math.ceil(a)==a%2147483648?ac.TInt:ac.TFloat;case "object":if(a==null)return ac.TNull;var b=a.__enum__;if(b!=null)return ac.TEnum(R[b]);a=w.getClass(a);return a!=null?ac.TClass(a):ac.TObject;
case "string":return ac.TClass(String);case "undefined":return ac.TNull;default:return ac.TUnknown}};ab.enumEq=function(a,b){if(a==b)return!0;try{var c=a.__enum__;if(c==null||c!=b.__enum__||a._hx_index!=b._hx_index)return!1;var d=R[c].__constructs__[a._hx_index].__params__;for(c=0;c<d.length;){var f=d[c];++c;if(!ab.enumEq(a[f],b[f]))return!1}}catch(g){return Pb.lastError=g,!1}return!0};ab.enumParameters=function(a){var b=R[a.__enum__].__constructs__[a._hx_index].__params__;if(b!=null){for(var c=[],
d=0;d<b.length;){var f=b[d];++d;c.push(a[f])}return c}return[]};var sb={gt:function(a,b){var c=a<0;return c!=b<0?c:a>b},toFloat:function(a){return a<0?4294967296+a:a+0}},ec={toString:function(a){switch(a){case 0:return"Element";case 1:return"PCData";case 2:return"CData";case 3:return"Comment";case 4:return"DocType";case 5:return"ProcessingInstruction";case 6:return"Document"}}},Jb=function(a){this.nodeType=a;this.children=[];this.attributeMap=new G};t.Xml=Jb;Jb.__name__="Xml";Jb.parse=function(a){return zl.parse(a)};
Jb.createElement=function(a){var b=new Jb(Jb.Element);if(b.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(b.nodeType==null?"null":ec.toString(b.nodeType)));b.nodeName=a;return b};Jb.createPCData=function(a){var b=new Jb(Jb.PCData);if(b.nodeType==Jb.Document||b.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":ec.toString(b.nodeType)));b.nodeValue=a;return b};Jb.createCData=function(a){var b=new Jb(Jb.CData);if(b.nodeType==
Jb.Document||b.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":ec.toString(b.nodeType)));b.nodeValue=a;return b};Jb.createComment=function(a){var b=new Jb(Jb.Comment);if(b.nodeType==Jb.Document||b.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":ec.toString(b.nodeType)));b.nodeValue=a;return b};Jb.createDocType=function(a){var b=new Jb(Jb.DocType);if(b.nodeType==Jb.Document||b.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+
(b.nodeType==null?"null":ec.toString(b.nodeType)));b.nodeValue=a;return b};Jb.createProcessingInstruction=function(a){var b=new Jb(Jb.ProcessingInstruction);if(b.nodeType==Jb.Document||b.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":ec.toString(b.nodeType)));b.nodeValue=a;return b};Jb.createDocument=function(){return new Jb(Jb.Document)};Jb.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get:function(a){if(this.nodeType!=
Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":ec.toString(this.nodeType)));return this.attributeMap.h[a]},set:function(a,b){if(this.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":ec.toString(this.nodeType)));this.attributeMap.h[a]=b},exists:function(a){if(this.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":ec.toString(this.nodeType)));
return Object.prototype.hasOwnProperty.call(this.attributeMap.h,a)},attributes:function(){if(this.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":ec.toString(this.nodeType)));return new Yq(this.attributeMap.h)},addChild:function(a){if(this.nodeType!=Jb.Document&&this.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element or Document but found "+(this.nodeType==null?"null":ec.toString(this.nodeType)));a.parent!=null&&a.parent.removeChild(a);
this.children.push(a);a.parent=this},removeChild:function(a){if(this.nodeType!=Jb.Document&&this.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element or Document but found "+(this.nodeType==null?"null":ec.toString(this.nodeType)));return V.remove(this.children,a)?(a.parent=null,!0):!1},toString:function(){return rn.print(this)},__class__:Jb};var Nh=function(){};t["feathers.core.IFocusExclusions"]=Nh;Nh.__name__="feathers.core.IFocusExclusions";Nh.__isInterface__=!0;Nh.__interfaces__=
[Mb];Nh.prototype={get_focusExclusions:null,__class__:Nh,__properties__:{get_focusExclusions:"get_focusExclusions"}};var mf=function(){};t["feathers.core.IOpenCloseToggle"]=mf;mf.__name__="feathers.core.IOpenCloseToggle";mf.__isInterface__=!0;mf.__interfaces__=[Fa];mf.prototype={get_opened:null,set_opened:null,__class__:mf,__properties__:{set_opened:"set_opened",get_opened:"get_opened"}};var Tf=function(a,b){this.__overlaySkin=null;this._clickOverlayToClose=this._swipeCloseEnabled=this._swipeOpenEnabled=
this._animateOpenedProperty=!0;this._clickStartX=this._clickStartY=0;this._simulateTouch=!1;this._autoSizeMode=Ve.STAGE;this._pendingAnimation=this._opened=!1;this._pendingOpened=null;this._pullableEdge=ra.LEFT;this._ignoreDrawerResize=this._ignoreContentResize=!1;this._focusExclusions=[];this.initializeDrawerTheme();fa.call(this);this.set_content(a);this.set_drawer(b);this.addEventListener("addedToStage",m(this,this.drawer_addedToStageHandler))};t["feathers.controls.Drawer"]=Tf;Tf.__name__="feathers.controls.Drawer";
Tf.__interfaces__=[Nh,mf];Tf.__super__=fa;Tf.prototype=I(fa.prototype,{_focusExclusions:null,get_focusExclusions:function(){return this._edgePuller!=null&&(this._edgePuller.get_opened()||this._edgePuller.get_active())?this._focusExclusions:null},_edgePuller:null,_drawerMeasurements:null,_ignoreDrawerResize:null,_drawer:null,get_drawer:function(){return this._drawer},set_drawer:function(a){if(this._drawer==a)return this._drawer;this._drawer!=null&&(this._drawer.removeEventListener("resize",m(this,
this.drawer_drawer_resizeHandler)),this._drawerMeasurements.restore(this._drawer),this._drawer.parent==this&&this.removeChild(this._drawer));this._drawer=a;this._drawer!=null&&(this._drawer.set_visible(!1),this.addChild(this._drawer),w.__implements(this._drawer,Fa)&&this._drawer.initializeNow(),this._drawerMeasurements==null?this._drawerMeasurements=new Sb(this._drawer):this._drawerMeasurements.save(this._drawer),this._drawer.addEventListener("resize",m(this,this.drawer_drawer_resizeHandler),!1,0,
!0));this.setInvalid(x.DATA);return this._drawer},_contentMeasurements:null,_ignoreContentResize:null,_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;this._content!=null&&(this._content.removeEventListener("resize",m(this,this.drawer_content_resizeHandler)),this._contentMeasurements.restore(this._content),this._content.parent==this&&this.removeChild(this._content),V.remove(this._focusExclusions,this._content));this._content=
a;this._content!=null&&(this.addChildAt(this._content,0),w.__implements(this._content,Fa)&&this._content.initializeNow(),this._contentMeasurements==null?this._contentMeasurements=new Sb(this._content):this._contentMeasurements.save(this._content),this._content.addEventListener("resize",m(this,this.drawer_content_resizeHandler),!1,0,!0),this._focusExclusions.push(this._content));this.setInvalid(x.DATA);return this._content},_pullableEdge:null,get_pullableEdge:function(){return this._pullableEdge},
set_pullableEdge:function(a){if(this._pullableEdge==a)return this._pullableEdge;this._pullableEdge=a;this.setInvalid(x.DATA);return this._pullableEdge},_pendingOpened:null,_pendingAnimation:null,_opened:null,get_opened:function(){return this._pendingOpened!=null?this._pendingOpened:this._opened},set_opened:function(a){a?this.openDrawer(this._animateOpenedProperty):this.closeDrawer(this._animateOpenedProperty);return this._pendingOpened!=null?this._pendingOpened:this._opened},_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},
set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this.stage!=null&&(this._autoSizeMode==Ve.STAGE?(this.stage.addEventListener("resize",m(this,this.drawer_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.drawer_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler))));
return this._autoSizeMode},_simulateTouch:null,get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==a)return this._simulateTouch;this._simulateTouch=a;this.setInvalid(x.DATA);return this._simulateTouch},_currentOverlaySkin:null,_overlaySkinMeasurements:null,_overlaySkinAlpha:null,_fallbackOverlaySkin:null,_clickStartX:null,_clickStartY:null,_clickOverlayToClose:null,get_clickOverlayToClose:function(){return this._clickOverlayToClose},set_clickOverlayToClose:function(a){return this._clickOverlayToClose=
a},_swipeCloseEnabled:null,get_swipeCloseEnabled:function(){return this._swipeCloseEnabled},set_swipeCloseEnabled:function(a){if(this._swipeCloseEnabled==a)return this._swipeCloseEnabled;this._swipeCloseEnabled=a;this.setInvalid(x.STATE);return this._swipeCloseEnabled},_swipeOpenEnabled:null,get_swipeOpenEnabled:function(){return this._swipeOpenEnabled},set_swipeOpenEnabled:function(a){if(this._swipeOpenEnabled==a)return this._swipeOpenEnabled;this._swipeOpenEnabled=a;this.setInvalid(x.STATE);return this._swipeOpenEnabled},
_animateOpenedProperty:null,get_animateOpenedProperty:function(){return this._animateOpenedProperty},set_animateOpenedProperty:function(a){return this._animateOpenedProperty=a},dispose:function(){this._content!=null&&this.set_content(null);this._drawer!=null&&this.set_drawer(null);fa.prototype.dispose.call(this)},openDrawer:function(a){a==null&&(a=!0);this._pendingAnimation=a;if(this._pendingOpened==null||!this._pendingOpened){this._pendingOpened=!0;if(this._drawer==null)throw new Cb("Cannot set opened property to true because drawer property is null");
this.setInvalid(x.DATA)}},closeDrawer:function(a){a==null&&(a=!0);this._pendingAnimation=a;if(this._pendingOpened==null||this._pendingOpened){this._pendingOpened=!1;if(this._drawer==null)throw new Cb("Cannot set opened property to true because drawer property is null");this.setInvalid(x.DATA)}},initializeDrawerTheme:function(){Yv.initialize()},initialize:function(){fa.prototype.initialize.call(this);this._edgePuller==null&&(this._edgePuller=new mg(this._content));this._edgePuller.addEventListener("opening",
m(this,this.drawer_edgePuller_openingHandler));this._edgePuller.addEventListener("closing",m(this,this.drawer_edgePuller_closingHandler));this._edgePuller.addEventListener("open",m(this,this.drawer_edgePuller_openHandler));this._edgePuller.addEventListener("close",m(this,this.drawer_edgePuller_closeHandler));this._edgePuller.addEventListener("cancel",m(this,this.drawer_edgePuller_cancelHandler));this._edgePuller.addEventListener("change",m(this,this.drawer_edgePuller_changeHandler))},update:function(){var a=
this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);a&&(this._edgePuller.set_target(this._content),this._edgePuller.set_pullableEdge(this._pullableEdge),this._edgePuller.simulateTouch=this._simulateTouch);c&&this.refreshOverlaySkin();(b||a)&&this.refreshEnabled();this.measure();this.layoutChildren();a&&(this._pendingOpened!=null?(a=this._edgePuller.get_snapDuration(),this._pendingAnimation||this._edgePuller.set_snapDuration(0),this._edgePuller.set_opened(this._pendingOpened),
this._pendingAnimation||this._edgePuller.set_snapDuration(a),this._pendingOpened=null):this._edgePuller.set_opened(this._opened))},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;if(this._autoSizeMode!=Ve.CONTENT&&this.stage!=null){var h=this.globalToLocal(new Ea);f=this.globalToLocal(new Ea(this.stage.stageWidth,
this.stage.stageHeight));g=f.x-h.x;h=f.y-h.y;return this.saveMeasurements(g,h,g,h)}h=null;w.__implements(this._content,rb)&&(h=this._content);if(this._content!=null){var n=this._ignoreContentResize;this._ignoreContentResize=!0;df.resetFluidlyWithParentValues(this._contentMeasurements,this._content,this.get_explicitWidth(),this.get_explicitHeight(),this.get_explicitMinWidth(),this.get_explicitMinHeight(),this.get_explicitMaxWidth(),this.get_explicitMaxHeight());w.__implements(this._content,da)&&this._content.validateNow();
this._ignoreContentResize=n}n=this.get_explicitWidth();a&&(n=0,this._content!=null&&(n=this._content.get_width()));a=this.get_explicitHeight();b&&(a=0,this._content!=null&&(a=this._content.get_height()));b=this.get_explicitMinWidth();c&&(b=h!=null?h.get_minWidth():this._contentMeasurements!=null&&this._contentMeasurements.minWidth!=null?this._contentMeasurements.minWidth:0);c=this.get_explicitMinHeight();d&&(c=h!=null?h.get_minHeight():this._contentMeasurements!=null&&this._contentMeasurements.minHeight!=
null?this._contentMeasurements.minHeight:0);d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._contentMeasurements!=null&&this._contentMeasurements.maxWidth!=null?this._contentMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._contentMeasurements!=null&&this._contentMeasurements.maxHeight!=null?this._contentMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},refreshEnabled:function(){this._edgePuller.enabled=this._enabled&&
this._drawer!=null&&(this._opened&&this._swipeCloseEnabled||!this._opened&&this._swipeOpenEnabled);w.__implements(this._content,Fa)&&this._content.set_enabled(this._enabled);w.__implements(this._drawer,Fa)&&this._drawer.set_enabled(this._enabled)},refreshOverlaySkin:function(){var a=this._currentOverlaySkin;this._currentOverlaySkin=this.getCurrentOverlaySkin();this._currentOverlaySkin!=a&&(this.removeCurrentOverlaySkin(a),this._currentOverlaySkin==null?this._overlaySkinMeasurements=null:(w.__implements(this._currentOverlaySkin,
Fa)&&this._currentOverlaySkin.initializeNow(),this._overlaySkinMeasurements==null?this._overlaySkinMeasurements=new Sb(this._currentOverlaySkin):this._overlaySkinMeasurements.save(this._currentOverlaySkin),this._overlaySkinAlpha=this._currentOverlaySkin.get_alpha(),w.__implements(this._currentOverlaySkin,qb)&&this._currentOverlaySkin.set_uiContext(this),this._currentOverlaySkin.addEventListener("mouseDown",m(this,this.drawer_overlaySkin_mouseDownHandler),!1,0,!0),this._currentOverlaySkin.addEventListener("click",
m(this,this.drawer_overlaySkin_clickHandler),!1,0,!0),this._currentOverlaySkin.addEventListener("touchBegin",m(this,this.drawer_overlaySkin_touchBeginHandler),!1,0,!0),this._currentOverlaySkin.addEventListener("touchTap",m(this,this.drawer_overlaySkin_touchTapHandler),!1,0,!0),this._currentOverlaySkin.set_visible(!1),a=-1,this._drawer!=null&&(a=this.getChildIndex(this._drawer)),a==-1&&(a=this.get_numChildren()),this.addChildAt(this._currentOverlaySkin,a)))},getCurrentOverlaySkin:function(){return this.get_overlaySkin()==
null?(this._fallbackOverlaySkin==null&&(this._fallbackOverlaySkin=new Da,this._fallbackOverlaySkin.get_graphics().beginFill(16711935,0),this._fallbackOverlaySkin.get_graphics().drawRect(0,0,1,1),this._fallbackOverlaySkin.get_graphics().endFill()),this._fallbackOverlaySkin):this.get_overlaySkin()},removeCurrentOverlaySkin:function(a){a!=null&&(a.removeEventListener("mouseDown",m(this,this.drawer_overlaySkin_mouseDownHandler)),a.removeEventListener("click",m(this,this.drawer_overlaySkin_clickHandler)),
a.removeEventListener("touchBegin",m(this,this.drawer_overlaySkin_touchBeginHandler)),a.removeEventListener("touchTap",m(this,this.drawer_overlaySkin_touchTapHandler)),w.__implements(a,qb)&&a.set_uiContext(null),this._overlaySkinMeasurements.restore(a),this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),a.parent==this&&this.removeChild(a))},layoutChildren:function(){var a=this._ignoreContentResize;this._ignoreContentResize=!0;this._content!=null&&(this._content.set_x(0),this._content.set_y(0),
this._content.get_width()!=this.actualWidth&&this._content.set_width(this.actualWidth),this._content.get_height()!=this.actualHeight&&this._content.set_height(this.actualHeight),w.__implements(this._content,da)&&this._content.validateNow());this._ignoreContentResize=a;this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_x(0),this._currentOverlaySkin.set_y(0),this._currentOverlaySkin.set_width(this.actualWidth),this._currentOverlaySkin.set_height(this.actualHeight));a=this._ignoreDrawerResize;
this._ignoreDrawerResize=!0;if(this._drawer!=null){switch(this._pullableEdge._hx_index){case 0:this._drawer.set_x(0);this._drawer.set_width(this.actualWidth);break;case 1:this._drawer.set_y(0);this._drawer.set_height(this.actualHeight);break;case 2:this._drawer.set_x(0);this._drawer.set_width(this.actualWidth);break;case 3:this._drawer.set_y(0);this._drawer.set_height(this.actualHeight);break;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}w.__implements(this._drawer,
da)&&this._drawer.validateNow();var b=0;if(this._drawer!=null)switch(this._pullableEdge._hx_index){case 0:b=this._drawer.get_height();break;case 1:b=this._drawer.get_width();break;case 2:b=this._drawer.get_height();break;case 3:b=this._drawer.get_width();break;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}this._edgePuller.set_maxPullDistance(b)}this._ignoreDrawerResize=a},updateWithPullDistance:function(){switch(this._pullableEdge._hx_index){case 0:this._drawer.set_y(-this._drawer.get_height()+
this._edgePuller.get_pullDistance());break;case 1:this._drawer.set_x(this.actualWidth-this._edgePuller.get_pullDistance());break;case 2:this._drawer.set_y(this.actualHeight-this._edgePuller.get_pullDistance());break;case 3:this._drawer.set_x(-this._drawer.get_width()+this._edgePuller.get_pullDistance());break;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}this._currentOverlaySkin!=null&&this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha*(this._edgePuller.get_pullDistance()/
this.getMaxPullDistance()))},getMaxPullDistance:function(){if(this._edgePuller.get_maxPullDistance()!=null)return this._edgePuller.get_maxPullDistance();if(this._content==null)return 0;switch(this._pullableEdge._hx_index){case 0:return this._content.get_height();case 1:return this._content.get_width();case 2:return this._content.get_height();case 3:return this._content.get_width();default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}},clearFocusOnOpening:function(){if(this._focusManager!=
null){if(this._focusManager.get_focus()==null)return;w.__implements(this._content,qd)&&this._focusManager.get_focus()==this._content?this._focusManager.set_focus(null):this._content instanceof zb&&this._content.contains(this._focusManager.get_focus())&&this._focusManager.set_focus(null)}this.stage.get_focus()!=null&&(this.stage.get_focus()==this._content||this._content instanceof zb&&this._content.contains(this.stage.get_focus()))&&this.stage.set_focus(this.stage)},drawer_edgePuller_openingHandler:function(a){var b=
this._edgePuller.get_touchPointID();if(b!=null){var c=Pd.forStage(this.stage);b=this._edgePuller.get_touchPointIsSimulated()?c.claimMouse(this):c.claimTouch(b,this);if(!b){a.preventDefault();return}}(b=Y.dispatch(this,"opening"))?(this.clearFocusOnOpening(),this.updateWithPullDistance(),this._drawer.set_visible(!0),this._currentOverlaySkin!=null&&this._currentOverlaySkin.set_visible(!0)):a.preventDefault()},drawer_edgePuller_closingHandler:function(a){Y.dispatch(this,"closing")?(this.updateWithPullDistance(),
this._drawer.set_visible(!0),this._currentOverlaySkin!=null&&this._currentOverlaySkin.set_visible(!0)):a.preventDefault()},drawer_edgePuller_openHandler:function(a){this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),this._currentOverlaySkin.set_visible(!0));this._opened=!0;Y.dispatch(this,"open");this.setInvalid(x.STATE)},drawer_edgePuller_closeHandler:function(a){this._drawer.set_visible(!1);this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),
this._currentOverlaySkin.set_visible(!1));this._opened=!1;Y.dispatch(this,"close");this.setInvalid(x.STATE)},drawer_edgePuller_cancelHandler:function(a){this._opened||(this._drawer.set_visible(!1),this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),this._currentOverlaySkin.set_visible(!1)));Y.dispatch(this,"cancel");this.setInvalid(x.STATE)},drawer_edgePuller_changeHandler:function(a){this.updateWithPullDistance()},drawer_addedToStageHandler:function(a){this._autoSizeMode==
Ve.STAGE&&(this.setInvalid(x.SIZE),this.addEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler)),this.stage.addEventListener("resize",m(this,this.drawer_stage_resizeHandler)))},drawer_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.drawer_stage_resizeHandler))},drawer_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},drawer_overlaySkin_mouseDownHandler:function(a){this._enabled&&
(this._clickStartX=a.localX,this._clickStartY=a.localY)},drawer_overlaySkin_clickHandler:function(a){if(this._enabled&&this._clickOverlayToClose){var b=Math.abs(a.localY-this._clickStartY);Math.abs(a.localX-this._clickStartX)>Tf.MAX_CLICK_DISTANCE_FOR_CLOSE||b>Tf.MAX_CLICK_DISTANCE_FOR_CLOSE||this.set_opened(!1)}},drawer_overlaySkin_touchBeginHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(this._clickStartX=a.localX,this._clickStartY=a.localY)},drawer_overlaySkin_touchTapHandler:function(a){if(this._enabled&&
!a.isPrimaryTouchPoint){var b=Math.abs(a.localY-this._clickStartY);Math.abs(a.localX-this._clickStartX)>Tf.MAX_CLICK_DISTANCE_FOR_CLOSE||b>Tf.MAX_CLICK_DISTANCE_FOR_CLOSE||this.set_opened(!1)}},drawer_drawer_resizeHandler:function(a){this._ignoreDrawerResize||this.setInvalid(x.SIZE)},drawer_content_resizeHandler:function(a){this._ignoreContentResize||(this._contentMeasurements.save(this.get_content()),this.setInvalid(x.SIZE))},__overlaySkin:null,get_overlaySkin:function(){return this.__overlaySkin},
set_overlaySkin:function(a){if(!this.setStyle("overlaySkin")||this.__overlaySkin==a)return this.__overlaySkin;this._previousClearStyle=m(this,this.clearStyle_overlaySkin);this.__overlaySkin=a;this.setInvalid(x.STYLES);return this.__overlaySkin},clearStyle_overlaySkin:function(){this.set_overlaySkin(null);return this.get_overlaySkin()},get_styleContext:function(){return Tf},__class__:Tf,__properties__:I(fa.prototype.__properties__,{set_animateOpenedProperty:"set_animateOpenedProperty",get_animateOpenedProperty:"get_animateOpenedProperty",
set_swipeOpenEnabled:"set_swipeOpenEnabled",get_swipeOpenEnabled:"get_swipeOpenEnabled",set_swipeCloseEnabled:"set_swipeCloseEnabled",get_swipeCloseEnabled:"get_swipeCloseEnabled",set_clickOverlayToClose:"set_clickOverlayToClose",get_clickOverlayToClose:"get_clickOverlayToClose",set_overlaySkin:"set_overlaySkin",get_overlaySkin:"get_overlaySkin",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode",set_opened:"set_opened",
get_opened:"get_opened",set_pullableEdge:"set_pullableEdge",get_pullableEdge:"get_pullableEdge",set_content:"set_content",get_content:"get_content",set_drawer:"set_drawer",get_drawer:"get_drawer",get_focusExclusions:"get_focusExclusions"})});var Hi=function(a,b){b==null&&(b=!0);this._windows=new G;this._menus=new G;this._nocache=!0;Tf.call(this);this.build=new Gb;this._nocache=b;k.econfig=new Fb(a,m(this,this.onConfig),b)};t["com.tilbuci.Editor"]=Hi;Hi.__name__="com.tilbuci.Editor";Hi.__super__=Tf;
Hi.prototype=I(Tf.prototype,{build:null,_player:null,_nocache:null,_interface:null,_leftArea:null,_rightArea:null,_centertArea:null,_playerControls:null,_menus:null,_windows:null,_devTimer:null,_playback:null,registerPlugin:function(a){var b=k.plugins,c=a.get_plname();b.h[c]=a;this._player!=null&&this._player.player.registerPlugin(a)},kill:function(){this.removeEventListener("resize",m(this,this.redraw));this.removeChildren();this.set_opened(!1);this.set_drawer(null);this._interface.removeChildren();
this._interface=null;this._leftArea.kill();this._leftArea=null;var a=this._menus.h,b=a;a=Object.keys(a);for(var c=a.length,d=0;d<c;){var f=b[a[d++]];f.kill()}a=this._menus.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=a[d++],b=this._menus,Object.prototype.hasOwnProperty.call(b.h,f)&&delete b.h[f];this._menus=null;b=a=this._windows.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.kill();a=this._windows.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=a[d++],b=this._windows,Object.prototype.hasOwnProperty.call(b.h,
f)&&delete b.h[f];this._windows=null;k.econfig.kill();k.econfig=null;k.ln.kill();k.ln=null;k.ws.kill();k.ws=null;k.up.kill();k.up=null},halt:function(a){this.removeChildren();var b="System down :-(";switch(a){case "config":k.econfig.kill();k.econfig=null;b="Error while loading the basic system configuration.";break;case "language":k.econfig.kill();k.econfig=null;k.ln.kill();k.ln=null;b="Error while loading the default language file.";break;case "sysconfig":k.econfig.kill(),k.econfig=null,k.ln.kill(),
k.ln=null,k.ws.kill(),k.ws=null,b="Error while loading the system configuration."}a=new Uc;a.set_layout(new Gi);a.setPadding(10);var c=new ia;c.set_text(b);c.set_layoutData(fd.center());a.addChild(c);Aa.addPopUp(a,this)},onConfig:function(a){if(a)if(k.ln=new Kk,k.ln.get_ok()){k.ws=new Zq(k.econfig.get_ws());a=new G;if(ya.us!=""&&ya.uk!=""){var b=ya.us;a.h.us=b;b=ya.uk;a.h.uk=b}k.ws.send("System/GetConfig",a,m(this,this.onSysConfig))}else this.halt("language");else this.halt("config")},onSysConfig:function(a,
b){if(a)if(b.map.h.e!=0)this.halt("sysconfig");else{k.singleUser=b.map.h.singleUser;k.validEmail=b.map.h.validEmail;k.showWindow=m(this,this.showWindow);Object.prototype.hasOwnProperty.call(b.map.h,"host")&&(k.host=b.map.h.host);a=b.map.h.fonts;for(var c=0,d=a.length;c<d;){var f=c++;new nm(k.econfig.get_font()+H.string(a[f].v),a[f].n)}k.acInfo=new Zv;this.startInterface();b.map.h.autouser!=""&&b.map.h.autokey!=""?(k.userLevel=b.map.h.autolevel,k.ws.setUser(b.map.h.autouser,b.map.h.autokey,b.map.h.autolevel)):
b.map.h.singleUser?(k.userLevel=0,k.ws.setUser("single",b.map.h.userKey,0)):this.showWindow("login");k.up=new Vc(this.stage);window.TBB_startTabsChannel(m(this,this.onChannelMessage));this._devTimer=new Gc(1E3);this._devTimer.run=m(this,this.devStart)}else this.halt("sysconfig")},onChannelMessage:function(a,b){a=="copy"&&k.copy.receiveMessage(b)},devStart:function(){try{this._devTimer.stop()}catch(a){}this._devTimer=null;k.ws.get_user()=="single"&&(ya.scene!=""&&(k.sceneToLoad=ya.scene),ya.movie!=
""&&this._player.player.load(ya.movie))},startInterface:function(){k.stage=this.stage;this._interface=new Fj;this._interface.set_layoutData(fd.fill());this._interface.set_backgroundSkin(new rh);this.set_content(this._interface);this._leftArea=new $q(m(this,this.actionLeftInterface));this._centertArea=new je;this._centertArea.set_layout(new Gi);var a=new Za;a.set_fill(ub.SolidColor(10066329));this._centertArea.set_backgroundSkin(a);this._player=new ar(k.econfig.get_player(),m(this,this.playerCallback));
this._playerControls=new br(this._player,m(this,this.playerCallback));this._centertArea.addChild(this._playerControls);a=k.plugins.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];this._player.player.registerPlugin(f)}k.editorActions=m(this,this.editorActions);k.history=new sn;this._rightArea=new cr((B=this._playerControls,m(B,B.centerPlayer)),m(this,this.startWindow));a=this._menus;b=new dr(m(this,this.actionMenuMovie));a.h["left-movie"]=b;a=this._menus;b=new er(m(this,this.actionMenuScene));
a.h["left-scene"]=b;a=this._menus;b=new fr(m(this,this.actionMenuMedia));a.h["left-media"]=b;a=this._menus;b=new gr(m(this,this.actionMenuContraptions));a.h["left-contraptions"]=b;a=this._menus;b=new hr(m(this,this.actionMenuNarrative));a.h["left-narrative"]=b;a=this._menus;b=new ir(m(this,this.actionMenuExchange));a.h["left-exchange"]=b;a=this._menus;b=new jr(m(this,this.actionMenuKeyframe));a.h["left-keyframe"]=b;this._playback=new kr((B=this._playerControls,m(B,B.centerPlayer)));this.addEventListener("resize",
m(this,this.redraw));this.redraw()},editorActions:function(a,b){switch(a){case "addleftbutton":return this._leftArea.addButton(b.h.name,b.h.callback,b.h.top,b.h.asset),!0;case "hidewindow":return a=b.h.wd,Aa.removePopUp(a),!0;case "showwindow":return a=b.h.wd,Aa.addPopUp(a,this),a.redraw(),a.acStart(),!0;default:return!1}},actionLeftInterface:function(a){switch(a){case "close-interface":this.redraw();break;case "contraptions":this.set_drawer(this._menus.h["left-contraptions"]);this.set_opened(!0);
this._menus.h["left-contraptions"].onShow();break;case "exchange":this.set_drawer(this._menus.h["left-exchange"]);this.set_opened(!0);this._menus.h["left-exchange"].onShow();break;case "keyframe":this.set_drawer(this._menus.h["left-keyframe"]);this.set_opened(!0);this._menus.h["left-keyframe"].onShow();break;case "media":this.set_drawer(this._menus.h["left-media"]);this.set_opened(!0);this._menus.h["left-media"].onShow();break;case "movie":this.set_drawer(this._menus.h["left-movie"]);this.set_opened(!0);
this._menus.h["left-movie"].onShow();break;case "narrative":this.set_drawer(this._menus.h["left-narrative"]);this.set_opened(!0);this._menus.h["left-narrative"].onShow();break;case "open-interface":this.redraw();break;case "scene":this.set_drawer(this._menus.h["left-scene"]);this.set_opened(!0);this._menus.h["left-scene"].onShow();break;case "setup":this.showWindow("setup");break;case "visitors":this.showWindow("visitors")}},actionMenuMovie:function(a){switch(a){case "menu-close":this.set_opened(!1);
break;case "navigation":this.set_opened(!1);this.showWindow("seqmovie");break;case "new":this.set_opened(!1);this.showWindow("newmovie");break;case "notes":this.set_opened(!1);this.showWindow("designnotes");break;case "open":this.set_opened(!1);this.showWindow("openmovie");break;case "prop":this.set_opened(!1);this.showWindow("propmovie");break;case "remove":this.set_opened(!1);this.showWindow("removemovie");break;case "republish":this.set_opened(!1);this.showWindow("republish");break;case "snippets":this.set_opened(!1);
this.showWindow("snippets");break;case "users":this.set_opened(!1);this.showWindow("usermovie");break;case "window-notes":this.showWindow("designnotes")}},actionMenuScene:function(a){switch(a){case "dflow":this.set_opened(!1);this.showWindow("dflowscene");break;case "menu-close":this.set_opened(!1);break;case "new":this.set_opened(!1);this.showWindow("newscene");break;case "open":this.set_opened(!1);this.showWindow("openscene");break;case "prop":this.set_opened(!1);this.showWindow("propscene");break;
case "publish":this.set_opened(!1);this.saveScene(!0);break;case "save":this.set_opened(!1);this.saveScene();break;case "saveas":this.set_opened(!1);this.showWindow("saveasscene");break;case "version":this.set_opened(!1);this.showWindow("versionscene");break;case "window-notes":this.showWindow("designnotes")}},actionMenuKeyframe:function(a){switch(a){case "add":this._player.addKeyframe();this.set_opened(!1);break;case "manage":this.showWindow("kfmanage");this.set_opened(!1);break;case "menu-close":this.set_opened(!1);
break;case "remove":p.movie.scene.keyframes.length>1?this._player.removeKeyframe():k.showMsg(k.ln.get("window-kfmanage-onlyone"));this._playerControls.updateInfo();this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},startWindow:function(a,b){switch(a){case "assetbase":return this.set_opened(!1),this.showWindow("assetbase"),this._windows.h.assetbase.action("start",b),!0;case "collectionbase":return this.set_opened(!1),this.showWindow("collectionbase"),this._windows.h.collectionbase.action("start",
b),!0;case "timedaction":return this.set_opened(!1),this.showWindow("timedaction"),this._windows.h.timedaction.action("start",b),!0;default:return!1}},actionMenuMedia:function(a){switch(a){case "audio":this.set_opened(!1);this.showWindow("mediaaudio");break;case "collection":this.set_opened(!1);this.showWindow("mediacollection");break;case "collectionadd":this.set_opened(!1);this.showWindow("mediacollectionadd");break;case "collectionrm":this.set_opened(!1);this.showWindow("mediacollectionrm");break;
case "embed":this.set_opened(!1);this.showWindow("mediaembed");break;case "html":this.set_opened(!1);this.showWindow("mediahtml");break;case "menu-close":this.set_opened(!1);break;case "paragraph":this.set_opened(!1);this.showWindow("mediaparagraph");break;case "picture":this.set_opened(!1);this.showWindow("mediapicture");break;case "shape":this.set_opened(!1);this.showWindow("mediashape");break;case "spritemap":this.set_opened(!1);this.showWindow("mediaspritemap");break;case "strings":this.set_opened(!1);
this.showWindow("mediastrings");break;case "text":this.set_opened(!1);this.showWindow("mediatext");break;case "video":this.set_opened(!1);this.showWindow("mediavideo");break;case "window-notes":this.showWindow("designnotes")}},actionMenuContraptions:function(a){switch(a){case "background":this.set_opened(!1);this.showWindow("background");break;case "cover":this.set_opened(!1);this.showWindow("cover");break;case "form":this.set_opened(!1);this.showWindow("form");break;case "interfaces":this.set_opened(!1);
this.showWindow("interfaces");break;case "menu-close":this.set_opened(!1);break;case "menus":this.set_opened(!1);this.showWindow("menus");break;case "messages":this.set_opened(!1);this.showWindow("messages");break;case "music":this.set_opened(!1);this.showWindow("music");break;case "sound":this.set_opened(!1);this.showWindow("sound");break;case "targets":this.set_opened(!1);this.showWindow("targets");break;case "window-notes":this.showWindow("designnotes")}},actionMenuNarrative:function(a){switch(a){case "battle":this.set_opened(!1);
this.showWindow("narrative-battle");break;case "char":this.set_opened(!1);this.showWindow("narrative-char");break;case "dflow":this.set_opened(!1);this.showWindow("narrative-dflow");break;case "diag":this.set_opened(!1);this.showWindow("narrative-diag");break;case "inventory":this.set_opened(!1);this.showWindow("narrative-inventory");break;case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionMenuExchange:function(a){switch(a){case "cordova":this.set_opened(!1);
this.showWindow("exchangecord");break;case "desktop":this.set_opened(!1);this.showWindow("exchangedesk");break;case "export":this.set_opened(!1);this.showWindow("exchangeexport");break;case "iframe":this.set_opened(!1);this.showWindow("exchangeiframe");break;case "import":this.set_opened(!1);this.showWindow("exchangeimport");break;case "menu-close":this.set_opened(!1);break;case "publish":this.set_opened(!1);this.showWindow("exchangepub");break;case "pwa":this.set_opened(!1);this.showWindow("exchangepwa");
break;case "website":this.set_opened(!1);this.showWindow("exchangewebsite");break;case "window-notes":this.showWindow("designnotes")}},actionWindowSetup:function(a,b){switch(a){case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowTestingActions:function(a,b){switch(a){case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowVisitors:function(a,b){switch(a){case "menu-close":this.set_opened(!1);
break;case "window-notes":this.showWindow("designnotes")}},actionWindowNotes:function(a,b){switch(a){case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrMenu:function(a,b){switch(a){case "menu-close":this.set_opened(!1);break;case "menubrowseimgbg":b=k.temp;a=new G;a.h.type="picture";a.h.call="menubrowseimgbg";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",
a);break;case "menubrowseimgbt":b=k.temp;a=new G;a.h.type="picture";a.h.call="menubrowseimgbt";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrMessages:function(a,b){switch(a){case "menu-close":this.set_opened(!1);break;case "messagesbrowseimgbg":b=k.temp;a=new G;a.h.type="picture";a.h.call="messagesbrowseimgbg";b.h["Media/Single"]=a;this.showWindow("mediapicture");
b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "messagesbrowseimgbt0":b=k.temp;a=new G;a.h.type="picture";a.h.call="messagesbrowseimgbt0";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "messagesbrowseimgbt1":b=k.temp;a=new G;a.h.type="picture";a.h.call="messagesbrowseimgbt1";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;
a=new G;a.h.mode="single";b.action("setmode",a);break;case "messagesbrowseimgbt2":b=k.temp;a=new G;a.h.type="picture";a.h.call="messagesbrowseimgbt2";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrCover:function(a,b){switch(a){case "landscape":b=k.temp;a=new G;a.h.type="picture";a.h.call="landscapecover";b.h["Media/Single"]=a;this.showWindow("mediapicture");
b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "portrait":b=k.temp;a=new G;a.h.type="picture";a.h.call="portraitcover";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrBackground:function(a,b){switch(a){case "landscape":b=k.temp;a=new G;a.h.type="picture";
a.h.call="landscapebackground";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "portrait":b=k.temp;a=new G;a.h.type="picture";a.h.call="portraitbackground";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrTarget:function(a,
b){switch(a){case "default":b=k.temp;a=new G;a.h.type="picture";a.h.call="targetdefault";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "inst1":b=k.temp;a=new G;a.h.type="picture";a.h.call="targetinst1";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "inst2":b=k.temp;a=new G;a.h.type="picture";a.h.call="targetinst2";
b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "inst3":b=k.temp;a=new G;a.h.type="picture";a.h.call="targetinst3";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "interf":b=k.temp;a=new G;a.h.type="picture";a.h.call="targetinterf";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;
a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "menus":b=k.temp;a=new G;a.h.type="picture";a.h.call="targetmenus";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrForm:function(a,b){switch(a){case "formbackground":b=k.temp;a=new G;a.h.type="picture";a.h.call="formbackground";b.h["Media/Single"]=
a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "formbtcancel":b=k.temp;a=new G;a.h.type="picture";a.h.call="formbtcancel";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "formbtok":b=k.temp;a=new G;a.h.type="picture";a.h.call="formbtok";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;
a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrInterf:function(a,b){switch(a){case "intanim":b=k.temp;a=new G;a.h.type="spritemap";a.h.call="intanim";b.h["Media/Single"]=a;this.showWindow("mediaspritemap");b=this._windows.h.mediaspritemap;a=new G;a.h.mode="single";b.action("setmode",a);break;case "intbackground":b=k.temp;a=new G;a.h.type="picture";a.h.call="intbackground";b.h["Media/Single"]=
a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "intimage":b=k.temp;a=new G;a.h.type="picture";a.h.call="intimage";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrMusic:function(a,b){switch(a){case "menu-close":this.set_opened(!1);
break;case "music":b=k.temp;a=new G;a.h.type="audio";a.h.call="music";b.h["Media/Single"]=a;this.showWindow("mediaaudio");b=this._windows.h.mediaaudio;a=new G;a.h.mode="single";b.action("setmode",a);break;case "window-notes":this.showWindow("designnotes")}},actionWindowContrSound:function(a,b){switch(a){case "menu-close":this.set_opened(!1);break;case "sound":b=k.temp;a=new G;a.h.type="audio";a.h.call="sound";b.h["Media/Single"]=a;this.showWindow("mediaaudio");b=this._windows.h.mediaaudio;a=new G;
a.h.mode="single";b.action("setmode",a);break;case "window-notes":this.showWindow("designnotes")}},actionWindowNarrChar:function(a,b){switch(a){case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowNarrDflow:function(a,b){switch(a){case "dflowbrowseimgbt":b=k.temp;a=new G;a.h.type="picture";a.h.call="dflowbrowseimgbt";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",
a);break;case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowNarrInventory:function(a,b){switch(a){case "inventclose":b=k.temp;a=new G;a.h.type="picture";a.h.call="inventclose";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "inventh":b=k.temp;a=new G;a.h.type="picture";a.h.call="inventh";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;
a=new G;a.h.mode="single";b.action("setmode",a);break;case "inventitem":b=k.temp;a=new G;a.h.type="picture";a.h.call="inventitem";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "inventv":b=k.temp;a=new G;a.h.type="picture";a.h.call="inventv";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);
break;case "window-notes":this.showWindow("designnotes")}},actionWindowNarrBattle:function(a,b){switch(a){case "battleattr":b=k.temp;a=new G;a.h.type="picture";a.h.call="battleattr";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "battleclose":b=k.temp;a=new G;a.h.type="picture";a.h.call="battleclose";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode=
"single";b.action("setmode",a);break;case "battleh":b=k.temp;a=new G;a.h.type="picture";a.h.call="battleh";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "battlev":b=k.temp;a=new G;a.h.type="picture";a.h.call="battlev";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "imgcard":b=k.temp;a=new G;a.h.type="picture";
a.h.call="imgcard";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "itgraphic":b=k.temp;a=new G;a.h.type="picture";a.h.call="itgraphic";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionWindowDiagChar:function(a,b){switch(a){case "audio":b=
k.temp;a=new G;a.h.type="audio";a.h.call="audiodialogue";b.h["Media/Single"]=a;this.showWindow("mediaaudio");b=this._windows.h.mediaaudio;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionMovie:function(a,b){switch(a){case "browsefavicon":b=k.temp;a=new G;a.h.type="\u00b4picture";a.h.call="browsefavicon";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;
a.h.mode="single";b.action("setmode",a);break;case "browseimage":b=k.temp;a=new G;a.h.type="\u00b4picture";a.h.call="browseimage";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "browseloadingic":b=k.temp;a=new G;a.h.type="spritemap";a.h.call="browseloadingic";b.h["Media/Single"]=a;this.showWindow("mediaspritemap");b=this._windows.h.mediaspritemap;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);
break;case "movieload":this._player.player.load(b.h.id);break;case "window-notes":this.showWindow("designnotes")}},actionScene:function(a,b){switch(a){case "browsesceneimage":b=k.temp;a=new G;a.h.type="picture";a.h.call="browsesceneimage";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "sceneload":p.movie.get_mvId()!=""&&p.movie.loadScene(b.h.id);break;case "sceneversionload":p.movie.get_mvId()!=
""&&p.movie.loadScene(null,b.h.id);break;case "window-notes":this.showWindow("designnotes")}},actionExchange:function(a,b){switch(a){case "browsecordovaicon":b=k.temp;a=new G;a.h.type="picture";a.h.call="browsecordovaicon";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new G;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "window-notes":this.showWindow("designnotes")}},actionAssistant:function(a,b){switch(a){case "menu-close":this.set_opened(!1);
break;case "window-notes":this.showWindow("designnotes")}},actionKeyframe:function(a,b){switch(a){case "add":this._player.addKeyframe();this._playerControls.reCenter();this._playerControls.updateInfo();break;case "menu-close":this.set_opened(!1);break;case "reload":this._playerControls.reCenter();this._playerControls.updateInfo();break;case "remove":this._player.removeKeyframe();this._playerControls.reCenter();this._playerControls.updateInfo();break;case "window-notes":this.showWindow("designnotes")}},
saveScene:function(a){a==null&&(a=!1);for(var b={},c=Object.keys(p.movie.collections.h),d=c.length,f=0;f<d;){var g=c[f++];b[g]=p.movie.collections.h[g].toJson()}c=k.ws;d=new G;f=p.movie.get_mvId();d.h.movie=f;f=p.movie.get_scId();d.h.id=f;f=p.movie.scene.toJson();d.h.scene=f;d.h.collections=b;d.h.pub=a;c.send("Scene/Save",d,m(this,this.onSaveReturn))},onSaveReturn:function(a,b){a?b.map.h.e==0?b.map.h.pub?k.showMsg(k.ln.get("scene-save-okpublish")):k.showMsg(k.ln.get("scene-save-ok")):k.showPopup(k.ln.get("scene-save-windowtitle"),
k.ln.get("scene-save-error"),300,180,k.ln.get("default-ok")):k.showPopup(k.ln.get("scene-save-windowtitle"),k.ln.get("scene-save-error"),300,180,k.ln.get("default-ok"))},actionCollection:function(a,b){a=="window-notes"&&this.showWindow("designnotes")},actionTimed:function(a,b){a=="window-notes"&&this.showWindow("designnotes")},actionAsset:function(a,b){switch(a){case "file":switch(b.h.type){case "audio":this.showWindow("mediaaudio");a=this._windows.h.mediaaudio;var c=new G;c.h.mode="assetsingle";
c.h.num=b.h.num;a.action("setmode",c);break;case "html":this.showWindow("mediahtml");a=this._windows.h.mediahtml;c=new G;c.h.mode="assetsingle";c.h.num=b.h.num;a.action("setmode",c);break;case "paragraph":this.showWindow("mediaparagraph");a=this._windows.h.mediaparagraph;c=new G;c.h.mode="assetsingle";c.h.num=b.h.num;c.h.current=b.h.current;a.action("setmode",c);break;case "picture":this.showWindow("mediapicture");a=this._windows.h.mediapicture;c=new G;c.h.mode="assetsingle";c.h.num=b.h.num;a.action("setmode",
c);break;case "shape":this.showWindow("mediashape");a=this._windows.h.mediashape;c=new G;c.h.mode="assetsingle";c.h.num=b.h.num;c.h.current=b.h.current;a.action("setmode",c);break;case "spritemap":this.showWindow("mediaspritemap");a=this._windows.h.mediaspritemap;c=new G;c.h.mode="assetsingle";c.h.num=b.h.num;a.action("setmode",c);break;case "text":this.showWindow("mediatext");a=this._windows.h.mediatext;c=new G;c.h.mode="assetsingle";c.h.num=b.h.num;c.h.current=b.h.current;a.action("setmode",c);
break;case "video":this.showWindow("mediavideo"),a=this._windows.h.mediavideo,c=new G,c.h.mode="assetsingle",c.h.num=b.h.num,a.action("setmode",c)}break;case "window-notes":this.showWindow("designnotes")}},actionMedia:function(a,b){switch(a){case "addasset":a=this._windows.h.mediacollection;var c=new G;c.h.file=b.h.path+b.h.file;c.h.num=b.h.num;c.h.frames=b.h.frames;c.h.frtime=b.h.frtime;a.action("setfile",c);break;case "addinstance":for(c=V.substr(Ga.md5(b.h.asset),0,10);;){var d=p.movie.scene.keyframes[p.area.get_currentKf()];
if(!Object.prototype.hasOwnProperty.call(d.h,c))break;c=V.substr(Ga.md5(c),0,10)}var f=d=-1;if(ib.count(p.movie.scene.keyframes[p.area.get_currentKf()])>0){var g=p.movie.scene.keyframes[p.area.get_currentKf()].h;g=Object.keys(g);for(var h=g.length,n=0;n<h;){var l=g[n++];p.movie.scene.keyframes[p.area.get_currentKf()].h[l].horizontal.order>d&&(d=p.movie.scene.keyframes[p.area.get_currentKf()].h[l].horizontal.order+1);p.movie.scene.keyframes[p.area.get_currentKf()].h[l].vertical.order>f&&(f=p.movie.scene.keyframes[p.area.get_currentKf()].h[l].vertical.order+
1)}}else d=f=0;this._player.addInstance(c,{collection:b.h.collection,asset:b.h.asset,action:"",play:!0,horizontal:{order:d,x:0,y:0,alpha:1,width:320,height:320,rotation:0,visible:!0,color:"0xFFFFFF",colorAlpha:0,volume:1,pan:0,blur:"",dropshadow:"",textFont:"sans",textSize:20,textColor:"0xFFFFFF",textBold:!1,textItalic:!1,textLeading:10,textSpacing:0,textBackground:"",textAlign:"left"},vertical:{order:f,x:0,y:0,alpha:1,width:320,height:320,rotation:0,visible:!0,color:"0xFFFFFF",colorAlpha:0,volume:1,
pan:0,blur:"",dropshadow:"",textFont:"sans",textSize:20,textColor:"0xFFFFFF",textBold:!1,textItalic:!1,textLeading:10,textSpacing:0,textBackground:"",textAlign:"left"}});break;case "addnewasset":a=this._windows.h.mediacollection;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;c.h.frames=b.h.frames;c.h.frtime=b.h.frtime;a.action("addasset",c);break;case "addstage":k.temp.h["media/addstage"]=b;b.h.type=="shape"?this._player.createCollection(k.ln.get("menu-media-shape")+" "+V.dateStr(new Date),
m(this,this.onMediaAddStage),b.h.file):b.h.type=="paragraph"?this._player.createCollection(k.ln.get("menu-media-paragraph")+" "+V.dateStr(new Date),m(this,this.onMediaAddStage),b.h.file):b.h.type=="text"?this._player.createCollection(k.ln.get("menu-media-text")+" "+V.dateStr(new Date),m(this,this.onMediaAddStage),b.h.file):this._player.createCollection(b.h.file,m(this,this.onMediaAddStage),b.h.file);break;case "addtocol":c=b.h.type=="shape"?k.ln.get("menu-media-shape"):b.h.type=="paragraph"?k.ln.get("menu-media-paragraph"):
b.h.type=="text"?k.ln.get("menu-media-text"):b.h.file;for(a=V.substr(Ga.md5(c),0,10);Object.prototype.hasOwnProperty.call(p.movie.collections.h[b.h.col].assets.h,a);)a=V.substr(Ga.md5(a),0,10);d=p.movie.collections.h[b.h.col].assets;c=new Gj({name:c,type:b.h.type,order:ib.count(p.movie.collections.h[b.h.col].assets),time:5,action:"loop",frames:H.parseInt(b.h.frames),frtime:H.parseInt(b.h.frtime),file:{"@1":b.h.path+b.h.file,"@2":b.h.path+b.h.file,"@3":b.h.path+b.h.file,"@4":b.h.path+b.h.file,"@5":b.h.path+
b.h.file}});d.h[a]=c;p.movie.collections.h[b.h.col].assetOrder.push(a);if(b.h.stage=="true"){for(c=V.substr(Ga.md5(a),0,10);;){d=p.movie.scene.keyframes[p.area.get_currentKf()];if(!Object.prototype.hasOwnProperty.call(d.h,c))break;c=V.substr(Ga.md5(c),0,10)}f=d=-1;if(ib.count(p.movie.scene.keyframes[p.area.get_currentKf()])>0)for(g=p.movie.scene.keyframes[p.area.get_currentKf()].h,g=Object.keys(g),h=g.length,n=0;n<h;)l=g[n++],p.movie.scene.keyframes[p.area.get_currentKf()].h[l].horizontal.order>d&&
(d=p.movie.scene.keyframes[p.area.get_currentKf()].h[l].horizontal.order+1),p.movie.scene.keyframes[p.area.get_currentKf()].h[l].vertical.order>f&&(f=p.movie.scene.keyframes[p.area.get_currentKf()].h[l].vertical.order+1);else d=f=0;this._player.addInstance(c,{collection:b.h.col,asset:a,action:"",play:!0,horizontal:{order:d,x:0,y:0,alpha:1,width:320,height:320,rotation:0,visible:!0,color:"0xFFFFFF",colorAlpha:0,volume:1,pan:0,blur:"",dropshadow:"",textFont:"sans",textSize:20,textColor:"0xFFFFFF",textBold:!1,
textItalic:!1,textLeading:10,textSpacing:0,textBackground:"",textAlign:"left"},vertical:{order:f,x:0,y:0,alpha:1,width:320,height:320,rotation:0,visible:!0,color:"0xFFFFFF",colorAlpha:0,volume:1,pan:0,blur:"",dropshadow:"",textFont:"sans",textSize:20,textColor:"0xFFFFFF",textBold:!1,textItalic:!1,textLeading:10,textSpacing:0,textBackground:"",textAlign:"left"}})}break;case "assetsingle":a=this._windows.h.assetbase;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;c.h.frames=b.h.frames;
c.h.frtime=b.h.frtime;a.action("setfile",c);break;case "file":switch(b.h.type){case "audio":this.showWindow("mediaaudio");a=this._windows.h.mediaaudio;c=new G;c.h.mode="asset";c.h.num=b.h.num;a.action("setmode",c);break;case "html":this.showWindow("mediahtml");a=this._windows.h.mediahtml;c=new G;c.h.mode="asset";c.h.num=b.h.num;a.action("setmode",c);break;case "paragraph":this.showWindow("mediaparagraph");a=this._windows.h.mediaparagraph;c=new G;c.h.mode="asset";c.h.num=b.h.num;c.h.current=b.h.current;
a.action("setmode",c);break;case "picture":this.showWindow("mediapicture");a=this._windows.h.mediapicture;c=new G;c.h.mode="asset";c.h.num=b.h.num;a.action("setmode",c);break;case "shape":this.showWindow("mediashape");a=this._windows.h.mediashape;c=new G;c.h.mode="asset";c.h.num=b.h.num;c.h.current=b.h.current;a.action("setmode",c);break;case "spritemap":this.showWindow("mediaspritemap");a=this._windows.h.mediaspritemap;c=new G;c.h.mode="asset";c.h.num=b.h.num;a.action("setmode",c);break;case "text":this.showWindow("mediatext");
a=this._windows.h.mediatext;c=new G;c.h.mode="asset";c.h.num=b.h.num;c.h.current=b.h.current;a.action("setmode",c);break;case "video":this.showWindow("mediavideo"),a=this._windows.h.mediavideo,c=new G,c.h.mode="asset",c.h.num=b.h.num,a.action("setmode",c)}break;case "menu-close":this.set_opened(!1);break;case "newasset":switch(b.h.type){case "audio":this.showWindow("mediaaudio");a=this._windows.h.mediaaudio;c=new G;c.h.mode="newasset";a.action("setmode",c);break;case "html":this.showWindow("mediahtml");
a=this._windows.h.mediahtml;c=new G;c.h.mode="newasset";a.action("setmode",c);break;case "paragraph":this.showWindow("mediaparagraph");a=this._windows.h.mediaparagraph;c=new G;c.h.mode="newasset";a.action("setmode",c);break;case "picture":this.showWindow("mediapicture");a=this._windows.h.mediapicture;c=new G;c.h.mode="newasset";a.action("setmode",c);break;case "shape":this.showWindow("mediashape");a=this._windows.h.mediashape;c=new G;c.h.mode="newasset";a.action("setmode",c);break;case "spritemap":this.showWindow("mediaspritemap");
a=this._windows.h.mediaspritemap;c=new G;c.h.mode="newasset";a.action("setmode",c);break;case "text":this.showWindow("mediatext");a=this._windows.h.mediatext;c=new G;c.h.mode="newasset";a.action("setmode",c);break;case "video":this.showWindow("mediavideo"),a=this._windows.h.mediavideo,c=new G,c.h.mode="newasset",a.action("setmode",c)}break;case "single":if(Object.prototype.hasOwnProperty.call(k.temp.h,"Media/Single")){switch(k.temp.h["Media/Single"].h.call){case "audiodialogue":a=this._windows.h["narrative-diag"];
c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("audio",c);break;case "battleattr":a=this._windows.h["narrative-battle"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("battleattr",c);break;case "battleclose":a=this._windows.h["narrative-battle"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("battleclose",c);break;case "battleh":a=this._windows.h["narrative-battle"];c=new G;c.h.file=b.h.path+b.h.file;
c.h.type=b.h.type;c.h.name=b.h.file;a.action("battleh",c);break;case "battlev":a=this._windows.h["narrative-battle"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("battlev",c);break;case "browsecordovaicon":a=this._windows.h.exchangecord;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("browsecordovaicon",c);break;case "browsefavicon":a=this._windows.h.propmovie;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;
a.action("browsefavicon",c);break;case "browseimage":a=this._windows.h.propmovie;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("browseimage",c);break;case "browseloadingic":a=this._windows.h.propmovie;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;c.h.frames=b.h.frames;c.h.frtime=b.h.frtime;a.action("browseloadingic",c);break;case "browsesceneimage":a=this._windows.h.propscene;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;
a.action("browsesceneimage",c);break;case "dflowbrowseimgbt":a=this._windows.h["narrative-dflow"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("dflowbrowseimgbt",c);break;case "formbackground":a=this._windows.h.form;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("formbackground",c);break;case "formbtcancel":a=this._windows.h.form;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("formbtcancel",c);break;
case "formbtok":a=this._windows.h.form;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("formbtok",c);break;case "imgcard":a=this._windows.h["narrative-battle"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("imgcard",c);break;case "intanim":a=this._windows.h.interfaces;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;c.h.frames=b.h.frames;c.h.frtime=b.h.frtime;a.action("intanim",c);break;case "intbackground":a=
this._windows.h.interfaces;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("intbackground",c);break;case "intimage":a=this._windows.h.interfaces;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("intimage",c);break;case "inventclose":a=this._windows.h["narrative-inventory"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("inventclose",c);break;case "inventh":a=this._windows.h["narrative-inventory"];c=new G;
c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("inventh",c);break;case "inventitem":a=this._windows.h["narrative-inventory"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("inventitem",c);break;case "inventv":a=this._windows.h["narrative-inventory"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("inventv",c);break;case "itgraphic":a=this._windows.h["narrative-battle"];c=new G;c.h.file=b.h.path+b.h.file;c.h.type=
b.h.type;c.h.name=b.h.file;a.action("itgraphic",c);break;case "landscapebackground":a=this._windows.h.background;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("landscape",c);break;case "landscapecover":a=this._windows.h.cover;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("landscape",c);break;case "menubrowseimgbg":a=this._windows.h.menus;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("menubrowseimgbg",
c);break;case "menubrowseimgbt":a=this._windows.h.menus;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("menubrowseimgbt",c);break;case "messagesbrowseimgbg":a=this._windows.h.messages;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("messagesbrowseimgbg",c);break;case "messagesbrowseimgbt0":a=this._windows.h.messages;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("messagesbrowseimgbt0",c);break;case "messagesbrowseimgbt1":a=
this._windows.h.messages;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("messagesbrowseimgbt1",c);break;case "messagesbrowseimgbt2":a=this._windows.h.messages;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("messagesbrowseimgbt2",c);break;case "music":a=this._windows.h.music;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("music",c);break;case "portraitbackground":a=this._windows.h.background;c=new G;
c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("portrait",c);break;case "portraitcover":a=this._windows.h.cover;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("portrait",c);break;case "sound":a=this._windows.h.sound;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("sound",c);break;case "targetdefault":a=this._windows.h.targets;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("default",
c);break;case "targetinst1":a=this._windows.h.targets;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("inst1",c);break;case "targetinst2":a=this._windows.h.targets;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("inst2",c);break;case "targetinst3":a=this._windows.h.targets;c=new G;c.h.file=b.h.path+b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("inst3",c);break;case "targetinterf":a=this._windows.h.targets;c=new G;c.h.file=b.h.path+
b.h.file;c.h.type=b.h.type;c.h.name=b.h.file;a.action("interf",c);break;case "targetmenus":a=this._windows.h.targets,c=new G,c.h.file=b.h.path+b.h.file,c.h.type=b.h.type,c.h.name=b.h.file,a.action("menus",c)}b=k.temp;Object.prototype.hasOwnProperty.call(b.h,"Media/Single")&&delete b.h["Media/Single"]}break;case "window-notes":this.showWindow("designnotes")}},onMediaAddStage:function(a,b){if(a)if(b.map.h.e==0)if(Object.prototype.hasOwnProperty.call(k.temp.h,"media/addstage")){a=k.temp.h["media/addstage"].h.file;
var c=k.temp.h["media/addstage"].h.file;k.temp.h["media/addstage"].h.type=="shape"?c=k.ln.get("menu-media-shape"):k.temp.h["media/addstage"].h.type=="paragraph"?c=k.ln.get("menu-media-paragraph"):k.temp.h["media/addstage"].h.type=="text"&&(c=k.ln.get("menu-media-text"));a=V.substr(Ga.md5(a),0,10);var d=this._player,f=b.map.h.id,g=b.map.h.name,h=new G;h.h[a]={name:c,type:k.temp.h["media/addstage"].h.type,order:0,time:5,action:"",frames:H.parseInt(k.temp.h["media/addstage"].h.frames),frtime:H.parseInt(k.temp.h["media/addstage"].h.frtime),
file:{"@1":k.temp.h["media/addstage"].h.path+k.temp.h["media/addstage"].h.file,"@2":k.temp.h["media/addstage"].h.path+k.temp.h["media/addstage"].h.file,"@3":k.temp.h["media/addstage"].h.path+k.temp.h["media/addstage"].h.file,"@4":k.temp.h["media/addstage"].h.path+k.temp.h["media/addstage"].h.file,"@5":k.temp.h["media/addstage"].h.path+k.temp.h["media/addstage"].h.file}};d.setCollection(f,g,"alpha",1,h);d=c=-1;if(ib.count(p.movie.scene.keyframes[p.area.get_currentKf()])>0)for(f=p.movie.scene.keyframes[p.area.get_currentKf()].h,
f=Object.keys(f),g=f.length,h=0;h<g;){var n=f[h++];p.movie.scene.keyframes[p.area.get_currentKf()].h[n].horizontal.order>c&&(c=p.movie.scene.keyframes[p.area.get_currentKf()].h[n].horizontal.order+1);p.movie.scene.keyframes[p.area.get_currentKf()].h[n].vertical.order>d&&(d=p.movie.scene.keyframes[p.area.get_currentKf()].h[n].vertical.order+1)}else c=d=0;this._player.addInstance(a,{collection:b.map.h.id,asset:a,action:"",play:!0,horizontal:{order:c,x:0,y:0,alpha:1,width:320,height:320,rotation:0,visible:!0,
color:"0xFFFFFF",colorAlpha:0,volume:1,pan:0,blur:"",dropshadow:"",textFont:"sans",textSize:20,textColor:"0xFFFFFF",textBold:!1,textItalic:!1,textLeading:10,textSpacing:0,textBackground:"",textAlign:"left"},vertical:{order:d,x:0,y:0,alpha:1,width:320,height:320,rotation:0,visible:!0,color:"0xFFFFFF",colorAlpha:0,volume:1,pan:0,blur:"",dropshadow:"",textFont:"sans",textSize:20,textColor:"0xFFFFFF",textBold:!1,textItalic:!1,textLeading:10,textSpacing:0,textBackground:"",textAlign:"left"}});b=k.temp;
Object.prototype.hasOwnProperty.call(b.h,"media/addstage")&&delete b.h["media/addstage"]}else k.showPopup(k.ln.get("window-media-title"),k.ln.get("window-media-addstageer"),300,180,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-media-title"),k.ln.get("window-media-addstageer"),300,180,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-media-title"),k.ln.get("window-media-addstageer"),300,180,k.ln.get("default-ok"))},actionWindowLogin:function(a,b){a=="check-login"&&k.ws.send("System/Login",
b,m(this,this.onLogin))},onLogin:function(a,b){if(a)switch(b.map.h.e){case 0:k.ws.setUser(b.map.h.userMail,b.map.h.userKey,b.map.h.userLevel);this._windows.h.login.action("login-ok");Aa.removePopUp(this._windows.h.login);break;case 1:this._windows.h.login.action("login-notfound");break;case 2:this._windows.h.login.action("login-password");break;case 3:this._windows.h.login.action("login-nokey")}else this._windows.h.login.action("login-error")},redraw:function(a){this._interface.removeChildren();this._interface.addChild(this._leftArea);
this._interface.addChild(this._centertArea);this._interface.addChild(this._rightArea);a=this._windows.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.set_maxWidth(this.stage.stageWidth*.7);f.set_maxHeight(this.stage.stageHeight*.6)}},showWindow:function(a){if(Object.prototype.hasOwnProperty.call(this._windows.h,a))return Aa.addPopUp(this._windows.h[a],this),this._windows.h[a].redraw(),this._windows.h[a].acStart(),!0;var b=!0;switch(a){case "assetbase":var c=this._windows,d=new lr(m(this,
this.actionAsset));c.h.assetbase=d;break;case "assistantcontraptions":c=this._windows;d=new mr(m(this,this.actionAssistant));c.h.assistantcontraptions=d;break;case "assistantdata":c=this._windows;d=new nr(m(this,this.actionAssistant));c.h.assistantdata=d;break;case "assistantinstance":c=this._windows;d=new or(m(this,this.actionAssistant));c.h.assistantinstance=d;break;case "assistantnarrative":c=this._windows;d=new pr(m(this,this.actionAssistant));c.h.assistantnarrative=d;break;case "assistantplugin":c=
this._windows;d=new qr(m(this,this.actionAssistant));c.h.assistantplugin=d;break;case "assistantplus":c=this._windows;d=new rr(m(this,this.actionAssistant));c.h.assistantplus=d;break;case "assistantruntime":c=this._windows;d=new sr(m(this,this.actionAssistant));c.h.assistantruntime=d;break;case "assistantscene":c=this._windows;d=new tr(m(this,this.actionAssistant));c.h.assistantscene=d;break;case "assistantvariables":c=this._windows;d=new ur(m(this,this.actionAssistant));c.h.assistantvariables=d;
break;case "background":c=this._windows;d=new vr(m(this,this.actionWindowContrBackground));c.h.background=d;break;case "collectionbase":c=this._windows;d=new wr(m(this,this.actionCollection));c.h.collectionbase=d;break;case "cover":c=this._windows;d=new xr(m(this,this.actionWindowContrCover));c.h.cover=d;break;case "designnotes":c=this._windows;d=new yr(m(this,this.actionWindowNotes));c.h.designnotes=d;break;case "dflowscene":c=this._windows;d=new zr(m(this,this.actionScene));c.h.dflowscene=d;break;
case "exchangecord":c=this._windows;d=new Ar(m(this,this.actionExchange));c.h.exchangecord=d;break;case "exchangedesk":c=this._windows;d=new Br(m(this,this.actionExchange));c.h.exchangedesk=d;break;case "exchangeexport":c=this._windows;d=new Cr(m(this,this.actionExchange));c.h.exchangeexport=d;break;case "exchangeiframe":c=this._windows;d=new Dr(m(this,this.actionExchange));c.h.exchangeiframe=d;break;case "exchangeimport":c=this._windows;d=new Er(m(this,this.actionExchange));c.h.exchangeimport=d;
break;case "exchangepub":c=this._windows;d=new Fr(m(this,this.actionExchange));c.h.exchangepub=d;break;case "exchangepwa":c=this._windows;d=new Gr(m(this,this.actionExchange));c.h.exchangepwa=d;break;case "exchangewebsite":c=this._windows;d=new Hr(m(this,this.actionExchange));c.h.exchangewebsite=d;break;case "form":c=this._windows;d=new Ir(m(this,this.actionWindowContrForm));c.h.form=d;break;case "interfaces":c=this._windows;d=new Jr(m(this,this.actionWindowContrInterf));c.h.interfaces=d;break;case "kfmanage":c=
this._windows;d=new Kr(m(this,this.actionKeyframe));c.h.kfmanage=d;break;case "login":c=this._windows;d=new Lr(m(this,this.actionWindowLogin));c.h.login=d;break;case "mediaaudio":c=this._windows;d=new Mr(m(this,this.actionMedia),"simple");c.h.mediaaudio=d;break;case "mediacollection":c=this._windows;d=new Nr(m(this,this.actionMedia));c.h.mediacollection=d;break;case "mediacollectionadd":c=this._windows;d=new Or(m(this,this.actionMedia));c.h.mediacollectionadd=d;break;case "mediacollectionrm":c=this._windows;
d=new Pr(m(this,this.actionMedia));c.h.mediacollectionrm=d;break;case "mediaembed":c=this._windows;d=new Qr(m(this,this.actionMedia));c.h.mediaembed=d;break;case "mediahtml":c=this._windows;d=new Rr(m(this,this.actionMedia),"simple");c.h.mediahtml=d;break;case "mediaparagraph":c=this._windows;d=new Sr(m(this,this.actionMedia),"simple");c.h.mediaparagraph=d;break;case "mediapicture":c=this._windows;d=new Tr(m(this,this.actionMedia),"simple");c.h.mediapicture=d;break;case "mediashape":c=this._windows;
d=new Ur(m(this,this.actionMedia),"simple");c.h.mediashape=d;break;case "mediaspritemap":c=this._windows;d=new Vr(m(this,this.actionMedia),"simple");c.h.mediaspritemap=d;break;case "mediastrings":c=this._windows;d=new Wr(m(this,this.actionMedia));c.h.mediastrings=d;break;case "mediatext":c=this._windows;d=new Xr(m(this,this.actionMedia),"simple");c.h.mediatext=d;break;case "mediavideo":c=this._windows;d=new Yr(m(this,this.actionMedia),"simple");c.h.mediavideo=d;break;case "menus":c=this._windows;
d=new Zr(m(this,this.actionWindowContrMenu));c.h.menus=d;break;case "messages":c=this._windows;d=new $r(m(this,this.actionWindowContrMessages));c.h.messages=d;break;case "music":c=this._windows;d=new as(m(this,this.actionWindowContrMusic));c.h.music=d;break;case "narrative-battle":c=this._windows;d=new bs(m(this,this.actionWindowNarrBattle));c.h["narrative-battle"]=d;break;case "narrative-char":c=this._windows;d=new cs(m(this,this.actionWindowNarrChar));c.h["narrative-char"]=d;break;case "narrative-dflow":c=
this._windows;d=new ds(m(this,this.actionWindowNarrDflow));c.h["narrative-dflow"]=d;break;case "narrative-diag":c=this._windows;d=new es(m(this,this.actionWindowDiagChar));c.h["narrative-diag"]=d;break;case "narrative-inventory":c=this._windows;d=new fs(m(this,this.actionWindowNarrInventory));c.h["narrative-inventory"]=d;break;case "newmovie":c=this._windows;d=new gs(m(this,this.actionMovie));c.h.newmovie=d;break;case "newscene":c=this._windows;d=new hs(m(this,this.actionScene));c.h.newscene=d;break;
case "openmovie":c=this._windows;d=new is(m(this,this.actionMovie));c.h.openmovie=d;break;case "openscene":c=this._windows;d=new js(m(this,this.actionScene));c.h.openscene=d;break;case "pluginmovie":c=this._windows;d=new ks(m(this,this.actionMovie));c.h.pluginmovie=d;break;case "propmovie":c=this._windows;d=new ls(m(this,this.actionMovie));c.h.propmovie=d;break;case "propscene":c=this._windows;d=new ms(m(this,this.actionScene));c.h.propscene=d;break;case "removemovie":c=this._windows;d=new ns(m(this,
this.actionMovie));c.h.removemovie=d;break;case "republish":c=this._windows;d=new os(m(this,this.actionMovie));c.h.republish=d;break;case "saveasscene":c=this._windows;d=new ps(m(this,this.actionScene));c.h.saveasscene=d;break;case "seqmovie":c=this._windows;d=new qs(m(this,this.actionMovie));c.h.seqmovie=d;break;case "setup":c=this._windows;d=new rs(m(this,this.actionWindowSetup),this.build);c.h.setup=d;break;case "snippets":c=this._windows;d=new ss(m(this,this.actionMovie));c.h.snippets=d;break;
case "sound":c=this._windows;d=new ts(m(this,this.actionWindowContrSound));c.h.sound=d;break;case "targets":c=this._windows;d=new us(m(this,this.actionWindowContrTarget));c.h.targets=d;break;case "testactions":c=this._windows;d=new vs(m(this,this.actionWindowTestingActions));c.h.testactions=d;break;case "timedaction":c=this._windows;d=new ws(m(this,this.actionTimed));c.h.timedaction=d;break;case "usermovie":c=this._windows;d=new xs(m(this,this.actionMovie));c.h.usermovie=d;break;case "versionscene":c=
this._windows;d=new ys(m(this,this.actionScene));c.h.versionscene=d;break;case "visitors":c=this._windows;d=new zs(m(this,this.actionWindowVisitors),this.build);c.h.visitors=d;break;default:b=!1}b&&(Aa.addPopUp(this._windows.h[a],this),this._windows.h[a].redraw(),this._windows.h[a].acStart());return b},playerCallback:function(a,b){switch(a){case "loadkeyframe":this._rightArea.updateInstances();break;case "movieload":a=k.ws;b=new G;var c=p.movie.get_mvId();b.h.id=c;a.send("Movie/Info",b,m(this,this.onMovieInfo));
k.displayType=p.mdata.screen.type=="portrait"?"portrait":"landscape";this._playerControls.centerPlayer();this._playerControls.updateDisplay();break;case "play":this._playback.show(this.stage,this._player);break;case "sceneload":k.sceneObj!=null&&(p.movie.scene.fromObject(k.sceneObj),k.sceneObj=null);k.kfToLoad>=0&&(p.area.loadKeyframe(p.movie.scene.keyframes[k.kfToLoad],k.kfToLoad),k.kfToLoad=-1);this._playerControls.updateDisplay();break;case "selectimage":this._rightArea.setInstance(b);break;case "testactions":this.showWindow("testactions")}},
onMovieInfo:function(a,b){k.mvOwner=!1;k.mvCollaborator=!1;a&&(b.map.h.e==0&&(k.mvOwner=w.__cast(y.field(b.map.h.info,"isOwner"),$v),k.mvCollaborator=w.__cast(y.field(b.map.h.info,"isCollaborator"),$v)),this._playerControls.updateDisplay(),k.sceneToLoad!=""&&(p.movie.loadScene(k.sceneToLoad),k.sceneToLoad=""),k.acInfo.loadInfo(!0))},__class__:Hi});var cg=function(a,b,c,d,f){d==null&&(d=!0);this._touchDistance=this._touchDistanceCheck=this._touchStartTime=this._lastmwheel=0;this._touchStart=new Ea;
this._toggles=new G;this._numerics=new G;this._tareas=new G;this._inputs=new G;this.inputArea=null;this._frames=0;this._firstScene=!1;this._lastMovie="";this._firstMovie=!1;this._rWidth=this._rHeight=0;Da.call(this);p.session=qc.format(new Date,"%Y-%m-%d_%H:%M:%S")+"_"+Ga.random();p.session=V.substr(p.session,0,32);b==null&&(b="player");this.setMode(b);p.build=new Gb(b=="player"&&a!=null);p.nocache=d;p.callback=f;a==null?(p.nocache=!1,this.onPlayerConf(!0,null,!0)):(b=null,d&&(d=new G,d.h.rand=Math.ceil(Math.random()*
1E4),b=d),new Ob(!0,a,"GET",b,4,m(this,this.onPlayerConf)));if(this.stage==null)this.addEventListener("addedToStage",m(this,this.onStage));else this.onStage(null)};t["com.tilbuci.Player"]=cg;cg.__name__="com.tilbuci.Player";cg.__super__=Da;cg.prototype=I(Da.prototype,{rWidth:null,_rWidth:null,get_rWidth:function(){return this._rWidth},rHeight:null,_rHeight:null,get_rHeight:function(){return this._rHeight},tHeight:null,get_tHeight:function(){p.area.setOverlay(!1);this.removeChild(this._uiArea);var a=
this.get_height();p.area.setOverlay(!0);this.addChild(this._uiArea);return a},mWidth:null,get_mWidth:function(){return p.area.get_aWidth()},mHeight:null,get_mHeight:function(){return p.area.get_aHeight()},_bgarea:null,_firstMovie:null,_lastMovie:null,_firstScene:null,_display:null,_mask:null,_background:null,_scrOrient:null,_frames:null,_frameTimer:null,_fpsStart:null,_uiArea:null,inputArea:null,_inputs:null,_tareas:null,_numerics:null,_toggles:null,_touchStart:null,_touchDistance:null,_touchDistanceCheck:null,
_touchStartTime:null,_touchHoldTimer:null,_touchTimer:null,_lastmwheel:null,setMode:function(a){p.mode=a=="editor"?"editor":"player"},setSize:function(a,b){this._rWidth=a;this._rHeight=b;p.area!=null&&p.area.setArea()},load:function(a){this._lastMovie=p.movie.get_mvId();this._firstScene=!0;p.movie.loadMovie(a)},registerPlugin:function(a){var b=p.plugins,c=a.get_plname();b.h[c]=a;p.ready&&this.initializePlugins()},removePlugin:function(a){if(Object.prototype.hasOwnProperty.call(p.plugins.h,a)){p.plugins.h[a].kill();
var b=p.plugins;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];return!0}return!1},initializePlugins:function(){for(var a=p.plugins.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.get_ready()||f.initialize(new aw(p.parser.getVarRef("string"),p.parser.getVarRef("float"),p.parser.getVarRef("int"),p.parser.getVarRef("bool"),p.parser))}},halt:function(a){this.removeChildren();var b="System down :-(";switch(a){case "language":b="Error while loading the default language file.";break;
case "noconf":b="Error while loading the basic system configuration.";break;case "nomovie":b=p.ln.get("player-nomovie");break;case "noscene":b=p.ln.get("player-noscene")}a=new Uc;a.set_layout(new Gi);a.setPadding(10);var c=new ia;c.set_text(b);c.set_layoutData(fd.center());a.addChild(c);Aa.addPopUp(a,this)},onPlayerConf:function(a,b,c){c==null&&(c=!1);if(c)p.ln=new Kk,p.base="./",p.font="./font/",p.render="webgl",p.share="never",p.fps="free",p.secret=Oa.ofHex(""),Object.prototype.hasOwnProperty.call(ya,
"ws")&&y.field(ya,"ws")!=""?(p.ws=new tn(y.field(ya,"ws"),""),p.server=!0):(p.ws=new tn("./ws/",""),p.server=!1),p.movie=new om(m(this,this.onMovie),m(this,this.onScene)),p.parser=new Ii,p.parser.eventSend=m(this,this.warnListeners),p.ready=!0,p.mode=="player"&&ya.us!=""&&ya.uk!=""&&p.ws.checkVisitorKey(ya.us,ya.uk,m(this,this.onKeyCheck)),this._bgarea=new Da,p.mode!="editor"&&this.addChild(this._bgarea),this._uiArea=new Da,p.area=new Al(this,this._bgarea,this._uiArea),this.addChild(p.area),this.addChild(this._uiArea),
this.initializePlugins(),new As,p.mode=="player"&&(this._firstScene=this._firstMovie=!0);else if(a)if(p.ln=new Kk,p.ln.get_ok()){p.server=b.map.h.server;p.base=b.map.h.base;p.font=b.map.h.font;p.render=b.map.h.render;p.share=b.map.h.share;p.fps=b.map.h.fps;p.secret=Oa.ofHex(b.map.h.secret);p.ws=new tn(b.map.h.ws,"");p.movie=new om(m(this,this.onMovie),m(this,this.onScene));p.parser=new Ii;p.parser.eventSend=m(this,this.warnListeners);if(p.mode=="player"){if(Object.prototype.hasOwnProperty.call(b.map.h,
"systemfonts")){a=b.map.h.systemfonts;c=0;for(var d=a.length;c<d;){var f=c++;new nm(p.font+a[f].file,a[f].name)}}ya.us!=""&&ya.uk!=""&&p.ws.checkVisitorKey(ya.us,ya.uk,m(this,this.onKeyCheck))}new As;p.ready=!0;this._bgarea=new Da;p.mode!="editor"&&this.addChild(this._bgarea);this._uiArea=new Da;p.area=new Al(this,this._bgarea,this._uiArea);this.addChild(p.area);this.addChild(this._uiArea);this.initializePlugins();p.mode=="player"&&(this._firstScene=this._firstMovie=!0,a="",Object.prototype.hasOwnProperty.call(ya,
"movie")&&(a=y.field(ya,"movie")),a==""?this.load(b.map.h.start):(this.load(a),Object.prototype.hasOwnProperty.call(ya,"movie")&&(ya.movie="")));p.fps!="free"&&p.fps!="calc"&&(b=H.parseInt(p.fps),this.stage.window.__backend.setFrameRate(b))}else this.halt("language");else this.halt("noconf")},onKeyCheck:function(a,b){a&&b.map.h.e==0&&p.ws.setUser(ya.us,b.map.h.key,b.map.h.groups)},onMovie:function(a){if(p.mode=="player"&&!a)this._firstMovie?this.halt("nomovie"):this._lastMovie!=""?(this._firstMovie=
!0,this.load(this._lastMovie)):this.halt("nomovie");else if(a){p.area.hideTarget();p.area.clearTarget();p.area.setArea();p.mdata.key!=""&&p.mode=="player"&&p.mdata.key!=p.secretKey&&(a="Please type the access key.",Object.prototype.hasOwnProperty.call(p.mdata.texts.h,"secretkey")&&(a=p.mdata.texts.h.secretkey),p.area.showSecretKeyInput(a));a=[];for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];g.active&&(a.push(g.get_pltitle()+" ("+g.get_plname()+")"),g.info.onNewMovie(p.mdata.title,
p.movie.get_mvId(),p.mdata.screen.big,p.mdata.screen.small))}p.callback!=null&&(b=p.callback,c=new G,d=p.movie.get_mvId(),c.h.id=d,b("movieload",c));De.trace(p.mdata.title+" movie loaded.",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:584,className:"com.tilbuci.Player",methodName:"onMovie"});a.length==0?De.trace("No plugins used.",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:585,className:"com.tilbuci.Player",methodName:"onMovie"}):De.trace("Plugins used: "+a.join(", ")+".",{fileName:"Source/com/tilbuci/Player.hx",
lineNumber:586,className:"com.tilbuci.Player",methodName:"onMovie"});c=new G;d=p.movie.get_mvId();c.h.id=d;c.h.title=p.mdata.title;this.dispatchEvent(new Lk("movie_loaded",c))}},onScene:function(a){p.mode=="player"&&!a&&this._firstScene&&this.halt("noscene");p.area.noMouseOver();a=p.plugins.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];if(f.active&&f.get_ready())f.info.onNewScene(p.movie.scene.title,p.movie.get_scId(),p.movie.scene.keyframes.length)}p.mode=="player"&&(p.share=="scene"?
window.TBB_setAddress(p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId(),p.mdata.title+" > "+p.movie.scene.title):p.share=="movie"?window.TBB_setAddress(p.base+"app/?mv="+p.movie.get_mvId(),p.mdata.title):p.share=="website"&&(p.mdata.start==p.movie.get_scId()?window.TBB_setAddress(p.base,p.mdata.title):window.TBB_setAddress(p.base+p.movie.get_scId()+".html",p.mdata.title)));p.area.loadKeyframe(p.movie.scene.keyframes[0],0);this._firstScene&&p.mode!="editor"&&p.movie.data.acstart!=""&&
p.parser.run(p.movie.data.acstart);p.movie.scene.acstart!=""&&p.mode!="editor"&&p.parser.run(p.movie.scene.acstart);if(p.mode=="player"&&p.fps=="calc"){if(this._frameTimer!=null){try{this._frameTimer.stop()}catch(g){}this._frameTimer=null}this._fpsStart=new Gc(2E3);this._fpsStart.run=m(this,this.fpsCount)}p.callback!=null&&(a=p.callback,b=new G,c=p.movie.get_scId(),b.h.id=c,a("sceneload",b));b=new G;c=p.movie.get_scId();b.h.id=c;b.h.title=p.movie.scene.title;this.dispatchEvent(new Lk("scene_loaded",
b));this._firstScene=this._firstMovie=!1},fpsCount:function(){var a=this;if(p.mode=="player"&&p.fps=="calc"){if(this._fpsStart!=null){try{this._fpsStart.stop()}catch(c){}this._fpsStart=null}this.stage.hasEventListener("enterFrame")&&this.removeEventListener("enterFrame",m(this,this.onFrame));if(this._fpsStart!=null){try{this._fpsStart.stop()}catch(c){}this._fpsStart=null}this.stage!=null&&(this.stage.window.__backend.setFrameRate(80),this._frames=0,this.addEventListener("enterFrame",m(this,this.onFrame)),
this._frameTimer=new Gc(2E3),this._frameTimer.run=function(){try{a._frameTimer.stop()}catch(d){}a._frameTimer=null;a.stage.hasEventListener("enterFrame")&&a.removeEventListener("enterFrame",m(a,a.onFrame));var c=Math.round(a._frames/2);c<=29?a.stage.window.__backend.setFrameRate(20):c<=39?a.stage.window.__backend.setFrameRate(30):c<=49?a.stage.window.__backend.setFrameRate(40):c<=59?a.stage.window.__backend.setFrameRate(50):a.stage.window.__backend.setFrameRate(60)})}else if(p.fps!="free"){var b=
H.parseInt(p.fps);this.stage.window.__backend.setFrameRate(b)}},onFrame:function(a){this._frames++},onStage:function(a){this.hasEventListener("addedToStage")&&this.removeEventListener("addedToStage",m(this,this.onStage));p.mode=="player"&&(this.stage.addEventListener("touchBegin",m(this,this.onTouchBegin)),this.stage.addEventListener("touchEnd",m(this,this.onTouchEnd)),this.stage.addEventListener("keyDown",m(this,this.onKeyboard)),this.stage.addEventListener("mouseWheel",m(this,this.onMouseWheel)),
this.stage.addEventListener("middleClick",m(this,this.onMouseMiddle)),this.stage.addEventListener("rightClick",m(this,this.onMouseRight)),this.stage.addEventListener("click",m(this,this.onLeftClick)))},listenInput:function(){this.stage.addEventListener("touchBegin",m(this,this.onTouchBegin));this.stage.addEventListener("touchEnd",m(this,this.onTouchEnd));this.stage.addEventListener("keyDown",m(this,this.onKeyboard));this.stage.addEventListener("mouseWheel",m(this,this.onMouseWheel));this.stage.addEventListener("middleClick",
m(this,this.onMouseMiddle));this.stage.addEventListener("rightClick",m(this,this.onMouseRight))},listenInputRemove:function(){this.stage.removeEventListener("touchBegin",m(this,this.onTouchBegin));this.stage.removeEventListener("touchEnd",m(this,this.onTouchEnd));this.stage.removeEventListener("keyDown",m(this,this.onKeyboard));this.stage.removeEventListener("mouseWheel",m(this,this.onMouseWheel));this.stage.removeEventListener("middleClick",m(this,this.onMouseMiddle));this.stage.removeEventListener("rightClick",
m(this,this.onMouseRight))},onTouchMove:function(a){a.touchPointID==1&&(new Date).getTime()-this._touchDistanceCheck>=250&&(a=Math.sqrt(Math.pow(a.stageX-this._touchStart.x,2)+Math.pow(a.stageY-this._touchStart.y,2)),a-this._touchDistance>0?Math.abs(a-this._touchDistance)>p.area.get_aWidth()/20&&p.parser.runInput("pinchopen"):Math.abs(a-this._touchDistance)>p.area.get_aWidth()/20&&p.parser.runInput("pinchclose"),this._touchDistanceCheck=(new Date).getTime())},onTouchBegin:function(a){if(a.touchPointID==
0)this._touchStart.x=a.stageX,this._touchStart.y=a.stageY,this._touchStartTime=(new Date).getTime();else if(a.touchPointID==1&&(this._touchDistance=Math.sqrt(Math.pow(a.stageX-this._touchStart.x,2)+Math.pow(a.stageY-this._touchStart.y,2)),this._touchDistanceCheck=(new Date).getTime(),this.stage.addEventListener("touchMove",m(this,this.onTouchMove)),p.parser.onDrag!=null))p.parser.onDragMoveStop(null)},onTouchEnd:function(a){if(a.touchPointID==0){if((new Date).getTime()-this._touchStartTime<300){var b=
this._touchStart.x-a.stageX,c=this._touchStart.y-a.stageY;if(Math.abs(b)>Math.abs(c)){if(Math.abs(b)>this.stage.stageWidth/15){p.canTrigger=!1;b>0?p.parser.runInput("swiperight"):p.parser.runInput("swipeleft");if(this._touchTimer!=null){try{this._touchTimer.stop()}catch(d){}this._touchTimer=null}this._touchTimer=new Gc(300);this._touchTimer.run=m(this,this.endTouch)}}else if(Math.abs(c)>this.stage.stageHeight/15){p.canTrigger=!1;c>0?p.parser.runInput("swipebottom"):p.parser.runInput("swipetop");if(this._touchTimer!=
null){try{this._touchTimer.stop()}catch(d){}this._touchTimer=null}this._touchTimer=new Gc(300);this._touchTimer.run=m(this,this.endTouch)}}else if((new Date).getTime()-this._touchStartTime>1200&&(p.canTrigger=!1,p.parser.runInput("touchhold")||(p.canTrigger=!0),!p.canTrigger)){if(this._touchTimer!=null){try{this._touchTimer.stop()}catch(d){}this._touchTimer=null}this._touchTimer=new Gc(300);this._touchTimer.run=m(this,this.endTouch)}this._touchStart.x=a.stageX;this._touchStart.y=a.stageY}else a.touchPointID==
1&&(a=Math.sqrt(Math.pow(a.stageX-this._touchStart.x,2)+Math.pow(a.stageY-this._touchStart.y,2)),a-this._touchDistance>0?Math.abs(a-this._touchDistance)>p.area.get_aWidth()/20&&p.parser.runInput("pinchopen"):Math.abs(a-this._touchDistance)>p.area.get_aWidth()/20&&p.parser.runInput("pinchclose"),this.stage.hasEventListener("touchMove")&&this.stage.removeEventListener("touchMove",m(this,this.onTouchMove)))},endTouch:function(){if(this._touchTimer!=null){try{this._touchTimer.stop()}catch(a){}this._touchTimer=
null}p.canTrigger=!0},onKeyboard:function(a){var b=p.parser.checkKeyboard(a.keyCode);if(!b)for(var c=p.plugins.h,d=Object.keys(c),f=d.length,g=0;g<f;){var h=c[d[g++]];h.active&&!b&&(b=h.checkKeyboard(a.keyCode))}},onMouseWheel:function(a){this.stage.get_focus()instanceof gd&&this._lastmwheel<(new Date).getTime()-750&&(this._lastmwheel=(new Date).getTime(),a.delta<0?p.parser.checkMouse("mousewheeldown"):a.delta>0&&p.parser.checkMouse("mousewheelup"))},onMouseMiddle:function(a){this.stage.get_focus()instanceof
gd&&(p.parser.checkMouse("mousemiddle"),p.parser.hadInteraction=!0)},onMouseRight:function(a){this.stage.showDefaultContextMenu=!0;this.stage.get_focus()instanceof gd&&p.parser.checkMouse("mouseright")&&(this.stage.showDefaultContextMenu=!1,p.parser.hadInteraction=!0)},onLeftClick:function(a){this.stage.removeEventListener("click",m(this,this.onLeftClick));p.parser.hadInteraction=!0},warnListeners:function(a){this.dispatchEvent(new Lk("event",a));p.callback!=null&&p.callback("custom",a)},getStringValue:function(a){return p.parser.getString(a)},
getFloatValue:function(a){return p.parser.getFloat(a)},getIntValue:function(a){return p.parser.getInt(a)},getBoolValue:function(a){return p.parser.getBool(a)},runAction:function(a){return p.parser.run(a)},addInput:function(a,b,c,d,f){f==null&&(f="");if(this.inputArea!=null){if(!Object.prototype.hasOwnProperty.call(this._inputs.h,a)){var g=this._inputs,h=new rd;g.h[a]=h;f!=""&&this._inputs.h[a].set_prompt(f);this.inputArea.addChild(this._inputs.h[a])}this.placeInput(a,b,c,d)}},addTarea:function(a,
b,c,d,f){if(this.inputArea!=null){if(!Object.prototype.hasOwnProperty.call(this._tareas.h,a)){var g=this._tareas,h=new tf;g.h[a]=h;this.inputArea.addChild(this._tareas.h[a])}this.placeTarea(a,b,c,d,f)}},placeInput:function(a,b,c,d){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._inputs.h,a)&&(this._inputs.h[a].set_x(b),this._inputs.h[a].set_y(c),this._inputs.h[a].set_width(d))},placeTarea:function(a,b,c,d,f){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._tareas.h,
a)&&(this._tareas.h[a].set_x(b),this._tareas.h[a].set_y(c),this._tareas.h[a].set_width(d),this._tareas.h[a].set_height(f))},removeInput:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._inputs.h,a)){this.inputArea.removeChild(this._inputs.h[a]);var b=this._inputs;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeTarea:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._tareas.h,a)){this.inputArea.removeChild(this._tareas.h[a]);
var b=this._tareas;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeAllInputs:function(){if(this.inputArea!=null)for(var a=Object.keys(this._inputs.h),b=a.length,c=0;c<b;){var d=a[c++];this.removeInput(d)}},removeAllTareas:function(){if(this.inputArea!=null)for(var a=Object.keys(this._tareas.h),b=a.length,c=0;c<b;){var d=a[c++];this.removeTarea(d)}},getInputText:function(a){return Object.prototype.hasOwnProperty.call(this._inputs.h,a)?this._inputs.h[a].get_text():""},getTareaText:function(a){return Object.prototype.hasOwnProperty.call(this._tareas.h,
a)?this._tareas.h[a].get_text():""},setInputText:function(a,b){Object.prototype.hasOwnProperty.call(this._inputs.h,a)&&this._inputs.h[a].set_text(b)},setTareaText:function(a,b){Object.prototype.hasOwnProperty.call(this._tareas.h,a)&&this._tareas.h[a].set_text(b)},setInputPassword:function(a,b){Object.prototype.hasOwnProperty.call(this._inputs.h,a)&&this._inputs.h[a].set_displayAsPassword(b)},addNumeric:function(a,b,c,d,f){if(this.inputArea!=null&&!Object.prototype.hasOwnProperty.call(this._numerics.h,
a)){var g=this._numerics;c=new sd(b,c,d);g.h[a]=c;this._numerics.h[a].set_step(f);this._numerics.h[a].set_value(b);this.inputArea.addChild(this._numerics.h[a])}},placeNumeric:function(a,b,c,d){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._numerics.h,a)&&(this._numerics.h[a].set_x(b),this._numerics.h[a].set_y(c),this._numerics.h[a].set_width(d))},removeNumeric:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._numerics.h,a)){this.inputArea.removeChild(this._numerics.h[a]);
var b=this._numerics;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeAllNumerics:function(){if(this.inputArea!=null)for(var a=Object.keys(this._numerics.h),b=a.length,c=0;c<b;){var d=a[c++];this.removeNumeric(d)}},getNumericValue:function(a){return Object.prototype.hasOwnProperty.call(this._numerics.h,a)?Math.round(this._numerics.h[a].get_value()):0},setNumericValue:function(a,b){Object.prototype.hasOwnProperty.call(this._numerics.h,a)&&this._numerics.h[a].set_value(b)},setNumericBounds:function(a,
b,c,d){Object.prototype.hasOwnProperty.call(this._numerics.h,a)&&(this._numerics.h[a].set_minimum(b),this._numerics.h[a].set_maximum(c),this._numerics.h[a].set_step(d))},addToggle:function(a,b,c,d){if(this.inputArea!=null){if(!Object.prototype.hasOwnProperty.call(this._toggles.h,a)){var f=this._toggles;b=new Mk(b);f.h[a]=b;this.inputArea.addChild(this._toggles.h[a])}this.placeToggle(a,c,d)}},placeToggle:function(a,b,c){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._toggles.h,a)&&
(this._toggles.h[a].set_x(b),this._toggles.h[a].set_y(c))},removeToggle:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._toggles.h,a)){this.inputArea.removeChild(this._toggles.h[a]);var b=this._toggles;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeAllToggles:function(){if(this.inputArea!=null)for(var a=Object.keys(this._toggles.h),b=a.length,c=0;c<b;){var d=a[c++];this.removeToggle(d)}},getToggleValue:function(a){return Object.prototype.hasOwnProperty.call(this._toggles.h,
a)?this._toggles.h[a].get_selected():!1},setToggleValue:function(a,b){Object.prototype.hasOwnProperty.call(this._toggles.h,a)&&this._toggles.h[a].set_selected(b)},invertToggle:function(a){Object.prototype.hasOwnProperty.call(this._toggles.h,a)&&this._toggles.h[a].set_selected(!this._toggles.h[a].get_selected())},__class__:cg,__properties__:I(Da.prototype.__properties__,{get_mHeight:"get_mHeight",get_mWidth:"get_mWidth",get_tHeight:"get_tHeight",get_rHeight:"get_rHeight",get_rWidth:"get_rWidth"})});
var Ji=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.BackgroundContraption"]=Ji;Ji.__name__="com.tilbuci.contraptions.BackgroundContraption";Ji.__super__=Da;Ji.prototype=I(Da.prototype,{ok:null,id:null,landscape:null,portrait:null,_landscape:null,_portrait:null,create:function(a,b){this.ok&&this.removeChildren();return this},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new Ji(this.toObject())},
getCover:function(){this.removeChildren();p.area.get_pOrientation()=="horizontal"?this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small),this.addChild(this._landscape)):(this._portrait.set_width(p.mdata.screen.big),this._portrait.set_height(p.mdata.screen.small),this.addChild(this._portrait)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big),this.addChild(this._portrait)):
(this._landscape.set_width(p.mdata.screen.small),this._landscape.set_height(p.mdata.screen.big),this.addChild(this._landscape));return this},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"portrait")?(this.portrait=y.field(a,"portrait"),this.portrait!=""&&(this._portrait=new ad(m(this,this.onPicLoad)),this._portrait.set_visible(!0))):this.portrait="",Object.prototype.hasOwnProperty.call(a,"landscape")?
(this.landscape=y.field(a,"landscape"),this.landscape!=""&&(this._landscape=new ad(m(this,this.onPicLoad)),this._landscape.set_visible(!0))):this.landscape="",this.portrait==null&&(this.portrait=""),this.landscape==null&&(this.landscape=""),this.landscape!=""||this.portrait!="")?(this._landscape!=null&&this._landscape.load(this.landscape),this._portrait!=null&&this._portrait.load(this.portrait),this.mouseChildren=this.mouseEnabled=!1,!0):!1},onPicLoad:function(a){p.area.get_pOrientation()=="horizontal"?
this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small)):(this._portrait.set_width(p.mdata.screen.big),this._portrait.set_height(p.mdata.screen.small)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big)):(this._landscape.set_width(p.mdata.screen.small),this._landscape.set_height(p.mdata.screen.big))},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();
this._landscape!=null&&this._landscape.kill();this._portrait!=null&&this._portrait.kill();this.id=this.portrait=this.landscape=this._portrait=this._landscape=null},toObject:function(){return{id:this.id,landscape:this.landscape,portrait:this.portrait}},__class__:Ji});var nf=function(){this._timerParam=0;this._won=!1;this._onloose=this._onwin=null;this.attributes=[];this.horizontal=this.vertical=this.close=this.card=this.attrbg=this.soundpick=this.soundwin=this.soundloose=this.soundtie="";this.fontsize=
20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;Da.call(this);this._playerData=new pm;this._opponentData=new pm};t["com.tilbuci.contraptions.BattleContraption"]=nf;nf.__name__="com.tilbuci.contraptions.BattleContraption";nf.__super__=Da;nf.prototype=I(Da.prototype,{ok:null,id:null,font:null,fontcolor:null,fontsize:null,horizontal:null,vertical:null,close:null,card:null,attrbg:null,soundpick:null,soundwin:null,soundloose:null,soundtie:null,attributes:null,_hbitmap:null,_vbitmap:null,_cbitmap:null,
_abitmap:null,_onloose:null,_onwin:null,_player:null,_playerCurent:null,_opponent:null,_opponentCurent:null,_pcards:null,_ocards:null,_cardsize:null,_playerData:null,_opponentData:null,_won:null,_timer:null,_timerParam:null,compare:function(a){this._timer==null&&(this._opponent.showAttrVal(a),this.soundpick!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundpick)),this._player.pulse(a),this._opponent.pulse(a),this._timerParam=a,this._timer=new Gc(500),this._timer.run=m(this,this.evaluateCompare))},
evaluateCompare:function(){try{this._timer.stop()}catch(c){}this._timer=null;var a=this._playerData.getValue(this._timerParam),b=this._opponentData.getValue(this._timerParam);a<b?(this.soundloose!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundloose)),Ki.shake(this._player,.5,10),Ki.quickJump(this._opponent,.5,30),this._timer=new Gc(500),this._timer.run=m(this,this.onLoose)):a>b?(this.soundwin!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundwin)),Ki.quickJump(this._player,
.5,30),Ki.shake(this._opponent,.5,10),this._timer=new Gc(500),this._timer.run=m(this,this.onWin)):(this.soundtie!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundtie)),Ki.shake(this._player,.5,5),Ki.shake(this._opponent,.5,5))},onLoose:function(){try{this._timer.stop()}catch(b){}this._timer=null;var a=this._playerData.current+1;this._playerCurent.updateDisplay(a);a>=this._pcards.length?(this._won=!1,this.onClose()):(this._playerData.loadCard(this._pcards[a],a),this._player.draw(this._pcards[a]))},
onWin:function(){try{this._timer.stop()}catch(b){}this._timer=null;var a=this._opponentData.current+1;this._opponentCurent.updateDisplay(a);a>=this._ocards.length?(this._won=!0,this.onClose()):(this._opponentData.loadCard(this._ocards[a],a),this._opponent.draw(this._ocards[a]))},setAttributes:function(a,b,c,d,f){b<0&&(b=0);b>4&&(b=4);a?this._playerData.setAttr(b,c,d,f):this._opponentData.setAttr(b,c,d,f)},create:function(a,b,c,d){this.removeChildren();this._cbitmap.set_visible(!0);this._hbitmap.set_visible(this._vbitmap.set_visible(!1));
this.ok&&(this._player==null&&(this._player=new hk(m(this,this.draw),!0,m(this,this.compare),this._playerData)),this._opponent==null&&(this._opponent=new hk(m(this,this.draw),!1,null,this._opponentData)),this._pcards=c,this._ocards=d,this._playerData.loadCard(c[0],0),this._opponentData.loadCard(d[0],0),this._player.draw(this._pcards[0]),this._opponent.draw(this._ocards[0]),this._playerCurent==null&&(this._playerCurent=new Lg(m(this,this.draw))),this._opponentCurent==null&&(this._opponentCurent=new Lg(m(this,
this.draw))),this._playerCurent.draw(this._pcards),this._opponentCurent.draw(this._ocards),p.area.get_pOrientation()=="horizontal"?(this.addChild(this._hbitmap),this._hbitmap.set_x(this._hbitmap.set_y(0)),this._hbitmap.set_width(p.mdata.screen.big),this._hbitmap.set_height(p.mdata.screen.small),this._cbitmap.set_x(this._hbitmap.get_width()-this._cbitmap.get_width()),this._hbitmap.set_visible(!0),this._player.set_x(this._cbitmap.get_width()),this._player.set_y(this._cbitmap.get_height()),this._opponent.set_x(this._hbitmap.get_width()/
2+this._cbitmap.get_width()/2),this._opponent.set_y(this._cbitmap.get_height()),this._playerCurent.set_x(this._player.get_x()),this._opponentCurent.set_x(this._opponent.get_x()),this._playerCurent.set_y(p.mdata.screen.small-this.btAtrHeight()*1.5),this._opponentCurent.set_y(p.mdata.screen.small-this.btAtrHeight()*1.5),this._cardsize=new Ea(p.mdata.screen.big/2-1.5*this._cbitmap.get_width(),p.mdata.screen.small-this._cbitmap.get_height()-this.btAtrHeight()*2)):(this.addChild(this._vbitmap),this._vbitmap.set_x(this._vbitmap.set_y(0)),
this._vbitmap.set_width(p.mdata.screen.small),this._vbitmap.set_height(p.mdata.screen.big),this._cbitmap.set_x(this._vbitmap.get_width()-this._cbitmap.get_width()),this._vbitmap.set_visible(!0),this._player.set_x(this._cbitmap.get_width()),this._player.set_y(this._cbitmap.get_height()),this._opponent.set_x(this._cbitmap.get_width()),this._opponent.set_y(this._vbitmap.get_height()/2+this._cbitmap.get_height()/2),this._playerCurent.set_x(this._player.get_x()),this._opponentCurent.set_x(this._opponent.get_x()),
this._playerCurent.set_y(this._vbitmap.get_height()/2-this.btAtrHeight()*.5),this._opponentCurent.set_y(this._vbitmap.get_height()-this.btAtrHeight()*1.5),this._cardsize=new Ea(this._vbitmap.get_width()-2*this._cbitmap.get_width(),this._vbitmap.get_height()/2-this._cbitmap.get_height()/2-this.btAtrHeight()*2)),this._cbitmap.set_y(0),this.addChild(this._cbitmap),this.addChild(this._player),this.addChild(this._opponent),this.addChild(this._playerCurent),this.addChild(this._opponentCurent),this._onloose=
b,this._onwin=a,this._won=!1);return this},draw:function(){this._player.set_width(this._cardsize.x);this._player.set_scaleY(this._player.get_scaleX());this._player.get_height()>this._cardsize.y&&(this._player.set_height(this._cardsize.y),this._player.set_scaleX(this._player.get_scaleY()));this._opponent.set_width(this._cardsize.x);this._opponent.set_scaleY(this._opponent.get_scaleX());this._opponent.get_height()>this._cardsize.y&&(this._opponent.set_height(this._cardsize.y),this._opponent.set_scaleX(this._opponent.get_scaleY()));
p.area.get_pOrientation()=="horizontal"?(this._player.set_x(this._cbitmap.get_width()+(this._cardsize.x-this._player.get_width())/2),this._player.set_y(this._cbitmap.get_height()+(this._cardsize.y-this._player.get_height())/2),this._opponent.set_x(this._hbitmap.get_width()/2+this._cbitmap.get_width()/2+(this._cardsize.x-this._opponent.get_width())/2),this._opponent.set_y(this._cbitmap.get_height()+(this._cardsize.y-this._opponent.get_height())/2)):(this._player.set_x(this._cbitmap.get_width()+(this._cardsize.x-
this._player.get_width())/2),this._opponent.set_x(this._cbitmap.get_width()+(this._cardsize.x-this._opponent.get_width())/2),this._player.set_y(this._cbitmap.get_height()+(this._cardsize.y-this._player.get_height())/2),this._opponent.set_y(this._vbitmap.get_height()/2+this._cbitmap.get_height()/2+(this._cardsize.y-this._opponent.get_height())/2));this._playerCurent.set_x(this._player.get_x()+(this._player.get_width()-this._playerCurent.get_width())/2);this._opponentCurent.set_x(this._opponent.get_x()+
(this._opponent.get_width()-this._opponentCurent.get_width())/2)},checkCollision:function(a){var b=!1;if(this.ok)if(b=this._cbitmap.hitTestObject(a))this.onClose();else b=this._player.checkCollision(a);return b},checkOver:function(a){var b=!1;this.ok&&((b=this._cbitmap.hitTestObject(a))||(b=this._player.checkOver(a)));return b},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new nf;a.load({id:this.id,font:this.font,fontcolor:this.fontcolor,
fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,attrbg:this.attrbg,attributes:this.attributes,card:this.card,soundpick:this.soundpick,soundwin:this.soundwin,soundloose:this.soundloose,soundtie:this.soundtie});return a},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=y.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=y.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?
this.fontcolor=y.field(a,"fontcolor"):this.fontcolor="0xffffff";Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=y.field(a,"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=y.field(a,"vertical"):this.vertical="";Object.prototype.hasOwnProperty.call(a,"horizontal")?this.horizontal=y.field(a,"horizontal"):this.horizontal="";Object.prototype.hasOwnProperty.call(a,"close")?this.close=y.field(a,"close"):this.close="";Object.prototype.hasOwnProperty.call(a,
"attrbg")?this.attrbg=y.field(a,"attrbg"):this.attrbg="";Object.prototype.hasOwnProperty.call(a,"card")?this.card=y.field(a,"card"):this.card="";Object.prototype.hasOwnProperty.call(a,"soundpick")?this.soundpick=y.field(a,"soundpick"):this.soundpick="";Object.prototype.hasOwnProperty.call(a,"soundwin")?this.soundwin=y.field(a,"soundwin"):this.soundwin="";Object.prototype.hasOwnProperty.call(a,"soundloose")?this.soundloose=y.field(a,"soundloose"):this.soundloose="";Object.prototype.hasOwnProperty.call(a,
"soundtie")?this.soundtie=y.field(a,"soundtie"):this.soundtie="";Object.prototype.hasOwnProperty.call(a,"attributes")?(a=y.field(a,"attributes"),this.attributes=a==null?[]:a):this.attributes=[];this.font==null&&(this.font="sans");this.fontcolor==null&&(this.fontcolor="0xffffff");this.fontsize==null&&(this.fontsize=20);this.horizontal==null&&(this.horizontal="");this.vertical==null&&(this.vertical="");this.close==null&&(this.close="");this.attrbg==null&&(this.attrbg="");this.card==null&&(this.card=
"");this.soundpick==null&&(this.soundpick="");this.soundwin==null&&(this.soundwin="");this.soundloose==null&&(this.soundloose="");this.soundtie==null&&(this.soundtie="");this.fontcolor=Ga.colorHex(this.fontcolor,"#FFFFFF");if(this.horizontal!=""||this.vertical!="")this.horizontal==""&&(this.horizontal=this.vertical),this.vertical==""&&(this.vertical=this.horizontal);this._cbitmap==null&&(this._cbitmap=new ad(m(this,this.onBTLoad)));this._cbitmap.load(this.close);return!0}return!1},loadGraphics:function(){this.ok=
!1;this.fontcolor=Ga.colorHex(this.fontcolor,"#FFFFFF");if(this.horizontal!=""||this.vertical!="")this.horizontal==""&&(this.horizontal=this.vertical),this.vertical==""&&(this.vertical=this.horizontal);this._cbitmap==null&&(this._cbitmap=new ad(m(this,this.onBTLoad)));this._cbitmap.load(this.close)},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.soundpick=this.soundwin=this.soundloose=this.soundtie=this.id=this.font=this.fontcolor=this.horizontal=this.vertical=
this.close=null;this.parent!=null&&this.parent.removeChild(this);this._cbitmap!=null&&(this._cbitmap.hasEventListener("click")&&(this._cbitmap.removeEventListener("click",m(this,this.onClose)),this._cbitmap.removeEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.removeEventListener("mouseOut",m(this,this.onCloseOut))),this._cbitmap.kill());this._cbitmap=null;this._hbitmap!=null&&this._hbitmap.kill();this._hbitmap=null;this._vbitmap!=null&&this._vbitmap.kill();this._vbitmap=null;this._abitmap!=
null&&this._abitmap.kill();for(this._abitmap=null;this.attributes.length>0;)this.attributes.shift();this.attributes=null;this._player!=null&&this._player.kill();this._player=null;this._opponent!=null&&this._opponent.kill();this._opponent=null;this._playerCurent!=null&&this._playerCurent.kill();this._playerCurent=null;this._opponentCurent!=null&&this._opponentCurent.kill();this._opponentCurent=null;if(this._pcards!=null)for(;this._pcards.length>0;)this._pcards.shift();this._pcards=null;if(this._ocards!=
null)for(;this._ocards.length>0;)this._ocards.shift();this._onloose=this._onwin=this._ocards=null;this._playerData!=null&&this._playerData.kill();this._opponentData!=null&&this._opponentData.kill();this._opponentData=this._playerData=null},toObject:function(){this.id="bs";return{id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,attrbg:this.attrbg,attributes:this.attributes,card:this.card,soundpick:this.soundpick,
soundwin:this.soundwin,soundloose:this.soundloose,soundtie:this.soundtie}},bsClose:function(){this.onCloseOut(null);this.removeChildren();this._won?(this._won=!1,this._onwin!=null&&p.parser.run(this._onwin,!0)):this._onloose!=null&&p.parser.run(this._onloose,!0);this._onwin=this._onloose=null},btAtrWidth:function(){return this.ok?this._abitmap.oWidth:0},btAtrHeight:function(){return this.ok?this._abitmap.oHeight:0},onBTLoad:function(a){if(this.ok=a)this._abitmap==null&&(this._abitmap=new ad(m(this,
this.onAttrLoad))),this._abitmap.load(this.attrbg)},onAttrLoad:function(a){if(this.ok=a)this._hbitmap==null&&(this._hbitmap=new ad(m(this,this.onBgLoad))),this._hbitmap.load(this.horizontal),this._vbitmap==null&&(this._vbitmap=new ad(m(this,this.onBgLoad))),this._vbitmap.load(this.vertical),this._cbitmap.addEventListener("click",m(this,this.onClose)),this._cbitmap.addEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.addEventListener("mouseOut",m(this,this.onCloseOut))},onBgLoad:function(a){a||
(this.ok=!1)},onClose:function(a){p.parser.run('[ { "ac": "battle.close", "param": [ ] } ]')},onCloseOver:function(a){p.cursorVisible&&(p.mode=="editor"||p.mdata.highlightInt==null||p.isMobile()||this._cbitmap.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onCloseOut:function(a){this._cbitmap.set_filters([])},__class__:nf});var hk=function(a,b,c,d){this._totalAttr=5;this._player=!1;this.attributes=[];Da.call(this);if(Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")&&p.contraptions.bs.h.bs.card!=
"")for(var f=this._totalAttr=0,g=p.contraptions.bs.h.bs.attributes;f<g.length;){var h=g[f];++f;h!=""&&this._totalAttr++}this._holder=new Da;this.graphic=new ad(m(this,this.onPic));this.background=new ad(m(this,this.onBg));this.attributes.push(new Hj(0,b,c));this.attributes.push(new Hj(1,b,c));this.attributes.push(new Hj(2,b,c));this.attributes.push(new Hj(3,b,c));this.attributes.push(new Hj(4,b,c));Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")&&p.contraptions.bs.h.bs.card!=""&&this.background.load(p.contraptions.bs.h.bs.card);
this._draw=a;this._player=b;this._data=d};t["com.tilbuci.contraptions.BattleCard"]=hk;hk.__name__="com.tilbuci.contraptions.BattleCard";hk.__super__=Da;hk.prototype=I(Da.prototype,{graphic:null,attributes:null,background:null,_holder:null,_draw:null,_player:null,_data:null,_totalAttr:null,draw:function(a){this.removeChildren();if(Object.prototype.hasOwnProperty.call(p.narrative.cards.h,a)){for(var b=0,c=this.attributes;b<c.length;){var d=c[b];++b;d.set_visible(!1)}b=0;for(c=p.contraptions.bs.h.bs.attributes.length;b<
c;)d=b++,this.attributes[d].draw(d,this._data.getValue(d,!0),this._data.add[d],this._data.rem[d]);this.graphic.load(p.narrative.cards.h[a].cardgraphic);this.background.get_lastMedia()!=p.contraptions.bs.h.bs.card&&this.background.load(p.contraptions.bs.h.bs.card)}},showAttrVal:function(a){this.attributes[a].showValue(this._data.getValue(a,!0),this._data.add[a],this._data.rem[a])},kill:function(){this.removeChildren();this._holder.removeChildren();this.graphic.kill();this.graphic=null;this.background.kill();
for(this.background=null;this.attributes.length>0;)this.attributes.shift().kill();this._data=this._draw=this.attributes=null},checkOver:function(a){for(var b=!1,c=0,d=this.attributes;c<d.length;){var f=d[c];++c;b||a.hitTestObject(f)&&(b=!0)}return b},checkCollision:function(a){for(var b=!1,c=0,d=this.attributes;c<d.length;){var f=d[c];++c;!b&&a.hitTestObject(f)&&(b=!0,f.onClick())}return b},pulse:function(a){this._holder.removeChild(this.attributes[a]);this._holder.addChild(this.attributes[a]);Ki.pulse(this.attributes[a],
.5,1.5,2)},onPic:function(a){this._holder.removeChildren();this.graphic.set_width(this.graphic.set_height(p.contraptions.bs.h.bs.btAtrHeight()*3));this.graphic.set_x((p.contraptions.bs.h.bs.btAtrWidth()-this.graphic.get_width())/2);this.graphic.set_y(0);this.graphic.set_visible(!0);this._holder.addChild(this.graphic);a=0;for(var b=this.attributes.length;a<b;){var c=a++;this.attributes[c].get_visible()&&(this.attributes[c].set_x(0),this.attributes[c].set_y(this.graphic.get_height()+p.contraptions.bs.h.bs.btAtrHeight()/
2+c*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr+c*p.contraptions.bs.h.bs.btAtrHeight()),this._holder.addChild(this.attributes[c]))}this.place()},onBg:function(a){this.background.set_width(this.background.oWidth);this.background.set_height(this.background.oHeight);this.background.set_visible(!0);this.place()},place:function(){this.removeChildren();this.background.set_width(this.background.oWidth);this.background.set_height(this.background.oHeight);this.background.set_x(this.background.set_y(0));
this._holder.set_width(this.background.get_width()-2*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr);this._holder.set_scaleY(this._holder.get_scaleX());this._holder.get_height()>this.background.get_height()-2*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr&&(this._holder.set_height(this.background.get_height()-2*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr),this._holder.set_scaleX(this._holder.get_scaleY()));this._holder.set_x((this.background.get_width()-this._holder.get_width())/
2);this._holder.set_y((this.background.get_height()-this._holder.get_height())/2);this.addChild(this.background);this.addChild(this._holder);this._draw()},__class__:hk});var Hj=function(a,b,c){this._player=!1;Da.call(this);this.id=a;this._player=b;this._compare=c;this.graphic=new ad(m(this,this.onPic));this.text=new Jc;this.value=new Jc;this.addChild(this.graphic);this.addChild(this.text);this.addChild(this.value);this.mouseChildren=!1;Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")&&
p.contraptions.bs.h.bs.attrbg!=""&&this.graphic.load(p.contraptions.bs.h.bs.attrbg);b&&(this.addEventListener("click",m(this,this.onClick)),this.addEventListener("mouseOver",m(this,this.onOver)),this.addEventListener("mouseOut",m(this,this.onOut)))};t["com.tilbuci.contraptions.AttributeButton"]=Hj;Hj.__name__="com.tilbuci.contraptions.AttributeButton";Hj.__super__=Da;Hj.prototype=I(Da.prototype,{id:null,graphic:null,text:null,value:null,_player:null,_compare:null,showValue:function(a,b,c){b==0&&c==
0?this.value.set_text(a+""):(c!=0?this.value.set_text(a-c+" ... "):this.value.set_text(a+" ... "),b!=0?(c=this.value,c.set_text(c.get_text()+(a+b+""))):(c=this.value,c.set_text(c.get_text()+(a+""))))},draw:function(a,b,c,d){this.set_visible(!0);this.text.set_defaultTextFormat(new ef(p.contraptions.bs.h.bs.font,p.contraptions.bs.h.bs.fontsize,Ga.colorInt(p.contraptions.bs.h.bs.fontcolor),null,null,null,null,null,Nk.fromString("left")));this.value.set_defaultTextFormat(new ef(p.contraptions.bs.h.bs.font,
p.contraptions.bs.h.bs.fontsize,Ga.colorInt(p.contraptions.bs.h.bs.fontcolor),null,null,null,null,null,Nk.fromString("right")));this._player?(this.text.set_text(p.parser.parseString(p.contraptions.bs.h.bs.attributes[a])),c==0&&d==0?this.value.set_text(b+""):(d!=0?this.value.set_text(b-d+" ... "):this.value.set_text(b+" ... "),c!=0?(a=this.value,a.set_text(a.get_text()+(b+c+""))):(a=this.value,a.set_text(a.get_text()+(b+""))))):(this.text.set_text(p.parser.parseString(p.contraptions.bs.h.bs.attributes[a])),
this.value.set_text("?"));if(this.graphic.get_lastMedia()!=p.contraptions.bs.h.bs.attrbg)this.graphic.load(p.contraptions.bs.h.bs.attrbg);else this.onPic(!0)},kill:function(){this.removeChildren();this._player&&(this.removeEventListener("click",m(this,this.onClick)),this.removeEventListener("mouseOver",m(this,this.onOver)),this.removeEventListener("mouseOut",m(this,this.onOut)));this.value=this.text=null;this.graphic.kill();this._compare=this.graphic=null},onPic:function(a){this.graphic.set_visible(!0);
this.graphic.set_width(this.graphic.oWidth);this.graphic.set_height(this.graphic.oHeight);this.text.set_height(this.text.get_textHeight()+4);this.text.set_y((this.graphic.oHeight-this.text.get_height())/2);this.text.set_visible(!0);this.value.set_height(this.value.get_textHeight()+4);this.value.set_y((this.graphic.oHeight-this.value.get_height())/2);this.value.set_visible(!0);this.text.set_width(this.value.set_width(this.graphic.get_width()-this.graphic.get_height()));this.text.set_x(this.value.set_x(this.graphic.get_height()/
2))},onClick:function(a){this._compare(this.id)},onOver:function(a){p.cursorVisible&&(p.mode=="editor"||p.mdata.highlightInt==null||p.isMobile()||this.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onOut:function(a){this.set_filters([])},__class__:Hj});var Lg=function(a){this.cards=[];Da.call(this);this.mouseEnabled=!1;this.cards.push(new ad(m(this,this.onCard)));this.cards.push(new ad(m(this,this.onCard)));this.cards.push(new ad(m(this,this.onCard)));this.cards.push(new ad(m(this,this.onCard)));
this.cards.push(new ad(m(this,this.onCard)));this._draw=a};t["com.tilbuci.contraptions.CurrentCards"]=Lg;Lg.__name__="com.tilbuci.contraptions.CurrentCards";Lg.__super__=Da;Lg.prototype=I(Da.prototype,{cards:null,_draw:null,updateDisplay:function(a){for(var b=0,c=this.cards.length;b<c;){var d=b++;d>=a?this.cards[d].set_alpha(1):this.cards[d].set_alpha(.25)}},draw:function(a){this.removeChildren();for(var b=0,c=this.cards;b<c.length;){var d=c[b];++b;d.set_visible(!1);d.unload()}b=0;for(c=a.length;b<
c;)d=b++,d<this.cards.length&&Object.prototype.hasOwnProperty.call(p.narrative.cards.h,a[d])&&(this.cards[d].load(p.narrative.cards.h[a[d]].cardgraphic),this.cards[d].set_alpha(1))},kill:function(){for(this.removeChildren();this.cards.length>0;)this.cards.shift().kill();this._draw=this.cards=null},onCard:function(a){this.removeChildren();a=0;for(var b=this.cards.length;a<b;){var c=a++;this.cards[c].get_mediaLoaded()&&(this.cards[c].set_width(this.cards[c].set_height(p.contraptions.bs.h.bs.btAtrHeight()/
2)),this.cards[c].set_y(0),this.cards[c].set_x(c*(p.contraptions.bs.h.bs.btAtrHeight()/2+.5*p.contraptions.bs.h.bs.btAtrHeight()/3)),this.cards[c].set_visible(!0),this.addChild(this.cards[c]))}this._draw()},__class__:Lg});var pm=function(){this.rem=[0,0,0,0,0];this.add=[0,0,0,0,0];this.gain=[0,0,0,0,0];this.attr=[0,0,0,0,0];this.current=-1};t["com.tilbuci.contraptions.BattleData"]=pm;pm.__name__="com.tilbuci.contraptions.BattleData";pm.prototype={current:null,attr:null,gain:null,add:null,rem:null,
clear:function(){this.current=0},loadCard:function(a,b){if(Object.prototype.hasOwnProperty.call(p.narrative.cards.h,a)){for(;this.attr.length>0;)this.attr.shift();var c=0;for(a=p.narrative.cards.h[a].cardattributes;c<a.length;){var d=a[c];++c;this.attr.push(d)}this.current=b}},setAttr:function(a,b,c,d){this.gain[a]=b;this.add[a]=c;this.rem[a]=d},getValue:function(a,b){b==null&&(b=!1);return b?this.attr[a]+this.gain[a]:this.attr[a]+this.gain[a]+(Math.random()*this.add[a]|0)-(Math.random()*this.rem[a]|
0)},kill:function(){for(;this.attr.length>0;)this.attr.shift();for(;this.gain.length>0;)this.gain.shift();for(;this.add.length>0;)this.add.shift();for(;this.rem.length>0;)this.rem.shift();this.rem=this.add=this.gain=this.attr=null},__class__:pm};var Ij=function(a,b,c,d,f,g,h){Da.call(this);this.value=a;this._ac=b;p.mdata.highlightInt==null||p.isMobile()||(this.addEventListener("mouseOver",m(this,this.onMouseOver)),this.addEventListener("mouseOut",m(this,this.onMouseOut)));this._img=new ad(m(this,
this.onLoad));this._img.load(c);this.addChild(this._img);this._img.set_visible(!0);this._text=new Jc;this._text.set_defaultTextFormat(new ef(f,g,h,null,null,null,null,null,0));this._text.set_multiline(!1);this._text.set_wordWrap(!1);this._text.set_text(p.parser.parseString(d));this._text.set_visible(!1);this._text.set_selectable(!1);this.addChild(this._text);this.mouseChildren=!1;this.addEventListener("click",m(this,this.onClick))};t["com.tilbuci.contraptions.ContraptionButton"]=Ij;Ij.__name__="com.tilbuci.contraptions.ContraptionButton";
Ij.__super__=Da;Ij.prototype=I(Da.prototype,{_img:null,_text:null,value:null,_ac:null,kill:function(){this.removeChildren();this.hasEventListener("mouseOver")&&(this.removeEventListener("mouseOver",m(this,this.onMouseOver)),this.removeEventListener("mouseOut",m(this,this.onMouseOut)));this.removeEventListener("click",m(this,this.onClick));this._img.kill();this._ac=this.value=this._text=this._img=null},onLoad:function(a){a&&(this._text.set_width(this._img.oWidth),this._text.set_height(this._text.get_textHeight()+
4),this._text.set_y((this._img.oHeight-this._text.get_height())/2),this._text.set_visible(!0))},onMouseOver:function(a){p.cursorVisible&&this.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)])},onMouseOut:function(a){this.set_filters([])},onClick:function(a){this.set_filters([]);this._ac(this.value)},__class__:Ij});var ik=function(){this.interf=new G;this._formcurrent="";this.forms=new G;this.sounds=new G;this.musics=new G;this.backgrounds=new G;this.targets=new G;this.covers=new G;this.usingMessages=
!1;this._messagesCurrent=null;this.messages=new G;this.usingBs=!1;this._bsCurrent=null;this.bs=new G;this.usingInv=!1;this._invCurrent=null;this.inv=new G;this.usingDflow=!1;this._dflowCurrent=null;this.dflow=new G;this.usingMenu=!1;this._menuCurrent=null;this.menus=new G};t["com.tilbuci.contraptions.Contraptions"]=ik;ik.__name__="com.tilbuci.contraptions.Contraptions";ik.prototype={menus:null,_menusOverlay:null,_menuAction:null,_menuVariable:null,_menuCurrent:null,usingMenu:null,dflow:null,_dflowOverlay:null,
_dflowCurrent:null,usingDflow:null,inv:null,_invOverlay:null,_invCurrent:null,usingInv:null,bs:null,_bsOverlay:null,_bsCurrent:null,usingBs:null,messages:null,_messagesOverlay:null,_messagesAction:null,_messagesVariable:null,_messagesCurrent:null,usingMessages:null,covers:null,_coverOverlay:null,targets:null,backgrounds:null,_backgroundOverlay:null,_loadingOverlay:null,_loadingIc:null,_zoomOverlay:null,_zoomPicture:null,_zoomVideo:null,musics:null,sounds:null,forms:null,_formsOverlay:null,_formcurrent:null,
interf:null,_interfaceOverlay:null,getLayers:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));this._coverOverlay.mouseEnabled=!1;this._backgroundOverlay==null&&(this._backgroundOverlay=p.area.getOverlay("contraptions-background",!0));this._backgroundOverlay.mouseEnabled=!1;this._zoomOverlay==null&&(this._zoomOverlay=p.area.getOverlay("contraptions-zoom"));this._formsOverlay==null&&(this._formsOverlay=p.area.getOverlay("contraptions-forms"));this._menusOverlay==
null&&(this._menusOverlay=p.area.getOverlay("contraptions-menu"));this._interfaceOverlay==null&&(this._interfaceOverlay=p.area.getOverlay("contraptions-interface"));this._dflowOverlay==null&&(this._dflowOverlay=p.area.getOverlay("contraptions-dflow"));this._invOverlay==null&&(this._invOverlay=p.area.getOverlay("contraptions-inventory"));this._bsOverlay==null&&(this._bsOverlay=p.area.getOverlay("contraptions-battle"));this._messagesOverlay==null&&(this._messagesOverlay=p.area.getOverlay("contraptions-messages"));
this._loadingOverlay==null&&(this._loadingOverlay=p.area.getOverlay("contraptions-loading"));this._loadingOverlay.mouseEnabled=!1},clear:function(){this.getLayers();var a=this.covers.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this.covers.h[d].kill();var f=this.covers;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._coverOverlay.get_graphics().clear();a=this.backgrounds.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.backgrounds.h[d].kill(),f=this.backgrounds,
Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._backgroundOverlay.get_graphics().clear();a=this.menus.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.menus.h[d].kill(),f=this.menus,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._menusOverlay.get_graphics().clear();a=this.dflow.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.dflow.h[d].kill(),f=this.dflow,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._dflowOverlay.get_graphics().clear();
a=this.inv.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.inv.h[d].kill(),f=this.inv,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._invOverlay.get_graphics().clear();a=this.bs.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.bs.h[d].kill(),f=this.bs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._bsOverlay.get_graphics().clear();a=this.messages.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.messages.h[d].kill(),f=this.messages,Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d];this._messagesOverlay.get_graphics().clear();a=this.forms.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.forms.h[d].kill(),f=this.forms,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._formsOverlay.get_graphics().clear();a=this.interf.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.interf.h[d].kill(),f=this.interf,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._interfaceOverlay.get_graphics().clear()},removeAll:function(){var a=
this.menus.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this.menus.h[d].kill();var f=this.menus;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this.dflow.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.dflow.h[d].kill(),f=this.dflow,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.inv.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.inv.h[d].kill(),f=this.inv,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.bs.h;a=Object.keys(a);
b=a.length;for(c=0;c<b;)d=a[c++],this.bs.h[d].kill(),f=this.bs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.messages.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.messages.h[d].kill(),f=this.messages,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.covers.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.covers.h[d].kill(),f=this.covers,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.backgrounds.h;a=Object.keys(a);b=a.length;
for(c=0;c<b;)d=a[c++],this.backgrounds.h[d].kill(),f=this.backgrounds,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.musics.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.musics.h[d].kill(),f=this.musics,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.sounds.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.sounds.h[d].kill(),f=this.sounds,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.targets.h;a=Object.keys(a);b=a.length;for(c=
0;c<b;)d=a[c++],this.targets.h[d].kill(),f=this.targets,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.forms.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.forms.h[d].kill(),f=this.forms,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.interf.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.interf.h[d].kill(),f=this.interf,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]},getData:function(){var a=new G,b=[];a.h.covers=b;var c=b=this.covers.h;
b=Object.keys(b);for(var d=b.length,f=0;f<d;){var g=c[b[f++]];a.h.covers.push(g.toObject())}b=[];a.h.backgrounds=b;c=b=this.backgrounds.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.backgrounds.push(g.toObject());b=[];a.h.menus=b;c=b=this.menus.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.menus.push(g.toObject());b=[];a.h.dflow=b;c=b=this.dflow.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.dflow.push(g.toObject());b=[];a.h.inv=b;c=b=this.inv.h;b=Object.keys(b);
d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.inv.push(g.toObject());b=[];a.h.bs=b;c=b=this.bs.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.bs.push(g.toObject());b=[];a.h.messages=b;c=b=this.messages.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.messages.push(g.toObject());b=[];a.h.musics=b;c=b=this.musics.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.musics.push(g.toObject());b=[];a.h.sounds=b;c=b=this.sounds.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],
a.h.sounds.push(g.toObject());b=[];a.h.forms=b;c=b=this.forms.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.forms.push(g.toObject());b=[];a.h.interf=b;c=b=this.interf.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.interf.push(g.toObject());b=[];a.h.targets=b;c=b=this.targets.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.targets.push(g.toObject());return Ga.jsonStringify(a)},menuShow:function(a,b,c,d,f,g,h){this.menuHide();if(Object.prototype.hasOwnProperty.call(this.menus.h,
a)&&p.mode!="editor"){this._menuCurrent=this.menus.h[a];if(this._menuCurrent.ok){this._menusOverlay.get_graphics().clear();this._menuCurrent.bgalpha>0&&(this._menusOverlay.get_graphics().beginFill(H.parseInt(N.replace("#","0x",this._menuCurrent.bgcolor)),this._menuCurrent.bgalpha),this._menusOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._menusOverlay.get_graphics().endFill());this._menusOverlay.addChild(this._menuCurrent.create(b,m(this,this.onMenuSelect)));switch(f){case "absolute":this._menuCurrent.set_x(g);
this._menuCurrent.set_y(h);break;case "bottom":this._menuCurrent.set_x((p.area.get_aWidth()-this._menuCurrent.get_width())/2);this._menuCurrent.set_y(p.area.get_aHeight()-this._menuCurrent.get_height()-h);break;case "bottomleft":this._menuCurrent.set_x(g);this._menuCurrent.set_y(p.area.get_aHeight()-this._menuCurrent.get_height()-h);break;case "bottomright":this._menuCurrent.set_x(p.area.get_aWidth()-this._menuCurrent.get_width()-g);this._menuCurrent.set_y(p.area.get_aHeight()-this._menuCurrent.get_height()-
h);break;case "centerleft":this._menuCurrent.set_x(g);this._menuCurrent.set_y((p.area.get_aHeight()-this._menuCurrent.get_height())/2);break;case "centerright":this._menuCurrent.set_x(p.area.get_aWidth()-this._menuCurrent.get_width()-g);this._menuCurrent.set_y((p.area.get_aHeight()-this._menuCurrent.get_height())/2);break;case "top":this._menuCurrent.set_x((p.area.get_aWidth()-this._menuCurrent.get_width())/2);this._menuCurrent.set_y(h);break;case "topleft":this._menuCurrent.set_x(g);this._menuCurrent.set_y(h);
break;case "topright":this._menuCurrent.set_x(p.area.get_aWidth()-this._menuCurrent.get_width()-g);this._menuCurrent.set_y(h);break;default:this._menuCurrent.set_x((p.area.get_aWidth()-this._menuCurrent.get_width())/2),this._menuCurrent.set_y((p.area.get_aHeight()-this._menuCurrent.get_height())/2)}this._menuAction=d;this._menuVariable=c;return this.usingMenu=!0}this._menuCurrent=null;return!1}this._menuCurrent=null;return!1},checkMenuCollision:function(a){return this._menuCurrent!=null?this._menuCurrent.checkCollision(a):
!1},checkMenuOver:function(a){return this._menuCurrent!=null?this._menuCurrent.hitTestObject(a)?!0:!1:!1},showingDflow:function(){return this._dflowOverlay.get_numChildren()>0},showingInventory:function(){return this._invOverlay.get_numChildren()>0},showingBattle:function(){return this._bsOverlay.get_numChildren()>0},dflowShow:function(a){this.dflowHide();if(p.mode!="editor"&&Object.prototype.hasOwnProperty.call(this.dflow.h,"dflow")){this._dflowCurrent=this.dflow.h.dflow;if(this._dflowCurrent.ok){this._dflowOverlay.get_graphics().clear();
this._dflowOverlay.addChild(this._dflowCurrent.create(a));switch(this._dflowCurrent.position){case "bottom":this._dflowCurrent.set_x((p.area.get_aWidth()-this._dflowCurrent.menuSize.x)/2);this._dflowCurrent.set_y(p.area.get_aHeight()-this._dflowCurrent.menuSize.y-this._dflowCurrent.gap);break;case "bottomleft":this._dflowCurrent.set_x(this._dflowCurrent.gap);this._dflowCurrent.set_y(p.area.get_aHeight()-this._dflowCurrent.menuSize.y-this._dflowCurrent.gap);break;case "bottomright":this._dflowCurrent.set_x(p.area.get_aWidth()-
this._dflowCurrent.menuSize.x-this._dflowCurrent.gap);this._dflowCurrent.set_y(p.area.get_aHeight()-this._dflowCurrent.menuSize.y-this._dflowCurrent.gap);break;case "centerleft":this._dflowCurrent.set_x(this._dflowCurrent.gap);this._dflowCurrent.set_y((p.area.get_aHeight()-this._dflowCurrent.menuSize.y)/2);break;case "centerright":this._dflowCurrent.set_x(p.area.get_aWidth()-this._dflowCurrent.menuSize.x-this._dflowCurrent.gap);this._dflowCurrent.set_y((p.area.get_aHeight()-this._dflowCurrent.menuSize.y)/
2);break;case "top":this._dflowCurrent.set_x((p.area.get_aWidth()-this._dflowCurrent.menuSize.x)/2);this._dflowCurrent.set_y(this._dflowCurrent.gap);break;case "topleft":this._dflowCurrent.set_x(this._dflowCurrent.gap);this._dflowCurrent.set_y(this._dflowCurrent.gap);break;case "topright":this._dflowCurrent.set_x(p.area.get_aWidth()-this._dflowCurrent.menuSize.x-this._dflowCurrent.gap);this._dflowCurrent.set_y(this._dflowCurrent.gap);break;default:this._dflowCurrent.set_x((p.area.get_aWidth()-this._dflowCurrent.menuSize.x)/
2),this._dflowCurrent.set_y((p.area.get_aHeight()-this._dflowCurrent.menuSize.y)/2)}return this.usingDflow=!0}this._dflowCurrent=null;return!1}this._dflowCurrent=null;return!1},inventoryShow:function(a){this.invHide();if(p.mode!="editor"&&Object.prototype.hasOwnProperty.call(this.inv.h,"inv")){this._invCurrent=this.inv.h.inv;if(this._invCurrent.ok)return this._invOverlay.addChild(this._invCurrent.create(a)),this._invCurrent.draw(),this.usingInv=!0;this._invCurrent=null;return!1}this._invCurrent=null;
return!1},battleShow:function(a,b,c,d){this.bsHide();if(p.mode!="editor"&&Object.prototype.hasOwnProperty.call(this.bs.h,"bs")){this._bsCurrent=this.bs.h.bs;if(this._bsCurrent.ok)return this._bsOverlay.addChild(this._bsCurrent.create(a,b,c,d)),this.usingBs=!0;this._bsCurrent=null;return!1}this._bsCurrent=null;return!1},checkDflowCollision:function(a){return this._dflowCurrent!=null?this._dflowCurrent.checkCollision(a):!1},checkInvCollision:function(a){return this._invCurrent!=null?this._invCurrent.checkCollision(a):
!1},checkBsCollision:function(a){return this._bsCurrent!=null?this._bsCurrent.checkCollision(a):!1},checkDflowOver:function(a){return this._dflowCurrent!=null?this._dflowCurrent.hitTestObject(a)?!0:!1:!1},checkInvOver:function(a){return this._invCurrent!=null?this._invCurrent.checkOver(a):!1},checkBsOver:function(a){return this._bsCurrent!=null?this._bsCurrent.checkOver(a):!1},messagesShow:function(a,b,c,d,f){this.messagesHide();if(Object.prototype.hasOwnProperty.call(this.messages.h,a)){this._messagesCurrent=
this.messages.h[a];if(this._messagesCurrent.ok)return this._messagesOverlay.get_graphics().clear(),this._messagesOverlay.get_graphics().beginFill(0,.5),this._messagesOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._messagesOverlay.get_graphics().endFill(),this._messagesOverlay.addChild(this._messagesCurrent.create(b,c,m(this,this.onMessagesSelect))),this._messagesCurrent.set_x((p.area.get_aWidth()-this._messagesCurrent.get_width())/2),this._messagesCurrent.set_y((p.area.get_aHeight()-
this._messagesCurrent.get_height())/2),this._messagesAction=f,this._messagesVariable=d,this.usingMessages=!0;this._messagesCurrent=null;return!1}this._messagesCurrent=null;return!1},checkMessagesCollision:function(a){return this._messagesCurrent!=null?this._messagesCurrent.checkCollision(a):!1},checkMessagesOver:function(a){return this._messagesCurrent!=null?this._messagesCurrent.hitTestObject(a)?!0:!1:!1},changeDisplay:function(){this.getLayers();this._backgroundOverlay.get_visible()&&this._backgroundOverlay.get_numChildren()>
0&&this._backgroundOverlay.getChildAt(0).getCover();this._coverOverlay.get_visible()&&this._coverOverlay.get_numChildren()>0&&this._coverOverlay.getChildAt(0).getCover()},removeContraptions:function(a){a==null&&(a=!1);this.menuHide();this.messagesHide();this.dflowHide();this.invHide();this.bsHide();this.hideForm();this.hideLoadingIc();this.removeZoom();a&&(this.musicStop(),this.soundStop(),this.hideCover(),this.hideBackground(),this.hideAllInterfaces())},musicPlay:function(a){if(Object.prototype.hasOwnProperty.call(this.musics.h,
a)){for(var b=this.musics.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];g.id==a?g.play():g.pause()}return!0}return!1},soundPlay:function(a){if(Object.prototype.hasOwnProperty.call(this.sounds.h,a)){for(var b=this.sounds.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];g.id==a&&g.play()}return!0}return!1},musicPause:function(){for(var a=this.musics.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].pause()},soundPause:function(a){a==null&&(a="");if(a==""){var b=this.sounds.h,c=b;b=Object.keys(b);
for(var d=b.length,f=0;f<d;){var g=c[b[f++]];g.pause()}}else if(Object.prototype.hasOwnProperty.call(this.sounds.h,a))for(c=b=this.sounds.h,b=Object.keys(b),d=b.length,f=0;f<d;)g=c[b[f++]],g.id==a&&g.pause()},musicStop:function(){for(var a=this.musics.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].stop()},soundStop:function(a){a==null&&(a="");if(a==""){var b=this.sounds.h,c=b;b=Object.keys(b);for(var d=b.length,f=0;f<d;){var g=c[b[f++]];g.stop()}}else if(Object.prototype.hasOwnProperty.call(this.sounds.h,
a))for(c=b=this.sounds.h,b=Object.keys(b),d=b.length,f=0;f<d;)g=c[b[f++]],g.id==a&&g.stop()},musicVolume:function(a){for(var b=this.musics.h,c=Object.keys(b),d=c.length,f=0;f<d;)b[c[f++]].volume(a)},soundVolume:function(a,b){b==null&&(b="");if(b==""){var c=this.sounds.h,d=c;c=Object.keys(c);for(var f=c.length,g=0;g<f;){var h=d[c[g++]];h.volume(a)}}else if(Object.prototype.hasOwnProperty.call(this.sounds.h,b))for(d=c=this.sounds.h,c=Object.keys(c),f=c.length,g=0;g<f;)h=d[c[g++]],h.id==b&&h.volume(a)},
menuHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.menus.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._menusOverlay.get_graphics().clear();this._menusOverlay.removeChildren();this._menuCurrent=null;this.usingMenu=!1},dflowHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.dflow.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();
this.getLayers();this._dflowOverlay.get_graphics().clear();this._dflowCurrent=null;this.usingDflow=!1},invHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.inv.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._invOverlay.get_graphics().clear();this._invCurrent!=null&&this._invCurrent.invClose();this._invCurrent=null;this.usingInv=!1},bsHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));
for(var a=this.bs.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._bsOverlay.get_graphics().clear();this._bsCurrent!=null&&this._bsCurrent.bsClose();this._bsCurrent=null;this.usingBs=!1},messagesHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.messages.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._messagesOverlay.get_graphics().clear();this._messagesCurrent=null;
this.usingMessages=!1},onMenuSelect:function(a){p.parser.setInt(this._menuVariable,a);this._menuAction!=null&&p.parser.run(this._menuAction,!0)},onMessagesSelect:function(a){p.parser.setInt(this._messagesVariable,a);this._messagesAction!=null&&p.parser.run(this._messagesAction,!0)},loadLoadingIc:function(){this._loadingOverlay==null?(this.getLayers(),this._loadingOverlay.set_visible(!1),this._loadingIc=new Ok(m(this,this.onLoadingIc)),this._loadingOverlay.addChild(this._loadingIc)):this._loadingIc==
null&&(this._loadingOverlay.set_visible(!1),this._loadingIc=new Ok(m(this,this.onLoadingIc)),this._loadingOverlay.addChild(this._loadingIc));this._loadingIc.set_visible(!1);this._loadingOverlay.set_visible(!1);this._loadingIc.unload();p.mdata.loadingic[0]!=""&&(this._loadingIc.frames=H.parseInt(p.mdata.loadingic[1]),this._loadingIc.frtime=H.parseInt(p.mdata.loadingic[2]),this._loadingIc.load(p.mdata.loadingic[0]))},showLoadingIc:function(){this._loadingIc.get_mediaLoaded()?(this._loadingIc.set_visible(!0),
this._loadingOverlay.set_visible(!0)):(this._loadingIc.set_visible(!1),this._loadingOverlay.set_visible(!1))},hideLoadingIc:function(){this._loadingIc.set_visible(!1);this._loadingOverlay.set_visible(!1)},onLoadingIc:function(a){a?(this._loadingIc.set_x((p.area.get_aWidth()-this._loadingIc.get_width())/2),this._loadingIc.set_y((p.area.get_aHeight()-this._loadingIc.get_height())/2)):(this._loadingIc.set_visible(!1),this._loadingOverlay.set_visible(!1))},zoomInstance:function(a){this._zoomOverlay==
null&&(this.getLayers(),this._zoomOverlay.set_visible(!1),this._zoomPicture=new ad(m(this,this.onZoomPic)),this._zoomPicture.set_visible(!1),this._zoomOverlay.addChild(this._zoomPicture),this._zoomVideo=new un(m(this,this.onZoomVideo),m(this,this.onZoomVideoEnd)),this._zoomVideo.set_visible(!1),this._zoomOverlay.addChild(this._zoomVideo));a=p.area.pickInstance(a);if(a==null)return this._zoomOverlay.set_visible(!1),this._zoomPicture.set_visible(!1),this._zoomVideo.set_visible(!1),this._zoomPicture.unload(),
this._zoomVideo.unload(),!1;if(a.get_currentType()=="picture")return this._zoomPicture.load(a.get_currentMedia()),!0;if(a.get_currentType()=="video")return this._zoomVideo.load(a.get_currentMedia()),!0;this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);this._zoomPicture.unload();this._zoomVideo.unload();return!1},onZoomPic:function(a){this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);a?(this._zoomOverlay.get_graphics().clear(),
this._zoomOverlay.get_graphics().beginFill(0,.5),this._zoomOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._zoomOverlay.get_graphics().endFill(),p.area.pause(),this._zoomPicture.set_width(p.area.get_aWidth()-10),this._zoomPicture.set_height(this._zoomPicture.get_width()*(this._zoomPicture.oHeight/this._zoomPicture.oWidth)),this._zoomPicture.get_height()>p.area.get_aHeight()-10&&(this._zoomPicture.set_height(p.area.get_aHeight()-10),this._zoomPicture.set_width(this._zoomPicture.get_height()*
(this._zoomPicture.oWidth/this._zoomPicture.oHeight))),this._zoomPicture.set_visible(!0),this._zoomOverlay.set_visible(!0),this._zoomPicture.set_x((p.area.get_aWidth()-this._zoomPicture.get_width())/2),this._zoomPicture.set_y((p.area.get_aHeight()-this._zoomPicture.get_height())/2),this._zoomPicture.addEventListener("click",m(this,this.onZoomPClick))):(this._zoomPicture.unload(),this._zoomVideo.unload())},onZoomVideo:function(a){this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);
this._zoomVideo.set_visible(!1);a?(this._zoomOverlay.get_graphics().clear(),this._zoomOverlay.get_graphics().beginFill(0,.5),this._zoomOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._zoomOverlay.get_graphics().endFill(),p.area.pause(),this._zoomVideo.set_width(p.area.get_aWidth()-10),this._zoomVideo.set_height(this._zoomVideo.get_width()*(this._zoomVideo.oHeight/this._zoomVideo.oWidth)),this._zoomVideo.get_height()>p.area.get_aHeight()-10&&(this._zoomVideo.set_height(p.area.get_aHeight()-
10),this._zoomVideo.set_width(this._zoomVideo.get_height()*(this._zoomVideo.oWidth/this._zoomVideo.oHeight))),this._zoomVideo.set_visible(!0),this._zoomOverlay.set_visible(!0),this._zoomVideo.play(),this._zoomVideo.addEventListener("click",m(this,this.onZoomVClick))):(this._zoomPicture.unload(),this._zoomVideo.unload())},onZoomVideoEnd:function(){this._zoomVideo.setTime(0);this._zoomVideo.play()},onZoomPClick:function(a){this._zoomPicture.removeEventListener("click",m(this,this.onZoomPClick));this._zoomOverlay.set_visible(!1);
this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);this._zoomPicture.unload();this._zoomVideo.unload();p.area.play()},onZoomVClick:function(a){this._zoomVideo.removeEventListener("click",m(this,this.onZoomVClick));this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);this._zoomPicture.unload();this._zoomVideo.unload();p.area.play()},removeZoom:function(){this._zoomOverlay!=null&&(this._zoomPicture!=null&&(this._zoomPicture.hasEventListener("click")&&
this._zoomPicture.removeEventListener("click",m(this,this.onZoomPClick)),this._zoomPicture.set_visible(!1),this._zoomPicture.unload()),this._zoomVideo!=null&&(this._zoomVideo.hasEventListener("click")&&this._zoomVideo.removeEventListener("click",m(this,this.onZoomVClick)),this._zoomVideo.set_visible(!1),this._zoomVideo.unload()),this._zoomOverlay.set_visible(!1))},showCover:function(a){this.getLayers();return Object.prototype.hasOwnProperty.call(this.covers.h,a)?(this._coverOverlay.removeChildren(),
this._coverOverlay.addChild(this.covers.h[a].getCover()),this._coverOverlay.mouseEnabled=this.covers.h[a].holdClick,this._coverOverlay.set_visible(!0),!0):!1},hideCover:function(){this.getLayers();this._coverOverlay.removeChildren();this._coverOverlay.set_visible(!1);this._coverOverlay.mouseEnabled=!1},showBackground:function(a){this.getLayers();return Object.prototype.hasOwnProperty.call(this.backgrounds.h,a)?(this._backgroundOverlay.removeChildren(),this._backgroundOverlay.addChild(this.backgrounds.h[a].getCover()),
this._backgroundOverlay.set_visible(!0),!0):!1},hideBackground:function(){this.getLayers();this._backgroundOverlay.removeChildren();this._backgroundOverlay.set_visible(!1);this._backgroundOverlay.mouseEnabled=!1},hideForm:function(){this._formsOverlay.removeChildren();this._formsOverlay.set_visible(!1)},showForm:function(a,b,c,d,f){this.hideForm();return Object.prototype.hasOwnProperty.call(this.forms.h,a)?(this.forms.h[a].start(d,f),this.forms.h[a].set_x(b),this.forms.h[a].set_y(c),this._formsOverlay.addChild(this.forms.h[a]),
this._formsOverlay.set_visible(!0),this._formcurrent=a,!0):!1},setFormValue:function(a,b){return this._formcurrent==""?!1:this.forms.h[this._formcurrent].setValue(a,b)},setFormStepper:function(a,b,c,d){return this._formcurrent==""?!1:this.forms.h[this._formcurrent].setStepper(a,b,c,d)},getFormValue:function(a){return this._formcurrent==""?"":this.forms.h[this._formcurrent].getValue(a)},hideAllInterfaces:function(){this._interfaceOverlay.removeChildren();this._interfaceOverlay.set_visible(!1)},hideInterface:function(a){Object.prototype.hasOwnProperty.call(this.interf.h,
a)&&this.interf.h[a].remove();this._interfaceOverlay.get_numChildren()==0&&this._interfaceOverlay.set_visible(!1)},showInterface:function(a,b,c){this.hideInterface(a);return Object.prototype.hasOwnProperty.call(this.interf.h,a)?(this.interf.h[a].start(),this.interf.h[a].set_x(b),this.interf.h[a].set_y(c),this._interfaceOverlay.addChild(this.interf.h[a]),this._interfaceOverlay.set_visible(!0),!0):!1},checkInterfaceCollision:function(a){if(this._interfaceOverlay.get_visible()){for(var b=!1,c=0,d=this._interfaceOverlay.get_numChildren();c<
d;){var f=c++;b||(f=this._interfaceOverlay.getChildAt(f),f!=null&&(b=f.checkCollision(a)))}return b}return!1},checkInterfaceOver:function(a){if(this._interfaceOverlay.get_visible()){for(var b=!1,c=0,d=this._interfaceOverlay.get_numChildren();c<d;){var f=c++;this._interfaceOverlay.getChildAt(f).hitTestObject(a)&&(b=!0)}return b}return!1},setInterfaceText:function(a,b){return Object.prototype.hasOwnProperty.call(this.interf.h,a)?this.interf.h[a].setText(b):!1},setInterfaceFrame:function(a,b){return Object.prototype.hasOwnProperty.call(this.interf.h,
a)?this.interf.h[a].setMapFrame(b):!1},pauseInterface:function(a){return Object.prototype.hasOwnProperty.call(this.interf.h,a)?this.interf.h[a].pauseMap():!1},playInterface:function(a){return Object.prototype.hasOwnProperty.call(this.interf.h,a)?this.interf.h[a].playMap():!1},__class__:ik};var Dd=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.CoverContraption"]=Dd;Dd.__name__="com.tilbuci.contraptions.CoverContraption";Dd.__super__=Da;Dd.prototype=I(Da.prototype,
{ok:null,id:null,holdClick:null,landscape:null,portrait:null,_landscape:null,_portrait:null,create:function(a,b){this.ok&&this.removeChildren();return this},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new Dd(this.toObject())},getCover:function(){this.removeChildren();p.area.get_pOrientation()=="horizontal"?this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small),this.addChild(this._landscape)):
(this._portrait.set_width(p.mdata.screen.big),this._portrait.set_height(p.mdata.screen.small),this.addChild(this._portrait)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big),this.addChild(this._portrait)):(this._landscape.set_width(p.mdata.screen.small),this._landscape.set_height(p.mdata.screen.big),this.addChild(this._landscape));return this},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=
y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"click")?this.holdClick=y.field(a,"click"):this.holdClick=!1,Object.prototype.hasOwnProperty.call(a,"portrait")?(this.portrait=y.field(a,"portrait"),this.portrait!=""&&(this._portrait=new ad(m(this,this.onPicLoad)),this._portrait.set_visible(!0))):this.portrait="",Object.prototype.hasOwnProperty.call(a,"landscape")?(this.landscape=y.field(a,"landscape"),this.landscape!=""&&(this._landscape=new ad(m(this,this.onPicLoad)),this._landscape.set_visible(!0))):
this.landscape="",this.holdClick==null&&(this.holdClick=!1),this.portrait==null&&(this.portrait=""),this.landscape==null&&(this.landscape=""),this.landscape!=""||this.portrait!="")?(this._landscape!=null&&this._landscape.load(this.landscape),this._portrait!=null&&this._portrait.load(this.portrait),this.holdClick?(this.addEventListener("click",m(this,this.onClick)),this.mouseEnabled=!0):this.mouseEnabled=!1,this.mouseChildren=!1,!0):!1},onPicLoad:function(a){p.area.get_pOrientation()=="horizontal"?
this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small)):(this._portrait.set_width(p.mdata.screen.big),this._portrait.set_height(p.mdata.screen.small)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big)):(this._landscape.set_width(p.mdata.screen.small),this._landscape.set_height(p.mdata.screen.big))},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();
this._landscape!=null&&this._landscape.kill();this._portrait!=null&&this._portrait.kill();this.id=this.portrait=this.landscape=this._portrait=this._landscape=null;this.hasEventListener("click")&&this.removeEventListener("click",m(this,this.onClick))},toObject:function(){return{id:this.id,click:this.holdClick,landscape:this.landscape,portrait:this.portrait}},onClick:function(a){},__class__:Dd});var Pk=function(){this._options=[];this._buttons=[];this.menuSize=new Ea;this.gap=10;this.position="center";
this.buton="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;Da.call(this)};t["com.tilbuci.contraptions.DflowContraption"]=Pk;Pk.__name__="com.tilbuci.contraptions.DflowContraption";Pk.__super__=Da;Pk.prototype=I(Da.prototype,{ok:null,id:null,font:null,fontcolor:null,fontsize:null,buton:null,position:null,gap:null,menuSize:null,_btbitmap:null,_btsize:null,_buttons:null,_options:null,create:function(a){if(this.ok){for(this.removeChildren();this._buttons.length>0;)this._buttons.shift().kill();
this._options=a;for(var b=0,c=0,d=a.length;c<d;){var f=c++;a[f][0]!=""&&a[f][1]!=""&&(f=new Ij(f==null?"null":""+f,m(this,this.onClick),this.buton,a[f][0],this.font,this.fontsize,Ga.colorInt(this.fontcolor)),f.set_x(0),f.set_y((this.gap+this._btsize.y)*b),this._buttons.push(f),this.addChild(f),++b)}this.menuSize.x=this._btsize.x;this.menuSize.y=this._buttons.length*this._btsize.y+this.gap*(this._buttons.length-1)}return this},checkCollision:function(a){var b=!1;if(this.ok)for(var c=0,d=this._buttons;c<
d.length;){var f=d[c];++c;f!=null&&a.hitTestObject(f)&&(b=!0,this.onClick(f.value))}return b},remove:function(){for(this.removeChildren();this._buttons.length>0;)this._buttons.shift().kill();this._options=[];this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new Pk;a.load({id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,buton:this.buton,position:this.position,gap:this.gap});return a},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,
"id")?(this.id=y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"font")?this.font=y.field(a,"font"):this.font="sans",Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=y.field(a,"fontcolor"):this.fontcolor="0xffffff",Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=y.field(a,"fontsize"):this.fontsize=20,Object.prototype.hasOwnProperty.call(a,"buton")?this.buton=y.field(a,"buton"):this.buton="",Object.prototype.hasOwnProperty.call(a,"gap")?this.gap=y.field(a,"gap"):
this.gap=10,Object.prototype.hasOwnProperty.call(a,"position")?this.position=y.field(a,"position"):this.position="center",this.font==null&&(this.font="sans"),this.fontcolor==null&&(this.fontcolor="0xffffff"),this.fontsize==null&&(this.fontsize=20),this.buton==null&&(this.buton=""),this.gap==null&&(this.gap=10),this.position==null&&(this.position="center"),this.fontcolor=Ga.colorHex(this.fontcolor,"#FFFFFF"),this._btbitmap==null&&(this._btbitmap=new ad(m(this,this.onBTLoad))),this._btbitmap.load(this.buton),
!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=this.font=this.fontcolor=this.buton=this.position=null;this._buttons.length>0;)this._buttons.shift().kill();this.menuSize=this._options=this._buttons=null;this.parent!=null&&this.parent.removeChild(this)},toObject:function(){return{id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,buton:this.buton,position:this.position,gap:this.gap}},onBTLoad:function(a){if(this.ok=a)this._btsize=
new Ea(this._btbitmap.oWidth,this._btbitmap.oHeight)},onClick:function(a){this._options[H.parseInt(a)][1]!=""&&p.parser.run('{"ac":"scene.load","param":["'+this._options[H.parseInt(a)][1]+'"]}');this.remove()},__class__:Pk});var D=function(a){this._inputs=new G;this._graphics=new G;this._created=!1;this.elem=[];this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.FormContraption"]=D;D.__name__="com.tilbuci.contraptions.FormContraption";D.__super__=Da;D.prototype=I(Da.prototype,
{ok:null,id:null,elem:null,_created:null,_graphics:null,_ok:null,_cancel:null,_inputs:null,setValue:function(a,b){if(this._created&&Object.prototype.hasOwnProperty.call(this._inputs.h,a)){var c=!1;if(this._inputs.h[a]instanceof rd)this._inputs.h[a].set_text(p.parser.parseString(b)),c=!0;else if(this._inputs.h[a]instanceof sd)this._inputs.h[a].set_value(p.parser.parseInt(b)),c=!0;else if(this._inputs.h[a]instanceof hd)this._inputs.h[a].set_selected(p.parser.parseBool(b)),c=!0;else if(this._inputs.h[a]instanceof
tf)this._inputs.h[a].set_text(p.parser.parseString(b)),c=!0;else if(this._inputs.h[a]instanceof ce){a=this._inputs.h[a];c=0;for(var d=a.get_dataProvider().get_length();c<d;){var f=c++;a.get_dataProvider().get(f).text==p.parser.parseString(b)&&a.set_selectedIndex(f)}c=!0}return c}return!1},getValue:function(a){if(this._created&&Object.prototype.hasOwnProperty.call(this._inputs.h,a)){var b="";this._inputs.h[a]instanceof rd?b=this._inputs.h[a].get_text():this._inputs.h[a]instanceof sd?b=H.string(this._inputs.h[a].get_value()):
this._inputs.h[a]instanceof hd?b=this._inputs.h[a].get_selected()?"true":"false":this._inputs.h[a]instanceof tf?b=this._inputs.h[a].get_text():this._inputs.h[a]instanceof ce&&(b=this._inputs.h[a].get_selectedItem().text);return b}return""},setStepper:function(a,b,c,d){return this._created&&Object.prototype.hasOwnProperty.call(this._inputs.h,a)&&this._inputs.h[a]instanceof sd?(a=this._inputs.h[a],a.set_minimum(b),a.set_maximum(c),a.set_step(d),!0):!1},start:function(a,b){if(this.ok){this._ok=a;this._cancel=
b;if(!this._created){a=0;for(b=this.elem;a<b.length;){var c=b[a];++a;switch(c.type){case "background":if(c.file!=""){var d=this._graphics,f=new ad;d.h.background=f;this._graphics.h.background.load(c.file);this._graphics.h.background.set_visible(!0)}break;case "btcancel":c.file!=""&&(d=this._graphics,f=new ad,d.h.btcancel=f,this._graphics.h.btcancel.load(c.file),this._graphics.h.btcancel.set_visible(!0),this._graphics.h.btcancel.set_x(c.x),this._graphics.h.btcancel.set_y(c.y),this._graphics.h.btcancel.addEventListener("click",
m(this,this.onCancel)),this._graphics.h.btcancel.addEventListener("mouseOver",m(this,this.onCancelOver)),this._graphics.h.btcancel.addEventListener("mouseOut",m(this,this.onCancelOut)));break;case "btok":d=this._graphics;f=new ad;d.h.btok=f;this._graphics.h.btok.load(c.file);this._graphics.h.btok.set_visible(!0);this._graphics.h.btok.set_x(c.x);this._graphics.h.btok.set_y(c.y);this._graphics.h.btok.addEventListener("click",m(this,this.onOk));this._graphics.h.btok.addEventListener("mouseOver",m(this,
this.onOkOver));this._graphics.h.btok.addEventListener("mouseOut",m(this,this.onOkOut));break;case "input":f=this._inputs;d=c.name;var g=new rd;f.h[d]=g;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "numeric":d=new sd;d.set_minimum(0);d.set_maximum(1E4);d.set_step(1);this._inputs.h[c.name]=d;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "password":d=
new rd;d.set_displayAsPassword(!0);this._inputs.h[c.name]=d;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "select":d=new ce;f=c.options.split(";");f.length==0&&f.push("?");g=[];for(var h=0;h<f.length;){var n=f[h];++h;g.push({text:n})}d.set_dataProvider(new dg(g));d.itemToText=function(l){return l.text};this._inputs.h[c.name]=d;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);
break;case "textarea":d=this._inputs;f=c.name;g=new tf;d.h[f]=g;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "toggle":d=this._inputs,f=c.name,g=new hd,d.h[f]=g,this._inputs.h[c.name].set_x(c.x),this._inputs.h[c.name].set_y(c.y)}}Object.prototype.hasOwnProperty.call(this._graphics.h,"background")&&this.addChild(this._graphics.h.background);Object.prototype.hasOwnProperty.call(this._graphics.h,"btok")&&this.addChild(this._graphics.h.btok);
Object.prototype.hasOwnProperty.call(this._graphics.h,"btcancel")&&this.addChild(this._graphics.h.btcancel);a=Object.keys(this._inputs.h);b=a.length;for(c=0;c<b;)d=a[c++],this.addChild(this._inputs.h[d])}return this._created=!0}return!1},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new D(this.toObject())},load:function(a){for(this.ok=!1;this.elem.length>0;)this.elem.shift();if(Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=
y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"elem"))){a=y.field(a,"elem");for(var b=0,c=y.fields(a);b<c.length;){var d=c[b];++b;d=y.field(a,d);this.elem.push(d)}return this.ok=!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=null;this.elem.length>0;)this.elem.shift();this.elem=null;Object.prototype.hasOwnProperty.call(this._graphics.h,"btok")&&(this._graphics.h.btok.removeEventListener("click",m(this,this.onOk)),this._graphics.h.btok.removeEventListener("mouseOver",
m(this,this.onOkOver)),this._graphics.h.btok.removeEventListener("mouseOut",m(this,this.onOkOut)));Object.prototype.hasOwnProperty.call(this._graphics.h,"btcancel")&&(this._graphics.h.btcancel.removeEventListener("click",m(this,this.onCancel)),this._graphics.h.btcancel.removeEventListener("mouseOver",m(this,this.onCancelOver)),this._graphics.h.btcancel.removeEventListener("mouseOut",m(this,this.onCancelOut)));var a=this._graphics.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this._graphics.h[d].kill();
var f=this._graphics;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._ok=this._cancel=this._graphics=null;a=this._inputs.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._inputs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._inputs=null},toObject:function(){return{id:this.id,elem:this.elem}},onOk:function(a){this.onOkOut(null);this.onCancelOut(null);this._ok!=null&&p.parser.run(this._ok,!0);this._ok=this._cancel=null;p.contraptions.hideForm()},onOkOver:function(a){p.cursorVisible&&
p.mdata.highlight!=""&&this._graphics.h.btok.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)])},onOkOut:function(a){this._graphics.h.btok.set_filters([])},onCancel:function(a){this.onOkOut(null);this.onCancelOut(null);this._cancel!=null&&p.parser.run(this._cancel,!0);this._ok=this._cancel=null;p.contraptions.hideForm()},onCancelOver:function(a){p.cursorVisible&&p.mdata.highlight!=""&&this._graphics.h.btcancel.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)])},onCancelOut:function(a){this._graphics.h.btcancel.set_filters([])},
__class__:D});var K=function(a){this._graphics=new G;this._created=!1;this.elem=[];this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.InterfaceContraption"]=K;K.__name__="com.tilbuci.contraptions.InterfaceContraption";K.__super__=Da;K.prototype=I(Da.prototype,{ok:null,id:null,elem:null,_created:null,_graphics:null,_smap:null,_text:null,start:function(){if(this.ok){if(!this._created){for(var a=1,b=0,c=this.elem;b<c.length;){var d=c[b];++b;switch(d.type){case "background":if(d.file!=
""){var f=new ad;f.load(d.file);f.set_visible(!0);this._graphics.h.background=f}break;case "spritemap":f=d.options.split(";");f.length==2&&(this._smap=new Ok,this._smap.frames=H.parseInt(f[0]),this._smap.frtime=H.parseInt(f[1]),this._smap.playOnLoad=!1,this._smap.load(d.file),this._smap.set_visible(!0),this._smap.set_x(d.x),this._smap.set_y(d.y),d.action!=""&&(this._smap.extraInfo.push(d.action),this._smap.addEventListener("click",m(this,this.onClick)),this._smap.addEventListener("mouseOver",m(this,
this.onOver)),this._smap.addEventListener("mouseOut",m(this,this.onOut))),this._graphics.h.spritemap=this._smap);break;case "text":f=d.options.split(";");f.length==7&&(this._text=new Jc,this._text.set_selectable(!1),this._text.mouseEnabled=!1,this._text.set_x(d.x),this._text.set_y(d.y),this._text.set_width(H.parseInt(f[0])),d=new ef(f[1],H.parseInt(f[2]),Ga.colorInt(f[3]),f[4]=="true",f[5]=="true",null,null,null,Nk.fromString(f[6])),this._text.set_defaultTextFormat(d),this._text.set_height(H.parseInt(f[2])+
12));break;default:d.file!=""&&(f=new ad,f.set_x(d.x),f.set_y(d.y),d.rot!=null&&f.set_rotation(d.rot),d.alpha!=null&&f.set_alpha(d.alpha/100),d.action!=""&&(f.extraInfo.push(d.action),f.addEventListener("click",m(this,this.onClick)),f.addEventListener("mouseOver",m(this,this.onOver)),f.addEventListener("mouseOut",m(this,this.onOut))),f.load(d.file),f.set_visible(!0),this._graphics.h["im"+a]=f,++a)}}Object.prototype.hasOwnProperty.call(this._graphics.h,"background")&&this.addChild(this._graphics.h.background);
a=Object.keys(this._graphics.h);b=a.length;for(c=0;c<b;)d=a[c++],d!="background"&&this.addChild(this._graphics.h[d]);this._text!=null&&this.addChild(this._text)}return this._created=!0}return!1},checkCollision:function(a){for(var b=!1,c=this._graphics.h,d=Object.keys(c),f=d.length,g=0;g<f;){var h=c[d[g++]];if(!b&&h.hasEventListener("click")&&h.extraInfo.length>0&&a.hitTestObject(h)){var n=p.mvActions,l=p.parser.parseString(h.extraInfo[0]);Object.prototype.hasOwnProperty.call(n.h,l)&&(b=p.parser,n=
p.mvActions,h=p.parser.parseString(h.extraInfo[0]),b.run(n.h[h]),b=!0)}}return b},remove:function(){this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new K(this.toObject())},load:function(a){for(this.ok=!1;this.elem.length>0;)this.elem.shift();if(Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"elem"))){a=y.field(a,"elem");for(var b=0,c=y.fields(a);b<c.length;){var d=c[b];++b;d=y.field(a,d);this.elem.push(d)}return this.ok=
!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=null;this.elem.length>0;)this.elem.shift();this._smap=this._text=this.elem=null;for(var a=Object.keys(this._graphics.h),b=a.length,c=0;c<b;){var d=a[c++];this._graphics.h[d].hasEventListener("click")&&(this._graphics.h[d].removeEventListener("click",m(this,this.onClick)),this._graphics.h[d].removeEventListener("mouseOver",m(this,this.onOver)),this._graphics.h[d].removeEventListener("mouseOut",
m(this,this.onOut)));this._graphics.h[d].kill();var f=this._graphics;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._graphics=null},toObject:function(){return{id:this.id,elem:this.elem}},setText:function(a){if(this._text==null)return!1;this._text.set_text(a);return!0},setMapFrame:function(a){return this._smap==null?!1:this._smap.setFrame(a)},pauseMap:function(){if(this._smap==null)return!1;this._smap.pause();return!0},playMap:function(){if(this._smap==null)return!1;this._smap.play();
return!0},onClick:function(a){this.onOut(a);a=a.target;if(a.extraInfo.length>0){var b=p.mvActions,c=p.parser.parseString(a.extraInfo[0]);if(Object.prototype.hasOwnProperty.call(b.h,c)){var d=p.parser;b=p.mvActions;c=p.parser.parseString(a.extraInfo[0]);d.run(b.h[c])}}},onOver:function(a){a=a.target;p.cursorVisible&&p.mdata.highlight!=""&&a.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)])},onOut:function(a){a.target.set_filters([])},__class__:K});var P=function(){this._rows=[];this._closeac=
null;this.sound="";this.mode="a";this.horizontal=this.vertical=this.close="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;Da.call(this);var a=new la(m(this,this.draw));this._rows.push(a);a=new la(m(this,this.draw));this._rows.push(a);a=new la(m(this,this.draw));this._rows.push(a)};t["com.tilbuci.contraptions.InventoryContraption"]=P;P.__name__="com.tilbuci.contraptions.InventoryContraption";P.__super__=Da;P.prototype=I(Da.prototype,{ok:null,id:null,font:null,fontcolor:null,
fontsize:null,horizontal:null,vertical:null,close:null,mode:null,sound:null,_hbitmap:null,_vbitmap:null,_cbitmap:null,_closeac:null,_rows:null,create:function(a){this.removeChildren();this._cbitmap.set_visible(!0);this._hbitmap.set_visible(this._vbitmap.set_visible(!1));if(this.ok){p.area.get_pOrientation()=="horizontal"?(this.addChild(this._hbitmap),this._hbitmap.set_x(this._hbitmap.set_y(0)),this._hbitmap.set_width(p.mdata.screen.big),this._hbitmap.set_height(p.mdata.screen.small),this._cbitmap.set_x(this._hbitmap.get_width()-
this._cbitmap.get_width()),this._hbitmap.set_visible(!0)):(this.addChild(this._vbitmap),this._vbitmap.set_x(this._vbitmap.set_y(0)),this._vbitmap.set_width(p.mdata.screen.small),this._vbitmap.set_height(p.mdata.screen.big),this._cbitmap.set_x(this._vbitmap.get_width()-this._cbitmap.get_width()),this._vbitmap.set_visible(!0));for(var b=0,c=this._rows;b<c.length;){var d=c[b];++b;this.addChild(d)}this._cbitmap.set_y(0);this.addChild(this._cbitmap);this._closeac=a}return this},draw:function(){for(var a=
0,b=this._rows;a<b.length;){var c=b[a];++a;c.setText(this.font,this.fontsize,Ga.colorInt(this.fontcolor))}this._rows[0].setData(p.narrative.keyItems);a=[];b=[];c=[];var d=[];p.narrative.consItNames.length>0&&(p.narrative.consItNames.length>0&&(a.push(p.narrative.consItNames[0]),b.push(p.narrative.consItAmounts[0])),p.narrative.consItNames.length>1&&(a.push(p.narrative.consItNames[1]),b.push(p.narrative.consItAmounts[1])),p.narrative.consItNames.length>2&&(a.push(p.narrative.consItNames[2]),b.push(p.narrative.consItAmounts[2])),
p.narrative.consItNames.length>3&&(a.push(p.narrative.consItNames[3]),b.push(p.narrative.consItAmounts[3])));p.narrative.consItNames.length>4&&(p.narrative.consItNames.length>4&&(c.push(p.narrative.consItNames[4]),d.push(p.narrative.consItAmounts[4])),p.narrative.consItNames.length>5&&(c.push(p.narrative.consItNames[5]),d.push(p.narrative.consItAmounts[5])),p.narrative.consItNames.length>6&&(c.push(p.narrative.consItNames[6]),d.push(p.narrative.consItAmounts[6])),p.narrative.consItNames.length>7&&
(c.push(p.narrative.consItNames[7]),d.push(p.narrative.consItAmounts[7])));this._rows[1].setData(a,b);this._rows[2].setData(c,d);if(this._hbitmap.get_visible()){d=this._hbitmap.get_width()-2*this._cbitmap.get_width();var f=this._hbitmap.get_height()-2*this._cbitmap.get_height();var g=f/5;if(this.mode=="k")this._rows[0].set_x(this._cbitmap.get_width()),this._rows[0].set_y(this._cbitmap.get_height()+g*2),this._rows[0].draw("h",d,g),this._rows[1].set_visible(this._rows[2].set_visible(!1));else if(this.mode==
"c")this._rows[1].set_x(this._rows[2].set_x(this._cbitmap.get_width())),this._rows[1].set_y(this._cbitmap.get_height()+g),this._rows[2].set_y(this._cbitmap.get_height()+g*3),this._rows[1].draw("h",d,g),this._rows[2].draw("h",d,g),this._rows[0].set_visible(!1);else for(a=0,b=this._rows.length;a<b;)c=a++,this._rows[c].set_x(this._cbitmap.get_width()),this._rows[c].set_y(this._cbitmap.get_height()+c*g*2),this._rows[c].draw("h",d,g)}else if(d=this._vbitmap.get_width()-2*this._cbitmap.get_width(),f=this._vbitmap.get_height()-
2*this._cbitmap.get_height(),g=d/5,this.mode=="k")this._rows[0].set_y(this._cbitmap.get_height()),this._rows[0].set_x(this._cbitmap.get_width()+g*2),this._rows[0].draw("v",f,g),this._rows[1].set_visible(this._rows[2].set_visible(!1));else if(this.mode=="c")this._rows[1].set_y(this._rows[2].set_y(this._cbitmap.get_height())),this._rows[1].set_x(this._cbitmap.get_width()+g),this._rows[2].set_x(this._cbitmap.get_width()+g*3),this._rows[1].draw("v",f,g),this._rows[2].draw("v",f,g),this._rows[0].set_visible(!1);
else for(a=0,b=this._rows.length;a<b;)c=a++,this._rows[c].set_y(this._cbitmap.get_height()),this._rows[c].set_x(this._cbitmap.get_width()+c*g*2),this._rows[c].draw("v",f,g)},checkCollision:function(a){var b=!1;if(this.ok)if(b=this._cbitmap.hitTestObject(a))this.onClose();else b||=this._rows[0].checkCollision(a),b||=this._rows[1].checkCollision(a),b||=this._rows[2].checkCollision(a);return b},checkOver:function(a){var b=!1;this.ok&&((b=this._cbitmap.hitTestObject(a))||(b=this._rows[0].checkOver(a)),
b||=this._rows[1].checkOver(a),b||=this._rows[2].checkOver(a));return b},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new P;a.load({id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,mode:this.mode,sound:this.sound});return a},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=y.field(a,"id");Object.prototype.hasOwnProperty.call(a,
"font")?this.font=y.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=y.field(a,"fontcolor"):this.fontcolor="0xffffff";Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=y.field(a,"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=y.field(a,"vertical"):this.vertical="";Object.prototype.hasOwnProperty.call(a,"horizontal")?this.horizontal=y.field(a,"horizontal"):this.horizontal="";Object.prototype.hasOwnProperty.call(a,
"close")?this.close=y.field(a,"close"):this.close="";Object.prototype.hasOwnProperty.call(a,"mode")?this.mode=y.field(a,"mode"):this.mode="a";Object.prototype.hasOwnProperty.call(a,"sound")?this.sound=y.field(a,"sound"):this.sound="";this.font==null&&(this.font="sans");this.fontcolor==null&&(this.fontcolor="0xffffff");this.fontsize==null&&(this.fontsize=20);this.vertical==null&&(this.vertical="");this.horizontal==null&&(this.horizontal="");this.close==null&&(this.close="");this.mode==null&&(this.mode=
"a");this.sound==null&&(this.sound="");this.fontcolor=Ga.colorHex(this.fontcolor,"#FFFFFF");if(this.horizontal!=""||this.vertical!="")this.horizontal==""&&(this.horizontal=this.vertical),this.vertical==""&&(this.vertical=this.horizontal);this._cbitmap==null&&(this._cbitmap=new ad(m(this,this.onBTLoad)));this.close!=""&&this._cbitmap.load(this.close);return!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.id=this.font=this.fontcolor=this.horizontal=
this.vertical=this.close=this.sound=null;this.parent!=null&&this.parent.removeChild(this);this._cbitmap!=null&&(this._cbitmap.hasEventListener("click")&&(this._cbitmap.removeEventListener("click",m(this,this.onClose)),this._cbitmap.removeEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.removeEventListener("mouseOut",m(this,this.onCloseOut))),this._cbitmap.kill());this._cbitmap=null;this._hbitmap!=null&&this._hbitmap.kill();this._hbitmap=null;this._vbitmap!=null&&this._vbitmap.kill();
for(this._vbitmap=null;this._rows.length>0;)this._rows.shift().kill();this._rows=null},toObject:function(){return{id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,mode:this.mode,sound:this.sound}},invClose:function(){this.onCloseOut(null);this.removeChildren();this._closeac!=null&&(p.parser.run(this._closeac,!0),this._closeac=null)},onBTLoad:function(a){if(this.ok=a)this._hbitmap==null&&(this._hbitmap=new ad(m(this,
this.onBgLoad))),this._hbitmap.load(this.horizontal),this._vbitmap==null&&(this._vbitmap=new ad(m(this,this.onBgLoad))),this._vbitmap.load(this.vertical),this._cbitmap.addEventListener("click",m(this,this.onClose)),this._cbitmap.addEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.addEventListener("mouseOut",m(this,this.onCloseOut))},onBgLoad:function(a){a||(this.ok=!1)},onClose:function(a){p.parser.run('[ { "ac": "inventory.close", "param": [ ] } ]')},onCloseOver:function(a){p.cursorVisible&&
(p.mode=="editor"||p.mdata.highlightInt==null||p.isMobile()||this._cbitmap.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onCloseOut:function(a){this._cbitmap.set_filters([])},__class__:P});var la=function(a){this._draw=null;this._size=0;this._texts=[];this.boxes=[];Da.call(this);this.set_visible(!1);this._draw=a;a=new ad(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",
m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);this.addChild(a);this._texts.push(a);a=new ad(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);this.addChild(a);this._texts.push(a);a=new ad(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",
m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);this.addChild(a);this._texts.push(a);a=new ad(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);
this.addChild(a);this._texts.push(a)};t["com.tilbuci.contraptions.InvItemRow"]=la;la.__name__="com.tilbuci.contraptions.InvItemRow";la.__super__=Da;la.prototype=I(Da.prototype,{boxes:null,_texts:null,_size:null,_draw:null,setData:function(a,b){this.set_visible(!1);b==null&&(b=[0,0,0,0]);for(var c=0,d=this.boxes.length;c<d;){var f=c++;this.boxes[f].set_visible(!1);this.boxes[f].extraInfo[0]="";this.boxes[f].extraInfo[1]=f==null?"null":""+f;this.boxes[f].unload();this._texts[f].set_visible(!1);this._texts[f].set_text("")}c=
0;for(d=a.length;c<d;)f=c++,f<4&&Object.prototype.hasOwnProperty.call(p.narrative.items.h,a[f])&&(this.boxes[f].extraInfo[0]=a[f],this.boxes[f].load(p.narrative.items.h[a[f]].itgraphic),b[f]!=0&&this._texts[f].set_text(H.string(b[f])))},draw:function(a,b,c){this._size=c;b/=9;c=0;for(var d=this.boxes.length;c<d;){var f=c++;this.boxes[f].set_width(this.boxes[f].set_height(this._size));a=="h"?(this.boxes[f].set_y(0),this.boxes[f].set_x(b+f*2*b)):(this.boxes[f].set_x(0),this.boxes[f].set_y(b+f*2*b))}},
onBox:function(a){a=0;for(var b=this.boxes.length;a<b;){var c=a++;this.boxes[c].set_visible(this.boxes[c].get_mediaLoaded());this.boxes[c].get_mediaLoaded()&&(this.set_visible(!0),this.boxes[c].set_width(this.boxes[c].set_height(this._size)),this._texts[c].get_text()!=""&&(this._texts[c].set_width(this._size),this._texts[c].set_x(this.boxes[c].get_x()),this._texts[c].set_y(this.boxes[c].get_y()+this._size+5),this._texts[c].set_visible(!0)))}},kill:function(){for(this.removeChildren();this.boxes.length>
0;)this.boxes[0].removeEventListener("click",m(this,this.onBoxClick)),this.boxes[0].removeEventListener("mouseOver",m(this,this.onBoxOver)),this.boxes[0].removeEventListener("mouseOut",m(this,this.onBoxOut)),this.boxes.shift().kill();for(this.boxes=null;this._texts.length>0;)this._texts.shift();this._draw=this._texts=null},setText:function(a,b,c){for(var d=0,f=this._texts;d<f.length;){var g=f[d];++d;g.set_defaultTextFormat(new ef(a,b,c,null,null,null,null,null,Nk.fromString("center")))}},checkCollision:function(a){for(var b=
!1,c=0,d=this.boxes;c<d.length;){var f=d[c];++c;if(!b&&f.get_visible()&&f.hitTestObject(a)&&Object.prototype.hasOwnProperty.call(p.narrative.items.h,f.extraInfo[0])&&p.narrative.items.h[f.extraInfo[0]].itaction!=""){b=!0;var g=p.narrative.items.h[f.extraInfo[0]].itaction;this._texts[H.parseInt(f.extraInfo[1])].get_text()!=""&&(p.narrative.consumeItem(f.extraInfo[0]),this._draw());Ki.quickJump(f,.3,5);p.contraptions.inv.h.inv.sound!=""&&p.contraptions.soundPlay(p.parser.parseString(p.contraptions.inv.h.inv.sound));
p.parser.run(g)}}return b},checkOver:function(a){for(var b=!1,c=0,d=this.boxes;c<d.length;){var f=d[c];++c;!b&&f.get_visible()&&f.hitTestObject(a)&&Object.prototype.hasOwnProperty.call(p.narrative.items.h,f.extraInfo[0])&&p.narrative.items.h[f.extraInfo[0]].itaction!=""&&(b=!0)}return b},onBoxClick:function(a){a=a.target;if(Object.prototype.hasOwnProperty.call(p.narrative.items.h,a.extraInfo[0])&&p.narrative.items.h[a.extraInfo[0]].itaction!=""){var b=p.narrative.items.h[a.extraInfo[0]].itaction;
this._texts[H.parseInt(a.extraInfo[1])].get_text()!=""&&(p.narrative.consumeItem(a.extraInfo[0]),this._draw());Ki.quickJump(a,.3,5);p.contraptions.inv.h.inv.sound!=""&&p.contraptions.soundPlay(p.parser.parseString(p.contraptions.inv.h.inv.sound));p.parser.run(b)}},onBoxOver:function(a){p.cursorVisible&&p.mode!="editor"&&p.mdata.highlightInt!=null&&!p.isMobile()&&(a=a.target,Object.prototype.hasOwnProperty.call(p.narrative.items.h,a.extraInfo[0])&&p.narrative.items.h[a.extraInfo[0]].itaction!=""&&
a.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onBoxOut:function(a){a.target.set_filters([])},__class__:la});var na=function(){this._buttons=[];this.bgalpha=0;this.bgcolor="0x000000";this.background=this.buton="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.mode="v";this.ok=!1;Da.call(this)};t["com.tilbuci.contraptions.MenuContraption"]=na;na.__name__="com.tilbuci.contraptions.MenuContraption";na.__super__=Da;na.prototype=I(Da.prototype,{ok:null,id:null,mode:null,
font:null,fontcolor:null,fontsize:null,background:null,buton:null,bgcolor:null,bgalpha:null,_bgbitmap:null,_btbitmap:null,_btsize:null,_buttons:null,_ac:null,create:function(a,b){if(this.ok){this.removeChildren();this._bgbitmap.set_visible(!0);for(this.addChild(this._bgbitmap);this._buttons.length>0;)this._buttons.shift().kill();for(var c=0,d=a.length;c<d;){var f=c++;this._buttons.push(new Ij(H.string(f+1),m(this,this.onClick),this.buton,a[f],this.font,this.fontsize,Ga.colorInt(this.fontcolor)))}a=
(this._bgbitmap.oWidth-this._btsize.x)/2;var g=(this._bgbitmap.oHeight-this._btsize.y*this._buttons.length)/(this._buttons.length+1);g<0&&(g=5);c=0;for(d=this._buttons.length;c<d;)f=c++,this._buttons[f].set_x(a),this._buttons[f].set_y((f+1)*g+f*this._btsize.y),this.addChild(this._buttons[f]);this._ac=b}return this},checkCollision:function(a){var b=!1;if(this.ok)for(var c=0,d=this._buttons;c<d.length;){var f=d[c];++c;f!=null&&a.hitTestObject(f)&&(b=!0,this._ac(f.value))}return b},remove:function(){this.removeChildren();
for(this._ac=null;this._buttons.length>0;)this._buttons.shift().kill();this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new na;a.load({id:this.id,mode:this.mode,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,buton:this.buton,bgcolor:this.bgcolor,bgalpha:this.bgalpha});return a},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")?(this.id=y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"font")?this.font=
y.field(a,"font"):this.font="sans",Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=y.field(a,"fontcolor"):this.fontcolor="0xffffff",Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=y.field(a,"fontsize"):this.fontsize=20,Object.prototype.hasOwnProperty.call(a,"background")?this.background=y.field(a,"background"):this.background="",Object.prototype.hasOwnProperty.call(a,"buton")?this.buton=y.field(a,"buton"):this.buton="",Object.prototype.hasOwnProperty.call(a,"bgcolor")?
this.bgcolor=y.field(a,"bgcolor"):this.bgcolor="0x000000",Object.prototype.hasOwnProperty.call(a,"bgalpha")?this.bgalpha=y.field(a,"bgalpha"):this.bgalpha=0,Object.prototype.hasOwnProperty.call(a,"mode")?this.mode=y.field(a,"mode"):this.mode="v",this.font==null&&(this.font="sans"),this.fontcolor==null&&(this.fontcolor="0xffffff"),this.fontsize==null&&(this.fontsize=20),this.background==null&&(this.background=""),this.buton==null&&(this.buton=""),this.bgcolor==null&&(this.bgcolor="0x000000"),this.bgalpha==
null&&(this.bgalpha=0),this.mode==null&&(this.mode="v"),this.fontcolor=Ga.colorHex(this.fontcolor,"#FFFFFF"),this.bgcolor=Ga.colorHex(this.bgcolor,"#000000"),this._bgbitmap==null&&(this._bgbitmap=new ad(m(this,this.onBGLoad))),this._bgbitmap.load(this.background),!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.id=this.font=this.fontcolor=this.background=this.buton=this.bgcolor=this.mode=null;this._bgbitmap!=null&&(this._bgbitmap.kill(),this._bgbitmap=
null);for(this._ac=null;this._buttons.length>0;)this._buttons.shift().kill();this._buttons=null;this.parent!=null&&this.parent.removeChild(this)},toObject:function(){return{id:this.id,mode:this.mode,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,buton:this.buton,bgcolor:this.bgcolor,bgalpha:this.bgalpha}},onBGLoad:function(a){a&&(this._btbitmap==null&&(this._btbitmap=new ad(m(this,this.onBTLoad))),this._btbitmap.load(this.buton))},onBTLoad:function(a){if(this.ok=
a)this._btsize=new Ea(this._btbitmap.oWidth,this._btbitmap.oHeight)},onClick:function(a){this._ac(a)},__class__:na});var ca=function(){this._buttons=[];this._btbitmap=[null,null,null];this._bgbitmap=null;this.gap=10;this.buton=["","",""];this.background="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;Da.call(this)};t["com.tilbuci.contraptions.MessagesContraption"]=ca;ca.__name__="com.tilbuci.contraptions.MessagesContraption";ca.__super__=Da;ca.prototype=I(Da.prototype,{ok:null,
id:null,font:null,fontcolor:null,fontsize:null,background:null,buton:null,gap:null,_bgbitmap:null,_btbitmap:null,_buttons:null,_text:null,_ac:null,create:function(a,b,c){if(this.ok){this.removeChildren();this._bgbitmap.set_visible(!0);this.addChild(this._bgbitmap);De.trace("adicionar texto",{fileName:"Source/com/tilbuci/contraptions/MessagesContraption.hx",lineNumber:58,className:"com.tilbuci.contraptions.MessagesContraption",methodName:"create",customParams:[a]});this._text=new Jc;this._text.set_width(this._bgbitmap.get_width()-
this.gap*2);this._text.set_height(this._bgbitmap.get_height()-this.gap*2);this._text.set_x(this._text.set_y(this.gap));this._text.set_defaultTextFormat(new ef(this.font,this.fontsize,Ga.colorInt(this.fontcolor),null,null,null,null,null,0));this._text.set_multiline(!0);this._text.set_wordWrap(!0);this._text.set_text(a);this._text.set_visible(!0);this._text.set_selectable(!1);for(this.addChild(this._text);b.length>3;)b.pop();for(;this._buttons.length>0;)this._buttons.shift().kill();a=0;for(var d=b.length;a<
d;){var f=a++,g=new Ij(f==null?"null":""+f,m(this,this.onClick),this.buton[f],b[f],this.font,this.fontsize,Ga.colorInt(this.fontcolor));g.set_x((this._bgbitmap.get_width()-this._btbitmap[f].get_width())/2);f==0?(g.set_y(this._bgbitmap.get_height()-this.gap-this._btbitmap[0].get_height()),f=this._text,f.set_height(f.get_height()-(this.gap+this._btbitmap[0].get_height()))):f==1?(g.set_y(this._bgbitmap.get_height()-this.gap-this._btbitmap[0].get_height()-this.gap-this._btbitmap[1].get_height()),f=this._text,
f.set_height(f.get_height()-(this.gap+this._btbitmap[1].get_height()))):f==2&&(g.set_y(this._bgbitmap.get_height()-this.gap-this._btbitmap[0].get_height()-this.gap-this._btbitmap[1].get_height()-this.gap-this._btbitmap[2].get_height()),f=this._text,f.set_height(f.get_height()-(this.gap+this._btbitmap[2].get_height())));this._buttons.push(g);this.addChild(g)}this._ac=c}return this},checkCollision:function(a){var b=!1;if(this.ok)for(var c=0,d=this._buttons;c<d.length;){var f=d[c];++c;f!=null&&a.hitTestObject(f)&&
(b=!0,this._ac(f.value))}return b},remove:function(){this.removeChildren();for(this._ac=this._text=null;this._buttons.length>0;)this._buttons.shift().kill();this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new ca;a.load({id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,gap:this.gap,buton0:this.buton[0],buton1:this.buton[1],buton2:this.buton[2]});return a},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,
"id")){this.id=y.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=y.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=y.field(a,"fontcolor"):this.fontcolor="0xffffff";Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=y.field(a,"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"gap")?this.gap=y.field(a,"gap"):this.gap=10;Object.prototype.hasOwnProperty.call(a,"background")?this.background=y.field(a,
"background"):this.background="";Object.prototype.hasOwnProperty.call(a,"buton0")&&Object.prototype.hasOwnProperty.call(a,"buton1")&&Object.prototype.hasOwnProperty.call(a,"buton2")?this.buton=[y.field(a,"buton0"),y.field(a,"buton1"),y.field(a,"buton2")]:this.buton=["","",""];this.font==null&&(this.font="sans");this.fontcolor==null&&(this.fontcolor="0xffffff");this.fontsize==null&&(this.fontsize=20);this.gap==null&&(this.gap=10);this.background==null&&(this.background="");this.buton==null&&(this.buton=
["","",""]);a=0;for(var b=this.buton.length;a<b;){var c=a++;this.buton[c]==null&&(this.buton[c]="")}this.buton[1]==""&&(this.buton[1]=this.buton[0]);this.buton[2]==""&&(this.buton[2]=this.buton[0]);this.fontcolor=Ga.colorHex(this.fontcolor,"#FFFFFF");this._bgbitmap==null&&(this._bgbitmap=new ad(m(this,this.onBGLoad)));this._bgbitmap.load(this.background);return!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=this.font=this.fontcolor=this.background=
null;this.buton.length>0;)this.buton.shift();this.buton=null;this._bgbitmap.kill();for(this._bgbitmap=null;this._btbitmap.length>0;)this._btbitmap.shift().kill();for(this._ac=this._btbitmap=null;this._buttons.length>0;)this._buttons.shift().kill();this._buttons=null;this.parent!=null&&this.parent.removeChild(this)},toObject:function(){return{id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,gap:this.gap,buton0:this.buton[0],buton1:this.buton[1],buton2:this.buton[2]}},
onBGLoad:function(a){a?(this._btbitmap[0]==null&&(this._btbitmap[0]=new ad(m(this,this.onBTLoad0))),this._btbitmap[0].load(this.buton[0])):this.ok=!1},onBTLoad0:function(a){a&&(this._btbitmap[0].set_width(this._btbitmap[0].oWidth),this._btbitmap[0].set_height(this._btbitmap[0].oHeight),this.ok=!0,this._btbitmap[1]==null&&(this._btbitmap[1]=new ad(m(this,this.onBTLoad1))),this._btbitmap[2]==null&&(this._btbitmap[2]=new ad(m(this,this.onBTLoad2))),this._btbitmap[1].load(this.buton[1]),this._btbitmap[2].load(this.buton[2]))},
onBTLoad1:function(a){a?(this._btbitmap[1].set_width(this._btbitmap[1].oWidth),this._btbitmap[1].set_height(this._btbitmap[1].oHeight)):this.ok=!1},onBTLoad2:function(a){a?(this._btbitmap[2].set_width(this._btbitmap[2].oWidth),this._btbitmap[2].set_height(this._btbitmap[2].oHeight)):this.ok=!1},onClick:function(a){this._ac(a)},__class__:ca});var Xa=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.MusicContraption"]=Xa;Xa.__name__="com.tilbuci.contraptions.MusicContraption";
Xa.__super__=Da;Xa.prototype=I(Da.prototype,{ok:null,id:null,media:null,_music:null,clone:function(){return new Xa(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"media"))?(this.media=y.field(a,"media"),this.media==null&&(this.media=""),this._music=new de(m(this,this.onLoad),m(this,this.onEnd)),this.ok=!0):!1},kill:function(){this._music!=null&&(this._music.stop(),this._music.kill());
this.media=null},toObject:function(){return{id:this.id,media:this.media}},play:function(){this._music!=null&&(this._music.get_lastMedia()!=this.media?this._music.load(this.media):this._music.play())},pause:function(){this._music!=null&&this._music.pause()},stop:function(){this._music!=null&&this._music.stop()},volume:function(a){a>100?a=100:a<0&&(a=0);this._music!=null&&this._music.iterateSound(a/100)},onLoad:function(a){this._music.play()},onEnd:function(){this._music.play()},__class__:Xa});var cb=
function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.SoundContraption"]=cb;cb.__name__="com.tilbuci.contraptions.SoundContraption";cb.__super__=Da;cb.prototype=I(Da.prototype,{ok:null,id:null,media:null,_sound:null,clone:function(){return new cb(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"media"))?(this.media=y.field(a,"media"),this.media==null&&
(this.media=""),this._sound=new de(m(this,this.onLoad),m(this,this.onEnd)),this.ok=!0):!1},kill:function(){this._sound!=null&&(this._sound.stop(),this._sound.kill());this.media=null},toObject:function(){return{id:this.id,media:this.media}},play:function(){this._sound!=null&&(this._sound.get_lastMedia()!=this.media?this._sound.load(this.media):this._sound.play())},pause:function(){this._sound!=null&&this._sound.pause()},stop:function(){this._sound!=null&&this._sound.stop()},volume:function(a){a>100?
a=100:a<0&&(a=0);this._sound!=null&&this._sound.iterateSound(a/100)},onLoad:function(a){this._sound.play()},onEnd:function(){},__class__:cb});var $a=function(a){this.id=this.defaultp=this.menus=this.interf=this.inst1=this.inst1name=this.inst2=this.inst2name=this.inst3=this.inst3name="";this.ok=!1;a!=null&&this.load(a)};t["com.tilbuci.contraptions.TargetContraption"]=$a;$a.__name__="com.tilbuci.contraptions.TargetContraption";$a.prototype={ok:null,id:null,defaultp:null,menus:null,interf:null,inst1:null,
inst1name:null,inst2:null,inst2name:null,inst3:null,inst3name:null,clone:function(){return new $a(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=y.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"defaultp"))?(this.defaultp=y.field(a,"defaultp"),Object.prototype.hasOwnProperty.call(a,"menus")&&(this.menus=y.field(a,"menus")),Object.prototype.hasOwnProperty.call(a,"interf")&&(this.interf=y.field(a,"interf")),Object.prototype.hasOwnProperty.call(a,
"inst1")&&(this.inst1=y.field(a,"inst1")),Object.prototype.hasOwnProperty.call(a,"inst1name")&&(this.inst1name=y.field(a,"inst1name")),Object.prototype.hasOwnProperty.call(a,"inst2")&&(this.inst2=y.field(a,"inst2")),Object.prototype.hasOwnProperty.call(a,"inst2name")&&(this.inst2name=y.field(a,"inst2name")),Object.prototype.hasOwnProperty.call(a,"inst3")&&(this.inst3=y.field(a,"inst3")),Object.prototype.hasOwnProperty.call(a,"inst3name")&&(this.inst3name=y.field(a,"inst3name")),this.menus==null&&
(this.menus=""),this.interf==null&&(this.interf=""),this.inst1==null&&(this.inst1=""),this.inst1name==null&&(this.inst1name=""),this.inst2==null&&(this.inst2=""),this.inst2name==null&&(this.inst2name=""),this.inst3==null&&(this.inst3=""),this.inst3name==null&&(this.inst3name=""),this.ok=!0):!1},kill:function(){this.ok=!1;this.inst3name=this.inst3=this.inst2name=this.inst2=this.inst1name=this.inst1=this.interf=this.menus=this.defaultp=this.id=null},toObject:function(){return{id:this.id,defaultp:this.defaultp,
menus:this.menus,interf:this.interf,inst1:this.inst1,inst1name:this.inst1name,inst2:this.inst2,inst2name:this.inst2name,inst3:this.inst3,inst3name:this.inst3name}},__class__:$a};var Gb=function(a){a==null&&(a=!0);this._thanks=[];this._languages=new G;this._version=this._build="";if(a){if(a=Z.getText("buildInfo"),a=Ga.jsonParse(a),a!=0){this._version=y.field(a,"version");this._build=y.field(a,"build");for(var b=0,c=y.fields(y.field(a,"languages"));b<c.length;){var d=c[b];++b;var f=y.field(y.field(a,
"languages"),d);this._languages.h[d]=f}b=0;for(c=y.fields(y.field(a,"thanks"));b<c.length;)d=c[b],++b,this._thanks.push(y.field(y.field(a,"thanks"),d));De.trace("Tilbuci player "+this._version+" build "+this._build+".",{fileName:"Source/com/tilbuci/data/BuildInfo.hx",lineNumber:61,className:"com.tilbuci.data.BuildInfo",methodName:"new"})}}else this._build=this._version="custom"};t["com.tilbuci.data.BuildInfo"]=Gb;Gb.__name__="com.tilbuci.data.BuildInfo";Gb.prototype={version:null,get_version:function(){return this._version},
_version:null,build:null,get_build:function(){return this._build},_build:null,languages:null,get_languages:function(){return this._languages},_languages:null,thanks:null,get_thanks:function(){return this._thanks},_thanks:null,__class__:Gb,__properties__:{get_thanks:"get_thanks",get_languages:"get_languages",get_build:"get_build",get_version:"get_version"}};var Ib=function(){this._has=!1;this._instances=new G;this._collections=new G};t["com.tilbuci.data.CopyData"]=Ib;Ib.__name__="com.tilbuci.data.CopyData";
Ib.prototype={_collections:null,_instances:null,_has:null,updateDisplay:null,hasCopy:function(){return this._has},clear:function(){var a=this._collections.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._collections;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._instances.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._instances,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._has=!1},addCollection:function(a){return Object.prototype.hasOwnProperty.call(p.movie.collections.h,
a)?(this._collections.h[a]=p.movie.collections.h[a],!0):!1},addInstance:function(a,b){this._instances.h[a]=b;this._has=!0},broadcast:function(){if(this._has){for(var a=new G,b=this._collections.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=c[f++];b=this._collections.h[g].toJson();a.h[g]=b}var h=new G;b=this._instances.h;c=Object.keys(b);d=c.length;for(f=0;f<d;)g=c[f++],b=this._instances.h[g].toJson(),h.h[g]=b;c=new G;b=p.movie.get_mvId();c.h.movie=b;b=p.movie.get_scId();c.h.scene=b;c.h.collections=
a;c.h.instances=h;window.TBB_sendTabsMessage("copy",Ga.jsonStringify(c));this.receiveMessage(Ga.jsonStringify(c))}},receiveMessage:function(a){a=Ga.jsonAsMap(a);if(Object.prototype.hasOwnProperty.call(a.h,"movie")&&Object.prototype.hasOwnProperty.call(a.h,"collections")&&Object.prototype.hasOwnProperty.call(a.h,"instances")&&a.h.movie==p.movie.get_mvId()){this.clear();for(var b=0,c=y.fields(a.h.collections);b<c.length;){var d=c[b];++b;var f=new xg(d,null,!1);f.fromJson(y.field(a.h.collections,d))&&
(this._collections.h[d]=f)}b=0;for(c=y.fields(a.h.instances);b<c.length;)d=c[b],++b,f=new ii(Ga.jsonParse(y.field(a.h.instances,d))),f.ok&&Object.prototype.hasOwnProperty.call(this._collections.h,f.collection)&&(this._instances.h[d]=f,this._has=!0);this.updateDisplay!=null&&this.updateDisplay()}},pasteInstances:function(){if(this._has){var a=this._collections.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._collections.h[d];p.movie.collections.h[d]=f}a=this._instances.h;a=Object.keys(a);
b=a.length;for(c=0;c<b;){d=a[c++];var g=p.movie.scene.keyframes[p.area.get_currentKf()];f=this._instances.h[d];g.h[d]=f}p.area.updateOrder();p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf())}},__class__:Ib};var Ob=function(a,b,c,d,f,g,h,n,l,q,u,v){v==null&&(v=0);f==null&&(f=0);c==null&&(c="POST");a==null&&(a=!1);this.binary=this.rawtext=this.json=this.map=this.extra=null;this.url="";this._mode=0;qa.call(this);this._loader=new Jj;this._loader.addEventListener("complete",
m(this,this.onLoaderComplete));this._loader.addEventListener("ioError",m(this,this.onLoaderIOError));this._loader.addEventListener("securityError",m(this,this.onLoaderSecurityError));this._loader.addEventListener("progress",m(this,this.onLoaderProgress));this._single=a;b!=null&&this.load(b,c,d,f,g,h,n,l,q,u,v)};t["com.tilbuci.data.DataLoader"]=Ob;Ob.__name__="com.tilbuci.data.DataLoader";Ob.__super__=qa;Ob.prototype=I(qa.prototype,{_loader:null,_ac:null,_end:null,_pr:null,_single:null,_mode:null,
url:null,binary:null,rawtext:null,json:null,map:null,extra:null,setAction:function(a){this._ac=a},load:function(a,b,c,d,f,g,h,n,l,q,u){u==null&&(u=0);d==null&&(d=0);b==null&&(b="POST");switch(d){case 1:this._mode=1;this._loader.dataFormat=1;break;case 3:this._mode=3;this._loader.dataFormat=1;break;case 4:this._mode=4;this._loader.dataFormat=1;break;case 5:this._mode=5;this._loader.dataFormat=0;break;case 6:this._mode=6;this._loader.dataFormat=0;break;default:this._mode=0,this._loader.dataFormat=0}this._end=
l;this._ac=f;this._pr=g;this.extra=q;d=vn._new();if(c!=null)for(f=Object.keys(c.h),g=f.length,h=0;h<g;)n=f[h++],d[n]=c.h[n];c=new se(a);c.data=d;c.method=b;u>0&&(c.idleTimeout=u);this.url=a;this._loader.load(c)},cancel:function(){if(this._loader!=null){try{this._loader.close()}catch(a){}this._end!=null&&this._end();this._single&&this.kill()}},kill:function(){this._loader.removeEventListener("complete",m(this,this.onLoaderComplete));this._loader.removeEventListener("ioError",m(this,this.onLoaderIOError));
this._loader.removeEventListener("securityError",m(this,this.onLoaderSecurityError));this._loader.removeEventListener("progress",m(this,this.onLoaderProgress));try{this._loader.close()}catch(a){}this.extra=this._end=this.url=this.map=this.json=this.rawtext=this.binary=this._pr=this._ac=this._loader=null},finalText:function(a){return Ob.customDecrypt!=null?Ob.customDecrypt(a):V.substr(a,0,2)=="TB"&&V.substr(a,-10,1)=="b"?Ga.decrypt(a,Ga.md5(p.loadingMovie+V.substr(p.loadingMovie,2,null)).toLowerCase()):
a},onLoaderComplete:function(a){this.map=this.json=this.rawtext=this.binary=null;var b=!1;switch(this._mode){case 1:this.rawtext=this.finalText(this._loader.data);b=!0;break;case 3:this.rawtext=this.finalText(this._loader.data);b=Ga.jsonParse(this.rawtext);b==0?(b=!1,this.rawtext=null):(this.json=b,b=!0);break;case 4:this.rawtext=this.finalText(this._loader.data);b=Ga.jsonParse(this.rawtext);if(b==0)b=!1,this.rawtext=null;else{this.json=b;this.map=new G;for(var c=0,d=y.fields(b);c<d.length;){var f=
d[c];++c;var g=y.field(b,f);this.map.h[f]=g}b=!0}break;case 5:this.binary=this._loader.data;this.rawtext=this.finalText(Li.encode(mc.toBytes(this.binary)));break;case 6:this.binary=this._loader.data;this.rawtext=this.finalText(Li.encode(mc.toBytes(this.binary)));b=Ga.jsonParse(this.rawtext);if(b==0)b=!1,this.binary=this.rawtext=null;else{this.json=b;this.map=new G;c=0;for(d=y.fields(b);c<d.length;)f=d[c],++c,g=y.field(b,f),this.map.h[f]=g;b=!0}break;default:this.binary=this._loader.data,b=!0}this._end!=
null&&this._end();this._ac!=null&&(b?this._ac(!0,this):(De.trace("erro ws",{fileName:"Source/com/tilbuci/data/DataLoader.hx",lineNumber:339,className:"com.tilbuci.data.DataLoader",methodName:"onLoaderComplete",customParams:[this._loader.data]}),this._ac(!1,null)));this.dispatchEvent(a);this._single&&this.kill()},onLoaderIOError:function(a){this._end!=null&&this._end();this._ac!=null&&this._ac(!1,null);this.dispatchEvent(a);this._single&&this.kill()},onLoaderSecurityError:function(a){this._end!=null&&
this._end();this._ac!=null&&this._ac(!1,null);this.dispatchEvent(a);this._single&&this.kill()},onLoaderProgress:function(a){this._pr!=null&&this._pr(a.bytesLoaded,a.bytesTotal);this.dispatchEvent(a)},__class__:Ob});var Fb=function(a,b,c){this._dateFile=!0;this._language=[];this._base=this._player=this._ws=this._font="";this._loaded=!1;qa.call(this);var d=null;this._callback=b;c&&(b=new G,b.h.rand=Math.ceil(Math.random()*1E4),d=b);new Ob(!0,a,"GET",d,3,m(this,this.dataLoaded))};t["com.tilbuci.data.EditorConfig"]=
Fb;Fb.__name__="com.tilbuci.data.EditorConfig";Fb.__super__=qa;Fb.prototype=I(qa.prototype,{loaded:null,_loaded:null,get_loaded:function(){return this._loaded},base:null,_base:null,get_base:function(){return this._base},player:null,_player:null,get_player:function(){return this._player},ws:null,_ws:null,get_ws:function(){return this._ws},font:null,_font:null,get_font:function(){return this._font},language:null,_language:null,get_language:function(){return this._language},dateFile:null,_dateFile:null,
get_dateFile:function(){return this._dateFile},_callback:null,kill:function(){this._font=this._base=this._ws=null;if(this._language!=null)for(;this._language.length>0;)this._language.pop();this._callback=this._language=null},dataLoaded:function(a,b){(this._loaded=a)?(Object.prototype.hasOwnProperty.call(b.json,"base")||(this._loaded=!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"player")&&(this._loaded=!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"ws")&&(this._loaded=
!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"font")&&(this._loaded=!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"language")?this._language=[new ji("English","default")]:this._language=b.json.language,this._loaded&&(this._base=Ga.slashURL(b.json.base),this._player=Ga.slashURL(b.json.player),this._ws=Ga.slashURL(b.json.ws),this._font=Ga.slashURL(b.json.font)),this._callback(this._loaded)):this._callback(!1);this._callback=null},__class__:Fb,__properties__:{get_dateFile:"get_dateFile",
get_language:"get_language",get_font:"get_font",get_ws:"get_ws",get_player:"get_player",get_base:"get_base",get_loaded:"get_loaded"}});var Vc=function(a){this._uploadType=this._externName="";this._extra=new G;qa.call(this);this._ref=new So;this._ref.addEventListener("select",m(this,this.onFileSelect));this._ref.addEventListener("cancel",m(this,this.onFileCancel));this._ref.addEventListener("complete",m(this,this.onLoadComplete));this._ref.addEventListener("ioError",m(this,this.onLoadIOError));this._stage=
a;this._interface=new Uc;a=new uf;a.setPadding(10);a.set_gap(20);a.set_verticalAlign(hc.TOP);a.set_horizontalAlign(Wb.LEFT);this._interface.set_backgroundSkin(new rh(3684408));this._interface.set_layout(a);this._interface.set_width(500);this._interface.set_height(180);a=new Mi;a.set_text(k.ln.get("uploader-title"));this._interface.set_header(a);this._fname=new ia;this._fname.set_text("");this._fname.set_wordWrap(!1);this._fname.set_width(this._interface.get_width()-30);this._interface.addChild(this._fname);
this._bar=new qm(0,0,1);this._bar.set_width(this._interface.get_width()-30);this._interface.addChild(this._bar);this._bt=new Xb;this._bt.set_text(k.ln.get("default-cancel"));this._bt.addEventListener("trigger",m(this,this.onCancel));this._bt.set_width(this._interface.get_width()-30);this._interface.addChild(this._bt);this._localLoad=new So;this._localLoad.addEventListener("select",m(this,this.onLocalLoaded));this._localLoad.addEventListener("complete",m(this,this.onLocalComplete));this._localLoad.addEventListener("ioError",
m(this,this.onLocalError));this._localLoad.addEventListener("securityError",m(this,this.onLocalError))};t["com.tilbuci.data.FileUpload"]=Vc;Vc.__name__="com.tilbuci.data.FileUpload";Vc.TBU_setFile=Sa.TBU_setFile=function(a,b,c,d){k.up.onFileSelectExtern(a)};Vc.TBU_setProgress=Sa.TBU_setProgress=function(a,b,c,d){d==null&&(d="");k.up.onProgressExtern(a,b);if(c)k.up.onUploadExtern(!0,d)};Vc.TBU_setFailed=Sa.TBU_setFailed=function(){k.up.onCancelExtern()};Vc.TBU_setAborted=Sa.TBU_setAborted=function(){k.up.onCancelExtern()};
Vc.__super__=qa;Vc.prototype=I(qa.prototype,{_ref:null,_ac:null,_extra:null,_uploadType:null,_stage:null,_interface:null,_fname:null,_bar:null,_bt:null,_loader:null,_localLoad:null,_llComplete:null,_externName:null,selectedName:null,get_selectedName:function(){return this._externName},browseForFont:function(a){this._ac=a;window.TBU_browse(".woff2,.woff");return!0},uploadFont:function(a,b){return Ga.stringContains(this.get_selectedName(),[".woff"])?(this._uploadType="Font",this._ac=a,this._extra=b,
Object.prototype.hasOwnProperty.call(this._extra.h,"movie")?(a="../movie/"+H.string(this._extra.h.movie)+".movie/media/font/",this._extra.h.path=a):this._extra.h.path="../font/",this._fname.set_text(this.get_selectedName()),this._bar.set_minimum(this._bar.set_value(0)),this._bar.set_maximum(100),Aa.addPopUp(this._interface,this._stage),this.sendExtern("File/ExtFont"),!0):!1},browseForMedia:function(a,b){var c="";switch(b){case "audio":c=".mp3,.m4a";k.ln.get("uploader-audioname");break;case "embed":c=
".zip";k.ln.get("uploader-embedname");break;case "html":c=".html,.htm";k.ln.get("uploader-htmlname");break;case "movie":c=".zip";k.ln.get("uploader-moviename");break;case "picture":c=".jpg,.png,.jpeg";k.ln.get("uploader-picturename");break;case "snippets":c=".json";k.ln.get("uploader-stringsname");break;case "spritemap":c=".png";k.ln.get("uploader-spritemapname");break;case "update":c=".zip";k.ln.get("uploader-updatename");break;case "video":c=".mp4,.webm";k.ln.get("uploader-videoname");break;case "zip":c=
".zip",k.ln.get("uploader-mediazip")}return c!=""?(this._ac=a,window.TBU_browse(c),!0):!1},uploadMedia:function(a,b){this._uploadType=b.h.type;this._ac=a;this._extra=b;this._fname.set_text(this.get_selectedName());this._bar.set_minimum(this._bar.set_value(0));this._bar.set_maximum(100);Aa.addPopUp(this._interface,this._stage);this.sendExtern("Media/ExtUpload")},kill:function(){this._ref.removeEventListener("select",m(this,this.onFileSelect));this._ref.removeEventListener("cancel",m(this,this.onFileCancel));
this._ref.removeEventListener("complete",m(this,this.onLoadComplete));this._ref.removeEventListener("ioError",m(this,this.onLoadIOError));this._stage=this._loader=this._extra=this._ac=this._ref=null;this._interface.removeChildren();this._bar=this._fname=this._interface=null;this._bt.removeEventListener("trigger",m(this,this.onCancel));this._bt=null},send:function(a,b){var c=new G,d=this.get_selectedName();c.h.fname=d;c.h.fcontent=b;if(this._extra!=null){d=Object.keys(this._extra.h);b=d.length;for(var f=
0;f<b;){var g=d[f++];c.h[g]=this._extra.h[g]}}d=Ga.jsonStringify(c);b=k.ws.get_url();c=new G;c.h.r=d;d=Ga.md5(k.ws.get_key()+d);c.h.s=d;d=k.ws.get_user();c.h.u=d;c.h.a=a;this._loader=new Ob(!0,b,"POST",c,4,m(this,this.onUpload),m(this,this.onProgress))},sendExtern:function(a){var b=new G,c=this.get_selectedName();b.h.fname=c;if(this._extra!=null){c=Object.keys(this._extra.h);for(var d=c.length,f=0;f<d;){var g=c[f++];b.h[g]=this._extra.h[g]}}b=Ga.jsonStringify(b);window.TBU_upload(a,b,k.ws.get_user(),
Ga.md5(k.ws.get_key()+b),k.ws.get_url())},onUpload:function(a,b){Aa.removePopUp(this._interface);this._loader=null;a?this._ac(!0,b.map):this._ac(!1,null);this._ac=null},onUploadExtern:function(a,b){Aa.removePopUp(this._interface);a?this._ac(!0,Ga.jsonAsMap(b)):this._ac(!1,null);this._ac=null},onProgress:function(a,b){b>0&&(this._bar.set_minimum(0),this._bar.set_value(a),this._bar.set_maximum(b))},onProgressExtern:function(a,b){b>0&&(this._bar.set_minimum(0),this._bar.set_value(a),this._bar.set_maximum(b))},
onCancel:function(a){window.TBU_cancelUpload()},onCancelExtern:function(){this._extra=null;Aa.removePopUp(this._interface);this._ac(!1);this._ac=null},onFileCancel:function(a){this._ac(!1)},onFileSelect:function(a){this._ac(!0)},onFileSelectExtern:function(a){this._externName=a;this._ac(!0)},onLoadComplete:function(a){this.send("File/"+this._uploadType,Li.encode(mc.toBytes(this._ref.data)))},onLoadIOError:function(a){this._uploadType="";this._ac(!1);this._ac=null},selectFile:function(a,b,c){this._llComplete=
a;a=new bw(b,c);this._localLoad.browse([a])},onLocalLoaded:function(a){this._localLoad.load()},onLocalComplete:function(a){this._llComplete(!0,this._localLoad.data)},onLocalError:function(a){this._llComplete(!1)},__class__:Vc,__properties__:{get_selectedName:"get_selectedName"}});var k=function(){};t["com.tilbuci.data.Global"]=k;k.__name__="com.tilbuci.data.Global";k.showActionWindow=function(a,b,c){k.acwindow==null&&(k.acwindow=new Bs,k.acwindow.startInterface());k.acwindow.setContent(a,b,c);Aa.addPopUp(k.acwindow,
k.stage)};k.showNewBlockWindow=function(a){k.acblock==null&&(k.acblock=new Cs,k.acblock.startInterface());k.acInfo.loadInfo();k.acblock.setContent(a);Aa.addPopUp(k.acblock,k.stage)};k.showEditBlockWindow=function(a,b,c,d){c==null&&(c=-1);k.edblock==null&&(k.edblock=new Ds,k.edblock.startInterface());k.edblock.setContent(a,b,c,d);Aa.addPopUp(k.edblock,k.stage)};k.showPopup=function(a,b,c,d,f,g,h,n){n==null&&(n="");h==null&&(h="warn");a=new Bl(a,b,c,d,f,g,h,n);Aa.addPopUp(a,k.stage)};k.evaluate=function(a){k.parser==
null&&(k.parser=new wn);k.interp==null&&(k.interp=new cw);try{var b=k.interp.execute(k.parser.parseString(a))}catch(c){b=null}return b};k.setBrowserAddress=function(a,b){window.TBB_setAddress(a,b);return!0};k.copyText=function(a){var b=!1;try{window.TBB_copyText(a),b=!0}catch(c){De.trace(a,{fileName:"Source/com/tilbuci/data/Global.hx",lineNumber:325,className:"com.tilbuci.data.Global",methodName:"copyText"}),b=!1}return b};var Ea=function(a,b){b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b};t["openfl.geom.Point"]=
Ea;Ea.__name__="openfl.geom.Point";Ea.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Ea.interpolate=function(a,b,c){return new Ea(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Ea.interpolateToOutput=function(a,b,c,d){return d!=null?(d.setTo(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y)),d):new Ea(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Ea.polar=function(a,b){return new Ea(a*Math.cos(b),a*Math.sin(b))};Ea.polarToOutput=function(a,b,c){return c!=null?(c.setTo(a*Math.cos(b),a*Math.sin(b)),c):new Ea(a*Math.cos(b),
a*Math.sin(b))};Ea.prototype={x:null,y:null,add:function(a){return new Ea(a.x+this.x,a.y+this.y)},addToOutput:function(a,b){return b!=null?(b.setTo(a.x+this.x,a.y+this.y),b):new Ea(a.x+this.x,a.y+this.y)},clone:function(){return new Ea(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},equals:function(a){return a!=null&&a.x==this.x?a.y==this.y:!1},normalize:function(a){if(this.x!=0||this.y!=0)a/=Math.sqrt(this.x*this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=a;this.y+=
b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a){return new Ea(this.x-a.x,this.y-a.y)},subtractToOutput:function(a,b){return b!=null?(b.setTo(this.x-a.x,this.y-a.y),b):new Ea(this.x-a.x,this.y-a.y)},toString:function(){return"(x="+this.x+", y="+this.y+")"},__toLimeVector2:function(){Ea.__limeVector2==null&&(Ea.__limeVector2=new Uf);var a=Ea.__limeVector2;a.x=this.x;a.y=this.y;return Ea.__limeVector2},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:Ea,__properties__:{get_length:"get_length"}};
var Je=function(){this.cards=new G;this.consItAmounts=[];this.consItNames=[];this.keyItems=[];this.items=new G;this.dialogues=new G;this.chars=new G;this.diagSpeech=new de(m(this,this.onSpeechLoad),m(this,this.onSpeechEnd))};t["com.tilbuci.narrative.Narrative"]=Je;Je.__name__="com.tilbuci.narrative.Narrative";Je.prototype={chars:null,dialogues:null,diagSpeech:null,items:null,keyItems:null,consItNames:null,consItAmounts:null,cards:null,clear:function(){var a=this.chars.h;a=Object.keys(a);for(var b=
a.length,c=0;c<b;){var d=a[c++];this.chars.h[d].kill();var f=this.chars;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this.dialogues.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.dialogues.h[d].kill(),f=this.dialogues,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.items.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.items.h[d].kill(),f=this.items,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.cards.h;a=Object.keys(a);b=a.length;
for(c=0;c<b;)d=a[c++],this.cards.h[d].kill(),f=this.cards,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];for(;this.keyItems.length>0;)this.keyItems.shift();for(;this.consItNames.length>0;)this.consItNames.shift();for(;this.consItAmounts.length>0;)this.consItAmounts.shift()},clearDialogues:function(){if(p.mode=="player")for(var a=this.dialogues.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].clear()},addKeyItem:function(a){this.keyItems.length<4&&Object.prototype.hasOwnProperty.call(this.items.h,
a)&&this.keyItems.indexOf(a)==-1&&this.keyItems.push(a)},removeKeyItem:function(a){Object.prototype.hasOwnProperty.call(this.items.h,a)&&(a=this.keyItems.indexOf(a),a>-1&&this.keyItems.splice(a,1))},clearKeyItems:function(){for(;this.keyItems.length>0;)this.keyItems.shift()},hasKeyItem:function(a){return Object.prototype.hasOwnProperty.call(this.items.h,a)?this.keyItems.indexOf(a)!=-1:!1},addConsumableItem:function(a,b){this.consItNames.indexOf(a)!=-1?(a=this.consItNames.indexOf(a),this.consItAmounts[a]+=
b):this.consItNames.length<8&&(this.consItNames.push(a),this.consItAmounts.push(b))},removeConsumableItem:function(a){this.consItNames.indexOf(a)!=-1&&(a=this.consItNames.indexOf(a),this.consItNames.splice(a,1),this.consItAmounts.splice(a,1))},consumeItem:function(a){this.consItNames.indexOf(a)!=-1&&(a=this.consItNames.indexOf(a),--this.consItAmounts[a],this.consItAmounts[a]<=0&&(this.consItNames.splice(a,1),this.consItAmounts.splice(a,1)))},clearConsumableItems:function(){for(;this.consItNames.length>
0;)this.consItNames.shift();for(;this.consItAmounts.length>0;)this.consItAmounts.shift()},consumableAmount:function(a){return this.consItNames.indexOf(a)!=-1?(a=this.consItNames.indexOf(a),this.consItAmounts[a]):0},currentItems:function(){return Ga.jsonStringify({k:this.keyItems,c:this.consItNames,a:this.consItAmounts})},loadItems:function(a){var b=Ga.jsonParse(a);if(b==0)return!1;if(Object.prototype.hasOwnProperty.call(b,"k")&&Object.prototype.hasOwnProperty.call(b,"c")&&Object.prototype.hasOwnProperty.call(b,
"a")){a=y.field(b,"k");var c=y.field(b,"c");b=y.field(b,"a");if(a!=null&&c!=null&&b!=null)return this.keyItems=a,this.consItNames=c,this.consItAmounts=b,!0}return!1},currentKeyItems:function(){return Ga.jsonStringify({k:this.keyItems})},loadKeyItems:function(a){a=Ga.jsonParse(a);return a==0?!1:Object.prototype.hasOwnProperty.call(a,"k")&&(a=y.field(a,"k"),a!=null)?(this.keyItems=a,!0):!1},currentConsItems:function(){return Ga.jsonStringify({c:this.consItNames,a:this.consItAmounts})},loadConsItems:function(a){var b=
Ga.jsonParse(a);return b==0?!1:Object.prototype.hasOwnProperty.call(b,"c")&&Object.prototype.hasOwnProperty.call(b,"a")&&(a=y.field(b,"c"),b=y.field(b,"a"),a!=null&&b!=null)?(this.consItNames=a,this.consItAmounts=b,!0):!1},getData:function(){var a=new G,b=[];a.h.chars=b;var c=this.chars.h;b=c;c=Object.keys(c);for(var d=c.length,f=0;f<d;){var g=b[c[f++]];a.h.chars.push(g.toObject())}b=[];a.h.dialogues=b;b=[];a.h.diagcontent=b;b=c=this.dialogues.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=b[c[f++]],
a.h.dialogues.push(g.idObject()),g.numDiags()>0&&a.h.diagcontent.push(g.toObject());b=[];a.h.items=b;b=c=this.items.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=b[c[f++]],a.h.items.push(g.toObject());b=[];a.h.cards=b;b=c=this.cards.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=b[c[f++]],a.h.cards.push(g.toObject());return Ga.jsonStringify(a)},onSpeechLoad:function(a){this.diagSpeech.play()},onSpeechEnd:function(){this.diagSpeech.stop()},__class__:Je};var tc=function(a,b,c){this.oWidth=this.oHeight=
0;this._autoTimer=!1;this.extraInfo=[];this.type="";Da.call(this);this.type=a;this._autoTimer=b;this._onLoad=c;this._mediaLoaded=!1;this.set_visible(!1);this._lastMedia="";this.mouseChildren=!1};t["com.tilbuci.display.BaseImage"]=tc;tc.__name__="com.tilbuci.display.BaseImage";tc.__super__=Da;tc.prototype=I(Da.prototype,{type:null,extraInfo:null,_autoTimer:null,_onLoad:null,oWidth:null,oHeight:null,mediaLoaded:null,get_mediaLoaded:function(){return this._mediaLoaded},_mediaLoaded:null,lastMedia:null,
get_lastMedia:function(){return this._lastMedia},_lastMedia:null,kill:function(){this.removeChildren();for(this._onLoad=this.type=null;this.extraInfo.length>0;)this.extraInfo.shift();this.extraInfo=null},__class__:tc,__properties__:I(Da.prototype.__properties__,{get_lastMedia:"get_lastMedia",get_mediaLoaded:"get_mediaLoaded"})});var de=function(a,b,c){this._channelPos=-1;this._currentTime=0;this._loaded=!1;tc.call(this,"audio",!0,a);this._onEnd=b;this._sound=new pe;this._sound.addEventListener("complete",
m(this,this.onComplete));this._sound.addEventListener("ioError",m(this,this.onError));this._onTimedAc=c};t["com.tilbuci.display.AudioImage"]=de;de.__name__="com.tilbuci.display.AudioImage";de.__super__=tc;de.prototype=I(tc.prototype,{_sound:null,_channel:null,_loaded:null,_onEnd:null,_timer:null,_currentTime:null,_channelPos:null,_transform:null,_onTimedAc:null,getTime:function(){return this._loaded?Math.round(this._channel.get_position()/1E3):0},setTime:function(a){},load:function(a){this._lastMedia=
a=N.replace(a,p.path+"media/audio/","");this._loaded=!1;this._channelPos=-1;this._transform=null;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),this._channel.stop(),this._channel=null);a=p.parser.parsePath(p.path+"media/audio/"+a);this._sound.load(new se(a))},iterateSound:function(a,b){this._channel!=null&&(Ca.transform(this._channel,p.mdata.time).sound(a,null),this._transform=new ki(a,0))},stopSound:function(){Ca.stop(this._sound)},kill:function(){tc.prototype.kill.call(this);
this._loaded=!1;this._onEnd=null;try{this._sound.close()}catch(a){}this._sound.removeEventListener("complete",m(this,this.onComplete));this._sound.removeEventListener("ioError",m(this,this.onError));this._sound=null;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),this._channel.stop(),this._channel=null);this._onTimedAc=null;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}},play:function(){if(this._loaded){var a=0;this._channelPos>
0&&(a=this._channelPos);this._channelPos=-1;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),this._channel.stop(),this._channel=null);this._channel=this._sound.play(a,0,this._transform);this._channel.addEventListener("soundComplete",m(this,this.soundComplete));if(this._timer!=null){try{this._timer.stop()}catch(b){}this._timer=null}this._currentTime=Math.round(a/1E3);this._timer=new Gc(1E3);this._timer.run=m(this,this.onTimer)}},pause:function(){this._loaded&&
(this._channelPos=this._channel.get_position(),this._channel.stop())},stop:function(){if(this._loaded){this._channel.stop();if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this._channelPos=-1}},onTimer:function(){var a=Math.round(this._channel.get_position()/1E3);this._currentTime!=a&&this._onTimedAc!=null&&(this._currentTime=a,this._onTimedAc(a))},onComplete:function(a){this._loaded=!0;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),
this._channel.stop(),this._channel=null);this._channel=this._sound.play(0);this._channel.addEventListener("soundComplete",m(this,this.soundComplete));this._onLoad(!0)},onError:function(a){this._loaded=!1;this._onLoad(!1)},soundComplete:function(a){this._onEnd()},__class__:de});var pe=function(a,b){this.__webAudioContext=null;this.__urlLoading=!1;qa.call(this,this);this.bytesTotal=this.bytesLoaded=0;this.isBuffering=!1;this.url=null;a!=null&&this.load(a,b);a==null&&ld.context!=null&&ld.context.type==
"web"&&(this.__webAudioContext=ld.context.web)};t["openfl.media.Sound"]=pe;pe.__name__="openfl.media.Sound";pe.fromAudioBuffer=function(a){var b=new pe;b.__buffer=a;return b};pe.fromFile=function(a){var b=qe.fromFile(a);if(b==null)throw new rm("Error loading sound from file: "+a);return pe.fromAudioBuffer(b)};pe.loadFromFile=function(a){return qe.loadFromFile(a).then(function(b){return Hc.withValue(pe.fromAudioBuffer(b))})};pe.loadFromFiles=function(a){return qe.loadFromFiles(a).then(function(b){return Hc.withValue(pe.fromAudioBuffer(b))})};
pe.__super__=qa;pe.prototype=I(qa.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__urlLoading:null,__pendingSoundChannel:null,__pendingAudioSource:null,__buffer:null,__webAudioContext:null,close:function(){this.__buffer!=null&&(te.__unregisterSoundChannelByBuffer(this.__buffer),this.__buffer.dispose(),this.__buffer=null)},load:function(a,b){var c=this;this.url=a.url;this.__urlLoading=!0;this.dispatchEvent(new pa("open"));a=mb.getLibrary("default");if(a!=null&&Object.prototype.hasOwnProperty.call(a.cachedAudioBuffers.h,
this.url))a=a.cachedAudioBuffers.h[this.url],b=a!=null&&a.data!=null?a.data.byteLength:0,this.AudioBuffer_onURLProgress(b,b),this.AudioBuffer_onURLLoad(a);else qe.loadFromFile(this.url).onProgress(m(this,this.AudioBuffer_onURLProgress)).onComplete(m(this,this.AudioBuffer_onURLLoad)).onError(function(d){c.AudioBuffer_onURLLoad(null)})},loadCompressedDataFromByteArray:function(a,b){if(a==null||b<=0)this.dispatchEvent(new Oh("ioError"));else{if(sb.gt(a.position,0)||sb.gt(mc.get_length(a),b)){var c=b;
c==null&&(c=0);var d=new Xc(c),f=a.position;c=b;c==null&&(c=0);f==null&&(f=0);d.writeBytes(a,f,c);a=d}this.__buffer=qe.fromBytes(mc.toBytes(a));this.__buffer==null?this.dispatchEvent(new Oh("ioError")):(this.dispatchEvent(new pa("open")),this.dispatchEvent(new sh("progress",!1,!1,sb.toFloat(mc.get_length(a)),sb.toFloat(mc.get_length(a)))),this.dispatchEvent(new pa("complete")))}},loadPCMFromByteArray:function(a,b,c,d,f){f==null&&(f=44100);d==null&&(d=!0);c==null&&(c="float");if(a==null)this.dispatchEvent(new Oh("ioError"));
else{c=c=="float"?32:16;d=d?2:1;b=b*d*(c/8)|0;if(sb.gt(a.position,0)||sb.gt(mc.get_length(a),b)){var g=b;g==null&&(g=0);var h=new Xc(g),n=a.position;g=b;g==null&&(g=0);n==null&&(n=0);h.writeBytes(a,n,g);a=h}b=new qe;b.bitsPerSample=c;b.channels=d;c=mc.toArrayBuffer(a);c=c!=null?new Uint8Array(c,0):null;b.data=c;b.sampleRate=f|0;this.__buffer=b;this.dispatchEvent(new pa("open"));this.dispatchEvent(new sh("progress",!1,!1,sb.toFloat(mc.get_length(a)),sb.toFloat(mc.get_length(a))));this.dispatchEvent(new pa("complete"))}},
play:function(a,b,c){b==null&&(b=0);a==null&&(a=0);if(te.__soundChannels.length>=32)return null;c=c==null?new ki:c.clone();var d=te.__soundTransform.pan+c.pan;d>1&&(d=1);d<-1&&(d=-1);var f=te.__soundTransform.volume*c.volume,g=new dw(this.__buffer);g.offset=a|0;b>1&&g.set_loops(b-1);g.set_gain(f);a=g.get_position();a.x=d;a.z=-1*Math.sqrt(1-Math.pow(d,2));g.set_position(a);c=new Es(this,this.__urlLoading?null:g,c);this.__urlLoading?(this.__pendingAudioSource=g,this.__pendingSoundChannel=c):this.__buffer==
null&&this.__webAudioContext!=null&&c.__startSampleData();return c},get_sampleRate:function(){return this.__webAudioContext.sampleRate|0},get_id3:function(){return new ew},get_length:function(){return this.__buffer!=null?this.__buffer.get_src().duration()*1E3|0:0},AudioBuffer_onURLLoad:function(a){this.__urlLoading=!1;a==null?this.dispatchEvent(new Oh("ioError")):(this.__buffer=a,a=1,this.__buffer.data!=null&&(a=this.__buffer.data.length),this.dispatchEvent(new sh("progress",!1,!1,a,a)),this.dispatchEvent(new pa("complete")),
this.__pendingSoundChannel!=null&&(this.__pendingAudioSource.buffer=this.__buffer,this.__pendingAudioSource.init(),this.__pendingSoundChannel.__initAudioSource(this.__pendingAudioSource)));this.__pendingAudioSource=this.__pendingSoundChannel=null},AudioBuffer_onURLProgress:function(a,b){var c=new sh("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:pe,__properties__:{get_sampleRate:"get_sampleRate",get_length:"get_length",get_id3:"get_id3"}});var ld=function(){};t["lime.media.AudioManager"]=
ld;ld.__name__="lime.media.AudioManager";ld.init=function(a){if(ld.context==null){if(a==null&&(ld.context=new fw,a=ld.context,a.type=="openal")){var b=a.openal,c=b.openDevice();c!=null&&(c=b.createContext(c),b.makeContextCurrent(c),b.processContext(c))}ld.context=a}};ld.resume=function(){if(ld.context!=null&&ld.context.type=="openal"){var a=ld.context.openal,b=a.getCurrentContext();if(b!=null){var c=a.getContextsDevice(b);a.resumeDevice(c);a.processContext(b)}}};ld.shutdown=function(){if(ld.context!=
null&&ld.context.type=="openal"){var a=ld.context.openal,b=a.getCurrentContext();if(b!=null){var c=a.getContextsDevice(b);a.makeContextCurrent(null);a.destroyContext(b);c!=null&&a.closeDevice(c)}}ld.context=null};ld.suspend=function(){if(ld.context!=null&&ld.context.type=="openal"){var a=ld.context.openal,b=a.getCurrentContext();b!=null&&(a.suspendContext(b),b=a.getContextsDevice(b),b!=null&&a.pauseDevice(b))}};var fj={__properties__:{set_ty:"set_ty",get_ty:"get_ty",set_tx:"set_tx",get_tx:"get_tx",
set_d:"set_d",get_d:"get_d",set_c:"set_c",get_c:"get_c",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"},_new:function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=1);a=[a,b,0,c,d,0,f,g,1];return a!=null?new Float32Array(a):null},clone:function(a){return fj._new(a[0],a[1],a[3],a[4],a[6],a[7])},concat:function(a,b){var c=a[0]*b[0]+a[1]*b[3];a[1]=a[0]*b[1]+a[1]*b[4];a[0]=c;c=a[3]*b[0]+a[4]*b[3];a[4]=a[3]*b[1]+a[4]*b[4];a[3]=c;c=a[6]*b[0]+
a[7]*b[3]+b[6];a[7]=a[6]*b[1]+a[7]*b[4]+b[7];a[6]=c},copyColumnFrom:function(a,b,c){if(b>2)throw ba.thrown("Column "+b+" out of bounds (2)");b==0?(a[0]=c.x,a[1]=c.y):b==1?(a[3]=c.x,a[4]=c.y):(a[6]=c.x,a[7]=c.y)},copyColumnTo:function(a,b,c){if(b>2)throw ba.thrown("Column "+b+" out of bounds (2)");b==0?(c.x=a[0],c.y=a[1],c.z=0):b==1?(c.x=a[3],c.y=a[4],c.z=0):(c.x=a[6],c.y=a[7],c.z=1)},copyFrom:function(a,b){a[0]=b[0];a[1]=b[1];a[3]=b[3];a[4]=b[4];a[6]=b[6];a[7]=b[7]},copyRowFrom:function(a,b,c){if(b>
2)throw ba.thrown("Row "+b+" out of bounds (2)");b==0?(a[0]=c.x,a[3]=c.y,a[6]=c.z):b==1&&(a[1]=c.x,a[4]=c.y,a[7]=c.z)},copyRowTo:function(a,b,c){if(b>2)throw ba.thrown("Row "+b+" out of bounds (2)");b==0?(c.x=a[0],c.y=a[3],c.z=a[6]):b==1?(c.x=a[1],c.y=a[4],c.z=a[7]):(c.x=0,c.y=0,c.z=1)},createBox:function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=0);if(d!=0){var h=Math.cos(d);d=Math.sin(d);a[0]=h*b;a[1]=d*c;a[3]=-d*b;a[4]=h*c}else a[0]=b,a[1]=0,a[3]=0,a[4]=c;a[6]=f;a[7]=g},createGradientBox:function(a,
b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=0);a[0]=b/1638.4;a[4]=c/1638.4;if(d!=0){var h=Math.cos(d);d=Math.sin(d);a[1]=d*a[4];a[3]=-d*a[0];a[0]*=h;a[4]*=h}else a[1]=0,a[3]=0;a[6]=f+b/2;a[7]=g+c/2},equals:function(a,b){return b!=null&&a[6]==b[6]&&a[7]==b[7]&&a[0]==b[0]&&a[1]==b[1]&&a[3]==b[3]?a[4]==b[4]:!1},deltaTransformVector:function(a,b,c){c==null&&(c=new Uf);c.x=b.x*a[0]+b.y*a[3];c.y=b.x*a[1]+b.y*a[4];return c},fromCairoMatrix3:function(a){return fj._new(a.a,a.b,a.c,a.d,a.tx,a.ty)},
fromFloat32Array:function(a){if(a.length!=9)throw ba.thrown("Expected array of length 9, got "+a.length);return a},identity:function(a){a[0]=1;a[1]=0;a[3]=0;a[4]=1;a[6]=0;a[7]=0},invert:function(a){var b=a[0]*a[4]-a[1]*a[3];if(b==0)a[0]=a[1]=a[3]=a[4]=0,a[6]=-a[6],a[7]=-a[7];else{b=1/b;var c=a[4]*b;a[4]=a[0]*b;a[0]=c;a[1]*=-b;a[3]*=-b;b=-a[0]*a[6]-a[3]*a[7];a[7]=-a[1]*a[6]-a[4]*a[7];a[6]=b}if(a.length!=9)throw ba.thrown("Expected array of length 9, got "+a.length);return a},rotate:function(a,b){var c=
Math.cos(b);b=Math.sin(b);var d=a[0]*c-a[1]*b;a[1]=a[0]*b+a[1]*c;a[0]=d;d=a[3]*c-a[4]*b;a[4]=a[3]*b+a[4]*c;a[3]=d;d=a[6]*c-a[7]*b;a[7]=a[6]*b+a[7]*c;a[6]=d},scale:function(a,b,c){a[0]*=b;a[1]*=c;a[3]*=b;a[4]*=c;a[6]*=b;a[7]*=c},setRotation:function(a,b,c){c==null&&(c=1);a[0]=Math.cos(b)*c;a[3]=Math.sin(b)*c;a[1]=-a[3];a[4]=a[0]},setTo:function(a,b,c,d,f,g,h){a[0]=b;a[1]=c;a[3]=d;a[4]=f;a[6]=g;a[7]=h},toCairoMatrix3:function(a){return new gw(a[0],a[1],a[3],a[4],a[6],a[7])},toString:function(a){return"matrix("+
a[0]+", "+a[1]+", "+a[3]+", "+a[4]+", "+a[6]+", "+a[7]+")"},transformRect:function(a,b,c){c==null&&(c=new of);var d=a[0]*b.x+a[3]*b.y,f=d,g=a[1]*b.x+a[4]*b.y,h=g,n=a[0]*(b.x+b.width)+a[3]*b.y,l=a[1]*(b.x+b.width)+a[4]*b.y;n<d&&(d=n);l<g&&(g=l);n>f&&(f=n);l>h&&(h=l);n=a[0]*(b.x+b.width)+a[3]*(b.y+b.height);l=a[1]*(b.x+b.width)+a[4]*(b.y+b.height);n<d&&(d=n);l<g&&(g=l);n>f&&(f=n);l>h&&(h=l);n=a[0]*b.x+a[3]*(b.y+b.height);l=a[1]*b.x+a[4]*(b.y+b.height);n<d&&(d=n);l<g&&(g=l);n>f&&(f=n);l>h&&(h=l);c.setTo(d+
n,g+l,f-d,h-g);return c},transformVector:function(a,b,c){c==null&&(c=new Uf);c.x=b.x*a[0]+b.y*a[3]+a[6];c.y=b.x*a[1]+b.y*a[4]+a[7];return c},translate:function(a,b,c){a[6]+=b;a[7]+=c},get_a:function(a){return a[0]},set_a:function(a,b){return a[0]=b},get_b:function(a){return a[1]},set_b:function(a,b){return a[1]=b},get_c:function(a){return a[3]},set_c:function(a,b){return a[3]=b},get_d:function(a){return a[4]},set_d:function(a,b){return a[4]=b},get_tx:function(a){return a[6]},set_tx:function(a,b){return a[6]=
b},get_ty:function(a){return a[7]},set_ty:function(a,b){return a[7]=b},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},gb=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=f;this.ty=g};t["openfl.geom.Matrix"]=gb;gb.__name__="openfl.geom.Matrix";gb.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__array:null,clone:function(){return new gb(this.a,this.b,this.c,this.d,this.tx,
this.ty)},concat:function(a){var b=this.a*a.a+this.b*a.c;this.b=this.a*a.b+this.b*a.d;this.a=b;b=this.c*a.a+this.d*a.c;this.d=this.c*a.b+this.d*a.d;this.c=b;b=this.tx*a.a+this.ty*a.c+a.tx;this.ty=this.tx*a.b+this.ty*a.d+a.ty;this.tx=b},copyColumnFrom:function(a,b){if(a>2)throw ba.thrown("Column "+a+" out of bounds (2)");a==0?(this.a=b.x,this.b=b.y):a==1?(this.c=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(a>2)throw ba.thrown("Column "+a+" out of bounds (2)");a==0?(b.x=
this.a,b.y=this.b,b.z=0):a==1?(b.x=this.c,b.y=this.d,b.z=0):(b.x=this.tx,b.y=this.ty,b.z=1)},copyFrom:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.tx=a.tx;this.ty=a.ty},copyRowFrom:function(a,b){if(a>2)throw ba.thrown("Row "+a+" out of bounds (2)");a==0?(this.a=b.x,this.c=b.y,this.tx=b.z):a==1&&(this.b=b.x,this.d=b.y,this.ty=b.z)},copyRowTo:function(a,b){if(a>2)throw ba.thrown("Row "+a+" out of bounds (2)");a==0?(b.x=this.a,b.y=this.c,b.z=this.tx):a==1?(b.x=this.b,b.y=this.d,b.z=this.ty):
b.setTo(0,0,1)},createBox:function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=0);if(c!=0){var g=Math.cos(c);c=Math.sin(c);this.a=g*a;this.b=c*b;this.c=-c*a;this.d=g*b}else this.a=a,this.c=this.b=0,this.d=b;this.tx=d;this.ty=f},createGradientBox:function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=0);this.a=a/1638.4;this.d=b/1638.4;if(c!=0){var g=Math.cos(c);c=Math.sin(c);this.b=c*this.d;this.c=-c*this.a;this.a*=g;this.d*=g}else this.c=this.b=0;this.tx=d+a/2;this.ty=f+b/2},deltaTransformPoint:function(a){return new Ea(a.x*
this.a+a.y*this.c,a.x*this.b+a.y*this.d)},deltaTransformPointToOutput:function(a,b){return b!=null?(b.setTo(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d),b):new Ea(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d)},equals:function(a){return a!=null&&this.tx==a.tx&&this.ty==a.ty&&this.a==a.a&&this.b==a.b&&this.c==a.c?this.d==a.d:!1},identity:function(){this.a=1;this.c=this.b=0;this.d=1;this.ty=this.tx=0},invert:function(){var a=this.a*this.d-this.b*this.c;if(a==0)this.a=this.b=this.c=this.d=0,this.tx=-this.tx,
this.ty=-this.ty;else{a=1/a;var b=this.d*a;this.d=this.a*a;this.a=b;this.b*=-a;this.c*=-a;a=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=a}return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.a*b-this.b*a;this.b=this.a*a+this.b*b;this.a=c;c=this.c*b-this.d*a;this.d=this.c*a+this.d*b;this.c=c;c=this.tx*b-this.ty*a;this.ty=this.tx*a+this.ty*b;this.tx=c},scale:function(a,b){this.a*=a;this.b*=b;this.c*=a;this.d*=b;this.tx*=a;this.ty*=b},setRotation:function(a,
b){b==null&&(b=1);this.a=Math.cos(a)*b;this.c=Math.sin(a)*b;this.b=-this.c;this.d=this.a},setTo:function(a,b,c,d,f,g){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=f;this.ty=g},to3DString:function(a){a==null&&(a=!1);return a?"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+(this.tx|0)+", "+(this.ty|0)+", 0, 1)":"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+this.tx+", "+this.ty+", 0, 1)"},toMozString:function(){return"matrix("+
this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+"px, "+this.ty+"px)"},toString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+", "+this.ty+")"},transformPoint:function(a){return new Ea(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty)},transformPointToOutput:function(a,b){return b!=null?(b.setTo(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty),b):new Ea(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty)},translate:function(a,
b){this.tx+=a;this.ty+=b},toArray:function(a){a==null&&(a=!1);this.__array==null&&(this.__array=new Float32Array(9));a?(this.__array[0]=this.a,this.__array[1]=this.b,this.__array[2]=0,this.__array[3]=this.c,this.__array[4]=this.d,this.__array[5]=0,this.__array[6]=this.tx,this.__array[7]=this.ty):(this.__array[0]=this.a,this.__array[1]=this.c,this.__array[2]=this.tx,this.__array[3]=this.b,this.__array[4]=this.d,this.__array[5]=this.ty,this.__array[6]=0,this.__array[7]=0);this.__array[8]=1;return this.__array},
__cleanValues:function(){this.a=Math.round(this.a*1E3)/1E3;this.b=Math.round(this.b*1E3)/1E3;this.c=Math.round(this.c*1E3)/1E3;this.d=Math.round(this.d*1E3)/1E3;this.tx=Math.round(this.tx*10)/10;this.ty=Math.round(this.ty*10)/10},__toMatrix3:function(){fj.setTo(gb.__matrix3,this.a,this.b,this.c,this.d,this.tx,this.ty);return gb.__matrix3},__transformInversePoint:function(a){var b=this.a*this.d-this.b*this.c;if(b==0)a.x=-this.tx,a.y=-this.ty;else{var c=1/b*(this.c*(this.ty-a.y)+this.d*(a.x-this.tx));
a.y=1/b*(this.a*(a.y-this.ty)+this.b*(this.tx-a.x));a.x=c}},__transformInverseX:function(a,b){var c=this.a*this.d-this.b*this.c;return c==0?-this.tx:1/c*(this.c*(this.ty-b)+this.d*(a-this.tx))},__transformInverseY:function(a,b){var c=this.a*this.d-this.b*this.c;return c==0?-this.ty:1/c*(this.a*(b-this.ty)+this.b*(this.tx-a))},__transformPoint:function(a){var b=a.x,c=a.y;a.x=b*this.a+c*this.c+this.tx;a.y=b*this.b+c*this.d+this.ty},__transformX:function(a,b){return a*this.a+b*this.c+this.tx},__transformY:function(a,
b){return a*this.b+b*this.d+this.ty},__translateTransformed:function(a,b){this.tx=a*this.a+b*this.c+this.tx;this.ty=a*this.b+b*this.d+this.ty},__class__:gb};var wc=function(a,b,c,d,f,g,h,n){n==null&&(n=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=1);b==null&&(b=1);a==null&&(a=1);this.redMultiplier=a;this.greenMultiplier=b;this.blueMultiplier=c;this.alphaMultiplier=d;this.redOffset=f;this.greenOffset=g;this.blueOffset=h;this.alphaOffset=n};t["openfl.geom.ColorTransform"]=
wc;wc.__name__="openfl.geom.ColorTransform";wc.prototype={alphaMultiplier:null,alphaOffset:null,blueMultiplier:null,blueOffset:null,greenMultiplier:null,greenOffset:null,redMultiplier:null,redOffset:null,concat:function(a){this.redOffset=a.redOffset*this.redMultiplier+this.redOffset;this.greenOffset=a.greenOffset*this.greenMultiplier+this.greenOffset;this.blueOffset=a.blueOffset*this.blueMultiplier+this.blueOffset;this.alphaOffset=a.alphaOffset*this.alphaMultiplier+this.alphaOffset;this.redMultiplier*=
a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier},toString:function(){return"(redMultiplier="+this.redMultiplier+", greenMultiplier="+this.greenMultiplier+", blueMultiplier="+this.blueMultiplier+", alphaMultiplier="+this.alphaMultiplier+", redOffset="+this.redOffset+", greenOffset="+this.greenOffset+", blueOffset="+this.blueOffset+", alphaOffset="+this.alphaOffset+")"},__clone:function(){return new wc(this.redMultiplier,
this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},__copyFrom:function(a){this.redMultiplier=a.redMultiplier;this.greenMultiplier=a.greenMultiplier;this.blueMultiplier=a.blueMultiplier;this.alphaMultiplier=a.alphaMultiplier;this.redOffset=a.redOffset;this.greenOffset=a.greenOffset;this.blueOffset=a.blueOffset;this.alphaOffset=a.alphaOffset},__combine:function(a){this.redMultiplier*=a.redMultiplier;this.greenMultiplier*=
a.greenMultiplier;this.blueMultiplier*=a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier;this.redOffset+=a.redOffset;this.greenOffset+=a.greenOffset;this.blueOffset+=a.blueOffset;this.alphaOffset+=a.alphaOffset},__identity:function(){this.alphaMultiplier=this.blueMultiplier=this.greenMultiplier=this.redMultiplier=1;this.alphaOffset=this.blueOffset=this.greenOffset=this.redOffset=0},__invert:function(){this.redMultiplier=this.redMultiplier!=0?1/this.redMultiplier:1;this.greenMultiplier=this.greenMultiplier!=
0?1/this.greenMultiplier:1;this.blueMultiplier=this.blueMultiplier!=0?1/this.blueMultiplier:1;this.alphaMultiplier=this.alphaMultiplier!=0?1/this.alphaMultiplier:1;this.redOffset=-this.redOffset;this.greenOffset=-this.greenOffset;this.blueOffset=-this.blueOffset;this.alphaOffset=-this.alphaOffset},__equals:function(a,b){return a==null||this.redMultiplier!=a.redMultiplier||this.greenMultiplier!=a.greenMultiplier||this.blueMultiplier!=a.blueMultiplier||!b&&this.alphaMultiplier!=a.alphaMultiplier||this.redOffset!=
a.redOffset||this.greenOffset!=a.greenOffset||this.blueOffset!=a.blueOffset?!1:this.alphaOffset==a.alphaOffset},__isDefault:function(a){return a?this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0?this.alphaOffset==0:!1:this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.alphaMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0?this.alphaOffset==0:!1},__setArrays:function(a,
b){a[0]=this.redMultiplier;a[1]=this.greenMultiplier;a[2]=this.blueMultiplier;a[3]=this.alphaMultiplier;b[0]=this.redOffset;b[1]=this.greenOffset;b[2]=this.blueOffset;b[3]=this.alphaOffset},get_color:function(){return(this.redOffset|0)<<16|(this.greenOffset|0)<<8|this.blueOffset|0},set_color:function(a){this.redOffset=a>>16&255;this.greenOffset=a>>8&255;this.blueOffset=a&255;this.blueMultiplier=this.greenMultiplier=this.redMultiplier=0;return this.get_color()},__toLimeColorMatrix:function(){wc.__limeColorMatrix==
null&&(wc.__limeColorMatrix=new Float32Array(20));wc.__limeColorMatrix[0]=this.redMultiplier;wc.__limeColorMatrix[4]=this.redOffset/255;wc.__limeColorMatrix[6]=this.greenMultiplier;wc.__limeColorMatrix[9]=this.greenOffset/255;wc.__limeColorMatrix[12]=this.blueMultiplier;wc.__limeColorMatrix[14]=this.blueOffset/255;wc.__limeColorMatrix[18]=this.alphaMultiplier;wc.__limeColorMatrix[19]=this.alphaOffset/255;return wc.__limeColorMatrix},__class__:wc,__properties__:{set_color:"set_color",get_color:"get_color"}};
var gj=function(){qa.call(this);this.clear()};t["openfl.text.StyleSheet"]=gj;gj.__name__="openfl.text.StyleSheet";gj.__super__=qa;gj.prototype=I(qa.prototype,{__styleNames:null,__styleNamesDirty:null,__styles:null,clear:function(){this.__styleNamesDirty=!1;this.__styleNames=null;this.__styles=new G},getStyle:function(a){a=a.toLowerCase();return Object.prototype.hasOwnProperty.call(this.__styles.h,a)?this.__styles.h[a]:null},parseCSS:function(a){var b=new G;b.h.silent=!0;b=(new hw(b)).parse(a);if(b!=
null)for(a=b.h.rules,b=0;b<a.length;){var c=a[b];++b;var d=Object.prototype.hasOwnProperty.call(c.h,"selectors")?c.h.selectors:null;if(d!=null&&(d=d.toLowerCase(),Object.prototype.hasOwnProperty.call(this.__styles.h,d)||(this.__styles.h[d]={},this.__styleNamesDirty=!0),d=this.__styles.h[d],c=c.h.declarations,c!=null))for(var f=0;f<c.length;){var g=c[f];++f;var h=g.h.property;g=H.string(g.h.value);if(h!=null)if(h==null)d[h]=g;else switch(h){case "font-family":g=N.replace(g,'"',"");h=d;h!=null&&y.setProperty(h,
"fontFamily",g);break;case "font-size":h=d;h!=null&&y.setProperty(h,"fontSize",g);break;case "font-style":h=d;h!=null&&y.setProperty(h,"fontStyle",g);break;case "font-weight":h=d;h!=null&&y.setProperty(h,"fontWeight",g);break;case "letter-spacing":h=d;h!=null&&y.setProperty(h,"letterSpacing",g);break;case "margin-left":h=d;h!=null&&y.setProperty(h,"marginLeft",g);break;case "text-align":h=d;h!=null&&y.setProperty(h,"textAlign",g);break;case "text-decoration":h=d;h!=null&&y.setProperty(h,"textDecoration",
g);break;case "text-indent":h=d;h!=null&&y.setProperty(h,"textIndent",g);break;default:d[h]=g}}}},setStyle:function(a,b){a=a.toLowerCase();if(b==null)Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&(b=this.__styles,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]);else{for(var c={},d=0,f=y.fields(b);d<f.length;){var g=f[d];++d;c[g]=y.field(b,g)}this.__styles.h[a]=c}},transform:function(a){var b=new ef;this.__applyStyleObject(a,b);return b},__applyStyle:function(a,b){a=a.toLowerCase();
Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&this.__applyStyleObject(this.__styles.h[a],b)},__applyStyleObject:function(a,b){if(a!=null){var c=new Wa("[0-9A-Fa-f]+",""),d=new Wa("[0-9]+","");var f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"color")?(f=Ke.__get(a,"color"),f=c.match(f==null?null:H.string(f))):f=!1;f&&(b.color=H.parseInt("0x"+c.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"fontFamily")&&(f=Ke.__get(a,"fontFamily"),b.set_font(this.__parseFont(f==
null?null:H.string(f))));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"fontSize")?(f=Ke.__get(a,"fontSize"),f=d.match(f==null?null:H.string(f))):f=!1;f&&b.set_size(H.parseInt(d.matched(0)));f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"fontStyle"))switch(Ke.__get(a,"fontStyle")){case "italic":b.set_italic(!0);break;case "normal":b.set_italic(!1)}f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"fontWeight"))switch(Ke.__get(a,"fontWeight")){case "bold":b.set_bold(!0);break;case "normal":b.set_bold(!1)}f=
a;f!=null&&Object.prototype.hasOwnProperty.call(f,"leading")?(f=Ke.__get(a,"leading"),f=d.match(f==null?null:H.string(f))):f=!1;f&&(b.leading=H.parseInt(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"letterSpacing")?(f=Ke.__get(a,"letterSpacing"),f=d.match(f==null?null:H.string(f))):f=!1;f&&(b.letterSpacing=parseFloat(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"marginLeft")?(f=Ke.__get(a,"marginLeft"),f=d.match(f==null?null:H.string(f))):f=!1;f&&(b.leftMargin=
H.parseInt(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"marginRight")?(f=Ke.__get(a,"marginRight"),f=d.match(f==null?null:H.string(f))):f=!1;f&&(b.rightMargin=H.parseInt(d.matched(0)));f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"textAlign"))switch(Ke.__get(a,"textAlign")){case "center":b.align=0;break;case "justify":b.align=2;break;case "left":b.align=3;break;case "right":b.align=4}f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"textDecoration"))switch(Ke.__get(a,
"textDecoration")){case "none":b.underline=!1;break;case "underline":b.underline=!0}f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"textIndent")?(f=Ke.__get(a,"textIndent"),f=d.match(f==null?null:H.string(f))):f=!1;f&&(b.blockIndent=H.parseInt(d.matched(0)))}},__parseFont:function(a){if(a==null)return null;a.indexOf(",")>-1&&(a=V.substr(a,0,a.indexOf(",")));switch(a){case "mono":return"_typewriter";case "sans-serif":return"_sans";case "serif":return"_serif";default:return a}},get_styleNames:function(){if(this.__styleNames==
null||this.__styleNamesDirty){this.__styleNames=[];for(var a=Object.keys(this.__styles.h),b=a.length,c=0;c<b;){var d=a[c++];this.__styleNames.push(d)}this.__styleNamesDirty=!1}return this.__styleNames},__class__:gj,__properties__:{get_styleNames:"get_styleNames"}});var p=function(){};t["com.tilbuci.data.GlobalPlayer"]=p;p.__name__="com.tilbuci.data.GlobalPlayer";p.copyText=function(a){var b=!1;try{window.TBB_copyText(a),b=!0}catch(c){De.trace(a,{fileName:"Source/com/tilbuci/data/GlobalPlayer.hx",
lineNumber:233,className:"com.tilbuci.data.GlobalPlayer",methodName:"copyText"}),b=!1}return b};p.isMobile=function(){var a=!0;try{a=window.TBB_isMobile()}catch(b){a=!0}return a};p.appQuit=function(){var a=!1;try{a=!1}catch(b){a=!1}return a};p.pwaInstall=function(){var a=!1;try{window.TBB_showInstallPrompt(),a=!0}catch(b){a=!1}return a};p.fullscreen=function(){var a=!1;try{window.TBB_fullscreen(),a=!0}catch(b){a=!1}return a};p.saveFile=function(a,b){var c=!1;try{window.TBB_saveFile(a,b),c=!0}catch(d){c=
!1}return c};p.existsFile=function(a){return!1};p.loadFile=function(a,b,c){a=!1;try{window.TBB_loadFile(b,c),a=!0}catch(d){a=!1}return a};var sn=function(){this._max=20;this.propDisplay=[];this._current=0;this.states=[]};t["com.tilbuci.data.History"]=sn;sn.__name__="com.tilbuci.data.History";sn.prototype={states:null,current:null,get_current:function(){return this._current},_current:null,historyDisplay:null,propDisplay:null,_max:null,addState:function(a){for(a==null&&(a="");this.states.length>this._current+
1;)this.states.pop();for(this.states.push({title:qc.format(new Date,"%H:%M:%S"),state:p.movie.scene.toObject(),orientation:k.displayType,keyframe:p.area.get_currentKf(),name:a});this.states.length>this._max;)this.states.shift();this._current=this.states.length-1;this.historyDisplay!=null&&this.historyDisplay()},updateProperties:function(){for(var a=0,b=this.propDisplay;a<b.length;){var c=b[a];++a;c()}},loadState:function(a){return this.states.length>a?(k.displayType=this.states[a].orientation,p.movie.scene.fromObject(this.states[a].state),
this._current=a,!0):!1},clear:function(){for(;this.states.length>0;)this.states.shift();this._current=-1;this.historyDisplay!=null&&this.historyDisplay()},__class__:sn,__properties__:{get_current:"get_current"}};var Kk=function(){this._texts=new G;this._current="";this._ok=!1;qa.call(this);this._ok=this.load("langDefault")};t["com.tilbuci.data.Language"]=Kk;Kk.__name__="com.tilbuci.data.Language";Kk.__super__=qa;Kk.prototype=I(qa.prototype,{ok:null,get_ok:function(){return this._ok},_ok:null,current:null,
get_current:function(){return this._current},_current:null,_texts:null,load:function(a){var b=Z.getText(a);b=Ga.jsonParse(b);if(b==0)a=!1;else{for(var c=0,d=y.fields(b);c<d.length;){var f=d[c];++c;var g=y.field(b,f);this._texts.h[f]=g}this._current=a;a=!0}return a},get:function(a){return Object.prototype.hasOwnProperty.call(this._texts.h,a)?this._texts.h[a]:""},kill:function(){for(var a=Object.keys(this._texts.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._texts;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}this._texts=null},__class__:Kk,__properties__:{get_current:"get_current",get_ok:"get_ok"}});var om=function(a,b){this._mvId=this._scId="";this._colLoad=0;this._cacheScene=new G;this._actions=new G;this.preventHistory=!1;this.collections=new G;this.data=new le;this.scene=new Fs;this._actions.h.movie=a;this._actions.h.scene=b};t["com.tilbuci.data.MovieInfo"]=om;om.__name__="com.tilbuci.data.MovieInfo";om.prototype={data:null,scene:null,collections:null,preventHistory:null,_path:null,
_actions:null,_cacheScene:null,_colLoad:null,mvId:null,_mvId:null,get_mvId:function(){return this._mvId},mvLoaded:null,get_mvLoaded:function(){return this._mvId!=""},scId:null,_scId:null,get_scId:function(){return this._scId},scLoaded:null,get_scLoaded:function(){return this._scId!=""},kill:function(){this.data.kill();this.data=null;this.scene.kill();this.scene=null;var a=this._actions.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._actions;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}this._actions=null;a=this._cacheScene.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._cacheScene,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._cacheScene=null},loadMovie:function(a){for(;p.history.length>0;)p.history.shift();p.loadingMovie=a;this._scId=this._mvId="";this.data.clear();this.scene.clear();p.parser.clearStringFile();p.area.clear();for(var b=Object.keys(this._cacheScene.h),c=b.length,d=0;d<c;){var f=b[d++],g=this._cacheScene;Object.prototype.hasOwnProperty.call(g.h,
f)&&delete g.h[f]}V.substr(a,0,4)!="http"&&V.substr(a,0,4)!="file"&&(a=p.base+"movie/"+a);V.substr(a,-6,null)!=".movie"&&(a+=".movie");p.path=this._path=a+"/";a+="/movie.json";b=null;p.nocache&&(b=new G,b.h.rand=Math.ceil(Math.random()*1E4));new Ob(!0,a,"GET",b,4,m(this,this.onMovieLoaded))},loadScene:function(a,b){b==null&&(b=0);if(this.get_mvLoaded()){p.contraptions.showLoadingIc();if(p.mode=="editor"||p.mode=="editorplayer"||p.mode=="player"&&p.mdata.identify){if(p.mode=="player"&&p.mdata.identify)p.ws.loadScene(a,
m(this,this.onSceneLoaded));else if(a==null){var c=k.ws,d=new G,f=p.movie.get_mvId();d.h.movie=f;d.h.uid=b;c.send("Scene/LoadUid",d,m(this,this.onSceneLoadedEditor))}else c=k.ws,d=new G,f=p.movie.get_mvId(),d.h.movie=f,d.h.id=a,c.send("Scene/Load",d,m(this,this.onSceneLoadedEditor));return!0}if(Object.prototype.hasOwnProperty.call(this._cacheScene.h,a))return this.scene.load(Ga.jsonAsMap(this._cacheScene.h[a]))?this._scId=a:this._scId="",this._actions.h.scene(this.get_scLoaded()),this.get_scLoaded();
b=null;p.nocache&&(d=new G,f=Math.ceil(Math.random()*1E4),d.h.rand=f,b=d);new Ob(!0,this._path+"scene/"+a+".json","GET",b,4,m(this,this.onSceneLoaded));return!0}this._actions.h.scene(!1);return!1},noScene:function(){this._scId=""},cacheScene:function(a){if(this.get_mvLoaded()){if(!Object.prototype.hasOwnProperty.call(this._cacheScene.h,a)){var b=null;p.nocache&&(b=new G,b.h.rand=Math.ceil(Math.random()*1E4));new Ob(!0,this._path+"scene/"+a+".json","GET",b,4,m(this,this.onSceneCache))}return!0}return!1},
onMovieLoaded:function(a,b){a&&this.data.load(b.map)&&(a=N.replace(this._path,".movie/","").split("/"),this._mvId=a[a.length-1]);if(this.get_mvLoaded()){a=!1;if(p.mdata.vsgroups.length==0)a=!0;else for(var c=0,d=p.mdata.vsgroups;c<d.length;){var f=d[c];++c;p.ws.get_groups().indexOf(f)!=-1&&(a=!0)}p.mdata.identify&&!p.ws.userLogged()&&p.mode=="player"?(this._path=this._mvId="",p.mdata.fallback!=""&&(Object.prototype.hasOwnProperty.call(ya,"scene")&&(ya.scene=""),this.loadMovie(p.mdata.fallback))):
a||p.mode!="player"?(p.parser.loadStringsJson(),p.mode=="player"&&(a="",Object.prototype.hasOwnProperty.call(ya,"scene")&&(a=y.field(ya,"scene")),a==""?this.loadScene(b.map.h.start):(this.loadScene(a),Object.prototype.hasOwnProperty.call(ya,"scene")&&(ya.scene="")))):(this._path=this._mvId="",p.mdata.fallback!=""&&(Object.prototype.hasOwnProperty.call(ya,"scene")&&(ya.scene=""),this.loadMovie(p.mdata.fallback)));this._actions.h.movie(!0)}else this._path="",this._actions.h.movie(this.get_mvLoaded())},
loadCollection:function(a){var b=this.collections,c=new xg(this._path+"collection/"+a+".json",null);b.h[a]=c},onSceneLoadedEditor:function(a,b){if(a)if(p.movie.scene.clear(),b.map.h.e==0){var c=new G;a=0;for(var d=y.fields(b.map.h.info);a<d.length;){var f=d[a];++a;var g=y.field(b.map.h.info,f);c.h[f]=g}if(this.scene.load(c)){this._scId=c.h.id;a=this._colLoad=0;for(d=this.scene.collections;a<d.length;)b=d[a],++a,b!=""&&(Object.prototype.hasOwnProperty.call(this.collections.h,b)&&(this.collections.h[b].kill(),
g=this.collections,Object.prototype.hasOwnProperty.call(g.h,b)&&delete g.h[b]),this._colLoad++,c=this.collections,g=new xg(this._path+"collection/"+b+".json",m(this,this.onColLoad)),c.h[b]=g);if(this._colLoad==0)this.onColLoad()}else k.showPopup(k.ln.get("scene-load-windowtitle"),k.ln.get("scene-load-error"),320,160,k.ln.get("default-ok"))}else k.showPopup(k.ln.get("scene-load-windowtitle"),k.ln.get("scene-load-error"),320,160,k.ln.get("default-ok"));else k.showPopup(k.ln.get("scene-load-windowtitle"),
k.ln.get("scene-load-error"),320,160,k.ln.get("default-ok"))},onSceneLoaded:function(a,b){if(a&&(p.movie.preventHistory||this._scId==""||p.history.push(this._scId),p.movie.preventHistory=!1,p.movie.scene.clear(),this.scene.load(b.map))){b.url.indexOf(".json")!=-1?(a=N.replace(b.url,".json","").split("/"),this._scId=a[a.length-1]):Object.prototype.hasOwnProperty.call(b.map.h,"id")&&(this._scId=b.map.h.id);var c=b.rawtext;this._cacheScene.h[this._scId]=c;b=this._colLoad=0;for(a=this.scene.collections;b<
a.length;){var d=a[b];++b;c=!0;try{c=Object.prototype.hasOwnProperty.call(this.collections.h,d)}catch(g){c=!1}if(c){if(!this.collections.h[d].ok){this.collections.h[d].kill();this._colLoad++;var f=this.collections;c=new xg(this._path+"collection/"+d+".json",m(this,this.onColLoad));f.h[d]=c}}else this._colLoad++,c=this.collections,f=new xg(this._path+"collection/"+d+".json",m(this,this.onColLoad)),c.h[d]=f}if(this._colLoad==0)this.onColLoad()}},onSceneCache:function(a,b){var c=V.substr(b.url,-37,32);
a&&this.scene.checkFields(b.map)?this._cacheScene.h[c]=b.rawtext:Object.prototype.hasOwnProperty.call(this._cacheScene.h,c)&&(a=this._cacheScene,Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c])},onColLoad:function(){this._colLoad--;this._colLoad<=0&&(this._colLoad=0,this._actions.h.scene(this.get_scLoaded()))},__class__:om,__properties__:{get_scLoaded:"get_scLoaded",get_scId:"get_scId",get_mvLoaded:"get_mvLoaded",get_mvId:"get_mvId"}};var Gj=function(a){this.frtime=100;this.frames=1;this.order=
0;this.action="";this.ok=!1;this.ok=!0;Object.prototype.hasOwnProperty.call(a,"name")?this.name=y.field(a,"name"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"type")?this.type=y.field(a,"type"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"order")?this.order=y.field(a,"order"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"time")?this.time=y.field(a,"time"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"action")?this.action=y.field(a,"action"):
this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"frames")?this.frames=y.field(a,"frames"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"frtime")?this.frtime=y.field(a,"frtime"):this.ok=!1;if(this.ok&&Object.prototype.hasOwnProperty.call(a,"file")){var b=y.field(a,"file");if(Object.prototype.hasOwnProperty.call(b,"@1")){this.file=new G;var c=y.field(b,"@1");this.file.h["@1"]=c;Object.prototype.hasOwnProperty.call(b,"@2")?(c=y.field(b,"@2"),this.file.h["@2"]=c,this.file.h["@2"]==
""&&(c=this.file.h["@1"],this.file.h["@2"]=c)):(c=this.file.h["@1"],this.file.h["@2"]=c);Object.prototype.hasOwnProperty.call(b,"@3")?(c=y.field(b,"@3"),this.file.h["@3"]=c,this.file.h["@3"]==""&&(c=this.file.h["@2"],this.file.h["@3"]=c)):(c=this.file.h["@2"],this.file.h["@3"]=c);Object.prototype.hasOwnProperty.call(b,"@4")?(c=y.field(b,"@4"),this.file.h["@4"]=c,this.file.h["@4"]==""&&(c=this.file.h["@3"],this.file.h["@4"]=c)):(c=this.file.h["@3"],this.file.h["@4"]=c);Object.prototype.hasOwnProperty.call(b,
"@5")?(c=y.field(b,"@5"),this.file.h["@5"]=c,this.file.h["@5"]==""&&(c=this.file.h["@4"],this.file.h["@5"]=c)):(c=this.file.h["@4"],this.file.h["@5"]=c)}else this.ok=!1;this.time=y.field(a,"time")}else this.ok=!1};t["com.tilbuci.def.AssetData"]=Gj;Gj.__name__="com.tilbuci.def.AssetData";Gj.prototype={ok:null,name:null,type:null,time:null,action:null,order:null,frames:null,frtime:null,file:null,kill:function(){this.ok=!1;this.action=this.type=this.name=null;this.time=0;for(var a=this.file.h,b=Object.keys(a),
c=b.length,d=0;d<c;){var f=a[b[d++]],g=this.file;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}this.file=null},toObject:function(){return{order:this.order,name:this.name,type:this.type,time:this.time,action:this.action,frames:this.frames,frtime:this.frtime,file:{"@1":this.file.h["@1"],"@2":this.file.h["@2"],"@3":this.file.h["@3"],"@4":this.file.h["@4"],"@5":this.file.h["@5"]}}},__class__:Gj};var ye=function(a){this.reqFields=[];a!=null&&(this.reqFields=a)};t["com.tilbuci.def.DefBase"]=
ye;ye.__name__="com.tilbuci.def.DefBase";ye.prototype={reqFields:null,checkFields:function(a){for(var b=!0,c=0,d=this.reqFields.length;c<d;){var f=c++;Object.prototype.hasOwnProperty.call(a.h,this.reqFields[f])||(b=!1)}return b},kill:function(){for(;this.reqFields.length>0;)this.reqFields.shift();this.reqFields=null},__class__:ye};var xg=function(a,b,c){c==null&&(c=!0);this.assetOrder=[];this.assets=new G;this.time=1;this.transition="none";this.name="";this.ok=!1;ye.call(this,["name","transition",
"time","assets"]);this._acLoad=b;c&&(b=null,p.nocache&&(b=new G,b.h.rand=Math.ceil(Math.random()*1E4)),new Ob(!0,a,"GET",b,4,m(this,this.onLoad)))};t["com.tilbuci.def.CollectionData"]=xg;xg.__name__="com.tilbuci.def.CollectionData";xg.__super__=ye;xg.prototype=I(ye.prototype,{ok:null,name:null,transition:null,time:null,assets:null,assetOrder:null,_acLoad:null,toJson:function(){return yg.print(this.toObject(),null,null)},fromJson:function(a){a=Ga.jsonAsMap(a);if(Object.prototype.hasOwnProperty.call(a.h,
"name")){this.ok=!0;this.name=a.h.name;this.transition=a.h.transition;this.time=a.h.time;for(var b=0,c=y.fields(a.h.assets);b<c.length;){var d=c[b];++b;var f=this.assets,g=new Gj(y.field(a.h.assets,d));f.h[d]=g;this.assetOrder.push("")}a=Object.keys(this.assets.h);b=a.length;for(c=0;c<b;)d=a[c++],this.assetOrder[this.assets.h[d].order]=d;return!0}return!1},toObject:function(){for(var a={},b=Object.keys(this.assets.h),c=b.length,d=0;d<c;){var f=b[d++];a[f]=this.assets.h[f].toObject()}return{name:this.name,
transition:this.transition,time:this.time,assets:a}},cloneData:function(){return{name:this.name,transition:this.transition,time:this.time,assets:this.assets,assetOrder:this.assetOrder}},kill:function(){ye.prototype.kill.call(this);this.transition=this.name=null;for(var a=Object.keys(this.assets.h),b=a.length,c=0;c<b;){var d=a[c++];this.assets.h[d].kill();var f=this.assets;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}for(this.assets=null;this.assetOrder.length>0;)this.assetOrder.shift();
this.assetOrder=null},onLoad:function(a,b){this.ok=!1;if(a&&this.checkFields(b.map)){this.ok=!0;this.name=b.map.h.name;this.transition=b.map.h.transition;this.time=b.map.h.time;a=0;for(var c=y.fields(b.map.h.assets);a<c.length;){var d=c[a];++a;var f=this.assets,g=new Gj(y.field(b.map.h.assets,d));f.h[d]=g;this.assetOrder.push("")}b=Object.keys(this.assets.h);a=b.length;for(c=0;c<a;)d=b[c++],this.assetOrder[this.assets.h[d].order]=d}this._acLoad!=null&&this._acLoad();this._acLoad=null},__class__:xg});
var ii=function(a){this.playOnLoad=!0;this.timedAc=new G;(this.ok=!0,Object.prototype.hasOwnProperty.call(a,"collection"))?this.collection=y.field(a,"collection"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"asset")?this.asset=y.field(a,"asset"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"action")?this.action=y.field(a,"action"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"play")?this.playOnLoad=y.field(a,"play"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"horizontal")?this.horizontal=new Ph(y.field(a,"horizontal")):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=new Ph(y.field(a,"vertical")):this.ok=!1;!this.ok||this.horizontal.ok&&this.vertical.ok||(this.ok=!1);this.ok&&(this.asset=V.substr(this.asset,0,32));this.ok&&Object.prototype.hasOwnProperty.call(a,"actionover")?this.actionover=y.field(a,"actionover"):this.actionover="";if(this.ok&&Object.prototype.hasOwnProperty.call(a,"timedac"))if(a=H.string(y.field(a,
"timedac")),a=="")this.timedAc=new G;else if(a=Ga.jsonParse(a),a==0)this.timedAc=new G;else for(var b=0,c=y.fields(a);b<c.length;){var d=c[b];++b;var f=y.field(a,d);this.timedAc.h[d]=f}else this.timedAc=new G};t["com.tilbuci.def.InstanceData"]=ii;ii.__name__="com.tilbuci.def.InstanceData";ii.prototype={ok:null,collection:null,asset:null,action:null,actionover:null,timedAc:null,playOnLoad:null,horizontal:null,vertical:null,kill:function(){this.ok=!1;this.actionover=this.action=this.asset=this.collection=
null;this.horizontal.kill();this.horizontal=null;this.vertical.kill();this.vertical=null;for(var a=Object.keys(this.timedAc.h),b=a.length,c=0;c<b;){var d=a[c++],f=this.timedAc;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.timedAc=null},toObject:function(){var a="";ib.count(this.timedAc)>0&&(a=Ga.jsonStringify(this.timedAc));return{collection:this.collection,asset:this.asset,action:this.action,actionover:this.actionover,timedac:a,play:this.playOnLoad,horizontal:this.horizontal.toObject(),
vertical:this.vertical.toObject()}},toJson:function(){return Ga.jsonStringify(this.toObject())},clone:function(){return new ii(this.toObject())},__class__:ii};var Ph=function(a){this.textAlign="left";this.textBackground="";this.textLeading=this.textSpacing=0;this.textBold=this.textItalic=!1;this.textColor="0xFFFFFF";this.textSize=12;this.textFont="_sans";this.glow=[];this.dropshadow=[];this.blur=[];this.blend="normal";this.pan=0;this.volume=1;this.colorAlpha=0;this.color="0x000000";this.visible=!0;
this.rotation=0;(this.ok=!0,Object.prototype.hasOwnProperty.call(a,"order"))?this.order=y.field(a,"order"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"x")?this.x=y.field(a,"x"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"y")?this.y=y.field(a,"y"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"alpha")?this.alpha=y.field(a,"alpha"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"width")?this.width=y.field(a,"width"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"height")?this.height=y.field(a,"height"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"rotation")?this.rotation=y.field(a,"rotation"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"visible")?this.visible=y.field(a,"visible"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"color")?this.color=y.field(a,"color"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"colorAlpha")?this.colorAlpha=y.field(a,"colorAlpha"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"volume")?this.volume=y.field(a,"volume"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"pan")?this.pan=y.field(a,"pan"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"blur")?(this.blur=y.field(a,"blur").split(";"),this.blur.length!=2&&(this.blur=[])):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"dropshadow")?(this.dropshadow=y.field(a,"dropshadow").split(";"),this.dropshadow.length!=8&&(this.dropshadow=[])):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"textFont")?this.textFont=y.field(a,"textFont"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textSize")?this.textSize=y.field(a,"textSize"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textColor")?this.textColor=y.field(a,"textColor"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textBold")?this.textBold=y.field(a,"textBold"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textItalic")?this.textItalic=y.field(a,"textItalic"):this.ok=!1;this.ok&&
Object.prototype.hasOwnProperty.call(a,"textLeading")?this.textLeading=y.field(a,"textLeading"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textSpacing")?this.textSpacing=y.field(a,"textSpacing"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textBackground")?this.textBackground=y.field(a,"textBackground"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textAlign")?this.textAlign=y.field(a,"textAlign"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"glow")?(this.glow=y.field(a,"glow").split(";"),this.glow.length!=5&&(this.glow=[])):this.glow=[];this.ok&&Object.prototype.hasOwnProperty.call(a,"blend")?this.blend=y.field(a,"blend"):this.blend="normal"};t["com.tilbuci.def.InstanceDesc"]=Ph;Ph.__name__="com.tilbuci.def.InstanceDesc";Ph.prototype={ok:null,order:null,x:null,y:null,alpha:null,width:null,height:null,rotation:null,visible:null,color:null,colorAlpha:null,volume:null,pan:null,blend:null,blur:null,dropshadow:null,glow:null,textFont:null,
textSize:null,textColor:null,textBold:null,textItalic:null,textLeading:null,textSpacing:null,textBackground:null,textAlign:null,kill:function(){for(this.ok=!1;this.blur.length>0;)this.blur.shift();for(this.blur=null;this.dropshadow.length>0;)this.dropshadow.shift();for(this.dropshadow=null;this.glow.length>0;)this.glow.shift();this.blend=this.textAlign=this.textBackground=this.textColor=this.textFont=this.color=this.glow=null},toObject:function(){return{order:this.order,x:this.x,y:this.y,alpha:this.alpha,
width:this.width,height:this.height,rotation:this.rotation,visible:this.visible,color:this.color,colorAlpha:this.colorAlpha,volume:this.volume,pan:this.pan,blur:this.blur.join(";"),dropshadow:this.dropshadow.join(";"),glow:this.glow.join(";"),blend:this.blend,textFont:this.textFont,textSize:this.textSize,textColor:this.textColor,textBold:this.textBold,textItalic:this.textItalic,textLeading:this.textLeading,textSpacing:this.textSpacing,textBackground:this.textBackground,textAlign:this.textAlign}},
__class__:Ph};var ji=function(a,b){this.name=a;this.file=b};t["com.tilbuci.def.InterfaceLang"]=ji;ji.__name__="com.tilbuci.def.InterfaceLang";ji.prototype={name:null,file:null,__class__:ji};var le=function(){this.inputs=new G;this.highlightInt=null;this.encrypted=!1;this.loadingic=["","",""];this.highlight="";this.plugins=new G;this.flags=new G;this.numbers=new G;this.texts=new G;this.theme="";this.actions=[];this.style="";this.fonts=[];this.animation="linear";this.origin="center";this.time=1;this.vsgroups=
[];this.identify=!1;ye.call(this,"version title author copyright copyleft description favicon image key start acstart tags screen time origin animation fonts style theme texts numbers flags plugins".split(" "));this.screen=new rc;this.clear()};t["com.tilbuci.def.MovieData"]=le;le.__name__="com.tilbuci.def.MovieData";le.__super__=ye;le.prototype=I(ye.prototype,{version:null,title:null,author:null,copyright:null,copyleft:null,description:null,favicon:null,image:null,key:null,fallback:null,identify:null,
vsgroups:null,start:null,acstart:null,tags:null,screen:null,time:null,origin:null,animation:null,fonts:null,style:null,actions:null,theme:null,texts:null,numbers:null,flags:null,plugins:null,highlight:null,loadingic:null,encrypted:null,highlightInt:null,inputs:null,clear:function(){this.version=0;this.fallback=this.key=this.image=this.favicon=this.description=this.copyleft=this.copyright=this.author=this.title="";this.identify=!1;this.vsgroups=[];this.acstart=this.start="";this.tags=[];this.time=
1;this.origin="center";this.animation="linear";this.highlight="";this.highlightInt=null;this.loadingic=["","",""];this.encrypted=!1;for(this.screen.clear();this.fonts.length>0;){var a=this.fonts.shift();a.name=null;a.file=null}for(;this.actions.length>0;){var b=this.actions.shift();b.name=null;b.ac=null}this.theme=this.style="";a=this.texts.h;b=Object.keys(a);for(var c=b.length,d=0;d<c;){var f=b[d++];a=this.texts;Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f]}a=this.numbers.h;b=Object.keys(a);
c=b.length;for(d=0;d<c;)f=b[d++],a=this.numbers,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];a=this.flags.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.flags,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];a=this.plugins.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.plugins,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];a=p.plugins.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],p.plugins.h[d].active=!1;p.style.clear();a=p.mvActions.h;
c=Object.keys(a);d=c.length;for(f=0;f<d;)b=c[f++],a=p.mvActions,Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b];Ca.defaultEase=xn.get_easeNone();a=new G;a.h.keyup="up";a.h.keydown="down";a.h.keyleft="left";a.h.keyright="right";a.h.keyspace="";a.h.keyenter="target";a.h.keypup="nout";a.h.keypdown="nin";a.h.keyhome="nothing";a.h.keyend="nothing";a.h.swiperight="right";a.h.swipeleft="left";a.h.swipetop="up";a.h.swipebottom="down";a.h.touchhold="nothing";a.h.pinchopen="nothing";a.h.pinchclose=
"nothing";a.h.mousemiddle="nothing";a.h.mouseright="nothing";a.h.mousewheelup="nothing";a.h.mousewheeldown="nothing";this.inputs=a},load:function(a){if(this.checkFields(a)){this.version=a.h.version;this.title=a.h.title;this.author=a.h.author;this.copyright=a.h.copyright;this.copyleft=a.h.copyleft;this.description=a.h.description;this.favicon=a.h.favicon;this.image=a.h.image;this.key=a.h.key;this.start=a.h.start;this.acstart=a.h.acstart;this.tags=a.h.tags;this.screen.big=a.h.screen.big;this.screen.small=
a.h.screen.small;this.screen.type=a.h.screen.type;this.screen.bgcolor=H.parseInt(a.h.screen.bgcolor);this.time=a.h.time;this.origin=a.h.origin;this.animation=a.h.animation;this.fonts=a.h.fonts;this.style=a.h.style;this.actions=a.h.actions;this.theme=a.h.theme;Object.prototype.hasOwnProperty.call(a.h,"fallback")?this.fallback=a.h.fallback:this.fallback="";Object.prototype.hasOwnProperty.call(a.h,"identify")?this.identify=a.h.identify:this.identify=!1;Object.prototype.hasOwnProperty.call(a.h,"vsgroups")?
this.vsgroups=a.h.vsgroups:this.vsgroups=[];this.vsgroups.length>0&&(this.identify=!0);Object.prototype.hasOwnProperty.call(a.h,"highlight")?(this.highlight=a.h.highlight,this.highlightInt=H.parseInt(this.highlight)):(this.highlight="",this.highlightInt=null);if(Object.prototype.hasOwnProperty.call(a.h,"inputs"))for(var b=0,c=y.fields(a.h.inputs);b<c.length;){var d=c[b];++b;var f=y.field(a.h.inputs,d);this.inputs.h[d]=f}Object.prototype.hasOwnProperty.call(a.h,"loadingic")?this.loadingic=a.h.loadingic==
""?["","",""]:Ga.jsonParse(a.h.loadingic):this.loadingic=["","",""];Object.prototype.hasOwnProperty.call(a.h,"encrypted")?this.encrypted=a.h.encrypted:this.encrypted=!1;p.mdata=this;switch(this.animation){case "bounce.in":Ca.defaultEase=Qk.easeIn;break;case "bounce.inout":Ca.defaultEase=Qk.easeInOut;break;case "bounce.out":Ca.defaultEase=Qk.easeOut;break;case "cubic.in":Ca.defaultEase=Rk.easeIn;break;case "cubic.inout":Ca.defaultEase=Rk.easeInOut;break;case "cubic.out":Ca.defaultEase=Rk.easeOut;break;
case "elastic.in":Ca.defaultEase=hj.easeIn;break;case "elastic.inout":Ca.defaultEase=hj.easeInOut;break;case "elastic.out":Ca.defaultEase=hj.easeOut;break;case "expo.in":Ca.defaultEase=jk.easeIn;break;case "expo.inout":Ca.defaultEase=jk.easeInOut;break;case "expo.out":Ca.defaultEase=jk.easeOut;break;case "quad.in":Ca.defaultEase=Ni.easeIn;break;case "quad.inout":Ca.defaultEase=Ni.easeInOut;break;case "quad.out":Ca.defaultEase=Ni.easeOut;break;case "quart.in":Ca.defaultEase=th.easeIn;break;case "quart.inout":Ca.defaultEase=
th.easeInOut;break;case "quart.out":Ca.defaultEase=th.easeOut;break;case "quint.in":Ca.defaultEase=Sk.easeIn;break;case "quint.inout":Ca.defaultEase=Sk.easeInOut;break;case "quint.out":Ca.defaultEase=Sk.easeOut;break;case "sine.in":Ca.defaultEase=Tk.easeIn;break;case "sine.inout":Ca.defaultEase=Tk.easeInOut;break;case "sine.out":Ca.defaultEase=Tk.easeOut;break;default:this.animation="linear",Ca.defaultEase=xn.get_easeNone()}b=0;for(c=this.fonts;b<c.length;)d=c[b],++b,new nm(p.path+"media/font/"+d.file,
d.name,null,!1);b=p.mvActions.h;c=Object.keys(b);f=c.length;for(var g=0;g<f;)d=c[g++],b=p.mvActions,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=this.actions;b<c.length;)d=c[b],++b,f=d.ac,p.mvActions.h[d.name]=f;b=this.texts.h;c=Object.keys(b);f=c.length;for(g=0;g<f;)d=c[g++],b=this.texts,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=y.fields(a.h.texts);b<c.length;)d=c[b],++b,f=y.field(a.h.texts,d),this.texts.h[d]=f;b=this.numbers.h;c=Object.keys(b);
f=c.length;for(g=0;g<f;)d=c[g++],b=this.numbers,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=y.fields(a.h.numbers);b<c.length;)d=c[b],++b,f=y.field(a.h.numbers,d),this.numbers.h[d]=f;b=this.flags.h;c=Object.keys(b);f=c.length;for(g=0;g<f;)d=c[g++],b=this.flags,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=y.fields(a.h.flags);b<c.length;)d=c[b],++b,f=y.field(a.h.flags,d),this.flags.h[d]=f;b=p.plugins.h;b=Object.keys(b);d=b.length;for(c=0;c<d;)f=b[c++],
p.plugins.h[f].active=!1;b=this.plugins.h;c=Object.keys(b);f=c.length;for(g=0;g<f;)d=c[g++],b=this.plugins,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=y.fields(a.h.plugins);b<c.length;)d=c[b],++b,f=y.field(a.h.plugins,d),this.plugins.h[d]=f;this.applySets();return!0}return!1},applySets:function(a){a==null&&(a=!1);p.style.clear();p.style.parseCSS(this.style);for(var b=p.mvActions.h,c=Object.keys(b),d=c.length,f=0;f<d;){b=c[f++];var g=p.mvActions;Object.prototype.hasOwnProperty.call(g.h,
b)&&delete g.h[b]}c=0;for(d=this.actions;c<d.length;)b=d[c],++c,p.mvActions.h[b.name]=b.ac;a&&p.parser.clearVars();b=this.texts.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],p.parser.setString(d,this.texts.h[d]);b=this.flags.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],p.parser.setBool(d,this.flags.h[d]);b=this.numbers.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],p.parser.setFloat(d,this.numbers.h[d]),p.parser.setInt(d,Math.round(this.numbers.h[d]));b=p.plugins.h;a=Object.keys(b);
b=a.length;for(c=0;c<b;)d=a[c++],p.plugins.h[d].active=!1;b=p.plugins.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],Object.prototype.hasOwnProperty.call(this.plugins.h,d)?(p.plugins.h[d].active=this.plugins.h[d].active,p.plugins.h[d].setConfig(this.plugins.h[d].config)):p.plugins.h[d].active=!1;a=!0;Object.prototype.hasOwnProperty.call(ya,"mode")&&y.field(ya,"mode")=="editor"&&(a=!1);a&&(p.theme=new Gs(this.theme),bc.setTheme(p.theme));p.contraptions.loadLoadingIc()},toJson:function(){return yg.print({version:this.version,
title:this.title,author:this.author,copyright:this.copyright,copyleft:this.copyleft,start:this.start,acstart:this.acstart,description:this.description,favicon:this.favicon,key:this.key,identify:this.identify,vsgroups:this.vsgroups,image:this.image,tags:this.tags,screen:{big:this.screen.big,small:this.screen.small,type:this.screen.type,bgcolor:"0x"+N.hex(this.screen.bgcolor)},time:this.time,origin:this.origin,animation:this.animation,fonts:this.fonts,highlight:this.highlight,loadingic:this.loadingic,
encrypted:this.encrypted,inputs:this.inputs},null,null)},kill:function(){ye.prototype.kill.call(this);for(this.acstart=this.start=this.image=this.favicon=this.description=this.copyleft=this.copyright=this.author=this.title=null;this.tags.length>0;)this.tags.shift();this.tags=null;this.screen.kill();this.screen=null;this.time=1;for(this.animation=this.origin=null;this.fonts.length>0;){var a=this.fonts.shift();a.name=null;a.file=null}for(this.theme=this.style=this.fonts=null;this.actions.length>0;)a=
this.actions.shift(),a.name=null,a.ac=null;this.actions=null;a=this.texts.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=b[d++];a=this.texts;Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f]}this.texts=null;a=this.numbers.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.numbers,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];this.numbers=null;a=this.flags.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.flags,Object.prototype.hasOwnProperty.call(a.h,
f)&&delete a.h[f];this.flags=null;a=this.plugins.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.plugins,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];for(this.highlightInt=this.highlight=this.plugins=null;this.loadingic.length>0;)this.loadingic.shift();this.loadingic=null;a=this.inputs.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.inputs,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];this.inputs=null},__class__:le});var rc=function(){this.clear()};
t["com.tilbuci.def.MovieDataScreen"]=rc;rc.__name__="com.tilbuci.def.MovieDataScreen";rc.prototype={big:null,small:null,type:null,bgcolor:null,clear:function(){this.small=this.big=0;this.type="";this.bgcolor=0},kill:function(){this.type=null},__class__:rc};var Fs=function(){this.dflow=[];this.navigation=new G;this.ackeyframes=[];this.acstart="";this.loop=0;this.keyframes=[];this.collections=[];this.staticsc=!1;this.title=this.about=this.image="";ye.call(this,"title about image navigation collections keyframes loop acstart ackeyframes".split(" "));
this.clear()};t["com.tilbuci.def.SceneData"]=Fs;Fs.__name__="com.tilbuci.def.SceneData";Fs.__super__=ye;Fs.prototype=I(ye.prototype,{title:null,about:null,image:null,staticsc:null,collections:null,keyframes:null,loop:null,acstart:null,ackeyframes:null,navigation:null,dflow:null,clear:function(){this.image=this.about=this.title="";this.staticsc=!1;var a=this.navigation.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++],f=this.navigation;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=
new G;b.h.up="";b.h.down="";b.h.left="";b.h.right="";b.h.nin="";b.h.nout="";this.navigation=b;this.dflow=[["",""],["",""],["",""],["",""]];for(this.loop=0;this.collections.length>0;)this.collections.shift();for(;this.keyframes.length>0;)for(b=this.keyframes.shift(),a=b.h,a=Object.keys(a),c=a.length,d=0;d<c;)f=a[d++],b.h[f].kill(),Object.prototype.hasOwnProperty.call(b.h,f)&&delete b.h[f];for(this.acstart="";this.ackeyframes.length>0;)this.ackeyframes.shift()},load:function(a){p.contraptions.removeContraptions();
p.contraptions.usingDflow=!1;if(this.checkFields(a)){this.title=a.h.title;this.about=a.h.about;this.image=a.h.image;var b=new G;b.h.up=a.h.navigation.up;b.h.down=a.h.navigation.down;b.h.left=a.h.navigation.left;b.h.right=a.h.navigation.right;b.h.nin=a.h.navigation.nin;b.h.nout=a.h.navigation.nout;for(this.navigation=b;this.collections.length>0;)this.collections.shift();var c=a.h.collections;if(c.length>0)for(b=0;b<c.length;){var d=c[b];++b;this.collections.push(d)}for(;this.keyframes.length>0;){var f=
this.keyframes.shift();b=Object.keys(f.h);var g=b.length;for(d=0;d<g;)c=b[d++],f.h[c].kill(),Object.prototype.hasOwnProperty.call(f.h,c)&&delete f.h[c]}b=0;for(g=y.fields(a.h.keyframes);b<g.length;){c=g[b];++b;f=new G;for(var h=0,n=y.fields(y.field(a.h.keyframes,c));h<n.length;){var l=n[h];++h;d=new ii(y.field(y.field(a.h.keyframes,c),l));f.h[l]=d}this.keyframes.push(f)}this.loop=a.h.loop;if(this.loop>=this.keyframes.length||this.loop<0)this.loop=0;for(this.acstart=a.h.acstart;this.ackeyframes.length>
0;)this.ackeyframes.shift();b=0;for(g=y.fields(a.h.ackeyframes);b<g.length;)c=g[b],++b,this.ackeyframes.push(y.field(a.h.ackeyframes,c));Object.prototype.hasOwnProperty.call(a.h,"staticsc")?this.staticsc=a.h.staticsc:this.staticsc=!1;if(Object.prototype.hasOwnProperty.call(a.h,"dflow"))for(this.dflow=[["",""],["",""],["",""],["",""]],b=f=0,g=y.fields(a.h.dflow);b<g.length;)c=g[b],++b,c=y.field(a.h.dflow,c),c!=null&&(this.dflow[f]=c),++f;p.contraptions.hideLoadingIc();return!0}p.contraptions.hideLoadingIc();
return!1},toJson:function(){return yg.print(this.toObject(),null,null)},toObject:function(){for(var a=[],b=0,c=this.keyframes.length;b<c;){for(var d=b++,f={},g=Object.keys(this.keyframes[d].h),h=g.length,n=0;n<h;){var l=g[n++];f[l]=this.keyframes[d].h[l].toObject()}a.push(f)}return{title:this.title,about:this.about,image:this.image,staticsc:this.staticsc,navigation:{up:this.navigation.h.up,down:this.navigation.h.down,left:this.navigation.h.left,right:this.navigation.h.right,nin:this.navigation.h.nin,
nout:this.navigation.h.nout},dflow:this.dflow,collections:this.collections,loop:this.loop,acstart:this.acstart,ackeyframes:this.ackeyframes,keyframes:a}},fromObject:function(a){Object.prototype.hasOwnProperty.call(a,"title")&&(this.title=y.field(a,"title"));Object.prototype.hasOwnProperty.call(a,"about")&&(this.about=y.field(a,"about"));Object.prototype.hasOwnProperty.call(a,"image")&&(this.image=y.field(a,"image"));Object.prototype.hasOwnProperty.call(a,"staticsc")&&(this.staticsc=y.field(a,"staticsc"));
Object.prototype.hasOwnProperty.call(a,"loop")&&(this.loop=y.field(a,"loop"));Object.prototype.hasOwnProperty.call(a,"acstart")&&(this.acstart=y.field(a,"acstart"));Object.prototype.hasOwnProperty.call(a,"ackeyframes")&&(this.ackeyframes=y.field(a,"ackeyframes"));Object.prototype.hasOwnProperty.call(a,"collections")&&(this.collections=y.field(a,"collections"));if(Object.prototype.hasOwnProperty.call(a,"navigation")){var b=y.field(a,"navigation");if(Object.prototype.hasOwnProperty.call(b,"up")){var c=
y.field(b,"up");this.navigation.h.up=c}Object.prototype.hasOwnProperty.call(b,"down")&&(c=y.field(b,"down"),this.navigation.h.down=c);Object.prototype.hasOwnProperty.call(b,"left")&&(c=y.field(b,"left"),this.navigation.h.left=c);Object.prototype.hasOwnProperty.call(b,"right")&&(c=y.field(b,"right"),this.navigation.h.right=c);Object.prototype.hasOwnProperty.call(b,"nin")&&(c=y.field(b,"nin"),this.navigation.h.nin=c);Object.prototype.hasOwnProperty.call(b,"nout")&&(c=y.field(b,"nout"),this.navigation.h.nout=
c)}if(Object.prototype.hasOwnProperty.call(a,"dflow")){this.dflow=[["",""],["",""],["",""],["",""]];c=y.field(a,"dflow");for(var d=0,f=0,g=y.fields(c);f<g.length;)b=g[f],++f,b=y.field(c,b),b!=null&&(this.dflow[d]=b),++d}if(Object.prototype.hasOwnProperty.call(a,"keyframes")){for(;this.keyframes.length>0;)for(f=this.keyframes.shift(),g=Object.keys(f.h),c=g.length,d=0;d<c;)b=g[d++],f.h[b].kill(),Object.prototype.hasOwnProperty.call(f.h,b)&&delete f.h[b];a=y.field(a,"keyframes");f=0;for(g=y.fields(a);f<
g.length;){b=g[f];++f;d=new G;for(var h=0,n=y.fields(y.field(a,b));h<n.length;){var l=n[h];++h;c=new ii(y.field(y.field(a,b),l));d.h[l]=c}this.keyframes.push(d)}}},hasDflow:function(){return this.dflow[0][1]==""&&this.dflow[1][1]==""&&this.dflow[2][1]==""?this.dflow[3][1]!="":!0},kill:function(){ye.prototype.kill.call(this);this.image=this.about=this.title=null;var a=this.navigation.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++],f=this.navigation;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}for(this.navigation=null;this.collections.length>0;)this.collections.shift();for(this.collections=null;this.keyframes.length>0;)for(b=this.keyframes.shift(),a=b.h,a=Object.keys(a),c=a.length,d=0;d<c;)f=a[d++],b.h[f].kill(),Object.prototype.hasOwnProperty.call(b.h,f)&&delete b.h[f];for(;this.dflow.length>0;)this.dflow.shift();for(this.acstart=this.keyframes=this.dflow=null;this.ackeyframes.length>0;)this.ackeyframes.shift();this.ackeyframes=null},__class__:Fs});var To=function(){this._cursor=
-1;this._data=[];this._data=[];this._cursor=-1};t["com.tilbuci.def.TBArray"]=To;To.__name__="com.tilbuci.def.TBArray";To.prototype={_data:null,_cursor:null,kill:function(){for(;this._data.length>0;)this._data.shift();this._data=null},current:function(){this._cursor<0&&this._data.length>0&&(this._cursor=0);return this._cursor>=0&&this._data.length>this._cursor?p.parser.parseString(this._data[this._cursor]):""},currentInt:function(){this._cursor<0&&this._data.length>0&&(this._cursor=0);return this._cursor>=
0&&this._data.length>this._cursor?p.parser.parseInt(this._data[this._cursor]):0},currentFloat:function(){this._cursor<0&&this._data.length>0&&(this._cursor=0);return this._cursor>=0&&this._data.length>this._cursor?p.parser.parseFloat(this._data[this._cursor]):0},currentBool:function(){this._cursor<0&&this._data.length>0&&(this._cursor=0);return this._cursor>=0&&this._data.length>this._cursor?p.parser.parseBool(this._data[this._cursor]):!1},next:function(){this._cursor++;this._data.length==0?this._cursor=
-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.current()},nextInt:function(){this._cursor++;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentInt()},nextFloat:function(){this._cursor++;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentFloat()},
nextBool:function(){this._cursor++;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentBool()},previous:function(){this._cursor--;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.current()},previousInt:function(){this._cursor--;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=
0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentInt()},previousFloat:function(){this._cursor--;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentFloat()},previousBool:function(){this._cursor--;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentBool()},setIndex:function(a){this._cursor=
this._data.length==0?-1:a>=this._data.length?this._data.length-1:a<0?0:a},currentIndex:function(){return this._cursor},toJson:function(){return Ga.jsonStringify(this._data)},fromJson:function(a){this._data=Ga.jsonParse(a);if(this._data==null)return this._data=[],this._cursor=-1,!1;if(this._data.length>0)return this._cursor=0,!0;this._cursor=-1;return!1},push:function(a){this._data.push(a)},clear:function(){for(;this._data.length>0;)this._data.shift();this._cursor=-1},set:function(a,b){if(a>=0){for(;this._data.length<=
a;)this._data.push("");this._data[a]=b}},get:function(a){return a>=0&&this._data.length>a?p.parser.parseString(this._data[a]):""},getInt:function(a){return a>=0&&this._data.length>a?p.parser.parseInt(this._data[a]):0},getFloat:function(a){return a>=0&&this._data.length>a?p.parser.parseFloat(this._data[a]):0},getBool:function(a){return a>=0&&this._data.length>a?p.parser.parseBool(this._data[a]):!1},__class__:To};var Uo=function(a){this._scrollPos=0;tc.call(this,"html",!1,a);this._text=new Jc;this._text.set_selectable(!1);
this._format=new ef;this._format.align=3;this._text.set_defaultTextFormat(this._format);this._text.set_wordWrap(!0);this._text.set_multiline(!0);this._text.set_embedFonts(!0);this._text.set_cacheAsBitmap(!0);this._text.condenseWhite=!0;this._text.set_styleSheet(p.style);this.addChild(this._text);this._loader=new Jj;this._loader.addEventListener("complete",m(this,this.onOk));this._loader.addEventListener("ioError",m(this,this.onError));this._loader.addEventListener("securityError",m(this,this.onError))};
t["com.tilbuci.display.HtmlImage"]=Uo;Uo.__name__="com.tilbuci.display.HtmlImage";Uo.__super__=tc;Uo.prototype=I(tc.prototype,{_text:null,_format:null,_loader:null,_scrollPos:null,setFormat:function(a,b,c,d,f,g,h,n,l){this._format.set_font(a);this._format.set_size(b);this._format.color=H.parseInt(c);this._format.set_bold(d);this._format.set_italic(f);this._format.leading=g;this._format.letterSpacing=h;switch(l){case "center":this._format.align=0;break;case "justify":this._format.align=2;break;case "right":this._format.align=
4;break;default:this._format.align=3}this._text.set_defaultTextFormat(this._format);n==""?this._text.set_background(!1):(this._text.set_backgroundColor(H.parseInt(n)),this._text.set_background(!0))},setTextSize:function(a,b){this._text.set_width(this.oWidth=a);this._text.set_height(this.oHeight=b);this._text.set_scrollV(this._scrollPos)},textScroll:function(a){switch(a){case -1:this._scrollPos>0&&(this._scrollPos=this._text.set_scrollV(this._scrollPos-1));break;case 0:this._scrollPos=this._text.set_scrollV(0);
break;case 1:this._scrollPos<this._text.get_maxScrollV()&&(this._scrollPos=this._text.set_scrollV(this._scrollPos+1));break;case 2:this._scrollPos=this._text.set_scrollV(this._text.get_maxScrollV())}},setText:function(a){a=p.parser.parseString(a);this._text.set_htmlText(a);this._scrollPos=this._text.set_scrollV(0)},getText:function(){return this._text.get_text()},load:function(a){a=N.replace(a,p.path+"media/html/","");a=p.parser.parsePath(p.path+"media/html/"+a);this._loader.load(new se(a))},kill:function(){tc.prototype.kill.call(this);
this._loader.removeEventListener("complete",m(this,this.onOk));this._loader.removeEventListener("ioError",m(this,this.onError));this._loader.removeEventListener("securityError",m(this,this.onError));this._format=this._text=this._loader=null},onOk:function(a){this._text.set_htmlText(p.parser.parseString(this._loader.data));this.oWidth=this._text.get_width();this.oHeight=this._text.get_height();this._onLoad(!0)},onError:function(a){this._text.set_htmlText("");this._onLoad(!1)},__class__:Uo});var Hs=
function(a,b){this._dragging=this.selected=!1;this._changeAsset="";this.keep=this._firstLoad=this._playOnLoad=!0;this._path=this._collection=this._asset="";this._current=1;this.lastClick=new Ea;Da.call(this);this._name=a;this._onSelect=b;this._display=new Da;this._mask=new Hd;this._mask.get_graphics().beginFill(0);this._mask.get_graphics().drawRect(0,0,64,64);this._mask.get_graphics().endFill();this.addChild(this._display);this.addChild(this._mask);this._display.set_mask(this._mask);this._im1=new Vo(m(this,
this.onLoad),a,m(this,this.onTimedAc));this._im2=new Vo(m(this,this.onLoad),a,m(this,this.onTimedAc));this._imCurrent=this._im1;this._imOther=this._im2;this._current=1;this._display.addChild(this._im1);this._display.addChild(this._im2);this._multSize=new Ea(1,1);p.mdata.origin!="none"&&this.set_alpha(0);this.set_rotation(0);p.movie.data.screen.type=="landscape"?(this.set_x(p.mdata.screen.big/2),this.set_y(p.mdata.screen.small/2)):p.movie.data.screen.type=="portrait"?(this.set_x(p.mdata.screen.small/
2),this.set_y(p.mdata.screen.big/2)):p.orientation=="horizontal"?(this.set_x(p.mdata.screen.big/2),this.set_y(p.mdata.screen.small/2)):(this.set_x(p.mdata.screen.small/2),this.set_y(p.mdata.screen.big/2));this._lastH=this._lastW=this.set_width(this.set_height(10));this._set=new iw;this.addEventListener("mouseDown",m(this,this.onClick));this.addEventListener("mouseOver",m(this,this.onMouseOver));this.addEventListener("mouseOut",m(this,this.onMouseOut))};t["com.tilbuci.display.InstanceImage"]=Hs;Hs.__name__=
"com.tilbuci.display.InstanceImage";Hs.__super__=Da;Hs.prototype=I(Da.prototype,{lastClick:null,_name:null,_display:null,_mask:null,_im1:null,_im2:null,_imCurrent:null,_imOther:null,_current:null,_data:null,_multSize:null,_desc:null,_path:null,_lastW:null,_lastH:null,_collection:null,_asset:null,keep:null,_firstLoad:null,_playOnLoad:null,_set:null,_changeAsset:null,_dragging:null,_onSelect:null,selected:null,playing:null,get_playing:function(){return this._imCurrent.get_playing()},currentType:null,
get_currentType:function(){return this._imCurrent.get_currentType()},currentMedia:null,get_currentMedia:function(){return this._imCurrent.get_currentMedia()},displayWidth:null,get_displayWidth:function(){return p.orientation=="horizontal"?this._data.horizontal.width:this._data.vertical.width},displayHeight:null,get_displayHeight:function(){return p.orientation=="horizontal"?this._data.horizontal.height:this._data.vertical.height},transition:null,get_transition:function(){return Object.prototype.hasOwnProperty.call(p.movie.collections.h,
this._collection)?p.movie.collections.h[this._collection].transition:""},get_width:function(){return this._mask!=null?this._mask.get_width():Da.prototype.get_width.call(this)},get_height:function(){return this._mask!=null?this._mask.get_height():Da.prototype.get_height.call(this)},set_width:function(a){this._mask!=null&&(this._mask.set_width(a),this._im1.set_width(a),this._im2.set_width(a));return a},set_height:function(a){this._mask!=null&&(this._mask.set_height(a),this._im1.set_height(a),this._im2.set_height(a));
return a},changeId:function(a,b){return this._name==a?(this._name=b,!0):!1},load:function(a){if(a.ok){if(Object.prototype.hasOwnProperty.call(p.movie.collections.h,a.collection)){if(p.movie.collections.h[a.collection].ok&&Object.prototype.hasOwnProperty.call(p.movie.collections.h[a.collection].assets.h,a.asset)){this._data=a;var b=p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply];if(b==this._path)return!0;this._path=b;this._playOnLoad=a.playOnLoad;if(this._imOther.load(a))return this._collection=
a.collection,this._asset=a.asset,this._imCurrent.stopTimer(),!0;this.set_visible(!1);return!1}this.set_visible(!1);return!1}this.set_visible(!1);return!1}this.set_visible(!1);return!1},getProp:function(a){switch(a){case "alpha":return this._desc.alpha;case "colorAlpha":return this._desc.colorAlpha;case "fontLeading":return this._imCurrent.getProp("fontLeading");case "fontSize":return this._imCurrent.getProp("fontSize");case "fontSpacing":return this._imCurrent.getProp("fontSpacing");case "height":return this._desc.height;
case "order":return this._desc.order;case "pan":return this._desc.pan;case "rotation":return this._desc.rotation;case "volume":return this._desc.volume;case "width":return this._desc.width;case "x":return this._desc.x;case "y":return this._desc.y;default:return 0}},getBoolProp:function(a){switch(a){case "fontBold":return this._imCurrent.getBoolProp("fontBold");case "fontItalic":return this._imCurrent.getBoolProp("fontItalic");case "visible":return this.get_visible();default:return!1}},getStringProp:function(a){switch(a){case "color":return this._desc.color;
case "font":return this._imCurrent.getStringProp("font");case "fontColor":return this._imCurrent.getStringProp("fontColor");case "text":return this._imCurrent.getStringProp("text");default:return""}},kill:function(){this.removeEventListener("mouseDown",m(this,this.onClick));this.removeEventListener("mouseOver",m(this,this.onMouseOver));this.removeEventListener("mouseOut",m(this,this.onMouseOut));this.removeChildren();this._display.set_mask(null);this._display.removeChildren();this._display=null;this._mask.get_graphics().clear();
this._imOther=this._imCurrent=this._mask=null;this._im1.kill();this._im1=null;this._im2.kill();this._path=this._desc=this._multSize=this._data=this._im2=null;this._set.kill();this._onSelect=this._changeAsset=this._asset=this._collection=this._set=null},place:function(){Ca.stop(this,null,!1,!1);if(this.keep&&this._data!=null){this._set.load(this._data.horizontal,this._data.vertical);this._desc=p.movie.data.screen.type=="landscape"?this._set.horizontal:p.movie.data.screen.type=="portrait"?this._set.vertical:
p.orientation=="horizontal"?this._set.horizontal:this._set.vertical;this._lastW=this._multSize.x*this._desc.width;this._lastH=this._multSize.y*this._desc.height;this._imCurrent.formatText(this._desc.textFont,this._desc.textSize,this._desc.textColor,this._desc.textBold,this._desc.textItalic,this._desc.textLeading,this._desc.textSpacing,this._desc.textBackground,this._desc.textAlign);this._imCurrent.setTextSize(this._desc.width,this._desc.height);Ca.tween(this,p.mdata.time,{x:this._desc.x,y:this._desc.y,
width:this._multSize.x*this._desc.width,height:this._multSize.y*this._desc.height,alpha:this._desc.alpha,rotation:this._desc.rotation}).smartRotation().autoVisible(!1);Ca.transform(this,p.mdata.time).color(H.parseInt(this._desc.color),this._desc.colorAlpha);this._imOther.stopSound();this._imCurrent.stopSound();this._imCurrent.iterateSound(this._desc.volume,this._desc.pan);var a=[];this._desc.dropshadow.length==8&&a.push(new Cl(H.parseInt(this._desc.dropshadow[0]),parseFloat(this._desc.dropshadow[1]),
H.parseInt(this._desc.dropshadow[2]),parseFloat(this._desc.dropshadow[3]),parseFloat(this._desc.dropshadow[4]),parseFloat(this._desc.dropshadow[5]),parseFloat(this._desc.dropshadow[6]),1,this._desc.dropshadow[7]=="1"));this._desc.blur.length==2&&a.push(new ij(parseFloat(this._desc.blur[0]),parseFloat(this._desc.blur[1])));this._desc.glow.length==5&&a.push(new ke(H.parseInt(this._desc.glow[0]),parseFloat(this._desc.glow[1]),H.parseInt(this._desc.glow[2]),H.parseInt(this._desc.glow[2]),H.parseInt(this._desc.glow[3]),
1,this._desc.glow[4]=="1"));this.set_filters(a);switch(this._desc.blend){case "add":this.set_blendMode(0);break;case "difference":this.set_blendMode(3);break;case "invert":this.set_blendMode(6);break;case "multiply":this.set_blendMode(9);break;case "screen":this.set_blendMode(12);break;case "subtract":this.set_blendMode(14);break;default:this.set_blendMode(10)}p.mode=="editor"&&Ca.stop(this,null,!0);this.set_visible(this._desc.visible)}else{a=this.get_x();var b=this.get_y(),c=this.get_width(),d=this.get_height(),
f=this.get_alpha();if(p.movie.data.screen.type=="landscape"){var g=p.mdata.screen.big;var h=p.mdata.screen.small}else p.movie.data.screen.type=="portrait"?(h=p.mdata.screen.big,g=p.mdata.screen.small):p.orientation=="horizontal"?(g=p.mdata.screen.big,h=p.mdata.screen.small):(h=p.mdata.screen.big,g=p.mdata.screen.small);switch(p.mdata.origin){case "alpha":f=0;break;case "bottom":b=-10-this.get_height();break;case "bottomkeep":b=-10-h+this.get_y();break;case "left":a=g+10;break;case "leftkeep":a=g+
10+this.get_x();break;case "none":this.set_alpha(0);f=0;break;case "right":a=-10-this.get_width();break;case "rightkeep":a=-10-g+this.get_x();break;case "top":b=h+10;break;case "topkeep":b=h+10+this.get_y();break;default:d=c=1,a=g/2,b=h/2,f=0}Ca.tween(this,p.mdata.time,{x:a,y:b,width:c,height:d,alpha:f}).autoVisible(!1);this.pause()}this._desc!=null&&this.parent.swapChildrenAt(this.parent.getChildIndex(this),this._desc.order)},setTextSize:function(a,b){this._imCurrent.setTextSize(a,b);this._imOther.setTextSize(a,
b);this._mask.set_width(this._im1.set_width(this._im2.get_width()));this._mask.set_height(this._im1.set_height(this._im2.get_height()))},formatText:function(a,b,c,d,f,g,h,n,l){this._imCurrent.formatText(a,b,c,d,f,g,h,n,l);this._imOther.formatText(a,b,c,d,f,g,h,n,l)},getOrder:function(){return k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.order:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.order},setOrder:function(a,b){b==
null&&(b=!0);k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.order=a:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.order=a;b&&this.parent.swapChildrenAt(this.parent.getChildIndex(this),a)},next:function(){var a=this._imCurrent.assetOrder+1;a>=p.movie.collections.h[this._collection].assetOrder.length&&(a=0);this._imCurrent.stopTimer();this._changeAsset="next";this._imOther.loadAsset(p.movie.collections.h[this._collection].assets.h[p.movie.collections.h[this._collection].assetOrder[a]])},
previous:function(){var a=this._imCurrent.assetOrder-1;a<0&&(a=p.movie.collections.h[this._collection].assetOrder.length-1);this._imCurrent.stopTimer();this._changeAsset="previous";this._imOther.loadAsset(p.movie.collections.h[this._collection].assets.h[p.movie.collections.h[this._collection].assetOrder[a]])},loadAsset:function(a){return Object.prototype.hasOwnProperty.call(p.movie.collections.h[this._collection].assets.h,a)?(this._imCurrent.stopTimer(),this._changeAsset="set",this._imOther.loadAsset(p.movie.collections.h[this._collection].assets.h[a]),
!0):!1},loadCollectionAsset:function(a,b){return Object.prototype.hasOwnProperty.call(p.movie.collections.h,a)&&Object.prototype.hasOwnProperty.call(p.movie.collections.h[a].assets.h,b)?(this._imCurrent.stopTimer(),this._changeAsset="set",this._imOther.loadAsset(p.movie.collections.h[a].assets.h[b]),!0):!1},playPause:function(){this._imCurrent.playPause();this._playOnLoad=this._imCurrent.get_playing()},play:function(){this._playOnLoad=!0;this._imCurrent.play()},pause:function(){this._playOnLoad=!1;
this._imCurrent.pause()},stop:function(){this._playOnLoad=!1;this._imCurrent.stop();this._imOther.stop()},getTime:function(){return this._imCurrent.getTime()},seek:function(a){this._imCurrent.seek(a)},updateFrames:function(a,b){this._imCurrent.updateFrames(a,b)},fixProp:function(a,b,c){this._set.fixProp(a,b,c)},textScroll:function(a){this._imCurrent.textScroll(a)},setText:function(a){this._imCurrent.setText(a);this._imOther.setText(a)},updateText:function(){this._imCurrent.updateText();this._imOther.updateText()},
releaseProp:function(a){this._set.releaseProp(a)},releaseAll:function(){this._set.releaseAll()},oWidth:function(){return this._imCurrent!=null?this._imCurrent.oWidth():0},oHeight:function(){return this._imCurrent!=null?this._imCurrent.oHeight():0},onLoad:function(a){if(a){this._im1.set_width(this._im2.set_width(p.mdata.screen.big/2*p.multiply));this._im1.set_height(this._im2.set_height(p.mdata.screen.big/2*p.multiply));this._imCurrent.stop();this._current==1?(this._current=2,this._imCurrent=this._im2,
this._imOther=this._im1):(this._current=1,this._imCurrent=this._im1,this._imOther=this._im2);Ca.stop(this._imCurrent);Ca.stop(this._imOther);a=p.movie.collections.h[this._data.collection].transition;if(this._changeAsset=="previous")switch(a){case "bottom":a="top";break;case "left":a="right";break;case "right":a="left";break;case "top":a="bottom"}switch(a){case "alpha":this._multSize.x=this._multSize.y=1;this._imCurrent.set_x(this._imOther.set_x(this._imCurrent.set_y(this._imOther.set_y(0))));this._imCurrent.set_alpha(0);
this._imOther.set_alpha(1);Ca.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{alpha:1});Ca.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{alpha:0});break;case "bottom":this._multSize.x=1;this._multSize.y=1;this._imCurrent.set_y(this._imCurrent.get_height());this._imOther.set_y(0);this._imCurrent.set_x(this._imOther.set_x(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);Ca.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,
{y:0});Ca.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{y:-this._imCurrent.get_height()});break;case "left":this._multSize.x=1;this._multSize.y=1;this._imCurrent.set_x(-this._imCurrent.get_width());this._imOther.set_x(0);this._imCurrent.set_y(this._imOther.set_y(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);Ca.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{x:0});Ca.tween(this._imOther,p.movie.collections.h[this._data.collection].time,
{x:this._imCurrent.get_width()});break;case "right":this._multSize.x=1;this._multSize.y=1;this._imCurrent.set_x(this._imCurrent.get_width());this._imOther.set_x(0);this._imCurrent.set_y(this._imOther.set_y(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);Ca.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{x:0});Ca.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{x:-this._imCurrent.get_width()});break;case "top":this._multSize.x=1;this._multSize.y=
1;this._imCurrent.set_y(-this._imCurrent.get_height());this._imOther.set_y(0);this._imCurrent.set_x(this._imOther.set_x(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);Ca.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{y:0});Ca.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{y:this._imCurrent.get_height()});break;default:this._multSize.x=this._multSize.y=1,this._imCurrent.set_x(this._imOther.set_x(this._imCurrent.set_y(this._imOther.set_y(0)))),
this._imCurrent.set_alpha(1),this._imOther.set_alpha(0)}this._mask.set_x(this._display.set_x(this._mask.set_y(this._display.set_y(0))));this._display.setChildIndex(this._imCurrent,1);this._display.setChildIndex(this._imOther,0);if(this._firstLoad){if(p.movie.data.screen.type=="landscape"){this._desc=this._data.horizontal;a=p.mdata.screen.big;var b=p.mdata.screen.small}else p.movie.data.screen.type=="portrait"?(this._desc=this._data.vertical,a=p.mdata.screen.small,b=p.mdata.screen.big):p.orientation==
"horizontal"?(this._desc=this._data.horizontal,a=p.mdata.screen.big,b=p.mdata.screen.small):(this._desc=this._data.vertical,a=p.mdata.screen.small,b=p.mdata.screen.big);switch(p.mdata.origin){case "alpha":this.set_x(this._desc.x);this.set_y(this._desc.y);this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(0);this.set_rotation(this._desc.rotation);break;case "bottom":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*
this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_x(this._desc.x);this.set_y(b+10);break;case "bottomkeep":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_x(this._desc.x);this.set_y(b+10+this._desc.y);break;case "left":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);
this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_y(this._desc.y);this.set_x(-10-this.get_width());break;case "leftkeep":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_y(this._desc.y);this.set_x(-10-a+this._desc.x);break;case "none":this.set_x(this._desc.x);this.set_y(this._desc.y);this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*
this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);break;case "right":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_y(this._desc.y);this.set_x(a+10);break;case "rightkeep":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);
this.set_y(this._desc.y);this.set_x(a+10+this._desc.x);break;case "top":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_x(this._desc.x);this.set_y(-10-this.get_height());break;case "topkeep":this.set_width(this._desc.width*this._multSize.x),this.set_height(this._desc.height*this._multSize.y),this.set_alpha(this._desc.alpha),this.set_rotation(this._desc.rotation),this.set_x(this._desc.x),
this.set_y(-10-b+this._desc.y)}}this._firstLoad=!1;this._imOther.stopTimer();this._imOther.stop();this._playOnLoad?this._imCurrent.startTimer():this._imCurrent.stopTimer();this._changeAsset==""&&this.place();this._changeAsset=""}},onTimedAc:function(a){p.canTrigger&&Object.prototype.hasOwnProperty.call(this._data.timedAc.h,a+"s")&&p.parser.run(this._data.timedAc.h[a+"s"])},onClick:function(a){if(p.canTrigger)if(p.mode!="editor")this._data.action!=""&&(a!=null&&(this.lastClick=this.globalToLocal(new Ea(a.stageX,
a.stageY))),p.parser.run(this._data.action));else if(this._onSelect(this._name),p.callback!=null){a=p.callback;var b=new G;b.h.nm=this._name;a("selectimage",b)}},onMouseOver:function(a){p.cursorVisible&&(p.mode=="editor"||this._data.action==""||p.mdata.highlightInt==null||p.isMobile()||this._imCurrent.set_filters(this._imOther.set_filters([new ke(p.mdata.highlightInt,1,4,4,255,1,!0)])));p.canTrigger&&p.mode!="editor"&&this._data.actionover!=""&&p.parser.run(this._data.actionover)},onTargetOver:function(){p.canTrigger&&
p.mode!="editor"&&this._data.actionover!=""&&p.parser.run(this._data.actionover)},onMouseOut:function(a){this._imCurrent.set_filters(this._imOther.set_filters([]))},dragImageStart:function(){p.mode=="editor"&&(this._dragging=!0,this.startDrag())},finishDrag:function(){this._dragging&&(this._dragging=!1,this.stopDrag())},updateInstance:function(){k.displayType=="portrait"?(p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.x=this.get_x(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.y=
this.get_y(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.width=this.get_displayWidth(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.height=this.get_displayHeight()):(p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.x=this.get_x(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.y=this.get_y(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.width=this.get_displayWidth(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.height=
this.get_displayHeight());k.history.addState(k.ln.get("rightbar-history-move"));k.history.updateProperties()},setDescWidth:function(a){k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.width=a:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.width=a},setDescHeight:function(a){k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.height=a:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.height=
a},getCurrentNum:function(a){var b=k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "alpha":return b.alpha;case "coloralpha":return b.colorAlpha;case "height":return b.height;case "order":return b.order;case "rotation":return b.rotation;case "textleading":return b.textLeading;case "textsize":return b.textSize;case "textspacing":return b.textSpacing;case "volume":return b.volume;
case "width":return b.width;case "x":return b.x;case "y":return b.y;default:return 0}},getCurrentStr:function(a){var b=k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "asset":return this._asset;case "blend":return b.blend;case "collection":return this._collection;case "color":return b.color;case "instance":return this._name;case "textalign":return b.textAlign;case "textbackground":return b.textBackground;
case "textcolor":return b.textColor;case "textfont":return b.textFont;default:return""}},getCurrentBool:function(a){var b=k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "blur":return b.blur.length==2;case "dropshadow":return b.dropshadow.length==8;case "glow":return b.glow.length==5;case "textbold":return b.textBold;case "textitalic":return b.textItalic;case "visible":return b.visible;
default:return!1}},getCurrentArr:function(a){var b=k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "blur":return b.blur.length==2?b.blur:["4","4"];case "dropshadow":return b.dropshadow.length==8?b.dropshadow:"1 45 0x000000 1 4 4 1 0".split(" ");case "glow":return b.glow.length==5?b.glow:["0xFFFFFF","1","6","1","0"];default:return[]}},getInstName:function(){return this._name},
setSound:function(a,b){b==null&&(b=0);this._imCurrent.iterateSound(a,b)},playOnLoad:function(){var a=p.movie.scene.keyframes[p.area.get_currentKf()];return Object.prototype.hasOwnProperty.call(a.h,this._name)?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].playOnLoad:!1},__class__:Hs,__properties__:I(Da.prototype.__properties__,{get_transition:"get_transition",get_displayHeight:"get_displayHeight",get_displayWidth:"get_displayWidth",get_currentMedia:"get_currentMedia",get_currentType:"get_currentType",
get_playing:"get_playing"})});var iw=function(){this._fixed=[];this.horizontal=new Ph([]);this.vertical=new Ph([]);this.horizontal.ok=this.vertical.ok=!0};t["com.tilbuci.display.ImageSet"]=iw;iw.__name__="com.tilbuci.display.ImageSet";iw.prototype={_fixed:null,horizontal:null,vertical:null,load:function(a,b){this.setProp("order",a.order,b.order);this.setProp("x",a.x,b.x);this.setProp("y",a.y,b.y);this.setProp("alpha",a.alpha,b.alpha);this.setProp("width",a.width,b.width);this.setProp("height",a.height,
b.height);this.setProp("rotation",a.rotation,b.rotation);this.setProp("visible",a.visible,b.visible);this.setProp("color",a.color,b.color);this.setProp("blend",a.blend,b.blend);this.setProp("colorAlpha",a.colorAlpha,b.colorAlpha);this.setProp("volume",a.volume,b.volume);this.setProp("pan",a.pan,b.pan);this.setProp("blur",a.blur,b.blur);this.setProp("dropshadow",a.dropshadow,b.dropshadow);this.setProp("glow",a.glow,b.glow);this.setProp("textFont",a.textFont,b.textFont);this.setProp("textSize",a.textSize,
b.textSize);this.setProp("textColor",a.textColor,b.textColor);this.setProp("textBold",a.textBold,b.textBold);this.setProp("textItalic",a.textItalic,b.textItalic);this.setProp("textLeading",a.textLeading,b.textLeading);this.setProp("textSpacing",a.textSpacing,b.textSpacing);this.setProp("textBackground",a.textBackground,b.textBackground);this.setProp("textAlign",a.textAlign,b.textAlign)},setProp:function(a,b,c){if(this.isFixed(a))return!1;switch(a){case "alpha":this.horizontal.alpha=b;this.vertical.alpha=
c;break;case "blend":this.horizontal.blend=b;this.vertical.blend=c;break;case "blur":this.horizontal.blur=b;this.vertical.blur=c;break;case "color":this.horizontal.color=b;this.vertical.color=c;break;case "colorAlpha":this.horizontal.colorAlpha=b;this.vertical.colorAlpha=c;break;case "dropshadow":this.horizontal.dropshadow=b;this.vertical.dropshadow=c;break;case "glow":this.horizontal.glow=b;this.vertical.glow=c;break;case "height":this.horizontal.height=b;this.vertical.height=c;break;case "order":this.horizontal.order=
b;this.vertical.order=c;break;case "pan":this.horizontal.pan=b;this.vertical.pan=c;break;case "rotation":this.horizontal.rotation=b;this.vertical.rotation=c;break;case "textAlign":this.horizontal.textAlign=b;this.vertical.textAlign=c;break;case "textBackground":this.horizontal.textBackground=b;this.vertical.textBackground=c;break;case "textBold":this.horizontal.textBold=b;this.vertical.textBold=c;break;case "textColor":this.horizontal.textColor=b;this.vertical.textColor=c;break;case "textFont":this.horizontal.textFont=
b;this.vertical.textFont=c;break;case "textItalic":this.horizontal.textItalic=b;this.vertical.textItalic=c;break;case "textLeading":this.horizontal.textLeading=b;this.vertical.textLeading=c;break;case "textSize":this.horizontal.textSize=b;this.vertical.textSize=c;break;case "textSpacing":this.horizontal.textSpacing=b;this.vertical.textSpacing=c;break;case "visible":this.horizontal.visible=b;this.vertical.visible=c;break;case "volume":this.horizontal.volume=b;this.vertical.volume=c;break;case "width":this.horizontal.width=
b;this.vertical.width=c;break;case "x":this.horizontal.x=b;this.vertical.x=c;break;case "y":this.horizontal.y=b,this.vertical.y=c}return!0},isFixed:function(a){return this._fixed.indexOf(a)!=-1},fixProp:function(a,b,c){this.isFixed(a)||this._fixed.push(a);switch(a){case "alpha":this.horizontal.alpha=b;this.vertical.alpha=c;break;case "blend":this.horizontal.blend=b;this.vertical.blend=c;break;case "blur":this.horizontal.blur=b;this.vertical.blur=c;break;case "color":this.horizontal.color=b;this.vertical.color=
c;break;case "colorAlpha":this.horizontal.colorAlpha=b;this.vertical.colorAlpha=c;break;case "dropshadow":this.horizontal.dropshadow=b;this.vertical.dropshadow=c;break;case "glow":this.horizontal.glow=b;this.vertical.glow=c;break;case "height":this.horizontal.height=b;this.vertical.height=c;break;case "order":this.horizontal.order=b;this.vertical.order=c;break;case "pan":this.horizontal.pan=b;this.vertical.pan=c;break;case "rotation":this.horizontal.rotation=b;this.vertical.rotation=c;break;case "textAlign":this.horizontal.textAlign=
b;this.vertical.textAlign=c;break;case "textBackground":this.horizontal.textBackground=b;this.vertical.textBackground=c;break;case "textBold":this.horizontal.textBold=b;this.vertical.textBold=c;break;case "textColor":this.horizontal.textColor=b;this.vertical.textColor=c;break;case "textFont":this.horizontal.textFont=b;this.vertical.textFont=c;break;case "textItalic":this.horizontal.textItalic=b;this.vertical.textItalic=c;break;case "textLeading":this.horizontal.textLeading=b;this.vertical.textLeading=
c;break;case "textSize":this.horizontal.textSize=b;this.vertical.textSize=c;break;case "textSpacing":this.horizontal.textSpacing=b;this.vertical.textSpacing=c;break;case "visible":this.horizontal.visible=b;this.vertical.visible=c;break;case "volume":this.horizontal.volume=b;this.vertical.volume=c;break;case "width":this.horizontal.width=b;this.vertical.width=c;break;case "x":this.horizontal.x=b;this.vertical.x=c;break;case "y":this.horizontal.y=b,this.vertical.y=c}},releaseProp:function(a){this.isFixed(a)&&
V.remove(this._fixed,a)},releaseAll:function(){for(;this._fixed.length>0;)this._fixed.shift()},kill:function(){for(;this._fixed.length>0;)this._fixed.shift();this._fixed=null;this.horizontal.kill();this.horizontal=null;this.vertical.kill();this.vertical=null},__class__:iw};var Is=function(){this._updating="";Da.call(this);this._borders=new Hd;this.addChild(this._borders);this._move=new Da;new Ma;var a=new Ma(Z.getBitmapData("iconMove"));a.smoothing=!0;this._move.addChild(a);this.addChild(this._move);
this._resizeH=new Da;var b=new Ma(Z.getBitmapData("iconResizeH"));b.smoothing=!0;this._resizeH.addChild(b);this.addChild(this._resizeH);this._resizeV=new Da;b=new Ma(Z.getBitmapData("iconResizeV"));b.smoothing=!0;this._resizeV.addChild(b);this.addChild(this._resizeV);this._resize=new Da;b=new Ma(Z.getBitmapData("iconResize"));b.smoothing=!0;this._resize.addChild(b);this.addChild(this._resize);this._limits=new Ea(3*a.get_width(),3*a.get_height());this._stagepos=new Ea;this.set_visible(!1)};t["com.tilbuci.display.InstanceSelect"]=
Is;Is.__name__="com.tilbuci.display.InstanceSelect";Is.__super__=Da;Is.prototype=I(Da.prototype,{image:null,_move:null,_resizeH:null,_resizeV:null,_resize:null,_borders:null,_limits:null,_stagepos:null,_updating:null,stg:null,setInstance:function(a){this.image=a;this.place();this.set_visible(!0);this._move.addEventListener("mouseDown",m(this,this.onMoveStart));this._resizeH.addEventListener("mouseDown",m(this,this.onResizeHStart));this._resizeV.addEventListener("mouseDown",m(this,this.onResizeVStart));
this._resize.addEventListener("mouseDown",m(this,this.onResizeStart))},clearInstance:function(){this.image=null;this.set_visible(!1);this.set_x(this.set_y(0));if(this._move.hasEventListener("mouseDown"))try{this._move.removeEventListener("mouseDown",m(this,this.onMoveStart))}catch(a){}if(this._resizeH.hasEventListener("mouseDown"))try{this._resizeH.removeEventListener("mouseDown",m(this,this.onResizeHStart))}catch(a){}if(this._resizeV.hasEventListener("mouseDown"))try{this._resizeV.removeEventListener("mouseDown",
m(this,this.onResizeVStart))}catch(a){}if(this._resize.hasEventListener("mouseDown"))try{this._resize.removeEventListener("mouseDown",m(this,this.onResizeStart))}catch(a){}if(this.stg!=null&&this.stg.hasEventListener("mouseMove")){try{this.stg.removeEventListener("mouseMove",m(this,this.onMove))}catch(a){}this.stg=null}},setAsPrecache:function(){var a=this.image,b=p.movie.scene.keyframes[p.area.get_currentKf()],c=this.image.getInstName();a.set_x(b.h[c].horizontal.x=-100);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];
c=this.image.getInstName();a.set_y(b.h[c].horizontal.y=-100);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_width(b.h[c].horizontal.width=5);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_height(b.h[c].horizontal.height=5);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_alpha(b.h[c].horizontal.alpha=0);b=p.movie.scene.keyframes[p.area.get_currentKf()];c=
this.image.getInstName();b.h[c].horizontal.volume=0;this.image.setSound(0);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_visible(b.h[c].horizontal.visible=!1);b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.x=-100;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.y=-100;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.width=
5;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.height=5;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.alpha=0;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.volume=0;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.visible=!1;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].playOnLoad=
!1;this.place()},setCurrentNum:function(a,b){if(k.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],d=this.image.getInstName(),c=c.h[d].horizontal;switch(a){case "alpha":c.alpha=this.image.set_alpha(b);break;case "coloralpha":c.colorAlpha=b;Ca.transform(this.image,.01).color(H.parseInt(c.color),c.colorAlpha);break;case "height":a=c.height=b;if(this.image.get_transition()==
"top"||this.image.get_transition()=="bottom")a=b;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(this.image.get_width(),a);this.image.set_height(a);break;case "rotation":c.rotation=Math.round(b);this.image.set_rotation(b);break;case "textleading":c.textLeading=Math.round(b);break;case "textsize":c.textSize=Math.round(b);break;case "textspacing":c.textSpacing=b;break;case "volume":c.volume=b;this.image.setSound(b);break;case "width":a=c.width=
b;if(this.image.get_transition()=="right"||this.image.get_transition()=="left")a=b;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(a,this.image.get_height());this.image.set_width(a);break;case "x":c.x=this.image.set_x(b);break;case "y":c.y=this.image.set_y(b)}this.place()},setCurrentStr:function(a,b){if(k.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],
d=this.image.getInstName(),c=c.h[d].horizontal;switch(a){case "asset":b=b.split("|:|");c=p.movie.scene.keyframes[p.area.get_currentKf()];d=this.image.getInstName();c.h[d].collection=b[0];c=p.movie.scene.keyframes[p.area.get_currentKf()];d=this.image.getInstName();c.h[d].asset=b[1];b=this.image;c=p.movie.scene.keyframes[p.area.get_currentKf()];d=this.image.getInstName();b.load(c.h[d]);break;case "blend":c.blend=b;break;case "color":c.color=b;Ca.stop(this.image,null,!0);Ca.transform(this.image,.01).color(H.parseInt(c.color),
c.colorAlpha);break;case "instance":c=this.image.getInstName();p.area.swapInstance(this.image.getInstName(),b)&&(d=p.movie.scene.keyframes[p.area.get_currentKf()].h[c],a=p.movie.scene.keyframes[p.area.get_currentKf()],Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c],p.movie.scene.keyframes[p.area.get_currentKf()].h[b]=d);break;case "textalign":c.textAlign=b;break;case "textbackground":c.textBackground=b;break;case "textcolor":c.textColor=b;break;case "textfont":c.textFont=b}this.place()},
setCurrentBool:function(a,b){if(k.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],d=this.image.getInstName(),c=c.h[d].horizontal;switch(a){case "blur":b||(c.blur=[]);break;case "dropshadow":b||(c.dropshadow=[]);break;case "glow":b||(c.glow=[]);break;case "textbold":c.textBold=b;break;case "textitalic":c.textItalic=b;break;case "visible":c.visible=this.image.set_visible(b)}if(a==
"blur"||a=="dropshadow"||a=="glow")a=[],c.dropshadow.length==8&&a.push(new Cl(H.parseInt(c.dropshadow[0]),parseFloat(c.dropshadow[1]),H.parseInt(c.dropshadow[2]),parseFloat(c.dropshadow[3]),parseFloat(c.dropshadow[4]),parseFloat(c.dropshadow[5]),parseFloat(c.dropshadow[6]),1,c.dropshadow[7]=="1")),c.blur.length==2&&a.push(new ij(parseFloat(c.blur[0]),parseFloat(c.blur[1]))),c.glow.length==5&&a.push(new ke(H.parseInt(c.glow[0]),parseFloat(c.glow[1]),H.parseInt(c.glow[2]),H.parseInt(c.glow[2]),H.parseInt(c.glow[3]),
1,c.glow[4]=="1")),this.image.set_filters(a);this.place()},setCurrentArray:function(a,b){if(k.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],d=this.image.getInstName(),c=c.h[d].horizontal;switch(a){case "blur":c.blur=b.length==2?b:[];break;case "dropshadow":c.dropshadow=b.length==8?b:[];break;case "glow":c.glow=b.length==5?b:[]}this.place()},applyText:function(){if(k.displayType==
"portrait"){var a=p.movie.scene.keyframes[p.area.get_currentKf()];var b=this.image.getInstName();a=a.h[b].vertical}else a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this.image.getInstName(),a=a.h[b].horizontal;this.image.formatText(a.textFont,a.textSize,a.textColor,a.textBold,a.textItalic,a.textLeading,a.textSpacing,a.textBackground,a.textAlign)},place:function(){this.image!=null&&(this.set_x(this.image.get_x()),this.set_y(this.image.get_y()),this._borders.get_graphics().clear(),this._borders.get_graphics().lineStyle(2,
0),this._borders.get_graphics().drawRect(0,0,this.image.get_displayWidth(),this.image.get_displayHeight()),this._borders.get_graphics().lineStyle(2,16777215),this._borders.get_graphics().drawRect(2,2,this.image.get_displayWidth()-4,this.image.get_displayHeight()-4),this.set_rotation(this.image.get_rotation()),this.image.get_displayWidth()<=this._limits.x||this.image.get_displayHeight()<=this._limits.y?(this._move.set_visible(!0),this._resizeH.set_visible(!1),this._resizeV.set_visible(!1),this._resize.set_visible(!1)):
(this._move.set_visible(!0),this._resizeH.set_visible(!0),this._resizeV.set_visible(!0),this._resize.set_visible(!0),this._resizeH.set_x(this.image.get_displayWidth()-this._resizeH.get_width()),this._resizeH.set_y((this.image.get_displayHeight()-this._resizeH.get_height())/2),this._resizeV.set_y(this.image.get_displayHeight()-this._resizeH.get_height()),this._resizeV.set_x((this.image.get_displayWidth()-this._resizeH.get_width())/2),this._resize.set_x(this.image.get_displayWidth()-this._resize.get_width()),
this._resize.set_y(this.image.get_displayHeight()-this._resize.get_height())))},endPropSet:function(){this.image!=null&&(this._updating=="move"&&this.image.finishDrag(),this._updating="",this.place(),this.stg!=null&&this.stg.hasEventListener("mouseMove")&&(this.stg.removeEventListener("mouseMove",m(this,this.onMove)),this.stg=null),this.image.updateInstance())},onMoveStart:function(a){this.image!=null&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),this._updating=
"move",this.image.dragImageStart(),this.stage.addEventListener("mouseMove",m(this,this.onMove)))},onResizeHStart:function(a){this.image!=null&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),this._updating="resizeh",this._stagepos.x=this.getBounds(this.stage).x,a=this.image.get_width(),this._stagepos.y=a/this.getBounds(this.stage).width,this.stage.addEventListener("mouseMove",m(this,this.onMove)))},onResizeVStart:function(a){this.image!=null&&(k.history.states.length==
0&&k.history.addState(k.ln.get("rightbar-history-original")),this._updating="resizev",this._stagepos.x=this.getBounds(this.stage).y,a=this.image.get_height(),this._stagepos.y=a/this.getBounds(this.stage).height,this.stage.addEventListener("mouseMove",m(this,this.onMove)))},onResizeStart:function(a){this.image!=null&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),this._updating="resize",this._stagepos.x=this.getBounds(this.stage).y,a=this.image.get_height(),
this._stagepos.y=a/this.getBounds(this.stage).height,this.stage.addEventListener("mouseMove",m(this,this.onMove)),this.stg=this.stage)},onMove:function(a){if(this.image!=null)switch(this._updating){case "move":this.set_x(this.image.get_x());this.set_y(this.image.get_y());break;case "resize":a=(a.stageX-this._stagepos.x)*this._stagepos.y;var b=a*this.image.oHeight()/this.image.oWidth();if(a>this._limits.x&&b>this._limits.y){var c=a;if(this.image.get_transition()=="right"||this.image.get_transition()==
"left")c=a*2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(c,this.image.get_height());this.image.set_width(a);this.image.setDescWidth(c);c=b;if(this.image.get_transition()=="top"||this.image.get_transition()=="bottom")c=b/2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(this.image.get_width(),c);this.image.set_height(b);this.image.setDescHeight(c);this.place()}break;case "resizeh":a=
(a.stageX-this._stagepos.x)*this._stagepos.y;if(a>this._limits.x){c=a;if(this.image.get_transition()=="right"||this.image.get_transition()=="left")c=a*2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(c,this.image.get_height());this.image.set_width(a);this.image.setDescWidth(c);this.place()}break;case "resizev":if(b=(a.stageY-this._stagepos.x)*this._stagepos.y,b>this._limits.y){c=b;if(this.image.get_transition()=="top"||this.image.get_transition()==
"bottom")c=b/2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(this.image.get_width(),c);this.image.set_height(b);this.image.setDescHeight(c);this.place()}}},__class__:Is});var Js=function(){this.size=new Ea;this.position=new Ea;this.instances=[];Da.call(this);this.mouseChildren=this.mouseEnabled=!1};t["com.tilbuci.display.MultiSelect"]=Js;Js.__name__="com.tilbuci.display.MultiSelect";Js.__super__=Da;Js.prototype=I(Da.prototype,{instances:null,
position:null,size:null,isAvailable:function(){return this.instances.length>1},clear:function(){for(this.get_graphics().clear();this.instances.length>0;)this.instances.shift();this.position.x=this.position.y=0;this.size.x=this.size.y=0},add:function(a){var b=p.area.pickInstance(a);b!=null&&(this.get_graphics().lineStyle(2,0,.7),this.get_graphics().beginFill(16777215,.2),this.get_graphics().drawRect(b.get_x(),b.get_y(),b.get_width(),b.get_height()),this.get_graphics().endFill(),this.instances.push(a))},
__class__:Js});var Ks=function(a){this._scrollPos=0;tc.call(this,"paragraph",!1,a);this._text=new Jc;this._text.set_selectable(!1);this._format=new ef;this._format.align=3;this._text.set_defaultTextFormat(this._format);this._text.set_wordWrap(!0);this._text.set_multiline(!0);this.addChild(this._text)};t["com.tilbuci.display.ParagraphImage"]=Ks;Ks.__name__="com.tilbuci.display.ParagraphImage";Ks.__super__=tc;Ks.prototype=I(tc.prototype,{_text:null,_format:null,_loadTimer:null,_scrollPos:null,setFormat:function(a,
b,c,d,f,g,h,n,l){this._format.set_font(a);this._format.set_size(b);this._format.color=H.parseInt(c);this._format.set_bold(d);this._format.set_italic(f);this._format.leading=g;this._format.letterSpacing=h;switch(l){case "center":this._format.align=0;break;case "justify":this._format.align=2;break;case "right":this._format.align=4;break;default:this._format.align=3}this._text.set_defaultTextFormat(this._format);n==""?this._text.set_background(!1):(this._text.set_backgroundColor(H.parseInt(n)),this._text.set_background(!0))},
getProp:function(a){switch(a){case "fontLeading":return this._format.leading*1;case "fontSize":return this._format.size*1;case "fontSpacing":return this._format.letterSpacing;default:return 0}},getBoolProp:function(a){switch(a){case "fontBold":return this._format.bold;case "fontItalic":return this._format.italic;default:return!1}},getStringlProp:function(a){switch(a){case "font":return this._format.font;case "fontColor":return"0x"+N.hex(this._format.color);default:return""}},setTextSize:function(a,
b){this._text.set_width(this.oWidth=a);this._text.set_height(this.oHeight=b);this._text.set_scrollV(this._scrollPos)},textScroll:function(a){switch(a){case -1:this._scrollPos>0&&(this._scrollPos=this._text.set_scrollV(this._scrollPos-1));break;case 0:this._scrollPos=this._text.set_scrollV(0);break;case 1:this._scrollPos<this._text.get_maxScrollV()&&(this._scrollPos=this._text.set_scrollV(this._scrollPos+1));break;case 2:this._scrollPos=this._text.set_scrollV(this._text.get_maxScrollV())}},setText:function(a){a=
p.parser.parseString(a);this._text.set_text(a);this._scrollPos=this._text.set_scrollV(0)},updateText:function(){this._text.set_text(p.parser.parseString(this._text.get_text()))},getText:function(){return this._text.get_text()},load:function(a){this._lastMedia=a=p.parser.parseString(a);this._text.set_text(a);this._text.set_scrollV(this._scrollPos=0);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(b){}this._loadTimer=null}this._loadTimer=new Gc(100);this._loadTimer.run=m(this,this.onOk)},
kill:function(){tc.prototype.kill.call(this);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._format=this._text=null},onOk:function(){if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this.oWidth=this._text.get_width();this.oHeight=this._text.get_height();this._onLoad(!0)},__class__:Ks});var ad=function(a){tc.call(this,"picture",!1,a);this._lastMedia="";this._loader=new Vf;this._loader.contentLoaderInfo.addEventListener("complete",
m(this,this.onOk));this._loader.contentLoaderInfo.addEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.addEventListener("securityError",m(this,this.onError));this.addChild(this._loader)};t["com.tilbuci.display.PictureImage"]=ad;ad.__name__="com.tilbuci.display.PictureImage";ad.__super__=tc;ad.prototype=I(tc.prototype,{_loader:null,load:function(a){a=N.replace(a,p.path+"media/picture/","");this._mediaLoaded=!1;this._lastMedia=a;a=p.parser.parsePath(p.path+"media/picture/"+
a);this._loader.load(new se(a))},unload:function(){this._mediaLoaded=!1;this._lastMedia="";try{this._loader.unload()}catch(a){}},kill:function(){tc.prototype.kill.call(this);try{this._loader.unload()}catch(a){}this._loader.contentLoaderInfo.removeEventListener("complete",m(this,this.onOk));this._loader.contentLoaderInfo.removeEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.removeEventListener("securityError",m(this,this.onError));this._lastMedia=this._loader=null},onOk:function(a){this.oWidth=
this._loader.content.get_width();this.oHeight=this._loader.content.get_height();this._mediaLoaded=this._loader.content.smoothing=!0;this._onLoad!=null&&this._onLoad(!0)},onError:function(a){this._lastMedia="";this._mediaLoaded=!1;this._onLoad!=null&&this._onLoad(!1)},__class__:ad});var yn=function(a){tc.call(this,"shape",!1,a);this._shape=new Hd;this.addChild(this._shape)};t["com.tilbuci.display.ShapeImage"]=yn;yn.__name__="com.tilbuci.display.ShapeImage";yn.__super__=tc;yn.prototype=I(tc.prototype,
{_shape:null,_loadTimer:null,load:function(a){this._shape.set_rotation(0);this._shape.set_x(0);this._shape.set_y(0);this._shape.get_graphics().clear();var b=Ga.jsonParse(a);if(b==0)a=!1;else if(Object.prototype.hasOwnProperty.call(b,"type")&&Object.prototype.hasOwnProperty.call(b,"color")&&Object.prototype.hasOwnProperty.call(b,"alpha")&&Object.prototype.hasOwnProperty.call(b,"border")&&Object.prototype.hasOwnProperty.call(b,"bdcolor")&&Object.prototype.hasOwnProperty.call(b,"bdalpha")&&Object.prototype.hasOwnProperty.call(b,
"rotation")){this._shape.get_graphics().beginFill(0,0);this._shape.get_graphics().drawRect(0,0,256,256);this._shape.get_graphics().endFill();this._shape.get_graphics().beginFill(H.parseInt(y.field(b,"color")),y.field(b,"alpha"));y.field(b,"border")>0?this._shape.get_graphics().lineStyle(y.field(b,"border"),H.parseInt(y.field(b,"bdcolor")),y.field(b,"bdalpha")):(b.border=.2,this._shape.get_graphics().lineStyle(.2,H.parseInt(y.field(b,"color")),y.field(b,"alpha")));switch(y.field(b,"type")){case "circle":this._shape.get_graphics().drawCircle(128,
128,128-2*y.field(b,"border"));a=!0;break;case "decagon":this._shape.get_graphics().moveTo(87,6);this._shape.get_graphics().lineTo(169,6);this._shape.get_graphics().lineTo(231,53);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,128);this._shape.get_graphics().lineTo(231,203);this._shape.get_graphics().lineTo(169,250);this._shape.get_graphics().lineTo(87,250);this._shape.get_graphics().lineTo(25,203);this._shape.get_graphics().lineTo(y.field(b,"border")/2,128);this._shape.get_graphics().lineTo(25,
53);this._shape.get_graphics().lineTo(87,6);a=!0;break;case "eneagon":this._shape.get_graphics().moveTo(128,3);this._shape.get_graphics().lineTo(210,34);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,110);this._shape.get_graphics().lineTo(239,196);this._shape.get_graphics().lineTo(173,253);this._shape.get_graphics().lineTo(83,253);this._shape.get_graphics().lineTo(17,196);this._shape.get_graphics().lineTo(y.field(b,"border")/2,110);this._shape.get_graphics().lineTo(46,34);this._shape.get_graphics().lineTo(128,
3);a=!0;break;case "heptagon":this._shape.get_graphics().moveTo(128,3);this._shape.get_graphics().lineTo(228,54);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,165);this._shape.get_graphics().lineTo(183,253);this._shape.get_graphics().lineTo(73,253);this._shape.get_graphics().lineTo(y.field(b,"border")/2,165);this._shape.get_graphics().lineTo(28,54);this._shape.get_graphics().lineTo(128,3);a=!0;break;case "hexagon":this._shape.get_graphics().moveTo(65,0);this._shape.get_graphics().lineTo(191,
0);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,108);this._shape.get_graphics().lineTo(191,216);this._shape.get_graphics().lineTo(65,216);this._shape.get_graphics().lineTo(y.field(b,"border")/2,108);this._shape.get_graphics().lineTo(65,0);a=!0;break;case "isoscelestriangle":this._shape.get_graphics().moveTo(128,y.field(b,"border")/2);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,256-y.field(b,"border")/2);this._shape.get_graphics().lineTo(y.field(b,"border")/2,256-y.field(b,
"border")/2);this._shape.get_graphics().lineTo(128,y.field(b,"border")/2);a=!0;break;case "octagon":this._shape.get_graphics().moveTo(75,y.field(b,"border")/2);this._shape.get_graphics().lineTo(181,y.field(b,"border")/2);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,75);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,181);this._shape.get_graphics().lineTo(181,256-y.field(b,"border")/2);this._shape.get_graphics().lineTo(75,256-y.field(b,"border")/2);this._shape.get_graphics().lineTo(y.field(b,
"border")/2,181);this._shape.get_graphics().lineTo(y.field(b,"border")/2,75);this._shape.get_graphics().lineTo(75,y.field(b,"border")/2);a=!0;break;case "pentagon":this._shape.get_graphics().moveTo(128,y.field(b,"border")/2);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,98);this._shape.get_graphics().lineTo(206,256-y.field(b,"border")/2);this._shape.get_graphics().lineTo(50,256-y.field(b,"border")/2);this._shape.get_graphics().lineTo(y.field(b,"border")/2,98);this._shape.get_graphics().lineTo(128,
y.field(b,"border")/2);a=!0;break;case "righttriangle":this._shape.get_graphics().moveTo(y.field(b,"border")/2,y.field(b,"border")/2);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,256-y.field(b,"border")/2);this._shape.get_graphics().lineTo(y.field(b,"border")/2,256-y.field(b,"border")/2);this._shape.get_graphics().lineTo(y.field(b,"border")/2,y.field(b,"border")/2);a=!0;break;case "square":this._shape.get_graphics().drawRect(y.field(b,"border")/2,y.field(b,"border")/2,256-2*y.field(b,
"border"),256-2*y.field(b,"border"));a=!0;break;case "triangle":this._shape.get_graphics().moveTo(128,0);this._shape.get_graphics().lineTo(256-y.field(b,"border")/2,220);this._shape.get_graphics().lineTo(y.field(b,"border")/2,220);this._shape.get_graphics().lineTo(128,0);a=!0;break;default:a=!1}this._shape.get_graphics().endFill();this._shape.set_rotation(y.field(b,"rotation"));b=this._shape.getBounds(this);this._shape.set_x(-b.x);this._shape.set_y(-b.y);this.oWidth=b.width;this.oHeight=b.height}else a=
!1;if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(c){}this._loadTimer=null}this._loadTimer=new Gc(100);this._loadTimer.run=a?m(this,this.onOk):m(this,this.onError)},kill:function(){tc.prototype.kill.call(this);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._shape.get_graphics().clear();this._shape=null},onOk:function(){if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._onLoad(!0)},onError:function(){if(this._loadTimer!=
null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._onLoad(!1)},__class__:yn});var Ok=function(a){this._display=[];this._current=0;this.playOnLoad=this._warn=!0;this.frtime=100;this.frames=1;tc.call(this,"spritemap",!1,a);this._loader=new Vf;this._loader.contentLoaderInfo.addEventListener("complete",m(this,this.onOk));this._loader.contentLoaderInfo.addEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.addEventListener("securityError",m(this,this.onError))};
t["com.tilbuci.display.SpritemapImage"]=Ok;Ok.__name__="com.tilbuci.display.SpritemapImage";Ok.__super__=tc;Ok.prototype=I(tc.prototype,{frames:null,frtime:null,playOnLoad:null,_loader:null,_warn:null,_current:null,_timer:null,_display:null,load:function(a){this._lastMedia=a=N.replace(a,p.path+"media/spritemap/","");this._mediaLoaded=!1;if(this._timer!=null){try{this._timer.stop()}catch(b){}this._timer=null}for(this.removeChildren();this._display.length>0;)this._display.shift().get_bitmapData().dispose();
a=p.parser.parsePath(p.path+"media/spritemap/"+a);this._loader.load(new se(a))},unload:function(){this._mediaLoaded=!1;this._lastMedia="";try{this._loader.unload()}catch(a){}if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}},kill:function(){tc.prototype.kill.call(this);try{this._loader.unload()}catch(a){}this._loader.contentLoaderInfo.removeEventListener("complete",m(this,this.onOk));this._loader.contentLoaderInfo.removeEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.removeEventListener("securityError",
m(this,this.onError));for(this._loader=null;this._display.length>0;)this._display.shift().get_bitmapData().dispose();this._display=null;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}},updateFrames:function(a,b){this._mediaLoaded&&(this.frames=a,this.frtime=b,this._warn=!1,this.load(this._lastMedia))},onOk:function(a){if(this._timer!=null){try{this._timer.stop()}catch(f){}this._timer=null}this._mediaLoaded=!0;this.oWidth=this._loader.content.get_width()/this.frames;this.oHeight=
this._loader.content.get_height();a=0;for(var b=this.frames;a<b;){var c=a++,d=new Dc(Math.ceil(this.oWidth),Math.ceil(this.oHeight),!0,0);d.draw(this._loader,new gb(1,0,0,1,-c*this.oWidth,0),null,null,new Ia(0,0,this.oWidth,this.oHeight));c=new Ma(d);c.smoothing=!0;this._display.push(c)}this._loader.unload();this._current=0;this.loadFrame();this._warn&&this._onLoad!=null&&this._onLoad(!0);this.playOnLoad&&(this._timer=new Gc(this.frtime),this._timer.run=m(this,this.nextFrame));this._warn=!0},pause:function(){this.playOnLoad=
!1;if(this._timer!=null)try{this._timer.stop(),this._timer=null}catch(a){}},play:function(){this.pause();this.playOnLoad=!0;this._timer=new Gc(this.frtime);this._timer.run=m(this,this.nextFrame)},setFrame:function(a){return a>0&&a<=this.frames?(this.pause(),this._current=a-1,this.loadFrame(),!0):!1},loadFrame:function(){this.removeChildren();this.addChild(this._display[this._current])},nextFrame:function(){this._current++;this._current>=this.frames&&(this._current=0);this.loadFrame()},onError:function(a){this._warn=
!0;this._mediaLoaded=!1;this._onLoad!=null&&this._onLoad(!1)},__class__:Ok});var Ls=function(a){tc.call(this,"text",!1,a);this._text=new Jc;this._text.set_selectable(!1);this._format=new ef;this._format.align=3;this._text.set_defaultTextFormat(this._format);this._text.set_wordWrap(!1);this._text.set_multiline(!1);this._text.set_embedFonts(!0);this._text.set_cacheAsBitmap(!0);this.addChild(this._text)};t["com.tilbuci.display.TextImage"]=Ls;Ls.__name__="com.tilbuci.display.TextImage";Ls.__super__=tc;
Ls.prototype=I(tc.prototype,{_text:null,_format:null,_loadTimer:null,setFormat:function(a,b,c,d,f,g,h,n){this._format.set_font(a);this._format.set_size(b);this._format.color=H.parseInt(c);this._format.set_bold(d);this._format.set_italic(f);this._format.leading=g;this._format.letterSpacing=h;this._text.set_defaultTextFormat(this._format);n==""?this._text.set_background(!1):(this._text.set_backgroundColor(H.parseInt(n)),this._text.set_background(!0))},getText:function(){return this._text.get_text()},
load:function(a){a=a.split("\r").join("");a=p.parser.parseString(a);var b=0;this._format.align=3;this._text.set_autoSize(1);for(var c=0,d=a.length;c<d;){var f=c++;this._text.set_text(a.charAt(f).toUpperCase());f=this._text.getLineMetrics(0);b+=f.width}this._format.align=0;this._text.set_autoSize(2);this._text.set_width(b-a.length*.4);this._text.set_text(a);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(g){}this._loadTimer=null}this._loadTimer=new Gc(100);this._loadTimer.run=m(this,this.onOk)},
kill:function(){tc.prototype.kill.call(this);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._format=this._text=null},onOk:function(){if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this.oWidth=this._text.get_width();this.oHeight=this._text.get_height();this._onLoad(!0)},__class__:Ls});var Vo=function(a,b,c){this._useTimer=this._playing=!1;this._name="";this._loadOK=!1;this.assetOrder=this._oWidth=this._oHeight=0;this._currentAction=
"";this._currentTime=0;this._totalTime=1;Da.call(this);this._onLoad=a;this.get_graphics().beginFill(0,0);this.get_graphics().drawRect(0,0,8,8);this.get_graphics().endFill();this._name=b;this._onTimedAc=c;this._picture=new ad(m(this,this.onLoad));this.addChild(this._picture);this._video=new un(m(this,this.onLoad),m(this,this.onEnd),c);this.addChild(this._video);this._audio=new de(m(this,this.onLoad),m(this,this.onEnd),c);this.addChild(this._audio);this._text=new Ls(m(this,this.onLoad));this.addChild(this._text);
this._paragraph=new Ks(m(this,this.onLoad));this.addChild(this._paragraph);this._html=new Uo(m(this,this.onLoad));this.addChild(this._html);this._spritemap=new Ok(m(this,this.onLoad));this.addChild(this._spritemap);this._shape=new yn(m(this,this.onLoad));this.addChild(this._shape)};t["com.tilbuci.display.TilBuciImage"]=Vo;Vo.__name__="com.tilbuci.display.TilBuciImage";Vo.__super__=Da;Vo.prototype=I(Da.prototype,{_picture:null,_video:null,_audio:null,_text:null,_paragraph:null,_html:null,_spritemap:null,
_shape:null,_currentType:null,_totalTime:null,_currentTime:null,_currentAction:null,assetOrder:null,_onLoad:null,_oWidth:null,_oHeight:null,_loadOK:null,_name:null,_timer:null,_useTimer:null,playing:null,_playing:null,get_playing:function(){return this._playing},currentType:null,get_currentType:function(){return this._currentType},currentMedia:null,get_currentMedia:function(){switch(this._currentType){case "audio":return this._audio.get_lastMedia();case "paragraph":return this._paragraph.get_lastMedia();
case "picture":return this._picture.get_lastMedia();case "spritemap":return this._spritemap.get_lastMedia();case "video":return this._video.get_lastMedia();default:return""}},_onTimedAc:null,load:function(a){if(a.ok){switch(p.movie.collections.h[a.collection].assets.h[a.asset].type){case "audio":this._audio.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="audio";this._useTimer=!1;break;case "html":this._html.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+
p.multiply]);this._currentType="html";this._useTimer=!0;break;case "paragraph":this._paragraph.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="paragraph";this._useTimer=!0;break;case "picture":this._picture.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="picture";this._useTimer=!0;break;case "shape":this._shape.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);
this._currentType="shape";this._useTimer=!0;break;case "spritemap":this._spritemap.frames=p.movie.collections.h[a.collection].assets.h[a.asset].frames;this._spritemap.frtime=p.movie.collections.h[a.collection].assets.h[a.asset].frtime;this._spritemap.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="spritemap";this._useTimer=!0;break;case "text":this._text.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType=
"text";this._useTimer=!0;break;case "video":this._video.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]),this._currentType="video",this._useTimer=!1}this._totalTime=p.movie.collections.h[a.collection].assets.h[a.asset].time;this._currentAction=p.movie.collections.h[a.collection].assets.h[a.asset].action;this.assetOrder=p.movie.collections.h[a.collection].assets.h[a.asset].order;this._loadOK=!1;return!0}return this._loadOK=!1},loadAsset:function(a){switch(a.type){case "audio":this._audio.load(a.file.h["@"+
p.multiply]);this._currentType="audio";this._useTimer=!1;break;case "html":this._html.load(a.file.h["@"+p.multiply]);this._currentType="html";this._useTimer=!0;break;case "paragraph":this._paragraph.load(a.file.h["@"+p.multiply]);this._currentType="paragraph";this._useTimer=!0;break;case "picture":this._picture.load(a.file.h["@"+p.multiply]);this._currentType="picture";this._useTimer=!0;break;case "shape":this._shape.load(a.file.h["@"+p.multiply]);this._currentType="shape";this._useTimer=!0;break;
case "spritemap":this._spritemap.frames=a.frames;this._spritemap.frtime=a.frtime;this._spritemap.load(a.file.h["@"+p.multiply]);this._currentType="spritemap";this._useTimer=!0;break;case "text":this._text.load(a.file.h["@"+p.multiply]);this._currentType="text";this._useTimer=!0;break;case "video":this._video.load(a.file.h["@"+p.multiply]),this._currentType="video",this._useTimer=!1}this._totalTime=a.time;this._currentAction=a.action;this.assetOrder=a.order;this._loadOK=!1;return!0},updateFrames:function(a,
b){this._currentType=="spritemap"&&this._spritemap.updateFrames(a,b)},startTimer:function(){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this._useTimer?(this._currentTime=0,this._loadOK&&(this._timer=new Gc(1E3),this._timer.run=m(this,this.onTimer))):this._currentType=="video"?this._video.play():this._currentType=="audio"&&this._audio.play();this._playing=!0},stopTimer:function(){this._currentTime=0;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this._video.pause();
this._audio.pause();this._playing=!1},getTime:function(){return this._useTimer?this._currentTime:this._currentType=="video"?this._video.getTime():this._currentType=="audio"?this._audio.getTime():0},getProp:function(a){switch(a){case "fontLeading":return this._paragraph.getProp("fontLeading");case "fontSize":return this._paragraph.getProp("fontSize");case "fontSpacing":return this._paragraph.getProp("fontSpacing");default:return 0}},getBoolProp:function(a){switch(a){case "fontBold":return this._paragraph.getBoolProp("fontBold");
case "fontItalic":return this._paragraph.getBoolProp("fontItalic");default:return!1}},getStringProp:function(a){switch(a){case "font":return this._paragraph.getStringlProp("font");case "fontColor":return this._paragraph.getStringlProp("fontColor");case "text":return this._currentType=="text"?this._text.getText():this._currentType=="paragraph"?this._paragraph.getText():this._currentType=="html"?this._html.getText():"";default:return""}},playPause:function(){if(this._useTimer)if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=
null;this._playing=!1}else this._timer=new Gc(1E3),this._timer.run=m(this,this.onTimer),this._playing=!0;else this._playing?this._currentType=="video"?this._video.pause():this._currentType=="audio"&&this._audio.pause():this._currentType=="video"?this._video.play():this._currentType=="audio"&&this._audio.play(),this._playing=!this._playing},play:function(){this._useTimer?this._timer==null&&(this._timer=new Gc(1E3),this._timer.run=m(this,this.onTimer)):this._currentType=="video"?this._video.play():
this._currentType=="audio"&&this._audio.play();this._playing=!0},pause:function(){if(this._useTimer){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}}else this._currentType=="video"?this._video.pause():this._currentType=="audio"&&this._audio.pause();this._playing=!1},stop:function(){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this._playing=!1;this._currentTime=0;this._video.stop();this._audio.stop()},seek:function(a){a<0&&(a=0);this._useTimer?this._currentTime=
a:this._currentType=="video"?this._video.setTime(a):this._currentType=="audio"&&this._audio.setTime(a)},formatText:function(a,b,c,d,f,g,h,n,l){this._text.setFormat(a,b,c,d,f,g,h,n);this._paragraph.setFormat(a,b,c,d,f,g,h,n,l);this._html.setFormat(a,b,c,d,f,g,h,n,l)},setTextSize:function(a,b){this._paragraph.setTextSize(a,b);this._html.setTextSize(a,b);if(this._currentType=="paragraph"||this._currentType=="html")this._oWidth=a,this._oHeight=b},textScroll:function(a){this._currentType=="paragraph"?
this._paragraph.textScroll(a):this._currentType=="html"&&this._html.textScroll(a)},setText:function(a){this._currentType=="paragraph"?this._paragraph.setText(a):this._currentType=="html"&&this._html.setText(a)},updateText:function(){this._currentType=="paragraph"&&this._paragraph.updateText()},iterateSound:function(a,b){this._video.iterateSound(a,b);this._audio.iterateSound(a,b)},stopSound:function(){this._video.stopSound();this._audio.stopSound()},onTimer:function(){this._currentTime++;this._onTimedAc(this._currentTime);
this._currentTime>=this._totalTime&&(this._currentTime=0,this._useTimer&&this.endAction())},onEnd:function(){this._playing=!0;this._currentType=="video"?this._currentAction!="next"&&this._currentAction!="previous"&&this._currentAction!="stop"&&(this._video.setTime(0),this._video.play()):this._currentType=="audio"&&this._currentAction!="next"&&this._currentAction!="previous"&&this._currentAction!="stop"&&(this._audio.setTime(0),this._audio.play());this.endAction()},endAction:function(){if(this._currentAction!=
"")switch(this._currentAction){case "":break;case "loop":break;case "next":p.parser.run('{"ac":"instance.next","param":["'+this._name+'"]}');break;case "previous":p.parser.run('{"ac":"instance.previous","param":["'+this._name+'"]}');break;case "stop":p.parser.run('{"ac":"instance.stop","param":["'+this._name+'"]}');break;default:p.parser.run(this._currentAction)}},kill:function(){this.removeChildren();this.get_graphics().clear();this._picture.kill();this._picture=null;this._video.kill();this._video=
null;this._audio.kill();this._audio=null;this._text.kill();this._text=null;this._paragraph.kill();this._paragraph=null;this._html.kill();this._html=null;this._spritemap.kill();this._spritemap=null;this._shape.kill();this._currentAction=this._currentType=this._onLoad=this._shape=null;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null;this._playing=!1}this._onTimedAc=this._name=null},oWidth:function(){return this._oWidth},oHeight:function(){return this._oHeight},loadOK:function(){return this._loadOK},
onLoad:function(a){if(a)switch(this._picture.set_visible(!1),this._video.set_visible(!1),this._audio.set_visible(!1),this._text.set_visible(!1),this._paragraph.set_visible(!1),this._html.set_visible(!1),this._spritemap.set_visible(!1),this._shape.set_visible(!1),this.removeChildren(),this._currentType){case "audio":this._audio.set_visible(!0);this._oWidth=this._audio.set_width(8);this._oHeight=this._audio.set_height(8);this.addChild(this._audio);break;case "html":this._html.set_visible(!0);this._html.set_width(this._oWidth=
this._html.oWidth);this._html.set_height(this._oHeight=this._html.oHeight);this._html.set_cacheAsBitmap(!0);this.addChild(this._html);break;case "paragraph":this._paragraph.set_visible(!0);this._paragraph.set_width(this._oWidth=this._paragraph.oWidth);this._paragraph.set_height(this._oHeight=this._paragraph.oHeight);this._paragraph.set_cacheAsBitmap(!0);this.addChild(this._paragraph);break;case "picture":this._picture.set_visible(!0);this._picture.set_width(this._oWidth=this._picture.oWidth);this._picture.set_height(this._oHeight=
this._picture.oHeight);this.addChild(this._picture);break;case "shape":this._shape.set_visible(!0);this._shape.set_width(this._oWidth=this._shape.oWidth);this._shape.set_height(this._oHeight=this._shape.oHeight);this._shape.set_cacheAsBitmap(!0);this.addChild(this._shape);break;case "spritemap":this._spritemap.set_visible(!0);this._spritemap.set_width(this._oWidth=this._spritemap.oWidth);this._spritemap.set_height(this._oHeight=this._spritemap.oHeight);this._spritemap.set_cacheAsBitmap(!0);this.addChild(this._spritemap);
break;case "text":this._text.set_visible(!0);this._text.set_width(this._oWidth=this._text.oWidth);this._text.set_height(this._oHeight=this._text.oHeight);this._text.set_cacheAsBitmap(!0);this.addChild(this._text);break;case "video":this._video.set_visible(!0),this._oWidth=this._video.set_width(this._video.oWidth),this._oHeight=this._video.set_height(this._video.oHeight),this.addChild(this._video)}this.set_width(this.set_height(p.mdata.screen.big/2*p.multiply));this._loadOK=a;this._onLoad(a)},__class__:Vo,
__properties__:I(Da.prototype.__properties__,{get_currentMedia:"get_currentMedia",get_currentType:"get_currentType",get_playing:"get_playing"})});var un=function(a,b,c){this._lasttime=0;this._current="";this._loaded=!1;tc.call(this,"video",!0,a);this._onEnd=b;this._onTimedAc=c;this._bg=new Hd;this._bg.get_graphics().beginFill(0);this._bg.get_graphics().drawRect(0,0,32,32);this._bg.get_graphics().endFill();this.addChild(this._bg);this._video=new Wo;this._video.smoothing=!0;this.addChild(this._video);
this._connection=new zn;this._connection.addEventListener("securityError",m(this,this.securityErrorHandler));this._connection.addEventListener("ioError",m(this,this.ioErrorHandler));this._connection.addEventListener("netStatus",m(this,this.netStatusHandler));this._connection.addEventListener("asyncError",m(this,this.asyncErrorHandler));this._connection.connect(null);this._stream=new Xo(this._connection);this._stream.checkPolicyFile=!0;this._stream.addEventListener("asyncError",m(this,this.asyncErrorHandler));
this._stream.addEventListener("ioError",m(this,this.ioErrorHandler));this._stream.addEventListener("netStatus",m(this,this.netStatusHandler));a={onMetaData:m(this,this.metadataEvent),onImageData:m(this,this.imagedataEvent),onPlayStatus:m(this,this.playstatusEvent),onCuePoint:m(this,this.cuepointEvent)};this._stream.client=a;this._video.attachNetStream(this._stream)};t["com.tilbuci.display.VideoImage"]=un;un.__name__="com.tilbuci.display.VideoImage";un.__super__=tc;un.prototype=I(tc.prototype,{_video:null,
_connection:null,_stream:null,_loaded:null,_bg:null,_onEnd:null,_current:null,_lasttime:null,_onTimedAc:null,getTime:function(){return this._loaded?Math.round(this._stream.time):0},setTime:function(a){this._loaded&&this._stream.seek(a)},load:function(a){this._lastMedia=a=N.replace(a,p.path+"media/video/","");var b=p.parser.parsePath(p.path+"media/video/"+a);p.mode=="editor"?(this._loaded=!1,this._current=""):this._current!=a?(this._loaded=!1,this._current=a):(this._loaded=!1,this._stream.seek(0));
this._stream.play(b)},iterateSound:function(a,b){Ca.transform(this._stream,p.mdata.time).sound(a,null)},stopSound:function(){Ca.stop(this._stream)},kill:function(){tc.prototype.kill.call(this);this._bg.get_graphics().clear();this._bg=null;this._video.attachNetStream(null);this._video=null;this._connection.removeEventListener("securityError",m(this,this.securityErrorHandler));this._connection.removeEventListener("ioError",m(this,this.ioErrorHandler));this._connection.removeEventListener("netStatus",
m(this,this.netStatusHandler));this._connection.removeEventListener("asyncError",m(this,this.asyncErrorHandler));this._connection=null;this._stream.client=null;this._stream.removeEventListener("asyncError",m(this,this.asyncErrorHandler));this._stream.removeEventListener("ioError",m(this,this.ioErrorHandler));this._stream.removeEventListener("netStatus",m(this,this.netStatusHandler));this._onTimedAc=this._current=this._onEnd=this._stream=null},play:function(){this._loaded&&this._stream.resume()},pause:function(){this._loaded&&
this._stream.pause()},stop:function(){this._stream.pause();this._stream.seek(0)},unload:function(){this._loaded&&(this._stream.pause(),this._stream.seek(0));this._lastMedia="";this._loaded=!1},netStatusHandler:function(a){switch(a.info.code){case "NetStream.Play.Complete":this._onEnd();break;case "NetStream.Play.Start":this._loaded||(this._loaded=!0,this._bg.set_width(this._video.set_width(this.oWidth)),this._bg.set_height(this._video.set_height(this.oHeight)),this._onLoad(!0),p.mode=="editor"&&this.stop())}},
ioErrorHandler:function(a){this._onLoad(!1)},securityErrorHandler:function(a){this._onLoad(!1)},asyncErrorHandler:function(a){this._onLoad(!1)},metadataEvent:function(a){this.oWidth=a.width;this.oHeight=a.height;p.mode=="editor"&&(this._loaded=!0,this._bg.set_width(this._video.set_width(this.oWidth=a.width)),this._bg.set_height(this._video.set_height(this.oHeight=a.height)),this._onLoad(!0),this.stop())},imagedataEvent:function(a){},playstatusEvent:function(a){this._stream.time!=null&&this._onTimedAc!=
null&&(a=Math.round(this._stream.time),a!=this._lasttime&&(this._lasttime=a,this._onTimedAc(a)))},cuepointEvent:function(a){},__class__:un});var pa=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);this.type=a;this.bubbles=b;this.cancelable=c;this.eventPhase=2};t["openfl.events.Event"]=pa;pa.__name__="openfl.events.Event";pa.prototype={bubbles:null,cancelable:null,currentTarget:null,eventPhase:null,target:null,type:null,__isCanceled:null,__isCanceledNow:null,__preventDefault:null,clone:function(){var a=
new pa(this.type,this.bubbles,this.cancelable);a.eventPhase=this.eventPhase;a.target=this.target;a.currentTarget=this.currentTarget;return a},formatToString:function(a,b,c,d,f,g){var h=[];b!=null&&h.push(b);c!=null&&h.push(c);d!=null&&h.push(d);f!=null&&h.push(f);g!=null&&h.push(g);return m(this,this.__formatToString).apply(this,[a,h])},isDefaultPrevented:function(){return this.__preventDefault},preventDefault:function(){this.cancelable&&(this.__preventDefault=!0)},stopImmediatePropagation:function(){this.__isCanceledNow=
this.__isCanceled=!0},stopPropagation:function(){this.__isCanceled=!0},toString:function(){return this.__formatToString("Event",["type","bubbles","cancelable"])},__formatToString:function(a,b){a="["+a;for(var c,d=0;d<b.length;){var f=b[d];++d;c=y.field(this,f);a=typeof c=="string"?a+(" "+f+'="'+H.string(c)+'"'):a+(" "+f+"="+H.string(c))}return a+"]"},__init:function(){this.currentTarget=this.target=null;this.cancelable=this.bubbles=!1;this.eventPhase=2;this.__preventDefault=this.__isCanceledNow=this.__isCanceled=
!1},__class__:pa};var Lk=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);pa.call(this,a,c,d);this.info=b};t["com.tilbuci.event.TilBuciEvent"]=Lk;Lk.__name__="com.tilbuci.event.TilBuciEvent";Lk.__super__=pa;Lk.prototype=I(pa.prototype,{info:null,__class__:Lk});var nm=function(a,b,c,d){d==null&&(d=!0);this._addToGlobal=!0;this._fname="";a=N.replace(a,".ttf",".woff2");a=N.replace(a,".otf",".woff2");this._addToGlobal=d;this._fname=b;this._ac=c;new Ob(!0,a,"GET",null,0,m(this,this.onLoad))};t["com.tilbuci.font.EmbedFont"]=
nm;nm.__name__="com.tilbuci.font.EmbedFont";nm.prototype={fname:null,_fname:null,get_fname:function(){return this._fname},_ac:null,_addToGlobal:null,onLoad:function(a,b){var c=this;if(a){a=new ArrayBuffer(mc.get_length(b.binary));for(var d=new DataView(a,0,a.byteLength),f=0,g=mc.get_length(b.binary);f<g;){var h=f++;d.setUint8(h,b.binary.b[h])}b=new FontFace(this._fname,a);window.document.fonts.add(b);b.load().then(function(n){me.loadFromName(c._fname).onComplete(function(l){c._addToGlobal&&k.fonts.push(c._fname);
c._ac!=null&&c._ac(!0,c);c._ac=null})})}else this._fname="",this._ac=this._ac=null},__class__:nm,__properties__:{get_fname:"get_fname"}};var Yo=function(a){this.ok=!1;a!=null&&this.load(a)};t["com.tilbuci.narrative.BattleCardNarrative"]=Yo;Yo.__name__="com.tilbuci.narrative.BattleCardNarrative";Yo.prototype={ok:null,cardname:null,cardgraphic:null,cardattributes:null,clone:function(){return new Yo(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"cardname")&&
Object.prototype.hasOwnProperty.call(a,"cardgraphic")&&Object.prototype.hasOwnProperty.call(a,"cardattributes")?(this.cardname=y.field(a,"cardname"),this.cardgraphic=y.field(a,"cardgraphic"),this.cardattributes=y.field(a,"cardattributes"),this.cardattributes==null&&(this.cardattributes=[0,0,0,0,0]),this.ok=!0):!1},kill:function(){for(this.cardgraphic=this.cardname=null;this.cardattributes.length>0;)this.cardattributes.shift();this.cardattributes=null},toObject:function(){return{cardname:this.cardname,
cardgraphic:this.cardgraphic,cardattributes:this.cardattributes}},__class__:Yo};var An=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.narrative.CharacterNarrative"]=An;An.__name__="com.tilbuci.narrative.CharacterNarrative";An.__super__=Da;An.prototype=I(Da.prototype,{ok:null,id:null,chname:null,about:null,collection:null,clone:function(){return new An(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&Object.prototype.hasOwnProperty.call(a,
"chname")&&Object.prototype.hasOwnProperty.call(a,"about")&&Object.prototype.hasOwnProperty.call(a,"collection")?(this.id=y.field(a,"id"),this.chname=y.field(a,"chname"),this.about=y.field(a,"about"),this.collection=y.field(a,"collection"),this.ok=!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.collection=this.about=this.chname=this.id=null},toObject:function(){return{id:this.id,chname:this.chname,about:this.about,collection:this.collection}},__class__:An});
var Bn=function(a){this.diags=new G;this.loaded=!1;this.code="";this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.narrative.DialogueFolderNarrative"]=Bn;Bn.__name__="com.tilbuci.narrative.DialogueFolderNarrative";Bn.__super__=Da;Bn.prototype=I(Da.prototype,{ok:null,id:null,code:null,loaded:null,diags:null,_callback:null,clone:function(){return new Bn(this.toObject())},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=y.field(a,"id");Object.prototype.hasOwnProperty.call(a,
"code")&&(this.code=y.field(a,"code"));for(var b=Object.keys(this.diags.h),c=b.length,d=0;d<c;){var f=b[d++];this.diags.h[f].kill();var g=this.diags;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}if(Object.prototype.hasOwnProperty.call(a,"diags"))for(a=y.field(a,"diags"),b=0,c=y.fields(a);b<c.length;)f=c[b],++b,d=new Cn,d.load(y.field(a,f))&&(this.diags.h[d.id]=d);return this.ok=!0}return!1},clear:function(){if(this.ok){for(var a=Object.keys(this.diags.h),b=a.length,c=0;c<b;){var d=a[c++];
this.diags.h[d].kill();var f=this.diags;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.diags=new G}},loadContents:function(a){if(this.ok){p.narrative.clearDialogues();this._callback=a;if(p.nocache){a=p.base+"movie/"+p.movie.get_mvId()+".movie/media/dialogues/"+this.code+".json";var b=new G,c=(new Date).getTime();b.h.rand=c;new Ob(!0,a,"GET",b,3,m(this,this.onContents))}else new Ob(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/media/dialogues/"+this.code+".json","GET",new G,3,m(this,
this.onContents));return!0}return!1},onContents:function(a,b){a?this.load(b.json)?this._callback(!0):this._callback(!1):this._callback(!1)},numDiags:function(){return ib.count(this.diags)},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.id=null;for(var a=Object.keys(this.diags.h),b=a.length,c=0;c<b;){var d=a[c++];this.diags.h[d].kill();var f=this.diags;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._callback=this.diags=null},idObject:function(){return{id:this.id,
code:this.code,loaded:this.loaded}},toObject:function(){for(var a=[],b=this.diags.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push(g.toObject())}return{id:this.id,code:this.code,loaded:this.loaded,diags:a}},__class__:Bn});var sm=function(a){this.audio=this.character=this.asset="";this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.narrative.DialogueLineNarrative"]=sm;sm.__name__="com.tilbuci.narrative.DialogueLineNarrative";sm.__super__=Da;sm.prototype=I(Da.prototype,{ok:null,
text:null,audio:null,character:null,asset:null,clone:function(){return new sm(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"text")?(this.text=y.field(a,"text"),this.audio=y.field(a,"audio"),this.character=y.field(a,"character"),this.asset=y.field(a,"asset"),this.ok=!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.asset=this.character=this.audio=this.text=null},toObject:function(){return{text:this.text,
audio:this.audio,character:this.character,asset:this.asset}},__class__:sm});var Cn=function(a){this._lastcol=this._lastast="";this.lines=[];this.current=0;this.navprev=this.navnext=this.navend=this.insttext=this.instname=this.instexpr="";this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.narrative.DialogueNarrative"]=Cn;Cn.__name__="com.tilbuci.narrative.DialogueNarrative";Cn.__super__=Da;Cn.prototype=I(Da.prototype,{ok:null,id:null,navprev:null,navnext:null,navend:null,insttext:null,
instname:null,instexpr:null,current:null,lines:null,_lastcol:null,_lastast:null,clone:function(){return new Cn(this.toObject())},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=y.field(a,"id");Object.prototype.hasOwnProperty.call(a,"navprev")&&(this.navprev=y.field(a,"navprev"));Object.prototype.hasOwnProperty.call(a,"navnext")&&(this.navnext=y.field(a,"navnext"));Object.prototype.hasOwnProperty.call(a,"navend")&&(this.navend=y.field(a,"navend"));Object.prototype.hasOwnProperty.call(a,
"insttext")&&(this.insttext=y.field(a,"insttext"));Object.prototype.hasOwnProperty.call(a,"instname")&&(this.instname=y.field(a,"instname"));Object.prototype.hasOwnProperty.call(a,"instexpr")&&(this.instexpr=y.field(a,"instexpr"));if(Object.prototype.hasOwnProperty.call(a,"lines")){a=y.field(a,"lines");for(var b=0,c=y.fields(a);b<c.length;){var d=c[b];++b;var f=new sm;f.load(y.field(a,d))&&this.lines.push(f)}}return this.ok=!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);
this.removeChildren();for(this.id=null;this.lines.length>0;)this.lines.shift().kill();this.instexpr=this.instname=this.insttext=this.navend=this.navnext=this.navprev=this.lines=null},toObject:function(){for(var a=[],b=0,c=this.lines;b<c.length;){var d=c[b];++b;a.push(d.toObject())}return{id:this.id,lines:a,navprev:this.navprev,navnext:this.navnext,navend:this.navend,insttext:this.insttext,instname:this.instname,instexpr:this.instexpr}},numLines:function(){return this.lines.length},next:function(){this.current++;
this.current>=this.lines.length&&(this.current=this.lines.length-1);this.show(this.current)},previous:function(){this.current--;this.current<0&&(this.current=0);this.show(this.current)},last:function(){this.current=this.lines.length-1;this.show(this.current)},first:function(){this.current=0;this.show(this.current)},show:function(a){a==null&&(a=-1);a>=0&&(this.current=a);this.current>=this.lines.length&&(this.current=0);this.insttext!=null&&this.insttext!=""&&p.area.setText(this.insttext,this.lines[this.current].text);
this.navprev!=null&&this.navprev!=""&&(this.current==0?p.area.setVisible(this.navprev,!1):p.area.setVisible(this.navprev,!0));this.navnext!=null&&this.navnext!=""&&(this.current>=this.lines.length-1?p.area.setVisible(this.navnext,!1):p.area.setVisible(this.navnext,!0));this.navend!=null&&this.navend!=""&&(this.current>=this.lines.length-1?p.area.setVisible(this.navend,!0):p.area.setVisible(this.navend,!1));this.instname!=null&&this.instname!=""&&(this.lines[this.current].character==""?p.area.setText(this.instname,
""):Object.prototype.hasOwnProperty.call(p.narrative.chars.h,this.lines[this.current].character)?p.area.setText(this.instname,p.narrative.chars.h[this.lines[this.current].character].chname):p.area.setText(this.instname,""));this.instexpr!=null&&this.instexpr!=""&&(this.lines[this.current].asset==""?p.area.setVisible(this.instexpr,!1):Object.prototype.hasOwnProperty.call(p.narrative.chars.h,this.lines[this.current].character)?Object.prototype.hasOwnProperty.call(p.movie.collections.h,p.narrative.chars.h[this.lines[this.current].character].collection)?
(this._lastcol!=p.narrative.chars.h[this.lines[this.current].character].collection&&this._lastast!=this.lines[this.current].asset&&p.area.loadCollectionAsset(this.instexpr,p.narrative.chars.h[this.lines[this.current].character].collection,this.lines[this.current].asset),this._lastcol=p.narrative.chars.h[this.lines[this.current].character].collection,this._lastast=this.lines[this.current].asset,p.area.setVisible(this.instexpr,!0)):p.area.setVisible(this.instexpr,!1):p.area.setVisible(this.instexpr,
!1));this.lines[this.current].audio==""?p.narrative.diagSpeech.stop():p.narrative.diagSpeech.load(this.lines[this.current].audio)},close:function(){this.navprev!=null&&this.navprev!=""&&p.area.releaseProperty(this.navprev,"visible");this.navnext!=null&&this.navnext!=""&&p.area.releaseProperty(this.navnext,"visible");this.navend!=null&&this.navend!=""&&p.area.releaseProperty(this.navend,"visible");this.instexpr!=null&&this.instexpr!=""&&p.area.releaseProperty(this.instexpr,"visible");p.narrative.diagSpeech.stop();
this._lastast=this._lastcol=""},__class__:Cn});var Zo=function(a){this.ok=!1;a!=null&&this.load(a)};t["com.tilbuci.narrative.InvItemNarrative"]=Zo;Zo.__name__="com.tilbuci.narrative.InvItemNarrative";Zo.prototype={ok:null,itname:null,ittype:null,itgraphic:null,itaction:null,clone:function(){return new Zo(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"itname")&&Object.prototype.hasOwnProperty.call(a,"ittype")&&Object.prototype.hasOwnProperty.call(a,"itgraphic")&&
Object.prototype.hasOwnProperty.call(a,"itaction")?(this.itname=y.field(a,"itname"),this.ittype=y.field(a,"ittype"),this.itgraphic=y.field(a,"itgraphic"),this.itaction=y.field(a,"itaction"),this.ok=!0):!1},kill:function(){this.itaction=this.itgraphic=this.ittype=this.itname=null},toObject:function(){return{itname:this.itname,ittype:this.ittype,itgraphic:this.itgraphic,itaction:this.itaction}},__class__:Zo};var As=function(){this._directionclick=[!0,!0,!0,!0];this._counterd=0;this._buttonclick=[!0,
!0,!0,!0];this._counter=0;this._controls=new G;this._gameInput=new Tc;this._gameInput.addEventListener("deviceAdded",m(this,this.onDeviceAdded));this._gameInput.addEventListener("deviceRemoved",m(this,this.onDeviceRemoved))};t["com.tilbuci.player.Joystick"]=As;As.__name__="com.tilbuci.player.Joystick";As.prototype={_gameInput:null,_device:null,_controls:null,_timer:null,_counter:null,_buttonclick:null,_counterd:null,_directionclick:null,onDeviceRemoved:function(a){if(this._timer!=null)try{this._timer.stop()}catch(b){}this._timer=
null},onDeviceAdded:function(a){this._device=a.device;this._device.enabled=!0;a=Object.keys(this._controls.h);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._controls;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=0;for(b=this._device.get_numControls();a<b;){c=a++;c=this._device.getControlAt(c);switch(c.id){case "AXIS_0":this._controls.h.HL=c;break;case "AXIS_1":this._controls.h.VL=c;break;case "AXIS_2":this._controls.h.HR=c;break;case "AXIS_3":this._controls.h.VR=c;break;case "BUTTON_0":this._controls.h.B0=
c;break;case "BUTTON_1":this._controls.h.B1=c;break;case "BUTTON_2":this._controls.h.B2=c;break;case "BUTTON_3":this._controls.h.B3=c;break;case "DPAD_DOWN":this._controls.h.DD=c;break;case "DPAD_LEFT":this._controls.h.DL=c;break;case "DPAD_RIGHT":this._controls.h.DR=c;break;case "DPAD_UP":this._controls.h.DU=c}this._controls.h[c.id]=c}if(this._timer!=null)try{this._timer.stop()}catch(g){}this._counter=0;this._buttonclick=[!0,!0,!0,!0];this._counterd=0;this._directionclick=[!0,!0,!0,!0];this._timer=
new Gc(32);this._timer.run=m(this,this.checkInput)},checkInput:function(){if(p.usingTarget>0){var a=this._controls.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];if(this._controls.h[d].value<-.5||this._controls.h[d].value>.5)switch(d){case "B0":this._buttonclick[0]&&(p.parser.checkJoystick("0"),this._buttonclick[0]=!1,this._counter=0);break;case "B1":this._buttonclick[1]&&(p.parser.checkJoystick("1"),this._buttonclick[1]=!1,this._counter=0);break;case "B2":this._buttonclick[2]&&(p.parser.checkJoystick("2"),
this._buttonclick[2]=!1,this._counter=0);break;case "B3":this._buttonclick[3]&&(p.parser.checkJoystick("3"),this._buttonclick[3]=!1,this._counter=0);break;case "DD":p.parser.checkJoystick("d");break;case "DL":p.parser.checkJoystick("l");break;case "DR":p.parser.checkJoystick("r");break;case "DU":p.parser.checkJoystick("u");break;case "HL":this._controls.h[d].value<0?p.parser.checkJoystick("l"):p.parser.checkJoystick("r");break;case "HR":this._controls.h[d].value<0?p.parser.checkJoystick("l"):p.parser.checkJoystick("r");
break;case "VL":this._controls.h[d].value<0?p.parser.checkJoystick("u"):p.parser.checkJoystick("d");break;case "VR":this._controls.h[d].value<0?p.parser.checkJoystick("u"):p.parser.checkJoystick("d")}}}else for(a=this._controls.h,a=Object.keys(a),b=a.length,c=0;c<b;)if(d=a[c++],this._controls.h[d].value<-.5||this._controls.h[d].value>.5)switch(d){case "B0":this._buttonclick[0]&&(p.parser.checkJoystick("0"),this._buttonclick[0]=!1,this._counter=0);break;case "B1":this._buttonclick[1]&&(p.parser.checkJoystick("1"),
this._buttonclick[1]=!1,this._counter=0);break;case "B2":this._buttonclick[2]&&(p.parser.checkJoystick("2"),this._buttonclick[2]=!1,this._counter=0);break;case "B3":this._buttonclick[3]&&(p.parser.checkJoystick("3"),this._buttonclick[3]=!1,this._counter=0);break;case "DD":this._directionclick[2]&&(p.parser.checkJoystick("d"),this._directionclick[2]=!1,this._counterd=0);break;case "DL":this._directionclick[3]&&(p.parser.checkJoystick("l"),this._directionclick[3]=!1,this._counterd=0);break;case "DR":this._directionclick[1]&&
(p.parser.checkJoystick("r"),this._directionclick[1]=!1,this._counterd=0);break;case "DU":this._directionclick[0]&&(p.parser.checkJoystick("u"),this._directionclick[0]=!1,this._counterd=0);break;case "HL":this._controls.h[d].value<0?this._directionclick[3]&&(p.parser.checkJoystick("l"),this._directionclick[3]=!1,this._counterd=0):this._directionclick[1]&&(p.parser.checkJoystick("r"),this._directionclick[1]=!1,this._counterd=0);break;case "HR":this._controls.h[d].value<0?this._directionclick[3]&&(p.parser.checkJoystick("l"),
this._directionclick[3]=!1,this._counterd=0):this._directionclick[1]&&(p.parser.checkJoystick("r"),this._directionclick[1]=!1,this._counterd=0);break;case "VL":this._controls.h[d].value<0?this._directionclick[0]&&(p.parser.checkJoystick("u"),this._directionclick[0]=!1,this._counterd=0):this._directionclick[2]&&(p.parser.checkJoystick("d"),this._directionclick[2]=!1,this._counterd=0);break;case "VR":this._controls.h[d].value<0?this._directionclick[0]&&(p.parser.checkJoystick("u"),this._directionclick[0]=
!1,this._counterd=0):this._directionclick[2]&&(p.parser.checkJoystick("d"),this._directionclick[2]=!1,this._counterd=0)}this._counter++;this._counter>=10&&(this._buttonclick=[!0,!0,!0,!0],this._counter=0);this._counterd++;this._counterd>=10&&(this._directionclick=[!0,!0,!0,!0],this._counterd=0)},__class__:As};var Al=function(a,b,c){this._targetTime=.0075;this._target=new Ms;this.kfPercent=0;this._currentKf=-1;this._instances=new G;this._scale=1;this._bloverlays=new G;this._overlays=new G;this._kftoLoad=
-1;this._playing=!0;Da.call(this);this._player=a;this._bgarea=b;this._bg=new Hd;this._scene=new Da;this._inputArea=new Da;this._player.inputArea=this._inputArea;this._mask=new Hd;this._holder=new Da;this._overlay=new Da;this._bloverlay=new Da;this._uiBg=new Hd;this._uiBg.get_graphics().beginFill(0,.5);this._uiBg.get_graphics().drawRect(0,0,32,32);this._uiBg.get_graphics().endFill();this._uiBg.set_visible(!1);this._uiArea=c;this._uiArea.addChild(this._uiBg);this._inputPanel=new Ns(this._uiBg);this._uiArea.addChild(this._inputPanel);
this._holder.addChild(this._bg);this._holder.addChild(this._bloverlay);this._holder.addChild(this._scene);this._holder.addChild(this._inputArea);this._holder.addChild(this._overlay);this.addChild(this._holder);this.addChild(this._mask);p.mode=="player"?this._holder.set_mask(this._mask):this._mask.set_visible(!1);this.stage==null?this.addEventListener("addedToStage",m(this,this.onStage)):this.addEventListener("mouseUp",m(this,this.onMouseUp));this._select=new Is;this.addChild(this._select);this._multiSelect=
new Js;this.addChild(this._multiSelect)};t["com.tilbuci.player.MovieArea"]=Al;Al.__name__="com.tilbuci.player.MovieArea";Al.__super__=Da;Al.prototype=I(Da.prototype,{aWidth:null,get_aWidth:function(){return this._mask.get_width()},aHeight:null,get_aHeight:function(){return this._mask.get_height()},aOrientation:null,get_aOrientation:function(){return this.get_aWidth()==this.get_aHeight()?"square":this.get_aHeight()>this.get_aWidth()?"vertical":"horizontal"},pOrientation:null,get_pOrientation:function(){return this._player.get_rWidth()<
this._player.get_rHeight()?"vertical":"horizontal"},playing:null,_playing:null,get_playing:function(){return this._playing},_kftoLoad:null,_player:null,_bgarea:null,_holder:null,_mask:null,_scene:null,_inputArea:null,_overlay:null,_overlays:null,_bloverlay:null,_bloverlays:null,_bg:null,_scale:null,_instances:null,currentKf:null,get_currentKf:function(){return this._currentKf},_currentKf:null,kfPercent:null,_uiArea:null,_uiBg:null,_inputPanel:null,_select:null,_multiSelect:null,_target:null,_targetTime:null,
showTarget:function(){this._holder.addChild(this._target);this._target.show();if(this._target.timer!=null){try{this._target.timer.stop()}catch(a){}this._target.timer=null}this._target.timer=new Gc(500);this._target.timer.run=m(this,this.checkTargetOver);this._target.lastInstOver=""},hideTarget:function(){this._target.parent!=null&&this._holder.removeChild(this._target);this._target.hide();if(this._target.timer!=null){try{this._target.timer.stop()}catch(a){}this._target.timer=null}this._target.lastInstOver=
""},toggleTarget:function(){this._target.get_visible()?this.hideTarget():this.showTarget()},clearTarget:function(){this._target.clear()},setTarget:function(a){return Object.prototype.hasOwnProperty.call(p.contraptions.targets.h,a)?p.contraptions.targets.h[a].ok?this._target.load(a):!1:!1},moveTarget:function(a){switch(a){case "down":this._target.get_y()<p.area.get_aHeight()&&(a=this._target,a.set_y(a.get_y()+p.usingTarget));break;case "left":this._target.get_x()>0&&(a=this._target,a.set_x(a.get_x()-
p.usingTarget));break;case "right":this._target.get_x()<p.area.get_aWidth()&&(a=this._target,a.set_x(a.get_x()+p.usingTarget));break;case "up":this._target.get_y()>0&&(a=this._target,a.set_y(a.get_y()-p.usingTarget))}if(p.parser.onDrag!=null){a=Math.round(this._target.get_x()-p.parser.onDrag.lastClick.x);var b=Math.round(this._target.get_y()-p.parser.onDrag.lastClick.y);p.area.setProperty(p.parser.onDrag.getInstName(),"x",a,a);p.area.setProperty(p.parser.onDrag.getInstName(),"y",b,b);this._target.set_alpha(0)}},
setTargetPos:function(a,b){this._target.get_visible()||this.showTarget();this._target.targetX=this._target.set_x(a);this._target.targetY=this._target.set_y(b)},triggerTarget:function(){if(p.parser.onDrag!=null)p.parser.onDragMoveStop(null),this._target.set_alpha(1);else if(!(p.contraptions.usingMessages&&p.contraptions.checkMessagesCollision(this._target)||p.contraptions.usingInv&&p.contraptions.checkInvCollision(this._target)||p.contraptions.usingBs&&p.contraptions.checkBsCollision(this._target)||
p.contraptions.usingMenu&&p.contraptions.checkMenuCollision(this._target)||p.contraptions.usingDflow&&p.contraptions.checkDflowCollision(this._target)||p.contraptions.checkInterfaceCollision(this._target))){for(var a,b=null,c=0,d=this._scene.get_numChildren();c<d;)a=c++,a=this._scene.getChildAt(a),a!=null&&a.get_visible()&&this._target.hitTestObject(a)&&(b=a);b!=null&&(c=this._target.get_x(),d=b.get_x(),b.lastClick.x=c-d,c=this._target.get_y(),d=b.get_y(),b.lastClick.y=c-d,b.onClick())}},checkTargetOver:function(){if(this._target.get_visible()){for(var a=
"",b,c=0,d=this._scene.get_numChildren();c<d;)b=c++,b=this._scene.getChildAt(b),b!=null&&b.get_visible()&&this._target.hitTestObject(b)&&(a=b.getInstName());if(p.contraptions.checkMenuOver(this._target)||p.contraptions.checkDflowOver(this._target)||p.contraptions.checkMessagesOver(this._target)||p.contraptions.checkInvOver(this._target)||p.contraptions.checkBsOver(this._target))a="_menu_";p.contraptions.checkInterfaceOver(this._target)&&(a="_interface_");this._target.setGraphic(a);if(a!="_menu_"&&
a!="_interface_"&&a!=this._target.lastInstOver&&(this._target.lastInstOver=a,Object.prototype.hasOwnProperty.call(this._instances.h,a)))this._instances.h[a].onTargetOver()}else this.hideTarget()},loadKeyframe:function(a,b){this._playing||p.mode=="editor"||this.playPause();Ca.stop(this,{kfPercent:100},!1,!1);this._select.clearInstance();this._multiSelect.clear();this._currentKf=b;var c=this._instances.h;c=Object.keys(c);for(var d=c.length,f=0;f<d;){var g=c[f++];if(this._instances.h[g].keep)this._instances.h[g].keep=
!1;else{this._scene.removeChild(this._instances.h[g]);this._instances.h[g].stop();this._instances.h[g].kill();var h=this._instances;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}}c=a.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)if(g=c[f++],Object.prototype.hasOwnProperty.call(this._instances.h,g))this._instances.h[g].keep=!0,this._instances.h[g].load(a.h[g]);else{h=this._instances;var n=new Hs(g,m(this,this.imgSelect));h.h[g]=n;this._instances.h[g].load(a.h[g]);this._instances.h[g].set_visible(!1);
this._scene.addChild(this._instances.h[g])}c=this._instances.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=c[f++],this._instances.h[g].place();if(p.mode=="editor")for(c=this._instances.h,c=Object.keys(c),d=c.length,f=0;f<d;)g=c[f++],this._instances.h[g].keep?this._instances.h[g].stop():(this._scene.removeChild(this._instances.h[g]),this._instances.h[g].kill(),h=this._instances,Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]);p.mode!="editor"?(this.kfPercent=0,Ca.tween(this,p.mdata.time,
{kfPercent:100}).onComplete(m(this,this.nextKeyframe))):this.kfPercent=100;a=c=p.plugins.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)if(g=a[c[f++]],g.get_ready())g.info.onNewKeyframe(b);p.callback!=null&&(b=p.callback,a=new G,c=this.get_currentKf(),a.h.kf=c,b("loadkeyframe",a));p.mode!="editor"&&this.get_currentKf()==p.movie.scene.keyframes.length-1&&(p.contraptions.showingDflow()||p.movie.scene.hasDflow()&&p.contraptions.dflowShow(p.movie.scene.dflow))},imgSelect:function(a){this._select.clearInstance();
this._multiSelect.clear();for(var b=Object.keys(this._instances.h),c=b.length,d=0;d<c;){var f=b[d++];a==null?this._instances.h[f].selected=!1:f==a?(this._instances.h[f].selected=!0,this._select.setInstance(this._instances.h[f])):this._instances.h[f].selected=!1}},imgSelectMultiple:function(a){if(a.length>1){this.imgSelect(null);this._multiSelect.clear();for(var b=0;b<a.length;){var c=a[b];++b;this._multiSelect.add(c)}}},setCurrentPrecache:function(){this._select.setAsPrecache()},setCurrentNum:function(a,
b){this._select.setCurrentNum(a,b)},setCurrentStr:function(a,b){this._select.setCurrentStr(a,b)},setCurrentBool:function(a,b){this._select.setCurrentBool(a,b)},setCurrentArray:function(a,b){this._select.setCurrentArray(a,b)},applyText:function(){this._select.applyText()},setPropertyNum:function(a,b,c){var d=this.pickInstance(a);if(d!=null)switch(a=k.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[a].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[a].horizontal,
b){case "alpha":a.alpha=d.set_alpha(c);break;case "coloralpha":a.colorAlpha=c;Ca.transform(d,.01).color(H.parseInt(a.color),a.colorAlpha);break;case "height":b=a.height=c;if(d.get_transition()=="top"||d.get_transition()=="bottom")b=c;d.get_currentType()!="paragraph"&&d.get_currentType()!="html"||d.setTextSize(d.get_width(),b);d.set_height(b);break;case "rotation":a.rotation=Math.round(c);d.set_rotation(c);break;case "textleading":a.textLeading=Math.round(c);break;case "textsize":a.textSize=Math.round(c);
break;case "textspacing":a.textSpacing=c;break;case "volume":a.volume=c;d.setSound(c);break;case "width":b=a.width=c;if(d.get_transition()=="right"||d.get_transition()=="left")b=c;d.get_currentType()!="paragraph"&&d.get_currentType()!="html"||d.setTextSize(b,d.get_height());d.set_width(b);break;case "x":a.x=d.set_x(c);break;case "y":a.y=d.set_y(c)}},orderUp:function(){if(this._select.image!=null){for(var a=0,b=Object.keys(this._instances.h).length,c=0;c<b;)c++,++a;this._select.image.getOrder()<a-
1&&(this._select.image.setOrder(this._select.image.getOrder()+1),this.updateOrder())}},orderDown:function(){this._select.image!=null&&this._select.image.getOrder()>0&&(this._select.image.setOrder(this._select.image.getOrder()-1),this.updateOrder())},updateOrder:function(){var a=this._instances.h,b=Object.keys(a),c=b.length;for(a=0;a<c;){var d=b[a++];this._instances.h[d].setOrder(this._scene.getChildIndex(this._instances.h[d]),!1)}c=[];b=[];a=p.movie.scene.keyframes[p.area.get_currentKf()].h;a=Object.keys(a);
d=a.length;for(var f=0;f<d;){for(var g=a[f++],h=p.movie.scene.keyframes[p.area.get_currentKf()].h[g];c.length<h.horizontal.order+1;)c.push("");for(c[h.horizontal.order]==""?c[h.horizontal.order]=g:c.splice(h.horizontal.order,0,g);b.length<h.vertical.order+1;)b.push("");b[h.vertical.order]==""?b[h.vertical.order]=g:b.splice(h.vertical.order,0,g)}a=f=0;for(d=c.length;a<d;)g=a++,c[g]!=""&&(p.movie.scene.keyframes[p.area.get_currentKf()].h[c[g]].horizontal.order=f,++f);a=c=0;for(d=b.length;a<d;)f=a++,
b[f]!=""&&(p.movie.scene.keyframes[p.area.get_currentKf()].h[b[f]].vertical.order=c,++c)},removeInstance:function(a,b){b==null&&(b=!1);return Object.prototype.hasOwnProperty.call(this._instances.h,a)&&Object.prototype.hasOwnProperty.call(p.movie.scene.keyframes[this._currentKf].h,a)?(b&&k.history.clear(),k.history.addState(k.ln.get("rightbar-history-removeinst")),this._scene.removeChild(this._instances.h[a]),b=this._instances,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],b=p.movie.scene.keyframes[this._currentKf],
Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.updateOrder(),!0):!1},onStage:function(a){this.removeEventListener("addedToStage",m(this,this.onStage));this.addEventListener("mouseUp",m(this,this.onMouseUp))},onMouseUp:function(a){p.mode=="editor"&&this._select.image!=null&&this._select.endPropSet()},nextKeyframe:function(){p.movie.scene.ackeyframes.length>this._currentKf&&p.movie.scene.ackeyframes[this._currentKf]!=""&&p.parser.run(p.movie.scene.ackeyframes[this._currentKf]);p.movie.scene.staticsc?
this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],this._currentKf):(this._currentKf++,this._currentKf>=p.movie.scene.keyframes.length&&(this._currentKf=p.movie.scene.loop),this._kftoLoad=this._currentKf,this._playing&&(this._kftoLoad=-1,this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],this._currentKf)))},playPause:function(){this._playing?(Ca.pauseAll(),this._playing=!1):(Ca.resumeAll(),this._kftoLoad>=0&&(this._kftoLoad=-1,this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],
this._currentKf)),this._playing=!0)},play:function(){if(!this._playing){p.mode!="editorplayerwait"?Ca.resumeAll():(this._currentKf++,this._currentKf>=p.movie.scene.keyframes.length&&(this._currentKf=p.movie.scene.loop),this._kftoLoad=this._currentKf,p.mode="editorplayer");this._kftoLoad>=0&&(this._kftoLoad=-1,this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],this._currentKf));for(var a=Object.keys(this._instances.h),b=a.length,c=0;c<b;){var d=a[c++];this._instances.h[d].playOnLoad()&&this._instances.h[d].play()}this._playing=
!0}},pause:function(){if(this._playing){Ca.pauseAll();this._playing=!1;for(var a=Object.keys(this._instances.h),b=a.length,c=0;c<b;){var d=a[c++];this._instances.h[d].pause()}}},playPauseInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].playPause(),!0):!1},playInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].play(),!0):!1},pauseInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,
a)?(this._instances.h[a].pause(),!0):!1},stopInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].stop(),!0):!1},instancePlaying:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].get_playing():!1},instanceSeek:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].seek(b),!0):!1},instanceRef:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,
a)?this._instances.h[a]:null},instanceProp:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].getProp(b):0},instanceBoolProp:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].getBoolProp(b):!1},instanceStringProp:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].getStringProp(b):""},setAnimation:function(a){switch(a){case "bounce.in":Ca.defaultEase=Qk.easeIn;
break;case "bounce.inout":Ca.defaultEase=Qk.easeInOut;break;case "bounce.out":Ca.defaultEase=Qk.easeOut;break;case "cubic.in":Ca.defaultEase=Rk.easeIn;break;case "cubic.inout":Ca.defaultEase=Rk.easeInOut;break;case "cubic.out":Ca.defaultEase=Rk.easeOut;break;case "elastic.in":Ca.defaultEase=hj.easeIn;break;case "elastic.inout":Ca.defaultEase=hj.easeInOut;break;case "elastic.out":Ca.defaultEase=hj.easeOut;break;case "expo.in":Ca.defaultEase=jk.easeIn;break;case "expo.inout":Ca.defaultEase=jk.easeInOut;
break;case "expo.out":Ca.defaultEase=jk.easeOut;break;case "linear":Ca.defaultEase=xn.get_easeNone();break;case "quad.in":Ca.defaultEase=Ni.easeIn;break;case "quad.inout":Ca.defaultEase=Ni.easeInOut;break;case "quad.out":Ca.defaultEase=Ni.easeOut;break;case "quart.in":Ca.defaultEase=th.easeIn;break;case "quart.inout":Ca.defaultEase=th.easeInOut;break;case "quart.out":Ca.defaultEase=th.easeOut;break;case "quint.in":Ca.defaultEase=Sk.easeIn;break;case "quint.inout":Ca.defaultEase=Sk.easeInOut;break;
case "quint.out":Ca.defaultEase=Sk.easeOut;break;case "sine.in":Ca.defaultEase=Tk.easeIn;break;case "sine.inout":Ca.defaultEase=Tk.easeInOut;break;case "sine.out":Ca.defaultEase=Tk.easeOut}},textScroll:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].textScroll(b),!0):!1},updateTexts:function(){for(var a=this._instances.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].updateText()},setText:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,
a)?(this._instances.h[a].setText(b),!0):!1},setVisible:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].set_visible(b),this.setProperty(a,"visible",b,b),!0):!1},setProperty:function(a,b,c,d){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].fixProp(b,c,d),!0):!1},releaseProperty:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].releaseProp(b),!0):!1},releaseAllProperties:function(a){a==
null&&(a="");if(a==""){a=this._instances.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].releaseAll();return!0}return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].releaseAll(),!0):!1},next:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].next(),!0):!1},previous:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].previous(),!0):!1},loadAsset:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,
a)?this._instances.h[a].loadAsset(b):!1},loadCollectionAsset:function(a,b,c){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].loadCollectionAsset(b,c):!1},getOverlay:function(a,b){b==null&&(b=!1);if(b){if(!Object.prototype.hasOwnProperty.call(this._bloverlays.h,a)){b=this._bloverlays;var c=new Da;b.h[a]=c;this._bloverlay.addChild(this._bloverlays.h[a])}return this._bloverlays.h[a]}Object.prototype.hasOwnProperty.call(this._overlays.h,a)||(b=this._overlays,c=new Da,
b.h[a]=c,this._overlay.addChild(this._overlays.h[a]));return this._overlays.h[a]},removeOverlay:function(a,b){b==null&&(b=!1);if(b){if(Object.prototype.hasOwnProperty.call(this._bloverlays.h,a))return this._bloverlay.removeChild(this._bloverlays.h[a]),this._bloverlays.h[a].removeChildren(),this._bloverlays.h[a].get_graphics().clear(),b=this._bloverlays,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],!0}else if(Object.prototype.hasOwnProperty.call(this._overlays.h,a))return this._overlay.removeChild(this._overlays.h[a]),
this._overlays.h[a].removeChildren(),this._overlays.h[a].get_graphics().clear(),b=this._overlays,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],!0;return!1},overlayTop:function(a){return Object.prototype.hasOwnProperty.call(this._overlays.h,a)?(this._overlay.swapChildrenAt(this._overlay.get_numChildren()-1,this._overlay.getChildIndex(this._overlays.h[a])),!0):!1},overlayBottom:function(a){return Object.prototype.hasOwnProperty.call(this._overlays.h,a)?(this._overlay.swapChildrenAt(0,this._overlay.getChildIndex(this._overlays.h[a])),
!0):!1},kill:function(){this.removeEventListener("mouseUp",m(this,this.onMouseUp));this._bgarea.removeChildren();this._bgarea.get_graphics().clear();this._player=this._bgarea=null;this.removeChildren();this._holder.removeChildren();this._holder.set_mask(null);this._holder=null;this._bg.get_graphics().clear();this._bg=null;this._mask.get_graphics().clear();this._mask=null;this._scene.removeChildren();this._scene=null;var a=this._overlays.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];
this.removeOverlay(d)}this._overlays=null;this._overlay.removeChildren();this._overlay=null;a=this._bloverlays.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.removeOverlay(d,!0);this._bloverlays=null;this._bloverlay.removeChildren();this._bloverlay=null;a=this._instances.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];this._instances.h[d].kill();var f=this._instances;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._instances=null;this._uiArea.removeChildren();this._uiArea=
null;this._uiBg.get_graphics().clear();this._uiBg=null;this._inputPanel.kill();this._inputPanel=null},clear:function(){Ca.stop(this,{kfPercent:100},!1,!1);this._currentKf=0;this._scene.removeChildren();for(var a=Object.keys(this._instances.h),b=a.length,c=0;c<b;){var d=a[c++];this._instances.h[d].kill();var f=this._instances;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._uiBg.set_visible(!1);this._inputPanel.set_visible(!1)},setArea:function(){this._bg.get_graphics().clear();this._mask.get_graphics().clear();
this._bg.get_graphics().beginFill(p.movie.data.screen.bgcolor);this._mask.get_graphics().beginFill(0);p.movie.data.screen.type=="square"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.big),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.big)):p.movie.data.screen.type=="horizontal"||p.movie.data.screen.type=="landscape"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.small),this._mask.get_graphics().drawRect(0,
0,p.movie.data.screen.big,p.movie.data.screen.small)):p.movie.data.screen.type=="vertical"||p.movie.data.screen.type=="portrait"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big)):this.get_pOrientation()=="vertical"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big)):
(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.small),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.small));this._bg.get_graphics().endFill();this._mask.get_graphics().endFill();this._uiBg.set_width(this._mask.get_width()*this._scale);this._uiBg.set_height(this._mask.get_height()*this._scale);this._bgarea.get_graphics().clear();this._bgarea.get_graphics().beginFill(0);this._bgarea.get_graphics().drawRect(0,0,this._player.get_rWidth(),
this._player.get_rHeight());this._bgarea.get_graphics().endFill();p.contraptions.changeDisplay();this.place()},showLoginInput:function(a,b){var c=p.parser.parseString("$_TEXTS:logintitle");c==""&&(c="Login");var d=p.parser.parseString("$_TEXTS:logintext");d==""&&(d="Please type your e-mail address. You'll receive a 6 digit code to confirm your identity.");var f=p.parser.parseString("$_TEXTS:termsagree");f==""&&(f="I agree with the above terms.");var g=p.parser.parseString("$_TEXTS:invalidemail");
g==""&&(g="Please provide a valid e-mail address.");var h=p.parser.parseString("$_TEXTS:emailwait");h==""&&(h="Please wait while a confirmation code is sent to your e-mail.");var n=p.parser.parseString("$_TEXTS:noemailsent");n==""&&(n="Error while sending the code by e-mail. Please try again.");var l=p.parser.parseString("$_TEXTS:checkforcode");l==""&&(l="Please check out your e-mail inbox. Type below the 6 digit code you received. If you do not find the message, take a look at you spam folder.");
var q=p.parser.parseString("$_TEXTS:codewait");q==""&&(q="Please wait while the provided code is checked.");var u=p.parser.parseString("$_TEXTS:invalidcode");u==""&&(u="The provided code is invalid. Please try again.");var v=p.parser.parseString("$_TEXTS:emailsubject");v==""&&(v="TilBuci login");var z=p.parser.parseString("$_TEXTS:emailbody");z==""&&(z="Hi, you are receiving this message to confirm your login at TilBuci. Please provide the code below to proceed:\r\n\r\n[CODE]\r\n\r\nIf you did'nt request this code, don't worry: just ignore this message.");
var r=p.parser.parseString("$_TEXTS:emailsender");r==""&&(r="TilBuci");this._inputPanel.askLogin(c,d,f,g,h,n,l,q,u,v,z,r,a,b)},showStatesInput:function(a,b){var c=p.parser.parseString("$_TEXTS:titlestates");c==""&&(c="Select a state to load");var d=p.parser.parseString("$_TEXTS:waistates");d==""&&(d="Please wait while a list of available saves states is loaded.");var f=p.parser.parseString("$_TEXTS:selectstate");f==""&&(f="Select a state to load.");var g=p.parser.parseString("$_TEXTS:nostates");g==
""&&(g="Sorry, no saved states found to load.");var h=p.parser.parseString("$_TEXTS:dateformat");h==""&&(h="Y-m-d h:i a");this._inputPanel.askStates(c,d,f,g,h,a,b)},showTextInput:function(a,b,c,d){this._inputPanel.askText(a,b,c,d)},showSecretKeyInput:function(a){this._inputPanel.askSecret(a)},showMessageInput:function(a,b,c,d){this._inputPanel.setWarn(a,b,c,d)},showEmailInput:function(a,b,c,d,f){this._inputPanel.askEmail(a,b,c,d,f)},showListInput:function(a,b,c,d,f){this._inputPanel.askList(a,b,c,
d,f)},showNumericInput:function(a,b,c,d,f,g,h,n){n==null&&(n=100);h==null&&(h=0);g==null&&(g=0);this._inputPanel.askNumeric(a,b,c,d,f,g,h,n)},swapInstance:function(a,b){if(Object.prototype.hasOwnProperty.call(this._instances.h,a)){var c=this._instances.h[a];if(c.changeId(a,b)){var d=this._instances;Object.prototype.hasOwnProperty.call(d.h,a)&&delete d.h[a];this._instances.h[b]=c;return!0}}return!1},getInstances:function(){for(var a=[],b=Object.keys(this._instances.h),c=b.length,d=0;d<c;){var f=b[d++];
a.push(f)}return a},pickInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a]:null},maskArea:function(a){a?(this._mask.set_visible(!0),this._holder.set_mask(this._mask)):(this._holder.set_mask(null),this._mask.set_visible(!1))},setOverlay:function(a){a&&this._overlay.parent==null?this._holder.addChild(this._overlay):a||this._overlay.parent==null||this._holder.removeChild(this._overlay)},place:function(){this._holder.removeChild(this._target);this._holder.removeChild(this._overlay);
this._holder.removeChild(this._bloverlay);this.get_pOrientation()=="vertical"?(this._scale=this._player.get_rWidth()/this.get_aWidth(),this.get_aHeight()*this._scale>this._player.get_rHeight()&&(this._scale=this._player.get_rHeight()/this.get_aHeight())):(this._scale=this._player.get_rHeight()/this.get_aHeight(),this.get_aWidth()*this._scale>this._player.get_rWidth()&&(this._scale=this._player.get_rWidth()/this.get_aWidth()));this.set_scaleX(this.set_scaleY(this._scale));this._uiBg.set_width(this._mask.get_width()*
this._scale);this._uiBg.set_height(this._mask.get_height()*this._scale);this._player.get_rWidth()-this.get_aWidth()*this._scale<this._player.get_rHeight()-this.get_aHeight()*this._scale?(this._uiArea.set_x(this.set_x(0)),this._uiArea.set_y(this.set_y((this._player.get_rHeight()-this.get_aHeight()*this._scale)/2))):(this._uiArea.set_x(this.set_x((this._player.get_rWidth()-this.get_aWidth()*this._scale)/2)),this._uiArea.set_y(this.set_y(0)));p.contentPosition.x=this._uiArea.get_x();p.contentPosition.y=
this._uiArea.get_y();p.contentWidth=this._uiBg.get_width();p.contentHeight=this._uiBg.get_height();this._player.get_rWidth()>=this._player.get_rHeight()?(p.orientation="horizontal",p.multiply=Math.round(this._player.get_rWidth()/this.get_aWidth())):(p.orientation="vertical",p.multiply=Math.round(this._player.get_rHeight()/this.get_aHeight()));p.multiply<1?p.multiply=1:p.multiply>5&&(p.multiply=5);this._holder.removeChildren();this._holder.addChild(this._bg);this._holder.addChild(this._bloverlay);
this._holder.addChild(this._scene);this._holder.addChild(this._inputArea);this._holder.addChild(this._overlay);for(var a=p.plugins.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];if(f.get_ready())f.info.onDisplayResize(p.orientation,p.multiply)}},removeInputInterfaces:function(){this.removeAllInputs();this.removeAllTareas();this.removeAllNumerics();this.removeAllToggles()},addInput:function(a,b,c,d,f){f==null&&(f="");this._player.addInput(a,b,c,d,f)},placeInput:function(a,b,c,d){this._player.placeInput(a,
b,c,d)},removeInput:function(a){this._player.removeInput(a)},removeAllInputs:function(){this._player.removeAllInputs()},getInputText:function(a){return this._player.getInputText(a)},setInputText:function(a,b){this._player.setInputText(a,b)},setInputPassword:function(a,b){this._player.setInputPassword(a,b)},addTarea:function(a,b,c,d,f){this._player.addTarea(a,b,c,d,f)},placeTarea:function(a,b,c,d,f){this._player.placeTarea(a,b,c,d,f)},removeTarea:function(a){this._player.removeTarea(a)},removeAllTareas:function(){this._player.removeAllTareas()},
getTareaText:function(a){return this._player.getTareaText(a)},setTareaText:function(a,b){this._player.setTareaText(a,b)},addNumeric:function(a,b,c,d,f){this._player.addNumeric(a,b,c,d,f)},placeNumeric:function(a,b,c,d){this._player.placeNumeric(a,b,c,d)},removeNumeric:function(a){this._player.removeNumeric(a)},removeAllNumerics:function(){this._player.removeAllNumerics()},getNumericValue:function(a){return this._player.getNumericValue(a)},setNumericValue:function(a,b){this._player.setNumericValue(a,
b)},setNumericBounds:function(a,b,c,d){this._player.setNumericBounds(a,b,c,d)},addToggle:function(a,b,c,d){this._player.addToggle(a,b,c,d)},placeToggle:function(a,b,c){this._player.placeToggle(a,b,c)},removeToggle:function(a){this._player.removeToggle(a)},removeAllToggles:function(){this._player.removeAllToggles()},getToggleValue:function(a){return this._player.getToggleValue(a)},setToggleValue:function(a,b){this._player.setToggleValue(a,b)},invertToggle:function(a){this._player.invertToggle(a)},
noMouseOver:function(){for(var a=this._instances.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].onMouseOut()},__class__:Al,__properties__:I(Da.prototype.__properties__,{get_currentKf:"get_currentKf",get_playing:"get_playing",get_pOrientation:"get_pOrientation",get_aOrientation:"get_aOrientation",get_aHeight:"get_aHeight",get_aWidth:"get_aWidth"})});var Ms=function(){this._lastname="xxx";this._inst1len=this._inst2len=this._inst3len=0;this._tgname="";this.targetX=this.targetY=0;this.lastInstOver=
"";Da.call(this);this.set_visible(!1);p.usingTarget=0;this._custom=new ad(m(this,this.onLoad));this.clear()};t["com.tilbuci.player.Target"]=Ms;Ms.__name__="com.tilbuci.player.Target";Ms.__super__=Da;Ms.prototype=I(Da.prototype,{timer:null,lastInstOver:null,targetX:null,targetY:null,_bmp:null,_tgname:null,_custom:null,_inst1len:null,_inst2len:null,_inst3len:null,_lastname:null,clear:function(){this.removeChildren();this._tgname="";this._lastname="xxx";this._inst1len=this._inst2len=this._inst3len=0;
this._bmp!=null&&this._bmp.get_bitmapData().dispose();this._bmp=new Ma(Z.getBitmapData("icTarget"));this._bmp.set_x(-(this._bmp.get_width()/2));this._bmp.set_y(-(this._bmp.get_height()/2));this.addChild(this._bmp)},load:function(a){return Object.prototype.hasOwnProperty.call(p.contraptions.targets.h,a)&&p.contraptions.targets.h[a].ok?(this.clear(),this._tgname=a,this._lastname="",this._custom.load(p.contraptions.targets.h[a].defaultp),p.contraptions.targets.h[a].inst1name!=""&&(this._inst1len=p.contraptions.targets.h[a].inst1name.length),
p.contraptions.targets.h[a].inst2name!=""&&(this._inst2len=p.contraptions.targets.h[a].inst2name.length),p.contraptions.targets.h[a].inst3name!=""&&(this._inst3len=p.contraptions.targets.h[a].inst3name.length),!0):!1},setGraphic:function(a){this._tgname!=""&&a!=this._lastname&&(this._lastname=a,a==""?this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].defaultp&&this._custom.load(p.contraptions.targets.h[this._tgname].defaultp):a=="_menu_"&&p.contraptions.targets.h[this._tgname].menus!=
""?this._custom.load(p.contraptions.targets.h[this._tgname].menus):a=="_interface_"&&p.contraptions.targets.h[this._tgname].interf!=""?this._custom.load(p.contraptions.targets.h[this._tgname].interf):this._inst1len>0&&V.substr(a,0,this._inst1len)==p.contraptions.targets.h[this._tgname].inst1name?this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].inst1&&this._custom.load(p.contraptions.targets.h[this._tgname].inst1):this._inst2len>0&&V.substr(a,0,this._inst2len)==p.contraptions.targets.h[this._tgname].inst2name?
this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].inst2&&this._custom.load(p.contraptions.targets.h[this._tgname].inst2):this._inst3len>0&&V.substr(a,0,this._inst3len)==p.contraptions.targets.h[this._tgname].inst3name?this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].inst3&&this._custom.load(p.contraptions.targets.h[this._tgname].inst3):this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].defaultp&&this._custom.load(p.contraptions.targets.h[this._tgname].defaultp))},
show:function(){this.targetX=this.set_x(p.area.get_aWidth()/2);this.targetY=this.set_y(p.area.get_aHeight()/2);this.set_visible(!0);p.usingTarget=Math.round(p.area.get_aWidth()/64);p.area.get_aHeight()/64<p.usingTarget&&(p.usingTarget=Math.round(p.area.get_aHeight()/64));p.parser.onDragMoveStop(null);this.set_alpha(1)},hide:function(){p.usingTarget=0;this.set_visible(!1);p.parser.onDragMoveStop(null)},onLoad:function(a){a?(this.removeChildren(),this._custom.set_visible(!0),this._custom.set_x(-(this._custom.get_width()/
2)),this._custom.set_y(-(this._custom.get_height()/2)),this.addChild(this._custom)):this.clear()},__class__:Ms});var Le=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);c==null&&(c="");this._actions=new G;this.active=!1;this.config=new G;this._plindex=this._plws=this._ready=!1;qa.call(this);this._plname=a;this._pltitle=b;this._plfile=c;this._plindex=d;this._plws=f;this._ready=!1;this.info=new Os};t["com.tilbuci.plugin.Plugin"]=Le;Le.__name__="com.tilbuci.plugin.Plugin";Le.__super__=qa;Le.prototype=
I(qa.prototype,{plname:null,_plname:null,get_plname:function(){return this._plname},pltitle:null,_pltitle:null,get_pltitle:function(){return this._pltitle==null||this._pltitle==""?this._plname:this._pltitle},plfile:null,_plfile:null,get_plfile:function(){return this._plfile},_plindex:null,_plws:null,ready:null,_ready:null,get_ready:function(){return this._ready},config:null,info:null,active:null,_actions:null,_access:null,initialize:function(a){var b="0";this._plindex&&(b="1");var c="0";this._plws&&
(c="1");var d=p.ws,f=new G;f.h.name=this._plname;f.h.file=this._plfile;f.h.index=b;f.h.ws=c;d.send("Plugin/GetConfig",f,m(this,this.onConfig));this._access=a},onConfig:function(a,b){if(a&&b.map.h.e==0&&Object.prototype.hasOwnProperty.call(b.map.h,"conf")){a=0;for(var c=y.fields(b.map.h.conf);a<c.length;){var d=c[a];++a;var f=y.field(b.map.h.conf,d);this.config.h[d]=f}}this._ready=!0},addMenu:function(a,b,c){c==null&&(c=!0);if(p.mode=="editor"){var d=k.editorActions,f=new G;f.h.name=a;f.h.callback=
b;f.h.top=c;f.h.asset="btPlugin";d("addleftbutton",f)}},showWindow:function(a){var b=k.editorActions,c=new G;c.h.wd=a;b("showwindow",c)},hideWindow:function(a){var b=k.editorActions,c=new G;c.h.wd=a;b("hidewindow",c)},updateConfig:function(a){var b="0";this._plindex&&(b="1");var c="0";this._plws&&(c="1");var d=new G;d.h.name=this._plname;d.h.file=this._plfile;d.h.index=b;d.h.ws=c;b=Ga.jsonStringify(this.config);d.h.conf=b;k.ws.send("Plugin/SetConfig",d,a)},setAction:function(a,b){this._actions.h[a]=
b},removeAction:function(a){if(Object.prototype.hasOwnProperty.call(this._actions.h,a)){var b=this._actions;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];return!0}return!1},hasAction:function(a){return Object.prototype.hasOwnProperty.call(this._actions.h,a)},runAction:function(a,b,c){return this.hasAction(a)?this._actions.h[a](b,c):!1},checkKeyboard:function(a){return!1},getOverlay:function(a){return p.area.getOverlay(a)},removeOverlay:function(a){return p.area.removeOverlay(a)},overlayTop:function(a){return p.area.overlayTop(a)},
overlayBottom:function(a){return p.area.overlayBottom(a)},parseBool:function(a){return{found:!1,value:!1}},parseString:function(a){return{found:!1,value:""}},parseFloat:function(a){return{found:!1,value:0}},parseInt:function(a){return{found:!1,value:0}},addActionGroupDescription:function(a){p.parser.addAvailableGroup(a)},addGlobalVarGroupDescription:function(a){p.parser.addAvailableGlobal(a)},getConfig:function(a){return{}},setConfig:function(a){},getSceneConfig:function(a,b){return{}},setSceneConfig:function(a,
b){},kill:function(){this._ready=!1;for(var a=Object.keys(this._actions.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._actions;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._actions=null;this._access.kill();this._access=null;this.info.kill();this.info=null},__class__:Le,__properties__:{get_ready:"get_ready",get_plfile:"get_plfile",get_pltitle:"get_pltitle",get_plname:"get_plname"}});var aw=function(a,b,c,d,f){this.varString=a;this.varFloat=b;this.varInt=c;this.varBool=d;this.parser=
f};t["com.tilbuci.plugin.PluginAccess"]=aw;aw.__name__="com.tilbuci.plugin.PluginAccess";aw.prototype={varString:null,varFloat:null,varInt:null,varBool:null,parser:null,kill:function(){this.parser=this.varBool=this.varInt=this.varFloat=this.varString=null},__class__:aw};var Kj=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);b==null&&(b=!0);this.extra=new G;this.ok=!0;pa.call(this,a,d,f);this.ok=b;c!=null&&(this.extra=c)};t["com.tilbuci.plugin.PluginEvent"]=Kj;Kj.__name__="com.tilbuci.plugin.PluginEvent";
Kj.__super__=pa;Kj.prototype=I(pa.prototype,{ok:null,extra:null,__class__:Kj});var qd=function(){};t["feathers.core.IFocusObject"]=qd;qd.__name__="feathers.core.IFocusObject";qd.__isInterface__=!0;qd.__interfaces__=[dd,Mb];qd.prototype={get_focusEnabled:null,set_focusEnabled:null,get_focusOwner:null,set_focusOwner:null,showFocus:null,__class__:qd,__properties__:{set_focusOwner:"set_focusOwner",get_focusOwner:"get_focusOwner",set_focusEnabled:"set_focusEnabled",get_focusEnabled:"get_focusEnabled"}};
var x=R["feathers.core.InvalidationFlag"]={__ename__:"feathers.core.InvalidationFlag",__constructs__:null,STATE:{_hx_name:"STATE",_hx_index:0,__enum__:"feathers.core.InvalidationFlag",toString:E},SIZE:{_hx_name:"SIZE",_hx_index:1,__enum__:"feathers.core.InvalidationFlag",toString:E},STYLES:{_hx_name:"STYLES",_hx_index:2,__enum__:"feathers.core.InvalidationFlag",toString:E},SKIN:{_hx_name:"SKIN",_hx_index:3,__enum__:"feathers.core.InvalidationFlag",toString:E},LAYOUT:{_hx_name:"LAYOUT",_hx_index:4,
__enum__:"feathers.core.InvalidationFlag",toString:E},DATA:{_hx_name:"DATA",_hx_index:5,__enum__:"feathers.core.InvalidationFlag",toString:E},SCROLL:{_hx_name:"SCROLL",_hx_index:6,__enum__:"feathers.core.InvalidationFlag",toString:E},SELECTION:{_hx_name:"SELECTION",_hx_index:7,__enum__:"feathers.core.InvalidationFlag",toString:E},FOCUS:{_hx_name:"FOCUS",_hx_index:8,__enum__:"feathers.core.InvalidationFlag",toString:E},SORT:{_hx_name:"SORT",_hx_index:9,__enum__:"feathers.core.InvalidationFlag",toString:E},
CUSTOM:(B=function(a){return{_hx_index:10,value:a,__enum__:"feathers.core.InvalidationFlag",toString:E}},B._hx_name="CUSTOM",B.__params__=["value"],B)};x.__constructs__=[x.STATE,x.SIZE,x.STYLES,x.SKIN,x.LAYOUT,x.DATA,x.SCROLL,x.SELECTION,x.FOCUS,x.SORT,x.CUSTOM];var Lc=function(){};t["feathers.utils.DisplayObjectFactory"]=Lc;Lc.__name__="feathers.utils.DisplayObjectFactory";Lc.withDisplayObject=function(a,b){var c=new Lc;c.create=function(){return a};c.destroy=b;return c};Lc.withClass=function(a,
b){b==null&&(b=function(d){w.__implements(d,Fa)&&d.dispose()});var c=new Lc;c.create=function(){return ab.createInstance(a,[])};c.destroy=b;return c};Lc.withFunction=function(a,b){var c=new Lc;c.create=a;c.destroy=b;return c};Lc.prototype={create:function(){return null},destroy:function(a){},__class__:Lc};var w=function(){};t["js.Boot"]=w;w.__name__="js.Boot";w.getClass=function(a){if(a==null)return null;if(a instanceof Array)return Array;var b=a.__class__;if(b!=null)return b;a=w.__nativeClassName(a);
return a!=null?w.__resolveNativeClass(a):null};w.__string_rec=function(a,b){if(a==null)return"null";if(b.length>=5)return"<...>";var c=typeof a;c=="function"&&(a.__name__||a.__ename__)&&(c="object");switch(c){case "function":return"<function>";case "object":if(a.__enum__){var d=R[a.__enum__].__constructs__[a._hx_index];c=d._hx_name;if(d.__params__){b+="\t";var f=[],g=0;for(d=d.__params__;g<d.length;){var h=d[g];g+=1;f.push(w.__string_rec(a[h],b))}return c+"("+f.join(",")+")"}return c}if(a instanceof
Array){c="[";b+="\t";f=0;for(g=a.length;f<g;)d=f++,c+=(d>0?",":"")+w.__string_rec(a[d],b);return c+"]"}try{f=a.toString}catch(n){return Pb.lastError=n,"???"}if(f!=null&&f!=Object.toString&&typeof f=="function"&&(c=a.toString(),c!="[object Object]"))return c;c="{\n";b+="\t";f=a.hasOwnProperty!=null;g=null;for(g in a)f&&!a.hasOwnProperty(g)||g=="prototype"||g=="__class__"||g=="__super__"||g=="__interfaces__"||g=="__properties__"||(c.length!=2&&(c+=", \n"),c+=b+g+" : "+w.__string_rec(a[g],b));b=b.substring(1);
return c+("\n"+b+"}");case "string":return a;default:return String(a)}};w.__interfLoop=function(a,b){if(a==null)return!1;if(a==b)return!0;var c=a.__interfaces__;if(c!=null)for(var d=0,f=c.length;d<f;){var g=d++;g=c[g];if(g==b||w.__interfLoop(g,b))return!0}return w.__interfLoop(a.__super__,b)};w.__instanceof=function(a,b){if(b==null)return!1;switch(b){case Array:return a instanceof Array;case $v:return typeof a=="boolean";case eA:return a!=null;case Iz:return typeof a=="number";case jw:return typeof a==
"number"?(a|0)===a:!1;case String:return typeof a=="string";default:if(a!=null)if(typeof b=="function"){if(w.__downcastCheck(a,b))return!0}else{if(typeof b=="object"&&w.__isNativeObj(b)&&a instanceof b)return!0}else return!1;return b==kw&&a.__name__!=null||b==Rz&&a.__ename__!=null?!0:a.__enum__!=null?R[a.__enum__]==b:!1}};w.__downcastCheck=function(a,b){return a instanceof b?!0:b.__isInterface__?w.__interfLoop(w.getClass(a),b):!1};w.__implements=function(a,b){return w.__interfLoop(w.getClass(a),b)};
w.__cast=function(a,b){if(a==null||w.__instanceof(a,b))return a;throw ba.thrown("Cannot cast "+H.string(a)+" to "+H.string(b));};w.__nativeClassName=function(a){a=w.__toStr.call(a).slice(8,-1);return a=="Object"||a=="Function"||a=="Math"||a=="JSON"?null:a};w.__isNativeObj=function(a){return w.__nativeClassName(a)!=null};w.__resolveNativeClass=function(a){return wa[a]};var Dl=function(){};t["feathers.controls.IRange"]=Dl;Dl.__name__="feathers.controls.IRange";Dl.__isInterface__=!0;Dl.__interfaces__=
[Fa];Dl.prototype={get_value:null,set_value:null,get_minimum:null,set_minimum:null,get_maximum:null,set_maximum:null,__class__:Dl,__properties__:{set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"}};var $o=function(){};t["feathers.controls.IScrollBar"]=$o;$o.__name__="feathers.controls.IScrollBar";$o.__isInterface__=!0;$o.__interfaces__=[Dl];$o.prototype={get_step:null,set_step:null,get_page:null,set_page:null,
__class__:$o,__properties__:{set_page:"set_page",get_page:"get_page",set_step:"set_step",get_step:"get_step"}};var uh=function(){};t["feathers.core.IStateContext"]=uh;uh.__name__="feathers.core.IStateContext";uh.__isInterface__=!0;uh.__interfaces__=[Db];uh.prototype={get_currentState:null,__class__:uh,__properties__:{get_currentState:"get_currentState"}};var Qh=function(){};t["feathers.controls.ITriggerView"]=Qh;Qh.__name__="feathers.controls.ITriggerView";Qh.__isInterface__=!0;Qh.__interfaces__=
[Fa];var li=function(a){this.__backgroundSkin=null;this.__keepDownStateOnRollOut=!1;this._stateToSkin=new cf;this._pointerToState=this._keyToState=this._pointerTrigger=this._backgroundSkinMeasurements=this._currentBackgroundSkin=null;this._currentState=Kc.UP;fa.call(this);this.mouseChildren=!1;this.set_buttonMode(!0);this.useHandCursor=!1;this.addEventListener("click",m(this,this.basicButton_clickHandler));this.addEventListener("touchTap",m(this,this.basicButton_touchTapHandler));a!=null&&this.addEventListener("trigger",
a)};t["feathers.controls.BasicButton"]=li;li.__name__="feathers.controls.BasicButton";li.__interfaces__=[uh,Qh];li.__super__=fa;li.prototype=I(fa.prototype,{_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){fa.prototype.set_enabled.call(this,a);this._enabled?this._currentState==Kc.DISABLED&&this.changeState(Kc.UP):this.changeState(Kc.DISABLED);return this._enabled},_pointerToState:null,_keyToState:null,_pointerTrigger:null,_backgroundSkinMeasurements:null,
_currentBackgroundSkin:null,_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},initialize:function(){fa.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=
new tm(this,m(this,this.changeState),Kc.UP,Kc.DOWN,Kc.HOVER));this._keyToState==null&&(this._keyToState=new Dn(this,m(this,this.changeState),Kc.UP,Kc.DOWN));this._pointerTrigger==null&&(this._pointerTrigger=new Ps(this))},update:function(){this.commitChanges();this.measure();this.layoutContent()},commitChanges:function(){var a=this.isInvalid(x.STYLES),b=this.isInvalid(x.STATE);(a||b)&&this.refreshBackgroundSkin();a&&this.refreshInteractivity()},layoutContent:function(){this.layoutBackgroundSkin()},
refreshInteractivity:function(){this._pointerToState.set_keepDownStateOnRollOut(this.get_keepDownStateOnRollOut())},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this.get_backgroundSkin()},
addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),w.__implements(a,ee)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),
this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;w.__implements(this._currentBackgroundSkin,
rb)&&(h=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();var n=this.get_explicitWidth();a&&(n=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_width():0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_height():0);b=this.get_explicitMinWidth();c&&(b=h!=null?h.get_minWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null?
this._backgroundSkinMeasurements.minWidth:0);c=this.get_explicitMinHeight();d&&(c=h!=null?h.get_minHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null?this._backgroundSkinMeasurements.minHeight:0);d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():
this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),
w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},changeState:function(a){this._enabled||(a=Kc.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),Y.dispatch(this,"stateChange"))},basicButton_clickHandler:function(a){this._enabled||a.stopImmediatePropagation()},basicButton_touchTapHandler:function(a){this._enabled||a.stopImmediatePropagation()},__keepDownStateOnRollOut:null,get_keepDownStateOnRollOut:function(){return this.__keepDownStateOnRollOut},
set_keepDownStateOnRollOut:function(a){if(!this.setStyle("keepDownStateOnRollOut")||this.__keepDownStateOnRollOut==a)return this.__keepDownStateOnRollOut;this._previousClearStyle=m(this,this.clearStyle_keepDownStateOnRollOut);this.__keepDownStateOnRollOut=a;this.setInvalid(x.STYLES);return this.__keepDownStateOnRollOut},clearStyle_keepDownStateOnRollOut:function(){this.set_keepDownStateOnRollOut(!1);return this.get_keepDownStateOnRollOut()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},
set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__class__:li,__properties__:I(fa.prototype.__properties__,{set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",
set_keepDownStateOnRollOut:"set_keepDownStateOnRollOut",get_keepDownStateOnRollOut:"get_keepDownStateOnRollOut",get_currentState:"get_currentState"})});var El=function(){};t["feathers.core.IHTMLTextControl"]=El;El.__name__="feathers.core.IHTMLTextControl";El.__isInterface__=!0;El.__interfaces__=[Fa];El.prototype={get_htmlText:null,set_htmlText:null,__class__:El,__properties__:{set_htmlText:"set_htmlText",get_htmlText:"get_htmlText"}};var re=function(){};t["feathers.core.ITextControl"]=re;re.__name__=
"feathers.core.ITextControl";re.__isInterface__=!0;re.__interfaces__=[Fa];re.prototype={get_text:null,set_text:null,get_baseline:null,__class__:re,__properties__:{get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text"}};var Xb=function(a,b){this.__showText=!0;this.__gap=this.__minGap=this.__iconOffsetX=this.__iconOffsetY=this.__textOffsetX=this.__textOffsetY=0;this.__iconPosition=ra.LEFT;this.__verticalAlign=hc.MIDDLE;this.__horizontalAlign=Wb.CENTER;this.__paddingTop=this.__paddingRight=
this.__paddingBottom=this.__paddingLeft=0;this.__icon=null;this.__embedFonts=this.__wordWrap=!1;this.__textFormat=this.__styleSheet=this.__disabledTextFormat=null;this._stateToTextFormat=new cf;this._ignoreIconResizes=this._wrappedOnMeasure=!1;this._iconMeasurements=this._currentIcon=null;this._stateToIcon=new cf;this._htmlText=null;this._updatedTextStyles=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeButtonTheme();li.call(this,
b);this.set_text(a);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.focusRect=!1;this.addEventListener("keyDown",m(this,this.button_keyDownHandler));this.addEventListener("focusIn",m(this,this.button_focusInHandler));this.addEventListener("focusOut",m(this,this.button_focusOutHandler))};t["feathers.controls.Button"]=Xb;Xb.__name__="feathers.controls.Button";Xb.__interfaces__=[qd,El,re];Xb.__super__=li;Xb.prototype=I(li.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,
_previousSimpleTextFormat:null,_updatedTextStyles:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){if(this.textField==null)return 0;var a=this._text!=null&&this._text.length>
0,b=this._htmlText!=null&&this._htmlText.length>0;if(!this.get_showText()||!a&&!b){a=this.textField.get_y();if(!this.get_showText()||this._text==null&&this._htmlText==null)if(this._currentIcon!=null)a=this._currentIcon.get_y()+(this._currentIcon.get_height()-this._textMeasuredHeight)/2;else if(this._currentBackgroundSkin!=null)a=(this._currentBackgroundSkin.get_height()-this._textMeasuredHeight)/2;else return 0;this.textField.set_text("\u200b");a+=this.textField.getLineMetrics(0).ascent;this.textField.set_text("");
return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_stateToIcon:null,_iconMeasurements:null,_currentIcon:null,_ignoreIconResizes:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_stateToTextFormat:null,getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,b),this.setInvalid(x.STYLES))},
getIconForState:function(a){return this._stateToIcon.get(a)},setIconForState:function(a,b){if(this.setStyle("setIconForState",a)){var c=this._stateToIcon.get(a);c!=null&&c==this._currentIcon&&(this.removeCurrentIcon(c),this._currentIcon=null);b==null?this._stateToIcon.remove(a):this._stateToIcon.set(a,b);this.setInvalid(x.STYLES)}},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeButtonTheme:function(){lw.initialize()},
initialize:function(){li.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_selectable(!1),this.textField.set_multiline(!0),this.addChild(this.textField))},commitChanges:function(){li.prototype.commitChanges.call(this);var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(d||c)&&this.refreshIcon();(d||c)&&this.refreshTextStyles();(a||d||c||b)&&this.refreshText(b)},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this.get_showText()&&this._text!=null,n=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;(h||n)&&this.refreshTextFieldDimensions(!0);this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,
this);h=null;w.__implements(this._currentBackgroundSkin,rb)&&(h=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();w.__implements(this._currentIcon,da)&&(n=this._ignoreIconResizes,this._ignoreIconResizes=!0,this._currentIcon.validateNow(),this._ignoreIconResizes=n);n=this.get_explicitWidth();a&&(n=this.measureContentWidth(),n+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(n=Math.max(this._currentBackgroundSkin.get_width(),
n)));a=this.get_explicitHeight();b&&(a=this.measureContentHeight(),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this.measureContentMinWidth(),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,
b)));c=this.get_explicitMinHeight();d&&(c=this.measureContentMinHeight(),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:
1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},calculateExplicitWidthForTextMeasurement:function(){var a=null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=
null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+this.get_paddingRight();var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentIcon==null||this.get_iconPosition()!=ra.LEFT&&this.get_iconPosition()!=ra.RIGHT||(w.__implements(this._currentIcon,da)&&this._currentIcon.validateNow(),a-=this._currentIcon.get_width()+b);a<0&&(a=0);return a},measureContentWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},measureContentMinWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentMinHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},refreshTextStyles:function(){this.textField.get_wordWrap()!=this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),
this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,
this.button_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.button_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this.get_showText()&&this._text!=null&&this._text.length>0,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=
this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),this.get_wordWrap()&&this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),
this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&this.textField.set_wordWrap(this.get_wordWrap()),b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=this._htmlText},getCurrentTextFormat:function(){if(this.get_styleSheet()!=null)return null;var a=this._stateToTextFormat.get(this._currentState);return a!=
null?a:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},layoutContent:function(){li.prototype.layoutContent.call(this);this.layoutChildren()},layoutChildren:function(){this.refreshTextFieldDimensions(!1);var a=this.get_showText()&&this._text!=null,b=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,c=this._currentIcon!=null&&this.get_iconPosition()!=ra.MANUAL;(a||b)&&c?(this.positionSingleChild(this.textField),this.positionTextAndIcon()):
a||b?this.positionSingleChild(this.textField):c&&this.positionSingleChild(this._currentIcon);this._currentIcon!=null&&(this.get_iconPosition()==ra.MANUAL&&(this._currentIcon.set_x(this.get_paddingLeft()),this._currentIcon.set_y(this.get_paddingTop())),c=this._currentIcon,c.set_x(c.get_x()+this.get_iconOffsetX()),c=this._currentIcon,c.set_y(c.get_y()+this.get_iconOffsetY()));if(a||b)c=this.textField,c.set_x(c.get_x()+this.get_textOffsetX()),c=this.textField,c.set_y(c.get_y()+this.get_textOffsetY())},
refreshTextFieldDimensions:function(a){var b=this._ignoreIconResizes;this._ignoreIconResizes=!0;w.__implements(this._currentIcon,da)&&this._currentIcon.validateNow();this._ignoreIconResizes=b;b=this.get_showText()&&this._text!=null;var c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;if(b||c){b=this.actualWidth;c=this.actualHeight;a&&(b=0,a=this.get_explicitWidth(),a==null&&(a=this.get_explicitMaxWidth()),a!=null&&(b=a),c=0,a=this.get_explicitHeight(),a==null&&(a=this.get_explicitMaxHeight()),
a!=null&&(c=a));b-=this.get_paddingLeft()+this.get_paddingRight();c-=this.get_paddingTop()+this.get_paddingBottom();if(this._currentIcon!=null){a=this.get_gap();a==1/0&&(a=this.get_minGap());if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)c-=this._currentIcon.get_height()+a}b>this._textMeasuredWidth&&(b=this._textMeasuredWidth);c>this._textMeasuredHeight&&(c=this._textMeasuredHeight);
b<0&&(b=0);c<0&&(c=0);this.textField.set_width(b);(a=this.get_wordWrap())&&!this._wrappedOnMeasure&&b>=this._textMeasuredWidth&&(a=!1);this.textField.get_wordWrap()!=a&&this.textField.set_wordWrap(a);this.textField.set_height(c)}},positionSingleChild:function(a){this.get_horizontalAlign()==Wb.LEFT?a.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Wb.RIGHT?a.set_x(this.actualWidth-this.get_paddingRight()-a.get_width()):a.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-
this.get_paddingRight()-a.get_width())/2);this.get_verticalAlign()==hc.TOP?a.set_y(this.get_paddingTop()):this.get_verticalAlign()==hc.BOTTOM?a.set_y(this.actualHeight-this.get_paddingBottom()-a.get_height()):a.set_y(this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-a.get_height())/2)},positionTextAndIcon:function(){if(this.get_iconPosition()==ra.TOP)if(this.get_gap()==1/0)this._currentIcon.set_y(this.get_paddingTop()),this.textField.set_y(this.actualHeight-this.get_paddingBottom()-
this.textField.get_height());else{if(this.get_verticalAlign()==hc.TOP){var a=this.textField;a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap()))}else this.get_verticalAlign()==hc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap())/2));this._currentIcon.set_y(this.textField.get_y()-this._currentIcon.get_height()-this.get_gap())}else this.get_iconPosition()==ra.RIGHT?this.get_gap()==1/0?(this.textField.set_x(this.get_paddingLeft()),this._currentIcon.set_x(this.actualWidth-
this.get_paddingRight()-this._currentIcon.get_width())):(this.get_horizontalAlign()==Wb.RIGHT?(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap()))):this.get_horizontalAlign()==Wb.CENTER&&(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap())/2)),this._currentIcon.set_x(this.textField.get_x()+this.textField.get_width()+this.get_gap())):this.get_iconPosition()==ra.BOTTOM?this.get_gap()==1/0?(this.textField.set_y(this.get_paddingTop()),this._currentIcon.set_y(this.actualHeight-
this.get_paddingBottom()-this._currentIcon.get_height())):(this.get_verticalAlign()==hc.BOTTOM?(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap()))):this.get_verticalAlign()==hc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap())/2)),this._currentIcon.set_y(this.textField.get_y()+this.textField.get_height()+this.get_gap())):this.get_iconPosition()==ra.LEFT&&(this.get_gap()==1/0?(this._currentIcon.set_x(this.get_paddingLeft()),
this.textField.set_x(this.actualWidth-this.get_paddingRight()-this.textField.get_width())):(this.get_horizontalAlign()==Wb.LEFT?(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width()))):this.get_horizontalAlign()==Wb.CENTER&&(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width())/2)),this._currentIcon.set_x(this.textField.get_x()-this.get_gap()-this._currentIcon.get_width())));this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT?
this.get_verticalAlign()==hc.TOP?this._currentIcon.set_y(this.get_paddingTop()):this.get_verticalAlign()==hc.BOTTOM?this._currentIcon.set_y(this.actualHeight-this.get_paddingBottom()-this._currentIcon.get_height()):this._currentIcon.set_y(this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentIcon.get_height())/2):this.get_horizontalAlign()==Wb.LEFT?this._currentIcon.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Wb.RIGHT?this._currentIcon.set_x(this.actualWidth-
this.get_paddingRight()-this._currentIcon.get_width()):this._currentIcon.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this._currentIcon.get_width())/2)},refreshIcon:function(){var a=this._currentIcon;this._currentIcon=this.getCurrentIcon();this._currentIcon!=a&&(this.removeCurrentIcon(a),this.addCurrentIcon(this._currentIcon))},addCurrentIcon:function(a){if(a==null)this._iconMeasurements=null;else{w.__implements(a,Fa)&&a.initializeNow();this._iconMeasurements==
null?this._iconMeasurements=new Sb(a):this._iconMeasurements.save(a);w.__implements(a,qb)&&a.set_uiContext(this);w.__implements(a,ee)&&a.set_stateContext(this);a.addEventListener("resize",m(this,this.button_icon_resizeHandler),!1,0,!0);var b=this.getChildIndex(this.textField);this.addChildAt(a,b)}},getCurrentIcon:function(){var a=this._stateToIcon.get(this._currentState);return a!=null?a:this.get_icon()},removeCurrentIcon:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.button_icon_resizeHandler)),
w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._iconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},button_keyDownHandler:function(a){!this._enabled||this.get_buttonMode()&&this.focusRect==1||this._focusManager!=null&&this._focusManager.get_focus()!=this||a.keyCode!=32&&a.keyCode!=13||(a.preventDefault(),this.dispatchEvent(new Ic("click")))},button_focusInHandler:function(a){this._keyToState.set_enabled(this._enabled)},button_focusOutHandler:function(a){this._keyToState.set_enabled(!1)},
button_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},button_icon_resizeHandler:function(a){this._ignoreIconResizes||this.setInvalid(x.STYLES)},get_styleContext:function(){return Xb},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},
clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__disabledTextFormat:null,
get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},
set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=
m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__icon:null,get_icon:function(){return this.__icon},set_icon:function(a){if(!this.setStyle("icon")||this.__icon==a)return this.__icon;this._previousClearStyle=m(this,this.clearStyle_icon);this.__icon=a;this.setInvalid(x.STYLES);return this.__icon},clearStyle_icon:function(){this.set_icon(null);return this.get_icon()},
__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||
this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=
m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);
return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==a)return this.__horizontalAlign;this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);this.__horizontalAlign=a;this.setInvalid(x.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Wb.CENTER);
return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(hc.MIDDLE);return this.get_verticalAlign()},__iconPosition:null,get_iconPosition:function(){return this.__iconPosition},
set_iconPosition:function(a){if(!this.setStyle("iconPosition")||this.__iconPosition==a)return this.__iconPosition;this._previousClearStyle=m(this,this.clearStyle_iconPosition);this.__iconPosition=a;this.setInvalid(x.STYLES);return this.__iconPosition},clearStyle_iconPosition:function(){this.set_iconPosition(ra.LEFT);return this.get_iconPosition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=
m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__minGap:null,get_minGap:function(){return this.__minGap},set_minGap:function(a){if(!this.setStyle("minGap")||this.__minGap==a)return this.__minGap;this._previousClearStyle=m(this,this.clearStyle_minGap);this.__minGap=a;this.setInvalid(x.STYLES);return this.__minGap},clearStyle_minGap:function(){this.set_minGap(0);return this.get_minGap()},__iconOffsetX:null,
get_iconOffsetX:function(){return this.__iconOffsetX},set_iconOffsetX:function(a){if(!this.setStyle("iconOffsetX")||this.__iconOffsetX==a)return this.__iconOffsetX;this._previousClearStyle=m(this,this.clearStyle_iconOffsetX);this.__iconOffsetX=a;this.setInvalid(x.STYLES);return this.__iconOffsetX},clearStyle_iconOffsetX:function(){this.set_iconOffsetX(0);return this.get_iconOffsetX()},__iconOffsetY:null,get_iconOffsetY:function(){return this.__iconOffsetY},set_iconOffsetY:function(a){if(!this.setStyle("iconOffsetY")||
this.__iconOffsetY==a)return this.__iconOffsetY;this._previousClearStyle=m(this,this.clearStyle_iconOffsetY);this.__iconOffsetY=a;this.setInvalid(x.STYLES);return this.__iconOffsetY},clearStyle_iconOffsetY:function(){this.set_iconOffsetY(0);return this.get_iconOffsetY()},__textOffsetX:null,get_textOffsetX:function(){return this.__textOffsetX},set_textOffsetX:function(a){if(!this.setStyle("textOffsetX")||this.__textOffsetX==a)return this.__textOffsetX;this._previousClearStyle=m(this,this.clearStyle_textOffsetX);
this.__textOffsetX=a;this.setInvalid(x.STYLES);return this.__textOffsetX},clearStyle_textOffsetX:function(){this.set_textOffsetX(0);return this.get_textOffsetX()},__textOffsetY:null,get_textOffsetY:function(){return this.__textOffsetY},set_textOffsetY:function(a){if(!this.setStyle("textOffsetY")||this.__textOffsetY==a)return this.__textOffsetY;this._previousClearStyle=m(this,this.clearStyle_textOffsetY);this.__textOffsetY=a;this.setInvalid(x.STYLES);return this.__textOffsetY},clearStyle_textOffsetY:function(){this.set_textOffsetY(0);
return this.get_textOffsetY()},__showText:null,get_showText:function(){return this.__showText},set_showText:function(a){if(!this.setStyle("showText")||this.__showText==a)return this.__showText;this._previousClearStyle=m(this,this.clearStyle_showText);this.__showText=a;this.setInvalid(x.STYLES);return this.__showText},clearStyle_showText:function(){this.set_showText(!0);return this.get_showText()},__class__:Xb,__properties__:I(li.prototype.__properties__,{set_showText:"set_showText",get_showText:"get_showText",
set_textOffsetY:"set_textOffsetY",get_textOffsetY:"get_textOffsetY",set_textOffsetX:"set_textOffsetX",get_textOffsetX:"get_textOffsetX",set_iconOffsetY:"set_iconOffsetY",get_iconOffsetY:"get_iconOffsetY",set_iconOffsetX:"set_iconOffsetX",get_iconOffsetX:"get_iconOffsetX",set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_iconPosition:"set_iconPosition",get_iconPosition:"get_iconPosition",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",
set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_icon:"set_icon",get_icon:"get_icon",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",
set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",get_baseline:"get_baseline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var Wf=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.__hideThumbWhenDisabled=!1;this.__paddingTop=this.__paddingRight=this.__paddingBottom=
this.__paddingLeft=0;this.__fixedThumbSize=!1;this.__customDecrementButtonVariant=this.__customIncrementButtonVariant=this.__thumbSkin=this.__trackSkin=this.__secondaryTrackSkin=null;this._pointerStartX=this._pointerStartY=this._thumbStartX=this._thumbStartY=this._previousFallbackTrackWidth=this._previousFallbackTrackHeight=0;this._dragging=!1;this._previousCustomDecrementButtonVariant=this._previousCustomIncrementButtonVariant=this._currentThumbSkin=this._thumbSkinMeasurements=this._currentTrackSkin=
this._trackSkinMeasurements=this._currentSecondaryTrackSkin=this._secondaryTrackSkinMeasurements=null;this.showDecrementAndIncrementButtons=!1;this.liveDragging=this._enableButtonsAtRangeLimits=!0;this._snapInterval=this._page=0;this._step=.01;this._maximum=1;this._value=this._minimum=0;this._isDefaultValue=!0;this.incrementButtonMeasurements=new Sb;this.decrementButtonMeasurements=new Sb;fa.call(this);this.set_tabChildren(!1);this.focusRect=null;this.set_minimum(b);this.set_maximum(c);this.set_value(a);
d!=null&&this.addEventListener("change",d)};t["feathers.controls.supportClasses.BaseScrollBar"]=Wf;Wf.__name__="feathers.controls.supportClasses.BaseScrollBar";Wf.__interfaces__=[$o];Wf.__super__=fa;Wf.prototype=I(fa.prototype,{decrementButton:null,incrementButton:null,decrementButtonMeasurements:null,incrementButtonMeasurements:null,_isDefaultValue:null,_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._isDefaultValue=!1;this._value=
a;this.setInvalid(x.DATA);!this.liveDragging&&this._dragging||Y.dispatch(this,"change");return this._value},_minimum:null,get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;this._minimum=a;this.setInvalid(x.DATA);return this._minimum},_maximum:null,get_maximum:function(){return this._maximum},set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.setInvalid(x.DATA);return this._maximum},_step:null,get_step:function(){return this._step},
set_step:function(a){if(this._step==a)return this._step;this._step=a;this.setInvalid(x.DATA);return this._step},_snapInterval:null,get_snapInterval:function(){return this._snapInterval},set_snapInterval:function(a){if(this._snapInterval==a)return this._snapInterval;this._snapInterval=a;this.setInvalid(x.DATA);return this._snapInterval},_page:null,get_page:function(){return this._page},set_page:function(a){if(this._page==a)return this._page;this._page=a;this.setInvalid(x.DATA);return this._page},liveDragging:null,
_enableButtonsAtRangeLimits:null,get_enableButtonsAtRangeLimits:function(){return this._enableButtonsAtRangeLimits},set_enableButtonsAtRangeLimits:function(a){if(this._enableButtonsAtRangeLimits==a)return this._enableButtonsAtRangeLimits;this._enableButtonsAtRangeLimits=a;this.setInvalid(x.STATE);return this._enableButtonsAtRangeLimits},showDecrementAndIncrementButtons:null,_oldDecrementButtonFactory:null,_decrementButtonFactory:null,get_decrementButtonFactory:function(){return this._decrementButtonFactory},
set_decrementButtonFactory:function(a){if(this._decrementButtonFactory==a)return this._decrementButtonFactory;this._decrementButtonFactory=a;this.setInvalid(Wf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);return this._decrementButtonFactory},_oldIncrementButtonFactory:null,_incrementButtonFactory:null,get_incrementButtonFactory:function(){return this._incrementButtonFactory},set_incrementButtonFactory:function(a){if(this._incrementButtonFactory==a)return this._incrementButtonFactory;this._incrementButtonFactory=
a;this.setInvalid(Wf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);return this._incrementButtonFactory},_previousCustomDecrementButtonVariant:null,_previousCustomIncrementButtonVariant:null,_currentThumbSkin:null,_thumbSkinMeasurements:null,_currentTrackSkin:null,_trackSkinMeasurements:null,_currentSecondaryTrackSkin:null,_secondaryTrackSkinMeasurements:null,_dragging:null,_pointerStartX:null,_pointerStartY:null,_thumbStartX:null,_thumbStartY:null,_previousFallbackTrackWidth:null,_previousFallbackTrackHeight:null,
setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},applyValueRestrictions:function(){this.set_value(this.restrictValue(this._value))},dispose:function(){this.destroyDecrementButton();this.destroyIncrementButton();fa.prototype.dispose.call(this)},initialize:function(){fa.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){this.isInvalid(x.SIZE);var a=this.isInvalid(x.STATE),
b=this.isInvalid(x.STYLES);this._previousCustomDecrementButtonVariant!=this.get_customDecrementButtonVariant()&&this.setInvalidationFlag(Wf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);this._previousCustomIncrementButtonVariant!=this.get_customIncrementButtonVariant()&&this.setInvalidationFlag(Wf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);var c=this.isInvalid(Wf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY),d=this.isInvalid(Wf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);b&&(this.refreshThumb(),this.refreshTrack(),
this.refreshSecondaryTrack());c&&this.createDecrementButton();d&&this.createIncrementButton();(a||b)&&this.refreshEnabled();this.measure();this.layoutContent();this._previousCustomDecrementButtonVariant=this.get_customDecrementButtonVariant();this._previousCustomIncrementButtonVariant=this.get_customIncrementButtonVariant()},measure:function(){var a=w.getClass(this);throw new Ce("Missing override for 'measure' in type "+a.__name__);},refreshThumb:function(){var a=this._currentThumbSkin;this._currentThumbSkin=
this.get_thumbSkin();this._currentThumbSkin!=a&&(a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.removeEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),this.removeChild(a)),this._currentThumbSkin!=null?(w.__implements(this._currentThumbSkin,Fa)&&this._currentThumbSkin.initializeNow(),this._thumbSkinMeasurements==null?this._thumbSkinMeasurements=new Sb(this._currentThumbSkin):this._thumbSkinMeasurements.save(this._currentThumbSkin),this.addChild(this._currentThumbSkin),this._currentThumbSkin.addEventListener("mouseDown",
m(this,this.thumbSkin_mouseDownHandler)),w.__implements(this._currentThumbSkin,qb)&&this._currentThumbSkin.set_uiContext(this)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=a&&(a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentTrackSkin!=null?(w.__implements(this._currentTrackSkin,
Fa)&&this._currentTrackSkin.initializeNow(),this._trackSkinMeasurements==null?this._trackSkinMeasurements=new Sb(this._currentTrackSkin):this._trackSkinMeasurements.save(this._currentTrackSkin),this.addChildAt(this._currentTrackSkin,0),this._currentTrackSkin.addEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler)),w.__implements(this._currentTrackSkin,qb)&&this._currentTrackSkin.set_uiContext(this)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;
this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentSecondaryTrackSkin!=null?(w.__implements(this._currentSecondaryTrackSkin,Fa)&&this._currentSecondaryTrackSkin.initializeNow(),this._secondaryTrackSkinMeasurements==null?this._secondaryTrackSkinMeasurements=new Sb(this._currentSecondaryTrackSkin):
this._secondaryTrackSkinMeasurements.save(this._currentSecondaryTrackSkin),this.addChildAt(this._currentSecondaryTrackSkin,this._currentTrackSkin!=null?1:0),this._currentSecondaryTrackSkin.addEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler)),w.__implements(this._currentSecondaryTrackSkin,qb)&&this._currentSecondaryTrackSkin.set_uiContext(this)):this._secondaryTrackSkinMeasurements=null)},refreshEnabled:function(){w.__implements(this._currentThumbSkin,Fa)&&this._currentThumbSkin.set_enabled(this._enabled);
this.decrementButton!=null&&this.decrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._minimum));this.incrementButton!=null&&this.incrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._maximum))},layoutContent:function(){this.layoutButtons();this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=null?(this.get_graphics().clear(),this.layoutSplitTrack()):this._currentTrackSkin!=null?(this.get_graphics().clear(),
this.layoutSingleTrack()):this.drawFallbackTrack();this.layoutThumb()},layoutButtons:function(){if(this.showDecrementAndIncrementButtons){var a=w.getClass(this);throw new Ce("Missing override for 'layoutButtons' in type "+a.__name__);}},layoutSplitTrack:function(){var a=w.getClass(this);throw new Ce("Missing override for 'layoutSplitTrack' in type "+a.__name__);},layoutSingleTrack:function(){var a=w.getClass(this);throw new Ce("Missing override for 'layoutSingleTrack' in type "+a.__name__);},layoutThumb:function(){var a=
w.getClass(this);throw new Ce("Missing override for 'layoutThumb' in type "+a.__name__);},createDecrementButton:function(){this.destroyDecrementButton();if(this.showDecrementAndIncrementButtons){var a=this._decrementButtonFactory!=null?this._decrementButtonFactory:Wf.defaultDecrementButtonFactory;this._oldDecrementButtonFactory=a;this.decrementButton=a.create();this.decrementButton.get_variant()==null&&(a=this.get_customDecrementButtonVariant(),a==null&&(this instanceof $g?a=$g.CHILD_VARIANT_DECREMENT_BUTTON:
this instanceof ah&&(a=ah.CHILD_VARIANT_DECREMENT_BUTTON)),this.decrementButton.set_variant(a));this.decrementButton.addEventListener("mouseDown",m(this,this.baseScrollBar_decrementButton_mouseDownHandler));this.decrementButton.addEventListener("touchBegin",m(this,this.baseScrollBar_decrementButton_touchBeginHandler));this.decrementButton.initializeNow();this.decrementButtonMeasurements.save(this.decrementButton);this.addChild(this.decrementButton)}},destroyDecrementButton:function(){this.decrementButton!=
null&&(this.decrementButton.removeEventListener("mouseDown",m(this,this.baseScrollBar_decrementButton_mouseDownHandler)),this.decrementButton.removeEventListener("touchBegin",m(this,this.baseScrollBar_decrementButton_touchBeginHandler)),this.removeChild(this.decrementButton),this._oldDecrementButtonFactory.destroy!=null&&this._oldDecrementButtonFactory.destroy(this.decrementButton),this.decrementButton=this._oldDecrementButtonFactory=null)},createIncrementButton:function(){this.destroyIncrementButton();
if(this.showDecrementAndIncrementButtons){var a=this._incrementButtonFactory!=null?this._incrementButtonFactory:Wf.defaultIncrementButtonFactory;this._oldIncrementButtonFactory=a;this.incrementButton=a.create();this.incrementButton.get_variant()==null&&(a=this.get_customIncrementButtonVariant(),a==null&&(this instanceof $g?a=$g.CHILD_VARIANT_INCREMENT_BUTTON:this instanceof ah&&(a=ah.CHILD_VARIANT_INCREMENT_BUTTON)),this.incrementButton.set_variant(a));this.incrementButton.addEventListener("mouseDown",
m(this,this.baseScrollBar_incrementButton_mouseDownHandler));this.incrementButton.addEventListener("touchBegin",m(this,this.baseScrollBar_incrementButton_touchBeginHandler));this.incrementButton.initializeNow();this.incrementButtonMeasurements.save(this.incrementButton);this.addChild(this.incrementButton)}},destroyIncrementButton:function(){this.incrementButton!=null&&(this.incrementButton.removeEventListener("mouseDown",m(this,this.baseScrollBar_incrementButton_mouseDownHandler)),this.incrementButton.removeEventListener("touchBegin",
m(this,this.baseScrollBar_incrementButton_touchBeginHandler)),this.removeChild(this.incrementButton),this._oldIncrementButtonFactory.destroy!=null&&this._oldIncrementButtonFactory.destroy(this.incrementButton),this.incrementButton=this._oldIncrementButtonFactory=null)},drawFallbackTrack:function(){if(this.actualWidth!=this._previousFallbackTrackWidth||this.actualHeight!=this._previousFallbackTrackHeight)this.get_graphics().clear(),this.get_graphics().beginFill(16711935,0),this.get_graphics().drawRect(0,
0,this.actualWidth,this.actualHeight),this.get_graphics().endFill(),this._previousFallbackTrackWidth=this.actualWidth,this._previousFallbackTrackHeight=this.actualHeight},normalizeValue:function(a){var b=0;this._minimum!=this._maximum&&(b=(a-this._minimum)/(this._maximum-this._minimum),b<0?b=0:b>1&&(b=1));return b},restrictValue:function(a){this._snapInterval!=0&&a!=this._minimum&&a!=this._maximum&&(a=We.roundToNearest(a,this._snapInterval));a<this._minimum?a=this._minimum:a>this._maximum&&(a=this._maximum);
return a},valueToLocation:function(a){a=w.getClass(this);throw new Ce("Missing override for 'valueToLocation' in type "+a.__name__);},locationToValue:function(a,b){a=w.getClass(this);throw new Ce("Missing override for 'locationToValue' in type "+a.__name__);},saveThumbStart:function(a,b){a=w.getClass(this);throw new Ce("Missing override for 'saveThumbStart' in type "+a.__name__);},getAdjustedPage:function(){var a=this._maximum-this._minimum,b=this._page;b==0?b=this._step:b>a&&(b=a);return b},decrement:function(){var a=
this._value-this._step;a=this.restrictValue(a);this.set_value(a)},increment:function(){var a=this._value+this._step;a=this.restrictValue(a);this.set_value(a)},thumbSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&(this.stage.addEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler),!1,0,!0),this._thumbStartX=this._currentThumbSkin.get_x(),
this._thumbStartY=this._currentThumbSkin.get_y(),this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=!0,Id.dispatch(this,"scrollStart"))},thumbSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),this.get_mouseY());a=this.restrictValue(a);this.set_value(a)},thumbSkin_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",
m(this,this.thumbSkin_stage_mouseUpHandler));this._dragging=!1;Id.dispatch(this,"scrollComplete");this.liveDragging||Y.dispatch(this,"change")},trackSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&(this.stage.addEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler),!1,0,!0),this.saveThumbStart(this.get_mouseX(),this.get_mouseY()),
this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=!0,Id.dispatch(this,"scrollStart"),a=this.locationToValue(this.get_mouseX(),this.get_mouseY()),a=this.restrictValue(a),this.set_value(a))},trackSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),this.get_mouseY());a=this.restrictValue(a);this.set_value(a)},trackSkin_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler));
a.removeEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler));this._dragging=!1;Id.dispatch(this,"scrollComplete");this.liveDragging||Y.dispatch(this,"change")},baseScrollBar_decrementButton_mouseDownHandler:function(a){this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&this.decrement()},baseScrollBar_decrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.decrementButton.get_enabled()&&this.stage!=
null&&Pd.forStage(this.stage).claimMouse(this)&&this.decrement()},baseScrollBar_incrementButton_mouseDownHandler:function(a){this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&this.increment()},baseScrollBar_incrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&this.increment()},__customDecrementButtonVariant:null,
get_customDecrementButtonVariant:function(){return this.__customDecrementButtonVariant},set_customDecrementButtonVariant:function(a){if(!this.setStyle("customDecrementButtonVariant")||this.__customDecrementButtonVariant==a)return this.__customDecrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementButtonVariant);this.__customDecrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDecrementButtonVariant},clearStyle_customDecrementButtonVariant:function(){this.set_customDecrementButtonVariant(null);
return this.get_customDecrementButtonVariant()},__customIncrementButtonVariant:null,get_customIncrementButtonVariant:function(){return this.__customIncrementButtonVariant},set_customIncrementButtonVariant:function(a){if(!this.setStyle("customIncrementButtonVariant")||this.__customIncrementButtonVariant==a)return this.__customIncrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementButtonVariant);this.__customIncrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementButtonVariant},
clearStyle_customIncrementButtonVariant:function(){this.set_customIncrementButtonVariant(null);return this.get_customIncrementButtonVariant()},__thumbSkin:null,get_thumbSkin:function(){return this.__thumbSkin},set_thumbSkin:function(a){if(!this.setStyle("thumbSkin")||this.__thumbSkin==a)return this.__thumbSkin;this._previousClearStyle=m(this,this.clearStyle_thumbSkin);this.__thumbSkin=a;this.setInvalid(x.STYLES);return this.__thumbSkin},clearStyle_thumbSkin:function(){this.set_thumbSkin(null);return this.get_thumbSkin()},
__trackSkin:null,get_trackSkin:function(){return this.__trackSkin},set_trackSkin:function(a){if(!this.setStyle("trackSkin")||this.__trackSkin==a)return this.__trackSkin;this._previousClearStyle=m(this,this.clearStyle_trackSkin);this.__trackSkin=a;this.setInvalid(x.STYLES);return this.__trackSkin},clearStyle_trackSkin:function(){this.set_trackSkin(null);return this.get_trackSkin()},__secondaryTrackSkin:null,get_secondaryTrackSkin:function(){return this.__secondaryTrackSkin},set_secondaryTrackSkin:function(a){if(!this.setStyle("secondaryTrackSkin")||
this.__secondaryTrackSkin==a)return this.__secondaryTrackSkin;this._previousClearStyle=m(this,this.clearStyle_secondaryTrackSkin);this.__secondaryTrackSkin=a;this.setInvalid(x.STYLES);return this.__secondaryTrackSkin},clearStyle_secondaryTrackSkin:function(){this.set_secondaryTrackSkin(null);return this.get_secondaryTrackSkin()},__fixedThumbSize:null,get_fixedThumbSize:function(){return this.__fixedThumbSize},set_fixedThumbSize:function(a){if(!this.setStyle("fixedThumbSize")||this.__fixedThumbSize==
a)return this.__fixedThumbSize;this._previousClearStyle=m(this,this.clearStyle_fixedThumbSize);this.__fixedThumbSize=a;this.setInvalid(x.STYLES);return this.__fixedThumbSize},clearStyle_fixedThumbSize:function(){this.set_fixedThumbSize(!1);return this.get_fixedThumbSize()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);
this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);
return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},
set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__hideThumbWhenDisabled:null,get_hideThumbWhenDisabled:function(){return this.__hideThumbWhenDisabled},set_hideThumbWhenDisabled:function(a){if(!this.setStyle("hideThumbWhenDisabled")||
this.__hideThumbWhenDisabled==a)return this.__hideThumbWhenDisabled;this._previousClearStyle=m(this,this.clearStyle_hideThumbWhenDisabled);this.__hideThumbWhenDisabled=a;this.setInvalid(x.STYLES);return this.__hideThumbWhenDisabled},clearStyle_hideThumbWhenDisabled:function(){this.set_hideThumbWhenDisabled(!1);return this.get_hideThumbWhenDisabled()},__class__:Wf,__properties__:I(fa.prototype.__properties__,{set_hideThumbWhenDisabled:"set_hideThumbWhenDisabled",get_hideThumbWhenDisabled:"get_hideThumbWhenDisabled",
set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_fixedThumbSize:"set_fixedThumbSize",get_fixedThumbSize:"get_fixedThumbSize",set_secondaryTrackSkin:"set_secondaryTrackSkin",get_secondaryTrackSkin:"get_secondaryTrackSkin",set_trackSkin:"set_trackSkin",get_trackSkin:"get_trackSkin",
set_thumbSkin:"set_thumbSkin",get_thumbSkin:"get_thumbSkin",set_customIncrementButtonVariant:"set_customIncrementButtonVariant",get_customIncrementButtonVariant:"get_customIncrementButtonVariant",set_customDecrementButtonVariant:"set_customDecrementButtonVariant",get_customDecrementButtonVariant:"get_customDecrementButtonVariant",set_incrementButtonFactory:"set_incrementButtonFactory",get_incrementButtonFactory:"get_incrementButtonFactory",set_decrementButtonFactory:"set_decrementButtonFactory",get_decrementButtonFactory:"get_decrementButtonFactory",
set_enableButtonsAtRangeLimits:"set_enableButtonsAtRangeLimits",get_enableButtonsAtRangeLimits:"get_enableButtonsAtRangeLimits",set_page:"set_page",get_page:"get_page",set_snapInterval:"set_snapInterval",get_snapInterval:"get_snapInterval",set_step:"set_step",get_step:"get_step",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var ah=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);
this.initializeHScrollBarTheme();Wf.call(this,a,b,c,d)};t["feathers.controls.HScrollBar"]=ah;ah.__name__="feathers.controls.HScrollBar";ah.__super__=Wf;ah.prototype=I(Wf.prototype,{initializeHScrollBarTheme:function(){mw.initialize()},valueToLocation:function(a){w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow();this.showDecrementAndIncrementButtons&&(this.decrementButton.validateNow(),this.incrementButton.validateNow());a=this.normalizeValue(a);var b=this.actualWidth-
this.get_paddingLeft()-this.get_paddingRight()-this._currentThumbSkin.get_width();this.showDecrementAndIncrementButtons&&(b-=this.decrementButton.get_width()+this.incrementButton.get_width());a=this.get_paddingLeft()+b*a;this.showDecrementAndIncrementButtons&&(a+=this.decrementButton.get_width());return a},locationToValue:function(a,b){b=this.get_paddingLeft();var c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this._currentThumbSkin.get_width();this.showDecrementAndIncrementButtons&&
(b+=this.decrementButton.get_width(),c-=this.decrementButton.get_width()+this.incrementButton.get_width());return this._minimum+Math.min(Math.max(0,this._thumbStartX+(a-this._pointerStartX)-b),c)/c*(this._maximum-this._minimum)},saveThumbStart:function(a,b){var c=this.actualWidth;this._currentThumbSkin!=null&&(c-=this._currentThumbSkin.get_width(),a-=this._currentThumbSkin.get_width()/2);this._thumbStartX=Math.min(c,a);this._thumbStartY=b},measure:function(){var a=this.get_explicitWidth()==null,b=
this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.decrementButton!=null&&(this.decrementButtonMeasurements.restore(this.decrementButton),this.decrementButton.validateNow());this.incrementButton!=null&&(this.incrementButtonMeasurements.restore(this.incrementButton),this.incrementButton.validateNow());this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),
w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow());c=this.get_explicitWidth();a&&(c=
0,this._currentTrackSkin!=null&&(c+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(c+=this._currentSecondaryTrackSkin.get_width())),a=this.get_paddingLeft()+this.get_paddingRight(),this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_width()),c<a&&(c=a),this.showDecrementAndIncrementButtons&&(c+=this.decrementButton.get_width()+this.incrementButton.get_width()));a=this.get_explicitHeight();b&&(a=this.get_paddingTop()+this.get_paddingBottom(),this._currentThumbSkin!=
null&&(a+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(a<this._currentTrackSkin.get_height()&&(a=this._currentTrackSkin.get_height()),this._currentSecondaryTrackSkin!=null&&a<this._currentSecondaryTrackSkin.get_height()&&(a=this._currentSecondaryTrackSkin.get_height())),this.showDecrementAndIncrementButtons&&(b=Math.max(this.decrementButton.get_height(),this.incrementButton.get_height()),a<b&&(a=b)));return this.saveMeasurements(c,a,c,a,null,a)},layoutButtons:function(){this.showDecrementAndIncrementButtons&&
(this.decrementButton!=null&&this.decrementButton.validateNow(),this.decrementButton.set_x(0),this.decrementButton.set_y((this.actualHeight-this.decrementButton.get_height())/2),this.incrementButton!=null&&this.incrementButton.validateNow(),this.incrementButton.set_x(this.actualWidth-this.incrementButton.get_width()),this.incrementButton.set_y((this.actualHeight-this.incrementButton.get_height())/2))},layoutSplitTrack:function(){var a=this.valueToLocation(this.get_value());this._currentThumbSkin!=
null&&(w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_width()/2));var b=0,c=this.actualWidth;this.showDecrementAndIncrementButtons&&(b=this.decrementButton.get_width(),c-=this.incrementButton.get_width());this._currentTrackSkin.set_x(b);this._currentTrackSkin.set_width(a);this._currentSecondaryTrackSkin.set_x(a);this._currentSecondaryTrackSkin.set_width(c-a);w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow();
w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow();this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2);this._currentSecondaryTrackSkin.set_y((this.actualHeight-this._currentSecondaryTrackSkin.get_height())/2)},layoutSingleTrack:function(){if(this._currentTrackSkin!=null){var a=0,b=this.actualWidth;this.showDecrementAndIncrementButtons&&(a=this.decrementButton.get_width(),b-=this.incrementButton.get_width());this._currentTrackSkin.set_x(a);
this._currentTrackSkin.set_width(b-a);w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow();this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2)}},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this._maximum-this._minimum;this._currentThumbSkin.set_visible((!this.get_hideThumbWhenDisabled()||this._enabled)&&a>0);if(this._currentThumbSkin.get_visible()){w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow();
var b=0;this._value<this._minimum?b=this._minimum-this._value:this._value>this._maximum&&(b=this._value-this._maximum);var c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();if(this.get_fixedThumbSize())this._thumbSkinMeasurements.width!=null&&this._currentThumbSkin.set_width(this._thumbSkinMeasurements.width);else{var f=this.getAdjustedPage();f=c*f/(a+f);if(f>0){var g=c-f;g>f&&(g=f);f-=b/(a*f/c)*g}this._thumbSkinMeasurements.minWidth!=
null?f<this._thumbSkinMeasurements.minWidth&&(f=this._thumbSkinMeasurements.minWidth):w.__implements(this._currentThumbSkin,rb)&&(a=this._currentThumbSkin,f<a.get_minWidth()&&(f=a.get_minWidth()));f<0&&(f=0);this._currentThumbSkin.set_width(f)}this._currentThumbSkin.set_x(this.valueToLocation(this._value));this._currentThumbSkin.set_y(this.get_paddingTop()+(d-this._currentThumbSkin.get_height())/2)}}},get_styleContext:function(){return ah},__class__:ah});var $g=function(a,b,c,d){c==null&&(c=1);b==
null&&(b=0);a==null&&(a=0);this.initializeVScrollBarTheme();Wf.call(this,a,b,c,d)};t["feathers.controls.VScrollBar"]=$g;$g.__name__="feathers.controls.VScrollBar";$g.__super__=Wf;$g.prototype=I(Wf.prototype,{initializeVScrollBarTheme:function(){nw.initialize()},valueToLocation:function(a){w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow();this.showDecrementAndIncrementButtons&&(this.decrementButton.validateNow(),this.incrementButton.validateNow());a=this.normalizeValue(a);
var b=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentThumbSkin.get_height();this.showDecrementAndIncrementButtons&&(b-=this.decrementButton.get_height()+this.incrementButton.get_height());a=this.get_paddingTop()+b*a;this.showDecrementAndIncrementButtons&&(a+=this.decrementButton.get_height());return a},locationToValue:function(a,b){a=this.get_paddingTop();var c=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentThumbSkin.get_height();this.showDecrementAndIncrementButtons&&
(a+=this.decrementButton.get_height(),c-=this.decrementButton.get_height()+this.incrementButton.get_height());return this._minimum+Math.min(Math.max(0,this._thumbStartY+(b-this._pointerStartY)-a),c)/c*(this._maximum-this._minimum)},saveThumbStart:function(a,b){var c=this.actualHeight;this._currentThumbSkin!=null&&(c-=this._currentThumbSkin.get_height(),b-=this._currentThumbSkin.get_height()/2);this._thumbStartX=a;this._thumbStartY=Math.min(c,b)},measure:function(){var a=this.get_explicitWidth()==
null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.decrementButton!=null&&(this.decrementButtonMeasurements.restore(this.decrementButton),this.decrementButton.validateNow());this.incrementButton!=null&&(this.incrementButtonMeasurements.restore(this.incrementButton),this.incrementButton.validateNow());this._currentThumbSkin!=null&&
(this._thumbSkinMeasurements.restore(this._currentThumbSkin),w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow());
c=this.get_explicitWidth();a&&(c=this.get_paddingLeft()+this.get_paddingRight(),this._currentThumbSkin!=null&&(c+=this._currentThumbSkin.get_width()),this._currentTrackSkin!=null&&(c<this._currentTrackSkin.get_width()&&(c=this._currentTrackSkin.get_width()),this._currentSecondaryTrackSkin!=null&&c<this._currentSecondaryTrackSkin.get_width()&&(c=this._currentSecondaryTrackSkin.get_width())),this.showDecrementAndIncrementButtons&&(a=Math.max(this.decrementButton.get_width(),this.incrementButton.get_width()),
c<a&&(c=a)));a=this.get_explicitHeight();b&&(a=0,this._currentTrackSkin!=null&&(a+=this._currentTrackSkin.get_height(),this._currentSecondaryTrackSkin!=null&&(a+=this._currentSecondaryTrackSkin.get_height())),b=this.get_paddingTop()+this.get_paddingBottom(),this._currentThumbSkin!=null&&(b+=this._currentThumbSkin.get_height()),a<b&&(a=b),this.showDecrementAndIncrementButtons&&(a+=this.decrementButton.get_height()+this.incrementButton.get_height()));return this.saveMeasurements(c,a,c,a,c,null)},layoutButtons:function(){this.showDecrementAndIncrementButtons&&
(this.decrementButton!=null&&this.decrementButton.validateNow(),this.decrementButton.set_x((this.actualWidth-this.decrementButton.get_width())/2),this.decrementButton.set_y(0),this.incrementButton!=null&&this.incrementButton.validateNow(),this.incrementButton.set_x((this.actualWidth-this.incrementButton.get_width())/2),this.incrementButton.set_y(this.actualHeight-this.incrementButton.get_height()))},layoutSplitTrack:function(){var a=this.valueToLocation(this.get_value());this._currentThumbSkin!=null&&
(w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_height()/2));var b=0,c=this.actualHeight;this.showDecrementAndIncrementButtons&&(b=this.decrementButton.get_height(),c-=this.incrementButton.get_height());this._currentSecondaryTrackSkin.set_y(b);this._currentSecondaryTrackSkin.set_height(a);this._currentTrackSkin.set_y(a);this._currentTrackSkin.set_height(c-a);w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow();
w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow();this._currentSecondaryTrackSkin.set_x((this.actualWidth-this._currentSecondaryTrackSkin.get_width())/2);this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2)},layoutSingleTrack:function(){if(this._currentTrackSkin!=null){var a=0,b=this.actualHeight;this.showDecrementAndIncrementButtons&&(a=this.decrementButton.get_height(),b-=this.incrementButton.get_height());this._currentTrackSkin.set_y(a);
this._currentTrackSkin.set_height(b-a);w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow();this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2)}},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this._maximum-this._minimum;this._currentThumbSkin.set_visible((!this.get_hideThumbWhenDisabled()||this._enabled)&&a>0);if(this._currentThumbSkin.get_visible()){w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow();
var b=0;this._value<this._minimum?b=this._minimum-this._value:this._value>this._maximum&&(b=this._value-this._maximum);var c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();if(this.get_fixedThumbSize())this._thumbSkinMeasurements.height!=null&&this._currentThumbSkin.set_height(this._thumbSkinMeasurements.height);else{var f=this.getAdjustedPage();f=d*f/(a+f);if(f>0){var g=d-f;g>f&&(g=f);f-=b/(a*f/d)*g}this._thumbSkinMeasurements.minHeight!=
null?f<this._thumbSkinMeasurements.minHeight&&(f=this._thumbSkinMeasurements.minHeight):w.__implements(this._currentThumbSkin,rb)&&(a=this._currentThumbSkin,f<a.get_minHeight()&&(f=a.get_minHeight()));f<0&&(f=0);this._currentThumbSkin.set_height(f)}this._currentThumbSkin.set_x(this.get_paddingLeft()+(c-this._currentThumbSkin.get_width())/2);this._currentThumbSkin.set_y(this.valueToLocation(this._value))}}},get_styleContext:function(){return $g},__class__:$g});var Ab=function(){this.__scrollPixelSnapping=
!1;this.__hideScrollBarEase=th.easeOut;this.__hideScrollBarDuration=.2;this.__showScrollBarMinimumDuration=.5;this.__scrollBarYPosition=ra.RIGHT;this.__scrollBarXPosition=ra.BOTTOM;this.__showScrollBars=this.__autoHideScrollBars=!0;this.__fixedScrollBars=!1;this.__backgroundSkin=this.__disabledBackgroundSkin=this.__maskSkin=this.__viewPortMaskSkin=this.__scrollBarsCornerSkin=null;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this._scrollMode=Lj.MASK;this._ignoreScrollerChanges=
this._settingScrollerDimensions=this._ignoreViewPortResizing=!1;this._scrollRect2=new Ia;this._scrollRect1=new Ia;this._prevMinScrollX=this._prevMaxScrollX=this._prevMinScrollY=this._prevMaxScrollY=0;this._hideScrollBarX=this._hideScrollBarY=null;this._scrollPolicyX=this._scrollPolicyY=Me.AUTO;this._scrollStepX=this._scrollStepY=1;this._temporaryScrollX=this._temporaryRestrictedScrollX=this._temporaryScrollY=this._temporaryRestrictedScrollY=null;this._ignoreScrollBarXChange=this._ignoreScrollBarYChange=
this.showScrollBarX=this.showScrollBarY=!1;this.chromeMeasuredMaxHeight=1/0;this.chromeMeasuredHeight=this.chromeMeasuredMinHeight=0;this.chromeMeasuredMaxWidth=1/0;this.topViewPortOffset=this.rightViewPortOffset=this.bottomViewPortOffset=this.leftViewPortOffset=this.chromeMeasuredWidth=this.chromeMeasuredMinWidth=0;this._currentBackgroundSkin=this._backgroundSkinMeasurements=this._currentMaskSkin=this._currentViewPortMaskSkin=this._fallbackViewPortMaskSkin=null;this._scrollerDraggingX=this._scrollerDraggingY=
this._scrollBarXHover=this._scrollBarYHover=!1;fa.call(this);this.set_tabEnabled(!0);this.set_tabChildren(!0);this.focusRect=null;this.addEventListener("keyDown",m(this,this.baseScrollContainer_keyDownHandler));this.addEventListener("addedToStage",m(this,this.baseScrollContainer_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.baseScrollContainer_removedFromStageHandler))};t["feathers.controls.supportClasses.BaseScrollContainer"]=Ab;Ab.__name__="feathers.controls.supportClasses.BaseScrollContainer";
Ab.__interfaces__=[qd];Ab.__super__=fa;Ab.prototype=I(fa.prototype,{_viewPort:null,get_viewPort:function(){return this._viewPort},set_viewPort:function(a){if(this._viewPort==a)return this._viewPort;this._viewPort!=null&&this._viewPort.removeEventListener("resize",m(this,this.viewPort_resizeHandler));this.scroller!=null&&this.scroller.set_target(null);this._viewPort=a;this._viewPort!=null&&this._viewPort.addEventListener("resize",m(this,this.viewPort_resizeHandler));this.setInvalid(x.SCROLL);return this._viewPort},
scroller:null,_scrollerDraggingX:null,_scrollerDraggingY:null,_scrollBarXHover:null,_scrollBarYHover:null,_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_currentMaskSkin:null,_currentViewPortMaskSkin:null,_fallbackViewPortMaskSkin:null,topViewPortOffset:null,rightViewPortOffset:null,bottomViewPortOffset:null,leftViewPortOffset:null,chromeMeasuredWidth:null,chromeMeasuredMinWidth:null,chromeMeasuredMaxWidth:null,chromeMeasuredHeight:null,chromeMeasuredMinHeight:null,chromeMeasuredMaxHeight:null,
get_tabEnabled:function(){return this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX()?this.get_rawTabEnabled():!1},_currentScrollBarsCornerSkin:null,scrollBarX:null,scrollBarY:null,_ignoreScrollBarXChange:null,_ignoreScrollBarYChange:null,showScrollBarX:null,showScrollBarY:null,_oldScrollBarXFactory:null,_scrollBarXFactory:null,get_scrollBarXFactory:function(){return this._scrollBarXFactory},set_scrollBarXFactory:function(a){if(this._scrollBarXFactory==a)return this._scrollBarXFactory;
this._scrollBarXFactory=a;this.setInvalid(Ab.INVALIDATION_FLAG_SCROLL_BAR_FACTORY);return this._scrollBarXFactory},_oldScrollBarYFactory:null,_scrollBarYFactory:null,get_scrollBarYFactory:function(){return this._scrollBarYFactory},set_scrollBarYFactory:function(a){if(this._scrollBarYFactory==a)return this._scrollBarYFactory;this._scrollBarYFactory=a;this.setInvalid(Ab.INVALIDATION_FLAG_SCROLL_BAR_FACTORY);return this._scrollBarYFactory},_scrollerFactory:null,get_scrollerFactory:function(){return this._scrollerFactory},
set_scrollerFactory:function(a){if(this._scrollerFactory==a)return this._scrollerFactory;this._scrollerFactory=a;this.setInvalid(Ab.INVALIDATION_FLAG_SCROLLER_FACTORY);return this._scrollerFactory},_temporaryScrollX:null,_temporaryRestrictedScrollX:null,get_scrollX:function(){return this.scroller==null?this._temporaryRestrictedScrollX!=null?this._temporaryRestrictedScrollX:this._temporaryScrollX!=null?this._temporaryScrollX:0:this.scroller.get_scrollX()},set_scrollX:function(a){if(this.scroller==
null)return this._temporaryScrollX=a,this._temporaryRestrictedScrollX=null,Id.dispatch(this,"scroll",!1,!1,this._temporaryScrollX,this._temporaryScrollY),this._temporaryScrollX;this.scroller.set_scrollX(a);return this.scroller.get_scrollX()},get_restrictedScrollX:function(){return this.scroller==null?this.get_scrollX():this.scroller.get_restrictedScrollX()},set_restrictedScrollX:function(a){if(this.scroller==null)return this._temporaryRestrictedScrollX=a,this._temporaryScrollX=null,Id.dispatch(this,
"scroll",!1,!1,this._temporaryScrollX,this._temporaryScrollY),this._temporaryRestrictedScrollX;this.scroller.set_restrictedScrollX(a);return this.scroller.get_restrictedScrollX()},_temporaryScrollY:null,_temporaryRestrictedScrollY:null,get_scrollY:function(){return this.scroller==null?this._temporaryRestrictedScrollY!=null?this._temporaryRestrictedScrollY:this._temporaryScrollY!=null?this._temporaryScrollY:0:this.scroller.get_scrollY()},set_scrollY:function(a){if(this.scroller==null)return this._temporaryScrollY=
a,this._temporaryRestrictedScrollY=null,Id.dispatch(this,"scroll",!1,!1,this._temporaryScrollX,this._temporaryScrollY),this._temporaryScrollY;this.scroller.set_scrollY(a);return this.scroller.get_scrollY()},get_restrictedScrollY:function(){this.scroller==null&&this.get_scrollY();return this.scroller.get_restrictedScrollY()},set_restrictedScrollY:function(a){if(this.scroller==null)return this._temporaryRestrictedScrollY=a,this._temporaryScrollY=null,Id.dispatch(this,"scroll",!1,!1,this._temporaryScrollX,
this._temporaryScrollY),this._temporaryRestrictedScrollY;this.scroller.set_restrictedScrollY(a);return this.scroller.get_restrictedScrollY()},get_minScrollX:function(){return this.scroller==null?0:this.scroller.get_minScrollX()},get_minScrollY:function(){return this.scroller==null?0:this.scroller.get_minScrollY()},get_maxScrollX:function(){return this.scroller==null?0:this.scroller.get_maxScrollX()},get_maxScrollY:function(){return this.scroller==null?0:this.scroller.get_maxScrollY()},_scrollStepX:null,
get_scrollStepX:function(){return this._scrollStepX},set_scrollStepX:function(a){if(this._scrollStepX==a)return this._scrollStepX;this._scrollStepX=a;this.setInvalid(x.SCROLL);return this._scrollStepX},_scrollStepY:null,get_scrollStepY:function(){return this._scrollStepY},set_scrollStepY:function(a){if(this._scrollStepY==a)return this._scrollStepY;this._scrollStepY=a;this.setInvalid(x.SCROLL);return this._scrollStepY},_scrollPolicyX:null,get_scrollPolicyX:function(){return this._scrollPolicyX},set_scrollPolicyX:function(a){if(this._scrollPolicyX==
a)return this._scrollPolicyX;this._scrollPolicyX=a;this.setInvalid(x.SCROLL);return this._scrollPolicyX},_scrollPolicyY:null,get_scrollPolicyY:function(){return this._scrollPolicyY},set_scrollPolicyY:function(a){if(this._scrollPolicyY==a)return this._scrollPolicyY;this._scrollPolicyY=a;this.setInvalid(x.SCROLL);return this._scrollPolicyY},_scrollBarXRevealTime:null,_scrollBarYRevealTime:null,_hideScrollBarX:null,_hideScrollBarY:null,_prevMinScrollX:null,_prevMaxScrollX:null,_prevMinScrollY:null,_prevMaxScrollY:null,
_currentScrollRect:null,_scrollRect1:null,_scrollRect2:null,_ignoreScrollerChanges:null,_settingScrollerDimensions:null,_ignoreViewPortResizing:null,get_measureViewPort:function(){return!0},_scrollMode:null,get_scrollMode:function(){return this._scrollMode},set_scrollMode:function(a){if(this._scrollMode==a)return this._scrollMode;this._scrollMode=a;this.setInvalid(x.LAYOUT);return this._scrollMode},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},
getViewPortVisibleBounds:function(a){var b=this.leftViewPortOffset+this.get_paddingLeft(),c=this.topViewPortOffset+this.get_paddingTop();a==null?a=new Ia(b,c,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight()):a.setTo(b,c,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());return a},dispose:function(){this.destroyScroller();this.destroyScrollBarX();this.destroyScrollBarY();fa.prototype.dispose.call(this)},update:function(){var a=this.isInvalid(x.STYLES);this.isInvalid(x.SIZE);
var b=this.isInvalid(x.STATE),c=this.isInvalid(Ab.INVALIDATION_FLAG_SCROLLER_FACTORY),d=this.isInvalid(Ab.INVALIDATION_FLAG_SCROLL_BAR_FACTORY),f=this._ignoreScrollerChanges;this._ignoreScrollerChanges=!0;c&&this.createScroller();(a||b)&&this.refreshBackgroundSkin();a&&(this.refreshMaskSkin(),this.refreshViewPortMaskSkin(),this.refreshScrollBarsCornerSkin());d&&this.createScrollBars();this.refreshEnabled();this.refreshScrollerValues();this.refreshViewPort();this.applyTemporaryScrollPositions();this.refreshScrollRect();
this.refreshScrollBarValues();this.layoutChildren();this._ignoreScrollerChanges=f},applyTemporaryScrollPositions:function(){this._temporaryScrollX!=null?this.scroller.set_scrollX(this._temporaryScrollX):this._temporaryRestrictedScrollX!=null&&this.scroller.set_restrictedScrollX(this._temporaryRestrictedScrollX);this._temporaryScrollY!=null?this.scroller.set_scrollY(this._temporaryScrollY):this._temporaryRestrictedScrollY!=null&&this.scroller.set_restrictedScrollY(this._temporaryRestrictedScrollY);
this._temporaryRestrictedScrollY=this._temporaryRestrictedScrollX=this._temporaryScrollY=this._temporaryScrollX=null},needsMeasurement:function(){return this.isInvalid(x.SCROLL)&&this.needsScrollMeasurement()||this.isInvalid(x.DATA)||this.isInvalid(x.SIZE)||this.isInvalid(x.STYLES)||this.isInvalid(Ab.INVALIDATION_FLAG_SCROLL_BAR_FACTORY)||this.isInvalid(x.STATE)?!0:this.isInvalid(x.LAYOUT)},needsScrollMeasurement:function(){return!1},createScroller:function(){this.destroyScroller();this.scroller=
this._scrollerFactory!=null?this._scrollerFactory():new Oi;this.scroller.addEventListener("scroll",m(this,this.baseScrollContainer_scroller_scrollHandler));this.scroller.addEventListener("scrollStart",m(this,this.baseScrollContainer_scroller_scrollStartHandler));this.scroller.addEventListener("scrollComplete",m(this,this.baseScrollContainer_scroller_scrollCompleteHandler))},destroyScroller:function(){this.scroller!=null&&(this._temporaryScrollX=this.scroller.get_scrollX(),this._temporaryScrollY=this.scroller.get_scrollY(),
this._temporaryRestrictedScrollY=this._temporaryRestrictedScrollX=null,this.scroller.set_target(null),this.scroller.removeEventListener("scroll",m(this,this.baseScrollContainer_scroller_scrollHandler)),this.scroller.removeEventListener("scrollStart",m(this,this.baseScrollContainer_scroller_scrollStartHandler)),this.scroller.removeEventListener("scrollComplete",m(this,this.baseScrollContainer_scroller_scrollCompleteHandler)),this.scroller=null,this.setInvalidationFlag(Ab.INVALIDATION_FLAG_SCROLLER_FACTORY))},
createScrollBars:function(){this.createScrollBarX();this.createScrollBarY()},createScrollBarX:function(){this.destroyScrollBarX();var a=this._scrollBarXFactory!=null?this._scrollBarXFactory:Ab.defaultScrollBarXFactory;this._oldScrollBarXFactory=a;this.scrollBarX=a.create();this.get_autoHideScrollBars()&&this.scrollBarX.set_alpha(0);this.scrollBarX.addEventListener("change",m(this,this.scrollBarX_changeHandler));this.scrollBarX.addEventListener("rollOver",m(this,this.scrollBarX_rollOverHandler));this.scrollBarX.addEventListener("rollOut",
m(this,this.scrollBarX_rollOutHandler));this.scrollBarX.addEventListener("scrollStart",m(this,this.scrollBarX_scrollStartHandler));this.scrollBarX.addEventListener("scrollComplete",m(this,this.scrollBarX_scrollCompleteHandler));this.addChild(w.__cast(this.scrollBarX,ma))},destroyScrollBarX:function(){this.scrollBarX!=null&&(this.scrollBarX.removeEventListener("change",m(this,this.scrollBarX_changeHandler)),this.scrollBarX.removeEventListener("rollOver",m(this,this.scrollBarX_rollOverHandler)),this.scrollBarX.removeEventListener("rollOut",
m(this,this.scrollBarX_rollOutHandler)),this.scrollBarX.removeEventListener("scrollStart",m(this,this.scrollBarX_scrollStartHandler)),this.scrollBarX.removeEventListener("scrollComplete",m(this,this.scrollBarX_scrollCompleteHandler)),this.removeChild(w.__cast(this.scrollBarX,ma)),this._oldScrollBarXFactory.destroy!=null&&this._oldScrollBarXFactory.destroy(this.scrollBarX),this.scrollBarX=this._oldScrollBarXFactory=null)},createScrollBarY:function(){this.destroyScrollBarY();var a=this._scrollBarYFactory!=
null?this._scrollBarYFactory:Ab.defaultScrollBarYFactory;this._oldScrollBarYFactory=a;this.scrollBarY=a.create();this.get_autoHideScrollBars()&&this.scrollBarY.set_alpha(0);this.scrollBarY.addEventListener("change",m(this,this.scrollBarY_changeHandler));this.scrollBarY.addEventListener("rollOver",m(this,this.scrollBarY_rollOverHandler));this.scrollBarY.addEventListener("rollOut",m(this,this.scrollBarY_rollOutHandler));this.scrollBarY.addEventListener("scrollStart",m(this,this.scrollBarY_scrollStartHandler));
this.scrollBarY.addEventListener("scrollComplete",m(this,this.scrollBarY_scrollCompleteHandler));this.addChild(w.__cast(this.scrollBarY,ma))},destroyScrollBarY:function(){this.scrollBarY!=null&&(this.scrollBarY.removeEventListener("change",m(this,this.scrollBarY_changeHandler)),this.scrollBarY.removeEventListener("rollOver",m(this,this.scrollBarY_rollOverHandler)),this.scrollBarY.removeEventListener("rollOut",m(this,this.scrollBarY_rollOutHandler)),this.scrollBarY.removeEventListener("scrollStart",
m(this,this.scrollBarY_scrollStartHandler)),this.scrollBarY.removeEventListener("scrollComplete",m(this,this.scrollBarY_scrollCompleteHandler)),this.removeChild(w.__cast(this.scrollBarY,ma)),this._oldScrollBarYFactory.destroy!=null&&this._oldScrollBarYFactory.destroy(this.scrollBarY),this.scrollBarY=this._oldScrollBarYFactory=null)},refreshEnabled:function(){this._viewPort.set_enabled(this._enabled);this.scrollBarX!=null&&this.scrollBarX.set_enabled(this._enabled);this.scrollBarY!=null&&this.scrollBarY.set_enabled(this._enabled)},
restrictScrollAfterRefreshViewPort:function(){if(!this.scroller.get_scrolling()){var a=this.scroller.get_scrollX(),b=this.scroller.get_scrollY();this._prevMinScrollX!=this.scroller.get_minScrollX()&&a<this.scroller.get_minScrollX()?this.scroller.set_restrictedScrollX(a):this._prevMaxScrollX!=this.scroller.get_maxScrollX()&&a>this.scroller.get_maxScrollX()&&this.scroller.set_restrictedScrollX(a);this._prevMinScrollY!=this.scroller.get_minScrollY()&&b<this.scroller.get_minScrollY()?this.scroller.set_restrictedScrollY(b):
this._prevMaxScrollY!=this.scroller.get_maxScrollY()&&b>this.scroller.get_maxScrollY()&&this.scroller.set_restrictedScrollY(b);a==this.scroller.get_scrollX()&&b==this.scroller.get_scrollY()||Id.dispatch(this,"scroll",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())}},refreshViewPort:function(){w.__implements(this.scrollBarX,da)&&this.scrollBarX.validateNow();w.__implements(this.scrollBarY,da)&&this.scrollBarY.validateNow();this._viewPort.set_scrollX(this.get_scrollX());this._viewPort.set_scrollY(this.get_scrollY());
this._prevMinScrollX=this.scroller.get_minScrollX();this._prevMaxScrollX=this.scroller.get_maxScrollX();this._prevMinScrollY=this.scroller.get_minScrollY();this._prevMaxScrollY=this.scroller.get_maxScrollY();if(this.needsMeasurement()){this.resetViewPortOffsets();this.calculateViewPortOffsets(!1,!1);this.refreshViewPortBoundsForMeasurement();if(this.get_scrollPolicyX()==Me.AUTO){var a=this.showScrollBarX;this.calculateViewPortOffsetsForFixedScrollBarX(!1);this.get_fixedScrollBars()&&this.showScrollBarX!=
a&&this.refreshViewPortBoundsForMeasurement()}this.get_scrollPolicyY()==Me.AUTO&&(a=this.showScrollBarY,this.calculateViewPortOffsetsForFixedScrollBarY(!1),this.get_fixedScrollBars()&&this.showScrollBarY!=a&&this.refreshViewPortBoundsForMeasurement());this.get_fixedScrollBars()&&!this.showScrollBarX&&this.showScrollBarY&&this.get_scrollPolicyX()==Me.AUTO&&this.get_scrollPolicyY()==Me.AUTO&&(a=this.showScrollBarX,this.calculateViewPortOffsetsForFixedScrollBarX(!1),this.showScrollBarX!=a&&this.refreshViewPortBoundsForMeasurement());
a=this._settingScrollerDimensions;this._settingScrollerDimensions=!0;this.scroller.setDimensions(this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight(),this._viewPort.get_width(),this._viewPort.get_height());this._settingScrollerDimensions=a;this.measure();this.resetViewPortOffsets();this.calculateViewPortOffsets(!1,!0);this.refreshViewPortBoundsForLayout();this.get_scrollPolicyX()==Me.AUTO&&(a=this.showScrollBarX,this.calculateViewPortOffsetsForFixedScrollBarX(!0),this.get_fixedScrollBars()&&
this.showScrollBarX!=a&&this.refreshViewPortBoundsForLayout());this.get_scrollPolicyY()==Me.AUTO&&(a=this.showScrollBarY,this.calculateViewPortOffsetsForFixedScrollBarY(!0),this.get_fixedScrollBars()&&this.showScrollBarY!=a&&this.refreshViewPortBoundsForLayout());this.get_fixedScrollBars()&&!this.showScrollBarX&&this.showScrollBarY&&this.get_scrollPolicyX()==Me.AUTO&&this.get_scrollPolicyY()==Me.AUTO&&(a=this.showScrollBarX,this.calculateViewPortOffsetsForFixedScrollBarX(!0),this.showScrollBarX!=
a&&this.refreshViewPortBoundsForLayout());a=this._settingScrollerDimensions}else this._viewPort.validateNow(),a=this._settingScrollerDimensions;this._settingScrollerDimensions=!0;this.scroller.setDimensions(this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight(),this._viewPort.get_width(),this._viewPort.get_height());this._settingScrollerDimensions=a;this.restrictScrollAfterRefreshViewPort()},resetViewPortOffsets:function(){this.showScrollBarX=this.get_showScrollBars()&&(this._scrollPolicyX==
Me.ON||this._scrollPolicyX==Me.AUTO&&this.scroller.get_minScrollX()!=this.scroller.get_maxScrollX());this.showScrollBarY=this.get_showScrollBars()&&(this._scrollPolicyX==Me.ON||this._scrollPolicyY==Me.AUTO&&this.scroller.get_minScrollY()!=this.scroller.get_maxScrollY());this.topViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarX&&this.get_scrollBarXPosition()==ra.TOP?this.scrollBarX.get_height():0;this.bottomViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarX&&this.get_scrollBarXPosition()==
ra.BOTTOM?this.scrollBarX.get_height():0;this.leftViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarY&&this.get_scrollBarYPosition()==ra.LEFT?this.scrollBarY.get_width():0;this.rightViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarY&&this.get_scrollBarYPosition()==ra.RIGHT?this.scrollBarY.get_width():0;this.chromeMeasuredMinWidth=this.chromeMeasuredWidth=0;this.chromeMeasuredMaxWidth=1/0;this.chromeMeasuredMinHeight=this.chromeMeasuredHeight=0;this.chromeMeasuredMaxHeight=1/
0},calculateViewPortOffsets:function(a,b){},calculateViewPortOffsetsForFixedScrollBarX:function(a){if(this.scrollBarX!=null){var b=!1;this.get_showScrollBars()&&this.get_scrollPolicyX()!=Me.OFF&&(b=this.get_scrollPolicyX()==Me.ON,b||this.get_scrollPolicyX()!=Me.AUTO||(b=a?this.actualWidth:this.get_explicitWidth(),b!=null&&(b-=this.get_paddingLeft()+this.get_paddingRight()+this.leftViewPortOffset+this.rightViewPortOffset,b<0&&(b=0)),b!=null||a||(b=this._viewPort.get_visibleWidth()),a=this._viewPort.get_width(),
b=b!=null&&a>b&&!We.fuzzyEquals(a,b),b||(b=this.get_explicitMaxWidth(),b!=null&&(b-=this.get_paddingLeft()+this.get_paddingRight()+this.leftViewPortOffset+this.rightViewPortOffset,b<0&&(b=0)),b=b!=null&&a>b&&!We.fuzzyEquals(a,b))));this.showScrollBarX!=b&&(this.showScrollBarX=b,this.get_fixedScrollBars()&&(a=this.scrollBarX.get_height(),this.showScrollBarX||(a=-a),this.get_scrollBarXPosition()==ra.TOP?this.topViewPortOffset+=a:this.bottomViewPortOffset+=a))}},calculateViewPortOffsetsForFixedScrollBarY:function(a){if(this.scrollBarY!=
null){var b=!1;this.get_showScrollBars()&&this.get_scrollPolicyY()!=Me.OFF&&(b=this.get_scrollPolicyY()==Me.ON,b||this.get_scrollPolicyY()!=Me.AUTO||(b=a?this.actualHeight:this.get_explicitHeight(),b!=null&&(b-=this.get_paddingTop()+this.get_paddingBottom()+this.topViewPortOffset+this.bottomViewPortOffset,b<0&&(b=0)),b!=null||a||(b=this._viewPort.get_visibleHeight()),a=this._viewPort.get_height(),b=b!=null&&a>b&&!We.fuzzyEquals(a,b),b||(b=this.get_explicitMaxHeight(),b!=null&&(b-=this.get_paddingTop()+
this.get_paddingBottom()+this.topViewPortOffset+this.bottomViewPortOffset,b<0&&(b=0)),b=b!=null&&a>b&&!We.fuzzyEquals(a,b))));this.showScrollBarY!=b&&(this.showScrollBarY=b,this.get_fixedScrollBars()&&(a=this.scrollBarY.get_width(),this.showScrollBarY||(a=-a),this.get_scrollBarYPosition()==ra.LEFT?this.leftViewPortOffset+=a:this.rightViewPortOffset+=a))}},refreshViewPortBoundsForMeasurement:function(){var a=this._ignoreViewPortResizing;this._ignoreViewPortResizing=!0;var b=this.get_paddingLeft()+
this.leftViewPortOffset,c=this.get_paddingTop()+this.topViewPortOffset;if(this._scrollMode==Lj.MASK||this._scrollMode==Lj.MASKLESS||this._currentViewPortMaskSkin!=null)b-=this.get_scrollX(),c-=this.get_scrollY();this._viewPort.set_x(b);this._viewPort.set_y(c);this.get_explicitWidth()!=null?(b=this.get_explicitWidth()-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),b<0&&(b=0),this._viewPort.set_visibleWidth(b)):this._viewPort.set_visibleWidth(null);this.get_explicitHeight()!=
null?(b=this.get_explicitHeight()-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_visibleHeight(b)):this._viewPort.set_visibleHeight(null);this.get_explicitMinWidth()!=null?(b=this.get_explicitMinWidth()-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),b<0&&(b=0),this._viewPort.set_minVisibleWidth(b)):this._viewPort.set_minVisibleWidth(null);this.get_explicitMinHeight()!=null?
(b=this.get_explicitMinHeight()-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_minVisibleHeight(b)):this._viewPort.set_minVisibleHeight(null);this.get_explicitMaxWidth()!=null?(b=this.get_explicitMaxWidth()-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),b<0&&(b=0),this._viewPort.set_maxVisibleWidth(b)):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=
null?(b=this._backgroundSkinMeasurements.maxWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),b<0&&(b=0),this._viewPort.set_maxVisibleWidth(b)):this._viewPort.set_maxVisibleWidth(1/0);this.get_explicitMaxHeight()!=null?(b=this.get_explicitMaxHeight()-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_maxVisibleHeight(b)):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=
null?(b=this._backgroundSkinMeasurements.maxHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_maxVisibleHeight(b)):this._viewPort.set_maxVisibleHeight(1/0);this._viewPort.validateNow();this._ignoreViewPortResizing=a},refreshViewPortBoundsForLayout:function(){var a=this._ignoreViewPortResizing;this._ignoreViewPortResizing=!0;var b=this.actualWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-
this.get_paddingRight();b<0&&(b=0);var c=this.actualHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();c<0&&(c=0);var d=this.actualMinWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight();d<0&&(d=0);var f=this.actualMinHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();f<0&&(f=0);var g=this.actualMaxWidth-this.leftViewPortOffset-this.rightViewPortOffset-
this.get_paddingLeft()-this.get_paddingRight();g<0&&(g=0);var h=this.actualMaxHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();h<0&&(h=0);var n=this.get_paddingLeft()+this.leftViewPortOffset,l=this.get_paddingTop()+this.topViewPortOffset;if(this._scrollMode==Lj.MASK||this._scrollMode==Lj.MASKLESS||this._currentViewPortMaskSkin!=null)n-=this.get_scrollX(),l-=this.get_scrollY();this._viewPort.set_x(n);this._viewPort.set_y(l);this._viewPort.set_visibleWidth(b);
this._viewPort.set_visibleHeight(c);this._viewPort.set_minVisibleWidth(d);this._viewPort.set_minVisibleHeight(f);this._viewPort.set_maxVisibleWidth(g);this._viewPort.set_maxVisibleHeight(h);this._viewPort.validateNow();this._ignoreViewPortResizing=a},refreshScrollerValues:function(){this.stage!=null&&this.scroller.set_target(w.__cast(this._viewPort,Ja));this.scroller.enabledX=this._enabled&&this._scrollPolicyX!=Me.OFF;this.scroller.enabledY=this._enabled&&this._scrollPolicyY!=Me.OFF},refreshScrollBarValues:function(){if(this.scrollBarX!=
null){var a=this._ignoreScrollBarXChange;this._ignoreScrollBarXChange=!0;this.scrollBarX.set_minimum(this.scroller.get_minScrollX());this.scrollBarX.set_maximum(this.scroller.get_maxScrollX());this.scrollBarX.set_value(this.scroller.get_scrollX());this.scrollBarX.set_page((this.scroller.get_maxScrollX()-this.scroller.get_minScrollX())*this._viewPort.get_visibleWidth()/this._viewPort.get_width());this.scrollBarX.set_step(this._scrollStepX);w.__cast(this.scrollBarX,zb).set_visible(this.showScrollBarX);
!this.get_fixedScrollBars()&&this.get_autoHideScrollBars()||this.scrollBarX.set_alpha(1);this._ignoreScrollBarXChange=a}this.scrollBarY!=null&&(a=this._ignoreScrollBarYChange,this._ignoreScrollBarYChange=!0,this.scrollBarY.set_minimum(this.scroller.get_minScrollY()),this.scrollBarY.set_maximum(this.scroller.get_maxScrollY()),this.scrollBarY.set_value(this.scroller.get_scrollY()),this.scrollBarY.set_page((this.scroller.get_maxScrollY()-this.scroller.get_minScrollY())*this._viewPort.get_visibleHeight()/
this._viewPort.get_height()),this.scrollBarY.set_step(this._scrollStepY),w.__cast(this.scrollBarY,zb).set_visible(this.showScrollBarY),!this.get_fixedScrollBars()&&this.get_autoHideScrollBars()||this.scrollBarY.set_alpha(1),this._ignoreScrollBarYChange=a)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||
b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;w.__implements(this._currentBackgroundSkin,rb)&&(h=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();var n=this.get_explicitWidth();a&&(n=this.get_measureViewPort()?this._viewPort.get_visibleWidth():0,n+=this.leftViewPortOffset+this.rightViewPortOffset,n=Math.max(n,this.chromeMeasuredWidth),
n+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(n=Math.max(n,this._currentBackgroundSkin.get_width())));a=this.get_explicitHeight();b&&(a=this.get_measureViewPort()?this._viewPort.get_visibleHeight():0,a+=this.topViewPortOffset+this.bottomViewPortOffset,a=Math.max(a,this.chromeMeasuredHeight),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(a,this._currentBackgroundSkin.get_height())));b=this.get_explicitMinWidth();
c&&(b=this.get_measureViewPort()?this._viewPort.get_minVisibleWidth():0,b+=this.leftViewPortOffset+this.rightViewPortOffset,b=Math.max(b,this.chromeMeasuredMinWidth),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(b,h.get_minWidth()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(b,this._backgroundSkinMeasurements.minWidth)));c=this.get_explicitMinHeight();d&&(c=this.get_measureViewPort()?this._viewPort.get_minVisibleHeight():
0,c+=this.topViewPortOffset+this.bottomViewPortOffset,c=Math.max(c,this.chromeMeasuredMinHeight),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(c,h.get_minHeight()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(c,this._backgroundSkinMeasurements.minHeight)));d=this.get_explicitMaxWidth();f&&(d=this.get_measureViewPort()?this._viewPort.get_maxVisibleWidth():1/0,d+=this.leftViewPortOffset+this.rightViewPortOffset,d=Math.min(d,
this.chromeMeasuredMaxWidth),d+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?d=Math.min(d,h.get_maxWidth()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null&&(d=Math.min(d,this._backgroundSkinMeasurements.maxWidth)));f=this.get_explicitMaxHeight();g&&(f=this.get_measureViewPort()?this._viewPort.get_maxVisibleHeight():1/0,f+=this.topViewPortOffset+this.bottomViewPortOffset,f=Math.min(f,this.chromeMeasuredMaxHeight),f+=this.get_paddingTop()+this.get_paddingBottom(),
h!=null?f=Math.min(f,h.get_maxHeight()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null&&(f=Math.min(f,this._backgroundSkinMeasurements.maxHeight)));return this.saveMeasurements(n,a,b,c,d,f)},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||
this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),
this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshMaskSkin:function(){var a=this._currentMaskSkin;this._currentMaskSkin=this.getCurrentMaskSkin();this._currentMaskSkin!=a&&(this.removeCurrentMaskSkin(a),this.addCurrentMaskSkin(this._currentMaskSkin))},getCurrentMaskSkin:function(){return this.get_maskSkin()},addCurrentMaskSkin:function(a){a!=null&&(w.__implements(a,Fa)&&a.initializeNow(),w.__implements(a,qb)&&a.set_uiContext(this),this.addChild(a),this.set_mask(a))},
removeCurrentMaskSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a),this.set_mask(null))},refreshViewPortMaskSkin:function(){var a=this._currentViewPortMaskSkin;this._currentViewPortMaskSkin=this.getCurrentViewPortMaskSkin();this._currentViewPortMaskSkin!=a&&(this.removeCurrentViewPortMaskSkin(a),this.addCurrentViewPortMaskSkin(this._currentViewPortMaskSkin))},getCurrentViewPortMaskSkin:function(){return this.get_viewPortMaskSkin()!=null?this.get_viewPortMaskSkin():
this._scrollMode==Lj.MASK?(this._fallbackViewPortMaskSkin==null&&(this._fallbackViewPortMaskSkin=new Za(ub.SolidColor(16711935))),this._fallbackViewPortMaskSkin):null},addCurrentViewPortMaskSkin:function(a){a!=null&&(w.__implements(a,Fa)&&a.initializeNow(),w.__implements(a,qb)&&a.set_uiContext(this),this.addChild(a),w.__cast(this._viewPort,ma).set_mask(a))},removeCurrentViewPortMaskSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a),w.__cast(this._viewPort,
ma).set_mask(null))},refreshScrollBarsCornerSkin:function(){var a=this._currentScrollBarsCornerSkin;this._currentScrollBarsCornerSkin=this.getCurrentScrollBarsCornerSkin();this._currentScrollBarsCornerSkin!=a&&(this.removeCurrentScrollBarsCornerSkin(a),this.addCurrentScrollBarsCornerSkin(this._currentScrollBarsCornerSkin))},getCurrentScrollBarsCornerSkin:function(){return this.get_scrollBarsCornerSkin()},addCurrentScrollBarsCornerSkin:function(a){a!=null&&(w.__implements(a,Fa)&&a.initializeNow(),
w.__implements(a,qb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentScrollBarsCornerSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},layoutChildren:function(){this.layoutBackgroundSkin();this.layoutMaskSkin();this.layoutViewPortMaskSkin();this.layoutScrollBars()},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=
this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},layoutMaskSkin:function(){this._currentMaskSkin!=null&&(this._currentMaskSkin.set_x(0),this._currentMaskSkin.set_y(0),this._currentMaskSkin.set_width(this.actualWidth),this._currentMaskSkin.set_height(this.actualHeight),
w.__implements(this._currentMaskSkin,da)&&this._currentMaskSkin.validateNow())},layoutViewPortMaskSkin:function(){if(this._currentViewPortMaskSkin!=null){var a=this.get_paddingLeft()+this.leftViewPortOffset,b=this.get_paddingTop()+this.topViewPortOffset,c=this._viewPort.get_visibleWidth(),d=this._viewPort.get_visibleHeight();this.get_fixedScrollBars()&&this.scrollBarY.get_visible()&&(c+=this.scrollBarY.get_width(),this.get_scrollBarYPosition()==ra.LEFT&&(a-=this.scrollBarY.get_width()));this.get_fixedScrollBars()&&
this.scrollBarX.get_visible()&&(d+=this.scrollBarX.get_height(),this.get_scrollBarXPosition()==ra.TOP&&(a-=this.scrollBarX.get_height()));this._currentViewPortMaskSkin.set_x(a);this._currentViewPortMaskSkin.set_y(b);this._currentViewPortMaskSkin.set_width(c);this._currentViewPortMaskSkin.set_height(d);w.__implements(this._currentViewPortMaskSkin,da)&&this._currentViewPortMaskSkin.validateNow()}},layoutScrollBars:function(){var a=this.actualWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-
this.get_paddingRight();a<0&&(a=0);var b=this.actualHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();b<0&&(b=0);this.scrollBarX!=null&&w.__implements(this.scrollBarX,da)&&this.scrollBarX.validateNow();this.scrollBarY!=null&&w.__implements(this.scrollBarY,da)&&this.scrollBarY.validateNow();if(this.scrollBarX!=null)if(this.get_scrollBarXPosition()._hx_index==0?this.scrollBarX.set_y(this.get_paddingTop()):this.scrollBarX.set_y(this.get_paddingTop()+
this.topViewPortOffset+b),this.scrollBarX.set_x(this.get_paddingLeft()+this.leftViewPortOffset),this.get_fixedScrollBars())this.scrollBarX.set_width(a);else{var c=this.scrollBarX;c.set_y(c.get_y()-this.scrollBarX.get_height());!this.showScrollBarY&&this._hideScrollBarY==null||this.scrollBarY==null?this.scrollBarX.set_width(a):(c=a-this.scrollBarY.get_width(),c<0&&(c=0),this.scrollBarX.set_width(c))}this.scrollBarY!=null&&(this.get_scrollBarYPosition()._hx_index==3?this.scrollBarY.set_x(this.get_paddingLeft()):
this.scrollBarY.set_x(this.get_paddingLeft()+this.leftViewPortOffset+a),this.scrollBarY.set_y(this.get_paddingTop()+this.topViewPortOffset),this.get_fixedScrollBars()?this.scrollBarY.set_height(b):(c=this.scrollBarY,c.set_x(c.get_x()-this.scrollBarY.get_width()),!this.showScrollBarX&&this._hideScrollBarX==null||this.scrollBarX==null?this.scrollBarY.set_height(b):(a=b-this.scrollBarX.get_height(),a<0&&(a=0),this.scrollBarY.set_height(a))));this._currentScrollBarsCornerSkin!=null&&(this.get_fixedScrollBars()&&
this.scrollBarX!=null&&this.scrollBarY!=null&&this.scrollBarX.get_visible()&&this.scrollBarY.get_visible()?(this._currentScrollBarsCornerSkin.set_x(this.scrollBarY.get_x()),this._currentScrollBarsCornerSkin.set_width(this.scrollBarY.get_width()),this._currentScrollBarsCornerSkin.set_y(this.scrollBarX.get_y()),this._currentScrollBarsCornerSkin.set_height(this.scrollBarX.get_height()),this._currentScrollBarsCornerSkin.set_visible(!0)):this._currentScrollBarsCornerSkin.set_visible(!1))},refreshScrollRect:function(){var a=
this.scroller.get_scrollX(),b=this.scroller.get_scrollY();if(this.get_scrollPixelSnapping()){var c=Zg.getConcatenatedScaleX(this),d=Zg.getConcatenatedScaleY(this);a=Math.round(a/c)*c;b=Math.round(b/d)*d}if(this._scrollMode==Lj.MASK||this._scrollMode==Lj.MASKLESS||this._currentViewPortMaskSkin!=null)d=w.__cast(this._viewPort,ma),d.set_scrollRect(null),this._viewPort.set_x(this.get_paddingLeft()+this.leftViewPortOffset-a),this._viewPort.set_y(this.get_paddingTop()+this.topViewPortOffset-b);else if(this._scrollMode==
Lj.SCROLL_RECT){c=this._scrollRect1;this._currentScrollRect==c&&(c=this._scrollRect2);this._currentScrollRect=c;d=this.actualWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight();d<0&&(d=0);var f=this.actualHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();f<0&&(f=0);c.setTo(a,b,d,f);d=w.__cast(this._viewPort,ma);d.set_scrollRect(c)}else throw new Cb("Unknown scrollMode: "+H.string(this._scrollMode));
},revealScrollBarX:function(){this.scrollBarX!=null&&this.scroller.get_minScrollX()!=this.scroller.get_maxScrollX()&&(this._hideScrollBarX!=null&&Ca.stop(this._hideScrollBarX),this.scrollBarX.set_alpha(1),this._scrollBarXRevealTime=Pa.getTimer())},revealScrollBarY:function(){this.scrollBarY!=null&&this.scroller.get_minScrollY()!=this.scroller.get_maxScrollY()&&(this._hideScrollBarY!=null&&Ca.stop(this._hideScrollBarY),this.scrollBarY.set_alpha(1),this._scrollBarYRevealTime=Pa.getTimer())},hideScrollBarX:function(){var a=
this;if(this.scrollBarX!=null&&this._hideScrollBarX==null&&this.scrollBarX.get_alpha()!=0)if(this.get_hideScrollBarDuration()==0)this.scrollBarX.set_alpha(0);else{this._hideScrollBarX=Ca.update(function(c){return a.scrollBarX.set_alpha(c)},this.get_hideScrollBarDuration(),[this.scrollBarX.get_alpha()],[0],!0);this._hideScrollBarX.ease(this.get_hideScrollBarEase());this._hideScrollBarX.autoVisible(!1);var b=(Pa.getTimer()-this._scrollBarXRevealTime)/1E3;b<this.get_showScrollBarMinimumDuration()&&this._hideScrollBarX.delay(this.get_showScrollBarMinimumDuration()-
b);this._hideScrollBarX.onComplete(m(this,this.hideScrollBarX_onComplete))}},hideScrollBarY:function(){var a=this;if(this.scrollBarY!=null&&this._hideScrollBarY==null&&this.scrollBarY.get_alpha()!=0)if(this.get_hideScrollBarDuration()==0)this.scrollBarY.set_alpha(0);else{this._hideScrollBarY=Ca.update(function(c){return a.scrollBarY.set_alpha(c)},this.get_hideScrollBarDuration(),[this.scrollBarY.get_alpha()],[0],!0);this._hideScrollBarY.ease(this.get_hideScrollBarEase());this._hideScrollBarY.autoVisible(!1);
var b=(Pa.getTimer()-this._scrollBarYRevealTime)/1E3;b<this.get_showScrollBarMinimumDuration()&&this._hideScrollBarY.delay(this.get_showScrollBarMinimumDuration()-b);this._hideScrollBarY.onComplete(m(this,this.hideScrollBarY_onComplete))}},checkForRevealScrollBars:function(){!this._scrollerDraggingX&&this.scroller.get_draggingX()&&(this._scrollerDraggingX=!0,this.revealScrollBarX());!this._scrollerDraggingY&&this.scroller.get_draggingY()&&(this._scrollerDraggingY=!0,this.revealScrollBarY())},scrollWithKeyboard:function(a){if(this._scrollPolicyY!=
Me.OFF||this._scrollPolicyX!=Me.OFF){var b=this._scrollStepX;b<=0&&(b=1);var c=this._scrollStepY;c<=0&&(c=1);var d=this.get_scrollX(),f=this.get_scrollY();switch(a.keyCode){case 33:f=this.get_scrollY()-this._viewPort.get_visibleHeight();break;case 34:f=this.get_scrollY()+this._viewPort.get_visibleHeight();break;case 35:f=this.get_maxScrollY();break;case 36:f=this.get_minScrollY();break;case 37:d=this.get_scrollX()-b;break;case 38:f=this.get_scrollY()-c;break;case 39:d=this.get_scrollX()+b;break;case 40:f=
this.get_scrollY()+c;break;default:return}f<this.get_minScrollY()?f=this.get_minScrollY():f>this.get_maxScrollY()&&(f=this.get_maxScrollY());d<this.get_minScrollX()?d=this.get_minScrollX():d>this.get_maxScrollX()&&(d=this.get_maxScrollX());b=!1;this.get_scrollY()!=f&&this._scrollPolicyY!=Me.OFF&&(b=!0,this.set_scrollY(f));this.get_scrollX()!=d&&this._scrollPolicyX!=Me.OFF&&(b=!0,this.set_scrollX(d));b&&a.preventDefault()}},baseScrollContainer_addedToStageHandler:function(a){this.setInvalid(x.SCROLL)},
baseScrollContainer_removedFromStageHandler:function(a){this.scroller!=null&&this.scroller.set_target(null)},baseScrollContainer_keyDownHandler:function(a){this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.scrollWithKeyboard(a))},baseScrollContainer_scroller_scrollStartHandler:function(a){a=this.scroller.get_touchPointID();if(this.scroller.get_touchPointIsSimulated()){var b=Pd.forStage(this.stage);a=b.claimMouse(this);
if(!a){this.scroller.stop();return}}else if(a!=null&&(b=Pd.forStage(this.stage),a=b.claimTouch(a,this),!a)){this.scroller.stop();return}this._viewPort.addEventListener("mouseDown",m(this,this.baseScrollContainer_viewPort_mouseDownHandler));this._viewPort.addEventListener("touchBegin",m(this,this.baseScrollContainer_viewPort_touchBeginHandler));this._scrollerDraggingY=this._scrollerDraggingX=!1;this.checkForRevealScrollBars();Id.dispatch(this,"scrollStart",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},
baseScrollContainer_scroller_scrollHandler:function(a){this._ignoreScrollerChanges?this._settingScrollerDimensions&&this.needsScrollMeasurement()?this.setInvalid(x.SCROLL):(this._viewPort.set_scrollX(this.get_scrollX()),this._viewPort.set_scrollY(this.get_scrollY())):(this.checkForRevealScrollBars(),this.needsScrollMeasurement()?this.setInvalid(x.SCROLL):(this._viewPort.set_scrollX(this.get_scrollX()),this._viewPort.set_scrollY(this.get_scrollY()),this.refreshScrollRect(),this.refreshScrollBarValues()),
Id.dispatch(this,"scroll",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY()))},baseScrollContainer_scroller_scrollCompleteHandler:function(a){this._viewPort.removeEventListener("mouseDown",m(this,this.baseScrollContainer_viewPort_mouseDownHandler));this._viewPort.removeEventListener("touchBegin",m(this,this.baseScrollContainer_viewPort_touchBeginHandler));this._scrollerDraggingY=this._scrollerDraggingX=!1;this._scrollBarXHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||
this.hideScrollBarX();this._scrollBarYHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarY();Id.dispatch(this,"scrollComplete",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},reclaimMouse:function(){if(this.scroller.get_touchPointIsSimulated()){var a=Pd.forStage(this.stage);a.getMouseClaim()==null&&a.claimMouse(this)}},reclaimTouch:function(a){if(!this.scroller.get_touchPointIsSimulated()&&this.scroller.get_touchPointID()!=null&&this.scroller.get_touchPointID()==
a){var b=Pd.forStage(this.stage);b.getTouchClaim(a)==null&&b.claimTouch(a,this)}},baseScrollContainer_viewPort_mouseDownHandler:function(a){this.reclaimMouse()},baseScrollContainer_viewPort_touchBeginHandler:function(a){this.reclaimTouch(a.touchPointID)},scrollBarX_changeHandler:function(a){this._ignoreScrollBarXChange||this.scroller.set_scrollX(this.scrollBarX.get_value())},scrollBarY_changeHandler:function(a){this._ignoreScrollBarYChange||this.scroller.set_scrollY(this.scrollBarY.get_value())},
scrollBarX_rollOverHandler:function(a){this._scrollBarXHover=!0;this.revealScrollBarX()},scrollBarX_rollOutHandler:function(a){this._scrollBarXHover&&(this._scrollBarXHover=!1,this._scrollerDraggingX||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarX())},scrollBarY_rollOverHandler:function(a){this._scrollBarYHover=!0;this.revealScrollBarY()},scrollBarY_rollOutHandler:function(a){this._scrollBarYHover&&(this._scrollBarYHover=!1,this._scrollerDraggingY||this.get_fixedScrollBars()||
!this.get_autoHideScrollBars()||this.hideScrollBarY())},scrollBarX_scrollStartHandler:function(a){this.scroller.stop();this._scrollerDraggingX=!0;Id.dispatch(this,"scrollStart",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},scrollBarX_scrollCompleteHandler:function(a){this._scrollerDraggingX=!1;this._scrollBarXHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarX();Id.dispatch(this,"scrollComplete",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},
scrollBarY_scrollStartHandler:function(a){this.scroller.stop();this._scrollerDraggingY=!0;Id.dispatch(this,"scrollStart",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},scrollBarY_scrollCompleteHandler:function(a){this._scrollerDraggingY=!1;this._scrollBarYHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarY();Id.dispatch(this,"scrollComplete",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},hideScrollBarX_onComplete:function(){this._hideScrollBarX=
null},hideScrollBarY_onComplete:function(){this._hideScrollBarY=null},viewPort_resizeHandler:function(a){this._ignoreViewPortResizing||this.setInvalid(x.SIZE)},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);
return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},
set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==
a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);
this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);
this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__maskSkin:null,get_maskSkin:function(){return this.__maskSkin},set_maskSkin:function(a){if(!this.setStyle("maskSkin")||this.__maskSkin==a)return this.__maskSkin;this._previousClearStyle=m(this,this.clearStyle_maskSkin);this.__maskSkin=a;this.setInvalid(x.STYLES);return this.__maskSkin},
clearStyle_maskSkin:function(){this.set_maskSkin(null);return this.get_maskSkin()},__viewPortMaskSkin:null,get_viewPortMaskSkin:function(){return this.__viewPortMaskSkin},set_viewPortMaskSkin:function(a){if(!this.setStyle("viewPortMaskSkin")||this.__viewPortMaskSkin==a)return this.__viewPortMaskSkin;this._previousClearStyle=m(this,this.clearStyle_viewPortMaskSkin);this.__viewPortMaskSkin=a;this.setInvalid(x.STYLES);return this.__viewPortMaskSkin},clearStyle_viewPortMaskSkin:function(){this.set_viewPortMaskSkin(null);
return this.get_viewPortMaskSkin()},__scrollBarsCornerSkin:null,get_scrollBarsCornerSkin:function(){return this.__scrollBarsCornerSkin},set_scrollBarsCornerSkin:function(a){if(!this.setStyle("scrollBarsCornerSkin")||this.__scrollBarsCornerSkin==a)return this.__scrollBarsCornerSkin;this._previousClearStyle=m(this,this.clearStyle_scrollBarsCornerSkin);this.__scrollBarsCornerSkin=a;this.setInvalid(x.STYLES);return this.__scrollBarsCornerSkin},clearStyle_scrollBarsCornerSkin:function(){this.set_scrollBarsCornerSkin(null);
return this.get_scrollBarsCornerSkin()},__fixedScrollBars:null,get_fixedScrollBars:function(){return this.__fixedScrollBars},set_fixedScrollBars:function(a){if(!this.setStyle("fixedScrollBars")||this.__fixedScrollBars==a)return this.__fixedScrollBars;this._previousClearStyle=m(this,this.clearStyle_fixedScrollBars);this.__fixedScrollBars=a;this.setInvalid(x.STYLES);return this.__fixedScrollBars},clearStyle_fixedScrollBars:function(){this.set_fixedScrollBars(!1);return this.get_fixedScrollBars()},__showScrollBars:null,
get_showScrollBars:function(){return this.__showScrollBars},set_showScrollBars:function(a){if(!this.setStyle("showScrollBars")||this.__showScrollBars==a)return this.__showScrollBars;this._previousClearStyle=m(this,this.clearStyle_showScrollBars);this.__showScrollBars=a;this.setInvalid(x.STYLES);return this.__showScrollBars},clearStyle_showScrollBars:function(){this.set_showScrollBars(!0);return this.get_showScrollBars()},__autoHideScrollBars:null,get_autoHideScrollBars:function(){return this.__autoHideScrollBars},
set_autoHideScrollBars:function(a){if(!this.setStyle("autoHideScrollBars")||this.__autoHideScrollBars==a)return this.__autoHideScrollBars;this._previousClearStyle=m(this,this.clearStyle_autoHideScrollBars);this.__autoHideScrollBars=a;this.setInvalid(x.STYLES);return this.__autoHideScrollBars},clearStyle_autoHideScrollBars:function(){this.set_autoHideScrollBars(!0);return this.get_autoHideScrollBars()},__scrollBarXPosition:null,get_scrollBarXPosition:function(){return this.__scrollBarXPosition},set_scrollBarXPosition:function(a){if(!this.setStyle("scrollBarXPosition")||
this.__scrollBarXPosition==a)return this.__scrollBarXPosition;this._previousClearStyle=m(this,this.clearStyle_scrollBarXPosition);this.__scrollBarXPosition=a;this.setInvalid(x.STYLES);return this.__scrollBarXPosition},clearStyle_scrollBarXPosition:function(){this.set_scrollBarXPosition(ra.BOTTOM);return this.get_scrollBarXPosition()},__scrollBarYPosition:null,get_scrollBarYPosition:function(){return this.__scrollBarYPosition},set_scrollBarYPosition:function(a){if(!this.setStyle("scrollBarYPosition")||
this.__scrollBarYPosition==a)return this.__scrollBarYPosition;this._previousClearStyle=m(this,this.clearStyle_scrollBarYPosition);this.__scrollBarYPosition=a;this.setInvalid(x.STYLES);return this.__scrollBarYPosition},clearStyle_scrollBarYPosition:function(){this.set_scrollBarYPosition(ra.RIGHT);return this.get_scrollBarYPosition()},__showScrollBarMinimumDuration:null,get_showScrollBarMinimumDuration:function(){return this.__showScrollBarMinimumDuration},set_showScrollBarMinimumDuration:function(a){if(!this.setStyle("showScrollBarMinimumDuration")||
this.__showScrollBarMinimumDuration==a)return this.__showScrollBarMinimumDuration;this._previousClearStyle=m(this,this.clearStyle_showScrollBarMinimumDuration);this.__showScrollBarMinimumDuration=a;this.setInvalid(x.STYLES);return this.__showScrollBarMinimumDuration},clearStyle_showScrollBarMinimumDuration:function(){this.set_showScrollBarMinimumDuration(.5);return this.get_showScrollBarMinimumDuration()},__hideScrollBarDuration:null,get_hideScrollBarDuration:function(){return this.__hideScrollBarDuration},
set_hideScrollBarDuration:function(a){if(!this.setStyle("hideScrollBarDuration")||this.__hideScrollBarDuration==a)return this.__hideScrollBarDuration;this._previousClearStyle=m(this,this.clearStyle_hideScrollBarDuration);this.__hideScrollBarDuration=a;this.setInvalid(x.STYLES);return this.__hideScrollBarDuration},clearStyle_hideScrollBarDuration:function(){this.set_hideScrollBarDuration(.2);return this.get_hideScrollBarDuration()},__hideScrollBarEase:null,get_hideScrollBarEase:function(){return this.__hideScrollBarEase},
set_hideScrollBarEase:function(a){if(!this.setStyle("hideScrollBarEase")||this.__hideScrollBarEase==a)return this.__hideScrollBarEase;this._previousClearStyle=m(this,this.clearStyle_hideScrollBarEase);this.__hideScrollBarEase=a;this.setInvalid(x.STYLES);return this.__hideScrollBarEase},clearStyle_hideScrollBarEase:function(){this.set_hideScrollBarEase(th.easeOut);return this.get_hideScrollBarEase()},__scrollPixelSnapping:null,get_scrollPixelSnapping:function(){return this.__scrollPixelSnapping},set_scrollPixelSnapping:function(a){if(!this.setStyle("scrollPixelSnapping")||
this.__scrollPixelSnapping==a)return this.__scrollPixelSnapping;this._previousClearStyle=m(this,this.clearStyle_scrollPixelSnapping);this.__scrollPixelSnapping=a;this.setInvalid(x.STYLES);return this.__scrollPixelSnapping},clearStyle_scrollPixelSnapping:function(){this.set_scrollPixelSnapping(!1);return this.get_scrollPixelSnapping()},__class__:Ab,__properties__:I(fa.prototype.__properties__,{set_scrollMode:"set_scrollMode",get_scrollMode:"get_scrollMode",get_measureViewPort:"get_measureViewPort",
set_scrollPixelSnapping:"set_scrollPixelSnapping",get_scrollPixelSnapping:"get_scrollPixelSnapping",set_hideScrollBarEase:"set_hideScrollBarEase",get_hideScrollBarEase:"get_hideScrollBarEase",set_hideScrollBarDuration:"set_hideScrollBarDuration",get_hideScrollBarDuration:"get_hideScrollBarDuration",set_showScrollBarMinimumDuration:"set_showScrollBarMinimumDuration",get_showScrollBarMinimumDuration:"get_showScrollBarMinimumDuration",set_scrollBarYPosition:"set_scrollBarYPosition",get_scrollBarYPosition:"get_scrollBarYPosition",
set_scrollBarXPosition:"set_scrollBarXPosition",get_scrollBarXPosition:"get_scrollBarXPosition",set_scrollPolicyY:"set_scrollPolicyY",get_scrollPolicyY:"get_scrollPolicyY",set_scrollPolicyX:"set_scrollPolicyX",get_scrollPolicyX:"get_scrollPolicyX",set_scrollStepY:"set_scrollStepY",get_scrollStepY:"get_scrollStepY",set_scrollStepX:"set_scrollStepX",get_scrollStepX:"get_scrollStepX",get_maxScrollY:"get_maxScrollY",get_maxScrollX:"get_maxScrollX",get_minScrollY:"get_minScrollY",get_minScrollX:"get_minScrollX",
set_restrictedScrollY:"set_restrictedScrollY",get_restrictedScrollY:"get_restrictedScrollY",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_restrictedScrollX:"set_restrictedScrollX",get_restrictedScrollX:"get_restrictedScrollX",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_scrollerFactory:"set_scrollerFactory",get_scrollerFactory:"get_scrollerFactory",set_scrollBarYFactory:"set_scrollBarYFactory",get_scrollBarYFactory:"get_scrollBarYFactory",set_scrollBarXFactory:"set_scrollBarXFactory",
get_scrollBarXFactory:"get_scrollBarXFactory",set_autoHideScrollBars:"set_autoHideScrollBars",get_autoHideScrollBars:"get_autoHideScrollBars",set_showScrollBars:"set_showScrollBars",get_showScrollBars:"get_showScrollBars",set_fixedScrollBars:"set_fixedScrollBars",get_fixedScrollBars:"get_fixedScrollBars",set_scrollBarsCornerSkin:"set_scrollBarsCornerSkin",get_scrollBarsCornerSkin:"get_scrollBarsCornerSkin",set_viewPortMaskSkin:"set_viewPortMaskSkin",get_viewPortMaskSkin:"get_viewPortMaskSkin",set_maskSkin:"set_maskSkin",
get_maskSkin:"get_maskSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_viewPort:"set_viewPort",
get_viewPort:"get_viewPort"})});var ng=function(){};t["feathers.core.IFocusContainer"]=ng;ng.__name__="feathers.core.IFocusContainer";ng.__isInterface__=!0;ng.__interfaces__=[qd];ng.prototype={get_childFocusEnabled:null,set_childFocusEnabled:null,__class__:ng,__properties__:{set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"}};var je=function(){this.__layout=null;this._manageChildVisibility=!1;this._autoSizeMode=Ve.CONTENT;this._childFocusEnabled=!0;this._xmlContent=
null;this.items=[];this._displayListBypassEnabled=!0;this._ignoreRemovedEvent=this._ignoreChildChanges=this._ignoreChangesButSetFlags=!1;this.initializeScrollContainerTheme();Ab.call(this);this.get_viewPort()==null&&(this.layoutViewPort=new ap,this.addRawChild(this.layoutViewPort),this.set_viewPort(this.layoutViewPort));this.addEventListener("addedToStage",m(this,this.scrollContainer_addedToStageHandler))};t["feathers.controls.ScrollContainer"]=je;je.__name__="feathers.controls.ScrollContainer";je.__interfaces__=
[ng];je.__super__=Ab;je.prototype=I(Ab.prototype,{layoutViewPort:null,_ignoreRemovedEvent:null,_ignoreChildChanges:null,_ignoreChangesButSetFlags:null,_displayListBypassEnabled:null,items:null,_xmlContent:null,get_xmlContent:function(){return this._xmlContent},set_xmlContent:function(a){if(this._xmlContent==a)return this._xmlContent;if(this._xmlContent!=null)for(var b=0,c=this._xmlContent;b<c.length;){var d=c[b];++b;this.removeChild(d)}this._xmlContent=a;if(this._xmlContent!=null)for(b=0,c=this._xmlContent;b<
c.length;)d=c[b],++b,this.addChild(d);this.setInvalid(x.STYLES);return this._xmlContent},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);
this.stage!=null&&(this._autoSizeMode==Ve.STAGE?(this.stage.addEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler),!1,0,!0),this.addEventListener("removedFromStage",m(this,this.scrollContainer_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.scrollContainer_removedFromStageHandler))));return this._autoSizeMode},_manageChildVisibility:null,get_manageChildVisibility:function(){return this._manageChildVisibility},
set_manageChildVisibility:function(a){if(this._manageChildVisibility==a)return this._manageChildVisibility;this._manageChildVisibility=a;this.setInvalid(x.LAYOUT);return this._manageChildVisibility},get_numRawChildren:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;var b=this.get_numChildren();this._displayListBypassEnabled=a;return b},get_numChildren:function(){return this._displayListBypassEnabled?this.layoutViewPort.get_numChildren():Ab.prototype.get_numChildren.call(this)},
addChild:function(a){return this._displayListBypassEnabled?this.addChildAt(a,this.layoutViewPort.get_numChildren()):Ab.prototype.addChild.call(this,a)},addChildAt:function(a,b){if(!this._displayListBypassEnabled)return Ab.prototype.addChildAt.call(this,a,b);var c=this.items.indexOf(a);if(c==b)return a;c>=0&&V.remove(this.items,a);this.items.splice(b,0,a);b=this.layoutViewPort.addChildAt(a,b);a.addEventListener("resize",m(this,this.scrollContainer_child_resizeHandler));w.__implements(a,T)&&a.addEventListener("layoutDataChange",
m(this,this.scrollContainer_child_layoutDataChangeHandler),!1,0,!0);a.addEventListener("removed",m(this,this.scrollContainer_child_removedHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);return b},removeChild:function(a){return this.removeChildInternal(a,!0)},removeChildInternal:function(a,b){if(!this._displayListBypassEnabled)return Ab.prototype.removeChild.call(this,a);if(a==null||a.parent!=this.layoutViewPort)return a;V.remove(this.items,a);
var c=a;b&&(b=this._ignoreRemovedEvent,this._ignoreRemovedEvent=!0,c=this.layoutViewPort.removeChild(a),this._ignoreRemovedEvent=b);a.removeEventListener("resize",m(this,this.scrollContainer_child_resizeHandler));w.__implements(a,T)&&a.removeEventListener("layoutDataChange",m(this,this.scrollContainer_child_layoutDataChangeHandler));a.removeEventListener("removed",m(this,this.scrollContainer_child_removedHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);
return c},removeChildAt:function(a){return this._displayListBypassEnabled?this.removeChild(this.layoutViewPort.getChildAt(a)):Ab.prototype.removeChildAt.call(this,a)},getChildAt:function(a){return this._displayListBypassEnabled?this.layoutViewPort.getChildAt(a):Ab.prototype.removeChildAt.call(this,a)},getChildIndex:function(a){return this._displayListBypassEnabled?this.items.indexOf(a):Ab.prototype.getChildIndex.call(this,a)},setChildIndex:function(a,b){this._displayListBypassEnabled?this.getChildIndex(a)!=
b&&(V.remove(this.items,a),this.items.splice(b,0,a),this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT)):Ab.prototype.setChildIndex.call(this,a,b)},getChildByName:function(a){if(!this._displayListBypassEnabled)return Ab.prototype.getChildByName.call(this,a);for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},addRawChild:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.addChild(a);
this._displayListBypassEnabled=b;return a},addRawChildAt:function(a,b){var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.addChildAt(a,b);this._displayListBypassEnabled=c;return a},removeRawChild:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.removeChild(a);this._displayListBypassEnabled=b;return a},removeRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.removeChildAt(a);this._displayListBypassEnabled=
b;return a},getRawChildByName:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildByName(a);this._displayListBypassEnabled=b;return a},getRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildAt(a);this._displayListBypassEnabled=b;return a},getRawChildIndex:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildIndex(a);this._displayListBypassEnabled=b;return a},
setRawChildIndex:function(a,b){var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;this.setChildIndex(a,b);this._displayListBypassEnabled=c},removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);if(this._displayListBypassEnabled){if(b==2147483647&&(b=this.items.length-1,b<0))return;if(!(a>this.items.length-1)){if(b<a||a<0||b>this.items.length)throw new we("The supplied index is out of bounds.");for(b-=a;b>=0;)this.removeChildAt(a),--b}}else Ab.prototype.removeChildren.call(this,
a,b)},removeRawChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;this.removeChildren(a,b);this._displayListBypassEnabled=c},readjustLayout:function(){this.setInvalid(x.LAYOUT)},initializeScrollContainerTheme:function(){ow.initialize()},collectChildren:function(a){if(a==null)return this.items.slice();for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;a.push(d)}return a},dispatchEvent:function(a){var b=this._displayListBypassEnabled;
this._displayListBypassEnabled=!0;a=Ab.prototype.dispatchEvent.call(this,a);this._displayListBypassEnabled=b;return a},validateNow:function(){var a=this._ignoreChangesButSetFlags;this._ignoreChangesButSetFlags=!0;Ab.prototype.validateNow.call(this);this._ignoreChangesButSetFlags=a},update:function(){this._ignoreChangesButSetFlags=!1;var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);(a||b)&&this.refreshLayout();a=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;b=this._ignoreChildChanges;
this._ignoreChildChanges=!0;Ab.prototype.update.call(this);this._ignoreChildChanges=b;this._displayListBypassEnabled=a},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;return a||b||c||d||f||g?this._autoSizeMode==Ve.STAGE&&this.stage!=null?(b=this.globalToLocal(new Ea),c=this.globalToLocal(new Ea(this.stage.stageWidth,
this.stage.stageHeight)),a=c.x-b.x,b=c.y-b.y,this.saveMeasurements(a,b,a,b)):Ab.prototype.measure.call(this):!1},refreshViewPortBoundsForMeasurement:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!0;Ab.prototype.refreshViewPortBoundsForMeasurement.call(this);this._displayListBypassEnabled=a},refreshViewPortBoundsForLayout:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!0;Ab.prototype.refreshViewPortBoundsForLayout.call(this);this._displayListBypassEnabled=
a},refreshScrollerValues:function(){Ab.prototype.refreshScrollerValues.call(this);if(w.__implements(this.get_layout(),ff)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=
this.layoutViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.layoutViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){return w.__implements(this.get_layout(),ff)},refreshLayout:function(){this.layoutViewPort.set_manageChildVisibility(this._manageChildVisibility);this.layoutViewPort.set_layout(this.get_layout())},scrollContainer_addedToStageHandler:function(a){this._autoSizeMode==Ve.STAGE&&(this.setInvalid(x.SIZE),this.addEventListener("removedFromStage",m(this,this.scrollContainer_removedFromStageHandler)),
this.stage.addEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler),!1,0,!0))},scrollContainer_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.scrollContainer_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler))},scrollContainer_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},scrollContainer_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?
this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},scrollContainer_child_resizeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},scrollContainer_child_removedHandler:function(a){this._ignoreRemovedEvent||Ke.__neq(a.target,a.currentTarget)||(a=w.__cast(a.currentTarget,ma),this.removeChildInternal(a,!1))},get_styleContext:function(){return je},__layout:null,get_layout:function(){return this.__layout},
set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__class__:je,__properties__:I(Ab.prototype.__properties__,{get_numRawChildren:"get_numRawChildren",set_manageChildVisibility:"set_manageChildVisibility",get_manageChildVisibility:"get_manageChildVisibility",set_autoSizeMode:"set_autoSizeMode",
get_autoSizeMode:"get_autoSizeMode",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled",set_xmlContent:"set_xmlContent",get_xmlContent:"get_xmlContent",set_layout:"set_layout",get_layout:"get_layout"})});var mi=function(){};t["feathers.core.IFocusExtras"]=mi;mi.__name__="feathers.core.IFocusExtras";mi.__isInterface__=!0;mi.__interfaces__=[Mb];mi.prototype={get_focusExtrasBefore:null,get_focusExtrasAfter:null,__class__:mi,__properties__:{get_focusExtrasAfter:"get_focusExtrasAfter",
get_focusExtrasBefore:"get_focusExtrasBefore"}};var Uc=function(){this._focusExtrasAfter=[];this._focusExtrasBefore=[];this._footerMeasurements=this._footer=null;this._ignoreFooterResize=!1;this._headerMeasurements=this._header=null;this._ignoreHeaderResize=!1;this.initializePanelTheme();je.call(this)};t["feathers.controls.Panel"]=Uc;Uc.__name__="feathers.controls.Panel";Uc.__interfaces__=[mi];Uc.__super__=je;Uc.prototype=I(je.prototype,{_ignoreHeaderResize:null,_headerMeasurements:null,_header:null,
get_header:function(){return this._header},set_header:function(a){if(this._header==a)return this._header;this._header!=null&&(this._header.removeEventListener("resize",m(this,this.panel_header_resizeHandler)),V.remove(this._focusExtrasBefore,this._header),this.removeRawChild(this._header));this._header=a;this._header!=null?(this._focusExtrasBefore.push(this._header),a=this.layoutViewPort!=null?this.getRawChildIndex(this.layoutViewPort)+1:0,this.addRawChildAt(this._header,a),w.__implements(this._header,
Fa)&&this._header.initializeNow(),this._headerMeasurements==null?this._headerMeasurements=new Sb(this._header):this._headerMeasurements.save(this._header),this._header.addEventListener("resize",m(this,this.panel_header_resizeHandler),!1,0,!0)):this._headerMeasurements=null;this.setInvalid(x.LAYOUT);return this._header},_ignoreFooterResize:null,_footerMeasurements:null,_footer:null,get_footer:function(){return this._footer},set_footer:function(a){if(this._footer==a)return this._footer;this._footer!=
null&&(this._footer.removeEventListener("resize",m(this,this.panel_footer_resizeHandler)),V.remove(this._focusExtrasAfter,this._footer),this.removeRawChild(this._footer));this._footer=a;this._footer!=null?(this._focusExtrasAfter.push(this._footer),this.addRawChild(this._footer),w.__implements(this._footer,Fa)&&this._footer.initializeNow(),this._footerMeasurements==null?this._footerMeasurements=new Sb(this._footer):this._footerMeasurements.save(this._footer),this._footer.addEventListener("resize",
m(this,this.panel_footer_resizeHandler),!1,0,!0)):this._footerMeasurements=null;this.setInvalid(x.LAYOUT);return this._footer},_focusExtrasBefore:null,get_focusExtrasBefore:function(){return this._focusExtrasBefore},_focusExtrasAfter:null,get_focusExtrasAfter:function(){return this._focusExtrasAfter},dispose:function(){this._header!=null&&this.set_header(null);this._footer!=null&&this.set_footer(null);je.prototype.dispose.call(this)},initializePanelTheme:function(){pw.initialize()},update:function(){this._ignoreChangesButSetFlags=
!1;je.prototype.update.call(this);var a=this._ignoreHeaderResize;this._ignoreHeaderResize=!0;this.layoutHeader();this._ignoreHeaderResize=a;a=this._ignoreFooterResize;this._ignoreFooterResize=!0;this.layoutFooter();this._ignoreFooterResize=a},calculateViewPortOffsets:function(a,b){if(this._header!=null){var c=this._ignoreHeaderResize;this._ignoreHeaderResize=!0;this._headerMeasurements!=null&&this._headerMeasurements.restore(this._header);b?this._header.set_width(this.actualWidth-this.get_paddingLeft()-
this.get_paddingRight()):this.get_explicitWidth()!=null&&this._header.set_width(this.get_explicitWidth()-this.get_paddingLeft()-this.get_paddingRight());w.__implements(this._header,da)&&this._header.validateNow();this.topViewPortOffset+=this._header.get_height();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this._header.get_width());w.__implements(this._header,rb)&&(this.chromeMeasuredMinWidth=Math.max(this.chromeMeasuredMinWidth,this._header.get_minWidth()));this._ignoreHeaderResize=
c}this._footer!=null&&(c=this._ignoreFooterResize,this._ignoreFooterResize=!0,this._footerMeasurements!=null&&this._footerMeasurements.restore(this._footer),b?this._footer.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()):this.get_explicitWidth()!=null&&this._footer.set_width(this.get_explicitWidth()-this.get_paddingLeft()-this.get_paddingRight()),w.__implements(this._footer,da)&&this._footer.validateNow(),this.bottomViewPortOffset+=this._footer.get_height(),this.chromeMeasuredWidth=
Math.max(this.chromeMeasuredWidth,this._footer.get_width()),w.__implements(this._footer,rb)&&(this.chromeMeasuredMinWidth=Math.max(this.chromeMeasuredMinWidth,this._footer.get_minWidth())),this._ignoreFooterResize=c);je.prototype.calculateViewPortOffsets.call(this,a,b)},layoutHeader:function(){this._header!=null&&(this._header.set_x(this.get_paddingLeft()),this._header.set_y(this.get_paddingTop()),this._header.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()),w.__implements(this._header,
da)&&this._header.validateNow())},layoutFooter:function(){this._footer!=null&&(this._footer.set_x(this.get_paddingLeft()),this._footer.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()),w.__implements(this._footer,da)&&this._footer.validateNow(),this._footer.set_y(this.actualHeight-this._footer.get_height()-this.get_paddingBottom()))},panel_header_resizeHandler:function(a){this._ignoreHeaderResize||(this._headerMeasurements!=null&&this._headerMeasurements.save(this._header),
this.setInvalid(x.SIZE))},panel_footer_resizeHandler:function(a){this._ignoreFooterResize||(this._footerMeasurements!=null&&this._footerMeasurements.save(this._footer),this.setInvalid(x.SIZE))},get_styleContext:function(){return Uc},__class__:Uc,__properties__:I(je.prototype.__properties__,{get_focusExtrasAfter:"get_focusExtrasAfter",get_focusExtrasBefore:"get_focusExtrasBefore",set_footer:"set_footer",get_footer:"get_footer",set_header:"set_header",get_header:"get_header"})});var ea=function(a,b,
c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!0);f==null&&(f=!0);d==null&&(d=0);c==null&&(c=0);this._withTabs=!1;this._padding=10;this._interfaces=[];Uc.call(this);this.ui=new Bc(this._padding);this.set_backgroundSkin(new rh(3684408));this.set_layout(new Gi);this.setPadding(0);this._ac=a;c>0?this.set_width(c):this.set_width(500);d>0?this.set_height(d):this.set_height(400);this._head=new Mi;this._head.set_text(b);this.set_header(this._head);a=new pb;b=new zg;b.set_gap(10);a.set_layout(b);h&&(this._btNotes=
new Xb,h=new Ma(Z.getBitmapData("btNotes")),h.set_width(h.set_height(20)),h.smoothing=!0,this._btNotes.set_icon(h),this._btNotes.set_width(40),this._btNotes.set_height(30),this._btNotes.addEventListener("trigger",m(this,this.notesWindow)),a.addChild(this._btNotes));g&&(this._btClose=new Xb,h=new Ma(Z.getBitmapData("btClose")),h.set_width(h.set_height(20)),h.smoothing=!0,this._btClose.set_icon(h),this._btClose.set_width(40),this._btClose.set_height(30),this._btClose.addEventListener("trigger",m(this,
this.closeWindow)),a.addChild(this._btClose));this._head.set_rightView(a);this._tabs=new bh;this._tabs.set_dataProvider(new dg);this._tabs.set_layoutData(fd.fill());this._tabs.addEventListener("change",m(this,this.onTab));f&&this.addChild(this._tabs);this._vLayout=new uf;this._vLayout.setPadding(0);this._vLayout.set_gap(0);this._vLayout.set_verticalAlign(hc.TOP);this._vLayout.set_horizontalAlign(Wb.LEFT);this._forms=new je;this._forms.set_backgroundSkin(new rh);this._forms.set_layout(this._vLayout);
this._forms.set_width(this.get_width());f||this.addChild(this._forms);this._withTabs=f;this.stage!=null?this.initialize():this.addEventListener("addedToStage",m(this,this.startInterface))};t["com.tilbuci.ui.window.PopupWindow"]=ea;ea.__name__="com.tilbuci.ui.window.PopupWindow";ea.__super__=Uc;ea.prototype=I(Uc.prototype,{_head:null,_btClose:null,_btNotes:null,_tabs:null,_forms:null,_interfaces:null,_ac:null,_vLayout:null,_padding:null,_withTabs:null,ui:null,acStart:function(){},startInterface:function(a){this.hasEventListener("addedToStage")&&
this.removeEventListener("addedToStage",m(this,this.startInterface));this.redraw()},addForm:function(a,b){b.set_width(this.get_width());b.set_minHeight(this.get_height()-2*this._padding);w.getClass(b).__name__=="com.tilbuci.ui.base.InterfaceColumns"&&b.left.set_width(b.right.set_width(this.get_width()/2));this._interfaces.push(b);this._withTabs?this._tabs.get_dataProvider().add(og.withDisplayObject(a,b)):this._forms.addChild(b)},kill:function(){this.removeEventListener("addedToStage",m(this,this.redraw));
this._tabs.removeEventListener("change",m(this,this.onTab));for(this.removeChildren();this._interfaces.length>0;)this._interfaces.shift();this._interfaces=null;this._head.removeChildren();this._head=null;this._btClose.removeChildren();this._btClose=null;this._tabs.removeChildren();this._tabs.removeAllItems();this._tabs=null;this._forms.removeChildren();this._forms=null;this.ui.kill();this._ac=this.ui=null},redraw:function(a){a=0;for(var b=this._interfaces.length;a<b;){var c=a++;this._interfaces[c].set_width(this.get_width());
this._interfaces[c].set_minHeight(this.get_height()-2*this._padding);w.getClass(this._interfaces[c]).__name__=="com.tilbuci.ui.base.InterfaceColumns"&&(c=this._interfaces[c],c.left.set_width(c.right.set_width(this.get_width()/2)))}this.ui.redraw()},action:function(a,b){},closeWindow:function(a){Aa.removePopUp(this);this._ac!=null&&this._ac("window-close")},notesWindow:function(a){this._ac!=null&&this._ac("window-notes")},onTab:function(a){this.redraw()},__class__:ea});var bp=function(a,b,c,d){d==
null&&(d=!1);ea.call(this,null,a,b,c,d)};t["com.tilbuci.plugin.PluginWindow"]=bp;bp.__name__="com.tilbuci.plugin.PluginWindow";bp.__super__=ea;bp.prototype=I(ea.prototype,{__class__:bp});var Os=function(a){this.orientation="";this.displayMultiply=1;this.keyframeTotal=this.keyframeCurrent=this.displayBigger=this.displaySmaller=0;this.movieName=this.movieId=this.sceneName=this.sceneId="";qa.call(this,a)};t["com.tilbuci.plugin.SystemInfo"]=Os;Os.__name__="com.tilbuci.plugin.SystemInfo";Os.__super__=
qa;Os.prototype=I(qa.prototype,{movieName:null,movieId:null,sceneName:null,sceneId:null,keyframeTotal:null,keyframeCurrent:null,displayBigger:null,displaySmaller:null,displayMultiply:null,orientation:null,kill:function(){this.sceneName=this.sceneId=this.movieName=this.movieId=null},onNewMovie:function(a,b,c,d){this.movieName=a;this.movieId=b;this.displayBigger=c;this.displaySmaller=d;this.dispatchEvent(new Kj("movieload"))},onNewScene:function(a,b,c){this.sceneName=a;this.sceneId=b;this.keyframeTotal=
c;this.keyframeCurrent=0;this.dispatchEvent(new Kj("sceneload"))},onNewKeyframe:function(a){this.keyframeCurrent=a;this.dispatchEvent(new Kj("keyframeload"))},onDisplayResize:function(a,b){this.orientation=a;this.displayMultiply=b;this.dispatchEvent(new Kj("displayresize"))},__class__:Os});var Zv=function(){this._mnPlacement=new G;this._scDirections=new G;this._mvOrigins=new G;this.selScenes=[];this.scenes=new G;this.selMovies=[];this.movies=new G;this.groups=[];var a=new G,b=k.ln.get("window-movieprop-ornone");
a.h.none=b;b=k.ln.get("window-movieprop-oralpha");a.h.alpha=b;b=k.ln.get("window-movieprop-orcenter");a.h.center=b;b=k.ln.get("window-movieprop-ortop");a.h.top=b;b=k.ln.get("window-movieprop-ortopkeep");a.h.topkeep=b;b=k.ln.get("window-movieprop-orbottom");a.h.bottom=b;b=k.ln.get("window-movieprop-orbottomkeep");a.h.bottomkeep=b;b=k.ln.get("window-movieprop-orleft");a.h.left=b;b=k.ln.get("window-movieprop-orleftkeep");a.h.leftkeep=b;b=k.ln.get("window-movieprop-orright");a.h.righ=b;b=k.ln.get("window-movieprop-orrightkeep");
a.h.rightkeep=b;this._mvOrigins=a;a=new G;b=k.ln.get("window-movieprop-input-opup");a.h.up=b;b=k.ln.get("window-movieprop-input-opdown");a.h.down=b;b=k.ln.get("window-movieprop-input-opleft");a.h.left=b;b=k.ln.get("window-movieprop-input-opright");a.h.right=b;b=k.ln.get("window-movieprop-input-opnin");a.h.nin=b;b=k.ln.get("window-movieprop-input-opnout");a.h.nout=b;this._scDirections=a;a=new G;b=k.ln.get("placement-center");a.h.center=b;b=k.ln.get("placement-centerleft");a.h.centerleft=b;b=k.ln.get("placement-centerright");
a.h.centerright=b;b=k.ln.get("placement-top");a.h.top=b;b=k.ln.get("placement-topleft");a.h.topleft=b;b=k.ln.get("placement-topright");a.h.topright=b;b=k.ln.get("placement-bottom");a.h.bottom=b;b=k.ln.get("placement-bottomleft");a.h.bottomleft=b;b=k.ln.get("placement-bottomright");a.h.bottomright=b;b=k.ln.get("placement-absolute");a.h.absolute=b;this._mnPlacement=a;this.groups.push(new Xf(k.ln.get("window-acbmovie-title"),[{n:k.ln.get("acinfo-movieload"),a:"movie.load",p:[{t:"s",n:k.ln.get("acinfo-movieload-p1"),
v:"movies"}],e:[]},{n:k.ln.get("acinfo-sceneload"),a:"scene.load",p:[{t:"s",n:k.ln.get("acinfo-sceneload-p1"),v:"scenes"}],e:[]},{n:k.ln.get("acinfo-scenehistoryback"),a:"scene.historyback",p:[],e:[]},{n:k.ln.get("acinfo-scenenavigate"),a:"scene.navigate",p:[{t:"s",n:k.ln.get("acinfo-scenenavigate-p1"),v:"navigation"}],e:[]},{n:k.ln.get("acinfo-scenepause"),a:"scene.pause",p:[],e:[]},{n:k.ln.get("acinfo-sceneplay"),a:"scene.play",p:[],e:[]},{n:k.ln.get("acinfo-sceneplaypause"),a:"scene.playpause",
p:[],e:[]},{n:k.ln.get("acinfo-scenenextkf"),a:"scene.nextkeyframe",p:[],e:[]},{n:k.ln.get("acinfo-scenepreviouskf"),a:"scene.previouskeyframe",p:[],e:[]},{n:k.ln.get("acinfo-scenefirstkf"),a:"scene.loadfirstkeyframe",p:[],e:[]},{n:k.ln.get("acinfo-scenelastkf"),a:"scene.loadlastkeyframe",p:[],e:[]},{n:k.ln.get("acinfo-sceneloadkf"),a:"scene.loadkeyframe",p:[{t:"i",n:k.ln.get("acinfo-sceneloadkf-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-sceneshake"),a:"scene.shake",p:[{t:"f",n:k.ln.get("acinfo-sceneshake-p1"),
v:""},{t:"f",n:k.ln.get("acinfo-sceneshake-p2"),v:""}],e:["end"]}]));this.groups.push(new Xf(k.ln.get("window-acbbool-title"),[{n:k.ln.get("acinfo-boolset"),a:"bool.set",p:[{t:"s",n:k.ln.get("acinfo-boolset-p1"),v:""},{t:"b",n:k.ln.get("acinfo-boolset-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-ifbool"),a:"if.bool",p:[{t:"b",n:k.ln.get("acinfo-ifbool-p1"),v:""},{t:"b",n:k.ln.get("acinfo-ifbool-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-boolsetinverse"),a:"bool.setinverse",p:[{t:"s",n:k.ln.get("acinfo-boolsetinverse-p1"),
v:""}],e:[]},{n:k.ln.get("acinfo-ifboolset"),a:"if.boolset",p:[{t:"s",n:k.ln.get("acinfo-ifboolset-p1"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-boolclear"),a:"bool.clear",p:[{t:"s",n:k.ln.get("acinfo-boolclear-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-boolclearall"),a:"bool.clearall",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbstring-title"),[{n:k.ln.get("acinfo-stringset"),a:"string.set",p:[{t:"s",n:k.ln.get("acinfo-stringset-p1"),v:""},{t:"e",n:k.ln.get("acinfo-stringset-p2"),v:""}],
e:[]},{n:k.ln.get("acinfo-stringconcat"),a:"string.concat",p:[{t:"s",n:k.ln.get("acinfo-stringconcat-p1"),v:""},{t:"",n:k.ln.get("acinfo-stringconcat-p2"),v:""},{t:"",n:k.ln.get("acinfo-stringconcat-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-stringreplace"),a:"string.replace",p:[{t:"s",n:k.ln.get("acinfo-stringreplace-p1"),v:""},{t:"s",n:k.ln.get("acinfo-stringreplace-p2"),v:""},{t:"s",n:k.ln.get("acinfo-stringreplace-p3"),v:""},{t:"s",n:k.ln.get("acinfo-stringreplace-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-stringclear"),
a:"string.clear",p:[{t:"s",n:k.ln.get("acinfo-stringclear-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-stringtoint"),a:"string.toint",p:[{t:"s",n:k.ln.get("acinfo-stringtoint-p1"),v:""},{t:"s",n:k.ln.get("acinfo-stringtoint-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-stringtofloat"),a:"string.tofloat",p:[{t:"s",n:k.ln.get("acinfo-stringtofloat-p1"),v:""},{t:"s",n:k.ln.get("acinfo-stringtofloat-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-stringsload"),a:"string.loadfile",p:[{t:"s",n:k.ln.get("acinfo-stringsload-p1"),
v:""}],e:["success","error"]},{n:k.ln.get("acinfo-stringsetgroup"),a:"string.setgroup",p:[{t:"s",n:k.ln.get("acinfo-stringsetgroup-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-stringclearall"),a:"string.clearall",p:[],e:[]},{n:k.ln.get("acinfo-stringsetglobal"),a:"string.setglobal",p:[{t:"s",n:k.ln.get("acinfo-stringsetglobal-p1"),v:""},{t:"s",n:k.ln.get("acinfo-stringsetglobal-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-stringclearglobal"),a:"string.clearglobal",p:[{t:"s",n:k.ln.get("acinfo-stringclearglobal-p1"),
v:""}],e:[]},{n:k.ln.get("acinfo-ifstringsequal"),a:"if.stringsequal",p:[{t:"s",n:k.ln.get("acinfo-ifstringsequal-p1"),v:""},{t:"s",n:k.ln.get("acinfo-ifstringsequal-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifstringsdifferent"),a:"if.stringsdifferent",p:[{t:"s",n:k.ln.get("acinfo-ifstringsdifferent-p1"),v:""},{t:"s",n:k.ln.get("acinfo-ifstringsdifferent-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifstringset"),a:"if.stringset",p:[{t:"s",n:k.ln.get("acinfo-ifstringset-p1"),v:""}],
e:["then","else"]},{n:k.ln.get("acinfo-ifstringcontains"),a:"if.stringcontains",p:[{t:"s",n:k.ln.get("acinfo-ifstringcontains-p1"),v:""},{t:"s",n:k.ln.get("acinfo-ifstringcontains-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifstringstartswith"),a:"if.stringstartswith",p:[{t:"s",n:k.ln.get("acinfo-ifstringstartswith-p1"),v:""},{t:"s",n:k.ln.get("acinfo-ifstringstartswith-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifstringendswith"),a:"if.stringendswith",p:[{t:"s",n:k.ln.get("acinfo-ifstringendswith-p1"),
v:""},{t:"s",n:k.ln.get("acinfo-ifstringendswith-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifstringemail"),a:"if.stringemail",p:[{t:"s",n:k.ln.get("acinfo-ifstringemail-p1"),v:""}],e:["then","else"]}]));this.groups.push(new Xf(k.ln.get("window-acbint-title"),[{n:k.ln.get("acinfo-intset"),a:"int.set",p:[{t:"s",n:k.ln.get("acinfo-intset-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intset-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-intsum"),a:"int.sum",p:[{t:"s",n:k.ln.get("acinfo-intsum-p1"),v:""},{t:"f",
n:k.ln.get("acinfo-intsum-p2"),v:""},{t:"f",n:k.ln.get("acinfo-intsum-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-intsubtract"),a:"int.subtract",p:[{t:"s",n:k.ln.get("acinfo-intsubtract-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intsubtract-p2"),v:""},{t:"f",n:k.ln.get("acinfo-intsubtract-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-intmultiply"),a:"int.multiply",p:[{t:"s",n:k.ln.get("acinfo-intmultiply-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intmultiply-p2"),v:""},{t:"f",n:k.ln.get("acinfo-intmultiply-p3"),v:""}],e:[]},
{n:k.ln.get("acinfo-intdivide"),a:"int.divide",p:[{t:"s",n:k.ln.get("acinfo-intdivide-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intdivide-p2"),v:""},{t:"f",n:k.ln.get("acinfo-intdivide-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-intmax"),a:"int.max",p:[{t:"s",n:k.ln.get("acinfo-intmax-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intmax-p2"),v:""},{t:"f",n:k.ln.get("acinfo-intmax-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-intmin"),a:"int.min",p:[{t:"s",n:k.ln.get("acinfo-intmin-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intmin-p2"),
v:""},{t:"f",n:k.ln.get("acinfo-intmin-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-intrandom"),a:"int.random",p:[{t:"s",n:k.ln.get("acinfo-intrandom-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intrandom-p2"),v:""},{t:"f",n:k.ln.get("acinfo-intrandom-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-intabs"),a:"int.abs",p:[{t:"s",n:k.ln.get("acinfo-intabs-p1"),v:""},{t:"f",n:k.ln.get("acinfo-intabs-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-intclear"),a:"int.clear",p:[{t:"s",n:k.ln.get("acinfo-intclear-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-intclearall"),
a:"int.clearall",p:[],e:[]},{n:k.ln.get("acinfo-inttofloat"),a:"int.tofloat",p:[{t:"s",n:k.ln.get("acinfo-inttofloat-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inttofloat-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-inttostring"),a:"int.tostring",p:[{t:"s",n:k.ln.get("acinfo-inttostring-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inttostring-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-ifintsequal"),a:"if.intsequal",p:[{t:"f",n:k.ln.get("acinfo-ifintsequal-p1"),v:""},{t:"f",n:k.ln.get("acinfo-ifintsequal-p2"),v:""}],e:["then",
"else"]},{n:k.ln.get("acinfo-ifintsdifferent"),a:"if.intsdifferent",p:[{t:"f",n:k.ln.get("acinfo-ifintsdifferent-p1"),v:""},{t:"f",n:k.ln.get("acinfo-ifintsdifferent-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifintgreater"),a:"if.intgreater",p:[{t:"f",n:k.ln.get("acinfo-ifintgreater-p1"),v:""},{t:"f",n:k.ln.get("acinfo-ifintgreater-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifintlower"),a:"if.intlower",p:[{t:"f",n:k.ln.get("acinfo-ifintlower-p1"),v:""},{t:"f",n:k.ln.get("acinfo-ifintlower-p2"),
v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifintgreaterequal"),a:"if.intgreaterequal",p:[{t:"f",n:k.ln.get("acinfo-ifintgreaterequal-p1"),v:""},{t:"f",n:k.ln.get("acinfo-ifintgreaterequal-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifintlowerequal"),a:"if.intlowerequal",p:[{t:"f",n:k.ln.get("acinfo-ifintlowerequal-p1"),v:""},{t:"f",n:k.ln.get("acinfo-ifintlowerequal-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-ifintset"),a:"if.intset",p:[{t:"s",n:k.ln.get("acinfo-ifintset-p1"),v:""}],
e:["then","else"]}]));this.groups.push(new Xf(k.ln.get("window-acbfloat-title"),[{n:k.ln.get("acinfo-floatset"),a:"float.set",p:[{t:"s",n:k.ln.get("acinfo-floatset-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floatset-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-floatsum"),a:"float.sum",p:[{t:"s",n:k.ln.get("acinfo-floatsum-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floatsum-p2"),v:""},{t:"f",n:k.ln.get("acinfo-floatsum-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-floatsubtract"),a:"float.subtract",p:[{t:"s",n:k.ln.get("acinfo-floatsubtract-p1"),
v:""},{t:"f",n:k.ln.get("acinfo-floatsubtract-p2"),v:""},{t:"f",n:k.ln.get("acinfo-floatsubtract-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-floatmultiply"),a:"float.multiply",p:[{t:"s",n:k.ln.get("acinfo-floatmultiply-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floatmultiply-p2"),v:""},{t:"f",n:k.ln.get("acinfo-floatmultiply-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-floatdivide"),a:"float.divide",p:[{t:"s",n:k.ln.get("acinfo-floatdivide-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floatdivide-p2"),v:""},{t:"f",n:k.ln.get("acinfo-floatdivide-p3"),
v:""}],e:[]},{n:k.ln.get("acinfo-floatmax"),a:"float.max",p:[{t:"s",n:k.ln.get("acinfo-floatmax-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floatmax-p2"),v:""},{t:"f",n:k.ln.get("acinfo-floatmax-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-floatmin"),a:"float.min",p:[{t:"s",n:k.ln.get("acinfo-floatmin-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floatmin-p2"),v:""},{t:"f",n:k.ln.get("acinfo-floatmin-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-floatrandom"),a:"float.random",p:[{t:"s",n:k.ln.get("acinfo-floatrandom-p1"),v:""},
{t:"f",n:k.ln.get("acinfo-floatrandom-p2"),v:""},{t:"f",n:k.ln.get("acinfo-floatrandom-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-floatabs"),a:"float.abs",p:[{t:"s",n:k.ln.get("acinfo-floatabs-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floatabs-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-floatclear"),a:"float.clear",p:[{t:"s",n:k.ln.get("acinfo-floatclear-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-floatclearall"),a:"float.clearall",p:[],e:[]},{n:k.ln.get("acinfo-floattoint"),a:"float.toint",p:[{t:"s",n:k.ln.get("acinfo-floattoint-p1"),
v:""},{t:"f",n:k.ln.get("acinfo-floattoint-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-floattostring"),a:"float.tostring",p:[{t:"s",n:k.ln.get("acinfo-floattostring-p1"),v:""},{t:"f",n:k.ln.get("acinfo-floattostring-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-iffloatsequal"),a:"if.floatsequal",p:[{t:"f",n:k.ln.get("acinfo-iffloatsequal-p1"),v:""},{t:"f",n:k.ln.get("acinfo-iffloatsequal-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-iffloatsdifferent"),a:"if.floatsdifferent",p:[{t:"f",n:k.ln.get("acinfo-iffloatsdifferent-p1"),
v:""},{t:"f",n:k.ln.get("acinfo-iffloatsdifferent-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-iffloatgreater"),a:"if.floatgreater",p:[{t:"f",n:k.ln.get("acinfo-iffloatgreater-p1"),v:""},{t:"f",n:k.ln.get("acinfo-iffloatgreater-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-iffloatlower"),a:"if.floatlower",p:[{t:"f",n:k.ln.get("acinfo-iffloatlower-p1"),v:""},{t:"f",n:k.ln.get("acinfo-iffloatlower-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-iffloatgreaterequal"),a:"if.floatgreaterequal",
p:[{t:"f",n:k.ln.get("acinfo-iffloatgreaterequal-p1"),v:""},{t:"f",n:k.ln.get("acinfo-iffloatgreaterequal-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-iffloatlowerequal"),a:"if.floatlowerequal",p:[{t:"f",n:k.ln.get("acinfo-iffloatlowerequal-p1"),v:""},{t:"f",n:k.ln.get("acinfo-iffloatlowerequal-p2"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-iffloatset"),a:"if.floatset",p:[{t:"s",n:k.ln.get("acinfo-iffloatset-p1"),v:""}],e:["then","else"]}]));this.groups.push(new Xf(k.ln.get("window-acbarray-title"),
[{n:k.ln.get("acinfo-arrayload"),a:"array.loadfile",p:[{t:"s",n:k.ln.get("acinfo-arrayload-p1"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-arraycreate"),a:"array.create",p:[{t:"s",n:k.ln.get("acinfo-arraycreate-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-arrayremove"),a:"array.remove",p:[{t:"s",n:k.ln.get("acinfo-arrayremove-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-arraypush"),a:"array.push",p:[{t:"s",n:k.ln.get("acinfo-arraypush-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraypush-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arrayset"),
a:"array.set",p:[{t:"s",n:k.ln.get("acinfo-arrayset-p1"),v:""},{t:"i",n:k.ln.get("acinfo-arrayset-p2"),v:""},{t:"s",n:k.ln.get("acinfo-arrayset-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-arrayget"),a:"array.get",p:[{t:"s",n:k.ln.get("acinfo-arrayget-p1"),v:""},{t:"i",n:k.ln.get("acinfo-arrayget-p2"),v:""},{t:"s",n:k.ln.get("acinfo-arrayget-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-arraygetint"),a:"array.getint",p:[{t:"s",n:k.ln.get("acinfo-arraygetint-p1"),v:""},{t:"i",n:k.ln.get("acinfo-arraygetint-p2"),
v:""},{t:"s",n:k.ln.get("acinfo-arraygetint-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-arraygetfloat"),a:"array.getfloat",p:[{t:"s",n:k.ln.get("acinfo-arraygetfloat-p1"),v:""},{t:"i",n:k.ln.get("acinfo-arraygetfloat-p2"),v:""},{t:"s",n:k.ln.get("acinfo-arraygetfloat-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-arraygetbool"),a:"array.getbool",p:[{t:"s",n:k.ln.get("acinfo-arraygetbool-p1"),v:""},{t:"i",n:k.ln.get("acinfo-arraygetbool-p2"),v:""},{t:"s",n:k.ln.get("acinfo-arraygetbool-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-arrayclear"),
a:"array.clear",p:[{t:"s",n:k.ln.get("acinfo-arrayclear-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-arraycurrent"),a:"array.current",p:[{t:"s",n:k.ln.get("acinfo-arraycurrent-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraycurrent-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraynext"),a:"array.next",p:[{t:"s",n:k.ln.get("acinfo-arraynext-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraynext-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arrayprevious"),a:"array.previous",p:[{t:"s",n:k.ln.get("acinfo-arrayprevious-p1"),v:""},{t:"s",
n:k.ln.get("acinfo-arrayprevious-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraycurrentint"),a:"array.currentint",p:[{t:"s",n:k.ln.get("acinfo-arraycurrentint-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraycurrentint-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraynextint"),a:"array.nextint",p:[{t:"s",n:k.ln.get("acinfo-arraynextint-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraynextint-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraypreviousint"),a:"array.previousint",p:[{t:"s",n:k.ln.get("acinfo-arraypreviousint-p1"),
v:""},{t:"s",n:k.ln.get("acinfo-arraypreviousint-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraycurrentfloat"),a:"array.currentfloat",p:[{t:"s",n:k.ln.get("acinfo-arraycurrentfloat-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraycurrentfloat-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraynextfloat"),a:"array.nextfloat",p:[{t:"s",n:k.ln.get("acinfo-arraynextfloat-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraynextfloat-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraypreviousfloat"),a:"array.previousfloat",p:[{t:"s",n:k.ln.get("acinfo-arraypreviousfloat-p1"),
v:""},{t:"s",n:k.ln.get("acinfo-arraypreviousfloat-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraycurrentbool"),a:"array.currentbool",p:[{t:"s",n:k.ln.get("acinfo-arraycurrentbool-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraycurrentbool-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraynextbool"),a:"array.nextbool",p:[{t:"s",n:k.ln.get("acinfo-arraynextbool-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraynextbool-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraypreviousbool"),a:"array.previousbool",p:[{t:"s",n:k.ln.get("acinfo-arraypreviousbool-p1"),
v:""},{t:"s",n:k.ln.get("acinfo-arraypreviousbool-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraysetindex"),a:"array.setindex",p:[{t:"s",n:k.ln.get("acinfo-arraysetindex-p1"),v:""},{t:"i",n:k.ln.get("acinfo-arraysetindex-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraygetindex"),a:"array.getindex",p:[{t:"s",n:k.ln.get("acinfo-arraygetindex-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arraygetindex-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arraytostring"),a:"array.tostring",p:[{t:"s",n:k.ln.get("acinfo-arraytostring-p1"),
v:""},{t:"s",n:k.ln.get("acinfo-arraytostring-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-arrayfromstring"),a:"array.fromstring",p:[{t:"s",n:k.ln.get("acinfo-arrayfromstring-p1"),v:""},{t:"s",n:k.ln.get("acinfo-arrayfromstring-p2"),v:""}],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbinstance-title"),[{n:k.ln.get("acinfo-instancemorezoom"),a:"instance.morezoom",p:[{t:"s",n:k.ln.get("acinfo-instancemorezoom-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancemorezoom-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancelesszoom"),
a:"instance.lesszoom",p:[{t:"s",n:k.ln.get("acinfo-instancelesszoom-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancelesszoom-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instanceclearzoom"),a:"instance.clearzoom",p:[{t:"s",n:k.ln.get("acinfo-instanceclearzoom-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancemoveup"),a:"instance.moveup",p:[{t:"s",n:k.ln.get("acinfo-instancemoveup-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancemoveup-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancemovedown"),
a:"instance.movedown",p:[{t:"s",n:k.ln.get("acinfo-instancemovedown-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancemovedown-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancemoveleft"),a:"instance.moveleft",p:[{t:"s",n:k.ln.get("acinfo-instancemoveleft-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancemoveleft-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancemoveright"),a:"instance.moveright",p:[{t:"s",n:k.ln.get("acinfo-instancemoveright-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancemoveright-p2"),
v:""}],e:[]},{n:k.ln.get("acinfo-instanceclearmove"),a:"instance.clearmove",p:[{t:"s",n:k.ln.get("acinfo-instanceclearmove-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancestartdrag"),a:"instance.startdrag",p:[{t:"s",n:k.ln.get("acinfo-instancestartdrag-p1"),v:"instances"}],e:["complete"]},{n:k.ln.get("acinfo-instancestopdrag"),a:"instance.stopdrag",p:[],e:[]},{n:k.ln.get("acinfo-instanceisoverlapping"),a:"instance.isoverlapping",p:[{t:"s",n:k.ln.get("acinfo-instanceisoverlapping-p1"),v:"instances"},
{t:"s",n:k.ln.get("acinfo-instanceisoverlapping-p2"),v:"instances"}],e:["then","else"]},{n:k.ln.get("acinfo-instancepause"),a:"instance.pause",p:[{t:"s",n:k.ln.get("acinfo-instancepause-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceplay"),a:"instance.play",p:[{t:"s",n:k.ln.get("acinfo-instanceplay-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceplaypause"),a:"instance.playpause",p:[{t:"s",n:k.ln.get("acinfo-instanceplaypause-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancestop"),
a:"instance.stop",p:[{t:"s",n:k.ln.get("acinfo-instancestop-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancenext"),a:"instance.next",p:[{t:"s",n:k.ln.get("acinfo-instancenext-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceprevious"),a:"instance.previous",p:[{t:"s",n:k.ln.get("acinfo-instanceprevious-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceseek"),a:"instance.seek",p:[{t:"s",n:k.ln.get("acinfo-instanceseek-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instanceseek-p2"),
v:""}],e:[]},{n:k.ln.get("acinfo-instancezoom"),a:"instance.zoom",p:[{t:"s",n:k.ln.get("acinfo-instancezoom-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancesetparagraph"),a:"instance.setparagraph",p:[{t:"s",n:k.ln.get("acinfo-instancesetparagraph-p1"),v:"instances"},{t:"s",n:k.ln.get("acinfo-instancesetparagraph-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instanceloadasset"),a:"instance.loadasset",p:[{t:"s",n:k.ln.get("acinfo-instanceloadasset-p1"),v:"instances"},{t:"s",n:k.ln.get("acinfo-instanceloadasset-p2"),
v:""}],e:[]},{n:k.ln.get("acinfo-instancesetx"),a:"instance.setx",p:[{t:"s",n:k.ln.get("acinfo-instancesetx-p1"),v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesetx-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesety"),a:"instance.sety",p:[{t:"s",n:k.ln.get("acinfo-instancesety-p1"),v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesety-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetwidth"),a:"instance.setwidth",p:[{t:"s",n:k.ln.get("acinfo-instancesetwidth-p1"),v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesetwidth-p2"),
v:""}],e:[]},{n:k.ln.get("acinfo-instancesetheight"),a:"instance.setheight",p:[{t:"s",n:k.ln.get("acinfo-instancesetheight-p1"),v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesetheight-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetvisible"),a:"instance.setvisible",p:[{t:"s",n:k.ln.get("acinfo-instancesetvisible-p1"),v:"instances"},{t:"b",n:k.ln.get("acinfo-instancesetvisible-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetalpha"),a:"instance.setalpha",p:[{t:"s",n:k.ln.get("acinfo-instancesetalpha-p1"),
v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesetalpha-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetwidth"),a:"instance.setwidth",p:[{t:"s",n:k.ln.get("acinfo-instancesetwidth-p1"),v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesetwidth-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetorder"),a:"instance.setorder",p:[{t:"s",n:k.ln.get("acinfo-instancesetorder-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancesetorder-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetcolor"),a:"instance.setcolor",
p:[{t:"s",n:k.ln.get("acinfo-instancesetcolor-p1"),v:"instances"},{t:"s",n:k.ln.get("acinfo-instancesetcolor-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetcoloralpha"),a:"instance.setcoloralpha",p:[{t:"s",n:k.ln.get("acinfo-instancesetcoloralpha-p1"),v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesetcoloralpha-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfont"),a:"instance.setfont",p:[{t:"s",n:k.ln.get("acinfo-instancesetfont-p1"),v:"instances"},{t:"s",n:k.ln.get("acinfo-instancesetfont-p2"),
v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfontsize"),a:"instance.setfontsize",p:[{t:"s",n:k.ln.get("acinfo-instancesetfontsize-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancesetfontsize-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfontalign"),a:"instance.setfontalign",p:[{t:"s",n:k.ln.get("acinfo-instancesetfontalign-p1"),v:"instances"},{t:"s",n:k.ln.get("acinfo-instancesetfontalign-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfontbackground"),a:"instance.setfontbackground",p:[{t:"s",
n:k.ln.get("acinfo-instancesetfontbackground-p1"),v:"instances"},{t:"e",n:k.ln.get("acinfo-instancesetfontbackground-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfontbold"),a:"instance.setfontbold",p:[{t:"s",n:k.ln.get("acinfo-instancesetfontbold-p1"),v:"instances"},{t:"b",n:k.ln.get("acinfo-instancesetfontbold-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfontitalic"),a:"instance.setfontitalic",p:[{t:"s",n:k.ln.get("acinfo-instancesetfontitalic-p1"),v:"instances"},{t:"b",n:k.ln.get("acinfo-instancesetfontitalic-p2"),
v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfontcolor"),a:"instance.setfontcolor",p:[{t:"s",n:k.ln.get("acinfo-instancesetfontcolor-p1"),v:"instances"},{t:"s",n:k.ln.get("acinfo-instancesetfontcolor-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetfontleading"),a:"instance.setfontleading",p:[{t:"s",n:k.ln.get("acinfo-instancesetfontleading-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancesetfontleading-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetvolume"),a:"instance.setvolume",p:[{t:"s",
n:k.ln.get("acinfo-instancesetvolume-p1"),v:"instances"},{t:"f",n:k.ln.get("acinfo-instancesetvolume-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancesetrotation"),a:"instance.setrotation",p:[{t:"s",n:k.ln.get("acinfo-instancesetrotation-p1"),v:"instances"},{t:"i",n:k.ln.get("acinfo-instancesetrotation-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-instancescrolldown"),a:"instance.scrolldown",p:[{t:"s",n:k.ln.get("acinfo-instancescrolldown-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancescrollup"),a:"instance.scrollup",
p:[{t:"s",n:k.ln.get("acinfo-instancescrollup-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancescrollbottom"),a:"instance.scrollbottom",p:[{t:"s",n:k.ln.get("acinfo-instancescrollbottom-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancescrolltop"),a:"instance.scrolltop",p:[{t:"s",n:k.ln.get("acinfo-instancescrolltop-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearall"),a:"instance.clearall",p:[{t:"s",n:k.ln.get("acinfo-instanceclearall-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearx"),
a:"instance.clearx",p:[{t:"s",n:k.ln.get("acinfo-instanceclearx-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instancecleary"),a:"instance.cleary",p:[{t:"s",n:k.ln.get("acinfo-instancecleary-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearwidth"),a:"instance.clearwidth",p:[{t:"s",n:k.ln.get("acinfo-instanceclearwidth-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearheight"),a:"instance.clearheight",p:[{t:"s",n:k.ln.get("acinfo-instanceclearheight-p1"),v:"instances"}],e:[]},
{n:k.ln.get("acinfo-instanceclearvisible"),a:"instance.clearvisible",p:[{t:"s",n:k.ln.get("acinfo-instanceclearvisible-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearalpha"),a:"instance.clearalpha",p:[{t:"s",n:k.ln.get("acinfo-instanceclearalpha-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearwidth"),a:"instance.clearwidth",p:[{t:"s",n:k.ln.get("acinfo-instanceclearwidth-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearorder"),a:"instance.clearorder",p:[{t:"s",
n:k.ln.get("acinfo-instanceclearorder-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearcolor"),a:"instance.clearcolor",p:[{t:"s",n:k.ln.get("acinfo-instanceclearcolor-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearcoloralpha"),a:"instance.clearcoloralpha",p:[{t:"s",n:k.ln.get("acinfo-instanceclearcoloralpha-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfont"),a:"instance.clearfont",p:[{t:"s",n:k.ln.get("acinfo-instanceclearfont-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfontsize"),
a:"instance.clearfontsize",p:[{t:"s",n:k.ln.get("acinfo-instanceclearfontsize-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfontalign"),a:"instance.clearfontalign",p:[{t:"s",n:k.ln.get("acinfo-instanceclearfontalign-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfontbackground"),a:"instance.clearfontbackground",p:[{t:"s",n:k.ln.get("acinfo-instanceclearfontbackground-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfontbold"),a:"instance.clearfontbold",p:[{t:"s",
n:k.ln.get("acinfo-instanceclearfontbold-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfontitalic"),a:"instance.clearfontitalic",p:[{t:"s",n:k.ln.get("acinfo-instanceclearfontitalic-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfontcolor"),a:"instance.clearfontcolor",p:[{t:"s",n:k.ln.get("acinfo-instanceclearfontcolor-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearfontleading"),a:"instance.clearfontleading",p:[{t:"s",n:k.ln.get("acinfo-instanceclearfontleading-p1"),
v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearvolume"),a:"instance.clearvolume",p:[{t:"s",n:k.ln.get("acinfo-instanceclearvolume-p1"),v:"instances"}],e:[]},{n:k.ln.get("acinfo-instanceclearrotation"),a:"instance.clearrotation",p:[{t:"s",n:k.ln.get("acinfo-instanceclearrotation-p1"),v:"instances"}],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbdata-title"),[{n:k.ln.get("acinfo-dataevent"),a:"data.event",p:[{t:"s",n:k.ln.get("acinfo-dataevent-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-dataeventclear"),
a:"data.eventclear",p:[],e:[]},{n:k.ln.get("acinfo-dataliststates"),a:"data.liststates",p:[],e:["success","error"]},{n:k.ln.get("acinfo-dataload"),a:"data.load",p:[{t:"s",n:k.ln.get("acinfo-dataload-p1"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-dataloadlocal"),a:"data.loadlocal",p:[{t:"s",n:k.ln.get("acinfo-dataloadlocal-p1"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-dataloadquickstate"),a:"data.loadquickstate",p:[],e:["success","error"]},{n:k.ln.get("acinfo-dataloadstatelocal"),
a:"data.loadstatelocal",p:[],e:["success","error"]},{n:k.ln.get("acinfo-datasave"),a:"data.save",p:[{t:"s",n:k.ln.get("acinfo-datasave-p1"),v:""},{t:"v",n:k.ln.get("acinfo-datasave-p2"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-datasavelocal"),a:"data.savelocal",p:[{t:"s",n:k.ln.get("acinfo-datasavelocal-p1"),v:""},{t:"v",n:k.ln.get("acinfo-datasavelocal-p2"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-datasavestate"),a:"data.savestate",p:[],e:["success","error"]},{n:k.ln.get("acinfo-datasavequickstate"),
a:"data.savequickstate",p:[],e:["success","error"]},{n:k.ln.get("acinfo-datasavestatelocal"),a:"data.savestatelocal",p:[],e:["success","error"]}]));this.groups.push(new Xf(k.ln.get("window-acbinput-title"),[{n:k.ln.get("acinfo-targetshow"),a:"target.show",p:[],e:[]},{n:k.ln.get("acinfo-targethide"),a:"target.hide",p:[],e:[]},{n:k.ln.get("acinfo-targettoggle"),a:"target.toggle",p:[],e:[]},{n:k.ln.get("acinfo-targetsetposition"),a:"target.setposition",p:[{t:"i",n:k.ln.get("acinfo-targetsetposition-p1"),
v:""},{t:"i",n:k.ln.get("acinfo-targetsetposition-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-targetclear"),a:"target.clear",p:[],e:[]},{n:k.ln.get("acinfo-targetset"),a:"target.set",p:[{t:"s",n:k.ln.get("acinfo-targetset-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-mousehide"),a:"mouse.hide",p:[],e:[]},{n:k.ln.get("acinfo-mouseshow"),a:"mouse.show",p:[],e:[]},{n:k.ln.get("acinfo-inputmessage"),a:"input.message",p:[{t:"s",n:k.ln.get("acinfo-inputmessage-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputmessage-p2"),v:""}],
e:["ok","cancel"]},{n:k.ln.get("acinfo-inputstring"),a:"input.string",p:[{t:"s",n:k.ln.get("acinfo-inputstring-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputstring-p2"),v:""}],e:["ok","cancel"]},{n:k.ln.get("acinfo-inputint"),a:"input.int",p:[{t:"s",n:k.ln.get("acinfo-inputint-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputint-p2"),v:""},{t:"i",n:k.ln.get("acinfo-inputint-p3"),v:""},{t:"i",n:k.ln.get("acinfo-inputint-p4"),v:""},{t:"i",n:k.ln.get("acinfo-inputint-p5"),v:""}],e:["ok","cancel"]},{n:k.ln.get("acinfo-inputfloat"),
a:"input.float",p:[{t:"s",n:k.ln.get("acinfo-inputfloat-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputfloat-p2"),v:""},{t:"f",n:k.ln.get("acinfo-inputfloat-p3"),v:""},{t:"f",n:k.ln.get("acinfo-inputfloat-p4"),v:""},{t:"f",n:k.ln.get("acinfo-inputfloat-p5"),v:""}],e:["ok","cancel"]},{n:k.ln.get("acinfo-inputlist"),a:"input.list",p:[{t:"s",n:k.ln.get("acinfo-inputlist-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputlist-p2"),v:""},{t:"s",n:k.ln.get("acinfo-inputlist-p3"),v:""},{t:"s",n:k.ln.get("acinfo-inputlist-p4"),
v:""}],e:["ok","cancel"]},{n:k.ln.get("acinfo-inputlogin"),a:"input.login",p:[],e:["ok","cancel"]},{n:k.ln.get("acinfo-inputemail"),a:"input.email",p:[{t:"s",n:k.ln.get("acinfo-inputemail-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputemail-p2"),v:""}],e:["ok","cancel"]},{n:k.ln.get("acinfo-inputadd"),a:"input.add",p:[{t:"s",n:k.ln.get("acinfo-inputadd-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inputadd-p2"),v:""},{t:"f",n:k.ln.get("acinfo-inputadd-p3"),v:""},{t:"f",n:k.ln.get("acinfo-inputadd-p4"),v:""},{t:"e",
n:k.ln.get("acinfo-inputadd-p5"),v:""}],e:[]},{n:k.ln.get("acinfo-inputplace"),a:"input.place",p:[{t:"s",n:k.ln.get("acinfo-inputplace-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inputplace-p2"),v:""},{t:"f",n:k.ln.get("acinfo-inputplace-p3"),v:""},{t:"f",n:k.ln.get("acinfo-inputplace-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-inputsettext"),a:"input.settext",p:[{t:"s",n:k.ln.get("acinfo-inputsettext-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputsettext-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-inputsetpassword"),a:"input.setpassword",
p:[{t:"s",n:k.ln.get("acinfo-inputsetpassword-p1"),v:""},{t:"b",n:k.ln.get("acinfo-inputsetpassword-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-inputremove"),a:"input.remove",p:[{t:"s",n:k.ln.get("acinfo-inputremove-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-inputremoveall"),a:"input.removeall",p:[],e:[]},{n:k.ln.get("acinfo-inputaddtarea"),a:"input.addtarea",p:[{t:"s",n:k.ln.get("acinfo-inputaddtarea-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inputaddtarea-p2"),v:""},{t:"f",n:k.ln.get("acinfo-inputaddtarea-p3"),
v:""},{t:"f",n:k.ln.get("acinfo-inputaddtarea-p4"),v:""},{t:"f",n:k.ln.get("acinfo-inputaddtarea-p5"),v:""}],e:[]},{n:k.ln.get("acinfo-inputplacetarea"),a:"input.placetarea",p:[{t:"s",n:k.ln.get("acinfo-inputplacetarea-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inputplacetarea-p2"),v:""},{t:"f",n:k.ln.get("acinfo-inputplacetarea-p3"),v:""},{t:"f",n:k.ln.get("acinfo-inputplacetarea-p4"),v:""},{t:"f",n:k.ln.get("acinfo-inputplacetarea-p5"),v:""}],e:[]},{n:k.ln.get("acinfo-inputsettextarea"),a:"input.settextarea",
p:[{t:"s",n:k.ln.get("acinfo-inputsettextarea-p1"),v:""},{t:"s",n:k.ln.get("acinfo-inputsettextarea-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-inputremovetarea"),a:"input.removetarea",p:[{t:"s",n:k.ln.get("acinfo-inputremovetarea-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-inputremovealltareas"),a:"input.removealltareas",p:[],e:[]},{n:k.ln.get("acinfo-inputaddnumeric"),a:"input.addnumeric",p:[{t:"s",n:k.ln.get("acinfo-inputaddnumeric-p1"),v:""},{t:"i",n:k.ln.get("acinfo-inputaddnumeric-p2"),v:""},{t:"i",n:k.ln.get("acinfo-inputaddnumeric-p3"),
v:""},{t:"i",n:k.ln.get("acinfo-inputaddnumeric-p4"),v:""},{t:"i",n:k.ln.get("acinfo-inputaddnumeric-p5"),v:""}],e:[]},{n:k.ln.get("acinfo-inputplacenumeric"),a:"input.placenumeric",p:[{t:"s",n:k.ln.get("acinfo-inputplacenumeric-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inputplacenumeric-p2"),v:""},{t:"f",n:k.ln.get("acinfo-inputplacenumeric-p3"),v:""},{t:"f",n:k.ln.get("acinfo-inputplacenumeric-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-inputsetnumeric"),a:"input.setnumeric",p:[{t:"s",n:k.ln.get("acinfo-inputsetnumeric-p1"),
v:""},{t:"i",n:k.ln.get("acinfo-inputsetnumeric-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-inputsetnumericbounds"),a:"input.setnumericbounds",p:[{t:"s",n:k.ln.get("acinfo-inputsetnumericbounds-p1"),v:""},{t:"f",n:k.ln.get("acinfo-inputsetnumericbounds-p2"),v:""},{t:"f",n:k.ln.get("acinfo-inputsetnumericbounds-p3"),v:""},{t:"f",n:k.ln.get("acinfo-inputsetnumericbounds-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-inputremovenumeric"),a:"input.removenumeric",p:[{t:"s",n:k.ln.get("acinfo-inputremovenumeric-p1"),
v:""}],e:[]},{n:k.ln.get("acinfo-inputremoveallnumerics"),a:"input.removeallnumerics",p:[],e:[]},{n:k.ln.get("acinfo-inputaddaddtoggle"),a:"input.addtoggle",p:[{t:"s",n:k.ln.get("acinfo-inputaddaddtoggle-p1"),v:""},{t:"b",n:k.ln.get("acinfo-inputaddaddtoggle-p2"),v:""},{t:"i",n:k.ln.get("acinfo-inputaddaddtoggle-p3"),v:""},{t:"i",n:k.ln.get("acinfo-inputaddaddtoggle-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-inputplacetoggle"),a:"input.placetoggle",p:[{t:"s",n:k.ln.get("acinfo-inputplacetoggle-p1"),v:""},
{t:"b",n:k.ln.get("acinfo-inputplacetoggle-p2"),v:""},{t:"i",n:k.ln.get("acinfo-inputplacetoggle-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-inputsettoggle"),a:"input.settoggle",p:[{t:"s",n:k.ln.get("acinfo-inputsettoggle-p1"),v:""},{t:"b",n:k.ln.get("acinfo-inputsettoggle-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-inputinverttoggle"),a:"input.inverttoggle",p:[{t:"s",n:k.ln.get("acinfo-inputinverttoggle-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-inputremovetoggle"),a:"input.removetoggle",p:[{t:"s",n:k.ln.get("acinfo-inputremovetoggle-p1"),
v:""}],e:[]},{n:k.ln.get("acinfo-inputrremovealltoggles"),a:"input.removealltoggles",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbsystem-title"),[{n:k.ln.get("acinfo-run"),a:"run",p:[{t:"s",n:k.ln.get("acinfo-run-p1"),v:""},{t:"e",n:k.ln.get("acinfo-run-p2"),v:""},{t:"e",n:k.ln.get("acinfo-run-p3"),v:""},{t:"e",n:k.ln.get("acinfo-run-p4"),v:""},{t:"e",n:k.ln.get("acinfo-run-p5"),v:""},{t:"e",n:k.ln.get("acinfo-run-p6"),v:""},{t:"e",n:k.ln.get("acinfo-run-p7"),v:""},{t:"e",n:k.ln.get("acinfo-run-p8"),
v:""}],e:[]},{n:k.ln.get("acinfo-snippetsload"),a:"snippets.load",p:[{t:"s",n:k.ln.get("acinfo-snippetsload-p1"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-snippetsunload"),a:"snippets.unload",p:[{t:"s",n:k.ln.get("acinfo-snippetsunload-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-systemfullscreen"),a:"system.fullscreen",p:[],e:[]},{n:k.ln.get("acinfo-systemopenembed"),a:"system.openembed",p:[{t:"s",n:k.ln.get("acinfo-systemopenembed-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-systemcloseembed"),a:"system.closeembed",
p:[],e:[]},{n:k.ln.get("acinfo-systemsembedplace"),a:"system.embedplace",p:[{t:"f",n:k.ln.get("acinfo-systemsembedplace-p1"),v:""},{t:"f",n:k.ln.get("acinfo-systemsembedplace-p2"),v:""},{t:"f",n:k.ln.get("acinfo-systemsembedplace-p3"),v:""},{t:"f",n:k.ln.get("acinfo-systemsembedplace-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-systemembedreset"),a:"system.embedreset",p:[],e:[]},{n:k.ln.get("acinfo-systemopenurl"),a:"system.openurl",p:[{t:"s",n:k.ln.get("acinfo-systemopenurl-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-systemcopytext"),
a:"system.copytext",p:[{t:"s",n:k.ln.get("acinfo-systemcopytext-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-systemifhorizontal"),a:"system.ifhorizontal",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemifvertical"),a:"system.ifvertical",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemifwebsite"),a:"system.ifwebsite",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemifpwa"),a:"system.ifpwa",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemifpwainstalled"),a:"system.ifpwainstalled",p:[],e:["then","else"]},
{n:k.ln.get("acinfo-systemifdesktop"),a:"system.ifdesktop",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemifmobile"),a:"system.ifmobile",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemifpublish"),a:"system.ifpublish",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemifplayer"),a:"system.ifplayer",p:[],e:["then","else"]},{n:k.ln.get("acinfo-systemvisitoringroup"),a:"system.visitoringroup",p:[{t:"s",n:k.ln.get("acinfo-systemvisitoringroup-p1"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-systemlogout"),
a:"system.logout",p:[],e:[]},{n:k.ln.get("acinfo-systemsendevent"),a:"system.sendevent",p:[{t:"s",n:k.ln.get("acinfo-systemsendevent-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-systemsetkftime"),a:"system.setkftime",p:[{t:"i",n:k.ln.get("acinfo-systemsetkftime-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-systemcalljs"),a:"system.calljs",p:[{t:"s",n:k.ln.get("acinfo-systemcalljs-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-cssset"),a:"css.set",p:[{t:"s",n:k.ln.get("acinfo-cssset-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-cssclear"),
a:"css.clear",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbtimer-title"),[{n:k.ln.get("acinfo-timerset"),a:"timer.set",p:[{t:"s",n:k.ln.get("acinfo-timerset-p1"),v:""},{t:"i",n:k.ln.get("acinfo-timerset-p2"),v:""},{t:"i",n:k.ln.get("acinfo-timerset-p3"),v:""}],e:["tick","end"]},{n:k.ln.get("acinfo-timerclear"),a:"timer.clear",p:[{t:"s",n:k.ln.get("acinfo-timerclear-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-timerclearall"),a:"timer.clearall",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbreplace-title"),
[{n:k.ln.get("acinfo-replaceorigin"),a:"replace.origin",p:[{t:"s",n:k.ln.get("acinfo-replaceorigin-p1"),v:"origins"}],e:[]},{n:k.ln.get("acinfo-replacesetstring"),a:"replace.setstring",p:[{t:"s",n:k.ln.get("acinfo-replacesetstring-p1"),v:""},{t:"s",n:k.ln.get("acinfo-replacesetstring-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-replacesetfile"),a:"replace.setfile",p:[{t:"s",n:k.ln.get("acinfo-replacesetfile-p1"),v:""},{t:"s",n:k.ln.get("acinfo-replacesetfile-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-replaceclearstring"),
a:"replace.clearstring",p:[{t:"s",n:k.ln.get("acinfo-replaceclearstring-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-replaceclearfile"),a:"replace.clearfile",p:[{t:"s",n:k.ln.get("acinfo-replaceclearfile-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-replaceclearallstrings"),a:"replace.clearallstrings",p:[],e:[]},{n:k.ln.get("acinfo-replaceclearallfiles"),a:"replace.clearallfiles",p:[],e:[]},{n:k.ln.get("acinfo-ifreplacestringset"),a:"if.replacestringset",p:[{t:"s",n:k.ln.get("acinfo-ifreplacestringset-p1"),v:""}],
e:["then","else"]},{n:k.ln.get("acinfo-ifreplacefileset"),a:"if.replacefileset",p:[{t:"s",n:k.ln.get("acinfo-ifreplacefileset-p1"),v:""}],e:["then","else"]}]));this.groups.push(new Xf(k.ln.get("window-acbcontraptions-title"),[{n:k.ln.get("acinfo-showmessage"),a:"contraption.message",p:[{t:"s",n:k.ln.get("acinfo-showmessage-p1"),v:""},{t:"s",n:k.ln.get("acinfo-showmessage-p2"),v:""},{t:"s",n:k.ln.get("acinfo-showmessage-p3"),v:""},{t:"s",n:k.ln.get("acinfo-showmessage-p4"),v:""}],e:["select"]},{n:k.ln.get("acinfo-hidemessage"),
a:"contraption.messagehide",p:[],e:[]},{n:k.ln.get("acinfo-showmenu"),a:"contraption.menu",p:[{t:"s",n:k.ln.get("acinfo-showmenu-p1"),v:""},{t:"s",n:k.ln.get("acinfo-showmenu-p2"),v:""},{t:"s",n:k.ln.get("acinfo-showmenu-p3"),v:""},{t:"s",n:k.ln.get("acinfo-showmenu-p4"),v:"placement"},{t:"i",n:k.ln.get("acinfo-showmenu-p5"),v:""},{t:"i",n:k.ln.get("acinfo-showmenu-p6"),v:""}],e:["select"]},{n:k.ln.get("acinfo-hidemenu"),a:"contraption.menuhide",p:[],e:[]},{n:k.ln.get("acinfo-showcover"),a:"contraption.cover",
p:[{t:"s",n:k.ln.get("acinfo-showcover-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-hidecover"),a:"contraption.coverhide",p:[],e:[]},{n:k.ln.get("acinfo-showbg"),a:"contraption.background",p:[{t:"s",n:k.ln.get("acinfo-showbg-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-hidebg"),a:"contraption.backgroundhide",p:[],e:[]},{n:k.ln.get("acinfo-showloading"),a:"contraption.showloading",p:[],e:[]},{n:k.ln.get("acinfo-hideloading"),a:"contraption.hideloading",p:[],e:[]},{n:k.ln.get("acinfo-musicplay"),a:"contraption.musicplay",
p:[{t:"s",n:k.ln.get("acinfo-musicplay-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-musicpause"),a:"contraption.musicpause",p:[],e:[]},{n:k.ln.get("acinfo-musicstop"),a:"contraption.musicstop",p:[],e:[]},{n:k.ln.get("acinfo-musicvolume"),a:"contraption.musicvolume",p:[{t:"i",n:k.ln.get("acinfo-musicvolume-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-soundplay"),a:"contraption.soundplay",p:[{t:"s",n:k.ln.get("acinfo-soundplay-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-soundpause"),a:"contraption.soundpause",p:[{t:"e",
n:k.ln.get("acinfo-soundpause-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-soundstop"),a:"contraption.soundstop",p:[{t:"e",n:k.ln.get("acinfo-soundstop-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-soundvolume"),a:"contraption.soundvolume",p:[{t:"i",n:k.ln.get("acinfo-soundvolume-p1"),v:""},{t:"e",n:k.ln.get("acinfo-soundvolume-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-showform"),a:"contraption.form",p:[{t:"s",n:k.ln.get("acinfo-showform-p1"),v:""},{t:"i",n:k.ln.get("acinfo-showform-p2"),v:""},{t:"i",n:k.ln.get("acinfo-showform-p3"),
v:""}],e:["ok","cancel"]},{n:k.ln.get("acinfo-setformvalue"),a:"contraption.formvalue",p:[{t:"s",n:k.ln.get("acinfo-setformvalue-p1"),v:""},{t:"s",n:k.ln.get("acinfo-setformvalue-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-setformstepper"),a:"contraption.formsetstepper",p:[{t:"s",n:k.ln.get("acinfo-setformstepper-p1"),v:""},{t:"i",n:k.ln.get("acinfo-setformstepper-p2"),v:""},{t:"i",n:k.ln.get("acinfo-setformstepper-p3"),v:""},{t:"i",n:k.ln.get("acinfo-setformstepper-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-hideform"),
a:"contraption.formhide",p:[],e:[]},{n:k.ln.get("acinfo-showinterf"),a:"contraption.interface",p:[{t:"s",n:k.ln.get("acinfo-showinterf-p1"),v:""},{t:"i",n:k.ln.get("acinfo-showinterf-p2"),v:""},{t:"i",n:k.ln.get("acinfo-showinterf-p3"),v:""}],e:[]},{n:k.ln.get("acinfo-hideinterf"),a:"contraption.interfacehide",p:[{t:"s",n:k.ln.get("acinfo-hideinterf-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-hideallinterf"),a:"contraption.interfacehideall",p:[],e:[]},{n:k.ln.get("acinfo-interftext"),a:"contraption.interfacetext",
p:[{t:"s",n:k.ln.get("acinfo-interftext-p1"),v:""},{t:"s",n:k.ln.get("acinfo-interftext-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-interfframe"),a:"contraption.interfaceanimframe",p:[{t:"s",n:k.ln.get("acinfo-interfframe-p1"),v:""},{t:"i",n:k.ln.get("acinfo-interfframe-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-interfplay"),a:"contraption.interfaceanimplay",p:[{t:"s",n:k.ln.get("acinfo-interfplay-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-interfpause"),a:"contraption.interfaceanimpause",p:[{t:"s",n:k.ln.get("acinfo-interfpause-p1"),
v:""}],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbnarrative-title"),[{n:k.ln.get("acinfo-invshow"),a:"inventory.show",p:[],e:["complete"]},{n:k.ln.get("acinfo-invclose"),a:"inventory.close",p:[],e:[]},{n:k.ln.get("acinfo-invaddkey"),a:"inventory.addkeyitem",p:[{t:"s",n:k.ln.get("acinfo-invaddkey-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invremkey"),a:"inventory.removekeyitem",p:[{t:"s",n:k.ln.get("acinfo-invremkey-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invclearkey"),a:"inventory.clearkeyitems",
p:[],e:[]},{n:k.ln.get("acinfo-invhaskey"),a:"inventory.haskeyitem",p:[{t:"s",n:k.ln.get("acinfo-invhaskey-p1"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-invaddcons"),a:"inventory.addconsumable",p:[{t:"s",n:k.ln.get("acinfo-invaddcons-p1"),v:""},{t:"i",n:k.ln.get("acinfo-invaddcons-p2"),v:""}],e:[]},{n:k.ln.get("acinfo-invremcons"),a:"inventory.removeconsumable",p:[{t:"s",n:k.ln.get("acinfo-invremcons-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invconsume"),a:"inventory.consumeitem",p:[{t:"s",n:k.ln.get("acinfo-invconsume-p1"),
v:""}],e:[]},{n:k.ln.get("acinfo-invclearcons"),a:"inventory.clearconsumables",p:[],e:[]},{n:k.ln.get("acinfo-invtostring"),a:"inventory.tostring",p:[{t:"s",n:k.ln.get("acinfo-invtostring-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invfromstring"),a:"inventory.fromstring",p:[{t:"s",n:k.ln.get("acinfo-invfromstring-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invtostringk"),a:"inventory.keytostring",p:[{t:"s",n:k.ln.get("acinfo-invtostringk-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invfromstringk"),a:"inventory.keyfromstring",
p:[{t:"s",n:k.ln.get("acinfo-invfromstringk-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invtostringc"),a:"inventory.constostring",p:[{t:"s",n:k.ln.get("acinfo-invtostringc-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-invfromstringc"),a:"inventory.consfromstring",p:[{t:"s",n:k.ln.get("acinfo-invfromstringc-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-battleshow"),a:"battle.show",p:[{t:"s",n:k.ln.get("acinfo-battleshow-p1"),v:""},{t:"s",n:k.ln.get("acinfo-battleshow-p2"),v:""}],e:["win","loose"]},{n:k.ln.get("acinfo-battleclose"),
a:"battle.close",p:[],e:[]},{n:k.ln.get("acinfo-battlesetattr"),a:"battle.setattribute",p:[{t:"i",n:k.ln.get("acinfo-battlesetattr-p1"),v:""},{t:"i",n:k.ln.get("acinfo-battlesetattr-p2"),v:""},{t:"i",n:k.ln.get("acinfo-battlesetattr-p3"),v:""},{t:"i",n:k.ln.get("acinfo-battlesetattr-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-battlesetoppo"),a:"battle.setopponent",p:[{t:"i",n:k.ln.get("acinfo-battlesetoppo-p1"),v:""},{t:"i",n:k.ln.get("acinfo-battlesetoppo-p2"),v:""},{t:"i",n:k.ln.get("acinfo-battlesetoppo-p3"),
v:""},{t:"i",n:k.ln.get("acinfo-battlesetoppo-p4"),v:""}],e:[]},{n:k.ln.get("acinfo-diagloadgroup"),a:"dialogue.loadgroup",p:[{t:"s",n:k.ln.get("acinfo-diagloadgroup-p1"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-diagstart"),a:"dialogue.start",p:[{t:"s",n:k.ln.get("acinfo-diagstart-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-diagnext"),a:"dialogue.next",p:[],e:[]},{n:k.ln.get("acinfo-diagprevious"),a:"dialogue.previous",p:[],e:[]},{n:k.ln.get("acinfo-diaglast"),a:"dialogue.last",p:[],e:[]},{n:k.ln.get("acinfo-diagfirst"),
a:"dialogue.first",p:[],e:[]},{n:k.ln.get("acinfo-diagclose"),a:"dialogue.close",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbruntime-title"),[{n:k.ln.get("acinfo-runinstall"),a:"runtime.install",p:[],e:[]},{n:k.ln.get("acinfo-runquit"),a:"runtime.quit",p:[],e:[]},{n:k.ln.get("acinfo-runsavedata"),a:"runtime.savedata",p:[{t:"s",n:k.ln.get("acinfo-runsavedata-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-runloaddata"),a:"runtime.loaddata",p:[{t:"s",n:k.ln.get("acinfo-runloaddata-p1"),v:""}],e:["success",
"error"]},{n:k.ln.get("acinfo-runifdataexist"),a:"runtime.ifdataexist",p:[{t:"s",n:k.ln.get("acinfo-runifdataexist-p1"),v:""}],e:["then","else"]},{n:k.ln.get("acinfo-runbrowser"),a:"runtime.ifbrowser",p:[],e:["then","else"]},{n:k.ln.get("acinfo-startkiosk"),a:"runtime.startkiosk",p:[],e:[]},{n:k.ln.get("acinfo-endkiosk"),a:"runtime.endkiosk",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbserver-title"),[{n:k.ln.get("acinfo-callprocess"),a:"call.process",p:[{t:"s",n:k.ln.get("acinfo-callprocess-p1"),
v:""},{t:"s",n:k.ln.get("acinfo-callprocess-p2"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-callsdprocess"),a:"call.sdprocess",p:[{t:"s",n:k.ln.get("acinfo-callsdprocess-p1"),v:""},{t:"s",n:k.ln.get("acinfo-callsdprocess-p2"),v:""}],e:["success","error"]},{n:k.ln.get("acinfo-callurl"),a:"call.url",p:[{t:"s",n:k.ln.get("acinfo-callurl-p1"),v:""},{t:"e",n:k.ln.get("acinfo-callurl-p2"),v:""}],e:["success","error"]}]));this.groups.push(new Xf(k.ln.get("window-acbdebug-title"),[{n:k.ln.get("acinfo-debugtrace"),
a:"trace",p:[{t:"s",n:k.ln.get("acinfo-debugtrace-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-debugtracebools"),a:"trace.bools",p:[],e:[]},{n:k.ln.get("acinfo-debugtraceints"),a:"trace.ints",p:[],e:[]},{n:k.ln.get("acinfo-debugtracefloats"),a:"trace.floats",p:[],e:[]},{n:k.ln.get("acinfo-debugtracestrings"),a:"trace.strings",p:[],e:[]},{n:k.ln.get("acinfo-debuginfoshow"),a:"debuginfo.show",p:[],e:[]},{n:k.ln.get("acinfo-debuginfohide"),a:"debuginfo.hide",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbanalytics-title"),
[{n:k.ln.get("acinfo-analyticsevent"),a:"analytics.event",p:[{t:"s",n:k.ln.get("acinfo-analyticsevent-p1"),v:""},{t:"s",n:k.ln.get("acinfo-analyticsevent-p2"),v:""}],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acbshare-title"),[{n:k.ln.get("acinfo-sharefacebook"),a:"share.facebook",p:[],e:[]},{n:k.ln.get("acinfo-sharelinkedin"),a:"share.linkedin",p:[],e:[]},{n:k.ln.get("acinfo-sharepinterest"),a:"share.pinterest",p:[],e:[]},{n:k.ln.get("acinfo-sharereddit"),a:"share.reddit",p:[],e:[]},{n:k.ln.get("acinfo-sharex"),
a:"share.x",p:[],e:[]}]));this.groups.push(new Xf(k.ln.get("window-acboverlay-title"),[{n:k.ln.get("acinfo-overlayshow"),a:"overlay.show",p:[{t:"s",n:k.ln.get("acinfo-overlayshow-p1"),v:""},{t:"e",n:k.ln.get("acinfo-overlayshow-p2"),v:""},{t:"b",n:k.ln.get("acinfo-overlayshow-p3"),v:""},{t:"e",n:k.ln.get("acinfo-overlayshow-p4"),v:""}],e:["success","error"]}]))};t["com.tilbuci.script.ActionInfo"]=Zv;Zv.__name__="com.tilbuci.script.ActionInfo";Zv.prototype={groups:null,movies:null,selMovies:null,scenes:null,
selScenes:null,_lastUpdate:null,_mvOrigins:null,_scDirections:null,_mnPlacement:null,getAcName:function(a){for(var b=0,c=this.groups;b<c.length;){var d=c[b];++b;Object.prototype.hasOwnProperty.call(d.actions.h,a)&&(a=d.actions.h[a].n)}return a},getNumParams:function(a){for(var b=0,c=0,d=this.groups;c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(f.actions.h,a)&&(b=f.actions.h[a].p.length)}return b},getParamLine:function(a,b){for(var c="",d=0,f=this.groups;d<f.length;){var g=f[d];
++d;if(Object.prototype.hasOwnProperty.call(g.actions.h,a)&&g.actions.h[a].p.length>0){for(var h=[],n=0,l=g.actions.h[a].p.length;n<l;){var q=n++;b.length>q&&b[q]!=""&&(g.actions.h[a].p[q].v=="movies"?h.push(this.getMovieName(b[q])):g.actions.h[a].p[q].v=="scenes"?h.push(this.getSceneName(b[q])):g.actions.h[a].p[q].v=="origins"?Object.prototype.hasOwnProperty.call(this._mvOrigins.h,b[q])?h.push(this._mvOrigins.h[b[q]]):h.push(b[q]):g.actions.h[a].p[q].v=="navigation"?Object.prototype.hasOwnProperty.call(this._scDirections.h,
b[q])?h.push(this._scDirections.h[b[q]]):h.push(b[q]):g.actions.h[a].p[q].v=="placement"?Object.prototype.hasOwnProperty.call(this._mnPlacement.h,b[q])?h.push(this._mnPlacement.h[b[q]]):h.push(b[q]):h.push(b[q]))}h.length>0&&(c=" ("+h.join(", ")+")")}}return c},getAcParam:function(a,b,c){for(var d="#"+(b+1)+": ",f="",g=0,h=this.groups;g<h.length;){var n=h[g];++g;Object.prototype.hasOwnProperty.call(n.actions.h,a)&&n.actions.h[a].p.length>b&&(d=n.actions.h[a].p[b].n+": ",f=n.actions.h[a].p[b].v)}if(c!=
null)switch(f){case "movies":d+=this.getMovieName(c);break;case "navigation":d=Object.prototype.hasOwnProperty.call(this._scDirections.h,c)?d+this._scDirections.h[c]:d+c;break;case "origins":d=Object.prototype.hasOwnProperty.call(this._mvOrigins.h,c)?d+this._mvOrigins.h[c]:d+c;break;case "placement":d=Object.prototype.hasOwnProperty.call(this._mnPlacement.h,c)?d+this._mnPlacement.h[c]:d+c;break;case "scenes":d+=this.getSceneName(c);break;default:d+=c}return d},getExtra1:function(a){for(var b="",c=
0,d=this.groups;c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(f.actions.h,a)&&f.actions.h[a].e.length>0&&(b=f.actions.h[a].e[0])}return b},getExtra2:function(a){for(var b="",c=0,d=this.groups;c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(f.actions.h,a)&&f.actions.h[a].e.length>1&&(b=f.actions.h[a].e[1])}return b},getMovieName:function(a){Object.prototype.hasOwnProperty.call(this.movies.h,a)&&(a=this.movies.h[a]);return a},getSceneName:function(a){Object.prototype.hasOwnProperty.call(this.scenes.h,
a)&&(a=this.scenes.h[a]);return a},loadInfo:function(a){a==null&&(a=!1);if(a){this._lastUpdate=(new Date).getTime();a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.id=c;a.send("Movie/AcInfo",b,m(this,this.onInfo),0,!1)}else a=(new Date).getTime(),a-this._lastUpdate>6E5&&(this._lastUpdate=a,a=k.ws,b=new G,c=p.movie.get_mvId(),b.h.id=c,a.send("Movie/AcInfo",b,m(this,this.onInfo),0,!1))},onInfo:function(a,b){if(a&&b.map.h.e==0){if(Object.prototype.hasOwnProperty.call(b.map.h,"movies")){a=this.movies.h;for(var c=
Object.keys(a),d=c.length,f=0;f<d;){a=c[f++];var g=this.movies;Object.prototype.hasOwnProperty.call(g.h,a)&&delete g.h[a]}for(;this.selMovies.length>0;)this.selMovies.shift();c=0;for(d=y.fields(b.map.h.movies);c<d.length;)a=d[c],++c,a=y.field(b.map.h.movies,a),this.selMovies.push({text:a.title,value:a.id}),f=a.title,this.movies.h[a.id]=f}if(Object.prototype.hasOwnProperty.call(b.map.h,"scenes")){a=this.scenes.h;c=Object.keys(a);d=c.length;for(f=0;f<d;)a=c[f++],g=this.scenes,Object.prototype.hasOwnProperty.call(g.h,
a)&&delete g.h[a];for(;this.selScenes.length>0;)this.selScenes.shift();c=0;for(d=y.fields(b.map.h.scenes);c<d.length;)a=d[c],++c,a=y.field(b.map.h.scenes,a),this.selScenes.push({text:a.title,value:a.id}),f=a.title,this.scenes.h[a.id]=f}}},__class__:Zv};var Xf=function(a,b){this.actions=new G;this.name="";this.name=a;a=0;for(var c=y.fields(b);a<c.length;){var d=c[a];++a;var f=y.field(b,d);d=this.actions;var g=f.a;f=new Qs(f);d.h[g]=f}};t["com.tilbuci.script.ActionInfoGroup"]=Xf;Xf.__name__="com.tilbuci.script.ActionInfoGroup";
Xf.prototype={name:null,actions:null,__class__:Xf};var Qs=function(a){this.e=[];this.p=[];this.a=this.n="";this.a=a.a;this.n=a.n;for(var b=0,c=y.fields(a.p);b<c.length;){var d=c[b];++b;this.p.push(new qw(y.field(a.p,d)))}this.e=a.e};t["com.tilbuci.script.ActionInfoAc"]=Qs;Qs.__name__="com.tilbuci.script.ActionInfoAc";Qs.prototype={a:null,n:null,p:null,e:null,__class__:Qs};var qw=function(a){this.n=this.v="";this.t="s";this.t=a.t;this.n=a.n;this.v=a.v};t["com.tilbuci.script.ActionInfoParam"]=qw;qw.__name__=
"com.tilbuci.script.ActionInfoParam";qw.prototype={t:null,n:null,v:null,__class__:qw};var rw=function(a,b,c,d,f){this.name=a;this._steps=c;this._current=0;this._action=d;this._acend=f;this._timer=new Gc(b);this._timer.run=m(this,this.runAction)};t["com.tilbuci.script.ActionTimer"]=rw;rw.__name__="com.tilbuci.script.ActionTimer";rw.prototype={name:null,_timer:null,_action:null,_acend:null,_current:null,_steps:null,clear:function(){try{this._timer.stop()}catch(a){}this._action=this._acend=this.name=
this._timer=null},runAction:function(){this._action!=null&&p.mode!="editor"&&p.parser.run(this._action,!0);this._current++;this._current>=this._steps&&(this._acend!=null&&p.mode!="editor"&&p.parser.run(this._acend,!0),this.clear())},__class__:rw};var vf=function(a,b,c){this._actions=new G;this._idbuttons=new G;ea.call(this,a,b,800,Bc.pickValue(700,710),!1);a=this._idbuttons;var d=new Rc("btCopy",m(this,this.onCopy),k.ln.get("window-acvariable-create"),Z.getBitmapData("btCopy"));a.h.btCopy=d;a=this._idbuttons;
d=new Rc("btShow",m(this,this.onShow),k.ln.get("window-acvariable-show"));a.h.btShow=d;a=this._idbuttons;d=new Rc("ggeneral",m(this,this.onGeneral),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"));a.h.ggeneral=d;a=this._idbuttons;d=new Rc("instance",m(this,this.onInstance),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"));a.h.ginstance=d;a=this._idbuttons;d=new Rc("movie",m(this,this.onMovie),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"));a.h.gmovie=d;d=a=this.ui;var f=
{tp:"Label",id:"params",tx:k.ln.get("window-acvariable-param"),vr:""},g={tp:"Custom",cont:this._idbuttons.h.btCopy},h={tp:"Custom",cont:this._idbuttons.h.btShow},n=k.ln.get("window-actions-close");c=d.forge("left",[{tp:"Label",id:"list",tx:c,vr:""},{tp:"List",id:"list",vl:[],sl:[],ht:195},f,{tp:"TInput",id:"p1",tx:""},{tp:"TInput",id:"p2",tx:""},{tp:"TInput",id:"p3",tx:""},{tp:"TInput",id:"p4",tx:""},{tp:"TInput",id:"p5",tx:""},{tp:"TInput",id:"p6",tx:""},{tp:"TInput",id:"p7",tx:""},g,h,{tp:"Button",
id:"close",tx:n,ac:m(this,this.onClose)}]);d=this.ui;f={tp:"Label",id:"ggeneral",tx:k.ln.get("window-globals-general"),vr:""};g={tp:"List",id:"ggeneral",vl:[{text:k.ln.get("window-globals-playing"),value:"?_PLAYING",asset:"btBool"},{text:k.ln.get("window-globals-server"),value:"?_SERVER",asset:"btBool"},{text:k.ln.get("window-globals-userlogged"),value:"?_USERLOGGED",asset:"btBool"},{text:k.ln.get("window-globals-hadinteraction"),value:"?_HADINTERACTION",asset:"btBool"},{text:k.ln.get("window-globals-keyframe"),
value:"#_KEYFRAME",asset:"btFloat"},{text:k.ln.get("window-globals-areabig"),value:"#_AREABIG",asset:"btFloat"},{text:k.ln.get("window-globals-areasmall"),value:"#_AREASMALL",asset:"btFloat"},{text:k.ln.get("window-globals-contentx"),value:"#_CONTENTX",asset:"btFloat"},{text:k.ln.get("window-globals-contenty"),value:"#_CONTENTY",asset:"btFloat"},{text:k.ln.get("window-globals-contentwidth"),value:"#_CONTENTWIDTH",asset:"btFloat"},{text:k.ln.get("window-globals-contentheight"),value:"#_CONTENTHEIGHT",
asset:"btFloat"},{text:k.ln.get("window-globals-movietitle"),value:"$_MOVIETITLE",asset:"btString"},{text:k.ln.get("window-globals-movieid"),value:"$_MOVIEID",asset:"btString"},{text:k.ln.get("window-globals-scenetitle"),value:"$_SCENETITLE",asset:"btString"},{text:k.ln.get("window-globals-sceneid"),value:"$_SCENEID",asset:"btString"},{text:k.ln.get("window-globals-orientation"),value:"$_ORIENTATION",asset:"btString"},{text:k.ln.get("window-globals-urlmovie"),value:"$_URLMOVIE",asset:"btString"},
{text:k.ln.get("window-globals-urlscene"),value:"$_URLSCENE",asset:"btString"},{text:k.ln.get("window-globals-username"),value:"$_USERNAME",asset:"btString"},{text:k.ln.get("window-globals-runtime"),value:"$_RUNTIME",asset:"btString"},{text:k.ln.get("window-globals-wsserver"),value:"$_WSSERVER",asset:"btString"},{text:k.ln.get("window-globals-version"),value:"$_VERSION",asset:"btString"},{text:k.ln.get("window-globals-session"),value:"$_SESSION",asset:"btString"},{text:k.ln.get("window-globals-date"),
value:"$_DATE",asset:"btString"},{text:k.ln.get("window-globals-time"),value:"$_TIME",asset:"btString"},{text:k.ln.get("window-globals-year"),value:"$_YEAR",asset:"btString"},{text:k.ln.get("window-globals-month"),value:"$_MONTH",asset:"btString"},{text:k.ln.get("window-globals-day"),value:"$_DAY",asset:"btString"},{text:k.ln.get("window-globals-hour"),value:"$_HOUR",asset:"btString"},{text:k.ln.get("window-globals-minute"),value:"$_MINUTE",asset:"btString"},{text:k.ln.get("window-globals-second"),
value:"$_SECOND",asset:"btString"}],sl:[],ht:184};h={tp:"Custom",cont:this._idbuttons.h.ggeneral};n={tp:"Label",id:"ginstance",tx:k.ln.get("window-globals-instance"),vr:""};var l={tp:"Label",id:"ginstancep",tx:k.ln.get("window-globals-instancep"),vr:ia.VARIANT_DETAIL},q={tp:"Select",id:"ginstancep",vl:[{text:k.ln.get("window-globals-instplaying"),value:"?_INSTANCEPLAYING:"},{text:k.ln.get("window-globals-instvisible"),value:"?_INSTANCEVISIBLE:"},{text:k.ln.get("window-globals-instfontbold"),value:"?_INSTANCEFONTBOLD:"},
{text:k.ln.get("window-globals-instfontitalic"),value:"?_INSTANCEFONTITALIC:"},{text:k.ln.get("window-acinstance-px"),value:"#_INSTANCEX:"},{text:k.ln.get("window-acinstance-py"),value:"#_INSTANCEY:"},{text:k.ln.get("window-acinstance-pwidth"),value:"#_INSTANCEWIDTH:"},{text:k.ln.get("window-acinstance-pheight"),value:"#_INSTANCEHEIGHT:"},{text:k.ln.get("window-acinstance-palpha"),value:"#_INSTANCEALPHA:"},{text:k.ln.get("window-acinstance-pvolume"),value:"#_INSTANCEVOLUME:"},{text:k.ln.get("window-acinstance-porder"),
value:"#_INSTANCEORDER:"},{text:k.ln.get("window-acinstance-pcoloralpha"),value:"#_INSTANCECOLORALPHA:"},{text:k.ln.get("window-acinstance-pfontsize"),value:"#_INSTANCEFONTSIZE:"},{text:k.ln.get("window-acinstance-pfontleading"),value:"#_INSTANCEFONTLEADING:"},{text:k.ln.get("window-acinstance-pcolor"),value:"$_INSTANCECOLOR:"},{text:k.ln.get("window-globals-insttext"),value:"$_INSTANCETEXT:"},{text:k.ln.get("window-acinstance-pfont"),value:"$_INSTANCEFONT:"},{text:k.ln.get("window-acinstance-pfontcolor"),
value:"$_INSTANCEFONTCOLOR:"}],sl:[]},u={tp:"Label",id:"ginstancen",tx:k.ln.get("window-globals-instancen"),vr:ia.VARIANT_DETAIL},v={tp:"Custom",cont:this._idbuttons.h.ginstance},z={tp:"Label",id:"gmovie",tx:k.ln.get("window-globals-movie"),vr:""},r={tp:"Select",id:"gmovie",vl:[{text:k.ln.get("window-globals-text"),value:"$_TEXTS:"},{text:k.ln.get("window-globals-number"),value:"#_NUMBERS:"},{text:k.ln.get("window-globals-flag"),value:"?_FLAGS:"},{text:k.ln.get("window-acinput-text"),value:"$_INPUT:"},
{text:k.ln.get("window-acform-text"),value:"$_FORM:"},{text:k.ln.get("window-acparam-text"),value:"$_PARAM:"},{text:k.ln.get("window-acnumeric-text"),value:"#_NUMERIC:"},{text:k.ln.get("window-actoggle-text"),value:"?_TOGGLE:"}],sl:[],ht:95},F=k.ln.get("window-globals-name");this.addForm(b,a.createColumnHolder("form",c,d.forge("right",[f,g,h,n,l,q,u,{tp:"Select",id:"ginstancen",vl:[],sl:[]},v,z,r,{tp:"Label",id:"gname",tx:F,vr:""},{tp:"TInput",id:"gname",tx:"",vr:""},{tp:"Custom",cont:this._idbuttons.h.gmovie}]),
this.ui.forge("bottom",[{tp:"Label",id:"showAction",tx:k.ln.get("window-globals-showaction"),vr:ia.VARIANT_DETAIL},{tp:"TInput",id:"showAction",tx:""}]),565));this.ui.listDbClick("list",m(this,this.onCopy));this.ui.setListToIcon("list");this.ui.setListToIcon("ggeneral")};t["com.tilbuci.script.AssistBase"]=vf;vf.__name__="com.tilbuci.script.AssistBase";vf.__super__=ea;vf.prototype=I(ea.prototype,{_idbuttons:null,_actions:null,setActions:function(a){this._actions=a;a=[];for(var b=Object.keys(this._actions.h),
c=b.length,d=0;d<c;){var f=b[d++];a.push({text:f,value:f,asset:this._actions.h[f].ic})}this.ui.setListValues("list",a)},acStart:function(){ea.prototype.acStart.call(this);this.ui.setListSelectValue("list",null);this.ui.inputs.h.p1.set_text("");this.ui.inputs.h.p2.set_text("");this.ui.inputs.h.p3.set_text("");this.ui.inputs.h.p4.set_text("");this.ui.inputs.h.p5.set_text("");this.ui.inputs.h.p6.set_text("");this.ui.inputs.h.p7.set_text("");this.ui.inputs.h.showAction.set_text("");for(var a=[],b=0,c=
p.area.getInstances();b<c.length;){var d=c[b];++b;a.push({text:d,value:d})}this.ui.setSelectOptions("ginstancen",a)},startInterface:function(a){ea.prototype.startInterface.call(this,a);a=Object.keys(this._idbuttons.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this._idbuttons.h[d].set_width(this.ui.buttons.h.close.get_width())}},onCopy:function(a){if(this.ui.lists.h.list.get_selectedItem()!=null&&(a=this.ui.lists.h.list.get_selectedItem().value,Object.prototype.hasOwnProperty.call(this._actions.h,
a))){var b='{ "ac": "'+a+'", ';b=this._actions.h[a].p.length==0?b+'"param": [ ] ':this._actions.h[a].p.length==1?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'" ]'):this._actions.h[a].p.length==2?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'" ]'):this._actions.h[a].p.length==3?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'" ]'):this._actions.h[a].p.length==4?b+('"param": [ "'+
this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'", "'+this.ui.inputs.h.p4.get_text()+'" ]'):this._actions.h[a].p.length==5?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'", "'+this.ui.inputs.h.p4.get_text()+'", "'+this.ui.inputs.h.p5.get_text()+'" ]'):this._actions.h[a].p.length==6?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+
'", "'+this.ui.inputs.h.p3.get_text()+'", "'+this.ui.inputs.h.p4.get_text()+'", "'+this.ui.inputs.h.p5.get_text()+'", "'+this.ui.inputs.h.p6.get_text()+'" ]'):b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'", "'+this.ui.inputs.h.p4.get_text()+'", "'+this.ui.inputs.h.p5.get_text()+'", "'+this.ui.inputs.h.p6.get_text()+'", "'+this.ui.inputs.h.p7.get_text()+'" ]');this._actions.h[a].c&&(b+=', "then": [ ], "else": [ ]');this._actions.h[a].t&&
(b+=', "tick": [ ], "end": [ ]');this._actions.h[a].i&&(b+=', "ok": [ ], "cancel": [ ]');this._actions.h[a].d&&(b+=', "success": [ ], "error": [ ]');this._actions.h[a].s&&(b+=', "select": [ ]');k.copyText(b+" }");Aa.removePopUp(this)}},onShow:function(a){if(this.ui.lists.h.list.get_selectedItem()!=null&&(a=this.ui.lists.h.list.get_selectedItem().value,Object.prototype.hasOwnProperty.call(this._actions.h,a))){var b='{ "ac": "'+a+'", ';b=this._actions.h[a].p.length==0?b+'"param": [ ] ':this._actions.h[a].p.length==
1?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'" ]'):this._actions.h[a].p.length==2?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'" ]'):this._actions.h[a].p.length==3?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'" ]'):this._actions.h[a].p.length==4?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+
'", "'+this.ui.inputs.h.p4.get_text()+'" ]'):this._actions.h[a].p.length==5?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'", "'+this.ui.inputs.h.p4.get_text()+'", "'+this.ui.inputs.h.p5.get_text()+'" ]'):this._actions.h[a].p.length==6?b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'", "'+this.ui.inputs.h.p4.get_text()+'", "'+this.ui.inputs.h.p5.get_text()+
'", "'+this.ui.inputs.h.p6.get_text()+'" ]'):b+('"param": [ "'+this.ui.inputs.h.p1.get_text()+'", "'+this.ui.inputs.h.p2.get_text()+'", "'+this.ui.inputs.h.p3.get_text()+'", "'+this.ui.inputs.h.p4.get_text()+'", "'+this.ui.inputs.h.p5.get_text()+'", "'+this.ui.inputs.h.p6.get_text()+'", "'+this.ui.inputs.h.p7.get_text()+'" ]');this._actions.h[a].c&&(b+=', "then": [ ], "else": [ ]');this._actions.h[a].t&&(b+=', "tick": [ ], "end": [ ]');this._actions.h[a].i&&(b+=', "ok": [ ], "cancel": [ ]');this._actions.h[a].d&&
(b+=', "success": [ ], "error": [ ]');this._actions.h[a].s&&(b+=', "select": [ ]');this.ui.inputs.h.showAction.set_text(b+" }")}},onGeneral:function(a){this.ui.lists.h.ggeneral.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.lists.h.ggeneral.get_selectedItem().value),k.copyText(this.ui.lists.h.ggeneral.get_selectedItem().value))},onInstance:function(a){this.ui.selects.h.ginstancep.get_selectedItem()!=null&&this.ui.selects.h.ginstancen.get_selectedItem()!=null&&(k.copyText(this.ui.selects.h.ginstancep.get_selectedItem().value+
this.ui.selects.h.ginstancen.get_selectedItem().value),this.ui.inputs.h.showAction.set_text(this.ui.selects.h.ginstancep.get_selectedItem().value+this.ui.selects.h.ginstancen.get_selectedItem().value))},onMovie:function(a){this.ui.selects.h.gmovie.get_selectedItem()!=null&&this.ui.inputs.h.gname.get_text()!=""&&(k.copyText(H.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()),this.ui.inputs.h.showAction.set_text(H.string(this.ui.selects.h.gmovie.get_selectedItem().value)+
this.ui.inputs.h.gname.get_text()))},onClose:function(a){Aa.removePopUp(this)},__class__:vf});var mr=function(a){vf.call(this,a,k.ln.get("window-contraptions-title"),k.ln.get("window-contraptions-list"));a=new G;a.h["contraption.message"]={p:["s","s","s","s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.messagehide"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.menu"]={p:"ssssii".split(""),c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.menuhide"]=
{p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.cover"]={p:["s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.coverhide"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.background"]={p:["s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.backgroundhide"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.showloading"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.hideloading"]={p:[],c:!1,
t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.musicplay"]={p:["s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.musicpause"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.musicstop"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.musicvolume"]={p:["i"],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.form"]={p:["s","i","i"],c:!1,t:!1,i:!0,d:!1,s:!0,ic:"icContraption"};a.h["contraption.formvalue"]={p:["s","s"],c:!1,
t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.formsetstepper"]={p:["s","i","i","i"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.formhide"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!1,ic:"icContraption"};a.h["contraption.interface"]={p:["s","i","i"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.interfacehide"]={p:["s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.interfacehideall"]={p:[],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.interfacetext"]=
{p:["s","s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.interfaceanimframe"]={p:["s","i"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.interfaceanimplay"]={p:["s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};a.h["contraption.interfaceanimpause"]={p:["s"],c:!1,t:!1,i:!1,d:!1,s:!0,ic:"icContraption"};this.setActions(a)};t["com.tilbuci.script.AssistContraptions"]=mr;mr.__name__="com.tilbuci.script.AssistContraptions";mr.__super__=vf;mr.prototype=I(vf.prototype,{__class__:mr});
var nr=function(a){vf.call(this,a,k.ln.get("window-acdata-title"),k.ln.get("window-acdata-list"));a=new G;a.h["data.event"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icData"};a.h["data.eventclear"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icData"};a.h["data.liststates"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.load"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.loadlocal"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.loadquickstate"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};
a.h["data.loadstatelocal"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.save"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.savelocal"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.savequickstate"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.savestate"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["data.savestatelocal"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icData"};a.h["target.show"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["target.hide"]=
{p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["target.toggle"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["target.setposition"]={p:["i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["target.clear"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["target.set"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["mouse.hide"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["mouse.show"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.email"]={p:["s","s"],s:!1,c:!1,t:!1,i:!0,d:!1,
ic:"icInput"};a.h["input.float"]={p:["s","s","f","f","f"],s:!1,c:!1,t:!1,i:!0,d:!1,ic:"icInput"};a.h["input.int"]={p:["s","s","i","i","i"],s:!1,c:!1,t:!1,i:!0,d:!1,ic:"icInput"};a.h["input.list"]={p:["s","s","s","s"],s:!1,c:!1,t:!1,i:!0,d:!1,ic:"icInput"};a.h["input.login"]={p:[],s:!1,c:!1,t:!1,i:!0,d:!1,ic:"icInput"};a.h["input.message"]={p:["s","s"],s:!1,c:!1,t:!1,i:!0,d:!1,ic:"icInput"};a.h["input.string"]={p:["s","s"],s:!1,c:!1,t:!1,i:!0,d:!1,ic:"icInput"};a.h["input.add"]={p:["s","i","i","i",
"s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.place"]={p:["s","i","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.remove"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.removeall"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.settext"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.addtarea"]={p:["s","i","i","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.placetarea"]={p:["s","i","i","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};
a.h["input.removetarea"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.removealltareas"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.settextarea"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.setpassword"]={p:["s","b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.addnumeric"]={p:["s","i","i","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.placenumeric"]={p:["s","i","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.removenumeric"]=
{p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.removeallnumerics"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.setnumeric"]={p:["s","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.setnumericbounds"]={p:["s","i","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.addtoggle"]={p:["s","b","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.placetoggle"]={p:["s","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.removetoggle"]={p:["s"],s:!1,c:!1,t:!1,
i:!1,d:!1,ic:"icInput"};a.h["input.removealltoggles"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.settoggle"]={p:["s","b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};a.h["input.inverttoggle"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icInput"};this.setActions(a)};t["com.tilbuci.script.AssistDataInput"]=nr;nr.__name__="com.tilbuci.script.AssistDataInput";nr.__super__=vf;nr.prototype=I(vf.prototype,{__class__:nr});var or=function(a){this._idbuttons=new G;ea.call(this,a,k.ln.get("window-acinstance-title"),
800,Bc.pickValue(630,690),!1);a=this._idbuttons;var b=new Rc("create",m(this,this.onCopy),k.ln.get("window-acinstance-create"),Z.getBitmapData("btCopy"));a.h.create=b;a=this._idbuttons;b=new Rc("btShow",m(this,this.onShow),k.ln.get("window-acvariable-show"));a.h.btShow=b;a=this._idbuttons;b=new Rc("cpasset",m(this,this.onAsset),k.ln.get("window-acinstance-cpasset"),Z.getBitmapData("btCopy"));a.h.cpasset=b;a=this._idbuttons;b=new Rc("ggeneral",m(this,this.onGeneral),k.ln.get("window-globals-get"),
Z.getBitmapData("btCopy"));a.h.ggeneral=b;a=this._idbuttons;b=new Rc("instance",m(this,this.onInstance),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"));a.h.ginstance=b;a=this._idbuttons;b=new Rc("movie",m(this,this.onMovie),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"));a.h.gmovie=b;a=k.ln.get("window-acinstance-title");var c=b=this.ui,d={tp:"Label",id:"list",tx:k.ln.get("window-acinstance-current"),vr:""},f={tp:"Label",id:"actions",tx:k.ln.get("window-acinstance-action"),vr:""},
g={tp:"Select",id:"actions",vl:[{text:k.ln.get("window-acinstance-set"),value:"set"},{text:k.ln.get("window-acinstance-clear"),value:"clear"},{text:k.ln.get("window-acinstance-clearall"),value:"clearall"},{text:k.ln.get("window-acinstance-play"),value:"play"},{text:k.ln.get("window-acinstance-pause"),value:"pause"},{text:k.ln.get("window-acinstance-stop"),value:"stop"},{text:k.ln.get("window-acinstance-next"),value:"next"},{text:k.ln.get("window-acinstance-previous"),value:"previous"},{text:k.ln.get("window-acinstance-seek"),
value:"seek"},{text:k.ln.get("window-acinstance-zoom"),value:"zoom"},{text:k.ln.get("window-acinstance-scrollbottom"),value:"scrollbottom"},{text:k.ln.get("window-acinstance-scrolltop"),value:"scrolltop"},{text:k.ln.get("window-acinstance-scrolldown"),value:"scrolldown"},{text:k.ln.get("window-acinstance-scrollup"),value:"scrollup"},{text:k.ln.get("window-acinstance-loasasset"),value:"loadasset"}],sl:null},h={tp:"Label",id:"property",tx:k.ln.get("window-acinstance-property"),vr:""},n={tp:"Select",
id:"property",vl:[{text:k.ln.get("window-acinstance-px"),value:"x"},{text:k.ln.get("window-acinstance-py"),value:"y"},{text:k.ln.get("window-acinstance-pwidth"),value:"width"},{text:k.ln.get("window-acinstance-pheight"),value:"height"},{text:k.ln.get("window-acinstance-palpha"),value:"alpha"},{text:k.ln.get("window-acinstance-porder"),value:"order"},{text:k.ln.get("window-acinstance-pvisible"),value:"visible"},{text:k.ln.get("window-acinstance-pcolor"),value:"color"},{text:k.ln.get("window-acinstance-pcoloralpha"),
value:"coloralpha"},{text:k.ln.get("window-acinstance-pfont"),value:"font"},{text:k.ln.get("window-acinstance-pfontsize"),value:"fontsize"},{text:k.ln.get("window-acinstance-pfontalign"),value:"fontalign"},{text:k.ln.get("window-acinstance-pfontbackground"),value:"fontbackground"},{text:k.ln.get("window-acinstance-pfontcolor"),value:"fontcolor"},{text:k.ln.get("window-acinstance-pfontbold"),value:"fontbold"},{text:k.ln.get("window-acinstance-pfontitalic"),value:"fontitalic"},{text:k.ln.get("window-acinstance-pfontleading"),
value:"fontleading"},{text:k.ln.get("window-acinstance-pparagraph"),value:"paragraph"},{text:k.ln.get("window-acinstance-pvolume"),value:"volume"},{text:k.ln.get("window-acinstance-protation"),value:"rotation"}],sl:null},l={tp:"Label",id:"horizontal",tx:k.ln.get("window-acinstance-horizontal"),vr:""},q={tp:"Label",id:"vertical",tx:k.ln.get("window-acinstance-vertical"),vr:""},u={tp:"Label",id:"other",tx:k.ln.get("window-acinstance-other"),vr:""},v={tp:"Custom",cont:this._idbuttons.h.create},z={tp:"Custom",
cont:this._idbuttons.h.btShow},r={tp:"Button",id:"close",tx:k.ln.get("window-actions-close"),ac:m(this,this.onClose)},F=k.ln.get("window-globals-showaction"),J=c.forge("left",[d,{tp:"List",id:"list",vl:[],sl:[],ht:108},f,g,h,n,l,{tp:"TInput",id:"horizontal",vl:"",vr:""},q,{tp:"TInput",id:"vertical",vl:"",vr:""},u,{tp:"TInput",id:"other",vl:"",vr:""},v,z,r,{tp:"Spacer",id:"showAction",ht:5,ln:!1},{tp:"Label",id:"showAction",tx:F,vr:ia.VARIANT_DETAIL},{tp:"TInput",id:"showAction",tx:""}]);c=this.ui;
d={tp:"Label",id:"collections",tx:k.ln.get("window-acinstance-collections"),vr:""};f={tp:"Label",id:"assets",tx:k.ln.get("window-acinstance-assets"),vr:""};g={tp:"Custom",cont:this._idbuttons.h.cpasset};h={tp:"Label",id:"ggeneral",tx:k.ln.get("window-globals-general"),vr:""};n={tp:"Select",id:"ggeneral",vl:[{text:k.ln.get("window-globals-playing"),value:"?_PLAYING",asset:"btBool"},{text:k.ln.get("window-globals-userlogged"),value:"?_USERLOGGED",asset:"btBool"},{text:k.ln.get("window-globals-hadinteraction"),
value:"?_HADINTERACTION",asset:"btBool"},{text:k.ln.get("window-globals-server"),value:"?_SERVER",asset:"btBool"},{text:k.ln.get("window-globals-keyframe"),value:"#_KEYFRAME",asset:"btFloat"},{text:k.ln.get("window-globals-areabig"),value:"#_AREABIG",asset:"btFloat"},{text:k.ln.get("window-globals-areasmall"),value:"#_AREASMALL",asset:"btFloat"},{text:k.ln.get("window-globals-contentx"),value:"#_CONTENTX",asset:"btFloat"},{text:k.ln.get("window-globals-contenty"),value:"#_CONTENTY",asset:"btFloat"},
{text:k.ln.get("window-globals-contentwidth"),value:"#_CONTENTWIDTH",asset:"btFloat"},{text:k.ln.get("window-globals-contentheight"),value:"#_CONTENTHEIGHT",asset:"btFloat"},{text:k.ln.get("window-globals-movietitle"),value:"$_MOVIETITLE",asset:"btString"},{text:k.ln.get("window-globals-movieid"),value:"$_MOVIEID",asset:"btString"},{text:k.ln.get("window-globals-scenetitle"),value:"$_SCENETITLE",asset:"btString"},{text:k.ln.get("window-globals-sceneid"),value:"$_SCENEID",asset:"btString"},{text:k.ln.get("window-globals-orientation"),
value:"$_ORIENTATION",asset:"btString"},{text:k.ln.get("window-globals-urlmovie"),value:"$_URLMOVIE",asset:"btString"},{text:k.ln.get("window-globals-urlscene"),value:"$_URLSCENE",asset:"btString"},{text:k.ln.get("window-globals-username"),value:"$_USERNAME",asset:"btString"},{text:k.ln.get("window-globals-runtime"),value:"$_RUNTIME",asset:"btString"},{text:k.ln.get("window-globals-wsserver"),value:"$_WSSERVER",asset:"btString"},{text:k.ln.get("window-globals-version"),value:"$_VERSION",asset:"btString"},
{text:k.ln.get("window-globals-session"),value:"$_SESSION",asset:"btString"},{text:k.ln.get("window-globals-date"),value:"$_DATE",asset:"btString"},{text:k.ln.get("window-globals-time"),value:"$_TIME",asset:"btString"},{text:k.ln.get("window-globals-year"),value:"$_YEAR",asset:"btString"},{text:k.ln.get("window-globals-month"),value:"$_MONTH",asset:"btString"},{text:k.ln.get("window-globals-day"),value:"$_DAY",asset:"btString"},{text:k.ln.get("window-globals-hour"),value:"$_HOUR",asset:"btString"},
{text:k.ln.get("window-globals-minute"),value:"$_MINUTE",asset:"btString"},{text:k.ln.get("window-globals-second"),value:"$_SECOND",asset:"btString"}],sl:[]};l={tp:"Custom",cont:this._idbuttons.h.ggeneral};q={tp:"Label",id:"ginstance",tx:k.ln.get("window-globals-instance"),vr:""};u={tp:"Label",id:"ginstancep",tx:k.ln.get("window-globals-instancep"),vr:ia.VARIANT_DETAIL};v={tp:"Select",id:"ginstancep",vl:[{text:k.ln.get("window-globals-instplaying"),value:"?_INSTANCEPLAYING:"},{text:k.ln.get("window-globals-instvisible"),
value:"?_INSTANCEVISIBLE:"},{text:k.ln.get("window-globals-instfontbold"),value:"?_INSTANCEFONTBOLD:"},{text:k.ln.get("window-globals-instfontitalic"),value:"?_INSTANCEFONTITALIC:"},{text:k.ln.get("window-acinstance-px"),value:"#_INSTANCEX:"},{text:k.ln.get("window-acinstance-py"),value:"#_INSTANCEY:"},{text:k.ln.get("window-acinstance-pwidth"),value:"#_INSTANCEWIDTH:"},{text:k.ln.get("window-acinstance-pheight"),value:"#_INSTANCEHEIGHT:"},{text:k.ln.get("window-acinstance-palpha"),value:"#_INSTANCEALPHA:"},
{text:k.ln.get("window-acinstance-pvolume"),value:"#_INSTANCEVOLUME:"},{text:k.ln.get("window-acinstance-porder"),value:"#_INSTANCEORDER:"},{text:k.ln.get("window-acinstance-pcoloralpha"),value:"#_INSTANCECOLORALPHA:"},{text:k.ln.get("window-acinstance-protation"),value:"#_INSTANCEROTATION:"},{text:k.ln.get("window-acinstance-pfontsize"),value:"#_INSTANCEFONTSIZE:"},{text:k.ln.get("window-acinstance-pfontleading"),value:"#_INSTANCEFONTLEADING:"},{text:k.ln.get("window-acinstance-pcolor"),value:"$_INSTANCECOLOR:"},
{text:k.ln.get("window-globals-insttext"),value:"$_INSTANCETEXT:"},{text:k.ln.get("window-acinstance-pfont"),value:"$_INSTANCEFONT:"},{text:k.ln.get("window-acinstance-pfontcolor"),value:"$_INSTANCEFONTCOLOR:"}],sl:[]};z={tp:"Label",id:"ginstancen",tx:k.ln.get("window-globals-instancen"),vr:ia.VARIANT_DETAIL};r={tp:"Custom",cont:this._idbuttons.h.ginstance};F={tp:"Label",id:"gmovie",tx:k.ln.get("window-globals-movie"),vr:""};var L={tp:"Select",id:"gmovie",vl:[{text:k.ln.get("window-globals-text"),
value:"$_TEXTS:"},{text:k.ln.get("window-globals-number"),value:"#_NUMBERS:"},{text:k.ln.get("window-globals-flag"),value:"?_FLAGS:"},{text:k.ln.get("window-acinput-text"),value:"$_INPUT:"},{text:k.ln.get("window-acform-text"),value:"$_FORM:"},{text:k.ln.get("window-acparam-text"),value:"$_PARAM:"},{text:k.ln.get("window-acnumeric-text"),value:"#_NUMERIC:"},{text:k.ln.get("window-actoggle-text"),value:"?_TOGGLE:"}],sl:[],ht:95},Q=k.ln.get("window-globals-name");this.addForm(a,b.createColumnHolder("form",
J,c.forge("right",[d,{tp:"Select",id:"collections",vl:[],sl:[],ch:m(this,this.onCollection)},f,{tp:"Select",id:"assets",vl:[],sl:[]},g,{tp:"Spacer",id:"cpasset",ht:38,ln:!0},h,n,l,q,u,v,z,{tp:"Select",id:"ginstancen",vl:[],sl:[]},r,F,L,{tp:"Label",id:"gname",tx:Q,vr:""},{tp:"TInput",id:"gname",tx:"",vr:""},{tp:"Custom",cont:this._idbuttons.h.gmovie}])))};t["com.tilbuci.script.AssistInstance"]=or;or.__name__="com.tilbuci.script.AssistInstance";or.__super__=ea;or.prototype=I(ea.prototype,{_idbuttons:null,
acStart:function(){ea.prototype.acStart.call(this);for(var a=[],b=0,c=p.area.getInstances();b<c.length;){var d=c[b];++b;a.push({text:d,value:d})}this.ui.setListValues("list",a);this.ui.setSelectOptions("ginstancen",a);a=[];b=Object.keys(p.movie.collections.h);c=b.length;for(var f=0;f<c;)d=b[f++],a.push({text:p.movie.collections.h[d].name,value:d});this.ui.setSelectOptions("collections",a);this.onCollection()},startInterface:function(a){ea.prototype.startInterface.call(this,a);a=Object.keys(this._idbuttons.h);
for(var b=a.length,c=0;c<b;){var d=a[c++];this._idbuttons.h[d].set_width(this.ui.buttons.h.close.get_width())}},onCopy:function(a){if(this.ui.lists.h.list.get_selectedItem()!=null)switch(this.ui.selects.h.actions.get_selectedItem().value){case "clear":this.ui.selects.h.property.get_selectedItem().value!="paragraph"&&(k.copyText('{ "ac": "instance.clear'+H.string(this.ui.selects.h.property.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'" ] }'),
Aa.removePopUp(this));break;case "loadasset":k.copyText('{ "ac": "instance.'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.other.get_text()+'" ] }');Aa.removePopUp(this);break;case "seek":k.copyText('{ "ac": "instance.'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.other.get_text()+
'" ] }');Aa.removePopUp(this);break;case "set":this.ui.selects.h.property.get_selectedItem().value=="paragraph"?k.copyText('{ "ac": "instance.setparagraph", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.other.get_text()+'" ] }'):k.copyText('{ "ac": "instance.set'+H.string(this.ui.selects.h.property.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.horizontal.get_text()+'", "'+
this.ui.inputs.h.vertical.get_text()+'" ] }');Aa.removePopUp(this);break;default:k.copyText('{ "ac": "instance.'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'" ] }'),Aa.removePopUp(this)}},onShow:function(a){if(this.ui.lists.h.list.get_selectedItem()!=null)switch(this.ui.selects.h.actions.get_selectedItem().value){case "clear":this.ui.selects.h.property.get_selectedItem().value!="paragraph"&&this.ui.inputs.h.showAction.set_text('{ "ac": "instance.clear'+
H.string(this.ui.selects.h.property.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'" ] }');break;case "loadasset":this.ui.inputs.h.showAction.set_text('{ "ac": "instance.'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.other.get_text()+'" ] }');break;case "seek":this.ui.inputs.h.showAction.set_text('{ "ac": "instance.'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+
'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.other.get_text()+'" ] }');break;case "set":this.ui.selects.h.property.get_selectedItem().value=="paragraph"?this.ui.inputs.h.showAction.set_text('{ "ac": "instance.setparagraph", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.other.get_text()+'" ] }'):this.ui.inputs.h.showAction.set_text('{ "ac": "instance.set'+H.string(this.ui.selects.h.property.get_selectedItem().value)+
'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.horizontal.get_text()+'", "'+this.ui.inputs.h.vertical.get_text()+'" ] }');break;default:this.ui.inputs.h.showAction.set_text('{ "ac": "instance.'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.lists.h.list.get_selectedItem().value)+'" ] }')}},onCollection:function(a){if(this.ui.selects.h.collections.get_selectedItem()!=null){a=[];for(var b=p.movie.collections,
c=this.ui.selects.h.collections.get_selectedItem().value,d=Object.keys(b.h[c].assets.h),f=d.length,g=0;g<f;){var h=d[g++];b=p.movie.collections;c=this.ui.selects.h.collections.get_selectedItem().value;a.push({text:b.h[c].assets.h[h].name,value:h})}this.ui.setSelectOptions("assets",a);this.ui.setSelectValue("assets",null)}},onAsset:function(a){this.ui.selects.h.assets.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.assets.get_selectedItem().value),k.copyText(this.ui.selects.h.assets.get_selectedItem().value))},
onGeneral:function(a){this.ui.selects.h.ggeneral.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.ggeneral.get_selectedItem().value),k.copyText(this.ui.selects.h.ggeneral.get_selectedItem().value))},onInstance:function(a){this.ui.selects.h.ginstancep.get_selectedItem()!=null&&this.ui.selects.h.ginstancen.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.ginstancep.get_selectedItem().value+this.ui.selects.h.ginstancen.get_selectedItem().value),
k.copyText(this.ui.selects.h.ginstancep.get_selectedItem().value+this.ui.selects.h.ginstancen.get_selectedItem().value))},onMovie:function(a){this.ui.selects.h.gmovie.get_selectedItem()!=null&&this.ui.inputs.h.gname.get_text()!=""&&(this.ui.inputs.h.showAction.set_text(H.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()),k.copyText(H.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()))},onClose:function(a){Aa.removePopUp(this)},
__class__:or});var pr=function(a){vf.call(this,a,k.ln.get("window-narrative-title"),k.ln.get("window-narrative-list"));a=new G;a.h["dialogue.loadgroup"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icNarrative"};a.h["dialogue.start"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icNarrative"};a.h["dialogue.next"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icNarrative"};a.h["dialogue.previous"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icNarrative"};a.h["dialogue.last"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icNarrative"};a.h["dialogue.first"]=
{p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icNarrative"};a.h["dialogue.close"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icNarrative"};this.setActions(a)};t["com.tilbuci.script.AssistNarrative"]=pr;pr.__name__="com.tilbuci.script.AssistNarrative";pr.__super__=vf;pr.prototype=I(vf.prototype,{__class__:pr});var qr=function(a){vf.call(this,a,k.ln.get("window-plugin-title"),k.ln.get("window-plugin-list"));a=new G;a.h["analytics.event"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icGoogle"};a.h["call.sdprocess"]={p:["s",
"s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icServer"};a.h["call.process"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icServer"};a.h["call.url"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icServer"};a.h["debuginfo.hide"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};a.h["debuginfo.show"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};a.h["overlay.show"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icServer"};a.h["share.facebook"]={p:["b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icShare"};a.h["share.linkedin"]={p:["b"],s:!1,c:!1,
t:!1,i:!1,d:!1,ic:"icShare"};a.h["share.pinterest"]={p:["b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icShare"};a.h["share.reddit"]={p:["b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icShare"};a.h["share.x"]={p:["b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icShare"};a.h.trace={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};a.h["trace.bools"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};a.h["trace.ints"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};a.h["trace.floats"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};a.h["trace.strings"]=
{p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};a.h["trace.vars"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icDebug"};this.setActions(a)};t["com.tilbuci.script.AssistPlugin"]=qr;qr.__name__="com.tilbuci.script.AssistPlugin";qr.__super__=vf;qr.prototype=I(vf.prototype,{__class__:qr});var rr=function(a){vf.call(this,a,k.ln.get("window-acplus-title"),k.ln.get("window-acplus-list"));a=new G;a.h["replace.clearfile"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icReplace"};a.h["replace.clearstring"]={p:["s"],s:!1,c:!1,
t:!1,i:!1,d:!1,ic:"icReplace"};a.h["replace.clearallfiles"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icReplace"};a.h["replace.clearallstrings"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icReplace"};a.h["replace.origin"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icReplace"};a.h["replace.setfile"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icReplace"};a.h["replace.setstring"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icReplace"};a.h.run={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSnippets"};a.h["system.copytext"]={p:["s"],
s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.fullscreen"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.visitoringroup"]={p:["s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.logout"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.openembed"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.closeembed"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.embedplace"]={p:["i","i","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.embedreset"]=
{p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.openurl"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifhorizontal"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifvertical"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifwebsite"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifpwa"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifpwainstalled"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifdesktop"]={p:[],
s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifmobile"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifpublish"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.ifplayer"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.sendevent"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["system.setkftime"]={p:["i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["css.clear"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icText"};a.h["css.set"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,
ic:"icText"};a.h["timer.clear"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icTimer"};a.h["timer.clearall"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icTimer"};a.h["timer.set"]={p:["s","i","i"],s:!1,c:!1,t:!0,i:!1,d:!1,ic:"icTimer"};this.setActions(a)};t["com.tilbuci.script.AssistPlus"]=rr;rr.__name__="com.tilbuci.script.AssistPlus";rr.__super__=vf;rr.prototype=I(vf.prototype,{__class__:rr});var sr=function(a){vf.call(this,a,k.ln.get("window-runtime-title"),k.ln.get("window-runtime-list"));a=new G;a.h["runtime.install"]=
{p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["runtime.quit"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["runtime.savedata"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["runtime.loaddata"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"icSystem"};a.h["runtime.ifdataexist"]={p:["s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};a.h["runtime.ifbrowser"]={p:[],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"icSystem"};this.setActions(a)};t["com.tilbuci.script.AssistRuntime"]=sr;sr.__name__="com.tilbuci.script.AssistRuntime";
sr.__super__=vf;sr.prototype=I(vf.prototype,{__class__:sr});var tr=function(a){this._idbuttons=new G;ea.call(this,a,k.ln.get("window-acscene-title"),500,Bc.pickValue(630,690),!1);a=this._idbuttons;var b=new Rc("copymovieload",m(this,this.onCopyMovieLoad),k.ln.get("window-acmovie-copyload"),Z.getBitmapData("btCopy"));a.h.btCopyMovieLoad=b;a=this._idbuttons;b=new Rc("showmovieload",m(this,this.onShowMovieLoad),k.ln.get("window-acvariable-show"));a.h.btShowMovieLoad=b;a=this._idbuttons;b=new Rc("copyid",
m(this,this.onCopyId),k.ln.get("window-acscene-copyid"),Z.getBitmapData("btCopy"));a.h.btCopyId=b;a=this._idbuttons;b=new Rc("copyload",m(this,this.onCopyLoad),k.ln.get("window-acscene-copyload"),Z.getBitmapData("btCopy"));a.h.btCopyLoad=b;a=this._idbuttons;b=new Rc("showload",m(this,this.onShowLoad),k.ln.get("window-acvariable-show"));a.h.btShowLoad=b;a=this._idbuttons;b=new Rc("copyac",m(this,this.onCopy),k.ln.get("window-acscene-btaction"),Z.getBitmapData("btCopy"));a.h.btCopyAc=b;a=this._idbuttons;
b=new Rc("showac",m(this,this.onShow),k.ln.get("window-acvariable-show"));a.h.btShowAc=b;a=k.ln.get("window-acscene-title");b=this.ui;var c={tp:"Label",id:"movielist",tx:k.ln.get("window-acmovie-list"),vr:""},d={tp:"Custom",cont:this._idbuttons.h.btCopyMovieLoad},f={tp:"Custom",cont:this._idbuttons.h.btShowMovieLoad},g={tp:"Label",id:"list",tx:k.ln.get("window-acscene-list"),vr:""},h={tp:"Custom",cont:this._idbuttons.h.btCopyId},n={tp:"Custom",cont:this._idbuttons.h.btCopyLoad},l={tp:"Custom",cont:this._idbuttons.h.btShowLoad},
q={tp:"Label",id:"actions",tx:k.ln.get("window-acscene-actions"),vr:""},u={tp:"Label",id:"navigate",tx:k.ln.get("window-acscene-navigate"),vr:""},v={tp:"Custom",cont:this._idbuttons.h.btCopyAc},z={tp:"Custom",cont:this._idbuttons.h.btShowAc},r={tp:"Button",id:"close",tx:k.ln.get("window-actions-close"),ac:m(this,this.onClose)},F=k.ln.get("window-globals-showaction");this.addForm(a,b.forge("form",[c,{tp:"Select",id:"movielist",vl:[],sl:[]},d,f,{tp:"Spacer",id:"acmovie",ht:15,ln:!0},g,{tp:"Select",
id:"list",vl:[],sl:[],ht:150},h,n,l,{tp:"Spacer",id:"ac",ht:15,ln:!0},q,{tp:"Select",id:"actions",vl:[{text:"scene.navigate",value:"scene.navigate"},{text:"scene.pause",value:"scene.pause"},{text:"scene.play",value:"scene.play"},{text:"scene.playpause",value:"scene.playpause"},{text:"scene.nextkeyframe",value:"scene.nextkeyframe"},{text:"scene.previouskeyframe",value:"scene.previouskeyframe"},{text:"scene.loadfirstkeyframe",value:"scene.loadfirstkeyframe"},{text:"scene.loadlastkeyframe",value:"scene.loadlastkeyframe"}],
sl:null},u,{tp:"Select",id:"navigate",vl:[{text:"right",value:"right"},{text:"left",value:"left"},{text:"up",value:"up"},{text:"down",value:"down"},{text:"nin",value:"nin"},{text:"nout",value:"nout"}],sl:null},v,z,r,{tp:"Spacer",id:"showAction",ht:10,ln:!1},{tp:"Label",id:"showAction",tx:F,vr:ia.VARIANT_DETAIL},{tp:"TInput",id:"showAction",tx:""}]))};t["com.tilbuci.script.AssistScene"]=tr;tr.__name__="com.tilbuci.script.AssistScene";tr.__super__=ea;tr.prototype=I(ea.prototype,{_idbuttons:null,acStart:function(){ea.prototype.acStart.call(this);
this.ui.setSelectOptions("movielist",[]);this.ui.setSelectValue("movielist",null);this.ui.setSelectOptions("list",[]);this.ui.setSelectValue("list",null);k.ws.send("Movie/List",new G,m(this,this.onList))},startInterface:function(a){ea.prototype.startInterface.call(this,a);a=Object.keys(this._idbuttons.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this._idbuttons.h[d].set_width(this.ui.buttons.h.close.get_width())}},onCopyId:function(a){this.ui.selects.h.list.get_selectedItem()!=null&&(k.copyText(this.ui.selects.h.list.get_selectedItem().value),
Aa.removePopUp(this))},onCopyLoad:function(a){this.ui.selects.h.list.get_selectedItem()!=null&&(k.copyText('{ "ac": "scene.load", "param": [ "'+H.string(this.ui.selects.h.list.get_selectedItem().value)+'" ] }'),Aa.removePopUp(this))},onShowLoad:function(a){this.ui.selects.h.list.get_selectedItem()!=null&&this.ui.inputs.h.showAction.set_text('{ "ac": "scene.load", "param": [ "'+H.string(this.ui.selects.h.list.get_selectedItem().value)+'" ] }')},onCopyMovieLoad:function(a){this.ui.selects.h.movielist.get_selectedItem()!=
null&&(k.copyText('{ "ac": "movie.load", "param": [ "'+H.string(this.ui.selects.h.movielist.get_selectedItem().value)+'" ] }'),Aa.removePopUp(this))},onShowMovieLoad:function(a){this.ui.selects.h.movielist.get_selectedItem()!=null&&this.ui.inputs.h.showAction.set_text('{ "ac": "movie.load", "param": [ "'+H.string(this.ui.selects.h.movielist.get_selectedItem().value)+'" ] }')},onCopy:function(a){this.ui.selects.h.actions.get_selectedItem()!=null&&(this.ui.selects.h.actions.get_selectedItem().value==
"scene.navigate"?k.copyText('{ "ac": "'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.selects.h.navigate.get_selectedItem().value)+'" ] }'):k.copyText('{ "ac": "'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ ] }'),Aa.removePopUp(this))},onShow:function(a){this.ui.selects.h.actions.get_selectedItem()!=null&&(this.ui.selects.h.actions.get_selectedItem().value=="scene.navigate"?this.ui.inputs.h.showAction.set_text('{ "ac": "'+
H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+H.string(this.ui.selects.h.navigate.get_selectedItem().value)+'" ] }'):this.ui.inputs.h.showAction.set_text('{ "ac": "'+H.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ ] }'))},onClose:function(a){Aa.removePopUp(this)},onList:function(a,b){var c=[];if(a&&b.map.h.e==0){a=0;for(var d=y.fields(b.map.h.list);a<d.length;){var f=d[a];++a;f=y.field(b.map.h.list,f);Object.prototype.hasOwnProperty.call(f,
"id")&&c.push({text:y.field(f,"title"),value:y.field(f,"id")})}}this.ui.setSelectOptions("movielist",c);b=k.ws;a=new G;c=p.movie.get_mvId();a.h.movie=c;b.send("Scene/List",a,m(this,this.onSceneList))},onSceneList:function(a,b){var c=[];if(a&&b.map.h.e==0){a=0;for(var d=y.fields(b.map.h.list);a<d.length;){var f=d[a];++a;f=y.field(b.map.h.list,f);Object.prototype.hasOwnProperty.call(f,"id")&&c.push({text:y.field(f,"title"),value:y.field(f,"id")})}}this.ui.setSelectOptions("list",c)},__class__:tr});
var ur=function(a){vf.call(this,a,k.ln.get("window-acvariable-title"),k.ln.get("window-acvariable-list"));a=new G;a.h["int.abs"]={p:["s","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.clear"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.clearall"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.divide"]={p:["s","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.max"]={p:["s","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.min"]={p:["s","i","i"],s:!1,
c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.multiply"]={p:["s","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.random"]={p:["s","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.set"]={p:["s","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.subtract"]={p:["s","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.sum"]={p:["s","i","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.tofloat"]={p:["s","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["int.tostring"]=
{p:["s","i"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["bool.clear"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btBool"};a.h["bool.clearall"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btBool"};a.h["bool.set"]={p:["s","b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btBool"};a.h["bool.setinverse"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btBool"};a.h["float.abs"]={p:["s","b"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.clear"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.clearall"]={p:[],s:!1,c:!1,t:!1,i:!1,
d:!1,ic:"btFloat"};a.h["float.divide"]={p:["s","f","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.max"]={p:["s","f","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.min"]={p:["s","f","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.multiply"]={p:["s","f","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.random"]={p:["s","f","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.set"]={p:["s","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.subtract"]={p:["s","f","f"],
s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.sum"]={p:["s","f","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.toint"]={p:["s","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["float.tostring"]={p:["s","f"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["string.clear"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.clearall"]={p:[],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.clearglobal"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.concat"]={p:["s","s",
"s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.replace"]={p:["s","s","s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.set"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.setglobal"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.setgroup"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.loadfile"]={p:["s"],s:!1,c:!1,t:!1,i:!1,d:!0,ic:"btString"};a.h["string.tofloat"]={p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["string.toint"]=
{p:["s","s"],s:!1,c:!1,t:!1,i:!1,d:!1,ic:"btString"};a.h["if.intsdifferent"]={p:["i","i"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["if.intsequal"]={p:["i","i"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["if.intgreater"]={p:["i","i"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["if.intgreaterequal"]={p:["i","i"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["if.intlower"]={p:["i","i"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btInteger"};a.h["if.intlowerequal"]={p:["i","i"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btInteger"};
a.h["if.bool"]={p:["s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btBool"};a.h["if.floatsdifferent"]={p:["f","f"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["if.floatsequal"]={p:["f","f"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["if.floatgreater"]={p:["f","f"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["if.floatgreaterequal"]={p:["f","f"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["if.floatlower"]={p:["f","f"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btFloat"};a.h["if.floatlowerequal"]={p:["f","f"],s:!1,c:!0,t:!1,i:!1,
d:!1,ic:"btFloat"};a.h["if.stringcontains"]={p:["s","s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btString"};a.h["if.stringendswith"]={p:["s","s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btString"};a.h["if.stringsdifferent"]={p:["s","s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btString"};a.h["if.stringsequal"]={p:["s","s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btString"};a.h["if.stringstartswith"]={p:["s","s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btString"};a.h["if.stringemail"]={p:["s"],s:!1,c:!0,t:!1,i:!1,d:!1,ic:"btString"};this.setActions(a)};
t["com.tilbuci.script.AssistVariables"]=ur;ur.__name__="com.tilbuci.script.AssistVariables";ur.__super__=vf;ur.prototype=I(vf.prototype,{__class__:ur});var Ii=function(){this.onDrag=null;this._sngroup="";this._dSnippets=new G;this._currDiag="";this._snpParam="      ".split(" ");this._stringfile=new G;this._lastEvent=new G;this.hadInteraction=!1;this.eventSend=null;this.globalAvailable=[];this.available=[];this._currentArray="";this._arrays=new G;this._bools=new G;this._ints=new G;this._floats=new G;
this._timers=new G;this._replacefile=new G;this._replacestr=new G;this._jsongropup="";this._stringsjson=new G;this._strings=new G};t["com.tilbuci.script.ScriptParser"]=Ii;Ii.__name__="com.tilbuci.script.ScriptParser";Ii.tilbuci_getstring=Sa.tilbuci_getstring=function(a){return p.parser.getString(a)};Ii.tilbuci_getfloat=Sa.tilbuci_getfloat=function(a){return p.parser.getFloat(a)};Ii.tilbuci_getint=Sa.tilbuci_getint=function(a){return p.parser.getInt(a)};Ii.tilbuci_getbool=Sa.tilbuci_getbool=function(a){return p.parser.getBool(a)};
Ii.tilbuci_setstring=Sa.tilbuci_setstring=function(a,b){p.parser.setString(a,b)};Ii.tilbuci_setfloat=Sa.tilbuci_setfloat=function(a,b){p.parser.setFloat(a,b)};Ii.tilbuci_setint=Sa.tilbuci_setint=function(a,b){p.parser.setInt(a,b)};Ii.tilbuci_setbool=Sa.tilbuci_setbool=function(a,b){p.parser.setBool(a,b)};Ii.tilbuci_runaction=Sa.tilbuci_runaction=function(a){return p.parser.run(a)};Ii.prototype={_strings:null,_stringsjson:null,_jsongropup:null,_replacestr:null,_replacefile:null,_timers:null,_floats:null,
_ints:null,_bools:null,_arrays:null,_currentArray:null,available:null,globalAvailable:null,eventSend:null,hadInteraction:null,_acOk:null,_acError:null,_lastEvent:null,_stringfile:null,_snpParam:null,_currDiag:null,_diagInfo:null,_dSnippets:null,_sngroup:null,onDrag:null,getVarRef:function(a){switch(a){case "bool":return this._bools;case "float":return this._floats;case "int":return this._ints;case "string":return this._strings;default:return null}},addAvailableGroup:function(a){this.available.push(a)},
addAvailableGlobal:function(a){this.globalAvailable.push(a)},kill:function(){var a=this._strings.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._strings;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._floats.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._floats,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._ints.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._ints,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];
a=this._bools.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._bools,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._arrays.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this._arrays.h[d].kill(),f=this._arrays,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._dSnippets.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._dSnippets,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];for(this._dSnippets=this._arrays=this._bools=this._ints=
this._floats=this._strings=null;this.available.length>0;)for(a=this.available.shift();a.a.length>0;)for(b=a.a.shift();b.p.length>0;)b.p.shift();for(this.available=null;this.globalAvailable.length>0;)for(a=this.globalAvailable.shift();a.v.length>0;)a.v.shift();this.clearStringFile();this.globalAvailable=this._stringfile=null},clearVars:function(a){a==null&&(a="");switch(a){case "arrays":a=this._arrays.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this._arrays.h[d].kill();var f=this._arrays;
Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}break;case "bools":a=this._bools.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._strings,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];break;case "floats":a=this._floats.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._floats,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];break;case "ints":a=this._ints.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._ints,Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d];break;case "strings":a=this._strings.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._strings,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];break;default:a=this._strings.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._strings,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._floats.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._floats,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._ints.h;a=Object.keys(a);
b=a.length;for(c=0;c<b;)d=a[c++],f=this._ints,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._bools.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._bools,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._arrays.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this._arrays.h[d].kill(),f=this._arrays,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}return!0},loadStringsJson:function(){this._stringsjson=new G;this._jsongropup="";if(p.nocache){var a=
p.base+"movie/"+p.movie.get_mvId()+".movie/strings.json",b=new G,c=(new Date).getTime();b.h.rand=c;new Ob(!0,a,"GET",b,3,m(this,this.onStringsJSON))}else new Ob(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/strings.json","GET",new G,3,m(this,this.onStringsJSON))},onStringsJSON:function(a,b){if(a){a=0;for(var c=y.fields(b.json);a<c.length;){var d=c[a];++a;for(var f=y.field(b.json,d),g=new G,h=0,n=y.fields(f);h<n.length;){var l=n[h];++h;var q=y.field(f,l);g.h["$"+l]=q}this._stringsjson.h[d]=g}}this.loadContraptions();
this.loadNarrative()},loadContraptions:function(){if(p.nocache){var a=p.base+"movie/"+p.movie.get_mvId()+".movie/contraptions.json",b=new G,c=(new Date).getTime();b.h.rand=c;new Ob(!0,a,"GET",b,3,m(this,this.onContraptions))}else new Ob(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/contraptions.json","GET",new G,3,m(this,this.onContraptions))},loadNarrative:function(){if(p.nocache){var a=p.base+"movie/"+p.movie.get_mvId()+".movie/narrative.json",b=new G,c=(new Date).getTime();b.h.rand=c;new Ob(!0,
a,"GET",b,3,m(this,this.onNarrative))}else new Ob(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/narrative.json","GET",new G,3,m(this,this.onNarrative))},clearStringFile:function(){for(var a=Object.keys(this._stringfile.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._stringfile;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}},onStringFile:function(a,b){if(a){this.clearStringFile();a=Object.keys(b.map.h);for(var c=a.length,d=0;d<c;){var f=a[d++];this._stringfile.h[f]=b.map.h[f]}this._acOk!=
null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0)},onSnippetFile:function(a,b){if(a&&this._sngroup!=""){this._dSnippets.h[this._sngroup]=[];a=Object.keys(b.map.h);for(var c=a.length,d=0;d<c;){var f=a[d++];this._dSnippets.h[this._sngroup].push({name:f,code:H.string(b.map.h[f])})}this._sngroup="";this._acOk!=null&&this.run(this._acOk,!0)}else this._sngroup="",this._acError!=null&&this.run(this._acError,!0)},onArrayFile:function(a,b){if(a)if(this._currentArray!=""){if(!Object.prototype.hasOwnProperty.call(this._arrays.h,
this._currentArray)){a=this._arrays;var c=this._currentArray,d=new To;a.h[c]=d}this._arrays.h[this._currentArray].fromJson(b.rawtext)?(this._currentArray="",this._acOk!=null&&this.run(this._acOk,!0)):(this._currentArray="",this._acError!=null&&this.run(this._acError,!0))}else this._acError!=null&&this.run(this._acError,!0);else this._currentArray="",this._acError!=null&&this.run(this._acError,!0)},onVariablesFile:function(a,b){if(a)if(b=Ga.decrypt(b,Ga.md5(p.movie.get_mvId()+V.substr(p.movie.get_mvId(),
2,null)).toLowerCase()),a=Ga.jsonParse(b),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=y.fields(a);b<c.length;){var d=c[b];++b;d=y.field(a,d);if(d!=null)switch(d.t){case "b":this._bools.h[d.n]=d.v;break;case "f":this._floats.h[d.n]=d.v;break;case "i":this._ints.h[d.n]=d.v;break;case "s":this._strings.h[d.n]=d.v}}this._acOk!=null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0)},onDiagGroup:function(a){a?this._acOk!=null&&this.run(this._acOk,
!0):(this._currDiag="",this._acError!=null&&this.run(this._acError,!0))},onContraptions:function(a,b){p.contraptions.removeAll();p.contraptions.clear();if(a){a=0;for(var c=y.fields(b.json);a<c.length;){var d=c[a];++a;if(d=="covers"){d=0;for(var f=y.fields(y.field(b.json,"covers"));d<f.length;){var g=f[d];++d;var h=new Dd;h.load(y.field(y.field(b.json,"covers"),g))?p.contraptions.covers.h[h.id]=h:h.kill()}}else if(d=="backgrounds")for(d=0,f=y.fields(y.field(b.json,"backgrounds"));d<f.length;)g=f[d],
++d,h=new Ji,h.load(y.field(y.field(b.json,"backgrounds"),g))?p.contraptions.backgrounds.h[h.id]=h:h.kill();else if(d=="menus")for(d=0,f=y.fields(y.field(b.json,"menus"));d<f.length;)g=f[d],++d,h=new na,h.load(y.field(y.field(b.json,"menus"),g))?p.contraptions.menus.h[h.id]=h:h.kill();else if(d=="messages")for(d=0,f=y.fields(y.field(b.json,"messages"));d<f.length;)g=f[d],++d,h=new ca,h.load(y.field(y.field(b.json,"messages"),g))?p.contraptions.messages.h[h.id]=h:h.kill();else if(d=="dflow")for(d=
0,f=y.fields(y.field(b.json,"dflow"));d<f.length;)g=f[d],++d,h=new Pk,h.load(y.field(y.field(b.json,"dflow"),g))?p.contraptions.dflow.h[h.id]=h:h.kill();else if(d=="inv")for(d=0,f=y.fields(y.field(b.json,"inv"));d<f.length;)g=f[d],++d,h=new P,h.load(y.field(y.field(b.json,"inv"),g))?p.contraptions.inv.h.inv=h:h.kill();else if(d=="bs")for(d=0,f=y.fields(y.field(b.json,"bs"));d<f.length;)g=f[d],++d,h=new nf,h.load(y.field(y.field(b.json,"bs"),g))?p.contraptions.bs.h.bs=h:h.kill();else if(d=="musics")for(d=
0,f=y.fields(y.field(b.json,"musics"));d<f.length;)g=f[d],++d,h=new Xa,h.load(y.field(y.field(b.json,"musics"),g))?p.contraptions.musics.h[h.id]=h:h.kill();else if(d=="sounds")for(d=0,f=y.fields(y.field(b.json,"sounds"));d<f.length;)g=f[d],++d,h=new cb,h.load(y.field(y.field(b.json,"sounds"),g))?p.contraptions.sounds.h[h.id]=h:h.kill();else if(d=="targets")for(d=0,f=y.fields(y.field(b.json,"targets"));d<f.length;)g=f[d],++d,h=new $a,h.load(y.field(y.field(b.json,"targets"),g))?p.contraptions.targets.h[h.id]=
h:h.kill();else if(d=="forms")for(d=0,f=y.fields(y.field(b.json,"forms"));d<f.length;)g=f[d],++d,h=new D,h.load(y.field(y.field(b.json,"forms"),g))?p.contraptions.forms.h[h.id]=h:h.kill();else if(d=="interf")for(d=0,f=y.fields(y.field(b.json,"interf"));d<f.length;)g=f[d],++d,h=new K,h.load(y.field(y.field(b.json,"interf"),g))?p.contraptions.interf.h[h.id]=h:h.kill()}}},onNarrative:function(a,b){p.narrative.clear();if(a){a=0;for(var c=y.fields(b.json);a<c.length;){var d=c[a];++a;if(d=="chars"){d=0;
for(var f=y.fields(y.field(b.json,"chars"));d<f.length;){var g=f[d];++d;var h=new An;h.load(y.field(y.field(b.json,"chars"),g))?p.narrative.chars.h[h.id]=h:h.kill()}}else if(d=="dialogues")for(d=0,f=y.fields(y.field(b.json,"dialogues"));d<f.length;)g=f[d],++d,h=new Bn,h.load(y.field(y.field(b.json,"dialogues"),g))?p.narrative.dialogues.h[h.id]=h:h.kill();else if(d=="items")for(d=0,f=y.fields(y.field(b.json,"items"));d<f.length;)g=f[d],++d,h=new Zo,h.load(y.field(y.field(b.json,"items"),g))?p.narrative.items.h[h.itname]=
h:h.kill();else if(d=="cards")for(d=0,f=y.fields(y.field(b.json,"cards"));d<f.length;)g=f[d],++d,h=new Yo,h.load(y.field(y.field(b.json,"cards"),g))?p.narrative.cards.h[h.cardname]=h:h.kill()}b=p.narrative.chars.h;a=Object.keys(b);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.collection!=""&&p.movie.loadCollection(f.collection)}},getString:function(a){return Object.prototype.hasOwnProperty.call(this._strings.h,a)?this._strings.h[a]:""},setString:function(a,b){var c=this._strings;a=this.parseString(a);b=this.parseString(b);
c.h[a]=b;return!0},clearString:function(a){var b=this._strings,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._strings,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c]);return!0},concatString:function(a,b,c){b=V.substr(b,0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,V.substr(b,1,null))?H.string(this._ints.h[V.substr(b,1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,V.substr(b,1,null))?H.string(this._floats.h[V.substr(b,
1,null)]):this.parseString(b):V.substr(b,0,1)=="?"?Object.prototype.hasOwnProperty.call(this._bools.h,V.substr(b,1,null))?this._bools.h[V.substr(b,1,null)]?"true":"false":this.parseString(b):this.parseString(b);c=V.substr(c,0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,V.substr(c,1,null))?H.string(this._ints.h[V.substr(c,1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,V.substr(c,1,null))?H.string(this._floats.h[V.substr(c,1,null)]):this.parseString(c):V.substr(c,0,1)==
"?"?Object.prototype.hasOwnProperty.call(this._bools.h,V.substr(c,1,null))?this._bools.h[V.substr(c,1,null)]?"true":"false":this.parseString(c):this.parseString(c);var d=this._strings;a=this.parseString(a);d.h[a]=b+c;return!0},getFloat:function(a){return Object.prototype.hasOwnProperty.call(this._floats.h,a)?this._floats.h[a]:0},clearFloat:function(a){var b=this._floats,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._floats,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,
c)&&delete a.h[c]);return!0},setFloat:function(a,b){a=this.parseString(a);if(ab.typeof(b)==ac.TFloat||ab.typeof(b)==ac.TInt)this._floats.h[a]=b;else{var c=this._floats;b=this.parseFloat(b);c.h[a]=b}return!0},getInt:function(a){return Object.prototype.hasOwnProperty.call(this._ints.h,a)?this._ints.h[a]:0},clearInt:function(a){var b=this._ints,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._ints,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c]);
return!0},setInt:function(a,b){a=this.parseString(a);if(ab.typeof(b)==ac.TInt)this._ints.h[a]=b;else if(ab.typeof(b)==ac.TFloat)b=Math.round(b),this._ints.h[a]=b;else{var c=this._ints;b=this.parseInt(b);c.h[a]=b}return!0},getBool:function(a){return Object.prototype.hasOwnProperty.call(this._bools.h,a)?this._bools.h[a]:!1},clearBool:function(a){var b=this._bools,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._bools,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,
c)&&delete a.h[c]);return!0},setBool:function(a,b,c){c==null&&(c=!1);a=this.parseString(a);ab.typeof(b)==ac.TBool?this._bools.h[a]=c?!b:b:(c?(c=this._bools,b=!this.parseBool(b)):(c=this._bools,b=this.parseBool(b)),c.h[a]=b);return!0},run:function(a,b){b==null&&(b=!1);if(b){if(a==null)return!0;var c=a}else c=Ga.jsonParse(a);if(c==0)return!1;if(ab.typeof(c)!=ac.TObject){a=[];b=!1;try{a=w.__cast(c,Array),b=!0}catch(f){b=!1}if(b){for(c=0;c<a.length;){var d=a[c];++c;this.run(d,!0)||(b=!1)}return b}return!1}return this.exec(c)},
checkJoystick:function(a){var b=!1;switch(a){case "0":p.usingTarget>0?(p.area.triggerTarget(),b=!0):b=this.runInput("keyspace");break;case "1":b=this.runInput("keyenter");break;case "2":b=this.runInput("keypup");break;case "3":b=this.runInput("keypdown");break;case "d":p.usingTarget>0?(p.area.moveTarget("down"),b=!0):b=this.runInput("keydown");break;case "l":p.usingTarget>0?(p.area.moveTarget("left"),b=!0):b=this.runInput("keyleft");break;case "r":p.usingTarget>0?(p.area.moveTarget("right"),b=!0):
b=this.runInput("keyright");break;case "u":p.usingTarget>0?(p.area.moveTarget("up"),b=!0):b=this.runInput("keyup")}return b},checkKeyboard:function(a){var b=!1;switch(a){case 13:b=this.runInput("keyenter");break;case 32:p.usingTarget>0?(p.area.triggerTarget(),b=!0):b=this.runInput("keyspace");break;case 33:b=this.runInput("keypup");break;case 34:b=this.runInput("keypdown");break;case 35:b=this.runInput("keyend");break;case 36:b=this.runInput("keyhome");break;case 37:p.usingTarget>0?(p.area.moveTarget("left"),
b=!0):(b=this.runInput("keyleft"))||(b=this.runInput("keyletf"));break;case 38:p.usingTarget>0?(p.area.moveTarget("up"),b=!0):b=this.runInput("keyup");break;case 39:p.usingTarget>0?(p.area.moveTarget("right"),b=!0):b=this.runInput("keyright");break;case 40:p.usingTarget>0?(p.area.moveTarget("down"),b=!0):b=this.runInput("keydown")}return b},checkMouse:function(a){var b=!1;switch(a){case "mousemiddle":b=this.runInput("mousemiddle");break;case "mouseright":b=this.runInput("mouseright");break;case "mousewheeldown":b=
this.runInput("mousewheeldown");break;case "mousewheelup":b=this.runInput("mousewheelup")}return b},runInput:function(a){var b=!1;if(Object.prototype.hasOwnProperty.call(p.mdata.inputs.h,a))if(b=p.mdata.inputs.h[a],b==null)b=this.run('{ "ac": "run", "param": [ "'+p.mdata.inputs.h[a]+'" ] }');else switch(b){case "down":this.run('{ "ac": "scene.navigate", "param": [ "down" ] }');b=!0;break;case "firstkf":this.run('{ "ac": "scene.loadfirstkeyframe", "param": [ "" ] }');b=!0;break;case "lastkf":this.run('{ "ac": "scene.loadlastkeyframe", "param": [ "" ] }');
b=!0;break;case "left":this.run('{ "ac": "scene.navigate", "param": [ "left" ] }');b=!0;break;case "nextkf":this.run('{ "ac": "scene.nextkeyframe", "param": [ "" ] }');b=!0;break;case "nin":this.run('{ "ac": "scene.navigate", "param": [ "nin" ] }');b=!0;break;case "nothing":b=!1;break;case "nout":this.run('{ "ac": "scene.navigate", "param": [ "nout" ] }');b=!0;break;case "prevkf":this.run('{ "ac": "scene.previouskeyframe", "param": [ "" ] }');b=!0;break;case "right":this.run('{ "ac": "scene.navigate", "param": [ "right" ] }');
b=!0;break;case "target":this.run('{ "ac": "target.toggle", "param": [ "" ] }');b=!0;break;case "up":this.run('{ "ac": "scene.navigate", "param": [ "up" ] }');b=!0;break;default:b=this.run('{ "ac": "run", "param": [ "'+p.mdata.inputs.h[a]+'" ] }')}return b},exec:function(a){if(Object.prototype.hasOwnProperty.call(a,"ac")&&Object.prototype.hasOwnProperty.call(a,"param")&&ab.typeof(y.field(a,"param"))!=ac.TObject){var b=[],c=!1;try{b=w.__cast(y.field(a,"param"),Array),c=!0}catch(F){c=!1}if(c)switch(y.field(a,
"ac")){case "animation.method":return p.area.setAnimation(this.parseString(b[0])),!0;case "array.clear":if(b.length>0){var d=this._arrays,f=this.parseString(b[0]);if(Object.prototype.hasOwnProperty.call(d.h,f))return d=this._arrays,f=this.parseString(b[0]),d.h[f].clear(),!0}return!1;case "array.create":if(b.length>0){d=this._arrays;f=this.parseString(b[0]);if(Object.prototype.hasOwnProperty.call(d.h,f))return!1;d=this._arrays;var g=this.parseString(b[0]),h=new To;d.h[g]=h;return!0}return!1;case "array.current":return b.length>
1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].current(),d.h[g]=h,!0):!1;case "array.currentbool":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._bools,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].currentBool(),d.h[g]=h,!0):!1;case "array.currentfloat":return b.length>1&&(d=
this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._floats,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].currentFloat(),d.h[g]=h,!0):!1;case "array.currentint":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].currentInt(),d.h[g]=h,!0):!1;case "array.fromstring":return b.length>1?(d=this._arrays,
f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)||(d=this._arrays,g=this.parseString(b[0]),h=new To,d.h[g]=h),d=this._arrays,f=this.parseString(b[0]),a=d.h[f],d=this._strings,f=this.parseString(b[1]),a.fromJson(d.h[f])):!1;case "array.get":return b.length>2?(d=this._strings,g=this.parseString(b[2]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].get(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.getbool":return b.length>2?(d=this._bools,g=this.parseString(b[2]),a=this._arrays,
f=this.parseString(b[0]),h=a.h[f].getBool(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.getfloat":return b.length>2?(d=this._floats,g=this.parseString(b[2]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].getFloat(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.getindex":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].currentIndex(),d.h[g]=h,!0):!1;
case "array.getint":return b.length>2?(d=this._ints,g=this.parseString(b[2]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].getInt(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.loadfile":if(b.length>0)return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),a=null,this._currentArray=this.parseString(b[0]),p.nocache&&(f=new G,g=Math.ceil(Math.random()*
1E4),f.h.rand=g,a=f),new Ob(!0,p.path+"media/strings/"+this.parseString(b[0])+".json","GET",a,1,m(this,this.onArrayFile)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "array.next":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].next(),d.h[g]=h,!0):!1;case "array.nextbool":return b.length>1&&(d=this._arrays,
f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._bools,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].nextBool(),d.h[g]=h,!0):!1;case "array.nextfloat":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._floats,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].nextFloat(),d.h[g]=h,!0):!1;case "array.nextint":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),
Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].nextInt(),d.h[g]=h,!0):!1;case "array.previous":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previous(),d.h[g]=h,!0):!1;case "array.previousbool":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,
f))?(d=this._bools,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previousBool(),d.h[g]=h,!0):!1;case "array.previousfloat":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._floats,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previousFloat(),d.h[g]=h,!0):!1;case "array.previousint":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,
f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previousInt(),d.h[g]=h,!0):!1;case "array.push":return b.length>1?(d=this._arrays,f=this.parseString(b[0]),d.h[f].push(H.string(b[1])),!0):!1;case "array.remove":if(b.length>0&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))){d=this._arrays;f=this.parseString(b[0]);d.h[f].kill();d=this._arrays;f=this.parseString(b[0]);var n=d;Object.prototype.hasOwnProperty.call(n.h,f)&&
delete n.h[f];return!0}return!1;case "array.set":return b.length>2?(d=this._arrays,f=this.parseString(b[0]),d.h[f].set(this.parseInt(b[1]),H.string(b[2])),!0):!1;case "array.setindex":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._arrays,f=this.parseString(b[0]),d.h[f].setIndex(this.parseInt(b[1])),!0):!1;case "array.tostring":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?
(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].toJson(),d.h[g]=h,!0):!1;case "battle.close":return p.contraptions.bsHide(),!0;case "battle.setattribute":return b.length>3&&Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")?(p.contraptions.bs.h.bs.setAttributes(!0,this.parseInt(b[0])-1,this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "battle.setopponent":return b.length>3&&Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,
"bs")?(p.contraptions.bs.h.bs.setAttributes(!1,this.parseInt(b[0])-1,this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "battle.show":if(b.length>1){d=this.parseString(b[0]).split(",");c=this.parseString(b[1]).split(",");b=[];h=[];f=0;for(g=d.length;f<g;)n=f++,n<5&&b.push(this.parseString(N.trim(d[n])));f=0;for(g=c.length;f<g;)n=f++,n<5&&h.push(this.parseString(N.trim(c[n])));g=f=null;Object.prototype.hasOwnProperty.call(a,"win")&&(f=y.field(a,"win"));Object.prototype.hasOwnProperty.call(a,
"loose")&&(g=y.field(a,"loose"));p.contraptions.battleShow(f,g,b,h);return!0}return!1;case "bool.clear":return this.clearBool(b[0]);case "bool.clearall":return this.clearVars("bools");case "bool.set":return this.setBool(b[0],b[1]);case "bool.setinverse":return this.setBool(b[0],b[1],!0);case "contraption.background":return b.length>0?p.contraptions.showBackground(this.parseString(b[0])):!1;case "contraption.backgroundhide":return p.contraptions.hideBackground(),!0;case "contraption.cover":return b.length>
0?p.contraptions.showCover(this.parseString(b[0])):!1;case "contraption.coverhide":return p.contraptions.hideCover(),!0;case "contraption.form":return b.length>2?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=y.field(a,"cancel")),p.contraptions.showForm(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),h,d)):!1;case "contraption.formhide":return p.contraptions.hideForm(),!0;case "contraption.formsetstepper":return b.length>
3?p.contraptions.setFormStepper(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])):!1;case "contraption.formvalue":return b.length>1?p.contraptions.setFormValue(this.parseString(b[0]),b[1]):!1;case "contraption.hideloading":return p.contraptions.hideLoadingIc(),!0;case "contraption.interface":return b.length>2?p.contraptions.showInterface(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2])):!1;case "contraption.interfaceanimframe":return b.length>1?p.contraptions.setInterfaceFrame(this.parseString(b[0]),
this.parseInt(b[1])):!1;case "contraption.interfaceanimpause":return b.length>0?p.contraptions.pauseInterface(this.parseString(b[0])):!1;case "contraption.interfaceanimplay":return b.length>0?p.contraptions.playInterface(this.parseString(b[0])):!1;case "contraption.interfacehide":return b.length>0?(p.contraptions.hideInterface(this.parseString(b[0])),!0):!1;case "contraption.interfacehideall":return p.contraptions.hideAllInterfaces(),!0;case "contraption.interfacetext":return b.length>1?p.contraptions.setInterfaceText(this.parseString(b[0]),
this.parseString(b[1])):!1;case "contraption.menu":if(b.length>=6&&(g=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(p.contraptions.menus.h,g))){n=this.parseString(b[1]).split(";");h=[];for(f=0;f<n.length;)d=n[f],++f,h.push(this.parseString(N.trim(d)));f=null;Object.prototype.hasOwnProperty.call(a,"select")&&(f=y.field(a,"select"));return p.contraptions.menuShow(g,h,this.parseString(b[2]),f,this.parseString(b[3]),this.parseInt(b[4]),this.parseInt(b[5]))}return!1;case "contraption.menuhide":return p.contraptions.menuHide(),
!0;case "contraption.message":return b.length>=4&&(g=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(p.contraptions.messages.h,g))?(n=this.parseString(b[2]).split(";"),f=null,Object.prototype.hasOwnProperty.call(a,"select")&&(f=y.field(a,"select")),p.contraptions.messagesShow(g,this.parseString(b[1]),n,this.parseString(b[3]),f)):!1;case "contraption.messagehide":return p.contraptions.messagesHide(),!0;case "contraption.musicpause":return p.contraptions.musicPause(),!0;case "contraption.musicplay":return b.length>
0?p.contraptions.musicPlay(this.parseString(b[0])):!1;case "contraption.musicstop":return p.contraptions.musicStop(),!0;case "contraption.musicvolume":return b.length>0?(p.contraptions.musicVolume(this.parseInt(b[0])),!0):!1;case "contraption.showloading":return p.contraptions.showLoadingIc(),!0;case "contraption.soudstop":return b.length>0?p.contraptions.soundStop(this.parseString(b[0])):p.contraptions.soundStop(),!0;case "contraption.soundpause":return b.length>0?p.contraptions.soundPause(this.parseString(b[0])):
p.contraptions.soundPause(),!0;case "contraption.soundplay":return b.length>0?p.contraptions.soundPlay(this.parseString(b[0])):!1;case "contraption.soundvolume":return b.length>1?(p.contraptions.soundVolume(this.parseInt(b[0]),this.parseString(b[1])),!0):b.length>0?(p.contraptions.soundVolume(this.parseInt(b[0])),!0):!1;case "css.clear":return p.style.clear(),!0;case "css.set":return p.style.parseCSS(this.parseString(b[0])),!0;case "data.event":a=[];if(b.length>1)for(f=1,g=b.length;f<g;)n=f++,V.substr(H.string(b[n]),
0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,V.substr(H.string(b[n]),1,null))?a.push(this._ints.h[V.substr(H.string(b[n]),1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,V.substr(H.string(b[n]),1,null))?a.push(this._floats.h[V.substr(H.string(b[n]),1,null)]):a.push(this.parseString(b[n])):V.substr(H.string(b[n]),0,1)=="?"?Object.prototype.hasOwnProperty.call(this._bools.h,V.substr(H.string(b[n]),1,null))?a.push(this._bools.h[V.substr(H.string(b[n]),1,null)]):a.push(this.parseString(b[n])):
a.push(this.parseString(b[n]));f=new G;g=this.parseString(b[0]);f.h.name=g;g=V.dateStr(new Date);f.h.when=g;g=Ga.jsonStringify(a);f.h.data=g;g=p.movie.get_mvId();f.h.movieid=g;g=p.movie.get_scId();f.h.sceneid=g;f.h.movietitle=p.mdata.title;f.h.scenetitle=p.movie.scene.title;g=p.ws.get_user();f.h.visitor=g;f.h.sessionid=p.session;this._lastEvent=f;p.ws.send("Visitor/Event",this._lastEvent,m(this,this.onDataEvent));return!0;case "data.eventclear":try{var l=Xe.getLocal(p.movie.get_mvId()+"_eventsheld");
l.data.events=[];l.flush();l.close()}catch(F){}return!0;case "data.liststates":return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),p.area.showStatesInput(this._acOk,this._acError),!0;case "data.load":this._acOk=this._acError=null;if(p.ws.userLogged()&&b.length>0)return Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),
Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),p.ws.dataLoad(this.parseString(b[0]),m(this,this.onDataLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "data.loadlocal":this._acOk=this._acError=null;if(b.length>0){try{if(d=Xe.getLocal(p.movie.get_mvId()+"_"+this.parseString(b[0])),Object.prototype.hasOwnProperty.call(d.data,"values")){var q=Ga.jsonParse(y.field(d.data,"values"));if(q==0)Object.prototype.hasOwnProperty.call(a,
"error")&&this.run(y.field(a,"error"),!0);else{f=0;for(g=y.fields(q);f<g.length;){n=g[f];++f;var u=y.field(q,n);switch(y.field(u,"t")){case "B":h=y.field(u,"v");this._bools.h[y.field(u,"n")]=h;break;case "F":var v=y.field(u,"v");this._floats.h[y.field(u,"n")]=v;break;case "I":var z=y.field(u,"v");this._ints.h[y.field(u,"n")]=z;break;case "S":var r=y.field(u,"v");this._strings.h[y.field(u,"n")]=r}}Object.prototype.hasOwnProperty.call(a,"success")&&this.run(y.field(a,"success"),!0)}}else Object.prototype.hasOwnProperty.call(a,
"error")&&this.run(y.field(a,"error"),!0)}catch(F){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0)}return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "data.loadquickstate":this._acOk=this._acError=null;if(p.ws.userLogged())return Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),p.ws.stateLoad("",
!0,m(this,this.onStateLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "data.loadstate":this._acOk=this._acError=null;if(p.ws.userLogged()&&b.length>0)return Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),p.ws.stateLoad(this.parseString(b[0]),!1,m(this,this.onStateLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&
this.run(y.field(a,"error"),!0);return!1;case "data.loadstatelocal":this._acOk=this._acError=null;try{if(d=Xe.getLocal(p.movie.get_mvId()+"_state"),Object.prototype.hasOwnProperty.call(d.data,"values")&&Object.prototype.hasOwnProperty.call(d.data,"scene"))if(q=Ga.jsonParse(y.field(d.data,"values")),q==0)Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);else{f=0;for(g=y.fields(q);f<g.length;)switch(n=g[f],++f,u=y.field(q,n),y.field(u,"t")){case "B":h=y.field(u,"v");this._bools.h[y.field(u,
"n")]=h;break;case "F":v=y.field(u,"v");this._floats.h[y.field(u,"n")]=v;break;case "I":z=y.field(u,"v");this._ints.h[y.field(u,"n")]=z;break;case "S":r=y.field(u,"v"),this._strings.h[y.field(u,"n")]=r}Object.prototype.hasOwnProperty.call(a,"success")&&this.run(y.field(a,"success"),!0)}else Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0)}catch(F){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0)}return!0;case "data.save":this._acOk=this._acError=
null;if(p.ws.userLogged()&&b.length>1){h=[];f=1;for(g=b.length;f<g;)n=f++,u=this.getValueObj(b[n]),u!=null&&h.push(u);h.length==0?Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0):(Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),p.ws.dataSave(this.parseString(b[0]),h,m(this,this.onDataSave)));return!0}Object.prototype.hasOwnProperty.call(a,"error")&&
this.run(y.field(a,"error"),!0);return!1;case "data.savelocal":this._acOk=this._acError=null;if(b.length>1){h=[];f=1;for(g=b.length;f<g;)n=f++,u=this.getValueObj(b[n]),u!=null&&h.push(u);if(h.length==0)Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);else try{d=Xe.getLocal(p.movie.get_mvId()+"_"+this.parseString(b[0])),d.data.values=Ga.jsonStringify(h),d.flush(),Object.prototype.hasOwnProperty.call(a,"success")&&this.run(y.field(a,"success"),!0)}catch(F){Object.prototype.hasOwnProperty.call(a,
"error")&&this.run(y.field(a,"error"),!0)}return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "data.savequickstate":this._acOk=this._acError=null;if(p.ws.userLogged()){h=[];c=this._strings.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"S",v:this._strings.h[n]});c=this._floats.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"F",v:this._floats.h[n]});c=this._ints.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],
h.push({n,t:"I",v:this._ints.h[n]});c=this._bools.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"B",v:this._bools.h[n]});Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error"));a="";b.length>0&&(a=this.parseString(b[0]));p.ws.stateSave(h,!0,a,m(this,this.onDataSave));return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "data.savestate":this._acOk=
this._acError=null;if(p.ws.userLogged()){h=[];c=this._strings.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"S",v:this._strings.h[n]});c=this._floats.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"F",v:this._floats.h[n]});c=this._ints.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"I",v:this._ints.h[n]});c=this._bools.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"B",v:this._bools.h[n]});Object.prototype.hasOwnProperty.call(a,
"success")&&(this._acOk=y.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error"));a="";b.length>0&&(a=this.parseString(b[0]));p.ws.stateSave(h,!1,a,m(this,this.onDataSave));return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "data.savestatelocal":this._acOk=this._acError=null;h=[];c=this._strings.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"S",v:this._strings.h[n]});c=this._floats.h;
f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"F",v:this._floats.h[n]});c=this._ints.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"I",v:this._ints.h[n]});c=this._bools.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)n=f[c++],h.push({n,t:"B",v:this._bools.h[n]});Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error"));try{d=Xe.getLocal(p.movie.get_mvId()+"_state"),
d.data.values=Ga.jsonStringify(h),d.data.scene=p.movie.get_scId(),d.flush(),Object.prototype.hasOwnProperty.call(a,"success")&&this.run(y.field(a,"success"),!0)}catch(F){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0)}return!0;case "dialogue.close":return this._diagInfo!=null?(this._diagInfo.close(),this._diagInfo=null,!0):!1;case "dialogue.first":return this._diagInfo!=null?(this._diagInfo.first(),!0):!1;case "dialogue.last":return this._diagInfo!=null?(this._diagInfo.last(),
!0):!1;case "dialogue.loadgroup":this._currDiag="";this._diagInfo=null;if(b.length>0){this._acOk=this._acError=null;d=p.narrative.dialogues;f=this.parseString(b[0]);if(Object.prototype.hasOwnProperty.call(d.h,f))return this._currDiag=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),d=p.narrative.dialogues,f=this.parseString(b[0]),d.h[f].loadContents(m(this,
this.onDiagGroup)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "dialogue.next":return this._diagInfo!=null?(this._diagInfo.next(),!0):!1;case "dialogue.previous":return this._diagInfo!=null?(this._diagInfo.previous(),!0):!1;case "dialogue.start":return this._diagInfo=null,b.length!=0&&this._currDiag!=""&&Object.prototype.hasOwnProperty.call(p.narrative.dialogues.h,
this._currDiag)&&(d=p.narrative.dialogues.h[this._currDiag].diags,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=p.narrative.dialogues.h[this._currDiag].diags,f=this.parseString(b[0]),this._diagInfo=d.h[f],this._diagInfo.show(0),!0):!1;case "float.abs":return b.length>1?(d=this._floats,g=this.parseString(b[0]),h=Math.abs(this.parseFloat(b[1])),d.h[g]=h,!0):!1;case "float.clear":return this.clearFloat(b[0]);case "float.clearall":return this.clearVars("floats");case "float.divide":if(b.length>
2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])/this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=this._floats,h=this._floats.h[a]/this.parseFloat(b[n]),d.h[a]=h;return!0}return!1;case "float.max":return b.length>2?(d=this._floats,g=this.parseString(b[0]),h=Math.max(this.parseFloat(b[1]),this.parseFloat(b[2])),d.h[g]=h,!0):!1;case "float.min":return b.length>2?(d=this._floats,g=this.parseString(b[0]),h=Math.min(this.parseFloat(b[1]),this.parseFloat(b[2])),
d.h[g]=h,!0):!1;case "float.multiply":if(b.length>2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])*this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=a,c=this._floats,h=c.h[d]*this.parseFloat(b[n]),c.h[d]=h;return!0}return!1;case "float.random":return b.length>2?(a=this.parseFloat(b[1]),f=Math.abs(this.parseFloat(b[2])-a),d=this._floats,g=this.parseString(b[0]),h=a+Math.random()*f,d.h[g]=h,!0):!1;case "float.set":return this.setFloat(b[0],b[1]);case "float.subtract":if(b.length>
2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])-this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=a,c=this._floats,h=c.h[d]-this.parseFloat(b[n]),c.h[d]=h;return!0}return!1;case "float.sum":if(b.length>2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])+this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=a,c=this._floats,h=c.h[d]+this.parseFloat(b[n]),c.h[d]=h;return!0}return!1;case "float.toint":return b.length>
1?(d=this._ints,g=this.parseString(b[0]),h=Math.round(this.parseFloat(b[1])),d.h[g]=h,!0):!1;case "float.tostring":return b.length>1?(d=this._strings,g=this.parseString(b[0]),h=H.string(this.parseFloat(b[1])),d.h[g]=h,!0):!1;case "if.bool":return b.length>0&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseBool(b[0])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.boolset":return b.length>0?(d=this._bools,f=this.parseString(b[0]),
Object.prototype.hasOwnProperty.call(d.h,f)?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0):!1;case "if.floatgreater":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])>this.parseFloat(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.floatgreaterequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?
this.parseFloat(b[0])>=this.parseFloat(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.floatlower":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])<this.parseFloat(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.floatlowerequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])<=
this.parseFloat(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.floatsdifferent":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])!=this.parseFloat(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.floatsequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])==this.parseFloat(b[1])?
this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.floatset":return b.length>0?(d=this._floats,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0):!1;case "if.intgreater":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])>this.parseInt(b[1])?this.run(y.field(a,"then"),
!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.intgreaterequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])>=this.parseInt(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.intlower":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])<this.parseInt(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,
"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.intlowerequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])<=this.parseInt(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.intsdifferent":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])!=this.parseInt(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,
"else"),!0):!0:!1;case "if.intsequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])==this.parseInt(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.intset":return b.length>0?(d=this._ints,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0):!1;case "if.replacefileset":return b.length>
0?(d=this._replacefile,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0):!1;case "if.replacestringset":return b.length>0?(d=this._replacestr,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0):!1;case "if.stringcontains":return b.length>1&&
Object.prototype.hasOwnProperty.call(a,"then")?this.parseString(b[0]).indexOf(this.parseString(b[1]))!=-1?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.stringemail":return b.length>0&&Object.prototype.hasOwnProperty.call(a,"then")?Ga.validateEmail(this.parseString(b[0]))?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.stringendswith":return b.length>
1&&Object.prototype.hasOwnProperty.call(a,"then")?N.endsWith(this.parseString(b[0]),this.parseString(b[1]))?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.stringsdifferent":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseString(b[0])!=this.parseString(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.stringsequal":return b.length>
1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseString(b[0])==this.parseString(b[1])?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "if.stringset":return b.length>0?(d=this._strings,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0):!1;case "if.stringstartswith":return b.length>1&&Object.prototype.hasOwnProperty.call(a,
"then")?N.startsWith(this.parseString(b[0]),this.parseString(b[1]))?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "input.add":return p.mode=="editor"?!0:b.length==4?(p.area.addInput(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):b.length>4?(p.area.addInput(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseString(b[4])),!0):!1;case "input.addnumeric":return p.mode==
"editor"?!0:b.length>4?(p.area.addNumeric(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseInt(b[4])),!0):!1;case "input.addtarea":return p.mode=="editor"?!0:b.length==5?(p.area.addTarea(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseInt(b[4])),!0):!1;case "input.addtoggle":return p.mode=="editor"?!0:b.length>3?(p.area.addToggle(this.parseString(b[0]),this.parseBool(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),
!0):!1;case "input.email":if(b.length>1){d=h=null;Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=y.field(a,"cancel"));a=[];if(b.length>2)for(f=2,g=b.length;f<g;)n=f++,a.push(this.parseString(b[n]));p.area.showEmailInput(this.parseString(b[0]),this.parseString(b[1]),a,h,d);return!0}return!1;case "input.float":return b.length>1?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,
"cancel")&&(d=y.field(a,"cancel")),a=1,f=0,g=100,b.length>2&&(a=this.parseInt(b[2])),b.length>3&&(f=this.parseInt(b[3])),b.length>4&&(g=this.parseInt(b[4])),p.area.showNumericInput("float",this.parseString(b[0]),this.parseString(b[1]),h,d,a,f,g),!0):!1;case "input.int":return b.length>1?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=y.field(a,"cancel")),a=1,f=0,g=100,b.length>2&&(a=this.parseInt(b[2])),b.length>3&&(f=
this.parseInt(b[3])),b.length>4&&(g=this.parseInt(b[4])),p.area.showNumericInput("int",this.parseString(b[0]),this.parseString(b[1]),h,d,a,f,g),!0):!1;case "input.inverttoggle":return b.length>0?(p.area.invertToggle(this.parseString(b[0])),!0):!1;case "input.list":if(b.length>3){d=h=null;Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=y.field(a,"cancel"));c=[];f=2;for(g=b.length;f<g;)n=f++,c.push(this.parseString(b[n]));p.area.showListInput(this.parseString(b[0]),
this.parseString(b[1]),c,h,d);return!0}return!1;case "input.login":return d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=y.field(a,"cancel")),p.area.showLoginInput(h,d),!0;case "input.message":if(b.length>1){d=h=null;Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=y.field(a,"cancel"));c=!1;try{w.__cast(d,Array),c=!0}catch(F){c=!1}c||(d=null);p.area.showMessageInput(this.parseString(b[0]),
this.parseString(b[1]),h,d);return!0}return!1;case "input.place":return b.length>3?(p.area.placeInput(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "input.placenumeric":return b.length>3?(p.area.placeNumeric(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "input.placetarea":return b.length>4?(p.area.placeTarea(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseInt(b[4])),
!0):!1;case "input.placetoggle":return b.length>2?(p.area.placeToggle(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2])),!0):!1;case "input.remove":return b.length>0?(p.area.removeInput(this.parseString(b[0])),!0):!1;case "input.removeall":return p.area.removeAllInputs(),!0;case "input.removeallnumerics":return p.area.removeAllNumerics(),!0;case "input.removealltareas":return p.area.removeAllTareas(),!0;case "input.removealltoggles":return p.area.removeAllToggles(),!0;case "input.removenumeric":return b.length>
0?(p.area.removeNumeric(this.parseString(b[0])),!0):!1;case "input.removetarea":return b.length>0?(p.area.removeTarea(this.parseString(b[0])),!0):!1;case "input.removetoggle":return b.length>0?(p.area.removeToggle(this.parseString(b[0])),!0):!1;case "input.setnumeric":return b.length>1?(p.area.setNumericValue(this.parseString(b[0]),this.parseInt(b[1])),!0):!1;case "input.setnumericbounds":return b.length>1?(p.area.setNumericBounds(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),
!0):!1;case "input.setpassword":return b.length>1?(p.area.setInputPassword(this.parseString(b[0]),this.parseBool(b[1])),!0):!1;case "input.settext":return b.length>1?(p.area.setInputText(this.parseString(b[0]),this.parseString(b[1])),!0):!1;case "input.settextarea":return b.length>1?(p.area.setTareaText(this.parseString(b[0]),this.parseString(b[1])),!0):!1;case "input.settoggle":return b.length>1?(p.area.setToggleValue(this.parseString(b[0]),this.parseBool(b[1])),!0):!1;case "input.string":return b.length>
1?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=y.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=y.field(a,"cancel")),p.area.showTextInput(this.parseString(b[0]),this.parseString(b[1]),h,d),!0):!1;case "instance.clearall":return p.area.releaseAllProperties(this.parseString(b[0]));case "instance.clearalpha":return p.area.releaseProperty(this.parseString(b[0]),"alpha");case "instance.clearcolor":return p.area.releaseProperty(this.parseString(b[0]),"color");case "instance.clearcoloralpha":return p.area.releaseProperty(this.parseString(b[0]),
"colorAlpha");case "instance.clearfont":return p.area.releaseProperty(this.parseString(b[0]),"textFont");case "instance.clearfontalign":return p.area.releaseProperty(this.parseString(b[0]),"textAlign");case "instance.clearfontbackground":return p.area.releaseProperty(this.parseString(b[0]),"textBackground");case "instance.clearfontbold":return p.area.releaseProperty(this.parseString(b[0]),"textBold");case "instance.clearfontcolor":return p.area.releaseProperty(this.parseString(b[0]),"textColor");
case "instance.clearfontitalic":return p.area.releaseProperty(this.parseString(b[0]),"textItalic");case "instance.clearfontleading":return p.area.releaseProperty(this.parseString(b[0]),"textLeading");case "instance.clearfontsize":return p.area.releaseProperty(this.parseString(b[0]),"textSize");case "instance.clearfontspacing":return p.area.releaseProperty(this.parseString(b[0]),"textSpacing");case "instance.clearheight":return p.area.releaseProperty(this.parseString(b[0]),"height");case "instance.clearmove":if(b.length>
0){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.releaseProperty(f.getInstName(),"x");p.area.releaseProperty(f.getInstName(),"y");return!0}return!1;case "instance.clearorder":return p.area.releaseProperty(this.parseString(b[0]),"order");case "instance.clearpan":return p.area.releaseProperty(this.parseString(b[0]),"pan");case "instance.clearrotation":return p.area.releaseProperty(this.parseString(b[0]),"rotation");case "instance.clearvisible":return p.area.releaseProperty(this.parseString(b[0]),
"visible");case "instance.clearvolume":return p.area.releaseProperty(this.parseString(b[0]),"volume");case "instance.clearwidth":return p.area.releaseProperty(this.parseString(b[0]),"width");case "instance.clearx":return p.area.releaseProperty(this.parseString(b[0]),"x");case "instance.cleary":return p.area.releaseProperty(this.parseString(b[0]),"y");case "instance.clearzoom":if(b.length>0){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.releaseProperty(f.getInstName(),"width");
p.area.releaseProperty(f.getInstName(),"height");p.area.releaseProperty(f.getInstName(),"x");p.area.releaseProperty(f.getInstName(),"y");return!0}return!1;case "instance.isoverlapping":return b.length>1?(f=p.area.pickInstance(this.parseString(b[0])),b=p.area.pickInstance(this.parseString(b[1])),f==null||b==null?Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:f.hitTestObject(b)?Object.prototype.hasOwnProperty.call(a,"then")?this.run(y.field(a,"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,
"else")?this.run(y.field(a,"else"),!0):!0):!1;case "instance.lesszoom":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;a=this.parseFloat(b[1]);b=f.get_width()*(1-a/100);a=f.get_height()*(1-a/100);g=f.get_x()-(b-f.get_width())/2;n=f.get_y()-(a-f.get_height())/2;p.area.setProperty(f.getInstName(),"width",b,b);p.area.setProperty(f.getInstName(),"height",a,a);p.area.setProperty(f.getInstName(),"x",g,g);p.area.setProperty(f.getInstName(),"y",n,n);return!0}return!1;case "instance.loadasset":return p.area.loadAsset(this.parseString(b[0]),
this.parseString(b[1]));case "instance.morezoom":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;a=this.parseFloat(b[1]);b=f.get_width()*(1+a/100);a=f.get_height()*(1+a/100);g=f.get_x()-(b-f.get_width())/2;n=f.get_y()-(a-f.get_height())/2;p.area.setProperty(f.getInstName(),"width",b,b);p.area.setProperty(f.getInstName(),"height",a,a);p.area.setProperty(f.getInstName(),"x",g,g);p.area.setProperty(f.getInstName(),"y",n,n);return!0}return!1;case "instance.movedown":if(b.length>
1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.setProperty(f.getInstName(),"y",f.get_y()+this.parseFloat(b[1]),f.get_y()-this.parseFloat(b[1]));return!0}return!1;case "instance.moveleft":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.setProperty(f.getInstName(),"x",f.get_x()-this.parseFloat(b[1]),f.get_x()-this.parseFloat(b[1]));return!0}return!1;case "instance.moveright":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));
if(f==null)return!1;p.area.setProperty(f.getInstName(),"x",f.get_x()+this.parseFloat(b[1]),f.get_x()-this.parseFloat(b[1]));return!0}return!1;case "instance.moveup":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.setProperty(f.getInstName(),"y",f.get_y()-this.parseFloat(b[1]),f.get_y()-this.parseFloat(b[1]));return!0}return!1;case "instance.next":return p.area.next(this.parseString(b[0]));case "instance.pause":return p.area.pauseInstance(this.parseString(b[0]));
case "instance.play":return p.area.playInstance(this.parseString(b[0]));case "instance.playpause":return p.area.playPauseInstance(this.parseString(b[0]));case "instance.previous":return p.area.previous(this.parseString(b[0]));case "instance.scrollbottom":return p.area.textScroll(this.parseString(b[0]),2);case "instance.scrolldown":return p.area.textScroll(this.parseString(b[0]),1);case "instance.scrolltop":return p.area.textScroll(this.parseString(b[0]),0);case "instance.scrollup":return p.area.textScroll(this.parseString(b[0]),
-1);case "instance.seek":return p.area.instanceSeek(this.parseString(b[0]),this.parseInt(b[1]));case "instance.setalpha":return b.length==2?p.area.setProperty(this.parseString(b[0]),"alpha",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"alpha",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setcolor":return b.length==2?p.area.setProperty(this.parseString(b[0]),"color",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"color",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setcoloralpha":return b.length==2?p.area.setProperty(this.parseString(b[0]),"colorAlpha",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"colorAlpha",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setfont":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textFont",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textFont",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontalign":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textAlign",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textAlign",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontbackground":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textBackground",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textBackground",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontbold":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textBold",this.parseBool(b[1]),this.parseBool(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textBold",this.parseBool(b[1]),this.parseBool(b[2])):!1;case "instance.setfontcolor":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textColor",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textColor",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontitalic":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textItalic",this.parseBool(b[1]),this.parseBool(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textItalic",this.parseBool(b[1]),this.parseBool(b[2])):!1;case "instance.setfontleading":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textLeading",this.parseInt(b[1]),this.parseInt(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textLeading",this.parseInt(b[1]),this.parseInt(b[2])):!1;case "instance.setfontsize":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textSize",this.parseInt(b[1]),this.parseInt(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textSize",this.parseInt(b[1]),this.parseInt(b[2])):!1;case "instance.setfontspacing":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textSpacing",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textSpacing",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setheight":return b.length==2?p.area.setProperty(this.parseString(b[0]),"height",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"height",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setorder":return b.length==2?p.area.setProperty(this.parseString(b[0]),"order",this.parseInt(b[1]),this.parseInt(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"order",this.parseInt(b[1]),this.parseInt(b[2])):!1;case "instance.setpan":return b.length==2?p.area.setProperty(this.parseString(b[0]),"pan",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"pan",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setparagraph":return p.area.setText(this.parseString(b[0]),this.parseString(b[1]));case "instance.setrotation":return b.length==2?p.area.setProperty(this.parseString(b[0]),"rotation",this.parseFloat(b[1]),
this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"rotation",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setvisible":return b.length==2?p.area.setProperty(this.parseString(b[0]),"visible",this.parseBool(b[1]),this.parseBool(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"visible",this.parseBool(b[1]),this.parseBool(b[2])):!1;case "instance.setvolume":return b.length==2?p.area.setProperty(this.parseString(b[0]),"volume",this.parseFloat(b[1]),
this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"volume",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setwidth":return b.length==2?p.area.setProperty(this.parseString(b[0]),"width",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"width",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setx":return b.length==2?p.area.setProperty(this.parseString(b[0]),"x",this.parseFloat(b[1]),this.parseFloat(b[1])):
b.length>=3?p.area.setProperty(this.parseString(b[0]),"x",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.sety":return b.length==2?p.area.setProperty(this.parseString(b[0]),"y",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"y",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.startdrag":if(b.length>0){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;this._acOk=null;Object.prototype.hasOwnProperty.call(a,
"complete")&&(this._acOk=y.field(a,"complete"));this.onDrag=f;p.usingTarget==0&&(p.area.hasEventListener("mouseMove")||p.area.addEventListener("mouseMove",m(this,this.onDragMove)),p.area.stage.hasEventListener("mouseUp")||p.area.stage.addEventListener("mouseUp",m(this,this.onDragMoveStop)));return!0}return!1;case "instance.stop":return p.area.stopInstance(this.parseString(b[0]));case "instance.stopdrag":return this.onDragMoveStop(null),!0;case "instance.zoom":return b.length>0?p.contraptions.zoomInstance(this.parseString(b[0])):
!1;case "int.abs":return b.length>1?(d=this._ints,g=this.parseString(b[0]),h=Math.round(Math.abs(this.parseInt(b[1]))),d.h[g]=h,!0):!1;case "int.clear":return this.clearInt(b[0]);case "int.clearall":return this.clearVars("ints");case "int.divide":if(b.length>2){a=this.parseString(b[0]);d=this._ints;h=Math.round(this.parseInt(b[1])/this.parseInt(b[2]));d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=this._ints,h=Math.round(this._ints.h[a]/this.parseInt(b[n])),d.h[a]=h;return!0}return!1;case "int.max":return b.length>
2?(d=this._ints,g=this.parseString(b[0]),h=Math.round(Math.max(this.parseInt(b[1]),this.parseInt(b[2]))),d.h[g]=h,!0):!1;case "int.min":return b.length>2?(d=this._ints,g=this.parseString(b[0]),h=Math.round(Math.min(this.parseInt(b[1]),this.parseInt(b[2]))),d.h[g]=h,!0):!1;case "int.multiply":if(b.length>2){a=this.parseString(b[0]);d=this._ints;h=this.parseInt(b[1])*this.parseInt(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=a,c=this._ints,h=c.h[d]*this.parseInt(b[n]),c.h[d]=h;return!0}return!1;
case "int.random":return b.length>2?(a=this.parseInt(b[1]),f=Math.round(Math.abs(this.parseInt(b[2])-a)),d=this._ints,g=this.parseString(b[0]),h=a+Math.round(Math.random()*f),d.h[g]=h,!0):!1;case "int.set":return this.setInt(b[0],b[1]);case "int.subtract":if(b.length>2){a=this.parseString(b[0]);d=this._ints;h=this.parseInt(b[1])-this.parseInt(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=a,c=this._ints,h=c.h[d]-this.parseInt(b[n]),c.h[d]=h;return!0}return!1;case "int.sum":if(b.length>
2){a=this.parseString(b[0]);d=this._ints;h=this.parseInt(b[1])+this.parseInt(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,d=a,c=this._ints,h=c.h[d]+this.parseInt(b[n]),c.h[d]=h;return!0}return!1;case "int.tofloat":return b.length>1?(d=this._floats,g=this.parseString(b[0]),h=this.parseInt(b[1])*1,d.h[g]=h,!0):!1;case "int.tostring":return b.length>1?(d=this._strings,g=this.parseString(b[0]),h=H.string(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "inventory.addconsumable":return b.length>
1?(p.narrative.addConsumableItem(this.parseString(b[0]),this.parseInt(b[1])),!0):!1;case "inventory.addkeyitem":return b.length>0?(p.narrative.addKeyItem(this.parseString(b[0])),!0):!1;case "inventory.clearconsumables":return p.narrative.clearConsumableItems(),!0;case "inventory.clearkeyitems":return p.narrative.clearKeyItems(),!0;case "inventory.close":return p.contraptions.invHide(),!0;case "inventory.consfromstring":return b.length>0?(a=p.narrative,d=this._strings,f=this.parseString(b[0]),a.loadConsItems(d.h[f]),
!0):!1;case "inventory.constostring":return b.length>0?(d=this._strings,g=this.parseString(b[0]),h=p.narrative.currentConsItems(),d.h[g]=h,!0):!1;case "inventory.consumeitem":return b.length>0?(p.narrative.consumeItem(this.parseString(b[0])),!0):!1;case "inventory.fromstring":return b.length>0?(a=p.narrative,d=this._strings,f=this.parseString(b[0]),a.loadItems(d.h[f]),!0):!1;case "inventory.haskeyitem":return b.length>0?(p.narrative.hasKeyItem(this.parseString(b[0]))?Object.prototype.hasOwnProperty.call(a,
"then")&&this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")&&this.run(y.field(a,"else"),!0),!0):!1;case "inventory.keyfromstring":return b.length>0?(a=p.narrative,d=this._strings,f=this.parseString(b[0]),a.loadKeyItems(d.h[f]),!0):!1;case "inventory.keytostring":return b.length>0?(d=this._strings,g=this.parseString(b[0]),h=p.narrative.currentKeyItems(),d.h[g]=h,!0):!1;case "inventory.removeconsumable":return b.length>0?(p.narrative.removeConsumableItem(this.parseString(b[0])),
!0):!1;case "inventory.removekeyitem":return b.length>0?(p.narrative.removeKeyItem(this.parseString(b[0])),!0):!1;case "inventory.show":return b=null,Object.prototype.hasOwnProperty.call(a,"complete")&&(b=y.field(a,"complete")),p.contraptions.inventoryShow(b),!0;case "inventory.tostring":return b.length>0?(d=this._strings,g=this.parseString(b[0]),h=p.narrative.currentItems(),d.h[g]=h,!0):!1;case "mouse.hide":return xd.hide(),p.cursorVisible=!1,p.area.noMouseOver(),!0;case "mouse.show":return p.cursorVisible=
!0,xd.show(),!0;case "movie.load":return p.contraptions.removeContraptions(!0),p.movie.loadMovie(this.parseString(b[0])),!0;case "replace.clearallfiles":return this._replacefile=new G,!0;case "replace.clearallstrings":return this._replacestr=new G,!0;case "replace.clearfile":return b.length>0?(d=this._replacefile,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)&&(d=this._replacefile,f=this.parseString(b[0]),n=d,Object.prototype.hasOwnProperty.call(n.h,f)&&delete n.h[f]),!0):!1;
case "replace.clearstring":return b.length>0?(d=this._replacestr,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)&&(d=this._replacestr,f=this.parseString(b[0]),n=d,Object.prototype.hasOwnProperty.call(n.h,f)&&delete n.h[f]),!0):!1;case "replace.origin":if(b.length>0){switch(this.parseString(b[0])){case "bottom":p.mdata.origin=this.parseString(b[0]);break;case "bottomkeep":p.mdata.origin=this.parseString(b[0]);break;case "center":p.mdata.origin=this.parseString(b[0]);break;case "left":p.mdata.origin=
this.parseString(b[0]);break;case "leftkeep":p.mdata.origin=this.parseString(b[0]);break;case "none":p.mdata.origin=this.parseString(b[0]);break;case "right":p.mdata.origin=this.parseString(b[0]);break;case "rightkeep":p.mdata.origin=this.parseString(b[0]);break;case "top":p.mdata.origin=this.parseString(b[0]);break;case "topkeep":p.mdata.origin=this.parseString(b[0]);break;default:p.mdata.origin="alpha"}return!0}return!1;case "replace.setfile":return b.length>1?(d=this._replacefile,g=this.parseString(b[0]),
h=this.parseString(b[1]),d.h[g]=h,!0):!1;case "replace.setstring":return b.length>1?(d=this._replacestr,g=this.parseString(b[0]),h=this.parseString(b[1]),d.h[g]=h,!0):!1;case "run":if(b.length>0){this._snpParam="      ".split(" ");b.length>=2&&(this._snpParam[0]=b[1]);b.length>=3&&(this._snpParam[1]=b[2]);b.length>=4&&(this._snpParam[2]=b[3]);b.length>=5&&(this._snpParam[3]=b[4]);b.length>=6&&(this._snpParam[4]=b[5]);b.length>=7&&(this._snpParam[5]=b[6]);b.length>=8&&(this._snpParam[6]=b[7]);n="";
c=this._dSnippets.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)for(g=h[c++],f=0,g=this._dSnippets.h[g];f<g.length;)a=g[f],++f,a.name==this.parseString(b[0])&&(n=a.code);return n==""?(d=p.mvActions,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?(d=p.mvActions,f=this.parseString(b[0]),this.run(d.h[f])):!1):this.run(n)}return!1;case "runtime.endkiosk":return!1;case "runtime.ifbrowser":return b=null,Object.prototype.hasOwnProperty.call(a,"then")&&(b=y.field(a,"then")),Object.prototype.hasOwnProperty.call(a,
"else")&&y.field(a,"else"),b!=null?this.run(b,!0):!0;case "runtime.ifdataexist":if(b.length>0)return p.existsFile(this.parseString(b[0])+"."+p.movie.get_mvId())?Object.prototype.hasOwnProperty.call(a,"then")&&this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")&&this.run(y.field(a,"else"),!0),!0;Object.prototype.hasOwnProperty.call(a,"else")&&this.run(y.field(a,"else"),!0);return!1;case "runtime.install":return!1;case "runtime.loaddata":this._acOk=this._acError=null;Object.prototype.hasOwnProperty.call(a,
"success")&&(this._acOk=y.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error"));if(b.length>0)return p.loadFile(this.parseString(b[0])+"."+p.movie.get_mvId(),p.movie.get_mvId(),m(this,this.onVariablesFile));this._acError!=null&&this.run(this._acError,!0);return!1;case "runtime.quit":return p.appQuit();case "runtime.savedata":if(b.length>0){a=[];c=this._strings.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"s",v:this._strings.h[g]});
c=this._ints.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"i",v:this._ints.h[g]});c=this._floats.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"f",v:this._floats.h[g]});c=this._bools.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"b",v:this._bools.h[g]});a=Ga.encrypt(Ga.jsonStringify(a),Ga.md5(p.movie.get_mvId()+V.substr(p.movie.get_mvId(),2,null)).toLowerCase());return p.saveFile(this.parseString(b[0])+"."+p.movie.get_mvId(),a)}return!1;
case "runtime.startkiosk":return!1;case "scene.historyback":return p.history.length>0?(p.movie.preventHistory=!0,p.movie.loadScene(p.history.pop())):!1;case "scene.load":return p.movie.loadScene(this.parseString(b[0]));case "scene.loadfirstkeyframe":return p.area.loadKeyframe(p.movie.scene.keyframes[0],0),!0;case "scene.loadkeyframe":if(b.length>0){b=this.parseInt(b[0])-1;if(b<0||b>p.movie.scene.keyframes.length-1)return!1;p.area.loadKeyframe(p.movie.scene.keyframes[b],b);return!0}return!1;case "scene.loadlastkeyframe":return p.area.loadKeyframe(p.movie.scene.keyframes[p.movie.scene.keyframes.length-
1],p.movie.scene.keyframes.length-1),!0;case "scene.navigate":return b.length>0?Object.prototype.hasOwnProperty.call(p.movie.scene.navigation.h,b[0])?p.movie.scene.navigation.h[b[0]]!=""?p.movie.loadScene(this.parseString(p.movie.scene.navigation.h[b[0]])):!1:!1:!1;case "scene.nextkeyframe":return b=p.area.get_currentKf()+1,b>=p.movie.scene.keyframes.length&&(b=0),p.area.loadKeyframe(p.movie.scene.keyframes[b],b),!0;case "scene.pause":return p.area.pause(),!0;case "scene.play":return p.area.play(),
!0;case "scene.playpause":return p.area.playPause(),!0;case "scene.previouskeyframe":return b=p.area.get_currentKf()-1,b<0&&(b=p.movie.scene.keyframes.length-1),p.area.loadKeyframe(p.movie.scene.keyframes[b],b),!0;case "scene.shake":return b.length>1?(f=null,Object.prototype.hasOwnProperty.call(a,"end")&&(f=y.field(a,"end")),Ki.shake(p.area,this.parseFloat(b[0]),this.parseFloat(b[1]),f),!0):!1;case "snippets.load":if(b.length>0)return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,
"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),a=null,p.nocache&&(f=new G,g=Math.ceil(Math.random()*1E4),f.h.rand=g,a=f),this._sngroup=this.parseString(b[0]),new Ob(!0,p.path+"media/snippets/"+this.parseString(b[0])+".json","GET",a,4,m(this,this.onSnippetFile)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "snippets.unload":return b.length>0?(d=this._dSnippets,f=this.parseString(b[0]),
Object.prototype.hasOwnProperty.call(d.h,f)&&(d=this._dSnippets,f=this.parseString(b[0]),n=d,Object.prototype.hasOwnProperty.call(n.h,f)&&delete n.h[f]),!0):!1;case "string.clear":return this.clearString(b[0]);case "string.clearall":return this.clearVars("strings");case "string.clearglobal":return b.length>1?(d=p.mdata.texts,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)&&(d=p.mdata.texts,f=this.parseString(b[0]),n=d,Object.prototype.hasOwnProperty.call(n.h,f)&&delete n.h[f]),
!0):!1;case "string.concat":if(b.length>2){a=this.parseString(b[0]);this.concatString(a,b[1],b[2]);if(b.length>3)for(f=3,g=b.length;f<g;)n=f++,this.concatString(a,"$"+a,b[n]);return!0}return!1;case "string.loadfile":if(b.length>0)return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=y.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=y.field(a,"error")),a=null,p.nocache&&(f=new G,g=Math.ceil(Math.random()*1E4),f.h.rand=
g,a=f),new Ob(!0,p.path+"media/strings/"+this.parseString(b[0])+".json","GET",a,4,m(this,this.onStringFile)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(y.field(a,"error"),!0);return!1;case "string.replace":return b.length>3?(d=this._strings,g=this.parseString(b[0]),h=N.replace(this.parseString(b[1]),this.parseString(b[2]),this.parseString(b[3])),d.h[g]=h,!0):!1;case "string.set":return b.length>1?this.setString(b[0],b[1]):!1;case "string.setglobal":return b.length>1?(d=p.mdata.texts,
g=this.parseString(b[0]),h=this.parseString(b[1]),d.h[g]=h,!0):!1;case "string.setgroup":return b.length>0?(d=this._stringsjson,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this._jsongropup=this.parseString(b[0]):this._jsongropup="",!0):!1;case "string.tofloat":return b.length>1?(d=this._floats,g=this.parseString(b[0]),h=parseFloat(this.parseString(b[1])),d.h[g]=h,!0):!1;case "string.toint":return b.length>1?(d=this._ints,g=this.parseString(b[0]),h=H.parseInt(this.parseString(b[1])),
d.h[g]=h,!0):!1;case "system.calljs":return b.length>0?(a=[],b.length>1&&a.push(this.parseString(b[1])),b.length>2&&a.push(this.parseString(b[2])),b.length>3&&a.push(this.parseString(b[3])),b.length>4&&a.push(this.parseString(b[4])),b.length>5&&a.push(this.parseString(b[5])),b.length>6&&a.push(this.parseString(b[6])),window.TBB_callJs(this.parseString(b[0]),a)):!1;case "system.closeembed":return window.embed_close(),!0;case "system.copytext":return b.length>0?p.copyText(this.parseString(b[0])):!1;
case "system.embedplace":return b.length>3?(window.embed_setposition(this.parseInt(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "system.embedreset":return window.embed_setfull(),!0;case "system.fullscreen":return p.fullscreen();case "system.ifdesktop":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.ifhorizontal":return p.area.get_pOrientation()=="horizontal"?Object.prototype.hasOwnProperty.call(a,"then")?this.run(y.field(a,
"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.ifmobile":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.ifplayer":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.ifpublish":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.ifpwa":return Object.prototype.hasOwnProperty.call(a,"else")?
this.run(y.field(a,"else"),!0):!0;case "system.ifpwainstalled":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.ifvertical":return p.area.get_pOrientation()=="vertical"?Object.prototype.hasOwnProperty.call(a,"then")?this.run(y.field(a,"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.ifwebsite":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0;case "system.logout":return p.ws.clearUser(),
!0;case "system.openembed":return p.mode=="editor"?!0:b.length>0?(window.embed_place("../movie/"+p.movie.get_mvId()+".movie/media/embed/"+this.parseString(b[0])+"/index.html"),!0):!1;case "system.openurl":return b.length>0?(b=new se(b[0]),b.method="GET",Pa.getURL(b),!0):!1;case "system.pwainstall":return!1;case "system.quit":return!1;case "system.sendevent":if(this.eventSend==null)return!1;a=new G;f=0;for(g=b.length;f<g;)n=f++,h=this.parseString(b[n]),a.h["v"+n]=h;this.eventSend(a);return!0;case "system.setkftime":return b.length>
0&&(b=this.parseInt(b[0]),b>=250)?(p.mdata.time=b/1E3,!0):!1;case "system.visitoringroup":return b.length>0&&Object.prototype.hasOwnProperty.call(a,"then")?p.ws.get_groups().indexOf(this.parseString(b[0]))!=-1?this.run(y.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(y.field(a,"else"),!0):!0:!1;case "target.clear":return p.area.clearTarget(),!0;case "target.hide":return p.area.hideTarget(),!0;case "target.set":return b.length>0?p.area.setTarget(this.parseString(b[0])):
!1;case "target.setposition":return b.length>1?(p.area.setTargetPos(this.parseInt(b[0]),this.parseInt(b[1])),!0):!1;case "target.show":return p.area.showTarget(),!0;case "target.toggle":return p.area.toggleTarget(),!0;case "timer.clear":if(p.mode=="editor")return!0;c=this._timers.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],this._timers.h[g].name==null&&(n=this._timers,Object.prototype.hasOwnProperty.call(n.h,g)&&delete n.h[g]);if(b.length>=1&&Object.prototype.hasOwnProperty.call(this._timers.h,
b[0])){try{this._timers.h[b[0]].clear()}catch(F){}n=this._timers;f=b[0];Object.prototype.hasOwnProperty.call(n.h,f)&&delete n.h[f];return!0}return!1;case "timer.clearall":if(p.mode!="editor")for(c=this._timers.h,h=Object.keys(c),d=h.length,c=0;c<d;)g=h[c++],this._timers.h[g].clear(),n=this._timers,Object.prototype.hasOwnProperty.call(n.h,g)&&delete n.h[g];return!0;case "timer.set":if(p.mode=="editor")return!0;c=this._timers.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],this._timers.h[g].name==
null&&(n=this._timers,Object.prototype.hasOwnProperty.call(n.h,g)&&delete n.h[g]);if(Object.prototype.hasOwnProperty.call(a,"tick")&&b.length==3){g=H.parseInt(b[1]);if(g==null||g<250)return!1;h=H.parseInt(b[2]);if(h==null||h<1)return!1;Object.prototype.hasOwnProperty.call(this._timers.h,b[0])&&(this._timers.h[b[0]].clear(),n=this._timers,f=b[0],Object.prototype.hasOwnProperty.call(n.h,f)&&delete n.h[f]);f=null;Object.prototype.hasOwnProperty.call(a,"end")&&(f=y.field(a,"end"));d=this._timers;h=new rw(b[0],
g,h,y.field(a,"tick"),f);d.h[b[0]]=h;return!0}return!1;default:f=n=!1;g={onthen:null,onelse:null,onok:null,oncancel:null,ontick:null,onend:null,onsuccess:null,onerror:null};Object.prototype.hasOwnProperty.call(a,"then")&&(g.onthen=y.field(a,"then"));Object.prototype.hasOwnProperty.call(a,"else")&&(g.onelse=y.field(a,"else"));Object.prototype.hasOwnProperty.call(a,"ok")&&(g.onok=y.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(g.oncancel=y.field(a,"cancel"));Object.prototype.hasOwnProperty.call(a,
"tick")&&(g.ontick=y.field(a,"tick"));Object.prototype.hasOwnProperty.call(a,"end")&&(g.onend=y.field(a,"end"));Object.prototype.hasOwnProperty.call(a,"success")&&(g.onsuccess=y.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(g.onerror=y.field(a,"error"));h=c=p.plugins.h;d=Object.keys(c);c=d.length;for(u=0;u<c;)l=h[d[u++]],l.active&&!n&&l.hasAction(y.field(a,"ac"))&&(f=l.runAction(y.field(a,"ac"),b,g),n=!0);return f}else return!1}else return!1},parsePath:function(a){for(var b=
Object.keys(this._replacefile.h),c=b.length,d=0;d<c;){var f=b[d++];a=N.replace(a,f,this._replacefile.h[f])}return a},parseString:function(a){a=this.parseStringVar(a);for(var b=Object.keys(this._replacestr.h),c=b.length,d=0;d<c;){var f=b[d++];a=N.replace(a,f,this._replacestr.h[f])}return a},parseStringVar:function(a){if(a.charAt(0)=="$"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseString(a),g.found))return g.value}if(V.substr(a,0,10)=="$_INSTANCE")if(b=
a.split(":"),b.length==2)switch(b[0]){case "$_INSTANCECOLOR":return p.area.instanceStringProp(this.parseString(b[1]),"color");case "$_INSTANCEFONT":return p.area.instanceStringProp(this.parseString(b[1]),"font");case "$_INSTANCEFONTCOLOR":return p.area.instanceStringProp(this.parseString(b[1]),"fontColor");case "$_INSTANCETEXT":return p.area.instanceStringProp(this.parseString(b[1]),"text");default:return a}else return a;else{if(V.substr(a,0,7)=="$_INPUT")return b=a.split(":"),b.length==2?p.area.getInputText(b[1]):
a;if(V.substr(a,0,7)=="$_TAREA")return b=a.split(":"),b.length==2?p.area.getTareaText(b[1]):a;if(V.substr(a,0,7)=="$_TEXTS")return b=a.split(":"),b.length==2&&(a=p.mdata.texts,c=this.parseString(b[1]),Object.prototype.hasOwnProperty.call(a.h,c))?(a=p.mdata.texts,c=this.parseString(b[1]),a.h[c]):"";if(V.substr(a,0,6)=="$_FORM")return b=a.split(":"),b.length==2?p.contraptions.getFormValue(b[1]):"";if(V.substr(a,0,7)=="$_PARAM")if(b=a.split(":"),b.length==2)switch(b[1]){case "1":return this._snpParam[0];
case "2":return this._snpParam[1];case "3":return this._snpParam[2];case "4":return this._snpParam[3];case "5":return this._snpParam[4];case "6":return this._snpParam[5];case "7":return this._snpParam[6];default:return""}else return"";else{if(this._jsongropup!=""&&Object.prototype.hasOwnProperty.call(this._stringsjson.h,this._jsongropup)&&Object.prototype.hasOwnProperty.call(this._stringsjson.h[this._jsongropup].h,a))return this._stringsjson.h[this._jsongropup].h[a];switch(a){case "$_DATE":return qc.format(new Date,
"%Y-%m-%d");case "$_DAY":return qc.format(new Date,"%d");case "$_HOUR":return qc.format(new Date,"%H");case "$_MINUTE":return qc.format(new Date,"%M");case "$_MONTH":return qc.format(new Date,"%m");case "$_MOVIEID":return p.movie.get_mvId();case "$_MOVIETITLE":return p.movie.data.title;case "$_ORIENTATION":return p.area.get_pOrientation();case "$_RENDER":return"webgl";case "$_RUNTIME":return"tilbuci";case "$_SCENEID":return p.movie.get_scId();case "$_SCENETITLE":return p.movie.scene.title;case "$_SECOND":return qc.format(new Date,
"%S");case "$_SESSION":return p.session;case "$_TIME":return qc.format(new Date,"%H:%M:%S");case "$_URLMOVIE":return p.base+"app?mv="+p.movie.get_mvId();case "$_URLSCENE":return p.base+"app?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId();case "$_USERNAME":return p.ws.getUser();case "$_VERSION":return p.build.get_version();case "$_WSSERVER":return p.ws.get_url();case "$_YEAR":return qc.format(new Date,"%Y");default:return Object.prototype.hasOwnProperty.call(this._strings.h,V.substr(a,1,null))?this._strings.h[V.substr(a,
1,null)]:Object.prototype.hasOwnProperty.call(this._stringfile.h,V.substr(a,1,null))?this._stringfile.h[V.substr(a,1,null)]:a}}}}else return a},parseBool:function(a){if(a.charAt(0)=="?"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseBool(a),g.found))return g.value}if(V.substr(a,0,10)=="?_INSTANCE")if(a=a.split(":"),a.length==2)switch(a[0]){case "?_INSTANCEFONTBOLD":return p.area.instanceBoolProp(this.parseString(a[1]),"fontBold");case "?_INSTANCEFONTITALIC":return p.area.instanceBoolProp(this.parseString(a[1]),
"fontItalic");case "?_INSTANCEPLAYING":return p.area.instancePlaying(this.parseString(a[1]));case "?_INSTANCEVISIBLE":return p.area.instanceBoolProp(this.parseString(a[1]),"visible");default:return!1}else return!1;else{if(V.substr(a,0,8)=="?_TOGGLE")return a=a.split(":"),a.length==2?p.area.getToggleValue(this.parseString(a[1])):!1;if(V.substr(a,0,7)=="?_FLAGS")return a=a.split(":"),a.length==2&&(b=p.mdata.flags,c=this.parseString(a[1]),Object.prototype.hasOwnProperty.call(b.h,c))?(b=p.mdata.flags,
c=this.parseString(a[1]),b.h[c]):!1;switch(a){case "?_HADINTERACTION":return this.hadInteraction;case "?_PLAYING":return p.area.get_playing();case "?_SERVER":return p.server;case "?_USERLOGGED":return p.ws.userLogged();default:return Object.prototype.hasOwnProperty.call(this._bools.h,V.substr(a,1,null))?this._bools.h[V.substr(a,1,null)]:V.substr(a,1,null).toLowerCase()!="true"?V.substr(a,1,null).toLowerCase()=="1":!0}}}else return a.toLowerCase()!="true"?a=="1":!0},parseFloat:function(a){if(a.charAt(0)==
"#"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseFloat(a),g.found))return g.value}if(V.substr(a,0,10)=="#_INSTANCE")if(a=a.split(":"),a.length==2)switch(a[0]){case "#_INSTANCEALPHA":return p.area.instanceProp(this.parseString(a[1]),"alpha");case "#_INSTANCECOLORALPHA":return p.area.instanceProp(this.parseString(a[1]),"colorAlpha");case "#_INSTANCEFONTLEADING":return p.area.instanceProp(this.parseString(a[1]),"fontLeading");case "#_INSTANCEFONTSIZE":return p.area.instanceProp(this.parseString(a[1]),
"fontSize");case "#_INSTANCEFONTSPACING":return p.area.instanceProp(this.parseString(a[1]),"fontSpacing");case "#_INSTANCEHEIGHT":return p.area.instanceProp(this.parseString(a[1]),"height");case "#_INSTANCEORDER":return p.area.instanceProp(this.parseString(a[1]),"order");case "#_INSTANCEPAN":return p.area.instanceProp(this.parseString(a[1]),"pan");case "#_INSTANCEROTATION":return p.area.instanceProp(this.parseString(a[1]),"rotation");case "#_INSTANCEVOLUME":return p.area.instanceProp(this.parseString(a[1]),
"volume");case "#_INSTANCEWIDTH":return p.area.instanceProp(this.parseString(a[1]),"width");case "#_INSTANCEX":return p.area.instanceProp(this.parseString(a[1]),"x");case "#_INSTANCEY":return p.area.instanceProp(this.parseString(a[1]),"y");default:return 0}else return 0;else{if(V.substr(a,0,9)=="#_NUMERIC")return a=a.split(":"),a.length==2?p.area.getNumericValue(this.parseString(a[1])):0;if(V.substr(a,0,9)=="#_NUMBERS")return a=a.split(":"),a.length==2&&(b=p.mdata.numbers,c=this.parseString(a[1]),
Object.prototype.hasOwnProperty.call(b.h,c))?(b=p.mdata.numbers,c=this.parseString(a[1]),b.h[c]):0;switch(a){case "#_AREABIG":return p.mdata.screen.big*1;case "#_AREASMALL":return p.mdata.screen.small*1;case "#_CONTENTHEIGHT":return p.contentHeight;case "#_CONTENTWIDTH":return p.contentWidth;case "#_CONTENTX":return p.contentPosition.x;case "#_CONTENTY":return p.contentPosition.y;case "#_KEYFRAME":return p.area.get_currentKf()*1;default:return Object.prototype.hasOwnProperty.call(this._floats.h,V.substr(a,
1,null))?this._floats.h[V.substr(a,1,null)]:parseFloat(V.substr(a,1,null))}}}else return parseFloat(a)},parseInt:function(a){if(a.charAt(0)=="#"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseInt(a),g.found))return g.value}if(V.substr(a,0,10)=="#_INSTANCE")if(a=a.split(":"),a.length==2)switch(a[0]){case "#_INSTANCEALPHA":return Math.round(p.area.instanceProp(this.parseString(a[1]),"alpha"));case "#_INSTANCECOLORALPHA":return Math.round(p.area.instanceProp(this.parseString(a[1]),
"colorAlpha"));case "#_INSTANCEFONTLEADING":return Math.round(p.area.instanceProp(this.parseString(a[1]),"fontLeading"));case "#_INSTANCEFONTSIZE":return Math.round(p.area.instanceProp(this.parseString(a[1]),"fontSize"));case "#_INSTANCEFONTSPACING":return Math.round(p.area.instanceProp(this.parseString(a[1]),"fontSpacing"));case "#_INSTANCEHEIGHT":return Math.round(p.area.instanceProp(this.parseString(a[1]),"height"));case "#_INSTANCEORDER":return Math.round(p.area.instanceProp(this.parseString(a[1]),
"order"));case "#_INSTANCEPAN":return Math.round(p.area.instanceProp(this.parseString(a[1]),"pan"));case "#_INSTANCEROTATION":return Math.round(p.area.instanceProp(this.parseString(a[1]),"rotation"));case "#_INSTANCEVOLUME":return Math.round(p.area.instanceProp(this.parseString(a[1]),"volume"));case "#_INSTANCEWIDTH":return Math.round(p.area.instanceProp(this.parseString(a[1]),"width"));case "#_INSTANCEX":return Math.round(p.area.instanceProp(this.parseString(a[1]),"x"));case "#_INSTANCEY":return Math.round(p.area.instanceProp(this.parseString(a[1]),
"y"));default:return 0}else return 0;else{if(V.substr(a,0,15)=="#_INVCONSUMABLE")return a=a.split(":"),a.length==2?p.narrative.consumableAmount(this.parseString(a[1])):0;if(V.substr(a,0,9)=="#_NUMERIC")return a=a.split(":"),a.length==2?p.area.getNumericValue(this.parseString(a[1])):0;if(V.substr(a,0,9)=="#_NUMBERS")return a=a.split(":"),a.length==2&&(b=p.mdata.numbers,c=this.parseString(a[1]),Object.prototype.hasOwnProperty.call(b.h,c))?(b=p.mdata.numbers,c=this.parseString(a[1]),Math.round(b.h[c])):
0;switch(a){case "#_AREABIG":return p.mdata.screen.big;case "#_AREASMALL":return p.mdata.screen.small;case "#_CONTENTHEIGHT":return Math.round(p.contentHeight);case "#_CONTENTWIDTH":return Math.round(p.contentWidth);case "#_CONTENTX":return Math.round(p.contentPosition.x);case "#_CONTENTY":return Math.round(p.contentPosition.y);case "#_KEYFRAME":return p.area.get_currentKf();default:return Object.prototype.hasOwnProperty.call(this._ints.h,V.substr(a,1,null))?this._ints.h[V.substr(a,1,null)]:H.parseInt(V.substr(a,
1,null))}}}else return H.parseInt(a)},getValueObj:function(a){a=this.parseString(a).split(":");if(a.length==2)switch(a[0]){case "B":return{n:a[1],t:"B",v:this.parseBool("?"+a[1])};case "F":return{n:a[1],t:"F",v:this.parseFloat("#"+a[1])};case "I":return{n:a[1],t:"I",v:this.parseInt("#"+a[1])};case "S":return{n:a[1],t:"S",v:this.parseString("$"+a[1])};default:return null}else return null},onDataSave:function(a,b){a?b.map.h.e==0?this._acOk!=null&&this.run(this._acOk,!0):this._acError!=null&&this.run(this._acError,
!0):this._acError!=null&&this.run(this._acError,!0)},onDataLoad:function(a,b){if(a)if(b.map.h.e==0)if(a=Ga.jsonParse(b.map.h.values),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=y.fields(a);b<c.length;){var d=c[b];++b;d=y.field(a,d);switch(y.field(d,"t")){case "B":var f=y.field(d,"v");this._bools.h[y.field(d,"n")]=f;break;case "F":f=y.field(d,"v");this._floats.h[y.field(d,"n")]=f;break;case "I":f=y.field(d,"v");this._ints.h[y.field(d,"n")]=f;break;case "S":f=y.field(d,"v"),
this._strings.h[y.field(d,"n")]=f}}this._acOk!=null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0);else this._acError!=null&&this.run(this._acError,!0)},onStateLoad:function(a,b){if(a)if(b.map.h.e==0)if(a=Ga.jsonParse(b.map.h.values),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=y.fields(a);b<c.length;){var d=c[b];++b;d=y.field(a,d);switch(y.field(d,"t")){case "B":var f=y.field(d,"v");this._bools.h[y.field(d,"n")]=f;break;case "F":f=y.field(d,
"v");this._floats.h[y.field(d,"n")]=f;break;case "I":f=y.field(d,"v");this._ints.h[y.field(d,"n")]=f;break;case "S":f=y.field(d,"v"),this._strings.h[y.field(d,"n")]=f}}this._acOk!=null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0);else this._acError!=null&&this.run(this._acError,!0)},onDragMove:function(a){if(this.onDrag!=null){var b=this.onDrag.parent.globalToLocal(new Ea(a.stageX,a.stageY));a=Math.round(b.x-this.onDrag.lastClick.x);b=Math.round(b.y-this.onDrag.lastClick.y);
p.area.setProperty(this.onDrag.getInstName(),"x",a,a);p.area.setProperty(this.onDrag.getInstName(),"y",b,b)}},onDragMoveStop:function(a){this.onDrag=null;p.area.hasEventListener("mouseMove")&&p.area.removeEventListener("mouseMove",m(this,this.onDragMove));p.area.stage.hasEventListener("mouseUp")&&p.area.stage.removeEventListener("mouseUp",m(this,this.onDragMoveStop));this._acOk!=null&&this.run(this._acOk,!0);this._acOk=null},onDataEvent:function(a,b){var c=!1,d=[];try{for(var f=Xe.getLocal(p.movie.get_mvId()+
"_eventsheld"),g=0,h=y.fields(f.data.events);g<h.length;){var n=h[g];++g;d.push(y.field(f.data.events,n))}f.close()}catch(l){}a?b.map.h.e!=0?Object.prototype.hasOwnProperty.call(this._lastEvent.h,"name")&&(c=!0):d.length>0&&(Object.prototype.hasOwnProperty.call(this._lastEvent.h,"name")||d.shift(),d.length>0&&p.ws.send("Visitor/Event",d[0],m(this,this.onDataEvent))):Object.prototype.hasOwnProperty.call(this._lastEvent.h,"name")&&(c=!0);if(c){for(d.push(this._lastEvent);d.length>100;)d.shift();try{f=
Xe.getLocal(p.movie.get_mvId()+"_eventsheld"),f.data.events=d,f.flush(),f.close()}catch(l){}}this._lastEvent=new G},__class__:Ii};var Ki=function(){};t["com.tilbuci.statictools.SpriteStatic"]=Ki;Ki.__name__="com.tilbuci.statictools.SpriteStatic";Ki.shake=function(a,b,c,d){var f=a.get_x(),g=a.get_y();Ca.timer(b).onUpdate(function(){a.set_x(f+(Math.random()*c*2-c));a.set_y(g+(Math.random()*c*2-c))}).onComplete(function(){a.set_x(f);a.set_y(g);d!=null&&p.parser.run(d,!0)})};Ki.quickJump=function(a,b,
c,d){var f=a.get_y();Ca.tween(a,b/2,{y:f-c}).ease(Ni.easeOut).onComplete(function(){Ca.tween(a,b/2,{y:f}).ease(Ni.easeIn).onComplete(function(){d!=null&&p.parser.run(d,!0)})})};Ki.pulse=function(a,b,c,d,f){var g=a.get_scaleX(),h=a.get_scaleY(),n=a.get_x(),l=a.get_y(),q=a.get_x()-(a.get_width()*c-a.get_width())/2,u=a.get_y()-(a.get_height()*c-a.get_height())/2,v=null,z=null,r=d;b/=2*d;v=function(){r>0?(--r,Ca.tween(a,b,{scaleX:c,scaleY:c,x:q,y:u}).ease(Ni.easeOut).onComplete(z)):f!=null&&p.parser.run(f,
!0)};z=function(){Ca.tween(a,b,{scaleX:g,scaleY:h,x:n,y:l}).ease(Ni.easeIn).onComplete(v)};v()};var Ga=function(){};t["com.tilbuci.statictools.StringStatic"]=Ga;Ga.__name__="com.tilbuci.statictools.StringStatic";Ga.slashURL=function(a){return a.charAt(a.length-1)=="/"?a:a+"/"};Ga.jsonParse=function(a){var b=null;try{b=(new En(a)).doParse()}catch(c){b=!1}return b};Ga.jsonStringify=function(a,b){return yg.print(a,null,b)};Ga.jsonAsMap=function(a){var b=new G;a=Ga.jsonParse(a);if(a!=0)for(var c=0,d=
y.fields(a);c<d.length;){var f=d[c];++c;var g=y.field(a,f);b.h[f]=g}return b};Ga.md5=function(a){return Mj.encode(a)};Ga.validateEmail=function(a){return(new Wa(".+@.+","i")).match(a)};Ga.stringContains=function(a,b){a=a.toLowerCase();for(var c=!1,d=0,f=b.length;d<f;){var g=d++;a.indexOf(b[g].toLowerCase())!=-1&&(c=!0)}return c};Ga.encryptKey=function(a,b,c){a=Oa.ofString(a);b=Oa.ofString(b);return(new nc(b,c)).encrypt("ctr",a,"NoPadding").toHex()};Ga.decryptKey=function(a,b,c){a=Oa.ofHex(a);b=Oa.ofString(b);
return(new nc(b,c)).decrypt("ctr",a,"NoPadding").toString()};Ga.decrypt=function(a,b){a=V.substr(a,0,a.length-10)+V.substr(a,-9,null);a=V.substr(a,2,null);try{var c=Li.decode(a),d=c.sub(0,16),f=c.sub(16,c.length-16),g=Oa.ofString(b),h=new nc;h.init(g,d);a=h.decrypt("cbc",f,"PKCS7").toString()}catch(n){a=""}return a};Ga.encrypt=function(a,b){var c=new nc,d=Oa.ofString(b);b=Oa.ofString(V.substr(Ga.random(),0,16));c.init(d,b);a=Oa.ofString(a);d=new Oa(new ArrayBuffer(b.length+a.length));d.blit(0,b,0,
b.length);d.blit(b.length,a,0,a.length);c=c.encrypt("cbc",d,"PKCS7");a=Li.encode(c);return a="TB"+V.substr(a,0,a.length-9)+"b"+V.substr(a,-9,null)};Ga.rgbToHex=function(a,b,c){var d="0x";d=a<16?d+("0"+N.hex(Math.round(a))):a>255?d+"FF":d+N.hex(Math.round(a));d=b<16?d+("0"+N.hex(Math.round(b))):b>255?d+"FF":d+N.hex(Math.round(b));return d=c<16?d+("0"+N.hex(Math.round(c))):c>255?d+"FF":d+N.hex(Math.round(c))};Ga.colorHex=function(a,b){b==null&&(b="#FFFFFF");a==null&&(a=b);a=N.replace(a,"#","0x");V.substr(a,
0,2)!="0x"&&(a="0x"+a);a=H.parseInt(a);a=a==null?b:"#"+N.hex(a,6);return a.toUpperCase()};Ga.colorInt=function(a,b){b==null&&(b="0xFFFFFF");a=N.replace(a,"#","0x");V.substr(a,0,2)!="0x"&&V.substr(a,0,2)!="0X"&&(a="0x"+a);a=H.parseInt(a);a==null&&(a=H.parseInt(b));return a};Ga.random=function(){return Ga.md5(H.string(Math.random()*1E5))};var gf=function(){this.layout=this._xmlContent=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__resizeDraggingSkin=null;this._layoutResult=new Kg;this._layoutMeasurements=
new Sb;this._ignoreChildChanges=!1;this._displayListBypassEnabled=!0;this._layoutItems=[];this.dividers=[];this.items=[];this.liveDragging=!0;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._autoSizeMode=Ve.CONTENT;this._resizingDividerIndex=-1;this._resizingTouchPointIsMouse=!1;this._resizingTouchPointID=null;fa.call(this);this.addEventListener("addedToStage",m(this,this.baseDividedBox_addedToStageHandler))};t["feathers.controls.supportClasses.BaseDividedBox"]=gf;gf.__name__=
"feathers.controls.supportClasses.BaseDividedBox";gf.__super__=fa;gf.prototype=I(fa.prototype,{resizeCursor:null,_oldDividerMouseCursor:null,_resizingTouchPointID:null,_resizingTouchPointIsMouse:null,_resizingDividerIndex:null,_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this.stage!=null&&(this._autoSizeMode==Ve.STAGE?(this.stage.addEventListener("resize",
m(this,this.baseDividedBox_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.baseDividedBox_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.baseDividedBox_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.baseDividedBox_removedFromStageHandler))));return this._autoSizeMode},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_currentResizeDraggingSkin:null,liveDragging:null,_dividerFactory:null,get_dividerFactory:function(){return this._dividerFactory},
set_dividerFactory:function(a){if(this._dividerFactory==a)return this._dividerFactory;if(this.items.length>1)for(var b=1,c=this.items.length;b<c;){var d=b++,f=d*2,g=f+(this._currentBackgroundSkin!=null?1:0);d=this.removeRawChildAt(g-1);this.destroyDivider(w.__cast(d,Ja),this._dividerFactory)}this._dividerFactory=a;if(this.items.length>1)for(b=1,c=this.items.length;b<c;)d=b++,f=d*2,g=f+(this._currentBackgroundSkin!=null?1:0),a=this.createDivider(),this.addRawChildAt(a,g-1),this.dividers[d-1]=a,this._layoutItems[f-
1]=a;this.setInvalid(x.LAYOUT);return this._dividerFactory},items:null,dividers:null,_layoutItems:null,_displayListBypassEnabled:null,_ignoreChildChanges:null,_layoutMeasurements:null,_layoutResult:null,layout:null,_xmlContent:null,get_xmlContent:function(){return this._xmlContent},set_xmlContent:function(a){if(this._xmlContent==a)return this._xmlContent;if(this._xmlContent!=null)for(var b=0,c=this._xmlContent;b<c.length;){var d=c[b];++b;this.removeChild(d)}this._xmlContent=a;if(this._xmlContent!=
null)for(b=0,c=this._xmlContent;b<c.length;)d=c[b],++b,this.addChild(d);this.setInvalid(x.STYLES);return this._xmlContent},get_numRawChildren:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;var b=this.get_numChildren();this._displayListBypassEnabled=a;return b},get_numChildren:function(){return this._displayListBypassEnabled?this.items.length:fa.prototype.get_numChildren.call(this)},addChild:function(a){return this._displayListBypassEnabled?this.addChildAt(a,this.items.length):
fa.prototype.addChild.call(this,a)},addChildAt:function(a,b){if(!this._displayListBypassEnabled)return fa.prototype.addChildAt.call(this,a,b);var c=this.items.indexOf(a);if(c==b)return a;c>=0&&this.removeItem(a);b=this.addItemAt(a,b);a.addEventListener("resize",m(this,this.baseDividedBox_child_resizeHandler));a.addEventListener("layoutDataChange",m(this,this.baseDividedBox_child_layoutDataChangeHandler));this.setInvalid(x.LAYOUT);return b},removeChild:function(a){if(!this._displayListBypassEnabled)return fa.prototype.removeChild.call(this,
a);if(a==null||a.parent!=this)return a;var b=this.removeItem(a);a.removeEventListener("resize",m(this,this.baseDividedBox_child_resizeHandler));a.removeEventListener("layoutDataChange",m(this,this.baseDividedBox_child_layoutDataChangeHandler));this.setInvalid(x.LAYOUT);return b},removeChildAt:function(a){return this._displayListBypassEnabled?this.removeChild(this.items[a]):fa.prototype.removeChildAt.call(this,a)},getChildAt:function(a){return this._displayListBypassEnabled?this.items[a]:fa.prototype.removeChildAt.call(this,
a)},getChildIndex:function(a){return this._displayListBypassEnabled?this.items.indexOf(a):fa.prototype.getChildIndex.call(this,a)},setChildIndex:function(a,b){this._displayListBypassEnabled?(V.remove(this.items,a),this.items.splice(b,0,a)):fa.prototype.setChildIndex.call(this,a,b)},getChildByName:function(a){if(!this._displayListBypassEnabled)return fa.prototype.getChildByName.call(this,a);for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},removeChildren:function(a,
b){b==null&&(b=2147483647);a==null&&(a=0);if(this._displayListBypassEnabled){if(b==2147483647&&(b=this.items.length-1,b<0))return;if(!(a>this.items.length-1)){if(b<a||a<0||b>this.items.length)throw new we("The supplied index is out of bounds.");for(b-=a;b>=0;)this.removeChildAt(a),--b}}else fa.prototype.removeChildren.call(this,a,b)},addRawChild:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.addChild(a);this._displayListBypassEnabled=b;return a},addRawChildAt:function(a,
b){var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.addChildAt(a,b);this._displayListBypassEnabled=c;return a},removeRawChild:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.removeChild(a);this._displayListBypassEnabled=b;return a},removeRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.removeChildAt(a);this._displayListBypassEnabled=b;return a},getRawChildByName:function(a){var b=
this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildByName(a);this._displayListBypassEnabled=b;return a},getRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildAt(a);this._displayListBypassEnabled=b;return a},getRawChildIndex:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildIndex(a);this._displayListBypassEnabled=b;return a},setRawChildIndex:function(a,b){var c=this._displayListBypassEnabled;
this._displayListBypassEnabled=!1;this.setChildIndex(a,b);this._displayListBypassEnabled=c},removeRawChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;this.removeChildren(a,b);this._displayListBypassEnabled=c},addItemAt:function(a,b){this.items.splice(b,0,a);var c=b*2,d=c+(this._currentBackgroundSkin!=null?1:0);if(b!=0){var f=this.createDivider();fa.prototype.addChildAt.call(this,f,d-1);this.dividers.splice(b-1,0,f);
this._layoutItems.splice(c-1,0,f)}this._layoutItems.splice(c,0,a);return fa.prototype.addChildAt.call(this,a,d)},removeItem:function(a){V.remove(this.items,a);var b=this.getRawChildIndex(a);if(b!=0){var c=fa.prototype.getChildAt.call(this,b-1);this.dividers.splice(b-1,1);V.remove(this._layoutItems,c);this.destroyDivider(w.__cast(c,Ja),this._dividerFactory)}V.remove(this._layoutItems,a);return fa.prototype.removeChild.call(this,a)},update:function(){var a=this.isInvalid(x.STATE),b=this.isInvalid(x.STYLES);
(b||a)&&this.refreshBackgroundSkin();(b||a)&&this.refreshResizeDraggingSkin();this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.refreshBackgroundLayout();this.validateChildren()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||
this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addRawChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),
this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeRawChild(a))},refreshResizeDraggingSkin:function(){var a=this._currentResizeDraggingSkin;this._currentResizeDraggingSkin=this.getCurrentResizeDraggingSkin();this._currentResizeDraggingSkin!=a&&(this.removeCurrentResizeDraggingSkin(a),this._currentResizeDraggingSkin!=null&&(w.__implements(this._currentResizeDraggingSkin,Fa)&&this._currentResizeDraggingSkin.initializeNow(),w.__implements(this._currentResizeDraggingSkin,qb)&&this._currentResizeDraggingSkin.set_uiContext(this),
this._currentResizeDraggingSkin.set_visible(!1),this._currentResizeDraggingSkin instanceof Ja&&(this._currentResizeDraggingSkin.mouseEnabled=!1),this._currentResizeDraggingSkin instanceof zb&&(this._currentResizeDraggingSkin.mouseChildren=!1),this.addRawChild(this._currentResizeDraggingSkin)))},getCurrentResizeDraggingSkin:function(){return this.get_resizeDraggingSkin()},removeCurrentResizeDraggingSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeRawChild(a))},
createDivider:function(){var a=(this._dividerFactory!=null?this._dividerFactory:gf.defaultDividerFactory).create();a.addEventListener("rollOver",m(this,this.baseDividedBox_divider_rollOverHandler));a.addEventListener("rollOut",m(this,this.baseDividedBox_divider_rollOutHandler));a.addEventListener("mouseDown",m(this,this.baseDividedBox_divider_mouseDownHandler));a.addEventListener("touchBegin",m(this,this.baseDividedBox_divider_touchBeginHandler));return a},destroyDivider:function(a,b){a.removeEventListener("rollOver",
m(this,this.baseDividedBox_divider_rollOverHandler));a.removeEventListener("rollOut",m(this,this.baseDividedBox_divider_rollOutHandler));a.removeEventListener("mouseDown",m(this,this.baseDividedBox_divider_mouseDownHandler));a.removeEventListener("touchBegin",m(this,this.baseDividedBox_divider_touchBeginHandler));b!=null&&b.destroy!=null&&b.destroy(a)},refreshViewPortBounds:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==
null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;this._currentBackgroundSkin!=null&&(df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow());var h=this._autoSizeMode==Ve.CONTENT||this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ea);var q=this.globalToLocal(new Ea(this.stage.stageWidth,this.stage.stageHeight));n=q.x-l.x;l=q.y-l.y}this._layoutMeasurements.width=
a&&!h?n:this.get_explicitWidth();this._layoutMeasurements.height=b&&!h?l:this.get_explicitHeight();a=this.get_explicitMinWidth();c&&(a=0);c=this.get_explicitMinHeight();d&&(c=0);d=this.get_explicitMaxWidth();f&&(d=1/0);f=this.get_explicitMaxHeight();g&&(f=1/0);this._backgroundSkinMeasurements!=null&&(this._backgroundSkinMeasurements.width!=null?this._backgroundSkinMeasurements.width>a&&(a=this._backgroundSkinMeasurements.width):this._backgroundSkinMeasurements.minWidth!=null&&this._backgroundSkinMeasurements.minWidth>
a&&(a=this._backgroundSkinMeasurements.minWidth),this._backgroundSkinMeasurements.height!=null?this._backgroundSkinMeasurements.height>c&&(c=this._backgroundSkinMeasurements.height):this._backgroundSkinMeasurements.minHeight!=null&&this._backgroundSkinMeasurements.minHeight>c&&(c=this._backgroundSkinMeasurements.minHeight));this._layoutMeasurements.minWidth=a;this._layoutMeasurements.minHeight=c;this._layoutMeasurements.maxWidth=d;this._layoutMeasurements.maxHeight=f},handleLayout:function(){var a=
this._ignoreChildChanges;this._ignoreChildChanges=!0;this._layoutResult.reset();for(var b=!0,c=0;c<this._layoutItems.length;){var d=this.items[c],f=null;c>0&&(f=this.dividers[c-1]);w.__implements(d,T)&&!d.get_includeInLayout()?(c==0&&(b=!1),f!=null&&f.set_visible(!1)):f!=null&&f.set_visible(c>2||b);c+=2}this.layout.layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;
this.saveMeasurements(a,b,a,b)},refreshBackgroundLayout:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},
validateChildren:function(){for(var a=0,b=this._layoutItems;a<b.length;){var c=b[a];++a;w.__implements(c,da)&&c.validateNow()}},prepareResize:function(a,b,c){a=w.getClass(this);throw new Ce("Missing override for 'prepareResize' in type "+a.__name__);},commitResize:function(a,b,c,d){a=w.getClass(this);throw new Ce("Missing override for 'commitResize' in type "+a.__name__);},resizeTouchBegin:function(a,b,c,d,f){if(this._enabled&&this._resizingDividerIndex==-1&&this.stage!=null){var g=Pd.forStage(this.stage);
if(b?g.claimMouse(c):g.claimTouch(a,c))this._resizingTouchPointID=a,this._resizingTouchPointIsMouse=b,this._resizingDividerIndex=this.dividers.indexOf(c),this.prepareResize(this._resizingDividerIndex,d,f),this.liveDragging||this._currentResizeDraggingSkin==null||this._currentResizeDraggingSkin.set_visible(!0),b?(this.stage.addEventListener("mouseMove",m(this,this.baseDividedBox_divider_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.baseDividedBox_divider_stage_mouseUpHandler),
!1,0,!0)):(this.stage.addEventListener("touchMove",m(this,this.baseDividedBox_divider_stage_touchMoveHandler),!1,0,!0),this.stage.addEventListener("touchEnd",m(this,this.baseDividedBox_divider_stage_touchEndHandler),!1,0,!0))}},resizeTouchMove:function(a,b,c,d){this._resizingTouchPointID!=null&&this._resizingTouchPointID==a&&this._resizingTouchPointIsMouse==b&&this.commitResize(this._resizingDividerIndex,c,d,!0)},resizeTouchEnd:function(a,b,c,d){this._resizingTouchPointID!=null&&this._resizingTouchPointID==
a&&this._resizingTouchPointIsMouse==b&&(b?(this.stage.removeEventListener("mouseMove",m(this,this.baseDividedBox_divider_stage_mouseMoveHandler)),this.stage.removeEventListener("mouseUp",m(this,this.baseDividedBox_divider_stage_mouseUpHandler))):(this.stage.removeEventListener("touchMove",m(this,this.baseDividedBox_divider_stage_touchMoveHandler)),this.stage.removeEventListener("touchEnd",m(this,this.baseDividedBox_divider_stage_touchEndHandler))),this.liveDragging||this.commitResize(this._resizingDividerIndex,
c,d,!1),this._currentResizeDraggingSkin!=null&&this._currentResizeDraggingSkin.set_visible(!1),this._resizingTouchPointID=null,this._resizingTouchPointIsMouse=!1,this._resizingDividerIndex=-1,this._oldDividerMouseCursor!=null&&(xd.set_cursor(this._oldDividerMouseCursor),this._oldDividerMouseCursor=null))},baseDividedBox_child_resizeHandler:function(a){this._ignoreChildChanges||this.setInvalid(x.LAYOUT)},baseDividedBox_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||this.setInvalid(x.LAYOUT)},
baseDividedBox_addedToStageHandler:function(a){this._autoSizeMode==Ve.STAGE&&(this.setInvalid(x.SIZE),this.stage.addEventListener("resize",m(this,this.baseDividedBox_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.baseDividedBox_removedFromStageHandler)))},baseDividedBox_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.baseDividedBox_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.baseDividedBox_stage_resizeHandler))},
baseDividedBox_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},baseDividedBox_divider_rollOverHandler:function(a){this._enabled&&this._resizingDividerIndex==-1&&xd.get_cursor()=="auto"&&(this._oldDividerMouseCursor=xd.get_cursor(),xd.set_cursor(this.resizeCursor))},baseDividedBox_divider_rollOutHandler:function(a){this._enabled&&this._resizingDividerIndex==-1&&this._oldDividerMouseCursor!=null&&(xd.set_cursor(this._oldDividerMouseCursor),this._oldDividerMouseCursor=null)},baseDividedBox_divider_mouseDownHandler:function(a){a=
w.__cast(a.currentTarget,Ja);this.resizeTouchBegin(gf.POINTER_ID_MOUSE,!0,a,this.stage.get_mouseX(),this.stage.get_mouseY())},baseDividedBox_divider_stage_mouseMoveHandler:function(a){a=w.__cast(a.currentTarget,gd);this.resizeTouchMove(gf.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},baseDividedBox_divider_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);this.resizeTouchEnd(gf.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},baseDividedBox_divider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=
w.__cast(a.currentTarget,Ja);this.resizeTouchBegin(a.touchPointID,!1,b,a.stageX,a.stageY)}},baseDividedBox_divider_stage_touchMoveHandler:function(a){this.resizeTouchMove(a.touchPointID,!1,a.stageX,a.stageY)},baseDividedBox_divider_stage_touchEndHandler:function(a){this.resizeTouchEnd(a.touchPointID,!1,a.stageX,a.stageY)},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;
this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;
this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__resizeDraggingSkin:null,get_resizeDraggingSkin:function(){return this.__resizeDraggingSkin},set_resizeDraggingSkin:function(a){if(!this.setStyle("resizeDraggingSkin")||this.__resizeDraggingSkin==a)return this.__resizeDraggingSkin;
this._previousClearStyle=m(this,this.clearStyle_resizeDraggingSkin);this.__resizeDraggingSkin=a;this.setInvalid(x.STYLES);return this.__resizeDraggingSkin},clearStyle_resizeDraggingSkin:function(){this.set_resizeDraggingSkin(null);return this.get_resizeDraggingSkin()},__class__:gf,__properties__:I(fa.prototype.__properties__,{get_numRawChildren:"get_numRawChildren",set_xmlContent:"set_xmlContent",get_xmlContent:"get_xmlContent",set_dividerFactory:"set_dividerFactory",get_dividerFactory:"get_dividerFactory",
set_resizeDraggingSkin:"set_resizeDraggingSkin",get_resizeDraggingSkin:"get_resizeDraggingSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode"})});var Rh=function(){this._fallbackFluidIndex=-1;this._customItemHeights=[];this.initializeVDividedBoxTheme();gf.call(this);this.resizeCursor=
ch.fromLimeCursor(id.RESIZE_NS)};t["feathers.controls.VDividedBox"]=Rh;Rh.__name__="feathers.controls.VDividedBox";Rh.__super__=gf;Rh.prototype=I(gf.prototype,{_vDividedBoxLayout:null,_customItemHeights:null,_fallbackFluidIndex:null,_resizeStartStageY:null,_resizeStartHeight1:null,_resizeStartHeight2:null,addItemAt:function(a,b){var c=gf.prototype.addItemAt.call(this,a,b),d=null;w.__implements(a,rb)&&(d=a.get_explicitHeight());this._customItemHeights.splice(b,0,d);a=this._layoutItems.indexOf(a);d==
null&&(this._fallbackFluidIndex==-1||a>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=a);return c},removeItem:function(a){var b=this.items.indexOf(a),c=this._layoutItems.indexOf(a);this._fallbackFluidIndex==c&&(this._fallbackFluidIndex=-1);a=gf.prototype.removeItem.call(this,a);b!=-1&&this._customItemHeights.splice(b,1);return a},initializeVDividedBoxTheme:function(){sw.initialize()},initialize:function(){gf.prototype.initialize.call(this);this._vDividedBoxLayout==null&&(this._vDividedBoxLayout=
new cp);this._vDividedBoxLayout.set_customItemHeights(this._customItemHeights);this.layout=this._vDividedBoxLayout},handleLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._vDividedBoxLayout.set_fallbackFluidIndex(this._fallbackFluidIndex);this._ignoreChildChanges=a;gf.prototype.handleLayout.call(this)},prepareResize:function(a,b,c){this._resizeStartStageY=c;b=this.items[a+1];this._resizeStartHeight1=this.items[a].get_height();this._resizeStartHeight2=b.get_height();
this._currentResizeDraggingSkin!=null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_x(a.get_x()),this._currentResizeDraggingSkin.set_width(a.get_width()),w.__implements(this._currentResizeDraggingSkin,da)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_y(a.get_y()+(a.get_height()-this._currentResizeDraggingSkin.get_height())/2))},commitResize:function(a,b,c,d){b=c-this._resizeStartStageY;b*=Zg.getConcatenatedScaleY(this);if(d&&!this.liveDragging)this._currentResizeDraggingSkin!=
null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_x(a.get_x()),this._currentResizeDraggingSkin.set_width(a.get_width()),w.__implements(this._currentResizeDraggingSkin,da)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_y(a.get_y()+b+(a.get_height()-this._currentResizeDraggingSkin.get_height())/2));else{d=this.items[a];var f=this.items[a+1];c=this._resizeStartHeight1+this._resizeStartHeight2;b=this._resizeStartHeight2-b;w.__implements(f,rb)&&(f.get_explicitMinHeight()!=
null&&b<f.get_explicitMinHeight()?b=f.get_explicitMinHeight():f.get_explicitMaxHeight()!=null&&b>f.get_explicitMaxHeight()&&(b=f.get_explicitMaxHeight()));b<0?b=0:b>c&&(b=c);b=c-b;w.__implements(d,rb)&&(d.get_explicitMinHeight()!=null&&b<d.get_explicitMinHeight()?b=d.get_explicitMinHeight():d.get_explicitMaxHeight()!=null&&b>d.get_explicitMaxHeight()&&(b=d.get_explicitMaxHeight()));b<0?b=0:b>c&&(b=c);this._customItemHeights[a]=b;this._customItemHeights[a+1]=c-b;this.setInvalid(x.LAYOUT)}},baseDividedBox_child_layoutDataChangeHandler:function(a){gf.prototype.baseDividedBox_child_layoutDataChangeHandler.call(this,
a);a=w.__cast(a.currentTarget,T);var b=this._layoutItems.indexOf(a);a.get_includeInLayout()||this._fallbackFluidIndex!=b||(this._fallbackFluidIndex=-1)},baseDividedBox_child_resizeHandler:function(a){if(!this._ignoreChildChanges){var b=a.currentTarget,c=this.items.indexOf(b);c!=-1&&(a=null,w.__implements(b,rb)&&(a=b.get_explicitHeight()),this._customItemHeights[c]=a,b=this._layoutItems.indexOf(b),a==null&&(this._fallbackFluidIndex==-1||b>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=b),this.setInvalid(x.LAYOUT))}},
__class__:Rh});var br=function(a,b){Rh.call(this);this._ac=b;this._player=a;this.ui=new Bc;this.set_layoutData(fd.fill());this._scroller=new je;this._scroller.set_autoHideScrollBars(!1);this._scroller.set_fixedScrollBars(!0);this._scroller.set_showScrollBars(!0);this._scroller.set_layout(new uf);a=new Za;a.set_fill(ub.SolidColor(10066329));this._scroller.set_backgroundSkin(a);this.addChild(this._scroller);this._scroller.addChild(this._player);this._controls=new Fj;this._controls.set_layoutData(fd.fill());
b=new zg;b.set_gap(10);b.setPadding(10);this._controls.layout=b;this._controls.set_backgroundSkin(a);this._controls.set_height(this._controls.set_maxHeight(this._controls.set_minHeight(50)));this.addChild(this._controls);a=this.ui.createHArea("left");this._controls.addChild(a);this.ui.createIconButton("screen",m(this,this.onScreen),new Ma(Z.getBitmapData("btScreen")),null,a);this.ui.createSpacer("screen",10,!1,a);this.ui.createIconButton("zoom+",m(this,this.onZoomP),new Ma(Z.getBitmapData("btZoomP")),
null,a);this.ui.createIconButton("zoom-",m(this,this.onZoomM),new Ma(Z.getBitmapData("btZoomM")),null,a);this.ui.createIconButton("zoomfit",m(this,this.centerPlayer),new Ma(Z.getBitmapData("btZoomFit")),null,a);this.ui.createIconButton("zoom100",m(this,this.onZoom100),new Ma(Z.getBitmapData("btZoom100")),null,a);this._movieInfo=new Rs(m(this,this.updateInfo));this._controls.addChild(this._movieInfo);a=this.ui.createHArea("right");this._controls.addChild(a);this.ui.createIconButton("left",m(this,this.onLeft),
new Ma(Z.getBitmapData("btLeft")),null,a);this.ui.createLabel("keyframes","","",a);this.ui.createIconButton("right",m(this,this.onRight),new Ma(Z.getBitmapData("btRight")),null,a);this.ui.createSpacer("keyframe",10,!1,a);this.ui.createIconButton("actions",m(this,this.onActions),new Ma(Z.getBitmapData("btSetup")),null,a);this.ui.createLabel("actions","","",a);this.ui.createIconButton("play",m(this,this.onPlay),new Ma(Z.getBitmapData("btPlay")),null,a);this.ui.buttons.h.screen.set_toolTip(k.ln.get("tooltip-playercontrols-screen"));
this.ui.buttons.h["zoom+"].set_toolTip(k.ln.get("tooltip-playercontrols-zoomp"));this.ui.buttons.h["zoom-"].set_toolTip(k.ln.get("tooltip-playercontrols-zoomm"));this.ui.buttons.h.zoomfit.set_toolTip(k.ln.get("tooltip-playercontrols-zoomfit"));this.ui.buttons.h.zoom100.set_toolTip(k.ln.get("tooltip-playercontrols-zoom100"));this.ui.buttons.h.left.set_toolTip(k.ln.get("tooltip-playercontrols-left"));this.ui.buttons.h.right.set_toolTip(k.ln.get("tooltip-playercontrols-right"));this.ui.buttons.h.actions.set_toolTip(k.ln.get("tooltip-playercontrols-actions"));
this.ui.buttons.h.play.set_toolTip(k.ln.get("tooltip-playercontrols-play"))};t["com.tilbuci.ui.PlayerControls"]=br;br.__name__="com.tilbuci.ui.PlayerControls";br.__super__=Rh;br.prototype=I(Rh.prototype,{_ac:null,_controls:null,_scroller:null,_player:null,_movieInfo:null,_centerTimer:null,ui:null,updateDisplay:function(){this._movieInfo.onUpdate();this.updateInfo()},updateInfo:function(){p.movie.get_scId()==""?(this.ui.labels.h.keyframes.set_text(""),this.ui.buttons.h.left.set_enabled(!1),this.ui.buttons.h.right.set_enabled(!1),
this.ui.buttons.h.play.set_enabled(!1)):(this.ui.labels.h.keyframes.set_text(p.area.get_currentKf()+1+" / "+p.movie.scene.keyframes.length),this.ui.buttons.h.left.set_enabled(p.area.get_currentKf()!=0),this.ui.buttons.h.right.set_enabled(p.area.get_currentKf()<p.movie.scene.keyframes.length-1),this.ui.buttons.h.play.set_enabled(!0));this.ui.buttons.h.screen.set_enabled(p.mdata.screen.type=="both")},centerPlayer:function(a){k.displayType=="portrait"?this._player.setWidth(this.get_height()-150):this._player.setWidth(this.get_width()-
100);this._scroller.set_scrollX(this._player.player.get_x()-50);this._scroller.set_scrollY(this._player.player.get_y()-50);if(this._centerTimer==null)this._centerTimer=new Gc(150),this._centerTimer.run=m(this,this.reCenter);else{try{this._centerTimer.stop()}catch(b){}this._centerTimer=null}},reCenter:function(){p.movie.scene.keyframes[p.area.get_currentKf()]!=null&&p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf());this.centerPlayer()},onScreen:function(a){p.movie.get_mvId()!=
""&&p.movie.get_scId()!=""&&p.mdata.screen.type=="both"&&(p.area.imgSelect(),k.displayType=k.displayType=="portrait"?"landscape":"portrait",this._player.removeChild(this._player.player),this.centerPlayer(),p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf()),this._player.addChild(this._player.player),this.centerPlayer())},onLeft:function(a){p.area.get_currentKf()>0&&(p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()-1],p.area.get_currentKf()-
1),k.history.clear(),this.updateInfo())},onRight:function(a){p.area.get_currentKf()<p.movie.scene.keyframes.length-1&&(p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()+1],p.area.get_currentKf()+1),k.history.clear(),this.updateInfo())},onActions:function(a){this._ac("testactions")},onPlay:function(a){this._ac("play")},onZoomP:function(a){k.displayType=="portrait"?this._player.setWidth(this._player.player.get_rHeight()*1.1):this._player.setWidth(this._player.player.get_rWidth()*1.1)},
onZoomM:function(a){k.displayType=="portrait"?this._player.setWidth(this._player.player.get_rHeight()*.9):this._player.setWidth(this._player.player.get_rWidth()*.9)},onZoom100:function(a){k.displayType=="portrait"?this._player.setWidth(this._player.player.get_mHeight()):this._player.setWidth(this._player.player.get_mWidth())},__class__:br});var ar=function(a,b){fa.call(this);this._bg=new Hd;this._bg.get_graphics().beginFill(0,0);this._bg.get_graphics().drawRect(0,0,32,32);this._bg.get_graphics().endFill();
this.addChild(this._bg);this.player=new cg("player.json","editor","landscape",!0,b);this.addChild(this.player)};t["com.tilbuci.ui.PlayerHolder"]=ar;ar.__name__="com.tilbuci.ui.PlayerHolder";ar.__super__=fa;ar.prototype=I(fa.prototype,{_bg:null,player:null,rWidth:null,get_rWidth:function(){return this.player.get_rWidth()},rHeight:null,get_rHeight:function(){return this.player.get_rHeight()},setWidth:function(a){this._bg.set_width(this._bg.set_height(a+600));k.displayType=="portrait"?this.player.setSize(p.mdata.screen.small/
p.mdata.screen.big*a,a):this.player.setSize(a,p.mdata.screen.small/p.mdata.screen.big*a);this.player.set_x(this.player.set_y(300));this.set_width(this._bg.get_width());this.set_height(this._bg.get_height())},createCollection:function(a,b,c){c==null&&(c="");var d=k.ws,f=new G,g=p.movie.get_mvId();f.h.movie=g;f.h.name=a;f.h.id=c;d.send("Media/CreateCollection",f,b)},setCollection:function(a,b,c,d,f){var g=new xg(a,null,!1);g.name=b;g.transition=c;g.time=d;g.ok=!0;if(f!=null)for(b=Object.keys(f.h),c=
b.length,d=0;d<c;){var h=b[d++],n=V.substr(h,0,32),l=g.assets;h=new Gj(f.h[h]);l.h[n]=h;g.assetOrder.push(n)}p.movie.collections.h[a]=g},addInstance:function(a,b){for(;;){var c=p.movie.scene.keyframes[p.area.get_currentKf()];if(!Object.prototype.hasOwnProperty.call(c.h,a))break;a=Ga.md5(a)}c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=new ii(b);c.h[a]=d;p.movie.scene.collections.indexOf(y.field(b,"collection"))==-1&&p.movie.scene.collections.push(y.field(b,"collection"));p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],
p.area.get_currentKf())},addKeyframe:function(){if(p.movie.get_scId()!=""){for(var a=[],b=[],c=p.area.get_currentKf(),d=0,f=p.movie.scene.keyframes.length;d<f;){var g=d++;a.push(p.movie.scene.keyframes[g]);p.movie.scene.ackeyframes.length>g?b.push(p.movie.scene.ackeyframes[g]):b.push("");if(g==c){for(var h=new G,n=Object.keys(p.movie.scene.keyframes[g].h),l=n.length,q=0;q<l;){var u=n[q++],v=p.movie.scene.keyframes[g].h[u].clone();h.h[u]=v}a.push(h);p.movie.scene.ackeyframes.length>g?b.push(p.movie.scene.ackeyframes[g]):
b.push("")}}p.movie.scene.keyframes=a;p.movie.scene.ackeyframes=b;++c;p.area.loadKeyframe(p.movie.scene.keyframes[c],c);k.showMsg(k.ln.get("menu-keyframe-addok"))}},removeKeyframe:function(){if(p.movie.get_scId()!=""){for(var a=[],b=[],c=p.area.get_currentKf(),d=0,f=p.movie.scene.keyframes.length;d<f;){var g=d++;g!=c&&(a.push(p.movie.scene.keyframes[g]),p.movie.scene.ackeyframes.length>g?b.push(p.movie.scene.ackeyframes[g]):b.push(""))}p.movie.scene.keyframes=a;p.movie.scene.ackeyframes=b;p.area.loadKeyframe(p.movie.scene.keyframes[c],
c)}},__class__:ar,__properties__:I(fa.prototype.__properties__,{get_rHeight:"get_rHeight",get_rWidth:"get_rWidth"})});var Ns=function(a){this._buttons=[];this._statetexts=new G;this._logintexts=new G;this._gap=10;Uc.call(this);this._uiBg=a;a=new uf;a.set_gap(this._gap);a.setPadding(this._gap);this.set_layout(a);this.set_y(-500);this._pheader=new Mi;this._pheader.set_text("");this.set_header(this._pheader);this._pfooter=new pb;a=new zg;a.set_horizontalAlign(Wb.CENTER);a.set_gap(this._gap);a.setPadding(this._gap);
this._pfooter.set_layout(a);this.set_footer(this._pfooter);this._inputBtCancel=new Xb;a=new Ma(Z.getBitmapData("btClose"));a.smoothing=!0;a.set_width(a.set_height(3*this._gap));this._inputBtCancel.set_icon(a);this._pfooter.addChild(this._inputBtCancel);this._inputBtOk=new Xb;a=new Ma(Z.getBitmapData("btOk"));a.smoothing=!0;a.set_width(a.set_height(3*this._gap));this._inputBtOk.set_icon(a);this._pfooter.addChild(this._inputBtOk);this._inputText=new rd;this._inputText.setPadding(this._gap);this._inputList=
new Fc;this._inputList.itemToText=function(b){return b.text};this._inputNumeric=new sd;this._inputLabel=new ia;this._inputLabel.set_wordWrap(!0);this._inputArea=new tf;this._inputArea.set_selectable(!1);this._inputArea.set_enabled(!1);this._inputArea.set_wordWrap(!0);this._inputCheck=new um;this.set_visible(!1)};t["com.tilbuci.ui.PlayerInput"]=Ns;Ns.__name__="com.tilbuci.ui.PlayerInput";Ns.__super__=Uc;Ns.prototype=I(Uc.prototype,{_uiBg:null,_inputBtOk:null,_inputBtCancel:null,_inputVar:null,_inputType:null,
_inputOkAction:null,_inputCancelAction:null,_gap:null,_pheader:null,_pfooter:null,_inputText:null,_inputList:null,_inputNumeric:null,_inputLabel:null,_inputArea:null,_inputCheck:null,_logintexts:null,_statetexts:null,_buttons:null,kill:function(){this.removeChildren();this._pheader.removeChildren();this._pheader=null;this._pfooter.removeChildren();this._inputNumeric=this._inputList=this._inputOkAction=this._inputCancelAction=this._inputVar=this._inputType=this._inputText=this._inputBtOk=this._inputBtCancel=
this._pfooter=null;for(var a=Object.keys(this._logintexts.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._logintexts;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._logintexts=null},askSecret:function(a){this._inputType="secretkey";this.set_y(-500);this._inputCancelAction=this._inputOkAction=null;this._pheader.set_text(a);this.set_width(p.area.get_width());this.set_x(0);this._inputBtOk.set_width(this.get_width()-2*this._gap);this.removeChildren();this._inputText.set_width(this._inputBtOk.get_width());
this._inputText.set_text("");this.addChild(this._inputText);this._pfooter.removeChildren();this._pfooter.addChild(this._inputBtOk);this._inputBtOk.addEventListener("trigger",m(this,this.inputBtOk));this.set_visible(!0);this._uiBg.set_visible(!0);Ca.tween(this,.3,{y:50});Ca.tween(this._uiBg,.3,{alpha:1}).autoVisible(!1)},askStates:function(a,b,c,d,f,g,h){this._inputType="states";this._statetexts.h.title=a;this._statetexts.h.waistates=b;this._statetexts.h.selectstate=c;this._statetexts.h.nostates=d;
this._statetexts.h.dateformat=f;this.prepare("states",this._statetexts.h.title,g,h);this._inputLabel.set_text(this._statetexts.h.waistates);this._inputLabel.set_width(this.get_width()-2*this._gap);this.addChild(this._inputLabel);this._pfooter.removeChildren();p.ws.stateList(f,m(this,this.onStateList))},askLogin:function(a,b,c,d,f,g,h,n,l,q,u,v,z,r){this._logintexts.h.logintitle=a;this._logintexts.h.logintext=b;this._logintexts.h.termsagree=c;this._logintexts.h.invalidemail=d;this._logintexts.h.emailwait=
f;this._logintexts.h.noemailsent=g;this._logintexts.h.checkforcode=h;this._logintexts.h.codewait=n;this._logintexts.h.invalidcode=l;this._logintexts.h.emailsubject=q;this._logintexts.h.emailbody=u;this._logintexts.h.emailsender=v;this._inputType="login";this.prepare("login",this._logintexts.h.logintitle,z,r);this._inputLabel.set_text(this._logintexts.h.logintext);this._inputLabel.set_width(this.get_width()-2*this._gap);this.addChild(this._inputLabel);this._inputText.set_width(this.get_width()-2*this._gap);
this._inputText.set_text("");this.addChild(this._inputText);this._inputArea.set_width(this.get_width()-2*this._gap);new Ob(!0,p.base+"VisitorTerms.txt","GET",null,1,m(this,this.onTerms));this.addChild(this._inputArea);this._inputCheck.set_selected(!1);this._inputCheck.set_text(this._logintexts.h.termsagree);this._inputCheck.set_maxWidth(this.get_width()-2*this._gap);this.addChild(this._inputCheck)},askText:function(a,b,c,d){this._inputType="text";this.prepare(a,b,c,d);this._inputText.set_width(this.get_width()-
2*this._gap);this._inputText.set_text(p.parser.getString(a));this.addChild(this._inputText)},setWarn:function(a,b,c,d){this._inputType="warn";this.prepare("warn",a,c,d);this._inputLabel.set_width(this.get_width()-2*this._gap);this._inputLabel.set_text(b);this.addChild(this._inputLabel);d==null&&(this._pfooter.removeChildren(),this._inputBtOk.set_width(this.get_width()-3*this._gap-2),this._pfooter.addChild(this._inputBtOk))},askNumeric:function(a,b,c,d,f,g,h,n){n==null&&(n=100);h==null&&(h=0);g==null&&
(g=0);this._inputType=a;this.prepare(b,c,d,f);a=="int"?(g==0?this._inputNumeric.set_step(1):this._inputNumeric.set_step(Math.round(g)),this._inputNumeric.set_minimum(Math.round(h)),this._inputNumeric.set_maximum(Math.round(n)),this._inputNumeric.set_value(p.parser.getInt(b))):(g==0?this._inputNumeric.set_step(.5):this._inputNumeric.set_step(g),this._inputNumeric.set_minimum(h),this._inputNumeric.set_maximum(n),this._inputNumeric.set_value(p.parser.getFloat(b)));this._inputNumeric.set_width(this.get_width()-
2*this._gap);this.addChild(this._inputNumeric)},askList:function(a,b,c,d,f){this._inputType="list";this.prepare(a,b,d,f);a=[];b=0;for(d=c.length;b<d;)f=b++,a.push({text:c[f]});this._inputList.set_dataProvider(new dg(a));this._inputList.set_width(this.get_width()-2*this._gap);this.addChild(this._inputList)},askEmail:function(a,b,c,d,f){this._inputType="email";this.prepare(a,b,d,f);this._inputText.set_width(this.get_width()-2*this._gap);this._inputText.set_text(p.parser.getString(a));this.addChild(this._inputText);
this.clearButtons();a=0;for(b=c.length;a<b;)d=a++,d=new Rc(c[d],m(this,this.onEmailDomain),c[d]),d.set_width(this._inputText.get_width()),this.addChild(d),this._buttons.push(d);Cd.setFocus(this._inputText)},onEmailDomain:function(a){a=a.target;a!=null&&this._inputText.set_text(this._inputText.get_text()+a.btid)},clearButtons:function(){for(;this._buttons.length>0;)this._buttons.shift().kill()},prepare:function(a,b,c,d){p.theme!=null&&(p.theme.get_headerBackground()!=null&&this._pheader.set_backgroundSkin(new Za(ub.SolidColor(p.theme.get_headerBackground()))),
p.theme.get_windowBackground()!=null&&this.set_backgroundSkin(new Za(ub.SolidColor(p.theme.get_windowBackground()))),p.theme.footerFillColor!=null&&this._pfooter.set_backgroundSkin(new Za(ub.SolidColor(p.theme.footerFillColor))),this._pheader.set_textFormat(new ni(p.theme.get_headerFont(),p.theme.get_headerSize(),p.theme.get_headerFontColor())),this._pheader.set_embedFonts(p.theme.get_headerFont()!="_sans"),p.theme.listItemBackground!=null||p.theme.listItemFont!=null||p.theme.get_windowFontName()!=
"_sans"||p.theme.get_windowFontSize());this.set_y(-500);this._inputVar=a;this._inputOkAction=c;this._inputCancelAction=d;this._pheader.set_text(b);this._uiBg.get_width()<this._uiBg.get_height()?this.set_width(3*this._uiBg.get_width()/4):this.set_width(2*this._uiBg.get_width()/3);this.set_x((this._uiBg.get_width()-this.get_width())/2);this.removeChildren();this._inputBtCancel.set_width(this._inputBtOk.set_width((this.get_width()-3*this._gap)/2-1));this._pfooter.removeChildren();this._pfooter.addChild(this._inputBtCancel);
this._pfooter.addChild(this._inputBtOk);this._inputBtCancel.addEventListener("trigger",m(this,this.inputBtCancel));this._inputBtOk.addEventListener("trigger",m(this,this.inputBtOk));this.set_visible(!0);this._uiBg.set_visible(!0);Ca.tween(this,.3,{y:50});Ca.tween(this._uiBg,.3,{alpha:1}).autoVisible(!1)},inputBtOk:function(a){if(this._inputType=="secretkey"){if(a="",p.mdata.key!=""&&(a=Ga.decryptKey(p.mdata.key,"skey",p.secret)),this._inputText.get_text()==a||p.mdata.key=="")p.secretKey=p.mdata.key,
this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk)),Ca.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),Ca.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1)}else if(this._inputType=="login"){if(this._inputCheck.get_selected())if((new Wa(".+@.+","i")).match(this._inputText.get_text())){this._inputLabel.set_text(this._logintexts.h.emailwait);this.removeChildren();this.addChild(this._inputLabel);this._inputType="waitemail";a=this._logintexts;var b=this._inputText.get_text();
a.h.visitoremail=b;p.ws.loginVisitor(this._inputText.get_text(),this._logintexts.h.emailsubject,this._logintexts.h.emailbody,this._logintexts.h.emailsender,m(this,this.onLoginSent));this._inputText.set_text("");this._pfooter.removeChildren()}else this._inputLabel.set_text(this._logintexts.h.invalidemail)}else if(this._inputType=="waitforcode")p.ws.checkVisitorCode(this._logintexts.h.visitoremail,this._inputText.get_text(),m(this,this.onCodeCheck)),this._pfooter.removeChildren(),this.removeChildren(),
this._inputLabel.set_text(this._logintexts.h.codewait),this.addChild(this._inputLabel);else if(this._inputType=="states")this._inputList.get_selectedItem()!=null&&(p.parser.run({ac:"data.loadstate",param:[this._inputList.get_selectedItem().id],success:this._inputOkAction,error:this._inputCancelAction},!0),this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel)),this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk)),Ca.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),
Ca.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1));else if(this._inputType=="email")Ga.validateEmail(this._inputText.get_text())&&(p.parser.setString(this._inputVar,this._inputText.get_text()),this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel)),this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk)),this.clearButtons(),Ca.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),Ca.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1),p.parser.run(this._inputOkAction,
!0));else{switch(this._inputType){case "float":p.parser.setFloat(this._inputVar,this._inputNumeric.get_value());break;case "int":p.parser.setInt(this._inputVar,Math.round(this._inputNumeric.get_value()));break;case "list":this._inputList.get_selectedItem()!=null&&p.parser.setString(this._inputVar,this._inputList.get_selectedItem().text);break;case "text":p.parser.setString(this._inputVar,this._inputText.get_text())}this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel));this._inputBtOk.removeEventListener("trigger",
m(this,this.inputBtOk));Ca.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose));Ca.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1);p.parser.run(this._inputOkAction,!0)}},onLoginSent:function(a,b){a?b.map.h.e==0?(this._inputLabel.set_text(this._logintexts.h.checkforcode),this._inputText.set_text(""),this.addChild(this._inputText),this._inputType="waitforcode",this._inputBtCancel.set_width(this._inputBtOk.set_width((this.get_width()-3*this._gap)/2-1)),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),
this._pfooter.addChild(this._inputBtOk)):(this._inputLabel.set_text(this._logintexts.h.noemailsent),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._inputBtCancel.set_width(this.get_width()-2*this._gap-2)):(this._inputLabel.set_text(this._logintexts.h.noemailsent),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._inputBtCancel.set_width(this.get_width()-2*this._gap-2))},onCodeCheck:function(a,b){a?b.map.h.e==0?(p.ws.setUser(this._logintexts.h.visitoremail,
b.map.h.key,b.map.h.groups),this._inputType="codeok",this.inputBtOk(null)):(this._inputType="waitforcode",this._inputLabel.set_text(this._logintexts.h.invalidcode),this.addChild(this._inputText),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._pfooter.addChild(this._inputBtOk),this._inputBtOk.set_width(this._inputBtCancel.set_width((this.get_width()-3*this._gap)/2-1))):(this._inputType="waitforcode",this._inputLabel.set_text(this._logintexts.h.invalidcode),this.addChild(this._inputText),
this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._pfooter.addChild(this._inputBtOk),this._inputBtOk.set_width(this._inputBtCancel.set_width((this.get_width()-3*this._gap)/2-1)))},onTerms:function(a,b){a?this._inputArea.set_text(N.replace(b.rawtext,"\r\n","\n")):this._inputArea.set_text("ERROR LOADING THE TERMS")},onStateList:function(a,b){if(a)if(b.map.h.e==0){this._inputLabel.set_text(this._statetexts.h.selectstate);a=[];for(var c=0,d=y.fields(b.map.h.states);c<d.length;){var f=
d[c];++c;f=y.field(b.map.h.states,f);var g=y.field(f,"date"),h=y.field(f,"about");h!=""&&(g=g+" : "+h);a.push({text:g,id:y.field(f,"id")})}this._inputList.set_dataProvider(new dg(a));this._inputList.set_width(this.get_width()-2*this._gap);this.addChild(this._inputList);this._inputBtCancel.set_width(this._inputBtOk.set_width((this.get_width()-3*this._gap)/2-1));this._pfooter.addChild(this._inputBtCancel);this._pfooter.addChild(this._inputBtOk)}else this._inputLabel.set_text(this._statetexts.h.nostates),
this._inputBtCancel.set_width(this.get_width()-2*this._gap-2),this._pfooter.addChild(this._inputBtCancel);else this._inputLabel.set_text(this._statetexts.h.nostates),this._inputBtCancel.set_width(this.get_width()-2*this._gap-2),this._pfooter.addChild(this._inputBtCancel)},inputBtCancel:function(a){this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel));this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk));this.clearButtons();Ca.tween(this,.1,{y:-500}).onComplete(m(this,
this.inputClose));Ca.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1);p.parser.run(this._inputCancelAction,!0)},inputClose:function(){this._uiBg.set_visible(!1);this.set_visible(!1)},__class__:Ns});var dp=function(){};t["feathers.style.ITheme"]=dp;dp.__name__="feathers.style.ITheme";dp.__isInterface__=!0;dp.prototype={getStyleProvider:null,dispose:null,__class__:dp};var vm=function(){this.styleProvider=new Fl};t["feathers.themes.ClassVariantTheme"]=vm;vm.__name__="feathers.themes.ClassVariantTheme";
vm.__interfaces__=[dp];vm.prototype={styleProvider:null,getStyleProvider:function(a){var b=null,c=null;w.__implements(a,nd)&&(b=a.get_styleContext(),c=a.get_variant());b==null&&(b=w.getClass(a));var d=this.styleProvider.getStyleFunction(b,c);if(d!=null)return this.styleProvider;if(c==null)return null;d=bc.get_fallbackTheme();if(d!=null&&d!=this&&d instanceof vm&&(a=d.getStyleProvider(a),a=a instanceof Fl?a:null,a!=null&&a.getStyleFunction(b,c)!=null))return null;d=this.styleProvider.getStyleFunction(b,
null);return d!=null?this.styleProvider:null},dispose:function(){Y.dispatch(this.styleProvider,"clear")},__class__:vm};var pn=function(){};t["feathers.style.IDarkModeTheme"]=pn;pn.__name__="feathers.style.IDarkModeTheme";pn.__isInterface__=!0;pn.__interfaces__=[dp];pn.prototype={get_darkMode:null,set_darkMode:null,__class__:pn,__properties__:{set_darkMode:"set_darkMode",get_darkMode:"get_darkMode"}};var zc=function(a,b){this._darkMode=!1;this.styleProvider=new Fl;this.customThemeColor=a;this.customDarkThemeColor=
b;this.refreshColors();this.refreshFonts();this.refreshPaddings();this.styleProvider=new Fl;this.mediaQueryList=w.__cast(wa,Window).matchMedia("(hover: hover) and (pointer: fine)");this.mediaQueryList.addListener(m(this,this.mediaQueryList_changeHandler))};t["feathers.themes.steel.BaseSteelTheme"]=zc;zc.__name__="feathers.themes.steel.BaseSteelTheme";zc.__interfaces__=[pn];zc.__super__=vm;zc.prototype=I(vm.prototype,{mediaQueryList:null,_darkMode:null,get_darkMode:function(){return this._darkMode},
set_darkMode:function(a){if(this._darkMode==a)return this._darkMode;this._darkMode=a;this.refreshColors();vh.dispatch(this.styleProvider,"stylesChange");return this._darkMode},customThemeColor:null,customDarkThemeColor:null,themeColor:null,offsetThemeColor:null,rootFillColor:null,controlFillColor1:null,controlFillColor2:null,controlDisabledFillColor:null,scrollBarThumbFillColor:null,scrollBarThumbDisabledFillColor:null,insetFillColor:null,disabledInsetFillColor:null,insetBorderColor:null,disabledInsetBorderColor:null,
selectedInsetBorderColor:null,activeFillBorderColor:null,selectedBorderColor:null,focusBorderColor:null,containerFillColor:null,headerFillColor:null,overlayFillColor:null,subHeadingFillColor:null,borderColor:null,dividerColor:null,subHeadingDividerColor:null,textColor:null,secondaryTextColor:null,disabledTextColor:null,dangerTextColor:null,dangerFillColor:null,offsetDangerFillColor:null,dangerBorderColor:null,fontName:null,fontSize:null,headerFontSize:null,detailFontSize:null,borderThickness:null,
xsmallPadding:null,smallPadding:null,mediumPadding:null,largePadding:null,xlargePadding:null,dispose:function(){this.mediaQueryList!=null&&(this.mediaQueryList.removeListener(m(this,this.mediaQueryList_changeHandler)),this.mediaQueryList=null);vm.prototype.dispose.call(this)},refreshColors:function(){this._darkMode?(this.themeColor=this.customDarkThemeColor!=null?this.customDarkThemeColor:this.customThemeColor!=null?this.customThemeColor:5205919,this.offsetThemeColor=this.darken(this.themeColor,986895),
this.rootFillColor=3684408,this.controlFillColor1=6250335,this.controlFillColor2=5000268,this.controlDisabledFillColor=3158064,this.scrollBarThumbFillColor=7303023,this.scrollBarThumbDisabledFillColor=4144959,this.insetFillColor=1579032,this.disabledInsetFillColor=2631720,this.insetBorderColor=4737096,this.disabledInsetBorderColor=3684408,this.selectedInsetBorderColor=this.themeColor,this.activeFillBorderColor=this.darken(this.themeColor,3092271),this.selectedBorderColor=this.lighten(this.themeColor,
986895),this.focusBorderColor=this.lighten(this.themeColor,986895),this.containerFillColor=3684408,this.headerFillColor=4144959,this.overlayFillColor=7303023,this.subHeadingFillColor=2894892,this.dangerFillColor=10440527,this.offsetDangerFillColor=this.darken(this.dangerFillColor,986895),this.dangerBorderColor=this.darken(this.dangerFillColor,3092271),this.borderColor=526344,this.dividerColor=2631720,this.subHeadingDividerColor=789516,this.textColor=15856113,this.disabledTextColor=9408399,this.secondaryTextColor=
11513775):(this.themeColor=this.customThemeColor!=null?this.customThemeColor:10535152,this.offsetThemeColor=this.darken(this.themeColor,986895),this.rootFillColor=16316664,this.controlFillColor1=16777215,this.controlFillColor2=15263976,this.controlDisabledFillColor=15724527,this.scrollBarThumbFillColor=9408399,this.scrollBarThumbDisabledFillColor=13619151,this.insetFillColor=16579836,this.disabledInsetFillColor=15856113,this.insetBorderColor=11316396,this.disabledInsetBorderColor=13421772,this.selectedInsetBorderColor=
this.darken(this.themeColor,3092271),this.activeFillBorderColor=this.darken(this.themeColor,3092271),this.selectedBorderColor=this.darken(this.themeColor,3092271),this.focusBorderColor=this.darken(this.themeColor,3092271),this.containerFillColor=16316664,this.headerFillColor=15527148,this.overlayFillColor=9408399,this.subHeadingFillColor=14671839,this.dangerFillColor=15769760,this.offsetDangerFillColor=this.darken(this.dangerFillColor,986895),this.dangerBorderColor=this.darken(this.dangerFillColor,
3092271),this.borderColor=11316396,this.dividerColor=14671839,this.subHeadingDividerColor=13619151,this.textColor=2039583,this.disabledTextColor=10461087,this.secondaryTextColor=7303023);this.dangerTextColor=13385535},refreshFonts:function(){this.fontName="_sans";this.refreshFontSizes()},refreshFontSizes:function(){pc.isDesktop()?(this.fontSize=13,this.headerFontSize=14,this.detailFontSize=11):(this.fontSize=14,this.headerFontSize=18,this.detailFontSize=12)},refreshPaddings:function(){pc.isDesktop()?
(this.xsmallPadding=this.borderThickness=1,this.smallPadding=2,this.mediumPadding=4,this.largePadding=8,this.xlargePadding=10):(this.borderThickness=1,this.xsmallPadding=2,this.smallPadding=4,this.mediumPadding=6,this.largePadding=10,this.xlargePadding=14)},getThemeFill:function(){return ub.SolidColor(this.themeColor)},getControlFill:function(){return ub.SolidColor(this.controlFillColor2)},getControlDisabledFill:function(){return ub.SolidColor(this.controlDisabledFillColor,.7)},getButtonFill:function(){return ub.Gradient(0,
[this.controlFillColor1,this.controlFillColor2],[1,1],[0,255],Ss.fromRadians(Math.PI/2))},getButtonDownFill:function(){return ub.Gradient(0,[this.controlFillColor2,this.controlFillColor1],[1,1],[0,255],Ss.fromRadians(Math.PI/2))},getButtonDisabledFill:function(){return ub.SolidColor(this.controlDisabledFillColor)},getScrollBarThumbFill:function(){return ub.SolidColor(this.scrollBarThumbFillColor)},getScrollBarThumbDisabledFill:function(){return ub.SolidColor(this.scrollBarThumbDisabledFillColor,.7)},
getBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.borderColor)},getButtonBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.borderColor)},getButtonDisabledBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.disabledInsetBorderColor)},getInsetBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.insetBorderColor)},getDisabledInsetBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.disabledInsetBorderColor)},getSelectedInsetBorder:function(a){a==
null&&(a=1);return oc.SolidColor(a,this.selectedInsetBorderColor)},getThemeBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.themeColor)},getSelectedBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.selectedBorderColor)},getActiveFillBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.activeFillBorderColor)},getContainerBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.borderColor)},getDividerBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.dividerColor)},
getDividerFill:function(){return ub.SolidColor(this.dividerColor)},getSubHeadingDividerBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.subHeadingDividerColor)},getSubHeadingDividerFill:function(){return ub.SolidColor(this.subHeadingDividerColor)},getFocusBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.focusBorderColor)},getInsetFill:function(){return ub.SolidColor(this.insetFillColor)},getDisabledInsetFill:function(){return ub.SolidColor(this.disabledInsetFillColor)},getActiveThemeFill:function(){return ub.Gradient(0,
[this.themeColor,this.offsetThemeColor],[1,1],[0,255],Ss.fromRadians(Math.PI/2))},getReversedActiveThemeFill:function(){return ub.Gradient(0,[this.offsetThemeColor,this.themeColor],[1,1],[0,255],Ss.fromRadians(Math.PI/2))},getDangerFill:function(){return ub.Gradient(0,[this.dangerFillColor,this.offsetDangerFillColor],[1,1],[0,255],Ss.fromRadians(Math.PI/2))},getReversedDangerFill:function(){return ub.Gradient(0,[this.offsetDangerFillColor,this.dangerFillColor],[1,1],[0,255],Ss.fromRadians(Math.PI/
2))},getDangerBorder:function(a){a==null&&(a=1);return oc.SolidColor(a,this.dangerBorderColor)},getOverlayFill:function(){return ub.SolidColor(this.overlayFillColor,.8)},getRootFill:function(){return ub.SolidColor(this.rootFillColor)},getContainerFill:function(){return ub.SolidColor(this.containerFillColor)},getSubHeadingFill:function(){return ub.SolidColor(this.subHeadingFillColor)},getTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.fontSize,this.textColor,!1,!1,!1,null,null,
a)},getDisabledTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.fontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getSecondaryTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.fontSize,this.secondaryTextColor,!1,!1,!1,null,null,a)},getDangerTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.fontSize,this.dangerTextColor,!1,!1,!1,null,null,a)},getHeaderTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.headerFontSize,
this.textColor,!1,!1,!1,null,null,a)},getDisabledHeaderTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.headerFontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getDetailTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.detailFontSize,this.textColor,!1,!1,!1,null,null,a)},getDisabledDetailTextFormat:function(a){a==null&&(a=3);return new ni(this.fontName,this.detailFontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getSecondaryDetailTextFormat:function(a){a==
null&&(a=3);return new ni(this.fontName,this.detailFontSize,this.secondaryTextColor,!1,!1,!1,null,null,a)},getHeaderFill:function(){return ub.SolidColor(this.headerFillColor)},lighten:function(a,b){var c=(a>>16&255)+(b>>16&255);c>255&&(c=255);var d=(a>>8&255)+(b>>8&255);d>255&&(d=255);a=(a&255)+(b&255);a>255&&(a=255);return(c<<16)+(d<<8)+a},darken:function(a,b){var c=(a>>16&255)-(b>>16&255);c<0&&(c=0);var d=(a>>8&255)-(b>>8&255);d<0&&(d=0);a=(a&255)-(b&255);a<0&&(a=0);return(c<<16)+(d<<8)+a},mediaQueryList_changeHandler:function(a){this.refreshFontSizes();
this.refreshPaddings();vh.dispatch(this.styleProvider,"stylesChange")},__class__:zc,__properties__:{set_darkMode:"set_darkMode",get_darkMode:"get_darkMode"}});var wm=function(a,b){zc.call(this,a,b);tw.initialize(this);uw.initialize(this);Wq.initialize(this);lw.initialize(this);vw.initialize(this);ww.initialize(this);xw.initialize(this);Uk.initialize(this);yw.initialize(this);Sh.initialize(this);Yv.initialize(this);zw.initialize(this);Aw.initialize(this);Bw.initialize(this);Cw.initialize(this);Dw.initialize(this);
Ew.initialize(this);Fw.initialize(this);mw.initialize(this);Gw.initialize(this);Vk.initialize(this);Hw.initialize(this);Iw.initialize(this);Xv.initialize(this);Jw.initialize(this);Kw.initialize(this);Lw.initialize(this);Mw.initialize(this);Nw.initialize(this);pw.initialize(this);Fn.initialize(this);Ow.initialize(this);Pw.initialize(this);Qw.initialize(this);ow.initialize(this);Rw.initialize(this);Sw.initialize(this);Tw.initialize(this);Uw.initialize(this);Vw.initialize(this);Ww.initialize(this);Xw.initialize(this);
Yw.initialize(this);Zw.initialize(this);$w.initialize(this);ax.initialize(this);sw.initialize(this);bx.initialize(this);nw.initialize(this);cx.initialize(this)};t["feathers.themes.steel.SteelTheme"]=wm;wm.__name__="feathers.themes.steel.SteelTheme";wm.__super__=zc;wm.prototype=I(zc.prototype,{__class__:wm});var Gs=function(a){wm.call(this);this.set_darkMode(!0);a=Ga.jsonParse(a);if(a!=0)for(var b=0,c=y.fields(a);b<c.length;){var d=c[b];++b;switch(d){case "activeFillBorderColor":this.setColor(d,a);
break;case "borderColor":this.setColor(d,a);break;case "containerFillColor":this.setColor(d,a);break;case "controlDisabledFillColor":this.setColor(d,a);break;case "controlFillColor1":this.setColor(d,a);break;case "controlFillColor2":this.setColor(d,a);break;case "dangerBorderColor":this.setColor(d,a);break;case "dangerFillColor":this.setColor(d,a);break;case "dangerTextColor":this.setColor(d,a);break;case "disabledInsetBorderColor":this.setColor(d,a);break;case "disabledInsetFillColor":this.setColor(d,
a);break;case "disabledTextColor":this.setColor(d,a);break;case "dividerColor":this.setColor(d,a);break;case "focusBorderColor":this.setColor(d,a);break;case "fontName":this.fontName=y.field(a,d);break;case "fontSize":this.setColor(d,a);break;case "footerFillColor":this.setColor(d,a);break;case "headerFillColor":this.setColor(d,a);break;case "headerFontName":this.headerFontName=H.string(y.field(a,d));break;case "headerFontSize":this.setColor(d,a);break;case "headerTextColor":this.setColor(d,a);break;
case "insetBorderColor":this.setColor(d,a);break;case "insetFillColor":this.setColor(d,a);break;case "offsetDangerFillColor":this.setColor(d,a);break;case "offsetThemeColor":this.setColor(d,a);break;case "overlayFillColor":this.setColor(d,a);break;case "rootFillColor":this.setColor(d,a);break;case "scrollBarThumbDisabledFillColor":this.setColor(d,a);break;case "scrollBarThumbFillColor":this.setColor(d,a);break;case "secondaryTextColor":this.setColor(d,a);break;case "selectedBorderColor":this.setColor(d,
a);break;case "selectedInsetBorderColor":this.setColor(d,a);break;case "subHeadingDividerColor":this.setColor(d,a);break;case "subHeadingFillColor":this.setColor(d,a);break;case "textColor":this.setColor(d,a);break;case "themeColor":this.setColor(d,a)}}};t["com.tilbuci.ui.PlayerTheme"]=Gs;Gs.__name__="com.tilbuci.ui.PlayerTheme";Gs.__super__=wm;Gs.prototype=I(wm.prototype,{headerFontName:null,headerTextColor:null,footerFillColor:null,listBackground:null,listItemBackground:null,listItemFont:null,headerBackground:null,
get_headerBackground:function(){return this.headerFillColor},headerSize:null,get_headerSize:function(){return this.headerFontSize},headerFont:null,get_headerFont:function(){return this.headerFontName==null?"_sans":this.headerFontName},headerFontColor:null,get_headerFontColor:function(){return this.headerTextColor==null?16777215:this.headerTextColor},windowBackground:null,get_windowBackground:function(){return this.rootFillColor},windowFontName:null,get_windowFontName:function(){return this.fontName},
windowFontSize:null,get_windowFontSize:function(){return this.fontSize},setColor:function(a,b){b=H.parseInt(y.field(b,a));b!=null&&(this[a]=b)},__class__:Gs,__properties__:I(wm.prototype.__properties__,{get_windowFontSize:"get_windowFontSize",get_windowFontName:"get_windowFontName",get_windowBackground:"get_windowBackground",get_headerFontColor:"get_headerFontColor",get_headerFont:"get_headerFont",get_headerSize:"get_headerSize",get_headerBackground:"get_headerBackground"})});var ee=function(){};
t["feathers.core.IStateObserver"]=ee;ee.__name__="feathers.core.IStateObserver";ee.__isInterface__=!0;ee.prototype={get_stateContext:null,set_stateContext:null,__class__:ee,__properties__:{set_stateContext:"set_stateContext",get_stateContext:"get_stateContext"}};var qb=function(){};t["feathers.skins.IProgrammaticSkin"]=qb;qb.__name__="feathers.skins.IProgrammaticSkin";qb.__isInterface__=!0;qb.__interfaces__=[rb];qb.prototype={get_uiContext:null,set_uiContext:null,__class__:qb,__properties__:{set_uiContext:"set_uiContext",
get_uiContext:"get_uiContext"}};var wh=function(){Ad.call(this);this.mouseChildren=!1;this.set_tabEnabled(!1);this.set_tabChildren(!1)};t["feathers.skins.ProgrammaticSkin"]=wh;wh.__name__="feathers.skins.ProgrammaticSkin";wh.__interfaces__=[ee,qb];wh.__super__=Ad;wh.prototype=I(Ad.prototype,{_uiContext:null,get_uiContext:function(){return this._uiContext},set_uiContext:function(a){if(this._uiContext==a)return this._uiContext;this._uiContext!=null&&(this._uiContext.removeEventListener("stateChange",
m(this,this.uiContext_stateChangeHandler)),w.__implements(this._uiContext,ud)&&this._uiContext.removeEventListener("change",m(this,this.uiContextToggle_changeHandler)),this.onRemoveUIContext());this._uiContext=a;this._uiContext!=null&&(this._uiContext.addEventListener("stateChange",m(this,this.uiContext_stateChangeHandler),!1,0,!0),w.__implements(this._uiContext,ud)&&this._uiContext.addEventListener("change",m(this,this.uiContextToggle_changeHandler)),this.onAddUIContext());this.setInvalid(x.DATA);
return this._uiContext},_stateContext:null,get_stateContext:function(){return this._stateContext},set_stateContext:function(a){if(this._stateContext==a)return this._stateContext;this._stateContext!=null&&this._stateContext.removeEventListener("stateChange",m(this,this.stateContext_stateChangeHandler));this._stateContext=a;this._stateContext!=null&&this._stateContext.addEventListener("stateChange",m(this,this.stateContext_stateChangeHandler),!1,0,!0);this.setInvalid(x.DATA);return this._stateContext},
onAddUIContext:function(){},onRemoveUIContext:function(){},update:function(){},needsStateUpdate:function(){return!0},checkForStateChange:function(){this.needsStateUpdate()&&this.setInvalid(x.STATE)},uiContext_stateChangeHandler:function(a){this.checkForStateChange()},uiContextToggle_changeHandler:function(a){this.checkForStateChange()},stateContext_stateChangeHandler:function(a){this.checkForStateChange()},stateContextToggle_changeHandler:function(a){this.checkForStateChange()},__class__:wh,__properties__:I(Ad.prototype.__properties__,
{set_stateContext:"set_stateContext",get_stateContext:"get_stateContext",set_uiContext:"set_uiContext",get_uiContext:"get_uiContext"})});var Ee=function(a,b){this._previousBorder=this._previousFill=null;wh.call(this);this.set_fill(a);this.set_border(b)};t["feathers.skins.BaseGraphicsPathSkin"]=Ee;Ee.__name__="feathers.skins.BaseGraphicsPathSkin";Ee.__super__=wh;Ee.prototype=I(wh.prototype,{_previousBorder:null,_previousFill:null,_stateToFill:null,_fill:null,get_fill:function(){return this._fill},
set_fill:function(a){if(this._fill==a)return this._fill;this._previousFill==this._fill&&(this._previousFill=null);this._fill=a;this.setInvalid(x.STYLES);return this._fill},_disabledFill:null,get_disabledFill:function(){return this._disabledFill},set_disabledFill:function(a){if(this._disabledFill==a)return this._disabledFill;this._previousFill==this._disabledFill&&(this._previousFill=null);this._disabledFill=a;this.setInvalid(x.STYLES);return this._disabledFill},_selectedFill:null,get_selectedFill:function(){return this._selectedFill},
set_selectedFill:function(a){if(this._selectedFill==a)return this._selectedFill;this._previousFill==this._selectedFill&&(this._previousFill=null);this._selectedFill=a;this.setInvalid(x.STYLES);return this._selectedFill},_stateToBorder:null,_border:null,get_border:function(){return this._border},set_border:function(a){if(this._border==a)return this._border;this._previousBorder==this._border&&(this._previousBorder=null);this._border=a;this.setInvalid(x.STYLES);return this._border},_disabledBorder:null,
get_disabledBorder:function(){return this._disabledBorder},set_disabledBorder:function(a){if(this._disabledBorder==a)return this._disabledBorder;this._previousBorder==this._disabledBorder&&(this._previousBorder=null);this._disabledBorder=a;this.setInvalid(x.STYLES);return this._disabledBorder},_selectedBorder:null,get_selectedBorder:function(){return this._selectedBorder},set_selectedBorder:function(a){if(this._selectedBorder==a)return this._selectedBorder;this._previousBorder==this._selectedBorder&&
(this._previousBorder=null);this._selectedBorder=a;this.setInvalid(x.STYLES);return this._selectedBorder},getFillForState:function(a){return this._stateToFill==null?null:this._stateToFill.get(a)},setFillForState:function(a,b){this._stateToFill==null&&(this._stateToFill=new cf);var c=this._stateToFill.get(a);c!=b&&(this._previousFill==c&&(this._previousFill=null),this._stateToFill.set(a,b),this.setInvalid(x.STYLES))},getBorderForState:function(a){return this._stateToBorder==null?null:this._stateToBorder.get(a)},
setBorderForState:function(a,b){this._stateToBorder==null&&(this._stateToBorder=new cf);var c=this._stateToBorder.get(a);c!=b&&(this._previousBorder==c&&(this._previousBorder=null),this._stateToBorder.set(a,b),this.setInvalid(x.STYLES))},update:function(){this._previousBorder=this.getCurrentBorder();this._previousFill=this.getCurrentFill();this.get_graphics().clear();this.draw()},draw:function(){this.applyLineStyle(this.getCurrentBorder());var a=this.getCurrentFill();this.applyFillStyle(a);this.drawPath();
a!=null&&a!=ub.None&&this.get_graphics().endFill()},drawPath:function(){},applyLineStyle:function(a){if(a!=null)switch(a._hx_index){case 0:var b=a.thickness,c=a.color,d=a.alpha,f=a.pixelHinting,g=a.scaleMode,h=a.caps,n=a.joints;a=a.miterLimit;c==null&&(c=0);d==null&&(d=1);f==null&&(f=!1);g==null&&(g=2);a==null&&(a=3);this.get_graphics().lineStyle(b,c,d,f,g,h,n,a);break;case 1:b=a.thickness;d=a.bitmapData;c=a.matrix;f=a.repeat;a=a.smooth;f==null&&(f=!0);a==null&&(a=!1);this.get_graphics().lineStyle(b);
this.get_graphics().lineBitmapStyle(d,c,f,a);break;case 2:b=a.thickness;d=a.type;f=a.colors;g=a.alphas;h=a.ratios;n=a.spreadMethod;var l=a.interpolationMethod,q=a.focalPointRatio;a=a.matrix;a==null&&(a=m(this,this.getDefaultGradientMatrix));n==null&&(n=0);l==null&&(l=1);q==null&&(q=0);c=a(this.getDefaultGradientMatrixWidth(),this.getDefaultGradientMatrixHeight(),this.getDefaultGradientMatrixRadians(),this.getDefaultGradientMatrixTx(),this.getDefaultGradientMatrixTy());this.get_graphics().lineStyle(b);
this.get_graphics().lineGradientStyle(d,f,g,h,c,n,l,q);break;case 3:this.get_graphics().lineStyle(NaN,0,0)}},applyFillStyle:function(a){if(a!=null)switch(a._hx_index){case 0:var b=a.color;a=a.alpha;a==null&&(a=1);this.get_graphics().beginFill(b,a);break;case 1:var c=a.bitmapData;b=a.matrix;var d=a.repeat;a=a.smoothing;d==null&&(d=!0);a==null&&(a=!1);this.get_graphics().beginBitmapFill(c,b,d,a);break;case 2:c=a.type;d=a.colors;var f=a.alphas,g=a.ratios,h=a.spreadMethod,n=a.interpolationMethod,l=a.focalPointRatio;
a=a.matrix;a==null&&(a=m(this,this.getDefaultGradientMatrix));h==null&&(h=0);n==null&&(n=1);l==null&&(l=0);b=a(this.getDefaultGradientMatrixWidth(),this.getDefaultGradientMatrixHeight(),this.getDefaultGradientMatrixRadians(),this.getDefaultGradientMatrixTx(),this.getDefaultGradientMatrixTy());this.get_graphics().beginGradientFill(c,d,f,g,b,h,n,l)}},getLineThickness:function(a){if(a==null)return 0;switch(a._hx_index){case 0:return a=a.thickness;case 2:return a=a.thickness;default:return 0}},getDefaultGradientMatrix:function(a,
b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=0);var g=new gb;g.createGradientBox(a,b,c,d,f);return g},getDefaultGradientMatrixWidth:function(){return this.actualWidth},getDefaultGradientMatrixHeight:function(){return this.actualHeight},getDefaultGradientMatrixRadians:function(){return 0},getDefaultGradientMatrixTx:function(){return 0},getDefaultGradientMatrixTy:function(){return 0},getCurrentBorder:function(){return this._previousBorder!=null?this._previousBorder:this.getCurrentBorderWithoutCache()},
getCurrentBorderWithoutCache:function(){var a=this._stateContext;a==null&&w.__implements(this._uiContext,uh)&&(a=this._uiContext);return this._stateToBorder!=null&&a!=null&&(a=this._stateToBorder.get(a.get_currentState()),a!=null)?a:this._uiContext==null?this._border:this._disabledBorder==null||this._uiContext.get_enabled()?this._selectedBorder!=null&&w.__implements(this._uiContext,ud)&&this._uiContext.get_selected()?this._selectedBorder:this._border:this._disabledBorder},getCurrentFill:function(){return this._previousFill!=
null?this._previousFill:this.getCurrentFillWithoutCache()},getCurrentFillWithoutCache:function(){var a=this._stateContext;a==null&&w.__implements(this._uiContext,uh)&&(a=this._uiContext);return this._stateToFill!=null&&a!=null&&(a=this._stateToFill.get(a.get_currentState()),a!=null)?a:this._uiContext==null?this._fill:this._disabledFill==null||this._uiContext.get_enabled()?this._selectedFill!=null&&w.__implements(this._uiContext,ud)&&this._uiContext.get_selected()?this._selectedFill:this._fill:this._disabledFill},
needsStateUpdate:function(){var a=!1;this._previousBorder!=this.getCurrentBorderWithoutCache()&&(this._previousBorder=null,a=!0);this._previousFill!=this.getCurrentFillWithoutCache()&&(this._previousFill=null,a=!0);return a},__class__:Ee,__properties__:I(wh.prototype.__properties__,{set_selectedBorder:"set_selectedBorder",get_selectedBorder:"get_selectedBorder",set_disabledBorder:"set_disabledBorder",get_disabledBorder:"get_disabledBorder",set_border:"set_border",get_border:"get_border",set_selectedFill:"set_selectedFill",
get_selectedFill:"get_selectedFill",set_disabledFill:"set_disabledFill",get_disabledFill:"get_disabledFill",set_fill:"set_fill",get_fill:"get_fill"})});var Za=function(a,b){this._cornerRadius=0;Ee.call(this,a,b)};t["feathers.skins.RectangleSkin"]=Za;Za.__name__="feathers.skins.RectangleSkin";Za.__super__=Ee;Za.prototype=I(Ee.prototype,{_cornerRadius:null,get_cornerRadius:function(){return this._cornerRadius},set_cornerRadius:function(a){if(this._cornerRadius==a)return this._cornerRadius;this._cornerRadius=
a;this.setInvalid(x.STYLES);return this._cornerRadius},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a);a=b/2;var c=Math.max(0,this.actualWidth-b);b=Math.max(0,this.actualHeight-b);if(this._cornerRadius==0)this.get_graphics().drawRect(a,a,c,b);else{var d=this._cornerRadius*2;d=Math.min(d,Math.min(this.actualWidth,this.actualHeight));this.get_graphics().drawRoundRect(a,a,c,b,d)}},__class__:Za,__properties__:I(Ee.prototype.__properties__,{set_cornerRadius:"set_cornerRadius",
get_cornerRadius:"get_cornerRadius"})});var rh=function(a){a==null&&(a=6710886);Za.call(this);this.set_fill(ub.SolidColor(a))};t["com.tilbuci.ui.base.BackgroundSkin"]=rh;rh.__name__="com.tilbuci.ui.base.BackgroundSkin";rh.__super__=Za;rh.prototype=I(Za.prototype,{__class__:rh});var Bl=function(a,b,c,d,f,g,h,n){n==null&&(n="");h==null&&(h="warn");Uc.call(this);var l=new uf;l.setPadding(10);l.set_gap(20);l.set_verticalAlign(hc.TOP);l.set_horizontalAlign(Wb.LEFT);this.set_backgroundSkin(new rh(3684408));
this.set_layout(l);this.set_width(c);this.set_height(d);d=new Mi;d.set_text(a);this.set_header(d);a=new ia;a.set_text(b);a.set_wordWrap(!0);a.set_width(c-30);this.addChild(a);this._btOk=new Xb;this._btOk.set_text(f);this._btOk.addEventListener("trigger",m(this,this.onBtOk));this._btOk.set_width(a.get_width());this.addChild(this._btOk);this._ac=g;this._btCancel=new Xb;this._btCancel.set_text(n);this._btCancel.addEventListener("trigger",m(this,this.onBtCancel));this._btCancel.set_width(a.get_width());
h=="confirm"&&this.addChild(this._btCancel)};t["com.tilbuci.ui.base.ConfirmWindow"]=Bl;Bl.__name__="com.tilbuci.ui.base.ConfirmWindow";Bl.__super__=Uc;Bl.prototype=I(Uc.prototype,{_btOk:null,_btCancel:null,_ac:null,onBtOk:function(a){this._btOk.removeEventListener("trigger",m(this,this.onBtOk));this._btCancel.removeEventListener("trigger",m(this,this.onBtCancel));this._btCancel=this._btOk=null;this.removeChildren();Aa.removePopUp(this);this._ac!=null&&this._ac(!0);this._ac=null},onBtCancel:function(a){this._btOk.removeEventListener("trigger",
m(this,this.onBtOk));this._btCancel.removeEventListener("trigger",m(this,this.onBtCancel));this._btCancel=this._btOk=null;this.removeChildren();Aa.removePopUp(this);this._ac!=null&&this._ac(!1);this._ac=null},__class__:Bl});var Fj=function(){this._fallbackFluidIndex=-1;this._customItemWidths=[];this.initializeHDividedBoxTheme();gf.call(this);this.resizeCursor=ch.fromLimeCursor(id.RESIZE_WE)};t["feathers.controls.HDividedBox"]=Fj;Fj.__name__="feathers.controls.HDividedBox";Fj.__super__=gf;Fj.prototype=
I(gf.prototype,{_hDividedBoxLayout:null,_customItemWidths:null,_fallbackFluidIndex:null,_resizeStartStageX:null,_resizeStartWidth1:null,_resizeStartWidth2:null,initializeHDividedBoxTheme:function(){Dw.initialize()},addItemAt:function(a,b){var c=gf.prototype.addItemAt.call(this,a,b),d=null;w.__implements(a,rb)&&(d=a.get_explicitWidth());this._customItemWidths.splice(b,0,d);a=this._layoutItems.indexOf(a);d==null&&(this._fallbackFluidIndex==-1||a>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=
a);return c},removeItem:function(a){var b=this.items.indexOf(a),c=this._layoutItems.indexOf(a);this._fallbackFluidIndex==c&&(this._fallbackFluidIndex=-1);a=gf.prototype.removeItem.call(this,a);b!=-1&&this._customItemWidths.splice(b,1);return a},initialize:function(){gf.prototype.initialize.call(this);this._hDividedBoxLayout==null&&(this._hDividedBoxLayout=new ep);this._hDividedBoxLayout.set_customItemWidths(this._customItemWidths);this.layout=this._hDividedBoxLayout},handleLayout:function(){var a=
this._ignoreChildChanges;this._ignoreChildChanges=!0;this._hDividedBoxLayout.set_fallbackFluidIndex(this._fallbackFluidIndex);this._ignoreChildChanges=a;gf.prototype.handleLayout.call(this)},prepareResize:function(a,b,c){this._resizeStartStageX=b;b=this.items[a+1];this._resizeStartWidth1=this.items[a].get_width();this._resizeStartWidth2=b.get_width();this._currentResizeDraggingSkin!=null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_y(a.get_y()),this._currentResizeDraggingSkin.set_height(a.get_height()),
w.__implements(this._currentResizeDraggingSkin,da)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_x(a.get_x()+(a.get_width()-this._currentResizeDraggingSkin.get_width())/2))},commitResize:function(a,b,c,d){b-=this._resizeStartStageX;b*=Zg.getConcatenatedScaleX(this);if(d&&!this.liveDragging)this._currentResizeDraggingSkin!=null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_y(a.get_y()),this._currentResizeDraggingSkin.set_height(a.get_height()),w.__implements(this._currentResizeDraggingSkin,
da)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_x(a.get_x()+b+(a.get_width()-this._currentResizeDraggingSkin.get_width())/2));else{d=this.items[a];var f=this.items[a+1];c=this._resizeStartWidth1+this._resizeStartWidth2;b=this._resizeStartWidth2-b;w.__implements(f,rb)&&(f.get_explicitMinWidth()!=null&&b<f.get_explicitMinWidth()?b=f.get_explicitMinWidth():f.get_explicitMaxWidth()!=null&&b>f.get_explicitMaxWidth()&&(b=f.get_explicitMaxWidth()));b<0?b=0:b>c&&(b=
c);b=c-b;w.__implements(d,rb)&&(d.get_explicitMinWidth()!=null&&b<d.get_explicitMinWidth()?b=d.get_explicitMinWidth():d.get_explicitMaxWidth()!=null&&b>d.get_explicitMaxWidth()&&(b=d.get_explicitMaxWidth()));b<0?b=0:b>c&&(b=c);this._customItemWidths[a]=b;this._customItemWidths[a+1]=c-b;this.setInvalid(x.LAYOUT)}},baseDividedBox_child_layoutDataChangeHandler:function(a){gf.prototype.baseDividedBox_child_layoutDataChangeHandler.call(this,a);a=w.__cast(a.currentTarget,T);var b=this._layoutItems.indexOf(a);
a.get_includeInLayout()||this._fallbackFluidIndex!=b||(this._fallbackFluidIndex=-1)},baseDividedBox_child_resizeHandler:function(a){if(!this._ignoreChildChanges){var b=a.currentTarget,c=this.items.indexOf(b);c!=-1&&(a=null,w.__implements(b,rb)&&(a=b.get_explicitWidth()),this._customItemWidths[c]=a,b=this._layoutItems.indexOf(b),a==null&&(this._fallbackFluidIndex==-1||b>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=b),this.setInvalid(x.LAYOUT))}},__class__:Fj});var Pi=function(){Fj.call(this)};
t["com.tilbuci.ui.base.HInterfaceContainer"]=Pi;Pi.__name__="com.tilbuci.ui.base.HInterfaceContainer";Pi.__super__=Fj;Pi.prototype=I(Fj.prototype,{replaceChildren:function(a){this.removeChildren();for(var b=0,c=a.length;b<c;){var d=b++;this.addChild(a[d])}},setWidth:function(a,b){this.set_width(a);if(this.get_numChildren()>0)if(b!=null&&b.length==this.get_numChildren()){a=0;for(var c=b.length;a<c;){var d=a++;this.getChildAt(d).set_width(b[d])}}else for(b=(a-(this.get_numChildren()-1)*10)/this.get_numChildren(),
a=0,c=this.get_numChildren();a<c;)d=a++,this.getChildAt(d).set_width(b)},__class__:Pi});var dx=function(){pb.call(this);var a=new zg;a.set_gap(10);this.set_layout(a)};t["com.tilbuci.ui.base.HPanelContainer"]=dx;dx.__name__="com.tilbuci.ui.base.HPanelContainer";dx.__super__=pb;dx.prototype=I(pb.prototype,{replaceChildren:function(a){var b=this.get_width();this.removeChildren();for(var c=0,d=a.length;c<d;){var f=c++;this.addChild(a[f])}this.setWidth(Math.round(b))},setWidth:function(a){if(this.get_numChildren()>
0){var b=(a-(this.get_numChildren()-1)*10)/this.get_numChildren();De.trace("wd",{fileName:"Source/com/tilbuci/ui/base/HPanelContainer.hx",lineNumber:48,className:"com.tilbuci.ui.base.HPanelContainer",methodName:"setWidth",customParams:[a,"each",b]});a=0;for(var c=this.get_numChildren();a<c;){var d=a++;this.getChildAt(d).set_width(b);De.trace("set",{fileName:"Source/com/tilbuci/ui/base/HPanelContainer.hx",lineNumber:52,className:"com.tilbuci.ui.base.HPanelContainer",methodName:"setWidth",customParams:[this.getChildAt(d),
this.getChildAt(d).get_width()]})}}},__class__:dx});var Ts=function(a,b,c,d){d==null&&(d=0);Rh.call(this);this.set_layoutData(fd.fill());var f=new Za;f.set_fill(ub.SolidColor(6710886));this.set_backgroundSkin(f);var g=new Fj;g.set_layoutData(fd.fill());g.set_backgroundSkin(f);this.left=a;this.right=b;g.addChild(this.left);g.addChild(this.right);this.addChild(g);c!=null&&(this.bottom=c,this.bottom.set_backgroundSkin(f),this.addChild(this.bottom),d>0&&g.set_minHeight(d))};t["com.tilbuci.ui.base.InterfaceColumns"]=
Ts;Ts.__name__="com.tilbuci.ui.base.InterfaceColumns";Ts.__super__=Rh;Ts.prototype=I(Rh.prototype,{left:null,right:null,bottom:null,__class__:Ts});var Nj=function(a,b,c,d){d==null&&(d=-1);c==null&&(c=-1);b==null&&(b=-1);a==null&&(a="");je.call(this);a=="v"?(a=new uf,b>0?(a.set_gap(b),a.setPadding(b)):b==0&&(a.set_gap(10),a.setPadding(0)),this.set_layout(a)):a=="h"&&(a=new zg,b>0&&(a.set_gap(b),a.setPadding(b)),this.set_layout(a));c>=0&&(b=new Za,b.set_fill(ub.SolidColor(c)),d>=0&&b.set_border(oc.SolidColor(1,
d)),this.set_backgroundSkin(b))};t["com.tilbuci.ui.base.InterfaceContainer"]=Nj;Nj.__name__="com.tilbuci.ui.base.InterfaceContainer";Nj.__super__=je;Nj.prototype=I(je.prototype,{replaceChildren:function(a){this.removeChildren();for(var b=0,c=a.length;b<c;){var d=b++;this.addChild(a[d])}},__class__:Nj});var Bc=function(a){a==null&&(a=10);this.lists=new G;this.selects=new G;this._btActions=new G;this.toggles=new G;this.buttons=new G;this.spacers=new G;this.numerics=new G;this.tareas=new G;this.inputs=
new G;this.labels=new G;this.hcontainers=new G;this.containers=new G;this.columns=new G;this._padding=10;this._padding=a;this._vLayout=new uf;this._vLayout.setPadding(this._padding);this._vLayout.set_gap(this._padding/2);this._vLayout.set_verticalAlign(hc.TOP);this._vLayout.set_horizontalAlign(Wb.LEFT);this._hLayout=new zg;this._hLayout.setPadding(this._padding);this._hLayout.set_gap(this._padding/2);this._hLayout.set_verticalAlign(hc.TOP);this._hLayout.set_horizontalAlign(Wb.LEFT)};t["com.tilbuci.ui.base.InterfaceFactory"]=
Bc;Bc.__name__="com.tilbuci.ui.base.InterfaceFactory";Bc.pickValue=function(a,b){return pc.isMobile()?b:a};Bc.prototype={_vLayout:null,_hLayout:null,_padding:null,columns:null,containers:null,hcontainers:null,lastCont:null,labels:null,inputs:null,lastInput:null,tareas:null,numerics:null,spacers:null,buttons:null,toggles:null,_btActions:null,selects:null,lists:null,createColumnHolder:function(a,b,c,d,f){f==null&&(f=0);b=new Ts(b,c,d,f);return this.columns.h[a]=b},createContainer:function(a,b){b==null&&
(b=-1);var c=new Nj;c.set_backgroundSkin(new rh);if(b<0)c.set_layout(this._vLayout);else{var d=new uf;d.setPadding(b);d.set_gap(b/2);d.set_verticalAlign(hc.TOP);d.set_horizontalAlign(Wb.LEFT);c.set_layout(d)}return this.lastCont=this.containers.h[a]=c},createHContainer:function(a,b){b==null&&(b=-1);var c=new Pi;if(b>=0){var d=new Za;d.set_fill(ub.SolidColor(b));c.set_backgroundSkin(d)}else c.set_backgroundSkin(new rh);return this.hcontainers.h[a]=c},createHArea:function(a,b,c){c==null&&(c=10);b==
null&&(b=10066329);a==null&&(a="left");var d=new Uc,f=new zg;f.set_gap(c);f.setPadding(c);switch(a){case "left":f.set_horizontalAlign(Wb.LEFT);break;case "right":f.set_horizontalAlign(Wb.RIGHT);break;default:f.set_horizontalAlign(Wb.CENTER)}d.set_layout(f);a=new Za;a.set_fill(ub.SolidColor(b));d.set_backgroundSkin(a);return d},createWarning:function(a,b,c,d,f,g,h){h==null&&(h="Ok");a=new Bl(a,b,c,d,h,g,"warn");f!=null&&Aa.addPopUp(a,f);return a},createConfirm:function(a,b,c,d,f,g,h,n){a=new Bl(a,
b,c,d,g,f,"confirm",h);n!=null&&Aa.addPopUp(a,n);return a},createLabel:function(a,b,c,d,f){f==null&&(f=!0);c==null&&(c="");var g=new fp;c!=""&&g.set_variant(c);g.set_text(b);g.autoResize=f;d!=null&&d.addChild(g);return this.labels.h[a]=g},createDescription:function(a,b,c,d,f){f==null&&(f=!0);c=new fp;c.set_wordWrap(!0);c.set_htmlText(b);c.autoResize=f;d!=null&&d.addChild(c);return this.labels.h[a]=c},createTInput:function(a,b,c,d,f,g){f==null&&(f=!0);c==null&&(c="");b==null&&(b="");var h=new Us;h.set_text(b);
h.autoResize=f;c!=""&&h.set_variant(c);d!=null&&d.addChild(h);this.lastInput=this.inputs.h[a]=h;g!=null&&h.addEventListener("change",g);return h},createNumeric:function(a,b,c,d,f,g){f==null&&(f=0);d==null&&(d=1);c==null&&(c=100);b==null&&(b=0);var h=new sd;h.set_minimum(b);h.set_maximum(c);h.set_step(d);h.set_value(f);h.set_valueParseFunction(m(this,this.numericParser));this.numerics.h[a]=h;g!=null&&g.addChild(h);return h},numericParser:function(a){a=k.evaluate(a);return a==null?NaN:parseFloat(a)},
createToggle:function(a,b,c,d){b==null&&(b=!1);var f=new Mk;f.set_selected(b);this.toggles.h[a]=f;d!=null&&f.addEventListener("change",d);c!=null&&c.addChild(f);return f},createTArea:function(a,b,c,d,f){d==null&&(d="");c==null&&(c=!0);b==null&&(b="");var g=new tf;g.set_text(b);g.set_enabled(c);d!=""&&g.set_variant(d);f!=null&&f.addChild(g);g.set_height(75);return this.tareas.h[a]=g},createButton:function(a,b,c,d,f){f==null&&(f=!0);b=new Rc(a,c,b,null,f);b.set_horizontalAlign(Wb.CENTER);d!=null&&d.addChild(b);
this.buttons.h[a]=b;this._btActions.h[a]=c;return b},createIconButton:function(a,b,c,d,f,g){g==null&&(g=!0);var h=new Rc(a,b);c.smoothing=!0;c.set_width(c.set_height(20));h.set_icon(c);h.autoResize=g;d!=null&&h.set_text(d);h.set_horizontalAlign(Wb.CENTER);f!=null&&f.addChild(h);this.buttons.h[a]=h;this._btActions.h[a]=b;return h},disableButton:function(a,b){return Object.prototype.hasOwnProperty.call(this.buttons.h,a)?(this.buttons.h[a].set_enabled(!1),b!=null&&this.buttons.h[a].set_text(b),!0):!1},
enableButton:function(a,b){return Object.prototype.hasOwnProperty.call(this.buttons.h,a)?(this.buttons.h[a].set_enabled(!0),b!=null&&this.buttons.h[a].set_text(b),!0):!1},createSpacer:function(a,b,c,d){c==null&&(c=!1);b==null&&(b=10);var f=new Ad;f.set_width(10);f.set_height(b);c&&(b=Math.ceil(b/2),f.get_graphics().beginFill(10987431),f.get_graphics().drawRect(0,b,f.get_width(),1),f.get_graphics().endFill());this.spacers.h[a]=f;d!=null&&d.addChild(f);return f},createSelect:function(a,b,c,d,f){f==
null&&(f=!0);var g=new Vs;g.set_dataProvider(new dg(b));g.itemToText=function(h){return h.text};g.autoResize=f;this.selects.h[a]=g;c!=null&&this.setSelectValue(a,c);d!=null&&d.addChild(g);return g},setSelectOptions:function(a,b,c){return Object.prototype.hasOwnProperty.call(this.selects.h,a)?(this.selects.h[a].set_dataProvider(new dg(b)),c!=null?this.setSelectValue(a,c):!0):!1},setSelectValue:function(a,b){if(Object.prototype.hasOwnProperty.call(this.selects.h,a)){for(var c=!1,d=0,f=this.selects.h[a].get_dataProvider().get_length();d<
f;){var g=d++;this.selects.h[a].get_dataProvider().get(g).value==b&&(this.selects.h[a].set_selectedIndex(g),c=!0)}return c}return!1},selectChange:function(a,b,c){return Object.prototype.hasOwnProperty.call(this.selects.h,a)?(this.selects.h[a].addEventListener("change",b),c!=null&&this.selects.h[a].addEventListener("open",c),!0):!1},createList:function(a,b,c,d,f){c==null&&(c=100);var g=new Fc;g.set_dataProvider(new dg(b));g.itemToText=function(h){return h.text};g.set_height(c);g.doubleClickEnabled=
!0;b=Ne.withFunction(function(){var h=new Sc;h.doubleClickEnabled=!0;return h});g.set_itemRendererRecycler(b);b.update=function(h,n){h.set_text(n.text);n=0;for(var l=h.get_numChildren();n<l;){var q=n++,u=h.getChildAt(q);Object.prototype.hasOwnProperty.call(u,"doubleClickEnabled")&&(h.getChildAt(q).doubleClickEnabled=!0)}};this.lists.h[a]=g;d!=null&&this.setListSelectValue(a,d);f!=null&&f.addChild(g);return g},setListToIcon:function(a){if(Object.prototype.hasOwnProperty.call(this.lists.h,a)){var b=
Ne.withFunction(function(){var c=new Sc;c.set_icon(new Gn);c.doubleClickEnabled=!0;return c});this.lists.h[a].set_itemRendererRecycler(b);b.update=function(c,d){c.set_text(d.text);c.set_secondaryText(d.data.user);w.__cast(c.get_icon(),Gn).set_source(d.data.asset);d=0;for(var f=c.get_numChildren();d<f;){var g=d++,h=c.getChildAt(g);Object.prototype.hasOwnProperty.call(h,"doubleClickEnabled")&&(c.getChildAt(g).doubleClickEnabled=!0)}};return!0}return!1},listDbClick:function(a,b){return Object.prototype.hasOwnProperty.call(this.lists.h,
a)?(this.lists.h[a].addEventListener("doubleClick",b),!0):!1},listChange:function(a,b){return Object.prototype.hasOwnProperty.call(this.lists.h,a)?(this.lists.h[a].addEventListener("change",b),!0):!1},setListValues:function(a,b){return Object.prototype.hasOwnProperty.call(this.lists.h,a)?(this.lists.h[a].set_dataProvider(new dg(b)),!0):!1},setListSelectValue:function(a,b){if(Object.prototype.hasOwnProperty.call(this.lists.h,a)){if(b==null)return this.lists.h[a].set_selectedItem(null),!0;for(var c=
!1,d=0,f=this.lists.h[a].get_dataProvider().get_length();d<f;){var g=d++;this.lists.h[a].get_dataProvider().get(g).value==b&&(this.lists.h[a].set_selectedIndex(g),c=!0)}return c}return!1},setListMultiValue:function(a,b){if(Object.prototype.hasOwnProperty.call(this.lists.h,a)){for(var c=[],d=0;d<b.length;){var f=b[d];++d;for(var g=0,h=this.lists.h[a].get_dataProvider().get_length();g<h;){var n=g++;this.lists.h[a].get_dataProvider().get(n).value==f&&c.push(n)}}this.lists.h[a].set_selectedIndices(c)}},
forge:function(a,b,c,d,f){f==null&&(f=-1);d==null&&(d=-1);c==null&&(c=-1);a=this.createContainer(a,f);c>=0&&(f=new Za,f.set_fill(ub.SolidColor(c)),a.set_backgroundSkin(f));c=0;for(f=b.length;c<f;){var g=c++;switch(b[g].tp){case "Button":var h=!0;Object.prototype.hasOwnProperty.call(b[g],"ar")&&(h=b[g].ar);this.createButton(b[g].id,b[g].tx,b[g].ac,this.lastCont,h);d>=0&&this.buttons.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"cl")&&this.buttons.h[b[g].id].addEventListener("trigger",
b[g].cl);break;case "Custom":this.lastCont.addChild(b[g].cont);Object.prototype.hasOwnProperty.call(b[g],"wd")&&(b[g].cont.width=b[g].wd);break;case "Description":this.createDescription(b[g].id,b[g].tx,b[g].vr,this.lastCont);d>=0&&this.labels.h[b[g].id].set_width(d);break;case "Label":this.createLabel(b[g].id,b[g].tx,b[g].vr,this.lastCont);Object.prototype.hasOwnProperty.call(b[g],"wrap")&&this.labels.h[b[g].id].set_wordWrap(b[g].wrap);d>=0&&this.labels.h[b[g].id].set_width(d);break;case "List":this.createList(b[g].id,
b[g].vl,b[g].ht,b[g].sl,this.lastCont);d>=0&&this.lists.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.lists.h[b[g].id].addEventListener("change",b[g].ch);break;case "Numeric":this.createNumeric(b[g].id,b[g].mn,b[g].mx,b[g].st,b[g].vl,this.lastCont);d>=0&&this.numerics.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.numerics.h[b[g].id].addEventListener("change",b[g].ch);break;case "Select":this.createSelect(b[g].id,b[g].vl,b[g].sl,this.lastCont);
d>=0&&this.selects.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.selects.h[b[g].id].addEventListener("change",b[g].ch);break;case "Spacer":this.createSpacer(b[g].id,b[g].ht,b[g].ln,this.lastCont);d>=0&&this.spacers.h[b[g].id].set_width(d);break;case "TArea":this.createTArea(b[g].id,b[g].tx,b[g].en,b[g].vr,this.lastCont);Object.prototype.hasOwnProperty.call(b[g],"ht")&&this.tareas.h[b[g].id].set_height(b[g].ht);d>=0&&this.tareas.h[b[g].id].set_width(d);break;case "TInput":this.createTInput(b[g].id,
b[g].tx,b[g].vr,this.lastCont);d>=0&&this.inputs.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.inputs.h[b[g].id].addEventListener("change",b[g].ch);break;case "Toggle":this.createToggle(b[g].id,b[g].vl,this.lastCont),Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.toggles.h[b[g].id].addEventListener("change",b[g].ch)}}d>0&&a.set_width(d);return a},kill:function(){this._vLayout=null;var a=this.columns.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];
this.columns.h[d].removeChildren();var f=this.columns;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.columns=null;a=this.containers.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.containers.h[d].removeChildren(),f=this.containers,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.lastCont=this.containers=null;a=this.inputs.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.inputs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.inputs=
null;a=this.numerics.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.numerics,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.lastInput=this.numerics=null;a=this.tareas.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.tareas,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.tareas=null;a=this.labels.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.labels,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.labels=null;a=this.spacers.h;
a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.spacers.h[d].get_graphics().clear(),f=this.spacers,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.spacers=null;a=this.buttons.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.buttons.h[d].removeEventListener("trigger",this._btActions.h[d]),f=this.buttons,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d],f=this._btActions,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.buttons=null;a=this.selects.h;
a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.selects,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.selects=null;a=this.lists.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.lists,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.lists=null;a=this.toggles.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.toggles,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._btActions=this.toggles=null},redraw:function(){var a=this.inputs.h,
b=a;a=Object.keys(a);for(var c=a.length,d=0;d<c;){var f=b[a[d++]];f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding)}b=a=this.numerics.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.tareas.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_width(f.parent.parent.get_width()-4*this._padding);
b=a=this.labels.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.selects.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.lists.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_width(f.parent.parent.get_width()-
4*this._padding);b=a=this.buttons.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.spacers.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_scaleX((f.parent.parent.get_width()-4*this._padding)/10)},__class__:Bc};var jj=function(a,b,c){c==null&&(c=!1);b==null&&(b=250);a==null&&(a=760);this._codemode=!1;this._idbuttons=new G;
je.call(this);var d=new uf;d.set_gap(5);d.setPadding(0);this.set_layout(d);this.set_backgroundSkin(new rh);this._code=new gp("js");this._code.set_width(a);this._code.set_height(b-35);this._block=new Ws(this._code);this._block.set_width(a);this._block.set_height(b-35);this.addChild(this._block);this._buttons=new Pi;this._buttons.set_width(a);b=this._idbuttons;d=new Rc("switch",m(this,this.onSwitch),null,Z.getBitmapData("btBlocks"));b.h["switch"]=d;b=this._idbuttons;d=new Rc("copy",m(this,this.onCopy),
null,Z.getBitmapData("btCopy"));b.h.copy=d;b=this._idbuttons;d=new Rc("scene",m(this,this.onScene),null,Z.getBitmapData("btMovieScene"));b.h.scene=d;b=this._idbuttons;d=new Rc("instance",m(this,this.onInstance),null,Z.getBitmapData("btMedia"));b.h.instance=d;b=this._idbuttons;d=new Rc("variables",m(this,this.onVariables),null,Z.getBitmapData("btVariables"));b.h.variables=d;b=this._idbuttons;d=new Rc("data",m(this,this.onData),null,Z.getBitmapData("btData"));b.h.data=d;b=this._idbuttons;d=new Rc("plus",
m(this,this.onPlus),null,Z.getBitmapData("btPlus"));b.h.plus=d;b=this._idbuttons;d=new Rc("plus",m(this,this.onRuntime),null,Z.getBitmapData("btSetup"));b.h.runtime=d;b=this._idbuttons;d=new Rc("contraptions",m(this,this.onContraptions),null,Z.getBitmapData("btContraptions"));b.h.contraptions=d;b=this._idbuttons;d=new Rc("narrative",m(this,this.onNarrative),null,Z.getBitmapData("btNarrative"));b.h.narrative=d;b=this._idbuttons;d=new Rc("plugin",m(this,this.onPlugin),null,Z.getBitmapData("btPlugin"));
b.h.plugin=d;this._buttons.addChild(this._idbuttons.h["switch"]);this._buttons.addChild(this._idbuttons.h.copy);this._buttons.addChild(this._idbuttons.h.scene);this._buttons.addChild(this._idbuttons.h.instance);this._buttons.addChild(this._idbuttons.h.variables);this._buttons.addChild(this._idbuttons.h.data);this._buttons.addChild(this._idbuttons.h.plus);this._buttons.addChild(this._idbuttons.h.runtime);this._buttons.addChild(this._idbuttons.h.contraptions);this._buttons.addChild(this._idbuttons.h.narrative);
this._buttons.addChild(this._idbuttons.h.plugin);this._idbuttons.h["switch"].set_toolTip(k.ln.get("tooltip-action-switch"));this._idbuttons.h.copy.set_toolTip(k.ln.get("tooltip-action-copy"));this._idbuttons.h.scene.set_toolTip(k.ln.get("tooltip-action-scene"));this._idbuttons.h.instance.set_toolTip(k.ln.get("tooltip-action-instance"));this._idbuttons.h.variables.set_toolTip(k.ln.get("tooltip-action-variables"));this._idbuttons.h.data.set_toolTip(k.ln.get("tooltip-action-data"));this._idbuttons.h.plus.set_toolTip(k.ln.get("tooltip-action-plus"));
this._idbuttons.h.contraptions.set_toolTip(k.ln.get("tooltip-action-contraptions"));this._idbuttons.h.narrative.set_toolTip(k.ln.get("tooltip-action-narrative"));this._idbuttons.h.plugin.set_toolTip(k.ln.get("tooltip-action-plugin"));this._blockbuttons=new Pi;this._blockbuttons.set_width(a);b=this._idbuttons;d=new Rc("blswitch",m(this,this.onSwitch),null,Z.getBitmapData("btCode"));b.h.blswitch=d;b=this._idbuttons;d=new Rc("bldel",m(this,this.onDel),null,Z.getBitmapData("btDel"));b.h.bldel=d;b=this._idbuttons;
d=new Rc("bledit",m(this,this.onEdit),null,Z.getBitmapData("btEdit"));b.h.bledit=d;b=this._idbuttons;d=new Rc("blopen",m(this,this.onOpen),null,Z.getBitmapData("btExpand"));b.h.blopen=d;b=this._idbuttons;d=new Rc("blclose",m(this,this.onClose),null,Z.getBitmapData("btCompress"));b.h.blclose=d;b=this._idbuttons;d=new Rc("blup",m(this,this.onUp),null,Z.getBitmapData("btUp"));b.h.blup=d;b=this._idbuttons;d=new Rc("bldown",m(this,this.onDown),null,Z.getBitmapData("btDown"));b.h.bldown=d;this._idbuttons.h.blswitch.set_toolTip(k.ln.get("tooltip-action-switch"));
this._idbuttons.h.bldel.set_toolTip(k.ln.get("tooltip-action-bldel"));this._idbuttons.h.bledit.set_toolTip(k.ln.get("tooltip-action-bledit"));this._idbuttons.h.blopen.set_toolTip(k.ln.get("tooltip-action-blopen"));this._idbuttons.h.blclose.set_toolTip(k.ln.get("tooltip-action-blclose"));this._idbuttons.h.blup.set_toolTip(k.ln.get("tooltip-action-blup"));this._idbuttons.h.bldown.set_toolTip(k.ln.get("tooltip-action-bldown"));c||this._blockbuttons.addChild(this._idbuttons.h.blswitch);this._blockbuttons.addChild(this._idbuttons.h.bldel);
this._blockbuttons.addChild(this._idbuttons.h.bledit);this._blockbuttons.addChild(this._idbuttons.h.blopen);this._blockbuttons.addChild(this._idbuttons.h.blclose);this._blockbuttons.addChild(this._idbuttons.h.blup);this._blockbuttons.addChild(this._idbuttons.h.bldown);this.addChild(this._blockbuttons)};t["com.tilbuci.ui.component.ActionArea"]=jj;jj.__name__="com.tilbuci.ui.component.ActionArea";jj.__super__=je;jj.prototype=I(je.prototype,{_code:null,_block:null,_buttons:null,_blockbuttons:null,_idbuttons:null,
_codemode:null,setText:function(a){this._code.set_text(a);this._block.refresh()},getText:function(){return this._codemode?this._code.get_text():this._block.toJson()},onSwitch:function(a){this._codemode=!this._codemode;this.removeChildren();this._codemode?(this._code.set_text(this._block.toJson()),this._block.clear(),this.addChild(this._code),this.addChild(this._buttons)):this._block.refresh()?(this.addChild(this._block),this.addChild(this._blockbuttons)):(this._codemode=!0,this._block.clear(),this.addChild(this._code),
this.addChild(this._buttons),k.showPopup(k.ln.get("window-actions-title"),k.ln.get("window-actions-error"),300,180,k.ln.get("default-ok")))},onCopy:function(a){this._codemode?k.copyText(this._code.get_text()):k.copyText(this._block.toJson())},onVariables:function(a){k.showWindow("assistantvariables")},onScene:function(a){k.showWindow("assistantscene")},onInstance:function(a){k.showWindow("assistantinstance")},onData:function(a){k.showWindow("assistantdata")},onPlus:function(a){k.showWindow("assistantplus")},
onRuntime:function(a){k.showWindow("assistantruntime")},onPlugin:function(a){k.showWindow("assistantplugin")},onContraptions:function(a){k.showWindow("assistantcontraptions")},onNarrative:function(a){k.showWindow("assistantnarrative")},onOpen:function(a){this._block.openAll()},onClose:function(a){this._block.closeAll()},onUp:function(a){this._block.upAction()},onDown:function(a){this._block.downAction()},onEdit:function(a){this._block.editAction()},onDel:function(a){this._block.removeAction()},__class__:jj});
var oi=function(a,b,c,d,f){this._blocks2=[];this._blocks1=[];this.isOpen=!1;this.order=0;this.selected=!1;this._paramValues=[];Uc.call(this);this.doubleClickEnabled=!0;this.blaction=a;var g=new uf;g.set_gap(5);g.setPadding(8);this.set_layout(g);g=new Za(ub.SolidColor(4473924),oc.SolidColor(1,8947848));g.set_cornerRadius(5);this.set_backgroundSkin(g);this.set_width(b-24);this.order=c;this.mouseChildren=this.isOpen=!1;this._name=new ia(this.order+1+": "+k.acInfo.getAcName(a.ac)+k.acInfo.getParamLine(a.ac,
a.param));this._name.set_x(5);this._name.set_y(5);this._name.set_maxWidth(this.get_width()-20);this.addChild(this._name);b=new uf;b.set_gap(2);b.setPadding(5);if(k.acInfo.getNumParams(a.ac)>0||a.param.length>0){this._paramArea=new Uc;this._paramArea.set_backgroundSkin(new Za(ub.SolidColor(0),oc.SolidColor(1,8947848)));this._paramArea.set_width(this.get_width()-20);this._paramArea.set_layout(b);b=g=0;for(c=a.param.length;b<c;){g=b++;var h=new ia(k.acInfo.getAcParam(a.ac,g,a.param[g]));h.set_variant(ia.VARIANT_DETAIL);
this._paramValues.push(h);g+=1}if(g<k.acInfo.getNumParams(a.ac))for(b=g,c=k.acInfo.getNumParams(a.ac);b<c;)g=b++,h=new ia(k.acInfo.getAcParam(a.ac,g)),h.set_variant(ia.VARIANT_DETAIL),this._paramValues.push(h);b=0;for(c=this._paramValues;b<c.length;)g=c[b],++b,this._paramArea.addChild(g)}g=new uf;g.set_gap(5);g.setPadding(8);if(k.acInfo.getExtra1(a.ac)!=""){this._extra1Area=new Uc;this._extra1Area.set_backgroundSkin(new Za(ub.SolidColor(0),oc.SolidColor(1,8947848)));this._extra1Area.set_width(this.get_width()-
20);this._extra1Area.set_layout(g);h=new ia(k.ln.get("acblock-"+k.acInfo.getExtra1(a.ac)));this._extra1Area.addChild(h);this._paramValues.push(h);h=a.extras;var n=k.acInfo.getExtra1(a.ac);if(Object.prototype.hasOwnProperty.call(h.h,n))for(b=0,h=a.extras,n=k.acInfo.getExtra1(a.ac),c=h.h[n].length;b<c;){var l=b++;h=a.extras;n=k.acInfo.getExtra1(a.ac);h=new oi(h.h[n][l],this.get_width()-20,l,m(this,this.clickAction1),f);this._extra1Area.addChild(h);this._blocks1.push(h)}this._addbt1=new Rc("addbt",m(this,
this.addActionBlock1),null,Z.getBitmapData("btPlus"));this._addbt1.set_toolTip(k.ln.get("acblock-addbt"));this._extra1Area.addChild(this._addbt1)}if(k.acInfo.getExtra2(a.ac)!=""){this._extra2Area=new Uc;this._extra2Area.set_backgroundSkin(new Za(ub.SolidColor(0),oc.SolidColor(1,8947848)));this._extra2Area.set_width(this.get_width()-20);this._extra2Area.set_layout(g);h=new ia(k.ln.get("acblock-"+k.acInfo.getExtra2(a.ac)));this._extra2Area.addChild(h);this._paramValues.push(h);h=a.extras;n=k.acInfo.getExtra2(a.ac);
if(Object.prototype.hasOwnProperty.call(h.h,n))for(b=0,h=a.extras,n=k.acInfo.getExtra2(a.ac),c=h.h[n].length;b<c;)l=b++,h=a.extras,n=k.acInfo.getExtra2(a.ac),h=new oi(h.h[n][l],this.get_width()-20,l,m(this,this.clickAction2),f),this._extra2Area.addChild(h),this._blocks2.push(h);this._addbt2=new Rc("addbt",m(this,this.addActionBlock2),null,Z.getBitmapData("btPlus"));this._addbt2.set_toolTip(k.ln.get("acblock-addbt"));this._extra2Area.addChild(this._addbt2)}d!=null&&(this.addEventListener("click",m(this,
this.onClick)),this.addEventListener("middleClick",m(this,this.onClickMiddle)),this.addEventListener("doubleClick",m(this,this.onDbClick)),this._clickAction=d,this._dbClickAction=f);b=0;for(c=this.get_numChildren();b<c;)a=b++,d=this.getChildAt(a),Object.prototype.hasOwnProperty.call(d,"doubleClickEnabled")&&(this.getChildAt(a).doubleClickEnabled=!0)};t["com.tilbuci.ui.component.ActionBlock"]=oi;oi.__name__="com.tilbuci.ui.component.ActionBlock";oi.__super__=Uc;oi.prototype=I(Uc.prototype,{_name:null,
_paramArea:null,_paramValues:null,_extra1Area:null,_extra2Area:null,blaction:null,_clickAction:null,_dbClickAction:null,selected:null,order:null,isOpen:null,_blocks1:null,_blocks2:null,_addbt1:null,_addbt2:null,setOrder:function(a){this.order=a;this.isOpen?this._name.set_text(this.order+1+": "+k.acInfo.getAcName(this.blaction.ac)):this._name.set_text(this.order+1+": "+k.acInfo.getAcName(this.blaction.ac)+k.acInfo.getParamLine(this.blaction.ac,this.blaction.param))},select:function(){this.selected=
!0;var a=new Za(ub.SolidColor(136),oc.SolidColor(1,8947848));a.set_cornerRadius(5);this.set_backgroundSkin(a)},unselect:function(){this.selected=!1;var a=new Za(ub.SolidColor(4473924),oc.SolidColor(1,8947848));a.set_cornerRadius(5);this.set_backgroundSkin(a)},openAll:function(){this._paramArea!=null&&this._paramArea.parent==null&&this.addChild(this._paramArea);if(this._extra1Area!=null&&this._extra1Area.parent==null){this.addChild(this._extra1Area);for(var a=0,b=this._extra1Area.get_numChildren();a<
b;){var c=a++;this._extra1Area.getChildAt(c)instanceof oi&&(c=this._extra1Area.getChildAt(c),c.openAll())}}if(this._extra2Area!=null&&this._extra2Area.parent==null)for(this.addChild(this._extra2Area),a=0,b=this._extra2Area.get_numChildren();a<b;)c=a++,this._extra2Area.getChildAt(c)instanceof oi&&(c=this._extra2Area.getChildAt(c),c.openAll());this._name.set_text(this.order+1+": "+k.acInfo.getAcName(this.blaction.ac));this.mouseChildren=this.isOpen=!0},closeAll:function(){this._paramArea!=null&&this._paramArea.parent!=
null&&this.removeChild(this._paramArea);if(this._extra1Area!=null&&this._extra1Area.parent!=null){this.removeChild(this._extra1Area);for(var a=0,b=this._extra1Area.get_numChildren();a<b;){var c=a++;this._extra1Area.getChildAt(c)instanceof oi&&(c=this._extra1Area.getChildAt(c),c.closeAll())}}if(this._extra2Area!=null&&this._extra2Area.parent!=null)for(this.removeChild(this._extra2Area),a=0,b=this._extra2Area.get_numChildren();a<b;)c=a++,this._extra2Area.getChildAt(c)instanceof oi&&(c=this._extra2Area.getChildAt(c),
c.closeAll());this._name.set_text(this.order+1+": "+k.acInfo.getAcName(this.blaction.ac)+k.acInfo.getParamLine(this.blaction.ac,this.blaction.param));this.mouseChildren=this.isOpen=!1},refresh:function(){this.isOpen||this._name.set_text(this.order+1+": "+k.acInfo.getAcName(this.blaction.ac)+k.acInfo.getParamLine(this.blaction.ac,this.blaction.param));for(this._paramArea.removeChildren();this._paramValues.length>0;)this._paramValues.shift();for(var a=0,b=0,c=this.blaction.param.length;b<c;){a=b++;
var d=new ia(k.acInfo.getAcParam(this.blaction.ac,a,this.blaction.param[a]));d.set_variant(ia.VARIANT_DETAIL);this._paramValues.push(d);a+=1}if(a<k.acInfo.getNumParams(this.blaction.ac))for(b=a,c=k.acInfo.getNumParams(this.blaction.ac);b<c;)a=b++,d=new ia(k.acInfo.getAcParam(this.blaction.ac,a)),d.set_variant(ia.VARIANT_DETAIL),this._paramValues.push(d);b=0;for(c=this._paramValues;b<c.length;)a=c[b],++b,this._paramArea.addChild(a)},toObject:function(){var a={ac:this.blaction.ac,param:this.blaction.param};
if(k.acInfo.getExtra1(this.blaction.ac)!=""){for(var b=[],c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;b.push(f.toObject())}a[k.acInfo.getExtra1(this.blaction.ac)]=b}if(k.acInfo.getExtra2(this.blaction.ac)!=""){b=[];c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,b.push(f.toObject());a[k.acInfo.getExtra2(this.blaction.ac)]=b}return a},kill:function(){this.removeChildren();this._name=null;this._paramArea!=null&&(this._paramArea.removeChildren(),this._paramArea=null);this._extra1Area!=null&&(this._extra1Area.removeChildren(),
this._extra1Area=null,this._addbt1.kill(),this._addbt1=null);this._extra2Area!=null&&(this._extra2Area.removeChildren(),this._extra2Area=null,this._addbt2.kill(),this._addbt2=null);for(;this._paramValues.length>0;)this._paramValues.shift();for(;this._blocks1.length>0;)this._blocks1.shift().kill();for(;this._blocks2.length>0;)this._blocks2.shift().kill();this._paramValues=this._blocks2=this._blocks1=null;this.blaction.kill();this.blaction=null;this._clickAction!=null&&(this.removeEventListener("click",
m(this,this.onClick)),this.removeEventListener("doubleClick",m(this,this.onDbClick)),this.removeEventListener("middleClick",m(this,this.onClickMiddle)));this._dbClickAction=this._clickAction=null},unselectAll:function(a){this!=a&&this.unselect();for(var b=0,c=this._blocks1;b<c.length;){var d=c[b];++b;d.unselectAll(a)}b=0;for(c=this._blocks2;b<c.length;)d=c[b],++b,d.unselectAll(a)},upAction:function(a){for(var b=0,c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;f==a&&(b=1)}if(b==0)for(c=0,d=this._blocks2;c<
d.length;)f=d[c],++c,f==a&&(b=2);if(b==1){if(a.order>0){b=[];if(a.order-1>0)for(c=0,d=a.order-1;c<d;)f=c++,b.push(this._blocks1[f]);b.push(this._blocks1[a.order]);b.push(this._blocks1[a.order-1]);if(this._blocks1.length>a.order+1)for(c=a.order+1,d=this._blocks1.length;c<d;)f=c++,b.push(this._blocks1[f]);for(;this._blocks1.length>0;)this._blocks1.shift();for(;b.length>0;)this._blocks1.push(b.shift());this._extra1Area.removeChildren();this._extra1Area.addChild(new ia(k.ln.get("acblock-"+k.acInfo.getExtra1(this.blaction.ac))));
c=0;for(d=this._blocks1.length;c<d;)f=c++,this._blocks1[f].setOrder(f),this._extra1Area.addChild(this._blocks1[f]);this._extra1Area.addChild(this._addbt1)}}else if(b==2){if(a.order>0){b=[];if(a.order-1>0)for(c=0,d=a.order-1;c<d;)f=c++,b.push(this._blocks2[f]);b.push(this._blocks2[a.order]);b.push(this._blocks2[a.order-1]);if(this._blocks2.length>a.order+1)for(c=a.order+1,d=this._blocks2.length;c<d;)f=c++,b.push(this._blocks2[f]);for(;this._blocks2.length>0;)this._blocks2.shift();for(;b.length>0;)this._blocks2.push(b.shift());
this._extra2Area.removeChildren();this._extra2Area.addChild(new ia(k.ln.get("acblock-"+k.acInfo.getExtra2(this.blaction.ac))));c=0;for(d=this._blocks2.length;c<d;)f=c++,this._blocks2[f].setOrder(f),this._extra2Area.addChild(this._blocks2[f]);this._extra2Area.addChild(this._addbt2)}}else{c=0;for(d=this._blocks1;c<d.length;)f=d[c],++c,f.upAction(a);c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,f.upAction(a)}},downAction:function(a){for(var b=0,c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;f==a&&
(b=1)}if(b==0)for(c=0,d=this._blocks2;c<d.length;)f=d[c],++c,f==a&&(b=2);if(b==1){if(a.order<this._blocks1.length-1){b=[];if(a.order>0)for(c=0,d=a.order;c<d;)f=c++,b.push(this._blocks1[f]);b.push(this._blocks1[a.order+1]);b.push(this._blocks1[a.order]);if(this._blocks1.length>a.order+2)for(c=a.order+2,d=this._blocks1.length;c<d;)f=c++,b.push(this._blocks1[f]);for(;this._blocks1.length>0;)this._blocks1.shift();for(;b.length>0;)this._blocks1.push(b.shift());this._extra1Area.removeChildren();this._extra1Area.addChild(new ia(k.ln.get("acblock-"+
k.acInfo.getExtra1(this.blaction.ac))));c=0;for(d=this._blocks1.length;c<d;)f=c++,this._blocks1[f].setOrder(f),this._extra1Area.addChild(this._blocks1[f]);this._extra1Area.addChild(this._addbt1)}}else if(b==2){if(a.order<this._blocks2.length-1){b=[];if(a.order>0)for(c=0,d=a.order;c<d;)f=c++,b.push(this._blocks2[f]);b.push(this._blocks2[a.order+1]);b.push(this._blocks2[a.order]);if(this._blocks2.length>a.order+2)for(c=a.order+2,d=this._blocks2.length;c<d;)f=c++,b.push(this._blocks2[f]);for(;this._blocks2.length>
0;)this._blocks2.shift();for(;b.length>0;)this._blocks2.push(b.shift());this._extra2Area.removeChildren();this._extra2Area.addChild(new ia(k.ln.get("acblock-"+k.acInfo.getExtra2(this.blaction.ac))));c=0;for(d=this._blocks2.length;c<d;)f=c++,this._blocks2[f].setOrder(f),this._extra2Area.addChild(this._blocks2[f]);this._extra2Area.addChild(this._addbt2)}}else{c=0;for(d=this._blocks1;c<d.length;)f=d[c],++c,f.downAction(a);c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,f.downAction(a)}},removeAction:function(a){for(var b=
0,c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;f==a&&(b=1)}if(b==0)for(c=0,d=this._blocks2;c<d.length;)f=d[c],++c,f==a&&(b=2);if(b==1){this._blocks1.splice(a.order,1);this._extra1Area.removeChildren();this._extra1Area.addChild(new ia(k.ln.get("acblock-"+k.acInfo.getExtra1(this.blaction.ac))));c=0;for(d=this._blocks1.length;c<d;)a=c++,this._blocks1[a].setOrder(a),this._extra1Area.addChild(this._blocks1[a]);this._extra1Area.addChild(this._addbt1)}else if(b==2){this._blocks2.splice(a.order,1);this._extra2Area.removeChildren();
this._extra2Area.addChild(new ia(k.ln.get("acblock-"+k.acInfo.getExtra2(this.blaction.ac))));c=0;for(d=this._blocks2.length;c<d;)a=c++,this._blocks2[a].setOrder(a),this._extra2Area.addChild(this._blocks2[a]);this._extra2Area.addChild(this._addbt2)}else{c=0;for(d=this._blocks1;c<d.length;)f=d[c],++c,f.removeAction(a);c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,f.removeAction(a)}},addActionBlock1:function(a){a.stopImmediatePropagation();k.showNewBlockWindow(m(this,this.onNewBlock1))},onNewBlock1:function(a){a!=
0&&(this._extra1Area.removeChild(this._addbt1),a=new oi(new Gl(a),this.get_width()-20,this._blocks1.length,this._clickAction,this._dbClickAction),this._blocks1.push(a),this._extra1Area.addChild(a),this._extra1Area.addChild(this._addbt1))},addActionBlock2:function(a){a.stopImmediatePropagation();k.showNewBlockWindow(m(this,this.onNewBlock2))},onNewBlock2:function(a){a!=0&&(this._extra2Area.removeChild(this._addbt1),a=new oi(new Gl(a),this.get_width()-20,this._blocks2.length,this._clickAction,this._dbClickAction),
this._blocks2.push(a),this._extra2Area.addChild(a),this._extra2Area.addChild(this._addbt2))},onClick:function(a){a.stopImmediatePropagation();this._clickAction(this)},onDbClick:function(a){a.stopImmediatePropagation();this._dbClickAction(this)},onClickMiddle:function(a){a.stopImmediatePropagation();this.isOpen?this.closeAll():this.openAll()},clickAction1:function(a,b){b==null&&(b=!1);if(b){b=0;for(var c=this._blocks1;b<c.length;){var d=c[b];++b;d.unselect()}}else if(a.selected)a.unselect();else{b=
0;for(c=this._blocks1;b<c.length;)d=c[b],++b,d.unselect();a.select()}b=0;for(c=this._blocks2;b<c.length;)d=c[b],++b,d.unselect();this._clickAction(a,!0)},clickAction2:function(a,b){b==null&&(b=!1);if(b){b=0;for(var c=this._blocks1;b<c.length;){var d=c[b];++b;d.unselect()}b=0;c=this._blocks2}else{if(a.selected)a.unselect();else{b=0;for(c=this._blocks2;b<c.length;)d=c[b],++b,d.unselect();a.select()}b=0;c=this._blocks1}for(;b<c.length;)d=c[b],++b,d.unselect();this._clickAction(a,!0)},__class__:oi});
var ze=function(a,b){this._open=!1;this.startWindow=null;this.callbacks=[];Uc.call(this);this.ui=new Bc;this.set_layout(new Gi);var c=new Za;c.set_fill(ub.SolidColor(6710886));this.set_backgroundSkin(c);c=new ia;c.set_text(a);a=new Mi;a.set_leftView(c);a.set_rightView(this.ui.createIconButton("toggle",m(this,this.toggle),new Ma(Z.getBitmapData("iconPlus"))));this.set_header(a);this.set_width(b)};t["com.tilbuci.ui.component.DropDownPanel"]=ze;ze.__name__="com.tilbuci.ui.component.DropDownPanel";ze.__super__=
Uc;ze.prototype=I(Uc.prototype,{ui:null,callbacks:null,startWindow:null,_open:null,_content:null,toggle:function(a){this._open?(a=new Ma(Z.getBitmapData("iconPlus")),this.removeChildren()):(a=new Ma(Z.getBitmapData("iconMinus")),this._content!=null&&this.addChild(this._content));a.smoothing=!0;a.set_width(a.set_height(20));this.ui.buttons.h.toggle.set_icon(a);this._open=!this._open},reloadContent:function(a){},updateContent:function(a){},setWd:function(a){this.set_width(a);this._content!=null&&this._content.set_width(a)},
__class__:ze});var Xs=function(a){this._current=null;ze.call(this,k.ln.get("rightbar-action"),a);this._content=this.ui.forge("properties",[{tp:"Button",id:"trigget",tx:k.ln.get("rightbar-action-trigger"),ac:m(this,this.setTrigger)},{tp:"Button",id:"over",tx:k.ln.get("rightbar-action-over"),ac:m(this,this.setOver)},{tp:"Button",id:"timed",tx:k.ln.get("rightbar-action-timed"),ac:m(this,this.setTimed)}],3355443,a-5);this.ui.containers.h.properties.set_enabled(!1);k.history.propDisplay.push(m(this,this.updateValues))};
t["com.tilbuci.ui.component.ActionPanel"]=Xs;Xs.__name__="com.tilbuci.ui.component.ActionPanel";Xs.__super__=ze;Xs.prototype=I(ze.prototype,{_current:null,updateContent:function(a){Object.prototype.hasOwnProperty.call(a.h,"nm")?a.h.nm==""?this.clearValues():(this._current=p.area.instanceRef(a.h.nm),this.updateValues()):this.clearValues()},reloadContent:function(a){this.clearValues()},updateValues:function(){this._current!=null&&this.ui.containers.h.properties.set_enabled(!0)},clearValues:function(){this.ui.containers.h.properties.set_enabled(!1);
this._current=null},setTrigger:function(a){a=p.movie.scene.keyframes[p.area.get_currentKf()];var b=this._current.getInstName();k.showActionWindow(a.h[b].action,m(this,this.onOk),m(this,this.onCancel))},setOver:function(a){a=p.movie.scene.keyframes[p.area.get_currentKf()];var b=this._current.getInstName();k.showActionWindow(a.h[b].actionover,m(this,this.onOkOver),m(this,this.onCancelOver))},setTimed:function(a){a=this.startWindow;var b=new G,c=this._current.getCurrentStr("instance");b.h.instance=c;
c=this._current.getCurrentStr("collection");b.h.collection=c;c=this._current.getCurrentStr("asset");b.h.asset=c;a("timedaction",b)},onOk:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));var b=p.movie.scene.keyframes[p.area.get_currentKf()],c=this._current.getInstName();b.h[c].action=a;k.history.addState(k.ln.get("rightbar-history-actrigger"))},onCancel:function(){},onOkOver:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));
var b=p.movie.scene.keyframes[p.area.get_currentKf()],c=this._current.getInstName();b.h[c].actionover=a;k.history.addState(k.ln.get("rightbar-history-acover"))},onCancelOver:function(){},__class__:Xs});var Ws=function(a){this._blocks=[];je.call(this);this._code=a;a=new uf;a.setPadding(5);a.set_gap(5);this.set_layout(a);this._selected=null;this._addbt=new Rc("addbt",m(this,this.addActionBlock),null,Z.getBitmapData("btPlus"));this._addbt.set_toolTip(k.ln.get("acblock-addbt"))};t["com.tilbuci.ui.component.BlockArea"]=
Ws;Ws.__name__="com.tilbuci.ui.component.BlockArea";Ws.__super__=je;Ws.prototype=I(je.prototype,{_code:null,_json:null,_selected:null,_blocks:null,_addbt:null,refresh:function(){this.clear();if(this._code.get_text()==""||this._code.get_text()=="[]")return this._json=Ga.jsonParse("[ ]"),this.addChild(this._addbt),!0;N.trim(V.substr(this._code.get_text(),0,1))!="["&&this._code.set_text("["+N.trim(this._code.get_text())+"]");this._json=Ga.jsonParse(this._code.get_text());if(this._json==0)return!1;for(var a=
0,b=0,c=y.fields(this._json);b<c.length;){var d=c[b];++b;this.addAction(new Gl(y.field(this._json,d)),a);++a}this.addChild(this._addbt);return!0},addAction:function(a,b){a=new oi(a,this.get_width(),b,m(this,this.clickAction),m(this,this.dbClickAction));this._blocks.push(a);this.addChild(a)},clear:function(){this.removeChildren();for(this._selected=null;this._blocks.length>0;)this._blocks.shift().kill()},toJson:function(){if(this._blocks.length==0)return"";for(var a=[],b=0,c=this._blocks;b<c.length;){var d=
c[b];++b;a.push(d.toObject())}return Ga.jsonStringify(a,"  ")},openAll:function(){if(this._selected==null)for(var a=0,b=this._blocks;a<b.length;){var c=b[a];++a;c.openAll()}else this._selected.openAll()},closeAll:function(){if(this._selected==null)for(var a=0,b=this._blocks;a<b.length;){var c=b[a];++a;c.closeAll()}else this._selected.closeAll()},upAction:function(){if(this._selected!=null){for(var a=!1,b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d==this._selected&&(a=!0)}if(a){if(this._selected.order>
0){a=[];if(this._selected.order-1>0)for(b=0,c=this._selected.order-1;b<c;)d=b++,a.push(this._blocks[d]);a.push(this._blocks[this._selected.order]);a.push(this._blocks[this._selected.order-1]);if(this._blocks.length>this._selected.order+1)for(b=this._selected.order+1,c=this._blocks.length;b<c;)d=b++,a.push(this._blocks[d]);for(;this._blocks.length>0;)this._blocks.shift();for(;a.length>0;)this._blocks.push(a.shift());this.removeChildren();b=0;for(c=this._blocks.length;b<c;)d=b++,this._blocks[d].setOrder(d),
this.addChild(this._blocks[d]);this.addChild(this._addbt)}}else for(b=0,c=this._blocks;b<c.length;)d=c[b],++b,d.upAction(this._selected)}},downAction:function(){if(this._selected!=null){for(var a=!1,b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d==this._selected&&(a=!0)}if(a){if(this._selected.order<this._blocks.length-1){a=[];if(this._selected.order>0)for(b=0,c=this._selected.order;b<c;)d=b++,a.push(this._blocks[d]);a.push(this._blocks[this._selected.order+1]);a.push(this._blocks[this._selected.order]);
if(this._blocks.length>this._selected.order+2)for(b=this._selected.order+2,c=this._blocks.length;b<c;)d=b++,a.push(this._blocks[d]);for(;this._blocks.length>0;)this._blocks.shift();for(;a.length>0;)this._blocks.push(a.shift());this.removeChildren();b=0;for(c=this._blocks.length;b<c;)d=b++,this._blocks[d].setOrder(d),this.addChild(this._blocks[d]);this.addChild(this._addbt)}}else for(b=0,c=this._blocks;b<c.length;)d=c[b],++b,d.downAction(this._selected)}},removeAction:function(){if(this._selected!=
null){for(var a=!1,b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d==this._selected&&(a=!0)}if(a){this._blocks.splice(this._selected.order,1);this.removeChildren();b=0;for(c=this._blocks.length;b<c;)a=b++,this._blocks[a].setOrder(a),this.addChild(this._blocks[a]);this.addChild(this._addbt)}else for(b=0,c=this._blocks;b<c.length;)d=c[b],++b,d.removeAction(this._selected);this._selected.kill();this._selected=null}},editAction:function(){this._selected!=null&&k.showEditBlockWindow(this._selected.blaction.ac,
m(this,this.editReturn),this._selected.order,this._selected.blaction)},addActionBlock:function(a){a.stopImmediatePropagation();k.showNewBlockWindow(m(this,this.onNewBlock))},clickAction:function(a,b){b==null&&(b=!1);this._selected=null;if(b){b=0;for(var c=this._blocks;b<c.length;){var d=c[b];++b;d.unselect()}a.selected&&(this._selected=a)}else{if(a.selected)a.unselect();else{b=0;for(c=this._blocks;b<c.length;)d=c[b],++b,d.unselect();a.select()}b=0;for(c=this._blocks;b<c.length;)d=c[b],++b,d.selected&&
(this._selected=d)}b=0;for(c=this._blocks;b<c.length;)d=c[b],++b,d.unselectAll(this._selected)},dbClickAction:function(a){this._selected=null;for(var b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d.unselectAll(this._selected)}a.select();this._selected=a;this.editAction()},onNewBlock:function(a){a==0?this._selected!=null&&this._selected.refresh():(this.removeChild(this._addbt),a=new oi(new Gl(a),this.get_width(),this._blocks.length,m(this,this.clickAction),m(this,this.dbClickAction)),this._blocks.push(a),
this.addChild(a),this.addChild(this._addbt))},editReturn:function(a){a==0?this._selected!=null&&this._selected.refresh():(this.removeChild(this._addbt),a=new oi(new Gl(a),this.get_width(),this._blocks.length,m(this,this.clickAction),m(this,this.dbClickAction)),this._blocks.push(a),this.addChild(a),this.addChild(this._addbt))},__class__:Ws});var Gl=function(a){this.param=[];this.color=0;this.ac="";Object.prototype.hasOwnProperty.call(a,"ac")&&(this.ac=y.field(a,"ac"));Object.prototype.hasOwnProperty.call(a,
"param")&&(this.param=y.field(a,"param"));var b=new G;b.h.then=[];b.h["else"]=[];b.h.tick=[];b.h.end=[];b.h.ok=[];b.h.cancel=[];b.h.success=[];b.h.error=[];b.h.select=[];b.h.complete=[];b.h.win=[];b.h.loose=[];this.extras=b;for(var c=Object.keys(this.extras.h),d=c.length,f=0;f<d;){var g=c[f++];if(Object.prototype.hasOwnProperty.call(a,g)){var h=y.field(a,g);b=0;for(var n=y.fields(h);b<n.length;){var l=n[b];++b;l=new Gl(y.field(h,l));l.ac!=""?this.extras.h[g].push(l):l.kill()}}}};t["com.tilbuci.ui.component.BlockAction"]=
Gl;Gl.__name__="com.tilbuci.ui.component.BlockAction";Gl.prototype={ac:null,color:null,param:null,extras:null,extraJson:function(a){if(Object.prototype.hasOwnProperty.call(this.extras.h,a)&&this.extras.h[a].length>0){for(var b=[],c=0,d=this.extras.h[a].length;c<d;){var f=c++;b.push(this.extras.h[a][f].toObject())}return Ga.jsonStringify(b)}return"[ ]"},toObject:function(){for(var a={ac:this.ac,param:this.param},b=Object.keys(this.extras.h),c=b.length,d=0;d<c;){var f=b[d++];if(this.extras.h[f].length>
0){for(var g=[],h=0,n=this.extras.h[f].length;h<n;){var l=h++;g.push(this.extras.h[f][l].toObject())}a[f]=g}}return a},kill:function(){this.ac=null;if(this.param!=null)for(;this.param.length>0;)this.param.shift();this.param=null;if(this.extras!=null)for(var a=Object.keys(this.extras.h),b=a.length,c=0;c<b;){for(var d=a[c++];this.extras.h[d].length>0;)this.extras.h[d].shift().kill();var f=this.extras;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.extras=null},__class__:Gl};var Th=function(){};
t["feathers.core.IStageFocusDelegate"]=Th;Th.__name__="feathers.core.IStageFocusDelegate";Th.__isInterface__=!0;Th.__interfaces__=[qd];Th.prototype={get_stageFocusTarget:null,__class__:Th,__properties__:{get_stageFocusTarget:"get_stageFocusTarget"}};var pi=function(a,b){b==null&&(b=!1);this.__highlightAllFindResults=!1;this.__backgroundSkin=this.__disabledBackgroundSkin=this.__customTextLineRendererVariant=null;this.__embedFonts=!1;this.__minLineNumberCharacters=3;this.lineComment=this.blockComment=
this.__lineNumberWidth=null;this._wordWrap=!1;this._textLineModelFactory=function(c,d){return new Hl(c,d)};this._debuggerLineIndex=-1;this._breakpoints=[];this.insertSpacesForTabs=this._allowToggleBreakpoints=!1;this._tabWidth=4;this._caretLineIndex=this._expandedCaretCharIndex=0;this._selectionStartLineIndex=this._selectionStartCharIndex=this._selectionEndLineIndex=this._selectionEndCharIndex=-1;this._lineHeight=0;this._hasFocus=!1;this._showLineNumbers=!0;this._scrollX=this._scrollY=this._lineScrollY=
this._maxLineScrollY=this._visibleLines=this._gutterWidth=0;this._viewPortVisibleBounds=new Ia;this._measurementTextLineModel=new Hl("a",5);this._lineDelimiter=null;this.defaultLineDelimiter="\n";Jy.initialize();fa.call(this);this._readOnly=b;this._readOnly||(this._editMananger=new ex(this),this._undoManager=new fx(this));this._clipboardMananger=new gx(this);this._selectionMananger=new xh(this);this._colorManager=new hp(this);this._findReplaceManager=new hx(this);this.createContextMenu();this.set_text(a);
this.addEventListener(Jd.TEXT_CHANGE,m(this,this.textEditor_textChangeHandler));this.addEventListener("focusIn",m(this,this.textEditor_focusInHandler))};t["moonshine.editor.text.TextEditor"]=pi;pi.__name__="moonshine.editor.text.TextEditor";pi.__interfaces__=[Th,qd];pi.__super__=fa;pi.prototype=I(fa.prototype,{_readOnly:null,get_readOnly:function(){return this._readOnly},_editMananger:null,_undoManager:null,_selectionMananger:null,_clipboardMananger:null,_colorManager:null,_findReplaceManager:null,
_listView:null,_layout:null,get_stageFocusTarget:function(){return this._listView},defaultLineDelimiter:null,_lineDelimiter:null,get_lineDelimiter:function(){return this._lineDelimiter==null?this.defaultLineDelimiter:this._lineDelimiter},set_lineDelimiter:function(a){return this._lineDelimiter==a?this._lineDelimiter:this._lineDelimiter=a},_measurementTextLineRenderer:null,_measurementTextLineModel:null,_lines:null,get_lines:function(){return this._lines},get_text:function(){for(var a=this._lines.get_array(),
b=Array(a.length),c=0,d=a.length;c<d;){var f=c++;b[f]=a[f].text}return b.join(this.get_lineDelimiter())},set_text:function(a){a==null&&(a="");a.indexOf("\r\n")!=-1?this._lineDelimiter="\r\n":a.indexOf("\r")!=-1?this._lineDelimiter="\r":a.indexOf("\n")!=-1?this._lineDelimiter="\n":this._lineDelimiter=this.defaultLineDelimiter;var b=(new Wa("\r?\n|\r","g")).split(a),c=[];c.length=b.length;for(var d=0,f=b.length;d<f;){var g=d++;c[g]=new Hl(b[g],g)}this._lines!=null&&(this._lines.removeEventListener("addItem",
m(this,this.textEditor_lines_addItemHandler)),this._lines.removeEventListener("removeItem",m(this,this.textEditor_lines_removeItemHandler)),this._lines.removeEventListener("updateItem",m(this,this.textEditor_lines_updateItemHandler)),this._lines.removeEventListener("updateAll",m(this,this.textEditor_lines_updateAllHandler)),this._lines.removeEventListener("change",m(this,this.textEditor_lines_changeHandler)));this._lines=new dg(c);this._lines.addEventListener("addItem",m(this,this.textEditor_lines_addItemHandler));
this._lines.addEventListener("removeItem",m(this,this.textEditor_lines_removeItemHandler));this._lines.addEventListener("updateItem",m(this,this.textEditor_lines_updateItemHandler));this._lines.addEventListener("updateAll",m(this,this.textEditor_lines_updateAllHandler));this._lines.addEventListener("change",m(this,this.textEditor_lines_changeHandler));this._colorManager.reset();this._undoManager!=null&&this._undoManager.clear();this.setSelection(0,0,0,0);this._lineScrollY=this._scrollY=this._scrollX=
0;this._listView!=null&&(this._listView.set_scrollX(0),this._listView.set_scrollY(0));this.setInvalid(x.DATA);return a},_viewPortVisibleBounds:null,_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;this.setInvalid(x.SCROLL);return this._scrollX},get_minScrollX:function(){return this._listView==null?0:this._listView.get_minScrollX()},get_maxScrollX:function(){return this._listView==null?0:this._listView.get_maxScrollX()},
_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==a)return this._scrollY;this._scrollY=a;if(this._lineHeight==0)a=0;else{a=this._scrollY/this._lineHeight;var b=Math.round(a);a=We.fuzzyEquals(a,b)?b:a|0}this._lineScrollY=a;this.setInvalid(x.SCROLL);return this._scrollY},get_minScrollY:function(){return this._listView==null?0:this._listView.get_minScrollY()},get_maxScrollY:function(){return this._listView==null?0:this._listView.get_maxScrollY()},_lineScrollY:null,
get_lineScrollY:function(){return this._lineScrollY},set_lineScrollY:function(a){if(this.get_lineScrollY()==a)return this.get_lineScrollY();this._lineScrollY=a;this._scrollY=this._lineScrollY*this._lineHeight;this.setInvalid(x.SCROLL);return this._lineScrollY},_maxLineScrollY:null,get_maxLineScrollY:function(){return this._maxLineScrollY},_visibleLines:null,get_visibleLines:function(){return this._visibleLines},_gutterWidth:null,get_gutterWidth:function(){return this._gutterWidth},_showLineNumbers:null,
get_showLineNumbers:function(){return this._showLineNumbers},set_showLineNumbers:function(a){if(this._showLineNumbers==a)return this._showLineNumbers;this._showLineNumbers=a;this.setInvalid(x.DATA);this._lines.updateAll();return this._showLineNumbers},_searchResult:null,_hasFocus:null,_parser:null,_textStyles:null,getTextStyle:function(a){return this._textStyles.h[a]},getDefaultTextStyle:function(){if(this._parser==null)return this._textStyles.h[0];var a=this._textStyles,b=this._parser.get_defaultContext();
return a.h[b]},_lineHeight:null,get_lineHeight:function(){return this._lineHeight},get_edited:function(){return this._undoManager==null?!1:this._undoManager.get_edited()},get_hasSelection:function(){return this._selectionStartLineIndex!=-1},get_selectedText:function(){if(!this.get_hasSelection())return"";if(this._selectionStartLineIndex!=this._selectionEndLineIndex){var a=this._selectionStartLineIndex,b=this._selectionEndLineIndex,c=this._selectionStartCharIndex,d=this._selectionEndCharIndex;a>b&&
(a=b,b=this._selectionStartLineIndex,c=d,d=this._selectionStartCharIndex);c=V.substr(this._lines.get(a).text,c,null);a+=1;for(var f=b;a<f;){var g=a++;c+=this._lineDelimiter+this._lines.get(g).text}return c+=this._lineDelimiter+V.substr(this._lines.get(b).text,0,d)}c=this._selectionStartCharIndex;d=this._selectionEndCharIndex;c>d&&(c=d,d=this._selectionStartCharIndex);return this._lines.get(this._selectionStartLineIndex).text.substring(c,d)},_selectionStartLineIndex:null,get_selectionStartLineIndex:function(){return this._selectionStartLineIndex},
_selectionStartCharIndex:null,get_selectionStartCharIndex:function(){return this._selectionStartCharIndex},_selectionEndLineIndex:null,get_selectionEndLineIndex:function(){return this._selectionEndLineIndex},_selectionEndCharIndex:null,get_selectionEndCharIndex:function(){return this._selectionEndCharIndex},get_caretLine:function(){return this._caretLineIndex==-1?null:this._lines.get(this._caretLineIndex)},_caretLineIndex:null,get_caretLineIndex:function(){return this._caretLineIndex},_expandedCaretCharIndex:null,
get_caretCharIndex:function(){var a=null;this._caretLineIndex<this._lines.get_length()&&(a=this._lines.get(this._caretLineIndex));if(a==null)return 0;var b=Kd.indentAmount(a.text),c=this._expandedCaretCharIndex-b*(this._tabWidth-1);c<=b&&(c=Math.round(this._expandedCaretCharIndex/this._tabWidth));return Math.min(c,a.text.length)|0},get_expandedCaretCharIndex:function(){return this._expandedCaretCharIndex},_tabWidth:null,get_tabWidth:function(){return this._tabWidth},set_tabWidth:function(a){if(this._tabWidth==
a)return this._tabWidth;this._tabWidth=a;this.setInvalid(x.DATA);this._lines.updateAll();return this._tabWidth},insertSpacesForTabs:null,_allowToggleBreakpoints:null,get_allowToggleBreakpoints:function(){return this._allowToggleBreakpoints},set_allowToggleBreakpoints:function(a){if(this._allowToggleBreakpoints==a)return this._allowToggleBreakpoints;this._allowToggleBreakpoints=a;this.setInvalid(x.DATA);this._lines.updateAll();return this._allowToggleBreakpoints},_breakpoints:null,get_breakpoints:function(){return this._breakpoints},
set_breakpoints:function(a){a==null&&(a=[]);if(this._breakpoints==a)return this._breakpoints;if(this._breakpoints!=null)for(var b=0,c=this._breakpoints;b<c.length;){var d=c[b];++b;d<0||d>=this._lines.get_length()||this.updateLineAtIndex(d)}this._breakpoints=a;if(this._breakpoints!=null)for(b=0,c=this._breakpoints;b<c.length;)d=c[b],++b,d<0||d>=this._lines.get_length()||this.updateLineAtIndex(d);this.setInvalid(x.DATA);return this._breakpoints},_debuggerLineIndex:null,get_debuggerLineIndex:function(){return this._debuggerLineIndex},
set_debuggerLineIndex:function(a){if(this._debuggerLineIndex==a)return this._debuggerLineIndex;this._debuggerLineIndex>=0&&this._debuggerLineIndex<this._lines.get_length()&&this.updateLineAtIndex(this._debuggerLineIndex);this._debuggerLineIndex=a;this._debuggerLineIndex>=0&&this._debuggerLineIndex<this._lines.get_length()&&this.updateLineAtIndex(this._debuggerLineIndex);this.setInvalid(x.DATA);return this._debuggerLineIndex},_textLineModelFactory:null,get_textLineModelFactory:function(){return this._textLineModelFactory},
set_textLineModelFactory:function(a){if(a==this._textLineModelFactory)return this._textLineModelFactory;this._textLineModelFactory=a;a=0;for(var b=this._lines.get_length();a<b;){var c=a++,d=this._lines.get(c);this._lines.set(c,this._textLineModelFactory(d.text,d.lineIndex))}return this._textLineModelFactory},_wordWrap:null,get_wordWrap:function(){return this._wordWrap},set_wordWrap:function(a){if(this._wordWrap==a)return this._wordWrap;this._wordWrap=a;this.setInvalid(x.DATA);this._lines.updateAll();
return this._wordWrap},brackets:null,autoClosingPairs:null,lineComment:null,blockComment:null,get_macHomeAndEndEnabled:function(){return this._selectionMananger.macHomeAndEndEnabled},set_macHomeAndEndEnabled:function(a){this._selectionMananger.macHomeAndEndEnabled=a;return this._selectionMananger.macHomeAndEndEnabled},_textLineRendererFactory:null,get_textLineRendererFactory:function(){return this._textLineRendererFactory},set_textLineRendererFactory:function(a){if(this._textLineRendererFactory==
a)return this._textLineRendererFactory;this._textLineRendererFactory=a;this._measurementTextLineRenderer!=null&&this.destroyTextLineRenderer(this._measurementTextLineRenderer);this._measurementTextLineRenderer=this.createTextLineRenderer();this.setInvalid(x.STYLES);return this._textLineRendererFactory},get_parser:function(){return this._parser},set_parser:function(a){if(this._parser==a)return this._parser;this._parser=a;this._colorManager.set_parser(a);this.setInvalid(x.DATA);this._lines.updateAll();
return this._parser},get_textStyles:function(){return this._textStyles},set_textStyles:function(a){if(this._textStyles==a)return this._textStyles;this._textStyles=a;this.setInvalid(x.DATA);this._lines.updateAll();return this._textStyles},setParserAndTextStyles:function(a,b){this.set_parser(a);this.set_textStyles(b)},getViewPortVisibleBounds:function(a){return this._viewPortVisibleBounds},save:function(){this._undoManager!=null&&this._undoManager.save()},toggleBreakpoint:function(a){a==null&&(a=this._caretLineIndex);
var b=this._breakpoints.slice(),c=b.indexOf(a);c==-1?b.push(a):b.splice(c,1);var d=this._lines.get(a);d=w.__cast(this._listView.itemToItemRenderer(d),Uh);d!=null&&d.set_breakpoint(c==-1);this._breakpoints=b;this.dispatchEvent(new wf(wf.TOGGLE_BREAKPOINT,a))},toggleLineComment:function(){if(this.get_readOnly())throw new ob("Toggle line comment not allowed on read-only text editor");this._editMananger.toggleLineComment()},toggleBlockComment:function(){if(this.get_readOnly())throw new ob("Toggle block comment not allowed on read-only text editor");
this._editMananger.toggleBlockComment()},setSelectionAdvanced:function(a,b,c,d,f){var g=this._selectionStartLineIndex,h=this._selectionStartCharIndex,n=this._selectionEndLineIndex,l=this._selectionEndCharIndex,q=this._caretLineIndex,u=this._expandedCaretCharIndex,v=!1,z=this._lines.get_length()-1;a>z&&(a=z);a<0&&(a=0);b<0&&(b=0);c>z&&(c=z);c<0&&(c=0);d<0&&(d=0);a==c&&b==d?this._selectionStartCharIndex!=-1&&(this._selectionEndCharIndex=this._selectionEndLineIndex=this._selectionStartCharIndex=this._selectionStartLineIndex=
-1,v=!0):(this._selectionStartLineIndex!=a&&(this._selectionStartLineIndex=a,v=!0),this._selectionStartCharIndex!=b&&(this._selectionStartCharIndex=b,v=!0),this._selectionEndLineIndex!=c&&(this._selectionEndLineIndex=c,v=!0),this._selectionEndCharIndex!=d&&(this._selectionEndCharIndex=d,v=!0));this._caretLineIndex!=c&&(this._caretLineIndex=c,v=!0);a=f?this.expandCaretCharIndex(d):d;this._expandedCaretCharIndex!=a&&(this._expandedCaretCharIndex=a,v=!0);v&&(this.forceUpdateRangeDiff(g!=-1?g:q,h!=-1?
h:u,n!=-1?n:q,l!=-1?l:u,this._selectionStartLineIndex!=-1?this._selectionStartLineIndex:this._caretLineIndex,this._selectionStartCharIndex!=-1?this._selectionStartCharIndex:this._expandedCaretCharIndex,this._selectionEndLineIndex!=-1?this._selectionEndLineIndex:this._caretLineIndex,this._selectionEndCharIndex!=-1?this._selectionEndCharIndex:this._expandedCaretCharIndex,!1),this.dispatchEvent(new Il(Il.SELECTION_CHANGE)))},setSelection:function(a,b,c,d){this.setSelectionAdvanced(a,b,c,d,!0)},selectAll:function(){this.setSelection(0,
0,this._lines.get_length()-1,this._lines.get(this._lines.get_length()-1).text.length)},removeSelection:function(){this._selectionStartLineIndex!=-1&&this.setSelectionAdvanced(this._caretLineIndex,this._expandedCaretCharIndex,this._caretLineIndex,this._expandedCaretCharIndex,!1)},clearFind:function(){this._searchResult=null;this._lines.updateAll()},find:function(a,b,c){c==null&&(c=!0);b==null&&(b=!1);this._searchResult=this._findReplaceManager.find(a,b,c);this._lines.updateAll();return this._searchResult},
findNext:function(a,b){b==null&&(b=!0);a==null&&(a=!1);this._searchResult=this._findReplaceManager.findNext(a,b);this._lines.updateAll();return this._searchResult},replaceOne:function(a,b){b==null&&(b=!0);if(this.get_readOnly())throw new ob("Replace not allowed on read-only text editor");this._searchResult=this._findReplaceManager.replace(a,!1,b);this._lines.updateAll();return this._searchResult},replaceAll:function(a){if(this.get_readOnly())throw new ob("Replace all not allowed on read-only text editor");
this._searchResult=this._findReplaceManager.replace(a,!0);this._lines.updateAll();return this._searchResult},getTextEditorPositionBoundaries:function(a){var b=a.line,c=this._lines.get(b),d=0,f=0,g=w.__cast(this._listView.itemToItemRenderer(c),Uh);if(g!=null){a=g.getCharBoundaries(a.character);if(a==null)return null;d=a.x;f=a.width}else if(c=new Jl(c,b,!1,c.text),g=this.createTextLineRenderer(),this.updateTextLineRenderer(g,c),Pa.get_current().stage.addChild(g),g.validateNow(),a=g.getCharBoundaries(a.character),
a!=null&&(d=a.x,f=a.width),this.resetTextLineRenderer(g,c),Pa.get_current().stage.removeChild(g),this.destroyTextLineRenderer(g),a==null)return null;d=this._viewPortVisibleBounds.x+d-this._listView.get_scrollX();b=this._viewPortVisibleBounds.y+this.get_lineHeight()*b-this._listView.get_scrollY();return new Ia(d,b,f,this.get_lineHeight())},textEditorPositionToLocal:function(a){var b=a.line;if(b<0||b>=this._lines.get_length())return null;var c=0,d=this._lines.get(b),f=w.__cast(this._listView.itemToItemRenderer(d),
Uh);if(f!=null){b=f.getCharBoundaries(a.character);if(b==null)return null;c=b.x}else if(d=new Jl(d,b,!1,d.text),f=this.createTextLineRenderer(),this.updateTextLineRenderer(f,d),Pa.get_current().stage.addChild(f),f.validateNow(),b=f.getCharBoundaries(a.character),b!=null&&(c=b.x),this.resetTextLineRenderer(f,d),Pa.get_current().stage.removeChild(f),this.destroyTextLineRenderer(f),b==null)return null;c=this._viewPortVisibleBounds.x+c-this._listView.get_scrollX();a=this._viewPortVisibleBounds.y+this.get_lineHeight()*
a.line-this._listView.get_scrollY();return new Ea(c,a)},localToTextEditorPosition:function(a,b){b==null&&(b=!1);var c=this.localToTextLineIndex(a,b);if(b)c=Math.max(0,Math.min(this._lines.get_length()-1,c))|0;else if(c<0||c>=this._lines.get_length())return null;var d=this._lines.get(c),f=w.__cast(this._listView.itemToItemRenderer(d),Uh);if(f!=null){var g=f.globalToLocal(this.localToGlobal(a));b=b?c==0&&g.y<0?0:c==this._lines.get_length()-1&&g.y>f.get_height()?d.text.length:f.getSelectionCharIndexAtPoint(g.x,
g.y):f.getCharIndexAtPoint(g.x,g.y)}else{g=new Jl(d,c,!1,d.text);f=this.createTextLineRenderer();this.updateTextLineRenderer(f,g);f.validateNow();var h=a.x-this._viewPortVisibleBounds.x;a=a.y-this._viewPortVisibleBounds.y-c*this._lineHeight;b=b?f.getSelectionCharIndexAtPoint(h,a):f.getCharIndexAtPoint(h,a);this.resetTextLineRenderer(f,g);this.destroyTextLineRenderer(f)}return b==-1?new Hn(c,d.text.length):new Hn(c,b)},scrollToCaret:function(){if(this._lines.get_length()!=0&&this._caretLineIndex!=
-1&&this._expandedCaretCharIndex!=-1){this.isInvalid()?this.validateNow():this._listView.validateNow();if(this._caretLineIndex<this.get_lineScrollY()||this.get_visibleLines()<=2&&this._caretLineIndex>this.get_lineScrollY())this.set_lineScrollY(Math.min(this._caretLineIndex,this._maxLineScrollY)|0);else if(this.get_visibleLines()>2&&this._caretLineIndex+2>this.get_lineScrollY()+this.get_visibleLines()){var a=this._caretLineIndex-this.get_visibleLines()+2;a<0&&(a=0);this.set_lineScrollY(Math.min(a,
this._maxLineScrollY)|0)}this.isInvalid()?this.validateNow():this._listView.validateNow();a=this.textEditorPositionToTextLineRenderer(new Hn(this._caretLineIndex,this.get_caretCharIndex()));if(a!=null){var b=this.get_caretCharIndex();this._selectionStartCharIndex!=-1&&b>this._selectionStartCharIndex&&(b=this._selectionStartCharIndex);this._selectionEndCharIndex!=-1&&b>this._selectionEndCharIndex&&(b=this._selectionEndCharIndex);var c=!1,d=this.get_lines().get(this._caretLineIndex);b>0&&b==d.text.length&&
(--b,c=!0);var f=a.getCharBoundaries(b);if(f!=null){var g=f.width;d.text.charAt(b)=="\t"&&(g/=this._tabWidth);b=g*8;d=f.x;c&&(d+=f.width);c=this._scrollX;c<d+b-this._viewPortVisibleBounds.width&&(c=d+b-this._viewPortVisibleBounds.width);c>d-b-a.get_gutterWidth()&&(c=d-b-a.get_gutterWidth());c<this._listView.get_minScrollX()?c=this._listView.get_minScrollX():c>this._listView.get_maxScrollX()&&(c=this._listView.get_maxScrollX());this._listView.set_scrollX(c)}}}},initialize:function(){this._layout==
null&&(this._layout=new yh,this._layout.set_contentJustify(!this._wordWrap));this._listView==null&&(this._listView=new Ys,this._listView.set_layout(this._layout),this._listView.set_scrollX(this._scrollX),this._listView.set_scrollY(this._lineScrollY*this._lineHeight),this._listView.addEventListener("scroll",m(this,this.textEditor_listView_scrollHandler)),this._listView.addEventListener("focusIn",m(this,this.textEditor_listView_focusInHandler)),this._listView.addEventListener("focusOut",m(this,this.textEditor_listView_focusOutHandler)),
this.addChild(this._listView),this._listView.set_itemRendererRecycler(Ne.withFunction(m(this,this.createTextLineRenderer),m(this,this.updateTextLineRenderer),m(this,this.resetTextLineRenderer),m(this,this.destroyTextLineRenderer))));this._measurementTextLineRenderer==null&&(this._measurementTextLineRenderer=this.createTextLineRenderer())},expandCaretCharIndex:function(a){var b=this._lines.get(this._caretLineIndex);b=b!=null?Kd.indentAmount(b.text):0;return a+Math.min(b,a)*(this._tabWidth-1)|0},textEditorPositionToTextLineRenderer:function(a){return a.line<
0||a.line>=this._lines.get_length()?null:this.getTextLineRendererAtIndex(a.line)},localToTextLineIndex:function(a,b){b==null&&(b=!1);var c=-1;if(this._wordWrap){a=a.y+this._listView.get_scrollY();for(var d=0,f=this._lines.get_length();d<f;){var g=d++,h=this._listView.indexToItemRenderer(g);if(h!=null){var n=h.get_y();if(a<n)break;h=n+h.get_height();if(a>h)b&&g==this._lines.get_length()-1&&(c=g);else{c=g;break}}}b&&c==-1&&(c=0)}else c=(a.y+this._listView.get_scrollY())/this.get_lineHeight()|0;return c},
localToTextLineRenderer:function(a,b){b==null&&(b=!1);a=this.localToTextLineIndex(a,b);return this.getTextLineRendererAtIndex(a)},getTextLineRendererAtIndex:function(a){this.isInvalid()&&this.validateNow();return w.__cast(this._listView.indexToItemRenderer(a),Uh)},createTextLineRenderer:function(){return this._textLineRendererFactory!=null?w.__cast(this._textLineRendererFactory.create(),Uh):new Uh},updateTextLineRendererFromModel:function(a,b){a.set_textEditorOwner(this);a.set_lineIndex(b.lineIndex);
a.set_text(b.text);this._readOnly||b.lineIndex!=this._caretLineIndex?a.set_caretIndex(-1):a.set_caretIndex(Math.min(this.get_caretCharIndex(),b.text.length)|0);a.set_textEditorHasFocus(this._hasFocus);a.set_minLineNumberCharacters(this.get_minLineNumberCharacters());a.set_numLines(this._lines.get_length());a.set_tabWidth(this._tabWidth);a.set_breakpoint(this._breakpoints!=null&&this._breakpoints.indexOf(b.lineIndex)!=-1);a.set_allowToggleBreakpoints(this._allowToggleBreakpoints);a.set_debuggerStopped(this._debuggerLineIndex==
b.lineIndex);a.set_styleRanges(b.styleRanges);a.set_textStyles(this._textStyles);a.set_defaultTextStyleContext(this._parser!=null?this._parser.get_defaultContext():0);a.set_showLineNumbers(this._showLineNumbers);a.set_lineNumberWidth(this.get_lineNumberWidth());a.set_embedFonts(this.get_embedFonts());a.set_wordWrap(this._wordWrap);a.set_searchResult(this._searchResult);a.set_highlightAllFindResults(this.get_highlightAllFindResults());this._selectionStartLineIndex!=this._selectionEndLineIndex?b.lineIndex==
this._selectionStartLineIndex?this._selectionStartLineIndex>this._caretLineIndex?(a.set_selectionStartIndex(0),a.set_selectionEndIndex(this._selectionStartCharIndex)):(a.set_selectionStartIndex(this._selectionStartCharIndex),a.set_selectionEndIndex(b.text.length)):b.lineIndex==this._caretLineIndex?this._caretLineIndex>this._selectionStartLineIndex?(a.set_selectionStartIndex(0),a.set_selectionEndIndex(this.get_caretCharIndex())):(a.set_selectionStartIndex(this.get_caretCharIndex()),a.set_selectionEndIndex(b.text.length)):
this._selectionStartLineIndex<b.lineIndex&&this._caretLineIndex>b.lineIndex?(a.set_selectionStartIndex(0),a.set_selectionEndIndex(b.text.length)):this._selectionStartLineIndex>b.lineIndex&&this._caretLineIndex<b.lineIndex?(a.set_selectionStartIndex(0),a.set_selectionEndIndex(b.text.length)):(a.set_selectionStartIndex(-1),a.set_selectionEndIndex(-1)):b.lineIndex==this._caretLineIndex?(a.set_selectionStartIndex(this._selectionStartCharIndex),a.set_selectionEndIndex(this._selectionEndCharIndex)):(a.set_selectionStartIndex(-1),
a.set_selectionEndIndex(-1))},updateTextLineRenderer:function(a,b){b=w.__cast(b.data,Hl);this.updateTextLineRendererFromModel(a,b);a.addEventListener(wf.TOGGLE_BREAKPOINT,m(this,this.textEditor_textLineRenderer_toggleBreakpointHandler));a.addEventListener(wf.SELECT_LINE,m(this,this.textEditor_textLineRenderer_selectLineHandler))},resetTextLineRenderer:function(a,b){a.set_textEditorOwner(null);a.set_caretIndex(-1);a.set_lineIndex(-1);a.set_styleRanges(null);a.set_textStyles(null);a.set_text(null);
a.set_selectionStartIndex(-1);a.set_selectionEndIndex(-1);a.removeEventListener(wf.TOGGLE_BREAKPOINT,m(this,this.textEditor_textLineRenderer_toggleBreakpointHandler));a.removeEventListener(wf.SELECT_LINE,m(this,this.textEditor_textLineRenderer_selectLineHandler))},destroyTextLineRenderer:function(a){this._textLineRendererFactory!=null&&this._textLineRendererFactory.destroy!=null&&this._textLineRendererFactory.destroy(a)},invalidateVisibleLines:function(){this._listView!=null&&this._listView.get_dataProvider()!=
null&&(this._listView.setInvalid(x.DATA),this._listView.setInvalid(x.LAYOUT))},forceUpdateRangeDiff:function(a,b,c,d,f,g,h,n,l){l==null&&(l=!1);var q=this._lines.get_length()-1,u=a,v=b,z=c,r=d;a>c&&(u=c,v=d,z=a,r=b);a=f;b=g;c=h;d=n;f>h&&(a=h,b=n,c=f,d=g);f=u;g=v;u>a&&(f=a,g=b);h=z;n=r;z<c&&(h=c,n=d);for(var F=f,J=h+1;F<J;){var L=F++;if(L>q)break;if(L<u||L<a||L>z||L>c)l?this._lines.updateAt(L):this.updateLineAtIndex(L);else{if(L==f){if(L==u&&g!=v||L==a&&g!=b){l?this._lines.updateAt(L):this.updateLineAtIndex(L);
continue}}else if(L==u||L==a){l?this._lines.updateAt(L):this.updateLineAtIndex(L);continue}if(L==h){if(L==z&&n!=r||L==c&&n!=d)l?this._lines.updateAt(L):this.updateLineAtIndex(L)}else if(L==z||L==c)l?this._lines.updateAt(L):this.updateLineAtIndex(L)}}},updateLineAtIndex:function(a){if(!(a<0||a>=this._lines.get_length())){var b=this._lines.get(a);b!=null&&(a=this._listView.indexToItemRenderer(a),a=a instanceof Uh?a:null,a!=null&&this.updateTextLineRendererFromModel(a,b))}},forceUpdateSelectedLines:function(a){a==
null&&(a=!1);var b=this._lines.get_length()-1;if(this._selectionStartLineIndex!=-1&&this._selectionEndLineIndex!=-1){var c=this._selectionStartLineIndex,d=this._selectionEndLineIndex;this._selectionEndLineIndex<this._selectionStartLineIndex&&(c=this._selectionEndLineIndex,d=this._selectionStartLineIndex);d>b&&(d=b);++d;for(b=c;b<d;)c=b++,a?this._lines.updateAt(c):this.updateLineAtIndex(c)}else this._caretLineIndex!=-1&&this._caretLineIndex<=b&&(a?this._lines.updateAt(this._caretLineIndex):this.updateLineAtIndex(this._caretLineIndex))},
update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SCROLL),c=this.isInvalid(x.STYLES);this._parser==null&&(this._parser=new In);this._textStyles==null&&(this._textStyles=(new ix).build(),this._lines.updateAll());a&&(this._listView.set_dataProvider(this._lines),this._layout.set_contentJustify(!this._wordWrap));c&&(this._listView.set_backgroundSkin(this.get_backgroundSkin()),this._listView.set_disabledBackgroundSkin(this.get_disabledBackgroundSkin()),this._listView.set_customItemRendererVariant(this.get_customTextLineRendererVariant()));
c&&(this._lines.updateAll(),this.updateTextLineRendererFromModel(this._measurementTextLineRenderer,this._measurementTextLineModel));this.layoutContent();(a||b)&&this.commitScroll();this.saveLayoutProperties()},layoutContent:function(){this._listView.set_x(0);this._listView.set_y(0);this._listView.set_width(this.actualWidth);this._listView.set_height(this.actualHeight)},commitScroll:function(){this._listView.set_scrollX(this._scrollX);this._listView.set_scrollY(this._scrollY)},saveLayoutProperties:function(){this._listView.validateNow();
this._listView.getViewPortVisibleBounds(this._viewPortVisibleBounds);this._viewPortVisibleBounds.x+=this._listView.get_x();this._viewPortVisibleBounds.y+=this._listView.get_y();this._measurementTextLineRenderer.validateNow();this._lines.get_length()==0||this._measurementTextLineRenderer==null||this._measurementTextLineRenderer.get_height()==0?(this._lineHeight=0,this._visibleLines=1,this._gutterWidth=this._maxLineScrollY=0):(this._lineHeight=this._measurementTextLineRenderer.get_height(),this._visibleLines=
this._viewPortVisibleBounds.height/this._lineHeight|0,this._maxLineScrollY=(Math.max(this._visibleLines,this._lines.get_length())|0)-this._visibleLines,this._gutterWidth=this._measurementTextLineRenderer.get_gutterWidth())},createContextMenu:function(){},textEditor_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==this._listView||this._listView==null||this._listView.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),this.stage.set_focus(this._listView))},textEditor_textChangeHandler:function(a){if(this._readOnly)throw new ob("Read-only text editor must not dispatch text change event");
},calculateLineScrollY:function(a){if(this._lineHeight==0)return 0;a=this._scrollY/this._lineHeight;var b=Math.round(a);return We.fuzzyEquals(a,b)?b:a|0},textEditor_listView_scrollHandler:function(a){this._scrollX=this._listView.get_scrollX();this._scrollY=this._listView.get_scrollY();if(this._lineHeight==0)a=0;else{a=this._scrollY/this._lineHeight;var b=Math.round(a);a=We.fuzzyEquals(a,b)?b:a|0}this._lineScrollY=a;Id.dispatch(this,"scroll")},textEditor_listView_focusInHandler:function(a){this._hasFocus=
!0;this.stage!=null&&this.stage.window!=null&&this.stage.window.__backend.setTextInputEnabled(!0);this.forceUpdateSelectedLines()},textEditor_listView_focusOutHandler:function(a){this._hasFocus=!1;this.stage!=null&&this.stage.window!=null&&this.stage.window.__backend.setTextInputEnabled(!1);this.forceUpdateSelectedLines()},textEditor_textLineRenderer_toggleBreakpointHandler:function(a){this._allowToggleBreakpoints&&this.toggleBreakpoint(a.lineIndex)},textEditor_textLineRenderer_selectLineHandler:function(a){a=
a.lineIndex;var b=this._lines.get(a);this.setSelection(a,0,a,b.text.length)},textEditor_lines_changeHandler:function(a){this.setInvalid(x.DATA)},textEditor_lines_addItemHandler:function(a){for(var b=[],c=[],d=0,f=this._breakpoints;d<f.length;){var g=f[d];++d;g<a.index?b.push(g):(this.dispatchEvent(new wf(wf.TOGGLE_BREAKPOINT,g)),g+=1,b.push(g),c.push(g))}this._breakpoints=b;for(d=0;d<c.length;)g=c[d],++d,this.dispatchEvent(new wf(wf.TOGGLE_BREAKPOINT,g))},textEditor_lines_removeItemHandler:function(a){for(var b=
[],c=[],d=0,f=this._breakpoints;d<f.length;){var g=f[d];++d;g<a.index?b.push(g):(this.dispatchEvent(new wf(wf.TOGGLE_BREAKPOINT,g)),g!=a.index&&(--g,g<0||(b.push(g),c.push(g))))}this._breakpoints=b;for(d=0;d<c.length;)g=c[d],++d,this.dispatchEvent(new wf(wf.TOGGLE_BREAKPOINT,g))},textEditor_lines_updateItemHandler:function(a){this.setInvalid(x.DATA)},textEditor_lines_updateAllHandler:function(a){this.setInvalid(x.DATA)},__lineNumberWidth:null,get_lineNumberWidth:function(){return this.__lineNumberWidth},
set_lineNumberWidth:function(a){if(!this.setStyle("lineNumberWidth")||this.__lineNumberWidth==a)return this.__lineNumberWidth;this._previousClearStyle=m(this,this.clearStyle_lineNumberWidth);this.__lineNumberWidth=a;this.setInvalid(x.STYLES);return this.__lineNumberWidth},clearStyle_lineNumberWidth:function(){this.set_lineNumberWidth(null);return this.get_lineNumberWidth()},__minLineNumberCharacters:null,get_minLineNumberCharacters:function(){return this.__minLineNumberCharacters},set_minLineNumberCharacters:function(a){if(!this.setStyle("minLineNumberCharacters")||
this.__minLineNumberCharacters==a)return this.__minLineNumberCharacters;this._previousClearStyle=m(this,this.clearStyle_minLineNumberCharacters);this.__minLineNumberCharacters=a;this.setInvalid(x.STYLES);return this.__minLineNumberCharacters},clearStyle_minLineNumberCharacters:function(){this.set_minLineNumberCharacters(3);return this.get_minLineNumberCharacters()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==
a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);
this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);
this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__customTextLineRendererVariant:null,get_customTextLineRendererVariant:function(){return this.__customTextLineRendererVariant},set_customTextLineRendererVariant:function(a){if(!this.setStyle("customTextLineRendererVariant")||this.__customTextLineRendererVariant==a)return this.__customTextLineRendererVariant;
this._previousClearStyle=m(this,this.clearStyle_customTextLineRendererVariant);this.__customTextLineRendererVariant=a;this.setInvalid(x.STYLES);return this.__customTextLineRendererVariant},clearStyle_customTextLineRendererVariant:function(){this.set_customTextLineRendererVariant(null);return this.get_customTextLineRendererVariant()},__highlightAllFindResults:null,get_highlightAllFindResults:function(){return this.__highlightAllFindResults},set_highlightAllFindResults:function(a){if(!this.setStyle("highlightAllFindResults")||
this.__highlightAllFindResults==a)return this.__highlightAllFindResults;this._previousClearStyle=m(this,this.clearStyle_highlightAllFindResults);this.__highlightAllFindResults=a;this.setInvalid(x.STYLES);return this.__highlightAllFindResults},clearStyle_highlightAllFindResults:function(){this.set_highlightAllFindResults(!1);return this.get_highlightAllFindResults()},get_styleContext:function(){return pi},__class__:pi,__properties__:I(fa.prototype.__properties__,{set_textStyles:"set_textStyles",get_textStyles:"get_textStyles",
set_parser:"set_parser",get_parser:"get_parser",set_textLineRendererFactory:"set_textLineRendererFactory",get_textLineRendererFactory:"get_textLineRendererFactory",set_highlightAllFindResults:"set_highlightAllFindResults",get_highlightAllFindResults:"get_highlightAllFindResults",set_customTextLineRendererVariant:"set_customTextLineRendererVariant",get_customTextLineRendererVariant:"get_customTextLineRendererVariant",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_macHomeAndEndEnabled:"set_macHomeAndEndEnabled",get_macHomeAndEndEnabled:"get_macHomeAndEndEnabled",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_textLineModelFactory:"set_textLineModelFactory",get_textLineModelFactory:"get_textLineModelFactory",set_debuggerLineIndex:"set_debuggerLineIndex",get_debuggerLineIndex:"get_debuggerLineIndex",set_breakpoints:"set_breakpoints",get_breakpoints:"get_breakpoints",
set_allowToggleBreakpoints:"set_allowToggleBreakpoints",get_allowToggleBreakpoints:"get_allowToggleBreakpoints",set_tabWidth:"set_tabWidth",get_tabWidth:"get_tabWidth",get_expandedCaretCharIndex:"get_expandedCaretCharIndex",get_caretCharIndex:"get_caretCharIndex",get_caretLineIndex:"get_caretLineIndex",get_caretLine:"get_caretLine",get_selectionEndCharIndex:"get_selectionEndCharIndex",get_selectionEndLineIndex:"get_selectionEndLineIndex",get_selectionStartCharIndex:"get_selectionStartCharIndex",get_selectionStartLineIndex:"get_selectionStartLineIndex",
get_selectedText:"get_selectedText",get_hasSelection:"get_hasSelection",get_edited:"get_edited",get_lineHeight:"get_lineHeight",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_showLineNumbers:"set_showLineNumbers",get_showLineNumbers:"get_showLineNumbers",set_minLineNumberCharacters:"set_minLineNumberCharacters",get_minLineNumberCharacters:"get_minLineNumberCharacters",set_lineNumberWidth:"set_lineNumberWidth",get_lineNumberWidth:"get_lineNumberWidth",get_gutterWidth:"get_gutterWidth",
get_visibleLines:"get_visibleLines",get_maxLineScrollY:"get_maxLineScrollY",set_lineScrollY:"set_lineScrollY",get_lineScrollY:"get_lineScrollY",get_maxScrollY:"get_maxScrollY",get_minScrollY:"get_minScrollY",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",get_maxScrollX:"get_maxScrollX",get_minScrollX:"get_minScrollX",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_text:"set_text",get_text:"get_text",get_lines:"get_lines",set_lineDelimiter:"set_lineDelimiter",get_lineDelimiter:"get_lineDelimiter",
get_stageFocusTarget:"get_stageFocusTarget",get_readOnly:"get_readOnly"})});var gp=function(a){var b=this;pi.call(this);this.set_layoutData(new dh);this._fontSettings=new Jn;this._colorSettings=kj.monokai();var c=new Od,d=null,f=null,g=null;switch(a){case "css":this._tparser=new xb;g=new jx;g.setFontSettings(this._fontSettings);g.setColorSettings(this._colorSettings);c=g.build();d=[["{","}"],["[","]"],["(",")"]];f=[new Qi("{","}"),new Qi("[","]"),new Qi("(",")"),new Qi("'","'"),new Qi('"','"')];g=
["/*","*/"];this.brackets=d;this.autoClosingPairs=f;this.lineComment=null;this.blockComment=g;this.setParserAndTextStyles(this._tparser,c);break;case "js":this._tparser=new bd,a=new kx,a.setFontSettings(this._fontSettings),a.setColorSettings(this._colorSettings),c=a.build(),d=[["{","}"],["[","]"],["(",")"]],f=[new Qi("{","}"),new Qi("[","]"),new Qi("(",")"),new Qi("'","'"),new Qi('"','"'),new Qi("`","`")],this.brackets=d,this.autoClosingPairs=f,this.lineComment=null,this.blockComment=g,this.setParserAndTextStyles(this._tparser,
c)}this.set_backgroundSkin(new Za(ub.SolidColor(this._colorSettings.backgroundColor)));this.set_textLineRendererFactory(Kl.fromFunction(function(){var h=new Uh;h.set_backgroundSkin(new Za(ub.SolidColor(b._colorSettings.backgroundColor)));h.set_gutterBackgroundSkin(new Za(ub.SolidColor(b._colorSettings.backgroundColor)));h.set_focusedBackgroundSkin(new Za(ub.SolidColor(b._colorSettings.focusedLineBackgroundColor)));h.set_debuggerStoppedBackgroundSkin(new Za(ub.SolidColor(b._colorSettings.backgroundColor)));
h.set_searchResultBackgroundSkinFactory(function(){return new Za(ub.SolidColor(b._colorSettings.searchResultBackgroundColor))});return h}))};t["com.tilbuci.ui.component.CodeArea"]=gp;gp.__name__="com.tilbuci.ui.component.CodeArea";gp.__super__=pi;gp.prototype=I(pi.prototype,{_tparser:null,_fontSettings:null,_colorSettings:null,__class__:gp});var Zs=function(a){this._current=null;ze.call(this,k.ln.get("rightbar-color"),a);this._timer=null;var b=this.ui,c={tp:"Label",id:"alpha",tx:k.ln.get("rightbar-color-alpha"),
vr:""},d={tp:"Label",id:"blend",tx:k.ln.get("rightbar-color-blend"),vr:""},f={tp:"Select",id:"blend",vl:[{text:k.ln.get("rightbar-color-blnormal"),value:"normal"},{text:k.ln.get("rightbar-color-bladd"),value:"add"},{text:k.ln.get("rightbar-color-bldifference"),value:"difference"},{text:k.ln.get("rightbar-color-blinvert"),value:"invert"},{text:k.ln.get("rightbar-color-blmultiply"),value:"multiply"},{text:k.ln.get("rightbar-color-blscreen"),value:"screen"},{text:k.ln.get("rightbar-color-blsubtract"),
value:"subtract"}],sl:null,ch:m(this,this.changeProperties)},g={tp:"Label",id:"alphacolor",tx:k.ln.get("rightbar-color-alphacolor"),vr:""},h={tp:"Label",id:"red",tx:k.ln.get("rightbar-color-red"),vr:""},n={tp:"Label",id:"green",tx:k.ln.get("rightbar-color-green"),vr:""},l=k.ln.get("rightbar-color-blue");this._content=b.forge("properties",[c,{tp:"Numeric",id:"alpha",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},d,f,g,{tp:"Numeric",id:"alphacolor",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},
h,{tp:"Numeric",id:"red",mn:0,mx:255,st:1,vl:0,ch:m(this,this.changeProperties)},n,{tp:"Numeric",id:"green",mn:0,mx:255,st:1,vl:0,ch:m(this,this.changeProperties)},{tp:"Label",id:"blue",tx:l,vr:""},{tp:"Numeric",id:"blue",mn:0,mx:255,st:1,vl:0,ch:m(this,this.changeProperties)}],3355443,a-5);this.ui.containers.h.properties.set_enabled(!1);k.history.propDisplay.push(m(this,this.updateValues))};t["com.tilbuci.ui.component.ColorPanel"]=Zs;Zs.__name__="com.tilbuci.ui.component.ColorPanel";Zs.__super__=
ze;Zs.prototype=I(ze.prototype,{_timer:null,_current:null,updateContent:function(a){Object.prototype.hasOwnProperty.call(a.h,"nm")?(this._current=p.area.instanceRef(a.h.nm),this.updateValues()):this.clearValues()},reloadContent:function(a){this.clearValues()},updateValues:function(){if(this._current!=null){this.ui.containers.h.properties.set_enabled(!1);this.ui.setSelectValue("blend",this._current.getCurrentStr("blend"));this.ui.numerics.h.alpha.set_value(Math.round(this._current.getCurrentNum("alpha")*
100));this.ui.numerics.h.alphacolor.set_value(Math.round(this._current.getCurrentNum("coloralpha")*100));var a=this._current.getCurrentStr("color");this.ui.numerics.h.red.set_value(H.parseInt("0x"+V.substr(a,-6,2)));this.ui.numerics.h.green.set_value(H.parseInt("0x"+V.substr(a,-4,2)));this.ui.numerics.h.blue.set_value(H.parseInt("0x"+V.substr(a,-2,2)));this.ui.containers.h.properties.set_enabled(!0)}},clearValues:function(){this.ui.setSelectValue("blend","normal");this.ui.containers.h.properties.set_enabled(!1);
this.ui.numerics.h.alpha.set_value(0);this.ui.numerics.h.alphacolor.set_value(0);this.ui.numerics.h.red.set_value(0);this.ui.numerics.h.green.set_value(0);this.ui.numerics.h.blue.set_value(0);this._current=null},changeProperties:function(a){if(this._current!=null&&this.ui.containers.h.properties.get_enabled())switch(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentNum("alpha",this.ui.numerics.h.alpha.get_value()/100),p.area.setCurrentStr("blend",
this.ui.selects.h.blend.get_selectedItem().value),p.area.setCurrentNum("coloralpha",this.ui.numerics.h.alphacolor.get_value()/100),p.area.setCurrentStr("color",Ga.rgbToHex(this.ui.numerics.h.red.get_value(),this.ui.numerics.h.green.get_value(),this.ui.numerics.h.blue.get_value())),this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory)),this._current.set_alpha(this.ui.numerics.h.alpha.get_value()/100),this.ui.selects.h.blend.get_selectedItem().value){case "add":this._current.set_blendMode(0);
break;case "difference":this._current.set_blendMode(3);break;case "invert":this._current.set_blendMode(6);break;case "multiply":this._current.set_blendMode(9);break;case "screen":this._current.set_blendMode(12);break;case "subtract":this._current.set_blendMode(14);break;default:this._current.set_blendMode(10)}},saveHistory:function(){try{this._timer.stop()}catch(a){}this._timer=null;k.history.addState(k.ln.get("rightbar-history-color"))},__class__:Zs});var kr=function(a){Uc.call(this);this._acCenter=
a;a=new uf;a.set_gap(0);a.setPadding(0);a.set_verticalAlign(hc.TOP);a.set_horizontalAlign(Wb.CENTER);this.set_layout(a);this._div=new Rh;this._div.set_layoutData(fd.fill());this._div.liveDragging=!1;this.addChild(this._div);a=new Za;a.set_fill(ub.SolidColor(13421772));var b=new Gi;this._top=new pb;this._top.set_layout(b);this._top.set_layoutData(fd.fill());this._top.set_backgroundSkin(a);this._div.addChild(this._top);a=new Za;a.set_fill(ub.SolidColor(10066329));b=new zg;b.set_gap(10);b.setPadding(10);
b.set_verticalAlign(hc.MIDDLE);b.set_horizontalAlign(Wb.CENTER);this._bottom=new pb;this._bottom.set_layout(b);this._bottom.set_layoutData(fd.fill());this._bottom.set_backgroundSkin(a);this._bottom.set_minHeight(this._bottom.set_maxHeight(this._bottom.set_height(50)));this._div.addChild(this._bottom);this.ui=new Bc;this.ui.createIconButton("play",m(this,this.onPlay),new Ma(Z.getBitmapData("btPlay")),null,this._bottom);this.ui.createSpacer("play",10,!1,this._bottom);this.ui.createIconButton("screen",
m(this,this.onScreen),new Ma(Z.getBitmapData("btScreen")),null,this._bottom);this.ui.createSpacer("screen",10,!1,this._bottom);this.ui.createIconButton("close",m(this,this.onClose),new Ma(Z.getBitmapData("btClose")),null,this._bottom);this.info={x:0,y:0,width:0,height:0,orientation:k.displayType,keyframe:0,scene:"",sceneobj:null,movie:""}};t["com.tilbuci.ui.component.EditorPlayback"]=kr;kr.__name__="com.tilbuci.ui.component.EditorPlayback";kr.__super__=Uc;kr.prototype=I(Uc.prototype,{_div:null,_top:null,
_bottom:null,_player:null,_acCenter:null,_recenter:null,info:null,_st:null,_hd:null,ui:null,show:function(a,b){this._st=a;this._hd=b;p.mode="editorplayerwait";p.parser.clearVars();k.testActions!=""?(p.parser.run(k.testActions),k.testDelay>0?Gc.delay(m(this,this.startTest),k.testDelay):this.startTest()):this.startTest()},startTest:function(){var a=this._st,b=this._hd;p.area.maskArea(!0);p.area.pause();p.movie.data.applySets();p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf());
this.set_width(a.stageWidth);this.set_height(a.stageHeight);this._top.set_minHeight(this._top.set_maxHeight(this._top.set_height(this.get_height()-this._bottom.get_height()-10)));this._top.set_width(this.get_width());this._bottom.set_width(this.get_width());this._player=b;this.info={x:this._player.player.get_x(),y:this._player.player.get_y(),width:this._player.player.get_width(),height:this._player.player.get_height(),orientation:k.displayType,keyframe:p.area.get_currentKf(),scene:p.movie.get_scId(),
sceneobj:p.movie.scene.toObject(),movie:p.movie.get_mvId()};this._player.removeChild(this._player.player);this._top.addChild(this._player.player);this.centerPlayer();this.ui.buttons.h.screen.set_enabled(p.mdata.screen.type=="both");Aa.addPopUp(this,a);a=p.area.get_currentKf();p.movie.data.acstart!=""&&p.parser.run(p.movie.data.acstart);p.movie.scene.acstart!=""&&p.parser.run(p.movie.scene.acstart);p.area.play();p.movie.scene.staticsc&&p.area.loadKeyframe(p.movie.scene.keyframes[a],a);p.area.updateTexts();
this.ui.buttons.h.play.set_icon(new Ma(Z.getBitmapData("btPause")));this.ui.buttons.h.play.get_icon().set_width(this.ui.buttons.h.play.get_icon().set_height(20));this._player.player.listenInput()},centerPlayer:function(){var a=this._top.get_minHeight()-20,b=p.mdata.screen.big/p.mdata.screen.small*a;k.displayType=="portrait"&&(b=p.mdata.screen.small/p.mdata.screen.big*a);this._player.player.setSize(b,a);this._player.set_x(0);this._player.set_y(0);this._player.player.set_x((this._top.get_width()-this._player.player.get_width())/
2+(this._player.player.get_width()-this._player.player.get_rWidth()));this._player.player.set_y((this._top.get_minHeight()-this._player.player.get_rHeight())/2+(this._player.player.get_tHeight()-this._player.player.get_rHeight())/2);this._player.player.set_x((k.stage.stageWidth-this._player.player.get_rWidth())/2);this._player.player.set_y(10);if(this._recenter==null)this._recenter=new Gc(150),this._recenter.run=m(this,this.centerPlayer);else{try{this._recenter.stop()}catch(c){}this._recenter=null}},
onPlay:function(a){p.area.get_playing()?(p.mode="editor",p.area.pause(),this.ui.buttons.h.play.set_icon(new Ma(Z.getBitmapData("btPlay")))):(p.mode="editorplayerwait",p.area.play(),this.ui.buttons.h.play.set_icon(new Ma(Z.getBitmapData("btPause"))));this.ui.buttons.h.play.get_icon().set_width(this.ui.buttons.h.play.get_icon().set_height(20))},onScreen:function(a){p.mdata.screen.type=="both"&&(a=!p.area.get_playing(),this._top.removeChild(this._player.player),k.displayType=k.displayType=="portrait"?
"landscape":"portrait",this.centerPlayer(),this._top.addChild(this._player.player),a?(p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf()),p.area.pause()):(p.area.pause(),p.mode="editor",p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf()),this.centerPlayer(),p.mode="editorplayerwait",p.area.play()),this.centerPlayer())},onClose:function(a){for(;p.history.length>0;)p.history.shift();p.contraptions.removeContraptions(!0);
p.area.removeInputInterfaces();p.mode="editor";p.area.maskArea(!1);p.area.pause();p.area.releaseAllProperties();p.area.hideTarget();p.parser.clearVars();xd.show();p.cursorVisible=!0;this._player.player.listenInputRemove();this._top.removeChild(this._player.player);this._player.addChild(this._player.player);k.displayType=this.info.orientation;this._player.player.set_x(this.info.x);this._player.player.set_y(this.info.y);this._player.player.setSize(this.info.width,this.info.height);this.info.movie!=
p.movie.get_mvId()?(k.sceneObj=this.info.sceneobj,k.sceneToLoad=this.info.scene,k.kfToLoad=this.info.keyframe,this._player.player.load(this.info.movie)):this.info.scene!=p.movie.get_scId()?(k.sceneObj=this.info.sceneobj,k.kfToLoad=this.info.keyframe,p.movie.loadScene(this.info.scene)):(p.movie.scene.fromObject(this.info.sceneobj),p.area.loadKeyframe(p.movie.scene.keyframes[this.info.keyframe],this.info.keyframe));this._acCenter();Aa.removePopUp(this)},__class__:kr});var $s=function(a){this._current=
null;ze.call(this,k.ln.get("rightbar-filter"),a);this._timer=null;var b=this.ui.createHContainer("colorcont",3355443);this.ui.createTInput("glcolor","","",b);this.ui.createButton("glcolor",k.ln.get("default-set"),m(this,this.changeProperties),b);b.set_width(a-5);var c=this.ui.createHContainer("colorcont",3355443);this.ui.createTInput("dscolor","","",c);this.ui.createButton("dscolor",k.ln.get("default-set"),m(this,this.changeProperties),c);c.set_width(a-5);var d=this.ui,f={tp:"Label",id:"glow",tx:k.ln.get("rightbar-filter-glow"),
vr:""},g={tp:"Label",id:"glblur",tx:k.ln.get("rightbar-filter-glblur"),vr:"detail"},h={tp:"Label",id:"glcolor",tx:k.ln.get("rightbar-filter-glcolor"),vr:"detail"},n={tp:"Label",id:"glstrength",tx:k.ln.get("rightbar-filter-glstrength"),vr:"detail"},l={tp:"Label",id:"glalpha",tx:k.ln.get("rightbar-filter-glalpha"),vr:"detail"},q={tp:"Label",id:"glinner",tx:k.ln.get("rightbar-filter-glinner"),vr:"detail"},u={tp:"Label",id:"blur",tx:k.ln.get("rightbar-filter-blur"),vr:""},v={tp:"Label",id:"blurx",tx:k.ln.get("rightbar-filter-blurx"),
vr:"detail"},z={tp:"Label",id:"blury",tx:k.ln.get("rightbar-filter-blury"),vr:"detail"},r={tp:"Label",id:"dropshadow",tx:k.ln.get("rightbar-filter-dropshadow"),vr:""},F={tp:"Label",id:"dsdistance",tx:k.ln.get("rightbar-filter-dsdistance"),vr:"detail"},J={tp:"Label",id:"dsangle",tx:k.ln.get("rightbar-filter-dsangle"),vr:"detail"},L={tp:"Label",id:"dscolor",tx:k.ln.get("rightbar-filter-dscolor"),vr:"detail"},Q={tp:"Label",id:"dsalpha",tx:k.ln.get("rightbar-filter-dsalpha"),vr:"detail"},W={tp:"Label",
id:"dsblurx",tx:k.ln.get("rightbar-filter-dsblurx"),vr:"detail"},ka={tp:"Label",id:"dsblury",tx:k.ln.get("rightbar-filter-dsblury"),vr:"detail"},ha={tp:"Label",id:"dsstrength",tx:k.ln.get("rightbar-filter-dsstrength"),vr:"detail"},ta=k.ln.get("rightbar-filter-dsinner");this._content=d.forge("properties",[f,{tp:"Toggle",id:"glow",vl:!1,ch:m(this,this.changeProperties)},g,{tp:"Numeric",id:"glblur",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},h,{tp:"Custom",cont:b},n,{tp:"Numeric",id:"glstrength",
mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},l,{tp:"Numeric",id:"glalpha",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},q,{tp:"Toggle",id:"glinner",vl:!1,ch:m(this,this.changeProperties)},{tp:"Spacer",id:"glow",ht:8,ln:!1},u,{tp:"Toggle",id:"blur",vl:!1,ch:m(this,this.changeProperties)},v,{tp:"Numeric",id:"blurx",mn:0,mx:255,st:1,vl:0,ch:m(this,this.changeProperties)},z,{tp:"Numeric",id:"blury",mn:0,mx:255,st:1,vl:0,ch:m(this,this.changeProperties)},{tp:"Spacer",id:"blur",ht:8,
ln:!1},r,{tp:"Toggle",id:"dropshadow",vl:!1,ch:m(this,this.changeProperties)},F,{tp:"Numeric",id:"dsdistance",mn:-100,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},J,{tp:"Numeric",id:"dsangle",mn:0,mx:360,st:1,vl:0,ch:m(this,this.changeProperties)},L,{tp:"Custom",cont:c},Q,{tp:"Numeric",id:"dsalpha",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},W,{tp:"Numeric",id:"dsblurx",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},ka,{tp:"Numeric",id:"dsblury",mn:0,mx:100,st:1,vl:0,ch:m(this,
this.changeProperties)},ha,{tp:"Numeric",id:"dsstrength",mn:0,mx:255,st:1,vl:0,ch:m(this,this.changeProperties)},{tp:"Label",id:"dsinner",tx:ta,vr:"detail"},{tp:"Toggle",id:"dsinner",vl:!1,ch:m(this,this.changeProperties)}],3355443,a-5);this.ui.containers.h.properties.set_enabled(!1);k.history.propDisplay.push(m(this,this.updateValues))};t["com.tilbuci.ui.component.FilterPanel"]=$s;$s.__name__="com.tilbuci.ui.component.FilterPanel";$s.__super__=ze;$s.prototype=I(ze.prototype,{_timer:null,_current:null,
updateContent:function(a){Object.prototype.hasOwnProperty.call(a.h,"nm")?a.h.nm==""?this.clearValues():(this._current=p.area.instanceRef(a.h.nm),this.updateValues()):this.clearValues()},reloadContent:function(a){this.clearValues()},updateValues:function(){if(this._current!=null){this.ui.containers.h.properties.set_enabled(!1);this.ui.toggles.h.blur.set_selected(this._current.getCurrentBool("blur"));this.ui.toggles.h.dropshadow.set_selected(this._current.getCurrentBool("dropshadow"));this.ui.toggles.h.glow.set_selected(this._current.getCurrentBool("glow"));
var a=this._current.getCurrentArr("blur");this.ui.numerics.h.blurx.set_value(H.parseInt(a[0]));this.ui.numerics.h.blury.set_value(H.parseInt(a[1]));a=this._current.getCurrentArr("dropshadow");this.ui.numerics.h.dsdistance.set_value(H.parseInt(a[0]));this.ui.numerics.h.dsangle.set_value(H.parseInt(a[1]));this.ui.inputs.h.dscolor.set_text(N.replace(a[2],"0x","#"));this.ui.numerics.h.dsalpha.set_value(Math.round(parseFloat(a[3])*100));this.ui.numerics.h.dsblurx.set_value(H.parseInt(a[4]));this.ui.numerics.h.dsblury.set_value(H.parseInt(a[5]));
this.ui.numerics.h.dsstrength.set_value(H.parseInt(a[6]));this.ui.toggles.h.dsinner.set_selected(a[7]=="1");a=this._current.getCurrentArr("glow");this.ui.inputs.h.glcolor.set_text(N.replace(a[0],"0x","#"));this.ui.numerics.h.glblur.set_value(H.parseInt(a[2])-6);this.ui.numerics.h.glstrength.set_value(H.parseInt(a[3]));this.ui.toggles.h.glinner.set_selected(a[4]=="1");this.ui.numerics.h.glalpha.set_value(Math.round(parseFloat(a[1])*100));this.ui.containers.h.properties.set_enabled(!0)}},clearValues:function(){this.ui.containers.h.properties.set_enabled(!1);
this.ui.toggles.h.blur.set_selected(!1);this.ui.toggles.h.dropshadow.set_selected(!1);this.ui.numerics.h.blurx.set_value(0);this.ui.numerics.h.blury.set_value(0);this.ui.numerics.h.dsdistance.set_value(0);this.ui.numerics.h.dsangle.set_value(0);this.ui.inputs.h.dscolor.set_text("#000000");this.ui.numerics.h.dsalpha.set_value(100);this.ui.numerics.h.dsblurx.set_value(0);this.ui.numerics.h.dsblury.set_value(0);this.ui.numerics.h.dsstrength.set_value(0);this.ui.toggles.h.dsinner.set_selected(!1);this.ui.toggles.h.glow.set_selected(!1);
this.ui.inputs.h.glcolor.set_text("#FFFFFF");this.ui.numerics.h.glblur.set_value(0);this.ui.numerics.h.glstrength.set_value(0);this.ui.toggles.h.glinner.set_selected(!1);this.ui.numerics.h.glalpha.set_value(100);this._current=null},changeProperties:function(a){if(this._current!=null&&this.ui.containers.h.properties.get_enabled()){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));p.area.setCurrentArray("blur",[H.string(this.ui.numerics.h.blurx.get_value()),H.string(this.ui.numerics.h.blury.get_value())]);
a=N.replace(this.ui.inputs.h.dscolor.get_text(),"#","0x");a=H.parseInt(a);a=a==null?"0x000000":"0x"+N.hex(a);this.ui.inputs.h.dscolor.set_text(N.replace(a,"0x","#"));var b="0";this.ui.toggles.h.dsinner.get_selected()&&(b="1");p.area.setCurrentArray("dropshadow",[H.string(this.ui.numerics.h.dsdistance.get_value()),H.string(this.ui.numerics.h.dsangle.get_value()),a,H.string(this.ui.numerics.h.dsalpha.get_value()/100),H.string(this.ui.numerics.h.dsblurx.get_value()),H.string(this.ui.numerics.h.dsblury.get_value()),
H.string(this.ui.numerics.h.dsstrength.get_value()),b]);a=N.replace(this.ui.inputs.h.glcolor.get_text(),"#","0x");a=H.parseInt(a);a=a==null?"0xFFFFFF":"0x"+N.hex(a);b="0";this.ui.toggles.h.glinner.get_selected()&&(b="1");p.area.setCurrentArray("glow",[a,H.string(this.ui.numerics.h.glalpha.get_value()/100),H.string(this.ui.numerics.h.glblur.get_value()+6),H.string(this.ui.numerics.h.glstrength.get_value()),b]);p.area.setCurrentBool("blur",this.ui.toggles.h.blur.get_selected());p.area.setCurrentBool("dropshadow",
this.ui.toggles.h.dropshadow.get_selected());p.area.setCurrentBool("glow",this.ui.toggles.h.glow.get_selected());this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory))}},saveHistory:function(){try{this._timer.stop()}catch(a){}this._timer=null;k.history.addState(k.ln.get("rightbar-history-filters"))},__class__:$s});var at=function(a,b){ze.call(this,k.ln.get("rightbar-history"),a);this._centerMethod=b;this.ui.createList("list",[],200);this.ui.setListToIcon("list");this.ui.lists.h.list.addEventListener("change",
m(this,this.onChange));this._content=this.ui.lists.h.list;this._content.set_width(a-20);k.history.historyDisplay=m(this,this.reloadContent)};t["com.tilbuci.ui.component.HistoryPanel"]=at;at.__name__="com.tilbuci.ui.component.HistoryPanel";at.__super__=ze;at.prototype=I(ze.prototype,{_centerMethod:null,reloadContent:function(a){a=[];for(var b=0,c=0,d=k.history.states;c<d.length;){var f=d[c];++c;a.push({text:f.title,value:b,asset:f.orientation,user:f.name});++b}a.reverse();this.ui.setListValues("list",
a)},onChange:function(a){this.ui.lists.h.list.get_selectedItem()!=null&&(k.history.loadState(this.ui.lists.h.list.get_selectedItem().value),this._centerMethod())},__class__:at});var Rc=function(a,b,c,d,f){f==null&&(f=!0);a==null&&(a="");this._ac=null;this.autoResize=!0;Xb.call(this);this.btid=a;this.autoResize=f;c!=null&&this.set_text(c);d!=null&&(a=new Ma(d),a.smoothing=!0,a.set_width(a.set_height(20)),this.set_icon(a));b!=null&&(this.addEventListener("click",b),this._ac=b)};t["com.tilbuci.ui.component.IDButton"]=
Rc;Rc.__name__="com.tilbuci.ui.component.IDButton";Rc.__super__=Xb;Rc.prototype=I(Xb.prototype,{btid:null,autoResize:null,_ac:null,kill:function(){this.parent!=null&&this.parent.removeChild(this);this._ac!=null&&this.removeEventListener("click",this._ac);this.btid=this._ac=null},__class__:Rc});var ia=function(a){a==null&&(a="");this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__wordWrap=!1;this.__verticalAlign=hc.TOP;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=
0;this.__disabledTextFormat=null;this.__embedFonts=!1;this._currentBackgroundSkin=this._backgroundSkinMeasurements=this.__textFormat=this.__styleSheet=null;this._selectable=!1;this._htmlText=null;this._updatedTextStyles=this._wrappedOnMeasure=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeLabelTheme();fa.call(this);this.set_text(a);this.set_tabEnabled(!1);this.set_tabChildren(!1);this.addEventListener("focusIn",m(this,this.label_focusInHandler))};
t["feathers.controls.Label"]=ia;ia.__name__="feathers.controls.Label";ia.__interfaces__=[Th,qd,El,re];ia.__super__=fa;ia.prototype=I(fa.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==
a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},get_baseline:function(){if(this.textField==null)return 0;var a=this._htmlText!=null&&this._htmlText.length>0;return this._text!=null&&this._text.length>0||a?this.textField.get_y()+this.textField.getLineMetrics(0).ascent:(this.textField.set_text("\u200b"),a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent,this.textField.set_text(""),a)},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==
a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.SELECTION);return this._selectable},get_tabEnabled:function(){return this._selectable&&this._enabled?this.get_rawTabEnabled():!1},get_focusEnabled:function(){return this._selectable?fa.prototype.get_focusEnabled.call(this):!1},get_stageFocusTarget:function(){return this.textField},
get_selectionBeginIndex:function(){return this._selectable?this.textField==null?0:this.textField.get_selectionBeginIndex():-1},get_selectionEndIndex:function(){return this._selectable?this.textField==null?0:this.textField.get_selectionEndIndex():-1},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeLabelTheme:function(){Iw.initialize()},initialize:function(){fa.prototype.initialize.call(this);
this.textField==null&&(this.textField=new Jc,this.textField.set_multiline(!0),this.addChild(this.textField))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(f||d)&&this.refreshBackgroundSkin();(f||d)&&this.refreshTextStyles();(a||f||d||c)&&this.refreshText(c);(a||f||b)&&this.refreshSelection();this.measure()&&(c=!0);(f||d||a||c)&&this.layoutContent()},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;w.__implements(this._currentBackgroundSkin,rb)&&(h=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,
da)&&this._currentBackgroundSkin.validateNow();var n=this.get_explicitWidth();a&&(n=this._textMeasuredWidth+this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(n=Math.max(this._currentBackgroundSkin.get_width(),n)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight+this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this._textMeasuredWidth+
this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight+this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,
c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},refreshTextStyles:function(){this.textField.get_wordWrap()!=
this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=
null&&this._previousTextFormat.removeEventListener("change",m(this,this.label_textFormat_changeHandler)),this.textField.get_caretIndex()!=-1&&this.textField.get_selectionBeginIndex()!=this.textField.get_selectionEndIndex()&&this.textField.setSelection(0,0),a!=null&&(a.addEventListener("change",m(this,this.label_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=
this._text!=null&&this._text.length>0,c=this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),this.get_wordWrap()&&this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=
!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&this.textField.set_wordWrap(this.get_wordWrap()),b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=
this._htmlText},calculateExplicitWidthForTextMeasurement:function(){var a=null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+this.get_paddingRight();a<0&&(a=0);return a},refreshSelection:function(){var a=this._selectable&&this._enabled;this.textField.get_selectable()!=
a&&this.textField.set_selectable(a)},getCurrentTextFormat:function(){return this.get_styleSheet()!=null?null:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||
this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),
this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutContent:function(){this.layoutBackgroundSkin();var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a<0&&(a=0);this.textField.set_x(this.get_paddingLeft());this.textField.set_width(a);var b=this.get_wordWrap();b&&!this._wrappedOnMeasure&&a>=this._textMeasuredWidth&&(b=!1);this.textField.get_wordWrap()!=b&&this.textField.set_wordWrap(b);a=this._textMeasuredHeight;b=this.actualHeight-this.get_paddingTop()-
this.get_paddingBottom();a>b&&(a=b);a<0&&(a=0);this.textField.set_height(a);switch(this.get_verticalAlign()._hx_index){case 0:this.textField.set_y(this.get_paddingTop());break;case 2:this.textField.set_y(this.actualHeight-this.get_paddingBottom()-a);break;default:this.textField.set_y(this.get_paddingTop()+(b-a)/2)}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=
this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},label_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this.textField&&(a.stopImmediatePropagation(),this.stage.set_focus(this.textField))},label_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},
__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||
this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);
this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);
return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);
return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},
set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==
a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);
this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(hc.TOP);return this.get_verticalAlign()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);
return this.get_wordWrap()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,
get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},
get_styleContext:function(){return ia},__class__:ia,__properties__:I(fa.prototype.__properties__,{set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",
get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",get_stageFocusTarget:"get_stageFocusTarget",set_selectable:"set_selectable",get_selectable:"get_selectable",set_embedFonts:"set_embedFonts",
get_embedFonts:"get_embedFonts",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text"})});var fp=function(){this.autoResize=!0;ia.call(this)};t["com.tilbuci.ui.component.IDLabel"]=fp;fp.__name__="com.tilbuci.ui.component.IDLabel";fp.__super__=ia;fp.prototype=I(ia.prototype,{autoResize:null,__class__:fp});
var qi=function(){};t["feathers.core.IDataSelector"]=qi;qi.__name__="feathers.core.IDataSelector";qi.__isInterface__=!0;qi.prototype={get_selectedItem:null,set_selectedItem:null,__class__:qi,__properties__:{set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem"}};var lj=function(){};t["feathers.core.IIndexSelector"]=lj;lj.__name__="feathers.core.IIndexSelector";lj.__isInterface__=!0;lj.prototype={get_selectedIndex:null,set_selectedIndex:null,get_maxSelectedIndex:null,__class__:lj,
__properties__:{get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex"}};var ip=function(){};t["feathers.dragDrop.IDropTarget"]=ip;ip.__name__="feathers.dragDrop.IDropTarget";ip.__isInterface__=!0;ip.__interfaces__=[Db];var bt=function(){};t["feathers.dragDrop.IDragSource"]=bt;bt.__name__="feathers.dragDrop.IDragSource";bt.__isInterface__=!0;bt.__interfaces__=[Db];var Jl=function(a,b,c,d){b==null&&(b=-1);this.enabled=!0;this.selected=
!1;this.index=-1;this.data=a;this.index=b;this.selected=!1;this.text=d};t["feathers.data.ListViewItemState"]=Jl;Jl.__name__="feathers.data.ListViewItemState";Jl.prototype={owner:null,data:null,index:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:Jl};var Fc=function(a,b){this.__layout=this.__customItemRendererVariant=this.__dragDropIndicatorSkin=null;this.edgeAutoScrollDistance=8;this._dragDropLastUpdateTime=-1;this._droppedOnSelf=!1;this._dragIndex=-1;this._dragItem=null;this._dragDropLocalX=
this._dragDropLocalY=this._dragMinDistance=0;this._dragEnabled=this._dropEnabled=this._removeOnDragDropComplete=!1;this._dragFormat=Fc.DEFAULT_DRAG_FORMAT_ITEMS;this._ignoreSelectionChange=this._ignoreLayoutChanges=!1;this._pendingScrollDuration=null;this._pendingScrollIndex=-1;this._selectable=this._virtualLayout=this.pointerSelectionEnabled=!0;this._layoutItems=[];this._tempVisibleIndices=new Ri(0,0);this._visibleIndices=new Ri(0,0);this._virtualCache=[];this._unrenderedData=[];this.itemStatePool=
new dc(function(){return new Jl});this.itemRendererToItemState=new Ta;this.stringDataToItemRenderer=new G;this.objectDataToItemRenderer=new Ta;this._additionalStorage=null;this._defaultStorage=new ct(null,Ne.withClass(Sc));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._previousCustomItemRendererVariant=null;this._selectedItems=[];this._selectedIndices=[];this._selectionAnchorIndex=-1;this._allowMultipleSelection=!1;this._selectedItem=null;this._selectedIndex=-1;this._childFocusEnabled=
!0;this.initializeListViewTheme();Ab.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.listViewPort=new Wk,this.addChild(this.listViewPort),this.set_viewPort(this.listViewPort));this.addEventListener("keyDown",m(this,this.listView_keyDownHandler));b!=null&&this.addEventListener("change",b)};t["feathers.controls.ListView"]=Fc;Fc.__name__="feathers.controls.ListView";Fc.__interfaces__=[ip,bt,ng,qi,lj];Fc.defaultUpdateItemRenderer=function(a,
b){w.__implements(a,re)&&a.set_text(b.text)};Fc.defaultResetItemRenderer=function(a,b){w.__implements(a,re)&&a.set_text(null)};Fc.__super__=Ab;Fc.prototype=I(Ab.prototype,{listViewPort:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==
a?this._childFocusEnabled:this._childFocusEnabled=a},_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._virtualCache.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.listView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.listView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",
m(this,this.listView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.listView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.listView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.listView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.listView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("filterChange",
m(this,this.listView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.listView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.listView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length(),this._dataProvider.addEventListener("change",m(this,this.listView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",
m(this,this.listView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.listView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.listView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.listView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.listView_dataProvider_resetHandler)),this._dataProvider.addEventListener("sortChange",
m(this,this.listView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.listView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.listView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.listView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedIndex(-1);this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._dataProvider},
_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._selectable&&this._dataProvider!=null||(a=-1);if(this._selectedIndex==a&&this._selectedIndices.length<=1)return this._selectedIndex;if(a==-1)return this._selectedIndex=this._selectionAnchorIndex=-1,this._selectedItem=null,this._selectedIndices.length=0,this._selectedItems.length=0,this.setInvalid(x.SELECTION),Y.dispatch(this,"change"),this._selectedIndex;this._selectedIndex=a;this._selectedItem=
this._dataProvider.get(this._selectedIndex);this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==
null||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b&&this._selectedIndices.length==1)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=
this._selectedIndex;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedItem},_allowMultipleSelection:null,get_allowMultipleSelection:function(){return this._allowMultipleSelection},set_allowMultipleSelection:function(a){if(this._allowMultipleSelection==a)return this._allowMultipleSelection;this._allowMultipleSelection=a;this.setInvalid(x.SELECTION);return this._allowMultipleSelection},_selectionAnchorIndex:null,_selectedIndices:null,get_selectedIndices:function(){return this._selectedIndices},
set_selectedIndices:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedIndices;if(this._selectedIndices==a)return this._selectedIndices;!this._allowMultipleSelection&&a.length>1&&(a.length=1);this._selectedIndices=a;this._selectedIndex=this._selectedIndices[0];this._selectedItems.length=this._selectedIndices.length;a=0;for(var b=this._selectedIndices.length;a<b;){var c=a++;this._selectedItems[c]=this._dataProvider.get(this._selectedIndices[c])}this._selectedItem=
this._selectedItems[0];this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndices},_selectedItems:null,get_selectedItems:function(){return this._selectedItems},set_selectedItems:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItems;if(this._selectedItems==a)return this._selectedItems;!this._allowMultipleSelection&&a.length>1&&(a.length=1);for(var b=
[],c=0;c<a.length;){var d=this._dataProvider.indexOf(a[c]);d==-1?a.splice(c,1):(b.push(d),++c)}this._selectedIndices=b;this._selectedItems=a;a.length==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._selectedItems[0]);this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndices},_previousLayout:null,_previousCustomItemRendererVariant:null,get_itemRendererRecycler:function(){return this._defaultStorage.itemRendererRecycler},
set_itemRendererRecycler:function(a){if(this._defaultStorage.itemRendererRecycler==a)return this._defaultStorage.itemRendererRecycler;this._defaultStorage.oldItemRendererRecycler=this._defaultStorage.itemRendererRecycler;this._defaultStorage.itemRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._defaultStorage.itemRendererRecycler},_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},
set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,_itemRendererRecyclerIDFunction:null,get_itemRendererRecyclerIDFunction:function(){return this._itemRendererRecyclerIDFunction},set_itemRendererRecyclerIDFunction:function(a){if(this._itemRendererRecyclerIDFunction==a)return this._itemRendererRecyclerIDFunction;this._itemRendererRecyclerIDFunction=
a;this.setInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._itemRendererRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToItemRenderer:null,stringDataToItemRenderer:null,itemRendererToItemState:null,itemStatePool:null,_unrenderedData:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_layoutItems:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;
(this._selectable=a)||this.set_selectedIndex(-1);return this._selectable},_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_pendingScrollIndex:null,_pendingScrollDuration:null,_ignoreSelectionChange:null,_ignoreLayoutChanges:null,_dragDropIndicatorSkinMeasurements:null,_dragFormat:null,
get_dragFormat:function(){return this._dragFormat},set_dragFormat:function(a){a==null&&(a=Fc.DEFAULT_DRAG_FORMAT_ITEMS);return this._dragFormat==a?this._dragFormat:this._dragFormat=a},_dragEnabled:null,get_dragEnabled:function(){return this._dragEnabled},set_dragEnabled:function(a){if(this._dragEnabled==a)return this._dragEnabled;this._dragEnabled&&this.removeEventListener("dragComplete",m(this,this.listView_dragCompleteHandler));(this._dragEnabled=a)&&this.addEventListener("dragComplete",m(this,
this.listView_dragCompleteHandler));return this._dragEnabled},_dropEnabled:null,get_dropEnabled:function(){return this._dropEnabled},set_dropEnabled:function(a){if(this._dropEnabled==a)return this._dropEnabled;this._dropEnabled&&(this.removeEventListener("dragEnter",m(this,this.listView_dragEnterHandler)),this.removeEventListener("dragExit",m(this,this.listView_dragExitHandler)),this.removeEventListener("dragMove",m(this,this.listView_dragMoveHandler)),this.removeEventListener("dragDrop",m(this,this.listView_dragDropHandler)));
if(this._dropEnabled=a)this.addEventListener("dragEnter",m(this,this.listView_dragEnterHandler)),this.addEventListener("dragExit",m(this,this.listView_dragExitHandler)),this.addEventListener("dragMove",m(this,this.listView_dragMoveHandler)),this.addEventListener("dragDrop",m(this,this.listView_dragDropHandler));return this._dropEnabled},_removeOnDragDropComplete:null,get_removeOnDragDropComplete:function(){return this._removeOnDragDropComplete},set_removeOnDragDropComplete:function(a){return this._removeOnDragDropComplete=
a},_dragDropLocalX:null,_dragDropLocalY:null,_dragMinDistance:null,_dragItem:null,_dragIndex:null,_dragItemRenderer:null,_droppedOnSelf:null,_dragDropLastUpdateTime:null,edgeAutoScrollDistance:null,itemToText:function(a){return H.string(a)},itemToEnabled:function(a){return!0},scrollToIndex:function(a,b){this._dataProvider!=null&&this._dataProvider.get_length()!=0&&(this._pendingScrollIndex=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemToItemRenderer:function(a){return a==null?null:
typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},itemRendererToItem:function(a){if(a==null)return null;a=this.itemRendererToItemState.h[a.__id__];return a==null?null:a.data},indexToItemRenderer:function(a){if(this._dataProvider==null||a<0||a>=this._dataProvider.get_length())return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},getItemRendererRecycler:function(a){return this._recyclerMap==
null?null:this._recyclerMap.h[a]},setItemRendererRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new G);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY))},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(b!=null)b=this.itemRendererToItemState.h[b.__id__];
else{var c=this._dataProvider.indexOf(a);if(c==-1)return null;b=new Jl;this.populateCurrentItemState(a,c,b,!1)}return b},dispose:function(){this.refreshInactiveItemRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveItemRenderers(this._additionalStorage[c],!0)}this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);Ab.prototype.dispose.call(this)},initializeListViewTheme:function(){Kw.initialize()},
update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);if(a||b)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length())),this.listViewPort.set_layout(this.get_layout()),this._previousLayout=this.get_layout();this.listViewPort.refreshChildren=
m(this,this.refreshItemRenderers);for(a=this._invalidationFlags.keys();a.hasNext();)b=a.next(),this.listViewPort.setInvalid(b);this._allInvalid&&this.listViewPort.setInvalid();Ab.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();this.handlePendingScroll()},createScroller:function(){Ab.prototype.createScroller.call(this);this.listViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Ab.prototype.refreshScrollerValues.call(this);
if(w.__implements(this.get_layout(),ff)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.listViewPort.get_snapPositionsX();this.scroller.snapPositionsY=
this.listViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&w.__implements(this.get_layout(),Vh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._layoutItems.length,this.listViewPort.get_visibleWidth(),this.listViewPort.get_visibleHeight(),
this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._layoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:!0},refreshItemRenderers:function(a){this._layoutItems=a;this._defaultStorage.itemRendererRecycler.update==null&&(this._defaultStorage.itemRendererRecycler.update=Fc.defaultUpdateItemRenderer,this._defaultStorage.itemRendererRecycler.reset==null&&(this._defaultStorage.itemRendererRecycler.reset=Fc.defaultResetItemRenderer));
if(this._recyclerMap!=null){a=this._recyclerMap.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Fc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Fc.defaultResetItemRenderer))}}a=this.listViewPort.isInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);this.refreshInactiveItemRenderers(this._defaultStorage,a);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveItemRenderers(d,
a);this.findUnrenderedData();this.recoverInactiveItemRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveItemRenderers(d);this.renderUnrenderedData();this.freeInactiveItemRenderers(this._defaultStorage);if(this._defaultStorage.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive item renderers should be empty after updating.");if(this._additionalStorage!=
null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveItemRenderers(d),d.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive item renderers "+d.id+" should be empty after updating.");},refreshInactiveItemRenderers:function(a,b){var c=a.inactiveItemRenderers;a.inactiveItemRenderers=a.activeItemRenderers;a.activeItemRenderers=c;if(a.activeItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active item renderers should be empty before updating.");
b&&(this.recoverInactiveItemRenderers(a),this.freeInactiveItemRenderers(a),a.oldItemRendererRecycler=null)},recoverInactiveItemRenderers:function(a){for(var b=0,c=a.inactiveItemRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.itemRendererToItemState.h[d.__id__];if(f!=null){var g=f.data;this.itemRendererToItemState.remove(d);if(typeof g=="string"){var h=this.stringDataToItemRenderer;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}else this.objectDataToItemRenderer.remove(g);
d.removeEventListener("trigger",m(this,this.listView_itemRenderer_triggerHandler));d.removeEventListener("click",m(this,this.listView_itemRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.listView_itemRenderer_touchTapHandler));d.removeEventListener("change",m(this,this.listView_itemRenderer_changeHandler));d.removeEventListener("resize",m(this,this.listView_itemRenderer_resizeHandler));d.removeEventListener("mouseDown",m(this,this.listView_itemRenderer_mouseDownHandler));this.resetItemRenderer(d,
f,a);a.measurements!=null&&a.measurements.restore(d);this.itemStatePool.release(f)}}}},freeInactiveItemRenderers:function(a){for(var b=a.oldItemRendererRecycler!=null?a.oldItemRendererRecycler:a.itemRendererRecycler,c=0,d=a.inactiveItemRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyItemRenderer(f,b)}a.inactiveItemRenderers.length=0},findUnrenderedData:function(){this._layoutItems.length=0;this._visibleIndices.start=0;this._visibleIndices.end=0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=
0){this._layoutItems.length=this._dataProvider.get_length();if(this._virtualLayout&&w.__implements(this.get_layout(),Vh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._dataProvider.get_length(),this.listViewPort.get_visibleWidth(),this.listViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=
0,a=this._dataProvider.get_length(),this._visibleIndices.end=a-1;b=this._visibleIndices.start;for(var c=this._visibleIndices.end+1;b<c;){a=b++;var d=this._dataProvider.get(a);var f=typeof d=="string"?this.stringDataToItemRenderer.h[d]:this.objectDataToItemRenderer.h[d.__id__];if(f!=null){var g=this.itemRendererToItemState.h[f.__id__],h=this.populateCurrentItemState(d,a,g,this._forceItemStateUpdate),n=g.recyclerID,l=this.itemStateToStorage(g);if(l.id!=n)this._unrenderedData.push(d);else{h&&this.updateItemRenderer(f,
g,l);f.set_visible(!0);this._layoutItems[a]=f;if(!V.remove(l.inactiveItemRenderers,f))throw b=w.getClass(this),new ob(""+b.__name__+": item renderer map contains bad data for item at index "+a+". This may be caused by duplicate items in the data provider, which is not allowed.");l.activeItemRenderers.push(f)}}else this._unrenderedData.push(d)}}},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.index!=b)c.index=b,f=!0;b=
this._selectedIndices.indexOf(b)!=-1;if(d||c.selected!=b)c.selected=b,f=!0;b=this._enabled&&this.itemToEnabled(a);if(d||c.enabled!=b)c.enabled=b,f=!0;a=this.itemToText(a);if(d||c.text!=a)c.text=a,f=!0;return f},resetItemRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c=c.oldItemRendererRecycler!=null?c.oldItemRendererRecycler:c.itemRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,Fc.RESET_ITEM_STATE)},
updateItemRenderer:function(a,b,c){b.recyclerID=c.id;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c.itemRendererRecycler.update!=null&&c.itemRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,b)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.data);w.__implements(a,jp)&&(a.set_index(b.index),
a.set_listViewOwner(b.owner));w.__implements(a,ri)&&a.set_layoutIndex(b.index);w.__implements(a,ud)&&a.set_selected(b.selected);this._ignoreSelectionChange=c},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._dataProvider.indexOf(c),f=this.itemStatePool.get();this.populateCurrentItemState(c,d,f,!0);c=this.createItemRenderer(f);c.set_visible(!0);this.listViewPort.addChild(c);this._layoutItems[d]=c}this._unrenderedData.length=0},createItemRenderer:function(a){var b=
this.itemStateToStorage(a);if(b.inactiveItemRenderers.length==0){var c=b.itemRendererRecycler.create();if(w.__implements(c,nd)){var d=c;if(d.get_variant()==null){var f=this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():Fc.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}w.__implements(c,Fa)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);w.__implements(c,Qh)?c.addEventListener("trigger",
m(this,this.listView_itemRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.listView_itemRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.listView_itemRenderer_touchTapHandler)));w.__implements(c,ud)&&c.addEventListener("change",m(this,this.listView_itemRenderer_changeHandler));w.__implements(c,rb)&&c.addEventListener("resize",m(this,this.listView_itemRenderer_resizeHandler));c.addEventListener("mouseDown",m(this,this.listView_itemRenderer_mouseDownHandler));this.itemRendererToItemState.set(c,
a);d=a.data;typeof d=="string"?this.stringDataToItemRenderer.h[d]=c:this.objectDataToItemRenderer.set(a.data,c);b.activeItemRenderers.push(c);return c},destroyItemRenderer:function(a,b){this.listViewPort.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},itemStateToStorage:function(a){var b=null;this._itemRendererRecyclerIDFunction!=null&&(b=this._itemRendererRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new ob('Item renderer recycler ID "'+
b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<d;){var f=c++;f=this._additionalStorage[f];if(f.itemRendererRecycler==a)return f}f=new ct(b,a);this._additionalStorage.push(f);return f},refreshSelectedIndicesAfterFilterOrSort:function(){this._selectedIndex!=-1&&this.set_selectedIndex(this._dataProvider.indexOf(this._selectedItem))},handleSelectionChange:function(a,b,c,d){if(b!=
-1&&this._selectable){var f=this._selectedItems.indexOf(a);if(this._allowMultipleSelection&&(c||d))if(d){a=this._selectionAnchorIndex;a==-1&&(a=0);f=[];if(b==a)f.unshift(a);else{c=a;do f.unshift(c),c+=a>b?-1:1;while(c!=b);b!=a&&f.unshift(b)}this.set_selectedIndices(f);this._selectionAnchorIndex=a}else f==-1?(c=this._selectedItems.slice(),c.unshift(a)):(c=this._selectedItems.slice(),c.splice(f,1)),this.set_selectedItems(c),this._selectionAnchorIndex=b;else this.set_selectedItem(a);b!=-1&&this.scrollToIndex(b)}else this.set_selectedItem(null)},
handlePendingScroll:function(){if(this._pendingScrollIndex!=-1){var a=this._pendingScrollIndex,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollIndex=-1;this._pendingScrollDuration=null;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(w.__implements(this.get_layout(),ff))d=this.get_layout().getNearestScrollPositionForIndex(a,this._dataProvider.get_length(),this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),
c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},refreshDragDropIndexIndicator:function(){if(this.get_dragDropIndicatorSkin()!=
null&&w.__implements(this.get_layout(),mj)){w.__implements(this.get_dragDropIndicatorSkin(),Fa)&&this.get_dragDropIndicatorSkin().initializeNow();this._dragDropIndicatorSkinMeasurements==null?this._dragDropIndicatorSkinMeasurements=new Sb(this.get_dragDropIndicatorSkin()):this._dragDropIndicatorSkinMeasurements.save(this.get_dragDropIndicatorSkin());var a=this.get_scrollX()+this._dragDropLocalX-this.leftViewPortOffset,b=this.get_scrollY()+this._dragDropLocalY-this.topViewPortOffset,c=this.get_layout(),
d=c.getDragDropIndex(this._layoutItems,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());a=c.getDragDropRegion(this._layoutItems,d,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());this.get_dragDropIndicatorSkin().set_x(a.x-this.get_scrollX()+this.leftViewPortOffset);this.get_dragDropIndicatorSkin().set_y(a.y-this.get_scrollY()+this.topViewPortOffset);a.width==0?this.get_dragDropIndicatorSkin().set_height(a.height):this.get_dragDropIndicatorSkin().set_width(a.width);
this.addChild(this.get_dragDropIndicatorSkin())}},listView_itemRenderer_touchTapHandler:function(a){if(this._enabled&&!a.isPrimaryTouchPoint){var b=w.__cast(a.currentTarget,ma);b=this.itemRendererToItemState.h[b.__id__];Wh.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,b.index,a.ctrlKey,a.shiftKey)}},listView_itemRenderer_clickHandler:function(a){if(this._enabled){var b=w.__cast(a.currentTarget,ma);b=this.itemRendererToItemState.h[b.__id__];
Wh.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,b.index,a.ctrlKey,a.shiftKey)}},listView_itemRenderer_triggerHandler:function(a){if(this._enabled){var b=w.__cast(a.currentTarget,ma);b=this.itemRendererToItemState.h[b.__id__];Wh.dispatch(this,"itemTrigger",b);this._selectable&&this.handleSelectionChange(b.data,b.index,a.ctrlKey,a.shiftKey)}},listView_itemRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},
listView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=w.__cast(a.currentTarget,ma);a=w.__cast(b,ud);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},listView_itemRenderer_mouseDownHandler:function(a){if(this._enabled&&this._dragEnabled&&this.stage!=null){a=w.__cast(a.currentTarget,ma);var b=this.itemRendererToItemState.h[a.__id__];b!=null&&(this._dragItemRenderer=a,this._dragItem=b.data,this._dragIndex=b.index,
this._dragDropLocalX=this.get_mouseX(),this._dragDropLocalY=this.get_mouseY(),this._dragMinDistance=6,this.stage.addEventListener("mouseMove",m(this,this.listView_stage_pressAndMove_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.listView_stage_pressAndMove_mouseUpHandler),!1,0,!0))}},listView_stage_pressAndMove_mouseMoveHandler:function(a){var b=this.get_mouseX()-this._dragDropLocalX,c=this.get_mouseY()-this._dragDropLocalY;if(b>this._dragMinDistance||c>this._dragMinDistance){a=
w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.listView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.listView_stage_pressAndMove_mouseUpHandler));a=[];b=this._allowMultipleSelection?this._selectedIndices.slice():[];b.indexOf(this._dragIndex)==-1&&b.push(this._dragIndex);b.sort(function(f,g){return f<g?-1:f>g?1:0});for(c=0;c<b.length;){var d=b[c];++c;a.push(this._dataProvider.get(d))}b=new dt;b.set(this._dragFormat,a);a=this.itemRendererToItemState.h[this._dragItemRenderer.__id__];
c=this.itemStateToStorage(a);d=c.itemRendererRecycler.create();this.updateItemRenderer(d,a,c);d.set_width(this._dragItemRenderer.get_width());d.set_height(this._dragItemRenderer.get_height());fb.startDrag(this,b,d,-this._dragItemRenderer.get_mouseX(),-this._dragItemRenderer.get_mouseY())}},listView_stage_pressAndMove_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.listView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",
m(this,this.listView_stage_pressAndMove_mouseUpHandler));this._dragItem=null;this._dragIndex=-1;this._dragItemRenderer=null},listView_dragCompleteHandler:function(a){if(a.dropped)if(this._droppedOnSelf)this._droppedOnSelf=!1;else if(this._removeOnDragDropComplete){a=w.__cast(a.dragData.get(this._dragFormat),Array);for(var b=0;b<a.length;){var c=a[b];++b;this._dataProvider.remove(c)}}},listView_dragEnterHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&(a.acceptDrag(this),
this.showFocus(!0),this._dragDropLocalX=a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator(),this._dragDropLastUpdateTime=Pa.getTimer(),this.addEventListener("enterFrame",m(this,this.listView_dragScroll_enterFrameHandler)))},listView_dragExitHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.get_dragDropIndicatorSkin().parent==this&&this.removeChild(this.get_dragDropIndicatorSkin()));
this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.listView_dragScroll_enterFrameHandler))},listView_dragScroll_enterFrameHandler:function(a){a=Pa.getTimer();var b=a-this._dragDropLastUpdateTime;this._dragDropLastUpdateTime=a;a=this._dragDropLocalX-this.leftViewPortOffset;var c=this._dragDropLocalY-this.topViewPortOffset;b/=2;this.get_maxScrollY()>this.get_minScrollY()&&(b=this.get_scrollY()<this.get_maxScrollY()&&c>this._viewPort.get_visibleHeight()-
this.edgeAutoScrollDistance?b*(1-(this._viewPort.get_visibleHeight()-c)/this.edgeAutoScrollDistance):this.get_scrollY()>this.get_minScrollY()&&c<this.edgeAutoScrollDistance?b*-(1-c/this.edgeAutoScrollDistance):0,b!=0&&(c=this.get_scrollY()+b,c>this.get_maxScrollY()?c=this.get_maxScrollY():c<this.get_minScrollY()&&(c=this.get_minScrollY()),this.set_scrollY(c)));this.get_maxScrollX()>this.get_minScrollX()&&(b=this.get_scrollX()<this.get_maxScrollX()&&a>this._viewPort.get_visibleWidth()-this.edgeAutoScrollDistance?
b*(1-(this._viewPort.get_visibleWidth()-a)/this.edgeAutoScrollDistance):this.get_scrollX()>this.get_minScrollX()&&a<this.edgeAutoScrollDistance?b*-(1-a/this.edgeAutoScrollDistance):0,b!=0&&(a=this.get_scrollX()+b,a>this.get_maxScrollX()?a=this.get_maxScrollX():a<this.get_minScrollX()&&(a=this.get_minScrollX()),this.set_scrollX(a)));this.refreshDragDropIndexIndicator()},listView_dragMoveHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&(this._dragDropLocalX=
a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator())},listView_dragDropHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&this.get_dragDropIndicatorSkin().parent==this&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.removeChild(this.get_dragDropIndicatorSkin()));this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.listView_dragScroll_enterFrameHandler));this._droppedOnSelf=!1;
if(this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)){var b=w.__cast(a.dragData.get(this._dragFormat),Array),c=this._dataProvider.get_length();if(w.__implements(this.get_layout(),mj)){c=this.get_layout();var d=this.get_scrollX()+a.localX-this.leftViewPortOffset,f=this.get_scrollY()+a.localY-this.topViewPortOffset;c=c.getDragDropIndex(this._layoutItems,d,f,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight())}d=0;if(a.dragSource==this){for(a=0;a<b.length;)f=b[a],
++a,f=this._dataProvider.indexOf(f),f<c&&--d,this._dataProvider.removeAt(f);this._droppedOnSelf=!0}a=0;for(var g=b.length;a<g;){var h=a++;f=b[h];this._dataProvider.addAt(f,c+d+h)}}},listView_dataProvider_changeHandler:function(a){this.setInvalid(x.DATA)},listView_dataProvider_addItemHandler:function(a){this._virtualCache!=null&&this._virtualCache.splice(a.index,0,null);if(this._selectedIndex!=-1){for(var b=!1,c=0,d=this._selectedIndices.length;c<d;){var f=c++,g=this._selectedIndices[f];g>=a.index&&
(this._selectedIndices[f]=g+1,b=!0)}b&&(this._selectedIndex=this._selectedIndices[0],Y.dispatch(this,"change"))}},listView_dataProvider_removeItemHandler:function(a){this._virtualCache!=null&&V.remove(this._virtualCache,a.index);if(this.get_selectedIndex()!=-1){for(var b=!1,c=this._selectedIndices.length-1;c>=0;){var d=this._selectedIndices[c];d==a.index?(this._selectedIndices.splice(c,1),this._selectedItems.splice(c,1),b=!0):d>a.index&&(this._selectedIndices[c]=d-1,b=!0);--c}b&&(this._selectedIndices.length>
0?(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._dataProvider.get(this._selectedIndex)):(this._selectedIndex=-1,this._selectedItem=null),Y.dispatch(this,"change"))}},listView_dataProvider_replaceItemHandler:function(a){this._virtualCache!=null&&(this._virtualCache[a.index]=null);if(this._selectedIndex!=-1)for(var b=0,c=this._selectedIndices.length;b<c;){var d=b++,f=this._selectedIndices[d];if(f==a.index){this._selectedItems[d]=this._dataProvider.get(f);this._selectedItem=this._selectedItems[0];
Y.dispatch(this,"change");break}}},listView_dataProvider_removeAllHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0);this.set_selectedIndex(-1)},listView_dataProvider_resetHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.set_selectedIndex(-1)},listView_dataProvider_sortChangeHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());
this.refreshSelectedIndicesAfterFilterOrSort()},listView_dataProvider_filterChangeHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.refreshSelectedIndicesAfterFilterOrSort()},updateItemRendererForIndex:function(a){this._virtualCache!=null&&(this._virtualCache[a]=null);var b=this._dataProvider.get(a);var c=typeof b=="string"?this.stringDataToItemRenderer.h[b]:this.objectDataToItemRenderer.h[b.__id__];if(c==null)this.setInvalid(x.DATA);
else{var d=this.itemRendererToItemState.h[c.__id__];if(d.owner!=null){var f=this.itemStateToStorage(d);this.populateCurrentItemState(b,a,d,!0);this.resetItemRenderer(c,d,f);f.measurements!=null&&f.measurements.restore(c);d.owner=null;this.setInvalid(x.DATA)}}},listView_dataProvider_updateItemHandler:function(a){this.updateItemRendererForIndex(a.index)},listView_dataProvider_updateAllHandler:function(a){a=0;for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateItemRendererForIndex(c)}},
navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;if(w.__implements(this.get_layout(),Oj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;b=w.__cast(this.get_layout(),Oj).findNextKeyboardIndex(b,a,!1,this._layoutItems,null,this.listViewPort.get_visibleWidth(),this.listViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--b;
break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&(b=this._dataProvider.get_length()-1);var c=this._selectedIndex!=b;if(!c&&b!=-1)if(this.itemToItemRenderer(this._dataProvider.get(b))==null)c=!0;else if(w.__implements(this.get_layout(),ff)){var d=this.get_layout().getNearestScrollPositionForIndex(b,this._dataProvider.get_length(),
this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight());if(this.get_scrollX()!=d.x||this.get_scrollY()!=d.y)c=!0}c&&(a.preventDefault(),this.set_selectedIndex(b),this._selectedIndex!=-1&&this.scrollToIndex(this._selectedIndex),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof
Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):Ab.prototype.baseScrollContainer_keyDownHandler.call(this,a)},listView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==32||a.keyCode==13)&&this._selectedItem!=null){var b=typeof this._selectedItem=="string"?this.stringDataToItemRenderer.h[this._selectedItem]:this.objectDataToItemRenderer.h[this._selectedItem.__id__];a=null;b!=null&&(a=this.itemRendererToItemState.h[b.__id__]);b=!1;a==null&&(b=
!0,a=this.itemStatePool.get());this.populateCurrentItemState(this._selectedItem,this._selectedIndex,a,!0);Wh.dispatch(this,"itemTrigger",a);b&&this.itemStatePool.release(a)}},get_styleContext:function(){return Fc},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);
return this.get_layout()},__customItemRendererVariant:null,get_customItemRendererVariant:function(){return this.__customItemRendererVariant},set_customItemRendererVariant:function(a){if(!this.setStyle("customItemRendererVariant")||this.__customItemRendererVariant==a)return this.__customItemRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customItemRendererVariant);this.__customItemRendererVariant=a;this.setInvalid(x.STYLES);return this.__customItemRendererVariant},clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);
return this.get_customItemRendererVariant()},__dragDropIndicatorSkin:null,get_dragDropIndicatorSkin:function(){return this.__dragDropIndicatorSkin},set_dragDropIndicatorSkin:function(a){if(!this.setStyle("dragDropIndicatorSkin")||this.__dragDropIndicatorSkin==a)return this.__dragDropIndicatorSkin;this._previousClearStyle=m(this,this.clearStyle_dragDropIndicatorSkin);this.__dragDropIndicatorSkin=a;this.setInvalid(x.STYLES);return this.__dragDropIndicatorSkin},clearStyle_dragDropIndicatorSkin:function(){this.set_dragDropIndicatorSkin(null);
return this.get_dragDropIndicatorSkin()},__class__:Fc,__properties__:I(Ab.prototype.__properties__,{set_removeOnDragDropComplete:"set_removeOnDragDropComplete",get_removeOnDragDropComplete:"get_removeOnDragDropComplete",set_dropEnabled:"set_dropEnabled",get_dropEnabled:"get_dropEnabled",set_dragEnabled:"set_dragEnabled",get_dragEnabled:"get_dragEnabled",set_dragFormat:"set_dragFormat",get_dragFormat:"get_dragFormat",set_dragDropIndicatorSkin:"set_dragDropIndicatorSkin",get_dragDropIndicatorSkin:"get_dragDropIndicatorSkin",
set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_selectable:"set_selectable",get_selectable:"get_selectable",set_itemRendererRecyclerIDFunction:"set_itemRendererRecyclerIDFunction",get_itemRendererRecyclerIDFunction:"get_itemRendererRecyclerIDFunction",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_customItemRendererVariant:"set_customItemRendererVariant",
get_customItemRendererVariant:"get_customItemRendererVariant",set_layout:"set_layout",get_layout:"get_layout",set_selectedItems:"set_selectedItems",get_selectedItems:"get_selectedItems",set_selectedIndices:"set_selectedIndices",get_selectedIndices:"get_selectedIndices",set_allowMultipleSelection:"set_allowMultipleSelection",get_allowMultipleSelection:"get_allowMultipleSelection",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",
get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var ce=function(a,b){this._previousCustomButtonVariant=this._previousCustomListViewVariant=this.__popUpAdapter=this.__customButtonVariant=this.__customListViewVariant=null;this._itemRendererRecycler=Ne.withClass(Sc);this._selectedItem=null;this._selectedIndex=-1;this._ignoreListViewChange=!1;this.buttonMeasurements=
new Sb;this.initializePopUpListViewTheme();fa.call(this);this.set_dataProvider(a);this.addEventListener("focusIn",m(this,this.popUpListView_focusInHandler));this.addEventListener("removedFromStage",m(this,this.popUpListView_removedFromStageHandler));b!=null&&this.addEventListener("change",b)};t["feathers.controls.PopUpListView"]=ce;ce.__name__="feathers.controls.PopUpListView";ce.__interfaces__=[Th,qi,lj];ce.__super__=fa;ce.prototype=I(fa.prototype,{button:null,listView:null,buttonMeasurements:null,
get_stageFocusTarget:function(){return this.button},_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._dataProvider!=null&&this._dataProvider.removeEventListener("removeAll",m(this,this.popUpListView_dataProvider_removeAllHandler));var b=this._selectedIndex,c=this._selectedItem;this._dataProvider=a;this._dataProvider!=null&&this._dataProvider.addEventListener("removeAll",m(this,this.popUpListView_dataProvider_removeAllHandler));
this._dataProvider==null||this._dataProvider.get_length()==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=0,this._selectedItem=this._dataProvider.get(0));if(this._selectedIndex!=b||this._selectedItem!=c)this.setInvalid(x.SELECTION),Y.dispatch(this,"change");this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._dataProvider},_ignoreListViewChange:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==
null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex);this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||this._dataProvider==null)return this.set_selectedIndex(-1),
this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedItem},_prompt:null,get_prompt:function(){return this._prompt},set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},_itemRendererRecycler:null,
get_itemRendererRecycler:function(){return this._itemRendererRecycler},set_itemRendererRecycler:function(a){if(this._itemRendererRecycler==a)return this._itemRendererRecycler;this._itemRendererRecycler=a;this.setInvalid(x.DATA);return this._itemRendererRecycler},itemToText:function(a){return H.string(a)},itemToEnabled:function(a){return!0},_previousCustomButtonVariant:null,_previousCustomListViewVariant:null,_oldButtonFactory:null,_buttonFactory:null,get_buttonFactory:function(){return this._buttonFactory},
set_buttonFactory:function(a){if(this._buttonFactory==a)return this._buttonFactory;this._buttonFactory=a;this.setInvalid(ce.INVALIDATION_FLAG_BUTTON_FACTORY);return this._buttonFactory},_oldListViewFactory:null,_listViewFactory:null,get_listViewFactory:function(){return this._listViewFactory},set_listViewFactory:function(a){if(this._listViewFactory==a)return this._listViewFactory;this._listViewFactory=a;this.setInvalid(ce.INVALIDATION_FLAG_LIST_VIEW_FACTORY);return this._listViewFactory},get_open:function(){return this.listView!=
null?this.listView.parent!=null:!1},showFocus:function(a){fa.prototype.showFocus.call(this,a);this.button!=null&&this.button.showFocus(a)},openListView:function(){this.get_open()||this.stage==null||(this.validateNow(),this.get_popUpAdapter()!=null?(this.get_popUpAdapter().addEventListener("open",m(this,this.popUpListView_popUpAdapter_openHandler)),this.get_popUpAdapter().addEventListener("close",m(this,this.popUpListView_popUpAdapter_closeHandler)),this.get_popUpAdapter().open(this.listView,this.button)):
(Aa.addPopUp(this.listView,this.button),Y.dispatch(this,"open")),this.listView.validateNow(),this.button.addEventListener("focusOut",m(this,this.popUpListView_button_focusOutHandler)),this.listView.addEventListener("removedFromStage",m(this,this.popUpListView_listView_removedFromStageHandler)),this.listView.addEventListener("focusOut",m(this,this.popUpListView_listView_focusOutHandler)),this.listView.addEventListener("keyFocusChange",m(this,this.popUpListView_listView_keyFocusChangeHandler)),this.listView.addEventListener("mouseFocusChange",
m(this,this.popUpListView_listView_mouseFocusChangeHandler)),this.stage.addEventListener("mouseDown",m(this,this.popUpListView_stage_mouseDownHandler),!1,0,!0),this.stage.addEventListener("touchBegin",m(this,this.popUpListView_stage_touchBeginHandler),!1,0,!0),this.listView.scrollToIndex(this._selectedIndex),this.listView.get_focusManager()!=null?this.listView.get_focusManager().set_focus(this.listView):this.stage.set_focus(this.listView))},closeListView:function(){if(this.get_open()){if(this._focusManager==
null&&(this.stage!=null&&this.stage.set_focus(this),!this.get_open()))return;this.get_popUpAdapter()!=null?this.get_popUpAdapter().close():(this.listView.parent.removeChild(this.listView),Y.dispatch(this,"close"))}},dispose:function(){this.destroyButton();this.destroyListView();this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);fa.prototype.dispose.call(this)},initializePopUpListViewTheme:function(){Ow.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),
c=this.isInvalid(x.STATE);this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(ce.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomListViewVariant!=this.get_customListViewVariant()&&this.setInvalidationFlag(ce.INVALIDATION_FLAG_LIST_VIEW_FACTORY);var d=this.isInvalid(ce.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(ce.INVALIDATION_FLAG_LIST_VIEW_FACTORY);d&&this.createButton();f&&this.createListView();(a||f)&&this.refreshListViewData();(b||f||d)&&this.refreshSelection();
(c||f||d)&&this.refreshEnabled();this.measure();this.layoutChildren();this._previousCustomButtonVariant=this.get_customButtonVariant();this._previousCustomListViewVariant=this.get_customListViewVariant()},createButton:function(){this.destroyButton();var a=this._buttonFactory!=null?this._buttonFactory:ce.defaultButtonFactory;this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():ce.CHILD_VARIANT_BUTTON);
this.button.addEventListener("mouseDown",m(this,this.popUpListView_button_mouseDownHandler));this.button.addEventListener("touchBegin",m(this,this.popUpListView_button_touchBeginHandler));this.button.addEventListener("keyDown",m(this,this.popUpListView_button_keyDownHandler));this.button.initializeNow();this.buttonMeasurements.save(this.button);this.addChild(this.button)},destroyButton:function(){this.button!=null&&(this.button.removeEventListener("mouseDown",m(this,this.popUpListView_button_mouseDownHandler)),
this.button.removeEventListener("touchBegin",m(this,this.popUpListView_button_touchBeginHandler)),this.button.removeEventListener("keyDown",m(this,this.popUpListView_button_keyDownHandler)),this.removeChild(this.button),this._oldButtonFactory.destroy!=null&&this._oldButtonFactory.destroy(this.button),this.button=this._oldButtonFactory=null)},createListView:function(){this.destroyListView();var a=this._listViewFactory!=null?this._listViewFactory:ce.defaultListViewFactory;this._oldListViewFactory=a;
this.listView=a.create();this.listView.get_variant()==null&&this.listView.set_variant(this.get_customListViewVariant()!=null?this.get_customListViewVariant():ce.CHILD_VARIANT_LIST_VIEW);this.listView.set_focusOwner(this);this.listView.addEventListener("change",m(this,this.popUpListView_listView_changeHandler));this.listView.addEventListener("itemTrigger",m(this,this.popUpListView_listView_itemTriggerHandler));this.listView.addEventListener("keyUp",m(this,this.popUpListView_listView_keyUpHandler))},
destroyListView:function(){this.listView!=null&&(this.listView.removeEventListener("change",m(this,this.popUpListView_listView_changeHandler)),this.listView.removeEventListener("itemTrigger",m(this,this.popUpListView_listView_itemTriggerHandler)),this.listView.removeEventListener("keyUp",m(this,this.popUpListView_listView_keyUpHandler)),this._oldListViewFactory.destroy!=null&&this._oldListViewFactory.destroy(this.listView),this.listView=this._oldListViewFactory=null)},refreshListViewData:function(){var a=
this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_dataProvider(this._dataProvider);this._ignoreListViewChange=a;this.listView.set_itemRendererRecycler(this._itemRendererRecycler);this.listView.itemToEnabled=m(this,this.itemToEnabled);this.listView.itemToText=m(this,this.itemToText)},refreshSelection:function(){var a=this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_selectedIndex(this._selectedIndex);this._ignoreListViewChange=a;this._selectedItem!=
null?this.button.set_text(this.itemToText(this._selectedItem)):this._prompt!=null?this.button.set_text(this._prompt):this.button.set_text("")},refreshEnabled:function(){this.button.set_enabled(this._enabled);this.listView.set_enabled(this._enabled)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||
f||g))return!1;df.resetFluidlyWithParent(this.buttonMeasurements,this.button,this);this.button.validateNow();f=this.get_explicitWidth();a&&(f=this.button.get_width());a=this.get_explicitHeight();b&&(a=this.button.get_height());b=this.get_explicitMinWidth();c&&(b=this.button.get_minWidth());c=this.get_explicitMinHeight();d&&(c=this.button.get_minHeight());return this.saveMeasurements(f,a,b,c)},layoutChildren:function(){this.button.validateNow();this.button.get_width()!=this.actualWidth&&this.button.set_width(this.actualWidth);
this.button.get_height()!=this.actualHeight&&this.button.set_height(this.actualHeight);this.button.validateNow()},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&
(b=this._dataProvider.get_length()-1);a.preventDefault();this.set_selectedIndex(b)}},popUpListView_button_keyDownHandler:function(a){this._enabled&&(this.get_open()||a.keyLocation==4||this.navigateWithKeyboard(a),a.keyCode==32||a.keyCode==13)&&(this.get_open()?(a.preventDefault(),this.closeListView()):(a.preventDefault(),this.openListView()))},popUpListView_button_mouseDownHandler:function(a){this._enabled&&(this.get_open()?this.closeListView():this.openListView())},popUpListView_button_touchBeginHandler:function(a){this._enabled&&
(a.isPrimaryTouchPoint||(this.get_open()?this.closeListView():this.openListView()))},popUpListView_listView_itemTriggerHandler:function(a){this.dispatchEvent(a);this.get_popUpAdapter()!=null&&this.get_popUpAdapter().get_persistent()||this.closeListView()},popUpListView_listView_changeHandler:function(a){this._ignoreListViewChange||(this._selectedIndex=this.listView.get_selectedIndex(),this._selectedItem=this.listView.get_selectedItem(),this.setInvalid(x.SELECTION),Y.dispatch(this,"change"))},popUpListView_listView_removedFromStageHandler:function(a){this.button.removeEventListener("focusOut",
m(this,this.popUpListView_button_focusOutHandler));this.listView.removeEventListener("removedFromStage",m(this,this.popUpListView_listView_removedFromStageHandler));this.listView.removeEventListener("focusOut",m(this,this.popUpListView_listView_focusOutHandler));this.listView.removeEventListener("keyFocusChange",m(this,this.popUpListView_listView_keyFocusChangeHandler));this.listView.removeEventListener("mouseFocusChange",m(this,this.popUpListView_listView_mouseFocusChangeHandler));this.stage.removeEventListener("mouseDown",
m(this,this.popUpListView_stage_mouseDownHandler));this.stage.removeEventListener("touchBegin",m(this,this.popUpListView_stage_touchBeginHandler))},popUpListView_listView_mouseFocusChangeHandler:function(a){this.listView.get_focusManager()!=null||a.isDefaultPrevented()||Ke.__neq(a.target,this.listView)||a.relatedObject!=null&&!this.listView.contains(a.relatedObject)||a.preventDefault()},popUpListView_listView_keyFocusChangeHandler:function(a){this.listView.get_focusManager()!=null||a.isDefaultPrevented()||
Ke.__neq(a.target,this.listView)||(a.preventDefault(),this.stage!=null&&this.stage.set_focus(this.button))},popUpListView_listView_focusOutHandler:function(a){(a.relatedObject==null||a.relatedObject!=this.listView&&!this.listView.contains(a.relatedObject))&&this.closeListView()},popUpListView_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this.button&&(a.stopImmediatePropagation(),this.stage.set_focus(this.button))},popUpListView_button_focusOutHandler:function(a){(a.relatedObject==
null||a.relatedObject!=this.listView&&!this.listView.contains(a.relatedObject))&&this.closeListView()},popUpListView_removedFromStageHandler:function(a){this.closeListView()},popUpListView_listView_keyUpHandler:function(a){if(this._enabled)switch(a.keyCode){case 27:if(a.isDefaultPrevented())break;if(!this.get_open())break;a.preventDefault();this.closeListView();break;case 1073742094:!a.isDefaultPrevented()&&this.get_open()&&(a.preventDefault(),this.closeListView())}},popUpListView_stage_mouseDownHandler:function(a){this.button.hitTestPoint(a.stageX,
a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},popUpListView_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.button.hitTestPoint(a.stageX,a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},popUpListView_popUpAdapter_openHandler:function(a){Y.dispatch(this,"open")},popUpListView_popUpAdapter_closeHandler:function(a){Y.dispatch(this,"close")},popUpListView_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1)},
__popUpAdapter:null,get_popUpAdapter:function(){return this.__popUpAdapter},set_popUpAdapter:function(a){if(!this.setStyle("popUpAdapter")||this.__popUpAdapter==a)return this.__popUpAdapter;this._previousClearStyle=m(this,this.clearStyle_popUpAdapter);this.__popUpAdapter=a;this.setInvalid(x.STYLES);return this.__popUpAdapter},clearStyle_popUpAdapter:function(){this.set_popUpAdapter(null);return this.get_popUpAdapter()},__customButtonVariant:null,get_customButtonVariant:function(){return this.__customButtonVariant},
set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);return this.get_customButtonVariant()},__customListViewVariant:null,get_customListViewVariant:function(){return this.__customListViewVariant},
set_customListViewVariant:function(a){if(!this.setStyle("customListViewVariant")||this.__customListViewVariant==a)return this.__customListViewVariant;this._previousClearStyle=m(this,this.clearStyle_customListViewVariant);this.__customListViewVariant=a;this.setInvalid(x.STYLES);return this.__customListViewVariant},clearStyle_customListViewVariant:function(){this.set_customListViewVariant(null);return this.get_customListViewVariant()},get_styleContext:function(){return ce},__class__:ce,__properties__:I(fa.prototype.__properties__,
{get_open:"get_open",set_listViewFactory:"set_listViewFactory",get_listViewFactory:"get_listViewFactory",set_buttonFactory:"set_buttonFactory",get_buttonFactory:"get_buttonFactory",set_customListViewVariant:"set_customListViewVariant",get_customListViewVariant:"get_customListViewVariant",set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",set_popUpAdapter:"set_popUpAdapter",get_popUpAdapter:"get_popUpAdapter",set_itemRendererRecycler:"set_itemRendererRecycler",
get_itemRendererRecycler:"get_itemRendererRecycler",set_prompt:"set_prompt",get_prompt:"get_prompt",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",get_stageFocusTarget:"get_stageFocusTarget"})});var Vs=function(){this.autoResize=!0;ce.call(this)};t["com.tilbuci.ui.component.IDPopUpListView"]=
Vs;Vs.__name__="com.tilbuci.ui.component.IDPopUpListView";Vs.__super__=ce;Vs.prototype=I(ce.prototype,{autoResize:null,__class__:Vs});var Wd=function(a){this.__topArrowGap=this.__rightArrowGap=this.__bottomArrowGap=this.__leftArrowGap=0;this.__backgroundSkin=this.__topArrowSkin=this.__rightArrowSkin=this.__bottomArrowSkin=this.__leftArrowSkin=null;this.__arrowPosition=ra.TOP;this.__verticalAlign=hc.MIDDLE;this.__horizontalAlign=Wb.CENTER;this.__gap=this.__marginTop=this.__marginRight=this.__marginBottom=
this.__marginLeft=this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.closeOnPointerOutside=!0;this._ignoreContentResize=!1;this._arrowOffset=0;this.initializeCalloutTheme();fa.call(this);this.set_content(a);this.addEventListener("addedToStage",m(this,this.callout_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.callout_removedFromStageHandler))};t["feathers.controls.Callout"]=Wd;Wd.__name__="feathers.controls.Callout";Wd.show=function(a,
b,c,d,f){d==null&&(d=!0);var g=new Wd;g.set_content(a);return Wd.showCallout(g,b,c,d,f)};Wd.showCallout=function(a,b,c,d,f){d==null&&(d=!0);a.supportedPositions=c;a.set_origin(b);c=f;c==null&&(c=function(){var g=new Da;g.get_graphics().beginFill(16711935,0);g.get_graphics().drawRect(0,0,1,1);g.get_graphics().endFill();return g});Aa.addPopUp(a,b,d,!1,c);return a};Wd.positionBelowOrigin=function(a,b){a.measureWithArrowPosition(ra.TOP);var c=Aa.forStage(a.stage).get_root(),d=new Ea;d=c.globalToLocal(d);
var f=new Ea(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.x;switch(a.get_horizontalAlign()._hx_index){case 1:c+=(b.width-a.get_width())/2;break;case 2:c+=b.width-a.get_width()}d=d.x+a.get_marginLeft();f=f.x-a.get_width()-a.get_marginRight();var g=c;g<d?g=d:g>f&&(g=f);a.set_x(g);a.set_y(b.y+b.height+a.get_gap());a._arrowOffset=c-g;a.set_arrowPosition(ra.TOP)};Wd.positionAboveOrigin=function(a,b){a.measureWithArrowPosition(ra.BOTTOM);var c=Aa.forStage(a.stage).get_root(),d=new Ea;
d=c.globalToLocal(d);var f=new Ea(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.x;switch(a.get_horizontalAlign()._hx_index){case 1:c+=(b.width-a.get_width())/2;break;case 2:c+=b.width-a.get_width()}d=d.x+a.get_marginLeft();f=f.x-a.get_width()-a.get_marginRight();var g=c;g<d?g=d:g>f&&(g=f);a.set_x(g);a.set_y(b.y-a.get_height()-a.get_gap());a._arrowOffset=c-g;a.set_arrowPosition(ra.BOTTOM)};Wd.positionLeftOfOrigin=function(a,b){a.measureWithArrowPosition(ra.RIGHT);var c=Aa.forStage(a.stage).get_root(),
d=new Ea;d=c.globalToLocal(d);var f=new Ea(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.y;switch(a.get_verticalAlign()._hx_index){case 1:c+=(b.height-a.get_height())/2;break;case 2:c+=b.height-a.get_height()}d=d.y+a.get_marginTop();f=f.y-a.get_height()-a.get_marginBottom();var g=c;g<d?g=d:g>f&&(g=f);a.set_x(b.x-a.get_width()-a.get_gap());a.set_y(g);a._arrowOffset=c-g;a.set_arrowPosition(ra.RIGHT)};Wd.positionRightOfOrigin=function(a,b){a.measureWithArrowPosition(ra.RIGHT);var c=
Aa.forStage(a.stage).get_root(),d=new Ea;d=c.globalToLocal(d);var f=new Ea(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.y;switch(a.get_verticalAlign()._hx_index){case 1:c+=(b.height-a.get_height())/2;break;case 2:c+=b.height-a.get_height()}d=d.y+a.get_marginTop();f=f.y-a.get_height()-a.get_marginBottom();var g=c;g<d?g=d:g>f&&(g=f);a.set_x(b.x+b.width+a.get_gap());a.set_y(g);a._arrowOffset=c-g;a.set_arrowPosition(ra.LEFT)};Wd.__super__=fa;Wd.prototype=I(fa.prototype,{_contentMeasurements:null,
_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;this._content!=null&&(this._content.removeEventListener("resize",m(this,this.callout_content_resizeHandler)),this._contentMeasurements.restore(this._content),this._content.parent==this&&this.removeChild(this._content));this._content=a;this._content!=null&&(this.addChild(this._content),w.__implements(this._content,Fa)&&this._content.initializeNow(),this._contentMeasurements==
null?this._contentMeasurements=new Sb(this._content):this._contentMeasurements.save(this._content),this._content.addEventListener("resize",m(this,this.callout_content_resizeHandler),!1,0,!0));this.setInvalid(x.DATA);this.setInvalid(x.SIZE);return this._content},_origin:null,get_origin:function(){return this._origin},set_origin:function(a){if(this._origin==a)return this._origin;if(a!=null&&a.stage==null)throw new Cb("origin must be added to the stage.");this._origin!=null&&(this._origin.removeEventListener("removedFromStage",
m(this,this.callout_origin_removedFromStageHandler)),this.removeEventListener("enterFrame",m(this,this.callout_enterFrameHandler)));this._origin=a;this._origin!=null&&(this._origin.addEventListener("removedFromStage",m(this,this.callout_origin_removedFromStageHandler)),this.stage!=null&&this.addEventListener("enterFrame",m(this,this.callout_enterFrameHandler)));this._lastPopUpOriginBounds=null;this.setInvalid(Wd.INVALIDATION_FLAG_ORIGIN);return this._origin},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,
_currentArrowSkin:null,_arrowOffset:null,supportedPositions:null,_lastPopUpOriginBounds:null,_ignoreContentResize:null,closeOnPointerOutside:null,close:function(){this.parent!=null&&this.parent.removeChild(this)},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},dispose:function(){this._content!=null&&this.set_content(null);this._origin!=null&&this.set_origin(null);fa.prototype.dispose.call(this)},initializeCalloutTheme:function(){ww.initialize()},
update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(Wd.INVALIDATION_FLAG_ORIGIN),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);c&&(this._lastPopUpOriginBounds=null,b=!0);(f||d)&&this.refreshBackgroundSkin();(f||d)&&this.refreshArrowSkin();b&&this.positionRelativeToOrigin();(d||a)&&this.refreshEnabled();this.measure();this.layoutChildren()},measure:function(){return this.measureWithArrowPosition(this.get_arrowPosition())},measureWithArrowPosition:function(a){var b=
this.get_explicitWidth()==null,c=this.get_explicitHeight()==null,d=this.get_explicitMinWidth()==null,f=this.get_explicitMinHeight()==null,g=this.get_explicitMaxWidth()==null,h=this.get_explicitMaxHeight()==null;if(!(b||c||d||f||g||h))return!1;var n=h=0;this.stage!=null&&(g=new Ea,g=this.globalToLocal(g),n=new Ea(this.stage.stageWidth,this.stage.stageHeight),n=this.globalToLocal(n),h=n.x-g.x,n=n.y-g.y);g=this.get_explicitMaxWidth();if(this.stage!=null){if(h=h-this.get_marginLeft()-this.get_marginRight(),
g==null||g<h)g=h}else g=1/0;h=this.get_explicitMaxHeight();if(this.stage!=null){if(n=n-this.get_marginTop()-this.get_marginBottom(),h==null||h<n)h=n}else h=1/0;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParentValues(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this.get_explicitWidth(),this.get_explicitHeight(),this.get_explicitMinWidth(),this.get_explicitMinHeight(),g,h);n=null;w.__implements(this._currentBackgroundSkin,rb)&&(n=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,
da)&&this._currentBackgroundSkin.validateNow();w.__implements(this.get_topArrowSkin(),da)&&this.get_topArrowSkin().validateNow();w.__implements(this.get_rightArrowSkin(),da)&&this.get_rightArrowSkin().validateNow();w.__implements(this.get_bottomArrowSkin(),da)&&this.get_bottomArrowSkin().validateNow();w.__implements(this.get_leftArrowSkin(),da)&&this.get_leftArrowSkin().validateNow();var l=0,q=0,u=0,v=0;if(this._currentArrowSkin!=null)switch(a._hx_index){case 1:l=this.get_rightArrowSkin().get_width()+
this.get_rightArrowGap();q=this.get_rightArrowSkin().get_height();break;case 2:u=this.get_bottomArrowSkin().get_width();v=this.get_bottomArrowSkin().get_height()+this.get_bottomArrowGap();break;case 3:l=this.get_leftArrowSkin().get_width()+this.get_leftArrowGap();q=this.get_leftArrowSkin().get_height();break;default:u=this.get_topArrowSkin().get_width(),v=this.get_topArrowSkin().get_height()+this.get_topArrowGap()}a=null;w.__implements(this._content,rb)&&(a=this._content);if(this._content!=null){var z=
this._ignoreContentResize;this._ignoreContentResize=!0;df.resetFluidlyWithParentValues(this._contentMeasurements,this._content,this.get_explicitWidth()!=null?this.get_explicitWidth()-l-this.get_paddingLeft()-this.get_paddingRight():null,this.get_explicitHeight()!=null?this.get_explicitHeight()-v-this.get_paddingTop()-this.get_paddingBottom():null,this.get_explicitMinWidth()!=null?this.get_explicitMinWidth()-l-this.get_paddingLeft()-this.get_paddingRight():null,this.get_explicitMinHeight()!=null?this.get_explicitMinHeight()-
v-this.get_paddingLeft()-this.get_paddingRight():null,g!=null?g-l-this.get_paddingLeft()-this.get_paddingRight():null,h!=null?h-v-this.get_paddingLeft()-this.get_paddingRight():null);w.__implements(this._content,da)&&this._content.validateNow();this._ignoreContentResize=z}z=this.get_explicitWidth();b&&(b=0,this._content!=null&&(b=this._content.get_width()),b<u&&(b=u),z=b+this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(b=this._currentBackgroundSkin.get_width(),z<
b&&(z=b)),z+=l);b=this.get_explicitHeight();c&&(c=0,this._content!=null&&(c=this._content.get_height()),c<q&&(c=q),b=c+this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(c=this._currentBackgroundSkin.get_height(),b<c&&(b=c)),b+=v);c=this.get_explicitMinWidth();d&&(d=0,a!=null?d=a.get_minWidth():this._contentMeasurements!=null&&this._contentMeasurements.minWidth!=null&&(d=this._contentMeasurements.minWidth),d<u&&(d=u),c=d+this.get_paddingLeft()+this.get_paddingRight(),
d=0,n!=null?d=n.get_minWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(d=this._backgroundSkinMeasurements.minWidth),c<d&&(c=d),c+=l,c>g&&(c=g));d=this.get_explicitMinHeight();f&&(f=0,a!=null?f=a.get_minWidth():this._contentMeasurements!=null&&this._contentMeasurements.minHeight!=null&&(f=this._contentMeasurements.minHeight),f<q&&(f=q),d=f+this.get_paddingTop()+this.get_paddingBottom(),f=0,n!=null?f=n.get_minHeight():this._backgroundSkinMeasurements!=
null&&this._backgroundSkinMeasurements.minHeight!=null&&(f=this._backgroundSkinMeasurements.minHeight),d<f&&(d=f),d+=v,d>h&&(d=h));return this.saveMeasurements(z,b,c,d,g,h)},getCurrentBackgroundSkin:function(){return this.get_backgroundSkin()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},
addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(this),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshArrowSkin:function(){var a=
this._currentArrowSkin;this._currentArrowSkin=this.getCurrentArrowSkin();a!=this._currentArrowSkin&&(this.removeCurrentArrowSkin(a),w.__implements(this._currentArrowSkin,qb)&&this._currentArrowSkin.set_uiContext(this),this.addChild(this._currentArrowSkin))},getCurrentArrowSkin:function(){switch(this.get_arrowPosition()._hx_index){case 1:return this.get_rightArrowSkin();case 2:return this.get_bottomArrowSkin();case 3:return this.get_leftArrowSkin();default:return this.get_topArrowSkin()}},removeCurrentArrowSkin:function(a){a!=
null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshEnabled:function(){w.__implements(this._content,Fa)&&this._content.set_enabled(this._enabled)},layoutChildren:function(){w.__implements(this._currentArrowSkin,da)&&this._currentArrowSkin.validateNow();var a=0,b=0,c=0,d=0;if(this._currentArrowSkin!=null)switch(this.get_arrowPosition()._hx_index){case 1:c=this._currentArrowSkin.get_width()+this.get_rightArrowGap();break;case 2:d=this._currentArrowSkin.get_height()+
this.get_bottomArrowGap();break;case 3:a=this._currentArrowSkin.get_width()+this.get_leftArrowGap();break;default:b=this._currentArrowSkin.get_height()+this.get_topArrowGap()}c=this.actualWidth-a-c;d=this.actualHeight-b-d;this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(a),this._currentBackgroundSkin.set_y(b),this._currentBackgroundSkin.set_width(c),this._currentBackgroundSkin.set_height(d));if(this._currentArrowSkin!=null){var f=c-this.get_paddingLeft()-this.get_paddingRight(),
g=d-this.get_paddingTop()-this.get_paddingBottom();switch(this.get_arrowPosition()._hx_index){case 1:this.get_rightArrowSkin().set_x(a+c+this.get_rightArrowGap());f=this._arrowOffset+b+this.get_paddingTop();this.get_verticalAlign()==hc.MIDDLE?f+=Math.round((g-this.get_rightArrowSkin().get_height())/2):this.get_verticalAlign()==hc.BOTTOM&&(f+=g-this.get_rightArrowSkin().get_height());var h=b+this.get_paddingTop();h>f?f=h:(g=b+this.get_paddingTop()+g-this.get_rightArrowSkin().get_height(),g<f&&(f=g));
this.get_rightArrowSkin().set_y(f);break;case 2:g=this._arrowOffset+a+this.get_paddingLeft();this.get_horizontalAlign()==Wb.CENTER?g+=Math.round((f-this.get_bottomArrowSkin().get_width())/2):this.get_horizontalAlign()==Wb.RIGHT&&(g+=f-this.get_bottomArrowSkin().get_width());h=a+this.get_paddingLeft();h>g?g=h:(f=a+this.get_paddingLeft()+f-this.get_bottomArrowSkin().get_width(),f<g&&(g=f));this.get_bottomArrowSkin().set_x(g);this.get_bottomArrowSkin().set_y(b+d+this.get_bottomArrowGap());break;case 3:this.get_leftArrowSkin().set_x(a-
this.get_leftArrowSkin().get_width()-this.get_leftArrowGap());f=this._arrowOffset+b+this.get_paddingTop();this.get_verticalAlign()==hc.MIDDLE?f+=Math.round((g-this.get_leftArrowSkin().get_height())/2):this.get_verticalAlign()==hc.BOTTOM&&(f+=g-this.get_leftArrowSkin().get_height());h=b+this.get_paddingTop();h>f?f=h:(g=b+this.get_paddingTop()+g-this.get_leftArrowSkin().get_height(),g<f&&(f=g));this.get_leftArrowSkin().set_y(f);break;default:g=this._arrowOffset+a+this.get_paddingLeft(),this.get_horizontalAlign()==
Wb.CENTER?g+=Math.round((f-this.get_topArrowSkin().get_width())/2):this.get_horizontalAlign()==Wb.RIGHT&&(g+=f-this.get_topArrowSkin().get_width()),h=a+this.get_paddingLeft(),h>g?g=h:(f=a+this.get_paddingLeft()+f-this.get_topArrowSkin().get_width(),f<g&&(g=f)),this.get_topArrowSkin().set_x(g),this.get_topArrowSkin().set_y(b-this.get_topArrowSkin().get_height()-this.get_topArrowGap())}}this._content!=null&&(this._content.set_x(a+this.get_paddingLeft()),this._content.set_y(b+this.get_paddingTop()),
a=this._ignoreContentResize,this._ignoreContentResize=!0,this._content.set_width(c-this.get_paddingLeft()-this.get_paddingRight()),this._content.set_height(d-this.get_paddingTop()-this.get_paddingBottom()),w.__implements(this._content,da)&&this._content.validateNow(),this._ignoreContentResize=a)},checkForOriginMoved:function(){if(this._origin==null)return this._lastPopUpOriginBounds==null?this._lastPopUpOriginBounds=new Ia:this._lastPopUpOriginBounds.setEmpty(),!1;var a=Aa.forStage(this.stage).get_root(),
b=new Ea(this.get_origin().get_x(),this.get_origin().get_y());b=this.get_origin().parent.localToGlobal(b);b=a.globalToLocal(b);var c=new Ea(this.get_origin().get_x()+this.get_origin().get_width(),this.get_origin().get_y()+this.get_origin().get_height());c=this.get_origin().parent.localToGlobal(c);c=a.globalToLocal(c);a=new Ia(b.x,b.y,c.x-b.x,c.y-b.y);if(this._lastPopUpOriginBounds!=null&&this._lastPopUpOriginBounds.equals(a))return!1;this._lastPopUpOriginBounds=a;return!0},positionRelativeToOrigin:function(){this.checkForOriginMoved();
var a=Aa.forStage(this.stage).get_root(),b=new Ea(this.stage.stageWidth,this.stage.stageHeight);b=a.globalToLocal(b);var c=a=-Infinity,d=-Infinity,f=-Infinity,g=this.supportedPositions;g==null&&(g=[ra.BOTTOM,ra.TOP,ra.RIGHT,ra.LEFT]);for(var h=0;h<g.length;){var n=g[h];++h;switch(n._hx_index){case 0:this.measureWithArrowPosition(ra.BOTTOM);a=this._lastPopUpOriginBounds.y-this.actualHeight;if(a>=this.get_marginTop()){Wd.positionAboveOrigin(this,this._lastPopUpOriginBounds);return}a<0&&(a=0);break;
case 1:this.measureWithArrowPosition(ra.LEFT);d=b.x-this.actualWidth-(this._lastPopUpOriginBounds.x+this._lastPopUpOriginBounds.width);if(d>=this.get_marginRight()){Wd.positionRightOfOrigin(this,this._lastPopUpOriginBounds);return}d<0&&(d=0);break;case 3:this.measureWithArrowPosition(ra.RIGHT);f=this._lastPopUpOriginBounds.x-this.actualWidth;if(f>=this.get_marginLeft()){Wd.positionLeftOfOrigin(this,this._lastPopUpOriginBounds);return}f<0&&(f=0);break;default:this.measureWithArrowPosition(ra.TOP);
c=b.y-this.actualHeight-(this._lastPopUpOriginBounds.y+this._lastPopUpOriginBounds.height);if(c>=this.get_marginBottom()){Wd.positionBelowOrigin(this,this._lastPopUpOriginBounds);return}c<0&&(c=0)}}c!=-Infinity&&c>=a&&c>=d&&c>=f?Wd.positionBelowOrigin(this,this._lastPopUpOriginBounds):a!=-Infinity&&a>=d&&a>=f?Wd.positionAboveOrigin(this,this._lastPopUpOriginBounds):d!=-Infinity&&d>=f?Wd.positionRightOfOrigin(this,this._lastPopUpOriginBounds):f!=-Infinity?Wd.positionLeftOfOrigin(this,this._lastPopUpOriginBounds):
Wd.positionBelowOrigin(this,this._lastPopUpOriginBounds)},callout_addedToStageHandler:function(a){this.stage.addEventListener("mouseDown",m(this,this.callout_stage_mouseDownHandler),!1,0,!0);this.stage.addEventListener("touchBegin",m(this,this.callout_stage_touchBeginHandler),!1,0,!0);this._origin!=null&&this.addEventListener("enterFrame",m(this,this.callout_enterFrameHandler))},callout_removedFromStageHandler:function(a){this.stage.removeEventListener("mouseDown",m(this,this.callout_stage_mouseDownHandler));
this.stage.removeEventListener("touchBegin",m(this,this.callout_stage_touchBeginHandler));this.removeEventListener("enterFrame",m(this,this.callout_enterFrameHandler));Y.dispatch(this,"close")},callout_enterFrameHandler:function(a){this.checkForOriginMoved()&&this.setInvalid(Wd.INVALIDATION_FLAG_ORIGIN)},callout_origin_removedFromStageHandler:function(a){this.close()},callout_content_resizeHandler:function(a){this._ignoreContentResize||(this._contentMeasurements.save(this.get_content()),this.setInvalid(x.SIZE))},
callout_stage_mouseDownHandler:function(a){this.closeOnPointerOutside&&(this.hitTestPoint(a.stageX,a.stageY)||this.close())},callout_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.closeOnPointerOutside&&(this.hitTestPoint(a.stageX,a.stageY)||this.close())},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},
clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__marginTop:null,get_marginTop:function(){return this.__marginTop},set_marginTop:function(a){if(!this.setStyle("marginTop")||this.__marginTop==a)return this.__marginTop;this._previousClearStyle=m(this,this.clearStyle_marginTop);this.__marginTop=a;this.setInvalid(x.STYLES);return this.__marginTop},clearStyle_marginTop:function(){this.set_marginTop(0);return this.get_marginTop()},__marginRight:null,get_marginRight:function(){return this.__marginRight},
set_marginRight:function(a){if(!this.setStyle("marginRight")||this.__marginRight==a)return this.__marginRight;this._previousClearStyle=m(this,this.clearStyle_marginRight);this.__marginRight=a;this.setInvalid(x.STYLES);return this.__marginRight},clearStyle_marginRight:function(){this.set_marginRight(0);return this.get_marginRight()},__marginBottom:null,get_marginBottom:function(){return this.__marginBottom},set_marginBottom:function(a){if(!this.setStyle("marginBottom")||this.__marginBottom==a)return this.__marginBottom;
this._previousClearStyle=m(this,this.clearStyle_marginBottom);this.__marginBottom=a;this.setInvalid(x.STYLES);return this.__marginBottom},clearStyle_marginBottom:function(){this.set_marginBottom(0);return this.get_marginBottom()},__marginLeft:null,get_marginLeft:function(){return this.__marginLeft},set_marginLeft:function(a){if(!this.setStyle("marginLeft")||this.__marginLeft==a)return this.__marginLeft;this._previousClearStyle=m(this,this.clearStyle_marginLeft);this.__marginLeft=a;this.setInvalid(x.STYLES);
return this.__marginLeft},clearStyle_marginLeft:function(){this.set_marginLeft(0);return this.get_marginLeft()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},
__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||
this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,
this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==a)return this.__horizontalAlign;this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);this.__horizontalAlign=a;this.setInvalid(x.STYLES);
return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Wb.CENTER);return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(hc.MIDDLE);
return this.get_verticalAlign()},__arrowPosition:null,get_arrowPosition:function(){return this.__arrowPosition},set_arrowPosition:function(a){if(!this.setStyle("arrowPosition")||this.__arrowPosition==a)return this.__arrowPosition;this._previousClearStyle=m(this,this.clearStyle_arrowPosition);this.__arrowPosition=a;this.setInvalid(x.STYLES);return this.__arrowPosition},clearStyle_arrowPosition:function(){this.set_arrowPosition(ra.TOP);return this.get_arrowPosition()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},
set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__topArrowSkin:null,get_topArrowSkin:function(){return this.__topArrowSkin},set_topArrowSkin:function(a){if(!this.setStyle("topArrowSkin")||
this.__topArrowSkin==a)return this.__topArrowSkin;this._previousClearStyle=m(this,this.clearStyle_topArrowSkin);this.__topArrowSkin=a;this.setInvalid(x.STYLES);return this.__topArrowSkin},clearStyle_topArrowSkin:function(){this.set_topArrowSkin(null);return this.get_topArrowSkin()},__rightArrowSkin:null,get_rightArrowSkin:function(){return this.__rightArrowSkin},set_rightArrowSkin:function(a){if(!this.setStyle("rightArrowSkin")||this.__rightArrowSkin==a)return this.__rightArrowSkin;this._previousClearStyle=
m(this,this.clearStyle_rightArrowSkin);this.__rightArrowSkin=a;this.setInvalid(x.STYLES);return this.__rightArrowSkin},clearStyle_rightArrowSkin:function(){this.set_rightArrowSkin(null);return this.get_rightArrowSkin()},__bottomArrowSkin:null,get_bottomArrowSkin:function(){return this.__bottomArrowSkin},set_bottomArrowSkin:function(a){if(!this.setStyle("bottomArrowSkin")||this.__bottomArrowSkin==a)return this.__bottomArrowSkin;this._previousClearStyle=m(this,this.clearStyle_bottomArrowSkin);this.__bottomArrowSkin=
a;this.setInvalid(x.STYLES);return this.__bottomArrowSkin},clearStyle_bottomArrowSkin:function(){this.set_bottomArrowSkin(null);return this.get_bottomArrowSkin()},__leftArrowSkin:null,get_leftArrowSkin:function(){return this.__leftArrowSkin},set_leftArrowSkin:function(a){if(!this.setStyle("leftArrowSkin")||this.__leftArrowSkin==a)return this.__leftArrowSkin;this._previousClearStyle=m(this,this.clearStyle_leftArrowSkin);this.__leftArrowSkin=a;this.setInvalid(x.STYLES);return this.__leftArrowSkin},
clearStyle_leftArrowSkin:function(){this.set_leftArrowSkin(null);return this.get_leftArrowSkin()},__topArrowGap:null,get_topArrowGap:function(){return this.__topArrowGap},set_topArrowGap:function(a){if(!this.setStyle("topArrowGap")||this.__topArrowGap==a)return this.__topArrowGap;this._previousClearStyle=m(this,this.clearStyle_topArrowGap);this.__topArrowGap=a;this.setInvalid(x.STYLES);return this.__topArrowGap},clearStyle_topArrowGap:function(){this.set_topArrowGap(0);return this.get_topArrowGap()},
__rightArrowGap:null,get_rightArrowGap:function(){return this.__rightArrowGap},set_rightArrowGap:function(a){if(!this.setStyle("rightArrowGap")||this.__rightArrowGap==a)return this.__rightArrowGap;this._previousClearStyle=m(this,this.clearStyle_rightArrowGap);this.__rightArrowGap=a;this.setInvalid(x.STYLES);return this.__rightArrowGap},clearStyle_rightArrowGap:function(){this.set_rightArrowGap(0);return this.get_rightArrowGap()},__bottomArrowGap:null,get_bottomArrowGap:function(){return this.__bottomArrowGap},
set_bottomArrowGap:function(a){if(!this.setStyle("bottomArrowGap")||this.__bottomArrowGap==a)return this.__bottomArrowGap;this._previousClearStyle=m(this,this.clearStyle_bottomArrowGap);this.__bottomArrowGap=a;this.setInvalid(x.STYLES);return this.__bottomArrowGap},clearStyle_bottomArrowGap:function(){this.set_bottomArrowGap(0);return this.get_bottomArrowGap()},__leftArrowGap:null,get_leftArrowGap:function(){return this.__leftArrowGap},set_leftArrowGap:function(a){if(!this.setStyle("leftArrowGap")||
this.__leftArrowGap==a)return this.__leftArrowGap;this._previousClearStyle=m(this,this.clearStyle_leftArrowGap);this.__leftArrowGap=a;this.setInvalid(x.STYLES);return this.__leftArrowGap},clearStyle_leftArrowGap:function(){this.set_leftArrowGap(0);return this.get_leftArrowGap()},get_styleContext:function(){return Wd},__class__:Wd,__properties__:I(fa.prototype.__properties__,{set_leftArrowGap:"set_leftArrowGap",get_leftArrowGap:"get_leftArrowGap",set_bottomArrowGap:"set_bottomArrowGap",get_bottomArrowGap:"get_bottomArrowGap",
set_rightArrowGap:"set_rightArrowGap",get_rightArrowGap:"get_rightArrowGap",set_topArrowGap:"set_topArrowGap",get_topArrowGap:"get_topArrowGap",set_leftArrowSkin:"set_leftArrowSkin",get_leftArrowSkin:"get_leftArrowSkin",set_bottomArrowSkin:"set_bottomArrowSkin",get_bottomArrowSkin:"get_bottomArrowSkin",set_rightArrowSkin:"set_rightArrowSkin",get_rightArrowSkin:"get_rightArrowSkin",set_topArrowSkin:"set_topArrowSkin",get_topArrowSkin:"get_topArrowSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",
set_arrowPosition:"set_arrowPosition",get_arrowPosition:"get_arrowPosition",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",
set_marginLeft:"set_marginLeft",get_marginLeft:"get_marginLeft",set_marginBottom:"set_marginBottom",get_marginBottom:"get_marginBottom",set_marginRight:"set_marginRight",get_marginRight:"get_marginRight",set_marginTop:"set_marginTop",get_marginTop:"get_marginTop",set_gap:"set_gap",get_gap:"get_gap",set_origin:"set_origin",get_origin:"get_origin",set_content:"set_content",get_content:"get_content"})});var Ye=function(a){a==null&&(a="");this.__wordWrap=!1;this.__disabledTextFormat=null;this.__embedFonts=
!1;this._htmlText=this.__textFormat=this.__styleSheet=null;this.initializeTextCalloutTheme();Wd.call(this);this.set_text(a)};t["feathers.controls.TextCallout"]=Ye;Ye.__name__="feathers.controls.TextCallout";Ye.__interfaces__=[El,re];Ye.show=function(a,b,c,d){d==null&&(d=!0);a=new Ye(a);return w.__cast(Wd.showCallout(a,b,c,d),Ye)};Ye.__super__=Wd;Ye.prototype=I(Wd.prototype,{label:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=
a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){return this.label==null?0:this.label.get_y()+this.label.get_baseline()},initializeTextCalloutTheme:function(){Vw.initialize()},initialize:function(){Wd.prototype.initialize.call(this);this.label==null&&(this.label=new ia,this.addChild(this.label),
this.set_content(this.label))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);(c||b)&&this.refreshTextStyles();(a||c||b)&&this.refreshText();Wd.prototype.update.call(this)},refreshTextStyles:function(){this.label.set_wordWrap(this.get_wordWrap());this.label.set_textFormat(this.get_textFormat());this.label.set_disabledTextFormat(this.get_disabledTextFormat());this.label.set_embedFonts(this.get_embedFonts());this.label.set_styleSheet(this.get_styleSheet())},
refreshText:function(){this.label.set_text(this._text);this.label.set_htmlText(this._htmlText)},get_styleContext:function(){return Ye},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);
return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||
this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=
m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);
return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__class__:Ye,__properties__:I(Wd.prototype.__properties__,{set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",
get_baseline:"get_baseline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var rd=function(a,b,c){a==null&&(a="");this.__errorFocusRectSkin=this.__customErrorCalloutVariant=null;this.__autoSizeWidth=!1;this.__verticalAlign=hc.MIDDLE;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__embedFonts=!1;this.__textFormat=this.__disabledTextFormat=this.__promptTextFormat=null;this.__rightViewGap=0;this.__rightView=null;
this.__leftViewGap=0;this.__leftView=null;this.__showPromptWhenEmptyAndFocused=!0;this._previousCustomErrorCalloutVariant=this.__backgroundSkin=null;this._maxChars=this._errorStatePriority=this._focusedStatePriority=0;this._pendingSelectionAnchorIndex=this._pendingSelectionActiveIndex=-1;this._scrollX=0;this._stateToTextFormat=new cf;this._errorString=null;this._displayAsPassword=!1;this._measureText=null;this._updatedTextStyles=this._updatedPromptStyles=!1;this._previousText=this._previousMeasureText=
this._previousPrompt=this._previousTextFormat=this._previousPromptTextFormat=null;this._stateToSkin=new cf;this._ignoreLeftViewResize=this._ignoreRightViewResize=!1;this._backgroundSkinMeasurements=this._currentBackgroundSkin=null;this._currentState=Fe.ENABLED;this._editable=this._selectable=!0;this.initializeTextInputTheme();fa.call(this);this.set_text(a);this.set_prompt(b);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.focusRect=null;this.addEventListener("focusIn",m(this,this.textInput_focusInHandler));
this.addEventListener("focusOut",m(this,this.textInput_focusOutHandler));c!=null&&this.addEventListener("change",c)};t["feathers.controls.TextInput"]=rd;rd.__name__="feathers.controls.TextInput";rd.__interfaces__=[Th,re,uh];rd.__super__=fa;rd.prototype=I(fa.prototype,{_editable:null,get_editable:function(){return this._editable},set_editable:function(a){if(this._editable==a)return this._editable;this._editable=a;this.setInvalid(x.STATE);return this._editable},_selectable:null,get_selectable:function(){return this._selectable},
set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.STATE);return this._selectable},get_stageFocusTarget:function(){return this.textField},_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){fa.prototype.set_enabled.call(this,a);this.refreshState();return this._enabled},_backgroundSkinMeasurements:null,_currentBackgroundSkin:null,_currentLeftView:null,_leftViewMeasurements:null,_ignoreLeftViewResize:null,
_currentRightView:null,_rightViewMeasurements:null,_ignoreRightViewResize:null,_stateToSkin:null,textField:null,promptTextField:null,errorStringCallout:null,_previousText:null,_previousMeasureText:null,_previousPrompt:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_previousPromptTextFormat:null,_previousPromptSimpleTextFormat:null,_updatedTextStyles:null,_updatedPromptStyles:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==
0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);Y.dispatch(this,"change");return this._text},_measureText:null,get_measureText:function(){return this._measureText},set_measureText:function(a){if(this._measureText==a)return this._measureText;this._measureText=a;this.setInvalid(x.DATA);return this._measureText},get_baseline:function(){if(this.textField==null)return 0;if(!(this._text!=null&&this._text.length>0)){this.textField.set_text("\u200b");var a=
this.textField.get_y()+this.textField.getLineMetrics(0).ascent;this.textField.set_text("");return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_prompt:null,get_prompt:function(){return this._prompt},set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},___restrict:null,get_restrict:function(){return this.___restrict},set_restrict:function(a){if(this.___restrict==a)return this.___restrict;this.___restrict=
a;this.setInvalid(x.DATA);return this.___restrict},_displayAsPassword:null,get_displayAsPassword:function(){return this._displayAsPassword},set_displayAsPassword:function(a){if(this._displayAsPassword==a)return this._displayAsPassword;this._displayAsPassword=a;this.setInvalid(x.DATA);return this._displayAsPassword},_errorString:null,get_errorString:function(){return this._errorString},set_errorString:function(a){if(this._errorString==a)return this._errorString;this._errorString=a;this.refreshState();
this.setInvalid(x.DATA);return this._errorString},get_errorStringCalloutOpen:function(){return this.errorStringCallout!=null?this.errorStringCallout.parent!=null:!1},_stateToTextFormat:null,_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;this.setInvalid(x.SCROLL);Y.dispatch(this,"scroll");return this._scrollX},_pendingSelectionAnchorIndex:null,get_selectionAnchorIndex:function(){return this.textField!=null&&
this._pendingSelectionAnchorIndex==-1?this.textField.get_caretIndex()==this.textField.get_selectionBeginIndex()?this.textField.get_selectionEndIndex():this.textField.get_selectionBeginIndex():this._pendingSelectionAnchorIndex},_pendingSelectionActiveIndex:null,get_selectionActiveIndex:function(){return this.textField!=null&&this._pendingSelectionActiveIndex==-1?this.textField.get_caretIndex():this._pendingSelectionActiveIndex},_maxChars:null,get_maxChars:function(){return this._maxChars},set_maxChars:function(a){if(this._maxChars==
a)return this._maxChars;this._maxChars=a;this.setInvalid(x.DATA);return this._maxChars},_errorStatePriority:null,get_errorStatePriority:function(){return this._errorStatePriority},set_errorStatePriority:function(a){if(this._errorStatePriority==a)return this._errorStatePriority;this._errorStatePriority=a;this.setInvalid(x.STATE);return this._errorStatePriority},_focusedStatePriority:null,get_focusedStatePriority:function(){return this._errorStatePriority},set_focusedStatePriority:function(a){if(this._focusedStatePriority==
a)return this._focusedStatePriority;this._focusedStatePriority=a;this.setInvalid(x.STATE);return this._focusedStatePriority},_oldErrorCalloutFactory:null,_errorCalloutFactory:null,get_errorCalloutFactory:function(){return this._errorCalloutFactory},set_errorCalloutFactory:function(a){if(this._errorCalloutFactory==a)return this._errorCalloutFactory;this._errorCalloutFactory=a;this.setInvalid(rd.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);return this._errorCalloutFactory},_previousCustomErrorCalloutVariant:null,
_textMeasuredWidth:null,_textMeasuredHeight:null,_promptTextMeasuredWidth:null,_promptTextMeasuredHeight:null,getSkinForState:function(a){return this._stateToSkin.get(a)},setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},
setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,b),this.setInvalid(x.STYLES))},selectRange:function(a,b){this._pendingSelectionAnchorIndex=a;this._pendingSelectionActiveIndex=b;this.setInvalid(x.SELECTION)},selectAll:function(){this.selectRange(0,this._text.length)},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},showFocus:function(a){fa.prototype.showFocus.call(this,
a);a&&this.selectRange(this._text.length,0)},dispose:function(){this.destroyErrorCallout();fa.prototype.dispose.call(this)},initializeTextInputTheme:function(){Ww.initialize()},initialize:function(){fa.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_tabEnabled(!1),this.refreshTextFieldType(),this.textField.addEventListener("change",m(this,this.textInput_textField_changeHandler)),this.textField.addEventListener("scroll",m(this,this.textInput_textField_scrollHandler)),
this.addChild(this.textField))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SCROLL),c=this.isInvalid(x.SELECTION),d=this.isInvalid(x.SIZE),f=this.isInvalid(x.STATE),g=this.isInvalid(x.STYLES);this._previousCustomErrorCalloutVariant!=this.get_customErrorCalloutVariant()&&this.setInvalidationFlag(rd.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);var h=this.isInvalid(rd.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);this._updatedPromptStyles=this._updatedTextStyles=!1;(h||a)&&this.createErrorCallout();
if(g||f)this.refreshBackgroundSkin(),this.refreshLeftView(),this.refreshRightView();(a||f)&&this.refreshPrompt();(g||f)&&this.refreshTextStyles();(a||g||f)&&this.refreshPromptStyles();(a||g||f||d)&&this.refreshText(d);(a||g||d)&&this.refreshPromptText(d);c&&this.refreshSelection();b&&this.refreshScrollPosition();this.measure();this.layoutContent();(h||f||a)&&this.refreshErrorString();this._previousCustomErrorCalloutVariant=this.get_customErrorCalloutVariant()},refreshBackgroundSkin:function(){var a=
this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this.get_backgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==
null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),w.__implements(a,ee)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshLeftView:function(){var a=this._currentLeftView;this._currentLeftView=
this.getCurrentLeftView();this._currentLeftView!=a&&(this.removeCurrentLeftView(a),this._currentLeftView==null?this._leftViewMeasurements=null:(w.__implements(this._currentLeftView,Fa)&&this._currentLeftView.initializeNow(),this._leftViewMeasurements==null?this._leftViewMeasurements=new Sb(this._currentLeftView):this._leftViewMeasurements.save(this._currentLeftView),w.__implements(this._currentLeftView,qb)&&this._currentLeftView.set_uiContext(this),w.__implements(this._currentLeftView,ee)&&this._currentLeftView.set_stateContext(this),
this._currentLeftView.addEventListener("resize",m(this,this.textInput_leftView_resizeHandler),!1,0,!0),this.addChild(this._currentLeftView)))},getCurrentLeftView:function(){return this.get_leftView()},removeCurrentLeftView:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.textInput_leftView_resizeHandler)),w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._leftViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshRightView:function(){var a=
this._currentRightView;this._currentRightView=this.getCurrentRightView();this._currentRightView!=a&&(this.removeCurrentRightView(a),this._currentRightView==null?this._rightViewMeasurements=null:(w.__implements(this._currentRightView,Fa)&&this._currentRightView.initializeNow(),this._rightViewMeasurements==null?this._rightViewMeasurements=new Sb(this._currentRightView):this._rightViewMeasurements.save(this._currentRightView),w.__implements(this._currentRightView,qb)&&this._currentRightView.set_uiContext(this),
w.__implements(this._currentRightView,ee)&&this._currentRightView.set_stateContext(this),this._currentRightView.addEventListener("resize",m(this,this.textInput_rightView_resizeHandler),!1,0,!0),this.addChild(this._currentRightView)))},getCurrentRightView:function(){return this.get_rightView()},removeCurrentRightView:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.textInput_rightView_resizeHandler)),w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),
this._rightViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._backgroundSkinMeasurements!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;w.__implements(this._currentBackgroundSkin,
rb)&&(h=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();var n=this._ignoreLeftViewResize;this._ignoreLeftViewResize=!0;var l=this._ignoreRightViewResize;this._ignoreRightViewResize=!0;var q=null;w.__implements(this._currentLeftView,rb)&&(q=this._currentLeftView);w.__implements(this._currentLeftView,da)&&this._currentLeftView.validateNow();var u=null;w.__implements(this._currentRightView,rb)&&(u=this._currentRightView);w.__implements(this._currentRightView,
da)&&this._currentRightView.validateNow();this._ignoreLeftViewResize=n;this._ignoreRightViewResize=l;n=this.get_explicitWidth();a&&(n=this.get_autoSizeWidth()||this._measureText!=null?this._textMeasuredWidth:0,this._prompt!=null&&(n=Math.max(n,this._promptTextMeasuredWidth)),q!=null?n+=q.get_width()+this.get_leftViewGap():this._leftViewMeasurements!=null&&this._leftViewMeasurements.width!=null&&(n+=this._leftViewMeasurements.width+this.get_leftViewGap()),u!=null?n+=u.get_width()+this.get_rightViewGap():
this._rightViewMeasurements!=null&&this._rightViewMeasurements.width!=null&&(n+=this._rightViewMeasurements.width+this.get_rightViewGap()),n+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(n=Math.max(this._currentBackgroundSkin.get_width(),n)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight,this._prompt!=null&&(a=Math.max(a,this._promptTextMeasuredHeight)),q!=null&&a<q.get_height()?a=q.get_height():this._leftViewMeasurements!=null&&a<this._leftViewMeasurements.height&&
(a=this._leftViewMeasurements.height),u!=null&&a<u.get_height()?a=u.get_height():this._rightViewMeasurements!=null&&a<this._rightViewMeasurements.height&&(a=this._rightViewMeasurements.height),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this.get_autoSizeWidth()||this._measureText!=null?this._textMeasuredWidth:0,this._prompt!=null&&(b=Math.max(b,this._promptTextMeasuredWidth)),
q!=null?b+=q.get_minWidth()+this.get_leftViewGap():this._leftViewMeasurements!=null&&this._leftViewMeasurements.minWidth!=null&&(b+=this._leftViewMeasurements.minWidth+this.get_leftViewGap()),u!=null?b+=u.get_minWidth()+this.get_rightViewGap():this._rightViewMeasurements!=null&&this._rightViewMeasurements.minWidth!=null&&(b+=this._rightViewMeasurements.minWidth+this.get_rightViewGap()),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=
null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight,this._prompt!=null&&(c=Math.max(c,this._promptTextMeasuredHeight)),q!=null&&c<q.get_minHeight()?c=q.get_minHeight():this._leftViewMeasurements!=null&&c<this._leftViewMeasurements.minHeight&&(c=this._leftViewMeasurements.minHeight),u!=null&&c<u.get_minHeight()?c=u.get_minHeight():this._rightViewMeasurements!=null&&c<this._rightViewMeasurements.minHeight&&
(c=this._rightViewMeasurements.minHeight),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();
g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},refreshTextFieldType:function(){this._enabled&&this._editable&&this.textField.get_type()!=1?this.textField.set_type(1):this._enabled&&this._editable||this.textField.get_type()!=1||this.textField.set_type(0)},refreshTextStyles:function(){this.refreshTextFieldType();this.textField.get_embedFonts()!=
this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_displayAsPassword()!=this._displayAsPassword&&(this.textField.set_displayAsPassword(this._displayAsPassword),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.textInput_textFormat_changeHandler)),
a!=null&&(a.addEventListener("change",m(this,this.textInput_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshPrompt:function(){this._prompt==null?this.promptTextField!=null&&(this.removeChild(this.promptTextField),this.promptTextField=null):(this.promptTextField==null&&(this.promptTextField=new Jc,this.addChildAt(this.promptTextField,this.getChildIndex(this.textField))),this.promptTextField.set_selectable(!1),
this.promptTextField.set_mouseWheelEnabled(!1),this.promptTextField.mouseEnabled=!1,this.promptTextField.set_visible(this._text.length==0&&(this.get_currentState()!=Fe.FOCUSED||this.get_showPromptWhenEmptyAndFocused())))},refreshPromptText:function(a){this._prompt!=null&&(this._prompt!=this._previousPrompt||this._updatedPromptStyles||a)&&(this.promptTextField.set_autoSize(1),(a=this._prompt.length>0)?this.promptTextField.set_text(this._prompt):this.promptTextField.set_text("\u200b"),this._promptTextMeasuredWidth=
this.promptTextField.get_width(),this._promptTextMeasuredHeight=this.promptTextField.get_height(),this.promptTextField.set_autoSize(2),a||this.promptTextField.set_text(""),this._previousPrompt=this._prompt)},refreshPromptStyles:function(){if(this._prompt!=null){this.promptTextField.get_embedFonts()!=this.get_embedFonts()&&(this.promptTextField.set_embedFonts(this.get_embedFonts()),this._updatedPromptStyles=!0);var a=this.getCurrentPromptTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousPromptSimpleTextFormat&&
(this._previousPromptTextFormat!=null&&this._previousPromptTextFormat.removeEventListener("change",m(this,this.textInput_promptTextFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.textInput_textFormat_changeHandler),!1,0,!0),this.promptTextField.set_defaultTextFormat(b),this._updatedPromptStyles=!0),this._previousPromptTextFormat=a,this._previousPromptSimpleTextFormat=b)}},getCurrentPromptTextFormat:function(){var a=this.get_promptTextFormat();this._enabled||this.get_disabledTextFormat()==
null||(a=this.get_disabledTextFormat());a==null&&(a=this.get_textFormat());return a},refreshText:function(a){this.textField.set_restrict(this.___restrict);this.textField.set_maxChars(this._maxChars);this._editable?this.textField.set_selectable(this._enabled):this.textField.set_selectable(this._enabled&&this._selectable);var b=this._measureText!=null,c=b?this._measureText:this._text;if(c==null||c.length==0)b=!0,c="\u200b";if(this._text!=this._previousText||c!=this._previousMeasureText||this._updatedTextStyles||
a)this.textField.set_autoSize(1),this.textField.set_text(c),this._textMeasuredWidth=this.textField.get_width(),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),a=null,this._text==null||this._text.length==0?a="":b&&(a=this._text),a!=null&&this.textField.set_text(a),this._previousText=this._text,this._previousMeasureText=c},refreshSelection:function(){if(this._pendingSelectionActiveIndex!=-1||this._pendingSelectionAnchorIndex!=-1){var a=this._pendingSelectionAnchorIndex,
b=this._pendingSelectionActiveIndex;this._pendingSelectionActiveIndex=this._pendingSelectionAnchorIndex=-1;this.textField.setSelection(a,b)}},refreshScrollPosition:function(){this.textField.set_scrollH(Math.round(this._scrollX))},getCurrentTextFormat:function(){var a=this._stateToTextFormat.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},layoutContent:function(){var a=this._ignoreLeftViewResize;this._ignoreLeftViewResize=
!0;var b=this._ignoreRightViewResize;this._ignoreRightViewResize=!0;this.layoutBackgroundSkin();var c=this._textMeasuredHeight,d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();if(c>d||this.get_verticalAlign()==hc.JUSTIFY)c=d;c<0&&(c=0);this.textField.set_height(c);var f=0;this._currentLeftView!=null&&(w.__implements(this._currentLeftView,da)&&this._currentLeftView.validateNow(),this._currentLeftView.set_x(this.get_paddingLeft()),this._currentLeftView.set_y(Math.max(this.get_paddingTop(),
this.get_paddingTop()+(d-this._currentLeftView.get_height())/2)),f=this._currentLeftView.get_width()+this.get_leftViewGap());var g=0;this._currentRightView!=null&&(w.__implements(this._currentRightView,da)&&this._currentRightView.validateNow(),this._currentRightView.set_x(this.actualWidth-this.get_paddingRight()-this._currentRightView.get_width()),this._currentRightView.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(d-this._currentRightView.get_height())/2)),g=this._currentRightView.get_width()+
this.get_rightViewGap());g=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-f-g;g<0&&(g=0);this.textField.set_width(g);this.textField.set_x(this.get_paddingLeft()+f);var h=this.textField;switch(this.get_verticalAlign()._hx_index){case 0:h.set_y(this.get_paddingTop());break;case 2:h.set_y(this.actualHeight-this.get_paddingBottom()-c);break;case 3:h.set_y(this.get_paddingTop());break;default:h.set_y(this.get_paddingTop()+(d-c)/2)}if(this.promptTextField!=null){this.promptTextField.set_width(g);
c=this._promptTextMeasuredHeight;if(c>d||this.get_verticalAlign()==hc.JUSTIFY)c=d;c<0&&(c=0);this.promptTextField.set_height(c);this.promptTextField.set_x(this.get_paddingLeft()+f);h=this.promptTextField;switch(this.get_verticalAlign()._hx_index){case 0:h.set_y(this.get_paddingTop());break;case 2:h.set_y(this.actualHeight-this.get_paddingBottom()-c);break;case 3:h.set_y(this.get_paddingTop());break;default:h.set_y(this.get_paddingTop()+(d-c)/2)}}this._ignoreLeftViewResize=a;this._ignoreRightViewResize=
b},alignTextField:function(a,b,c){switch(this.get_verticalAlign()._hx_index){case 0:a.set_y(this.get_paddingTop());break;case 2:a.set_y(this.actualHeight-this.get_paddingBottom()-b);break;case 3:a.set_y(this.get_paddingTop());break;default:a.set_y(this.get_paddingTop()+(c-b)/2)}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),
this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},refreshErrorString:function(){this.errorStringCallout!=null&&(this.errorStringCallout.set_text(this._errorString),this._currentState==Fe.FOCUSED&&this.errorStringCallout.parent==null?Aa.addPopUp(this.errorStringCallout,this,!1,!1):this._currentState!=Fe.FOCUSED&&this.errorStringCallout.parent!=
null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout))},createErrorCallout:function(){this.destroyErrorCallout();if(this._errorString!=null&&this._errorString.length!=0){var a=this._errorCalloutFactory!=null?this._errorCalloutFactory:rd.defaultErrorCalloutFactory;this._oldErrorCalloutFactory=a;this.errorStringCallout=a.create();this.errorStringCallout.get_variant()==null&&this.errorStringCallout.set_variant(this.get_customErrorCalloutVariant()!=null?this.get_customErrorCalloutVariant():
rd.CHILD_VARIANT_ERROR_CALLOUT);this.errorStringCallout.set_origin(this);this.errorStringCallout.closeOnPointerOutside=!1}},destroyErrorCallout:function(){this.errorStringCallout!=null&&(this.errorStringCallout.parent!=null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout),this._oldErrorCalloutFactory.destroy!=null&&this._oldErrorCalloutFactory.destroy(this.errorStringCallout),this.errorStringCallout=this._oldErrorCalloutFactory=null)},changeState:function(a){this._enabled||(a=
Fe.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),Y.dispatch(this,"stateChange"))},getCurrentFocusRectSkin:function(){return this._errorString!=null&&this.get_errorFocusRectSkin()!=null?this.get_errorFocusRectSkin():fa.prototype.getCurrentFocusRectSkin.call(this)},refreshState:function(){if(this._enabled){var a=this.stage!=null&&this.stage.get_focus()==this.textField,b=this._errorString!=null;a&&(!b||this._focusedStatePriority>=this._errorStatePriority)?this.changeState(Fe.FOCUSED):
b?this.changeState(Fe.ERROR):this.changeState(Fe.ENABLED)}else this.changeState(Fe.DISABLED)},textInput_textField_changeHandler:function(a){a.stopPropagation();var b=this._text;this._text=this.textField.get_text();a=this._measureText!=null?this._measureText:this._text;if(a==null||a.length==0)a="\u200b";var c=this._text!=null&&this._text.length>0;b=b!=null&&b.length>0;var d=this._prompt!=null&&this._prompt.length>0;this.get_autoSizeWidth()||d&&(!c&&b||c&&!b)?this.setInvalid(x.DATA):(this._previousMeasureText=
a,this._previousText=this._text);Y.dispatch(this,"change")},textInput_textField_scrollHandler:function(a){this._scrollX=this.textField.get_scrollH();Y.dispatch(this,"scroll")},textInput_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this.textField&&(a.stopImmediatePropagation(),this.stage.set_focus(this.textField));this.refreshState()},textInput_focusOutHandler:function(a){this.refreshState()},textInput_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},textInput_promptTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},
textInput_leftView_resizeHandler:function(a){this._ignoreLeftViewResize||this.setInvalid(x.STYLES)},textInput_rightView_resizeHandler:function(a){this._ignoreRightViewResize||this.setInvalid(x.STYLES)},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);
return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__showPromptWhenEmptyAndFocused:null,get_showPromptWhenEmptyAndFocused:function(){return this.__showPromptWhenEmptyAndFocused},set_showPromptWhenEmptyAndFocused:function(a){if(!this.setStyle("showPromptWhenEmptyAndFocused")||this.__showPromptWhenEmptyAndFocused==a)return this.__showPromptWhenEmptyAndFocused;this._previousClearStyle=m(this,this.clearStyle_showPromptWhenEmptyAndFocused);
this.__showPromptWhenEmptyAndFocused=a;this.setInvalid(x.STYLES);return this.__showPromptWhenEmptyAndFocused},clearStyle_showPromptWhenEmptyAndFocused:function(){this.set_showPromptWhenEmptyAndFocused(!0);return this.get_showPromptWhenEmptyAndFocused()},__leftView:null,get_leftView:function(){return this.__leftView},set_leftView:function(a){if(!this.setStyle("leftView")||this.__leftView==a)return this.__leftView;this._previousClearStyle=m(this,this.clearStyle_leftView);this.__leftView=a;this.setInvalid(x.STYLES);
return this.__leftView},clearStyle_leftView:function(){this.set_leftView(null);return this.get_leftView()},__leftViewGap:null,get_leftViewGap:function(){return this.__leftViewGap},set_leftViewGap:function(a){if(!this.setStyle("leftViewGap")||this.__leftViewGap==a)return this.__leftViewGap;this._previousClearStyle=m(this,this.clearStyle_leftViewGap);this.__leftViewGap=a;this.setInvalid(x.STYLES);return this.__leftViewGap},clearStyle_leftViewGap:function(){this.set_leftViewGap(0);return this.get_leftViewGap()},
__rightView:null,get_rightView:function(){return this.__rightView},set_rightView:function(a){if(!this.setStyle("rightView")||this.__rightView==a)return this.__rightView;this._previousClearStyle=m(this,this.clearStyle_rightView);this.__rightView=a;this.setInvalid(x.STYLES);return this.__rightView},clearStyle_rightView:function(){this.set_rightView(null);return this.get_rightView()},__rightViewGap:null,get_rightViewGap:function(){return this.__rightViewGap},set_rightViewGap:function(a){if(!this.setStyle("rightViewGap")||
this.__rightViewGap==a)return this.__rightViewGap;this._previousClearStyle=m(this,this.clearStyle_rightViewGap);this.__rightViewGap=a;this.setInvalid(x.STYLES);return this.__rightViewGap},clearStyle_rightViewGap:function(){this.set_rightViewGap(0);return this.get_rightViewGap()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);
this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);
return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__promptTextFormat:null,get_promptTextFormat:function(){return this.__promptTextFormat},set_promptTextFormat:function(a){if(!this.setStyle("promptTextFormat")||this.__promptTextFormat==a)return this.__promptTextFormat;this._previousClearStyle=m(this,this.clearStyle_promptTextFormat);this.__promptTextFormat=a;this.setInvalid(x.STYLES);return this.__promptTextFormat},
clearStyle_promptTextFormat:function(){this.set_promptTextFormat(null);return this.get_promptTextFormat()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},
__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||
this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=
m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);
return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(hc.MIDDLE);
return this.get_verticalAlign()},__autoSizeWidth:null,get_autoSizeWidth:function(){return this.__autoSizeWidth},set_autoSizeWidth:function(a){if(!this.setStyle("autoSizeWidth")||this.__autoSizeWidth==a)return this.__autoSizeWidth;this._previousClearStyle=m(this,this.clearStyle_autoSizeWidth);this.__autoSizeWidth=a;this.setInvalid(x.STYLES);return this.__autoSizeWidth},clearStyle_autoSizeWidth:function(){this.set_autoSizeWidth(!1);return this.get_autoSizeWidth()},__errorFocusRectSkin:null,get_errorFocusRectSkin:function(){return this.__errorFocusRectSkin},
set_errorFocusRectSkin:function(a){if(!this.setStyle("errorFocusRectSkin")||this.__errorFocusRectSkin==a)return this.__errorFocusRectSkin;this._previousClearStyle=m(this,this.clearStyle_errorFocusRectSkin);this.__errorFocusRectSkin=a;this.setInvalid(x.STYLES);return this.__errorFocusRectSkin},clearStyle_errorFocusRectSkin:function(){this.set_errorFocusRectSkin(null);return this.get_errorFocusRectSkin()},__customErrorCalloutVariant:null,get_customErrorCalloutVariant:function(){return this.__customErrorCalloutVariant},
set_customErrorCalloutVariant:function(a){if(!this.setStyle("customErrorCalloutVariant")||this.__customErrorCalloutVariant==a)return this.__customErrorCalloutVariant;this._previousClearStyle=m(this,this.clearStyle_customErrorCalloutVariant);this.__customErrorCalloutVariant=a;this.setInvalid(x.STYLES);return this.__customErrorCalloutVariant},clearStyle_customErrorCalloutVariant:function(){this.set_customErrorCalloutVariant(null);return this.get_customErrorCalloutVariant()},get_styleContext:function(){return rd},
__class__:rd,__properties__:I(fa.prototype.__properties__,{set_customErrorCalloutVariant:"set_customErrorCalloutVariant",get_customErrorCalloutVariant:"get_customErrorCalloutVariant",set_errorCalloutFactory:"set_errorCalloutFactory",get_errorCalloutFactory:"get_errorCalloutFactory",set_focusedStatePriority:"set_focusedStatePriority",get_focusedStatePriority:"get_focusedStatePriority",set_errorStatePriority:"set_errorStatePriority",get_errorStatePriority:"get_errorStatePriority",set_errorFocusRectSkin:"set_errorFocusRectSkin",
get_errorFocusRectSkin:"get_errorFocusRectSkin",set_autoSizeWidth:"set_autoSizeWidth",get_autoSizeWidth:"get_autoSizeWidth",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_selectionActiveIndex:"get_selectionActiveIndex",get_selectionAnchorIndex:"get_selectionAnchorIndex",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",
get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_promptTextFormat:"set_promptTextFormat",get_promptTextFormat:"get_promptTextFormat",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",get_errorStringCalloutOpen:"get_errorStringCalloutOpen",
set_errorString:"set_errorString",get_errorString:"get_errorString",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_restrict:"set_restrict",get_restrict:"get_restrict",set_prompt:"set_prompt",get_prompt:"get_prompt",get_baseline:"get_baseline",set_measureText:"set_measureText",get_measureText:"get_measureText",set_text:"set_text",get_text:"get_text",set_rightViewGap:"set_rightViewGap",get_rightViewGap:"get_rightViewGap",set_rightView:"set_rightView",
get_rightView:"get_rightView",set_leftViewGap:"set_leftViewGap",get_leftViewGap:"get_leftViewGap",set_leftView:"set_leftView",get_leftView:"get_leftView",set_showPromptWhenEmptyAndFocused:"set_showPromptWhenEmptyAndFocused",get_showPromptWhenEmptyAndFocused:"get_showPromptWhenEmptyAndFocused",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",get_currentState:"get_currentState",get_stageFocusTarget:"get_stageFocusTarget",set_selectable:"set_selectable",get_selectable:"get_selectable",
set_editable:"set_editable",get_editable:"get_editable"})});var Us=function(){this.autoResize=!0;rd.call(this)};t["com.tilbuci.ui.component.IDTextInput"]=Us;Us.__name__="com.tilbuci.ui.component.IDTextInput";Us.__super__=rd;Us.prototype=I(rd.prototype,{autoResize:null,__class__:Us});var et=function(a){this._calculating=!1;this._curX=this._curY=this._curW=this._curH=0;ze.call(this,k.ln.get("rightbar-instances"),a);this.ui.createHContainer("copybuttons",3355443);var b=this.ui,c=Z.getBitmapData("btNone"),
d=this.ui.hcontainers.h.copybuttons;b.createIconButton("none",m(this,this.onNone),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btAll");d=this.ui.hcontainers.h.copybuttons;b.createIconButton("all",m(this,this.onAll),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btCopy");d=this.ui.hcontainers.h.copybuttons;b.createIconButton("btcopy",m(this,this.onCopy),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btPaste");d=this.ui.hcontainers.h.copybuttons;b.createIconButton("btpaste",m(this,this.onPaste),new Ma(c),
null,d);this.ui.hcontainers.h.copybuttons.set_width(a-5);this.ui.createHContainer("stage",3355443);b=this.ui;c=Z.getBitmapData("btStageLeft");d=this.ui.hcontainers.h.stage;b.createIconButton("stageleft",m(this,this.onStageLeft),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btStageCenter");d=this.ui.hcontainers.h.stage;b.createIconButton("stagecenter",m(this,this.onStageCenter),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btStageRight");d=this.ui.hcontainers.h.stage;b.createIconButton("stageright",
m(this,this.onStageRight),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btStageTop");d=this.ui.hcontainers.h.stage;b.createIconButton("stagetop",m(this,this.onStageTop),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btStageMiddle");d=this.ui.hcontainers.h.stage;b.createIconButton("stagemiddle",m(this,this.onStageMiddle),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btStageBottom");d=this.ui.hcontainers.h.stage;b.createIconButton("stagebottom",m(this,this.onStageBottom),new Ma(c),null,d);this.ui.hcontainers.h.stage.set_width(a-
5);this.ui.createHContainer("selection",3355443);b=this.ui;c=Z.getBitmapData("btSelectionLeft");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionleft",m(this,this.onSelectionLeft),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btSelectionCenter");d=this.ui.hcontainers.h.selection;b.createIconButton("selectioncenter",m(this,this.onSelectionCenter),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btSelectionRight");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionright",m(this,
this.onSelectionRight),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btSelectionTop");d=this.ui.hcontainers.h.selection;b.createIconButton("selectiontop",m(this,this.onSelectionTop),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btSelectionMiddle");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionmiddle",m(this,this.onSelectionMiddle),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btSelectionBottom");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionbottom",m(this,this.onSelectionBottom),
new Ma(c),null,d);this.ui.hcontainers.h.selection.set_width(a-5);this.ui.createHContainer("distribute",3355443);b=this.ui;c=Z.getBitmapData("btDistributeH");d=this.ui.hcontainers.h.distribute;b.createIconButton("distributeh",m(this,this.onDistributeH),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btDistributeV");d=this.ui.hcontainers.h.distribute;b.createIconButton("distributev",m(this,this.onDistributeV),new Ma(c),null,d);this.ui.hcontainers.h.distribute.set_width(a-5);this.ui.createHContainer("pos",
3355443);this.ui.createLabel("xpos",k.ln.get("rightbar-instances-xpos"),ia.VARIANT_DETAIL,this.ui.hcontainers.h.pos);this.ui.createLabel("ypos",k.ln.get("rightbar-instances-ypos"),ia.VARIANT_DETAIL,this.ui.hcontainers.h.pos);this.ui.hcontainers.h.pos.set_width(a-5);this.ui.createHContainer("posnum",3355443);this.ui.createNumeric("xpos",-1E5,1E5,1,0,this.ui.hcontainers.h.posnum);this.ui.createNumeric("ypos",-1E5,1E5,1,0,this.ui.hcontainers.h.posnum);this.ui.hcontainers.h.posnum.set_width(a-5);this.ui.createHContainer("size",
3355443);this.ui.createLabel("xsize",k.ln.get("rightbar-instances-xsize"),ia.VARIANT_DETAIL,this.ui.hcontainers.h.size);this.ui.createLabel("ysize",k.ln.get("rightbar-instances-ysize"),ia.VARIANT_DETAIL,this.ui.hcontainers.h.size);this.ui.hcontainers.h.size.set_width(a-5);this.ui.createHContainer("sizenum",3355443);this.ui.createNumeric("xsize",-1E5,1E5,1,0,this.ui.hcontainers.h.sizenum);this.ui.createNumeric("ysize",-1E5,1E5,1,0,this.ui.hcontainers.h.sizenum);this.ui.hcontainers.h.sizenum.set_width(a-
5);b=this.ui;c={tp:"Custom",cont:this.ui.hcontainers.h.copybuttons};d={tp:"Custom",cont:this.ui.hcontainers.h.pos};var f={tp:"Custom",cont:this.ui.hcontainers.h.posnum},g={tp:"Custom",cont:this.ui.hcontainers.h.size},h={tp:"Custom",cont:this.ui.hcontainers.h.sizenum},n={tp:"Custom",cont:this.ui.hcontainers.h.stage},l={tp:"Custom",cont:this.ui.hcontainers.h.selection},q={tp:"Custom",cont:this.ui.hcontainers.h.distribute},u=k.ln.get("rightbar-instances-rand");this._content=b.forge("instancepan",[{tp:"List",
id:"ilist",ht:200,vl:[],sl:null,ch:m(this,this.onChange)},c,{tp:"Spacer",id:"align",ht:5,ln:!1},d,f,g,h,n,l,q,{tp:"Spacer",id:"extra",ht:5,ln:!1},{tp:"Button",id:"randbt",tx:u,ac:m(this,this.onRand)}],3355443,a-5);this.ui.lists.h.ilist.set_layoutData(fd.fill());this.ui.lists.h.ilist.itemToText=function(v){return v.text};this.ui.lists.h.ilist.set_allowMultipleSelection(!0);this.ui.buttons.h.btcopy.set_enabled(this.ui.buttons.h.btpaste.set_enabled(!1));this.ui.buttons.h.btcopy.set_toolTip(k.ln.get("rightbar-instances-noinstances"));
this.ui.buttons.h.btpaste.set_toolTip(k.ln.get("rightbar-instances-nocopied"));this.ui.buttons.h.none.set_toolTip(k.ln.get("rightbar-instances-none"));this.ui.buttons.h.all.set_toolTip(k.ln.get("rightbar-instances-all"));this.ui.buttons.h.stageleft.set_toolTip(k.ln.get("rightbar-instances-stageleft"));this.ui.buttons.h.stagecenter.set_toolTip(k.ln.get("rightbar-instances-stagecenter"));this.ui.buttons.h.stageright.set_toolTip(k.ln.get("rightbar-instances-stageright"));this.ui.buttons.h.stagetop.set_toolTip(k.ln.get("rightbar-instances-stagetop"));
this.ui.buttons.h.stagemiddle.set_toolTip(k.ln.get("rightbar-instances-stagemiddle"));this.ui.buttons.h.stagebottom.set_toolTip(k.ln.get("rightbar-instances-stagebottom"));this.ui.buttons.h.selectionleft.set_toolTip(k.ln.get("rightbar-instances-selectionleft"));this.ui.buttons.h.selectioncenter.set_toolTip(k.ln.get("rightbar-instances-selectioncenter"));this.ui.buttons.h.selectionright.set_toolTip(k.ln.get("rightbar-instances-selectionright"));this.ui.buttons.h.selectiontop.set_toolTip(k.ln.get("rightbar-instances-selectiontop"));
this.ui.buttons.h.selectionmiddle.set_toolTip(k.ln.get("rightbar-instances-selectionmiddle"));this.ui.buttons.h.selectionbottom.set_toolTip(k.ln.get("rightbar-instances-selectionbottom"));this.ui.buttons.h.distributeh.set_toolTip(k.ln.get("rightbar-instances-disth"));this.ui.buttons.h.distributev.set_toolTip(k.ln.get("rightbar-instances-distv"));this.ui.numerics.h.xpos.addEventListener("change",m(this,this.onChangePosX));this.ui.numerics.h.ypos.addEventListener("change",m(this,this.onChangePosY));
this.ui.numerics.h.xsize.addEventListener("change",m(this,this.onChangeSizeX));this.ui.numerics.h.ysize.addEventListener("change",m(this,this.onChangeSizeY));k.copy.updateDisplay=m(this,this.updatePaste)};t["com.tilbuci.ui.component.InstancesPanel"]=et;et.__name__="com.tilbuci.ui.component.InstancesPanel";et.__super__=ze;et.prototype=I(ze.prototype,{_curX:null,_curY:null,_curW:null,_curH:null,_calculating:null,onCopy:function(a){if(this.ui.lists.h.ilist.get_selectedItems().length>0){k.copy.clear();
a=0;for(var b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;){var c=b[a];++a;var d=p.movie.scene.keyframes[p.area.get_currentKf()];Object.prototype.hasOwnProperty.call(d.h,c.value)&&k.copy.addCollection(p.movie.scene.keyframes[p.area.get_currentKf()].h[c.value].collection)&&k.copy.addInstance(c.value,p.movie.scene.keyframes[p.area.get_currentKf()].h[c.value])}}k.copy.broadcast();this.updatePaste()},onPaste:function(a){k.copy.hasCopy()&&p.movie.get_scId()!=""&&k.copy.pasteInstances()},onNone:function(a){p.area.imgSelect();
this.reloadContent();a=0;for(var b=this.callbacks;a<b.length;){var c=b[a];++a;var d=new G;d.h.nm="";c(d)}this.updatePaste()},onAll:function(a){p.area.imgSelect();this.reloadContent();a=[];for(var b=0,c=this.ui.lists.h.ilist.get_dataProvider().get_length();b<c;){var d=b++;a.push(d)}this.ui.lists.h.ilist.set_selectedIndices(a);this.updatePaste()},onRand:function(a){this.ui.lists.h.ilist.get_dataProvider().get_length()>0&&k.showPopup(k.ln.get("rightbar-instances"),k.ln.get("rightbar-instances-randcheck"),
340,205,k.ln.get("default-ok"),m(this,this.onRandConf),"confirm",k.ln.get("default-cancel"));this.updatePaste()},onRandConf:function(a){if(a){a=[];for(var b=0,c=this.ui.lists.h.ilist.get_dataProvider().get_length();b<c;){var d=b++,f=!0;this.ui.lists.h.ilist.get_selectedItem()!=null&&d==this.ui.lists.h.ilist.get_selectedIndex()&&(f=!1);if(f){d=this.ui.lists.h.ilist.get_dataProvider().get(d).text;for(f=V.substr(Ga.random(),0,10);a.indexOf(f)!=-1;)f=V.substr(Ga.random(),0,10);a.push(f);p.area.imgSelect(d);
p.area.setCurrentStr("instance",f)}}p.area.imgSelect();this.reloadContent()}this.updatePaste()},reloadContent:function(a){a=[];var b=p.movie.scene.keyframes[p.area.get_currentKf()].h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];a.push({text:f,value:f})}this.ui.lists.h.ilist.set_dataProvider(new dg(a));this.ui.buttons.h.btcopy.set_enabled(!1);this.ui.buttons.h.btcopy.set_toolTip(k.ln.get("rightbar-instances-noinstances"));this.updatePaste()},updateContent:function(a){if(this.ui.lists.h.ilist.get_dataProvider()!=
null)for(var b=0,c=this.ui.lists.h.ilist.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.ilist.get_dataProvider().get(d)!=null&&this.ui.lists.h.ilist.get_dataProvider().get(d).value==a.h.nm&&this.ui.lists.h.ilist.set_selectedIndex(d)}this.updatePaste()},instanceRename:function(a,b){if(this.ui.lists.h.ilist.get_dataProvider()!=null)for(var c=0,d=this.ui.lists.h.ilist.get_dataProvider().get_length();c<d;){var f=c++;this.ui.lists.h.ilist.get_dataProvider().get(f)!=null&&this.ui.lists.h.ilist.get_dataProvider().get(f).value==
a&&(this.ui.lists.h.ilist.get_dataProvider().get(f).text=b,this.ui.lists.h.ilist.get_dataProvider().get(f).value=b,this.ui.lists.h.ilist.set_selectedIndex(f),this.ui.lists.h.ilist.get_dataProvider().updateAt(this.ui.lists.h.ilist.get_selectedIndex()))}this.updatePaste()},onChange:function(a){if(this.ui.lists.h.ilist.get_selectedItems().length==1){p.area.imgSelect(this.ui.lists.h.ilist.get_selectedItems()[0].value);a=0;for(var b=this.callbacks;a<b.length;){var c=b[a];++a;var d=new G,f=this.ui.lists.h.ilist.get_selectedItems()[0].value;
d.h.nm=f;c(d)}this.ui.buttons.h.btcopy.set_enabled(!0);this.ui.buttons.h.btcopy.set_toolTip(k.ln.get("rightbar-instances-copy"));this.getNums()}else if(this.ui.lists.h.ilist.get_selectedItems().length>1){p.area.imgSelect(null);this.ui.buttons.h.btcopy.set_enabled(!0);this.ui.buttons.h.btcopy.set_toolTip(k.ln.get("rightbar-instances-copy"));c=[];a=0;for(b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;)d=b[a],++a,c.push(d.value);p.area.imgSelectMultiple(c);this.getNums()}else this.ui.buttons.h.btcopy.set_enabled(!1),
this.ui.buttons.h.btcopy.set_toolTip(k.ln.get("rightbar-instances-noinstances"));this.updatePaste()},getNums:function(){this._calculating=!0;for(var a=null,b=null,c=null,d=null,f=null,g=null,h=0,n=this.ui.lists.h.ilist.get_selectedItems();h<n.length;){var l=n[h];++h;l=p.area.pickInstance(l.value);if(l!=null){if(a==null||a>l.get_x())a=l.get_x();if(b==null||b>l.get_y())b=l.get_y();if(f==null||f<l.get_x()+l.get_width())f=l.get_x()+l.get_width();if(g==null||g<l.get_y()+l.get_height())g=l.get_y()+l.get_height();
c=f-a;d=g-b}}a!=null&&(this._curX=this.ui.numerics.h.xpos.set_value(Math.round(a)),this._curY=this.ui.numerics.h.ypos.set_value(Math.round(b)),this._curW=this.ui.numerics.h.xsize.set_value(Math.round(c)),this._curH=this.ui.numerics.h.ysize.set_value(Math.round(d)));this._calculating=!1},onChangePosX:function(a){if(!this._calculating&&this.ui.lists.h.ilist.get_selectedItems().length>0){a=this._curX-this.ui.numerics.h.xpos.get_value();for(var b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;){var d=
c[b];++b;d=p.area.pickInstance(d.value);d!=null&&d.set_x(d.get_x()-a)}this.onChange(null)}},onChangePosY:function(a){if(!this._calculating&&this.ui.lists.h.ilist.get_selectedItems().length>0){a=this._curY-this.ui.numerics.h.ypos.get_value();for(var b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;){var d=c[b];++b;d=p.area.pickInstance(d.value);d!=null&&d.set_y(d.get_y()-a)}this.onChange(null)}},onChangeSizeX:function(a){if(!this._calculating&&this.ui.lists.h.ilist.get_selectedItems().length>
0){a=this.ui.numerics.h.xsize.get_value()/this._curW;for(var b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;){var d=c[b];++b;d=p.area.pickInstance(d.value);d!=null&&(d.set_width(d.get_width()*a),d.get_x()!=this._curX&&d.set_x(this._curX+(d.get_x()-this._curX)*a))}this.onChange(null)}},onChangeSizeY:function(a){if(!this._calculating&&this.ui.lists.h.ilist.get_selectedItems().length>0){a=this.ui.numerics.h.ysize.get_value()/this._curH;for(var b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<
c.length;){var d=c[b];++b;d=p.area.pickInstance(d.value);d!=null&&(d.set_height(d.get_height()*a),d.get_y()!=this._curY&&d.set_y(this._curY+(d.get_y()-this._curY)*a))}this.onChange(null)}},updatePaste:function(){k.copy.hasCopy()?(this.ui.buttons.h.btpaste.set_enabled(!0),this.ui.buttons.h.btpaste.set_toolTip(k.ln.get("rightbar-instances-paste"))):(this.ui.buttons.h.btpaste.set_enabled(!1),this.ui.buttons.h.btpaste.set_toolTip(k.ln.get("rightbar-instances-nocopied")))},onStageLeft:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>
0){for(var a=0,b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;){var c=b[a];++a;p.area.pickInstance(c.value)!=null&&p.area.setPropertyNum(c.value,"x",0)}this.onChange(null)}},onStageRight:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>0){for(var a=0,b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;){var c=b[a];++a;var d=p.area.pickInstance(c.value);d!=null&&(p.orientation=="horizontal"?p.area.setPropertyNum(c.value,"x",p.mdata.screen.big-d.get_width()):p.area.setPropertyNum(c.value,
"x",p.mdata.screen.small-d.get_width()))}this.onChange(null)}},onStageCenter:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>0){for(var a=0,b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;){var c=b[a];++a;var d=p.area.pickInstance(c.value);d!=null&&(p.orientation=="horizontal"?p.area.setPropertyNum(c.value,"x",p.mdata.screen.big/2-d.get_width()/2):p.area.setPropertyNum(c.value,"x",p.mdata.screen.small/2-d.get_width()/2))}this.onChange(null)}},onStageTop:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>
0){for(var a=0,b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;){var c=b[a];++a;p.area.pickInstance(c.value)!=null&&p.area.setPropertyNum(c.value,"y",0)}this.onChange(null)}},onStageBottom:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>0){for(var a=0,b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;){var c=b[a];++a;var d=p.area.pickInstance(c.value);d!=null&&(p.orientation=="horizontal"?p.area.setPropertyNum(c.value,"y",p.mdata.screen.small-d.get_height()):p.area.setPropertyNum(c.value,
"y",p.mdata.screen.big-d.get_height()))}this.onChange(null)}},onStageMiddle:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>0){for(var a=0,b=this.ui.lists.h.ilist.get_selectedItems();a<b.length;){var c=b[a];++a;var d=p.area.pickInstance(c.value);d!=null&&(p.orientation=="horizontal"?p.area.setPropertyNum(c.value,"y",p.mdata.screen.small/2-d.get_height()/2):p.area.setPropertyNum(c.value,"y",p.mdata.screen.big/2-d.get_height()/2))}this.onChange(null)}},onSelectionLeft:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>
1){for(var a=null,b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;){var d=c[b];++b;var f=p.area.pickInstance(d.value);f!=null&&(a==null||a>f.get_x())&&(a=f.get_x())}b=0;for(c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;)d=c[b],++b,f=p.area.pickInstance(d.value),f!=null&&p.area.setPropertyNum(d.value,"x",a);this.onChange(null)}},onSelectionRight:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>1){for(var a=null,b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;){var d=
c[b];++b;var f=p.area.pickInstance(d.value);f!=null&&(a==null||a<f.get_x()+f.get_width())&&(a=f.get_x()+f.get_width())}b=0;for(c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;)d=c[b],++b,f=p.area.pickInstance(d.value),f!=null&&p.area.setPropertyNum(d.value,"x",a-f.get_width());this.onChange(null)}},onSelectionCenter:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>1){for(var a=null,b=null,c=null,d=0,f=this.ui.lists.h.ilist.get_selectedItems();d<f.length;){var g=f[d];++d;var h=
p.area.pickInstance(g.value);if(h!=null){if(a==null||a>h.get_x())a=h.get_x();if(b==null||b<h.get_x()+h.get_width())b=h.get_x()+h.get_width();c=a+b/2}}d=0;for(f=this.ui.lists.h.ilist.get_selectedItems();d<f.length;)g=f[d],++d,h=p.area.pickInstance(g.value),h!=null&&p.area.setPropertyNum(g.value,"x",c-h.get_width()/2);this.onChange(null)}},onSelectionTop:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>1){for(var a=null,b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;){var d=
c[b];++b;var f=p.area.pickInstance(d.value);f!=null&&(a==null||a>f.get_y())&&(a=f.get_y())}b=0;for(c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;)d=c[b],++b,f=p.area.pickInstance(d.value),f!=null&&p.area.setPropertyNum(d.value,"y",a);this.onChange(null)}},onSelectionBottom:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>1){for(var a=null,b=0,c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;){var d=c[b];++b;var f=p.area.pickInstance(d.value);f!=null&&(a==null||a<f.get_y()+
f.get_height())&&(a=f.get_y()+f.get_height())}b=0;for(c=this.ui.lists.h.ilist.get_selectedItems();b<c.length;)d=c[b],++b,f=p.area.pickInstance(d.value),f!=null&&p.area.setPropertyNum(d.value,"y",a-f.get_height());this.onChange(null)}},onSelectionMiddle:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>1){for(var a=null,b=null,c=null,d=0,f=this.ui.lists.h.ilist.get_selectedItems();d<f.length;){var g=f[d];++d;var h=p.area.pickInstance(g.value);if(h!=null){if(a==null||a>h.get_y())a=h.get_y();
if(b==null||b<h.get_y()+h.get_height())b=h.get_y()+h.get_height();c=a+b/2}}d=0;for(f=this.ui.lists.h.ilist.get_selectedItems();d<f.length;)g=f[d],++d,h=p.area.pickInstance(g.value),h!=null&&p.area.setPropertyNum(g.value,"y",c-h.get_height()/2);this.onChange(null)}},onDistributeH:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>2){for(var a=null,b=null,c=null,d=0,f=[],g=0,h=this.ui.lists.h.ilist.get_selectedItems();g<h.length;){var n=h[g];++g;n=p.area.pickInstance(n.value);if(n!=null){if(a==
null||a>n.get_x())a=n.get_x();if(b==null||b<n.get_x()+n.get_width())b=n.get_x()+n.get_width();d+=n.get_width();c=b-a;f.push(n)}}if(f.length>2){c=(c-d)/(f.length-1);f.sort(function(l,q){return l.get_x()<q.get_x()?-1:l.get_x()>q.get_x()?1:0});g=1;for(h=f.length;g<h;)a=g++,b=f[a-1].get_x()+f[a-1].get_width()+c,f[a].set_x(b);this.onChange(null)}}},onDistributeV:function(){if(this.ui.lists.h.ilist.get_selectedItems().length>2){for(var a=null,b=null,c=null,d=0,f=[],g=0,h=this.ui.lists.h.ilist.get_selectedItems();g<
h.length;){var n=h[g];++g;n=p.area.pickInstance(n.value);if(n!=null){if(a==null||a>n.get_y())a=n.get_y();if(b==null||b<n.get_y()+n.get_height())b=n.get_y()+n.get_height();d+=n.get_height();c=b-a;f.push(n)}}if(f.length>2){c=(c-d)/(f.length-1);f.sort(function(l,q){return l.get_y()<q.get_y()?-1:l.get_y()>q.get_y()?1:0});g=1;for(h=f.length;g<h;)a=g++,b=f[a-1].get_y()+f[a-1].get_height()+c,f[a].set_y(b);this.onChange(null)}}},__class__:et});var ft=function(){this._current=0;this._icons=[];Uc.call(this);
this.set_width(this.set_height(150));var a=new Za;a.set_fill(ub.SolidColor(0,0));this.set_backgroundSkin(a);a=new Ma(Z.getBitmapData("tilBuci01"));a.smoothing=!0;a.set_alpha(.8);a.set_x((150-a.get_width())/2);a.set_y((150-a.get_height())/2);this._icons.push(a);a=new Ma(Z.getBitmapData("tilBuci02"));a.smoothing=!0;a.set_alpha(.8);a.set_x((150-a.get_width())/2);a.set_y((150-a.get_height())/2);this._icons.push(a);a=new Ma(Z.getBitmapData("tilBuci03"));a.smoothing=!0;a.set_alpha(.8);a.set_x((150-a.get_width())/
2);a.set_y((150-a.get_height())/2);this._icons.push(a);a=new Ma(Z.getBitmapData("tilBuci04"));a.smoothing=!0;a.set_alpha(.8);a.set_x((150-a.get_width())/2);a.set_y((150-a.get_height())/2);this._icons.push(a)};t["com.tilbuci.ui.component.Interacting"]=ft;ft.__name__="com.tilbuci.ui.component.Interacting";ft.__super__=Uc;ft.prototype=I(Uc.prototype,{_icons:null,_current:null,_timer:null,start:function(){var a=this;if(this._timer!=null){try{this._timer.stop()}catch(b){}this._timer=null}this._timer=new Gc(250);
this._timer.run=function(){a._current++;a._current>=a._icons.length&&(a._current=0);a.removeChildren();a.addChild(a._icons[a._current])};k.stage!=null&&Aa.addPopUp(this,k.stage)},stop:function(){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}k.stage!=null&&Aa.removePopUp(this)},__class__:ft});var gt=function(a){this._current=null;ze.call(this,k.ln.get("rightbar-media"),a);this.ui.createHContainer("playback",3355443);var b=this.ui,c=Z.getBitmapData("btPlay"),d=this.ui.hcontainers.h.playback;
b.createIconButton("play",m(this,this.onPlay),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btPause");d=this.ui.hcontainers.h.playback;b.createIconButton("pause",m(this,this.onPause),new Ma(c),null,d);b=this.ui;c=Z.getBitmapData("btStop");d=this.ui.hcontainers.h.playback;b.createIconButton("stop",m(this,this.onStop),new Ma(c),null,d);b=this.ui;c={tp:"Label",id:"name",tx:k.ln.get("rightbar-media-name"),vr:""};d={tp:"Label",id:"collection",tx:k.ln.get("rightbar-media-collection"),vr:""};var f={tp:"Button",
id:"collection",tx:k.ln.get("rightbar-media-collectioned"),ac:m(this,this.onCollection)},g={tp:"Label",id:"asset",tx:k.ln.get("rightbar-media-asset"),vr:""},h={tp:"Button",id:"asset",tx:k.ln.get("rightbar-media-asseted"),ac:m(this,this.onAsset)},n={tp:"Label",id:"playonload",tx:k.ln.get("rightbar-media-playonload"),vr:""},l={tp:"Button",id:"update",tx:k.ln.get("rightbar-media-update"),ac:m(this,this.onUpdate)},q={tp:"Button",id:"cache",tx:k.ln.get("rightbar-media-cache"),ac:m(this,this.onCache)},
u=k.ln.get("rightbar-media-remove");this._content=b.forge("properties",[c,{tp:"TInput",id:"name",tx:"",vr:""},d,{tp:"Select",id:"collection",vl:[],sl:null,ch:m(this,this.changeCol)},f,g,{tp:"Select",id:"asset",vl:[],sl:null},h,n,{tp:"Toggle",id:"playonload",vl:!0},{tp:"Spacer",id:"update",ht:5},l,{tp:"Spacer",id:"cache",ht:10},q,{tp:"Button",id:"remove",tx:u,ac:m(this,this.onRemove)},{tp:"Spacer",id:"playback",ht:10},{tp:"Custom",cont:this.ui.hcontainers.h.playback}],3355443,a-5);this.ui.hcontainers.h.playback.setWidth(Math.round(a-
5));this.ui.containers.h.properties.set_enabled(!1);k.history.propDisplay.push(m(this,this.updateValues))};t["com.tilbuci.ui.component.MediaPanel"]=gt;gt.__name__="com.tilbuci.ui.component.MediaPanel";gt.__super__=ze;gt.prototype=I(ze.prototype,{_current:null,instanceNamePanelUpdate:null,updateContent:function(a){Object.prototype.hasOwnProperty.call(a.h,"nm")?a.h.nm==""?this.clearValues():(this._current=p.area.instanceRef(a.h.nm),this.updateValues()):this.clearValues()},reloadContent:function(a){this.clearValues()},
updateValues:function(){if(this._current!=null){this.ui.containers.h.properties.set_enabled(!1);var a=[],b=p.movie.collections.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];a.push({text:p.movie.collections.h[f].name,value:f})}this.ui.setSelectOptions("collection",a);this.ui.setSelectValue("collection",this._current.getCurrentStr("collection"));a=[];b=p.movie.collections;c=this._current.getCurrentStr("collection");if(Object.prototype.hasOwnProperty.call(b.h,c)){b=p.movie.collections;
c=this._current.getCurrentStr("collection");b=b.h[c].assets.h;d=Object.keys(b);f=d.length;for(var g=0;g<f;){var h=d[g++];b=p.movie.collections;c=this._current.getCurrentStr("collection");a.push({text:b.h[c].assets.h[h].name,value:h})}}this.ui.setSelectOptions("asset",a);this.ui.setSelectValue("asset",this._current.getCurrentStr("asset"));this.ui.inputs.h.name.set_text(this._current.getCurrentStr("instance"));a=this.ui.toggles.h.playonload;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this._current.getInstName();
a.set_selected(b.h[c].playOnLoad);this.ui.containers.h.properties.set_enabled(!0)}},clearValues:function(){this.ui.containers.h.properties.set_enabled(!1);this.ui.setSelectOptions("collection",[]);this.ui.setSelectOptions("asset",[]);this.ui.inputs.h.name.set_text("");this.ui.toggles.h.playonload.set_selected(!0);this._current=null},changeCol:function(a){if(this._current!=null&&this.ui.containers.h.properties.get_enabled()){a=[];var b=p.movie.collections,c=this.ui.selects.h.collection.get_selectedItem().value;
if(Object.prototype.hasOwnProperty.call(b.h,c)){b=p.movie.collections;c=this.ui.selects.h.collection.get_selectedItem().value;for(var d=Object.keys(b.h[c].assets.h),f=d.length,g=0;g<f;){var h=d[g++];b=p.movie.collections;c=this.ui.selects.h.collection.get_selectedItem().value;a.push({text:b.h[c].assets.h[h].name,value:h})}}this.ui.setSelectOptions("asset",a);this.ui.setSelectValue("asset",this._current.getCurrentStr("asset"))}},onCollection:function(a){if(this._current!=null){a=this.startWindow;var b=
new G,c=this._current.getCurrentStr("instance");b.h.instance=c;c=this._current.getCurrentStr("collection");b.h.collection=c;c=this._current.getCurrentStr("asset");b.h.asset=c;a("collectionbase",b)}},onAsset:function(a){if(this._current!=null){a=this.startWindow;var b=new G,c=this._current.getCurrentStr("instance");b.h.instance=c;c=this._current.getCurrentStr("collection");b.h.collection=c;c=this._current.getCurrentStr("asset");b.h.asset=c;a("assetbase",b)}},onUpdate:function(a){if(this.ui.inputs.h.name.get_text()==
""||this.ui.inputs.h.name.get_text().length<3)k.showMsg(k.ln.get("rightbar-media-noid"));else{k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));a=p.movie.scene.keyframes[p.area.get_currentKf()];var b=this._current.getInstName();a.h[b].playOnLoad!=this.ui.toggles.h.playonload.get_selected()?(a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this._current.getInstName(),a.h[b].playOnLoad=this.ui.toggles.h.playonload.get_selected(),a=p.movie.scene.keyframes[p.area.get_currentKf()],
b=this.ui.inputs.h.name.get_text(),Object.prototype.hasOwnProperty.call(a.h,b)&&p.area.setCurrentStr("instance",this.ui.inputs.h.name.get_text()),a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this._current.getInstName(),a.h[b].collection==this.ui.selects.h.collection.get_selectedItem().value?(a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this._current.getInstName(),a=a.h[b].asset!=this.ui.selects.h.asset.get_selectedItem().value):a=!0,a&&p.area.setCurrentStr("asset",H.string(this.ui.selects.h.collection.get_selectedItem().value)+
"|:|"+H.string(this.ui.selects.h.asset.get_selectedItem().value)),k.history.addState(k.ln.get("rightbar-history-instance"))):(a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this._current.getInstName(),a.h[b].collection==this.ui.selects.h.collection.get_selectedItem().value?(a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this._current.getInstName(),a=a.h[b].asset!=this.ui.selects.h.asset.get_selectedItem().value):a=!0,a?(p.area.setCurrentStr("asset",H.string(this.ui.selects.h.collection.get_selectedItem().value)+
"|:|"+H.string(this.ui.selects.h.asset.get_selectedItem().value)),a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this.ui.inputs.h.name.get_text(),Object.prototype.hasOwnProperty.call(a.h,b)&&p.area.setCurrentStr("instance",this.ui.inputs.h.name.get_text()),k.history.addState(k.ln.get("rightbar-history-instance"))):(a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this.ui.inputs.h.name.get_text(),Object.prototype.hasOwnProperty.call(a.h,b)?k.showPopup(k.ln.get("rightbar-media"),k.ln.get("rightbar-media-idtaken"),
300,180,k.ln.get("default-ok")):(a=this._current.getInstName(),p.area.setCurrentStr("instance",this.ui.inputs.h.name.get_text()),k.history.addState(k.ln.get("rightbar-history-instance")),this.instanceNamePanelUpdate!=null&&this.instanceNamePanelUpdate(a,this.ui.inputs.h.name.get_text()))))}},onCache:function(a){this._current.getInstName()!=""&&(this._current.getInstName(),k.showPopup(k.ln.get("rightbar-media"),k.ln.get("rightbar-media-precachecheck"),300,220,k.ln.get("default-ok"),m(this,this.onCacheConfirm),
"confirm",k.ln.get("default-cancel")))},onCacheConfirm:function(a){a&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentPrecache(),this.ui.toggles.h.playonload.set_selected(!1),k.history.addState(k.ln.get("rightbar-history-cache")))},onRemove:function(a){this._current.getInstName()!=""&&(this._current.getInstName(),k.showPopup(k.ln.get("rightbar-media"),k.ln.get("rightbar-media-removecheck"),300,220,k.ln.get("default-ok"),m(this,this.onRemoveConfirm),
"confirm",k.ln.get("default-cancel")))},onRemoveConfirm:function(a){a&&this._current.getInstName()!=""&&(a=this._current.getInstName(),p.area.imgSelect(),p.area.removeInstance(a),this.clearValues())},onPlay:function(a){this._current==null||this._current.get_currentType()!="video"&&this._current.get_currentType()!="audio"||this._current.play()},onPause:function(a){this._current==null||this._current.get_currentType()!="video"&&this._current.get_currentType()!="audio"||this._current.pause()},onStop:function(a){this._current==
null||this._current.get_currentType()!="video"&&this._current.get_currentType()!="audio"||(this._current.stop(),this._current.seek(0))},__class__:gt});var ht=function(a,b,c){c==null&&(c=500);b==null&&(b=500);fa.call(this);this._type=a;this._wd=b;this._ht=c;this.set_alpha(0);switch(a){case "audio":this._audio=new de(m(this,this.onAudio),null);this.addChild(this._audio);this.createPlayback();break;case "html":this._html=new Uo(m(this,this.onHtml));this.addChild(this._html);break;case "picture":this._loader=
new Vf;this._loader.contentLoaderInfo.addEventListener("complete",m(this,this.onPicture));this.addChild(this._loader);break;case "spritemap":this._spritemap=new Ok(m(this,this.onSpritemap));this.addChild(this._spritemap);break;case "video":this._video=new un(m(this,this.onVideo),null),this.addChild(this._video),this.createPlayback()}};t["com.tilbuci.ui.component.MediaPreview"]=ht;ht.__name__="com.tilbuci.ui.component.MediaPreview";ht.__super__=fa;ht.prototype=I(fa.prototype,{_type:null,_wd:null,_ht:null,
_controls:null,_loader:null,_video:null,_audio:null,_html:null,_spritemap:null,setSpritemap:function(a,b){this._type=="spritemap"&&(this._spritemap.frames=a,this._spritemap.frtime=b,this._spritemap.get_mediaLoaded()&&this._spritemap.load(this._spritemap.get_lastMedia()))},createPlayback:function(){this._controls=new fa;var a=new Ma(Z.getBitmapData("btPlay"));a.smoothing=!0;a.set_width(a.set_height(20));var b=new Xb;b.set_icon(a);b.addEventListener("trigger",m(this,this.onPlay));this._controls.addChild(b);
a=new Ma(Z.getBitmapData("btStop"));a.smoothing=!0;a.set_width(a.set_height(20));b=new Xb;b.set_icon(a);b.addEventListener("trigger",m(this,this.onStop));b.set_y(0);b.set_x(50);this._controls.addChild(b);this.addChild(this._controls);this._controls.set_x(0);this._controls.set_y(this._ht-10-this._controls.get_height())},hide:function(){this.set_alpha(0);switch(this._type){case "audio":this._audio.set_visible(!1);break;case "html":this._html.set_visible(!1);break;case "picture":this._loader.unload();
break;case "spritemap":this._spritemap.set_visible(!1);break;case "video":this._video.set_visible(!1)}},preview:function(a){switch(this._type){case "audio":this._audio.load(a);this._audio.set_visible(!1);this.set_alpha(1);break;case "html":this._html.load(a);this._html.set_visible(!1);this.set_alpha(1);break;case "picture":this._loader.load(new se(a+"?rand="+Math.random()*1E4));this.set_alpha(1);break;case "spritemap":this._spritemap.load(a);this._spritemap.set_visible(!1);this.set_alpha(1);break;
case "video":this._video.load(a),this._video.set_visible(!1),this.set_alpha(1)}},onPlay:function(a){switch(this._type){case "audio":this._audio.play();break;case "video":this._video.play()}},onStop:function(a){switch(this._type){case "audio":this._audio.stop();break;case "video":this._video.stop()}},onPicture:function(a){this._loader.content.get_height()>this._loader.content.get_width()?(this._loader.set_height(this._ht),this._loader.set_width(this._loader.content.get_width()*(this._ht/this._loader.content.get_height()))):
(this._loader.set_width(this._wd),this._loader.set_height(this._loader.content.get_height()*(this._wd/this._loader.content.get_width())));this._loader.set_x((this._wd-this._loader.get_width())/2);this._loader.set_y((this._ht-this._loader.get_height())/2)},onVideo:function(a){a?(this._video.oHeight+this._controls.get_height()+20>this._video.oWidth?(this._video.set_height(this._ht-this._controls.get_height()-20),this._video.set_width(this._video.oWidth*(this._video.get_height()/this._video.oHeight))):
(this._video.set_width(this._wd),this._video.set_height(this._wd/this._video.oWidth*this._video.oHeight)),this._video.set_x((this._wd-this._video.get_width())/2),this._video.set_y((this._ht-this._controls.get_height()-20-this._video.get_height())/2),this._video.stop(),this._video.set_visible(!0)):(this._video.set_visible(!1),k.showMsg(k.ln.get("window-mdvideo-loaderror")))},onHtml:function(a){a?(this._html.set_width(this._wd),this._html.set_height(this._ht),this._html.set_visible(!0)):(this._html.set_visible(!1),
k.showMsg(k.ln.get("window-mdhtml-loaderror")))},onAudio:function(a){a?(this._audio.stop(),this._audio.set_visible(!0)):k.showMsg(k.ln.get("window-mdaudio-loaderror"))},onSpritemap:function(a){a?(this._spritemap.oHeight>this._spritemap.oWidth?(this._spritemap.set_height(this._ht),this._spritemap.set_width(this._spritemap.oWidth*(this._spritemap.get_height()/this._spritemap.oHeight))):(this._spritemap.set_width(this._wd),this._spritemap.set_height(this._wd/this._spritemap.oWidth*this._spritemap.oHeight)),
this._spritemap.set_x((this._wd-this._spritemap.get_width())/2),this._spritemap.set_y(40+(this._ht-this._spritemap.get_height())/2),this._spritemap.set_visible(!0)):(this._spritemap.set_visible(!1),k.showMsg(k.ln.get("window-mdspritemap-loaderror")))},__class__:ht});var Rs=function(a){this._acupd=null;Uc.call(this);this._acupd=a;a=new zg;a.set_gap(2);a.setPadding(10);a.set_horizontalAlign(Wb.CENTER);this.set_layout(a);a=new Za;a.set_fill(ub.SolidColor(10066329));this.set_backgroundSkin(a);this._mvIcon=
new Ma(Z.getBitmapData("btMovie"));this._mvIcon.smoothing=!0;this._mvIcon.set_width(this._mvIcon.set_height(22));this._movie=new ia;this._movie.set_variant(ia.VARIANT_DETAIL);this._movie.set_text("");this._scIcon=new Ma(Z.getBitmapData("btScene"));this._scIcon.smoothing=!0;this._scIcon.set_width(this._scIcon.set_height(22));this._scene=new ia;this._scene.set_variant(ia.VARIANT_DETAIL);this._scene.set_text("");this._msg=new ia;this._msg.set_text("");k.showMsg=m(this,this.showMsg);this.addEventListener("click",
m(this,this.onCallout))};t["com.tilbuci.ui.component.MovieInfoDisplay"]=Rs;Rs.__name__="com.tilbuci.ui.component.MovieInfoDisplay";Rs.__super__=Uc;Rs.prototype=I(Uc.prototype,{_movie:null,_scene:null,_mvIcon:null,_scIcon:null,_msg:null,_timer:null,_acupd:null,onUpdate:function(){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this.removeChildren();p.movie.get_mvId()!=""&&(this._movie.set_text(p.mdata.title),this.addChild(this._mvIcon),this.addChild(this._movie));p.movie.get_scId()!=
""&&(this._scene.set_text(p.movie.scene.title),this.addChild(this._scIcon),this.addChild(this._scene));this._acupd!=null&&this._acupd()},showMsg:function(a){this.removeChildren();this._msg.set_text(a);this.addChild(this._msg);if(this._timer!=null){try{this._timer.stop()}catch(b){}this._timer=null}this._timer=new Gc(2E3);this._timer.run=m(this,this.onUpdate)},onCallout:function(a){a="";p.movie.get_mvId()!=""&&(a+=p.mdata.title+"\n(ID "+p.movie.get_mvId()+")");p.movie.get_scId()!=""&&(a+="\n"+p.movie.scene.title+
"\n(ID "+p.movie.get_scId()+")");a!=""&&Ye.show(a,this,fA.fromRelativePosition(ra.TOP))},__class__:Rs});var it=function(a){this._current=null;ze.call(this,k.ln.get("rightbar-properties"),a);this._timer=null;var b=this.ui.createHContainer("orderbuttons",3355443);this.ui.createIconButton("orderdown",m(this,this.onOrderDown),new Ma(Z.getBitmapData("iconDown")),null,b);this.ui.createIconButton("orderup",m(this,this.onOrderUp),new Ma(Z.getBitmapData("iconUp")),null,b);b.set_width(a-5);var c=this.ui.createHContainer("xbuttons",
3355443);this.ui.createIconButton("xleft",m(this,this.onXLeft),new Ma(Z.getBitmapData("btToLeft")),null,c);this.ui.createIconButton("xcenter",m(this,this.onXCenter),new Ma(Z.getBitmapData("btToCenter")),null,c);this.ui.createIconButton("xright",m(this,this.onXRight),new Ma(Z.getBitmapData("btToRight")),null,c);c.set_width(a-5);var d=this.ui.createHContainer("xbuttons",3355443);this.ui.createIconButton("ytop",m(this,this.onYTop),new Ma(Z.getBitmapData("btToTop")),null,d);this.ui.createIconButton("ymiddle",
m(this,this.onYMiddle),new Ma(Z.getBitmapData("btToMiddle")),null,d);this.ui.createIconButton("ybottom",m(this,this.onYBottom),new Ma(Z.getBitmapData("btToDown")),null,d);d.set_width(a-5);var f=this.ui,g={tp:"Label",id:"px",tx:k.ln.get("rightbar-properties-px"),vr:""},h={tp:"Label",id:"py",tx:k.ln.get("rightbar-properties-py"),vr:""},n={tp:"Label",id:"width",tx:k.ln.get("rightbar-properties-width"),vr:""},l={tp:"Label",id:"height",tx:k.ln.get("rightbar-properties-height"),vr:""},q={tp:"Button",id:"awidth",
tx:k.ln.get("rightbar-properties-awidth"),cl:m(this,this.onAdjustWidth)},u={tp:"Button",id:"aheight",tx:k.ln.get("rightbar-properties-aheight"),cl:m(this,this.onAdjustHeight)},v={tp:"Button",id:"soriginal",tx:k.ln.get("rightbar-properties-soriginal"),cl:m(this,this.onAdjustOriginal)},z={tp:"Label",id:"order",tx:k.ln.get("rightbar-properties-order"),vr:""},r={tp:"Label",id:"visible",tx:k.ln.get("rightbar-properties-visible"),vr:""},F=k.ln.get("rightbar-properties-rotation");this._content=f.forge("properties",
[g,{tp:"Numeric",id:"px",mn:-1E4,mx:1E5,st:1,vl:0,ch:m(this,this.changeProperties)},{tp:"Custom",cont:c},h,{tp:"Numeric",id:"py",mn:-1E4,mx:1E5,st:1,vl:0,ch:m(this,this.changeProperties)},{tp:"Custom",cont:d},n,{tp:"Numeric",id:"width",mn:-1E4,mx:1E5,st:1,vl:0,ch:m(this,this.changeProperties)},l,{tp:"Numeric",id:"height",mn:-1E4,mx:1E5,st:1,vl:0,ch:m(this,this.changeProperties)},q,u,v,z,{tp:"Custom",cont:b},r,{tp:"Toggle",id:"visible",vl:!1,ch:m(this,this.changeProperties)},{tp:"Label",id:"rotation",
tx:F,vr:""},{tp:"Numeric",id:"rotation",mn:-1E4,mx:1E5,st:1,vl:0,ch:m(this,this.changeProperties)}],3355443,a-5);this.ui.containers.h.properties.set_enabled(!1);k.history.propDisplay.push(m(this,this.updateValues))};t["com.tilbuci.ui.component.PropertiesPanel"]=it;it.__name__="com.tilbuci.ui.component.PropertiesPanel";it.__super__=ze;it.prototype=I(ze.prototype,{_timer:null,_current:null,updateContent:function(a){Object.prototype.hasOwnProperty.call(a.h,"nm")?a.h.nm==""?this.clearValues():(this._current=
p.area.instanceRef(a.h.nm),this.updateValues()):this.clearValues()},reloadContent:function(a){this.clearValues()},updateValues:function(){this._current!=null&&(this.ui.containers.h.properties.set_enabled(!1),this.ui.numerics.h.px.set_value(Math.round(this._current.getCurrentNum("x"))),this.ui.numerics.h.py.set_value(Math.round(this._current.getCurrentNum("y"))),this.ui.numerics.h.width.set_value(Math.round(this._current.getCurrentNum("width"))),this.ui.numerics.h.height.set_value(Math.round(this._current.getCurrentNum("height"))),
this.ui.numerics.h.rotation.set_value(Math.round(this._current.getCurrentNum("rotation"))),this.ui.toggles.h.visible.set_selected(this._current.getCurrentBool("visible")),this.ui.containers.h.properties.set_enabled(!0))},clearValues:function(){this.ui.containers.h.properties.set_enabled(!1);this.ui.numerics.h.px.set_value(0);this.ui.numerics.h.py.set_value(0);this.ui.numerics.h.width.set_value(0);this.ui.numerics.h.height.set_value(0);this.ui.numerics.h.rotation.set_value(0);this.ui.toggles.h.visible.set_selected(!0);
this._current=null},changeProperties:function(a){this._current!=null&&this.ui.containers.h.properties.get_enabled()&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentNum("x",this.ui.numerics.h.px.get_value()),p.area.setCurrentNum("y",this.ui.numerics.h.py.get_value()),p.area.setCurrentNum("width",this.ui.numerics.h.width.get_value()),p.area.setCurrentNum("height",this.ui.numerics.h.height.get_value()),p.area.setCurrentNum("rotation",this.ui.numerics.h.rotation.get_value()),
p.area.setCurrentBool("visible",this.ui.toggles.h.visible.get_selected()),this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory)))},onAdjustWidth:function(a){this.ui.containers.h.properties.set_enabled(!1);this._current.oHeight()>0&&(a=this._current.oWidth()*this.ui.numerics.h.height.get_value()/this._current.oHeight(),k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentNum("width",a),this.ui.numerics.h.width.set_value(Math.round(a)),
this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory)));this.ui.containers.h.properties.set_enabled(!0)},onAdjustOriginal:function(a){this.ui.containers.h.properties.set_enabled(!1);this._current.oWidth()>0&&this._current.oHeight()>0&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentNum("width",this._current.oWidth()),p.area.setCurrentNum("height",this._current.oHeight()),this.ui.numerics.h.width.set_value(Math.round(this._current.oWidth())),
this.ui.numerics.h.height.set_value(Math.round(this._current.oHeight())),this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory)));this.ui.containers.h.properties.set_enabled(!0)},onAdjustHeight:function(a){this.ui.containers.h.properties.set_enabled(!1);this._current.oWidth()>0&&(a=this._current.oHeight()*this.ui.numerics.h.width.get_value()/this._current.oWidth(),k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentNum("height",
a),this.ui.numerics.h.height.set_value(Math.round(a)),this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory)));this.ui.containers.h.properties.set_enabled(!0)},onOrderDown:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));p.area.orderDown();this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory))},onOrderUp:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));
p.area.orderUp();this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory))},onXLeft:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));p.area.setCurrentNum("x",0);this.ui.numerics.h.px.set_value(Math.round(this._current.getCurrentNum("x")));this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory))},onXRight:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));
p.orientation=="horizontal"?p.area.setCurrentNum("x",p.mdata.screen.big-this._current.getCurrentNum("width")):p.area.setCurrentNum("x",p.mdata.screen.small-this._current.getCurrentNum("width"));this.ui.numerics.h.px.set_value(Math.round(this._current.getCurrentNum("x")));this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory))},onXCenter:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));p.orientation=="horizontal"?p.area.setCurrentNum("x",
(p.mdata.screen.big-this._current.getCurrentNum("width"))/2):p.area.setCurrentNum("x",(p.mdata.screen.small-this._current.getCurrentNum("width"))/2);this.ui.numerics.h.px.set_value(Math.round(this._current.getCurrentNum("x")));this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory))},onYTop:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));p.area.setCurrentNum("y",0);this.ui.numerics.h.py.set_value(Math.round(this._current.getCurrentNum("y")));
this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory))},onYBottom:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));p.orientation=="horizontal"?p.area.setCurrentNum("y",p.mdata.screen.small-this._current.getCurrentNum("height")):p.area.setCurrentNum("y",p.mdata.screen.big-this._current.getCurrentNum("height"));this.ui.numerics.h.py.set_value(Math.round(this._current.getCurrentNum("y")));this._timer==null&&(this._timer=
new Gc(2E3),this._timer.run=m(this,this.saveHistory))},onYMiddle:function(a){k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original"));p.orientation=="horizontal"?p.area.setCurrentNum("y",(p.mdata.screen.small-this._current.getCurrentNum("height"))/2):p.area.setCurrentNum("y",(p.mdata.screen.big-this._current.getCurrentNum("height"))/2);this.ui.numerics.h.py.set_value(Math.round(this._current.getCurrentNum("y")));this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=
m(this,this.saveHistory))},saveHistory:function(){try{this._timer.stop()}catch(a){}this._timer=null;k.history.addState(k.ln.get("rightbar-history-placement"))},__class__:it});var jt=function(a){this._current=null;ze.call(this,k.ln.get("rightbar-sound"),a);this._timer=null;this._content=this.ui.forge("properties",[{tp:"Label",id:"volume",tx:k.ln.get("rightbar-sound-volume"),vr:""},{tp:"Numeric",id:"volume",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)}],3355443,a-5);this.ui.containers.h.properties.set_enabled(!1);
k.history.propDisplay.push(m(this,this.updateValues))};t["com.tilbuci.ui.component.SoundPanel"]=jt;jt.__name__="com.tilbuci.ui.component.SoundPanel";jt.__super__=ze;jt.prototype=I(ze.prototype,{_timer:null,_current:null,updateContent:function(a){Object.prototype.hasOwnProperty.call(a.h,"nm")?a.h.nm==""?this.clearValues():(this._current=p.area.instanceRef(a.h.nm),this.updateValues()):this.clearValues()},reloadContent:function(a){this.clearValues()},updateValues:function(){this._current!=null&&(this.ui.containers.h.properties.set_enabled(!1),
this.ui.numerics.h.volume.set_value(Math.round(this._current.getCurrentNum("volume")*100)),this.ui.containers.h.properties.set_enabled(!0))},clearValues:function(){this.ui.containers.h.properties.set_enabled(!1);this.ui.numerics.h.volume.set_value(0);this._current=null},changeProperties:function(a){this._current!=null&&this.ui.containers.h.properties.get_enabled()&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentNum("volume",this.ui.numerics.h.volume.get_value()/
100),this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory)))},saveHistory:function(){try{this._timer.stop()}catch(a){}this._timer=null;k.history.addState(k.ln.get("rightbar-history-sound"))},__class__:jt});var kt=function(a){this._current=null;ze.call(this,k.ln.get("rightbar-text"),a);this._timer=null;var b=this.ui.createHContainer("colorcont",3355443);this.ui.createTInput("color","","",b);this.ui.createButton("color",k.ln.get("default-set"),m(this,this.changeProperties),
b);b.set_width(a-5);var c=this.ui.createHContainer("bgcolorcont",3355443);this.ui.createTInput("background","","",c);this.ui.createButton("background",k.ln.get("default-set"),m(this,this.changeProperties),c);c.set_width(a-5);var d=this.ui,f={tp:"Label",id:"font",tx:k.ln.get("rightbar-text-font"),vr:""},g={tp:"Label",id:"size",tx:k.ln.get("rightbar-text-size"),vr:""},h={tp:"Label",id:"color",tx:k.ln.get("rightbar-text-color"),vr:""},n={tp:"Label",id:"bold",tx:k.ln.get("rightbar-text-bold"),vr:""},
l={tp:"Label",id:"italic",tx:k.ln.get("rightbar-text-italic"),vr:""},q={tp:"Label",id:"leading",tx:k.ln.get("rightbar-text-leading"),vr:""},u={tp:"Label",id:"align",tx:k.ln.get("rightbar-text-align"),vr:""},v={tp:"Select",id:"align",vl:[{text:k.ln.get("rightbar-text-alleft"),value:"left"},{text:k.ln.get("rightbar-text-alright"),value:"right"},{text:k.ln.get("rightbar-text-alcenter"),value:"center"},{text:k.ln.get("rightbar-text-aljustify"),value:"justify"}],sl:"left",ch:m(this,this.changeProperties)},
z=k.ln.get("rightbar-text-background");this._content=d.forge("properties",[f,{tp:"Select",id:"font",vl:[],sl:null,ch:m(this,this.changeProperties)},g,{tp:"Numeric",id:"size",mn:4,mx:1E3,st:1,vl:12,ch:m(this,this.changeProperties)},h,{tp:"Custom",cont:b},n,{tp:"Toggle",id:"bold",vl:!1,ch:m(this,this.changeProperties)},l,{tp:"Toggle",id:"italic",vl:!1,ch:m(this,this.changeProperties)},q,{tp:"Numeric",id:"leading",mn:-1E3,mx:1E3,st:1,vl:0,ch:m(this,this.changeProperties)},u,v,{tp:"Label",id:"background",
tx:z,vr:""},{tp:"Custom",cont:c}],3355443,a-5);this.ui.containers.h.properties.set_enabled(!1);k.history.propDisplay.push(m(this,this.updateValues));this.ui.createNumeric("spacing",-100,100,1,0)};t["com.tilbuci.ui.component.TextPanel"]=kt;kt.__name__="com.tilbuci.ui.component.TextPanel";kt.__super__=ze;kt.prototype=I(ze.prototype,{_timer:null,_current:null,updateContent:function(a){Object.prototype.hasOwnProperty.call(a.h,"nm")?a.h.nm==""?this.clearValues():(this._current=p.area.instanceRef(a.h.nm),
this.updateValues()):this.clearValues()},reloadContent:function(a){this.clearValues()},updateValues:function(){if(this._current!=null){this.ui.containers.h.properties.set_enabled(!1);for(var a=[],b=0,c=k.fonts.length;b<c;){var d=b++;a.push({text:k.fonts[d],value:k.fonts[d]})}b=0;for(c=p.mdata.fonts;b<c.length;)d=c[b],++b,a.push({text:d.name,value:d.name});this.ui.setSelectOptions("font",a);this.ui.setSelectValue("font",this._current.getCurrentStr("textfont"));this.ui.inputs.h.color.set_text(N.replace(this._current.getCurrentStr("textcolor"),
"0x","#"));this.ui.toggles.h.bold.set_selected(this._current.getCurrentBool("textbold"));this.ui.toggles.h.italic.set_selected(this._current.getCurrentBool("textitalic"));this.ui.numerics.h.size.set_value(Math.round(this._current.getCurrentNum("textsize")));this.ui.numerics.h.leading.set_value(Math.round(this._current.getCurrentNum("textleading")));this.ui.numerics.h.spacing.set_value(Math.round(this._current.getCurrentNum("textspacing")*100));this.ui.setSelectValue("align",this._current.getCurrentStr("textalign"));
this.ui.inputs.h.background.set_text(N.replace(this._current.getCurrentStr("textbackground"),"0x","#"));this.ui.containers.h.properties.set_enabled(!0)}},clearValues:function(){this.ui.containers.h.properties.set_enabled(!1);this.ui.setSelectOptions("font",[]);this.ui.setSelectValue("font","");this.ui.inputs.h.color.set_text("");this.ui.toggles.h.bold.set_selected(!1);this.ui.toggles.h.italic.set_selected(!1);this.ui.numerics.h.size.set_value(12);this.ui.numerics.h.leading.set_value(0);this.ui.numerics.h.spacing.set_value(0);
this.ui.setSelectValue("align","left");this.ui.inputs.h.background.set_text("");this._current=null},changeProperties:function(a){this._current!=null&&this.ui.containers.h.properties.get_enabled()&&(k.history.states.length==0&&k.history.addState(k.ln.get("rightbar-history-original")),p.area.setCurrentStr("textfont",this.ui.selects.h.font.get_selectedItem().value),a=N.replace(this.ui.inputs.h.color.get_text(),"#","0x"),a=H.parseInt(a),a=a==null?"0xFFFFFF":"0x"+N.hex(a),p.area.setCurrentStr("textcolor",
a),this.ui.inputs.h.color.set_text(N.replace(a,"0x","#")),p.area.setCurrentBool("textbold",this.ui.toggles.h.bold.get_selected()),p.area.setCurrentBool("textitalic",this.ui.toggles.h.italic.get_selected()),p.area.setCurrentNum("textsize",this.ui.numerics.h.size.get_value()),p.area.setCurrentNum("textleading",this.ui.numerics.h.leading.get_value()),p.area.setCurrentNum("textspacing",this.ui.numerics.h.spacing.get_value()/100),p.area.setCurrentStr("textalign",this.ui.selects.h.align.get_selectedItem().value),
a=N.replace(this.ui.inputs.h.background.get_text(),"#","0x"),a!=""&&(a=H.parseInt(a),a=a==null?"":"0x"+N.hex(a)),p.area.setCurrentStr("textbackground",a),this.ui.inputs.h.background.set_text(N.replace(a,"0x","#")),p.area.applyText(),this._timer==null&&(this._timer=new Gc(2E3),this._timer.run=m(this,this.saveHistory)))},saveHistory:function(){try{this._timer.stop()}catch(a){}this._timer=null;k.history.addState(k.ln.get("rightbar-history-text"))},__class__:kt});var Bs=function(a){ea.call(this,a,k.ln.get("window-actions-title"),
980,Bc.pickValue(540,560),!1,!0)};t["com.tilbuci.ui.component.WindowAction"]=Bs;Bs.__name__="com.tilbuci.ui.component.WindowAction";Bs.__super__=ea;Bs.prototype=I(ea.prototype,{_acarea:null,_acok:null,_accancel:null,startInterface:function(a){this._acarea=new jj(956,446);a=this.ui.createHContainer("buttons");this.ui.createButton("btcancel",k.ln.get("window-actions-cancel"),m(this,this.onCancel),a,!1);this.ui.createButton("btok",k.ln.get("window-actions-ok"),m(this,this.onOk),a,!1);a.setWidth(956);
this.addForm(k.ln.get("window-actions-title"),this.ui.forge("ac",[{tp:"Custom",cont:this._acarea},{tp:"Custom",cont:a}],-1,450));ea.prototype.startInterface.call(this)},setContent:function(a,b,c){this._acarea.setText(a);this._acok=b;this._accancel=c},kill:function(){ea.prototype.kill.call(this)},onCancel:function(a){this._accancel!=null&&this._accancel();this._acok=this._accancel=null;this.closeWindow(null)},onOk:function(a){a=Ga.jsonParse(this._acarea.getText());this._acarea.getText()!=""&&a==0?
k.showPopup(k.ln.get("window-actions-title"),k.ln.get("window-actions-error"),300,180,k.ln.get("default-ok")):(this._acok!=null&&this._acok(this._acarea.getText()),this._acok=this._accancel=null,this.closeWindow(null))},__class__:Bs});var Cs=function(a){ea.call(this,a,k.ln.get("window-actions-block"),980,Bc.pickValue(540,550),!1,!0);a=this.ui;var b=this.ui.forge("left",[{tp:"Label",id:"groups",tx:k.ln.get("window-actions-blockgroups"),vr:""},{tp:"List",id:"groups",vl:[],sl:"",ht:440,ch:m(this,this.onGroupChange)}]),
c=this.ui,d={tp:"Label",id:"available",tx:k.ln.get("window-actions-blockavailable"),vr:""},f=k.ln.get("window-actions-blockcreate");this.addForm("blocks",a.createColumnHolder("available",b,c.forge("right",[d,{tp:"List",id:"available",vl:[],sl:"",ht:410},{tp:"Button",id:"add",tx:f,ac:m(this,this.onCreate)}])));this.ui.listDbClick("available",m(this,this.onCreate))};t["com.tilbuci.ui.component.WindowActionBlock"]=Cs;Cs.__name__="com.tilbuci.ui.component.WindowActionBlock";Cs.__super__=ea;Cs.prototype=
I(ea.prototype,{_onOk:null,acStart:function(){for(var a=[],b=0,c=0,d=k.acInfo.groups;c<d.length;){var f=d[c];++c;a.push({text:f.name,value:b});++b}this.ui.setListValues("groups",a);this.ui.setListValues("available",[]);this.ui.setListSelectValue("groups",null);this.ui.setListSelectValue("available",null)},setContent:function(a){this._onOk=a;this.acStart()},onCreate:function(a){this.ui.lists.h.available.get_selectedItem()!=null&&(k.showEditBlockWindow(this.ui.lists.h.available.get_selectedItem().value,
this._onOk),this._onOk=null,Aa.removePopUp(this))},onGroupChange:function(a){this.ui.setListValues("available",[]);this.ui.setListSelectValue("available",null);if(this.ui.lists.h.groups.get_selectedItem()!=null&&k.acInfo.groups.length>this.ui.lists.h.groups.get_selectedItem().value){a=[];for(var b=k.acInfo.groups[this.ui.lists.h.groups.get_selectedItem().value].actions.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.n,value:g.a})}this.ui.setListValues("available",a)}},__class__:Cs});
var Ds=function(a){this._mnPlacement=[];this._scDirections=[];this._mvOrigins=[];this._blindex=-1;ea.call(this,a,"",1100,Bc.pickValue(570,580),!1,!0);this._mvOrigins=[{text:k.ln.get("window-movieprop-oralpha"),value:"alpha"},{text:k.ln.get("window-movieprop-orcenter"),value:"center"},{text:k.ln.get("window-movieprop-ortop"),value:"top"},{text:k.ln.get("window-movieprop-ortopkeep"),value:"topkeep"},{text:k.ln.get("window-movieprop-orbottom"),value:"bottom"},{text:k.ln.get("window-movieprop-orbottomkeep"),
value:"bottomkeep"},{text:k.ln.get("window-movieprop-orleft"),value:"left"},{text:k.ln.get("window-movieprop-orleftkeep"),value:"leftkeep"},{text:k.ln.get("window-movieprop-orright"),value:"right"},{text:k.ln.get("window-movieprop-orrightkeep"),value:"rightkeep"}];this._scDirections=[{text:k.ln.get("window-movieprop-input-opup"),value:"up"},{text:k.ln.get("window-movieprop-input-opdown"),value:"down"},{text:k.ln.get("window-movieprop-input-opleft"),value:"left"},{text:k.ln.get("window-movieprop-input-opright"),
value:"right"},{text:k.ln.get("window-movieprop-input-opnin"),value:"nin"},{text:k.ln.get("window-movieprop-input-opnout"),value:"nout"}];this._mnPlacement=[{text:k.ln.get("placement-center"),value:"center"},{text:k.ln.get("placement-centerleft"),value:"centerleft"},{text:k.ln.get("placement-centerright"),value:"centerright"},{text:k.ln.get("placement-top"),value:"top"},{text:k.ln.get("placement-topleft"),value:"topleft"},{text:k.ln.get("placement-topright"),value:"topright"},{text:k.ln.get("placement-bottom"),
value:"bottom"},{text:k.ln.get("placement-bottomleft"),value:"bottomleft"},{text:k.ln.get("placement-bottomright"),value:"bottomright"},{text:k.ln.get("placement-absolute"),value:"absolute"}];this.ui.createHContainer("assets");this.ui.createSelect("assets",[],null,this.ui.hcontainers.h.assets,!1);this.ui.hcontainers.h.assets.addChild(new Rc("cpasset",m(this,this.onAsset),k.ln.get("window-acinstance-cpasset"),Z.getBitmapData("btCopy"),!1));this.ui.createHContainer("ggeneral");this.ui.createSelect("ggeneral",
[{text:k.ln.get("window-globals-playing"),value:"?_PLAYING",asset:"btBool"},{text:k.ln.get("window-globals-userlogged"),value:"?_USERLOGGED",asset:"btBool"},{text:k.ln.get("window-globals-hadinteraction"),value:"?_HADINTERACTION",asset:"btBool"},{text:k.ln.get("window-globals-server"),value:"?_SERVER",asset:"btBool"},{text:k.ln.get("window-globals-keyframe"),value:"#_KEYFRAME",asset:"btFloat"},{text:k.ln.get("window-globals-areabig"),value:"#_AREABIG",asset:"btFloat"},{text:k.ln.get("window-globals-areasmall"),
value:"#_AREASMALL",asset:"btFloat"},{text:k.ln.get("window-globals-contentx"),value:"#_CONTENTX",asset:"btFloat"},{text:k.ln.get("window-globals-contenty"),value:"#_CONTENTY",asset:"btFloat"},{text:k.ln.get("window-globals-contentwidth"),value:"#_CONTENTWIDTH",asset:"btFloat"},{text:k.ln.get("window-globals-contentheight"),value:"#_CONTENTHEIGHT",asset:"btFloat"},{text:k.ln.get("window-globals-movietitle"),value:"$_MOVIETITLE",asset:"btString"},{text:k.ln.get("window-globals-movieid"),value:"$_MOVIEID",
asset:"btString"},{text:k.ln.get("window-globals-scenetitle"),value:"$_SCENETITLE",asset:"btString"},{text:k.ln.get("window-globals-sceneid"),value:"$_SCENEID",asset:"btString"},{text:k.ln.get("window-globals-orientation"),value:"$_ORIENTATION",asset:"btString"},{text:k.ln.get("window-globals-urlmovie"),value:"$_URLMOVIE",asset:"btString"},{text:k.ln.get("window-globals-urlscene"),value:"$_URLSCENE",asset:"btString"},{text:k.ln.get("window-globals-username"),value:"$_USERNAME",asset:"btString"},{text:k.ln.get("window-globals-runtime"),
value:"$_RUNTIME",asset:"btString"},{text:k.ln.get("window-globals-wsserver"),value:"$_WSSERVER",asset:"btString"},{text:k.ln.get("window-globals-version"),value:"$_VERSION",asset:"btString"},{text:k.ln.get("window-globals-session"),value:"$_SESSION",asset:"btString"},{text:k.ln.get("window-globals-date"),value:"$_DATE",asset:"btString"},{text:k.ln.get("window-globals-time"),value:"$_TIME",asset:"btString"},{text:k.ln.get("window-globals-year"),value:"$_YEAR",asset:"btString"},{text:k.ln.get("window-globals-month"),
value:"$_MONTH",asset:"btString"},{text:k.ln.get("window-globals-day"),value:"$_DAY",asset:"btString"},{text:k.ln.get("window-globals-hour"),value:"$_HOUR",asset:"btString"},{text:k.ln.get("window-globals-minute"),value:"$_MINUTE",asset:"btString"},{text:k.ln.get("window-globals-second"),value:"$_SECOND",asset:"btString"}],null,this.ui.hcontainers.h.ggeneral,!1);this.ui.hcontainers.h.ggeneral.addChild(new Rc("ggeneral",m(this,this.onGeneral),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"),
!1));this.ui.createHContainer("ginstancep");this.ui.createSelect("ginstancep",[{text:k.ln.get("window-globals-instplaying"),value:"?_INSTANCEPLAYING:"},{text:k.ln.get("window-globals-instvisible"),value:"?_INSTANCEVISIBLE:"},{text:k.ln.get("window-globals-instfontbold"),value:"?_INSTANCEFONTBOLD:"},{text:k.ln.get("window-globals-instfontitalic"),value:"?_INSTANCEFONTITALIC:"},{text:k.ln.get("window-acinstance-px"),value:"#_INSTANCEX:"},{text:k.ln.get("window-acinstance-py"),value:"#_INSTANCEY:"},
{text:k.ln.get("window-acinstance-pwidth"),value:"#_INSTANCEWIDTH:"},{text:k.ln.get("window-acinstance-pheight"),value:"#_INSTANCEHEIGHT:"},{text:k.ln.get("window-acinstance-palpha"),value:"#_INSTANCEALPHA:"},{text:k.ln.get("window-acinstance-pvolume"),value:"#_INSTANCEVOLUME:"},{text:k.ln.get("window-acinstance-porder"),value:"#_INSTANCEORDER:"},{text:k.ln.get("window-acinstance-pcoloralpha"),value:"#_INSTANCECOLORALPHA:"},{text:k.ln.get("window-acinstance-protation"),value:"#_INSTANCEROTATION:"},
{text:k.ln.get("window-acinstance-pfontsize"),value:"#_INSTANCEFONTSIZE:"},{text:k.ln.get("window-acinstance-pfontleading"),value:"#_INSTANCEFONTLEADING:"},{text:k.ln.get("window-acinstance-pcolor"),value:"$_INSTANCECOLOR:"},{text:k.ln.get("window-globals-insttext"),value:"$_INSTANCETEXT:"},{text:k.ln.get("window-acinstance-pfont"),value:"$_INSTANCEFONT:"},{text:k.ln.get("window-acinstance-pfontcolor"),value:"$_INSTANCEFONTCOLOR:"}],null,this.ui.hcontainers.h.ginstancep,!1);this.ui.hcontainers.h.ginstancep.addChild(new Rc("instance",
m(this,this.onInstance),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"),!1));this.ui.createHContainer("gname");this.ui.createTInput("gname","","",this.ui.hcontainers.h.gname,!1);this.ui.hcontainers.h.gname.addChild(new Rc("movie",m(this,this.onMovie),k.ln.get("window-globals-get"),Z.getBitmapData("btCopy"),!1));a=k.ln.get("acblock-parameters");var b=this.ui,c=this.ui.forge("paramleft",[]),d=this.ui,f={tp:"Label",id:"collections",tx:k.ln.get("window-acinstance-collections"),vr:""},g={tp:"Label",
id:"assets",tx:k.ln.get("window-acinstance-assets"),vr:ia.VARIANT_DETAIL},h={tp:"Custom",cont:this.ui.hcontainers.h.assets},n={tp:"Label",id:"ggeneral",tx:k.ln.get("window-globals-general"),vr:""},l={tp:"Custom",cont:this.ui.hcontainers.h.ggeneral},q={tp:"Label",id:"ginstance",tx:k.ln.get("window-globals-instance"),vr:""},u={tp:"Custom",cont:this.ui.hcontainers.h.ginstancep},v={tp:"Label",id:"gmovie",tx:k.ln.get("window-globals-movie"),vr:""},z={tp:"Select",id:"gmovie",vl:[{text:k.ln.get("window-globals-text"),
value:"$_TEXTS:"},{text:k.ln.get("window-globals-number"),value:"#_NUMBERS:"},{text:k.ln.get("window-globals-flag"),value:"?_FLAGS:"},{text:k.ln.get("window-acinput-text"),value:"$_INPUT:"},{text:k.ln.get("window-acform-text"),value:"$_FORM:"},{text:k.ln.get("window-acparam-text"),value:"$_PARAM:"},{text:k.ln.get("window-acnumeric-text"),value:"#_NUMERIC:"},{text:k.ln.get("window-actoggle-text"),value:"?_TOGGLE:"}],sl:[],ht:95},r={tp:"Label",id:"gname",tx:k.ln.get("window-globals-name"),vr:ia.VARIANT_DETAIL},
F={tp:"Custom",cont:this.ui.hcontainers.h.gname},J=k.ln.get("acblock-valcopy");this.addForm(a,b.createColumnHolder("available",c,d.forge("paramright",[f,{tp:"Select",id:"collections",vl:[],sl:[],ch:m(this,this.onCollection)},g,h,{tp:"Spacer",id:"assets",ht:4,ln:!1},n,l,{tp:"Spacer",id:"ggeneral",ht:4,ln:!1},q,{tp:"Select",id:"ginstancen",vl:[],sl:[]},u,{tp:"Spacer",id:"gmovie",ht:4,ln:!1},v,z,r,F,{tp:"Spacer",id:"showAction",ht:5,ln:!1},{tp:"Label",id:"showAction",tx:J,vr:""},{tp:"TInput",id:"showAction",
tx:""}]),this.ui.forge("parambottom",[{tp:"Button",id:"blbutton",tx:k.ln.get("acblock-button"),ac:m(this,this.onClick)}]),460));this.ui.containers.h.parambottom.set_width(1100);this.ui.hcontainers.h.assets.setWidth(510);this.ui.hcontainers.h.ggeneral.setWidth(510);this.ui.hcontainers.h.ginstancep.setWidth(510);this.ui.hcontainers.h.gname.setWidth(510);for(a=0;a<8;)b=a++,this.ui.createLabel("param-"+b,"#"+(b+1),ia.VARIANT_DETAIL),this.ui.createTInput("param-"+b),this.ui.createHContainer("param-"+b),
this.ui.createSelect("param-"+b,[],null,this.ui.hcontainers.h["param-"+b]),this.ui.createLabel("paramor-"+b,k.ln.get("acblock-or"),ia.VARIANT_DETAIL,this.ui.hcontainers.h["param-"+b]),this.ui.createTInput("paramor-"+b,"","",this.ui.hcontainers.h["param-"+b]),this.ui.hcontainers.h["param-"+b].setWidth(400,[175,30,175]),this.ui.labels.h["param-"+b].set_width(this.ui.inputs.h["param-"+b].set_width(this.ui.selects.h["param-"+b].set_width(510)))};t["com.tilbuci.ui.component.WindowBlockEdit"]=Ds;Ds.__name__=
"com.tilbuci.ui.component.WindowBlockEdit";Ds.__super__=ea;Ds.prototype=I(ea.prototype,{_blindex:null,_onOk:null,_acinfo:null,_blac:null,_mvOrigins:null,_scDirections:null,_mnPlacement:null,acStart:function(){this._head.set_text(this._acinfo.n);for(var a=[],b=Object.keys(p.movie.collections.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:p.movie.collections.h[f].name,value:f})}this.ui.setSelectOptions("collections",a);this.onCollection();a=[];b=0;for(c=p.area.getInstances();b<c.length;)f=c[b],++b,
a.push({text:f,value:f});this.ui.setListValues("list",a);this.ui.setSelectOptions("ginstancen",a);this.ui.containers.h.paramleft.removeChildren();for(b=0;b<8;)if(f=b++,this._acinfo.p.length>f){this.ui.labels.h["param-"+f].set_text(this._acinfo.p[f].n);this.ui.containers.h.paramleft.addChild(this.ui.labels.h["param-"+f]);this.ui.hcontainers.h["param-"+f].setWidth(510,[230,30,230]);this.ui.inputs.h["param-"+f].set_text("");this.ui.inputs.h["paramor-"+f].set_text("");switch(this._acinfo.p[f].v){case "instances":this.ui.setSelectOptions("param-"+
f,a);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "movies":this.ui.setSelectOptions("param-"+f,k.acInfo.selMovies);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "navigation":this.ui.setSelectOptions("param-"+f,this._scDirections);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "origins":this.ui.setSelectOptions("param-"+f,this._mvOrigins);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+
f]);break;case "placement":this.ui.setSelectOptions("param-"+f,this._mnPlacement);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "scenes":this.ui.setSelectOptions("param-"+f,k.acInfo.selScenes);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;default:this.ui.inputs.h["param-"+f].set_text(""),this.ui.containers.h.paramleft.addChild(this.ui.inputs.h["param-"+f])}this._blac!=null&&this._blac.param.length>f&&(this._acinfo.p[f].v==
""?this.ui.inputs.h["param-"+f].set_text(this._blac.param[f]):this.ui.setSelectValue("param-"+f,this._blac.param[f])||this.ui.inputs.h["paramor-"+f].set_text(this._blac.param[f]))}else this.ui.labels.h["param-"+f].set_text("#"+(f+1)),this.ui.containers.h.paramleft.addChild(this.ui.labels.h["param-"+f]),this.ui.inputs.h["param-"+f].set_text(""),this.ui.containers.h.paramleft.addChild(this.ui.inputs.h["param-"+f]),this._blac!=null&&this._blac.param.length>f&&this.ui.inputs.h["param-"+f].set_text(this._blac.param[f])},
setContent:function(a,b,c,d){this._onOk=b;this._blindex=c;this._blac=d;this._acinfo=new Qs({n:a,a,p:[],e:[]});b=0;for(c=k.acInfo.groups;b<c.length;)d=c[b],++b,Object.prototype.hasOwnProperty.call(d.actions.h,a)&&(this._acinfo=d.actions.h[a]);this.acStart()},onClick:function(a){a=!0;for(var b=[],c=0;c<8;){var d=c++;if(a)if(this._acinfo.p.length>d){var f=this._acinfo.p[d].v==""?this.ui.inputs.h["param-"+d].get_text():this.ui.inputs.h["paramor-"+d].get_text()!=""?this.ui.inputs.h["paramor-"+d].get_text():
this.ui.selects.h["param-"+d].get_selectedItem().value;if(f==""&&this._acinfo.p[d].t!="e")a=!1,k.showPopup(k.ln.get("acblock-errortitle"),k.ln.get("acblock-noparam")+this._acinfo.p[d].n,480,180,k.ln.get("default-ok"));else{switch(this._acinfo.p[d].t){case "b":V.substr(f,0,1)!="?"&&(f=f.toLowerCase(),f!="true"&&f!="false"&&f!="1"&&f!="0"&&(a=!1,k.showPopup(k.ln.get("acblock-errortitle"),k.ln.get("acblock-paramtype")+this._acinfo.p[d].n+k.ln.get("acblock-parambool"),480,180,k.ln.get("default-ok"))));
break;case "f":V.substr(f,0,1)=="#"||parseFloat(f)!=null&&parseFloat(f)!=NaN||(a=!1,k.showPopup(k.ln.get("acblock-errortitle"),k.ln.get("acblock-paramtype")+this._acinfo.p[d].n+k.ln.get("acblock-paramfloat"),480,180,k.ln.get("default-ok")));break;case "i":V.substr(f,0,1)=="#"||parseFloat(f)!=null&&parseFloat(f)!=NaN||(a=!1,k.showPopup(k.ln.get("acblock-errortitle"),k.ln.get("acblock-paramtype")+this._acinfo.p[d].n+k.ln.get("acblock-paramint"),480,180,k.ln.get("default-ok")));break;case "s":if(V.substr(f,
0,1)=="?"||V.substr(f,0,1)=="#")a=!1,k.showPopup(k.ln.get("acblock-errortitle"),k.ln.get("acblock-paramtype")+this._acinfo.p[d].n+k.ln.get("acblock-paramstring"),480,180,k.ln.get("default-ok"));break;case "v":V.substr(f,0,1)!="?"&&V.substr(f,0,1)!="#"&&V.substr(f,0,1)!="$"&&(a=!1,k.showPopup(k.ln.get("acblock-errortitle"),k.ln.get("acblock-paramtype")+this._acinfo.p[d].n+k.ln.get("acblock-paramvariable"),480,180,k.ln.get("default-ok")))}a&&b.push(f)}}else this.ui.inputs.h["param-"+d].get_text()!=
""&&b.push(this.ui.inputs.h["param-"+d].get_text())}a&&(this._blac!=null?(this._blac.param=b,this._onOk(!1)):(a={ac:this._acinfo.a,param:b},this._acinfo.e.length>0&&(a[this._acinfo.e[0]]="[ ]"),this._acinfo.e.length>1&&(a[this._acinfo.e[1]]="[ ]"),this._onOk(a)),this._blac=null,Aa.removePopUp(this))},onCollection:function(a){if(this.ui.selects.h.collections.get_selectedItem()!=null){a=[];for(var b=p.movie.collections,c=this.ui.selects.h.collections.get_selectedItem().value,d=Object.keys(b.h[c].assets.h),
f=d.length,g=0;g<f;){var h=d[g++];b=p.movie.collections;c=this.ui.selects.h.collections.get_selectedItem().value;a.push({text:b.h[c].assets.h[h].name,value:h})}this.ui.setSelectOptions("assets",a);this.ui.setSelectValue("assets",null)}},onAsset:function(a){this.ui.selects.h.assets.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.assets.get_selectedItem().value),k.copyText(this.ui.selects.h.assets.get_selectedItem().value))},onGeneral:function(a){this.ui.selects.h.ggeneral.get_selectedItem()!=
null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.ggeneral.get_selectedItem().value),k.copyText(this.ui.selects.h.ggeneral.get_selectedItem().value))},onInstance:function(a){this.ui.selects.h.ginstancep.get_selectedItem()!=null&&this.ui.selects.h.ginstancen.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.ginstancep.get_selectedItem().value+this.ui.selects.h.ginstancen.get_selectedItem().value),k.copyText(this.ui.selects.h.ginstancep.get_selectedItem().value+
this.ui.selects.h.ginstancen.get_selectedItem().value))},onMovie:function(a){this.ui.selects.h.gmovie.get_selectedItem()!=null&&this.ui.inputs.h.gname.get_text()!=""&&(this.ui.inputs.h.showAction.set_text(H.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()),k.copyText(H.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()))},__class__:Ds});var $q=function(a){this._addButtons=new G;Rh.call(this);this.set_layoutData(fd.fill());
this.set_backgroundSkin(new rh);this.set_width(this.set_minWidth(this.set_maxWidth(150)));this.ui=new Bc;this._action=a;this._topArea=new je;a=new uf;a.set_gap(10);a.set_verticalAlign(hc.TOP);this._topArea.set_layout(a);this._topArea.set_backgroundSkin(new rh);this._topArea.setPadding(10);this.addChild(this._topArea);this._bottomArea=new je;a=new uf;a.set_gap(10);a.set_verticalAlign(hc.BOTTOM);this._bottomArea.set_layout(a);this._bottomArea.set_backgroundSkin(new rh);this._bottomArea.setPadding(10);
this._bottomArea.set_height(this._bottomArea.set_maxHeight(this._bottomArea.set_minHeight(160)));this.addChild(this._bottomArea);this.createButton("btMovie",k.ln.get("leftbar-movie"),"btMovie",m(this,this.btMovie),this._topArea);this.createButton("btScene",k.ln.get("leftbar-scene"),"btScene",m(this,this.btScene),this._topArea);this.createButton("btKeyframe",k.ln.get("leftbar-keyframe"),"btKeyframe",m(this,this.btKeyframe),this._topArea);this.createButton("btMedia",k.ln.get("leftbar-media"),"btMedia",
m(this,this.btMedia),this._topArea);this.createButton("btContraptions",k.ln.get("leftbar-contraptions"),"btContraptions",m(this,this.btContraption),this._topArea);this.createButton("btNarrative",k.ln.get("leftbar-narrative"),"btNarrative",m(this,this.btNarrative),this._topArea);this.createButton("btExchange",k.ln.get("leftbar-exchange"),"btExchange",m(this,this.btExchange),this._topArea);this.createButton("btVisitors",k.ln.get("leftbar-visitors"),"btVisitors",m(this,this.btVisitors),this._topArea);
this.createButton("btSetup",k.ln.get("leftbar-setup"),"btSetup",m(this,this.btSetup),this._topArea);this.createButton("btWorkspace",k.ln.get("leftbar-workspace"),"btWorkspace",m(this,this.btWorkspace),this._bottomArea);this.createButton("btFullscreen",k.ln.get("leftbar-fullscreen"),"btFullscreen",m(this,this.btFullscreen),this._bottomArea);this.createButton("btToggle",k.ln.get("leftbar-toggle"),"btToggle",m(this,this.btToggle),this._bottomArea)};t["com.tilbuci.ui.main.LeftInterface"]=$q;$q.__name__=
"com.tilbuci.ui.main.LeftInterface";$q.__super__=Rh;$q.prototype=I(Rh.prototype,{_topArea:null,_bottomArea:null,_action:null,_addButtons:null,ui:null,addButton:function(a,b,c,d){d==null&&(d="btPlugin");c==null&&(c=!0);c?(c=this._addButtons,b=this.createButton(a,a,d,b,this._topArea)):(c=this._addButtons,b=this.createButton(a,a,d,b,this._bottomArea));c.h[a]=b},kill:function(){this.removeChildren();this._topArea.removeChildren();this._bottomArea.removeChildren();this._action=this._bottomArea=this._topArea=
null;this.ui.kill();this.ui=null},createButton:function(a,b,c,d,f){a=this.ui.createIconButton(a,d,new Ma(Z.getBitmapData(c)),b,f);a.set_horizontalAlign(Wb.LEFT);a.set_height(30);a.set_width(130);return a},btMovie:function(a){this._action("movie")},btScene:function(a){this._action("scene")},btKeyframe:function(a){this._action("keyframe")},btMedia:function(a){this._action("media")},btContraption:function(a){this._action("contraptions")},btNarrative:function(a){this._action("narrative")},btExchange:function(a){this._action("exchange")},
btVisitors:function(a){this._action("visitors")},btSetup:function(a){this._action("setup")},btToggle:function(a){if(this.ui.buttons.h.btToggle.get_width()>100){this.set_width(this.set_minWidth(this.set_maxWidth(60)));this.setSize(60,this.get_height());a=this.ui.buttons.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this.ui.buttons.h[d].set_width(40);this.ui.buttons.h[d].set_text("")}this._action("close-interface")}else{this.set_width(this.set_minWidth(this.set_maxWidth(150)));this.setSize(150,
this.get_height());a=this.ui.buttons.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.ui.buttons.h[d].set_width(130);this.ui.buttons.h.btMovie.set_text(k.ln.get("leftbar-movie"));this.ui.buttons.h.btScene.set_text(k.ln.get("leftbar-scene"));this.ui.buttons.h.btKeyframe.set_text(k.ln.get("leftbar-keyframe"));this.ui.buttons.h.btMedia.set_text(k.ln.get("leftbar-media"));this.ui.buttons.h.btContraptions.set_text(k.ln.get("leftbar-contraptions"));this.ui.buttons.h.btNarrative.set_text(k.ln.get("leftbar-narrative"));
this.ui.buttons.h.btSetup.set_text(k.ln.get("leftbar-setup"));this.ui.buttons.h.btFullscreen.set_text(k.ln.get("leftbar-fullscreen"));this.ui.buttons.h.btWorkspace.set_text(k.ln.get("leftbar-workspace"));this.ui.buttons.h.btToggle.set_text(k.ln.get("leftbar-toggle"));this.ui.buttons.h.btExchange.set_text(k.ln.get("leftbar-exchange"));this.ui.buttons.h.btVisitors.set_text(k.ln.get("leftbar-visitors"));a=this._addButtons.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this._addButtons.h[d].set_text(d);
this._action("open-interface")}},btFullscreen:function(a){this.stage.get_displayState()==2?this.stage.set_displayState(0):this.stage.set_displayState(2)},btWorkspace:function(a){k.ws.openWorkspace()},__class__:$q});var cr=function(a,b){this._panels=[];je.call(this);var c=new uf;c.set_gap(2);c.setPadding(0);this.set_layout(c);c=new Za;c.set_fill(ub.SolidColor(6710886));this.set_backgroundSkin(c);this.set_maxWidth(this.set_minWidth(this.set_width(220)));this._panels.push(new et(200));this._panels.push(new gt(200));
this._panels.push(new it(200));this._panels.push(new Zs(200));this._panels.push(new kt(200));this._panels.push(new Xs(200));this._panels.push(new jt(200));this._panels.push(new $s(200));this._panels.push(new at(200,a));this._panels[1].startWindow=b;this._panels[5].startWindow=b;a=this._panels[0];b=this._panels[1];b.instanceNamePanelUpdate=m(a,a.instanceRename);this._panels[1]=b;this._panels[0].callbacks.push((B=this._panels[1],m(B,B.updateContent)));this._panels[0].callbacks.push((B=this._panels[2],
m(B,B.updateContent)));this._panels[0].callbacks.push((B=this._panels[3],m(B,B.updateContent)));this._panels[0].callbacks.push((B=this._panels[4],m(B,B.updateContent)));this._panels[0].callbacks.push((B=this._panels[5],m(B,B.updateContent)));this._panels[0].callbacks.push((B=this._panels[6],m(B,B.updateContent)));this._panels[0].callbacks.push((B=this._panels[7],m(B,B.updateContent)));this._panels[0].callbacks.push((B=this._panels[8],m(B,B.updateContent)));a=0;for(b=this._panels;a<b.length;)c=b[a],
++a,this.addChild(c);this.set_scrollPolicyX(Me.OFF);this.addEventListener("resize",m(this,this.onResize))};t["com.tilbuci.ui.main.RightInterface"]=cr;cr.__name__="com.tilbuci.ui.main.RightInterface";cr.__super__=je;cr.prototype=I(je.prototype,{_panels:null,updateInstances:function(){this._panels[0].reloadContent();this._panels[1].reloadContent();this._panels[2].reloadContent();this._panels[3].reloadContent();this._panels[4].reloadContent();this._panels[5].reloadContent();this._panels[6].reloadContent();
this._panels[7].reloadContent();this._panels[8].reloadContent()},setInstance:function(a){this._panels[0].updateContent(a);this._panels[1].updateContent(a);this._panels[2].updateContent(a);this._panels[3].updateContent(a);this._panels[4].updateContent(a);this._panels[5].updateContent(a);this._panels[6].updateContent(a);this._panels[7].updateContent(a)},onResize:function(a){a=0;for(var b=this._panels;a<b.length;){var c=b[a];++a;c.setWd(this.get_width())}},__class__:cr});var Ed=function(a,b){Uc.call(this);
this.set_backgroundSkin(new rh(6710886));this._ac=a;this.ui=new Bc;this._head=new Mi;this._head.set_text(b);this.set_header(this._head);a=this.ui.createIconButton("btBack",m(this,this.closeMenu),new Ma(Z.getBitmapData("btBack")));a.set_horizontalAlign(Wb.LEFT);a.set_width(40);a.set_height(30);this._head.set_leftView(a);this._holder=new je;this._holder.set_layout(new Gi);this._holder.set_backgroundSkin(new rh(6710886));a=new uf;a.setPadding(10);a.set_gap(10);a.set_verticalAlign(hc.TOP);this._holder.set_layout(a);
this.addChild(this._holder)};t["com.tilbuci.ui.menu.DrawerMenu"]=Ed;Ed.__name__="com.tilbuci.ui.menu.DrawerMenu";Ed.__super__=Uc;Ed.prototype=I(Uc.prototype,{_head:null,_holder:null,_ac:null,ui:null,onShow:function(){},kill:function(){this.removeChildren();this._head.set_leftView(null);this._head=null;this._holder.removeChildren();this._holder=null;this.ui.kill();this.ui=null},addButton:function(a,b,c,d){a=d==null?this.ui.createButton(a,b,c,this._holder):this.ui.createIconButton(a,c,d,b,this._holder);
a.set_width(200);a.set_horizontalAlign(Wb.LEFT);return a},closeMenu:function(a){this._ac("menu-close")},__class__:Ed});var gr=function(a){Ed.call(this,a,k.ln.get("menu-contraptions-title"));this.addButton("btCover",k.ln.get("menu-contraptions-cover"),m(this,this.onCover));this.addButton("btBackground",k.ln.get("menu-contraptions-background"),m(this,this.onBackground));this.addButton("btMenus",k.ln.get("menu-contraptions-menus"),m(this,this.onMenus));this.addButton("btMusic",k.ln.get("menu-contraptions-music"),
m(this,this.onMusic));this.addButton("btSound",k.ln.get("menu-contraptions-sound"),m(this,this.onSound));this.addButton("btForms",k.ln.get("menu-contraptions-forms"),m(this,this.onForms));this.addButton("btInterfaces",k.ln.get("menu-contraptions-interfaces"),m(this,this.onInterfaces));this.addButton("btTargets",k.ln.get("menu-contraptions-targets"),m(this,this.onTargets));this.addButton("btMessages",k.ln.get("menu-contraptions-messages"),m(this,this.onMessages))};t["com.tilbuci.ui.menu.MenuContraptions"]=
gr;gr.__name__="com.tilbuci.ui.menu.MenuContraptions";gr.__super__=Ed;gr.prototype=I(Ed.prototype,{onShow:function(){Ed.prototype.onShow.call(this);p.movie.get_mvId()==""||k.ws.get_level()>50?(this.ui.buttons.h.btMenus.set_enabled(!1),this.ui.buttons.h.btCover.set_enabled(!1),this.ui.buttons.h.btMenus.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btCover.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btMusic.set_enabled(!1),this.ui.buttons.h.btMusic.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),
this.ui.buttons.h.btSound.set_enabled(!1),this.ui.buttons.h.btSound.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btForms.set_enabled(!1),this.ui.buttons.h.btForms.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btInterfaces.set_enabled(!1),this.ui.buttons.h.btInterfaces.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btTargets.set_enabled(!1),this.ui.buttons.h.btTargets.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btMessages.set_enabled(!1),
this.ui.buttons.h.btMessages.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btBackground.set_enabled(!1),this.ui.buttons.h.btBackground.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess"))):(this.ui.buttons.h.btMenus.set_enabled(!0),this.ui.buttons.h.btMenus.set_toolTip(null),this.ui.buttons.h.btCover.set_enabled(!0),this.ui.buttons.h.btCover.set_toolTip(null),this.ui.buttons.h.btMusic.set_enabled(!0),this.ui.buttons.h.btMusic.set_toolTip(null),this.ui.buttons.h.btSound.set_enabled(!0),
this.ui.buttons.h.btSound.set_toolTip(null),this.ui.buttons.h.btForms.set_enabled(!0),this.ui.buttons.h.btForms.set_toolTip(null),this.ui.buttons.h.btInterfaces.set_enabled(!0),this.ui.buttons.h.btInterfaces.set_toolTip(null),this.ui.buttons.h.btTargets.set_enabled(!0),this.ui.buttons.h.btTargets.set_toolTip(null),this.ui.buttons.h.btMessages.set_enabled(!0),this.ui.buttons.h.btMessages.set_toolTip(null),this.ui.buttons.h.btBackground.set_enabled(!0),this.ui.buttons.h.btBackground.set_toolTip(null))},
kill:function(){Ed.prototype.kill.call(this)},onMenus:function(a){this._ac("menus")},onCover:function(a){this._ac("cover")},onMusic:function(a){this._ac("music")},onSound:function(a){this._ac("sound")},onForms:function(a){this._ac("form")},onInterfaces:function(a){this._ac("interfaces")},onTargets:function(a){this._ac("targets")},onMessages:function(a){this._ac("messages")},onBackground:function(a){this._ac("background")},__class__:gr});var ir=function(a){Ed.call(this,a,k.ln.get("menu-exhange-title"));
this.addButton("btExport",k.ln.get("menu-exchange-export"),m(this,this.onExport));this.addButton("btWebsite",k.ln.get("menu-exchange-site"),m(this,this.onWebsite));this.addButton("btIframe",k.ln.get("menu-exchange-iframe"),m(this,this.onIframe));this.addButton("btPwa",k.ln.get("menu-exchange-pwa"),m(this,this.onPwa));this.addButton("btPublish",k.ln.get("menu-exchange-publish"),m(this,this.onPublish));this.addButton("btDesktop",k.ln.get("menu-exchange-desktop"),m(this,this.onDesktop));this.addButton("btCordova",
k.ln.get("menu-exchange-cordova"),m(this,this.onCordova));this.addButton("btImport",k.ln.get("menu-exchange-import"),m(this,this.onImport))};t["com.tilbuci.ui.menu.MenuExchange"]=ir;ir.__name__="com.tilbuci.ui.menu.MenuExchange";ir.__super__=Ed;ir.prototype=I(Ed.prototype,{onShow:function(){Ed.prototype.onShow.call(this);k.ws.get_level()<=50?(this.ui.buttons.h.btImport.set_enabled(!0),this.ui.buttons.h.btImport.set_toolTip(null)):(this.ui.buttons.h.btImport.set_enabled(!1),this.ui.buttons.h.btImport.set_toolTip(k.ln.get("tooltip-movie-nolevel")));
p.movie.get_mvId()!=""&&k.mvOwner?(this.ui.buttons.h.btExport.set_enabled(!0),this.ui.buttons.h.btIframe.set_enabled(!0),this.ui.buttons.h.btWebsite.set_enabled(!0),this.ui.buttons.h.btPwa.set_enabled(!0),this.ui.buttons.h.btPublish.set_enabled(!0),this.ui.buttons.h.btDesktop.set_enabled(!0),this.ui.buttons.h.btCordova.set_enabled(!0),this.ui.buttons.h.btExport.set_toolTip(null),this.ui.buttons.h.btIframe.set_toolTip(null),this.ui.buttons.h.btPwa.set_toolTip(null),this.ui.buttons.h.btPublish.set_toolTip(null),
this.ui.buttons.h.btDesktop.set_toolTip(null),this.ui.buttons.h.btCordova.set_toolTip(null)):(this.ui.buttons.h.btExport.set_enabled(!1),this.ui.buttons.h.btIframe.set_enabled(!1),this.ui.buttons.h.btWebsite.set_enabled(!1),this.ui.buttons.h.btPwa.set_enabled(!1),this.ui.buttons.h.btPublish.set_enabled(!1),this.ui.buttons.h.btDesktop.set_enabled(!1),this.ui.buttons.h.btCordova.set_enabled(!1),this.ui.buttons.h.btExport.set_toolTip(k.ln.get("tooltip-movie-nomovieowner")),this.ui.buttons.h.btIframe.set_toolTip(k.ln.get("tooltip-movie-nomovieowner")),
this.ui.buttons.h.btPwa.set_toolTip(k.ln.get("tooltip-movie-nomovieowner")),this.ui.buttons.h.btPublish.set_toolTip(k.ln.get("tooltip-movie-nomovieowner")),this.ui.buttons.h.btDesktop.set_toolTip(k.ln.get("tooltip-movie-nomovieowner")),this.ui.buttons.h.btCordova.set_toolTip(k.ln.get("tooltip-movie-nomovieowner")))},kill:function(){Ed.prototype.kill.call(this)},onExport:function(a){this._ac("export")},onWebsite:function(a){this._ac("website")},onIframe:function(a){this._ac("iframe")},onPwa:function(a){this._ac("pwa")},
onPublish:function(a){this._ac("publish")},onDesktop:function(a){this._ac("desktop")},onCordova:function(a){this._ac("cordova")},onImport:function(a){this._ac("import")},__class__:ir});var jr=function(a){Ed.call(this,a,k.ln.get("menu-keyframe-title"));this.addButton("btAdd",k.ln.get("menu-keyframe-add"),m(this,this.onAdd));this.addButton("btRemove",k.ln.get("menu-keyframe-remove"),m(this,this.onRemove));this.addButton("btManage",k.ln.get("menu-keyframe-manage"),m(this,this.onManage))};t["com.tilbuci.ui.menu.MenuKeyframe"]=
jr;jr.__name__="com.tilbuci.ui.menu.MenuKeyframe";jr.__super__=Ed;jr.prototype=I(Ed.prototype,{onShow:function(){Ed.prototype.onShow.call(this);p.movie.get_mvId()==""||p.movie.get_scId()==""?(this.ui.buttons.h.btAdd.set_enabled(!1),this.ui.buttons.h.btRemove.set_enabled(!1),this.ui.buttons.h.btManage.set_enabled(!1),this.ui.buttons.h.btAdd.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btRemove.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btManage.set_toolTip(k.ln.get("tooltip-movie-noscene"))):
(this.ui.buttons.h.btAdd.set_enabled(!0),this.ui.buttons.h.btRemove.set_enabled(!0),this.ui.buttons.h.btManage.set_enabled(!0),this.ui.buttons.h.btAdd.set_toolTip(null),this.ui.buttons.h.btRemove.set_toolTip(null),this.ui.buttons.h.btManage.set_toolTip(null))},kill:function(){Ed.prototype.kill.call(this)},onAdd:function(a){this._ac("add")},onRemove:function(a){this._ac("remove")},onManage:function(a){this._ac("manage")},__class__:jr});var fr=function(a){Ed.call(this,a,k.ln.get("menu-media-title"));
this.addButton("btCollectionsAdd",k.ln.get("menu-media-collectionsadd"),m(this,this.onCollectionsAdd));this.ui.createSpacer("addcol",5,!1,this._holder);this.addButton("btAudio",k.ln.get("menu-media-audio"),m(this,this.onAudio));this.addButton("btHtml",k.ln.get("menu-media-html"),m(this,this.onHtml));this.addButton("btParagraph",k.ln.get("menu-media-paragraph"),m(this,this.onParagraph));this.addButton("btPicture",k.ln.get("menu-media-picture"),m(this,this.onPicture));this.addButton("btShape",k.ln.get("menu-media-shape"),
m(this,this.onShape));this.addButton("btSpritemap",k.ln.get("menu-media-spritemap"),m(this,this.onSpritemap));this.addButton("btVideo",k.ln.get("menu-media-video"),m(this,this.onVideo));this.ui.createSpacer("embed",5,!1,this._holder);this.addButton("btEmbed",k.ln.get("menu-media-embed"),m(this,this.onEmbed));this.addButton("btStrings",k.ln.get("menu-media-strings"),m(this,this.onStrings));this.ui.createSpacer("managecol",5,!1,this._holder);this.addButton("btCollections",k.ln.get("menu-media-collections"),
m(this,this.onCollections));this.addButton("btCollectionsRm",k.ln.get("menu-media-collectionsrm"),m(this,this.onCollectionsRm))};t["com.tilbuci.ui.menu.MenuMedia"]=fr;fr.__name__="com.tilbuci.ui.menu.MenuMedia";fr.__super__=Ed;fr.prototype=I(Ed.prototype,{onShow:function(){Ed.prototype.onShow.call(this);p.movie.get_mvId()==""?(this.ui.buttons.h.btCollectionsRm.set_enabled(!1),this.ui.buttons.h.btCollectionsRm.set_toolTip(k.ln.get("tooltip-movie-nomovie")),this.ui.buttons.h.btEmbed.set_enabled(!1),
this.ui.buttons.h.btEmbed.set_toolTip(k.ln.get("tooltip-movie-nomovie")),this.ui.buttons.h.btStrings.set_enabled(!1),this.ui.buttons.h.btStrings.set_toolTip(k.ln.get("tooltip-movie-nomovie"))):(this.ui.buttons.h.btCollectionsRm.set_enabled(!0),this.ui.buttons.h.btCollectionsRm.set_toolTip(null),this.ui.buttons.h.btEmbed.set_enabled(!0),this.ui.buttons.h.btEmbed.set_toolTip(null),this.ui.buttons.h.btStrings.set_enabled(!0),this.ui.buttons.h.btStrings.set_toolTip(null));p.movie.get_scId()==""?(this.ui.buttons.h.btCollections.set_enabled(!1),
this.ui.buttons.h.btCollectionsAdd.set_enabled(!1),this.ui.buttons.h.btAudio.set_enabled(!1),this.ui.buttons.h.btHtml.set_enabled(!1),this.ui.buttons.h.btParagraph.set_enabled(!1),this.ui.buttons.h.btPicture.set_enabled(!1),this.ui.buttons.h.btShape.set_enabled(!1),this.ui.buttons.h.btSpritemap.set_enabled(!1),this.ui.buttons.h.btVideo.set_enabled(!1),this.ui.buttons.h.btCollections.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btCollectionsAdd.set_toolTip(k.ln.get("tooltip-movie-noscene")),
this.ui.buttons.h.btAudio.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btHtml.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btParagraph.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btPicture.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btShape.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btSpritemap.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btVideo.set_toolTip(k.ln.get("tooltip-movie-noscene"))):
(this.ui.buttons.h.btCollections.set_enabled(!0),this.ui.buttons.h.btCollectionsAdd.set_enabled(!0),this.ui.buttons.h.btAudio.set_enabled(!0),this.ui.buttons.h.btHtml.set_enabled(!0),this.ui.buttons.h.btParagraph.set_enabled(!0),this.ui.buttons.h.btPicture.set_enabled(!0),this.ui.buttons.h.btShape.set_enabled(!0),this.ui.buttons.h.btSpritemap.set_enabled(!0),this.ui.buttons.h.btVideo.set_enabled(!0),this.ui.buttons.h.btCollections.set_toolTip(null),this.ui.buttons.h.btCollectionsAdd.set_toolTip(null),
this.ui.buttons.h.btAudio.set_toolTip(null),this.ui.buttons.h.btHtml.set_toolTip(null),this.ui.buttons.h.btParagraph.set_toolTip(null),this.ui.buttons.h.btPicture.set_toolTip(null),this.ui.buttons.h.btShape.set_toolTip(null),this.ui.buttons.h.btSpritemap.set_toolTip(null),this.ui.buttons.h.btVideo.set_toolTip(null))},kill:function(){Ed.prototype.kill.call(this)},onCollectionsAdd:function(a){this._ac("collectionadd")},onCollectionsRm:function(a){this._ac("collectionrm")},onCollections:function(a){this._ac("collection")},
onPicture:function(a){this._ac("picture")},onShape:function(a){this._ac("shape")},onVideo:function(a){this._ac("video")},onEmbed:function(a){this._ac("embed")},onStrings:function(a){this._ac("strings")},onAudio:function(a){this._ac("audio")},onHtml:function(a){this._ac("html")},onParagraph:function(a){this._ac("paragraph")},onText:function(a){this._ac("text")},onSpritemap:function(a){this._ac("spritemap")},__class__:fr});var dr=function(a){Ed.call(this,a,k.ln.get("menu-movie-title"));this.addButton("btNew",
k.ln.get("menu-movie-new"),m(this,this.onNew));this.addButton("btOpen",k.ln.get("menu-movie-open"),m(this,this.onOpen));this.addButton("btProperties",k.ln.get("menu-movie-properties"),m(this,this.onProp));this.addButton("btUsers",k.ln.get("menu-movie-users"),m(this,this.onUsers));this.addButton("btRemove",k.ln.get("menu-movie-remove"),m(this,this.onRemove));this.addButton("btNavigation",k.ln.get("menu-movie-navigation"),m(this,this.onNavigation));this.addButton("btSnippets",k.ln.get("menu-movie-snippets"),
m(this,this.onSnippets));this.addButton("btRepublish",k.ln.get("menu-movie-republish"),m(this,this.onRepublish));this.addButton("btNotes",k.ln.get("menu-movie-notes"),m(this,this.onNotes));this.addButton("btPlayer",k.ln.get("menu-movie-player"),m(this,this.onPlayer))};t["com.tilbuci.ui.menu.MenuMovie"]=dr;dr.__name__="com.tilbuci.ui.menu.MenuMovie";dr.__super__=Ed;dr.prototype=I(Ed.prototype,{onShow:function(){Ed.prototype.onShow.call(this);k.ws.get_level()<=50?(this.ui.buttons.h.btNew.set_enabled(!0),
this.ui.buttons.h.btNew.set_toolTip(null)):(this.ui.buttons.h.btNew.set_enabled(!1),this.ui.buttons.h.btNew.set_toolTip(k.ln.get("tooltip-movie-nolevel")));p.movie.get_mvId()!=""?(this.ui.buttons.h.btRemove.set_toolTip(k.ln.get("tooltip-movie-remove")),this.ui.buttons.h.btRemove.set_enabled(!1),k.mvOwner?(this.ui.buttons.h.btProperties.set_enabled(!0),this.ui.buttons.h.btUsers.set_enabled(!0),this.ui.buttons.h.btProperties.set_toolTip(null),this.ui.buttons.h.btUsers.set_toolTip(null)):(this.ui.buttons.h.btProperties.set_enabled(!1),
this.ui.buttons.h.btUsers.set_enabled(!1),this.ui.buttons.h.btProperties.set_toolTip(k.ln.get("tooltip-movie-noowner")),this.ui.buttons.h.btUsers.set_toolTip(k.ln.get("tooltip-movie-noowner"))),this.ui.buttons.h.btPlayer.set_enabled(!0),this.ui.buttons.h.btPlayer.set_toolTip(null),this.ui.buttons.h.btNavigation.set_enabled(!0),this.ui.buttons.h.btNavigation.set_toolTip(null),this.ui.buttons.h.btSnippets.set_enabled(!0),this.ui.buttons.h.btSnippets.set_toolTip(null),this.ui.buttons.h.btNotes.set_enabled(!0),
this.ui.buttons.h.btNotes.set_toolTip(null),this.ui.buttons.h.btRepublish.set_enabled(!0),this.ui.buttons.h.btRepublish.set_toolTip(null)):(k.ws.get_level()<=50?(this.ui.buttons.h.btRemove.set_enabled(!0),this.ui.buttons.h.btRemove.set_toolTip(null)):(this.ui.buttons.h.btRemove.set_enabled(!1),this.ui.buttons.h.btRemove.set_toolTip(k.ln.get("tooltip-movie-nolevel"))),this.ui.buttons.h.btPlayer.set_enabled(!1),this.ui.buttons.h.btNavigation.set_enabled(!1),this.ui.buttons.h.btSnippets.set_enabled(!1),
this.ui.buttons.h.btNotes.set_enabled(!1),this.ui.buttons.h.btProperties.set_enabled(!1),this.ui.buttons.h.btUsers.set_enabled(!1),this.ui.buttons.h.btRepublish.set_enabled(!1),this.ui.buttons.h.btProperties.set_toolTip(k.ln.get("tooltip-movie-nomovie")),this.ui.buttons.h.btUsers.set_toolTip(k.ln.get("tooltip-movie-nomovie")),this.ui.buttons.h.btPlayer.set_toolTip(k.ln.get("tooltip-movie-nomovie")),this.ui.buttons.h.btNavigation.set_toolTip(k.ln.get("tooltip-movie-nomovie")),this.ui.buttons.h.btSnippets.set_toolTip(k.ln.get("tooltip-movie-nomovie")),
this.ui.buttons.h.btNotes.set_toolTip(k.ln.get("tooltip-movie-nomovie")),this.ui.buttons.h.btRepublish.set_toolTip(k.ln.get("tooltip-movie-nomovie")))},kill:function(){Ed.prototype.kill.call(this)},onNew:function(a){this._ac("new")},onOpen:function(a){this._ac("open")},onProp:function(a){this._ac("prop")},onUsers:function(a){this._ac("users")},onRemove:function(a){this._ac("remove")},onNavigation:function(a){this._ac("navigation")},onSnippets:function(a){this._ac("snippets")},onRepublish:function(a){this._ac("republish")},
onNotes:function(a){this._ac("notes")},onPlayer:function(a){a=new se(p.base+"app/?mv="+p.movie.get_mvId());a.method="GET";Pa.getURL(a)},__class__:dr});var hr=function(a){Ed.call(this,a,k.ln.get("menu-narrative-title"));this.addButton("btChar",k.ln.get("menu-narrative-characters"),m(this,this.onChar));this.addButton("btDiag",k.ln.get("menu-narrative-dialogues"),m(this,this.onDiag));this.addButton("btDflow",k.ln.get("menu-narrative-dflow"),m(this,this.onDflow));this.addButton("btInventory",k.ln.get("menu-narrative-inventory"),
m(this,this.onInventory));this.addButton("btBattle",k.ln.get("menu-narrative-battle"),m(this,this.onBattle))};t["com.tilbuci.ui.menu.MenuNarrative"]=hr;hr.__name__="com.tilbuci.ui.menu.MenuNarrative";hr.__super__=Ed;hr.prototype=I(Ed.prototype,{onShow:function(){Ed.prototype.onShow.call(this);p.movie.get_mvId()==""||k.ws.get_level()>50?(this.ui.buttons.h.btChar.set_enabled(!1),this.ui.buttons.h.btChar.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btDiag.set_enabled(!1),this.ui.buttons.h.btDiag.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),
this.ui.buttons.h.btDflow.set_enabled(!1),this.ui.buttons.h.btDflow.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btInventory.set_enabled(!1),this.ui.buttons.h.btInventory.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess")),this.ui.buttons.h.btBattle.set_enabled(!1),this.ui.buttons.h.btBattle.set_toolTip(k.ln.get("tooltip-movie-nomovieaccess"))):(this.ui.buttons.h.btChar.set_enabled(!0),this.ui.buttons.h.btChar.set_toolTip(null),this.ui.buttons.h.btDiag.set_enabled(!0),this.ui.buttons.h.btDiag.set_toolTip(null),
this.ui.buttons.h.btDflow.set_enabled(!0),this.ui.buttons.h.btDflow.set_toolTip(null),this.ui.buttons.h.btInventory.set_enabled(!0),this.ui.buttons.h.btInventory.set_toolTip(null),this.ui.buttons.h.btBattle.set_enabled(!0),this.ui.buttons.h.btBattle.set_toolTip(null))},kill:function(){Ed.prototype.kill.call(this)},onChar:function(a){this._ac("char")},onDiag:function(a){this._ac("diag")},onDflow:function(a){this._ac("dflow")},onInventory:function(a){this._ac("inventory")},onBattle:function(a){this._ac("battle")},
__class__:hr});var er=function(a){Ed.call(this,a,k.ln.get("menu-scene-title"));this.addButton("btNew",k.ln.get("menu-scene-new"),m(this,this.onNew));this.addButton("btOpen",k.ln.get("menu-scene-open"),m(this,this.onOpen));this.addButton("btProperties",k.ln.get("menu-scene-properties"),m(this,this.onProp));this.addButton("btDflow",k.ln.get("menu-scene-dflow"),m(this,this.onDflow));this.addButton("btSave",k.ln.get("menu-scene-save"),m(this,this.onSave));this.addButton("btSaveAs",k.ln.get("menu-scene-saveas"),
m(this,this.onSaveAs));this.addButton("btPublish",k.ln.get("menu-scene-publish"),m(this,this.onPublish));this.addButton("btVersions",k.ln.get("menu-scene-versions"),m(this,this.onVersions));this.addButton("btPlayer",k.ln.get("menu-scene-player"),m(this,this.onPlayer))};t["com.tilbuci.ui.menu.MenuScene"]=er;er.__name__="com.tilbuci.ui.menu.MenuScene";er.__super__=Ed;er.prototype=I(Ed.prototype,{onShow:function(){Ed.prototype.onShow.call(this);if(p.movie.get_mvId()==""){this.ui.buttons.h.btNew.set_enabled(!1);
this.ui.buttons.h.btOpen.set_enabled(!1);this.ui.buttons.h.btProperties.set_enabled(!1);this.ui.buttons.h.btDflow.set_enabled(!1);this.ui.buttons.h.btSave.set_enabled(!1);this.ui.buttons.h.btSaveAs.set_enabled(!1);this.ui.buttons.h.btPublish.set_enabled(!1);this.ui.buttons.h.btVersions.set_enabled(!1);this.ui.buttons.h.btPlayer.set_enabled(!1);for(var a=this.ui.buttons.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].set_toolTip(k.ln.get("tooltip-movie-nomovie"))}else this.ui.buttons.h.btNew.set_enabled(!0),
this.ui.buttons.h.btOpen.set_enabled(!0),this.ui.buttons.h.btNew.set_toolTip(null),this.ui.buttons.h.btOpen.set_toolTip(null),p.movie.get_scId()==""?(this.ui.buttons.h.btProperties.set_enabled(!1),this.ui.buttons.h.btDflow.set_enabled(!1),this.ui.buttons.h.btSave.set_enabled(!1),this.ui.buttons.h.btSaveAs.set_enabled(!1),this.ui.buttons.h.btPublish.set_enabled(!1),this.ui.buttons.h.btVersions.set_enabled(!1),this.ui.buttons.h.btPlayer.set_enabled(!1),this.ui.buttons.h.btProperties.set_toolTip(k.ln.get("tooltip-movie-noscene")),
this.ui.buttons.h.btDflow.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btSave.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btSaveAs.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btPublish.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btVersions.set_toolTip(k.ln.get("tooltip-movie-noscene")),this.ui.buttons.h.btPlayer.set_toolTip(k.ln.get("tooltip-movie-noscene"))):(this.ui.buttons.h.btProperties.set_enabled(!0),this.ui.buttons.h.btDflow.set_enabled(!0),
this.ui.buttons.h.btSave.set_enabled(!0),this.ui.buttons.h.btSaveAs.set_enabled(!0),this.ui.buttons.h.btPublish.set_enabled(!0),this.ui.buttons.h.btVersions.set_enabled(!0),this.ui.buttons.h.btPlayer.set_enabled(!0),this.ui.buttons.h.btProperties.set_toolTip(null),this.ui.buttons.h.btDflow.set_toolTip(null),this.ui.buttons.h.btSave.set_toolTip(null),this.ui.buttons.h.btSaveAs.set_toolTip(null),this.ui.buttons.h.btPublish.set_toolTip(null),this.ui.buttons.h.btVersions.set_toolTip(null),this.ui.buttons.h.btPlayer.set_toolTip(null))},
kill:function(){Ed.prototype.kill.call(this)},onNew:function(a){this._ac("new")},onOpen:function(a){this._ac("open")},onSave:function(a){this._ac("save")},onSaveAs:function(a){this._ac("saveas")},onPublish:function(a){this._ac("publish")},onVersions:function(a){this._ac("version")},onProp:function(a){this._ac("prop")},onDflow:function(a){this._ac("dflow")},onUsers:function(a){this._ac("users")},onPlayer:function(a){a=new se(p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId());a.method=
"GET";Pa.getURL(a)},__class__:er});var Lr=function(a){ea.call(this,a,k.ln.get("window-login-title"),500,330,!1,!1);this.ui.createContainer("form");this.ui.createLabel("username",k.ln.get("window-login-username"),ia.VARIANT_DETAIL,this.ui.lastCont);this.ui.createTInput("username","","",this.ui.lastCont);this.ui.createLabel("password",k.ln.get("window-login-password"),ia.VARIANT_DETAIL,this.ui.lastCont);this.ui.createTInput("userpass","","",this.ui.lastCont);this.ui.inputs.h.userpass.set_displayAsPassword(!0);
this.ui.createSpacer("line-nomail",10,!1,this.ui.lastCont);this.ui.createButton("btlogin",k.ln.get("window-login-button"),m(this,this.onEnter),this.ui.lastCont);k.validEmail?(this.ui.createSpacer("before-nomail",50,!0,this.ui.lastCont),this.ui.createButton("btrecover",k.ln.get("window-login-recover"),m(this,this.onRecover),this.ui.lastCont)):(this.ui.createSpacer("before-nomail",30,!0,this.ui.lastCont),this.ui.createDescription("about-nomail",k.ln.get("window-login-noemail"),"",this.ui.lastCont));
this.addForm(k.ln.get("window-login-title"),this.ui.lastCont)};t["com.tilbuci.ui.window.WindowLogin"]=Lr;Lr.__name__="com.tilbuci.ui.window.WindowLogin";Lr.__super__=ea;Lr.prototype=I(ea.prototype,{_btEnter:null,kill:function(){ea.prototype.kill.call(this)},action:function(a,b){switch(a){case "login-error":this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-loginerror"),250,170,this.stage);break;case "login-nokey":this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-nokey"),
250,170,this.stage);break;case "login-notfound":this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-notfound"),250,170,this.stage);break;case "login-ok":this.ui.inputs.h.username.set_text("");this.ui.inputs.h.userpass.set_text("");break;case "login-password":this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-passwordno"),250,170,this.stage)}},onEnter:function(a){if(this.ui.inputs.h.username.get_text()!=""&&this.ui.inputs.h.userpass.get_text()!="")if(Ga.validateEmail(this.ui.inputs.h.username.get_text())){a=
this._ac;var b=new G,c=this.ui.inputs.h.username.get_text();b.h.user=c;c=this.ui.inputs.h.userpass.get_text();b.h.pass=c;a("check-login",b)}else this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-emailer"),250,170,this.stage);else this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-noinput"),250,170,this.stage)},onRecover:function(a){if(this.ui.inputs.h.username.get_text()=="")this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-nouserrecover"),
250,170,this.stage);else{a=k.ws;var b=new G,c=this.ui.inputs.h.username.get_text();b.h.user=c;a.send("System/LoginRecover",b,m(this,this.onLoginRecover))}},onLoginRecover:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-recovererror"),250,170,this.stage):this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-recoversent"),250,170,this.stage):this.ui.createWarning(k.ln.get("window-login-title"),k.ln.get("window-login-recovererror"),
250,170,this.stage)},__class__:Lr});var yr=function(a){this._own=[];this._scene=[];this._movie=[];this._guideline=[];ea.call(this,a,k.ln.get("window-notes-title"),1E3,Bc.pickValue(570,600),!0,!0);a=k.ln.get("window-notes-movie");var b=this.ui,c=k.ln.get("window-notes-btguidelines");this.addForm(a,b.forge("guidelines",[{tp:"TArea",id:"guidelines",ht:400,tx:"",vr:""},{tp:"Select",id:"guidelines",vl:[],sl:[],ch:m(this,this.onGuideChange)},{tp:"Spacer",id:"guidelines",ht:10,ln:!1},{tp:"Button",id:"guidelines",
tx:c,vr:"",ac:m(this,this.onGuidelines)}]));a=k.ln.get("window-notes-movienotes");b=this.ui;c=k.ln.get("window-notes-btmovie");this.addForm(a,b.forge("movienotes",[{tp:"TArea",id:"movie",ht:400,tx:"",vr:""},{tp:"Select",id:"movie",vl:[],sl:[],ch:m(this,this.onMovieChange)},{tp:"Spacer",id:"movie",ht:10,ln:!1},{tp:"Button",id:"movie",tx:c,vr:"",ac:m(this,this.onMovie)}]));a=k.ln.get("window-notes-scenenotes");b=this.ui;c=k.ln.get("window-notes-btscene");this.addForm(a,b.forge("scenenotes",[{tp:"TArea",
id:"scene",ht:400,tx:"",vr:""},{tp:"Select",id:"scene",vl:[],sl:[],ch:m(this,this.onSceneChange)},{tp:"Spacer",id:"scene",ht:10,ln:!1},{tp:"Button",id:"scene",tx:c,vr:"",ac:m(this,this.onScene)}]));a=k.ln.get("window-notes-ownnotes");b=this.ui;c=k.ln.get("window-notes-btown");this.addForm(a,b.forge("ownnotes",[{tp:"TArea",id:"own",ht:400,tx:"",vr:""},{tp:"Select",id:"own",vl:[],sl:[],ch:m(this,this.onOwnChange)},{tp:"Spacer",id:"own",ht:10,ln:!1},{tp:"Button",id:"own",tx:c,vr:"",ac:m(this,this.onOwn)}]));
this.redraw()};t["com.tilbuci.ui.window.WindowNotes"]=yr;yr.__name__="com.tilbuci.ui.window.WindowNotes";yr.__super__=ea;yr.prototype=I(ea.prototype,{_guideline:null,_movie:null,_scene:null,_own:null,acStart:function(){var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;c=p.movie.get_scId();b.h.scene=c;a.send("Movie/Notes",b,m(this,this.onReceived))},kill:function(){ea.prototype.kill.call(this)},onReceived:function(a,b){a?b.map.h.e==0?this.setContent(b):(this.ui.createWarning(k.ln.get("window-notes-title"),
k.ln.get("window-notes-nonotes"),300,150,this.stage),Aa.removePopUp(this)):(this.ui.createWarning(k.ln.get("window-notes-title"),k.ln.get("window-notes-nonotes"),300,150,this.stage),Aa.removePopUp(this))},onGuideChange:function(a){this._guideline.length>0?this.ui.tareas.h.guidelines.set_text(this._guideline[this.ui.selects.h.guidelines.get_selectedIndex()].text):this.ui.tareas.h.guidelines.set_text("")},onMovieChange:function(a){this._movie.length>0?this.ui.tareas.h.movie.set_text(this._movie[this.ui.selects.h.movie.get_selectedIndex()].text):
this.ui.tareas.h.movie.set_text("")},onSceneChange:function(a){this._scene.length>0?this.ui.tareas.h.scene.set_text(this._scene[this.ui.selects.h.scene.get_selectedIndex()].text):this.ui.tareas.h.scene.set_text("")},onOwnChange:function(a){this._own.length>0?this.ui.tareas.h.own.set_text(this._own[this.ui.selects.h.own.get_selectedIndex()].text):this.ui.tareas.h.own.set_text("")},onGuidelines:function(a){if(k.mvOwner){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=p.movie.get_scId();b.h.scene=
c;b.h.type="guide";c=this.ui.tareas.h.guidelines.get_text();b.h.text=c;a.send("Movie/SaveNote",b,m(this,this.onSaved))}},onMovie:function(a){if(p.movie.get_mvId()!=""){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=p.movie.get_scId();b.h.scene=c;b.h.type="movie";c=this.ui.tareas.h.movie.get_text();b.h.text=c;a.send("Movie/SaveNote",b,m(this,this.onSaved))}},onScene:function(a){if(p.movie.get_scId()!=""){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=p.movie.get_scId();b.h.scene=c;b.h.type=
"scene";c=this.ui.tareas.h.scene.get_text();b.h.text=c;a.send("Movie/SaveNote",b,m(this,this.onSaved))}},onOwn:function(a){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=p.movie.get_scId();b.h.scene=c;b.h.type="own";c=this.ui.tareas.h.own.get_text();b.h.text=c;a.send("Movie/SaveNote",b,m(this,this.onSaved))},onSaved:function(a,b){a?b.map.h.e==0?(k.showMsg(k.ln.get("window-notes-oksave")),this.setContent(b)):this.ui.createWarning(k.ln.get("window-notes-title"),k.ln.get("window-notes-nosave"),
300,150,this.stage):this.ui.createWarning(k.ln.get("window-notes-title"),k.ln.get("window-notes-nosave"),300,150,this.stage)},setContent:function(a){for(;this._guideline.length>0;)this._guideline.shift();for(;this._movie.length>0;)this._movie.shift();for(;this._scene.length>0;)this._scene.shift();for(;this._own.length>0;)this._own.shift();this._guideline=y.field(a.map.h.notes,"guidelines");this._movie=y.field(a.map.h.notes,"movie");this._scene=y.field(a.map.h.notes,"scene");this._own=y.field(a.map.h.notes,
"own");if(this._guideline.length>0){var b=[];a=0;for(var c=this._guideline;a<c.length;){var d=c[a];++a;var f=k.ln.get("window-notes-bywhen");f=N.replace(f,"[AUTHOR]",d.author);f=N.replace(f,"[TIME]",d.time);b.push({text:f,value:d.id})}this.ui.setSelectOptions("guidelines",b);this.ui.selects.h.guidelines.set_selectedIndex(0);this.ui.tareas.h.guidelines.set_text(this._guideline[0].text)}else this.ui.tareas.h.guidelines.set_text(""),this.ui.setSelectOptions("guidelines",[]),this.ui.setSelectValue("guidelines",
null);this.ui.buttons.h.guidelines.set_enabled(k.mvOwner);if(this._movie.length>0){b=[];a=0;for(c=this._movie;a<c.length;)d=c[a],++a,f=k.ln.get("window-notes-bywhen"),f=N.replace(f,"[AUTHOR]",d.author),f=N.replace(f,"[TIME]",d.time),b.push({text:f,value:d.id});this.ui.setSelectOptions("movie",b);this.ui.selects.h.movie.set_selectedIndex(0);this.ui.tareas.h.movie.set_text(this._movie[0].text)}else this.ui.tareas.h.movie.set_text(""),this.ui.setSelectOptions("movie",[]),this.ui.setSelectValue("movie",
null);this.ui.buttons.h.movie.set_enabled(k.mvOwner||k.ws.get_level()<50);if(this._scene.length>0){b=[];a=0;for(c=this._scene;a<c.length;)d=c[a],++a,f=k.ln.get("window-notes-bywhen"),f=N.replace(f,"[AUTHOR]",d.author),f=N.replace(f,"[TIME]",d.time),b.push({text:f,value:d.id});this.ui.setSelectOptions("scene",b);this.ui.selects.h.scene.set_selectedIndex(0);this.ui.tareas.h.scene.set_text(this._scene[0].text)}else this.ui.tareas.h.scene.set_text(""),this.ui.setSelectOptions("scene",[]),this.ui.setSelectValue("scene",
null);this.ui.buttons.h.scene.set_enabled(p.movie.get_scId()!="");if(this._own.length>0){f=[];a=0;for(c=this._own;a<c.length;)d=c[a],++a,f.push({text:d.time,value:d.id});this.ui.setSelectOptions("own",f);this.ui.selects.h.own.set_selectedIndex(0);this.ui.tareas.h.own.set_text(this._own[0].text)}else this.ui.tareas.h.own.set_text(""),this.ui.setSelectOptions("own",[]),this.ui.setSelectValue("own",null);this.ui.buttons.h.own.set_enabled(!0)},__class__:yr});var rs=function(a,b){ea.call(this,a,k.ln.get("window-setup-title"),
900,Bc.pickValue(560,640),!0,!0,!0);if(!k.singleUser&&k.host==""){a=k.ln.get("window-setup-user-title");var c=this.ui,d={tp:"Label",id:"user-pass",tx:k.ln.get("window-setup-user-pass"),vr:""},f={tp:"Button",id:"user-pass",tx:k.ln.get("window-setup-user-passchange"),ac:m(this,this.onPassChange)},g=k.ln.get("window-setup-user-logout");this.addForm(a,c.forge("form-user",[d,{tp:"TInput",id:"user-pass",tx:"",vr:""},f,{tp:"Spacer",id:"user-pass",ht:30,ln:!0},{tp:"Button",id:"user-logout",tx:g,ac:m(this,
this.onLogout)}]));if(k.ws.get_level()<=20){var h=[{text:k.ln.get("window-setup-users-listauthor"),value:75},{text:k.ln.get("window-setup-users-listaeditor"),value:25}];k.ws.get_level()==0&&h.push({text:k.ln.get("window-setup-users-listadmin"),value:0});this.ui.createHContainer("users-setpass");this.ui.createTInput("users-setpass","","",this.ui.hcontainers.h["users-setpass"],!1);this.ui.createButton("users-setpass",k.ln.get("window-setup-users-setpass"),m(this,this.onSetUserPass),this.ui.hcontainers.h["users-setpass"],
!1);this.ui.hcontainers.h["users-setpass"].setWidth(860);a=k.ln.get("window-setup-users-title");c=this.ui;d={tp:"Label",id:"users-list",tx:k.ln.get("window-setup-users-list"),vr:""};f={tp:"Button",id:"users-remove",tx:k.ln.get("window-setup-users-btremove"),ac:m(this,this.onRemoveUser)};g={tp:"Custom",cont:this.ui.hcontainers.h["users-setpass"]};var n={tp:"Label",id:"users-new",tx:k.ln.get("window-setup-users-new"),vr:""},l={tp:"Label",id:"users-newemail",tx:k.ln.get("window-setup-users-newemail"),
vr:ia.VARIANT_DETAIL},q={tp:"Label",id:"users-newpass",tx:k.ln.get("window-setup-users-newpass"),vr:ia.VARIANT_DETAIL},u={tp:"Label",id:"users-newlevel",tx:k.ln.get("window-setup-users-newlevel"),vr:ia.VARIANT_DETAIL},v=k.ln.get("window-setup-users-newbt");this.addForm(a,c.forge("form-users",[d,{tp:"List",id:"users-list",vl:[],ht:190,sl:""},f,g,{tp:"Spacer",id:"users-new",ht:30,ln:!0},n,l,{tp:"TInput",id:"users-newemail",tx:"",vr:""},q,{tp:"TInput",id:"users-newpass",tx:"",vr:""},u,{tp:"Select",id:"users-newlevel",
vl:h,sl:75},{tp:"Button",id:"users-create",tx:v,ac:m(this,this.onCreateUser)},{tp:"Spacer",id:"users-end",ht:10,ln:!1}]));this.ui.setListToIcon("users-list")}}if(k.userLevel==0){a=k.ln.get("window-setup-config-title");c=this.ui;d={tp:"Label",id:"movie-index",tx:k.ln.get("window-setup-config-index"),vr:""};f={tp:"Button",id:"movie-index",tx:k.ln.get("window-setup-config-indexset"),ac:m(this,this.onMovieIndex)};g={tp:"Label",id:"share",tx:k.ln.get("window-setup-config-share"),vr:""};n={tp:"Select",
id:"share",vl:[{text:k.ln.get("window-setup-config-shscene"),value:"scene"},{text:k.ln.get("window-setup-config-shmovie"),value:"movie"},{text:k.ln.get("window-setup-config-shnever"),value:"never"}],sl:p.share};l={tp:"Button",id:"share",tx:k.ln.get("window-setup-config-rdset"),ac:m(this,this.onShareSet)};q={tp:"Label",id:"fps",tx:k.ln.get("window-setup-config-fps"),vr:""};u={tp:"Select",id:"fps",vl:[{text:k.ln.get("window-setup-config-fps60"),value:"60"},{text:k.ln.get("window-setup-config-fps50"),
value:"50"},{text:k.ln.get("window-setup-config-fps40"),value:"40"},{text:k.ln.get("window-setup-config-fps30"),value:"30"},{text:k.ln.get("window-setup-config-fps20"),value:"20"},{text:k.ln.get("window-setup-config-fpsfree"),value:"free"},{text:k.ln.get("window-setup-config-fpscalc"),value:"calc"}],sl:p.fps};v=k.ln.get("window-setup-config-fpssave");this.addForm(a,c.forge("form-movie",[d,{tp:"Select",id:"movie-index",vl:[],sl:""},f,{tp:"Spacer",id:"share",ht:5,ln:!1},g,n,l,{tp:"Spacer",id:"fps",
ht:5,ln:!1},q,u,{tp:"Button",id:"fps",tx:v,ac:m(this,this.onFpsSet)}]));k.host==""&&(a=k.ln.get("window-setup-email-title"),c=this.ui,d={tp:"Label",id:"email-sender",tx:k.ln.get("window-setup-email-sender"),vr:ia.VARIANT_DETAIL},f={tp:"Label",id:"email-email",tx:k.ln.get("window-setup-email-email"),vr:ia.VARIANT_DETAIL},g={tp:"Label",id:"email-server",tx:k.ln.get("window-setup-email-server"),vr:ia.VARIANT_DETAIL},n={tp:"Label",id:"email-user",tx:k.ln.get("window-setup-email-user"),vr:ia.VARIANT_DETAIL},
l={tp:"Label",id:"email-password",tx:k.ln.get("window-setup-email-password"),vr:ia.VARIANT_DETAIL},q={tp:"Label",id:"email-port",tx:k.ln.get("window-setup-email-port"),vr:ia.VARIANT_DETAIL},u={tp:"Label",id:"email-security",tx:k.ln.get("window-setup-email-security"),vr:ia.VARIANT_DETAIL},v=k.ln.get("window-setup-email-save"),this.addForm(a,c.forge("form-email",[d,{tp:"TInput",id:"email-sender",tx:"",vr:""},f,{tp:"TInput",id:"email-email",tx:"",vr:""},g,{tp:"TInput",id:"email-server",tx:"",vr:""},
n,{tp:"TInput",id:"email-user",tx:"",vr:""},l,{tp:"TInput",id:"email-password",tx:"",vr:""},q,{tp:"TInput",id:"email-port",tx:"",vr:""},u,{tp:"Select",id:"email-security",vl:[{text:"SSL",value:"ssl"},{text:"TLS",value:"tcp"},{text:"None",value:""}],sl:"ssl"},{tp:"Spacer",id:"email-button",ht:10,ln:!1},{tp:"Button",id:"email-save",tx:v,ac:m(this,this.onEmailSave)},{tp:"Spacer",id:"email-end",ht:10,ln:!1}])),this.ui.inputs.h["email-password"].set_displayAsPassword(!0),this.ui.createDescription("email-codeabout",
k.ln.get("window-setup-email-codeabout")),this.ui.createTInput("email-code"),this.ui.createButton("email-codebutton",k.ln.get("window-setup-email-codecheck"),m(this,this.checkEmailCode)),this.ui.createSpacer("email-codespace",20,!0),this.ui.createDescription("email-codevalid",k.ln.get("window-setup-email-codevalid")));q=[];c=0;for(d=k.fonts.length;c<d;)a=c++,q.push({text:k.fonts[a],value:k.fonts[a]});a=k.ln.get("window-setup-font-title");c=this.ui;d={tp:"Button",id:"font-delete",tx:k.ln.get("window-setup-font-delete"),
ac:m(this,this.onFontDelete)};f={tp:"Button",id:"font-add",tx:k.ln.get("window-setup-font-add"),ac:m(this,this.onFontAdd)};g={tp:"Label",id:"font-file",tx:k.ln.get("window-setup-font-file"),vr:ia.VARIANT_DETAIL};n={tp:"Label",id:"font-name",tx:k.ln.get("window-setup-font-name"),vr:ia.VARIANT_DETAIL};l=k.ln.get("window-setup-font-upload");this.addForm(a,c.forge("form-fonts",[{tp:"List",id:"font-list",vl:q,ht:240,sl:""},d,{tp:"Spacer",id:"font-spacer",ht:20,ln:!0},f,g,{tp:"TInput",id:"font-file",tx:"",
vr:""},n,{tp:"TInput",id:"font-name",tx:"",vr:""},{tp:"Button",id:"font-upload",tx:l,ac:m(this,this.onFontUpload)}]));this.ui.inputs.h["font-file"].set_enabled(!1);k.host==""&&(a=k.ln.get("window-setup-update-title"),c=this.ui,d={tp:"Label",id:"update-about",tx:k.ln.get("window-setup-update-about"),vr:""},f={tp:"Button",id:"update-check",tx:k.ln.get("window-setup-update-check"),ac:m(this,this.onRelase)},g=k.ln.get("window-setup-update-upload"),this.addForm(a,c.forge("form-update",[d,{tp:"Spacer",
id:"update-about",ht:20,ln:!1},f,{tp:"Spacer",id:"update-check",ht:20,ln:!1},{tp:"Button",id:"update-upload",tx:g,ac:m(this,this.onSelectUpdate)}])),this.ui.labels.h["update-about"].set_wordWrap(!0))}v=[];c=b.get_languages().h;d=Object.keys(c);f=d.length;for(g=0;g<f;)a=c[d[g++]],v.push(a);h=new Ma(Z.getBitmapData("buci"));h.smoothing=!0;h.set_width(800);h.set_scaleY(h.get_scaleX());a=k.ln.get("window-setup-about");c=this.ui;d={tp:"Label",id:"about-title",tx:k.ln.get("window-setup-about-title"),vr:ia.VARIANT_HEADING};
f={tp:"Label",id:"about-lucas",tx:N.replace(k.ln.get("window-setup-created"),"[NAME]","Lucas Junqueira <lucas@var.art.br>"),vr:""};g={tp:"Label",id:"about-version",tx:k.ln.get("window-setup-about-version"),vr:ia.VARIANT_DETAIL};n={tp:"Label",id:"about-versionnum",tx:b.get_version(),vr:""};l={tp:"Label",id:"about-build",tx:k.ln.get("window-setup-about-build"),vr:ia.VARIANT_DETAIL};q={tp:"Label",id:"about-buildnum",tx:b.get_build(),vr:""};u={tp:"Label",id:"about-languages",tx:k.ln.get("window-setup-about-languages"),
vr:ia.VARIANT_DETAIL};v={tp:"Label",id:"about-langlist",tx:v.join(", "),vr:""};var z={tp:"Label",id:"about-thanks",tx:k.ln.get("window-setup-about-thanks"),vr:ia.VARIANT_DETAIL};b={tp:"Label",id:"about-thankslist",tx:b.get_thanks().join(", "),vr:""};var r=k.ln.get("window-setup-tilbuci");this.addForm(a,c.forge("form-about",[d,f,g,n,l,q,u,v,z,b,{tp:"Spacer",id:"about-tilbuci",ht:30,ln:!0},{tp:"Label",id:"about-tilbuci",tx:r,vr:""},{tp:"Custom",cont:h}]));this.ui.labels.h["about-lucas"].set_wordWrap(!0);
b=new Jc;b.set_wordWrap(!0);b.condenseWhite=!0;b.set_width(860);b.set_autoSize(1);b.set_htmlText(Z.getText("license"));this.addForm(k.ln.get("window-setup-license"),this.ui.forge("license",[{tp:"Custom",cont:b},{tp:"Spacer",id:"license",ht:10,ln:!1}]));this.redraw()};t["com.tilbuci.ui.window.WindowSetup"]=rs;rs.__name__="com.tilbuci.ui.window.WindowSetup";rs.__super__=ea;rs.prototype=I(ea.prototype,{acStart:function(){k.userLevel==0&&(k.host==""&&k.ws.send("Email/GetConfig",new G,m(this,this.onEmailSettings)),
k.ws.send("Movie/SetList",new G,m(this,this.onMovieList)));!k.singleUser&&k.ws.get_level()<=50&&k.host==""&&k.ws.send("User/List",new G,m(this,this.onUserList))},kill:function(){ea.prototype.kill.call(this)},onFontDelete:function(a){this.ui.lists.h["font-list"].get_selectedIndex()<0?this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-noneslected"),300,180,this.stage):this.ui.createConfirm(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-removecheck"),
400,210,m(this,this.removeFont),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},removeFont:function(a){if(a){a=k.ws;var b=new G,c=this.ui.lists.h["font-list"].get_selectedItem().value;b.h.name=c;a.send("File/RemoveFont",b,m(this,this.onFontRemoved))}},onFontRemoved:function(a,b){if(a){V.remove(k.fonts,b.map.h.name);a=[];b=0;for(var c=k.fonts.length;b<c;){var d=b++;a.push({text:k.fonts[d],value:k.fonts[d]})}this.ui.setListValues("font-list",a)}},onSelectUpdate:function(a){k.up.browseForMedia(m(this,
this.onUpdateFile),"update")},onFontAdd:function(a){k.up.browseForFont(m(this,this.onFontSelected))},onFontSelected:function(a){a?(this.ui.inputs.h["font-file"].set_text(k.up.get_selectedName()),this.ui.inputs.h["font-name"].get_text()==""&&(a=N.replace(k.up.get_selectedName(),".woff2",""),a=N.replace(a,".woff",""),a=N.replace(a,"-"," "),a=N.replace(a,"_"," "),this.ui.inputs.h["font-name"].set_text(a))):this.ui.inputs.h["font-file"].set_text(this.ui.inputs.h["font-name"].set_text(""))},onUpdateFile:function(a){if(a)if(V.substr(k.up.get_selectedName(),
0,7)!="TilBuci"||V.substr(k.up.get_selectedName(),-3,null)!="zip")this.ui.createWarning(k.ln.get("window-setup-update-title"),k.ln.get("window-setup-update-invalid"),300,150,this.stage);else{a=k.up;var b=new G;b.h.type="update";b.h.path="";b.h.movie="";a.uploadMedia(m(this,this.onUpdateReturn),b)}},onUpdateReturn:function(a,b){a?k.ws.send("System/Update",new G,m(this,this.onZipReturn)):this.ui.createWarning(k.ln.get("window-setup-update-title"),k.ln.get("window-setup-update-uploader"),300,180,this.stage)},
onZipReturn:function(a,b){a?b.map.h.e==0?(a=new se(k.econfig.get_player()+"setup.php"),a.method="GET",Pa.getURL(a),this.ui.createWarning(k.ln.get("window-setup-update-title"),k.ln.get("window-setup-update-uploadok"),300,180,this.stage)):this.ui.createWarning(k.ln.get("window-setup-update-title"),k.ln.get("window-setup-update-uploader"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-setup-update-title"),k.ln.get("window-setup-update-uploader"),300,180,this.stage)},onFontUpload:function(a){if(this.ui.inputs.h["font-file"].get_text()==
""||this.ui.inputs.h["font-name"].get_text()=="")this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-nofilename"),300,180,this.stage);else{a=k.up;var b=new G,c=this.ui.inputs.h["font-name"].get_text();b.h.name=c;a.uploadFont(m(this,this.fontReturn),b)||this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-nofont"),300,180,this.stage)}},fontReturn:function(a,b){a?b.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-uploader"),
300,180,this.stage):(new nm(k.econfig.get_font()+H.string(b.h.fname),b.h.name,m(this,this.fontLoaded)),this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-uploadok"),300,200,this.stage)):this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-uploader"),300,180,this.stage)},fontLoaded:function(a,b){if(a){a=[];b=0;for(var c=k.fonts.length;b<c;){var d=b++;a.push({text:k.fonts[d],value:k.fonts[d]})}this.ui.setListValues("font-list",a)}},
onEmailSettings:function(a,b){a&&b.map.h.e==0&&(this.ui.inputs.h["email-server"].set_text(b.map.h.server),this.ui.inputs.h["email-sender"].set_text(b.map.h.sender),this.ui.inputs.h["email-email"].set_text(b.map.h.email),this.ui.inputs.h["email-user"].set_text(b.map.h.user),this.ui.inputs.h["email-password"].set_text(b.map.h.password),this.ui.inputs.h["email-port"].set_text(b.map.h.port),this.ui.setSelectValue("email-security",b.map.h.security),b.map.h.attempt?this.addEmailCodeConfirm():b.map.h.valid&&
(k.validEmail=!0,this.addEmailCodeValid()))},onPassChange:function(a){if(this.ui.inputs.h["user-pass"].get_text().length<8)this.ui.createWarning(k.ln.get("window-setup-user-title"),k.ln.get("window-setup-user-passminimum"),300,180,this.stage);else{a=k.ws;var b=new G,c=k.ws.get_user();b.h.user=c;c=this.ui.inputs.h["user-pass"].get_text();b.h.pass=c;a.send("User/SetPassword",b,m(this,this.onPasswordSet))}},onPasswordSet:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-user-title"),
k.ln.get("window-setup-user-passerror"),300,180,this.stage):(this.ui.inputs.h["user-pass"].set_text(""),this.ui.createWarning(k.ln.get("window-setup-user-title"),k.ln.get("window-setup-user-passok"),300,180,this.stage)):this.ui.createWarning(k.ln.get("window-setup-user-title"),k.ln.get("window-setup-user-passerror"),300,180,this.stage)},onLogout:function(a){k.ws.logout();Aa.removePopUp(this);k.showWindow("login")},onEmailSave:function(a){this.ui.inputs.h["email-sender"].get_text()==""||this.ui.inputs.h["email-email"].get_text()==
""||this.ui.inputs.h["email-server"].get_text()==""||this.ui.inputs.h["email-user"].get_text()==""||this.ui.inputs.h["email-password"].get_text()==""||this.ui.inputs.h["email-port"].get_text()==""?this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-savenofields"),300,180,this.stage):Ga.validateEmail(this.ui.inputs.h["email-email"].get_text())?this.ui.createConfirm(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-saveabout"),420,280,m(this,this.onEmailSaveConfirm),
k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage):this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-savenoemail"),300,180,this.stage)},onEmailSaveConfirm:function(a){if(a){this.ui.disableButton("email-save",k.ln.get("default-wait"));a=k.ws;var b=new G,c=this.ui.inputs.h["email-sender"].get_text();b.h.sender=c;c=this.ui.inputs.h["email-email"].get_text();b.h.email=c;c=this.ui.inputs.h["email-server"].get_text();b.h.server=c;c=this.ui.inputs.h["email-user"].get_text();
b.h.user=c;c=this.ui.inputs.h["email-password"].get_text();b.h.password=c;c=this.ui.inputs.h["email-port"].get_text();b.h.port=c;c=this.ui.selects.h["email-security"].get_selectedItem().value;b.h.security=c;c=k.ln.get_current();b.h.lang=c;a.send("Email/Save",b,m(this,this.onEmailSaveReturn))}},onEmailSaveReturn:function(a,b){a?b.map.h.e==0?(this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-saveok"),400,190,this.stage),this.addEmailCodeConfirm()):this.ui.createWarning(k.ln.get("window-setup-email-title"),
k.ln.get("window-setup-email-saveerror"),400,190,this.stage):this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-saveerror"),400,190,this.stage);this.ui.enableButton("email-save",k.ln.get("window-setup-email-save"))},addEmailCodeConfirm:function(){this.ui.containers.h["form-email"].replaceChildren([this.ui.labels.h["email-codeabout"],this.ui.inputs.h["email-code"],this.ui.buttons.h["email-codebutton"],this.ui.spacers.h["email-codespace"],this.ui.labels.h["email-sender"],
this.ui.inputs.h["email-sender"],this.ui.labels.h["email-email"],this.ui.inputs.h["email-email"],this.ui.labels.h["email-server"],this.ui.inputs.h["email-server"],this.ui.labels.h["email-user"],this.ui.inputs.h["email-user"],this.ui.labels.h["email-password"],this.ui.inputs.h["email-password"],this.ui.labels.h["email-port"],this.ui.inputs.h["email-port"],this.ui.labels.h["email-security"],this.ui.selects.h["email-security"],this.ui.spacers.h["email-button"],this.ui.buttons.h["email-save"]]);this.redraw()},
addEmailCodeValid:function(){this.ui.containers.h["form-email"].replaceChildren([this.ui.labels.h["email-codevalid"],this.ui.spacers.h["email-codespace"],this.ui.labels.h["email-sender"],this.ui.inputs.h["email-sender"],this.ui.labels.h["email-email"],this.ui.inputs.h["email-email"],this.ui.labels.h["email-server"],this.ui.inputs.h["email-server"],this.ui.labels.h["email-user"],this.ui.inputs.h["email-user"],this.ui.labels.h["email-password"],this.ui.inputs.h["email-password"],this.ui.labels.h["email-port"],
this.ui.inputs.h["email-port"],this.ui.labels.h["email-security"],this.ui.selects.h["email-security"],this.ui.spacers.h["email-button"],this.ui.buttons.h["email-save"]]);this.redraw()},checkEmailCode:function(a){if(this.ui.inputs.h["email-code"].get_text().length!=6)this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-codeno6"),400,150,this.stage);else{this.ui.buttons.h["email-codebutton"].set_text(k.ln.get("default-wait"));a=k.ws;var b=new G,c=this.ui.inputs.h["email-code"].get_text();
b.h.code=c;a.send("Email/CheckCode",b,m(this,this.onEmailCodeCheck))}},onEmailCodeCheck:function(a,b){a?b.map.h.e==1?this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-codenoset"),400,150,this.stage):b.map.h.e==2?this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-codecorrupt"),400,190,this.stage):b.map.h.e==3?this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-codewrong"),400,190,this.stage):
(this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("window-setup-email-codeok"),400,150,this.stage),this.ui.containers.h["form-email"].replaceChildren([this.ui.labels.h["email-codevalid"],this.ui.spacers.h["email-codespace"],this.ui.labels.h["email-sender"],this.ui.inputs.h["email-sender"],this.ui.labels.h["email-email"],this.ui.inputs.h["email-email"],this.ui.labels.h["email-server"],this.ui.inputs.h["email-server"],this.ui.labels.h["email-user"],this.ui.inputs.h["email-user"],
this.ui.labels.h["email-password"],this.ui.inputs.h["email-password"],this.ui.labels.h["email-port"],this.ui.inputs.h["email-port"],this.ui.labels.h["email-security"],this.ui.selects.h["email-security"],this.ui.spacers.h["email-button"],this.ui.buttons.h["email-save"]]),this.redraw(),k.validEmail=!0):this.ui.createWarning(k.ln.get("window-setup-email-title"),k.ln.get("default-serverconerror"),400,180,this.stage);this.ui.buttons.h["email-codebutton"].set_text(k.ln.get("window-setup-email-codecheck"))},
onUserList:function(a,b){var c=[];if(a&&b.map.h.e==0){a=b.map.h.list;b=0;for(var d=a.length;b<d;){var f=b++;var g=a[f].level==0?k.ln.get("window-setup-users-listadmin"):a[f].level<=50?k.ln.get("window-setup-users-listaeditor"):k.ln.get("window-setup-users-listauthor");c.push({text:a[f].user,value:a[f].user,user:g})}}this.ui.setListValues("users-list",c)},onCreateUser:function(a){if(this.ui.inputs.h["users-newemail"].get_text()==""||this.ui.inputs.h["users-newpass"].get_text().length<8)this.ui.createWarning(k.ln.get("window-setup-users-new"),
k.ln.get("window-setup-users-newno"),400,250,this.stage);else if(Ga.validateEmail(this.ui.inputs.h["users-newemail"].get_text())){a=k.ws;var b=new G,c=this.ui.inputs.h["users-newemail"].get_text();b.h.email=c;c=this.ui.inputs.h["users-newpass"].get_text();b.h.pass=c;c=this.ui.selects.h["users-newlevel"].get_selectedItem().value;b.h.level=c;a.send("User/Create",b,m(this,this.onCreateReturn))}else this.ui.createWarning(k.ln.get("window-setup-users-new"),k.ln.get("window-setup-users-newno"),400,250,
this.stage)},onCreateReturn:function(a,b){a?b.map.h.e==1?this.ui.createWarning(k.ln.get("window-setup-users-new"),k.ln.get("window-setup-users-newalready"),400,200,this.stage):b.map.h.e==0?(this.ui.setListValues("users-list",[]),this.ui.inputs.h["users-newemail"].set_text(""),this.ui.inputs.h["users-newpass"].set_text(""),k.ws.send("User/List",new G,m(this,this.onUserList)),k.showMsg(k.ln.get("window-setup-users-newok"))):this.ui.createWarning(k.ln.get("window-setup-users-new"),k.ln.get("window-setup-users-newerror"),
400,150,this.stage):this.ui.createWarning(k.ln.get("window-setup-users-new"),k.ln.get("window-setup-users-newerror"),400,150,this.stage)},onRemoveUser:function(a){this.ui.lists.h["users-list"].get_selectedItem()!=null&&this.ui.createConfirm(k.ln.get("window-setup-users-title"),k.ln.get("window-setup-users-btremsure"),400,230,m(this,this.onRemoveConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRemoveConfirm:function(a){if(a&&this.ui.lists.h["users-list"].get_selectedItem()!=
null){a=k.ws;var b=new G,c=this.ui.lists.h["users-list"].get_selectedItem().value;b.h.email=c;a.send("User/Remove",b,m(this,this.onUserRemoved))}},onUserRemoved:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-users-title"),k.ln.get("window-setup-users-btremer"),400,150,this.stage):(k.ws.send("User/List",new G,m(this,this.onUserList)),k.showMsg(k.ln.get("window-setup-users-btremok"))):this.ui.createWarning(k.ln.get("window-setup-users-title"),k.ln.get("window-setup-users-btremer"),
400,150,this.stage)},onSetUserPass:function(a){if(this.ui.lists.h["users-list"].get_selectedItem()!=null)if(this.ui.inputs.h["users-setpass"].get_text().length<8)this.ui.createWarning(k.ln.get("window-setup-users-title"),k.ln.get("window-setup-users-setpassno"),400,150,this.stage);else{a=k.ws;var b=new G,c=this.ui.lists.h["users-list"].get_selectedItem().value;b.h.email=c;c=this.ui.inputs.h["users-setpass"].get_text();b.h.pass=c;a.send("User/SetUserPassword",b,m(this,this.onSetUserPassReturn))}},
onSetUserPassReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-users-title"),k.ln.get("window-setup-users-setpasser"),400,150,this.stage):(this.ui.inputs.h["users-setpass"].set_text(""),this.ui.createWarning(k.ln.get("window-setup-users-title"),k.ln.get("window-setup-users-setpassok"),400,150,this.stage)):this.ui.createWarning(k.ln.get("window-setup-users-title"),k.ln.get("window-setup-users-setpasser"),400,150,this.stage)},onMovieIndex:function(a){if(this.ui.selects.h["movie-index"].get_selectedItem()!=
null){a=k.ws;var b=new G,c=this.ui.selects.h["movie-index"].get_selectedItem().value;b.h.movie=c;a.send("Movie/SetIndex",b,m(this,this.onMovieIndexReturn))}},onShareSet:function(a){if(this.ui.selects.h.share.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.selects.h.share.get_selectedItem().value;b.h.sh=c;a.send("Movie/SetShare",b,m(this,this.onShareReturn))}},onFpsSet:function(a){if(this.ui.selects.h.fps.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.selects.h.fps.get_selectedItem().value;
b.h.fps=c;a.send("Movie/SetFPS",b,m(this,this.onFpsReturn))}},onMovieIndexReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-indexer"),400,180,this.stage):this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-indexok"),400,180,this.stage):this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-indexer"),400,180,this.stage)},onRenderReturn:function(a,b){a?
b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-rder"),400,180,this.stage):(this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-rdok"),400,180,this.stage),p.render=this.ui.selects.h.render.get_selectedItem().value):this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-rder"),400,180,this.stage)},onShareReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-config-index"),
k.ln.get("window-setup-config-sher"),400,180,this.stage):(this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-shok"),400,180,this.stage),p.share=this.ui.selects.h.share.get_selectedItem().value):this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-sher"),400,180,this.stage)},onFpsReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-fpser"),400,180,this.stage):
(this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-fpsok"),400,180,this.stage),p.fps=this.ui.selects.h.fps.get_selectedItem().value):this.ui.createWarning(k.ln.get("window-setup-config-index"),k.ln.get("window-setup-config-fpser"),400,180,this.stage)},onMovieList:function(a,b){var c=[],d="";if(a&&b.map.h.e==0){a=b.map.h.list;d=0;for(var f=a.length;d<f;){var g=d++;c.push({text:a[g].name,value:a[g].id})}d=b.map.h.current}this.ui.setSelectOptions("movie-index",
c);this.ui.setSelectValue("movie-index",d)},onRelase:function(a){a=new se("https://tilbuci.com.br/site/latest-version/");a.method="GET";Pa.getURL(a)},__class__:rs});var vs=function(a){ea.call(this,a,k.ln.get("window-tactions-title"),800,Bc.pickValue(520,530),!1,!0,!0)};t["com.tilbuci.ui.window.WindowTestingActions"]=vs;vs.__name__="com.tilbuci.ui.window.WindowTestingActions";vs.__super__=ea;vs.prototype=I(ea.prototype,{_actions:null,startInterface:function(a){this._actions=new jj(760,300);a=k.ln.get("window-tactions-title");
var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-tactions-about")},d={tp:"Custom",cont:this._actions},f={tp:"Label",id:"delay",tx:k.ln.get("window-tactions-delay"),vr:ia.VARIANT_DETAIL},g=k.ln.get("window-tactions-button");this.addForm(a,b.forge("window",[c,d,{tp:"Spacer",id:"action",ht:10,ln:!1},f,{tp:"Numeric",id:"delay",vl:0,mn:0,mx:1E4,st:250},{tp:"Spacer",id:"delay",ht:10,ln:!1},{tp:"Button",id:"okbutton",tx:g,ac:m(this,this.onSet)}]));this.ui.labels.h.about.set_wordWrap(!0);ea.prototype.startInterface.call(this)},
acStart:function(){this._actions.setText(k.testActions);this.ui.numerics.h.delay.set_value(k.testDelay)},onSet:function(a){k.testActions=this._actions.getText();k.testDelay=Math.round(this.ui.numerics.h.delay.get_value());Aa.removePopUp(this)},__class__:vs});var zs=function(a,b){ea.call(this,a,k.ln.get("window-visitors-title"),1E3,Bc.pickValue(580,660),!0,!0,!0);this.ui.createHContainer("listfilter");this.ui.createTInput("listfilter","","",this.ui.hcontainers.h.listfilter,!1);this.ui.createButton("listfilter",
k.ln.get("window-visitors-list-btfilter"),m(this,this.onListVisitor),this.ui.hcontainers.h.listfilter,!1);a=k.ln.get("window-visitors-list-title");var c=b=this.ui,d={tp:"Label",id:"list",tx:k.ln.get("window-visitors-list"),vr:""},f=k.ln.get("window-visitors-list-button"),g=c.forge("visitors-left",[d,{tp:"List",id:"list",vl:[],sl:"",ht:353},{tp:"Button",id:"list",tx:f,ac:m(this,this.onSelectVisitor)},{tp:"Spacer",id:"list",ht:20,ln:!0},{tp:"Custom",cont:this.ui.hcontainers.h.listfilter}]);c=this.ui;
d={tp:"Label",id:"visitoremail",tx:k.ln.get("window-visitors-list-email"),vr:""};f={tp:"Label",id:"visitorcreated",tx:k.ln.get("window-visitors-list-created"),vr:""};var h={tp:"Label",id:"visitorlast",tx:k.ln.get("window-visitors-list-last"),vr:""},n={tp:"Label",id:"visitormovies",tx:k.ln.get("window-visitors-list-movies"),vr:""},l={tp:"Label",id:"visitorstates",tx:k.ln.get("window-visitors-list-states"),vr:""},q={tp:"Label",id:"visitordata",tx:k.ln.get("window-visitors-list-data"),vr:""},u={tp:"Label",
id:"visitorgroups",tx:k.ln.get("window-visitors-list-groups"),vr:""},v={tp:"Button",id:"rmvisitor",tx:k.ln.get("window-visitors-list-rmvisitor"),ac:m(this,this.onRemoveVisitor)},z=k.ln.get("window-visitors-list-blvisitor");this.addForm(a,b.createColumnHolder("visitors",g,c.forge("visitors-right",[d,{tp:"TInput",id:"visitoremail",tx:"",vr:""},f,{tp:"TInput",id:"visitorcreated",tx:"",vr:""},h,{tp:"TInput",id:"visitorlast",tx:"",vr:""},n,{tp:"TInput",id:"visitormovies",tx:"",vr:""},l,{tp:"TInput",id:"visitorstates",
tx:"",vr:""},q,{tp:"TInput",id:"visitordata",tx:"",vr:""},u,{tp:"TInput",id:"visitorgroups",tx:"",vr:""},{tp:"Spacer",id:"visitor",ht:26,ln:!0},v,{tp:"Button",id:"blvisitor",tx:z,ac:m(this,this.onBlockVisitor)}])));this.ui.hcontainers.h.listfilter.setWidth(460);this.ui.setListToIcon("list");this.ui.inputs.h.visitorcreated.set_enabled(!1);this.ui.inputs.h.visitorlast.set_enabled(!1);this.ui.inputs.h.visitormovies.set_enabled(!1);this.ui.inputs.h.visitorstates.set_enabled(!1);this.ui.inputs.h.visitordata.set_enabled(!1);
this.ui.inputs.h.visitordata.set_enabled(!1);this.ui.inputs.h.visitorgroups.set_enabled(!1);this.ui.createHContainer("creategr");this.ui.createTInput("creategr","","",this.ui.hcontainers.h.creategr,!1);this.ui.createButton("creategr",k.ln.get("window-visitors-creategrbt"),m(this,this.onCreateGroup),this.ui.hcontainers.h.creategr,!1);this.ui.createHContainer("grvsadd");this.ui.createTInput("grvsadd","","",this.ui.hcontainers.h.grvsadd,!1);this.ui.createButton("grvsadd",k.ln.get("window-visitors-grvsadd"),
m(this,this.onAddVisitor),this.ui.hcontainers.h.grvsadd,!1);a=k.ln.get("window-visitors-groups-title");c=b=this.ui;d={tp:"Label",id:"grlist",tx:k.ln.get("window-visitors-grlist"),vr:""};f={tp:"Button",id:"showgroup",tx:k.ln.get("window-visitors-showgroup"),ac:m(this,this.onShowGroup)};g=k.ln.get("window-visitors-removegrbt");h=c.forge("groups-left",[d,{tp:"List",id:"grlist",vl:[],sl:"",ht:323},f,{tp:"Button",id:"rmgroup",tx:g,ac:m(this,this.onRemoveGroup)},{tp:"Spacer",id:"grlist",ht:20,ln:!0},{tp:"Custom",
cont:this.ui.hcontainers.h.creategr}]);c=this.ui;d={tp:"Label",id:"grname",tx:k.ln.get("window-visitors-grname"),vr:""};f={tp:"Button",id:"grnamechange",tx:k.ln.get("window-visitors-grnamechange"),ac:m(this,this.onGroupNameChange)};g={tp:"Label",id:"grvisitors",tx:k.ln.get("window-visitors-grvisitors"),vr:""};n=k.ln.get("window-visitors-grvsremove");this.addForm(a,b.createColumnHolder("groups",h,c.forge("groups-right",[d,{tp:"TInput",id:"grname",tx:"",vr:""},f,{tp:"Spacer",id:"grvisitors",ht:10,ln:!1},
g,{tp:"List",id:"grvisitors",vl:[],sl:"",ht:280},{tp:"Button",id:"grvisitors",tx:n,ac:m(this,this.onRemoveVisitorGroup)},{tp:"Custom",cont:this.ui.hcontainers.h.grvsadd}])));this.ui.hcontainers.h.creategr.setWidth(460);this.ui.hcontainers.h.grvsadd.setWidth(460);this.ui.setListToIcon("grlist");a=k.ln.get("window-visitors-event-title");b=this.ui;c={tp:"Label",id:"evabout",tx:k.ln.get("window-visitors-event-about"),vr:""};d={tp:"Label",id:"evmovie",tx:k.ln.get("window-visitors-event-movie"),vr:ia.VARIANT_DETAIL};
f={tp:"Label",id:"evname",tx:k.ln.get("window-visitors-event-name"),vr:ia.VARIANT_DETAIL};g={tp:"Button",id:"evexport",tx:k.ln.get("window-visitors-event-export"),ac:m(this,this.onExportEvents)};h={tp:"Label",id:"evclear",tx:k.ln.get("window-visitors-event-clear"),vr:""};n={tp:"Label",id:"clearmovie",tx:k.ln.get("window-visitors-event-movie"),vr:ia.VARIANT_DETAIL};l={tp:"Label",id:"clearname",tx:k.ln.get("window-visitors-event-clearname"),vr:ia.VARIANT_DETAIL};q={tp:"Label",id:"clearwhen",tx:k.ln.get("window-visitors-event-clearwhen"),
vr:ia.VARIANT_DETAIL};u={tp:"Select",id:"clearwhen",vl:[{text:k.ln.get("window-visitors-event-clearyear"),value:"-1year"},{text:k.ln.get("window-visitors-event-clear6month"),value:"-6months"},{text:k.ln.get("window-visitors-event-clear3month"),value:"-3months"},{text:k.ln.get("window-visitors-event-clear1month"),value:"-1month"},{text:k.ln.get("window-visitors-event-clearall"),value:"now"}],sl:"-1year"};v=k.ln.get("window-visitors-event-clearbutton");this.addForm(a,b.forge("event",[c,d,{tp:"Select",
id:"evmovie",vl:[],sl:null},f,{tp:"TInput",id:"evname",tx:"",vr:""},g,{tp:"Spacer",id:"evexport",ht:90,ln:!0},h,n,{tp:"Select",id:"clearmovie",vl:[],sl:null},l,{tp:"TInput",id:"clearname",tx:"",vr:""},q,u,{tp:"Button",id:"evclear",tx:v,ac:m(this,this.onRemoveEvents)}]));this.ui.labels.h.evclear.set_wordWrap(!0);a=k.ln.get("window-visitors-cors-title");b=this.ui;c={tp:"Label",id:"corsabout",tx:k.ln.get("window-visitors-cors-about"),vr:""};d={tp:"Label",id:"corsallowed",tx:k.ln.get("window-visitors-cors-allowed"),
vr:ia.VARIANT_DETAIL};f={tp:"Button",id:"corsrm",tx:k.ln.get("window-visitors-cors-btremove"),ac:m(this,this.onRemoveCors)};g={tp:"Label",id:"corsadd",tx:k.ln.get("window-visitors-cors-add"),vr:ia.VARIANT_DETAIL};h=k.ln.get("window-visitors-cors-btadd");this.addForm(a,b.forge("cors",[c,d,{tp:"List",id:"corsallowed",vl:[],sl:"",ht:240},f,{tp:"Spacer",id:"corsrm",ht:15,ln:!1},g,{tp:"TInput",id:"corsadd",tx:"",vr:""},{tp:"Button",id:"corsadd",tx:h,ac:m(this,this.onAddCors)}]));this.ui.labels.h.corsabout.set_wordWrap(!0);
this.redraw()};t["com.tilbuci.ui.window.WindowVisitors"]=zs;zs.__name__="com.tilbuci.ui.window.WindowVisitors";zs.__super__=ea;zs.prototype=I(ea.prototype,{_selected:null,_group:null,acStart:function(){if(k.userLevel==0)this.onListVisitor(null);else this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-noaccess"),300,180,this.stage),Aa.removePopUp(this)},kill:function(){ea.prototype.kill.call(this)},onListVisitor:function(a){this._group=this._selected=null;this.ui.inputs.h.listfilter.set_text("");
this.ui.inputs.h.visitoremail.set_text("");this.ui.inputs.h.visitorcreated.set_text("");this.ui.inputs.h.visitorlast.set_text("");this.ui.inputs.h.visitormovies.set_text("");this.ui.inputs.h.visitorstates.set_text("");this.ui.inputs.h.visitordata.set_text("");this.ui.inputs.h.visitorgroups.set_text("");this.ui.inputs.h.grname.set_text("");this.ui.inputs.h.creategr.set_text("");this.ui.inputs.h.grvsadd.set_text("");this.ui.inputs.h.evname.set_text("");this.ui.inputs.h.clearname.set_text("");this.ui.setListSelectValue("list",
null);this.ui.setListValues("list",[]);this.ui.setListSelectValue("grlist",null);this.ui.setListValues("grlist",[]);this.ui.setListSelectValue("grvisitors",null);this.ui.setListValues("grvisitors",[]);this.ui.setSelectValue("evmovie",null);this.ui.setSelectOptions("evmovie",[]);this.ui.setSelectValue("clearmovie",null);this.ui.setSelectOptions("clearmovie",[]);this.ui.setSelectValue("clearwhen","-1year");this.ui.setListSelectValue("corsallowed",null);this.ui.setListValues("corsallowed",[]);De.trace("call listvisitor",
{fileName:"Source/com/tilbuci/ui/window/WindowVisitors.hx",lineNumber:223,className:"com.tilbuci.ui.window.WindowVisitors",methodName:"onListVisitor"});a=k.ws;var b=new G,c=this.ui.inputs.h.listfilter.get_text();b.h.filter=c;a.send("Visitor/List",b,m(this,this.onListVisitorReturn))},onListVisitorReturn:function(a,b){if(a)if(b.map.h.e==0){var c=b.map.h.list;if(c.length==0)k.showMsg(k.ln.get("window-visitors-listempty"));else{a=[];for(var d=0;d<c.length;){var f=c[d];++d;f.blocked?a.push({text:f.email,
value:f.email,user:k.ln.get("window-visitors-lastaccess")+" "+f.last,asset:"iconLock"}):a.push({text:f.email,value:f.email,user:k.ln.get("window-visitors-lastaccess")+" "+f.last})}this.ui.setListValues("list",a)}c=b.map.h.groups;a=[];if(c!=null)for(d=0;d<c.length;)f=c[d],++d,a.push({text:f.name,value:f.id,user:f.visitors+" "+k.ln.get("window-visitors-grvisitors")});this.ui.setListValues("grlist",a);a=[{text:k.ln.get("window-visitors-event-movieall"),value:""}];d=0;for(c=y.fields(b.map.h.movies);d<
c.length;)f=c[d],++d,f=y.field(b.map.h.movies,f),a.push({text:y.field(f,"title"),value:y.field(f,"id")});this.ui.setSelectOptions("evmovie",a);this.ui.setSelectValue("evmovie","");this.ui.setSelectOptions("clearmovie",a);this.ui.setSelectValue("clearmovie","");b=b.map.h.cors;a=[];if(b!=null)for(d=0;d<b.length;)c=b[d],++d,a.push({text:c,value:c});this.ui.setListValues("corsallowed",a)}else this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-listerror"),300,180,this.stage);
else this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-listerror"),300,180,this.stage)},onSelectVisitor:function(a){if(this.ui.lists.h.list.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.lists.h.list.get_selectedItem().value;b.h.email=c;a.send("Visitor/Select",b,m(this,this.onVisitorSelected))}},onVisitorSelected:function(a,b){this._selected=null;this.ui.inputs.h.visitoremail.set_text("");this.ui.inputs.h.visitorcreated.set_text("");this.ui.inputs.h.visitorlast.set_text("");
this.ui.inputs.h.visitormovies.set_text("");this.ui.inputs.h.visitorstates.set_text("");this.ui.inputs.h.visitordata.set_text("");this.ui.inputs.h.visitorgroups.set_text("");a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-erselect"),300,180,this.stage):(this._selected=b.map.h.data,this._selected==null?this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-erselect"),300,180,this.stage):(this.ui.inputs.h.visitoremail.set_text(this._selected.email),
this.ui.inputs.h.visitorcreated.set_text(this._selected.created),this.ui.inputs.h.visitorlast.set_text(this._selected.last),this.ui.inputs.h.visitormovies.set_text(H.string(this._selected.movies)),this.ui.inputs.h.visitorstates.set_text(H.string(this._selected.states)),this.ui.inputs.h.visitordata.set_text(H.string(this._selected.data)),this.ui.inputs.h.visitorgroups.set_text(H.string(this._selected.groups.length)),this._selected.blocked?this.ui.buttons.h.blvisitor.set_text(k.ln.get("window-visitors-list-unblvisitor")):
this.ui.buttons.h.blvisitor.set_text(k.ln.get("window-visitors-list-blvisitor")))):this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-erselect"),300,180,this.stage)},onRemoveVisitor:function(a){this._selected!=null&&this.ui.createConfirm(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-list-rmvisitorconf"),320,230,m(this,this.onRemoveConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRemoveConfirm:function(a){if(this._selected!=null&&
a){a=k.ws;var b=new G;b.h.email=this._selected.email;a.send("Visitor/Remove",b,m(this,this.onRemoveReturn))}},onRemoveReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-erset"),300,180,this.stage):(k.showMsg(k.ln.get("window-visitors-inforemoved")),this._selected=null,this.ui.inputs.h.visitoremail.set_text(""),this.ui.inputs.h.visitorcreated.set_text(""),this.ui.inputs.h.visitorlast.set_text(""),this.ui.inputs.h.visitormovies.set_text(""),
this.ui.inputs.h.visitorstates.set_text(""),this.ui.inputs.h.visitordata.set_text(""),this.ui.inputs.h.visitorgroups.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.onListVisitor(null)):this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-erset"),300,180,this.stage)},onBlockVisitor:function(a){this._selected!=null&&(this._selected.blocked?this.ui.createConfirm(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-list-unblvisitorconf"),300,230,m(this,this.onBlockConfirm),
k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage):this.ui.createConfirm(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-list-blvisitorconf"),300,230,m(this,this.onBlockConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage))},onBlockConfirm:function(a){if(this._selected!=null&&a){a=k.ws;var b=new G;b.h.email=this._selected.email;a.send("Visitor/Block",b,m(this,this.onBlockReturn))}},onBlockReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-visitors-title"),
k.ln.get("window-visitors-erset"),300,180,this.stage):(k.showMsg(k.ln.get("window-visitors-infoset")),this._selected=null,this.ui.inputs.h.visitoremail.set_text(""),this.ui.inputs.h.visitorcreated.set_text(""),this.ui.inputs.h.visitorlast.set_text(""),this.ui.inputs.h.visitormovies.set_text(""),this.ui.inputs.h.visitorstates.set_text(""),this.ui.inputs.h.visitordata.set_text(""),this.ui.inputs.h.visitorgroups.set_text(""),this.onListVisitor(null)):this.ui.createWarning(k.ln.get("window-visitors-title"),
k.ln.get("window-visitors-erset"),300,180,this.stage)},onCreateGroup:function(a){if(this.ui.inputs.h.creategr.get_text().length>=5){a=k.ws;var b=new G,c=this.ui.inputs.h.creategr.get_text();b.h.name=c;a.send("Visitor/CreateGroup",b,m(this,this.onCreateGroupReturn))}},onRemoveGroup:function(a){this.ui.lists.h.grlist.get_selectedItem()!=null&&this.ui.createConfirm(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-grouprmconfirm"),300,230,m(this,this.onRemoveGroupConfirm),k.ln.get("default-ok"),
k.ln.get("default-cancel"),this.stage)},onRemoveGroupConfirm:function(a){if(a&&this.ui.lists.h.grlist.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.lists.h.grlist.get_selectedItem().text;b.h.name=c;c=this.ui.lists.h.grlist.get_selectedItem().value;b.h.id=c;a.send("Visitor/RemoveGroup",b,m(this,this.onRemoveGroupReturn))}},onCreateGroupReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-creatgrer"),360,180,this.stage):(k.showMsg(k.ln.get("window-visitors-groupcreated")),
this._selected=null,this.ui.inputs.h.visitoremail.set_text(""),this.ui.inputs.h.visitorcreated.set_text(""),this.ui.inputs.h.visitorlast.set_text(""),this.ui.inputs.h.visitormovies.set_text(""),this.ui.inputs.h.visitorstates.set_text(""),this.ui.inputs.h.visitordata.set_text(""),this.ui.inputs.h.visitorgroups.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.onListVisitor(null)):this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-creatgrer"),360,180,this.stage)},
onRemoveGroupReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-removegrer"),360,180,this.stage):(k.showMsg(k.ln.get("window-visitors-groupremoved")),this._selected=null,this.ui.inputs.h.visitoremail.set_text(""),this.ui.inputs.h.visitorcreated.set_text(""),this.ui.inputs.h.visitorlast.set_text(""),this.ui.inputs.h.visitormovies.set_text(""),this.ui.inputs.h.visitorstates.set_text(""),this.ui.inputs.h.visitordata.set_text(""),this.ui.inputs.h.visitorgroups.set_text(""),
this.ui.inputs.h.creategr.set_text(""),this.onListVisitor(null)):this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-removegrer"),360,180,this.stage)},onShowGroup:function(a){if(this.ui.lists.h.grlist.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.lists.h.grlist.get_selectedItem().text;b.h.name=c;c=this.ui.lists.h.grlist.get_selectedItem().value;b.h.id=c;a.send("Visitor/ShowGroup",b,m(this,this.onShowGroupReturn))}},onShowGroupReturn:function(a,b){this._group=
null;this.ui.inputs.h.grname.set_text("");this.ui.inputs.h.creategr.set_text("");this.ui.inputs.h.grvsadd.set_text("");if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-showgrouper"),360,180,this.stage);else if(this._group=b.map.h.group,this._group==null)this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-showgrouper"),360,180,this.stage);else{this.ui.inputs.h.grname.set_text(this._group.name);a=[];b=0;for(var c=this._group.visitors;b<
c.length;){var d=c[b];++b;a.push({text:d,value:d})}this.ui.setListValues("grvisitors",a)}else this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-showgrouper"),360,180,this.stage)},onGroupNameChange:function(a){if(this.ui.lists.h.grlist.get_selectedItem()!=null&&this.ui.inputs.h.grname.get_text().length>=5){a=k.ws;var b=new G,c=this.ui.lists.h.grlist.get_selectedItem().text;b.h.name=c;c=this.ui.lists.h.grlist.get_selectedItem().value;b.h.id=c;c=this.ui.inputs.h.grname.get_text();
b.h["new"]=c;a.send("Visitor/ChangeGroupName",b,m(this,this.onGroupNameChangeReturn))}},onGroupNameChangeReturn:function(a,b){this._group=null;this.ui.inputs.h.grname.set_text("");this.ui.inputs.h.creategr.set_text("");this.ui.inputs.h.grvsadd.set_text("");if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-namegrouper"),360,180,this.stage);else this.onListVisitor(null);else this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-namegrouper"),
360,180,this.stage)},onAddVisitor:function(a){if(this.ui.lists.h.grlist.get_selectedItem()!=null&&Ga.validateEmail(this.ui.inputs.h.grvsadd.get_text())){a=k.ws;var b=new G,c=this.ui.lists.h.grlist.get_selectedItem().text;b.h.name=c;c=this.ui.lists.h.grlist.get_selectedItem().value;b.h.id=c;c=this.ui.inputs.h.grvsadd.get_text();b.h.visitor=c;a.send("Visitor/AddGroupVisitor",b,m(this,this.onAddVisitorReturn))}},onAddVisitorReturn:function(a,b){this._group=null;this.ui.inputs.h.grvsadd.set_text("");
if(a)if(b.map.h.e!=0)this.ui.inputs.h.grname.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.onListVisitor(null),this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-addvsgrer"),360,180,this.stage);else if(this._group=b.map.h.group,this._group==null)this.ui.inputs.h.grname.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.onListVisitor(null),this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-addvsgrer"),360,180,this.stage);
else{this.ui.inputs.h.grname.set_text(this._group.name);a=[];b=0;for(var c=this._group.visitors;b<c.length;){var d=c[b];++b;a.push({text:d,value:d})}this.ui.setListValues("grvisitors",a)}else this.ui.inputs.h.grname.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.onListVisitor(null),this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-addvsgrer"),360,180,this.stage)},onRemoveVisitorGroup:function(a){if(this.ui.lists.h.grlist.get_selectedItem()!=null&&this.ui.lists.h.grvisitors.get_selectedItem()!=
null){a=k.ws;var b=new G,c=this.ui.lists.h.grlist.get_selectedItem().text;b.h.name=c;c=this.ui.lists.h.grlist.get_selectedItem().value;b.h.id=c;c=this.ui.lists.h.grvisitors.get_selectedItem().value;b.h.visitor=c;a.send("Visitor/RemoveGroupVisitor",b,m(this,this.onRemoveVisitorGroupReturn))}},onRemoveVisitorGroupReturn:function(a,b){this._group=null;if(a)if(b.map.h.e!=0)this.ui.inputs.h.grname.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.ui.inputs.h.grvsadd.set_text(""),this.onListVisitor(null),
this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-rmvsgrer"),360,180,this.stage);else if(this._group=b.map.h.group,this._group==null)this.ui.inputs.h.grname.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.ui.inputs.h.grvsadd.set_text(""),this.onListVisitor(null),this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-rmvsgrer"),360,180,this.stage);else{this.ui.inputs.h.grname.set_text(this._group.name);a=[];b=0;for(var c=this._group.visitors;b<
c.length;){var d=c[b];++b;a.push({text:d,value:d})}this.ui.setListValues("grvisitors",a)}else this.ui.inputs.h.grname.set_text(""),this.ui.inputs.h.creategr.set_text(""),this.ui.inputs.h.grvsadd.set_text(""),this.onListVisitor(null),this.ui.createWarning(k.ln.get("window-visitors-title"),k.ln.get("window-visitors-rmvsgrer"),360,180,this.stage)},onExportEvents:function(a){a=k.ws;var b=new G,c=this.ui.selects.h.evmovie.get_selectedItem().value;b.h.movie=c;c=this.ui.inputs.h.evname.get_text();b.h.name=
c;a.send("Visitor/ExportEvents",b,m(this,this.onExportEventsReturn))},onExportEventsReturn:function(a,b){if(a)if(b.map.h.e==0){a=k.ws;var c=new G;c.h.file="events";c.h.name=b.map.h.file;a.download(c)}else this.ui.createWarning(k.ln.get("window-visitors-event-title"),k.ln.get("window-visitors-event-erexport"),360,180,this.stage);else this.ui.createWarning(k.ln.get("window-visitors-event-title"),k.ln.get("window-visitors-event-erexport"),360,180,this.stage)},onRemoveEvents:function(a){this.ui.createConfirm(k.ln.get("window-visitors-event-title"),
k.ln.get("window-visitors-event-clearconfirm"),300,230,m(this,this.onRemoveEventsConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRemoveEventsConfirm:function(a){if(a){a=k.ws;var b=new G,c=this.ui.selects.h.clearmovie.get_selectedItem().value;b.h.movie=c;c=this.ui.inputs.h.clearname.get_text();b.h.name=c;c=this.ui.selects.h.clearwhen.get_selectedItem().value;b.h.date=c;a.send("Visitor/RemoveEvents",b,m(this,this.onRemoveEventsReturn))}},onRemoveEventsReturn:function(a,b){a?
b.map.h.e==0?this.ui.createWarning(k.ln.get("window-visitors-event-title"),k.ln.get("window-visitors-event-okremove"),360,180,this.stage):this.ui.createWarning(k.ln.get("window-visitors-event-title"),k.ln.get("window-visitors-event-erremove"),360,180,this.stage):this.ui.createWarning(k.ln.get("window-visitors-event-title"),k.ln.get("window-visitors-event-erremove"),360,180,this.stage)},onRemoveCors:function(a){if(this.ui.lists.h.corsallowed.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.lists.h.corsallowed.get_selectedItem().value;
b.h.domain=c;a.send("Visitor/RemoveCORS",b,m(this,this.onRemoveCorsReturn))}},onRemoveCorsReturn:function(a,b){if(a)if(b.map.h.e==0)this.onListVisitor(null);else this.ui.createWarning(k.ln.get("window-visitors-cors-title"),k.ln.get("window-visitors-cors-errorrm"),360,180,this.stage);else this.ui.createWarning(k.ln.get("window-visitors-cors-title"),k.ln.get("window-visitors-cors-errorrm"),360,180,this.stage)},onAddCors:function(a){if(V.substr(this.ui.inputs.h.corsadd.get_text().toLowerCase(),0,4)==
"http"){a=k.ws;var b=new G,c=this.ui.inputs.h.corsadd.get_text().toLowerCase();b.h.domain=c;a.send("Visitor/AddCORS",b,m(this,this.onAddCorsReturn))}},onAddCorsReturn:function(a,b){a?b.map.h.e==0?(this.ui.inputs.h.corsadd.set_text(""),this.onListVisitor(null)):this.ui.createWarning(k.ln.get("window-visitors-cors-title"),k.ln.get("window-visitors-cors-erroradd"),360,180,this.stage):this.ui.createWarning(k.ln.get("window-visitors-cors-title"),k.ln.get("window-visitors-cors-erroradd"),360,180,this.stage)},
__class__:zs});var vr=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrbg-title"),1E3,Bc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrBackground"]=vr;vr.__name__="com.tilbuci.ui.window.contraptions.WindowContrBackground";vr.__super__=ea;vr.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("landscape");this.ui.createTInput("landscape","","",this.ui.hcontainers.h.landscape,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),
c=this.ui.hcontainers.h.landscape;a.createIconButton("landscape",m(this,this.acImgL),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.landscape;a.createIconButton("landscapedel",m(this,this.acImgLdel),new Ma(b),null,c,!1);this.ui.inputs.h.landscape.set_enabled(!1);this.ui.hcontainers.h.landscape.setWidth(460,[350,50,50]);this.ui.createHContainer("portrait");this.ui.createTInput("portrait","","",this.ui.hcontainers.h.portrait,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");
c=this.ui.hcontainers.h.portrait;a.createIconButton("portrait",m(this,this.acImgP),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.portrait;a.createIconButton("portraitdel",m(this,this.acImgPdel),new Ma(b),null,c,!1);this.ui.inputs.h.portrait.set_enabled(!1);this.ui.hcontainers.h.portrait.setWidth(460,[350,50,50]);a=k.ln.get("window-kfmanage-title");c=b=this.ui;var d={tp:"Label",id:"registered",tx:k.ln.get("window-contrbg-registered"),vr:""},f={tp:"Button",id:"load",
tx:k.ln.get("window-contrbg-load"),ac:m(this,this.loadContr)},g={tp:"Button",id:"remove",tx:k.ln.get("window-contrbg-remove"),ac:m(this,this.removeContr)},h={tp:"Label",id:"name",tx:k.ln.get("window-contrbg-name"),vr:"detail"},n=k.ln.get("window-contrbg-add");this.addForm(a,b.createColumnHolder("columns",c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:200},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",tx:"",vr:""},{tp:"Button",id:"add",tx:n,ac:m(this,this.addContr)}]),
this.ui.forge("rightcol",[{tp:"Label",id:"properties",tx:k.ln.get("window-contrbg-properties"),vr:""},{tp:"Label",id:"landscape",tx:k.ln.get("window-contrbg-landscape"),vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.landscape},{tp:"Label",id:"portrait",tx:k.ln.get("window-contrbg-portrait"),vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.portrait}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrbg-save"),ac:m(this,this.saveContr)}]),420));this.ui.listDbClick("registered",
m(this,this.loadContr));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.backgrounds.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear()},clear:function(){for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];
a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h.portrait.set_text("");this.ui.inputs.h.landscape.set_text("")},loadContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;
c.set_text(a.h[b].id);c=this.ui.inputs.h.portrait;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].portrait);c=this.ui.inputs.h.landscape;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].landscape)}}},action:function(a,b){switch(a){case "landscape":this.ui.inputs.h.landscape.set_text(b.h.file);break;case "portrait":this.ui.inputs.h.portrait.set_text(b.h.file)}},removeContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=
null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveContr:function(a){a=p.contraptions.backgrounds.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.backgrounds.h[d].kill();var f=
p.contraptions.backgrounds;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.backgrounds;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addContr:function(a){if(this.ui.inputs.h.name.get_text().length>3)if(this.ui.inputs.h.landscape.get_text()!=""||this.ui.inputs.h.portrait.get_text()!=
""){a=this._list;var b=this.ui.inputs.h.name.get_text();if(Object.prototype.hasOwnProperty.call(a.h,b))a=this._list,b=this.ui.inputs.h.name.get_text(),b=a.h[b],b.load({id:this.ui.inputs.h.name.get_text(),landscape:this.ui.inputs.h.landscape.get_text(),portrait:this.ui.inputs.h.portrait.get_text()});else{b=new Ji;b.load({id:this.ui.inputs.h.name.get_text(),landscape:this.ui.inputs.h.landscape.get_text(),portrait:this.ui.inputs.h.portrait.get_text()});a=this._list;var c=this.ui.inputs.h.name.get_text();
a.h[c]=b}this.clear()}else k.showPopup(k.ln.get("window-contrbg-title"),k.ln.get("window-contrbg-nographics"),320,150,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-contrbg-title"),k.ln.get("window-contrbg-noname"),320,150,k.ln.get("default-ok"))},acImgP:function(a){this._ac("portrait")},acImgPdel:function(a){this.ui.inputs.h.portrait.set_text("")},acImgL:function(a){this._ac("landscape")},acImgLdel:function(a){this.ui.inputs.h.landscape.set_text("")},onSaveReturn:function(a,b){a?b.map.h.e==
1?k.showPopup(k.ln.get("window-contrbg-title"),k.ln.get("window-contrbg-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrbg-title"),k.ln.get("window-contrbg-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrbg-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrbg-title"),k.ln.get("window-contrbg-ersave"),320,150,k.ln.get("default-ok"))},__class__:vr});var xr=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrcover-title"),
1E3,Bc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrCover"]=xr;xr.__name__="com.tilbuci.ui.window.contraptions.WindowContrCover";xr.__super__=ea;xr.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("landscape");this.ui.createTInput("landscape","","",this.ui.hcontainers.h.landscape,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.landscape;a.createIconButton("landscape",m(this,this.acImgL),new Ma(b),null,
c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.landscape;a.createIconButton("landscapedel",m(this,this.acImgLdel),new Ma(b),null,c,!1);this.ui.inputs.h.landscape.set_enabled(!1);this.ui.hcontainers.h.landscape.setWidth(460,[350,50,50]);this.ui.createHContainer("portrait");this.ui.createTInput("portrait","","",this.ui.hcontainers.h.portrait,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.portrait;a.createIconButton("portrait",m(this,this.acImgP),new Ma(b),
null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.portrait;a.createIconButton("portraitdel",m(this,this.acImgPdel),new Ma(b),null,c,!1);this.ui.inputs.h.portrait.set_enabled(!1);this.ui.hcontainers.h.portrait.setWidth(460,[350,50,50]);a=k.ln.get("window-kfmanage-title");c=b=this.ui;var d={tp:"Label",id:"registered",tx:k.ln.get("window-contrcover-registered"),vr:""},f={tp:"Button",id:"load",tx:k.ln.get("window-contrcover-load"),ac:m(this,this.loadContr)},g={tp:"Button",id:"remove",
tx:k.ln.get("window-contrcover-remove"),ac:m(this,this.removeContr)},h={tp:"Label",id:"name",tx:k.ln.get("window-contrcover-name"),vr:"detail"},n=k.ln.get("window-contrcover-add");this.addForm(a,b.createColumnHolder("columns",c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:200},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",tx:"",vr:""},{tp:"Button",id:"add",tx:n,ac:m(this,this.addContr)}]),this.ui.forge("rightcol",[{tp:"Label",id:"properties",tx:k.ln.get("window-contrcover-properties"),
vr:""},{tp:"Label",id:"landscape",tx:k.ln.get("window-contrcover-landscape"),vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.landscape},{tp:"Label",id:"portrait",tx:k.ln.get("window-contrcover-portrait"),vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.portrait},{tp:"Label",id:"block",tx:k.ln.get("window-contrcover-block"),vr:"detail"},{tp:"Toggle",id:"block",vl:!1}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrcover-save"),ac:m(this,this.saveContr)}]),420));this.ui.listDbClick("registered",
m(this,this.loadContr));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.covers.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear()},clear:function(){for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];
a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h.portrait.set_text("");this.ui.inputs.h.landscape.set_text("");this.ui.toggles.h.block.set_selected(!1)},loadContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.name;a=this._list;
b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].id);c=this.ui.inputs.h.portrait;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].portrait);c=this.ui.inputs.h.landscape;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].landscape);c=this.ui.toggles.h.block;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_selected(a.h[b].holdClick)}}},action:function(a,b){switch(a){case "landscape":this.ui.inputs.h.landscape.set_text(b.h.file);
break;case "portrait":this.ui.inputs.h.portrait.set_text(b.h.file)}},removeContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveContr:function(a){a=
p.contraptions.covers.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.covers.h[d].kill();var f=p.contraptions.covers;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.covers;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addContr:function(a){if(this.ui.inputs.h.name.get_text().length>
3)if(this.ui.inputs.h.landscape.get_text()!=""||this.ui.inputs.h.portrait.get_text()!=""){a=this._list;var b=this.ui.inputs.h.name.get_text();if(Object.prototype.hasOwnProperty.call(a.h,b))a=this._list,b=this.ui.inputs.h.name.get_text(),b=a.h[b],b.load({id:this.ui.inputs.h.name.get_text(),landscape:this.ui.inputs.h.landscape.get_text(),portrait:this.ui.inputs.h.portrait.get_text(),click:this.ui.toggles.h.block.get_selected()});else{b=new Dd;b.load({id:this.ui.inputs.h.name.get_text(),landscape:this.ui.inputs.h.landscape.get_text(),
portrait:this.ui.inputs.h.portrait.get_text(),click:this.ui.toggles.h.block.get_selected()});a=this._list;var c=this.ui.inputs.h.name.get_text();a.h[c]=b}this.clear()}else k.showPopup(k.ln.get("window-contrcover-title"),k.ln.get("window-contrcover-nographics"),320,150,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-contrcover-title"),k.ln.get("window-contrcover-noname"),320,150,k.ln.get("default-ok"))},acImgP:function(a){this._ac("portrait")},acImgPdel:function(a){this.ui.inputs.h.portrait.set_text("")},
acImgL:function(a){this._ac("landscape")},acImgLdel:function(a){this.ui.inputs.h.landscape.set_text("")},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrcover-title"),k.ln.get("window-contrcover-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrcover-title"),k.ln.get("window-contrcover-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrcover-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrcover-title"),
k.ln.get("window-contrcover-ersave"),320,150,k.ln.get("default-ok"))},__class__:xr});var Ir=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrform-title"),1E3,Bc.pickValue(715,740),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrForm"]=Ir;Ir.__name__="com.tilbuci.ui.window.contraptions.WindowContrForm";Ir.__super__=ea;Ir.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("background");this.ui.createTInput("background","","",this.ui.hcontainers.h.background,
!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.background;a.createIconButton("background",m(this,this.acBackground),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.background;a.createIconButton("backgrounddel",m(this,this.acBackgrounddel),new Ma(b),null,c,!1);this.ui.inputs.h.background.set_enabled(!1);this.ui.hcontainers.h.background.setWidth(450,[340,50,50]);a=this.ui;b={tp:"Label",id:"backgroundset",tx:k.ln.get("window-contrform-background"),
vr:""};c={tp:"Custom",cont:this.ui.hcontainers.h.background};var d=k.ln.get("window-contrform-setbutton");a.forge("background",[b,c,{tp:"Spacer",id:"backgroundset",ht:10,ln:!1},{tp:"Button",id:"backgroundset",tx:d,ac:m(this,this.setElement)}]);this.ui.createHContainer("btok");this.ui.createTInput("btok","","",this.ui.hcontainers.h.btok,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.btok;a.createIconButton("btok",m(this,this.acBtok),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");
c=this.ui.hcontainers.h.btok;a.createIconButton("btokdel",m(this,this.acBtokdel),new Ma(b),null,c,!1);this.ui.inputs.h.btok.set_enabled(!1);this.ui.hcontainers.h.btok.setWidth(450,[340,50,50]);this.ui.createHContainer("formelokpos");this.ui.createLabel("formelokposx","X","detail",this.ui.hcontainers.h.formelokpos);this.ui.createNumeric("formelokposx",-3840,3840,10,0,this.ui.hcontainers.h.formelokpos);this.ui.createLabel("formelokposy","Y","detail",this.ui.hcontainers.h.formelokpos);this.ui.createNumeric("formelokposy",
-3840,3840,10,0,this.ui.hcontainers.h.formelokpos);a=this.ui;b={tp:"Label",id:"btokset",tx:k.ln.get("window-contrform-btok"),vr:""};c={tp:"Custom",cont:this.ui.hcontainers.h.btok};d={tp:"Label",id:"formelokpos",tx:k.ln.get("window-contrform-formelposition"),vr:""};var f={tp:"Custom",cont:this.ui.hcontainers.h.formelokpos},g=k.ln.get("window-contrform-setbutton");a.forge("btok",[b,c,{tp:"Spacer",id:"okpos",ht:10,ln:!1},d,f,{tp:"Spacer",id:"btokset",ht:10,ln:!1},{tp:"Button",id:"btokset",tx:g,ac:m(this,
this.setElement)}]);this.ui.createHContainer("btcancel");this.ui.createTInput("btcancel","","",this.ui.hcontainers.h.btcancel,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.btcancel;a.createIconButton("btcancel",m(this,this.acBtcancel),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.btcancel;a.createIconButton("btcanceldel",m(this,this.acBtcanceldel),new Ma(b),null,c,!1);this.ui.inputs.h.btcancel.set_enabled(!1);this.ui.hcontainers.h.btcancel.setWidth(450,
[340,50,50]);this.ui.createHContainer("formelcancpos");this.ui.createLabel("formelcancposx","X","detail",this.ui.hcontainers.h.formelcancpos);this.ui.createNumeric("formelcancposx",-3840,3840,10,0,this.ui.hcontainers.h.formelcancpos);this.ui.createLabel("formelcancposy","Y","detail",this.ui.hcontainers.h.formelcancpos);this.ui.createNumeric("formelcancposy",-3840,3840,10,0,this.ui.hcontainers.h.formelcancpos);a=this.ui;b={tp:"Label",id:"btcancelset",tx:k.ln.get("window-contrform-btcancel"),vr:""};
c={tp:"Custom",cont:this.ui.hcontainers.h.btcancel};d={tp:"Label",id:"formelcancpos",tx:k.ln.get("window-contrform-formelposition"),vr:""};f={tp:"Custom",cont:this.ui.hcontainers.h.formelcancpos};g=k.ln.get("window-contrform-setbutton");a.forge("btcancel",[b,c,{tp:"Spacer",id:"cancpos",ht:10,ln:!1},d,f,{tp:"Spacer",id:"btcancelset",ht:10,ln:!1},{tp:"Button",id:"btcancelset",tx:g,ac:m(this,this.setElement)}]);this.ui.createHContainer("formelpos");this.ui.createLabel("formelposx","X","detail",this.ui.hcontainers.h.formelpos);
this.ui.createNumeric("formelposx",-3840,3840,10,0,this.ui.hcontainers.h.formelpos);this.ui.createLabel("formelposy","Y","detail",this.ui.hcontainers.h.formelpos);this.ui.createNumeric("formelposy",-3840,3840,10,0,this.ui.hcontainers.h.formelpos);a=this.ui;b={tp:"Label",id:"formelname",tx:k.ln.get("window-contrform-elname"),vr:""};c={tp:"Label",id:"formeltytpe",tx:k.ln.get("window-contrform-eltype"),vr:""};d={tp:"Select",id:"formeltytpe",sl:"",vl:[{text:k.ln.get("window-contrform-eltype-input"),value:"input"},
{text:k.ln.get("window-contrform-eltype-select"),value:"select"},{text:k.ln.get("window-contrform-eltype-toggle"),value:"toggle"},{text:k.ln.get("window-contrform-eltype-numeric"),value:"numeric"},{text:k.ln.get("window-contrform-eltype-password"),value:"password"},{text:k.ln.get("window-contrform-eltype-textarea"),value:"textarea"}]};f={tp:"Label",id:"formelselect",tx:k.ln.get("window-contrform-formelselect"),vr:""};g={tp:"Label",id:"formelwidth",tx:k.ln.get("window-contrform-formelwidth"),vr:""};
var h={tp:"Label",id:"formelposition",tx:k.ln.get("window-contrform-formelposition"),vr:""},n={tp:"Custom",cont:this.ui.hcontainers.h.formelpos},l=k.ln.get("window-contrform-setbutton");a.forge("formel",[b,{tp:"TInput",id:"formelname",tx:"",vr:""},c,d,f,{tp:"TInput",id:"formelselect",tx:"",vr:""},{tp:"Spacer",id:"forplace",ht:10,ln:!1},g,{tp:"Numeric",id:"formelwidth",mn:10,mx:3840,st:10,vl:100},h,n,{tp:"Spacer",id:"formel",ht:10,ln:!1},{tp:"Button",id:"formel",tx:l,ac:m(this,this.setElement)}]);
this.ui.createHContainer("elements");this.ui.createButton("elementadd",k.ln.get("window-contrform-eladd"),m(this,this.onElAdd),this.ui.hcontainers.h.elements);this.ui.createButton("elementrem",k.ln.get("window-contrform-elrem"),m(this,this.onElRem),this.ui.hcontainers.h.elements);a=k.ln.get("window-kfmanage-title");c=b=this.ui;d={tp:"Label",id:"registered",tx:k.ln.get("window-contrform-registered"),vr:""};f={tp:"Button",id:"load",tx:k.ln.get("window-contrform-load"),ac:m(this,this.loadContr)};g={tp:"Button",
id:"remove",tx:k.ln.get("window-contrform-remove"),ac:m(this,this.removeContr)};h={tp:"Label",id:"name",tx:k.ln.get("window-contrform-name"),vr:"detail"};n={tp:"Label",id:"elements",tx:k.ln.get("window-contrform-elements"),vr:"detail"};l={tp:"Custom",cont:this.ui.hcontainers.h.elements};var q=k.ln.get("window-contrform-add");this.addForm(a,b.createColumnHolder("columns",c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:150},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",
tx:"",vr:""},n,{tp:"List",id:"elements",vl:[],sl:null,ht:190,ch:m(this,this.onElLoad)},l,{tp:"Button",id:"add",tx:q,ac:m(this,this.addContr)}]),this.ui.forge("rightcol",[]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrform-save"),ac:m(this,this.saveContr)}]),620));this.ui.listDbClick("registered",m(this,this.loadContr));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();
var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.forms.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear();this.ui.hcontainers.h.elements.setWidth(460);this.clearElements()},clearElements:function(){var a=[];a.push({text:k.ln.get("window-contrform-nameok"),value:{name:k.ln.get("window-contrform-nameok"),type:"btok",file:"",options:"",width:100,x:0,y:0}});a.push({text:k.ln.get("window-contrform-namebg"),
value:{name:k.ln.get("window-contrform-namebg"),type:"background",file:"",options:"",width:100,x:0,y:0}});a.push({text:k.ln.get("window-contrform-namecancel"),value:{name:k.ln.get("window-contrform-namecancel"),type:"btcancel",file:"",options:"",width:100,x:0,y:0}});this.ui.setListValues("elements",a);this.ui.setListSelectValue("elements",null)},redrawElementsList:function(){for(var a=[],b=this.ui.lists.h.elements.get_dataProvider().iterator();b.hasNext();){var c=b.next();a.push({text:c.text,value:c.value})}this.ui.setListValues("elements",
a);this.ui.setListSelectValue("elements",null);this.ui.containers.h.rightcol.removeChildren()},clear:function(){for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.id,value:g})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");this.clearElements()},loadContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().text;
if(Object.prototype.hasOwnProperty.call(a.h,b)){this.ui.inputs.h.name.set_text(this.ui.lists.h.registered.get_selectedItem().text);a=[];b=0;for(var c=this.ui.lists.h.registered.get_selectedItem().value.elem;b<c.length;){var d=c[b];++b;switch(d.type){case "background":var f=k.ln.get("window-contrform-background");break;case "btcancel":f=k.ln.get("window-contrform-btcancel");break;case "btok":f=k.ln.get("window-contrform-btok");break;default:f=d.name+" ("+k.ln.get("window-contrform-eltype-"+d.type)+
")"}a.push({text:f,value:d})}this.ui.setListValues("elements",a);this.ui.setListSelectValue("elements",null);this.ui.containers.h.rightcol.removeChildren()}}},action:function(a,b){switch(a){case "formbackground":this.ui.inputs.h.background.set_text(b.h.file);break;case "formbtcancel":this.ui.inputs.h.btcancel.set_text(b.h.file);break;case "formbtok":this.ui.inputs.h.btok.set_text(b.h.file)}},removeContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().text;
Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().text,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().text,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveContr:function(a){a=p.contraptions.forms.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.forms.h[d].kill();var f=p.contraptions.forms;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;
a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.forms;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addContr:function(a){if(this.ui.inputs.h.name.get_text().length>3){var b=!0;a=[];for(var c=this.ui.lists.h.elements.get_dataProvider().iterator();c.hasNext();){var d=c.next();switch(d.value.type){case "background":a.push(d.value);
break;case "btcancel":a.push(d.value);break;case "btok":a.push(d.value);d.value.file==""&&(b=!1);break;default:d.value.name!=""&&a.push(d.value)}}b?a.length<=3?k.showPopup(k.ln.get("window-contrform-title"),k.ln.get("window-contrform-noelem"),320,150,k.ln.get("default-ok")):(b=this._list,c=this.ui.inputs.h.name.get_text(),Object.prototype.hasOwnProperty.call(b.h,c)?(b=this._list,c=this.ui.inputs.h.name.get_text(),c=b.h[c]):c=new D,c.load({id:this.ui.inputs.h.name.get_text(),elem:a})&&(b=this._list,
a=this.ui.inputs.h.name.get_text(),b.h[a]=c,this.ui.inputs.h.name.set_text(""),this.clear())):k.showPopup(k.ln.get("window-contrform-title"),k.ln.get("window-contrform-nook"),320,150,k.ln.get("default-ok"))}else k.showPopup(k.ln.get("window-contrform-title"),k.ln.get("window-contrform-noname"),320,150,k.ln.get("default-ok"))},acBackground:function(a){this._ac("formbackground")},acBackgrounddel:function(a){this.ui.inputs.h.background.set_text("")},acBtok:function(a){this._ac("formbtok")},acBtokdel:function(a){this.ui.inputs.h.btok.set_text("")},
acBtcancel:function(a){this._ac("formbtcancel")},acBtcanceldel:function(a){this.ui.inputs.h.btcancel.set_text("")},onElAdd:function(a){a=[];for(var b=this.ui.lists.h.elements.get_dataProvider().iterator();b.hasNext();){var c=b.next();a.push({text:c.text,value:c.value})}a.push({text:k.ln.get("window-contrform-new"),value:{name:"",type:"",file:"",options:"",width:100,x:0,y:0}});this.ui.setListValues("elements",a);this.ui.setListSelectValue("elements",null);this.ui.containers.h.rightcol.removeChildren()},
onElLoad:function(a){if(this.ui.lists.h.elements.get_selectedItem()!=null)switch(this.ui.containers.h.rightcol.removeChildren(),this.ui.lists.h.elements.get_selectedItem().value.type){case "background":this.ui.containers.h.rightcol.addChild(this.ui.containers.h.background);this.ui.labels.h.backgroundset.set_width(this.ui.buttons.h.backgroundset.set_width(450));this.ui.inputs.h.background.set_text(this.ui.lists.h.elements.get_selectedItem().value.file);break;case "btcancel":this.ui.containers.h.rightcol.addChild(this.ui.containers.h.btcancel);
this.ui.labels.h.formelcancpos.set_width(this.ui.labels.h.btcancelset.set_width(this.ui.buttons.h.btcancelset.set_width(450)));this.ui.hcontainers.h.formelcancpos.setWidth(450,[60,145,60,145]);this.ui.inputs.h.btcancel.set_text(this.ui.lists.h.elements.get_selectedItem().value.file);this.ui.numerics.h.formelcancposx.set_value(this.ui.lists.h.elements.get_selectedItem().value.x);this.ui.numerics.h.formelcancposy.set_value(this.ui.lists.h.elements.get_selectedItem().value.y);break;case "btok":this.ui.containers.h.rightcol.addChild(this.ui.containers.h.btok);
this.ui.labels.h.formelokpos.set_width(this.ui.labels.h.btokset.set_width(this.ui.buttons.h.btokset.set_width(450)));this.ui.hcontainers.h.formelokpos.setWidth(450,[60,145,60,145]);this.ui.inputs.h.btok.set_text(this.ui.lists.h.elements.get_selectedItem().value.file);this.ui.numerics.h.formelokposx.set_value(this.ui.lists.h.elements.get_selectedItem().value.x);this.ui.numerics.h.formelokposy.set_value(this.ui.lists.h.elements.get_selectedItem().value.y);break;default:this.ui.containers.h.rightcol.addChild(this.ui.containers.h.formel),
this.ui.inputs.h.formelname.set_width(this.ui.labels.h.formelname.set_width(450)),this.ui.selects.h.formeltytpe.set_width(this.ui.labels.h.formeltytpe.set_width(450)),this.ui.inputs.h.formelselect.set_width(this.ui.labels.h.formelselect.set_width(450)),this.ui.numerics.h.formelwidth.set_width(this.ui.labels.h.formelwidth.set_width(450)),this.ui.labels.h.formelposition.set_width(this.ui.buttons.h.formel.set_width(450)),this.ui.hcontainers.h.formelpos.setWidth(450,[60,145,60,145]),this.ui.inputs.h.formelname.set_text(this.ui.lists.h.elements.get_selectedItem().value.name),
this.ui.setSelectValue("formeltytpe",this.ui.lists.h.elements.get_selectedItem().value.type),this.ui.inputs.h.formelselect.set_text(this.ui.lists.h.elements.get_selectedItem().value.options),this.ui.numerics.h.formelposx.set_value(this.ui.lists.h.elements.get_selectedItem().value.x),this.ui.numerics.h.formelposy.set_value(this.ui.lists.h.elements.get_selectedItem().value.y),this.ui.numerics.h.formelwidth.set_value(this.ui.lists.h.elements.get_selectedItem().value.width)}},onElRem:function(a){if(this.ui.lists.h.elements.get_selectedItem()!=
null)switch(this.ui.lists.h.elements.get_selectedItem().value.type){case "background":break;case "btcancel":break;case "btok":break;default:a=[];for(var b=this.ui.lists.h.elements.get_dataProvider().iterator();b.hasNext();){var c=b.next();c.value.name!=this.ui.lists.h.elements.get_selectedItem().value.name&&a.push({text:c.text,value:c.value})}this.ui.setListValues("elements",a);this.ui.setListSelectValue("elements",null);this.ui.containers.h.rightcol.removeChildren()}},setElement:function(a){if(this.ui.lists.h.elements.get_selectedItem()!=
null)switch(this.ui.lists.h.elements.get_selectedItem().value.type){case "background":a=this.ui.inputs.h.background;this.ui.lists.h.elements.get_selectedItem().value.file=a.get_text();this.redrawElementsList();break;case "btcancel":a=this.ui.inputs.h.btcancel;this.ui.lists.h.elements.get_selectedItem().value.file=a.get_text();a=this.ui.lists.h.elements;var b=this.ui.numerics.h.formelcancposx.get_value();a.get_selectedItem().value.x=Math.round(b);a=this.ui.lists.h.elements;b=this.ui.numerics.h.formelcancposy.get_value();
a.get_selectedItem().value.y=Math.round(b);this.redrawElementsList();break;case "btok":a=this.ui.inputs.h.btok;this.ui.lists.h.elements.get_selectedItem().value.file=a.get_text();a=this.ui.lists.h.elements;b=this.ui.numerics.h.formelokposx.get_value();a.get_selectedItem().value.x=Math.round(b);a=this.ui.lists.h.elements;b=this.ui.numerics.h.formelokposy.get_value();a.get_selectedItem().value.y=Math.round(b);this.redrawElementsList();break;default:if(a=this.ui.inputs.h.formelname.get_text(),a.length<
3)k.showPopup(k.ln.get("window-contrform-title"),k.ln.get("window-contrform-showtname"),320,150,k.ln.get("default-ok"));else{b=!0;if(a!=this.ui.lists.h.elements.get_selectedItem().value.name)for(var c=this.ui.lists.h.elements.get_dataProvider().iterator();c.hasNext();){var d=c.next();a==d.value.name&&(b=!1)}b?(a=this.ui.inputs.h.formelname,this.ui.lists.h.elements.get_selectedItem().value.name=a.get_text(),a=this.ui.selects.h.formeltytpe,this.ui.lists.h.elements.get_selectedItem().value.type=a.get_selectedItem().value,
a=this.ui.inputs.h.formelselect,this.ui.lists.h.elements.get_selectedItem().value.options=a.get_text(),a=this.ui.lists.h.elements,b=this.ui.numerics.h.formelposx.get_value(),a.get_selectedItem().value.x=Math.round(b),a=this.ui.lists.h.elements,b=this.ui.numerics.h.formelposy.get_value(),a.get_selectedItem().value.y=Math.round(b),a=this.ui.lists.h.elements,b=this.ui.numerics.h.formelwidth.get_value(),a.get_selectedItem().value.width=Math.round(b),a=this.ui.lists.h.elements,b=this.ui.inputs.h.formelname.get_text()+
" ("+k.ln.get("window-contrform-eltype-"+H.string(this.ui.selects.h.formeltytpe.get_selectedItem().value)),a.get_selectedItem().text=b+")",this.redrawElementsList()):k.showPopup(k.ln.get("window-contrform-title"),k.ln.get("window-contrform-usedname"),320,150,k.ln.get("default-ok"))}}},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrform-title"),k.ln.get("window-contrform-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrform-title"),
k.ln.get("window-contrform-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrform-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrform-title"),k.ln.get("window-contrform-ersave"),320,150,k.ln.get("default-ok"))},__class__:Ir});var Jr=function(a){this._lastfrtime=250;this._lastframes=1;this._list=new G;ea.call(this,a,k.ln.get("window-contrinterf-title"),1E3,Bc.pickValue(715,740),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrInterf"]=Jr;Jr.__name__=
"com.tilbuci.ui.window.contraptions.WindowContrInterf";Jr.__super__=ea;Jr.prototype=I(ea.prototype,{_list:null,_lastframes:null,_lastfrtime:null,startInterface:function(a){this.ui.createHContainer("background");this.ui.createTInput("background","","",this.ui.hcontainers.h.background,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.background;a.createIconButton("background",m(this,this.acBackground),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.background;
a.createIconButton("backgrounddel",m(this,this.acBackgrounddel),new Ma(b),null,c,!1);this.ui.inputs.h.background.set_enabled(!1);this.ui.hcontainers.h.background.setWidth(450,[340,50,50]);a=this.ui;b={tp:"Label",id:"backgroundset",tx:k.ln.get("window-contrinterf-background"),vr:""};c={tp:"Custom",cont:this.ui.hcontainers.h.background};var d=k.ln.get("window-contrinterf-setbutton");a.forge("background",[b,c,{tp:"Spacer",id:"backgroundset",ht:10,ln:!1},{tp:"Button",id:"backgroundset",tx:d,ac:m(this,
this.setElement)}]);this.ui.createHContainer("spritemap");this.ui.createTInput("spritemap","","",this.ui.hcontainers.h.spritemap,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.spritemap;a.createIconButton("spritemap",m(this,this.acBtsm),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.spritemap;a.createIconButton("spritemap",m(this,this.acBtsmdel),new Ma(b),null,c,!1);this.ui.inputs.h.spritemap.set_enabled(!1);this.ui.hcontainers.h.spritemap.setWidth(450,
[340,50,50]);this.ui.createHContainer("formelsmpos");this.ui.createLabel("formelsmposx","X","detail",this.ui.hcontainers.h.formelsmpos);this.ui.createNumeric("formelsmposx",-3840,3840,10,0,this.ui.hcontainers.h.formelsmpos);this.ui.createLabel("formelsmposy","Y","detail",this.ui.hcontainers.h.formelsmpos);this.ui.createNumeric("formelsmposy",-3840,3840,10,0,this.ui.hcontainers.h.formelsmpos);a=this.ui;b={tp:"Label",id:"spritemap",tx:k.ln.get("window-contrinterf-smap"),vr:""};c={tp:"Custom",cont:this.ui.hcontainers.h.spritemap};
d={tp:"Label",id:"smaction",tx:k.ln.get("window-contrinterf-smapac"),vr:""};var f={tp:"Label",id:"formelsmpos",tx:k.ln.get("window-contrinterf-formelposition"),vr:""},g={tp:"Custom",cont:this.ui.hcontainers.h.formelsmpos},h=k.ln.get("window-contrinterf-setbutton");a.forge("spritemap",[b,c,d,{tp:"TInput",id:"smaction",vl:"",vr:""},{tp:"Spacer",id:"spritemap",ht:10,ln:!1},f,g,{tp:"Spacer",id:"formelsmpos",ht:10,ln:!1},{tp:"Button",id:"btsmset",tx:h,ac:m(this,this.setElement)}]);this.ui.createHContainer("formeltxpos");
this.ui.createLabel("formeltxposx","X","detail",this.ui.hcontainers.h.formeltxpos);this.ui.createNumeric("formeltxposx",-3840,3840,10,0,this.ui.hcontainers.h.formeltxpos);this.ui.createLabel("formeltxposy","Y","detail",this.ui.hcontainers.h.formeltxpos);this.ui.createNumeric("formeltxposy",-3840,3840,10,0,this.ui.hcontainers.h.formeltxpos);a=this.ui;b={tp:"Label",id:"txset",tx:k.ln.get("window-contrinterf-text"),vr:""};c={tp:"Label",id:"txuse",tx:k.ln.get("window-contrinterf-use"),vr:"detail"};d=
{tp:"Label",id:"txfont",tx:k.ln.get("window-contrinterf-font"),vr:"detail"};f={tp:"Label",id:"txsize",tx:k.ln.get("window-contrinterf-fontsize"),vr:"detail"};g={tp:"Label",id:"txcolor",tx:k.ln.get("window-contrinterf-fontcolor"),vr:"detail"};h={tp:"Label",id:"txdeco",tx:k.ln.get("window-contrinterf-fontdeco"),vr:"detail"};var n={tp:"Select",id:"txdeco",vl:[{text:k.ln.get("window-contrinterf-fontdeco-normal"),value:"normal"},{text:k.ln.get("window-contrinterf-fontdeco-bold"),value:"bold"},{text:k.ln.get("window-contrinterf-fontdeco-italic"),
value:"italic"},{text:k.ln.get("window-contrinterf-fontdeco-bolditalic"),value:"bolditalic"}],sl:null},l={tp:"Label",id:"txalign",tx:k.ln.get("window-contrinterf-fontalign"),vr:"detail"},q={tp:"Select",id:"txalign",vl:[{text:k.ln.get("window-contrinterf-fontalign-left"),value:"left"},{text:k.ln.get("window-contrinterf-fontalign-right"),value:"right"},{text:k.ln.get("window-contrinterf-fontalign-center"),value:"center"}],sl:null},u={tp:"Label",id:"txwidth",tx:k.ln.get("window-contrinterf-width"),vr:""},
v={tp:"Label",id:"formeltxpos",tx:k.ln.get("window-contrinterf-formelposition"),vr:""},z={tp:"Custom",cont:this.ui.hcontainers.h.formeltxpos},r=k.ln.get("window-contrinterf-setbutton");a.forge("txset",[b,c,{tp:"Toggle",id:"txuse",vl:!1},d,{tp:"Select",id:"txfont",vl:[],sl:null},f,{tp:"Numeric",id:"txsize",mn:1,mx:1E3,st:1,vl:12},g,{tp:"TInput",id:"txcolor",vl:"#FFFFFF",vr:""},h,n,l,q,{tp:"Spacer",id:"txwidth",ht:10,ln:!1},u,{tp:"Numeric",id:"txwidth",mn:1,mx:1E4,st:10,vl:100},v,z,{tp:"Spacer",id:"txset",
ht:10,ln:!1},{tp:"Button",id:"txset",tx:r,ac:m(this,this.setElement)}]);this.ui.createHContainer("formel");this.ui.createTInput("formel","","",this.ui.hcontainers.h.formel,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.formel;a.createIconButton("formel",m(this,this.acElem),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.formel;a.createIconButton("formeldel",m(this,this.acElemdel),new Ma(b),null,c,!1);this.ui.inputs.h.formel.set_enabled(!1);
this.ui.hcontainers.h.formel.setWidth(450,[340,50,50]);this.ui.createHContainer("formelpos");this.ui.createLabel("formelposx","X","detail",this.ui.hcontainers.h.formelpos);this.ui.createNumeric("formelposx",-3840,3840,10,0,this.ui.hcontainers.h.formelpos);this.ui.createLabel("formelposy","Y","detail",this.ui.hcontainers.h.formelpos);this.ui.createNumeric("formelposy",-3840,3840,10,0,this.ui.hcontainers.h.formelpos);a=this.ui;b={tp:"Label",id:"btset",tx:k.ln.get("window-contrinterf-btgraph"),vr:""};
c={tp:"Custom",cont:this.ui.hcontainers.h.formel};d={tp:"Label",id:"formelac",tx:k.ln.get("window-contrinterf-elac"),vr:""};f={tp:"Label",id:"formelposition",tx:k.ln.get("window-contrinterf-formelposition"),vr:""};g={tp:"Custom",cont:this.ui.hcontainers.h.formelpos};h={tp:"Label",id:"formelrotation",tx:k.ln.get("window-contrinterf-formelrotation"),vr:""};n={tp:"Label",id:"formelalpha",tx:k.ln.get("window-contrinterf-formelalpha"),vr:""};l=k.ln.get("window-contrinterf-setbutton");a.forge("formel",
[b,c,d,{tp:"TInput",id:"formelac",tx:"",vr:""},f,g,h,{tp:"Numeric",id:"formelrotation",mn:0,mx:359,vl:0,st:1},n,{tp:"Numeric",id:"formelalpha",mn:0,mx:100,vl:100,st:1},{tp:"Spacer",id:"formel",ht:10,ln:!1},{tp:"Button",id:"formelbt",tx:l,ac:m(this,this.setElement)}]);this.ui.createHContainer("elements");this.ui.createButton("elementadd",k.ln.get("window-contrinterf-eladd"),m(this,this.onElAdd),this.ui.hcontainers.h.elements);this.ui.createButton("elementrem",k.ln.get("window-contrinterf-elrem"),m(this,
this.onElRem),this.ui.hcontainers.h.elements);a=k.ln.get("window-kfmanage-title");c=b=this.ui;d={tp:"Label",id:"registered",tx:k.ln.get("window-contrinterf-registered"),vr:""};f={tp:"Button",id:"load",tx:k.ln.get("window-contrinterf-load"),ac:m(this,this.loadContr)};g={tp:"Button",id:"remove",tx:k.ln.get("window-contrinterf-remove"),ac:m(this,this.removeContr)};h={tp:"Label",id:"name",tx:k.ln.get("window-contrinterf-name"),vr:"detail"};n={tp:"Label",id:"elements",tx:k.ln.get("window-contrinterf-elements"),
vr:"detail"};l={tp:"Custom",cont:this.ui.hcontainers.h.elements};q=k.ln.get("window-contrinterf-add");this.addForm(a,b.createColumnHolder("columns",c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:150},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",tx:"",vr:""},n,{tp:"List",id:"elements",vl:[],sl:null,ht:190,ch:m(this,this.onElLoad)},l,{tp:"Button",id:"add",tx:q,ac:m(this,this.addContr)}]),this.ui.forge("rightcol",[]),this.ui.forge("bottom",[{tp:"Button",id:"save",
tx:k.ln.get("window-contrinterf-save"),ac:m(this,this.saveContr)}]),620));this.ui.listDbClick("registered",m(this,this.loadContr));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.interf.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear();
this.ui.hcontainers.h.elements.setWidth(460);this.clearElements();b=[];a=0;for(c=k.fonts.length;a<c;)d=a++,b.push({text:k.fonts[d],value:k.fonts[d]});a=0;for(c=p.mdata.fonts;a<c.length;)d=c[a],++a,b.push({text:d.name,value:d.name});this.ui.setSelectOptions("txfont",b)},clearElements:function(){var a=[];a.push({text:k.ln.get("window-contrinterf-namebg"),value:{type:"background",file:"",action:"",x:0,y:0,options:"",rot:0,alpha:100}});a.push({text:k.ln.get("window-contrinterf-nameanim"),value:{type:"spritemap",
file:"",action:"",x:0,y:0,options:"",rot:0,alpha:100}});a.push({text:k.ln.get("window-contrinterf-nametx"),value:{type:"text",file:"",action:"",x:0,y:0,options:"",rot:0,alpha:100}});this.ui.setListValues("elements",a);this.ui.setListSelectValue("elements",null)},redrawElementsList:function(){for(var a=[],b=this.ui.lists.h.elements.get_dataProvider().iterator();b.hasNext();){var c=b.next();a.push({text:c.text,value:c.value})}this.ui.setListValues("elements",a);this.ui.setListSelectValue("elements",
null);this.ui.containers.h.rightcol.removeChildren()},clear:function(){for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.id,value:g})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");this.clearElements()},loadContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().text;if(Object.prototype.hasOwnProperty.call(a.h,
b)){this.ui.inputs.h.name.set_text(this.ui.lists.h.registered.get_selectedItem().text);a=[];b=0;for(var c=this.ui.lists.h.registered.get_selectedItem().value.elem;b<c.length;){var d=c[b];++b;switch(d.type){case "background":var f=k.ln.get("window-contrinterf-namebg");break;case "spritemap":f=k.ln.get("window-contrinterf-nameanim");break;case "text":f=k.ln.get("window-contrinterf-nametx");break;default:f=k.ln.get("window-contrinterf-namebutton")}a.push({text:f,value:d})}this.ui.setListValues("elements",
a);this.ui.setListSelectValue("elements",null);this.ui.containers.h.rightcol.removeChildren()}}},action:function(a,b){switch(a){case "intanim":this.ui.inputs.h.spritemap.set_text(b.h.file);this._lastframes=H.parseInt(b.h.frames);this._lastfrtime=H.parseInt(b.h.frtime);break;case "intbackground":this.ui.inputs.h.background.set_text(b.h.file);break;case "intimage":this.ui.inputs.h.formel.set_text(b.h.file)}},removeContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;
a=this.ui.lists.h.registered.get_selectedItem().text;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().text,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().text,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveContr:function(a){a=p.contraptions.forms.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.forms.h[d].kill();var f=p.contraptions.forms;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.interf;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addContr:function(a){if(this.ui.inputs.h.name.get_text().length>3){a=[];for(var b=this.ui.lists.h.elements.get_dataProvider().iterator();b.hasNext();){var c=b.next();a.push(c.value)}b=this._list;
c=this.ui.inputs.h.name.get_text();Object.prototype.hasOwnProperty.call(b.h,c)?(b=this._list,c=this.ui.inputs.h.name.get_text(),c=b.h[c]):c=new K;c.load({id:this.ui.inputs.h.name.get_text(),elem:a})&&(b=this._list,a=this.ui.inputs.h.name.get_text(),b.h[a]=c,this.ui.inputs.h.name.set_text(""),this.clear())}else k.showPopup(k.ln.get("window-contrinterf-title"),k.ln.get("window-contrinterf-noname"),320,150,k.ln.get("default-ok"))},acBackground:function(a){this._ac("intbackground")},acBackgrounddel:function(a){this.ui.inputs.h.background.set_text("")},
acBtsm:function(a){this._ac("intanim")},acBtsmdel:function(a){this.ui.inputs.h.spritemap.set_text("")},acElem:function(a){this._ac("intimage")},acElemdel:function(a){this.ui.inputs.h.formel.set_text("")},onElAdd:function(a){a=[];for(var b=this.ui.lists.h.elements.get_dataProvider().iterator();b.hasNext();){var c=b.next();a.push({text:c.text,value:c.value})}a.push({text:k.ln.get("window-contrinterf-namebutton"),value:{type:"",file:"",action:"",x:0,y:0,rot:0,alpha:100,options:""}});this.ui.setListValues("elements",
a);this.ui.setListSelectValue("elements",null);this.ui.containers.h.rightcol.removeChildren()},onElLoad:function(a){if(this.ui.lists.h.elements.get_selectedItem()!=null)switch(this.ui.containers.h.rightcol.removeChildren(),this.ui.lists.h.elements.get_selectedItem().value.type){case "background":this.ui.containers.h.rightcol.addChild(this.ui.containers.h.background);this.ui.labels.h.backgroundset.set_width(this.ui.buttons.h.backgroundset.set_width(450));this.ui.inputs.h.background.set_text(this.ui.lists.h.elements.get_selectedItem().value.file);
break;case "spritemap":this.ui.containers.h.rightcol.addChild(this.ui.containers.h.spritemap);this.ui.labels.h.formelsmpos.set_width(this.ui.labels.h.spritemap.set_width(this.ui.labels.h.smaction.set_width(this.ui.inputs.h.smaction.set_width(this.ui.buttons.h.btsmset.set_width(450)))));this.ui.hcontainers.h.formelsmpos.setWidth(450,[60,145,60,145]);this.ui.inputs.h.spritemap.set_text(this.ui.lists.h.elements.get_selectedItem().value.file);this.ui.inputs.h.smaction.set_text(this.ui.lists.h.elements.get_selectedItem().value.action);
this.ui.numerics.h.formelsmposx.set_value(this.ui.lists.h.elements.get_selectedItem().value.x);this.ui.numerics.h.formelsmposy.set_value(this.ui.lists.h.elements.get_selectedItem().value.y);this.ui.lists.h.elements.get_selectedItem().value.options!=""&&(a=this.ui.lists.h.elements.get_selectedItem().value.options.split(";"),a.length==2&&(this._lastframes=H.parseInt(a[0]),this._lastfrtime=H.parseInt(a[1])));break;case "text":this.ui.containers.h.rightcol.addChild(this.ui.containers.h.txset);this.ui.labels.h.formeltxpos.set_width(this.ui.labels.h.txset.set_width(this.ui.buttons.h.txset.set_width(450)));
this.ui.hcontainers.h.formeltxpos.setWidth(450,[60,145,60,145]);this.ui.numerics.h.formeltxposx.set_value(this.ui.lists.h.elements.get_selectedItem().value.x);this.ui.numerics.h.formeltxposy.set_value(this.ui.lists.h.elements.get_selectedItem().value.y);this.ui.labels.h.txuse.set_width(this.ui.labels.h.txfont.set_width(this.ui.selects.h.txfont.set_width(450)));this.ui.labels.h.txsize.set_width(this.ui.numerics.h.txsize.set_width(450));this.ui.labels.h.txcolor.set_width(this.ui.inputs.h.txcolor.set_width(450));
this.ui.labels.h.txalign.set_width(this.ui.selects.h.txalign.set_width(450));this.ui.labels.h.txdeco.set_width(this.ui.selects.h.txdeco.set_width(450));this.ui.labels.h.txwidth.set_width(this.ui.numerics.h.txwidth.set_width(450));this.ui.toggles.h.txuse.set_selected(!1);this.ui.lists.h.elements.get_selectedItem().value.options!=""&&(a=this.ui.lists.h.elements.get_selectedItem().value.options.split(";"),a.length==7&&(this.ui.toggles.h.txuse.set_selected(!0),this.ui.numerics.h.txwidth.set_value(H.parseInt(a[0])),
this.ui.setSelectValue("txfont",a[1]),this.ui.numerics.h.txsize.set_value(H.parseInt(a[2])),this.ui.inputs.h.txcolor.set_text(a[3]),a[4]=="true"&&a[5]=="true"?this.ui.setSelectValue("txdeco","bolditalic"):a[4]=="true"?this.ui.setSelectValue("txdeco","bold"):a[5]=="true"?this.ui.setSelectValue("txdeco","italic"):this.ui.setSelectValue("txdeco","normal"),this.ui.setSelectValue("txalign",a[6])));break;default:this.ui.containers.h.rightcol.addChild(this.ui.containers.h.formel),this.ui.hcontainers.h.formelpos.setWidth(450,
[60,145,60,145]),this.ui.numerics.h.formelposx.set_value(this.ui.lists.h.elements.get_selectedItem().value.x),this.ui.numerics.h.formelposy.set_value(this.ui.lists.h.elements.get_selectedItem().value.y),this.ui.labels.h.btset.set_width(this.ui.labels.h.formelac.set_width(this.ui.inputs.h.formelac.set_width(450))),this.ui.labels.h.formelposition.set_width(this.ui.buttons.h.formelbt.set_width(450)),this.ui.labels.h.formelrotation.set_width(this.ui.labels.h.formelalpha.set_width(this.ui.numerics.h.formelrotation.set_width(this.ui.numerics.h.formelalpha.set_width(450)))),
this.ui.inputs.h.formel.set_text(this.ui.lists.h.elements.get_selectedItem().value.file),this.ui.inputs.h.formelac.set_text(this.ui.lists.h.elements.get_selectedItem().value.action),this.ui.numerics.h.formelposx.set_value(this.ui.lists.h.elements.get_selectedItem().value.x),this.ui.numerics.h.formelposy.set_value(this.ui.lists.h.elements.get_selectedItem().value.y),this.ui.lists.h.elements.get_selectedItem().value.rot==null?this.ui.numerics.h.formelrotation.set_value(0):this.ui.numerics.h.formelrotation.set_value(this.ui.lists.h.elements.get_selectedItem().value.rot),
this.ui.lists.h.elements.get_selectedItem().value.alpha==null?this.ui.numerics.h.formelalpha.set_value(100):this.ui.numerics.h.formelalpha.set_value(this.ui.lists.h.elements.get_selectedItem().value.alpha)}},onElRem:function(a){if(this.ui.lists.h.elements.get_selectedItem()!=null)switch(this.ui.lists.h.elements.get_selectedItem().value.type){case "background":break;case "spritemap":break;case "text":break;default:a=[];for(var b=0,c=this.ui.lists.h.elements.get_dataProvider().get_length();b<c;){var d=
b++;d!=this.ui.lists.h.elements.get_selectedIndex()&&(d=this.ui.lists.h.elements.get_dataProvider().get(d),a.push({text:d.text,value:d.value}))}this.ui.setListValues("elements",a);this.ui.setListSelectValue("elements",null);this.ui.containers.h.rightcol.removeChildren()}},setElement:function(a){if(this.ui.lists.h.elements.get_selectedItem()!=null)switch(this.ui.lists.h.elements.get_selectedItem().value.type){case "background":a=this.ui.inputs.h.background;this.ui.lists.h.elements.get_selectedItem().value.file=
a.get_text();this.redrawElementsList();break;case "spritemap":a=this.ui.inputs.h.spritemap;this.ui.lists.h.elements.get_selectedItem().value.file=a.get_text();a=this._lastframes+";";this.ui.lists.h.elements.get_selectedItem().value.options=a+this._lastfrtime;a=this.ui.inputs.h.smaction;this.ui.lists.h.elements.get_selectedItem().value.action=a.get_text();a=this.ui.lists.h.elements;var b=this.ui.numerics.h.formelsmposx.get_value();a.get_selectedItem().value.x=Math.round(b);a=this.ui.lists.h.elements;
b=this.ui.numerics.h.formelsmposy.get_value();a.get_selectedItem().value.y=Math.round(b);this.redrawElementsList();break;case "text":if(this.ui.toggles.h.txuse.get_selected()){a=[];a.push(H.string(this.ui.numerics.h.txwidth.get_value()));a.push(this.ui.selects.h.txfont.get_selectedItem().value);a.push(H.string(this.ui.numerics.h.txsize.get_value()));a.push(Ga.colorHex(this.ui.inputs.h.txcolor.get_text()));switch(this.ui.selects.h.txdeco.get_selectedItem().value){case "bold":a.push("true");a.push("false");
break;case "bolditalic":a.push("true");a.push("true");break;case "italic":a.push("false");a.push("true");break;default:a.push("false"),a.push("false")}a.push(this.ui.selects.h.txalign.get_selectedItem().value);this.ui.lists.h.elements.get_selectedItem().value.options=a.join(";")}else this.ui.lists.h.elements.get_selectedItem().value.options="";a=this.ui.lists.h.elements;b=this.ui.numerics.h.formeltxposx.get_value();a.get_selectedItem().value.x=Math.round(b);a=this.ui.lists.h.elements;b=this.ui.numerics.h.formeltxposy.get_value();
a.get_selectedItem().value.y=Math.round(b);this.redrawElementsList();break;default:a=this.ui.inputs.h.formel,this.ui.lists.h.elements.get_selectedItem().value.file=a.get_text(),a=this.ui.inputs.h.formelac,this.ui.lists.h.elements.get_selectedItem().value.action=a.get_text(),a=this.ui.lists.h.elements,b=this.ui.numerics.h.formelposx.get_value(),a.get_selectedItem().value.x=Math.round(b),a=this.ui.lists.h.elements,b=this.ui.numerics.h.formelposy.get_value(),a.get_selectedItem().value.y=Math.round(b),
a=this.ui.lists.h.elements,b=this.ui.numerics.h.formelrotation.get_value(),a.get_selectedItem().value.rot=Math.round(b),a=this.ui.lists.h.elements,b=this.ui.numerics.h.formelalpha.get_value(),a.get_selectedItem().value.alpha=Math.round(b),this.redrawElementsList()}},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrinterf-title"),k.ln.get("window-contrinterf-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrinterf-title"),k.ln.get("window-contrinterf-ersave"),
320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrinterf-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrinterf-title"),k.ln.get("window-contrinterf-ersave"),320,150,k.ln.get("default-ok"))},__class__:Jr});var Zr=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrmenu-title"),1E3,Bc.pickValue(560,580),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrMenu"]=Zr;Zr.__name__="com.tilbuci.ui.window.contraptions.WindowContrMenu";Zr.__super__=ea;
Zr.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("imgbg");this.ui.createTInput("imgbg","","",this.ui.hcontainers.h.imgbg,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbg",m(this,this.acImgbg),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbgdel",m(this,this.acImgbgdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbg.set_enabled(!1);this.ui.hcontainers.h.imgbg.setWidth(460,
[350,50,50]);this.ui.createHContainer("imgbt");this.ui.createTInput("imgbt","","",this.ui.hcontainers.h.imgbt,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbt.set_enabled(!1);this.ui.hcontainers.h.imgbt.setWidth(460,[350,50,50]);a=k.ln.get("window-kfmanage-title");
c=b=this.ui;var d={tp:"Label",id:"registered",tx:k.ln.get("window-contrmenu-registered"),vr:""},f={tp:"Button",id:"load",tx:k.ln.get("window-contrmenu-load"),ac:m(this,this.loadMenu)},g={tp:"Button",id:"remove",tx:k.ln.get("window-contrmenu-remove"),ac:m(this,this.removeMenu)},h={tp:"Label",id:"name",tx:k.ln.get("window-contrmenu-name"),vr:"detail"},n=k.ln.get("window-contrmenu-add"),l=c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:200},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",
id:"name",tx:"",vr:""},{tp:"Button",id:"add",tx:n,ac:m(this,this.addMenu)}]);c=this.ui;d={tp:"Label",id:"properties",tx:k.ln.get("window-contrmenu-properties"),vr:""};f={tp:"Label",id:"font",tx:k.ln.get("window-contrmenu-font"),vr:"detail"};g={tp:"Label",id:"fontsize",tx:k.ln.get("window-contrmenu-fontsize"),vr:"detail"};h={tp:"Label",id:"fontc",tx:k.ln.get("window-contrmenu-fontc"),vr:"detail"};n={tp:"Label",id:"cover",tx:k.ln.get("window-contrmenu-cover"),vr:"detail"};var q={tp:"Label",id:"coveralpha",
tx:k.ln.get("window-contrmenu-coveralpha"),vr:"detail"},u={tp:"Label",id:"imgbg",tx:k.ln.get("window-contrmenu-imgbg"),vr:"detail"},v={tp:"Custom",cont:this.ui.hcontainers.h.imgbg},z=k.ln.get("window-contrmenu-imgbt");this.addForm(a,b.createColumnHolder("columns",l,c.forge("rightcol",[d,f,{tp:"Select",id:"font",vl:[],sl:null},g,{tp:"Numeric",id:"fontsize",mn:8,mx:200,st:1,vl:0},h,{tp:"TInput",id:"fontc",tx:"",vr:""},n,{tp:"TInput",id:"cover",tx:"",vr:""},q,{tp:"Numeric",id:"coveralpha",mn:0,mx:100,
st:1,vl:0},u,v,{tp:"Label",id:"imgbt",tx:z,vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.imgbt}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrmenu-save"),ac:m(this,this.saveMenu)}]),450));this.ui.listDbClick("registered",m(this,this.loadMenu));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&
delete f.h[d]}b=a=p.contraptions.menus.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear()},clear:function(){this.ui.inputs.h.fontc.set_text("#FFFFFF");this.ui.inputs.h.cover.set_text("#000000");for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");a=[];b=0;
for(c=k.fonts.length;b<c;)d=b++,a.push({text:k.fonts[d],value:k.fonts[d]});b=0;for(c=p.mdata.fonts;b<c.length;)d=c[b],++b,a.push({text:d.name,value:d.name});this.ui.setSelectOptions("font",a);this.ui.setSelectValue("font",null);this.ui.numerics.h.coveralpha.set_value(0);this.ui.numerics.h.fontsize.set_value(20);this.ui.inputs.h.imgbg.set_text("");this.ui.inputs.h.imgbt.set_text("")},loadMenu:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;
if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].id);c=this.ui.inputs.h.fontc;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].fontcolor);c=this.ui.inputs.h.cover;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].bgcolor);c=this.ui;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.setSelectValue("font",
a.h[b].font);c=this.ui.numerics.h.coveralpha;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_value(Math.round(a.h[b].bgalpha*100));c=this.ui.numerics.h.fontsize;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_value(Math.round(a.h[b].fontsize));c=this.ui.inputs.h.imgbg;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].background);c=this.ui.inputs.h.imgbt;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;
c.set_text(a.h[b].buton)}}},action:function(a,b){switch(a){case "menubrowseimgbg":this.ui.inputs.h.imgbg.set_text(b.h.file);break;case "menubrowseimgbt":this.ui.inputs.h.imgbt.set_text(b.h.file)}},removeMenu:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,
Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveMenu:function(a){a=p.contraptions.menus.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.menus.h[d].kill();var f=p.contraptions.menus;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.menus;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();
b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addMenu:function(a){if(this.ui.inputs.h.name.get_text().length>3)if(this.ui.inputs.h.imgbg.get_text()==""||this.ui.inputs.h.imgbt.get_text()=="")k.showPopup(k.ln.get("window-contrmenu-title"),k.ln.get("window-contrmenu-nographics"),320,150,k.ln.get("default-ok"));else{a=this._list;var b=this.ui.inputs.h.name.get_text();Object.prototype.hasOwnProperty.call(a.h,b)?(a=this._list,b=this.ui.inputs.h.name.get_text(),b=a.h[b]):b=new na;
b.load({id:this.ui.inputs.h.name.get_text(),mode:"v",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Ga.colorHex(this.ui.inputs.h.fontc.get_text(),"#FFFFFF"),fontsize:this.ui.numerics.h.fontsize.get_value(),background:this.ui.inputs.h.imgbg.get_text(),buton:this.ui.inputs.h.imgbt.get_text(),bgcolor:Ga.colorHex(this.ui.inputs.h.cover.get_text(),"#000000"),bgalpha:this.ui.numerics.h.coveralpha.get_value()/100});b.bgalpha<0&&(b.bgalpha=0);b.bgalpha>1&&(b.bgalpha=1);a=this._list;var c=
this.ui.inputs.h.name.get_text();a.h[c]=b;this.clear()}else k.showPopup(k.ln.get("window-contrmenu-title"),k.ln.get("window-contrmenu-noname"),320,150,k.ln.get("default-ok"))},acImgbg:function(a){this._ac("menubrowseimgbg")},acImgbgdel:function(a){this.ui.inputs.h.imgbg.set_text("")},acImgbt:function(a){this._ac("menubrowseimgbt")},acImgbtdel:function(a){this.ui.inputs.h.imgbt.set_text("")},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrmenu-title"),k.ln.get("window-contrmenu-ersave1"),
320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrmenu-title"),k.ln.get("window-contrmenu-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrmenu-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrmenu-title"),k.ln.get("window-contrmenu-ersave"),320,150,k.ln.get("default-ok"))},__class__:Zr});var $r=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrmess-title"),1E3,Bc.pickValue(570,590),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrMessages"]=
$r;$r.__name__="com.tilbuci.ui.window.contraptions.WindowContrMessages";$r.__super__=ea;$r.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("imgbg");this.ui.createTInput("imgbg","","",this.ui.hcontainers.h.imgbg,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbg",m(this,this.acImgbg),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbgdel",m(this,
this.acImgbgdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbg.set_enabled(!1);this.ui.hcontainers.h.imgbg.setWidth(460,[350,50,50]);this.ui.createHContainer("imgbt0");this.ui.createTInput("imgbt0","","",this.ui.hcontainers.h.imgbt0,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt0;a.createIconButton("imgbt0",m(this,this.acImgbt0),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt0;a.createIconButton("imgimgbt0del",m(this,this.acImgbt0del),
new Ma(b),null,c,!1);this.ui.inputs.h.imgbt0.set_enabled(!1);this.ui.hcontainers.h.imgbt0.setWidth(460,[350,50,50]);this.ui.createHContainer("imgbt1");this.ui.createTInput("imgbt1","","",this.ui.hcontainers.h.imgbt1,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt1;a.createIconButton("imgbt1",m(this,this.acImgbt1),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt1;a.createIconButton("imgimgbt1del",m(this,this.acImgbt1del),new Ma(b),
null,c,!1);this.ui.inputs.h.imgbt1.set_enabled(!1);this.ui.hcontainers.h.imgbt1.setWidth(460,[350,50,50]);this.ui.createHContainer("imgbt2");this.ui.createTInput("imgbt2","","",this.ui.hcontainers.h.imgbt2,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt2;a.createIconButton("imgbt2",m(this,this.acImgbt2),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt2;a.createIconButton("imgimgbtdel",m(this,this.acImgbt2del),new Ma(b),null,c,!1);
this.ui.inputs.h.imgbt2.set_enabled(!1);this.ui.hcontainers.h.imgbt2.setWidth(460,[350,50,50]);a=k.ln.get("window-contrmess-title");c=b=this.ui;var d={tp:"Label",id:"registered",tx:k.ln.get("window-contrmess-registered"),vr:""},f={tp:"Button",id:"load",tx:k.ln.get("window-contrmess-load"),ac:m(this,this.loadMenu)},g={tp:"Button",id:"remove",tx:k.ln.get("window-contrmess-remove"),ac:m(this,this.removeMenu)},h={tp:"Label",id:"name",tx:k.ln.get("window-contrmess-name"),vr:"detail"},n=k.ln.get("window-contrmess-add"),
l=c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:245},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",tx:"",vr:""},{tp:"Button",id:"add",tx:n,ac:m(this,this.addMenu)}]);c=this.ui;d={tp:"Label",id:"properties",tx:k.ln.get("window-contrmess-properties"),vr:""};f={tp:"Label",id:"font",tx:k.ln.get("window-contrmess-font"),vr:"detail"};g={tp:"Label",id:"fontsize",tx:k.ln.get("window-contrmess-fontsize"),vr:"detail"};h={tp:"Label",id:"fontc",tx:k.ln.get("window-contrmess-fontc"),
vr:"detail"};n={tp:"Label",id:"gap",tx:k.ln.get("window-contrmess-gap"),vr:"detail"};var q={tp:"Label",id:"imgbg",tx:k.ln.get("window-contrmess-imgbg"),vr:"detail"},u={tp:"Custom",cont:this.ui.hcontainers.h.imgbg},v={tp:"Label",id:"imgbt0",tx:k.ln.get("window-contrmess-imgbt0"),vr:"detail"},z={tp:"Custom",cont:this.ui.hcontainers.h.imgbt0},r={tp:"Label",id:"imgbt1",tx:k.ln.get("window-contrmess-imgbt1"),vr:"detail"},F={tp:"Custom",cont:this.ui.hcontainers.h.imgbt1},J=k.ln.get("window-contrmess-imgbt2");
this.addForm(a,b.createColumnHolder("columns",l,c.forge("rightcol",[d,f,{tp:"Select",id:"font",vl:[],sl:null},g,{tp:"Numeric",id:"fontsize",mn:8,mx:200,st:1,vl:0},h,{tp:"TInput",id:"fontc",tx:"",vr:""},n,{tp:"Numeric",id:"gap",mn:0,mx:500,st:1,vl:10},q,u,v,z,r,F,{tp:"Label",id:"imgbt2",tx:J,vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.imgbt2}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrmess-save"),ac:m(this,this.saveMenu)}]),460));this.ui.listDbClick("registered",
m(this,this.loadMenu));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.messages.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear()},clear:function(){this.ui.inputs.h.fontc.set_text("#FFFFFF");for(var a=[],b=this._list.h,c=Object.keys(b),
d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");a=[];b=0;for(c=k.fonts.length;b<c;)d=b++,a.push({text:k.fonts[d],value:k.fonts[d]});b=0;for(c=p.mdata.fonts;b<c.length;)d=c[b],++b,a.push({text:d.name,value:d.name});this.ui.setSelectOptions("font",a);this.ui.setSelectValue("font",null);this.ui.numerics.h.fontsize.set_value(20);this.ui.numerics.h.gap.set_value(10);
this.ui.inputs.h.imgbg.set_text("");this.ui.inputs.h.imgbt0.set_text("");this.ui.inputs.h.imgbt1.set_text("");this.ui.inputs.h.imgbt2.set_text("")},loadMenu:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].id);c=this.ui.inputs.h.fontc;a=this._list;b=
this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].fontcolor);c=this.ui;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.setSelectValue("font",a.h[b].font);c=this.ui.numerics.h.fontsize;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_value(Math.round(a.h[b].fontsize));c=this.ui.numerics.h.gap;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_value(Math.round(a.h[b].gap));c=this.ui.inputs.h.imgbg;a=this._list;b=
this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].background);c=this.ui.inputs.h.imgbt0;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].buton[0]);c=this.ui.inputs.h.imgbt1;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].buton[1]);c=this.ui.inputs.h.imgbt2;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].buton[2])}}},action:function(a,b){switch(a){case "messagesbrowseimgbg":this.ui.inputs.h.imgbg.set_text(b.h.file);
break;case "messagesbrowseimgbt0":this.ui.inputs.h.imgbt0.set_text(b.h.file);break;case "messagesbrowseimgbt1":this.ui.inputs.h.imgbt1.set_text(b.h.file);break;case "messagesbrowseimgbt2":this.ui.inputs.h.imgbt2.set_text(b.h.file)}},removeMenu:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),
b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveMenu:function(a){a=p.contraptions.messages.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.messages.h[d].kill();var f=p.contraptions.messages;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.messages;var g=this._list.h[d].clone();f.h[d]=
g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addMenu:function(a){if(this.ui.inputs.h.name.get_text().length>=3)if(this.ui.inputs.h.imgbg.get_text()==""||this.ui.inputs.h.imgbt0.get_text()=="")k.showPopup(k.ln.get("window-contrmess-title"),k.ln.get("window-contrmess-nographics"),320,150,k.ln.get("default-ok"));else{a=this._list;var b=this.ui.inputs.h.name.get_text();Object.prototype.hasOwnProperty.call(a.h,
b)?(a=this._list,b=this.ui.inputs.h.name.get_text(),b=a.h[b]):b=new ca;b.load({id:this.ui.inputs.h.name.get_text(),font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Ga.colorHex(this.ui.inputs.h.fontc.get_text(),"#FFFFFF"),fontsize:this.ui.numerics.h.fontsize.get_value(),gap:this.ui.numerics.h.gap.get_value(),background:this.ui.inputs.h.imgbg.get_text(),buton0:this.ui.inputs.h.imgbt0.get_text(),buton1:this.ui.inputs.h.imgbt1.get_text(),buton2:this.ui.inputs.h.imgbt2.get_text()});a=this._list;
var c=this.ui.inputs.h.name.get_text();a.h[c]=b;this.clear()}else k.showPopup(k.ln.get("window-contrmess-title"),k.ln.get("window-contrmess-noname"),320,150,k.ln.get("default-ok"))},acImgbg:function(a){this._ac("messagesbrowseimgbg")},acImgbgdel:function(a){this.ui.inputs.h.imgbg.set_text("")},acImgbt0:function(a){this._ac("messagesbrowseimgbt0")},acImgbt0del:function(a){this.ui.inputs.h.imgbt0.set_text("")},acImgbt1:function(a){this._ac("messagesbrowseimgbt1")},acImgbt1del:function(a){this.ui.inputs.h.imgbt1.set_text("")},
acImgbt2:function(a){this._ac("messagesbrowseimgbt2")},acImgbt2del:function(a){this.ui.inputs.h.imgbt2.set_text("")},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrmess-title"),k.ln.get("window-contrmess-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrmess-title"),k.ln.get("window-contrmess-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrmess-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrmess-title"),
k.ln.get("window-contrmess-ersave"),320,150,k.ln.get("default-ok"))},__class__:$r});var as=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrmusic-title"),1E3,Bc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrMusic"]=as;as.__name__="com.tilbuci.ui.window.contraptions.WindowContrMusic";as.__super__=ea;as.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("audio");this.ui.createTInput("audio","","",this.ui.hcontainers.h.audio,
!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.audio;a.createIconButton("audio",m(this,this.acAudio),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.audio;a.createIconButton("audiodel",m(this,this.acAudiodel),new Ma(b),null,c,!1);this.ui.inputs.h.audio.set_enabled(!1);this.ui.hcontainers.h.audio.setWidth(460,[350,50,50]);a=k.ln.get("window-kfmanage-title");c=b=this.ui;var d={tp:"Label",id:"registered",tx:k.ln.get("window-contrmusic-registered"),
vr:""},f={tp:"Button",id:"load",tx:k.ln.get("window-contrmusic-load"),ac:m(this,this.loadContr)},g={tp:"Button",id:"remove",tx:k.ln.get("window-contrmusic-remove"),ac:m(this,this.removeContr)},h={tp:"Label",id:"name",tx:k.ln.get("window-contrmusic-name"),vr:"detail"},n=k.ln.get("window-contrmusic-add");this.addForm(a,b.createColumnHolder("columns",c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:200},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",tx:"",vr:""},{tp:"Button",
id:"add",tx:n,ac:m(this,this.addContr)}]),this.ui.forge("rightcol",[{tp:"Label",id:"properties",tx:k.ln.get("window-contrmusic-properties"),vr:""},{tp:"Label",id:"audio",tx:k.ln.get("window-contrmusic-file"),vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.audio}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrmusic-save"),ac:m(this,this.saveContr)}]),420));this.ui.listDbClick("registered",m(this,this.loadContr));ea.prototype.startInterface.call(this)},acStart:function(){var a=
this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.musics.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear()},clear:function(){for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",
null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h.audio.set_text("")},loadContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].id);c=this.ui.inputs.h.audio;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].media)}}},
action:function(a,b){a=="music"&&this.ui.inputs.h.audio.set_text(b.h.file)},removeContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveContr:function(a){a=
p.contraptions.musics.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.musics.h[d].kill();var f=p.contraptions.musics;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.musics;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addContr:function(a){if(this.ui.inputs.h.name.get_text().length>
3)if(this.ui.inputs.h.audio.get_text()!=""){a=this._list;var b=this.ui.inputs.h.name.get_text();if(Object.prototype.hasOwnProperty.call(a.h,b))a=this._list,b=this.ui.inputs.h.name.get_text(),b=a.h[b],b.load({id:this.ui.inputs.h.name.get_text(),media:this.ui.inputs.h.audio.get_text()});else{b=new Xa;b.load({id:this.ui.inputs.h.name.get_text(),media:this.ui.inputs.h.audio.get_text()});a=this._list;var c=this.ui.inputs.h.name.get_text();a.h[c]=b}this.clear()}else k.showPopup(k.ln.get("window-contrmusic-title"),
k.ln.get("window-contrmusic-noaudio"),320,150,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-contrmusic-title"),k.ln.get("window-contrmusic-noname"),320,150,k.ln.get("default-ok"))},acAudio:function(a){this._ac("music")},acAudiodel:function(a){this.ui.inputs.h.audio.set_text("")},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrmusic-title"),k.ln.get("window-contrmusic-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrmusic-title"),
k.ln.get("window-contrmusic-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrmusic-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrmusic-title"),k.ln.get("window-contrmusic-ersave"),320,150,k.ln.get("default-ok"))},__class__:as});var ts=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrsound-title"),1E3,Bc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrSound"]=ts;ts.__name__="com.tilbuci.ui.window.contraptions.WindowContrSound";
ts.__super__=ea;ts.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("audio");this.ui.createTInput("audio","","",this.ui.hcontainers.h.audio,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.audio;a.createIconButton("audio",m(this,this.acAudio),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.audio;a.createIconButton("audiodel",m(this,this.acAudiodel),new Ma(b),null,c,!1);this.ui.inputs.h.audio.set_enabled(!1);
this.ui.hcontainers.h.audio.setWidth(460,[350,50,50]);a=k.ln.get("window-kfmanage-title");c=b=this.ui;var d={tp:"Label",id:"registered",tx:k.ln.get("window-contrsound-registered"),vr:""},f={tp:"Button",id:"load",tx:k.ln.get("window-contrsound-load"),ac:m(this,this.loadContr)},g={tp:"Button",id:"remove",tx:k.ln.get("window-contrsound-remove"),ac:m(this,this.removeContr)},h={tp:"Label",id:"name",tx:k.ln.get("window-contrsound-name"),vr:"detail"},n=k.ln.get("window-contrsound-add");this.addForm(a,b.createColumnHolder("columns",
c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:200},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",tx:"",vr:""},{tp:"Button",id:"add",tx:n,ac:m(this,this.addContr)}]),this.ui.forge("rightcol",[{tp:"Label",id:"properties",tx:k.ln.get("window-contrsound-properties"),vr:""},{tp:"Label",id:"audio",tx:k.ln.get("window-contrsound-file"),vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.audio}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrsound-save"),
ac:m(this,this.saveContr)}]),420));this.ui.listDbClick("registered",m(this,this.loadContr));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.sounds.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear()},clear:function(){for(var a=[],
b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h.audio.set_text("")},loadContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;
c.set_text(a.h[b].id);c=this.ui.inputs.h.audio;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].media)}}},action:function(a,b){a=="sound"&&this.ui.inputs.h.audio.set_text(b.h.file)},removeContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),b=this._list,
a=this.ui.lists.h.registered.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveContr:function(a){a=p.contraptions.sounds.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.sounds.h[d].kill();var f=p.contraptions.sounds;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.sounds;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=
k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))},addContr:function(a){if(this.ui.inputs.h.name.get_text().length>3)if(this.ui.inputs.h.audio.get_text()!=""){a=this._list;var b=this.ui.inputs.h.name.get_text();if(Object.prototype.hasOwnProperty.call(a.h,b))a=this._list,b=this.ui.inputs.h.name.get_text(),b=a.h[b],b.load({id:this.ui.inputs.h.name.get_text(),media:this.ui.inputs.h.audio.get_text()});else{b=
new cb;b.load({id:this.ui.inputs.h.name.get_text(),media:this.ui.inputs.h.audio.get_text()});a=this._list;var c=this.ui.inputs.h.name.get_text();a.h[c]=b}this.clear()}else k.showPopup(k.ln.get("window-contrsound-title"),k.ln.get("window-contrsound-noaudio"),320,150,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-contrsound-title"),k.ln.get("window-contrsound-noname"),320,150,k.ln.get("default-ok"))},acAudio:function(a){this._ac("sound")},acAudiodel:function(a){this.ui.inputs.h.audio.set_text("")},
onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrsound-title"),k.ln.get("window-contrsound-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrsound-title"),k.ln.get("window-contrsound-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrsound-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrsound-title"),k.ln.get("window-contrsound-ersave"),320,150,k.ln.get("default-ok"))},__class__:ts});var us=
function(a){this._list=new G;ea.call(this,a,k.ln.get("window-contrtr-title"),1E3,Bc.pickValue(575,590),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrTarget"]=us;us.__name__="com.tilbuci.ui.window.contraptions.WindowContrTarget";us.__super__=ea;us.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("default");this.ui.createTInput("default","","",this.ui.hcontainers.h["default"],!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h["default"];
a.createIconButton("default",m(this,this.acImgD),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h["default"];a.createIconButton("defaultdel",m(this,this.acImgDdel),new Ma(b),null,c,!1);this.ui.inputs.h["default"].set_enabled(!1);this.ui.hcontainers.h["default"].setWidth(460,[350,50,50]);this.ui.createHContainer("menus");this.ui.createTInput("menus","","",this.ui.hcontainers.h.menus,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.menus;a.createIconButton("menus",
m(this,this.acImgM),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.menus;a.createIconButton("menusdel",m(this,this.acImgMdel),new Ma(b),null,c,!1);this.ui.inputs.h.menus.set_enabled(!1);this.ui.hcontainers.h.menus.setWidth(460,[350,50,50]);this.ui.createHContainer("interf");this.ui.createTInput("interf","","",this.ui.hcontainers.h.interf,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.interf;a.createIconButton("interf",m(this,this.acImgI),new Ma(b),
null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.interf;a.createIconButton("interfdel",m(this,this.acImgIdel),new Ma(b),null,c,!1);this.ui.inputs.h.interf.set_enabled(!1);this.ui.hcontainers.h.interf.setWidth(460,[350,50,50]);this.ui.createHContainer("inst1");this.ui.createTInput("inst1","","",this.ui.hcontainers.h.inst1,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.inst1;a.createIconButton("inst1",m(this,this.acImgI1),new Ma(b),null,c,!1);a=this.ui;
b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.inst1;a.createIconButton("inst1del",m(this,this.acImgI1del),new Ma(b),null,c,!1);this.ui.inputs.h.inst1.set_enabled(!1);this.ui.hcontainers.h.inst1.setWidth(460,[350,50,50]);this.ui.createHContainer("inst2");this.ui.createTInput("inst2","","",this.ui.hcontainers.h.inst2,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.inst2;a.createIconButton("inst2",m(this,this.acImgI2),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");
c=this.ui.hcontainers.h.inst2;a.createIconButton("inst2del",m(this,this.acImgI2del),new Ma(b),null,c,!1);this.ui.inputs.h.inst2.set_enabled(!1);this.ui.hcontainers.h.inst2.setWidth(460,[350,50,50]);this.ui.createHContainer("inst3");this.ui.createTInput("inst3","","",this.ui.hcontainers.h.inst3,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.inst3;a.createIconButton("inst3",m(this,this.acImgI3),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.inst3;
a.createIconButton("inst3del",m(this,this.acImgI3del),new Ma(b),null,c,!1);this.ui.inputs.h.inst3.set_enabled(!1);this.ui.hcontainers.h.inst3.setWidth(460,[350,50,50]);a=k.ln.get("window-contrtr-title");c=b=this.ui;var d={tp:"Label",id:"registered",tx:k.ln.get("window-contrtr-registered"),vr:""},f={tp:"Button",id:"load",tx:k.ln.get("window-contrtr-load"),ac:m(this,this.loadContr)},g={tp:"Button",id:"remove",tx:k.ln.get("window-contrtr-remove"),ac:m(this,this.removeContr)},h={tp:"Label",id:"name",
tx:k.ln.get("window-contrtr-name"),vr:"detail"},n=k.ln.get("window-contrtr-add"),l=c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:260},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"name",tx:"",vr:""},{tp:"Button",id:"add",tx:n,ac:m(this,this.addContr)}]);c=this.ui;d={tp:"Label",id:"landscape",tx:k.ln.get("window-contrtr-default"),vr:"detail"};f={tp:"Custom",cont:this.ui.hcontainers.h["default"]};g={tp:"Label",id:"menus",tx:k.ln.get("window-contrtr-menus"),vr:"detail"};
h={tp:"Custom",cont:this.ui.hcontainers.h.menus};n={tp:"Label",id:"interf",tx:k.ln.get("window-contrtr-interf"),vr:"detail"};var q={tp:"Custom",cont:this.ui.hcontainers.h.interf},u={tp:"Label",id:"inst1",tx:k.ln.get("window-contrtr-inst"),vr:"detail"},v={tp:"Custom",cont:this.ui.hcontainers.h.inst1},z={tp:"Label",id:"inst2",tx:k.ln.get("window-contrtr-inst"),vr:"detail"},r={tp:"Custom",cont:this.ui.hcontainers.h.inst2},F=k.ln.get("window-contrtr-inst");this.addForm(a,b.createColumnHolder("columns",
l,c.forge("rightcol",[d,f,g,h,n,q,{tp:"Spacer",id:"spacer",ht:20,ln:!0},u,{tp:"TInput",id:"inst1name",tx:"",vr:""},v,{tp:"Spacer",id:"spacer1",ht:10,ln:!1},z,{tp:"TInput",id:"inst2name",tx:"",vr:""},r,{tp:"Spacer",id:"spacer2",ht:10,ln:!1},{tp:"Label",id:"inst3",tx:F,vr:"detail"},{tp:"TInput",id:"inst3name",tx:"",vr:""},{tp:"Custom",cont:this.ui.hcontainers.h.inst3}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-contrtr-save"),ac:m(this,this.saveContr)}]),480));this.ui.listDbClick("registered",
m(this,this.loadContr));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=a=p.contraptions.targets.h;a=Object.keys(a);c=a.length;for(d=0;d<c;){var g=b[a[d++]];f=this._list;var h=g.id;g=g.clone();f.h[h]=g}this.clear()},clear:function(){for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];
a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h["default"].set_text("");this.ui.inputs.h.menus.set_text("");this.ui.inputs.h.interf.set_text("");this.ui.inputs.h.inst1.set_text("");this.ui.inputs.h.inst1name.set_text("");this.ui.inputs.h.inst2.set_text("");this.ui.inputs.h.inst2name.set_text("");this.ui.inputs.h.inst3.set_text("");this.ui.inputs.h.inst3name.set_text("")},loadContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=
null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].id);c=this.ui.inputs.h["default"];a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].defaultp);c=this.ui.inputs.h.menus;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].menus);c=this.ui.inputs.h.interf;
a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].interf);c=this.ui.inputs.h.inst1;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].inst1);c=this.ui.inputs.h.inst1name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].inst1name);c=this.ui.inputs.h.inst2;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].inst2);c=this.ui.inputs.h.inst2name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;
c.set_text(a.h[b].inst2name);c=this.ui.inputs.h.inst3;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].inst3);c=this.ui.inputs.h.inst3name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].inst3name)}}},action:function(a,b){switch(a){case "default":this.ui.inputs.h["default"].set_text(b.h.file);break;case "inst1":this.ui.inputs.h.inst1.set_text(b.h.file);break;case "inst2":this.ui.inputs.h.inst2.set_text(b.h.file);break;case "inst3":this.ui.inputs.h.inst3.set_text(b.h.file);
break;case "interf":this.ui.inputs.h.interf.set_text(b.h.file);break;case "menus":this.ui.inputs.h.menus.set_text(b.h.file)}},removeContr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,
a)&&delete b.h[a],this.clear())}},saveContr:function(a){a=p.contraptions.targets.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.contraptions.targets.h[d].kill();var f=p.contraptions.targets;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.contraptions.targets;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",
b,m(this,this.onSaveReturn))},addContr:function(a){if(this.ui.inputs.h.name.get_text().length>3)if(this.ui.inputs.h["default"].get_text()!=""){a=this._list;var b=this.ui.inputs.h.name.get_text();if(Object.prototype.hasOwnProperty.call(a.h,b))a=this._list,b=this.ui.inputs.h.name.get_text(),b=a.h[b],b.load({id:this.ui.inputs.h.name.get_text(),defaultp:this.ui.inputs.h["default"].get_text(),menus:this.ui.inputs.h.menus.get_text(),interf:this.ui.inputs.h.interf.get_text(),inst1:this.ui.inputs.h.inst1.get_text(),
inst1name:this.ui.inputs.h.inst1name.get_text(),inst2:this.ui.inputs.h.inst2.get_text(),inst2name:this.ui.inputs.h.inst2name.get_text(),inst3:this.ui.inputs.h.inst3.get_text(),inst3name:this.ui.inputs.h.inst3name.get_text()});else{b=new $a;b.load({id:this.ui.inputs.h.name.get_text(),defaultp:this.ui.inputs.h["default"].get_text(),menus:this.ui.inputs.h.menus.get_text(),interf:this.ui.inputs.h.interf.get_text(),inst1:this.ui.inputs.h.inst1.get_text(),inst1name:this.ui.inputs.h.inst1name.get_text(),
inst2:this.ui.inputs.h.inst2.get_text(),inst2name:this.ui.inputs.h.inst2name.get_text(),inst3:this.ui.inputs.h.inst3.get_text(),inst3name:this.ui.inputs.h.inst3name.get_text()});a=this._list;var c=this.ui.inputs.h.name.get_text();a.h[c]=b}this.clear()}else k.showPopup(k.ln.get("window-contrtr-title"),k.ln.get("window-contrtr-nographics"),320,150,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-contrtr-title"),k.ln.get("window-contrtr-noname"),320,150,k.ln.get("default-ok"))},acImgD:function(a){this._ac("default")},
acImgDdel:function(a){this.ui.inputs.h["default"].set_text("")},acImgM:function(a){this._ac("menus")},acImgMdel:function(a){this.ui.inputs.h.menus.set_text("")},acImgI:function(a){this._ac("interf")},acImgIdel:function(a){this.ui.inputs.h.interf.set_text("")},acImgI1:function(a){this._ac("inst1")},acImgI1del:function(a){this.ui.inputs.h.inst1.set_text("")},acImgI2:function(a){this._ac("inst2")},acImgI2del:function(a){this.ui.inputs.h.inst2.set_text("")},acImgI3:function(a){this._ac("inst3")},acImgI3del:function(a){this.ui.inputs.h.inst3.set_text("")},
onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-contrtr-title"),k.ln.get("window-contrtr-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-contrtr-title"),k.ln.get("window-contrtr-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-contrtr-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-contrtr-title"),k.ln.get("window-contrtr-ersave"),320,150,k.ln.get("default-ok"))},__class__:us});var Ar=function(a){ea.call(this,
a,k.ln.get("window-exchcord-title"),1100,Bc.pickValue(410,500),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeCordova"]=Ar;Ar.__name__="com.tilbuci.ui.window.exchange.WindowExchangeCordova";Ar.__super__=ea;Ar.prototype=I(ea.prototype,{startInterface:function(a){this.ui.createHContainer("icon");this.ui.createTInput("icon","","",this.ui.hcontainers.h.icon);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.icon;a.createIconButton("icon",m(this,this.onIcon),new Ma(b),null,
c);this.ui.inputs.h.icon.set_enabled(!1);a=k.ln.get("window-exchcord-title");b=this.ui;c={tp:"Label",id:"about",tx:k.ln.get("window-exchcord-about"),vr:""};var d={tp:"Label",id:"appid",tx:k.ln.get("window-exchcord-appid"),vr:ia.VARIANT_DETAIL},f={tp:"Label",id:"icon",tx:k.ln.get("window-exchcord-icon"),vr:""},g={tp:"Custom",cont:this.ui.hcontainers.h.icon},h={tp:"Label",id:"fullscr",tx:k.ln.get("window-exchcord-fullscr"),vr:""},n={tp:"Select",id:"fullscr",vl:[{text:k.ln.get("window-exchcord-fullscr-normal"),
value:"normal"},{text:k.ln.get("window-exchcord-fullscr-full"),value:"full"},{text:k.ln.get("window-exchcord-fullscr-kiosk"),value:"kiosk"}],sl:"complete"},l={tp:"Button",id:"export",tx:k.ln.get("window-exchcord-button"),ac:m(this,this.onExport)},q={tp:"Label",id:"cord",tx:k.ln.get("window-exchcord-aboutcord"),vr:""},u=k.ln.get("window-exchcord-buttoncord");this.addForm(a,b.forge("desk",[c,{tp:"Spacer",id:"about",ht:5,ln:!1},d,{tp:"TInput",id:"appid",tx:"",vr:""},f,g,h,n,{tp:"Spacer",id:"export",
ht:10,ln:!1},l,{tp:"Spacer",id:"nw",ht:25,ln:!0},q,{tp:"Button",id:"cord",tx:u,ac:m(this,this.onCord)}]));this.ui.labels.h.about.set_wordWrap(!0);this.ui.labels.h.cord.set_wordWrap(!0);ea.prototype.startInterface.call(this)},acStart:function(){if(k.econfig.get_base().indexOf("localhost")!=-1||k.econfig.get_base().indexOf("127.0.0.1")!=-1)this.ui.inputs.h.appid.set_text(p.movie.get_mvId().toLowerCase());else{for(var a=k.econfig.get_base().toLowerCase().split("/"),b="",c=0,d=a.length;c<d;){var f=c++;
b==""&&a[f]!=""&&a[f]!="http"&&a[f]!="http:"&&a[f]!="https"&&a[f]!="https:"&&(b=a[f].split("."),b.join("."),b.reverse(),b=b.join("."))}this.ui.inputs.h.appid.set_text(b+"."+p.movie.get_mvId().toLowerCase())}this.ui.inputs.h.icon.set_text(p.mdata.favicon);this.ui.hcontainers.h.icon.setWidth(1060,[1E3,50])},onCord:function(a){a=new se("https://capacitorjs.com/");a.method="GET";Pa.getURL(a)},onExport:function(a){if(this.ui.inputs.h.appid.get_text()=="")this.ui.createWarning(k.ln.get("window-exchcord-title"),
k.ln.get("window-exchcord-noappid"),300,180,this.stage);else if(this.ui.inputs.h.icon.get_text()=="")this.ui.createWarning(k.ln.get("window-exchcord-title"),k.ln.get("window-exchcord-noappicon"),300,180,this.stage);else{a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.mode="complete";c=this.ui.inputs.h.appid.get_text();b.h.appid=c;c=this.ui.selects.h.fullscr.get_selectedItem().value;b.h.fullscr=c;c=this.ui.inputs.h.icon.get_text();b.h.icon=c;a.send("Movie/ExportCordova",b,m(this,this.onExportReturn))}},
onExportReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-exchcord-title"),k.ln.get("window-exchcord-error"),300,180,this.stage);else{this.ui.createWarning(k.ln.get("window-exchcord-title"),k.ln.get("window-exchcord-ok"),320,200,this.stage);a=k.ws;var c=new G;c.h.file="desk";c.h.exp=b.map.h.exp;b=p.movie.get_mvId();c.h.movie=b;a.download(c)}else this.ui.createWarning(k.ln.get("window-exchcord-title"),k.ln.get("window-exchcord-error"),300,180,this.stage)},action:function(a,
b){a=="browsecordovaicon"&&this.ui.inputs.h.icon.set_text(b.h.file)},onIcon:function(a){this._ac("browsecordovaicon")},__class__:Ar});var Br=function(a){ea.call(this,a,k.ln.get("window-exchdesk-title"),1E3,Bc.pickValue(600,680),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeDesktop"]=Br;Br.__name__="com.tilbuci.ui.window.exchange.WindowExchangeDesktop";Br.__super__=ea;Br.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-exchdesk-title");var b=this.ui,c={tp:"Label",
id:"about",tx:k.ln.get("window-exchdesk-about"),vr:""},d={tp:"Label",id:"window",tx:k.ln.get("window-exchdesk-window"),vr:ia.VARIANT_DETAIL},f={tp:"Select",id:"window",vl:[{text:k.ln.get("window-exchdesk-windownormal"),value:"normal"},{text:k.ln.get("window-exchdesk-windowresize"),value:"resize"},{text:k.ln.get("window-exchdesk-windowfull"),value:"full"},{text:k.ln.get("window-exchdesk-windowkiosk"),value:"kiosk"}],sl:"normal"},g={tp:"Label",id:"width",tx:k.ln.get("window-exchdesk-width"),vr:ia.VARIANT_DETAIL},
h={tp:"Label",id:"height",tx:k.ln.get("window-exchdesk-height"),vr:ia.VARIANT_DETAIL},n={tp:"Label",id:"icon",tx:k.ln.get("window-exchdesk-icon"),vr:ia.VARIANT_DETAIL},l={tp:"Label",id:"author",tx:k.ln.get("window-exchdesk-author"),vr:ia.VARIANT_DETAIL},q={tp:"Label",id:"description",tx:k.ln.get("window-exchdesk-description"),vr:ia.VARIANT_DETAIL},u={tp:"Button",id:"export",tx:k.ln.get("window-exchdesk-button"),ac:m(this,this.onExport)},v={tp:"Label",id:"nw",tx:k.ln.get("window-exchdesk-aboutnw"),
vr:""},z=k.ln.get("window-exchdesk-buttonnw");this.addForm(a,b.forge("desk",[c,{tp:"Spacer",id:"about",ht:10,ln:!1},d,f,g,{tp:"Numeric",id:"width",mn:240,mx:1920,vl:1280,st:50},h,{tp:"Numeric",id:"height",mn:240,mx:1920,vl:720,st:50},n,{tp:"TInput",id:"icon",tx:"",vr:""},l,{tp:"TInput",id:"author",tx:"",vr:""},q,{tp:"TInput",id:"description",tx:"",vr:""},{tp:"Spacer",id:"export",ht:10,ln:!1},u,{tp:"Spacer",id:"nw",ht:20,ln:!0},v,{tp:"Button",id:"nw",tx:z,ac:m(this,this.onNw)}]));this.ui.labels.h.about.set_wordWrap(!0);
this.ui.labels.h.nw.set_wordWrap(!0);ea.prototype.startInterface.call(this)},acStart:function(){p.mdata.screen.type=="portrait"?(this.ui.numerics.h.height.set_value(600),this.ui.numerics.h.width.set_value(Math.round(p.mdata.screen.big*600/p.mdata.screen.small))):(this.ui.numerics.h.width.set_value(1280),this.ui.numerics.h.height.set_value(Math.round(p.mdata.screen.small*1280/p.mdata.screen.big)));this.ui.inputs.h.icon.set_enabled(!1);this.ui.inputs.h.icon.set_text(p.mdata.favicon);this.ui.inputs.h.author.set_enabled(!1);
this.ui.inputs.h.author.set_text(p.mdata.author);this.ui.inputs.h.description.set_enabled(!1);this.ui.inputs.h.description.set_text(p.mdata.description)},onNw:function(a){a=new se("https://www.electronjs.org/");a.method="GET";Pa.getURL(a)},onExport:function(a){if(p.mdata.favicon==""||p.mdata.author==""||p.mdata.description=="")this.ui.createWarning(k.ln.get("window-exchdesk-title"),k.ln.get("window-exchdesk-errormiss"),300,180,this.stage);else{a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.mode=
"full";c=this.ui.selects.h.window.get_selectedItem().value;b.h.window=c;c=Math.round(this.ui.numerics.h.width.get_value());b.h.width=c;c=Math.round(this.ui.numerics.h.height.get_value());b.h.height=c;b.h.favicon=p.mdata.favicon;b.h.author=p.mdata.author;b.h.description=p.mdata.description;b.h.title=p.mdata.title;a.send("Movie/ExportDesk",b,m(this,this.onExportReturn),12E6)}},onExportReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-exchdesk-title"),k.ln.get("window-exchdesk-error"),
300,180,this.stage);else{this.ui.createWarning(k.ln.get("window-exchdesk-title"),k.ln.get("window-exchdesk-ok"),320,200,this.stage);a=k.ws;var c=new G;c.h.file="desk";c.h.exp=b.map.h.exp;b=p.movie.get_mvId();c.h.movie=b;a.download(c)}else this.ui.createWarning(k.ln.get("window-exchdesk-title"),k.ln.get("window-exchdesk-error"),300,180,this.stage)},__class__:Br});var Cr=function(a){ea.call(this,a,k.ln.get("window-exchexport-title"),800,Bc.pickValue(180,200),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeExport"]=
Cr;Cr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeExport";Cr.__super__=ea;Cr.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-exchexport-title");var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-exchexport-about"),vr:""},d=k.ln.get("window-exchexport-button");this.addForm(a,b.forge("leftcol",[c,{tp:"Spacer",id:"export",ht:20},{tp:"Button",id:"export",tx:d,ac:m(this,this.onExport)}]));this.ui.labels.h.about.set_wordWrap(!0);ea.prototype.startInterface.call(this)},
kill:function(){ea.prototype.kill.call(this)},onExport:function(a){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Movie/Export",b,m(this,this.onExportReturn))},onExportReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-exchexport-title"),k.ln.get("window-exchexport-error"),300,180,this.stage);else{this.ui.createWarning(k.ln.get("window-exchexport-title"),k.ln.get("window-exchexport-ok"),320,200,this.stage);a=k.ws;b=new G;b.h.file="export";var c=p.movie.get_mvId();
b.h.movie=c;a.download(b)}else this.ui.createWarning(k.ln.get("window-exchexport-title"),k.ln.get("window-exchexport-error"),300,180,this.stage)},__class__:Cr});var Dr=function(a){ea.call(this,a,k.ln.get("window-exchiframe-title"),800,Bc.pickValue(280,300),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeIframe"]=Dr;Dr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeIframe";Dr.__super__=ea;Dr.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-exchiframe-title");
var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-exchiframe-about"),vr:""},d={tp:"Label",id:"location",tx:k.ln.get("window-exchiframe-location"),vr:""},f={tp:"Select",id:"location",vl:[{text:k.ln.get("window-exchiframe-locsite"),value:"sites"},{text:k.ln.get("window-exchiframe-loczip"),value:"zip"}],sl:"sites"},g=k.ln.get("window-exchiframe-button");this.addForm(a,b.forge("leftcol",[c,{tp:"Spacer",id:"mode",ht:10},d,f,{tp:"Spacer",id:"export",ht:10},{tp:"Button",id:"export",tx:g,ac:m(this,
this.onExport)}]));this.ui.labels.h.about.set_wordWrap(!0);ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.ui.setSelectValue("location","sites")},onExport:function(a){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=this.ui.selects.h.location.get_selectedItem().value;b.h.location=c;a.send("Movie/ExportIframe",b,m(this,this.onExportReturn))},onExportReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-exchiframe-title"),
k.ln.get("window-exchiframe-error"),300,150,this.stage);else if(b.map.h.exp.indexOf(".zip")!=-1){this.ui.createWarning(k.ln.get("window-exchiframe-title"),k.ln.get("window-exchiframe-ok"),320,180,this.stage);b=k.ws;a=new G;a.h.file="website";var c=p.movie.get_mvId();a.h.movie=c;b.download(a)}else a=N.replace(k.ln.get("window-exchiframe-siteok"),"[URL]",b.map.h.exp),this.ui.createWarning(k.ln.get("window-exchiframe-title"),a,320,150,this.stage),k.ws.openurl(b.map.h.exp);else this.ui.createWarning(k.ln.get("window-exchiframe-title"),
k.ln.get("window-exchiframe-error"),300,150,this.stage)},__class__:Dr});var Er=function(a){this._movieid="";ea.call(this,a,k.ln.get("window-exchimport-title"),800,Bc.pickValue(205,220),!1)};t["com.tilbuci.ui.window.exchange.WindowExchangeImport"]=Er;Er.__name__="com.tilbuci.ui.window.exchange.WindowExchangeImport";Er.__super__=ea;Er.prototype=I(ea.prototype,{_idform:null,_uploadform:null,_movieid:null,startInterface:function(a){a=this.ui;var b={tp:"Label",id:"aboutupload",tx:k.ln.get("window-exchimport-aboutupload"),
vr:""},c={tp:"Button",id:"importsend",tx:k.ln.get("window-exchimport-buttonselectzip"),ac:m(this,this.onSelectZip)},d=k.ln.get("window-exchimport-buttonalready");this._uploadform=a.forge("upload",[b,{tp:"Spacer",id:"import",ht:30},c,{tp:"Button",id:"importalready",tx:d,ac:m(this,this.onAlreadyZip)}]);this.addForm("uploadform",this._uploadform);this.ui.labels.h.aboutupload.set_wordWrap(!0);a=this.ui;b={tp:"Label",id:"about",tx:k.ln.get("window-exchimport-aboutid"),vr:""};c=k.ln.get("window-exchimport-buttonid");
this._idform=a.forge("id",[b,{tp:"TInput",id:"movieid",tx:"",vr:""},{tp:"Spacer",id:"import",ht:30},{tp:"Button",id:"import",tx:c,ac:m(this,this.onCheckId)}]);this.addForm("idform",this._idform);this.ui.labels.h.about.set_wordWrap(!0);ea.prototype.startInterface.call(this);this._forms.removeChild(this._uploadform)},acStart:function(){this._forms.removeChildren();this._forms.addChild(this._idform);this._movieid="";this.ui.inputs.h.movieid.set_text("")},kill:function(){ea.prototype.kill.call(this)},
onCheckId:function(a){this._movieid="";if(this.ui.inputs.h.movieid.get_text().length>=3){a=k.ws;var b=new G,c=this.ui.inputs.h.movieid.get_text();b.h.movie=c;a.send("Movie/ImportID",b,m(this,this.onCheckIdReturn))}},onCheckIdReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorid"),300,180,this.stage):(this.ui.labels.h.aboutupload.set_text(N.replace(k.ln.get("window-exchimport-aboutupload"),"[NAME]",b.map.h.imp)),this.ui.buttons.h.importalready.set_text(N.replace(k.ln.get("window-exchimport-buttonalready"),
"[NAME]",b.map.h.imp)),this._movieid=b.map.h.imp,this._forms.removeChild(this._idform),this._forms.addChild(this._uploadform)):this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-error"),300,180,this.stage)},onSelectZip:function(a){k.up.browseForMedia(m(this,this.onFileSelcted),"movie")},onFileSelcted:function(a){if(a){a=k.up;var b=new G;b.h.movie=this._movieid;b.h.type="movie";b.h.path="";a.uploadMedia(m(this,this.onUploadReturn),b)}},onUploadReturn:function(a,b){a?
(a=k.ws,b=new G,b.h.movie=this._movieid,a.send("Movie/ImportZip",b,m(this,this.onZipReturn))):this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorsend"),300,180,this.stage)},onAlreadyZip:function(a){a=k.ws;var b=new G;b.h.movie=this._movieid;a.send("Movie/ImportZip",b,m(this,this.onZipReturn))},onZipReturn:function(a,b){a?b.map.h.e==0?(this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-impok"),300,180,this.stage),Aa.removePopUp(this)):
(b.map.h.e==1?this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimp1"),300,180,this.stage):b.map.h.e==2?this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimp2"),300,180,this.stage):b.map.h.e==3?this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimp3"),300,180,this.stage):b.map.h.e==4?this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimp4"),
300,180,this.stage):b.map.h.e==5?this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimp5"),300,180,this.stage):b.map.h.e==6?this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimp6"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimport"),300,180,this.stage),this.acStart()):this.ui.createWarning(k.ln.get("window-exchimport-title"),k.ln.get("window-exchimport-errorimport"),
300,180,this.stage)},__class__:Er});var Fr=function(a){ea.call(this,a,k.ln.get("window-exchpub-title"),600,Bc.pickValue(215,230),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangePublish"]=Fr;Fr.__name__="com.tilbuci.ui.window.exchange.WindowExchangePublish";Fr.__super__=ea;Fr.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-exchpub-title");var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-exchpub-about"),vr:""},d=k.ln.get("window-exchpub-button");this.addForm(a,
b.forge("pub",[c,{tp:"Spacer",id:"about",ht:20,ln:!1},{tp:"Button",id:"export",tx:d,ac:m(this,this.onExport)}]));this.ui.labels.h.about.set_wordWrap(!0);ea.prototype.startInterface.call(this)},acStart:function(){ea.prototype.acStart.call(this)},onExport:function(a){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Movie/ExportPub",b,m(this,this.onExportReturn))},onExportReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-exchpub-title"),k.ln.get("window-exchpub-error"),
300,180,this.stage);else{this.ui.createWarning(k.ln.get("window-exchpub-title"),k.ln.get("window-exchpub-ok"),320,200,this.stage);a=k.ws;b=new G;b.h.file="pub";var c=p.movie.get_mvId();b.h.movie=c;a.download(b)}else this.ui.createWarning(k.ln.get("window-exchpub-title"),k.ln.get("window-exchpub-error"),300,180,this.stage)},__class__:Fr});var Gr=function(a){ea.call(this,a,k.ln.get("window-exchpwa-title"),1E3,Bc.pickValue(525,600),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangePwa"]=Gr;
Gr.__name__="com.tilbuci.ui.window.exchange.WindowExchangePwa";Gr.__super__=ea;Gr.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-exchpwa-title");var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-exchpwa-about"),vr:""},d={tp:"Label",id:"name",tx:k.ln.get("window-exchpwa-name"),vr:ia.VARIANT_DETAIL},f={tp:"Label",id:"shortname",tx:k.ln.get("window-exchpwa-shortname"),vr:ia.VARIANT_DETAIL},g={tp:"Label",id:"lang",tx:k.ln.get("window-exchpwa-language"),vr:ia.VARIANT_DETAIL},
h={tp:"Label",id:"icon",tx:k.ln.get("window-exchpwa-icon"),vr:ia.VARIANT_DETAIL},n={tp:"Label",id:"location",tx:k.ln.get("window-exchpwa-location"),vr:""},l={tp:"Select",id:"location",vl:[{text:k.ln.get("window-exchpwa-locsite"),value:"pwa"},{text:k.ln.get("window-exchpwa-loczip"),value:"zip"}],sl:"sites",ch:m(this,this.onChangeLocation)},q={tp:"Label",id:"url",tx:k.ln.get("window-exchpwa-url"),vr:ia.VARIANT_DETAIL},u=k.ln.get("window-exchpwa-button");this.addForm(a,b.forge("pwa",[c,d,{tp:"TInput",
id:"name",vl:"",vr:""},f,{tp:"TInput",id:"shortname",vl:"",vr:""},g,{tp:"TInput",id:"lang",vl:"",vr:""},h,{tp:"TInput",id:"icon",vl:"",vr:""},n,l,q,{tp:"TInput",id:"url",vl:"",vr:""},{tp:"Spacer",id:"export",ht:20},{tp:"Button",id:"export",tx:u,ac:m(this,this.onExport)}]));this.ui.labels.h.about.set_wordWrap(!0);this.ui.inputs.h.shortname.set_maxChars(12);ea.prototype.startInterface.call(this)},acStart:function(){this.ui.inputs.h.name.set_text(p.mdata.title);p.mdata.title.length<=12?this.ui.inputs.h.shortname.set_text(p.mdata.title):
this.ui.inputs.h.shortname.set_text("");this.ui.inputs.h.lang.set_text("en-US");this.ui.inputs.h.icon.set_text(p.mdata.favicon);this.ui.inputs.h.icon.set_enabled(!1);this.ui.setSelectValue("location","pwa");this.ui.inputs.h.url.set_text(N.replace(k.econfig.get_base()+"pwa/"+p.movie.get_mvId()+"/","/editor/","/"))},onChangeLocation:function(a){this.ui.selects.h.location.get_selectedItem().value=="zip"?this.ui.inputs.h.url.set_text(""):this.ui.inputs.h.url.set_text(N.replace(k.econfig.get_base()+"pwa/"+
p.movie.get_mvId()+"/","/editor/","/"))},onExport:function(a){if(this.ui.inputs.h.name.get_text().length<3||this.ui.inputs.h.shortname.get_text().length<3)this.ui.createWarning(k.ln.get("window-exchpwa-title"),k.ln.get("window-exchpwa-noname"),300,180,this.stage);else if(this.ui.inputs.h.icon.get_text()==""||V.substr(this.ui.inputs.h.icon.get_text().toLowerCase(),-3,null)!="png")this.ui.createWarning(k.ln.get("window-exchpwa-title"),k.ln.get("window-exchpwa-nopng"),300,180,this.stage);else if(this.ui.inputs.h.lang.get_text().length<
5)this.ui.createWarning(k.ln.get("window-exchpwa-title"),k.ln.get("window-exchpwa-nolang"),300,180,this.stage);else if(a=this.ui.inputs.h.url.get_text().toLowerCase(),V.substr(a,0,8)!="https://")this.ui.createWarning(k.ln.get("window-exchpwa-title"),k.ln.get("window-exchpwa-nourl"),300,180,this.stage);else{var b=k.ws,c=new G,d=p.movie.get_mvId();c.h.movie=d;d=this.ui.inputs.h.name.get_text();c.h.name=d;d=this.ui.inputs.h.shortname.get_text();c.h.shortname=d;d=this.ui.inputs.h.lang.get_text();c.h.lang=
d;c.h.url=a;d=this.ui.selects.h.location.get_selectedItem().value;c.h.location=d;b.send("Movie/ExportPwa",c,m(this,this.onExportReturn))}},onExportReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-exchpwa-title"),k.ln.get("window-exchpwa-error"),300,180,this.stage);else if(b.map.h.exp.indexOf(".zip")!=-1){this.ui.createWarning(k.ln.get("window-exchpwa-title"),k.ln.get("window-exchpwa-ok"),320,200,this.stage);b=k.ws;a=new G;a.h.file="pwa";var c=p.movie.get_mvId();a.h.movie=
c;b.download(a)}else a=N.replace(k.ln.get("window-exchpwa-siteok"),"[URL]",b.map.h.exp),this.ui.createWarning(k.ln.get("window-exchpwa-title"),a,320,150,this.stage),k.ws.openurl(b.map.h.exp);else this.ui.createWarning(k.ln.get("window-exchpwa-title"),k.ln.get("window-exchpwa-error"),300,180,this.stage)},__class__:Gr});var Hr=function(a){ea.call(this,a,k.ln.get("window-exchsite-title"),800,Bc.pickValue(370,400),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeWebsite"]=Hr;Hr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeWebsite";
Hr.__super__=ea;Hr.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-exchsite-title");var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-exchsite-about"),vr:""},d={tp:"Label",id:"location",tx:k.ln.get("window-exchsite-location"),vr:""},f={tp:"Select",id:"location",vl:[{text:k.ln.get("window-exchsite-locsite"),value:"sites"},{text:k.ln.get("window-exchsite-loczip"),value:"zip"}],sl:"sites",ch:m(this,this.onChangeLocation)},g={tp:"Label",id:"sitemap",tx:k.ln.get("window-exchsite-sitemap"),
vr:"",wrap:!0},h=k.ln.get("window-exchexport-button");this.addForm(a,b.forge("leftcol",[c,{tp:"Spacer",id:"location",ht:10},d,f,{tp:"Spacer",id:"sitemap",ht:10},g,{tp:"TInput",id:"sitemap",tx:"",vr:""},{tp:"Spacer",id:"export",ht:10},{tp:"Button",id:"export",tx:h,ac:m(this,this.onExport)}]));this.ui.labels.h.about.set_wordWrap(!0);this.ui.labels.h.sitemap.set_wordWrap(!0);ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.ui.setSelectValue("location",
"sites");this.ui.inputs.h.sitemap.set_text(N.replace(k.econfig.get_base()+"sites/"+p.movie.get_mvId()+"/","/editor/","/"))},onChangeLocation:function(a){this.ui.selects.h.location.get_selectedItem().value=="zip"?this.ui.inputs.h.sitemap.set_text(""):this.ui.inputs.h.sitemap.set_text(N.replace(k.econfig.get_base()+"sites/"+p.movie.get_mvId()+"/","/editor/","/"))},onExport:function(a){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.mode="webgl";c=this.ui.selects.h.location.get_selectedItem().value;
b.h.location=c;c=this.ui.inputs.h.sitemap.get_text();b.h.sitemap=c;a.send("Movie/ExportSite",b,m(this,this.onExportReturn))},onExportReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-exchsite-title"),k.ln.get("window-exchsite-error"),300,150,this.stage);else if(b.map.h.exp.indexOf(".zip")!=-1){this.ui.createWarning(k.ln.get("window-exchsite-title"),k.ln.get("window-exchsite-ok"),320,180,this.stage);b=k.ws;a=new G;a.h.file="website";var c=p.movie.get_mvId();a.h.movie=
c;b.download(a)}else a=N.replace(k.ln.get("window-exchsite-siteok"),"[URL]",b.map.h.exp),this.ui.createWarning(k.ln.get("window-exchsite-title"),a,320,150,this.stage),k.ws.openurl(b.map.h.exp);else this.ui.createWarning(k.ln.get("window-exchsite-title"),k.ln.get("window-exchsite-error"),300,150,this.stage)},__class__:Hr});var Kr=function(a){ea.call(this,a,k.ln.get("window-kfmanage-title"),1E3,Bc.pickValue(520,540),!1,!0,!0)};t["com.tilbuci.ui.window.keyframe.WindowKeyframeManage"]=Kr;Kr.__name__=
"com.tilbuci.ui.window.keyframe.WindowKeyframeManage";Kr.__super__=ea;Kr.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-kfmanage-title");var b=this.ui,c=this.ui,d={tp:"Label",id:"keyframes",tx:k.ln.get("window-kfmanage-keyframes"),vr:"detail"},f={tp:"Button",id:"actions",tx:k.ln.get("window-kfmanage-actions"),ac:m(this,this.setActions)},g={tp:"Button",id:"add",tx:k.ln.get("window-kfmanage-add"),ac:m(this,this.addKeyframe)},h=k.ln.get("window-kfmanage-remove");g=c.forge("leftcol",
[d,{tp:"List",id:"keyframes",vl:[],sl:null,ht:332},f,g,{tp:"Button",id:"remove",tx:h,ac:m(this,this.remove)}]);c=this.ui;d={tp:"Label",id:"instances",tx:k.ln.get("window-kfmanage-instances"),vr:"detail"};f=k.ln.get("window-kfmanage-instremove");this.addForm(a,b.createColumnHolder("columns",g,c.forge("rightcol",[d,{tp:"List",id:"instances",vl:[],sl:null,ht:390},{tp:"Button",id:"removeinst",tx:f,ac:m(this,this.removeInst)}])));ea.prototype.startInterface.call(this);this.ui.listChange("keyframes",m(this,
this.onKfChange));this.loadKfs()},acStart:function(){this.loadKfs()},loadKfs:function(){for(var a=[],b=0,c=p.movie.scene.keyframes.length;b<c;){var d=b++;a.push({text:H.string(d+1),value:d})}this.ui.setListValues("keyframes",a);this.ui.setListValues("instances",[])},onKfChange:function(a){a=[];if(this.ui.lists.h.keyframes.get_selectedItem()!=null){var b=p.movie.scene.keyframes[this.ui.lists.h.keyframes.get_selectedItem().value].h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];a.push({text:f,
value:f})}}this.ui.setListValues("instances",a)},kill:function(){ea.prototype.kill.call(this)},remove:function(a){this.ui.lists.h.keyframes.get_selectedItem()!=null&&(p.movie.scene.keyframes.length>1?(p.area.loadKeyframe(p.movie.scene.keyframes[this.ui.lists.h.keyframes.get_selectedItem().value],this.ui.lists.h.keyframes.get_selectedItem().value),this._ac("remove"),this.loadKfs()):k.showMsg(k.ln.get("window-kfmanage-onlyone")))},setActions:function(a){this.ui.lists.h.keyframes.get_selectedItem()!=
null&&k.showActionWindow(p.movie.scene.ackeyframes[this.ui.lists.h.keyframes.get_selectedItem().value],m(this,this.onNewAction))},onNewAction:function(a){p.movie.scene.ackeyframes[this.ui.lists.h.keyframes.get_selectedItem().value]=a},addKeyframe:function(a){this.ui.lists.h.keyframes.get_selectedItem()!=null&&(p.area.loadKeyframe(p.movie.scene.keyframes[this.ui.lists.h.keyframes.get_selectedItem().value],this.ui.lists.h.keyframes.get_selectedItem().value),this._ac("add"),this.loadKfs())},removeInst:function(a){this.ui.lists.h.keyframes.get_selectedItem()!=
null&&this.ui.lists.h.instances.get_selectedItem()!=null&&(p.area.loadKeyframe(p.movie.scene.keyframes[this.ui.lists.h.keyframes.get_selectedItem().value],this.ui.lists.h.keyframes.get_selectedItem().value),p.area.removeInstance(this.ui.lists.h.instances.get_selectedItem().value),this.onKfChange(),this._ac("reload"))},__class__:Kr});var lr=function(a){this._frtime=100;this._frames=1;this._endAction="";ea.call(this,a,k.ln.get("window-asset-title"),1E3,380,!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowAssetBase"]=
lr;lr.__name__="com.tilbuci.ui.window.media.WindowAssetBase";lr.__super__=ea;lr.prototype=I(ea.prototype,{_interface:null,_instance:null,_asset:null,_endAction:null,_frames:null,_frtime:null,startInterface:function(a){this.ui.createHContainer("atfile");this.ui.createTInput("atfile","","",null,!1);this.ui.inputs.h.atfile.set_width(875);this.ui.inputs.h.atfile.set_enabled(!1);this.ui.hcontainers.h.atfile.addChild(this.ui.inputs.h.atfile);this.ui.createIconButton("atfile",m(this,this.onFile),new Ma(Z.getBitmapData("btOpenfile")),
null,null,!1);this.ui.buttons.h.atfile.set_width(50);this.ui.hcontainers.h.atfile.addChild(this.ui.buttons.h.atfile);this.ui.hcontainers.h.atfile.setWidth(960,[870,70]);a=this.ui;var b={tp:"Label",id:"name",tx:k.ln.get("window-asset-name"),vr:""},c={tp:"Label",id:"atfile",tx:k.ln.get("window-asset-file"),vr:""},d={tp:"Custom",cont:this.ui.hcontainers.h.atfile},f={tp:"Button",id:"shape",tx:k.ln.get("window-asset-shape"),ac:m(this,this.onFile)},g={tp:"Button",id:"spritemap",tx:k.ln.get("window-asset-spritemap"),
ac:m(this,this.onFile)},h={tp:"Button",id:"text",tx:k.ln.get("window-asset-text"),ac:m(this,this.onFile)},n={tp:"Label",id:"asttime",tx:k.ln.get("window-collection-asttime"),vr:""},l={tp:"Label",id:"assetac",tx:k.ln.get("window-collection-astac"),vr:""},q={tp:"Select",id:"assetac",vl:[{text:k.ln.get("window-collection-astacloop"),value:"loop"},{text:k.ln.get("window-collection-astacnext"),value:"next"},{text:k.ln.get("window-collection-astacprevious"),value:"previous"},{text:k.ln.get("window-collection-astacstop"),
value:"stop"},{text:k.ln.get("window-collection-astacaction"),value:"action"}],sl:null},u={tp:"Button",id:"assetac",tx:k.ln.get("window-collection-astacset"),ac:m(this,this.onEndActions)},v={tp:"Button",id:"btok",tx:k.ln.get("window-asset-btok"),ac:m(this,this.onSave)},z=k.ln.get("window-asset-btcancel");this._interface=a.forge("properties",[b,{tp:"TInput",id:"name",tx:"",vr:""},c,d,f,g,h,n,{tp:"Numeric",id:"asttime",mn:1,mx:1E3,st:1,vl:1},l,q,u,{tp:"Spacer",id:"buttons",ht:10,ln:!1},v,{tp:"Button",
id:"btcancel",tx:z,ac:m(this,this.onClose)}]);this.addForm("properties",this._interface);ea.prototype.startInterface.call(this)},acStart:function(){this._asset=this._instance=null},action:function(a,b){a=="setfile"?(this.ui.inputs.h.atfile.set_text(b.h.file),this._frames=H.parseInt(b.h.frames),this._frtime=H.parseInt(b.h.frtime)):(this._instance=p.area.pickInstance(b.h.instance),this._instance!=null?(b=p.movie.collections,a=this._instance.getCurrentStr("collection"),Object.prototype.hasOwnProperty.call(b.h,
a)?(b=p.movie.collections,a=this._instance.getCurrentStr("collection"),b=b.h[a].assets,a=this._instance.getCurrentStr("asset"),Object.prototype.hasOwnProperty.call(b.h,a)?(b=p.movie.collections,a=this._instance.getCurrentStr("collection"),b=b.h[a].assets,a=this._instance.getCurrentStr("asset"),this._asset=b.h[a],this._asset.ok?(this._endAction=this._asset.action,this._frames=this._asset.frames,this._frtime=this._asset.frtime,this.show()):(k.showMsg(k.ln.get("window-asset-noasset")),Aa.removePopUp(this))):
(k.showMsg(k.ln.get("window-asset-noasset")),Aa.removePopUp(this))):(k.showMsg(k.ln.get("window-asset-nocollection")),Aa.removePopUp(this))):(k.showMsg(k.ln.get("window-asset-noinstance")),Aa.removePopUp(this)))},show:function(){this._interface.removeChildren();this._interface.addChild(this.ui.labels.h.name);this._interface.addChild(this.ui.inputs.h.name);this.ui.inputs.h.name.set_text(this._asset.name);this.ui.inputs.h.atfile.set_text(this._asset.file.h["@1"]);switch(this._asset.type){case "audio":this._interface.addChild(this.ui.labels.h.atfile);
this._interface.addChild(this.ui.hcontainers.h.atfile);break;case "html":this._interface.addChild(this.ui.labels.h.atfile);this._interface.addChild(this.ui.hcontainers.h.atfile);this._interface.addChild(this.ui.labels.h.asttime);this._interface.addChild(this.ui.numerics.h.asttime);this.ui.numerics.h.asttime.set_value(this._asset.time);break;case "paragraph":this._interface.addChild(this.ui.buttons.h.text);this._interface.addChild(this.ui.labels.h.asttime);this._interface.addChild(this.ui.numerics.h.asttime);
this.ui.numerics.h.asttime.set_value(this._asset.time);break;case "picture":this._interface.addChild(this.ui.labels.h.atfile);this._interface.addChild(this.ui.hcontainers.h.atfile);this._interface.addChild(this.ui.labels.h.asttime);this._interface.addChild(this.ui.numerics.h.asttime);this.ui.numerics.h.asttime.set_value(this._asset.time);break;case "shape":this._interface.addChild(this.ui.buttons.h.shape);this._interface.addChild(this.ui.labels.h.asttime);this._interface.addChild(this.ui.numerics.h.asttime);
this.ui.numerics.h.asttime.set_value(this._asset.time);break;case "spritemap":this._interface.addChild(this.ui.buttons.h.spritemap);this._interface.addChild(this.ui.labels.h.asttime);this._interface.addChild(this.ui.numerics.h.asttime);this.ui.numerics.h.asttime.set_value(this._asset.time);break;case "video":this._interface.addChild(this.ui.labels.h.atfile),this._interface.addChild(this.ui.hcontainers.h.atfile)}switch(this._endAction){case "":this.ui.setSelectValue("assetac","loop");break;case "loop":this.ui.setSelectValue("assetac",
this._endAction);break;case "next":this.ui.setSelectValue("assetac",this._endAction);break;case "previous":this.ui.setSelectValue("assetac",this._endAction);break;case "stop":this.ui.setSelectValue("assetac",this._endAction);break;default:this.ui.setSelectValue("assetac","action")}this._interface.addChild(this.ui.labels.h.assetac);this._interface.addChild(this.ui.selects.h.assetac);this._interface.addChild(this.ui.buttons.h.assetac);this._interface.addChild(this.ui.spacers.h.buttons);this._interface.addChild(this.ui.buttons.h.btok);
this._interface.addChild(this.ui.buttons.h.btcancel)},onSave:function(a){if(this.ui.inputs.h.name.get_text().length<5)k.showPopup(k.ln.get("window-asset-title"),k.ln.get("window-collection-astnameer"),320,180,k.ln.get("default-ok"));else{this._asset.name=this.ui.inputs.h.name.get_text();this.ui.selects.h.assetac.get_selectedItem().value=="action"?this._asset.action=this._endAction:this._asset.action=this.ui.selects.h.assetac.get_selectedItem().value;a=this.ui.numerics.h.asttime.get_value();this._asset.time=
Math.round(a);this._asset.frames=this._frames;this._asset.frtime=this._frtime;a=this._asset.file.h["@1"];var b=this._asset.file,c=this.ui.inputs.h.atfile.get_text();b.h["@1"]=c;this._asset.file.h["@2"]==a&&(b=this._asset.file,c=this.ui.inputs.h.atfile.get_text(),b.h["@2"]=c);this._asset.file.h["@3"]==a&&(b=this._asset.file,c=this.ui.inputs.h.atfile.get_text(),b.h["@3"]=c);this._asset.file.h["@4"]==a&&(b=this._asset.file,c=this.ui.inputs.h.atfile.get_text(),b.h["@4"]=c);this._asset.file.h["@5"]==a&&
(b=this._asset.file,c=this.ui.inputs.h.atfile.get_text(),b.h["@5"]=c);this._instance=this._asset=null;p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf());Aa.removePopUp(this)}},onClose:function(a){this._instance=this._asset=null;Aa.removePopUp(this)},onFile:function(a){a=this._ac;var b=new G;b.h.type=this._asset.type;b.h.current=this._asset.file.h["@1"];b.h.num="1";a("file",b)},onEndActions:function(a){switch(this._endAction){case "loop":a="";break;case "next":a=
"";break;case "previous":a="";break;case "stop":a="";break;default:a=this._endAction}k.showActionWindow(a,m(this,this.onAcOk))},onAcOk:function(a){a!=""&&(this._endAction=a,this.ui.setSelectValue("assetac","action"))},__class__:lr});var wr=function(a){this._assets=[];ea.call(this,a,k.ln.get("window-collectionbasic-title"),1E3,640,!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollectionBase"]=wr;wr.__name__="com.tilbuci.ui.window.media.WindowCollectionBase";wr.__super__=ea;wr.prototype=I(ea.prototype,
{_instance:null,_collection:null,_assets:null,startInterface:function(a){this.ui.createHContainer("assetorder");a=this.ui;var b=Z.getBitmapData("btUp"),c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderup",m(this,this.onAssetUp),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDown");c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderdown",m(this,this.onAssetDown),new Ma(b),null,c,!1);this.ui.hcontainers.h.assetorder.setWidth(460);b=a=this.ui;c={tp:"Label",id:"name",tx:k.ln.get("window-collectionbasic-name"),
vr:""};var d={tp:"Label",id:"coltrans",tx:k.ln.get("window-collection-coltrans"),vr:""},f={tp:"Select",id:"coltrans",vl:[{text:k.ln.get("window-collection-ctralpha"),value:"alpha"},{text:k.ln.get("window-collection-ctrright"),value:"right"},{text:k.ln.get("window-collection-ctrleft"),value:"left"},{text:k.ln.get("window-collection-ctrtop"),value:"top"},{text:k.ln.get("window-collection-ctrbottom"),value:"bottom"},{text:k.ln.get("window-collection-ctrno"),value:"no"}],sl:null},g={tp:"Label",id:"coltime",
tx:k.ln.get("window-collection-coltime"),vr:""},h={tp:"Button",id:"onok",tx:k.ln.get("window-collectionbasic-save"),ac:m(this,this.onSave)},n=k.ln.get("window-collectionbasic-cancel"),l=b.forge("left",[c,{tp:"TInput",id:"name",tx:"",vr:""},d,f,g,{tp:"Select",id:"coltime",vl:[{text:"0.25s",value:.25},{text:"0.5s",value:.5},{text:"0.75s",value:.75},{text:"1s",value:1},{text:"1.5s",value:1.5},{text:"2s",value:2},{text:"5s",value:5}],sl:null},{tp:"Spacer",id:"buttons",ht:354,ln:!1},h,{tp:"Button",id:"oncancel",
tx:n,ac:m(this,this.onClose)}]);b=this.ui;c={tp:"Label",id:"assets",tx:k.ln.get("window-collection-assets"),vr:""};d={tp:"Custom",cont:this.ui.hcontainers.h.assetorder};f={tp:"Label",id:"assettime",tx:k.ln.get("window-collectionbasic-assettime"),vr:""};g={tp:"Button",id:"assettime",tx:k.ln.get("window-collectionbasic-assettimeset"),ac:m(this,this.onTime)};h={tp:"Label",id:"assetac",tx:k.ln.get("window-collectionbasic-astac"),vr:""};n={tp:"Select",id:"assetac",vl:[{text:k.ln.get("window-collection-astacloop"),
value:"loop"},{text:k.ln.get("window-collection-astacnext"),value:"next"},{text:k.ln.get("window-collection-astacprevious"),value:"previous"},{text:k.ln.get("window-collection-astacstop"),value:"stop"}],sl:null};var q=k.ln.get("window-collectionbasic-astacset");this.addForm("columns",a.createColumnHolder("columns",l,b.forge("right",[c,{tp:"List",id:"assets",vl:[],ht:325,sl:null},d,{tp:"Spacer",id:"assettime",ht:10,ln:!1},f,{tp:"Numeric",id:"assettime",mn:1,mx:1E3,st:1,vl:1},g,{tp:"Spacer",id:"assetac",
ht:10,ln:!1},h,n,{tp:"Button",id:"assetac",tx:q,ac:m(this,this.onEnd)}])));this.ui.setListToIcon("assets");ea.prototype.startInterface.call(this)},acStart:function(){this._collection=this._instance=null},action:function(a,b){a!="setfile"&&(this._instance=p.area.pickInstance(b.h.instance),this._instance!=null?(a=p.movie.collections,b=this._instance.getCurrentStr("collection"),Object.prototype.hasOwnProperty.call(a.h,b)?(a=p.movie.collections,b=this._instance.getCurrentStr("collection"),a.h[b].ok?(a=
p.movie.collections,b=this._instance.getCurrentStr("collection"),this._collection=a.h[b],this.show()):(k.showMsg(k.ln.get("window-asset-nocollection")),Aa.removePopUp(this))):(k.showMsg(k.ln.get("window-asset-nocollection")),Aa.removePopUp(this))):(k.showMsg(k.ln.get("window-asset-noinstance")),Aa.removePopUp(this)))},show:function(){this.ui.inputs.h.name.set_text(this._collection.name);this.ui.setSelectValue("coltrans",this._collection.transition);this.ui.setSelectValue("coltime",this._collection.time);
this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("assets",[]);this._assets=[];for(var a=0,b=this._collection.assetOrder;a<b.length;){var c=b[a];++a;this._assets.push({text:this._collection.assets.h[c].name,user:k.ln.get("menu-media-"+this._collection.assets.h[c].type),value:{time:this._collection.assets.h[c].time,action:this._collection.assets.h[c].action,order:this._collection.assets.h[c].order,id:c}})}this.ui.setListValues("assets",this._assets)},onSave:function(a){this.ui.inputs.h.name.get_text().length<
5?k.showPopup(k.ln.get("window-collectionbasic-title"),k.ln.get("window-collection-colnameer"),320,180,k.ln.get("default-ok")):k.showPopup(k.ln.get("window-collectionbasic-title"),k.ln.get("window-collectionbasic-colapply"),320,180,k.ln.get("default-ok"),m(this,this.onColSure),"confirm",k.ln.get("default-cancel"))},onColSure:function(a){if(a){this._collection.name=this.ui.inputs.h.name.get_text();this._collection.transition=this.ui.selects.h.coltrans.get_selectedItem().value;this._collection.time=
this.ui.selects.h.coltime.get_selectedItem().value;this._collection.assetOrder=[];a=0;for(var b=this._assets.length;a<b;){var c=a++;this._collection.assetOrder.push(this._assets[c].value.id);this._collection.assets.h[this._assets[c].value.id].order=c;this._collection.assets.h[this._assets[c].value.id].time=this._assets[c].value.time;this._collection.assets.h[this._assets[c].value.id].action=this._assets[c].value.action}this._assets=this._instance=this._collection=null;p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],
p.area.get_currentKf());Aa.removePopUp(this)}},onClose:function(a){this._assets=this._instance=this._collection=null;Aa.removePopUp(this)},onTime:function(a){k.showPopup(k.ln.get("window-collectionbasic-title"),k.ln.get("window-collectionbasic-timeapply"),320,190,k.ln.get("default-ok"),m(this,this.onTimeSure),"confirm",k.ln.get("default-cancel"))},onTimeSure:function(a){if(a){a=0;for(var b=this._assets.length;a<b;){var c=a++;this._assets[c].value.time=this.ui.numerics.h.assettime.get_value()}}},onEnd:function(a){k.showPopup(k.ln.get("window-collectionbasic-title"),
k.ln.get("window-collectionbasic-actionapply"),320,190,k.ln.get("default-ok"),m(this,this.onEndSure),"confirm",k.ln.get("default-cancel"))},onEndSure:function(a){if(a){a=0;for(var b=this._assets.length;a<b;){var c=a++;this._assets[c].value.action=this.ui.selects.h.assetac.get_selectedItem().value}}},onAssetUp:function(a){if(this.ui.lists.h.assets.get_selectedItem()!=null&&(a=this.ui.lists.h.assets.get_selectedIndex(),a>0)){var b=this._assets[a];this._assets[a]=this._assets[a-1];this._assets[a-1]=
b;b=0;for(var c=this._assets.length;b<c;){var d=b++;this._assets[d].value.order=d}this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("assets",[]);this.ui.setListValues("assets",this._assets);this.ui.lists.h.assets.set_selectedIndex(a-1);this.ui.lists.h.assets.get_dataProvider().updateAt(this.ui.lists.h.assets.get_selectedIndex())}},onAssetDown:function(a){if(this.ui.lists.h.assets.get_selectedItem()!=null&&(a=this.ui.lists.h.assets.get_selectedIndex(),a<this._assets.length-1)){var b=
this._assets[a];this._assets[a]=this._assets[a+1];this._assets[a+1]=b;b=0;for(var c=this._assets.length;b<c;){var d=b++;this._assets[d].value.order=d}this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("assets",[]);this.ui.setListValues("assets",this._assets);this.ui.lists.h.assets.set_selectedIndex(a+1);this.ui.lists.h.assets.get_dataProvider().updateAt(this.ui.lists.h.assets.get_selectedIndex())}},__class__:wr});var Nr=function(a){this._changed=!1;ea.call(this,a,k.ln.get("window-collection-title"),
1E3,Bc.pickValue(660,700),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollections"]=Nr;Nr.__name__="com.tilbuci.ui.window.media.WindowCollections";Nr.__super__=ea;Nr.prototype=I(ea.prototype,{_colint:null,_astint:null,_curast:null,_collections:null,_changed:null,_shape:null,startInterface:function(a){this.ui.createHContainer("assetback");this.ui.createButton("astbackok",k.ln.get("window-collection-astbackok"),m(this,this.onAssetOk),this.ui.hcontainers.h.assetback,!1);this.ui.createButton("astbackcancel",
k.ln.get("window-collection-astbackcancel"),m(this,this.onAssetCancel),this.ui.hcontainers.h.assetback,!1);this.ui.hcontainers.h.assetback.setWidth(960);this.ui.createContainer("media",0);this.ui.createContainer("file",0);this.ui.createLabel("assets",k.ln.get("window-collection-astfiles"),"",this.ui.containers.h.file);this.ui.createSpacer("assets",5,!1,this.ui.containers.h.file);this.ui.containers.h.file.addChild(this.createFileInput(1,m(this,this.onFile1)));this.ui.createSpacer("file1",5,!1,this.ui.containers.h.file);
this.ui.containers.h.file.addChild(this.createFileInput(2,m(this,this.onFile2)));this.ui.createSpacer("file2",5,!1,this.ui.containers.h.file);this.ui.containers.h.file.addChild(this.createFileInput(3,m(this,this.onFile3)));this.ui.createSpacer("file3",5,!1,this.ui.containers.h.file);this.ui.containers.h.file.addChild(this.createFileInput(4,m(this,this.onFile4)));this.ui.createSpacer("file4",5,!1,this.ui.containers.h.file);this.ui.containers.h.file.addChild(this.createFileInput(5,m(this,this.onFile5)));
this.ui.containers.h.media.addChild(this.ui.containers.h.file);this.ui.createContainer("shape",0);this.ui.containers.h.shape.set_layout(new Gi);this._shape=new yn(m(this,this.onShapeShow));this.ui.createButton("shape",k.ln.get("window-collection-astshape"),m(this,this.onFile1));this.ui.containers.h.shape.set_width(this.ui.buttons.h.shape.set_width(960));this.ui.createContainer("assettext",0);this.ui.createTArea("assettext","",!1,"",this.ui.containers.h.assettext);this.ui.createButton("assettext",
k.ln.get("window-collection-asttext"),m(this,this.onFile1),this.ui.containers.h.assettext);this.ui.containers.h.assettext.set_width(this.ui.buttons.h.assettext.set_width(this.ui.tareas.h.assettext.set_width(1E3)));this.ui.tareas.h.assettext.set_height(140);this.ui.createHContainer("spritemap");this.ui.hcontainers.h.spritemap.addChild(this.ui.forge("smapleft",[{tp:"Label",id:"astsmapnum",tx:k.ln.get("window-collection-astsmapnum"),vr:""},{tp:"Numeric",id:"astsmapnum",mn:1,mx:1E3,st:1,vl:1}],-1,490,
0));this.ui.hcontainers.h.spritemap.addChild(this.ui.forge("smapright",[{tp:"Label",id:"astsmaptime",tx:k.ln.get("window-collection-astsmaptime"),vr:""},{tp:"Numeric",id:"astsmaptime",mn:50,mx:5E3,st:50,vl:100}],-1,500,0));a=this.ui;var b={tp:"Label",id:"assetname",tx:k.ln.get("window-collection-astname"),vr:""},c={tp:"Label",id:"assetac",tx:k.ln.get("window-collection-astac"),vr:""},d={tp:"Select",id:"assetac",vl:[{text:k.ln.get("window-collection-astacloop"),value:"loop"},{text:k.ln.get("window-collection-astacnext"),
value:"next"},{text:k.ln.get("window-collection-astacprevious"),value:"previous"},{text:k.ln.get("window-collection-astacstop"),value:"stop"},{text:k.ln.get("window-collection-astacaction"),value:"action"}],sl:null},f={tp:"Button",id:"endactions",tx:k.ln.get("window-collection-astacset"),ac:m(this,this.onEndActions)},g={tp:"Custom",cont:this.ui.containers.h.media},h=k.ln.get("window-collection-asttime");this._astint=a.forge("assetinterf",[b,{tp:"TInput",id:"assetname",tx:""},{tp:"Spacer",id:"assetname",
ht:10,ln:!1},c,d,f,{tp:"Spacer",id:"endactions",ht:10,ln:!1},g,{tp:"Spacer",id:"assets",ht:10,ln:!1},{tp:"Label",id:"asttime",tx:h,vr:""},{tp:"Numeric",id:"asttime",mn:1,mx:1E3,st:1,vl:1},{tp:"Spacer",id:"asttime",ht:10,ln:!1},{tp:"Custom",cont:this.ui.hcontainers.h.spritemap},{tp:"Spacer",id:"astback",ht:90,ln:!1},{tp:"Custom",cont:this.ui.hcontainers.h.assetback}]);this.addForm(k.ln.get("window-collection-asset"),this._astint);this.ui.createHContainer("newasset");this.ui.hcontainers.h.newasset.addChild(this.ui.forge("newassetleft",
[{tp:"Select",id:"assetadd",vl:[{text:k.ln.get("menu-media-audio"),value:"audio"},{text:k.ln.get("menu-media-html"),value:"html"},{text:k.ln.get("menu-media-paragraph"),value:"paragraph"},{text:k.ln.get("menu-media-picture"),value:"picture"},{text:k.ln.get("menu-media-shape"),value:"shape"},{text:k.ln.get("menu-media-spritemap"),value:"spritemap"},{text:k.ln.get("menu-media-video"),value:"video"}],sl:"picture"}],-1,180,0));this.ui.hcontainers.h.newasset.addChild(this.ui.forge("newassetright",[{tp:"Button",
id:"assetadd",tx:k.ln.get("window-collection-assetadd2"),ac:m(this,this.onNewAsset)}],-1,311,0));this.ui.createHContainer("assetorder");a=this.ui;b=Z.getBitmapData("btUp");c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderup",m(this,this.onAssetUp),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDown");c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderdown",m(this,this.onAssetDown),new Ma(b),null,c,!1);this.ui.hcontainers.h.assetorder.setWidth(460);b=a=this.ui;c={tp:"Label",
id:"collections",tx:k.ln.get("window-collection-cols"),vr:ia.VARIANT_DETAIL};d={tp:"Label",id:"coltitle",tx:k.ln.get("window-collection-coltitle"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"coltrans",tx:k.ln.get("window-collection-coltrans"),vr:ia.VARIANT_DETAIL};g={tp:"Select",id:"coltrans",vl:[{text:k.ln.get("window-collection-ctralpha"),value:"alpha"},{text:k.ln.get("window-collection-ctrright"),value:"right"},{text:k.ln.get("window-collection-ctrleft"),value:"left"},{text:k.ln.get("window-collection-ctrtop"),
value:"top"},{text:k.ln.get("window-collection-ctrbottom"),value:"bottom"},{text:k.ln.get("window-collection-ctrno"),value:"no"}],sl:null};h={tp:"Label",id:"coltime",tx:k.ln.get("window-collection-coltime"),vr:ia.VARIANT_DETAIL};var n={tp:"Button",id:"colupdate",tx:k.ln.get("window-collection-colupdate"),ac:m(this,this.onUpdateCol)},l=k.ln.get("window-collection-exitapply"),q=b.forge("leftcol",[c,{tp:"List",id:"collections",vl:[],ht:323,sl:null,ch:m(this,this.onColChange)},d,{tp:"TInput",id:"coltitle",
tx:""},f,g,h,{tp:"Select",id:"coltime",vl:[{text:"0.25s",value:.25},{text:"0.5s",value:.5},{text:"0.75s",value:.75},{text:"1s",value:1},{text:"1.5s",value:1.5},{text:"2s",value:2},{text:"5s",value:5}],sl:null},n,{tp:"Spacer",id:"exitapply",ht:18,ln:!1},{tp:"Button",id:"exitapply",tx:l,ac:m(this,this.onApply)}]);b=this.ui;c={tp:"Label",id:"assets",tx:k.ln.get("window-collection-assets"),vr:ia.VARIANT_DETAIL};d={tp:"Custom",cont:this.ui.hcontainers.h.assetorder};f={tp:"Button",id:"removeasset",tx:k.ln.get("window-collection-removea"),
ac:m(this,this.onRemoveAsset)};g={tp:"Button",id:"assetprop",tx:k.ln.get("window-collection-assetprop"),ac:m(this,this.onAssetProp)};h={tp:"Button",id:"assetstage",tx:k.ln.get("window-collection-assetstage"),ac:m(this,this.onAddToStage)};n={tp:"Label",id:"assetadd",tx:k.ln.get("window-collection-assetadd"),vr:ia.VARIANT_DETAIL};l={tp:"Custom",cont:this.ui.hcontainers.h.newasset};var u=k.ln.get("window-collection-exitno");this._colint=a.createColumnHolder("columns",q,b.forge("rightcol",[c,{tp:"List",
id:"assets",vl:[],ht:325,sl:null},d,f,g,h,{tp:"Spacer",id:"assetprop",ht:10,ln:!1},n,l,{tp:"Spacer",id:"exitno",ht:20,ln:!1},{tp:"Button",id:"exitno",tx:u,ac:m(this,this.onNoApply)}]));this.addForm(k.ln.get("window-media-file"),this._colint);this.ui.setListToIcon("collections");this.ui.setListToIcon("assets");this.ui.listDbClick("assets",m(this,this.onAssetProp));ea.prototype.startInterface.call(this);this._forms.removeChild(this._astint)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this._changed=
!1;this.loadCollections();this._forms.removeChildren();this._forms.addChild(this._colint);this._head.set_text(k.ln.get("window-collection-title"))},action:function(a,b){switch(a){case "addasset":if(this.ui.lists.h.collections.get_selectedItem()!=null){for(var c=V.substr(Ga.md5(b.h.name),0,10);;){a=this._collections;var d=this.ui.lists.h.collections.get_selectedItem().value.id;if(!Object.prototype.hasOwnProperty.call(a.h[d].assets.h,c))break;c=V.substr(Ga.md5(c),0,10)}var f=b.h.name;b.h.type=="shape"?
f=k.ln.get("menu-media-shape"):b.h.type=="paragraph"?f=k.ln.get("menu-media-paragraph"):b.h.type=="text"&&(f=k.ln.get("menu-media-text"));a=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;b={uid:"-1",id:c,order:0,name:f,type:b.h.type,time:5,frames:H.parseInt(b.h.frames),frtime:H.parseInt(b.h.frtime),file1:b.h.file,file2:b.h.file,file3:b.h.file,file4:b.h.file,file5:b.h.file,action:"loop"};a.h[d].assets.h[c]=b;b=0;a=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;
c=Object.keys(a.h[d].assets.h);f=c.length;for(var g=0;g<f;){var h=c[g++];a=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;a.h[d].assets.h[h].order=b;++b}a=this.ui.lists.h.collections;d=k.ln.get("window-collection-numassets");a.get_selectedItem().user=b+" "+d;this.ui.lists.h.collections.get_dataProvider().updateAt(this.ui.lists.h.collections.get_selectedIndex());this.onColChange();this._changed=!0}break;case "setfile":this.ui.numerics.h.astsmapnum.set_value(H.parseInt(b.h.frames)),
this.ui.numerics.h.astsmaptime.set_value(H.parseInt(b.h.frtime)),this.ui.lists.h.assets.get_selectedItem().value.type=="shape"?(this.ui.inputs.h["file@1"].set_text(this.ui.inputs.h["file@2"].set_text(this.ui.inputs.h["file@3"].set_text(this.ui.inputs.h["file@4"].set_text(this.ui.inputs.h["file@5"].set_text(b.h.file))))),this.ui.containers.h.shape.removeChildren(),this._shape.set_visible(!1),this._shape.load(b.h.file)):this.ui.lists.h.assets.get_selectedItem().value.type=="paragraph"||this.ui.lists.h.assets.get_selectedItem().value.type==
"text"?(this.ui.inputs.h["file@1"].set_text(this.ui.inputs.h["file@2"].set_text(this.ui.inputs.h["file@3"].set_text(this.ui.inputs.h["file@4"].set_text(this.ui.inputs.h["file@5"].set_text(b.h.file))))),this.ui.tareas.h.assettext.set_text(b.h.file)):this.ui.inputs.h["file@"+H.string(b.h.num)].set_text(b.h.file)}},loadCollections:function(){this.ui.lists.h.collections.set_selectedItem(null);this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("collections",[]);this.ui.setListValues("assets",
[]);var a=[];this._collections=new G;for(var b=0,c=p.movie.scene.collections;b<c.length;){var d=c[b];++b;if(Object.prototype.hasOwnProperty.call(p.movie.collections.h,d)){var f=p.movie.collections.h[d],g={uid:p.movie.get_mvId()+d,id:d,title:f.name,transition:f.transition,time:f.time,num:f.assetOrder.length};a.push({text:f.name,value:g,user:f.assetOrder.length+" "+k.ln.get("window-collection-numassets")});f=new G;for(var h=0,n=p.movie.collections.h[d].assetOrder.length;h<n;){var l=h++,q=p.movie.collections.h[d].assetOrder[l];
if(Object.prototype.hasOwnProperty.call(p.movie.collections.h[d].assets.h,q)){var u=p.movie.collections.h[d].assets.h[q];f.h[q]={uid:"-"+(l==null?"null":""+l),id:q,order:l,name:u.name,type:u.type,time:u.time,frames:u.frames,frtime:u.frtime,file1:u.file.h["@1"],file2:u.file.h["@2"],file3:u.file.h["@3"],file4:u.file.h["@4"],file5:u.file.h["@5"],action:u.action}}}this._collections.h[d]={collection:g,assets:f}}this.ui.setListValues("collections",a)}},onColChange:function(a){this.ui.lists.h.assets.set_selectedItem(null);
this.ui.setListValues("assets",[]);if(this.ui.lists.h.collections.get_selectedItem()!=null){a=[];for(var b=this._collections,c=this.ui.lists.h.collections.get_selectedItem().value.id,d=Object.keys(b.h[c].assets.h),f=d.length,g=0;g<f;){var h=d[g++];b=this._collections;c=this.ui.lists.h.collections.get_selectedItem().value.id;b=b.h[c].assets.h[h].name;c=k.ln;var n=this._collections,l=this.ui.lists.h.collections.get_selectedItem().value.id;c=c.get("menu-media-"+n.h[l].assets.h[h].type);n=this._collections;
l=this.ui.lists.h.collections.get_selectedItem().value.id;a.push({text:b,user:c,value:n.h[l].assets.h[h]})}this.ui.setListValues("assets",a);this.ui.inputs.h.coltitle.set_text(this.ui.lists.h.collections.get_selectedItem().value.title);this.ui.setSelectValue("coltrans",this.ui.lists.h.collections.get_selectedItem().value.transition);this.ui.setSelectValue("coltime",this.ui.lists.h.collections.get_selectedItem().value.time)}},onUpdateCol:function(a){if(this.ui.lists.h.collections.get_selectedItem()!=
null){if(this.ui.inputs.h.coltitle.get_text().length<3)return k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-colnameer"),320,180,k.ln.get("default-ok")),!1;a=this._collections;var b=this.ui.lists.h.collections.get_selectedItem().value.id;a.h[b].collection.title=this.ui.inputs.h.coltitle.get_text();a=this._collections;b=this.ui.lists.h.collections.get_selectedItem().value.id;a.h[b].collection.transition=this.ui.selects.h.coltrans.get_selectedItem().value;a=this._collections;
b=this.ui.lists.h.collections.get_selectedItem().value.id;a.h[b].collection.time=this.ui.selects.h.coltime.get_selectedItem().value;a=this.ui.inputs.h.coltitle;this.ui.lists.h.collections.get_selectedItem().text=a.get_text();this.ui.lists.h.collections.get_dataProvider().updateAt(this.ui.lists.h.collections.get_selectedIndex());this._changed=!0}return!0},onRemoveAsset:function(a){if(this.ui.lists.h.collections.get_selectedItem()!=null&&this.ui.lists.h.assets.get_selectedItem()!=null)if(this.ui.lists.h.assets.get_dataProvider().get_length()<
2)k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-astonlyone"),320,180,k.ln.get("default-ok"));else{var b=this.ui.lists.h.collections.get_selectedItem().value.id,c=this.ui.lists.h.assets.get_selectedItem().value.id,d=new G;a=0;for(var f=Object.keys(this._collections.h[b].assets.h),g=f.length,h=0;h<g;){var n=f[h++];n!=c&&(this._collections.h[b].assets.h[n].order=a,++a,d.h[n]=this._collections.h[b].assets.h[n])}this._collections.h[b].assets=d;b=this.ui.lists.h.collections;
c=k.ln.get("window-collection-numassets");b.get_selectedItem().user=a+" "+c;this.ui.lists.h.collections.get_dataProvider().updateAt(this.ui.lists.h.collections.get_selectedIndex());this.onColChange();this._changed=!0}},onAddToStage:function(a){this.ui.lists.h.collections.get_selectedItem()!=null&&this.ui.lists.h.assets.get_selectedItem()!=null&&(this._changed?k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-astaddchange"),320,220,k.ln.get("default-ok"),m(this,this.onApplyThenAdd),
"confirm",k.ln.get("default-cancel")):this.addAssetStage())},onApplyThenAdd:function(a){a&&(this.updateScene(),this.addAssetStage())},addAssetStage:function(){var a=this._ac,b=new G,c=this.ui.lists.h.collections.get_selectedItem().value.id;b.h.collection=c;c=this.ui.lists.h.assets.get_selectedItem().value.id;b.h.asset=c;a("addinstance",b);Aa.removePopUp(this)},onAssetUp:function(a){if(this.ui.lists.h.collections.get_selectedItem()!=null&&this.ui.lists.h.assets.get_selectedItem()!=null&&(a=this.ui.lists.h.assets.get_selectedIndex(),
a>0)){var b=0,c=this._collections,d=this.ui.lists.h.collections.get_selectedItem().value.id,f=c.h[d].assets.h;f=Object.keys(f);for(var g=f.length,h=0;h<g;){var n=f[h++];c=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;c.h[d].assets.h[n].order=b;++b}var l=this.ui.lists.h.assets.get_selectedItem().value.id,q=new G;b=0;c=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;f=c.h[d].assets.h;f=Object.keys(f);g=f.length;for(h=0;h<g;)n=f[h++],b==a-1&&
(c=this._collections,d=this.ui.lists.h.collections.get_selectedItem().value.id,q.h[l]=c.h[d].assets.h[l]),n!=l&&(c=this._collections,d=this.ui.lists.h.collections.get_selectedItem().value.id,q.h[n]=c.h[d].assets.h[n]),++b;b=0;f=q.h;f=Object.keys(f);g=f.length;for(h=0;h<g;)n=f[h++],q.h[n].order=b,++b;c=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;c.h[d].assets=q;this.onColChange();this.ui.lists.h.assets.set_selectedIndex(a-1);this.ui.lists.h.assets.get_dataProvider().updateAt(this.ui.lists.h.assets.get_selectedIndex());
this._changed=!0}},onAssetDown:function(a){if(this.ui.lists.h.collections.get_selectedItem()!=null&&this.ui.lists.h.assets.get_selectedItem()!=null&&(a=this.ui.lists.h.assets.get_selectedIndex(),a<this.ui.lists.h.assets.get_dataProvider().get_length()-1)){var b=0,c=this._collections,d=this.ui.lists.h.collections.get_selectedItem().value.id,f=c.h[d].assets.h;f=Object.keys(f);for(var g=f.length,h=0;h<g;){var n=f[h++];c=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;c.h[d].assets.h[n].order=
b;++b}var l=this.ui.lists.h.assets.get_selectedItem().value.id,q=new G;b=0;c=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;f=c.h[d].assets.h;f=Object.keys(f);g=f.length;for(h=0;h<g;)n=f[h++],n!=l&&(c=this._collections,d=this.ui.lists.h.collections.get_selectedItem().value.id,q.h[n]=c.h[d].assets.h[n]),b==a+1&&(c=this._collections,d=this.ui.lists.h.collections.get_selectedItem().value.id,q.h[l]=c.h[d].assets.h[l]),++b;b=0;f=q.h;f=Object.keys(f);g=f.length;for(h=0;h<g;)n=
f[h++],q.h[n].order=b,++b;c=this._collections;d=this.ui.lists.h.collections.get_selectedItem().value.id;c.h[d].assets=q;this.onColChange();this.ui.lists.h.assets.set_selectedIndex(a+1);this.ui.lists.h.assets.get_dataProvider().updateAt(this.ui.lists.h.assets.get_selectedIndex());this._changed=!0}},onNewAsset:function(a){if(this.ui.lists.h.collections.get_selectedItem()!=null){a=this._ac;var b=new G,c=this.ui.selects.h.assetadd.get_selectedItem().value;b.h.type=c;a("newasset",b)}},onAssetProp:function(a){if(this.ui.lists.h.assets.get_selectedItem()!=
null){this._curast={uid:this.ui.lists.h.assets.get_selectedItem().value.uid,id:this.ui.lists.h.assets.get_selectedItem().value.id,order:this.ui.lists.h.assets.get_selectedItem().value.order,time:this.ui.lists.h.assets.get_selectedItem().value.time,name:this.ui.lists.h.assets.get_selectedItem().value.name,type:this.ui.lists.h.assets.get_selectedItem().value.type,frames:this.ui.lists.h.assets.get_selectedItem().value.frames,frtime:this.ui.lists.h.assets.get_selectedItem().value.frtime,file1:this.ui.lists.h.assets.get_selectedItem().value.file1,
file2:this.ui.lists.h.assets.get_selectedItem().value.file2,file3:this.ui.lists.h.assets.get_selectedItem().value.file3,file4:this.ui.lists.h.assets.get_selectedItem().value.file4,file5:this.ui.lists.h.assets.get_selectedItem().value.file5,action:this.ui.lists.h.assets.get_selectedItem().value.action};this._head.set_text(k.ln.get("menu-media-"+H.string(this.ui.lists.h.assets.get_selectedItem().value.type)));this.ui.inputs.h.assetname.set_text(this.ui.lists.h.assets.get_selectedItem().value.name);
this.ui.inputs.h["file@1"].set_text(this.ui.lists.h.assets.get_selectedItem().value.file1);this.ui.inputs.h["file@2"].set_text(this.ui.lists.h.assets.get_selectedItem().value.file2);this.ui.inputs.h["file@3"].set_text(this.ui.lists.h.assets.get_selectedItem().value.file3);this.ui.inputs.h["file@4"].set_text(this.ui.lists.h.assets.get_selectedItem().value.file4);this.ui.inputs.h["file@5"].set_text(this.ui.lists.h.assets.get_selectedItem().value.file5);this.ui.numerics.h.asttime.set_value(this.ui.lists.h.assets.get_selectedItem().value.time);
this.ui.numerics.h.astsmapnum.set_value(this.ui.lists.h.assets.get_selectedItem().value.frames);this.ui.numerics.h.astsmaptime.set_value(this.ui.lists.h.assets.get_selectedItem().value.frtime);switch(this.ui.lists.h.assets.get_selectedItem().value.action){case "":this.ui.setSelectValue("assetac","loop");break;case "loop":this.ui.setSelectValue("assetac","loop");break;case "next":this.ui.setSelectValue("assetac","next");break;case "previous":this.ui.setSelectValue("assetac","previous");break;case "stop":this.ui.setSelectValue("assetac",
"stop");break;default:this.ui.setSelectValue("assetac","action")}this.ui.containers.h.media.removeChildren();this.ui.lists.h.assets.get_selectedItem().value.type=="shape"?(this.ui.containers.h.media.addChild(this.ui.containers.h.shape),this.ui.containers.h.shape.removeChildren(),this._shape.set_visible(!1),this._shape.load(this.ui.lists.h.assets.get_selectedItem().value.file1)):this.ui.lists.h.assets.get_selectedItem().value.type=="paragraph"||this.ui.lists.h.assets.get_selectedItem().value.type==
"text"?(this.ui.containers.h.media.addChild(this.ui.containers.h.assettext),this.ui.tareas.h.assettext.set_text(this.ui.lists.h.assets.get_selectedItem().value.file1)):this.ui.containers.h.media.addChild(this.ui.containers.h.file);this._forms.removeChild(this._colint);this._forms.addChild(this._astint)}},onShapeShow:function(a){a?(this._shape.set_height(100),this._shape.set_width(this._shape.oWidth*(this._shape.get_height()/this._shape.oHeight)),this._shape.set_y(0),this.ui.containers.h.shape.addChild(this._shape),
this.ui.containers.h.shape.addChild(this.ui.buttons.h.shape),this._shape.set_visible(!0),this._shape.set_x((960-this._shape.get_width())/2),this.ui.buttons.h.shape.set_y(this._shape.get_height()+30)):this._shape.set_visible(!1)},onFile1:function(a){a=this._ac;var b=new G;b.h.type=this._curast.type;var c=this.ui.lists.h.assets.get_selectedItem().value.file1;b.h.current=c;b.h.num="1";a("file",b)},onFile2:function(a){a=this._ac;var b=new G;b.h.type=this._curast.type;var c=this.ui.lists.h.assets.get_selectedItem().value.file2;
b.h.current=c;b.h.num="2";a("file",b)},onFile3:function(a){a=this._ac;var b=new G;b.h.type=this._curast.type;var c=this.ui.lists.h.assets.get_selectedItem().value.file3;b.h.current=c;b.h.num="3";a("file",b)},onFile4:function(a){a=this._ac;var b=new G;b.h.type=this._curast.type;var c=this.ui.lists.h.assets.get_selectedItem().value.file4;b.h.current=c;b.h.num="4";a("file",b)},onFile5:function(a){a=this._ac;var b=new G;b.h.type=this._curast.type;var c=this.ui.lists.h.assets.get_selectedItem().value.file5;
b.h.current=c;b.h.num="5";a("file",b)},onEndActions:function(a){switch(this._curast.action){case "":a="";break;case "loop":a="";break;case "next":a="";break;case "previous":a="";break;case "stop":a="";break;default:a=this._curast.action}k.showActionWindow(a,m(this,this.onAcOk))},onAcOk:function(a){a==""?(this._curast.action="loop",this.ui.setSelectValue("assetac","loop")):(this._curast.action=a,this.ui.setSelectValue("assetac","action"))},onAssetCancel:function(a){this._curast=null;this._forms.removeChild(this._astint);
this._forms.addChild(this._colint)},onAssetOk:function(a){if(this.ui.inputs.h.assetname.get_text().length<3)k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-astnameer"),320,180,k.ln.get("default-ok"));else if(this.ui.numerics.h.asttime.get_value()<1)k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-asttimeer"),320,180,k.ln.get("default-ok"));else if(this.ui.numerics.h.astsmapnum.get_value()<1)k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-astframeser"),
320,180,k.ln.get("default-ok"));else if(this.ui.numerics.h.astsmaptime.get_value()<50)k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-astfrtimeser"),320,180,k.ln.get("default-ok"));else if(this.ui.inputs.h["file@1"].get_text()==""||this.ui.inputs.h["file@2"].get_text()==""||this.ui.inputs.h["file@3"].get_text()==""||this.ui.inputs.h["file@4"].get_text()==""||this.ui.inputs.h["file@5"].get_text()=="")k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-astfileser"),
320,180,k.ln.get("default-ok"));else{a={uid:this._curast.uid,id:this._curast.id,order:this._curast.order,name:this.ui.inputs.h.assetname.get_text(),type:this._curast.type,time:Math.round(this.ui.numerics.h.asttime.get_value()),frames:Math.round(this.ui.numerics.h.astsmapnum.get_value()),frtime:Math.round(this.ui.numerics.h.astsmaptime.get_value()),file1:this.ui.inputs.h["file@1"].get_text(),file2:this.ui.inputs.h["file@2"].get_text(),file3:this.ui.inputs.h["file@3"].get_text(),file4:this.ui.inputs.h["file@4"].get_text(),
file5:this.ui.inputs.h["file@5"].get_text(),action:""};switch(this.ui.selects.h.assetac.get_selectedItem().value){case "action":a.action=this._curast.action;break;case "loop":a.action="loop";break;case "next":a.action="next";break;case "previous":a.action="previous";break;case "stop":a.action="stop"}this.ui.lists.h.assets.get_selectedItem().value=a;this.ui.lists.h.assets.get_selectedItem().text=a.name;var b=this._collections,c=this.ui.lists.h.collections.get_selectedItem().value.id;b.h[c].assets.h[a.id]=
a;this._curast=null;this._forms.removeChild(this._astint);this._forms.addChild(this._colint);this._changed=!0}},createFileInput:function(a,b){this.ui.createHContainer("at"+a);this.ui.createLabel("file@"+a,k.ln.get("window-collection-astfiles"+a),"",null,!1);this.ui.labels.h["file@"+a].set_width(25);this.ui.hcontainers.h["at"+a].addChild(this.ui.labels.h["file@"+a]);this.ui.createTInput("file@"+a,"","",null,!1);this.ui.inputs.h["file@"+a].set_width(875);this.ui.inputs.h["file@"+a].set_enabled(!1);
this.ui.hcontainers.h["at"+a].addChild(this.ui.inputs.h["file@"+a]);this.ui.createIconButton("file@"+a,b,new Ma(Z.getBitmapData("btOpenfile")),null,null,!1);this.ui.buttons.h["file@"+a].set_width(50);this.ui.hcontainers.h["at"+a].addChild(this.ui.buttons.h["file@"+a]);this.ui.hcontainers.h["at"+a].setWidth(960,[50,820,70]);return this.ui.hcontainers.h["at"+a]},onApply:function(a){this.onUpdateCol(null)&&(this._changed?k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-colapplyok"),
320,220,k.ln.get("default-ok"),m(this,this.onApplySure),"confirm",k.ln.get("default-cancel")):Aa.removePopUp(this))},onNoApply:function(a){this._changed?k.showPopup(k.ln.get("window-collection-title"),k.ln.get("window-collection-colapplyno"),320,220,k.ln.get("default-ok"),m(this,this.onApplyNo),"confirm",k.ln.get("default-cancel")):Aa.removePopUp(this)},onApplySure:function(a){a&&(this.updateScene(),Aa.removePopUp(this))},onApplyNo:function(a){a&&Aa.removePopUp(this)},updateScene:function(){for(var a=
this._collections.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=b[d++];if(Object.prototype.hasOwnProperty.call(p.movie.collections.h,f)){p.movie.collections.h[f].name=this._collections.h[f].collection.title;p.movie.collections.h[f].transition=this._collections.h[f].collection.transition;p.movie.collections.h[f].time=this._collections.h[f].collection.time;p.movie.collections.h[f].assets=new G;var g=[],h=0;a=this._collections.h[f].assets.h;a=Object.keys(a);for(var n=a.length,l=0;l<n;){var q=a[l++];
this._collections.h[f].assets.h[q].order=h;g.push(q);var u=p.movie.collections.h[f].assets,v=new Gj({order:this._collections.h[f].assets.h[q].order,name:this._collections.h[f].assets.h[q].name,type:this._collections.h[f].assets.h[q].type,time:this._collections.h[f].assets.h[q].time,action:this._collections.h[f].assets.h[q].action,frames:this._collections.h[f].assets.h[q].frames,frtime:this._collections.h[f].assets.h[q].frtime,file:{"@1":this._collections.h[f].assets.h[q].file1,"@2":this._collections.h[f].assets.h[q].file2,
"@3":this._collections.h[f].assets.h[q].file3,"@4":this._collections.h[f].assets.h[q].file4,"@5":this._collections.h[f].assets.h[q].file5}});u.h[q]=v;++h}p.movie.collections.h[f].assetOrder=g;p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf())}}},__class__:Nr});var Or=function(a){ea.call(this,a,k.ln.get("window-collectionadd-title"),1E3,Bc.pickValue(600,620),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollectionsAdd"]=Or;Or.__name__="com.tilbuci.ui.window.media.WindowCollectionsAdd";
Or.__super__=ea;Or.prototype=I(ea.prototype,{_colint:null,startInterface:function(a){var b=a=this.ui,c={tp:"Label",id:"scene",tx:k.ln.get("window-collectionadd-colscene"),vr:ia.VARIANT_DETAIL},d=k.ln.get("window-collectionadd-cols"),f=b.forge("leftcol",[c,{tp:"List",id:"scene",vl:[],ht:235,sl:null,ch:m(this,this.onSceneChange)},{tp:"Label",id:"collections",tx:d,vr:ia.VARIANT_DETAIL},{tp:"List",id:"collections",vl:[],ht:235,sl:null,ch:m(this,this.onColChange)}]);b=this.ui;c={tp:"Label",id:"assets",
tx:k.ln.get("window-collection-assets"),vr:ia.VARIANT_DETAIL};d=k.ln.get("window-collection-assetstagenew");this._colint=a.createColumnHolder("columns",f,b.forge("rightcol",[c,{tp:"List",id:"assets",vl:[],ht:470,sl:null},{tp:"Button",id:"assetstage",tx:d,ac:m(this,this.onAssetAdd)}]));this.addForm(k.ln.get("window-media-file"),this._colint);this.ui.setListToIcon("scene");this.ui.setListToIcon("collections");this.ui.setListToIcon("assets");this.ui.listDbClick("assets",m(this,this.onAssetAdd));ea.prototype.startInterface.call(this)},
acStart:function(){this.loadCollections()},loadCollections:function(){this.ui.lists.h.scene.set_alpha(1);this.ui.lists.h.collections.set_alpha(1);this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("assets",[]);this.ui.lists.h.scene.set_selectedItem(null);for(var a=[],b=Object.keys(p.movie.collections.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:p.movie.collections.h[f].name,value:f,user:p.movie.collections.h[f].assetOrder.length+" "+k.ln.get("window-collection-numassets")})}this.ui.setListValues("scene",
a);this.ui.lists.h.collections.set_selectedItem(null);this.ui.setListValues("collections",[]);a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;a.send("Media/ListCollections",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){a=b.map.h.list;b=[];for(var c=0;c<a.length;){var d=a[c];++c;p.movie.scene.collections.indexOf(d.id)==-1&&b.push({text:d.title,value:d,user:d.num+" "+k.ln.get("window-collection-numassets")})}this.ui.setListValues("collections",b)}else this.ui.createWarning(k.ln.get("window-collection-title"),
k.ln.get("window-collection-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-collection-title"),k.ln.get("window-collection-nolist"),300,180,this.stage),Aa.removePopUp(this)},onColChange:function(a){this.ui.lists.h.scene.set_alpha(.75);this.ui.lists.h.collections.set_alpha(1);this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("assets",[]);if(this.ui.lists.h.collections.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.lists.h.collections.get_selectedItem().value.uid;
b.h.uid=c;a.send("Media/ListColAssets",b,m(this,this.onAssetList))}},onSceneChange:function(a){this.ui.lists.h.scene.set_alpha(1);this.ui.lists.h.collections.set_alpha(.75);this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("assets",[]);if(this.ui.lists.h.scene.get_selectedItem()!=null){a=[];for(var b=0,c=p.movie.collections,d=this.ui.lists.h.scene.get_selectedItem().value,f=c.h[d].assetOrder;b<f.length;){var g=f[b];++b;c=p.movie.collections;d=this.ui.lists.h.scene.get_selectedItem().value;
c=c.h[d].assets.h[g].name;d=k.ln;var h=p.movie.collections,n=this.ui.lists.h.scene.get_selectedItem().value;a.push({text:c,user:d.get("menu-media-"+h.h[n].assets.h[g].type),value:{c:"s",v:g}})}this.ui.setListValues("assets",a)}},onAssetList:function(a,b){if(a)if(b.map.h.e==0){a=b.map.h.list;b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d.name,user:k.ln.get("menu-media-"+d.type),value:{c:"m",v:d}})}this.ui.setListValues("assets",b)}else this.ui.createWarning(k.ln.get("window-collection-title"),
k.ln.get("window-collection-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-collection-title"),k.ln.get("window-collection-nolist"),300,180,this.stage),Aa.removePopUp(this)},onAssetAdd:function(a){if(this.ui.lists.h.assets.get_selectedItem()!=null){if(this.ui.lists.h.assets.get_selectedItem().value.c=="s"){var b=this._ac;a=new G;var c=this.ui.lists.h.scene.get_selectedItem().value;a.h.collection=c;c=this.ui.lists.h.assets.get_selectedItem().value.v}else{c=
this.ui.lists.h.collections.get_selectedItem().value;b=new xg(c.id,null,!1);b.name=c.title;b.transition=c.transition;b.time=c.time;a=0;for(var d=this.ui.lists.h.assets.get_dataProvider().get_length();a<d;){var f=a++;f=this.ui.lists.h.assets.get_dataProvider().get(f).value.v;var g=b.assets,h=f.id,n=new Gj({order:f.order,name:f.name,type:f.type,time:f.time,action:f.action,frames:f.frames,frtime:f.frtime,file:{"@1":f.file1,"@2":f.file2,"@3":f.file3,"@4":f.file4,"@5":f.file5}});g.h[h]=n;b.assetOrder.push(f.id)}b.ok=
!0;p.movie.collections.h[c.id]=b;p.movie.scene.collections.push(c.id);b=this._ac;a=new G;a.h.collection=c.id;c=this.ui.lists.h.assets.get_selectedItem().value.v.id}a.h.asset=c;b("addinstance",a);Aa.removePopUp(this)}},__class__:Or});var Pr=function(a){ea.call(this,a,k.ln.get("window-collectionrm-title"),1E3,Bc.pickValue(590,610),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollectionsRm"]=Pr;Pr.__name__="com.tilbuci.ui.window.media.WindowCollectionsRm";Pr.__super__=ea;Pr.prototype=I(ea.prototype,
{_colint:null,startInterface:function(a){var b=a=this.ui,c={tp:"Label",id:"collections",tx:k.ln.get("window-collectionrm-cols"),vr:ia.VARIANT_DETAIL},d=k.ln.get("window-collectionrm-colsabout"),f=b.forge("leftcol",[c,{tp:"List",id:"collections",vl:[],ht:470,sl:null,ch:m(this,this.onColChange)},{tp:"Label",id:"assets",tx:d,vr:ia.VARIANT_DETAIL}]);b=this.ui;c={tp:"Label",id:"assets",tx:k.ln.get("window-collection-assets"),vr:ia.VARIANT_DETAIL};d=k.ln.get("window-collection-remove");this._colint=a.createColumnHolder("columns",
f,b.forge("rightcol",[c,{tp:"List",id:"assets",vl:[],ht:470,sl:null},{tp:"Button",id:"assetstage",tx:d,ac:m(this,this.onColRemove)}]));this.addForm(k.ln.get("window-media-file"),this._colint);this.ui.setListToIcon("collections");this.ui.setListToIcon("assets");ea.prototype.startInterface.call(this)},acStart:function(){this.loadCollections()},loadCollections:function(){this.ui.lists.h.collections.set_selectedItem(null);this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("collections",
[]);this.ui.setListValues("assets",[]);var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Media/ListRmCollections",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){a=b.map.h.list;b=[];for(var c=0;c<a.length;){var d=a[c];++c;p.movie.scene.collections.indexOf(d.id)==-1&&b.push({text:d.title,value:d,user:d.num+" "+k.ln.get("window-collection-numassets")})}this.ui.setListValues("collections",b)}else this.ui.createWarning(k.ln.get("window-collection-title"),k.ln.get("window-collection-nolist"),
300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-collection-title"),k.ln.get("window-collection-nolist"),300,180,this.stage),Aa.removePopUp(this)},onColChange:function(a){this.ui.lists.h.assets.set_selectedItem(null);this.ui.setListValues("assets",[]);if(this.ui.lists.h.collections.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.lists.h.collections.get_selectedItem().value.uid;b.h.uid=c;a.send("Media/ListColAssets",b,m(this,this.onAssetList))}},onAssetList:function(a,
b){if(a)if(b.map.h.e==0){a=b.map.h.list;b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d.name,user:k.ln.get("menu-media-"+d.type),value:d})}this.ui.setListValues("assets",b)}else this.ui.createWarning(k.ln.get("window-collection-title"),k.ln.get("window-collection-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-collection-title"),k.ln.get("window-collection-nolist"),300,180,this.stage),Aa.removePopUp(this)},onColRemove:function(a){this.ui.lists.h.collections.get_selectedItem()!=
null&&k.showPopup(k.ln.get("window-collectionrm-title"),k.ln.get("window-collectionrm-confirm"),320,220,k.ln.get("default-ok"),m(this,this.onColRemoveConfirm),"confirm",k.ln.get("default-cancel"))},onColRemoveConfirm:function(a){if(a&&this.ui.lists.h.collections.get_selectedItem()!=null){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=this.ui.lists.h.collections.get_selectedItem().value.id;b.h.col=c;a.send("Media/RemoveCollection",b,m(this,this.onRemoveReturn))}},onRemoveReturn:function(a,b){this.loadCollections()},
__class__:Pr});var cd=function(a,b,c,d){this._frtime=100;this._frames=1;this._filenum="1";ea.call(this,a,b,1E3,Bc.pickValue(685,695),!1,!0,!0);this._type=c;this._mode=d;this._preview=new ht(c,460,460)};t["com.tilbuci.ui.window.media.WindowMediaBase"]=cd;cd.__name__="com.tilbuci.ui.window.media.WindowMediaBase";cd.__super__=ea;cd.prototype=I(ea.prototype,{_type:null,_path:null,_preview:null,_mode:null,_filenum:null,_frames:null,_frtime:null,startInterface:function(a){if(this._type!="shape"&&this._type!=
"paragraph"&&this._type!="text"){a=this.ui.createHContainer("newfolder");a.addChild(this.ui.createTInput("newfolder","","",null,!1));a.addChild(this.ui.createButton("newfolder",k.ln.get("window-media-newfolder"),m(this,this.onNewFolder),null,!1));a.setWidth(960);this.ui.createHContainer("colselect");this.ui.createLabel("colname",k.ln.get("window-media-colname"),"",this.ui.hcontainers.h.colselect);this.ui.createSelect("addtocol",[],null,this.ui.hcontainers.h.colselect);this.ui.createToggle("close",
!0,this.ui.hcontainers.h.colselect);this.ui.createLabel("close",k.ln.get("window-media-closeafter"),"",this.ui.hcontainers.h.colselect);this.ui.createHContainer("addtocol");this.ui.createButton("addcolast",k.ln.get("window-media-addcolast"),m(this,this.onAddAsset),this.ui.hcontainers.h.addtocol);this.ui.createButton("addtocol",k.ln.get("window-media-addtocol"),m(this,this.onAddToCol),this.ui.hcontainers.h.addtocol);this.ui.createToggle("multiple",!0,this.ui.hcontainers.h.addtocol,m(this,this.onMultiple));
this.ui.createLabel("multiple",k.ln.get("window-media-multiple"),"",this.ui.hcontainers.h.addtocol);this.ui.hcontainers.h.addtocol.setWidth(460);var b=k.ln.get("window-media-file"),c=this.ui,d=this.ui.forge("leftcol",[{tp:"Label",id:"filestitle",tx:k.ln.get("window-media-file"),vr:ia.VARIANT_DETAIL},{tp:"List",id:"fileslist",vl:[],ht:350,sl:null},{tp:"Button",id:"btadd",tx:"",ac:m(this,this.onOpen)},{tp:"Spacer",id:"colselect",ht:5,ln:!0},{tp:"Custom",cont:this.ui.hcontainers.h.colselect},{tp:"Custom",
cont:this.ui.hcontainers.h.addtocol}]),f=this.ui.forge("rightcol",[{tp:"Custom",cont:this._preview}]),g=this.ui,h={tp:"Button",id:"btupload",tx:k.ln.get("window-media-upload"),ac:m(this,this.onUpload)},n=k.ln.get("window-media-uploadzip");this.addForm(b,c.createColumnHolder("columns",d,f,g.forge("bottom",[{tp:"Custom",cont:a},{tp:"Button",id:"btremove",tx:"",ac:m(this,this.onRemove)},h,{tp:"Button",id:"btuploadzip",tx:n,ac:m(this,this.onUploadZip)}]),505));this.ui.setListToIcon("fileslist");this.ui.listChange("fileslist",
m(this,this.onChange));this.ui.listDbClick("fileslist",m(this,this.onDoubleClick))}ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},action:function(a,b){a=="setmode"&&(b.h.mode=="asset"?(this._mode="asset",this._filenum=b.h.num):b.h.mode=="assetsingle"?(this._mode="assetsingle",this._filenum=b.h.num):this._mode=b.h.mode=="newasset"?"newasset":b.h.mode=="single"?"single":"simple")},acStart:function(){this._path="";this._mode="simple";this.loadPath();this.ui.spacers.h.colselect.set_alpha(0);
this.ui.hcontainers.h.addtocol.set_visible(!1);this.ui.hcontainers.h.addtocol.setWidth(460,[125,165,40,100]);this.ui.hcontainers.h.colselect.set_visible(!1);this.ui.hcontainers.h.colselect.setWidth(460,[80,210,40,100]);this.ui.toggles.h.multiple.set_selected(!1);this.ui.lists.h.fileslist.set_allowMultipleSelection(!1);for(var a=[],b=Object.keys(p.movie.collections.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:p.movie.collections.h[f].name,value:f})}this.ui.setSelectOptions("addtocol",a)},onMultiple:function(a){this.ui.lists.h.fileslist.set_allowMultipleSelection(this.ui.toggles.h.multiple.get_selected());
this.ui.setListSelectValue("fileslist",null)},loadPath:function(){this.ui.setListValues("fileslist",[]);this.ui.labels.h.filestitle.set_text(k.ln.get("window-media-wait"));this.ui.buttons.h.btadd.set_text("");this.ui.buttons.h.btadd.set_enabled(!1);this.ui.buttons.h.btadd.set_visible(!1);this.ui.buttons.h.btremove.set_enabled(!1);this.ui.buttons.h.btremove.set_visible(!1);this._preview.hide();var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type=this._type;b.h.path=this._path;a.send("Media/List",
b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){a=[];this._path!=""&&a.push({text:k.ln.get("window-media-uplevel"),value:k.ln.get("window-media-uplevel"),type:"up",asset:"iconUpLevel"});for(var c=0,d=y.fields(b.map.h.list);c<d.length;){var f=d[c];++c;y.field(y.field(b.map.h.list,f),"t")=="d"?a.push({text:y.field(y.field(b.map.h.list,f),"n"),value:y.field(y.field(b.map.h.list,f),"n"),type:"d",asset:"iconFolder"}):a.push({text:y.field(y.field(b.map.h.list,f),"n"),value:y.field(y.field(b.map.h.list,
f),"n"),type:"f",asset:""})}this.ui.setListValues("fileslist",a);this.ui.labels.h.filestitle.set_text("/"+this._path)}else this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-nolist"),300,180,this.stage),Aa.removePopUp(this)},onAddToCol:function(a){if(this.ui.toggles.h.multiple.get_selected()&&this.ui.selects.h.addtocol.get_selectedItem()!=null&&
this.ui.lists.h.fileslist.get_selectedItems().length>0){a=[];for(var b=0,c=this.ui.lists.h.fileslist.get_selectedItems();b<c.length;){var d=c[b];++b;d.type=="f"&&a.unshift(d)}if(a.length>0){for(b=0;b<a.length;){d=a[b];++b;var f=this._ac;c=new G;c.h.stage="true";var g=this.ui.selects.h.addtocol.get_selectedItem().value;c.h.col=g;c.h.path=this._path;c.h.type=this._type;c.h.file=d.text;c.h.frames=H.string(this._frames);c.h.frtime=H.string(this._frtime);f("addtocol",c)}this.ui.toggles.h.close.get_selected()?
Aa.removePopUp(this):this.ui.setListSelectValue("fileslist",null)}for(;a.length>0;)a.shift()}else this.ui.lists.h.fileslist.get_selectedItem()!=null&&this.ui.selects.h.addtocol.get_selectedItem()!=null&&this.ui.lists.h.fileslist.get_selectedItem().type=="f"&&(f=this._ac,b=new G,b.h.stage="true",g=this.ui.selects.h.addtocol.get_selectedItem().value,b.h.col=g,b.h.path=this._path,b.h.type=this._type,g=this.ui.lists.h.fileslist.get_selectedItem().text,b.h.file=g,b.h.frames=H.string(this._frames),b.h.frtime=
H.string(this._frtime),f("addtocol",b),this.ui.toggles.h.close.get_selected()?Aa.removePopUp(this):(this.ui.lists.h.fileslist.set_selectedIndex(-1),this.ui.buttons.h.btadd.set_enabled(!1),this.ui.buttons.h.btadd.set_visible(!1),this.ui.buttons.h.btremove.set_enabled(!1),this.ui.buttons.h.btremove.set_visible(!1),this._preview.hide(),this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.hcontainers.h.colselect.set_visible(!1),this.ui.spacers.h.colselect.set_alpha(0),k.showMsg(k.ln.get("window-media-addedstage"))))},
onAddAsset:function(a){if(this.ui.toggles.h.multiple.get_selected()&&this.ui.selects.h.addtocol.get_selectedItem()!=null&&this.ui.lists.h.fileslist.get_selectedItems().length>0){a=[];for(var b=0,c=this.ui.lists.h.fileslist.get_selectedItems();b<c.length;){var d=c[b];++b;d.type=="f"&&a.unshift(d)}if(a.length>0){for(b=0;b<a.length;){d=a[b];++b;var f=this._ac;c=new G;c.h.stage="false";var g=this.ui.selects.h.addtocol.get_selectedItem().value;c.h.col=g;c.h.path=this._path;c.h.type=this._type;c.h.file=
d.text;c.h.frames=H.string(this._frames);c.h.frtime=H.string(this._frtime);f("addtocol",c)}this.ui.toggles.h.close.get_selected()?Aa.removePopUp(this):this.ui.setListSelectValue("fileslist",null)}for(;a.length>0;)a.shift()}else this.ui.lists.h.fileslist.get_selectedItem()!=null&&this.ui.selects.h.addtocol.get_selectedItem()!=null&&this.ui.lists.h.fileslist.get_selectedItem().type=="f"&&(f=this._ac,b=new G,b.h.stage="false",g=this.ui.selects.h.addtocol.get_selectedItem().value,b.h.col=g,b.h.path=this._path,
b.h.type=this._type,g=this.ui.lists.h.fileslist.get_selectedItem().text,b.h.file=g,b.h.frames=H.string(this._frames),b.h.frtime=H.string(this._frtime),f("addtocol",b),this.ui.toggles.h.close.get_selected()?Aa.removePopUp(this):(this.ui.lists.h.fileslist.set_selectedIndex(-1),this.ui.buttons.h.btadd.set_enabled(!1),this.ui.buttons.h.btadd.set_visible(!1),this.ui.buttons.h.btremove.set_enabled(!1),this.ui.buttons.h.btremove.set_visible(!1),this._preview.hide(),this.ui.hcontainers.h.addtocol.set_visible(!1),
this.ui.hcontainers.h.colselect.set_visible(!1),this.ui.spacers.h.colselect.set_alpha(0),k.showMsg(k.ln.get("window-media-addedcol"))))},onOpen:function(a){if(this.ui.toggles.h.multiple.get_selected())this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-nomultiple"),300,180,this.stage);else if(this._preview.onStop(null),this.ui.lists.h.fileslist.get_selectedItem().type=="d")this._path+=H.string(this.ui.lists.h.fileslist.get_selectedItem().text)+"/",this.loadPath();else if(this.ui.lists.h.fileslist.get_selectedItem().type==
"up"){var b=this._path.split("/");this._path="";if(b.length>1){a=0;for(var c=b.length-2;a<c;){var d=a++;b[d]!=""&&(this._path+=b[d]+"/")}}this.loadPath()}else this.ui.lists.h.fileslist.get_selectedItem().type=="f"&&(this._mode=="asset"?(this._mode="simple",b=this._ac,a=new G,a.h.path=this._path,a.h.type=this._type,c=this.ui.lists.h.fileslist.get_selectedItem().text,a.h.file=c,a.h.frames=H.string(this._frames),a.h.frtime=H.string(this._frtime),a.h.num=this._filenum,b("addasset",a)):this._mode=="assetsingle"?
(this._mode="simple",b=this._ac,a=new G,a.h.path=this._path,a.h.type=this._type,c=this.ui.lists.h.fileslist.get_selectedItem().text,a.h.file=c,a.h.frames=H.string(this._frames),a.h.frtime=H.string(this._frtime),a.h.num=this._filenum,b("assetsingle",a)):this._mode=="newasset"?(this._mode="simple",b=this._ac,a=new G,a.h.path=this._path,a.h.type=this._type,c=this.ui.lists.h.fileslist.get_selectedItem().text,a.h.file=c,a.h.frames=H.string(this._frames),a.h.frtime=H.string(this._frtime),b("addnewasset",
a)):this._mode=="single"?(this._mode="single",b=this._ac,a=new G,a.h.path=this._path,a.h.type=this._type,c=this.ui.lists.h.fileslist.get_selectedItem().text,a.h.file=c,a.h.frames=H.string(this._frames),a.h.frtime=H.string(this._frtime),b("single",a)):(b=this._ac,a=new G,a.h.path=this._path,a.h.type=this._type,c=this.ui.lists.h.fileslist.get_selectedItem().text,a.h.file=c,a.h.frames=H.string(this._frames),a.h.frtime=H.string(this._frtime),b("addstage",a)),Aa.removePopUp(this))},onDoubleClick:function(a){this.onOpen(null)},
onChange:function(a){this.ui.lists.h.fileslist.get_selectedItem()!=null&&(this.ui.lists.h.fileslist.get_selectedItem().type=="d"?(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-openfolder")),this.ui.buttons.h.btremove.set_enabled(!0),this.ui.buttons.h.btremove.set_visible(!0),this.ui.buttons.h.btremove.set_text(k.ln.get("window-media-removedir")),this._preview.hide(),this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.hcontainers.h.colselect.set_visible(!1),this.ui.spacers.h.colselect.set_alpha(0)):
this.ui.lists.h.fileslist.get_selectedItem().type=="up"?(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-uplevel")),this.ui.buttons.h.btremove.set_enabled(!1),this.ui.buttons.h.btremove.set_visible(!1),this._preview.hide(),this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.hcontainers.h.colselect.set_visible(!1),this.ui.spacers.h.colselect.set_alpha(0)):(this._mode=="asset"?(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addcol")+" @"+this._filenum),this.ui.hcontainers.h.addtocol.set_visible(!1),
this.ui.hcontainers.h.colselect.set_visible(!1),this.ui.spacers.h.colselect.set_alpha(0)):this._mode=="newasset"?(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addast")),this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.hcontainers.h.colselect.set_visible(!1),this.ui.spacers.h.colselect.set_alpha(0)):this._mode=="single"?(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addsingle")),this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.hcontainers.h.colselect.set_visible(!1),
this.ui.spacers.h.colselect.set_alpha(0)):this._mode=="assetsingle"?(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addsingle")),this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.hcontainers.h.colselect.set_visible(!1),this.ui.spacers.h.colselect.set_alpha(0)):(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addstage")),this.ui.selects.h.addtocol.get_dataProvider().get_length()>0&&(this.ui.hcontainers.h.colselect.set_visible(this.ui.hcontainers.h.addtocol.set_visible(!0)),this.ui.spacers.h.colselect.set_alpha(100))),
this.ui.buttons.h.btremove.set_enabled(!0),this.ui.buttons.h.btremove.set_visible(!0),this.ui.buttons.h.btremove.set_text(k.ln.get("window-media-removefile")),this._preview.preview(k.econfig.get_player()+"movie/"+p.movie.get_mvId()+".movie/media/"+this._type+"/"+this._path+H.string(this.ui.lists.h.fileslist.get_selectedItem().text))),this.ui.buttons.h.btadd.set_enabled(!0),this.ui.buttons.h.btadd.set_visible(!0))},onNewFolder:function(a){this._preview.onStop(null);if(this.ui.inputs.h.newfolder.get_text()==
"")this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-newfoldernoname"),300,180,this.stage);else{this.ui.setListValues("fileslist",[]);this.ui.labels.h.filestitle.set_text(k.ln.get("window-media-wait"));this.ui.buttons.h.btadd.set_text("");this.ui.buttons.h.btadd.set_enabled(!1);this.ui.buttons.h.btadd.set_visible(!1);this.ui.buttons.h.btremove.set_enabled(!1);this.ui.buttons.h.btremove.set_visible(!1);this._preview.hide();a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=
c;b.h.type=this._type;b.h.path=this._path;c=this.ui.inputs.h.newfolder.get_text();b.h.name=c;a.send("Media/NewFolder",b,m(this,this.onNewFolderReturn));this.ui.inputs.h.newfolder.set_text("")}this.ui.hcontainers.h.addtocol.set_visible(!1);this.ui.hcontainers.h.colselect.set_visible(!1);this.ui.spacers.h.colselect.set_alpha(0)},onNewFolderReturn:function(a,b){if(a)if(b.map.h.e==0)this.onList(a,b);else this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-newfolderer"),300,180,
this.stage);else this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-newfolderer"),300,180,this.stage)},onRemove:function(a){this._preview.onStop(null);this.ui.createConfirm(k.ln.get("window-media-title"),k.ln.get("window-media-removewarn"),400,220,m(this,this.onRealRemove),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRealRemove:function(a){if(a){if(this.ui.lists.h.fileslist.get_selectedItem().type=="d"){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=
c;b.h.type=this._type;b.h.path=this._path;c=this.ui.lists.h.fileslist.get_selectedItem().text;b.h.name=c;a.send("Media/DeleteFolder",b,m(this,this.onRemoveFolder))}else this.ui.lists.h.fileslist.get_selectedItem().type=="f"&&(a=k.ws,b=new G,c=p.movie.get_mvId(),b.h.movie=c,b.h.type=this._type,b.h.path=this._path,c=this.ui.lists.h.fileslist.get_selectedItem().text,b.h.name=c,a.send("Media/DeleteFile",b,m(this,this.onRemoveFile)));this.ui.hcontainers.h.addtocol.set_visible(!1);this.ui.hcontainers.h.colselect.set_visible(!1);
this.ui.spacers.h.colselect.set_alpha(0)}},onRemoveFolder:function(a,b){this._preview.onStop(null);a?b.map.h.e==0?this.loadPath():this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-removedirer"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-removedirer"),300,180,this.stage);this.ui.hcontainers.h.addtocol.set_visible(!1);this.ui.hcontainers.h.colselect.set_visible(!1);this.ui.spacers.h.colselect.set_alpha(0)},onRemoveFile:function(a,
b){this._preview.onStop(null);a?b.map.h.e==0?this.loadPath():this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-removefileer"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-removefileer"),300,180,this.stage)},onUpload:function(a){this._preview.onStop(null);k.up.browseForMedia(m(this,this.onFileSelcted),this._type);this.ui.hcontainers.h.addtocol.set_visible(!1);this.ui.hcontainers.h.colselect.set_visible(!1);this.ui.spacers.h.colselect.set_alpha(0)},
onUploadZip:function(a){this._preview.onStop(null);k.up.browseForMedia(m(this,this.onZipFileSelcted),"zip");this.ui.hcontainers.h.addtocol.set_visible(!1);this.ui.hcontainers.h.colselect.set_visible(!1);this.ui.spacers.h.colselect.set_alpha(0)},onFileSelcted:function(a){this._preview.onStop(null);if(a){a=k.up;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type=this._type;b.h.path=this._path;a.uploadMedia(m(this,this.onUploadReturn),b)}},onZipFileSelcted:function(a){this._preview.onStop(null);if(a){a=
k.up;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type="zip_"+this._type;b.h.path=this._path;a.uploadMedia(m(this,this.onUploadReturn),b)}},onUploadReturn:function(a,b){a?this.loadPath():this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-uploader"),300,180,this.stage)},__class__:cd});var Mr=function(a,b){cd.call(this,a,k.ln.get("window-mdaudio-title"),"audio",b)};t["com.tilbuci.ui.window.media.WindowMediaAudio"]=Mr;Mr.__name__="com.tilbuci.ui.window.media.WindowMediaAudio";
Mr.__super__=cd;Mr.prototype=I(cd.prototype,{startInterface:function(a){cd.prototype.startInterface.call(this)},kill:function(){cd.prototype.kill.call(this)},__class__:Mr});var Qr=function(a){ea.call(this,a,k.ln.get("window-mdembed-title"),1E3,Bc.pickValue(415,440),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowMediaEmbed"]=Qr;Qr.__name__="com.tilbuci.ui.window.media.WindowMediaEmbed";Qr.__super__=ea;Qr.prototype=I(ea.prototype,{startInterface:function(a){var b=a=this.ui,c={tp:"Label",id:"available",
tx:k.ln.get("window-mdembed-available"),vr:""},d={tp:"Button",id:"show",tx:k.ln.get("window-mdembed-show"),ac:m(this,this.onShow)},f=k.ln.get("window-mdembed-remove"),g=b.forge("left",[c,{tp:"List",id:"available",vl:[],sl:null,ht:260},d,{tp:"Button",id:"remove",tx:f,ac:m(this,this.onRemove)}]);b=this.ui;c={tp:"Label",id:"add",tx:k.ln.get("window-mdembed-add"),vr:""};d={tp:"Label",id:"addabout",tx:k.ln.get("window-mdembed-addabout"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"addname",tx:k.ln.get("window-mdembed-addname"),
vr:ia.VARIANT_DETAIL};var h=k.ln.get("window-mdembed-addselect");this.addForm("embed",a.createColumnHolder("embedcol",g,b.forge("right",[c,d,{tp:"Spacer",id:"addabout",ht:152,ln:!1},f,{tp:"TInput",id:"addname",vl:"",vr:""},{tp:"Button",id:"addselect",tx:h,ac:m(this,this.onSelectZip)}])));this.ui.labels.h.addabout.set_wordWrap(!0)},acStart:function(){this.loadList()},loadList:function(){this.ui.setListValues("available",[]);this.ui.inputs.h.addname.set_text("");var a=k.ws,b=new G,c=p.movie.get_mvId();
b.h.movie=c;a.send("Media/Embed",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0)if(a=b.map.h.list,a==null)k.showMsg(k.ln.get("window-mdembed-listerror"));else if(a.length==0)k.showMsg(k.ln.get("window-mdembed-listempty"));else{b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d,value:d})}this.ui.setListValues("available",b)}else k.showMsg(k.ln.get("window-mdembed-listerror"));else k.showMsg(k.ln.get("window-mdembed-listerror"))},onSelectZip:function(a){this.ui.inputs.h.addname.set_text(N.replace(this.ui.inputs.h.addname.get_text(),
" ",""));this.ui.inputs.h.addname.set_text(N.trim(this.ui.inputs.h.addname.get_text()));this.ui.inputs.h.addname.get_text().length<5?this.ui.createWarning(k.ln.get("window-mdembed-title"),k.ln.get("window-mdembed-smallname"),300,180,this.stage):k.up.browseForMedia(m(this,this.onFileSelected),"embed")},onFileSelected:function(a){if(a){a=k.up;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type="embed";c=this.ui.inputs.h.addname.get_text();b.h.path=c;a.uploadMedia(m(this,this.onUploadReturn),b)}},
onUploadReturn:function(a,b){if(a){a=k.ws;b=new G;var c=p.movie.get_mvId();b.h.movie=c;c=this.ui.inputs.h.addname.get_text();b.h.name=c;a.send("Media/EmbedImport",b,m(this,this.onZipReturn))}else this.ui.createWarning(k.ln.get("window-mdembed-title"),k.ln.get("window-mdembed-uperror"),320,180,this.stage)},onZipReturn:function(a,b){a?b.map.h.e==0?this.loadList():this.ui.createWarning(k.ln.get("window-mdembed-title"),k.ln.get("window-mdembed-uperror"),320,180,this.stage):this.ui.createWarning(k.ln.get("window-mdembed-title"),
k.ln.get("window-mdembed-uperror"),320,180,this.stage)},onShow:function(a){this.ui.lists.h.available.get_selectedItem()!=null&&(a=N.replace(k.ws.get_url(),"/ws","/movie")+"/"+p.movie.get_mvId()+".movie/media/embed/"+H.string(this.ui.lists.h.available.get_selectedItem().value)+"/index.html",a=new se(a),a.method="GET",Pa.getURL(a))},onRemove:function(a){this.ui.lists.h.available.get_selectedItem()!=null&&this.ui.createConfirm(k.ln.get("window-mdembed-title"),k.ln.get("window-mdembed-removeconfirm"),
320,230,m(this,this.onRemoveConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRemoveConfirm:function(a){if(a){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=this.ui.lists.h.available.get_selectedItem().value;b.h.name=c;a.send("Media/EmbedRemove",b,m(this,this.onRemoveReturn))}},onRemoveReturn:function(a,b){this.loadList()},__class__:Qr});var Rr=function(a,b){cd.call(this,a,k.ln.get("window-mdhtml-title"),"html",b)};t["com.tilbuci.ui.window.media.WindowMediaHtml"]=Rr;
Rr.__name__="com.tilbuci.ui.window.media.WindowMediaHtml";Rr.__super__=cd;Rr.prototype=I(cd.prototype,{startInterface:function(a){cd.prototype.startInterface.call(this)},kill:function(){cd.prototype.kill.call(this)},__class__:Rr});var Sr=function(a,b){cd.call(this,a,k.ln.get("window-mdparagraph-title"),"paragraph",b)};t["com.tilbuci.ui.window.media.WindowMediaParagraph"]=Sr;Sr.__name__="com.tilbuci.ui.window.media.WindowMediaParagraph";Sr.__super__=cd;Sr.prototype=I(cd.prototype,{startInterface:function(a){cd.prototype.startInterface.call(this);
this.ui.createHContainer("addtocol");this.ui.createButton("addcolast",k.ln.get("window-media-addcolast"),m(this,this.onAddAsset),this.ui.hcontainers.h.addtocol);this.ui.createButton("addtocol",k.ln.get("window-media-addtocol"),m(this,this.onAddToCol),this.ui.hcontainers.h.addtocol);this.ui.createSelect("addtocol",[],null,this.ui.hcontainers.h.addtocol);this.ui.createToggle("close",!0,this.ui.hcontainers.h.addtocol);this.ui.createLabel("close",k.ln.get("window-media-closeafter"),"",this.ui.hcontainers.h.addtocol);
a=k.ln.get("window-mdparagraph-title");var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-mdparagraph-about"),vr:""},d=k.ln.get("window-mdparagraph-set");this.addForm(a,b.forge("leftcol",[c,{tp:"TArea",id:"text",tx:"",vr:"",en:!0},{tp:"Button",id:"btadd",tx:d,ac:m(this,this.onOpen)},{tp:"Custom",cont:this.ui.hcontainers.h.addtocol}]));this.ui.tareas.h.text.set_height(530)},acStart:function(){this._path="";this.ui.tareas.h.text.set_text("");this.ui.hcontainers.h.addtocol.setWidth(960,[260,
260,260,40,100]);for(var a=[],b=Object.keys(p.movie.collections.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:p.movie.collections.h[f].name,value:f})}this.ui.setSelectOptions("addtocol",a);a.length>0?(this.ui.hcontainers.h.addtocol.set_visible(!0),this.ui.tareas.h.text.set_height(500)):(this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.tareas.h.text.set_height(530))},kill:function(){cd.prototype.kill.call(this)},onOpen:function(a){if(this.ui.tareas.h.text.get_text()!=""){if(this._mode=="asset"){this._mode=
"simple";a=this._ac;var b=new G;b.h.path="";b.h.type=this._type;var c=this.ui.tareas.h.text.get_text();b.h.file=c;b.h.frames=H.string(this._frames);b.h.frtime=H.string(this._frtime);b.h.num=this._filenum;a("addasset",b)}else this._mode=="assetsingle"?(this._mode="simple",a=this._ac,b=new G,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=H.string(this._frames),b.h.frtime=H.string(this._frtime),b.h.num=this._filenum,a("assetsingle",b)):this._mode=="newasset"?
(this._mode="simple",a=this._ac,b=new G,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=H.string(this._frames),b.h.frtime=H.string(this._frtime),a("addnewasset",b)):(a=this._ac,b=new G,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=H.string(this._frames),b.h.frtime=H.string(this._frtime),a("addstage",b));Aa.removePopUp(this)}},onAddToCol:function(a){if(this.ui.tareas.h.text.get_text()!=""&&this.ui.selects.h.addtocol.get_selectedItem()!=
null){a=this._ac;var b=new G;b.h.stage="true";var c=this.ui.selects.h.addtocol.get_selectedItem().value;b.h.col=c;b.h.path="";b.h.type=this._type;c=this.ui.tareas.h.text.get_text();b.h.file=c;b.h.frames=H.string(this._frames);b.h.frtime=H.string(this._frtime);a("addtocol",b);this.ui.toggles.h.close.get_selected()?Aa.removePopUp(this):(this.ui.tareas.h.text.set_text(""),k.showMsg(k.ln.get("window-media-addedstage")))}},onAddAsset:function(a){if(this.ui.tareas.h.text.get_text()!=""&&this.ui.selects.h.addtocol.get_selectedItem()!=
null){a=this._ac;var b=new G;b.h.stage="false";var c=this.ui.selects.h.addtocol.get_selectedItem().value;b.h.col=c;b.h.path="";b.h.type=this._type;c=this.ui.tareas.h.text.get_text();b.h.file=c;b.h.frames=H.string(this._frames);b.h.frtime=H.string(this._frtime);a("addtocol",b);this.ui.toggles.h.close.get_selected()?Aa.removePopUp(this):(this.ui.tareas.h.text.set_text(""),k.showMsg(k.ln.get("window-media-addedcol")))}},action:function(a,b){cd.prototype.action.call(this,a,b);this.ui.tareas.h.text.set_text(b.h.current);
b.h.mode=="asset"||b.h.mode=="assetsingle"||b.h.mode=="newasset"||b.h.mode=="single"?(this.ui.tareas.h.text.set_height(530),this.ui.hcontainers.h.addtocol.set_visible(!1)):this.ui.selects.h.addtocol.get_dataProvider().get_length()>0?(this.ui.hcontainers.h.addtocol.set_visible(!0),this.ui.tareas.h.text.set_height(500)):(this.ui.hcontainers.h.addtocol.set_visible(!1),this.ui.tareas.h.text.set_height(530))},__class__:Sr});var Tr=function(a,b){cd.call(this,a,k.ln.get("window-mdpicture-title"),"picture",
b)};t["com.tilbuci.ui.window.media.WindowMediaPicture"]=Tr;Tr.__name__="com.tilbuci.ui.window.media.WindowMediaPicture";Tr.__super__=cd;Tr.prototype=I(cd.prototype,{startInterface:function(a){cd.prototype.startInterface.call(this)},kill:function(){cd.prototype.kill.call(this)},__class__:Tr});var Ur=function(a,b){cd.call(this,a,k.ln.get("window-mdshape-title"),"shape",b)};t["com.tilbuci.ui.window.media.WindowMediaShape"]=Ur;Ur.__name__="com.tilbuci.ui.window.media.WindowMediaShape";Ur.__super__=cd;
Ur.prototype=I(cd.prototype,{_shape:null,_desc:null,startInterface:function(a){cd.prototype.startInterface.call(this);this.ui.createHContainer("addtocol");this.ui.createButton("addcolast",k.ln.get("window-media-addcolast"),m(this,this.onAddAsset),this.ui.hcontainers.h.addtocol);this.ui.createButton("addtocol",k.ln.get("window-media-addtocol"),m(this,this.onAddToCol),this.ui.hcontainers.h.addtocol);this.ui.createSelect("addtocol",[],null,this.ui.hcontainers.h.addtocol);this.ui.createToggle("close",
!0,this.ui.hcontainers.h.addtocol);this.ui.createLabel("close",k.ln.get("window-media-closeafter"),"",this.ui.hcontainers.h.addtocol);this._shape=new yn(m(this,this.onShape));a=k.ln.get("window-mdshape-title");var b=this.ui,c=this.ui,d={tp:"Label",id:"shape",tx:k.ln.get("window-mdshape-shape"),vr:""},f={tp:"Select",id:"shape",vl:[{text:k.ln.get("window-mdshape-circle"),value:"circle"},{text:k.ln.get("window-mdshape-triangle"),value:"triangle"},{text:k.ln.get("window-mdshape-isoscelestriangle"),value:"isoscelestriangle"},
{text:k.ln.get("window-mdshape-righttriangle"),value:"righttriangle"},{text:k.ln.get("window-mdshape-square"),value:"square"},{text:k.ln.get("window-mdshape-pentagon"),value:"pentagon"},{text:k.ln.get("window-mdshape-hexagon"),value:"hexagon"},{text:k.ln.get("window-mdshape-heptagon"),value:"heptagon"},{text:k.ln.get("window-mdshape-octagon"),value:"octagon"},{text:k.ln.get("window-mdshape-eneagon"),value:"eneagon"},{text:k.ln.get("window-mdshape-decagon"),value:"decagon"}],sl:"circle"},g={tp:"Label",
id:"color",tx:k.ln.get("window-mdshape-color"),vr:""},h={tp:"Label",id:"alpha",tx:k.ln.get("window-mdshape-alpha"),vr:""},n={tp:"Label",id:"border",tx:k.ln.get("window-mdshape-border"),vr:""},l={tp:"Label",id:"bdcolor",tx:k.ln.get("window-mdshape-bdcolor"),vr:""},q={tp:"Label",id:"bdalpha",tx:k.ln.get("window-mdshape-bdalpha"),vr:""},u={tp:"Label",id:"rotation",tx:k.ln.get("window-mdshape-rotation"),vr:""},v=k.ln.get("window-mdshape-show");g=c.forge("leftcol",[d,f,g,{tp:"TInput",id:"color",tx:"#000000",
vr:""},h,{tp:"Numeric",id:"alpha",mn:0,mx:100,vl:100,st:1},n,{tp:"Numeric",id:"border",mn:0,mx:10,vl:0,st:1},l,{tp:"TInput",id:"bdcolor",tx:"#FFFFFF",vr:""},q,{tp:"Numeric",id:"bdalpha",mn:0,mx:100,vl:100,st:1},u,{tp:"Numeric",id:"rotation",mn:0,mx:359,vl:0,st:1},{tp:"Button",id:"show",tx:v,ac:m(this,this.onShow)}]);c=this.ui.forge("rightcol",[{tp:"Custom",cont:this._shape}]);d=this.ui;f=k.ln.get("window-mdshape-show");this.addForm(a,b.createColumnHolder("columns",g,c,d.forge("bottom",[{tp:"Spacer",
id:"btadd",ht:10},{tp:"Button",id:"btadd",tx:f,ac:m(this,this.onOpen)},{tp:"Custom",cont:this.ui.hcontainers.h.addtocol}]),510));this.ui.buttons.h.btadd.set_visible(!1)},acStart:function(){this._path="";this._mode="simple";this._shape.set_visible(!1);this._desc=null;this.ui.hcontainers.h.addtocol.setWidth(960,[260,260,260,40,100]);for(var a=[],b=Object.keys(p.movie.collections.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:p.movie.collections.h[f].name,value:f})}this.ui.setSelectOptions("addtocol",
a);this.ui.hcontainers.h.addtocol.set_visible(!1);this.ui.buttons.h.btadd.set_visible(!1)},kill:function(){cd.prototype.kill.call(this)},onShow:function(a){a=this.ui.inputs.h.color.get_text();a=N.replace(a,"#","0x");H.parseInt(a)==null&&(a="0x000000");var b=this.ui.inputs.h.bdcolor.get_text();b=N.replace(b,"#","0x");H.parseInt(b)==null&&(b="0xFFFFFF");this.ui.inputs.h.color.set_text(N.replace(a,"0x","#"));this.ui.inputs.h.bdcolor.set_text(N.replace(b,"0x","#"));this._desc={type:this.ui.selects.h.shape.get_selectedItem().value,
color:a,alpha:this.ui.numerics.h.alpha.get_value()/100,border:Math.round(this.ui.numerics.h.border.get_value()),bdcolor:b,bdalpha:this.ui.numerics.h.bdalpha.get_value()/100,rotation:Math.round(this.ui.numerics.h.rotation.get_value())};this._shape.set_visible(!1);this._shape.load(Ga.jsonStringify(this._desc))},onShape:function(a){a?(this._shape.set_width(this._shape.oWidth-50),this._shape.set_height(this._shape.oHeight-50),this._shape.set_x((500-this._shape.get_width())/2),this._shape.set_y((500-this._shape.get_height())/
2),this._shape.set_visible(!0),this.ui.hcontainers.h.addtocol.set_visible(!1),this._mode=="asset"?this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addshape")):this._mode=="assetsingle"?this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addshape")):this._mode=="newasset"?this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addast")):(this.ui.buttons.h.btadd.set_text(k.ln.get("window-media-addstage")),this.ui.selects.h.addtocol.get_dataProvider().get_length()>0&&this.ui.hcontainers.h.addtocol.set_visible(!0)),
this.ui.buttons.h.btadd.set_visible(!0)):(this._desc=null,this.ui.buttons.h.btadd.set_visible(!1),this.ui.hcontainers.h.addtocol.set_visible(!1))},onOpen:function(a){if(this._desc!=null){a=Ga.jsonStringify(this._desc);if(this._mode=="asset"){this._mode="simple";var b=this._ac,c=new G;c.h.path="";c.h.type=this._type;c.h.file=a;c.h.frames=H.string(this._frames);c.h.frtime=H.string(this._frtime);c.h.num=this._filenum;b("addasset",c)}else this._mode=="assetsingle"?(this._mode="simple",b=this._ac,c=new G,
c.h.path="",c.h.type=this._type,c.h.file=a,c.h.frames=H.string(this._frames),c.h.frtime=H.string(this._frtime),c.h.num=this._filenum,b("assetsingle",c)):this._mode=="newasset"?(this._mode="simple",b=this._ac,c=new G,c.h.path="",c.h.type=this._type,c.h.file=a,c.h.frames=H.string(this._frames),c.h.frtime=H.string(this._frtime),b("addnewasset",c)):(b=this._ac,c=new G,c.h.path="",c.h.type=this._type,c.h.file=a,c.h.frames=H.string(this._frames),c.h.frtime=H.string(this._frtime),b("addstage",c));Aa.removePopUp(this)}},
onAddToCol:function(a){if(this._desc!=null&&this.ui.selects.h.addtocol.get_selectedItem()!=null){a=Ga.jsonStringify(this._desc);var b=this._ac,c=new G;c.h.stage="true";var d=this.ui.selects.h.addtocol.get_selectedItem().value;c.h.col=d;c.h.path="";c.h.type=this._type;c.h.file=a;c.h.frames=H.string(this._frames);c.h.frtime=H.string(this._frtime);b("addtocol",c);this.ui.toggles.h.close.get_selected()?Aa.removePopUp(this):(this._shape.set_visible(!1),this._desc=null,this.ui.buttons.h.btadd.set_visible(!1),
this.ui.hcontainers.h.addtocol.set_visible(!1),k.showMsg(k.ln.get("window-media-addedstage")))}},onAddAsset:function(a){if(this._desc!=null&&this.ui.selects.h.addtocol.get_selectedItem()!=null){a=Ga.jsonStringify(this._desc);var b=this._ac,c=new G;c.h.stage="false";var d=this.ui.selects.h.addtocol.get_selectedItem().value;c.h.col=d;c.h.path="";c.h.type=this._type;c.h.file=a;c.h.frames=H.string(this._frames);c.h.frtime=H.string(this._frtime);b("addtocol",c);this.ui.toggles.h.close.get_selected()?Aa.removePopUp(this):
(this._shape.set_visible(!1),this._desc=null,this.ui.buttons.h.btadd.set_visible(!1),this.ui.hcontainers.h.addtocol.set_visible(!1),k.showMsg(k.ln.get("window-media-addedcol")))}},action:function(a,b){cd.prototype.action.call(this,a,b);this._shape.set_visible(!1);this._desc=Ga.jsonParse(b.h.current);this._desc!=null&&this._desc.color!=null&&(this.ui.inputs.h.color.set_text(N.replace(this._desc.color,"0x","#")),this.ui.numerics.h.alpha.set_value(Math.round(100*this._desc.alpha)),this.ui.numerics.h.border.set_value(this._desc.border),
this.ui.inputs.h.bdcolor.set_text(N.replace(this._desc.bdcolor,"0x","#")),this.ui.numerics.h.bdalpha.set_value(Math.round(100*this._desc.bdalpha)),this.ui.numerics.h.rotation.set_value(this._desc.rotation),this._shape.load(b.h.current),this.ui.setSelectValue("shape",this._desc.type))},__class__:Ur});var Vr=function(a,b){cd.call(this,a,k.ln.get("window-mdspritemap-title"),"spritemap",b)};t["com.tilbuci.ui.window.media.WindowMediaSpritemap"]=Vr;Vr.__name__="com.tilbuci.ui.window.media.WindowMediaSpritemap";
Vr.__super__=cd;Vr.prototype=I(cd.prototype,{_smapset:null,startInterface:function(a){cd.prototype.startInterface.call(this);this._smapset=this.ui.createHContainer("spritemapset");this._smapset.addChild(this.ui.forge("smapleft",[{tp:"Label",id:"frames",tx:k.ln.get("window-mdspritemap-frames"),vr:ia.VARIANT_DETAIL},{tp:"Numeric",id:"frames",vl:this._frames,mn:1,mx:100,st:1,ch:m(this,this.onSmapChange)}],-1,200,0));this._smapset.addChild(this.ui.forge("smapright",[{tp:"Label",id:"frtime",tx:k.ln.get("window-mdspritemap-frtime"),
vr:ia.VARIANT_DETAIL},{tp:"Numeric",id:"frtime2",vl:this._frtime,mn:50,mx:5E3,st:50,ch:m(this,this.onSmapChange)}],-1,260,0));this.ui.containers.h.rightcol.addChild(this._smapset)},kill:function(){cd.prototype.kill.call(this)},onSmapChange:function(a){this.ui.numerics.h.frames.get_value()>0&&this.ui.numerics.h.frames.get_value()<=100&&(this._frames=Math.round(this.ui.numerics.h.frames.get_value()));this.ui.numerics.h.frtime2.get_value()>=50&&this.ui.numerics.h.frtime2.get_value()<=5E3&&(this._frtime=
Math.round(this.ui.numerics.h.frtime2.get_value()));this._preview.setSpritemap(this._frames,this._frtime)},__class__:Vr});var Wr=function(a){ea.call(this,a,k.ln.get("window-mdstrings-title"),1E3,Bc.pickValue(535,565),!1,!0,!0);this._type="strings"};t["com.tilbuci.ui.window.media.WindowMediaStrings"]=Wr;Wr.__name__="com.tilbuci.ui.window.media.WindowMediaStrings";Wr.__super__=ea;Wr.prototype=I(ea.prototype,{_type:null,_path:null,startInterface:function(a){a=this.ui;var b={tp:"Button",id:"btremove",
tx:k.ln.get("window-media-removefile"),ac:m(this,this.onRemove)},c={tp:"Button",id:"btdownload",tx:k.ln.get("window-media-download"),ac:m(this,this.onDownload)},d=k.ln.get("window-media-upload");this.addForm("files",a.forge("strings",[{tp:"List",id:"fileslist",vl:[],ht:380,sl:null},b,c,{tp:"Button",id:"btupload",tx:d,ac:m(this,this.onUpload)}]));this.ui.listChange("fileslist",m(this,this.onChange));ea.prototype.startInterface.call(this)},acStart:function(){this._path="";this.loadPath()},loadPath:function(){this.ui.setListValues("fileslist",
[]);this.ui.buttons.h.btremove.set_enabled(!1);this.ui.buttons.h.btremove.set_visible(!1);this.ui.buttons.h.btdownload.set_enabled(!1);this.ui.buttons.h.btdownload.set_visible(!1);var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type=this._type;b.h.path=this._path;a.send("Media/List",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){a=[];for(var c=0,d=y.fields(b.map.h.list);c<d.length;){var f=d[c];++c;a.push({text:y.field(y.field(b.map.h.list,f),"n"),value:y.field(y.field(b.map.h.list,
f),"n"),type:"f",asset:""})}this.ui.setListValues("fileslist",a)}else this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-nolist"),300,180,this.stage),Aa.removePopUp(this)},onChange:function(a){this.ui.lists.h.fileslist.get_selectedItem()!=null&&(this.ui.buttons.h.btremove.set_enabled(!0),this.ui.buttons.h.btremove.set_visible(!0),this.ui.buttons.h.btdownload.set_enabled(!0),
this.ui.buttons.h.btdownload.set_visible(!0))},onDownload:function(a){if(this.ui.lists.h.fileslist.get_selectedItem()!=null){a=k.ws;var b=new G;b.h.file="strings";var c=this.ui.lists.h.fileslist.get_selectedItem().text;b.h.media=c;c=p.movie.get_mvId();b.h.movie=c;a.download(b)}},onRemove:function(a){this.ui.createConfirm(k.ln.get("window-media-title"),k.ln.get("window-media-removewarn"),400,220,m(this,this.onRealRemove),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRealRemove:function(a){if(a){a=
k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type=this._type;b.h.path=this._path;c=this.ui.lists.h.fileslist.get_selectedItem().text;b.h.name=c;a.send("Media/DeleteFile",b,m(this,this.onRemoveFile))}},onRemoveFile:function(a,b){a?b.map.h.e==0?this.loadPath():this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-removefileer"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-removefileer"),300,180,this.stage)},onUpload:function(a){k.up.browseForMedia(m(this,
this.onFileSelcted),this._type)},onFileSelcted:function(a){if(a){a=k.up;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type=this._type;b.h.path=this._path;a.uploadMedia(m(this,this.onUploadReturn),b)}},onUploadReturn:function(a,b){a?this.loadPath():this.ui.createWarning(k.ln.get("window-media-title"),k.ln.get("window-media-uploader"),300,180,this.stage)},__class__:Wr});var Xr=function(a,b){cd.call(this,a,k.ln.get("window-mdtext-title"),"text",b)};t["com.tilbuci.ui.window.media.WindowMediaText"]=
Xr;Xr.__name__="com.tilbuci.ui.window.media.WindowMediaText";Xr.__super__=cd;Xr.prototype=I(cd.prototype,{startInterface:function(a){cd.prototype.startInterface.call(this);a=k.ln.get("window-mdtext-title");var b=this.ui,c={tp:"Label",id:"about",tx:k.ln.get("window-mdtext-about"),vr:""},d=k.ln.get("window-mdtext-set");this.addForm(a,b.forge("leftcol",[c,{tp:"TArea",id:"text",tx:"",vr:"",en:!0},{tp:"Button",id:"btadd",tx:d,ac:m(this,this.onOpen)}]));this.ui.tareas.h.text.set_height(550)},acStart:function(){this._path=
"";this.ui.tareas.h.text.set_text("");this.ui.tareas.h.text.set_height(550)},kill:function(){cd.prototype.kill.call(this)},onOpen:function(a){if(this.ui.tareas.h.text.get_text()!=""){if(this._mode=="asset"){this._mode="simple";a=this._ac;var b=new G;b.h.path="";b.h.type=this._type;var c=this.ui.tareas.h.text.get_text();b.h.file=c;b.h.frames=H.string(this._frames);b.h.frtime=H.string(this._frtime);b.h.num=this._filenum;a("addasset",b)}else this._mode=="newasset"?(this._mode="simple",a=this._ac,b=new G,
b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=H.string(this._frames),b.h.frtime=H.string(this._frtime),a("addnewasset",b)):(a=this._ac,b=new G,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=H.string(this._frames),b.h.frtime=H.string(this._frtime),a("addstage",b));Aa.removePopUp(this)}},action:function(a,b){cd.prototype.action.call(this,a,b);this.ui.tareas.h.text.set_text(b.h.current)},__class__:Xr});var Yr=function(a,
b){cd.call(this,a,k.ln.get("window-mdvideo-title"),"video",b)};t["com.tilbuci.ui.window.media.WindowMediaVideo"]=Yr;Yr.__name__="com.tilbuci.ui.window.media.WindowMediaVideo";Yr.__super__=cd;Yr.prototype=I(cd.prototype,{startInterface:function(a){cd.prototype.startInterface.call(this)},kill:function(){cd.prototype.kill.call(this)},__class__:Yr});var ws=function(a){this._list=[];ea.call(this,a,k.ln.get("window-timedac-title"),1300,Bc.pickValue(660,700),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowTimedAction"]=
ws;ws.__name__="com.tilbuci.ui.window.media.WindowTimedAction";ws.__super__=ea;ws.prototype=I(ea.prototype,{_instance:null,_acarea:null,_list:null,startInterface:function(a){this._acarea=new jj(610,520);var b=a=this.ui,c={tp:"Label",id:"registered",tx:k.ln.get("window-timedac-registered"),vr:""},d={tp:"Button",id:"loadac",tx:k.ln.get("window-timedac-loadac"),ac:m(this,this.onLoad)},f={tp:"Button",id:"clearac",tx:k.ln.get("window-timedac-clearac"),ac:m(this,this.onClear)},g={tp:"Label",id:"newtime",
tx:k.ln.get("window-timedac-newtime"),vr:""},h={tp:"Button",id:"newtime",tx:k.ln.get("window-timedac-newtimebt"),ac:m(this,this.onNew)},n={tp:"Button",id:"onclose",tx:k.ln.get("window-timedac-close"),ac:m(this,this.onClose)},l=k.ln.get("window-timedac-set");g=b.forge("left",[c,{tp:"List",id:"registered",vl:[],ht:325,sl:null},d,f,{tp:"Spacer",id:"newtime",ht:10,ln:!1},g,{tp:"Numeric",id:"newtime",mn:1,mx:1E4,st:1,vl:1},h,{tp:"Spacer",id:"buttons",ht:10,ln:!1},n,{tp:"Button",id:"onsave",tx:l,ac:m(this,
this.onSave)}]);b=this.ui;c={tp:"Label",id:"actions",tx:k.ln.get("window-timedac-actions"),vr:""};d={tp:"Custom",cont:this._acarea};f=k.ln.get("window-timedac-update");this.addForm("columns",a.createColumnHolder("columns",g,b.forge("right",[c,d,{tp:"Spacer",id:"actions",ht:6,ln:!1},{tp:"Button",id:"onupdate",tx:f,ac:m(this,this.onUpdate)}])));this.ui.listDbClick("registered",m(this,this.onLoad));ea.prototype.startInterface.call(this)},acStart:function(){this._instance=null},action:function(a,b){this._instance=
p.area.pickInstance(b.h.instance);if(this._instance!=null){this._list=[];a=p.movie.scene.keyframes[p.area.get_currentKf()];b=this._instance.getInstName();a=a.h[b].timedAc;b=Object.keys(a.h);for(var c=b.length,d=0;d<c;){var f=b[d++];a.h[f]!=""&&this._list.push({text:f,value:{time:H.parseInt(N.replace(f,"s","")),action:a.h[f]}})}this.orderActions()}else k.showMsg(k.ln.get("window-asset-noinstance")),Aa.removePopUp(this)},onSave:function(a){var b=p.movie.scene.keyframes[p.area.get_currentKf()],c=this._instance.getInstName();
a=b.h[c].timedAc;b=Object.keys(a.h);c=b.length;for(var d=0;d<c;){var f=b[d++];Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f]}b=0;for(c=this._list.length;b<c;)d=b++,this._list[d].value.action!=""&&(f=this._list[d].value.action,a.h[H.string(this._list[d].value.time)+"s"]=f);b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this._instance.getInstName();b.h[c].timedAc=a;this._instance=null;Aa.removePopUp(this)},onClose:function(a){this._instance=null;Aa.removePopUp(this)},onNew:function(a){if(this.ui.numerics.h.newtime.get_value()>
0){a=Math.round(this.ui.numerics.h.newtime.get_value());for(var b=-1,c=0,d=this._list.length;c<d;){var f=c++;this._list[f].value.time==a&&(b=f)}b>=0?(this.ui.lists.h.registered.set_selectedIndex(b),this.ui.lists.h.registered.get_dataProvider().updateAt(this.ui.lists.h.registered.get_selectedIndex()),this.onLoad()):(this._list.push({text:a+"s",value:{time:a,action:""}}),this.orderActions(a))}},orderActions:function(a){a==null&&(a=0);this._acarea.setText("");this.ui.setListSelectValue("registered",
null);this.ui.setListValues("registered",[]);Gf.sort(this._list,function(g,h){return g.value.time<h.value.time?-1:g.value.time>h.value.time?1:0});this.ui.setListValues("registered",this._list);if(a>0){for(var b=-1,c=0,d=this._list.length;c<d;){var f=c++;this._list[f].value.time==a&&(b=f)}b>=0&&(this.ui.lists.h.registered.set_selectedIndex(b),this.ui.lists.h.registered.get_dataProvider().updateAt(this.ui.lists.h.registered.get_selectedIndex()),this.onLoad())}},onLoad:function(a){this.ui.lists.h.registered.get_selectedItem()!=
null&&this._acarea.setText(this.ui.lists.h.registered.get_selectedItem().value.action)},onClear:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this.ui.lists.h.registered.get_selectedItem().value.time;for(var b=[],c=0,d=this._list.length;c<d;){var f=c++;this._list[f].value.time!=a&&b.push(this._list[f])}this._list=b;this.orderActions()}},onUpdate:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){a=this.ui.lists.h.registered.get_selectedItem().value.time;for(var b=
0,c=this._list.length;b<c;){var d=b++;this._list[d].value.time==a&&(this._list[d].value.action=this._acarea.getText())}this.orderActions()}},__class__:ws});var gs=function(a){ea.call(this,a,k.ln.get("window-movienew-title"),800,Bc.pickValue(430,475),!1)};t["com.tilbuci.ui.window.movie.WindowMovieNew"]=gs;gs.__name__="com.tilbuci.ui.window.movie.WindowMovieNew";gs.__super__=ea;gs.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-movienew-title");var b=this.ui,c=this.ui,d={tp:"Label",
id:"moviename",tx:k.ln.get("window-movienew-name"),vr:ia.VARIANT_DETAIL},f={tp:"Label",id:"movieid",tx:k.ln.get("window-movienew-id"),vr:ia.VARIANT_DETAIL},g={tp:"Label",id:"movieauthor",tx:k.ln.get("window-movienew-author"),vr:ia.VARIANT_DETAIL},h={tp:"Label",id:"moviecopyright",tx:k.ln.get("window-movienew-copyright"),vr:ia.VARIANT_DETAIL},n={tp:"Label",id:"moviecopyleft",tx:k.ln.get("window-movienew-copyleft"),vr:ia.VARIANT_DETAIL},l=k.ln.get("window-movienew-about"),q=c.forge("leftcol",[d,{tp:"TInput",
id:"moviename",tx:"",vr:""},f,{tp:"TInput",id:"movieid",tx:"",vr:""},g,{tp:"TInput",id:"movieauthor",tx:"",vr:""},h,{tp:"TInput",id:"moviecopyright",tx:"",vr:""},n,{tp:"TInput",id:"moviecopyleft",tx:"",vr:""},{tp:"Label",id:"movieabout",tx:l,vr:ia.VARIANT_DETAIL},{tp:"TArea",id:"movieabout",tx:"",vr:"",en:!0}]);c=this.ui;d={tp:"Label",id:"moviesizebig",tx:k.ln.get("window-movienew-sizebig"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"moviesizesmall",tx:k.ln.get("window-movienew-sizesmall"),vr:ia.VARIANT_DETAIL};
g={tp:"Label",id:"moviesizetype",tx:k.ln.get("window-movienew-sizetype"),vr:ia.VARIANT_DETAIL};h={tp:"Select",id:"moviesizetype",vl:[{text:k.ln.get("window-movienew-sizeboth"),value:"both"},{text:k.ln.get("window-movienew-sizeportrait"),value:"portrait"},{text:k.ln.get("window-movienew-sizelandscape"),value:"landscape"},{text:k.ln.get("window-movienew-sizesquare"),value:"square"}],sl:"both"};n={tp:"Label",id:"movietime",tx:k.ln.get("window-movienew-timeframe"),vr:ia.VARIANT_DETAIL};l={tp:"Select",
id:"movietime",vl:[{text:k.ln.get("window-movienew-time025"),value:"0.25"},{text:k.ln.get("window-movienew-time050"),value:"0.50"},{text:k.ln.get("window-movienew-time100"),value:"1.00"},{text:k.ln.get("window-movienew-time150"),value:"1.50"},{text:k.ln.get("window-movienew-time200"),value:"2.00"},{text:k.ln.get("window-movienew-time250"),value:"2.50"},{text:k.ln.get("window-movienew-time300"),value:"3.00"},{text:k.ln.get("window-movienew-time350"),value:"3.50"},{text:k.ln.get("window-movienew-time400"),
value:"4.00"},{text:k.ln.get("window-movienew-time450"),value:"4.50"},{text:k.ln.get("window-movienew-time500"),value:"5.00"}],sl:"1.00"};var u=k.ln.get("window-movienew-create");this.addForm(a,b.createColumnHolder("columns",q,c.forge("rightcol",[d,{tp:"Numeric",id:"moviesizebig",mn:100,mx:3840,st:50,vl:1920},f,{tp:"Numeric",id:"moviesizesmall",mn:100,mx:3840,st:50,vl:1080},g,h,n,l,{tp:"Spacer",id:"font-spacer",ht:120,ln:!1},{tp:"Button",id:"moviecreate",tx:u,ac:m(this,this.onCreateMovie)}])));ea.prototype.startInterface.call(this)},
kill:function(){ea.prototype.kill.call(this)},onCreateMovie:function(a){if(this.ui.inputs.h.moviename.get_text()==""||this.ui.inputs.h.movieauthor.get_text()=="")this.ui.createWarning(k.ln.get("window-movienew-title"),k.ln.get("window-movienew-norequired"),300,180,this.stage);else{this.ui.numerics.h.moviesizebig.get_value()<100&&this.ui.numerics.h.moviesizebig.set_value(100);this.ui.numerics.h.moviesizesmall.get_value()<100&&this.ui.numerics.h.moviesizesmall.set_value(100);this.ui.numerics.h.moviesizebig.get_value()>
3840&&this.ui.numerics.h.moviesizebig.set_value(3840);this.ui.numerics.h.moviesizesmall.get_value()>3840&&this.ui.numerics.h.moviesizesmall.set_value(3840);a=k.ws;var b=new G,c=this.ui.inputs.h.moviename.get_text();b.h.title=c;c=this.ui.inputs.h.movieid.get_text();b.h.id=c;c=this.ui.inputs.h.movieauthor.get_text();b.h.author=c;c=this.ui.inputs.h.moviecopyright.get_text();b.h.copyright=c;c=this.ui.inputs.h.moviecopyleft.get_text();b.h.copyleft=c;c=this.ui.tareas.h.movieabout.get_text();b.h.about=c;
c=this.ui.numerics.h.moviesizebig.get_value();b.h.sizebig=c;c=this.ui.numerics.h.moviesizesmall.get_value();b.h.sizesmall=c;c=this.ui.selects.h.moviesizetype.get_selectedItem().value;b.h.moviesizetype=c;c=this.ui.selects.h.movietime.get_selectedItem().value;b.h.interval=c;a.send("Movie/New",b,m(this,this.onCreateMovieReturn))}},onCreateMovieReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-movienew-title"),k.ln.get("window-movienew-createer"),300,180,this.stage);else{p.area.imgSelect();
Aa.removePopUp(this);a=this._ac;var c=new G;c.h.id=b.map.h.id;a("movieload",c)}else this.ui.createWarning(k.ln.get("window-movienew-title"),k.ln.get("window-movienew-createer"),300,180,this.stage)},__class__:gs});var is=function(a){ea.call(this,a,k.ln.get("window-movieopen-title"),800,Bc.pickValue(415,435),!1)};t["com.tilbuci.ui.window.movie.WindowMovieOpen"]=is;is.__name__="com.tilbuci.ui.window.movie.WindowMovieOpen";is.__super__=ea;is.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-movieopen-title");
var b=this.ui,c={tp:"Label",id:"openabout",tx:k.ln.get("window-movieopen-wait")},d={tp:"Label",id:"openowner",tx:k.ln.get("window-movieopen-owner"),vr:ia.VARIANT_DETAIL},f=k.ln.get("window-movieopen-button");this.addForm(a,b.forge("window",[c,{tp:"List",id:"openlist",vl:[],ht:275,sl:null},d,{tp:"Button",id:"okbutton",tx:f,ac:m(this,this.onOpen)}]));ea.prototype.startInterface.call(this);this.ui.listDbClick("openlist",m(this,this.onOpen))},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.loadMovies()},
loadMovies:function(){this.ui.labels.h.openabout.set_text(k.ln.get("window-movieopen-wait"));this.ui.setListValues("openlist",[]);k.ws.send("Movie/List",new G,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0)if(a=b.map.h.list,a.length==0)this.ui.labels.h.openabout.set_text(k.ln.get("window-movieopen-nomovies"));else{b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:y.field(d,"title"),value:y.field(d,"id")})}this.ui.setListValues("openlist",b);this.ui.labels.h.openabout.set_text(k.ln.get("window-movieopen-about"))}else this.ui.labels.h.openabout.set_text(k.ln.get("window-movieopen-error"));
else this.ui.labels.h.openabout.set_text(k.ln.get("window-movieopen-error"))},onOpen:function(a){if(this.ui.lists.h.openlist.get_selectedItem()!=null){a=this._ac;var b=new G,c=this.ui.lists.h.openlist.get_selectedItem().value;b.h.id=c;a("movieload",b);p.area.imgSelect();Aa.removePopUp(this)}},__class__:is});var ks=function(a){ea.call(this,a,k.ln.get("window-movieplugin-title"),1E3,720,!0,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMoviePlugins"]=ks;ks.__name__="com.tilbuci.ui.window.movie.WindowMoviePlugins";
ks.__super__=ea;ks.prototype=I(ea.prototype,{startInterface:function(a){a=Object.keys(k.plugins.h).length;for(var b=0;b<a;)b++;ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){},onSave:function(a){var b="{}",c=k.plugins,d=Ke.__get(a.target,"btid");Object.prototype.hasOwnProperty.call(c.h,d==null?null:H.string(d))&&(c=k.plugins,d=Ke.__get(a.target,"btid"),b=Ga.jsonStringify(c.h[d==null?null:H.string(d)].getConfig()));var f=k.ws,g=new G;c=p.movie.get_mvId();
g.h.id=c;c=Ke.__get(a.target,"btid");g.h.plugin=c;c=this.ui.toggles;a=Ke.__get(a.target,"btid");a==null?a="null":(d=a,a=d==null?null:H.string(d));c=c.h[a+"enabled"].get_selected();g.h.active=c;g.h.conf=b;f.send("Movie/Plugin",g,m(this,this.onSaveReturn))},onSaveReturn:function(a,b){a?b.map.h.e!=0?this.ui.createWarning(k.ln.get("window-movieplugin-title"),k.ln.get("window-movieplugin-saveerror"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-movieplugin-title"),k.ln.get("window-movieplugin-saveok"),
300,180,this.stage):this.ui.createWarning(k.ln.get("window-movieplugin-title"),k.ln.get("window-movieplugin-saveerror"),300,180,this.stage)},__class__:ks});var ls=function(a){this._thColors="themeColor offsetThemeColor headerFillColor headerFontSize headerFontName headerTextColor rootFillColor fontSize fontName textColor insetFillColor disabledTextColor footerFillColor controlFillColor1 controlFillColor2 scrollBarThumbFillColor".split(" ");ea.call(this,a,k.ln.get("window-movieprop-title"),1200,Bc.pickValue(570,
620),!0,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieProperties"]=ls;ls.__name__="com.tilbuci.ui.window.movie.WindowMovieProperties";ls.__super__=ea;ls.prototype=I(ea.prototype,{_cssArea:null,_acstart:null,_acsnippet:null,_thColors:null,_favicon:null,_image:null,_loadingic:null,startInterface:function(a){this.ui.createHContainer("images");a=new Nj("v",10,6710886);a.set_width(245);a.set_height(210);this.ui.createLabel("favicon",k.ln.get("window-movieprop-favicon"),ia.VARIANT_DETAIL,a);this.ui.createButton("favicon",
k.ln.get("window-movieprop-faviconset"),m(this,this.onFavicon),a);this.ui.createButton("faviconc",k.ln.get("window-movieprop-faviconclear"),m(this,this.onFaviconClear),a);this._favicon=new ad(m(this,this.onFaviconLoaded));this._favicon.set_width(this._favicon.set_height(32));a.addChild(this._favicon);var b=new Nj("v",10,6710886);b.set_width(245);b.set_height(210);this.ui.createLabel("image",k.ln.get("window-movieprop-image"),ia.VARIANT_DETAIL,b);this.ui.createButton("image",k.ln.get("window-movieprop-imageset"),
m(this,this.onImage),b);this.ui.createButton("imagec",k.ln.get("window-movieprop-imageclear"),m(this,this.onImageClear),b);this._image=new ad(m(this,this.onImageLoaded));this._image.set_width(this._image.set_height(32));b.addChild(this._image);this.ui.hcontainers.h.images.addChild(a);this.ui.hcontainers.h.images.addChild(b);this.ui.hcontainers.h.images.set_width(500);a=k.ln.get("window-movieprop-about");var c=b=this.ui,d={tp:"Label",id:"moviename",tx:k.ln.get("window-movienew-name"),vr:ia.VARIANT_DETAIL},
f={tp:"Label",id:"movieauthor",tx:k.ln.get("window-movienew-author"),vr:ia.VARIANT_DETAIL},g={tp:"Label",id:"moviecopyright",tx:k.ln.get("window-movienew-copyright"),vr:ia.VARIANT_DETAIL},h={tp:"Label",id:"moviecopyleft",tx:k.ln.get("window-movienew-copyleft"),vr:ia.VARIANT_DETAIL},n=k.ln.get("window-movieprop-tags"),l=c.forge("leftabout",[d,{tp:"TInput",id:"moviename",tx:"",vr:""},f,{tp:"TInput",id:"movieauthor",tx:"",vr:""},g,{tp:"TInput",id:"moviecopyright",tx:"",vr:""},h,{tp:"TInput",id:"moviecopyleft",
tx:"",vr:""},{tp:"Label",id:"movietags",tx:n,vr:ia.VARIANT_DETAIL},{tp:"TInput",id:"movietags",tx:"",vr:""}]);c=this.ui;d={tp:"Label",id:"movieindex",tx:k.ln.get("window-movieprop-index"),vr:ia.VARIANT_DETAIL};f=k.ln.get("window-movienew-about");this.addForm(a,b.createColumnHolder("about",l,c.forge("rightabout",[d,{tp:"Select",id:"movieindex",vl:[],sl:""},{tp:"Label",id:"movieabout",tx:f,vr:ia.VARIANT_DETAIL},{tp:"TArea",id:"movieabout",tx:"",vr:"",en:!0,ht:130},{tp:"Custom",cont:this.ui.hcontainers.h.images}]),
this.ui.forge("bottomabout",[{tp:"Button",id:"saveabout",tx:k.ln.get("window-movieprop-saveabout"),ac:m(this,this.onSaveAbout)}]),440));this.ui.createHContainer("imagesinteraction");a=new Nj("v",0,6710886);a.set_width(395);a.set_height(210);this.ui.createLabel("loadingic",k.ln.get("window-movieprop-loading"),ia.VARIANT_DETAIL,a);this.ui.createButton("loadingic",k.ln.get("window-movieprop-loadingset"),m(this,this.onLoadingIc),a);this.ui.createButton("loadingicclear",k.ln.get("window-movieprop-loadingclear"),
m(this,this.onLoadingIcClear),a);this._loadingic=new Ok(m(this,this.onLoadingLoaded));this._loadingic.set_width(this._loadingic.set_height(32));a.addChild(this._loadingic);this.ui.hcontainers.h.imagesinteraction.addChild(a);this.ui.hcontainers.h.imagesinteraction.set_width(405);a=k.ln.get("window-movieprop-animation");b=this.ui;c={tp:"Label",id:"movietime",tx:k.ln.get("window-movienew-timeframe"),vr:ia.VARIANT_DETAIL};d={tp:"Select",id:"movietime",vl:[{text:k.ln.get("window-movienew-time025"),value:"0.25"},
{text:k.ln.get("window-movienew-time050"),value:"0.50"},{text:k.ln.get("window-movienew-time100"),value:"1.00"},{text:k.ln.get("window-movienew-time150"),value:"1.50"},{text:k.ln.get("window-movienew-time200"),value:"2.00"},{text:k.ln.get("window-movienew-time250"),value:"2.50"},{text:k.ln.get("window-movienew-time300"),value:"3.00"},{text:k.ln.get("window-movienew-time350"),value:"3.50"},{text:k.ln.get("window-movienew-time400"),value:"4.00"},{text:k.ln.get("window-movienew-time450"),value:"4.50"},
{text:k.ln.get("window-movienew-time500"),value:"5.00"}],sl:"1.00"};f={tp:"Label",id:"movieorigin",tx:k.ln.get("window-movieprop-origin"),vr:ia.VARIANT_DETAIL};g={tp:"Select",id:"movieorigin",vl:[{text:k.ln.get("window-movieprop-ornone"),value:"none"},{text:k.ln.get("window-movieprop-oralpha"),value:"alpha"},{text:k.ln.get("window-movieprop-orcenter"),value:"center"},{text:k.ln.get("window-movieprop-ortop"),value:"top"},{text:k.ln.get("window-movieprop-ortopkeep"),value:"topkeep"},{text:k.ln.get("window-movieprop-orbottom"),
value:"bottom"},{text:k.ln.get("window-movieprop-orbottomkeep"),value:"bottomkeep"},{text:k.ln.get("window-movieprop-orleft"),value:"left"},{text:k.ln.get("window-movieprop-orleftkeep"),value:"leftkeep"},{text:k.ln.get("window-movieprop-orright"),value:"right"},{text:k.ln.get("window-movieprop-orrightkeep"),value:"rightkeep"}],sl:"alpha"};h={tp:"Label",id:"movieanimation",tx:k.ln.get("window-movieprop-interpolation"),vr:ia.VARIANT_DETAIL};n={tp:"Label",id:"moviehighlight",tx:k.ln.get("window-movieprop-highlight"),
vr:ia.VARIANT_DETAIL};l={tp:"Custom",id:"moveilodingbt",cont:this.ui.hcontainers.h.imagesinteraction};var q=k.ln.get("window-movieprop-saveanim");this.addForm(a,b.forge("anim",[c,d,f,g,h,{tp:"Select",id:"movieanimation",vl:[{text:"Linear",value:"linear"},{text:"Bounce.easeIn",value:"bounce.in"},{text:"Bounce.easeOut",value:"bounce.out"},{text:"Bounce.easeInOut",value:"bounce.inout"},{text:"Cubic.easeIn",value:"cubic.in"},{text:"Cubic.easeOut",value:"cubic.out"},{text:"Cubic.easeInOut",value:"cubic.inout"},
{text:"Elastic.easeIn",value:"elastic.in"},{text:"Elastic.easeOut",value:"elastic.out"},{text:"Elastic.easeInOut",value:"elastic.inout"},{text:"Expo.easeIn",value:"expo.in"},{text:"Expo.easeOut",value:"expo.out"},{text:"Expo.easeInOut",value:"expo.inout"},{text:"Quad.easeIn",value:"quad.in"},{text:"Quad.easeOut",value:"quad.out"},{text:"Quad.easeInOut",value:"quad.inout"},{text:"Quart.easeIn",value:"quart.in"},{text:"Quart.easeOut",value:"quart.out"},{text:"Quart.easeInOut",value:"quart.inout"},{text:"Quint.easeIn",
value:"quint.in"},{text:"Quint.easeOut",value:"quint.out"},{text:"Quint.easeInOut",value:"quint.inout"},{text:"Sine.easeIn",value:"sine.in"},{text:"Sine.easeOut",value:"sine.out"},{text:"Sine.easeInOut",value:"sine.inout"}],sl:"linear"},n,{tp:"TInput",id:"moviehighlight",tx:"",vr:""},l,{tp:"Spacer",id:"animspacer",ht:20},{tp:"Button",id:"saveanim",tx:q,ac:m(this,this.onSaveAnim)}]));a=k.ln.get("window-movieprop-display");b=this.ui;c={tp:"Label",id:"moviesizebig",tx:k.ln.get("window-movienew-sizebig"),
vr:ia.VARIANT_DETAIL};d={tp:"Label",id:"moviesizesmall",tx:k.ln.get("window-movienew-sizesmall"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"moviesizetype",tx:k.ln.get("window-movienew-sizetype"),vr:ia.VARIANT_DETAIL};g={tp:"Select",id:"moviesizetype",vl:[{text:k.ln.get("window-movienew-sizeboth"),value:"both"},{text:k.ln.get("window-movienew-sizeportrait"),value:"portrait"},{text:k.ln.get("window-movienew-sizelandscape"),value:"landscape"}],sl:"both"};h={tp:"Label",id:"moviecolor",tx:k.ln.get("window-movieprop-bgcolor"),
vr:ia.VARIANT_DETAIL};n={tp:"Button",id:"savedisplay",tx:k.ln.get("window-movieprop-savedisplay"),ac:m(this,this.onSaveDisplay)};l=k.ln.get("window-movieprop-savedisplayabout");this.addForm(a,b.forge("display",[c,{tp:"Numeric",id:"moviesizebig",mn:100,mx:3840,st:50,vl:1920},d,{tp:"Numeric",id:"moviesizesmall",mn:100,mx:3840,st:50,vl:1080},f,g,h,{tp:"TInput",id:"moviecolor",tx:"",vr:""},{tp:"Spacer",id:"displayspacer",ht:210},n,{tp:"Label",id:"savedisplay",tx:l,vr:ia.VARIANT_DETAIL}]));this.ui.labels.h.savedisplay.set_wordWrap(!0);
a=this.ui.createContainer("css");a.addChild(this.ui.createLabel("csslabel",k.ln.get("window-movieprop-cssabout"),ia.VARIANT_DETAIL));this._cssArea=new gp("css");a.addChild(this._cssArea);this._cssArea.set_width(1156);this._cssArea.set_height(400);a.addChild(this.ui.createSpacer("cssspacer",15));a.addChild(this.ui.createButton("savecss",k.ln.get("window-movieprop-savecss"),m(this,this.onSaveCss)));this.addForm(k.ln.get("window-movieprop-css"),a);n=new Pi;n.addChild(this.ui.createButton("fontmoviecopy",
k.ln.get("window-movieprop-fontcopymv"),m(this,this.onFontMovie),null,!1));n.addChild(this.ui.createButton("fontmovieremove",k.ln.get("window-movieprop-fontdeletemv"),m(this,this.onFontMovie),null,!1));n.setWidth(560);l=new Pi;l.addChild(this.ui.createButton("fontadd",k.ln.get("window-movieprop-fontselect"),m(this,this.onFontAdd),null,!1));l.addChild(this.ui.createButton("fontupload",k.ln.get("window-movieprop-fontupload"),m(this,this.onFontUpload),null,!1));l.setWidth(560);g=[];a=0;for(b=k.fonts.length;a<
b;)c=a++,g.push({text:k.fonts[c],value:k.fonts[c]});q=[];a=0;for(b=p.mdata.fonts;a<b.length;)c=b[a],++a,q.push({text:c.name,value:c.name});a=k.ln.get("window-movieprop-fonts");c=b=this.ui;d={tp:"Label",id:"fontssystem",tx:k.ln.get("window-movieprop-systemfonts"),vr:ia.VARIANT_DETAIL};f=k.ln.get("window-movieprop-fontcopy");g=c.forge("systemfonts",[d,{tp:"List",id:"fontssystemlist",vl:g,ht:415,sl:""},{tp:"Button",id:"fontssystembt",tx:f,ac:m(this,this.onFontSystem)}]);c=this.ui;d={tp:"Label",id:"fontsmovie",
tx:k.ln.get("window-movieprop-moviefonts"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"fontfile",tx:k.ln.get("window-setup-font-file"),vr:ia.VARIANT_DETAIL};h=k.ln.get("window-setup-font-name");this.addForm(a,b.createColumnHolder("fonts",g,c.forge("moviefonts",[d,{tp:"List",id:"fontsmovielist",vl:q,ht:252,sl:""},{tp:"Custom",cont:n},{tp:"Spacer",id:"fontspacer",ht:20,ln:!1},f,{tp:"TInput",id:"fontfile",tx:"",vr:""},{tp:"Label",id:"fontname",tx:h,vr:ia.VARIANT_DETAIL},{tp:"TInput",id:"fontname",tx:"",
vr:""},{tp:"Custom",cont:l}])));c=new Pi;c.addChild(this.ui.createButton("snippetsload",k.ln.get("window-movieprop-snippetsload"),m(this,this.onSnLoad),null,!1));c.addChild(this.ui.createButton("snippetsdel",k.ln.get("window-movieprop-snippetsdel"),m(this,this.onSnDel),null,!1));c.setWidth(560);this._acsnippet=new jj(560,314);a=k.ln.get("window-movieprop-snippets");b=this.ui;c=this.ui.forge("leftsnippets",[{tp:"Label",id:"snippetslist",tx:k.ln.get("window-movieprop-snippetslist"),vr:ia.VARIANT_DETAIL},
{tp:"List",id:"snippetslist",vl:[],ht:360,sl:""},{tp:"Custom",cont:c}]);d=this.ui;f={tp:"Label",id:"snippetsname",tx:k.ln.get("window-movieprop-snippetsname"),vr:ia.VARIANT_DETAIL};g={tp:"Label",id:"snippetscode",tx:k.ln.get("window-movieprop-snippetscode"),vr:ia.VARIANT_DETAIL};h={tp:"Custom",cont:this._acsnippet};n=k.ln.get("window-movieprop-snippetsadd");this.addForm(a,b.createColumnHolder("snippets",c,d.forge("rightsnippets",[f,{tp:"TInput",id:"snippetsname",tx:"",vr:""},g,h,{tp:"Button",id:"snippetsadd",
tx:n,ac:m(this,this.onSnAdd)}]),this.ui.forge("bottomsnippets",[{tp:"Button",id:"snippetssave",tx:k.ln.get("window-movieprop-snippetssave"),ac:m(this,this.onSaveSnippets)}]),440));this.ui.containers.h.bottomsnippets.set_width(1200);this.snippetsList();a=this.ui.createContainer("acstart");a.addChild(this.ui.createLabel("acstartlabel",k.ln.get("window-movieprop-acstartabout"),ia.VARIANT_DETAIL));this._acstart=new jj(1156,405);this._acstart.setText(p.mdata.acstart);a.addChild(this._acstart);a.addChild(this.ui.createSpacer("acstartspacer",
15));a.addChild(this.ui.createButton("saveacstart",k.ln.get("window-movieprop-acstartbt"),m(this,this.onSaveAcstart)));this.addForm(k.ln.get("window-movieprop-acstart"),a);c=new Pi;c.addChild(this.ui.createButton("textsload",k.ln.get("window-movieprop-textsload"),m(this,this.onTxtLoad),null,!1));c.addChild(this.ui.createButton("textsdel",k.ln.get("window-movieprop-textsdel"),m(this,this.onTxtDel),null,!1));c.setWidth(560);a=k.ln.get("window-movieprop-texts");b=this.ui;c=this.ui.forge("lefttexts",
[{tp:"Label",id:"textslist",tx:k.ln.get("window-movieprop-textslist"),vr:ia.VARIANT_DETAIL},{tp:"List",id:"textslist",vl:[],ht:360,sl:""},{tp:"Custom",cont:c}]);d=this.ui;f={tp:"Label",id:"textsname",tx:k.ln.get("window-movieprop-textsname"),vr:ia.VARIANT_DETAIL};g={tp:"Label",id:"textsvalue",tx:k.ln.get("window-movieprop-textsvalue"),vr:ia.VARIANT_DETAIL};h={tp:"Button",id:"textsadd",tx:k.ln.get("window-movieprop-textsadd"),ac:m(this,this.onTxtAdd)};n={tp:"Button",id:"stringssend",tx:k.ln.get("window-movieprop-stringssend"),
ac:m(this,this.onStrSend)};l=k.ln.get("window-movieprop-stringsget");this.addForm(a,b.createColumnHolder("texts",c,d.forge("righttexts",[f,{tp:"TInput",id:"textsname",tx:"",vr:""},g,{tp:"TArea",id:"textsvalue",tx:"",vr:"",en:!0,ht:250},h,n,{tp:"Button",id:"stringsget",tx:l,ac:m(this,this.onStrGet)}]),this.ui.forge("bottomtexts",[{tp:"Button",id:"textsssave",tx:k.ln.get("window-movieprop-textssave"),ac:m(this,this.onSaveTexts)}]),440));this.ui.containers.h.bottomtexts.set_width(1200);this.textsList();
c=new Pi;c.addChild(this.ui.createButton("numbersload",k.ln.get("window-movieprop-numbersload"),m(this,this.onNumLoad),null,!1));c.addChild(this.ui.createButton("numbersdel",k.ln.get("window-movieprop-numbersdel"),m(this,this.onNumDel),null,!1));c.setWidth(560);a=k.ln.get("window-movieprop-numbers");b=this.ui;c=this.ui.forge("leftnumbers",[{tp:"Label",id:"numberslist",tx:k.ln.get("window-movieprop-numberslist"),vr:ia.VARIANT_DETAIL},{tp:"List",id:"numberslist",vl:[],ht:360,sl:""},{tp:"Custom",cont:c}]);
d=this.ui;f={tp:"Label",id:"numbersname",tx:k.ln.get("window-movieprop-numbersname"),vr:ia.VARIANT_DETAIL};g={tp:"Label",id:"numbersvalue",tx:k.ln.get("window-movieprop-numbersvalue"),vr:ia.VARIANT_DETAIL};h=k.ln.get("window-movieprop-numbersadd");this.addForm(a,b.createColumnHolder("numbers",c,d.forge("rightnumbers",[f,{tp:"TInput",id:"numbersname",tx:"",vr:""},g,{tp:"Numeric",id:"numbersvalue",mn:-1E9,mx:1E9,st:.5,vl:0},{tp:"Spacer",id:"fontspacer",ht:20,ln:!1},{tp:"Button",id:"numbersadd",tx:h,
ac:m(this,this.onNumAdd)}]),this.ui.forge("bottomnumbers",[{tp:"Button",id:"numbersssave",tx:k.ln.get("window-movieprop-numberssave"),ac:m(this,this.onSaveNumbers)}]),440));this.ui.containers.h.bottomnumbers.set_width(1200);this.numbersList();c=new Pi;c.addChild(this.ui.createButton("flagsload",k.ln.get("window-movieprop-flagsload"),m(this,this.onFlagLoad),null,!1));c.addChild(this.ui.createButton("flagsdel",k.ln.get("window-movieprop-flagsdel"),m(this,this.onFlagDel),null,!1));c.setWidth(560);a=
k.ln.get("window-movieprop-flags");b=this.ui;c=this.ui.forge("leftflags",[{tp:"Label",id:"flagslist",tx:k.ln.get("window-movieprop-flagslist"),vr:ia.VARIANT_DETAIL},{tp:"List",id:"flagslist",vl:[],ht:360,sl:""},{tp:"Custom",cont:c}]);d=this.ui;f={tp:"Label",id:"flagsname",tx:k.ln.get("window-movieprop-flagsname"),vr:ia.VARIANT_DETAIL};g={tp:"Label",id:"flagsvalue",tx:k.ln.get("window-movieprop-flagsvalue"),vr:ia.VARIANT_DETAIL};h=k.ln.get("window-movieprop-flagsadd");this.addForm(a,b.createColumnHolder("flags",
c,d.forge("rightflags",[f,{tp:"TInput",id:"flagsname",tx:"",vr:""},g,{tp:"Toggle",id:"flagsvalue",vl:!1},{tp:"Spacer",id:"flagspacer",ht:20,ln:!1},{tp:"Button",id:"flagsadd",tx:h,ac:m(this,this.onFlagAdd)}]),this.ui.forge("bottomflags",[{tp:"Button",id:"flagsssave",tx:k.ln.get("window-movieprop-flagssave"),ac:m(this,this.onSaveFlags)}]),440));this.ui.containers.h.bottomflags.set_width(1200);this.flagsList();n=new Nj("v",10,6710886);a=0;for(b=this._thColors;a<b.length;)c=b[a],++a,this.ui.createLabel(c,
k.ln.get("window-movieprop-theme-"+c),ia.VARIANT_DETAIL,n),this.ui.createTInput(c,"","",n);n.set_width(1160);n.set_height(400);a=k.ln.get("window-movieprop-theme");b=this.ui;c={tp:"Label",id:"themeabout",tx:k.ln.get("window-movieprop-themeabout"),vr:""};d=k.ln.get("window-movieprop-themesave");this.addForm(a,b.forge("theme",[c,{tp:"Custom",cont:n},{tp:"Spacer",id:"themespacer",ht:10,ln:!1},{tp:"Button",id:"themesave",tx:d,ac:m(this,this.onThemeSave)}]));this.ui.labels.h.themeabout.set_wordWrap(!0);
a=[{text:k.ln.get("window-movieprop-input-opnothing"),value:"nothing"},{text:k.ln.get("window-movieprop-input-opup"),value:"up"},{text:k.ln.get("window-movieprop-input-opdown"),value:"down"},{text:k.ln.get("window-movieprop-input-opleft"),value:"left"},{text:k.ln.get("window-movieprop-input-opright"),value:"right"},{text:k.ln.get("window-movieprop-input-opnin"),value:"nin"},{text:k.ln.get("window-movieprop-input-opnout"),value:"nout"},{text:k.ln.get("window-movieprop-input-opsnippet"),value:""},{text:k.ln.get("window-movieprop-input-opnextkf"),
value:"nextkf"},{text:k.ln.get("window-movieprop-input-opprevkf"),value:"prevkf"},{text:k.ln.get("window-movieprop-input-opfirstkf"),value:"firstkf"},{text:k.ln.get("window-movieprop-input-oplastkf"),value:"lastkf"},{text:k.ln.get("window-movieprop-input-optarget"),value:"target"}];n=new Nj("v",0,6710886);b=p.mdata.inputs.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)l=b[d++],this.ui.createLabel("input-"+l,k.ln.get("window-movieprop-input-"+l),ia.VARIANT_DETAIL,n),f=new Pi,this.ui.createSelect("input-"+
l,a,null,f,!1),this.ui.createTInput("input-"+l,"","",f,!1),f.setWidth(1140),n.addChild(f),this.ui.createSpacer("input-"+l,5,!1,n);n.set_width(1160);n.set_height(400);a=k.ln.get("window-movieprop-input");b=this.ui;c={tp:"Label",id:"inputabout",tx:k.ln.get("window-movieprop-inputabout"),vr:""};d=k.ln.get("window-movieprop-inputsave");this.addForm(a,b.forge("input",[c,{tp:"Custom",cont:n},{tp:"Spacer",id:"inputspacer",ht:10,ln:!1},{tp:"Button",id:"inputsave",tx:d,ac:m(this,this.onInputSave)}]));this.ui.labels.h.inputabout.set_wordWrap(!0);
n=new Nj("v",10,6710886);a=b=k.plugins.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)l=a[b[d++]],f=!1,q=p.mdata.plugins,g=l.get_plname(),Object.prototype.hasOwnProperty.call(q.h,g)&&(f=p.mdata.plugins,q=l.get_plname(),f=f.h[q].active),this.ui.createLabel("pl-"+l.get_plname(),l.get_pltitle(),ia.VARIANT_DETAIL,n),this.ui.createToggle("pl-"+l.get_plname(),f,n);n.set_width(1060);n.set_height(400);a=k.ln.get("window-movieprop-plugins");b=this.ui;c={tp:"Label",id:"plugins",tx:k.ln.get("window-movieprop-plavailable"),
vr:""};d=k.ln.get("window-movieprop-plbt");this.addForm(a,b.forge("plugins",[c,{tp:"Custom",cont:n},{tp:"Spacer",id:"plugins",ht:10,ln:!1},{tp:"Button",id:"plugins",tx:d,ac:m(this,this.onPluginSave)}]));a=k.ln.get("window-movieprop-access");b=this.ui;c={tp:"Label",id:"moviekey",tx:k.ln.get("window-movieprop-key"),vr:ia.VARIANT_DETAIL};d={tp:"Label",id:"login",tx:k.ln.get("window-movieprop-accesslogin"),vr:ia.VARIANT_DETAIL};f={tp:"Select",id:"login",vl:[{text:k.ln.get("window-movieprop-accessno"),
value:!1},{text:k.ln.get("window-movieprop-accessyes"),value:!0}],sl:null};g={tp:"Label",id:"encrypt",tx:k.ln.get("window-movieprop-encrypted"),vr:ia.VARIANT_DETAIL};h={tp:"Select",id:"encrypt",vl:[{text:k.ln.get("window-movieprop-accessno"),value:!1},{text:k.ln.get("window-movieprop-accessyes"),value:!0}],sl:null};n={tp:"Label",id:"group",tx:k.ln.get("window-movieprop-accessgroup"),vr:ia.VARIANT_DETAIL};l={tp:"Label",id:"fallback",tx:k.ln.get("window-movieprop-accessfallback"),vr:ia.VARIANT_DETAIL};
q=k.ln.get("window-movieprop-accessbt");this.addForm(a,b.forge("access",[c,{tp:"TInput",id:"moviekey",tx:"",vr:""},d,f,g,h,n,{tp:"List",id:"group",vl:[],sl:[],ht:190},l,{tp:"Select",id:"fallback",vl:[],sl:[]},{tp:"Spacer",id:"access",ht:12,ln:!1},{tp:"Button",id:"access",tx:q,ac:m(this,this.onAccess)}]));this.ui.lists.h.group.set_allowMultipleSelection(!0);ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},action:function(a,b){switch(a){case "browsefavicon":this._favicon.load(b.h.file);
break;case "browseimage":this._image.load(b.h.file);break;case "browseloadingic":this._loadingic.frames=b.h.frames,this._loadingic.frtime=b.h.frtime,this._loadingic.load(b.h.file)}},acStart:function(){this.ui.inputs.h.moviename.set_text(p.mdata.title);this.ui.inputs.h.movieauthor.set_text(p.mdata.author);this.ui.inputs.h.moviecopyright.set_text(p.mdata.copyright);this.ui.inputs.h.moviecopyleft.set_text(p.mdata.copyleft);this.ui.inputs.h.movietags.set_text(p.mdata.tags.join(", "));this.ui.tareas.h.movieabout.set_text(p.mdata.description);
var a="";p.mdata.key!=""&&(a=Ga.decryptKey(p.mdata.key,"skey",p.secret));this.ui.inputs.h.moviekey.set_text(a);p.mdata.favicon==""?this._favicon.unload():this._favicon.load(p.mdata.favicon);p.mdata.image==""?this._image.unload():this._image.load(p.mdata.image);p.mdata.loadingic[0]==""?(this._loadingic.unload(),this._loadingic.set_visible(!1)):(this._loadingic.frames=H.parseInt(p.mdata.loadingic[1]),this._loadingic.frtime=H.parseInt(p.mdata.loadingic[2]),this._loadingic.load(p.mdata.loadingic[0]));
this.ui.setSelectOptions("movieindex",[]);var b=k.ws;a=new G;var c=p.movie.get_mvId();a.h.movie=c;b.send("Scene/List",a,m(this,this.onSceneList));this.ui.setSelectValue("movietime",p.mdata.time);this.ui.setSelectValue("movieorigin",p.mdata.origin);this.ui.setSelectValue("movieanimation",p.mdata.animation);p.mdata.highlightInt==null?this.ui.inputs.h.moviehighlight.set_text(""):this.ui.inputs.h.moviehighlight.set_text("0x"+N.hex(p.mdata.highlightInt));this.ui.numerics.h.moviesizebig.set_value(p.mdata.screen.big);
this.ui.numerics.h.moviesizesmall.set_value(p.mdata.screen.small);this.ui.setSelectValue("moviesizetype",p.mdata.screen.type);this.ui.inputs.h.moviecolor.set_text("0x"+N.hex(p.mdata.screen.bgcolor));this._cssArea.set_text(p.mdata.style);this._acstart.setText(p.mdata.acstart);this.snippetsList();b=Ga.jsonParse(p.mdata.theme);if(b!=0)for(a=0,c=y.fields(b);a<c.length;){var d=c[a];++a;Object.prototype.hasOwnProperty.call(this.ui.inputs.h,d)&&this.ui.inputs.h[d].set_text(y.field(b,d))}b=p.mdata.inputs.h;
b=Object.keys(b);c=b.length;for(d=0;d<c;){var f=b[d++];a=p.mdata.inputs.h[f];if(a==null)this.ui.setSelectValue("input-"+f,""),this.ui.inputs.h["input-"+f].set_text(p.mdata.inputs.h[f]);else switch(a){case "down":this.ui.setSelectValue("input-"+f,"down");this.ui.inputs.h["input-"+f].set_text("");break;case "firstkf":this.ui.setSelectValue("input-"+f,"firstkf");this.ui.inputs.h["input-"+f].set_text("");break;case "lastkf":this.ui.setSelectValue("input-"+f,"lastkf");this.ui.inputs.h["input-"+f].set_text("");
break;case "left":this.ui.setSelectValue("input-"+f,"left");this.ui.inputs.h["input-"+f].set_text("");break;case "nextkf":this.ui.setSelectValue("input-"+f,"nextkf");this.ui.inputs.h["input-"+f].set_text("");break;case "nin":this.ui.setSelectValue("input-"+f,"nin");this.ui.inputs.h["input-"+f].set_text("");break;case "nothing":this.ui.setSelectValue("input-"+f,"nothing");this.ui.inputs.h["input-"+f].set_text("");break;case "nout":this.ui.setSelectValue("input-"+f,"nout");this.ui.inputs.h["input-"+
f].set_text("");break;case "prevkf":this.ui.setSelectValue("input-"+f,"prevkf");this.ui.inputs.h["input-"+f].set_text("");break;case "right":this.ui.setSelectValue("input-"+f,"right");this.ui.inputs.h["input-"+f].set_text("");break;case "target":this.ui.setSelectValue("input-"+f,"target");this.ui.inputs.h["input-"+f].set_text("");break;case "up":this.ui.setSelectValue("input-"+f,"up");this.ui.inputs.h["input-"+f].set_text("");break;default:this.ui.setSelectValue("input-"+f,""),this.ui.inputs.h["input-"+
f].set_text(p.mdata.inputs.h[f])}}a=b=k.plugins.h;b=Object.keys(b);c=b.length;for(d=0;d<c;){f=a[b[d++]];var g=!1,h=p.mdata.plugins,n=f.get_plname();Object.prototype.hasOwnProperty.call(h.h,n)&&(g=p.mdata.plugins,h=f.get_plname(),g=g.h[h].active);h=this.ui.toggles;f="pl-"+f.get_plname();h.h[f].set_selected(g)}},onSaveAbout:function(a){a="";this.ui.selects.h.movieindex.get_selectedItem()!=null&&(a=this.ui.selects.h.movieindex.get_selectedItem().value);a=Ga.jsonStringify({author:this.ui.inputs.h.movieauthor.get_text(),
title:this.ui.inputs.h.moviename.get_text(),copyright:this.ui.inputs.h.moviecopyright.get_text(),copyleft:this.ui.inputs.h.moviecopyleft.get_text(),tags:this.ui.inputs.h.movietags.get_text(),about:this.ui.tareas.h.movieabout.get_text(),start:a,favicon:this._favicon.get_lastMedia(),image:this._image.get_lastMedia()});var b=k.ws,c=new G,d=p.movie.get_mvId();c.h.id=d;c.h.data=a;b.send("Movie/Update",c,m(this,this.onSaveReturn))},onSaveDisplay:function(a){a=N.replace(this.ui.inputs.h.moviecolor.get_text(),
"#","0x");V.substr(a,0,2)!="0x"&&(a="0x"+a);H.parseInt(a)==null?this.ui.inputs.h.moviecolor.set_text("0x"+N.hex(p.mdata.screen.bgcolor)):this.ui.inputs.h.moviecolor.set_text(a);a=Ga.jsonStringify({bigsize:Math.round(this.ui.numerics.h.moviesizebig.get_value()),smallsize:Math.round(this.ui.numerics.h.moviesizesmall.get_value()),typesize:this.ui.selects.h.moviesizetype.get_selectedItem().value,bgcolor:this.ui.inputs.h.moviecolor.get_text()});var b=k.ws,c=new G,d=p.movie.get_mvId();c.h.id=d;c.h.data=
a;b.send("Movie/Update",c,m(this,this.onSaveReturn))},onSaveAnim:function(a){a=N.replace(this.ui.inputs.h.moviehighlight.get_text(),"#","0x");V.substr(a,0,2)!="0x"&&(a="0x"+a);H.parseInt(a)==null?this.ui.inputs.h.moviehighlight.set_text(""):this.ui.inputs.h.moviehighlight.set_text(a);a=["","",""];this._loadingic.get_mediaLoaded()&&(a=[this._loadingic.get_lastMedia(),H.string(this._loadingic.frames),H.string(this._loadingic.frtime)]);a=Ga.jsonStringify({time:this.ui.selects.h.movietime.get_selectedItem().value,
origin:this.ui.selects.h.movieorigin.get_selectedItem().value,animation:this.ui.selects.h.movieanimation.get_selectedItem().value,highlight:this.ui.inputs.h.moviehighlight.get_text(),loadingic:Ga.jsonStringify(a)});var b=k.ws,c=new G,d=p.movie.get_mvId();c.h.id=d;c.h.data=a;b.send("Movie/Update",c,m(this,this.onSaveReturn))},onSaveCss:function(a){a=Ga.jsonStringify({css:this._cssArea.get_text()});var b=k.ws,c=new G,d=p.movie.get_mvId();c.h.id=d;c.h.data=a;b.send("Movie/Update",c,m(this,this.onSaveReturn))},
onSaveAcstart:function(a){a=Ga.jsonParse(this._acstart.getText());if(this._acstart.getText()!=""&&a==0)this.ui.createWarning(k.ln.get("window-movieprop-acstart"),k.ln.get("window-movieprop-acstarterror"),300,180,this.stage);else{a=Ga.jsonStringify({acstart:this._acstart.getText()});var b=k.ws,c=new G,d=p.movie.get_mvId();c.h.id=d;c.h.data=a;b.send("Movie/Update",c,m(this,this.onSaveReturn))}},onSaveReturn:function(a,b){if(a)if(b.map.h.e==0){var c=b.map.h.list;a=0;for(var d=y.fields(c);a<d.length;){var f=
d[a];++a;switch(f){case "about":p.mdata.description=y.field(c,f);break;case "acstart":p.mdata.acstart=y.field(c,f);break;case "actions":f=Ga.jsonParse(y.field(c,f));f!=0&&(p.mdata.actions=f);break;case "animation":p.mdata.animation=y.field(c,f);p.area.setAnimation(p.mdata.animation);break;case "author":p.mdata.author=y.field(c,f);break;case "copyleft":p.mdata.copyleft=y.field(c,f);break;case "copyright":p.mdata.copyright=y.field(c,f);break;case "css":p.mdata.style=y.field(c,f);p.style.clear();p.style.parseCSS(p.mdata.style);
break;case "fallback":p.mdata.fallback=y.field(c,f);break;case "favicon":p.mdata.favicon=y.field(c,f);break;case "flags":f=Ga.jsonParse(y.field(c,f));if(f!=0){p.mdata.flags=new G;for(var g=0,h=y.fields(f);g<h.length;){var n=h[g];++g;var l=w.__cast(y.field(f,n),$v);p.mdata.flags.h[n]=l}}break;case "highlight":p.mdata.highlight=y.field(c,f);p.mdata.highlightInt=H.parseInt(p.mdata.highlight);break;case "identify":p.mdata.identify=y.field(c,f)=="1";break;case "image":p.mdata.image=y.field(c,f);break;
case "inputs":f=Ga.jsonParse(y.field(c,f));if(f!=0)for(g=0,h=y.fields(f);g<h.length;)n=h[g],++g,l=w.__cast(y.field(f,n),String),p.mdata.inputs.h[n]=l;break;case "key":p.mdata.key=y.field(c,f);break;case "loadingic":p.mdata.loadingic=Ga.jsonParse(y.field(c,f));break;case "numbers":f=Ga.jsonParse(y.field(c,f));if(f!=0)for(p.mdata.numbers=new G,g=0,h=y.fields(f);g<h.length;)n=h[g],++g,l=w.__cast(y.field(f,n),Iz),p.mdata.numbers.h[n]=l;break;case "origin":p.mdata.origin=y.field(c,f);break;case "plugins":g=
Object.keys(p.mdata.plugins.h);h=g.length;for(n=0;n<h;)l=g[n++],p.mdata.plugins.h[l].active=!1;f=y.field(c,f);if(f!="")for(f=f.split(","),g=0,h=f.length;g<h;)n=g++,Object.prototype.hasOwnProperty.call(p.mdata.plugins.h,f[n])&&(p.mdata.plugins.h[f[n]].active=!0);break;case "start":p.mdata.start=y.field(c,f);break;case "tags":p.mdata.tags=y.field(c,f).split(",");break;case "texts":f=Ga.jsonParse(y.field(c,f));if(f!=0)for(p.mdata.texts=new G,g=0,h=y.fields(f);g<h.length;)n=h[g],++g,l=w.__cast(y.field(f,
n),String),p.mdata.texts.h[n]=l;break;case "theme":p.mdata.theme=y.field(c,f);break;case "time":f=parseFloat(y.field(c,f));p.mdata.time=f;break;case "title":p.mdata.title=y.field(c,f);break;case "vsgroups":p.mdata.vsgroups=y.field(c,f).split(",")}}b.map.h.reload?(f=this._ac,a=new G,b=p.movie.get_mvId(),a.h.id=b,f("movieload",a),Aa.removePopUp(this)):this.ui.createWarning(k.ln.get("window-movieprop-popup"),k.ln.get("window-movieprop-popupok"),420,150,this.stage)}else this.ui.createWarning(k.ln.get("window-movieprop-popup"),
k.ln.get("window-movieprop-popuperror"),420,150,this.stage);else this.ui.createWarning(k.ln.get("window-movieprop-popup"),k.ln.get("window-movieprop-popuperror"),420,150,this.stage)},onFontSystem:function(a){this.ui.lists.h.fontssystemlist.get_selectedItem()!=null&&k.copyText(this.ui.lists.h.fontssystemlist.get_selectedItem().value)},onFontMovie:function(a){this.ui.lists.h.fontsmovielist.get_selectedItem()!=null&&k.copyText(this.ui.lists.h.fontsmovielist.get_selectedItem().value)},onFontAdd:function(a){k.up.browseForFont(m(this,
this.onFontSelected))},onFontSelected:function(a){a?(this.ui.inputs.h.fontfile.set_text(k.up.get_selectedName()),this.ui.inputs.h.fontname.get_text()==""&&(a=N.replace(k.up.get_selectedName(),".woff2",""),a=N.replace(a,".woff",""),a=N.replace(a,"-"," "),a=N.replace(a,"_"," "),this.ui.inputs.h.fontname.set_text(a))):this.ui.inputs.h.fontfile.set_text(this.ui.inputs.h.fontname.set_text(""))},onFontUpload:function(a){if(this.ui.inputs.h.fontfile.get_text()==""||this.ui.inputs.h.fontname.get_text()==
"")this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-nofilename"),300,180,this.stage);else{a=k.up;var b=new G,c=this.ui.inputs.h.fontname.get_text();b.h.name=c;c=p.movie.get_mvId();b.h.movie=c;a.uploadFont(m(this,this.fontReturn),b)||this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-nofont"),300,180,this.stage)}},fontReturn:function(a,b){if(a)if(b.h.e!=0)this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-uploader"),
300,180,this.stage);else{new nm(k.econfig.get_player()+"movie/"+p.movie.get_mvId()+".movie/media/font/"+H.string(b.h.fname),b.h.name,m(this,this.fontLoaded),!1);a=null;try{a=b.h.mfonts}catch(f){a=null}if(a!=null){p.mdata.fonts=a;b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d.name,value:d.name})}this.ui.setListValues("fontsmovielist",b);this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-uploadok"),300,200,this.stage)}else this.ui.createWarning(k.ln.get("window-setup-font-title"),
k.ln.get("window-setup-font-uploader"),300,180,this.stage)}else this.ui.createWarning(k.ln.get("window-setup-font-title"),k.ln.get("window-setup-font-uploader"),300,180,this.stage)},fontLoaded:function(a,b){},onSnLoad:function(a){this.ui.lists.h.snippetslist.get_selectedItem()!=null&&(this._acsnippet.setText(this.ui.lists.h.snippetslist.get_selectedItem().value),this.ui.inputs.h.snippetsname.set_text(this.ui.lists.h.snippetslist.get_selectedItem().text))},onSnDel:function(a){if(this.ui.lists.h.snippetslist.get_selectedItem()!=
null){a=[];for(var b=0,c=this.ui.lists.h.snippetslist.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.snippetslist.get_selectedItem().text!=this.ui.lists.h.snippetslist.get_dataProvider().get(d).text&&a.push(this.ui.lists.h.snippetslist.get_dataProvider().get(d))}this.ui.setListValues("snippetslist",a)}},onSnAdd:function(a){a=this._acsnippet.getText();if(a!=""&&this.ui.inputs.h.snippetsname.get_text()!="")if(Ga.jsonParse(a)==0)this.ui.createWarning(k.ln.get("window-movieprop-snippets"),
k.ln.get("window-movieprop-snippetserror"),300,180,this.stage);else{for(var b=[],c=0,d=this.ui.lists.h.snippetslist.get_dataProvider().get_length();c<d;){var f=c++;this.ui.lists.h.snippetslist.get_dataProvider().get(f).text!=this.ui.inputs.h.snippetsname.get_text()&&b.push({text:this.ui.lists.h.snippetslist.get_dataProvider().get(f).text,value:this.ui.lists.h.snippetslist.get_dataProvider().get(f).value})}b.push({text:this.ui.inputs.h.snippetsname.get_text(),value:a});this.ui.setListValues("snippetslist",
b);this.ui.inputs.h.snippetsname.set_text("");this._acsnippet.setText("")}},onSaveSnippets:function(a){var b=[];a=0;for(var c=this.ui.lists.h.snippetslist.get_dataProvider().get_length();a<c;){var d=a++;b.push({name:this.ui.lists.h.snippetslist.get_dataProvider().get(d).text,ac:this.ui.lists.h.snippetslist.get_dataProvider().get(d).value})}a=Ga.jsonStringify(b);b=Ga.jsonStringify({actions:a});c=k.ws;a=new G;d=p.movie.get_mvId();a.h.id=d;a.h.data=b;c.send("Movie/Update",a,m(this,this.onSaveReturn))},
snippetsList:function(){for(var a=[],b=0,c=p.mdata.actions.length;b<c;){var d=b++;a.push({text:p.mdata.actions[d].name,value:p.mdata.actions[d].ac})}this.ui.setListValues("snippetslist",a);this._acsnippet.setText("");this.ui.inputs.h.snippetsname.set_text("")},onTxtLoad:function(a){this.ui.lists.h.textslist.get_selectedItem()!=null&&(this.ui.inputs.h.textsname.set_text(this.ui.lists.h.textslist.get_selectedItem().text),this.ui.tareas.h.textsvalue.set_text(this.ui.lists.h.textslist.get_selectedItem().value))},
onTxtDel:function(a){if(this.ui.lists.h.textslist.get_selectedItem()!=null){a=[];for(var b=0,c=this.ui.lists.h.textslist.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.textslist.get_selectedItem().text!=this.ui.lists.h.textslist.get_dataProvider().get(d).text&&a.push(this.ui.lists.h.textslist.get_dataProvider().get(d))}this.ui.setListValues("textslist",a)}},onTxtAdd:function(a){a=[];for(var b=0,c=this.ui.lists.h.textslist.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.textslist.get_dataProvider().get(d).text!=
this.ui.inputs.h.textsname.get_text()&&a.push({text:this.ui.lists.h.textslist.get_dataProvider().get(d).text,value:this.ui.lists.h.textslist.get_dataProvider().get(d).value})}a.push({text:this.ui.inputs.h.textsname.get_text(),value:this.ui.tareas.h.textsvalue.get_text()});this.ui.inputs.h.textsname.set_text("");this.ui.tareas.h.textsvalue.set_text("");this.ui.setListValues("textslist",a)},onStrGet:function(a){a=k.ws;var b=new G;b.h.file="strings.json";var c=p.movie.get_mvId();b.h.movie=c;a.download(b)},
onStrSend:function(a){k.up.selectFile(m(this,this.onStrSelected),"strings.json file","*.json")},onStrSelected:function(a,b){if(a)if(a=b.toString(),Ga.jsonParse(a)==0)k.showPopup(k.ln.get("window-movieprop-stringssend"),k.ln.get("window-movieprop-stringssendno"),320,150,k.ln.get("default-ok"));else{b=k.ws;var c=new G,d=p.movie.get_mvId();c.h.movie=d;c.h.strings=a;b.send("Media/StringsJSON",c,m(this,this.onStrSent))}else k.showMsg(k.ln.get("window-movieprop-stringssender"))},onStrSent:function(a,b){a?
b.map.h.e!="0"?k.showPopup(k.ln.get("window-movieprop-stringssend"),k.ln.get("window-movieprop-stringssendnosend"),320,150,k.ln.get("default-ok")):k.showMsg(k.ln.get("window-movieprop-stringssendok")):k.showPopup(k.ln.get("window-movieprop-stringssend"),k.ln.get("window-movieprop-stringssendnosend"),320,150,k.ln.get("default-ok"))},onSaveTexts:function(a){var b=new G;a=0;for(var c=this.ui.lists.h.textslist.get_dataProvider().get_length();a<c;){var d=a++,f=this.ui.lists.h.textslist.get_dataProvider().get(d).text;
d=this.ui.lists.h.textslist.get_dataProvider().get(d).value;b.h[f]=d}b=Ga.jsonStringify({texts:Ga.jsonStringify(b)});c=k.ws;a=new G;f=p.movie.get_mvId();a.h.id=f;a.h.data=b;c.send("Movie/Update",a,m(this,this.onSaveReturn))},textsList:function(){for(var a=[],b=Object.keys(p.mdata.texts.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:f,value:p.mdata.texts.h[f]})}this.ui.setListValues("textslist",a)},onNumLoad:function(a){this.ui.lists.h.numberslist.get_selectedItem()!=null&&(this.ui.inputs.h.numbersname.set_text(this.ui.lists.h.numberslist.get_selectedItem().text),
this.ui.numerics.h.numbersvalue.set_value(this.ui.lists.h.numberslist.get_selectedItem().value))},onNumDel:function(a){if(this.ui.lists.h.numberslist.get_selectedItem()!=null){a=[];for(var b=0,c=this.ui.lists.h.numberslist.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.numberslist.get_selectedItem().text!=this.ui.lists.h.numberslist.get_dataProvider().get(d).text&&a.push(this.ui.lists.h.numberslist.get_dataProvider().get(d))}this.ui.setListValues("numberslist",a)}},onNumAdd:function(a){a=
[];for(var b=0,c=this.ui.lists.h.numberslist.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.numberslist.get_dataProvider().get(d).text!=this.ui.inputs.h.numbersname.get_text()&&a.push({text:this.ui.lists.h.numberslist.get_dataProvider().get(d).text,value:this.ui.lists.h.numberslist.get_dataProvider().get(d).value})}a.push({text:this.ui.inputs.h.numbersname.get_text(),value:this.ui.numerics.h.numbersvalue.get_value()});this.ui.inputs.h.numbersname.set_text("");this.ui.numerics.h.numbersvalue.set_value(0);
this.ui.setListValues("numberslist",a)},onSaveNumbers:function(a){var b=new G;a=0;for(var c=this.ui.lists.h.numberslist.get_dataProvider().get_length();a<c;){var d=a++,f=this.ui.lists.h.numberslist.get_dataProvider().get(d).text;d=this.ui.lists.h.numberslist.get_dataProvider().get(d).value;b.h[f]=d}b=Ga.jsonStringify({numbers:Ga.jsonStringify(b)});c=k.ws;a=new G;f=p.movie.get_mvId();a.h.id=f;a.h.data=b;c.send("Movie/Update",a,m(this,this.onSaveReturn))},numbersList:function(){for(var a=[],b=Object.keys(p.mdata.numbers.h),
c=b.length,d=0;d<c;){var f=b[d++];a.push({text:f,value:p.mdata.numbers.h[f]})}this.ui.setListValues("numberslist",a)},onFlagLoad:function(a){this.ui.lists.h.flagslist.get_selectedItem()!=null&&(this.ui.inputs.h.flagsname.set_text(this.ui.lists.h.flagslist.get_selectedItem().text),this.ui.toggles.h.flagsvalue.set_selected(this.ui.lists.h.flagslist.get_selectedItem().value))},onFlagDel:function(a){if(this.ui.lists.h.flagslist.get_selectedItem()!=null){a=[];for(var b=0,c=this.ui.lists.h.flagslist.get_dataProvider().get_length();b<
c;){var d=b++;this.ui.lists.h.flagslist.get_selectedItem().text!=this.ui.lists.h.flagslist.get_dataProvider().get(d).text&&a.push(this.ui.lists.h.flagslist.get_dataProvider().get(d))}this.ui.setListValues("flagslist",a)}},onFlagAdd:function(a){a=[];for(var b=0,c=this.ui.lists.h.flagslist.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.flagslist.get_dataProvider().get(d).text!=this.ui.inputs.h.flagsname.get_text()&&a.push({text:this.ui.lists.h.flagslist.get_dataProvider().get(d).text,
value:this.ui.lists.h.flagslist.get_dataProvider().get(d).value})}a.push({text:this.ui.inputs.h.flagsname.get_text(),value:this.ui.toggles.h.flagsvalue.get_selected()});this.ui.inputs.h.flagsname.set_text("");this.ui.toggles.h.flagsvalue.set_selected(!1);this.ui.setListValues("flagslist",a)},onSaveFlags:function(a){var b=new G;a=0;for(var c=this.ui.lists.h.flagslist.get_dataProvider().get_length();a<c;){var d=a++,f=this.ui.lists.h.flagslist.get_dataProvider().get(d).text;d=this.ui.lists.h.flagslist.get_dataProvider().get(d).value;
b.h[f]=d}b=Ga.jsonStringify({flags:Ga.jsonStringify(b)});c=k.ws;a=new G;f=p.movie.get_mvId();a.h.id=f;a.h.data=b;c.send("Movie/Update",a,m(this,this.onSaveReturn))},flagsList:function(){for(var a=[],b=Object.keys(p.mdata.flags.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:f,value:p.mdata.flags.h[f]})}this.ui.setListValues("flagslist",a)},onThemeSave:function(a){var b=new G;a=0;for(var c=this._thColors;a<c.length;){var d=c[a];++a;if(this.ui.inputs.h[d].get_text()!=""){var f=N.replace(this.ui.inputs.h[d].get_text(),
"#","0x");b.h[d]=f}}b=Ga.jsonStringify({theme:Ga.jsonStringify(b)});c=k.ws;a=new G;d=p.movie.get_mvId();a.h.id=d;a.h.data=b;c.send("Movie/Update",a,m(this,this.onSaveReturn))},onInputSave:function(a){a=new G;for(var b=Object.keys(p.mdata.inputs.h),c=b.length,d=0;d<c;){var f=b[d++];switch(this.ui.selects.h["input-"+f].get_selectedItem().value){case "down":a.h[f]="down";break;case "firstkf":a.h[f]="firstkf";break;case "lastkf":a.h[f]="lastkf";break;case "left":a.h[f]="left";break;case "nextkf":a.h[f]=
"nextkf";break;case "nin":a.h[f]="nin";break;case "nothing":a.h[f]="nothing";break;case "nout":a.h[f]="nout";break;case "prevkf":a.h[f]="prevkf";break;case "right":a.h[f]="right";break;case "target":a.h[f]="target";break;case "up":a.h[f]="up";break;default:var g=this.ui.inputs.h["input-"+f].get_text();a.h[f]=g}}a=Ga.jsonStringify({inputs:Ga.jsonStringify(a)});b=k.ws;c=new G;d=p.movie.get_mvId();c.h.id=d;c.h.data=a;b.send("Movie/Update",c,m(this,this.onSaveReturn))},onPluginSave:function(a){a=[];for(var b=
Object.keys(k.plugins.h),c=b.length,d=0;d<c;){var f=b[d++];this.ui.toggles.h["pl-"+f].get_selected()&&a.push(f)}a=Ga.jsonStringify({plugins:a.join(",")});b=k.ws;c=new G;d=p.movie.get_mvId();c.h.id=d;c.h.data=a;b.send("Movie/Update",c,m(this,this.onSaveReturn))},onAccess:function(a){var b="";this.ui.inputs.h.moviekey.get_text()!=""&&(b=Ga.encryptKey(this.ui.inputs.h.moviekey.get_text(),"skey",p.secret));var c="0";this.ui.selects.h.login.get_selectedItem().value==1&&(c="1");var d="0";this.ui.selects.h.encrypt.get_selectedItem().value==
1&&(d="1");var f=[];a=0;for(var g=this.ui.lists.h.group.get_selectedItems();a<g.length;){var h=g[a];++a;f.push(h.value)}b=Ga.jsonStringify({key:b,identify:c,fallback:this.ui.selects.h.fallback.get_selectedItem().value,vsgroups:f.join(","),encrypt:d});c=k.ws;a=new G;d=p.movie.get_mvId();a.h.id=d;a.h.data=b;c.send("Movie/Update",a,m(this,this.onSaveReturn))},onFavicon:function(a){this._ac("browsefavicon")},onFaviconClear:function(a){this._favicon.unload()},onFaviconLoaded:function(a){this._favicon.set_width(this._favicon.set_height(80));
this._favicon.set_visible(!0)},onImage:function(a){this._ac("browseimage")},onImageClear:function(a){this._image.unload()},onImageLoaded:function(a){this._image.set_height(80);this._image.set_width(this._image.oWidth*this._image.get_height()/this._image.oHeight);this._image.get_width()>210&&(this._image.set_width(210),this._image.set_height(this._image.oHeight*this._image.get_width()/this._image.oWidth));this._image.set_visible(!0)},onLoadingIc:function(a){this._ac("browseloadingic")},onLoadingIcClear:function(a){this._loadingic.set_visible(!1);
this._loadingic.unload()},onLoadingLoaded:function(a){this._loadingic.set_height(80);this._loadingic.set_width(this._loadingic.oWidth*this._loadingic.get_height()/this._loadingic.oHeight);this._loadingic.set_visible(!0)},onSceneList:function(a,b){var c=[];if(a&&b.map.h.e==0){a=0;for(var d=y.fields(b.map.h.list);a<d.length;){var f=d[a];++a;f=y.field(b.map.h.list,f);Object.prototype.hasOwnProperty.call(f,"id")&&c.push({text:y.field(f,"title"),value:y.field(f,"id")})}}this.ui.setSelectOptions("movieindex",
c);this.ui.setSelectValue("movieindex",p.mdata.start);b=k.ws;a=new G;c=p.movie.get_mvId();a.h.movie=c;b.send("Visitor/Access",a,m(this,this.onAccessList))},onAccessList:function(a,b){this.ui.setSelectValue("fallback","");this.ui.setSelectValue("login",!1);this.ui.setSelectValue("encrypt",!1);this.ui.setListValues("group",[]);this.ui.setSelectOptions("fallback",[{text:k.ln.get("window-movieprop-accessnone"),value:""}]);if(a&&b.map.h.e==0){a=[{text:k.ln.get("window-movieprop-accessnone"),value:""}];
for(var c=0,d=y.fields(b.map.h.list);c<d.length;){var f=d[c];++c;f=y.field(b.map.h.list,f);a.push({text:y.field(f,"title"),value:y.field(f,"id")});this.ui.setSelectOptions("fallback",a)}this.ui.setSelectValue("fallback",p.mdata.fallback);a=[];c=0;for(d=y.fields(b.map.h.group);c<d.length;)f=d[c],++c,f=y.field(b.map.h.group,f),a.push({text:y.field(f,"name"),value:y.field(f,"id")}),this.ui.setListValues("group",a);this.ui.setListMultiValue("group",p.mdata.vsgroups);this.ui.setSelectValue("login",p.mdata.identify);
this.ui.setSelectValue("encrypt",p.mdata.encrypted)}},__class__:ls});var ns=function(a){ea.call(this,a,k.ln.get("window-movieremove-title"),700,Bc.pickValue(380,400),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieRemove"]=ns;ns.__name__="com.tilbuci.ui.window.movie.WindowMovieRemove";ns.__super__=ea;ns.prototype=I(ea.prototype,{startInterface:function(a){a=this.ui;var b={tp:"Label",id:"about",tx:k.ln.get("window-movieremove-about"),vr:ia.VARIANT_DETAIL},c=k.ln.get("window-movieremove-button");
this.addForm("list",a.forge("list",[b,{tp:"List",id:"list",vl:[],ht:250,sl:""},{tp:"Button",id:"remove",tx:c,ac:m(this,this.onRemove)}]));ea.prototype.startInterface.call(this);this.ui.labels.h.about.set_wordWrap(!0)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){var a=k.ws,b=new G;b.h.owner="true";a.send("Movie/List",b,m(this,this.onList))},onList:function(a,b){this.ui.setListSelectValue("list",null);this.ui.setListValues("list",[]);if(a&&b.map.h.e==0){a=[];for(var c=0,d=y.fields(b.map.h.list);c<
d.length;){var f=d[c];++c;f=y.field(b.map.h.list,f);a.push({text:y.field(f,"title"),value:y.field(f,"id")})}this.ui.setListValues("list",a)}},onRemove:function(a){this.ui.lists.h.list.get_selectedItem()!=null&&this.ui.createConfirm(k.ln.get("window-movieremove-title"),k.ln.get("window-movieremove-confirm"),480,240,m(this,this.onConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onConfirm:function(a){if(a&&this.ui.lists.h.list.get_selectedItem()!=null){a=k.ws;var b=new G,c=this.ui.lists.h.list.get_selectedItem().value;
b.h.id=c;a.send("Movie/Remove",b,m(this,this.onList))}},__class__:ns});var os=function(a){this._sequence=[];ea.call(this,a,k.ln.get("window-republish-title"),800,Bc.pickValue(180,200),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieRepublish"]=os;os.__name__="com.tilbuci.ui.window.movie.WindowMovieRepublish";os.__super__=ea;os.prototype=I(ea.prototype,{_sequence:null,startInterface:function(a){a=this.ui;var b={tp:"Label",id:"about",tx:k.ln.get("window-republish-about"),vr:""},c={tp:"Select",
id:"version",vl:[{text:k.ln.get("window-republish-current"),value:"current"},{text:k.ln.get("window-republish-newest"),value:"newest"}],sl:"current"},d=k.ln.get("window-republish-button");this.addForm("intr",a.forge("interface",[b,c,{tp:"Spacer",id:"rep",ht:20,ln:!1},{tp:"Button",id:"rep",tx:d,ac:m(this,this.onRepublish)}]));this.ui.labels.h.about.set_wordWrap(!0);ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.ui.setSelectValue("version",
"current")},onRepublish:function(a){a="false";this.ui.selects.h.version.get_selectedItem().value=="newest"&&(a="true");var b=k.ws,c=new G,d=p.movie.get_mvId();c.h.movie=d;c.h.newest=a;b.send("Movie/Republish",c,m(this,this.onReturn))},onReturn:function(a,b){a?b.map.h.e==0?this.ui.createWarning(k.ln.get("window-republish-title"),k.ln.get("window-republish-ok"),420,150,this.stage):this.ui.createWarning(k.ln.get("window-republish-title"),k.ln.get("window-republish-error"),420,150,this.stage):this.ui.createWarning(k.ln.get("window-republish-title"),
k.ln.get("window-republish-error"),420,150,this.stage)},__class__:os});var qs=function(a){this._sequence=[];ea.call(this,a,k.ln.get("window-movieseq-title"),800,Bc.pickValue(630,660),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieSequences"]=qs;qs.__name__="com.tilbuci.ui.window.movie.WindowMovieSequences";qs.__super__=ea;qs.prototype=I(ea.prototype,{_sequence:null,startInterface:function(a){var b=this.ui.createHContainer("order");b.addChild(new Rc("orderup",m(this,this.onUp),null,Z.getBitmapData("btUp"),
!1));b.addChild(new Rc("orderdown",m(this,this.onDown),null,Z.getBitmapData("btDown"),!1));b.setWidth(360);a=k.ln.get("window-movieseq-title");var c=this.ui,d=this.ui,f={tp:"Label",id:"scenes",tx:k.ln.get("window-movieseq-scenes"),vr:ia.VARIANT_DETAIL},g=k.ln.get("window-movieseq-add"),h=d.forge("leftcol",[f,{tp:"List",id:"scenes",vl:[],sl:null,ht:337},{tp:"Button",id:"scenes",tx:g,ac:m(this,this.onAdd)}]);d=this.ui;f={tp:"Label",id:"sequence",tx:k.ln.get("window-movieseq-sequence"),vr:ia.VARIANT_DETAIL};
g={tp:"Button",id:"sequenceremove",tx:k.ln.get("window-movieseq-remove"),ac:m(this,this.onRemove)};var n=k.ln.get("window-movieseq-clear");b=d.forge("rightcol",[f,{tp:"List",id:"sequence",vl:[],sl:null,ht:280},{tp:"Custom",cont:b},g,{tp:"Button",id:"sequenceclear",tx:n,ac:m(this,this.onClear)}]);d=this.ui;f={tp:"Label",id:"direction",tx:k.ln.get("window-movieseq-direction"),vr:ia.VARIANT_DETAIL};g={tp:"Select",id:"direction",vl:[{text:k.ln.get("window-movieseq-dirx"),value:"x"},{text:k.ln.get("window-movieseq-diry"),
value:"y"},{text:k.ln.get("window-movieseq-dirz"),value:"z"}],sl:"x"};n={tp:"Label",id:"connect",tx:k.ln.get("window-movieseq-connect"),vr:ia.VARIANT_DETAIL};var l=k.ln.get("window-movieseq-create");this.addForm(a,c.createColumnHolder("columns",h,b,d.forge("bottom",[f,g,n,{tp:"Toggle",id:"connect",vl:!0},{tp:"Spacer",id:"connect",ht:10,ln:!1},{tp:"Button",id:"create",tx:l,ac:m(this,this.onCreate)}]),410));this.ui.listDbClick("scenes",m(this,this.onAdd));this.ui.listDbClick("sequence",m(this,this.onRemove));
ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.ui.setListValues("scenes",[]);for(this.ui.setListValues("sequence",[]);this._sequence.length>0;)this._sequence.shift();var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Scene/List",b,m(this,this.onList))},onAdd:function(a){if(this.ui.lists.h.scenes.get_selectedItem()!=null){this._sequence.push({text:this.ui.lists.h.scenes.get_selectedItem().text,value:this.ui.lists.h.scenes.get_selectedItem().value});
this.ui.setListSelectValue("sequence",null);this.ui.setListValues("sequence",this._sequence);a=[];for(var b=0,c=this.ui.lists.h.scenes.get_dataProvider().get_length();b<c;){var d=b++;this.ui.lists.h.scenes.get_selectedItem().value!=this.ui.lists.h.scenes.get_dataProvider().get(d).value&&a.push({text:this.ui.lists.h.scenes.get_dataProvider().get(d).text,value:this.ui.lists.h.scenes.get_dataProvider().get(d).value})}this.ui.setListSelectValue("scenes",null);this.ui.setListValues("scenes",a)}},onUp:function(a){if(this.ui.lists.h.sequence.get_selectedItem()!=
null&&(a=this.ui.lists.h.sequence.get_selectedIndex(),a>0)){for(var b=this.ui.lists.h.sequence.get_dataProvider().get(a).value,c=[],d=0,f=this.ui.lists.h.sequence.get_dataProvider().get_length();d<f;){var g=d++;g==a-1?(c.push({text:this.ui.lists.h.sequence.get_dataProvider().get(a).text,value:this.ui.lists.h.sequence.get_dataProvider().get(a).value}),c.push({text:this.ui.lists.h.sequence.get_dataProvider().get(g).text,value:this.ui.lists.h.sequence.get_dataProvider().get(g).value})):g!=a&&c.push({text:this.ui.lists.h.sequence.get_dataProvider().get(g).text,
value:this.ui.lists.h.sequence.get_dataProvider().get(g).value})}for(;this._sequence.length>0;)this._sequence.shift();this._sequence=c;this.ui.setListValues("sequence",this._sequence);this.ui.setListSelectValue("sequence",b)}},onDown:function(a){if(this.ui.lists.h.sequence.get_selectedItem()!=null&&(a=this.ui.lists.h.sequence.get_selectedIndex(),a<this.ui.lists.h.sequence.get_dataProvider().get_length()-1)){for(var b=this.ui.lists.h.sequence.get_dataProvider().get(a).value,c=[],d=0,f=this.ui.lists.h.sequence.get_dataProvider().get_length();d<
f;){var g=d++;g==a+1?(c.push({text:this.ui.lists.h.sequence.get_dataProvider().get(g).text,value:this.ui.lists.h.sequence.get_dataProvider().get(g).value}),c.push({text:this.ui.lists.h.sequence.get_dataProvider().get(a).text,value:this.ui.lists.h.sequence.get_dataProvider().get(a).value})):g!=a&&c.push({text:this.ui.lists.h.sequence.get_dataProvider().get(g).text,value:this.ui.lists.h.sequence.get_dataProvider().get(g).value})}for(;this._sequence.length>0;)this._sequence.shift();this._sequence=c;
this.ui.setListValues("sequence",this._sequence);this.ui.setListSelectValue("sequence",b)}},onRemove:function(a){if(this.ui.lists.h.sequence.get_selectedItem()!=null){a=[];a.push({text:this.ui.lists.h.sequence.get_selectedItem().text,value:this.ui.lists.h.sequence.get_selectedItem().value});for(var b=0,c=this.ui.lists.h.scenes.get_dataProvider().get_length();b<c;){var d=b++;a.push({text:this.ui.lists.h.scenes.get_dataProvider().get(d).text,value:this.ui.lists.h.scenes.get_dataProvider().get(d).value})}this.ui.setListSelectValue("scenes",
null);this.ui.setListValues("scenes",a);a=[];b=0;for(c=this.ui.lists.h.sequence.get_dataProvider().get_length();b<c;)d=b++,this.ui.lists.h.sequence.get_selectedItem().value!=this.ui.lists.h.sequence.get_dataProvider().get(d).value&&a.push({text:this.ui.lists.h.sequence.get_dataProvider().get(d).text,value:this.ui.lists.h.sequence.get_dataProvider().get(d).value});for(;this._sequence.length>0;)this._sequence.shift();this._sequence=a;this.ui.setListSelectValue("sequence",null);this.ui.setListValues("sequence",
this._sequence)}},onClear:function(a){this.ui.setListValues("scenes",[]);for(this.ui.setListValues("sequence",[]);this._sequence.length>0;)this._sequence.shift();a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Scene/List",b,m(this,this.onList))},onCreate:function(a){if(this._sequence.length>1){a=[];for(var b=0,c=this._sequence;b<c.length;){var d=c[b];++b;a.push(d.value)}c="false";this.ui.toggles.h.connect.get_selected()&&(c="true");d=k.ws;b=new G;var f=p.movie.get_mvId();b.h.movie=f;f=
a.join(";");b.h.seq=f;b.h.con=c;f=this.ui.selects.h.direction.get_selectedItem().value;b.h.axis=f;d.send("Movie/Navigation",b,m(this,this.onCreated))}},onCreated:function(a,b){a?b.map.h.e==0?this.ui.createWarning(k.ln.get("window-movieseq-title"),k.ln.get("window-movieseq-created"),420,150,this.stage):this.ui.createWarning(k.ln.get("window-movieseq-title"),k.ln.get("window-movieseq-error"),420,150,this.stage):this.ui.createWarning(k.ln.get("window-movieseq-title"),k.ln.get("window-movieseq-error"),
420,150,this.stage)},onList:function(a,b){if(a)if(b.map.h.e==0){if(a=b.map.h.list,a.length>0){b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:y.field(d,"title"),value:y.field(d,"id")})}this.ui.setListValues("scenes",b);for(this.ui.setListValues("sequences",[]);this._sequence.length>0;)this._sequence.shift()}}else this.ui.createWarning(k.ln.get("window-movieseq-title"),k.ln.get("window-movieseq-nolist"),420,150,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-movieseq-title"),
k.ln.get("window-movieseq-nolist"),420,150,this.stage),Aa.removePopUp(this)},__class__:qs});var ss=function(a){this._warn=!1;ea.call(this,a,k.ln.get("window-moviesnip-title"),1100,Bc.pickValue(630,660),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieSnippets"]=ss;ss.__name__="com.tilbuci.ui.window.movie.WindowMovieSnippets";ss.__super__=ea;ss.prototype=I(ea.prototype,{_acarea:null,_snippets:null,_warn:null,startInterface:function(a){var b=this.ui.createHContainer("grname");this.ui.createTInput("grname",
"","",b);this.ui.createButton("grname",k.ln.get("window-moviesnip-savegr"),m(this,this.onSaveGr),b);b.setWidth(510);var c=this.ui.createHContainer("grhandle");this.ui.createButton("groupdel",k.ln.get("window-moviesnip-del"),m(this,this.onDel),c);this.ui.createButton("groupup",k.ln.get("window-moviesnip-upload"),m(this,this.onUpload),c);this.ui.createButton("groupdown",k.ln.get("window-moviesnip-download"),m(this,this.onDownload),c);c.setWidth(510);a=this.ui.createHContainer("snname");this.ui.createTInput("name",
"","",a);this.ui.createButton("name",k.ln.get("window-moviesnip-setcode"),m(this,this.onSetCode),a);a.setWidth(510);this._acarea=new jj(510,442);var d=k.ln.get("window-moviesnip-title"),f=this.ui,g=this.ui,h={tp:"Label",id:"groups",tx:k.ln.get("window-moviesnip-available"),vr:ia.VARIANT_DETAIL},n={tp:"Label",id:"snippets",tx:k.ln.get("window-moviesnip-snippets"),vr:ia.VARIANT_DETAIL},l=k.ln.get("window-moviesnip-delsnip");b=g.forge("leftcol",[h,{tp:"List",id:"groups",vl:[],sl:null,ht:150,ch:m(this,
this.onLoad)},{tp:"Custom",cont:b},{tp:"Custom",cont:c},{tp:"Spacer",id:"groups",ht:15,ln:!0},n,{tp:"List",id:"snippets",vl:[],sl:null,ht:247,ch:m(this,this.onLoadSnip)},{tp:"Button",id:"snippetsdel",tx:l,ac:m(this,this.onDelSnip)}]);g=this.ui;h={tp:"Label",id:"code",tx:k.ln.get("window-moviesnip-code"),vr:ia.VARIANT_DETAIL};n={tp:"Custom",cont:this._acarea};l={tp:"Label",id:"name",tx:k.ln.get("window-moviesnip-name"),vr:ia.VARIANT_DETAIL};c=k.ln.get("window-moviesnip-clear");this.addForm(d,f.createColumnHolder("columns",
b,g.forge("rightcol",[h,n,{tp:"Spacer",id:"code",ht:10,ln:!1},l,{tp:"Custom",cont:a},{tp:"Button",id:"set",tx:c,ac:m(this,this.onClear)}])));this.ui.listDbClick("snippets",m(this,this.onLoadSnip));ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.ui.hcontainers.h.grname.setWidth(510);this.ui.hcontainers.h.grhandle.setWidth(510);this.ui.hcontainers.h.snname.setWidth(510);this._acarea.setText("");this.ui.setListValues("groups",[]);this.ui.setListSelectValue("groups",
null);this.ui.setListValues("snippets",[]);this.ui.setListSelectValue("snippets",null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h.grname.set_text("");this._snippets=new G;var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Movie/ListSnippets",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){if(a=b.map.h.list,a!=null){b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d,value:d})}this.ui.setListValues("groups",b)}}else this.ui.createWarning(k.ln.get("window-moviesnip-title"),
k.ln.get("window-moviesnip-nosnippets"),420,150,this.stage);else this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-nosnippets"),420,150,this.stage)},onLoad:function(a){if(this.ui.lists.h.groups.get_selectedItem()!=null){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=this.ui.lists.h.groups.get_selectedItem().value;b.h.name=c;a.send("Movie/LoadSnippets",b,m(this,this.onLoaded))}},onLoaded:function(a,b){if(a)if(b.map.h.e==0)if(a=b.map.h.code,a==null)this.ui.createWarning(k.ln.get("window-moviesnip-title"),
k.ln.get("window-moviesnip-noload"),420,150,this.stage);else if(a=Ga.jsonAsMap(a),ib.count(a)==0)this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-noload"),420,150,this.stage);else{b=[];this._snippets=new G;for(var c=Object.keys(a.h),d=c.length,f=0;f<d;){var g=c[f++];b.push({text:g,value:g});this._snippets.h[g]=a.h[g]}this.ui.setListValues("snippets",b);this.ui.setListSelectValue("snippets",null);this.ui.inputs.h.name.set_text("");this._acarea.setText("");this.ui.inputs.h.grname.set_text(this.ui.lists.h.groups.get_selectedItem().value)}else this.ui.createWarning(k.ln.get("window-moviesnip-title"),
k.ln.get("window-moviesnip-noload"),420,150,this.stage);else this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-notfound"),420,150,this.stage)},onDel:function(a){this.ui.lists.h.groups.get_selectedItem()!=null&&this.ui.createConfirm(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-delconfirm"),320,240,m(this,this.onRemoveConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRemoveConfirm:function(a){if(a){a=k.ws;var b=new G,c=p.movie.get_mvId();
b.h.movie=c;c=this.ui.lists.h.groups.get_selectedItem().value;b.h.name=c;a.send("Movie/RemoveSnippets",b,m(this,this.onRemoved))}},onRemoved:function(a,b){if(a)if(b.map.h.e==0){if(a=b.map.h.list,a!=null){b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d,value:d})}this.ui.setListValues("groups",b);this.ui.setListSelectValue("groups",null);this.ui.setListValues("snippets",[]);this.ui.setListSelectValue("snippets",null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h.grname.set_text("");
this._acarea.setText("");this._snippets=new G}}else this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-nosnippets"),420,150,this.stage);else this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-nosnippets"),420,150,this.stage)},onUpload:function(a){this._warn?k.up.browseForMedia(m(this,this.onFileSelected),"snippets"):(this._warn=!0,this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-files"),420,180,this.stage))},
onFileSelected:function(a){if(a){a=k.up;var b=new G,c=p.movie.get_mvId();b.h.movie=c;b.h.type="snippets";b.h.path="";a.uploadMedia(m(this,this.onUploadReturn),b)}},onUploadReturn:function(a,b){if(a){this.ui.hcontainers.h.grname.setWidth(510);this.ui.hcontainers.h.grhandle.setWidth(510);this.ui.hcontainers.h.snname.setWidth(510);this._acarea.setText("");this.ui.setListValues("groups",[]);this.ui.setListSelectValue("groups",null);this.ui.setListValues("snippets",[]);this.ui.setListSelectValue("snippets",
null);this.ui.inputs.h.name.set_text("");this.ui.inputs.h.grname.set_text("");this._snippets=new G;a=k.ws;b=new G;var c=p.movie.get_mvId();b.h.movie=c;a.send("Movie/ListSnippets",b,m(this,this.onList))}else this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-erupload"),420,150,this.stage)},onDownload:function(a){if(!this._warn)this._warn=!0,this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-files"),420,180,this.stage);else if(this.ui.lists.h.groups.get_selectedItem()!=
null){a=k.ws;var b=new G;b.h.file="snippets";var c=this.ui.lists.h.groups.get_selectedItem().value;b.h.media=c;c=p.movie.get_mvId();b.h.movie=c;a.download(b)}},onLoadSnip:function(a){if(this.ui.lists.h.snippets.get_selectedItem()!=null){a=this._snippets;var b=this.ui.lists.h.snippets.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){this.ui.inputs.h.name.set_text(this.ui.lists.h.snippets.get_selectedItem().value);var c=this._acarea;a=this._snippets;b=this.ui.lists.h.snippets.get_selectedItem().value;
c.setText(a.h[b])}}},onDelSnip:function(a){this.ui.lists.h.snippets.get_selectedItem()!=null&&this.ui.createConfirm(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-delsnconfirm"),320,240,m(this,this.onRemoveSnConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage)},onRemoveSnConfirm:function(a){if(a){var b=this._snippets;a=this.ui.lists.h.snippets.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._snippets,a=this.ui.lists.h.snippets.get_selectedItem().value,
Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.updateSnippetsList())}},onSetCode:function(a){if(N.replace(this.ui.inputs.h.name.get_text()," ","").length<3)this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-shortsnname"),420,150,this.stage);else if(a=this._acarea.getText(),a!=""){var b=this._snippets,c=N.replace(this.ui.inputs.h.name.get_text()," ","");b.h[c]=a;this._acarea.setText("");this.ui.inputs.h.name.set_text("");this.updateSnippetsList()}},
onClear:function(a){this._acarea.setText("");this.ui.inputs.h.name.set_text("");this.updateSnippetsList()},updateSnippetsList:function(){for(var a=[],b=Object.keys(this._snippets.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:f,value:f})}this.ui.setListValues("snippets",a);this.ui.setListSelectValue("snippets",null)},onSaveGr:function(a){if(N.replace(this.ui.inputs.h.grname.get_text()," ","").length<3)this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-shortgrname"),
420,150,this.stage);else if(ib.count(this._snippets)<1)this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-nogrsnip"),420,150,this.stage);else{a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=N.replace(this.ui.inputs.h.grname.get_text()," ","");b.h.name=c;c=Ga.jsonStringify(this._snippets);b.h.code=c;a.send("Movie/SaveSnippets",b,m(this,this.onGrSaved))}},onGrSaved:function(a,b){if(a)if(b.map.h.e==0){if(this.ui.setListValues("groups",[]),this.ui.setListSelectValue("groups",
null),this.ui.setListValues("snippets",[]),this.ui.setListSelectValue("snippets",null),this.ui.inputs.h.name.set_text(""),this._acarea.setText(""),this.ui.inputs.h.grname.set_text(""),a=b.map.h.list,a!=null){b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d,value:d})}this.ui.setListValues("groups",b)}}else this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-nosnippets"),420,150,this.stage);else this.ui.createWarning(k.ln.get("window-moviesnip-title"),k.ln.get("window-moviesnip-nosnippets"),
420,150,this.stage)},__class__:ss});var xs=function(a){ea.call(this,a,k.ln.get("window-movieusers-title"),700,Bc.pickValue(580,420),!0,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieUsers"]=xs;xs.__name__="com.tilbuci.ui.window.movie.WindowMovieUsers";xs.__super__=ea;xs.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-movieusers-collaborators");var b=this.ui,c={tp:"Label",id:"colabout",tx:k.ln.get("window-movieusers-colabout"),vr:ia.VARIANT_DETAIL},d={tp:"Button",id:"colrem",
tx:k.ln.get("window-movieusers-colrem"),ac:m(this,this.onColRem)},f={tp:"Label",id:"colnew",tx:k.ln.get("window-movieusers-colnew"),vr:ia.VARIANT_DETAIL},g=k.ln.get("window-movieusers-coladd");this.addForm(a,b.forge("colab",[c,{tp:"List",id:"collist",vl:[],ht:120,sl:""},d,{tp:"Spacer",id:"themespacer",ht:20,ln:!1},f,{tp:"TInput",id:"colnew",tx:"",vr:""},{tp:"Button",id:"coladd",tx:g,ac:m(this,this.onColAdd)}]));a=k.ln.get("window-movieusers-owner");b=this.ui;c={tp:"Label",id:"colabout",tx:k.ln.get("window-movieusers-ownerabout"),
vr:ia.VARIANT_DETAIL,wrap:!0};d={tp:"Label",id:"ownernew",tx:k.ln.get("window-movieusers-ownernew"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"ownernew",tx:k.ln.get("window-movieusers-ownernew2"),vr:ia.VARIANT_DETAIL};g=k.ln.get("window-movieusers-ownerchange");this.addForm(a,b.forge("owner",[c,{tp:"Spacer",id:"themespacer",ht:20,ln:!1},d,{tp:"TInput",id:"ownernew",tx:"",vr:""},f,{tp:"TInput",id:"ownernew2",tx:"",vr:""},{tp:"Spacer",id:"themespacer2",ht:80,ln:!1},{tp:"Button",id:"ownerchange",tx:g,ac:m(this,
this.onChangeOwner)}]));a=k.ln.get("window-movieusers-lock");b=this.ui;c={tp:"Label",id:"unlock",tx:k.ln.get("window-movieusers-unlockabout"),vr:"",wrap:!0};d=k.ln.get("window-movieusers-unlock");this.addForm(a,b.forge("lock",[c,{tp:"Spacer",id:"unlock",ht:20,ln:!1},{tp:"Button",id:"unlock",tx:d,ac:m(this,this.onUnlock)}]));ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.id=c;a.send("Movie/Collaborators",
b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){a=[];for(var c=0,d=y.fields(b.map.h.list);c<d.length;){var f=d[c];++c;a.push({text:y.field(b.map.h.list,f),value:y.field(b.map.h.list,f)})}this.ui.setListValues("collist",a)}else this.ui.setListValues("collist",[]),this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-errorlist"),300,150,this.stage);else this.ui.setListValues("collist",[]),this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-errorlist"),
300,150,this.stage);this.ui.inputs.h.colnew.set_text("")},onColAdd:function(a){if(this.ui.inputs.h.colnew.get_text()!=""){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.id=c;c=this.ui.inputs.h.colnew.get_text();b.h.email=c;a.send("Movie/CollaboratorAdd",b,m(this,this.onList))}},onColRem:function(a){if(this.ui.lists.h.collist.get_selectedItem()!=null){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.id=c;c=this.ui.lists.h.collist.get_selectedItem().text;b.h.email=c;a.send("Movie/CollaboratorRemove",b,m(this,
this.onList))}},onChangeOwner:function(a){if(this.ui.inputs.h.ownernew.get_text()!="")if(this.ui.inputs.h.ownernew.get_text()!=this.ui.inputs.h.ownernew2.get_text())this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-ownermatch"),300,180,this.stage);else{a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.id=c;c=this.ui.inputs.h.ownernew.get_text();b.h.email=c;a.send("Movie/OwnerChange",b,m(this,this.onOwner))}},onUnlock:function(a){a=k.ws;var b=new G,c=p.movie.get_mvId();
b.h.id=c;a.send("Movie/UnlockScenes",b,m(this,this.onUnlockReturn))},onOwner:function(a,b){a?b.map.h.e==0?this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-ownerok"),300,180,this.stage):b.map.h.e==2?this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-ownernomail"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-ownererror"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-movieusers-title"),
k.ln.get("window-movieusers-ownererror"),300,180,this.stage)},onUnlockReturn:function(a,b){a?b.map.h.e==0?k.showMsg(k.ln.get("window-movieusers-oklock")):this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-erlock"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-movieusers-title"),k.ln.get("window-movieusers-erlock"),300,180,this.stage)},__class__:xs});var es=function(a){this._folderchange=this._diagchange=null;this._haschange=!1;this._lines=[];this._collections=
new G;this._list=new G;ea.call(this,a,k.ln.get("window-narrdiag-title"),1200,Bc.pickValue(670,710),!1,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowDiagChar"]=es;es.__name__="com.tilbuci.ui.window.narrative.WindowDiagChar";es.__super__=ea;es.prototype=I(ea.prototype,{_list:null,_collections:null,_lines:null,_haschange:null,_folderchange:null,_diagchange:null,startInterface:function(a){this.ui.createHContainer("folderbt");this.ui.createTInput("folderbtname","","",this.ui.hcontainers.h.folderbt,
!1);this.ui.createButton("folderbtadd",k.ln.get("window-narrdiag-add"),m(this,this.addFolder),this.ui.hcontainers.h.folderbt);this.ui.createButton("folderbtrename",k.ln.get("window-narrdiag-rename"),m(this,this.renameFolder),this.ui.hcontainers.h.folderbt);this.ui.createButton("folderbtremove",k.ln.get("window-narrdiag-remove"),m(this,this.removeFolder),this.ui.hcontainers.h.folderbt);this.ui.hcontainers.h.folderbt.setWidth(560,[260,90,90,90]);this.ui.createHContainer("fdialogs");this.ui.createTInput("fdialogsname",
"","",this.ui.hcontainers.h.fdialogs,!1);this.ui.createButton("fdialogsadd",k.ln.get("window-narrdiag-add"),m(this,this.addDialogue),this.ui.hcontainers.h.fdialogs);this.ui.createButton("fdialogsrename",k.ln.get("window-narrdiag-rename"),m(this,this.renameDialogue),this.ui.hcontainers.h.fdialogs);this.ui.createButton("fdialogsremove",k.ln.get("window-narrdiag-remove"),m(this,this.removeDialogue),this.ui.hcontainers.h.fdialogs);this.ui.hcontainers.h.fdialogs.setWidth(560,[260,90,90,90]);this.ui.createHContainer("insttext");
this.ui.createLabel("insttext",k.ln.get("window-narrdiag-insttext"),"detail",this.ui.hcontainers.h.insttext);this.ui.createTInput("insttext","","",this.ui.hcontainers.h.insttext,!1,m(this,this.setChange));this.ui.createHContainer("instname");this.ui.createLabel("instname",k.ln.get("window-narrdiag-instname"),"detail",this.ui.hcontainers.h.instname);this.ui.createTInput("instname","","",this.ui.hcontainers.h.instname,!1,m(this,this.setChange));this.ui.createHContainer("instexpr");this.ui.createLabel("instexpr",
k.ln.get("window-narrdiag-instexpr"),"detail",this.ui.hcontainers.h.instexpr);this.ui.createTInput("instexpr","","",this.ui.hcontainers.h.instexpr,!1,m(this,this.setChange));this.ui.createContainer("output");this.ui.createLabel("output",k.ln.get("window-narrdiag-outinstances"),"detail",this.ui.containers.h.output);this.ui.containers.h.output.addChild(this.ui.hcontainers.h.insttext);this.ui.containers.h.output.addChild(this.ui.hcontainers.h.instname);this.ui.containers.h.output.addChild(this.ui.hcontainers.h.instexpr);
this.ui.createHContainer("navprev");this.ui.createLabel("navprev",k.ln.get("window-narrdiag-navprev"),"detail",this.ui.hcontainers.h.navprev);this.ui.createTInput("navprev","","",this.ui.hcontainers.h.navprev,!1,m(this,this.setChange));this.ui.createHContainer("navnext");this.ui.createLabel("navnext",k.ln.get("window-narrdiag-navnext"),"detail",this.ui.hcontainers.h.navnext);this.ui.createTInput("navnext","","",this.ui.hcontainers.h.navnext,!1,m(this,this.setChange));this.ui.createHContainer("navend");
this.ui.createLabel("navend",k.ln.get("window-narrdiag-navend"),"detail",this.ui.hcontainers.h.navend);this.ui.createTInput("navend","","",this.ui.hcontainers.h.navend,!1,m(this,this.setChange));this.ui.createContainer("navigation");this.ui.createLabel("navigation",k.ln.get("window-narrdiag-navinstances"),"detail",this.ui.containers.h.navigation);this.ui.containers.h.navigation.addChild(this.ui.hcontainers.h.navprev);this.ui.containers.h.navigation.addChild(this.ui.hcontainers.h.navnext);this.ui.containers.h.navigation.addChild(this.ui.hcontainers.h.navend);
this.ui.createHContainer("instances");this.ui.hcontainers.h.instances.addChild(this.ui.containers.h.output);this.ui.hcontainers.h.instances.addChild(this.ui.containers.h.navigation);this.ui.createHContainer("lineorder");a=this.ui;var b=Z.getBitmapData("btUp"),c=this.ui.hcontainers.h.lineorder;a.createIconButton("orderup",m(this,this.onUp),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDown");c=this.ui.hcontainers.h.lineorder;a.createIconButton("orderdown",m(this,this.onDown),new Ma(b),null,c,
!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.lineorder;a.createIconButton("linerem",m(this,this.onRemLine),new Ma(b),null,c,!1);this.ui.createHContainer("text");this.ui.createLabel("text",k.ln.get("window-narrdiag-text"),"detail",this.ui.hcontainers.h.text);this.ui.createTInput("text","","",this.ui.hcontainers.h.text,!1);this.ui.createHContainer("character");this.ui.createLabel("character",k.ln.get("window-narrdiag-character"),"detail",this.ui.hcontainers.h.character);this.ui.createSelect("character",
[],null,this.ui.hcontainers.h.character);this.ui.selects.h.character.addEventListener("change",m(this,this.onCharacterChange));this.ui.createHContainer("asset");this.ui.createLabel("asset",k.ln.get("window-narrdiag-asset"),"detail",this.ui.hcontainers.h.asset);this.ui.createSelect("asset",[],null,this.ui.hcontainers.h.asset);this.ui.createHContainer("audio");this.ui.createLabel("audio",k.ln.get("window-narrdiag-audio"),"detail",this.ui.hcontainers.h.audio);this.ui.createTInput("audio","","",this.ui.hcontainers.h.audio,
!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.audio;a.createIconButton("audio",m(this,this.acAudio),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.audio;a.createIconButton("audiodel",m(this,this.acAudiodel),new Ma(b),null,c,!1);this.ui.inputs.h.audio.set_enabled(!1);this.ui.createHContainer("lbuttons");this.ui.createButton("lineadd",k.ln.get("window-narrdiag-lineadd"),m(this,this.onAddLine),this.ui.hcontainers.h.lbuttons);this.ui.createButton("lineedit",
k.ln.get("window-narrdiag-lineedit"),m(this,this.onEditLine),this.ui.hcontainers.h.lbuttons);a=k.ln.get("window-narrdiag-title");c=b=this.ui;var d={tp:"Label",id:"folders",tx:k.ln.get("window-narrdiag-folders"),vr:"detail"},f={tp:"Label",id:"foldername",tx:k.ln.get("window-narrdiag-foldername"),vr:"detail"},g={tp:"Custom",cont:this.ui.hcontainers.h.folderbt},h={tp:"Label",id:"fdialogs",tx:k.ln.get("window-narrdiag-fdialogs"),vr:"detail"},n={tp:"List",id:"fdialogs",vl:[],sl:null,ht:Bc.pickValue(227,
241),ch:m(this,this.onDiagChange)},l=k.ln.get("window-narrdiag-dialoguesname"),q=c.forge("leftcol",[d,{tp:"List",id:"folders",vl:[],sl:null,ht:150,ch:m(this,this.onFolderChange)},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,n,{tp:"Label",id:"dialogname",tx:l,vr:"detail"},{tp:"Custom",cont:this.ui.hcontainers.h.fdialogs}]);c=this.ui;d={tp:"Custom",cont:this.ui.hcontainers.h.instances};f={tp:"Label",id:"lines",tx:k.ln.get("window-narrdiag-lines"),vr:"detail"};g={tp:"List",id:"lines",vl:[],sl:null,ht:Bc.pickValue(150,
130),ch:m(this,this.onChangeLine)};h={tp:"Custom",cont:this.ui.hcontainers.h.lineorder};n={tp:"Custom",cont:this.ui.hcontainers.h.text};l={tp:"Custom",cont:this.ui.hcontainers.h.character};var u={tp:"Custom",cont:this.ui.hcontainers.h.asset},v={tp:"Custom",cont:this.ui.hcontainers.h.audio},z={tp:"Custom",cont:this.ui.hcontainers.h.lbuttons},r=k.ln.get("window-narrdiag-savediag");this.addForm(a,b.createColumnHolder("columns",q,c.forge("rightcol",[d,f,g,h,{tp:"Spacer",id:"lines",ht:10,ln:!1},n,l,u,
v,z,{tp:"Spacer",id:"lines",ht:15,ln:!0},{tp:"Button",id:"rightcol",tx:r,ac:m(this,this.saveDiag)}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-narrdiag-save"),ac:m(this,this.saveNarr)}]),Bc.pickValue(580,600)));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}f=a=p.narrative.dialogues.h;a=
Object.keys(a);b=a.length;for(c=0;c<b;){d=f[a[c++]];var g=this._list,h=d.id;d=d.clone();g.h[h]=d}this.ui.hcontainers.h.folderbt.setWidth(560,[260,90,90,90]);this.ui.hcontainers.h.fdialogs.setWidth(560,[260,90,90,90]);this.ui.labels.h.output.set_width(250);this.ui.labels.h.navigation.set_width(250);this.ui.hcontainers.h.insttext.setWidth(250,[100,130]);this.ui.hcontainers.h.instname.setWidth(250,[100,130]);this.ui.hcontainers.h.instexpr.setWidth(250,[100,130]);this.ui.hcontainers.h.navprev.setWidth(250,
[100,130]);this.ui.hcontainers.h.navnext.setWidth(250,[100,130]);this.ui.hcontainers.h.navend.setWidth(250,[100,130]);this.ui.hcontainers.h.instances.setWidth(560);this.ui.hcontainers.h.lineorder.setWidth(560,[250,250,50]);this.ui.hcontainers.h.text.setWidth(560,[100,450]);this.ui.hcontainers.h.character.setWidth(560,[100,450]);this.ui.hcontainers.h.asset.setWidth(560,[100,450]);this.ui.hcontainers.h.audio.setWidth(560,[100,340,50,50]);this.ui.hcontainers.h.lbuttons.setWidth(560);this.clear();f=k.ws;
a=new G;b=p.movie.get_mvId();a.h.movie=b;f.send("Media/ListCollectionsFull",a,m(this,this.onList))},onList:function(a,b){if(a){a=this._collections.h;a=Object.keys(a);for(var c=a.length,d=0;d<c;){var f=a[d++],g=this._collections;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}g=this._collections;var h={chname:k.ln.get("window-narrdiag-none"),chcollection:"",chassets:[{asname:k.ln.get("window-narrdiag-none"),asid:""}]};g.h[""]=h;a=p.narrative.chars.h;a=Object.keys(a);c=a.length;for(d=0;d<
c;)f=a[d++],g=this._collections,h={chname:p.narrative.chars.h[f].chname,chcollection:p.narrative.chars.h[f].collection,chassets:[{asname:k.ln.get("window-narrdiag-none"),asid:""}]},g.h[f]=h;if(b.map.h.e==0){g=0;for(h=y.fields(b.map.h.list);g<h.length;){a=h[g];++g;var n=y.field(b.map.h.list,a);if(Object.prototype.hasOwnProperty.call(n,"id")&&Object.prototype.hasOwnProperty.call(n,"assets"))for(a=this._collections.h,a=Object.keys(a),c=a.length,d=0;d<c;)if(f=a[d++],this._collections.h[f].chcollection==
y.field(n,"id"))for(var l=y.field(n,"assets"),q=0,u=y.fields(l);q<u.length;){var v=u[q];++q;v=y.field(l,v);Object.prototype.hasOwnProperty.call(v,"id")&&Object.prototype.hasOwnProperty.call(v,"name")&&this._collections.h[f].chassets.push({asname:y.field(v,"name"),asid:y.field(v,"id")})}}b=[];a=this._collections.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=a[d++],b.push({text:this._collections.h[f].chname,value:f});this.ui.setSelectOptions("character",b);this.ui.setSelectValue("character","");this.ui.setSelectOptions("asset",
[{text:k.ln.get("window-narrdiag-none"),value:""}]);this.ui.setSelectValue("asset","")}else this.ui.createWarning(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-nolist"),300,180,this.stage),Aa.removePopUp(this)}else this.ui.createWarning(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-nolist"),300,180,this.stage),Aa.removePopUp(this)},clear:function(a){var b=[],c=this._list.h;c=Object.keys(c);for(var d=c.length,f=0;f<d;){var g=c[f++];b.push({text:g,value:g})}this.ui.setListValues("folders",
b);this.ui.setListSelectValue("folders",a);b=[];if(a!=null)for(c=this._list.h[a].diags.h,c=Object.keys(c),d=c.length,f=0;f<d;)g=c[f++],b.push({text:g,value:g});this.ui.setListValues("fdialogs",b);this.ui.inputs.h.folderbtname.set_text("");this.ui.inputs.h.fdialogsname.set_text("");this.ui.containers.h.rightcol.set_visible(!1)},confirmFolderChange:function(a){this._haschange=!1;a&&this.saveDiag(null);this.onFolderChangeOk()},onFolderChange:function(a){if(this.ui.lists.h.folders.get_selectedItem()!=
null)if(this._haschange)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-haschange"),320,210,k.ln.get("window-narrdiag-haschangekeep"),m(this,this.confirmFolderChange),"confirm",k.ln.get("window-narrdiag-haschangediscard"));else this.onFolderChangeOk(a)},onFolderChangeOk:function(a){a=this._list;var b=this.ui.lists.h.folders.get_selectedItem().value;if(a.h[b].loaded)this.onDiagContent(!0);else a=this._list,b=this.ui.lists.h.folders.get_selectedItem().value,a.h[b].loadContents(m(this,
this.onDiagContent))},onDiagContent:function(a){if(a){var b=this._list,c=this.ui.lists.h.folders.get_selectedItem().value;b.h[c].loaded=!0;a=[];b=this._list;c=this.ui.lists.h.folders.get_selectedItem().value;b=Object.keys(b.h[c].diags.h);c=b.length;for(var d=0;d<c;){var f=b[d++];a.push({text:f,value:f})}this.ui.setListValues("fdialogs",a)}else k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-erloadfolder"),320,150,k.ln.get("default-ok"))},confirmDiagChange:function(a){this._haschange=
!1;a&&this.saveDiag(null);this.onDiagChangeOk()},onDiagChange:function(a){if(this._haschange)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-haschange"),320,210,k.ln.get("window-narrdiag-haschangekeep"),m(this,this.confirmDiagChange),"confirm",k.ln.get("window-narrdiag-haschangediscard"));else this.onDiagChangeOk(a)},onDiagChangeOk:function(a){if(this.ui.lists.h.fdialogs.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.folders.get_selectedItem().value;b=b.h[a].diags;
a=this.ui.lists.h.fdialogs.get_selectedItem().value;a=b.h[a];this.ui.inputs.h.insttext.set_text(a.insttext);this.ui.inputs.h.instname.set_text(a.instname);this.ui.inputs.h.instexpr.set_text(a.instexpr);this.ui.inputs.h.navprev.set_text(a.navprev);this.ui.inputs.h.navnext.set_text(a.navnext);for(this.ui.inputs.h.navend.set_text(a.navend);this._lines.length>0;)this._lines.shift();b=0;for(var c=a.lines.length;b<c;){var d=b++;this._lines.push({text:V.substr(a.lines[d].text,0,50),value:a.lines[d]})}this.ui.setListValues("lines",
this._lines);this.ui.inputs.h.text.set_text("");this.ui.inputs.h.audio.set_text("");this.ui.setSelectValue("collection","");this.ui.setSelectValue("asset","");this.ui.containers.h.rightcol.set_visible(!0);this._haschange=!1;this._folderchange=this.ui.lists.h.folders.get_selectedItem().value;this._diagchange=this.ui.lists.h.fdialogs.get_selectedItem().value}},action:function(a,b){a=="audio"&&this.ui.inputs.h.audio.set_text(b.h.file)},addFolder:function(a){if(N.trim(this.ui.inputs.h.folderbtname.get_text()).length<
3)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnamesmall"),320,150,k.ln.get("default-ok"));else{a=this._list;var b=N.trim(this.ui.inputs.h.folderbtname.get_text());if(Object.prototype.hasOwnProperty.call(a.h,b))k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnamealready"),320,150,k.ln.get("default-ok"));else{a=this._list;b=N.trim(this.ui.inputs.h.folderbtname.get_text());var c=new Bn({id:N.trim(this.ui.inputs.h.folderbtname.get_text())});a.h[b]=
c;a=this._list;b=N.trim(this.ui.inputs.h.folderbtname.get_text());a.h[b].loaded=!0;this.clear()}}},renameFolder:function(a){if(this.ui.lists.h.folders.get_selectedItem()==null)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnoselect"),320,150,k.ln.get("default-ok"));else if(N.trim(this.ui.inputs.h.folderbtname.get_text()).length<3)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnamesmall"),320,150,k.ln.get("default-ok"));else{a=this._list;var b=
N.trim(this.ui.inputs.h.folderbtname.get_text());if(Object.prototype.hasOwnProperty.call(a.h,b))k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnamealready"),320,150,k.ln.get("default-ok"));else{a=new G;b=Object.keys(this._list.h);for(var c=b.length,d=0;d<c;){var f=b[d++];if(f==this.ui.lists.h.folders.get_selectedItem().value){this._list.h[f].id=N.trim(this.ui.inputs.h.folderbtname.get_text());var g=N.trim(this.ui.inputs.h.folderbtname.get_text());a.h[g]=this._list.h[f]}else a.h[f]=
this._list.h[f]}this._list=a;this.clear()}}},removeFolder:function(a){if(this.ui.lists.h.folders.get_selectedItem()==null)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnoselect"),320,150,k.ln.get("default-ok"));else{a=this._list;var b=this.ui.lists.h.folders.get_selectedItem().value;if(a.h[b].numDiags()>0)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdhavediags"),320,150,k.ln.get("default-ok"));else{a=Object.keys(this._list.h);b=a.length;for(var c=
0;c<b;){var d=a[c++];if(d==this.ui.lists.h.folders.get_selectedItem().value){this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}}this.clear()}}},addDialogue:function(a){if(this.ui.lists.h.folders.get_selectedItem()==null)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnoselect"),320,150,k.ln.get("default-ok"));else if(N.trim(this.ui.inputs.h.fdialogsname.get_text()).length<3)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-dgnamesmall"),
320,150,k.ln.get("default-ok"));else{a=this._list;var b=this.ui.lists.h.folders.get_selectedItem().value;a=a.h[b].diags;b=N.trim(this.ui.inputs.h.fdialogsname.get_text());if(Object.prototype.hasOwnProperty.call(a.h,b))k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-dgnamealready"),320,150,k.ln.get("default-ok"));else{a=this._list;b=this.ui.lists.h.folders.get_selectedItem().value;a=a.h[b].diags;b=N.trim(this.ui.inputs.h.fdialogsname.get_text());var c=new Cn({id:N.trim(this.ui.inputs.h.fdialogsname.get_text())});
a.h[b]=c;this.clear(this.ui.lists.h.folders.get_selectedItem().value);this._haschange=!1}}},renameDialogue:function(a){if(this.ui.lists.h.folders.get_selectedItem()==null)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnoselect"),320,150,k.ln.get("default-ok"));else if(this.ui.lists.h.fdialogs.get_selectedItem()==null)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-dgnoselect"),320,150,k.ln.get("default-ok"));else if(N.trim(this.ui.inputs.h.fdialogsname.get_text()).length<
3)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-dgnamesmall"),320,150,k.ln.get("default-ok"));else{var b=this._list,c=this.ui.lists.h.folders.get_selectedItem().value;b=b.h[c].diags;c=N.trim(this.ui.inputs.h.fdialogsname.get_text());if(Object.prototype.hasOwnProperty.call(b.h,c))k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-dgnamealready"),320,150,k.ln.get("default-ok"));else{a=new G;b=this._list;c=this.ui.lists.h.folders.get_selectedItem().value;
for(var d=Object.keys(b.h[c].diags.h),f=d.length,g=0;g<f;){var h=d[g++];if(h==this.ui.lists.h.fdialogs.get_selectedItem().value){b=this._list;c=this.ui.lists.h.folders.get_selectedItem().value;b.h[c].diags.h[h].id=N.trim(this.ui.inputs.h.fdialogsname.get_text());c=N.trim(this.ui.inputs.h.fdialogsname.get_text());b=this._list;var n=this.ui.lists.h.folders.get_selectedItem().value;a.h[c]=b.h[n].diags.h[h]}else b=this._list,c=this.ui.lists.h.folders.get_selectedItem().value,a.h[h]=b.h[c].diags.h[h]}b=
this._list;c=this.ui.lists.h.folders.get_selectedItem().value;b.h[c].diags=a;this.clear(this.ui.lists.h.folders.get_selectedItem().value);this._haschange=!1}}},removeDialogue:function(a){if(this.ui.lists.h.folders.get_selectedItem()==null)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-fdnoselect"),320,150,k.ln.get("default-ok"));else if(this.ui.lists.h.fdialogs.get_selectedItem()==null)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-dgnoselect"),320,
150,k.ln.get("default-ok"));else{var b=this._list;a=this.ui.lists.h.folders.get_selectedItem().value;b=b.h[a].diags;a=this.ui.lists.h.fdialogs.get_selectedItem().value;b.h[a].numLines()>0?k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-dghavelines"),320,150,k.ln.get("default-ok")):(b=this._list,a=this.ui.lists.h.folders.get_selectedItem().value,b=b.h[a].diags,a=this.ui.lists.h.fdialogs.get_selectedItem().value,b.h[a].kill(),b=this._list,a=this.ui.lists.h.folders.get_selectedItem().value,
b=b.h[a].diags,a=this.ui.lists.h.fdialogs.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear(this.ui.lists.h.folders.get_selectedItem().value),this._haschange=!1)}},saveDiag:function(a){this._haschange=!1;if(this._folderchange!=null&&this._diagchange!=null){a=this._list.h[this._folderchange].diags.h[this._diagchange];a.navprev=this.ui.inputs.h.navprev.get_text();a.navnext=this.ui.inputs.h.navnext.get_text();a.navend=this.ui.inputs.h.navend.get_text();a.insttext=
this.ui.inputs.h.insttext.get_text();a.instname=this.ui.inputs.h.instname.get_text();a.instexpr=this.ui.inputs.h.instexpr.get_text();for(a.lines=[];this._lines.length>0;)a.lines.push(this._lines.shift().value);this.ui.setListSelectValue("fdialogs",null);this.ui.containers.h.rightcol.set_visible(!1)}},confirmNarrChange:function(a){this._haschange=!1;a&&this.saveDiag(null);this.saveNarrOk()},saveNarr:function(a){this._haschange?k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-haschange"),
320,210,k.ln.get("window-narrdiag-haschangekeep"),m(this,this.confirmNarrChange),"confirm",k.ln.get("window-narrdiag-haschangediscard")):this.saveNarrOk(a)},saveNarrOk:function(a){a=p.narrative.dialogues.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.narrative.dialogues.h[d].kill();var f=p.narrative.dialogues;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.narrative.dialogues;var g=this._list.h[d].clone();
f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.narrative.getData();b.h.data=c;a.send("Movie/SaveNarrative",b,m(this,this.onSaveReturn))},onSaveReturn:function(a,b){if(a)if(b.map.h.e==1)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-ersave1"),320,150,k.ln.get("default-ok"));else if(b.map.h.e==2)k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-ersave"),320,150,k.ln.get("default-ok"));else{if(Object.prototype.hasOwnProperty.call(b.map.h,
"ids")){a=Object.create(null);for(var c=0,d=y.fields(b.map.h.ids);c<d.length;){var f=d[c];++c;var g=y.field(b.map.h.ids,f);a[f]=g}f=p.narrative.dialogues.h;b=Object.keys(f);c=b.length;for(d=0;d<c;)f=b[d++],Object.prototype.hasOwnProperty.call(a,p.narrative.dialogues.h[f].id)&&(p.narrative.dialogues.h[f].code=a[p.narrative.dialogues.h[f].id])}k.showMsg(k.ln.get("window-narrdiag-oksave"));f=p.narrative.dialogues.h;b=Object.keys(f);c=b.length;for(d=0;d<c;)f=b[d++],p.narrative.dialogues.h[f].loaded=!1;
Aa.removePopUp(this)}else k.showPopup(k.ln.get("window-narrdiag-title"),k.ln.get("window-narrdiag-ersave"),320,150,k.ln.get("default-ok"))},onUp:function(a){if(this.ui.lists.h.lines.get_selectedItem()!=null&&this.ui.lists.h.lines.get_selectedIndex()>0){a=this.ui.lists.h.lines.get_selectedIndex()-1;var b=this._lines[a];this._lines[a]=this._lines[this.ui.lists.h.lines.get_selectedIndex()];this._lines[this.ui.lists.h.lines.get_selectedIndex()]=b;this.ui.setListValues("lines",this._lines);this.ui.lists.h.lines.set_selectedIndex(a);
this.setChange()}},onDown:function(a){if(this.ui.lists.h.lines.get_selectedItem()!=null&&this.ui.lists.h.lines.get_selectedIndex()<this._lines.length-1){a=this.ui.lists.h.lines.get_selectedIndex()+1;var b=this._lines[a];this._lines[a]=this._lines[this.ui.lists.h.lines.get_selectedIndex()];this._lines[this.ui.lists.h.lines.get_selectedIndex()]=b;this.ui.setListValues("lines",this._lines);this.ui.lists.h.lines.set_selectedIndex(a);this.setChange()}},acAudio:function(a){this._ac("audio")},acAudiodel:function(a){this.ui.inputs.h.audio.set_text("")},
onAddLine:function(a){N.trim(this.ui.inputs.h.text.get_text())!=""&&(this._lines.push({text:V.substr(N.trim(this.ui.inputs.h.text.get_text()),0,50),value:new sm({text:N.trim(this.ui.inputs.h.text.get_text()),audio:N.trim(this.ui.inputs.h.audio.get_text()),character:this.ui.selects.h.character.get_selectedItem().value,asset:this.ui.selects.h.asset.get_selectedItem().value})}),this.ui.setListValues("lines",this._lines),this.ui.setListSelectValue("lines",null),this.ui.inputs.h.text.set_text(""),this.ui.inputs.h.audio.set_text(""),
this.setChange())},onEditLine:function(a){this.ui.lists.h.lines.get_selectedItem()!=null&&N.trim(this.ui.inputs.h.text.get_text())!=""&&(this._lines[this.ui.lists.h.lines.get_selectedIndex()]={text:V.substr(N.trim(this.ui.inputs.h.text.get_text()),0,50),value:new sm({text:N.trim(this.ui.inputs.h.text.get_text()),audio:N.trim(this.ui.inputs.h.audio.get_text()),character:this.ui.selects.h.character.get_selectedItem().value,asset:this.ui.selects.h.asset.get_selectedItem().value})},this.ui.setListValues("lines",
this._lines),this.ui.setListSelectValue("lines",null),this.ui.inputs.h.text.set_text(""),this.ui.inputs.h.audio.set_text(""),this.setChange())},onRemLine:function(a){if(this.ui.lists.h.lines.get_selectedItem()!=null){a=[];for(var b=0,c=this._lines.length;b<c;){var d=b++;d!=this.ui.lists.h.lines.get_selectedIndex()&&a.push(this._lines[d])}this._lines=a;this.ui.setListValues("lines",this._lines);this.ui.setListSelectValue("lines",null);this.ui.inputs.h.text.set_text("");this.ui.inputs.h.audio.set_text("");
this.setChange()}},onCharacterChange:function(a){a=[];var b=0,c=this._collections,d=this.ui.selects.h.character.get_selectedItem().value;for(c=c.h[d].chassets;b<c.length;)d=c[b],++b,a.push({text:d.asname,value:d.asid});this.ui.setSelectOptions("asset",a)},onChangeLine:function(a){this.ui.lists.h.lines.get_selectedItem()!=null&&(this.ui.inputs.h.text.set_text(this.ui.lists.h.lines.get_selectedItem().value.text),this.ui.inputs.h.audio.set_text(this.ui.lists.h.lines.get_selectedItem().value.audio),this.ui.setSelectValue("character",
this.ui.lists.h.lines.get_selectedItem().value.character),this.ui.setSelectValue("asset",this.ui.lists.h.lines.get_selectedItem().value.asset))},setChange:function(a){this._haschange=!0;this._folderchange=this.ui.lists.h.folders.get_selectedItem().value;this._diagchange=this.ui.lists.h.fdialogs.get_selectedItem().value},__class__:es});var bs=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-narrbattle-title"),1E3,580,!0,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrBattle"]=bs;bs.__name__=
"com.tilbuci.ui.window.narrative.WindowNarrBattle";bs.__super__=ea;bs.prototype=I(ea.prototype,{_list:null,startInterface:function(a){this.ui.createHContainer("imgbgh");this.ui.createTInput("imgbgh","","",this.ui.hcontainers.h.imgbgh,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imgbgh",m(this,this.acImgbgh),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imimgbghdel",m(this,this.acImgbghdel),
new Ma(b),null,c,!1);this.ui.inputs.h.imgbgh.set_enabled(!1);this.ui.createHContainer("imgbgv");this.ui.createTInput("imgbgv","","",this.ui.hcontainers.h.imgbgv,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imgbgv",m(this,this.acImgbgv),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imimgbgvdel",m(this,this.acImgbgvdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbgv.set_enabled(!1);this.ui.createHContainer("imgbt");
this.ui.createTInput("imgbt","","",this.ui.hcontainers.h.imgbt,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbt.set_enabled(!1);this.ui.createHContainer("imgattr");this.ui.createTInput("imgattr","","",this.ui.hcontainers.h.imgattr,!1);a=
this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgattr;a.createIconButton("imgattr",m(this,this.acImgattr),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgattr;a.createIconButton("imgattrdel",m(this,this.acImgattrdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgattr.set_enabled(!1);this.ui.createHContainer("imgcard");this.ui.createTInput("imgcard","","",this.ui.hcontainers.h.imgcard,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgcard;
a.createIconButton("imgcard",m(this,this.acImgcard),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgcard;a.createIconButton("imgcarddel",m(this,this.acImgcarddel),new Ma(b),null,c,!1);this.ui.inputs.h.imgcard.set_enabled(!1);this.ui.createHContainer("itgraphic");this.ui.createTInput("itgraphic","","",this.ui.hcontainers.h.itgraphic,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.itgraphic;a.createIconButton("itgraphic",m(this,this.acItgraphic),
new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.itgraphic;a.createIconButton("itgraphicdel",m(this,this.acItgraphicdel),new Ma(b),null,c,!1);this.ui.inputs.h.itgraphic.set_enabled(!1);a=k.ln.get("window-narrbattle-cards");c=b=this.ui;var d={tp:"Label",id:"items",tx:k.ln.get("window-narrbattle-available"),vr:""},f={tp:"Button",id:"loadit",tx:k.ln.get("window-narrbattle-loadcards"),ac:m(this,this.onLoadIt)},g=k.ln.get("window-narrbattle-removecard"),h=c.forge("leftcol",
[d,{tp:"List",id:"items",vl:[],sl:null,ht:350},f,{tp:"Button",id:"removeit",tx:g,ac:m(this,this.onRemoveIt)}]);c=this.ui;d={tp:"Label",id:"itname",tx:k.ln.get("window-narrbattle-cardname"),vr:"detail"};f={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardgraphic"),vr:ia.VARIANT_DETAIL};g={tp:"Custom",cont:this.ui.hcontainers.h.itgraphic};var n={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat1"),vr:ia.VARIANT_DETAIL},l={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat2"),vr:ia.VARIANT_DETAIL},
q={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat3"),vr:ia.VARIANT_DETAIL},u={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat4"),vr:ia.VARIANT_DETAIL},v={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat5"),vr:ia.VARIANT_DETAIL},z=k.ln.get("window-narrbattle-setcard");this.addForm(a,b.createColumnHolder("columns",h,c.forge("rightcol",[d,{tp:"TInput",id:"itname",tx:"",vr:""},f,g,n,{tp:"Numeric",id:"cardat1",mn:-1E4,mx:1E4,st:1,vl:0},l,{tp:"Numeric",id:"cardat2",mn:-1E4,
mx:1E4,st:1,vl:0},q,{tp:"Numeric",id:"cardat3",mn:-1E4,mx:1E4,st:1,vl:0},u,{tp:"Numeric",id:"cardat4",mn:-1E4,mx:1E4,st:1,vl:0},v,{tp:"Numeric",id:"cardat5",mn:-1E4,mx:1E4,st:1,vl:0},{tp:"Spacer",id:"saveitem",ht:40,ln:!1},{tp:"Button",id:"saveitem",tx:z,ac:m(this,this.onSetItem)}]),this.ui.forge("bottom",[{tp:"Button",id:"iconsave",tx:k.ln.get("window-narrbattle-savecards"),ac:m(this,this.onSaveItems)}]),460));this.ui.listDbClick("items",m(this,this.onLoadIt));a=k.ln.get("window-narrbattle-attributes");
b=this.ui;c={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-attrabout"),vr:""};d={tp:"Label",id:"attr1",tx:k.ln.get("window-narrbattle-attr1"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"attr2",tx:k.ln.get("window-narrbattle-attr2"),vr:ia.VARIANT_DETAIL};g={tp:"Label",id:"attr3",tx:k.ln.get("window-narrbattle-attr3"),vr:ia.VARIANT_DETAIL};h={tp:"Label",id:"attr4",tx:k.ln.get("window-narrbattle-attr4"),vr:ia.VARIANT_DETAIL};n={tp:"Label",id:"attr5",tx:k.ln.get("window-narrbattle-attr5"),vr:ia.VARIANT_DETAIL};
l=k.ln.get("window-narrbattle-btattr");this.addForm(a,b.forge("attributes",[c,{tp:"Spacer",id:"set",ht:10,ln:!1},d,{tp:"TInput",id:"attr1",tx:"",vr:""},f,{tp:"TInput",id:"attr2",tx:"",vr:""},g,{tp:"TInput",id:"attr3",tx:"",vr:""},h,{tp:"TInput",id:"attr4",tx:"",vr:""},n,{tp:"TInput",id:"attr5",tx:"",vr:""},{tp:"Spacer",id:"gapattr",ht:160,ln:!1},{tp:"Button",id:"setattr",tx:l,ac:m(this,this.onSaveAttr)}]));a=k.ln.get("window-narrbattle-display");b=this.ui;c={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-setabout"),
vr:""};d={tp:"Label",id:"imgbgh",tx:k.ln.get("window-narrbattle-imgbgh"),vr:ia.VARIANT_DETAIL};f={tp:"Custom",cont:this.ui.hcontainers.h.imgbgh};g={tp:"Label",id:"imgbgv",tx:k.ln.get("window-narrbattle-imgbgv"),vr:ia.VARIANT_DETAIL};h={tp:"Custom",cont:this.ui.hcontainers.h.imgbgv};n={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-button"),vr:ia.VARIANT_DETAIL};l={tp:"Custom",cont:this.ui.hcontainers.h.imgbt};q={tp:"Label",id:"imgcard",tx:k.ln.get("window-narrbattle-card"),vr:ia.VARIANT_DETAIL};
u={tp:"Custom",cont:this.ui.hcontainers.h.imgcard};v={tp:"Label",id:"imgattr",tx:k.ln.get("window-narrbattle-imgattr"),vr:ia.VARIANT_DETAIL};z={tp:"Custom",cont:this.ui.hcontainers.h.imgattr};var r={tp:"Label",id:"font",tx:k.ln.get("window-narrbattle-font"),vr:"detail"},F={tp:"Label",id:"fontsize",tx:k.ln.get("window-narrbattle-fontsize"),vr:"detail"},J={tp:"Label",id:"fontc",tx:k.ln.get("window-narrbattle-fontc"),vr:"detail"},L=k.ln.get("window-narrbattle-btset");this.addForm(a,b.forge("settings",
[c,{tp:"Spacer",id:"set",ht:5,ln:!1},d,f,g,h,n,l,q,u,v,z,r,{tp:"Select",id:"font",vl:[],sl:null},F,{tp:"Numeric",id:"fontsize",mn:8,mx:200,st:1,vl:20},J,{tp:"TInput",id:"fontc",tx:"#FFFFFF",vr:""},{tp:"Spacer",id:"gap",ht:10,ln:!1},{tp:"Button",id:"set",tx:L,ac:m(this,this.onSaveSet)}]));a=k.ln.get("window-narrbattle-sounds");b=this.ui;c={tp:"Label",id:"soundsabout",tx:k.ln.get("window-narrbattle-soundsabout"),vr:""};d={tp:"Label",id:"soundpick",tx:k.ln.get("window-narrbattle-soundpick"),vr:ia.VARIANT_DETAIL};
f={tp:"Label",id:"soundwin",tx:k.ln.get("window-narrbattle-soundwin"),vr:ia.VARIANT_DETAIL};g={tp:"Label",id:"soundloose",tx:k.ln.get("window-narrbattle-soundloose"),vr:ia.VARIANT_DETAIL};h={tp:"Label",id:"soundtie",tx:k.ln.get("window-narrbattle-soundtie"),vr:ia.VARIANT_DETAIL};n=k.ln.get("window-narrbattle-soundsave");this.addForm(a,b.forge("sounds",[c,{tp:"Spacer",id:"soundsabout",ht:10,ln:!1},d,{tp:"TInput",id:"soundpick",tx:"",vr:""},f,{tp:"TInput",id:"soundwin",tx:"",vr:""},g,{tp:"TInput",id:"soundloose",
tx:"",vr:""},h,{tp:"TInput",id:"soundtie",tx:"",vr:""},{tp:"Spacer",id:"gapattr",ht:210,ln:!1},{tp:"Button",id:"setattr",tx:n,ac:m(this,this.onSaveSound)}]));ea.prototype.startInterface.call(this)},acStart:function(){this.ui.hcontainers.h.imgbt.setWidth(960,[810,70,70]);this.ui.hcontainers.h.imgbgh.setWidth(960,[810,70,70]);this.ui.hcontainers.h.imgbgv.setWidth(960,[810,70,70]);this.ui.hcontainers.h.imgattr.setWidth(960,[810,70,70]);this.ui.hcontainers.h.imgcard.setWidth(960,[810,70,70]);this.ui.hcontainers.h.itgraphic.setWidth(460,
[300,70,70]);this.ui.inputs.h.itname.set_text("");this.ui.inputs.h.itgraphic.set_text("");this.ui.setSelectValue("mode","a");this.ui.inputs.h.attr1.set_text(this.ui.inputs.h.attr2.set_text(this.ui.inputs.h.attr3.set_text(this.ui.inputs.h.attr4.set_text(this.ui.inputs.h.attr4.set_text("")))));this.ui.inputs.h.imgbt.set_text("");this.ui.inputs.h.imgbgh.set_text("");this.ui.inputs.h.imgbgv.set_text("");this.ui.inputs.h.imgattr.set_text("");this.ui.inputs.h.imgcard.set_text("");this.ui.setSelectValue("font",
null);this.ui.inputs.h.fontc.set_text("#FFFFFF");this.ui.numerics.h.fontsize.set_value(20);this.ui.numerics.h.cardat1.set_value(0);this.ui.numerics.h.cardat2.set_value(0);this.ui.numerics.h.cardat3.set_value(0);this.ui.numerics.h.cardat4.set_value(0);this.ui.numerics.h.cardat5.set_value(0);this.ui.inputs.h.soundpick.set_text("");this.ui.inputs.h.soundwin.set_text("");this.ui.inputs.h.soundloose.set_text("");this.ui.inputs.h.soundtie.set_text("");this.ui.buttons.h.setattr.set_width(960);for(var a=
[],b=0,c=k.fonts.length;b<c;){var d=b++;a.push({text:k.fonts[d],value:k.fonts[d]})}b=0;for(c=p.mdata.fonts;b<c.length;)d=c[b],++b,a.push({text:d.name,value:d.name});this.ui.setSelectOptions("font",a);if(Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")){this.ui.inputs.h.imgbt.set_text(p.contraptions.bs.h.bs.close);this.ui.inputs.h.imgbgh.set_text(p.contraptions.bs.h.bs.horizontal);this.ui.inputs.h.imgbgv.set_text(p.contraptions.bs.h.bs.vertical);this.ui.inputs.h.imgattr.set_text(p.contraptions.bs.h.bs.attrbg);
this.ui.inputs.h.imgcard.set_text(p.contraptions.bs.h.bs.card);this.ui.setSelectValue("font",p.contraptions.bs.h.bs.font);this.ui.inputs.h.fontc.set_text(p.contraptions.bs.h.bs.fontcolor);this.ui.numerics.h.fontsize.set_value(p.contraptions.bs.h.bs.fontsize);b=0;for(c=p.contraptions.bs.h.bs.attributes.length;b<c;)d=b++,this.ui.inputs.h["attr"+(d+1)].set_text(p.contraptions.bs.h.bs.attributes[d]);this.ui.inputs.h.soundpick.set_text(p.contraptions.bs.h.bs.soundpick);this.ui.inputs.h.soundwin.set_text(p.contraptions.bs.h.bs.soundwin);
this.ui.inputs.h.soundloose.set_text(p.contraptions.bs.h.bs.soundloose);this.ui.inputs.h.soundtie.set_text(p.contraptions.bs.h.bs.soundtie)}b=this._list.h;b=Object.keys(b);c=b.length;for(d=0;d<c;){var f=b[d++];a=this._list;Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f]}a=b=p.narrative.cards.h;b=Object.keys(b);c=b.length;for(d=0;d<c;){f=a[b[d++]];var g=this._list,h=f.cardname;f=f.clone();g.h[h]=f}this.showItems()},action:function(a,b){switch(a){case "battleattr":this.ui.inputs.h.imgattr.set_text(b.h.file);
break;case "battleclose":this.ui.inputs.h.imgbt.set_text(b.h.file);break;case "battleh":this.ui.inputs.h.imgbgh.set_text(b.h.file);break;case "battlev":this.ui.inputs.h.imgbgv.set_text(b.h.file);break;case "imgcard":this.ui.inputs.h.imgcard.set_text(b.h.file);break;case "itgraphic":this.ui.inputs.h.itgraphic.set_text(b.h.file)}},showItems:function(){for(var a=[],b=Object.keys(this._list.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({value:f,text:f})}this.ui.setListValues("items",a);this.ui.setListSelectValue("items",
null)},acImgbt:function(a){this._ac("battleclose")},acImgbtdel:function(a){this.ui.inputs.h.imgbt.set_text("")},acImgattr:function(a){this._ac("battleattr")},acImgattrdel:function(a){this.ui.inputs.h.imgattr.set_text("")},acImgbgh:function(a){this._ac("battleh")},acImgbghdel:function(a){this.ui.inputs.h.imgbgh.set_text("")},acImgbgv:function(a){this._ac("battlev")},acImgbgvdel:function(a){this.ui.inputs.h.imgbgv.set_text("")},acItgraphic:function(a){this._ac("itgraphic")},acItgraphicdel:function(a){this.ui.inputs.h.itgraphic.set_text("")},
acImgcard:function(a){this._ac("imgcard")},acImgcarddel:function(a){this.ui.inputs.h.imgcard.set_text("")},onLoadIt:function(a){if(this.ui.lists.h.items.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.items.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.itname;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;c.set_text(a.h[b].cardname);c=this.ui.inputs.h.itgraphic;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;
c.set_text(a.h[b].cardgraphic);c=this.ui.numerics.h.cardat1;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;c.set_value(a.h[b].cardattributes[0]);c=this.ui.numerics.h.cardat2;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;c.set_value(a.h[b].cardattributes[1]);c=this.ui.numerics.h.cardat3;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;c.set_value(a.h[b].cardattributes[2]);c=this.ui.numerics.h.cardat4;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;
c.set_value(a.h[b].cardattributes[3]);c=this.ui.numerics.h.cardat5;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;c.set_value(a.h[b].cardattributes[4])}}},onRemoveIt:function(a){if(this.ui.lists.h.items.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.items.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.items.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.showItems())}},onSetItem:function(a){if(this.ui.inputs.h.itname.get_text()==
""||this.ui.inputs.h.itgraphic.get_text()=="")k.showPopup(k.ln.get("window-narrbattle-cards"),k.ln.get("window-narrbattle-cardno"),320,150,k.ln.get("default-ok"));else{a=this._list;var b=this.ui.inputs.h.itname.get_text(),c=new Yo({cardname:this.ui.inputs.h.itname.get_text(),cardgraphic:this.ui.inputs.h.itgraphic.get_text(),cardattributes:[Math.round(this.ui.numerics.h.cardat1.get_value()),Math.round(this.ui.numerics.h.cardat2.get_value()),Math.round(this.ui.numerics.h.cardat3.get_value()),Math.round(this.ui.numerics.h.cardat4.get_value()),
Math.round(this.ui.numerics.h.cardat5.get_value())]});a.h[b]=c;this.ui.inputs.h.itname.set_text("");this.ui.inputs.h.itgraphic.set_text("");this.ui.numerics.h.cardat1.set_value(this.ui.numerics.h.cardat2.set_value(this.ui.numerics.h.cardat3.set_value(this.ui.numerics.h.cardat4.set_value(this.ui.numerics.h.cardat5.set_value(0)))));this.showItems()}},onSaveItems:function(a){a=p.narrative.cards.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=p.narrative.cards;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],p.narrative.cards.h[d]=this._list.h[d];a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.narrative.getData();b.h.data=c;a.send("Movie/SaveNarrative",b,m(this,this.onSaveReturn))},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-narrbattle-cards"),k.ln.get("window-narrbattle-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-narrbattle-cards"),k.ln.get("window-narrbattle-ersave"),
320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-narrbattle-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-narrbattle-cards"),k.ln.get("window-narrinv-ersave"),320,150,k.ln.get("default-ok"))},onSaveSet:function(a){if(this.ui.inputs.h.imgbt.get_text()==""||this.ui.inputs.h.imgattr.get_text()==""||this.ui.inputs.h.imgcard.get_text()=="")k.showPopup(k.ln.get("window-narrbattle-display"),k.ln.get("window-narrbattle-noclose"),320,150,k.ln.get("default-ok"));else if(this.ui.inputs.h.imgbgh.get_text()==
""&&this.ui.inputs.h.imgbgv.get_text()=="")k.showPopup(k.ln.get("window-narrbattle-display"),k.ln.get("window-narrbattle-nobg"),320,150,k.ln.get("default-ok"));else if(Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")){p.contraptions.bs.h.bs.font=this.ui.selects.h.font.get_selectedItem().value;p.contraptions.bs.h.bs.fontcolor=Ga.colorHex(this.ui.inputs.h.fontc.get_text(),"#FFFFFF");p.contraptions.bs.h.bs.fontsize=Math.round(this.ui.numerics.h.fontsize.get_value());p.contraptions.bs.h.bs.close=
this.ui.inputs.h.imgbt.get_text();p.contraptions.bs.h.bs.card=this.ui.inputs.h.imgcard.get_text();p.contraptions.bs.h.bs.horizontal=this.ui.inputs.h.imgbgh.get_text();p.contraptions.bs.h.bs.vertical=this.ui.inputs.h.imgbgv.get_text();p.contraptions.bs.h.bs.attrbg=this.ui.inputs.h.imgattr.get_text();p.contraptions.bs.h.bs.loadGraphics();a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveSetReturn))}else if(a=
new nf,a.load({id:"bs",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Ga.colorHex(this.ui.inputs.h.fontc.get_text(),"#FFFFFF"),fontsize:Math.round(this.ui.numerics.h.fontsize.get_value()),close:this.ui.inputs.h.imgbt.get_text(),horizontal:this.ui.inputs.h.imgbgh.get_text(),vertical:this.ui.inputs.h.imgbgv.get_text(),attrbg:this.ui.inputs.h.imgattr.get_text(),card:this.ui.inputs.h.imgcard.get_text()})){b=Object.keys(p.contraptions.bs.h);c=b.length;for(var d=0;d<c;){var f=b[d++];p.contraptions.bs.h[f].kill();
var g=p.contraptions.bs;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}p.contraptions.bs.h.bs=a;a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveSetReturn))}else k.showPopup(k.ln.get("window-narrbattle-display"),k.ln.get("window-narrbattle-errorset"),320,150,k.ln.get("default-ok"))},onSaveSetReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-narrbattle-display"),k.ln.get("window-narrbattle-ersave1set"),
320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-narrbattle-display"),k.ln.get("window-narrbattle-ersaveset"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-narrbattle-oksaveset")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-narrbattle-display"),k.ln.get("window-narrbattle-ersaveset"),320,150,k.ln.get("default-ok"))},onSaveAttr:function(a){a=this.ui.inputs.h.attr1.get_text();var b=this.ui.inputs.h.attr2.get_text(),c=this.ui.inputs.h.attr3.get_text(),d=
this.ui.inputs.h.attr4.get_text(),f=this.ui.inputs.h.attr5.get_text();if(a==""&&b==""&&c==""&&d==""&&f=="")k.showPopup(k.ln.get("window-narrbattle-attributes"),k.ln.get("window-narrbattle-noattributes"),320,150,k.ln.get("default-ok"));else{if(!Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")){var g=p.contraptions.bs,h=new nf;g.h.bs=h}for(;p.contraptions.bs.h.bs.attributes.length>0;)p.contraptions.bs.h.bs.attributes.shift();a!=""&&p.contraptions.bs.h.bs.attributes.push(a);b!=""&&p.contraptions.bs.h.bs.attributes.push(b);
c!=""&&p.contraptions.bs.h.bs.attributes.push(c);d!=""&&p.contraptions.bs.h.bs.attributes.push(d);f!=""&&p.contraptions.bs.h.bs.attributes.push(f);a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveAttrReturn))}},onSaveAttrReturn:function(a,b){if(a)if(b.map.h.e==1)k.showPopup(k.ln.get("window-narrbattle-attributes"),k.ln.get("window-narrbattle-ersave1set"),320,150,k.ln.get("default-ok"));else if(b.map.h.e==2)k.showPopup(k.ln.get("window-narrbattle-attributes"),
k.ln.get("window-narrbattle-ersaveset"),320,150,k.ln.get("default-ok"));else{this.ui.inputs.h.attr1.set_text(this.ui.inputs.h.attr2.set_text(this.ui.inputs.h.attr3.set_text(this.ui.inputs.h.attr4.set_text(this.ui.inputs.h.attr4.set_text("")))));a=0;for(b=p.contraptions.bs.h.bs.attributes.length;a<b;){var c=a++;this.ui.inputs.h["attr"+(c+1)].set_text(p.contraptions.bs.h.bs.attributes[c])}k.showMsg(k.ln.get("window-narrbattle-oksaveset"));Aa.removePopUp(this)}else k.showPopup(k.ln.get("window-narrbattle-attributes"),
k.ln.get("window-narrbattle-ersaveset"),320,150,k.ln.get("default-ok"))},onSaveSound:function(a){if(!Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")){a=p.contraptions.bs;var b=new nf;a.h.bs=b}p.contraptions.bs.h.bs.soundpick=this.ui.inputs.h.soundpick.get_text();p.contraptions.bs.h.bs.soundwin=this.ui.inputs.h.soundwin.get_text();p.contraptions.bs.h.bs.soundloose=this.ui.inputs.h.soundloose.get_text();p.contraptions.bs.h.bs.soundtie=this.ui.inputs.h.soundtie.get_text();a=k.ws;b=new G;
var c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveSoundReturn))},onSaveSoundReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-narrbattle-sounds"),k.ln.get("window-narrbattle-ersave1set"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-narrbattle-sounds"),k.ln.get("window-narrbattle-ersaveset"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-narrbattle-oksaveset")),Aa.removePopUp(this)):
k.showPopup(k.ln.get("window-narrbattle-sounds"),k.ln.get("window-narrbattle-ersaveset"),320,150,k.ln.get("default-ok"))},__class__:bs});var cs=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-narrchar-title"),1E3,530,!1,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrChar"]=cs;cs.__name__="com.tilbuci.ui.window.narrative.WindowNarrChar";cs.__super__=ea;cs.prototype=I(ea.prototype,{_list:null,startInterface:function(a){a=k.ln.get("window-narrchar-title");var b=this.ui,c=this.ui,d=
{tp:"Label",id:"registered",tx:k.ln.get("window-narrchar-registered"),vr:""},f={tp:"Button",id:"load",tx:k.ln.get("window-narrchar-load"),ac:m(this,this.loadNarr)},g={tp:"Button",id:"remove",tx:k.ln.get("window-narrchar-remove"),ac:m(this,this.removeNarr)},h={tp:"Label",id:"id",tx:k.ln.get("window-narrchar-id"),vr:"detail"},n=k.ln.get("window-narrchar-add");n=c.forge("leftcol",[d,{tp:"List",id:"registered",vl:[],sl:null,ht:200},f,g,{tp:"Spacer",id:"add",ht:15,ln:!0},h,{tp:"TInput",id:"id",tx:"",vr:""},
{tp:"Button",id:"add",tx:n,ac:m(this,this.addNarr)}]);c=this.ui;d={tp:"Label",id:"properties",tx:k.ln.get("window-narrchar-properties"),vr:""};f={tp:"Label",id:"name",tx:k.ln.get("window-narrchar-name"),vr:"detail"};g={tp:"Label",id:"about",tx:k.ln.get("window-narrchar-about"),vr:"detail"};h=k.ln.get("window-narrchar-collection");this.addForm(a,b.createColumnHolder("columns",n,c.forge("rightcol",[d,f,{tp:"TInput",id:"name",tx:"",vr:""},g,{tp:"TArea",id:"about",tx:"",vr:""},{tp:"Label",id:"collection",
tx:h,vr:"detail"},{tp:"Select",id:"collection",vl:[],sl:null}]),this.ui.forge("bottom",[{tp:"Button",id:"save",tx:k.ln.get("window-narrchar-save"),ac:m(this,this.saveNarr)}]),420));this.ui.listDbClick("registered",m(this,this.loadNarr));ea.prototype.startInterface.call(this)},acStart:function(){var a=this._list.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this._list.h[d].kill();var f=this._list;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}f=a=p.narrative.chars.h;a=Object.keys(a);
b=a.length;for(c=0;c<b;){d=f[a[c++]];var g=this._list,h=d.id;d=d.clone();g.h[h]=d}this.clear();f=k.ws;a=new G;b=p.movie.get_mvId();a.h.movie=b;f.send("Media/ListCollections",a,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){a=b.map.h.list;b=[];for(var c=0;c<a.length;){var d=a[c];++c;b.push({text:d.title,value:d.id})}this.ui.setSelectOptions("collection",b)}else this.ui.createWarning(k.ln.get("window-narrchar-title"),k.ln.get("window-narrchar-nolist"),300,180,this.stage),Aa.removePopUp(this);
else this.ui.createWarning(k.ln.get("window-narrchar-title"),k.ln.get("window-narrchar-nolist"),300,180,this.stage),Aa.removePopUp(this)},clear:function(){for(var a=[],b=this._list.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.id,value:g.id})}this.ui.setListValues("registered",a);this.ui.setListSelectValue("registered",null);this.ui.inputs.h.id.set_text("");this.ui.inputs.h.name.set_text("");this.ui.tareas.h.about.set_text("")},loadNarr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=
null){a=this._list;var b=this.ui.lists.h.registered.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.id;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].id);c=this.ui.inputs.h.name;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].chname);c=this.ui.tareas.h.about;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;c.set_text(a.h[b].about);c=this.ui;a=this._list;b=this.ui.lists.h.registered.get_selectedItem().value;
c.setSelectValue("collection",a.h[b].collection)}}},action:function(a,b){},removeNarr:function(a){if(this.ui.lists.h.registered.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.registered.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,b.h[a].kill(),b=this._list,a=this.ui.lists.h.registered.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.clear())}},saveNarr:function(a){a=
p.narrative.chars.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.narrative.chars.h[d].kill();var f=p.narrative.chars;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];f=p.narrative.chars;var g=this._list.h[d].clone();f.h[d]=g}this.clear();a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.narrative.getData();b.h.data=c;a.send("Movie/SaveNarrative",b,m(this,this.onSaveReturn))},addNarr:function(a){if(this.ui.inputs.h.id.get_text().length>=
3)if(this.ui.inputs.h.name.get_text()!=""){var b="";this.ui.selects.h.collection.get_selectedItem()!=null&&(b=this.ui.selects.h.collection.get_selectedItem().value);a=this._list;var c=this.ui.inputs.h.id.get_text();Object.prototype.hasOwnProperty.call(a.h,c)?(a=this._list,c=this.ui.inputs.h.id.get_text(),c=a.h[c],c.load({id:this.ui.inputs.h.id.get_text(),chname:this.ui.inputs.h.name.get_text(),about:this.ui.tareas.h.about.get_text(),collection:b}),a=this._list,b=this.ui.inputs.h.id.get_text()):(c=
new An,c.load({id:this.ui.inputs.h.id.get_text(),chname:this.ui.inputs.h.name.get_text(),about:this.ui.tareas.h.about.get_text(),collection:b}),a=this._list,b=this.ui.inputs.h.id.get_text());a.h[b]=c;this.clear()}else k.showPopup(k.ln.get("window-narrchar-title"),k.ln.get("window-narrchar-noname"),320,150,k.ln.get("default-ok"));else k.showPopup(k.ln.get("window-narrchar-title"),k.ln.get("window-narrchar-noid"),320,150,k.ln.get("default-ok"))},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-narrchar-title"),
k.ln.get("window-narrchar-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-narrchar-title"),k.ln.get("window-narrchar-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-narrchar-oksave")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-narrchar-title"),k.ln.get("window-narrchar-ersave"),320,150,k.ln.get("default-ok"))},__class__:cs});var ds=function(a){ea.call(this,a,k.ln.get("window-narrdflow-title"),1E3,580,!0,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrDflow"]=
ds;ds.__name__="com.tilbuci.ui.window.narrative.WindowNarrDflow";ds.__super__=ea;ds.prototype=I(ea.prototype,{startInterface:function(a){this.ui.createHContainer("imgbt");this.ui.createTInput("imgbt","","",this.ui.hcontainers.h.imgbt,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),
new Ma(b),null,c,!1);this.ui.inputs.h.imgbt.set_enabled(!1);a=k.ln.get("window-narrdflow-settings");b=this.ui;c={tp:"Label",id:"set",tx:k.ln.get("window-narrdflow-setabout"),vr:""};var d={tp:"Label",id:"set",tx:k.ln.get("window-narrdflow-button"),vr:ia.VARIANT_DETAIL},f={tp:"Custom",cont:this.ui.hcontainers.h.imgbt},g={tp:"Label",id:"position",tx:k.ln.get("window-narrdflow-position"),vr:ia.VARIANT_DETAIL},h={tp:"Select",id:"position",vl:[{value:"top",text:k.ln.get("window-narrdflow-top")},{value:"topleft",
text:k.ln.get("window-narrdflow-topleft")},{value:"topright",text:k.ln.get("window-narrdflow-topright")},{value:"center",text:k.ln.get("window-narrdflow-center")},{value:"centerleft",text:k.ln.get("window-narrdflow-centerleft")},{value:"centerright",text:k.ln.get("window-narrdflow-centerright")},{value:"bottom",text:k.ln.get("window-narrdflow-bottom")},{value:"bottomleft",text:k.ln.get("window-narrdflow-bottomleft")},{value:"bottomright",text:k.ln.get("window-narrdflow-bottomright")}],sl:"center"},
n={tp:"Label",id:"gap",tx:k.ln.get("window-narrdflow-gap"),vr:ia.VARIANT_DETAIL},l={tp:"Label",id:"font",tx:k.ln.get("window-narrdflow-font"),vr:"detail"},q={tp:"Label",id:"fontsize",tx:k.ln.get("window-narrdflow-fontsize"),vr:"detail"},u={tp:"Label",id:"fontc",tx:k.ln.get("window-narrdflow-fontc"),vr:"detail"},v=k.ln.get("window-narrdflow-btset");this.addForm(a,b.forge("settings",[c,{tp:"Spacer",id:"set",ht:10,ln:!1},d,f,g,h,n,{tp:"Numeric",id:"gap",mn:0,mx:1E3,st:1,vl:10},l,{tp:"Select",id:"font",
vl:[],sl:null},q,{tp:"Numeric",id:"fontsize",mn:8,mx:200,st:1,vl:20},u,{tp:"TInput",id:"fontc",tx:"#FFFFFF",vr:""},{tp:"Spacer",id:"gap",ht:110,ln:!1},{tp:"Button",id:"set",tx:v,ac:m(this,this.onSaveSet)}]));a=k.ln.get("window-narrdflow-flow");c=b=this.ui;d={tp:"Label",id:"scenes",tx:k.ln.get("window-narrdflow-scenes"),vr:""};f=k.ln.get("window-narrdflow-loadscene");g=c.forge("leftcol",[d,{tp:"List",id:"scenes",vl:[],sl:null,ht:435,ch:m(this,this.sceneSelected)},{tp:"Button",id:"scenes",tx:f,ac:m(this,
this.onScene)}]);c=this.ui;d={tp:"Label",id:"options",tx:k.ln.get("window-narrdflow-options"),vr:""};f=k.ln.get("window-narrdflow-loadoption");this.addForm(a,b.createColumnHolder("columns",g,c.forge("rightcol",[d,{tp:"List",id:"options",vl:[],sl:null,ht:435},{tp:"Button",id:"options",tx:f,ac:m(this,this.onOption)}])));ea.prototype.startInterface.call(this)},acStart:function(){this.ui.hcontainers.h.imgbt.setWidth(960,[810,70,70]);for(var a=[],b=0,c=k.fonts.length;b<c;){var d=b++;a.push({text:k.fonts[d],
value:k.fonts[d]})}b=0;for(c=p.mdata.fonts;b<c.length;)d=c[b],++b,a.push({text:d.name,value:d.name});this.ui.setSelectOptions("font",a);Object.prototype.hasOwnProperty.call(p.contraptions.dflow.h,"dflow")&&(this.ui.inputs.h.imgbt.set_text(p.contraptions.dflow.h.dflow.buton),this.ui.setSelectValue("position",p.contraptions.dflow.h.dflow.position),this.ui.numerics.h.gap.set_value(p.contraptions.dflow.h.dflow.gap),this.ui.setSelectValue("font",p.contraptions.dflow.h.dflow.font),this.ui.numerics.h.fontsize.set_value(p.contraptions.dflow.h.dflow.fontsize),
this.ui.inputs.h.fontc.set_text(Ga.colorHex(p.contraptions.dflow.h.dflow.fontcolor,"#FFFFFF")));this.ui.setListValues("scenes",[]);this.ui.setListValues("options",[]);a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;a.send("Scene/ListDflow",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0)if(a=b.map.h.list,a.length==0)k.showMsg(k.ln.get("window-narrdflow-nooption"));else{b=[];for(var c=0;c<a.length;){var d=a[c];++c;d!=null&&b.push({text:d.title,value:d})}this.ui.setListValues("scenes",
b)}else this.ui.createWarning(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-nolist"),300,180,this.stage),Aa.removePopUp(this)},action:function(a,b){a=="dflowbrowseimgbt"&&this.ui.inputs.h.imgbt.set_text(b.h.file)},acImgbt:function(a){this._ac("dflowbrowseimgbt")},acImgbtdel:function(a){this.ui.inputs.h.imgbt.set_text("")},onSaveSet:function(a){if(this.ui.inputs.h.imgbt.get_text()==
"")k.showPopup(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-nobutton"),320,150,k.ln.get("default-ok"));else if(a=new Pk,a.load({id:"dflow",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Ga.colorHex(this.ui.inputs.h.fontc.get_text(),"#FFFFFF"),fontsize:Math.round(this.ui.numerics.h.fontsize.get_value()),buton:this.ui.inputs.h.imgbt.get_text(),position:this.ui.selects.h.position.get_selectedItem().value,gap:Math.round(this.ui.numerics.h.gap.get_value())})){for(var b=
Object.keys(p.contraptions.dflow.h),c=b.length,d=0;d<c;){var f=b[d++];p.contraptions.dflow.h[f].kill();var g=p.contraptions.dflow;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}p.contraptions.dflow.h.dflow=a;a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveReturn))}else k.showPopup(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-errorset"),320,150,k.ln.get("default-ok"))},onSaveReturn:function(a,
b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-ersave"),320,150,k.ln.get("default-ok")):k.showPopup(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-oksave"),320,150,k.ln.get("default-ok")):k.showPopup(k.ln.get("window-narrdflow-title"),k.ln.get("window-narrdflow-ersave"),320,150,k.ln.get("default-ok"))},sceneSelected:function(a){if(this.ui.lists.h.scenes.get_selectedItem()!=
null){a=[];var b=this.ui.lists.h.scenes.get_selectedItem().value;b!=null&&(b.df1[0]!=""&&b.df1[1]!=""&&a.push({text:b.df1[0],value:b.df1[1]}),b.df2[0]!=""&&b.df2[1]!=""&&a.push({text:b.df2[0],value:b.df2[1]}),b.df3[0]!=""&&b.df3[1]!=""&&a.push({text:b.df3[0],value:b.df3[1]}),b.df4[0]!=""&&b.df4[1]!=""&&a.push({text:b.df4[0],value:b.df4[1]}));this.ui.setListValues("options",a)}},onScene:function(a){this.ui.lists.h.scenes.get_selectedItem()!=null&&(a=this.ui.lists.h.scenes.get_selectedItem().value,
a!=null&&(p.area.imgSelect(),p.movie.loadScene(a.id)))},onOption:function(a){this.ui.lists.h.options.get_selectedItem()!=null&&(p.area.imgSelect(),p.movie.loadScene(this.ui.lists.h.options.get_selectedItem().value))},__class__:ds});var fs=function(a){this._list=new G;ea.call(this,a,k.ln.get("window-narrinv-title"),1E3,580,!0,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrInv"]=fs;fs.__name__="com.tilbuci.ui.window.narrative.WindowNarrInv";fs.__super__=ea;fs.prototype=I(ea.prototype,{_list:null,
_acsnippet:null,startInterface:function(a){this.ui.createHContainer("imgbgh");this.ui.createTInput("imgbgh","","",this.ui.hcontainers.h.imgbgh,!1);a=this.ui;var b=Z.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imgbgh",m(this,this.acImgbgh),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imimgbghdel",m(this,this.acImgbghdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbgh.set_enabled(!1);this.ui.createHContainer("imgbgv");
this.ui.createTInput("imgbgv","","",this.ui.hcontainers.h.imgbgv,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imgbgv",m(this,this.acImgbgv),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imimgbgvdel",m(this,this.acImgbgvdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbgv.set_enabled(!1);this.ui.createHContainer("imgbt");this.ui.createTInput("imgbt","","",this.ui.hcontainers.h.imgbt,!1);
a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),new Ma(b),null,c,!1);this.ui.inputs.h.imgbt.set_enabled(!1);this.ui.createHContainer("itgraphic");this.ui.createTInput("itgraphic","","",this.ui.hcontainers.h.itgraphic,!1);a=this.ui;b=Z.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.itgraphic;
a.createIconButton("itgraphic",m(this,this.acItgraphic),new Ma(b),null,c,!1);a=this.ui;b=Z.getBitmapData("btDel");c=this.ui.hcontainers.h.itgraphic;a.createIconButton("itgraphicdel",m(this,this.acItgraphicdel),new Ma(b),null,c,!1);this.ui.inputs.h.itgraphic.set_enabled(!1);this._acsnippet=new jj(460,267);a=k.ln.get("window-narrinv-items");c=b=this.ui;var d={tp:"Label",id:"items",tx:k.ln.get("window-narrinv-items"),vr:""},f={tp:"Button",id:"loadit",tx:k.ln.get("window-narrinv-loaditem"),ac:m(this,
this.onLoadIt)},g=k.ln.get("window-narrinv-removeitem"),h=c.forge("leftcol",[d,{tp:"List",id:"items",vl:[],sl:null,ht:350},f,{tp:"Button",id:"removeit",tx:g,ac:m(this,this.onRemoveIt)}]);c=this.ui;d={tp:"Label",id:"itname",tx:k.ln.get("window-narrinv-itname"),vr:"detail"};f={tp:"Label",id:"set",tx:k.ln.get("window-narrinv-itgraphic"),vr:ia.VARIANT_DETAIL};g={tp:"Custom",cont:this.ui.hcontainers.h.itgraphic};var n={tp:"Label",id:"set",tx:k.ln.get("window-narrinv-itaction"),vr:ia.VARIANT_DETAIL},l=
{tp:"Custom",cont:this._acsnippet},q=k.ln.get("window-narrinv-saveitem");this.addForm(a,b.createColumnHolder("columns",h,c.forge("rightcol",[d,{tp:"TInput",id:"itname",tx:"",vr:""},f,g,n,l,{tp:"Spacer",id:"saveitem",ht:10,ln:!1},{tp:"Button",id:"saveitem",tx:q,ac:m(this,this.onSetItem)}]),this.ui.forge("bottom",[{tp:"Button",id:"iconsave",tx:k.ln.get("window-narrinv-saveinventory"),ac:m(this,this.onSaveItems)}]),460));this.ui.listDbClick("items",m(this,this.onLoadIt));a=k.ln.get("window-narrinv-settings");
b=this.ui;c={tp:"Label",id:"set",tx:k.ln.get("window-narrinv-setabout"),vr:""};d={tp:"Label",id:"mode",tx:k.ln.get("window-narrinv-mode"),vr:"detail"};f={tp:"Select",id:"mode",vl:[{text:k.ln.get("window-narrinv-modeall"),value:"a"},{text:k.ln.get("window-narrinv-modeconsumable"),value:"c"},{text:k.ln.get("window-narrinv-modek"),value:"k"}],sl:null};g={tp:"Label",id:"imgbgh",tx:k.ln.get("window-narrinv-imgbgh"),vr:ia.VARIANT_DETAIL};h={tp:"Custom",cont:this.ui.hcontainers.h.imgbgh};n={tp:"Label",id:"imgbgv",
tx:k.ln.get("window-narrinv-imgbgv"),vr:ia.VARIANT_DETAIL};l={tp:"Custom",cont:this.ui.hcontainers.h.imgbgv};q={tp:"Label",id:"set",tx:k.ln.get("window-narrinv-button"),vr:ia.VARIANT_DETAIL};var u={tp:"Custom",cont:this.ui.hcontainers.h.imgbt},v={tp:"Label",id:"sound",tx:k.ln.get("window-narrinv-sound"),vr:"detail"},z={tp:"Label",id:"font",tx:k.ln.get("window-narrinv-font"),vr:"detail"},r={tp:"Label",id:"fontsize",tx:k.ln.get("window-narrinv-fontsize"),vr:"detail"},F={tp:"Label",id:"fontc",tx:k.ln.get("window-narrinv-fontc"),
vr:"detail"},J=k.ln.get("window-narrinv-btset");this.addForm(a,b.forge("settings",[c,{tp:"Spacer",id:"set",ht:5,ln:!1},d,f,g,h,n,l,q,u,v,{tp:"TInput",id:"sound",tx:"",vr:""},z,{tp:"Select",id:"font",vl:[],sl:null},r,{tp:"Numeric",id:"fontsize",mn:8,mx:200,st:1,vl:20},F,{tp:"TInput",id:"fontc",tx:"#FFFFFF",vr:""},{tp:"Spacer",id:"gap",ht:10,ln:!1},{tp:"Button",id:"set",tx:J,ac:m(this,this.onSaveSet)}]));ea.prototype.startInterface.call(this)},acStart:function(){this.ui.hcontainers.h.imgbt.setWidth(960,
[810,70,70]);this.ui.hcontainers.h.imgbgh.setWidth(960,[810,70,70]);this.ui.hcontainers.h.imgbgv.setWidth(960,[810,70,70]);this.ui.hcontainers.h.itgraphic.setWidth(460,[300,70,70]);this.ui.inputs.h.itname.set_text("");this.ui.inputs.h.itgraphic.set_text("");this.ui.setSelectValue("mode","a");this._acsnippet.setText("");for(var a=[],b=0,c=k.fonts.length;b<c;){var d=b++;a.push({text:k.fonts[d],value:k.fonts[d]})}b=0;for(c=p.mdata.fonts;b<c.length;)d=c[b],++b,a.push({text:d.name,value:d.name});this.ui.setSelectOptions("font",
a);Object.prototype.hasOwnProperty.call(p.contraptions.inv.h,"inv")&&(this.ui.inputs.h.imgbt.set_text(p.contraptions.inv.h.inv.close),this.ui.inputs.h.imgbgh.set_text(p.contraptions.inv.h.inv.horizontal),this.ui.inputs.h.imgbgv.set_text(p.contraptions.inv.h.inv.vertical),this.ui.setSelectValue("font",p.contraptions.inv.h.inv.font),this.ui.inputs.h.fontc.set_text(p.contraptions.inv.h.inv.fontcolor),this.ui.numerics.h.fontsize.set_value(p.contraptions.inv.h.inv.fontsize),this.ui.setSelectValue("mode",
p.contraptions.inv.h.inv.mode),this.ui.inputs.h.sound.set_text(p.contraptions.inv.h.inv.sound));b=this._list.h;b=Object.keys(b);c=b.length;for(d=0;d<c;){var f=b[d++];this._list.h[f].kill();a=this._list;Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f]}a=b=p.narrative.items.h;b=Object.keys(b);c=b.length;for(d=0;d<c;){f=a[b[d++]];var g=this._list,h=f.itname;f=f.clone();g.h[h]=f}this.showItems()},action:function(a,b){switch(a){case "inventclose":this.ui.inputs.h.imgbt.set_text(b.h.file);break;
case "inventh":this.ui.inputs.h.imgbgh.set_text(b.h.file);break;case "inventitem":this.ui.inputs.h.itgraphic.set_text(b.h.file);break;case "inventv":this.ui.inputs.h.imgbgv.set_text(b.h.file)}},showItems:function(){for(var a=[],b=Object.keys(this._list.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({value:f,text:f})}this.ui.setListValues("items",a);this.ui.setListSelectValue("items",null)},acImgbt:function(a){this._ac("inventclose")},acImgbtdel:function(a){this.ui.inputs.h.imgbt.set_text("")},acImgbgh:function(a){this._ac("inventh")},
acImgbghdel:function(a){this.ui.inputs.h.imgbgh.set_text("")},acImgbgv:function(a){this._ac("inventv")},acImgbgvdel:function(a){this.ui.inputs.h.imgbgv.set_text("")},acItgraphic:function(a){this._ac("inventitem")},acItgraphicdel:function(a){this.ui.inputs.h.itgraphic.set_text("")},onLoadIt:function(a){if(this.ui.lists.h.items.get_selectedItem()!=null){a=this._list;var b=this.ui.lists.h.items.get_selectedItem().value;if(Object.prototype.hasOwnProperty.call(a.h,b)){var c=this.ui.inputs.h.itname;a=this._list;
b=this.ui.lists.h.items.get_selectedItem().value;c.set_text(a.h[b].itname);c=this.ui.inputs.h.itgraphic;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;c.set_text(a.h[b].itgraphic);c=this._acsnippet;a=this._list;b=this.ui.lists.h.items.get_selectedItem().value;c.setText(a.h[b].itaction)}}},onRemoveIt:function(a){if(this.ui.lists.h.items.get_selectedItem()!=null){var b=this._list;a=this.ui.lists.h.items.get_selectedItem().value;Object.prototype.hasOwnProperty.call(b.h,a)&&(b=this._list,
a=this.ui.lists.h.items.get_selectedItem().value,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.showItems())}},onSetItem:function(a){if(this.ui.inputs.h.itname.get_text()==""||this.ui.inputs.h.itgraphic.get_text()=="")k.showPopup(k.ln.get("window-narrinv-titleitem"),k.ln.get("window-narrinv-itemno"),320,150,k.ln.get("default-ok"));else{a=this._list;var b=this.ui.inputs.h.itname.get_text(),c=new Zo({itname:this.ui.inputs.h.itname.get_text(),ittype:"c",itgraphic:this.ui.inputs.h.itgraphic.get_text(),
itaction:this._acsnippet.getText()});a.h[b]=c;this.ui.inputs.h.itname.set_text("");this.ui.inputs.h.itgraphic.set_text("");this._acsnippet.setText("");this.showItems()}},onSaveItems:function(a){a=p.narrative.items.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];p.narrative.items.h[d].kill();var f=p.narrative.items;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._list.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],p.narrative.items.h[d]=this._list.h[d],f=this._list,
Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.narrative.getData();b.h.data=c;a.send("Movie/SaveNarrative",b,m(this,this.onSaveReturn))},onSaveReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-narrinv-titleitem"),k.ln.get("window-narrinv-ersave1"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-narrinv-titleitem"),k.ln.get("window-narrinv-ersave"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-narrinv-oksave")),
Aa.removePopUp(this)):k.showPopup(k.ln.get("window-narrinv-titleitem"),k.ln.get("window-narrinv-ersave"),320,150,k.ln.get("default-ok"))},onSaveSet:function(a){if(this.ui.inputs.h.imgbt.get_text()=="")k.showPopup(k.ln.get("window-narrinv-title"),k.ln.get("window-narrinv-noclose"),320,150,k.ln.get("default-ok"));else if(this.ui.inputs.h.imgbgh.get_text()==""&&this.ui.inputs.h.imgbgv.get_text()=="")k.showPopup(k.ln.get("window-narrinv-title"),k.ln.get("window-narrinv-nobg"),320,150,k.ln.get("default-ok"));
else if(a=new P,a.load({id:"inv",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Ga.colorHex(this.ui.inputs.h.fontc.get_text(),"#FFFFFF"),fontsize:Math.round(this.ui.numerics.h.fontsize.get_value()),close:this.ui.inputs.h.imgbt.get_text(),horizontal:this.ui.inputs.h.imgbgh.get_text(),vertical:this.ui.inputs.h.imgbgv.get_text(),mode:this.ui.selects.h.mode.get_selectedItem().value,sound:this.ui.inputs.h.sound.get_text()})){for(var b=Object.keys(p.contraptions.inv.h),c=b.length,d=0;d<
c;){var f=b[d++];p.contraptions.inv.h[f].kill();var g=p.contraptions.inv;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}p.contraptions.inv.h.inv=a;a=k.ws;b=new G;c=p.movie.get_mvId();b.h.movie=c;c=p.contraptions.getData();b.h.data=c;a.send("Movie/SaveContraptions",b,m(this,this.onSaveSetReturn))}else k.showPopup(k.ln.get("window-narrinv-title"),k.ln.get("window-narrinv-errorset"),320,150,k.ln.get("default-ok"))},onSaveSetReturn:function(a,b){a?b.map.h.e==1?k.showPopup(k.ln.get("window-narrinv-title"),
k.ln.get("window-narrinv-ersave1set"),320,150,k.ln.get("default-ok")):b.map.h.e==2?k.showPopup(k.ln.get("window-narrinv-title"),k.ln.get("window-narrinv-ersaveset"),320,150,k.ln.get("default-ok")):(k.showMsg(k.ln.get("window-narrinv-oksaveset")),Aa.removePopUp(this)):k.showPopup(k.ln.get("window-narrinv-title"),k.ln.get("window-narrinv-ersaveset"),320,150,k.ln.get("default-ok"))},__class__:fs});var zr=function(a){ea.call(this,a,k.ln.get("window-scenedflow-title"),600,Bc.pickValue(475,485),!1,!0,!0)};
t["com.tilbuci.ui.window.scene.WindowSceneDflow"]=zr;zr.__name__="com.tilbuci.ui.window.scene.WindowSceneDflow";zr.__super__=ea;zr.prototype=I(ea.prototype,{startInterface:function(a){for(a=1;a<5;){var b=a++;this.ui.createHContainer("dflowt"+b);this.ui.createLabel("dflowt"+b,k.ln.get("window-scenedflow-choicetext"),ia.VARIANT_DETAIL,this.ui.hcontainers.h["dflowt"+b]);this.ui.createTInput("dflowt"+b,"","",this.ui.hcontainers.h["dflowt"+b]);this.ui.createHContainer("dflows"+b);this.ui.createLabel("dflows"+
b,k.ln.get("window-scenedflow-choicescene"),ia.VARIANT_DETAIL,this.ui.hcontainers.h["dflows"+b]);this.ui.createSelect("dflows"+b,[],null,this.ui.hcontainers.h["dflows"+b])}a=k.ln.get("window-scenedflow-title");b=this.ui;var c={tp:"Label",id:"choice1",tx:k.ln.get("window-scenedflow-choice1")},d={tp:"Custom",cont:this.ui.hcontainers.h.dflowt1},f={tp:"Custom",cont:this.ui.hcontainers.h.dflows1},g={tp:"Label",id:"choice2",tx:k.ln.get("window-scenedflow-choice2")},h={tp:"Custom",cont:this.ui.hcontainers.h.dflowt2},
n={tp:"Custom",cont:this.ui.hcontainers.h.dflows2},l={tp:"Label",id:"choice3",tx:k.ln.get("window-scenedflow-choice3")},q={tp:"Custom",cont:this.ui.hcontainers.h.dflowt3},u={tp:"Custom",cont:this.ui.hcontainers.h.dflows3},v={tp:"Label",id:"choice4",tx:k.ln.get("window-scenedflow-choice4")},z={tp:"Custom",cont:this.ui.hcontainers.h.dflowt4},r={tp:"Custom",cont:this.ui.hcontainers.h.dflows4},F=k.ln.get("window-scenedflow-set");this.addForm(a,b.forge("window",[c,d,f,{tp:"Spacer",id:"choice1",ht:10,ln:!0},
g,h,n,{tp:"Spacer",id:"choice2",ht:10,ln:!0},l,q,u,{tp:"Spacer",id:"choice3",ht:10,ln:!0},v,z,r,{tp:"Spacer",id:"choice4",ht:10,ln:!1},{tp:"Button",id:"okbutton",tx:F,ac:m(this,this.onSave)}]));ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.ui.hcontainers.h.dflowt1.setWidth(560,[180,370]);this.ui.hcontainers.h.dflows1.setWidth(560,[180,370]);this.ui.hcontainers.h.dflowt2.setWidth(560,[180,370]);this.ui.hcontainers.h.dflows2.setWidth(560,
[180,370]);this.ui.hcontainers.h.dflowt3.setWidth(560,[180,370]);this.ui.hcontainers.h.dflows3.setWidth(560,[180,370]);this.ui.hcontainers.h.dflowt4.setWidth(560,[180,370]);this.ui.hcontainers.h.dflows4.setWidth(560,[180,370]);var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Scene/List",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0){a=[{text:k.ln.get("window-scenedflow-none"),value:""}];b=b.map.h.list;if(b.length>0)for(var c=0;c<b.length;){var d=b[c];++c;a.push({text:y.field(d,
"title"),value:y.field(d,"id")})}this.ui.inputs.h.dflowt1.set_text(p.movie.scene.dflow[0][0]);this.ui.setSelectOptions("dflows1",a,p.movie.scene.dflow[0][1]);this.ui.inputs.h.dflowt2.set_text(p.movie.scene.dflow[1][0]);this.ui.setSelectOptions("dflows2",a,p.movie.scene.dflow[1][1]);this.ui.inputs.h.dflowt3.set_text(p.movie.scene.dflow[2][0]);this.ui.setSelectOptions("dflows3",a,p.movie.scene.dflow[2][1]);this.ui.inputs.h.dflowt4.set_text(p.movie.scene.dflow[3][0]);this.ui.setSelectOptions("dflows4",
a,p.movie.scene.dflow[3][1])}else this.ui.createWarning(k.ln.get("window-scenedflow-title"),k.ln.get("window-scenedflow-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-scenedflow-title"),k.ln.get("window-scenedflow-nolist"),300,180,this.stage),Aa.removePopUp(this)},onSave:function(a){a=[["",""],["",""],["",""],["",""]];for(var b=1;b<5;){var c=b++;this.ui.selects.h["dflows"+c].get_selectedItem().value!=""&&(this.ui.inputs.h["dflowt"+c].get_text()==""&&
this.ui.inputs.h["dflowt"+c].set_text(this.ui.selects.h["dflows"+c].get_selectedItem().text),a[c-1]=[this.ui.inputs.h["dflowt"+c].get_text(),this.ui.selects.h["dflows"+c].get_selectedItem().value])}for(;p.movie.scene.dflow.length>0;)p.movie.scene.dflow.shift();p.movie.scene.dflow=a;k.showMsg(k.ln.get("window-scenedflow-sceneset"));Aa.removePopUp(this)},__class__:zr});var hs=function(a){ea.call(this,a,k.ln.get("window-scenenew-title"),800,Bc.pickValue(170,190),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneNew"]=
hs;hs.__name__="com.tilbuci.ui.window.scene.WindowSceneNew";hs.__super__=ea;hs.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-scenenew-title");var b=this.ui,c={tp:"Label",id:"scenename",tx:k.ln.get("window-scenenew-name"),vr:ia.VARIANT_DETAIL},d=k.ln.get("window-scenenew-create");this.addForm(a,b.forge("leftcol",[c,{tp:"TInput",id:"scenename",tx:"",vr:""},{tp:"Spacer",id:"scenenew",ht:20},{tp:"Button",id:"scenecreate",tx:d,ac:m(this,this.onCreateScene)}]));ea.prototype.startInterface.call(this)},
kill:function(){ea.prototype.kill.call(this)},onCreateScene:function(a){if(this.ui.inputs.h.scenename.get_text()=="")this.ui.createWarning(k.ln.get("window-scenenew-title"),k.ln.get("window-scenenew-norequired"),300,180,this.stage);else{a=k.ws;var b=new G,c=this.ui.inputs.h.scenename.get_text();b.h.title=c;b.h.id="";c=p.movie.get_mvId();b.h.movie=c;a.send("Scene/New",b,m(this,this.onCreateSceneReturn))}},onCreateSceneReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-scenenew-title"),
k.ln.get("window-scenenew-createer"),300,180,this.stage);else{p.area.imgSelect();this.ui.inputs.h.scenename.set_text("");Aa.removePopUp(this);a=this._ac;var c=new G;c.h.id=b.map.h.id;a("sceneload",c);k.acInfo.loadInfo(!0)}else this.ui.createWarning(k.ln.get("window-scenenew-title"),k.ln.get("window-scenenew-createer"),300,180,this.stage)},__class__:hs});var js=function(a){ea.call(this,a,k.ln.get("window-sceneopen-title"),800,Bc.pickValue(415,430),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneOpen"]=
js;js.__name__="com.tilbuci.ui.window.scene.WindowSceneOpen";js.__super__=ea;js.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-sceneopen-title");var b=this.ui,c={tp:"Label",id:"openabout",tx:k.ln.get("window-sceneopen-wait")},d=k.ln.get("window-sceneopen-button");this.addForm(a,b.forge("window",[c,{tp:"List",id:"openlist",vl:[],ht:295,sl:null},{tp:"Button",id:"okbutton",tx:d,ac:m(this,this.onOpen)}]));ea.prototype.startInterface.call(this);this.ui.listDbClick("openlist",m(this,
this.onOpen));this.ui.setListToIcon("openlist")},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.loadScenes()},loadScenes:function(){this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneopen-wait"));this.ui.setListValues("openlist",[]);var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;a.send("Scene/List",b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0)if(a=b.map.h.list,a.length==0)this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneopen-noscenes"));
else{b=[];for(var c=0;c<a.length;){var d=a[c];++c;y.field(d,"lock")==""?b.push({text:y.field(d,"title"),value:y.field(d,"id"),asset:"",user:null}):b.push({text:y.field(d,"title"),value:y.field(d,"id"),asset:"btLock",user:y.field(d,"lock")})}this.ui.setListValues("openlist",b);this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneopen-about"))}else this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneopen-error"));else this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneopen-error"))},
onOpen:function(a){if(this.ui.lists.h.openlist.get_selectedItem()!=null)if(this.ui.lists.h.openlist.get_selectedItem().user==null||this.ui.lists.h.openlist.get_selectedItem().user==""){p.area.imgSelect();a=this._ac;var b=new G,c=this.ui.lists.h.openlist.get_selectedItem().value;b.h.id=c;c=p.movie.get_mvId();b.h.movie=c;a("sceneload",b);Aa.removePopUp(this)}else k.showMsg(k.ln.get("window-sceneopen-locked"))},__class__:js});var ms=function(a){this._collections=new G;this._kfactext=[];ea.call(this,
a,k.ln.get("window-sceneprop-windowtitle"),1E3,Bc.pickValue(590,660),!0,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneProperties"]=ms;ms.__name__="com.tilbuci.ui.window.scene.WindowSceneProperties";ms.__super__=ea;ms.prototype=I(ea.prototype,{_acstart:null,_kfactions:null,_kfactext:null,_image:null,_collections:null,startInterface:function(a){this._image=new ad(m(this,this.onImageLoaded));this._image.set_height(130);this._image.set_visible(!0);a=new Nj("v",10,6710886);a.set_width(900);a.set_height(140);
a.addChild(this._image);var b=k.ln.get("window-sceneprop-about"),c=this.ui,d={tp:"Label",id:"title",tx:k.ln.get("window-sceneprop-title"),vr:""},f={tp:"TInput",id:"title",tx:p.movie.scene.title,vr:""},g={tp:"Label",id:"about",tx:k.ln.get("window-sceneprop-aboutscene"),vr:""},h={tp:"TArea",id:"about",tx:p.movie.scene.about,vr:"",en:!0,ht:100},n={tp:"Label",id:"static",tx:k.ln.get("window-sceneprop-static"),vr:""},l={tp:"Label",id:"image",tx:k.ln.get("window-sceneprop-image"),vr:""},q={tp:"Button",
id:"image",tx:k.ln.get("window-sceneprop-imagebt"),ac:m(this,this.onImage)},u={tp:"Button",id:"imagerm",tx:k.ln.get("window-sceneprop-imagerm"),ac:m(this,this.onImageRemove)},v=k.ln.get("window-sceneprop-setbt");this.addForm(b,c.forge("about",[d,f,g,h,n,{tp:"Toggle",id:"static",vl:!1},l,q,u,{tp:"Custom",cont:a},{tp:"Button",id:"about",tx:v,ac:m(this,this.onSave)}]));b=k.ln.get("window-sceneprop-navigation");c=this.ui;d={tp:"Label",id:"nvup",tx:k.ln.get("window-sceneprop-nvup"),vr:""};f={tp:"Label",
id:"nvdown",tx:k.ln.get("window-sceneprop-nvdown"),vr:""};g={tp:"Label",id:"nvleft",tx:k.ln.get("window-sceneprop-nvleft"),vr:""};h={tp:"Label",id:"nvright",tx:k.ln.get("window-sceneprop-nvright"),vr:""};n={tp:"Label",id:"nvin",tx:k.ln.get("window-sceneprop-nvin"),vr:""};l={tp:"Label",id:"nvout",tx:k.ln.get("window-sceneprop-nvout"),vr:""};q=k.ln.get("window-sceneprop-setbt");this.addForm(b,c.forge("navigation",[d,{tp:"Select",id:"nvup",vl:[],sl:""},f,{tp:"Select",id:"nvdown",vl:[],sl:""},g,{tp:"Select",
id:"nvleft",vl:[],sl:""},h,{tp:"Select",id:"nvright",vl:[],sl:""},n,{tp:"Select",id:"nvin",vl:[],sl:""},l,{tp:"Select",id:"nvout",vl:[],sl:""},{tp:"Spacer",id:"navigation",ht:148,ln:!1},{tp:"Button",id:"navigation",tx:q,ac:m(this,this.onSave)}]));a=this.ui.createContainer("acstart");a.addChild(this.ui.createLabel("acstartlabel",k.ln.get("window-sceneprop-acstartabout"),ia.VARIANT_DETAIL));this._acstart=new jj(956,435);this._acstart.setText(p.movie.scene.acstart);a.addChild(this._acstart);a.addChild(this.ui.createSpacer("acstartspacer",
15));a.addChild(this.ui.createButton("saveacstart",k.ln.get("window-sceneprop-setbt"),m(this,this.onSave)));this.addForm(k.ln.get("window-sceneprop-acstart"),a);this._kfactions=new jj(956,320);b=k.ln.get("window-sceneprop-keyframes");c=this.ui;d={tp:"Label",id:"loop",tx:k.ln.get("window-sceneprop-loop"),vr:ia.VARIANT_DETAIL};f={tp:"Label",id:"kfactions",tx:k.ln.get("window-sceneprop-kfactions"),vr:ia.VARIANT_DETAIL};g={tp:"Custom",cont:this._kfactions};h=k.ln.get("window-sceneprop-setbt");this.addForm(b,
c.forge("keyframes",[d,{tp:"Select",id:"loop",vl:[],sl:""},{tp:"Spacer",id:"kfactions",ht:20,ln:!0},f,{tp:"Select",id:"kfactions",vl:[],sl:""},{tp:"Spacer",id:"keyframes",ht:5,ln:!1},g,{tp:"Spacer",id:"keyframes",ht:15,ln:!1},{tp:"Button",id:"keyframes",tx:h,ac:m(this,this.onSave)}]));this.ui.selectChange("kfactions",m(this,this.onkfChange),m(this,this.onkfOpen));b=k.ln.get("window-sceneprop-scenedel");c=this.ui;d={tp:"Label",id:"remove",tx:k.ln.get("window-sceneprop-scenedelabout"),vr:""};f=k.ln.get("window-sceneprop-scenedelbt");
this.addForm(b,c.forge("remove",[d,{tp:"TInput",id:"remove",tx:"",vr:""},{tp:"Spacer",id:"remove",ht:20,ln:!1},{tp:"Button",id:"remove",tx:f,ac:m(this,this.onRemove)}]));this.ui.labels.h.remove.set_wordWrap(!0);ea.prototype.startInterface.call(this)},acStart:function(){this._kfactext=[];this._collections=new G;for(var a=0,b=p.movie.scene.keyframes.length;a<b;){var c=a++;p.movie.scene.ackeyframes.length>c?this._kfactext.push(p.movie.scene.ackeyframes[c]):this._kfactext.push("")}b=k.ws;a=new G;c=p.movie.get_mvId();
a.h.movie=c;b.send("Scene/List",a,m(this,this.onList));p.movie.scene.image==""?this._image.unload():this._image.load(p.movie.scene.image);this.ui.inputs.h.title.set_text(p.movie.scene.title);this.ui.tareas.h.about.set_text(p.movie.scene.about);this.ui.toggles.h["static"].set_selected(p.movie.scene.staticsc);this._acstart.setText(p.movie.scene.acstart)},action:function(a,b){a=="browsesceneimage"&&this._image.load(b.h.file)},onList:function(a,b){if(a)if(b.map.h.e==0){var c=[{text:k.ln.get("window-sceneprop-nvnone"),
value:""}],d=b.map.h.list;if(d.length>0)for(b=0;b<d.length;)a=d[b],++b,c.push({text:y.field(a,"title"),value:y.field(a,"id")});this.ui.setSelectOptions("nvup",c,p.movie.scene.navigation.h.up);this.ui.setSelectOptions("nvdown",c,p.movie.scene.navigation.h.down);this.ui.setSelectOptions("nvleft",c,p.movie.scene.navigation.h.left);this.ui.setSelectOptions("nvright",c,p.movie.scene.navigation.h.right);this.ui.setSelectOptions("nvin",c,p.movie.scene.navigation.h.nin);this.ui.setSelectOptions("nvout",c,
p.movie.scene.navigation.h.nout);c=[];b=0;for(d=p.movie.scene.keyframes.length;b<d;)a=b++,c.push({text:H.string(a+1),value:a});this.ui.setSelectOptions("loop",c,p.movie.scene.loop);this._kfactions.setText(this._kfactext[0]);this.ui.setSelectOptions("kfactions",c,0)}else this.ui.createWarning(k.ln.get("window-sceneprop-windowtitle"),k.ln.get("window-sceneprop-nolist"),300,180,this.stage),Aa.removePopUp(this);else this.ui.createWarning(k.ln.get("window-sceneprop-windowtitle"),k.ln.get("window-sceneprop-nolist"),
300,180,this.stage),Aa.removePopUp(this)},kill:function(){ea.prototype.kill.call(this)},onkfChange:function(a){this._kfactions.setText(this._kfactext[this.ui.selects.h.kfactions.get_selectedItem().value])},onkfOpen:function(a){this._kfactext[this.ui.selects.h.kfactions.get_selectedItem().value]=this._kfactions.getText()},onSave:function(a){this._kfactext[this.ui.selects.h.kfactions.get_selectedItem().value]=this._kfactions.getText();var b=-1;a=0;for(var c=this._kfactext.length;a<c;){var d=a++;this._kfactext[d]!=
""&&Ga.jsonParse(this._kfactext[d])==0&&(b=d)}if(b>=0)this.ui.createWarning(k.ln.get("window-sceneprop-windowtitle"),N.replace(k.ln.get("window-sceneprop-kfacerror"),"[NUMBER]",H.string(b+1)),300,180,this.stage);else if(Ga.jsonParse(this._acstart.getText())==0&&this._acstart.getText()!="")this.ui.createWarning(k.ln.get("window-sceneprop-windowtitle"),k.ln.get("window-sceneprop-acerror"),300,180,this.stage);else if(this.ui.inputs.h.title.get_text()=="")this.ui.createWarning(k.ln.get("window-sceneprop-windowtitle"),
k.ln.get("window-sceneprop-notitle"),300,180,this.stage);else{p.movie.scene.title=this.ui.inputs.h.title.get_text();p.movie.scene.about=this.ui.tareas.h.about.get_text();p.movie.scene.image=this._image.get_lastMedia();p.movie.scene.staticsc=this.ui.toggles.h["static"].get_selected();a=p.movie.scene.navigation;c=this.ui.selects.h.nvup.get_selectedItem().value;a.h.up=c;a=p.movie.scene.navigation;c=this.ui.selects.h.nvdown.get_selectedItem().value;a.h.down=c;a=p.movie.scene.navigation;c=this.ui.selects.h.nvleft.get_selectedItem().value;
a.h.left=c;a=p.movie.scene.navigation;c=this.ui.selects.h.nvright.get_selectedItem().value;a.h.right=c;a=p.movie.scene.navigation;c=this.ui.selects.h.nvin.get_selectedItem().value;a.h.nin=c;a=p.movie.scene.navigation;c=this.ui.selects.h.nvout.get_selectedItem().value;a.h.nout=c;p.movie.scene.acstart=this._acstart.getText();p.movie.scene.ackeyframes=[];a=0;for(c=this._kfactext;a<c.length;)b=c[a],++a,p.movie.scene.ackeyframes.push(b);p.movie.scene.loop=this.ui.selects.h.loop.get_selectedItem().value;
k.showMsg(k.ln.get("window-sceneprop-sceneset"));Aa.removePopUp(this)}},onRemove:function(a){this.ui.inputs.h.remove.get_text()==k.ln.get("window-sceneprop-scenedeltype")&&(this.ui.inputs.h.remove.set_text(""),this.ui.createConfirm(k.ln.get("window-sceneprop-scenedel"),k.ln.get("window-sceneprop-scenedelconfirm"),320,240,m(this,this.onRemoveConfirm),k.ln.get("default-ok"),k.ln.get("default-cancel"),this.stage))},onRemoveConfirm:function(a){if(a){a=k.ws;var b=new G,c=p.movie.get_mvId();b.h.movie=c;
c=p.movie.get_scId();b.h.id=c;a.send("Scene/Remove",b,m(this,this.onRemoveOk))}},onRemoveOk:function(a,b){a?b.map.h.e==0?(p.movie.scene.clear(),p.movie.noScene(),p.area.clear(),Aa.removePopUp(this),k.showMsg(k.ln.get("window-sceneprop-scenedelok"))):this.ui.createWarning(k.ln.get("window-sceneprop-scenedel"),k.ln.get("window-sceneprop-scenedeler"),300,180,this.stage):this.ui.createWarning(k.ln.get("window-sceneprop-scenedel"),k.ln.get("window-sceneprop-scenedeler"),300,180,this.stage)},onImage:function(a){this._ac("browsesceneimage")},
onImageRemove:function(a){this._image.unload()},onImageLoaded:function(a){this._image.set_height(190);this._image.set_width(this._image.oWidth*this._image.get_height()/this._image.oHeight);this._image.set_visible(!0)},__class__:ms});var ps=function(a){ea.call(this,a,k.ln.get("window-scenesaveas-title"),800,Bc.pickValue(180,200),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneSaveas"]=ps;ps.__name__="com.tilbuci.ui.window.scene.WindowSceneSaveas";ps.__super__=ea;ps.prototype=I(ea.prototype,{startInterface:function(a){a=
k.ln.get("window-scenesaveas-title");var b=this.ui,c={tp:"Label",id:"scenename",tx:k.ln.get("window-scenesaveas-name"),vr:ia.VARIANT_DETAIL},d=k.ln.get("window-scenesaveas-create");this.addForm(a,b.forge("leftcol",[c,{tp:"TInput",id:"scenename",tx:"",vr:""},{tp:"Spacer",id:"scenenew",ht:20},{tp:"Button",id:"scenecreate",tx:d,ac:m(this,this.onSaveScene)}]));ea.prototype.startInterface.call(this)},acStart:function(){this.ui.inputs.h.scenename.set_text(p.movie.scene.title)},kill:function(){ea.prototype.kill.call(this)},
onSaveScene:function(a){if(this.ui.inputs.h.scenename.get_text()=="")this.ui.createWarning(k.ln.get("window-scenesaveas-title"),k.ln.get("window-scenesaveas-norequired"),300,180,this.stage);else{a={};for(var b=Object.keys(p.movie.collections.h),c=b.length,d=0;d<c;){var f=b[d++];a[f]=p.movie.collections.h[f].toJson()}b=k.ws;c=new G;d=p.movie.get_mvId();c.h.movie=d;c.h.id="";d=p.movie.scene.toJson();c.h.scene=d;c.h.collections=a;d=this.ui.inputs.h.scenename.get_text();c.h.title=d;b.send("Scene/SaveAs",
c,m(this,this.onSaveReturn))}},onSaveReturn:function(a,b){if(a)if(b.map.h.e!=0)this.ui.createWarning(k.ln.get("window-scenesaveas-title"),k.ln.get("window-scenesaveas-createer"),300,180,this.stage);else{k.showMsg(k.ln.get("window-scenesaveas-createok"));Aa.removePopUp(this);a=this._ac;var c=new G;c.h.id=b.map.h.id;a("sceneload",c)}else this.ui.createWarning(k.ln.get("window-scenesaveas-title"),k.ln.get("window-scenesaveas-createer"),300,180,this.stage)},__class__:ps});var ys=function(a){ea.call(this,
a,k.ln.get("window-sceneversion-title"),600,Bc.pickValue(420,430),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneVersions"]=ys;ys.__name__="com.tilbuci.ui.window.scene.WindowSceneVersions";ys.__super__=ea;ys.prototype=I(ea.prototype,{startInterface:function(a){a=k.ln.get("window-sceneversion-title");var b=this.ui,c={tp:"Label",id:"openabout",tx:k.ln.get("window-sceneversion-wait")},d=k.ln.get("window-sceneversion-button");this.addForm(a,b.forge("window",[c,{tp:"List",id:"openlist",vl:[],ht:295,
sl:null},{tp:"Button",id:"okbutton",tx:d,ac:m(this,this.onOpen)}]));this.ui.setListToIcon("openlist");ea.prototype.startInterface.call(this)},kill:function(){ea.prototype.kill.call(this)},acStart:function(){this.loadScenes()},loadScenes:function(){this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneversion-wait"));this.ui.setListValues("openlist",[]);var a=k.ws,b=new G,c=p.movie.get_mvId();b.h.movie=c;c=p.movie.get_scId();b.h.id=c;c=k.ln.get("default-dateformat");b.h.format=c;a.send("Scene/ListVersions",
b,m(this,this.onList))},onList:function(a,b){if(a)if(b.map.h.e==0)if(b.map.h.list.length==0)this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneversion-noscenes"));else{a=[];for(var c=0,d=y.fields(b.map.h.list);c<d.length;){var f=d[c];++c;y.field(y.field(b.map.h.list,f),"pub")=="1"?a.push({text:y.field(y.field(b.map.h.list,f),"date"),value:y.field(y.field(b.map.h.list,f),"uid"),user:y.field(y.field(b.map.h.list,f),"user"),asset:"iconPublished"}):a.push({text:y.field(y.field(b.map.h.list,f),
"date"),value:y.field(y.field(b.map.h.list,f),"uid"),user:y.field(y.field(b.map.h.list,f),"user"),asset:""})}this.ui.setListValues("openlist",a);this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneversion-about"))}else this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneversion-error"));else this.ui.labels.h.openabout.set_text(k.ln.get("window-sceneversion-error"))},onOpen:function(a){if(this.ui.lists.h.openlist.get_selectedItem()!=null){a=this._ac;var b=new G,c=this.ui.lists.h.openlist.get_selectedItem().value;
b.h.id=c;c=p.movie.get_mvId();b.h.movie=c;a("sceneversionload",b);Aa.removePopUp(this)}},__class__:ys});var Zq=function(a){this._level=-1;this._key="";this._user="system";qa.call(this);this._url=a;this._interact=new ft};t["com.tilbuci.ws.Webservice"]=Zq;Zq.__name__="com.tilbuci.ws.Webservice";Zq.__super__=qa;Zq.prototype=I(qa.prototype,{url:null,_url:null,get_url:function(){return this._url},user:null,_user:null,get_user:function(){return this._user},key:null,_key:null,get_key:function(){return this._key},
level:null,_level:null,get_level:function(){return this._level},_interact:null,setUser:function(a,b,c){this._user=a;this._key=b;this._level=c;k.userLevel=c},logout:function(){this._user="system";this._key="";this._level=-1;k.userLevel=-1},send:function(a,b,c,d,f){f==null&&(f=!0);d==null&&(d=0);var g=Ga.jsonStringify(b);b=this._url;var h=new G;h.h.r=g;g=Ga.md5(this._key+g);h.h.s=g;h.h.u=this._user;h.h.a=a;new Ob(!0,b,"POST",h,4,c,null,null,null,m(this,this.onEnd),null,d);f&&this._interact.start()},
download:function(a){for(var b=N.replace(this._url,"/ws","/download"),c=vn._new(),d=Object.keys(a.h),f=d.length,g=0;g<f;){var h=d[g++];c[h]=a.h[h]}c.a="download";a=new se(b);a.data=c;a.method="GET";Pa.getURL(a)},openurl:function(a){a=new se(a);a.method="GET";Pa.getURL(a)},openWorkspace:function(){var a=N.replace(this._url,"/ws","/editor"),b=vn._new();b.us=this._user;b.uk=Ga.md5(this._user+this._key);a=new se(a);a.data=b;a.method="GET";Pa.getURL(a)},kill:function(){this._key=this._user=this._url=null},
onEnd:function(){this._interact.stop()},__class__:Zq,__properties__:{get_level:"get_level",get_key:"get_key",get_user:"get_user",get_url:"get_url"}});var tn=function(a,b){this._groups=[];this._level=-1;this._key="";this._user="system";qa.call(this);this._url=a;this._user="system";this._key=b;this._groups=[]};t["com.tilbuci.ws.WebserviceP"]=tn;tn.__name__="com.tilbuci.ws.WebserviceP";tn.__super__=qa;tn.prototype=I(qa.prototype,{url:null,_url:null,get_url:function(){return this._url},user:null,_user:null,
get_user:function(){return this._user},key:null,_key:null,get_key:function(){return this._key},level:null,_level:null,get_level:function(){return this._level},groups:null,_groups:null,get_groups:function(){return this._groups},send:function(a,b,c,d){if(p.server){var f=Ga.jsonStringify(b);b=this._url;var g=new G;g.h.r=f;f=Ga.md5(this._key+f);g.h.s=f;g.h.u=this._user;g.h.a=a;new Ob(!0,b,"POST",g,4,c,null,null,null,null,d);return!0}return!1},loginVisitor:function(a,b,c,d,f){var g=new G;g.h.email=a;g.h.title=
b;g.h.text=c;g.h.sender=d;return this.send("System/Visitor",g,f)},checkVisitorCode:function(a,b,c){var d=new G;d.h.email=a;d.h.code=b;return this.send("System/VisitorCode",d,c)},checkVisitorKey:function(a,b,c){var d=new G;d.h.email=a;d.h.key=b;return this.send("System/VisitorKey",d,c)},dataSave:function(a,b,c){var d=new G;d.h.name=a;a=Ga.jsonStringify(b);d.h.values=a;a=p.movie.get_mvId();d.h.movie=a;return this.send("Visitor/DataSave",d,c)},dataLoad:function(a,b){var c=new G;c.h.name=a;a=p.movie.get_mvId();
c.h.movie=a;return this.send("Visitor/DataLoad",c,b)},stateSave:function(a,b,c,d){var f=new G;a=Ga.jsonStringify(a);f.h.values=a;a=p.movie.get_mvId();f.h.movie=a;f.h.quick=b;a=p.movie.get_scId();f.h.scene=a;f.h.about=c;return this.send("Visitor/StateSave",f,d)},stateLoad:function(a,b,c){var d=new G;d.h.id=a;d.h.quick=b;a=p.movie.get_mvId();d.h.movie=a;return this.send("Visitor/StateLoad",d,c)},stateList:function(a,b){var c=new G;c.h.format=a;a=p.movie.get_mvId();c.h.movie=a;return this.send("Visitor/StateList",
c,b)},loadScene:function(a,b){var c=new G;c.h.id=a;a=p.movie.get_mvId();c.h.movie=a;c.h.visitor=this._user;return this.send("Visitor/LoadScene",c,b)},setUser:function(a,b,c){this._user=a;this._key=b;this._groups=c},clearUser:function(){this._user="system";this._key="";this._groups=[]},userLogged:function(){return this._user!="system"?this._user!="":!1},getUser:function(){return this.userLogged()?this._user:""},kill:function(){for(this._key=this._user=this._url=null;this._groups.length>0;)this._groups.shift();
this._groups=null},__class__:tn,__properties__:{get_groups:"get_groups",get_level:"get_level",get_key:"get_key",get_user:"get_user",get_url:"get_url"}});var kp=function(){this.__indeterminateDuration=.75;this.__activitySkin=null;this._lastUpdateTime=0;this._reversed=!1;this._savedSkinAlpha=1;this._activitySkinMeasurements=null;this.initializeActivityIndicatorTheme();fa.call(this);this.addEventListener("addedToStage",m(this,this.activityIndicator_addedToStageHandler));this.addEventListener("removedFromStage",
m(this,this.activityIndicator_removedFromStageHandler))};t["feathers.controls.ActivityIndicator"]=kp;kp.__name__="feathers.controls.ActivityIndicator";kp.__super__=fa;kp.prototype=I(fa.prototype,{_currentActivitySkin:null,_activitySkinMeasurements:null,_savedSkinAlpha:null,_reversed:null,_lastUpdateTime:null,initializeActivityIndicatorTheme:function(){tw.initialize()},update:function(){var a=this.isInvalid(x.SIZE),b=this.isInvalid(x.STYLES);b&&this.refreshBackgroundSkin();this.measure()&&(a=!0);(a||
b)&&this.layoutBackgroundSkin()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentActivitySkin!=null&&df.resetFluidlyWithParent(this._activitySkinMeasurements,this._currentActivitySkin,this);var h=null;w.__implements(this._currentActivitySkin,rb)&&(h=this._currentActivitySkin);
w.__implements(this._currentActivitySkin,da)&&this._currentActivitySkin.validateNow();var n=this.get_explicitWidth();a&&(n=0,this._currentActivitySkin!=null&&(n=Math.max(this._currentActivitySkin.get_width(),n)));a=this.get_explicitHeight();b&&(a=0,this._currentActivitySkin!=null&&(a=Math.max(this._currentActivitySkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=0,h!=null?b=Math.max(h.get_minWidth(),b):this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.minWidth!=null&&(b=
Math.max(this._activitySkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=0,h!=null?c=Math.max(h.get_minHeight(),c):this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.minHeight!=null&&(c=Math.max(this._activitySkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.maxWidth!=null?this._activitySkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&
(f=h!=null?h.get_maxHeight():this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.maxHeight!=null?this._activitySkinMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},layoutBackgroundSkin:function(){if(this._currentActivitySkin!=null){var a=Math.min(this.actualWidth,this.actualHeight);this._currentActivitySkin.set_width(a);this._currentActivitySkin.set_height(a);this._currentActivitySkin.set_x((this.actualWidth-a)/2);this._currentActivitySkin.set_y((this.actualHeight-
a)/2);w.__implements(this._currentActivitySkin,da)&&this._currentActivitySkin.validateNow()}},refreshBackgroundSkin:function(){var a=this._currentActivitySkin;this._currentActivitySkin=this.getCurrentBackgroundSkin();this._currentActivitySkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentActivitySkin))},getCurrentBackgroundSkin:function(){return this.get_activitySkin()},addCurrentBackgroundSkin:function(a){a==null?this._activitySkinMeasurements=null:(w.__implements(a,
Fa)&&a.initializeNow(),this._activitySkinMeasurements==null?this._activitySkinMeasurements=new Sb(a):this._activitySkinMeasurements.save(a),this._savedSkinAlpha=a.get_alpha(),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._activitySkinMeasurements.restore(a),a.set_alpha(this._savedSkinAlpha),a.parent==this&&this.removeChild(a))},activityIndicator_addedToStageHandler:function(a){this._lastUpdateTime=
Pa.getTimer();this.addEventListener("enterFrame",m(this,this.activityIndicator_enterFrameHandler))},activityIndicator_removedFromStageHandler:function(a){this.removeEventListener("enterFrame",m(this,this.activityIndicator_enterFrameHandler))},activityIndicator_enterFrameHandler:function(a){if(this._enabled&&this.get_visible()&&this._currentActivitySkin!=null){a=Pa.getTimer();var b=(a-this._lastUpdateTime)/(this.get_indeterminateDuration()*1E3);b>=1&&(b-=Math.floor(b),this._lastUpdateTime=a,this._reversed=
!this._reversed);w.__implements(this._currentActivitySkin,xm)?this._currentActivitySkin.set_indeterminatePosition(b):this._currentActivitySkin.set_alpha(this._savedSkinAlpha*(this._reversed?1-b:b))}},__activitySkin:null,get_activitySkin:function(){return this.__activitySkin},set_activitySkin:function(a){if(!this.setStyle("activitySkin")||this.__activitySkin==a)return this.__activitySkin;this._previousClearStyle=m(this,this.clearStyle_activitySkin);this.__activitySkin=a;this.setInvalid(x.STYLES);return this.__activitySkin},
clearStyle_activitySkin:function(){this.set_activitySkin(null);return this.get_activitySkin()},__indeterminateDuration:null,get_indeterminateDuration:function(){return this.__indeterminateDuration},set_indeterminateDuration:function(a){if(!this.setStyle("indeterminateDuration")||this.__indeterminateDuration==a)return this.__indeterminateDuration;this._previousClearStyle=m(this,this.clearStyle_indeterminateDuration);this.__indeterminateDuration=a;this.setInvalid(x.STYLES);return this.__indeterminateDuration},
clearStyle_indeterminateDuration:function(){this.set_indeterminateDuration(.75);return this.get_indeterminateDuration()},__class__:kp,__properties__:I(fa.prototype.__properties__,{set_indeterminateDuration:"set_indeterminateDuration",get_indeterminateDuration:"get_indeterminateDuration",set_activitySkin:"set_activitySkin",get_activitySkin:"get_activitySkin"})});var lp=function(a,b,c){b==null&&(b=-1);this.enabled=!0;this.index=-1;this.data=a;this.index=b;this.text=c};t["feathers.data.ButtonBarItemState"]=
lp;lp.__name__="feathers.data.ButtonBarItemState";lp.prototype={owner:null,data:null,index:null,text:null,enabled:null,recyclerID:null,__class__:lp};var Ze=function(a,b){this.__customButtonVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this._ignoreChildChanges=!1;this._layoutResult=new Kg;this._layoutMeasurements=new Sb;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._ignoreSelectionChange=!1;this._layoutItems=[];this._unrenderedData=[];this.itemStatePool=
new dc(function(){return new lp});this.buttonToItemState=new Ta;this.stringDataToButton=new G;this.objectDataToButton=new Ta;this._additionalStorage=null;this._defaultStorage=new lt(null,Ne.withClass(Xb));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._previousCustomButtonVariant=null;this.initializeButtonBarTheme();fa.call(this);this.set_dataProvider(a);b!=null&&this.addEventListener("itemTrigger",b)};t["feathers.controls.ButtonBar"]=Ze;Ze.__name__="feathers.controls.ButtonBar";Ze.defaultUpdateButton=
function(a,b){a.set_text(b.text)};Ze.defaultResetButton=function(a,b){a.set_text(null)};Ze.__super__=fa;Ze.prototype=I(fa.prototype,{_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.buttonBar_dataProvider_changeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.buttonBar_dataProvider_updateItemHandler)),
this._dataProvider.removeEventListener("updateAll",m(this,this.buttonBar_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._dataProvider.addEventListener("change",m(this,this.buttonBar_dataProvider_changeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.buttonBar_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.buttonBar_dataProvider_updateAllHandler)));this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");
return this._dataProvider},_previousCustomButtonVariant:null,get_buttonRecycler:function(){return this._defaultStorage.buttonRecycler},set_buttonRecycler:function(a){if(this._defaultStorage.buttonRecycler==a)return this._defaultStorage.buttonRecycler;this._defaultStorage.oldButtonRecycler=this._defaultStorage.buttonRecycler;this._defaultStorage.buttonRecycler=a;this.setInvalid(Ze.INVALIDATION_FLAG_BUTTON_FACTORY);return this._defaultStorage.buttonRecycler},_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},
set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,_buttonRecyclerIDFunction:null,get_buttonRecyclerIDFunction:function(){return this._buttonRecyclerIDFunction},set_buttonRecyclerIDFunction:function(a){if(this._buttonRecyclerIDFunction==a)return this._buttonRecyclerIDFunction;this._buttonRecyclerIDFunction=a;this.setInvalid(Ze.INVALIDATION_FLAG_BUTTON_FACTORY);
return this._buttonRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToButton:null,stringDataToButton:null,buttonToItemState:null,itemStatePool:null,_unrenderedData:null,_layoutItems:null,_ignoreSelectionChange:null,itemToText:function(a){return H.string(a)},itemToEnabled:function(a){return!0},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_layoutMeasurements:null,_layoutResult:null,_ignoreChildChanges:null,itemToButton:function(a){return a==null?null:typeof a==
"string"?this.stringDataToButton.h[a]:this.objectDataToButton.h[a.__id__]},indexToButton:function(a){if(this._dataProvider==null||a<0||a>=this._dataProvider.get_length())return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToButton.h[a]:this.objectDataToButton.h[a.__id__]},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToButton.h[a]:this.objectDataToButton.h[a.__id__];if(b!=null)b=this.buttonToItemState.h[b.__id__];else{var c=
this._dataProvider.indexOf(a);if(c==-1)return null;b=new lp;this.populateCurrentItemState(a,c,b,!1)}return b},getButtonRecycler:function(a){return this._recyclerMap==null?null:this._recyclerMap.h[a]},setButtonRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new G);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Ze.INVALIDATION_FLAG_BUTTON_FACTORY))},dispose:function(){this.refreshInactiveButtons(this._defaultStorage,
!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveButtons(this._additionalStorage[c],!0)}this.set_dataProvider(null);fa.prototype.dispose.call(this)},initializeButtonBarTheme:function(){vw.initialize()},update:function(){var a=this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);var b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(Ze.INVALIDATION_FLAG_BUTTON_FACTORY);
var f=this.isInvalid(Ze.INVALIDATION_FLAG_BUTTON_FACTORY);(d||c)&&this.refreshBackgroundSkin();(f||b||c||a)&&this.refreshButtons();this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.layoutBackgroundSkin();this.validateChildren();this._previousCustomButtonVariant=this.get_customButtonVariant()},refreshViewPortBounds:function(){this._layoutMeasurements.save(this)},handleLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._layoutResult.reset();
this.get_layout()!=null&&this.get_layout().layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},validateChildren:function(){for(var a=0,b=this._layoutItems;a<b.length;){var c=b[a];++a;if(!w.__implements(c,da))break;c.validateNow()}},refreshButtons:function(){this.get_buttonRecycler().update==null&&(this.get_buttonRecycler().update=
Ze.defaultUpdateButton,this.get_buttonRecycler().reset==null&&(this.get_buttonRecycler().reset=Ze.defaultResetButton));if(this._recyclerMap!=null)for(var a=this._recyclerMap.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Ze.defaultUpdateButton,f.reset==null&&(f.reset=Ze.defaultResetButton))}a=this.isInvalid(Ze.INVALIDATION_FLAG_BUTTON_FACTORY);this.refreshInactiveButtons(this._defaultStorage,a);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<
c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveButtons(d,a);this.findUnrenderedData();this.recoverInactiveButtons(this._defaultStorage);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveButtons(d);this.renderUnrenderedData();this.freeInactiveButtons(this._defaultStorage);if(this._defaultStorage.inactiveButtons.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive buttons should be empty after updating.");
if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveButtons(d),d.inactiveButtons.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive buttons "+d.id+" should be empty after updating.");},refreshInactiveButtons:function(a,b){var c=a.inactiveButtons;a.inactiveButtons=a.activeButtons;a.activeButtons=c;if(a.activeButtons.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active buttons should be empty before updating.");
b&&(this.recoverInactiveButtons(a),this.freeInactiveButtons(a))},recoverInactiveButtons:function(a){var b=0;for(a=a.inactiveButtons;b<a.length;){var c=a[b];++b;if(c!=null){var d=this.buttonToItemState.h[c.__id__];if(d!=null){var f=d.data;this.buttonToItemState.remove(c);if(typeof f=="string"){var g=this.stringDataToButton;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}else this.objectDataToButton.remove(f);c.removeEventListener("trigger",m(this,this.buttonBar_button_triggerHandler));this.resetButton(c,
d);this.itemStatePool.release(d)}}}},freeInactiveButtons:function(a){for(var b=0,c=a.inactiveButtons;b<c.length;){var d=c[b];++b;d!=null&&this.destroyButton(d)}a.inactiveButtons.length=0},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||
this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),
this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,
da)&&this._currentBackgroundSkin.validateNow())},findUnrenderedData:function(){this._layoutItems.length=0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){this._layoutItems.length=this._dataProvider.get_length();for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._dataProvider.get_length();b<c;){var d=b++,f=this._dataProvider.get(d);var g=typeof f=="string"?this.stringDataToButton.h[f]:this.objectDataToButton.h[f.__id__];if(g!=null){var h=this.buttonToItemState.h[g.__id__],
n=this.populateCurrentItemState(f,d,h,this._forceItemStateUpdate),l=h.recyclerID,q=this.itemStateToStorage(h);if(q.id!=l)this._unrenderedData.push(f);else{n&&this.updateButton(g,h,q);this._layoutItems[d]=g;this.setChildIndex(g,d+a);if(!V.remove(q.inactiveButtons,g))throw a=w.getClass(this),new ob(""+a.__name__+": button renderer map contains bad data for item at index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");q.activeButtons.push(g)}}else this._unrenderedData.push(f)}}},
renderUnrenderedData:function(){for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._unrenderedData;b<c.length;){var d=c[b];++b;var f=this._dataProvider.indexOf(d),g=this.itemStatePool.get();this.populateCurrentItemState(d,f,g,!0);d=this.createButton(g);this.addChildAt(d,f+a);this._layoutItems[f]=d}this._unrenderedData.length=0},createButton:function(a){var b=this.itemStateToStorage(a);if(b.inactiveButtons.length==0){var c=this.get_buttonRecycler().create();if(c.get_variant()==null){var d=
this.get_customButtonVariant()!=null?this.get_customButtonVariant():Ze.CHILD_VARIANT_BUTTON;c.set_variant(d)}c.initializeNow()}else c=b.inactiveButtons.shift();this.updateButton(c,a,b);c.addEventListener("trigger",m(this,this.buttonBar_button_triggerHandler));this.buttonToItemState.set(c,a);a=a.data;typeof a=="string"?this.stringDataToButton.h[a]=c:this.objectDataToButton.set(a,c);b.activeButtons.push(c);return c},destroyButton:function(a){this.removeChild(a);this.get_buttonRecycler().destroy!=null&&
this.get_buttonRecycler().destroy(a)},itemStateToStorage:function(a){var b=null;this._buttonRecyclerIDFunction!=null&&(b=this._buttonRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new ob('Item renderer recycler ID "'+b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<d;){var f=c++;f=this._additionalStorage[f];if(f.buttonRecycler==
a)return f}f=new lt(b,a);this._additionalStorage.push(f);return f},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.index!=b)c.index=b,f=!0;b=this._enabled&&this.itemToEnabled(a);if(d||c.enabled!=b)c.enabled=b,f=!0;a=this.itemToText(a);if(d||c.text!=a)c.text=a,f=!0;return f},updateButton:function(a,b,c){b.recyclerID=c.id;c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_buttonRecycler().update!=null&&
this.get_buttonRecycler().update(a,b);this._ignoreSelectionChange=c;this.refreshButtonProperties(a,b)},resetButton:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_buttonRecycler()!=null&&this.get_buttonRecycler().reset!=null&&this.get_buttonRecycler().reset(a,b);this._ignoreSelectionChange=c;this.refreshButtonProperties(a,Ze.RESET_BUTTON_STATE)},refreshButtonProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;w.__implements(a,
Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.data);w.__implements(a,ri)&&a.set_layoutIndex(b.index);a.set_enabled(b.enabled);this._ignoreSelectionChange=c},buttonBar_button_triggerHandler:function(a){a=w.__cast(a.currentTarget,Xb);Pj.dispatch(this,"itemTrigger",this.buttonToItemState.h[a.__id__])},buttonBar_dataProvider_changeHandler:function(a){this.setInvalid(x.DATA)},updateButtonForIndex:function(a){var b=this._dataProvider.get(a);var c=typeof b=="string"?this.stringDataToButton.h[b]:
this.objectDataToButton.h[b.__id__];if(c==null)this.setInvalid(x.DATA);else{var d=this.buttonToItemState.h[c.__id__];d.owner!=null&&(this.itemStateToStorage(d),this.populateCurrentItemState(b,a,d,!0),this.resetButton(c,d),d.owner=null,this.setInvalid(x.DATA))}},buttonBar_dataProvider_updateItemHandler:function(a){this.updateButtonForIndex(a.index)},buttonBar_dataProvider_updateAllHandler:function(a){a=0;for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateButtonForIndex(c)}},__customButtonVariant:null,
get_customButtonVariant:function(){return this.__customButtonVariant},set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);return this.get_customButtonVariant()},__layout:null,
get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==
a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;
this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},get_styleContext:function(){return Ze},__class__:Ze,__properties__:I(fa.prototype.__properties__,{set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout",set_buttonRecyclerIDFunction:"set_buttonRecyclerIDFunction",get_buttonRecyclerIDFunction:"get_buttonRecyclerIDFunction",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_buttonRecycler:"set_buttonRecycler",get_buttonRecycler:"get_buttonRecycler",set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",
set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var Mi=function(a){a==null&&(a="");this.__verticalAlign=hc.MIDDLE;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=this.__minGap=0;this.__disabledTextFormat=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__embedFonts=!1;this._rightView=this.__textFormat=this.__styleSheet=null;this._ignoreRightViewResize=!1;this._leftView=null;this._ignoreLeftViewResize=!1;this._htmlText=this._currentBackgroundSkin=
this._backgroundSkinMeasurements=null;this._updatedTextStyles=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeHeaderTheme();fa.call(this);this.set_text(a)};t["feathers.controls.Header"]=Mi;Mi.__name__="feathers.controls.Header";Mi.__interfaces__=[re];Mi.__super__=fa;Mi.prototype=I(fa.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,
_textMeasuredWidth:null,_textMeasuredHeight:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},get_baseline:function(){if(this.textField==null)return 0;var a=this._htmlText!=null&&this._htmlText.length>0;return this._text!=null&&this._text.length>0||a?this.textField.get_y()+this.textField.getLineMetrics(0).ascent:(this.textField.set_text("\u200b"),
a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent,this.textField.set_text(""),a)},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_ignoreLeftViewResize:null,_leftView:null,get_leftView:function(){return this._leftView},set_leftView:function(a){if(this._leftView==a)return this._leftView;
this._leftView!=null&&(this._leftView.removeEventListener("resize",m(this,this.header_leftView_resizeHandler)),this._leftView.parent==this&&this.removeChild(this._leftView));this._leftView=a;this._leftView!=null&&(this.addChild(this._leftView),this._leftView.addEventListener("resize",m(this,this.header_leftView_resizeHandler),!1,0,!0));this.setInvalid(x.LAYOUT);return this._leftView},_ignoreRightViewResize:null,_rightView:null,get_rightView:function(){return this._rightView},set_rightView:function(a){if(this._rightView==
a)return this._rightView;this._rightView!=null&&(this._rightView.removeEventListener("resize",m(this,this.header_rightView_resizeHandler)),this._rightView.parent==this&&this.removeChild(this._rightView));this._rightView=a;this._rightView!=null&&(this.addChild(this._rightView),this._rightView.addEventListener("resize",m(this,this.header_rightView_resizeHandler),!1,0,!0));this.setInvalid(x.LAYOUT);return this._rightView},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);
this.set_paddingLeft(a)},dispose:function(){this.set_leftView(null);this.set_rightView(null);fa.prototype.dispose.call(this)},initializeHeaderTheme:function(){Ew.initialize()},initialize:function(){fa.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_multiline(!0),this.textField.set_selectable(!1),this.addChild(this.textField))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),
f=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(f||d)&&this.refreshBackgroundSkin();(f||d)&&this.refreshTextStyles();(a||f||d||c)&&this.refreshText(c);this.measure()&&(c=!0);(b||f||d||a||c)&&this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this._ignoreLeftViewResize;
this._ignoreLeftViewResize=!0;var n=this._ignoreRightViewResize;this._ignoreRightViewResize=!0;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var l=null;w.__implements(this._currentBackgroundSkin,rb)&&(l=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();w.__implements(this._leftView,da)&&this._leftView.validateNow();w.__implements(this._rightView,da)&&
this._rightView.validateNow();var q=this.get_explicitWidth();a&&(q=this._textMeasuredWidth+this.get_paddingLeft()+this.get_paddingRight(),this._leftView!=null&&(q+=this._leftView.get_width()+this.get_minGap()),this._rightView!=null&&(q+=this._rightView.get_width()+this.get_minGap()),this._currentBackgroundSkin!=null&&(q=Math.max(this._currentBackgroundSkin.get_width(),q)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight,this._leftView!=null&&(a=Math.max(a,this._leftView.get_height())),
this._rightView!=null&&(a=Math.max(a,this._rightView.get_height())),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this._textMeasuredWidth+this.get_paddingLeft()+this.get_paddingRight(),this._leftView!=null&&(b+=this._leftView.get_width()+this.get_minGap()),this._rightView!=null&&(b+=this._rightView.get_width()+this.get_minGap()),l!=null?b=Math.max(l.get_minWidth(),b):
this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight,this._leftView!=null&&(c=Math.max(c,this._leftView.get_height())),this._rightView!=null&&(c=Math.max(c,this._rightView.get_height())),c+=this.get_paddingTop()+this.get_paddingBottom(),l!=null?c=Math.max(l.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=
null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=l!=null?l.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=l!=null?l.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);this._ignoreLeftViewResize=h;this._ignoreRightViewResize=
n;return this.saveMeasurements(q,a,b,c,d,f)},refreshTextStyles:function(){this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",
m(this,this.header_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.header_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this._text!=null&&this._text.length>0,c=this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=this._previousHTMLText||this._updatedTextStyles||
a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),a=null,this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null&&(a=this.get_explicitMaxWidth()),a!=null&&(a<0&&(a=0),this.textField.set_width(a)),this._textMeasuredWidth=this.textField.get_width(),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),b||c||this.textField.set_text(""),
this._previousText=this._text,this._previousHTMLText=this._htmlText},getCurrentTextFormat:function(){return this.get_styleSheet()!=null?null:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},
getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutContent:function(){this.layoutBackgroundSkin();var a=this.get_paddingLeft(),b=this.actualWidth-this.get_paddingRight(),c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom(),f=c;if(this._leftView!=null){w.__implements(this._leftView,da)&&this._leftView.validateNow();this._leftView.set_x(this.get_paddingLeft());
switch(this.get_verticalAlign()._hx_index){case 0:this._leftView.set_y(this.get_paddingTop());break;case 2:this._leftView.set_y(this.actualHeight-this.get_paddingBottom()-this._leftView.get_height());break;default:this._leftView.set_y(this.get_paddingTop()+(d-this._leftView.get_height())/2)}f-=this._leftView.get_width()+this.get_minGap();a=this._leftView.get_x()+this._leftView.get_width()+this.get_minGap()}if(this._rightView!=null){w.__implements(this._rightView,da)&&this._rightView.validateNow();
this._rightView.set_x(this.actualWidth-this.get_paddingRight()-this._rightView.get_width());switch(this.get_verticalAlign()._hx_index){case 0:this._rightView.set_y(this.get_paddingTop());break;case 2:this._rightView.set_y(this.actualHeight-this.get_paddingBottom()-this._rightView.get_height());break;default:this._rightView.set_y(this.get_paddingTop()+(d-this._rightView.get_height())/2)}f-=this._rightView.get_width()+this.get_minGap();b=this._rightView.get_x()-this.get_minGap()}var g=this._textMeasuredWidth;
g>f&&(g=f);g<0&&(g=0);this.textField.set_width(g);b-=g;f=this._textMeasuredHeight;f>d&&(f=d);f<0&&(f=0);this.textField.set_height(f);c=this.get_paddingLeft()+(c-g)/2;c<a?c=a:c>b&&(c=b);this.textField.set_x(c);switch(this.get_verticalAlign()._hx_index){case 0:this.textField.set_y(this.get_paddingTop());break;case 2:this.textField.set_y(this.actualHeight-this.get_paddingBottom()-f);break;default:this.textField.set_y(this.get_paddingTop()+(d-f)/2)}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=
null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},header_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},header_leftView_resizeHandler:function(a){this._ignoreLeftViewResize||
this.setInvalid(x.LAYOUT)},header_rightView_resizeHandler:function(a){this._ignoreRightViewResize||this.setInvalid(x.LAYOUT)},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},
__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||
this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=
m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);
this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);
this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);
return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},
__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},
set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__minGap:null,get_minGap:function(){return this.__minGap},set_minGap:function(a){if(!this.setStyle("minGap")||this.__minGap==a)return this.__minGap;this._previousClearStyle=
m(this,this.clearStyle_minGap);this.__minGap=a;this.setInvalid(x.STYLES);return this.__minGap},clearStyle_minGap:function(){this.set_minGap(0);return this.get_minGap()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},
clearStyle_verticalAlign:function(){this.set_verticalAlign(hc.MIDDLE);return this.get_verticalAlign()},__class__:Mi,__properties__:I(fa.prototype.__properties__,{set_rightView:"set_rightView",get_rightView:"get_rightView",set_leftView:"set_leftView",get_leftView:"get_leftView",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",
get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",
set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text"})});var Fd=function(a){a==null&&(a="");this._previousCustomButtonBarVariant=this._previousCustomHeaderVariant=this._previousCustomMessageLabelVariant=this.__icon=this.__customButtonBarVariant=this.__customHeaderVariant=this.__customMessageLabelVariant=
null;this._ignoreIconResizes=!1;this._buttonsDataProvider=this._iconMeasurements=this._currentIcon=null;this._titleText="";this._htmlText=null;this.initializeAlertTheme();Uc.call(this);this.set_text(a)};t["feathers.controls.Alert"]=Fd;Fd.__name__="feathers.controls.Alert";Fd.show=function(a,b,c,d,f,g){f=f!=null?f():new Fd;f.set_text(a);f.set_titleText(b);if(c!=null){a=Array(c.length);b=0;for(var h=c.length;b<h;){var n=b++;a[n]=new lx(c[n])}c=a}else c=[];f.set_buttonsDataProvider(new dg(c));d!=null&&
f.addEventListener("itemTrigger",function(l){d(l.state)});return Fd.showAlert(f,g)};Fd.showAlert=function(a,b){b!=null?b.open(a,Pa.get_current()):Aa.addPopUp(a,Pa.get_current(),!0,!0);return a};Fd.__super__=Uc;Fd.prototype=I(Uc.prototype,{messageLabel:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},
set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},alertHeader:null,_titleText:null,get_titleText:function(){return this._titleText},set_titleText:function(a){if(a==null){if(this._titleText.length==0)return this._titleText;a=""}if(this._titleText==a)return this._titleText;this._titleText=a;this.setInvalid(x.DATA);return this._titleText},_oldMessageLabelFactory:null,_messageLabelFactory:null,get_messageLabelFactory:function(){return this._messageLabelFactory},
set_messageLabelFactory:function(a){if(this._messageLabelFactory==a)return this._messageLabelFactory;this._messageLabelFactory=a;this.setInvalid(Fd.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY);return this._messageLabelFactory},_oldHeaderFactory:null,_headerFactory:null,get_headerFactory:function(){return this._headerFactory},set_headerFactory:function(a){if(this._headerFactory==a)return this._headerFactory;this._headerFactory=a;this.setInvalid(Fd.INVALIDATION_FLAG_HEADER_FACTORY);return this._headerFactory},
_oldButtonBarFactory:null,_buttonBarFactory:null,get_buttonBarFactory:function(){return this._buttonBarFactory},set_buttonBarFactory:function(a){if(this._buttonBarFactory==a)return this._buttonBarFactory;this._buttonBarFactory=a;this.setInvalid(Fd.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);return this._buttonBarFactory},buttonBar:null,_buttonsDataProvider:null,get_buttonsDataProvider:function(){return this._buttonsDataProvider},set_buttonsDataProvider:function(a){if(this._buttonsDataProvider==a)return this._buttonsDataProvider;
this._buttonsDataProvider=a;this.setInvalid(x.DATA);return this._buttonsDataProvider},_iconMeasurements:null,_currentIcon:null,_ignoreIconResizes:null,_previousCustomButtonBarVariant:null,_previousCustomHeaderVariant:null,_previousCustomMessageLabelVariant:null,set_header:function(a){throw new ob("Alert header must be created with headerFactory");},_set_header:function(a){return Uc.prototype.set_header.call(this,a)},set_footer:function(a){throw new ob("Alert footer must be created with buttonBarFactory");
},_set_footer:function(a){return Uc.prototype.set_footer.call(this,a)},dispose:function(){this.destroyButtonBar();this.destroyHeader();this.destroyMessageLabel();Uc.prototype.dispose.call(this)},initializeAlertTheme:function(){uw.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);this._previousCustomButtonBarVariant!=this.get_customButtonBarVariant()&&this.setInvalidationFlag(Fd.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);var d=this.isInvalid(Fd.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);
this._previousCustomHeaderVariant!=this.get_customHeaderVariant()&&this.setInvalidationFlag(Fd.INVALIDATION_FLAG_HEADER_FACTORY);var f=this.isInvalid(Fd.INVALIDATION_FLAG_HEADER_FACTORY);this._previousCustomMessageLabelVariant!=this.get_customMessageLabelVariant()&&this.setInvalidationFlag(Fd.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY);var g=this.isInvalid(Fd.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY);f&&this.createHeader();d&&this.createButtonBar();g&&this.createMessageLabel();(c||b)&&this.refreshIcon();
(a||c||b||g)&&this.refreshText();(a||c||b||f)&&this.refreshTitleText();(a||d)&&this.refreshButtons();Uc.prototype.update.call(this);this._previousCustomButtonBarVariant=this.get_customButtonBarVariant();this._previousCustomHeaderVariant=this.get_customHeaderVariant();this._previousCustomMessageLabelVariant=this.get_customMessageLabelVariant()},createButtonBar:function(){var a=this;this.destroyButtonBar();var b=this._buttonBarFactory!=null?this._buttonBarFactory:Fd.defaultButtonBarFactory;this._oldButtonBarFactory=
b;this.buttonBar=b.create();this.buttonBar.get_variant()==null&&this.buttonBar.set_variant(this.get_customButtonBarVariant()!=null?this.get_customButtonBarVariant():Fd.CHILD_VARIANT_BUTTON_BAR);this.buttonBar.addEventListener("itemTrigger",m(this,this.alert_buttonBar_itemTriggerHandler));this.runWithInvalidationFlagsOnly(function(){a._set_footer(a.buttonBar)})},destroyButtonBar:function(){var a=this;this.buttonBar!=null&&(this.buttonBar.removeEventListener("itemTrigger",m(this,this.alert_buttonBar_itemTriggerHandler)),
this._oldButtonBarFactory.destroy!=null&&this._oldButtonBarFactory.destroy(this.buttonBar),this.buttonBar=this._oldButtonBarFactory=null,this.runWithInvalidationFlagsOnly(function(){a._set_footer(null)}))},createHeader:function(){var a=this;this.destroyHeader();var b=this._headerFactory!=null?this._headerFactory:Fd.defaultHeaderFactory;this._oldHeaderFactory=b;this.alertHeader=b.create();this.alertHeader.get_variant()==null&&this.alertHeader.set_variant(this.get_customHeaderVariant()!=null?this.get_customHeaderVariant():
Fd.CHILD_VARIANT_HEADER);this.runWithInvalidationFlagsOnly(function(){a._set_header(a.alertHeader)})},destroyHeader:function(){var a=this;this.alertHeader!=null&&(this._oldHeaderFactory.destroy!=null&&this._oldHeaderFactory.destroy(this.alertHeader),this.alertHeader=this._oldHeaderFactory=null,this.runWithInvalidationFlagsOnly(function(){a._set_header(null)}))},createMessageLabel:function(){this.destroyMessageLabel();var a=this._messageLabelFactory!=null?this._messageLabelFactory:Fd.defaultMessageLabelFactory;
this._oldMessageLabelFactory=a;this.messageLabel=a.create();this.messageLabel.get_variant()==null&&this.messageLabel.set_variant(this.get_customMessageLabelVariant()!=null?this.get_customMessageLabelVariant():Fd.CHILD_VARIANT_MESSAGE_LABEL);this.addChild(this.messageLabel)},destroyMessageLabel:function(){this.messageLabel!=null&&(this.removeChild(this.messageLabel),this._oldMessageLabelFactory.destroy!=null&&this._oldMessageLabelFactory.destroy(this.messageLabel),this.messageLabel=this._oldMessageLabelFactory=
null)},refreshButtons:function(){this.buttonBar.set_dataProvider(this._buttonsDataProvider)},refreshText:function(){this.messageLabel.set_text(this._text);this.messageLabel.set_htmlText(this._htmlText)},refreshTitleText:function(){this.alertHeader.set_text(this._titleText)},refreshIcon:function(){var a=this._currentIcon;this._currentIcon=this.getCurrentIcon();this._currentIcon!=a&&(this.removeCurrentIcon(a),this._currentIcon==null?this._iconMeasurements=null:(w.__implements(this._currentIcon,Fa)&&
this._currentIcon.initializeNow(),this._iconMeasurements==null?this._iconMeasurements=new Sb(this._currentIcon):this._iconMeasurements.save(this._currentIcon),w.__implements(this._currentIcon,qb)&&this._currentIcon.set_uiContext(this),a=this.getChildIndex(this.messageLabel),this.addChildAt(this._currentIcon,a)))},getCurrentIcon:function(){return this.get_icon()},removeCurrentIcon:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._iconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},
alert_buttonBar_itemTriggerHandler:function(a){this.parent.removeChild(this);this.dispatchEvent(a)},get_styleContext:function(){return Fd},__icon:null,get_icon:function(){return this.__icon},set_icon:function(a){if(!this.setStyle("icon")||this.__icon==a)return this.__icon;this._previousClearStyle=m(this,this.clearStyle_icon);this.__icon=a;this.setInvalid(x.STYLES);return this.__icon},clearStyle_icon:function(){this.set_icon(null);return this.get_icon()},__customButtonBarVariant:null,get_customButtonBarVariant:function(){return this.__customButtonBarVariant},
set_customButtonBarVariant:function(a){if(!this.setStyle("customButtonBarVariant")||this.__customButtonBarVariant==a)return this.__customButtonBarVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonBarVariant);this.__customButtonBarVariant=a;this.setInvalid(x.STYLES);return this.__customButtonBarVariant},clearStyle_customButtonBarVariant:function(){this.set_customButtonBarVariant(null);return this.get_customButtonBarVariant()},__customHeaderVariant:null,get_customHeaderVariant:function(){return this.__customHeaderVariant},
set_customHeaderVariant:function(a){if(!this.setStyle("customHeaderVariant")||this.__customHeaderVariant==a)return this.__customHeaderVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderVariant);this.__customHeaderVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderVariant},clearStyle_customHeaderVariant:function(){this.set_customHeaderVariant(null);return this.get_customHeaderVariant()},__customMessageLabelVariant:null,get_customMessageLabelVariant:function(){return this.__customMessageLabelVariant},
set_customMessageLabelVariant:function(a){if(!this.setStyle("customMessageLabelVariant")||this.__customMessageLabelVariant==a)return this.__customMessageLabelVariant;this._previousClearStyle=m(this,this.clearStyle_customMessageLabelVariant);this.__customMessageLabelVariant=a;this.setInvalid(x.STYLES);return this.__customMessageLabelVariant},clearStyle_customMessageLabelVariant:function(){this.set_customMessageLabelVariant(null);return this.get_customMessageLabelVariant()},__class__:Fd,__properties__:I(Uc.prototype.__properties__,
{set_customMessageLabelVariant:"set_customMessageLabelVariant",get_customMessageLabelVariant:"get_customMessageLabelVariant",set_customHeaderVariant:"set_customHeaderVariant",get_customHeaderVariant:"get_customHeaderVariant",set_customButtonBarVariant:"set_customButtonBarVariant",get_customButtonBarVariant:"get_customButtonBarVariant",set_icon:"set_icon",get_icon:"get_icon",set_buttonsDataProvider:"set_buttonsDataProvider",get_buttonsDataProvider:"get_buttonsDataProvider",set_buttonBarFactory:"set_buttonBarFactory",
get_buttonBarFactory:"get_buttonBarFactory",set_headerFactory:"set_headerFactory",get_headerFactory:"get_headerFactory",set_messageLabelFactory:"set_messageLabelFactory",get_messageLabelFactory:"get_messageLabelFactory",set_titleText:"set_titleText",get_titleText:"get_titleText",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var lx=function(a){this._text=a};t["feathers.controls._Alert.StringWrapper"]=lx;lx.__name__="feathers.controls._Alert.StringWrapper";
lx.prototype={_text:null,toString:function(){return this._text},__class__:lx};var Gn=function(a,b){this._scaleMode=3;this._scaleModeMask=null;this._sourceScale=1;this._contentMeasurements=new Sb;fa.call(this);this.set_source(a);b!=null&&this.addEventListener("complete",b)};t["feathers.controls.AssetLoader"]=Gn;Gn.__name__="feathers.controls.AssetLoader";Gn.__super__=fa;Gn.prototype=I(fa.prototype,{content:null,loader:null,_contentMeasurements:null,_pendingFuture:null,_sourceScale:null,get_sourceScale:function(){return this._sourceScale},
set_sourceScale:function(a){if(this._sourceScale==a)return this._sourceScale;this._sourceScale=a;this.setInvalid(x.SIZE);return this._sourceScale},_source:null,get_source:function(){return this._source},set_source:function(a){var b=this;if(this._source==a)return this._source;this.loader!=null&&this.loader.unloadAndStop();this.content!=null&&(this.removeChild(this.content),this.content=null);this._source=a;if(this._source==null)this._pendingFuture=null,this.cleanupLoader();else if(Z.exists(this._source,
"IMAGE"))if(this.cleanupLoader(),Z.isLocal(this._source,"IMAGE"))this._pendingFuture=null,a=Z.getBitmapData(this._source),a=this.createBitmap(a),this._contentMeasurements.save(a),this.addChild(a),this.content=a;else{var c=Z.loadBitmapData(this._source);c.onProgress(function(f,g){b.dispatchEvent(new sh("progress",!1,!1,f,g))}).onComplete(function(f){c==b._pendingFuture&&(f=b.createBitmap(f),b._contentMeasurements.save(f),b.addChild(f),b.content=f,b.setInvalid(x.DATA),b.dispatchEvent(new pa("complete")))}).onError(function(f){b.dispatchEvent(new Oh("ioError"))});
this._pendingFuture=c}else if(Z.exists(this._source,"MOVIE_CLIP"))if(this.cleanupLoader(),Z.isLocal(this._source,"MOVIE_CLIP"))this._pendingFuture=null,a=Z.getMovieClip(this._source),this._contentMeasurements.save(a),this.addChild(a),this.content=a;else{var d=Z.loadMovieClip(this._source);d.onProgress(function(f,g){b.dispatchEvent(new sh("progress",!1,!1,f,g))}).onComplete(function(f){d==b._pendingFuture&&(b._contentMeasurements.save(f),b.addChild(f),b.content=f,b.setInvalid(x.DATA),b.dispatchEvent(new pa("complete")))}).onError(function(f){b.dispatchEvent(new Oh("ioError"))});
this._pendingFuture=d}else{this._pendingFuture=null;this.loader==null&&(this.loader=new Vf,this.loader.contentLoaderInfo.addEventListener("complete",m(this,this.loader_contentLoaderInfo_completeHandler)),this.loader.contentLoaderInfo.addEventListener("progress",m(this,this.loader_contentLoaderInfo_progressHandler)),this.loader.contentLoaderInfo.addEventListener("ioError",m(this,this.loader_contentLoaderInfo_ioErrorHandler)),this.loader.contentLoaderInfo.addEventListener("securityError",m(this,this.loader_contentLoaderInfo_securityErrorHandler)));
try{this.loader.load(new se(this._source))}catch(f){Pb.lastError=f,a=ba.caught(f).unwrap(),a instanceof mt&&this.dispatchEvent(new ym("securityError",!1,!1,a.get_message(),a.errorID))}}this.setInvalid(x.DATA);return this._source},get_originalSourceWidth:function(){return this._contentMeasurements==null?null:this._contentMeasurements.width},get_originalSourceHeight:function(){return this._contentMeasurements==null?null:this._contentMeasurements.height},_scaleModeMask:null,_scaleMode:null,get_scaleMode:function(){return this._scaleMode},
set_scaleMode:function(a){if(this._scaleMode==a)return this._scaleMode;this._scaleMode=a;this.setInvalid(x.LAYOUT);return this._scaleMode},dispose:function(){this.set_source(null);fa.prototype.dispose.call(this)},update:function(){this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);this.measure();this.layoutChildren()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==
null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this._contentMeasurements.width,n=this._contentMeasurements.height;h!=null&&this._sourceScale!=1&&(h*=this._sourceScale);n!=null&&this._sourceScale!=1&&(n*=this._sourceScale);var l=1,q=1;this.content!=null&&this._scaleMode!=2&&(a?this.get_explicitMaxWidth()!=null&&this.get_explicitMaxWidth()<h?l=this.get_explicitMaxWidth()/h:this.get_explicitMinWidth()!=null&&this.get_explicitMinWidth()>h&&(l=this.get_explicitMinWidth()/
h):l=this.get_explicitWidth()/h,b?this.get_explicitMaxHeight()!=null&&this.get_explicitMaxHeight()<n?q=this.get_explicitMaxHeight()/n:this.get_explicitMinHeight()!=null&&this.get_explicitMinHeight()>n&&(q=this.get_explicitMinHeight()/n):q=this.get_explicitHeight()/n);var u=this.get_explicitWidth();a&&(u=this.content!=null?h*q:0);a=this.get_explicitHeight();b&&(a=this.content!=null?n*l:0);b=this.get_explicitMinWidth();c&&(b=this.content!=null?h*q:0);c=this.get_explicitMinHeight();d&&(c=this.content!=
null?n*l:0);d=this.get_explicitMaxWidth();f&&(d=this.content!=null?h*q:1/0);f=this.get_explicitMaxHeight();g&&(f=this.content!=null?n*l:1/0);return this.saveMeasurements(u,a,b,c,d,f)},layoutChildren:function(){if(this.content!=null){var a=!1;switch(this._scaleMode){case 0:this.content.set_x(0);this.content.set_y(0);this.content.set_width(this.actualWidth);this.content.set_height(this.actualHeight);break;case 1:var b=new Ia(0,0,this._contentMeasurements.width,this._contentMeasurements.height),c=new Ia(0,
0,this.actualWidth,this.actualHeight);a=Ll.fillRectangle(b,c,c);this.content.set_x(a.x);this.content.set_y(a.y);this.content.set_width(a.width);this.content.set_height(a.height);a=this.content.get_width()>this.actualWidth||this.content.get_height()>this.actualHeight;break;case 2:this.content.set_x(0);this.content.set_y(0);this._contentMeasurements.restore(this.content);w.__implements(this.content,da)&&this.content.validateNow();a=this.content.get_width()>this.actualWidth||this.content.get_height()>
this.actualHeight;break;default:b=new Ia(0,0,this._contentMeasurements.width,this._contentMeasurements.height),c=new Ia(0,0,this.actualWidth,this.actualHeight),Ll.fitRectangle(b,c,c),this.content.set_x(c.x),this.content.set_y(c.y),this.content.set_width(c.width),this.content.set_height(c.height)}a?(this._scaleModeMask==null&&(this._scaleModeMask=new Za(ub.SolidColor(16711935)),this.addChild(this._scaleModeMask)),this._scaleModeMask.set_width(this.actualWidth),this._scaleModeMask.set_height(this.actualHeight),
this.content.set_mask(this._scaleModeMask)):(this._scaleModeMask!=null&&(this.removeChild(this._scaleModeMask),this._scaleModeMask=null),this.content.set_mask(null))}},createBitmap:function(a){return new Ma(a)},cleanupLoader:function(){this.loader!=null&&(this.loader.contentLoaderInfo.removeEventListener("complete",m(this,this.loader_contentLoaderInfo_completeHandler)),this.loader.contentLoaderInfo.removeEventListener("progress",m(this,this.loader_contentLoaderInfo_progressHandler)),this.loader.contentLoaderInfo.removeEventListener("ioError",
m(this,this.loader_contentLoaderInfo_ioErrorHandler)),this.loader.contentLoaderInfo.removeEventListener("securityError",m(this,this.loader_contentLoaderInfo_securityErrorHandler)),this.loader=null)},loader_contentLoaderInfo_progressHandler:function(a){this.dispatchEvent(a)},loader_contentLoaderInfo_ioErrorHandler:function(a){this.dispatchEvent(a)},loader_contentLoaderInfo_securityErrorHandler:function(a){this.dispatchEvent(a)},loader_contentLoaderInfo_completeHandler:function(a){this.addChild(this.loader);
this.content=this.loader;this._contentMeasurements.save(this.content);this.setInvalid(x.LAYOUT);this.dispatchEvent(a)},get_styleContext:function(){return Gn},__class__:Gn,__properties__:I(fa.prototype.__properties__,{set_scaleMode:"set_scaleMode",get_scaleMode:"get_scaleMode",get_originalSourceHeight:"get_originalSourceHeight",get_originalSourceWidth:"get_originalSourceWidth",set_source:"set_source",get_source:"get_source",set_sourceScale:"set_sourceScale",get_sourceScale:"get_sourceScale"})});var ud=
function(){};t["feathers.controls.IToggle"]=ud;ud.__name__="feathers.controls.IToggle";ud.__isInterface__=!0;ud.__interfaces__=[Fa];ud.prototype={get_selected:null,set_selected:null,__class__:ud,__properties__:{set_selected:"set_selected",get_selected:"get_selected"}};var si=function(a){this.__backgroundSkin=this.__selectedBackgroundSkin=null;this.__keepDownStateOnRollOut=!1;this._stateToSkin=new cf;this._pointerToState=this._keyToState=this._pointerTrigger=this._backgroundSkinMeasurements=this._currentBackgroundSkin=
null;this._toggleable=!0;this._selected=!1;this._currentState=Yb.UP(!1);fa.call(this);this.mouseChildren=!1;this.set_buttonMode(!0);this.useHandCursor=!1;this.addEventListener("click",m(this,this.basicToggleButton_clickHandler));this.addEventListener("touchTap",m(this,this.basicToggleButton_touchTapHandler));this.addEventListener("trigger",m(this,this.basicToggleButton_triggerHandler));a!=null&&this.addEventListener("change",a)};t["feathers.controls.BasicToggleButton"]=si;si.__name__="feathers.controls.BasicToggleButton";
si.__interfaces__=[uh,ud,Qh];si.__super__=fa;si.prototype=I(fa.prototype,{_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){fa.prototype.set_enabled.call(this,a);this._enabled?(a=this._currentState,a._hx_index==3&&this.changeState(Yb.UP(a.selected))):this.changeState(Yb.DISABLED(this._selected));return this._enabled},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;this._selected=
a;this.setInvalid(x.SELECTION);this.setInvalid(x.STATE);Y.dispatch(this,"change");this.changeState(this.get_currentState());return this._selected},_toggleable:null,get_toggleable:function(){return this._toggleable},set_toggleable:function(a){return this._toggleable==a?this._toggleable:this._toggleable=a},_pointerToState:null,_keyToState:null,_pointerTrigger:null,_backgroundSkinMeasurements:null,_currentBackgroundSkin:null,_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},
setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},initialize:function(){fa.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new tm(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1),Yb.HOVER(!1)));this._keyToState==
null&&(this._keyToState=new Dn(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1)));this._pointerTrigger==null&&(this._pointerTrigger=new Ps(this))},update:function(){this.commitChanges();this.measure();this.layoutContent()},commitChanges:function(){var a=this.isInvalid(x.SELECTION),b=this.isInvalid(x.STYLES),c=this.isInvalid(x.STATE);(a||c||b)&&this.refreshBackgroundSkin();b&&this.refreshInteractivity()},refreshInteractivity:function(){this._pointerToState.set_keepDownStateOnRollOut(this.get_keepDownStateOnRollOut())},
refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this._selected&&this.get_selectedBackgroundSkin()!=null?this.get_selectedBackgroundSkin():this.get_backgroundSkin()},addCurrentBackgroundSkin:function(a){a==
null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),w.__implements(a,ee)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._backgroundSkinMeasurements.restore(a),
a.parent==this&&this.removeChild(a))},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;w.__implements(this._currentBackgroundSkin,rb)&&(h=this._currentBackgroundSkin);
w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();var n=this.get_explicitWidth();a&&(n=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_width():0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_height():0);b=this.get_explicitMinWidth();c&&(b=h!=null?h.get_minWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null?this._backgroundSkinMeasurements.minWidth:
0);c=this.get_explicitMinHeight();d&&(c=h!=null?h.get_minHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null?this._backgroundSkinMeasurements.minHeight:0);d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=
null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},layoutContent:function(){this.layoutBackgroundSkin()},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),
w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},changeState:function(a){this._enabled||(a=Yb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Yb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Yb.HOVER(this._selected));break;case 2:b=a.selected;this._selected!=b&&(a=Yb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Yb.DISABLED(this._selected))}this._currentState!=a&&(this._currentState=
a,this.setInvalid(x.STATE),Y.dispatch(this,"stateChange"))},basicToggleButton_clickHandler:function(a){this._enabled||a.stopImmediatePropagation()},basicToggleButton_touchTapHandler:function(a){this._enabled||a.stopImmediatePropagation()},basicToggleButton_triggerHandler:function(a){this._enabled&&this._toggleable&&this.set_selected(!this._selected)},__keepDownStateOnRollOut:null,get_keepDownStateOnRollOut:function(){return this.__keepDownStateOnRollOut},set_keepDownStateOnRollOut:function(a){if(!this.setStyle("keepDownStateOnRollOut")||
this.__keepDownStateOnRollOut==a)return this.__keepDownStateOnRollOut;this._previousClearStyle=m(this,this.clearStyle_keepDownStateOnRollOut);this.__keepDownStateOnRollOut=a;this.setInvalid(x.STYLES);return this.__keepDownStateOnRollOut},clearStyle_keepDownStateOnRollOut:function(){this.set_keepDownStateOnRollOut(!1);return this.get_keepDownStateOnRollOut()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||
this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__selectedBackgroundSkin:null,get_selectedBackgroundSkin:function(){return this.__selectedBackgroundSkin},set_selectedBackgroundSkin:function(a){if(!this.setStyle("selectedBackgroundSkin")||this.__selectedBackgroundSkin==
a)return this.__selectedBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_selectedBackgroundSkin);this.__selectedBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__selectedBackgroundSkin},clearStyle_selectedBackgroundSkin:function(){this.set_selectedBackgroundSkin(null);return this.get_selectedBackgroundSkin()},__class__:si,__properties__:I(fa.prototype.__properties__,{set_selectedBackgroundSkin:"set_selectedBackgroundSkin",get_selectedBackgroundSkin:"get_selectedBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_keepDownStateOnRollOut:"set_keepDownStateOnRollOut",get_keepDownStateOnRollOut:"get_keepDownStateOnRollOut",set_toggleable:"set_toggleable",get_toggleable:"get_toggleable",set_selected:"set_selected",get_selected:"get_selected",get_currentState:"get_currentState"})});var lt=function(a,b){this.inactiveButtons=[];this.activeButtons=[];this.id=a;this.buttonRecycler=b};t["feathers.controls._ButtonBar.ButtonStorage"]=lt;
lt.__name__="feathers.controls._ButtonBar.ButtonStorage";lt.prototype={id:null,oldButtonRecycler:null,buttonRecycler:null,activeButtons:null,inactiveButtons:null,__class__:lt};var Kc=R["feathers.controls.ButtonState"]={__ename__:"feathers.controls.ButtonState",__constructs__:null,UP:{_hx_name:"UP",_hx_index:0,__enum__:"feathers.controls.ButtonState",toString:E},HOVER:{_hx_name:"HOVER",_hx_index:1,__enum__:"feathers.controls.ButtonState",toString:E},DOWN:{_hx_name:"DOWN",_hx_index:2,__enum__:"feathers.controls.ButtonState",
toString:E},DISABLED:{_hx_name:"DISABLED",_hx_index:3,__enum__:"feathers.controls.ButtonState",toString:E}};Kc.__constructs__=[Kc.UP,Kc.HOVER,Kc.DOWN,Kc.DISABLED];var hd=function(a,b,c){b==null&&(b=!1);this.__showText=!0;this.__iconOffsetX=this.__iconOffsetY=this.__textOffsetX=this.__textOffsetY=0;this.__verticalAlign=hc.MIDDLE;this.__horizontalAlign=Wb.CENTER;this.__gap=this.__minGap=this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__iconPosition=ra.LEFT;this.__disabledTextFormat=
this.__selectedTextFormat=null;this.__embedFonts=this.__wordWrap=!1;this.__icon=this.__disabledIcon=this.__selectedIcon=this.__textFormat=this.__styleSheet=null;this._stateToTextFormat=new cf;this._ignoreIconResizes=!1;this._iconMeasurements=this._currentIcon=null;this._stateToIcon=new cf;this._htmlText=null;this._updatedTextStyles=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeToggleButtonTheme();si.call(this,c);this.set_text(a);
this.set_selected(b);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.addEventListener("keyDown",m(this,this.toggleButton_keyDownHandler));this.addEventListener("focusIn",m(this,this.toggleButton_focusInHandler));this.addEventListener("focusOut",m(this,this.toggleButton_focusOutHandler))};t["feathers.controls.ToggleButton"]=hd;hd.__name__="feathers.controls.ToggleButton";hd.__interfaces__=[qd,El,re];hd.__super__=si;hd.prototype=I(si.prototype,{textField:null,_previousText:null,_previousHTMLText:null,
_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){if(this.textField==null)return 0;var a=this._text!=
null&&this._text.length>0,b=this._htmlText!=null&&this._htmlText.length>0;if(!this.get_showText()||!a&&!b){a=this.textField.get_y();if(!this.get_showText()||this._text==null&&this._htmlText==null)if(this._currentIcon!=null)a=this._currentIcon.get_y()+(this._currentIcon.get_height()-this._textMeasuredHeight)/2;else if(this._currentBackgroundSkin!=null)a=(this._currentBackgroundSkin.get_height()-this._textMeasuredHeight)/2;else return 0;this.textField.set_text("\u200b");a+=this.textField.getLineMetrics(0).ascent;
this.textField.set_text("");return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_stateToIcon:null,_iconMeasurements:null,_currentIcon:null,_ignoreIconResizes:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_stateToTextFormat:null,getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,
b),this.setInvalid(x.STYLES))},getIconForState:function(a){return this._stateToIcon.get(a)},setIconForState:function(a,b){if(this.setStyle("setIconForState",a)){var c=this._stateToIcon.get(a);c!=null&&c==this._currentIcon&&(this.removeCurrentIcon(c),this._currentIcon=null);b==null?this._stateToIcon.remove(a):this._stateToIcon.set(a,b);this.setInvalid(x.STYLES)}},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeToggleButtonTheme:function(){Xw.initialize()},
initialize:function(){si.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_selectable(!1),this.textField.set_multiline(!0),this.addChild(this.textField))},commitChanges:function(){si.prototype.commitChanges.call(this);var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(d||c)&&this.refreshIcon();(d||c)&&this.refreshTextStyles();(a||d||c||b)&&this.refreshText(b)},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this.get_showText()&&this._text!=null,n=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;(h||n)&&this.refreshTextFieldDimensions(!0);this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,
this);h=null;w.__implements(this._currentBackgroundSkin,rb)&&(h=this._currentBackgroundSkin);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();w.__implements(this._currentIcon,da)&&(n=this._ignoreIconResizes,this._ignoreIconResizes=!0,this._currentIcon.validateNow(),this._ignoreIconResizes=n);n=this.get_explicitWidth();a&&(n=this.measureContentWidth(),n+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(n=Math.max(this._currentBackgroundSkin.get_width(),
n)));a=this.get_explicitHeight();b&&(a=this.measureContentHeight(),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this.measureContentMinWidth(),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,
b)));c=this.get_explicitMinHeight();d&&(c=this.measureContentMinHeight(),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:
1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},calculateExplicitWidthForTextMeasurement:function(){var a=null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=
null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+this.get_paddingRight();var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentIcon==null||this.get_iconPosition()!=ra.LEFT&&this.get_iconPosition()!=ra.RIGHT||(w.__implements(this._currentIcon,da)&&this._currentIcon.validateNow(),a-=this._currentIcon.get_width()+b);a<0&&(a=0);return a},measureContentWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},measureContentMinWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentMinHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},refreshTextStyles:function(){this.textField.get_wordWrap()!=this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),
this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,
this.toggleButton_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.toggleButton_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this.get_showText()&&this._text!=null&&this._text.length>0,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=
this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),this.get_wordWrap()&&this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),
this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&this.textField.set_wordWrap(this.get_wordWrap()),b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=this._htmlText},getCurrentTextFormat:function(){if(this.get_styleSheet()!=null)return null;var a=this._stateToTextFormat.get(this._currentState);return a!=
null?a:this._enabled||this.get_disabledTextFormat()==null?this._selected&&this.get_selectedTextFormat()!=null?this.get_selectedTextFormat():this.get_textFormat():this.get_disabledTextFormat()},layoutContent:function(){si.prototype.layoutContent.call(this);this.layoutChildren()},layoutChildren:function(){this.refreshTextFieldDimensions(!1);var a=this.get_showText()&&this._text!=null,b=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,c=this._currentIcon!=null&&this.get_iconPosition()!=
ra.MANUAL;(a||b)&&c?(this.positionSingleChild(this.textField),this.positionTextAndIcon()):a||b?this.positionSingleChild(this.textField):c&&this.positionSingleChild(this._currentIcon);this._currentIcon!=null&&(this.get_iconPosition()==ra.MANUAL&&(this._currentIcon.set_x(this.get_paddingLeft()),this._currentIcon.set_y(this.get_paddingTop())),b=this._currentIcon,b.set_x(b.get_x()+this.get_iconOffsetX()),b=this._currentIcon,b.set_y(b.get_y()+this.get_iconOffsetY()));a&&(b=this.textField,b.set_x(b.get_x()+
this.get_textOffsetX()),b=this.textField,b.set_y(b.get_y()+this.get_textOffsetY()))},refreshTextFieldDimensions:function(a){var b=this._ignoreIconResizes;this._ignoreIconResizes=!0;w.__implements(this._currentIcon,da)&&this._currentIcon.validateNow();this._ignoreIconResizes=b;b=this.get_showText()&&this._text!=null;var c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;if(b||c){b=this.actualWidth;c=this.actualHeight;a&&(b=0,a=this.get_explicitWidth(),a==null&&(a=this.get_explicitMaxWidth()),
a!=null&&(b=a),c=0,a=this.get_explicitHeight(),a==null&&(a=this.get_explicitMaxHeight()),a!=null&&(c=a));b-=this.get_paddingLeft()+this.get_paddingRight();c-=this.get_paddingTop()+this.get_paddingBottom();if(this._currentIcon!=null){a=this.get_gap();a==1/0&&(a=this.get_minGap());if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)c-=this._currentIcon.get_height()+a}b>this._textMeasuredWidth&&
(b=this._textMeasuredWidth);c>this._textMeasuredHeight&&(c=this._textMeasuredHeight);b<0&&(b=0);c<0&&(c=0);this.textField.set_width(b);(a=this.get_wordWrap())&&!this._wrappedOnMeasure&&b>=this._textMeasuredWidth&&(a=!1);this.textField.get_wordWrap()!=a&&this.textField.set_wordWrap(a);this.textField.set_height(c)}},positionSingleChild:function(a){this.get_horizontalAlign()==Wb.LEFT?a.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Wb.RIGHT?a.set_x(this.actualWidth-this.get_paddingRight()-
a.get_width()):a.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-a.get_width())/2);this.get_verticalAlign()==hc.TOP?a.set_y(this.get_paddingTop()):this.get_verticalAlign()==hc.BOTTOM?a.set_y(this.actualHeight-this.get_paddingBottom()-a.get_height()):a.set_y(this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-a.get_height())/2)},positionTextAndIcon:function(){if(this.get_iconPosition()==ra.TOP)if(this.get_gap()==1/0)this._currentIcon.set_y(this.get_paddingTop()),
this.textField.set_y(this.actualHeight-this.get_paddingBottom()-this.textField.get_height());else{if(this.get_verticalAlign()==hc.TOP){var a=this.textField;a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap()))}else this.get_verticalAlign()==hc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap())/2));this._currentIcon.set_y(this.textField.get_y()-this._currentIcon.get_height()-this.get_gap())}else this.get_iconPosition()==ra.RIGHT?this.get_gap()==
1/0?(this.textField.set_x(this.get_paddingLeft()),this._currentIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentIcon.get_width())):(this.get_horizontalAlign()==Wb.RIGHT?(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap()))):this.get_horizontalAlign()==Wb.CENTER&&(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap())/2)),this._currentIcon.set_x(this.textField.get_x()+this.textField.get_width()+this.get_gap())):this.get_iconPosition()==
ra.BOTTOM?this.get_gap()==1/0?(this.textField.set_y(this.get_paddingTop()),this._currentIcon.set_y(this.actualHeight-this.get_paddingBottom()-this._currentIcon.get_height())):(this.get_verticalAlign()==hc.BOTTOM?(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap()))):this.get_verticalAlign()==hc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap())/2)),this._currentIcon.set_y(this.textField.get_y()+this.textField.get_height()+this.get_gap())):
this.get_iconPosition()==ra.LEFT&&(this.get_gap()==1/0?(this._currentIcon.set_x(this.get_paddingLeft()),this.textField.set_x(this.actualWidth-this.get_paddingRight()-this.textField.get_width())):(this.get_horizontalAlign()==Wb.LEFT?(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width()))):this.get_horizontalAlign()==Wb.CENTER&&(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width())/2)),this._currentIcon.set_x(this.textField.get_x()-this.get_gap()-
this._currentIcon.get_width())));this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT?this.get_verticalAlign()==hc.TOP?this._currentIcon.set_y(this.get_paddingTop()):this.get_verticalAlign()==hc.BOTTOM?this._currentIcon.set_y(this.actualHeight-this.get_paddingBottom()-this._currentIcon.get_height()):this._currentIcon.set_y(this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentIcon.get_height())/2):this.get_horizontalAlign()==Wb.LEFT?this._currentIcon.set_x(this.get_paddingLeft()):
this.get_horizontalAlign()==Wb.RIGHT?this._currentIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentIcon.get_width()):this._currentIcon.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this._currentIcon.get_width())/2)},refreshIcon:function(){var a=this._currentIcon;this._currentIcon=this.getCurrentIcon();this._currentIcon!=a&&(this.removeCurrentIcon(a),this.addCurrentIcon(this._currentIcon))},getCurrentIcon:function(){var a=this._stateToIcon.get(this._currentState);
return a!=null?a:this._enabled||this.get_disabledIcon()==null?this._selected&&this.get_selectedIcon()!=null?this.get_selectedIcon():this.get_icon():this.get_disabledIcon()},addCurrentIcon:function(a){if(a==null)this._iconMeasurements=null;else{w.__implements(a,Fa)&&a.initializeNow();this._iconMeasurements==null?this._iconMeasurements=new Sb(a):this._iconMeasurements.save(a);w.__implements(a,qb)&&a.set_uiContext(this);w.__implements(a,ee)&&a.set_stateContext(this);a.addEventListener("resize",m(this,
this.toggleButton_icon_resizeHandler),!1,0,!0);var b=this.getChildIndex(this.textField);this.addChildAt(a,b)}},removeCurrentIcon:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.toggleButton_icon_resizeHandler)),w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._iconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},toggleButton_keyDownHandler:function(a){!this._enabled||this.get_buttonMode()&&this.focusRect==1||this._focusManager!=
null&&this._focusManager.get_focus()!=this||a.keyCode!=32&&a.keyCode!=13||(a.preventDefault(),this.dispatchEvent(new Ic("click")))},toggleButton_focusInHandler:function(a){this._keyToState.set_enabled(this._enabled)},toggleButton_focusOutHandler:function(a){this._keyToState.set_enabled(!1)},toggleButton_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},toggleButton_icon_resizeHandler:function(a){this._ignoreIconResizes||this.setInvalid(x.STYLES)},get_styleContext:function(){return hd},
__icon:null,get_icon:function(){return this.__icon},set_icon:function(a){if(!this.setStyle("icon")||this.__icon==a)return this.__icon;this._previousClearStyle=m(this,this.clearStyle_icon);this.__icon=a;this.setInvalid(x.STYLES);return this.__icon},clearStyle_icon:function(){this.set_icon(null);return this.get_icon()},__disabledIcon:null,get_disabledIcon:function(){return this.__disabledIcon},set_disabledIcon:function(a){if(!this.setStyle("disabledIcon")||this.__disabledIcon==a)return this.__disabledIcon;
this._previousClearStyle=m(this,this.clearStyle_disabledIcon);this.__disabledIcon=a;this.setInvalid(x.STYLES);return this.__disabledIcon},clearStyle_disabledIcon:function(){this.set_disabledIcon(null);return this.get_disabledIcon()},__selectedIcon:null,get_selectedIcon:function(){return this.__selectedIcon},set_selectedIcon:function(a){if(!this.setStyle("selectedIcon")||this.__selectedIcon==a)return this.__selectedIcon;this._previousClearStyle=m(this,this.clearStyle_selectedIcon);this.__selectedIcon=
a;this.setInvalid(x.STYLES);return this.__selectedIcon},clearStyle_selectedIcon:function(){this.set_selectedIcon(null);return this.get_selectedIcon()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);
return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||
this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=
a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},
clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__selectedTextFormat:null,get_selectedTextFormat:function(){return this.__selectedTextFormat},set_selectedTextFormat:function(a){if(!this.setStyle("selectedTextFormat")||this.__selectedTextFormat==a)return this.__selectedTextFormat;this._previousClearStyle=m(this,this.clearStyle_selectedTextFormat);this.__selectedTextFormat=a;this.setInvalid(x.STYLES);return this.__selectedTextFormat},
clearStyle_selectedTextFormat:function(){this.set_selectedTextFormat(null);return this.get_selectedTextFormat()},__iconPosition:null,get_iconPosition:function(){return this.__iconPosition},set_iconPosition:function(a){if(!this.setStyle("iconPosition")||this.__iconPosition==a)return this.__iconPosition;this._previousClearStyle=m(this,this.clearStyle_iconPosition);this.__iconPosition=a;this.setInvalid(x.STYLES);return this.__iconPosition},clearStyle_iconPosition:function(){this.set_iconPosition(ra.LEFT);
return this.get_iconPosition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__minGap:null,get_minGap:function(){return this.__minGap},set_minGap:function(a){if(!this.setStyle("minGap")||this.__minGap==a)return this.__minGap;this._previousClearStyle=
m(this,this.clearStyle_minGap);this.__minGap=a;this.setInvalid(x.STYLES);return this.__minGap},clearStyle_minGap:function(){this.set_minGap(0);return this.get_minGap()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);
return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},
set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==
a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==a)return this.__horizontalAlign;this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);
this.__horizontalAlign=a;this.setInvalid(x.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Wb.CENTER);return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},
clearStyle_verticalAlign:function(){this.set_verticalAlign(hc.MIDDLE);return this.get_verticalAlign()},__iconOffsetX:null,get_iconOffsetX:function(){return this.__iconOffsetX},set_iconOffsetX:function(a){if(!this.setStyle("iconOffsetX")||this.__iconOffsetX==a)return this.__iconOffsetX;this._previousClearStyle=m(this,this.clearStyle_iconOffsetX);this.__iconOffsetX=a;this.setInvalid(x.STYLES);return this.__iconOffsetX},clearStyle_iconOffsetX:function(){this.set_iconOffsetX(0);return this.get_iconOffsetX()},
__iconOffsetY:null,get_iconOffsetY:function(){return this.__iconOffsetY},set_iconOffsetY:function(a){if(!this.setStyle("iconOffsetY")||this.__iconOffsetY==a)return this.__iconOffsetY;this._previousClearStyle=m(this,this.clearStyle_iconOffsetY);this.__iconOffsetY=a;this.setInvalid(x.STYLES);return this.__iconOffsetY},clearStyle_iconOffsetY:function(){this.set_iconOffsetY(0);return this.get_iconOffsetY()},__textOffsetX:null,get_textOffsetX:function(){return this.__textOffsetX},set_textOffsetX:function(a){if(!this.setStyle("textOffsetX")||
this.__textOffsetX==a)return this.__textOffsetX;this._previousClearStyle=m(this,this.clearStyle_textOffsetX);this.__textOffsetX=a;this.setInvalid(x.STYLES);return this.__textOffsetX},clearStyle_textOffsetX:function(){this.set_textOffsetX(0);return this.get_textOffsetX()},__textOffsetY:null,get_textOffsetY:function(){return this.__textOffsetY},set_textOffsetY:function(a){if(!this.setStyle("textOffsetY")||this.__textOffsetY==a)return this.__textOffsetY;this._previousClearStyle=m(this,this.clearStyle_textOffsetY);
this.__textOffsetY=a;this.setInvalid(x.STYLES);return this.__textOffsetY},clearStyle_textOffsetY:function(){this.set_textOffsetY(0);return this.get_textOffsetY()},__showText:null,get_showText:function(){return this.__showText},set_showText:function(a){if(!this.setStyle("showText")||this.__showText==a)return this.__showText;this._previousClearStyle=m(this,this.clearStyle_showText);this.__showText=a;this.setInvalid(x.STYLES);return this.__showText},clearStyle_showText:function(){this.set_showText(!0);
return this.get_showText()},__class__:hd,__properties__:I(si.prototype.__properties__,{set_showText:"set_showText",get_showText:"get_showText",set_textOffsetY:"set_textOffsetY",get_textOffsetY:"get_textOffsetY",set_textOffsetX:"set_textOffsetX",get_textOffsetX:"get_textOffsetX",set_iconOffsetY:"set_iconOffsetY",get_iconOffsetY:"get_iconOffsetY",set_iconOffsetX:"set_iconOffsetX",get_iconOffsetX:"get_iconOffsetX",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",
get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_iconPosition:"set_iconPosition",get_iconPosition:"get_iconPosition",set_selectedTextFormat:"set_selectedTextFormat",
get_selectedTextFormat:"get_selectedTextFormat",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_selectedIcon:"set_selectedIcon",get_selectedIcon:"get_selectedIcon",set_disabledIcon:"set_disabledIcon",get_disabledIcon:"get_disabledIcon",
set_icon:"set_icon",get_icon:"get_icon",get_baseline:"get_baseline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var um=function(a,b,c){b==null&&(b=!1);this.initializeCheckTheme();hd.call(this,a,b,c)};t["feathers.controls.Check"]=um;um.__name__="feathers.controls.Check";um.__super__=hd;um.prototype=I(hd.prototype,{initializeCheckTheme:function(){xw.initialize()},get_styleContext:function(){return um},__class__:um});var Ah=function(a,b){this.__animateContentAlpha=
!1;this.__openCloseDuration=.2;this.__customHeaderVariant=null;this.openCloseEase=th.easeOut;this._previousCustomHeaderVariant=null;this._opened=this._animateOpenedProperty=!0;this._pendingAnimation=!1;this._pendingOpened=null;this._ignoreContentResize=!1;this._contentOriginalAlpha=1;this._contentMeasurements=new Sb;this._scrollRect2=new Ia;this._scrollRect1=new Ia;this._ignoreHeaderEvents=!1;this.headerMeasurements=new Sb;this._measuredOpenHeight=0;this._collapseActuator=this._pendingHeight=null;
this.initializeCollapsibleTheme();fa.call(this);this.set_text(a);this.set_content(b)};t["feathers.controls.Collapsible"]=Ah;Ah.__name__="feathers.controls.Collapsible";Ah.__interfaces__=[mf];Ah.__super__=fa;Ah.prototype=I(fa.prototype,{_collapseActuator:null,_pendingHeight:null,_measuredOpenHeight:null,header:null,headerMeasurements:null,_ignoreHeaderEvents:null,_currentScrollRect:null,_scrollRect1:null,_scrollRect2:null,_contentMeasurements:null,_contentOriginalAlpha:null,_ignoreContentResize:null,
_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;this._content!=null&&(this._content.removeEventListener("resize",m(this,this.collapsible_content_resizeHandler)),this._content.set_alpha(this._contentOriginalAlpha),this._contentMeasurements.restore(this._content),this.removeChild(this._content));this._content=a;this._content!=null&&(this.addChild(this._content),this._contentMeasurements.save(this._content),this._contentOriginalAlpha=
this._content.get_alpha(),this._content.addEventListener("resize",m(this,this.collapsible_content_resizeHandler)));this.setInvalid(x.DATA);return this._content},_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},_pendingOpened:null,_pendingAnimation:null,_opened:null,get_opened:function(){return this._pendingOpened!=null?this._pendingOpened:this._opened},set_opened:function(a){a?this.openContent(this._animateOpenedProperty):
this.closeContent(this._animateOpenedProperty);return this._pendingOpened!=null?this._pendingOpened:this._opened},_animateOpenedProperty:null,get_animateOpenedProperty:function(){return this._animateOpenedProperty},set_animateOpenedProperty:function(a){return this._animateOpenedProperty=a},_oldHeaderFactory:null,_headerFactory:null,get_headerFactory:function(){return this._headerFactory},set_headerFactory:function(a){if(this._headerFactory==a)return this._headerFactory;this._headerFactory=a;this.setInvalid(Ah.INVALIDATION_FLAG_HEADER_FACTORY);
return this._headerFactory},_previousCustomHeaderVariant:null,openCloseEase:null,dispose:function(){this._collapseActuator!=null&&(Ca.stop(this._collapseActuator),this._collapseActuator=null);this.set_content(null);this.destroyHeader();fa.prototype.dispose.call(this)},openContent:function(a){a==null&&(a=!0);this._pendingAnimation=a;this._pendingOpened!=null&&this._pendingOpened||!Y.dispatch(this,"opening",!1,!0)||(this._pendingOpened=!0,this.setInvalid(x.DATA))},closeContent:function(a){a==null&&
(a=!0);this._pendingAnimation=a;(this._pendingOpened==null||this._pendingOpened)&&Y.dispatch(this,"closing",!1,!0)&&(this._pendingOpened=!1,this.setInvalid(x.DATA))},initializeCollapsibleTheme:function(){Uk.initialize()},update:function(){this._previousCustomHeaderVariant!=this.get_customHeaderVariant()&&this.setInvalidationFlag(Ah.INVALIDATION_FLAG_HEADER_FACTORY);var a=this.isInvalid(x.DATA);this.isInvalid(Ah.INVALIDATION_FLAG_HEADER_FACTORY)&&this.createHeader();a&&(this.updateText(),this.updateOpened());
this.measure();this.layoutChildren();this._previousCustomHeaderVariant=this.get_customHeaderVariant()},measure:function(){var a=null;w.__implements(this.header,rb)&&(a=this.header);df.resetFluidlyWithParentValues(this.headerMeasurements,this.header,this.get_explicitWidth(),null,this.get_explicitMinWidth(),null,this.get_explicitMaxWidth(),null);w.__implements(this.header,da)&&this.header.validateNow();var b=null;this._content!=null&&(w.__implements(this._content,rb)&&(b=this._content),df.resetFluidlyWithParentValues(this._contentMeasurements,
this._content,this.get_explicitWidth(),null,this.get_explicitMinWidth(),null,this.get_explicitMaxWidth(),null),w.__implements(this._content,da)&&this._content.validateNow());this._measuredOpenHeight=this.header.get_height();this._content!=null&&(this._measuredOpenHeight+=this._content.get_height());var c=this.get_explicitWidth()==null,d=this.get_explicitHeight()==null,f=this.get_explicitMinWidth()==null,g=this.get_explicitMinHeight()==null,h=this.get_explicitMaxWidth()==null,n=this.get_explicitMaxHeight()==
null;if(!(c||d||f||g||h||n))return!1;h=this.get_explicitWidth();c&&(h=this.header.get_width(),this._content!=null&&(h=Math.max(h,this._content.get_width())));c=this.get_explicitHeight();d&&(c=this._pendingHeight!=null?this._pendingHeight:this._content!=null&&this._content.get_visible()?this._measuredOpenHeight:this.header.get_height());d=this.get_explicitMinWidth();f&&(d=a!=null?a.get_minWidth():this.header.get_width(),this._content!=null&&(d=b!=null?Math.max(d,b.get_minWidth()):Math.max(d,this._content.get_width())));
a=this.get_explicitMinHeight();g&&(a=this.header.get_height());return this.saveMeasurements(h,c,d,a)},updateText:function(){w.__implements(this.header,re)&&this.header.set_text(this._text)},updateOpened:function(){var a=this;if(this._pendingOpened!=null){this._collapseActuator!=null&&(Ca.stop(this._collapseActuator),this._collapseActuator=null,Y.dispatch(this,"cancel"));var b=this._ignoreHeaderEvents;this._ignoreHeaderEvents=!0;w.__implements(this.header,mf)?this.header.set_opened(this._pendingOpened):
w.__implements(this.header,ud)&&this.header.set_selected(this._pendingOpened);this._ignoreHeaderEvents=b;this._pendingAnimation?(this._pendingHeight=this.actualHeight,this._pendingOpened?(this._content!=null&&this._content.set_visible(!0),b=this.header.get_height(),this._content!=null&&(b+=this._content.get_height()),b=Ca.update(function(c,d){a.get_animateContentAlpha()&&a._content!=null&&a._content.set_alpha(d);a._pendingHeight=c;a.setInvalid(x.SIZE)},this.get_openCloseDuration(),[this.actualHeight,
this._content!=null?this._content.get_alpha():0],[b,this._contentOriginalAlpha]).ease(this.openCloseEase).onComplete(function(){a._pendingHeight=null;a.setInvalid(x.SIZE);return Y.dispatch(a,"open")})):(this._content!=null&&this._content.set_visible(!0),b=Ca.update(function(c,d){a.get_animateContentAlpha()&&a._content!=null&&a._content.set_alpha(d);a._pendingHeight=c;a.setInvalid(x.SIZE)},this.get_openCloseDuration(),[this.actualHeight,this._content!=null?this._content.get_alpha():1],[this.header.get_height(),
0]).ease(this.openCloseEase).onComplete(function(){a._pendingHeight=null;a._content!=null&&a._content.set_visible(!1);a.setInvalid(x.SIZE);return Y.dispatch(a,"close")})),this._collapseActuator=b):this._content!=null&&this._content.set_visible(this._pendingOpened);this._opened=this._pendingOpened;this._pendingOpened=null}else b=this._ignoreHeaderEvents,this._ignoreHeaderEvents=!0,w.__implements(this.header,mf)?this.header.set_opened(this._opened):w.__implements(this.header,ud)&&this.header.set_selected(this._opened),
this._ignoreHeaderEvents=b,this._content!=null&&this._content.set_visible(this._opened)},createHeader:function(){this.destroyHeader();var a=this._headerFactory!=null?this._headerFactory:Ah.defaultHeaderFactory;this._oldHeaderFactory=a;this.header=a.create();w.__implements(this.header,nd)&&(a=this.header,a.get_variant()==null&&a.set_variant(this.get_customHeaderVariant()!=null?this.get_customHeaderVariant():Ah.CHILD_VARIANT_HEADER));w.__implements(this.header,mf)?(this.header.addEventListener("open",
m(this,this.collapsible_header_openHandler)),this.header.addEventListener("close",m(this,this.collapsible_header_closeHandler))):w.__implements(this.header,ud)?this.header.addEventListener("change",m(this,this.collapsible_header_changeHandler)):w.__implements(this.header,Qh)?this.header.addEventListener("trigger",m(this,this.collapsible_header_triggerHandler)):this.header.addEventListener("click",m(this,this.collapsible_header_clickHandler));w.__implements(this.header,Fa)&&this.header.initializeNow();
this.headerMeasurements.save(this.header);this.addChild(this.header)},destroyHeader:function(){this.header!=null&&(this.header.removeEventListener("open",m(this,this.collapsible_header_openHandler)),this.header.removeEventListener("close",m(this,this.collapsible_header_closeHandler)),this.header.removeEventListener("change",m(this,this.collapsible_header_changeHandler)),this.header.removeEventListener("trigger",m(this,this.collapsible_header_triggerHandler)),this.header.removeEventListener("click",
m(this,this.collapsible_header_clickHandler)),this.removeChild(this.header),this._oldHeaderFactory.destroy!=null&&this._oldHeaderFactory.destroy(this.header),this.header=this._oldHeaderFactory=null)},layoutChildren:function(){this.header.set_x(0);this.header.set_y(0);this.header.set_width(this.actualWidth);w.__implements(this.header,da)&&this.header.validateNow();if(this._content!=null){var a=this._ignoreContentResize;this._ignoreContentResize=!0;this._content.set_x(0);this._content.set_y(this.header.get_height());
this._content.get_width()!=this.actualWidth&&this._content.set_width(this.actualWidth);var b=(this._explicitHeight!=null?this._explicitHeight:this._measuredOpenHeight)-this.header.get_height();b<0&&(b=0);this._content.get_height()!=b&&this._content.set_height(b);w.__implements(this._content,da)&&this._content.validateNow();this._pendingHeight!=null?(b=this._currentScrollRect==this._scrollRect1?this._scrollRect2:this._scrollRect1,b.setTo(0,0,this.actualWidth,this._pendingHeight-this.header.get_height()),
this._currentScrollRect=b,this._content.set_scrollRect(b)):this._currentScrollRect!=null&&(this._currentScrollRect=null,this._content.set_scrollRect(null));this._ignoreContentResize=a}},collapsible_header_openHandler:function(a){this._ignoreHeaderEvents||this.openContent(!0)},collapsible_header_closeHandler:function(a){this._ignoreHeaderEvents||this.closeContent(!0)},collapsible_header_changeHandler:function(a){this._ignoreHeaderEvents||(this.header.get_selected()?this.openContent(!0):this.closeContent(!0))},
collapsible_header_triggerHandler:function(a){this._ignoreHeaderEvents||(this._opened?this.closeContent(!0):this.openContent(!0))},collapsible_header_clickHandler:function(a){this._ignoreHeaderEvents||(this._opened?this.closeContent(!0):this.openContent(!0))},collapsible_content_resizeHandler:function(a){this.setInvalid(x.LAYOUT)},__customHeaderVariant:null,get_customHeaderVariant:function(){return this.__customHeaderVariant},set_customHeaderVariant:function(a){if(!this.setStyle("customHeaderVariant")||
this.__customHeaderVariant==a)return this.__customHeaderVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderVariant);this.__customHeaderVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderVariant},clearStyle_customHeaderVariant:function(){this.set_customHeaderVariant(null);return this.get_customHeaderVariant()},__openCloseDuration:null,get_openCloseDuration:function(){return this.__openCloseDuration},set_openCloseDuration:function(a){if(!this.setStyle("openCloseDuration")||
this.__openCloseDuration==a)return this.__openCloseDuration;this._previousClearStyle=m(this,this.clearStyle_openCloseDuration);this.__openCloseDuration=a;this.setInvalid(x.STYLES);return this.__openCloseDuration},clearStyle_openCloseDuration:function(){this.set_openCloseDuration(.2);return this.get_openCloseDuration()},__animateContentAlpha:null,get_animateContentAlpha:function(){return this.__animateContentAlpha},set_animateContentAlpha:function(a){if(!this.setStyle("animateContentAlpha")||this.__animateContentAlpha==
a)return this.__animateContentAlpha;this._previousClearStyle=m(this,this.clearStyle_animateContentAlpha);this.__animateContentAlpha=a;this.setInvalid(x.STYLES);return this.__animateContentAlpha},clearStyle_animateContentAlpha:function(){this.set_animateContentAlpha(!1);return this.get_animateContentAlpha()},get_styleContext:function(){return Ah},__class__:Ah,__properties__:I(fa.prototype.__properties__,{set_animateContentAlpha:"set_animateContentAlpha",get_animateContentAlpha:"get_animateContentAlpha",
set_openCloseDuration:"set_openCloseDuration",get_openCloseDuration:"get_openCloseDuration",set_customHeaderVariant:"set_customHeaderVariant",get_customHeaderVariant:"get_customHeaderVariant",set_headerFactory:"set_headerFactory",get_headerFactory:"get_headerFactory",set_animateOpenedProperty:"set_animateOpenedProperty",get_animateOpenedProperty:"get_animateOpenedProperty",set_opened:"set_opened",get_opened:"get_opened",set_text:"set_text",get_text:"get_text",set_content:"set_content",get_content:"get_content"})});
var Qd=function(a,b){this.__customTextInputVariant=this.__customButtonVariant=this.__customListViewVariant=null;this.__popUpAdapter=new Xk;this.openListViewOnFocus=!1;this._previousCustomTextInputVariant=this._previousCustomButtonVariant=this._previousCustomListViewVariant=this._filterText=null;this._ignoreTextInputChange=this._ignoreListViewChange=this._ignoreButtonToggleListView=!1;this._itemRendererRecycler=Ne.withClass(Sc);this._customSelectedItem=this._selectedItem=null;this.pendingSelectedIndex=
this._selectedIndex=-1;this._allowCustomUserValue=!0;this.textInputMeasurements=new Sb;this.buttonMeasurements=new Sb;this.initializeComboBoxTheme();fa.call(this);this.set_dataProvider(a);this.addEventListener("focusIn",m(this,this.comboBox_focusInHandler));this.addEventListener("removedFromStage",m(this,this.comboBox_removedFromStageHandler));this.addEventListener("keyUp",m(this,this.comboBox_keyUpHandler));b!=null&&this.addEventListener("change",b)};t["feathers.controls.ComboBox"]=Qd;Qd.__name__=
"feathers.controls.ComboBox";Qd.__interfaces__=[Th,qi,lj];Qd.__super__=fa;Qd.prototype=I(fa.prototype,{button:null,textInput:null,listView:null,buttonMeasurements:null,textInputMeasurements:null,get_stageFocusTarget:function(){return this.textInput},get_text:function(){var a=this._customSelectedItem!=null?this._customSelectedItem:this._selectedItem;return a!=null?typeof a=="string"?a:this.itemToText(a):""},_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==
a)return this._dataProvider;this._dataProvider!=null&&this._dataProvider.removeEventListener("removeAll",m(this,this.comboBox_dataProvider_removeAllHandler));var b=this._selectedIndex,c=this._selectedItem;this._dataProvider=a;this._dataProvider!=null&&this._dataProvider.addEventListener("removeAll",m(this,this.comboBox_dataProvider_removeAllHandler));this._dataProvider==null||this._dataProvider.get_length()==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=0,this._selectedItem=
this._dataProvider.get(0));if(this._selectedIndex!=b||this._selectedItem!=c)this.setInvalid(x.SELECTION),Y.dispatch(this,"change");this._dataProvider!=null&&this._dataProvider.set_filterFunction(m(this,this.comboBoxFilterFunction));this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._dataProvider},_allowCustomUserValue:null,get_allowCustomUserValue:function(){return this._allowCustomUserValue},set_allowCustomUserValue:function(a){return this._allowCustomUserValue==a?this._allowCustomUserValue:
this._allowCustomUserValue=a},pendingSelectedIndex:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==null&&(a=-1);if(this._selectedIndex==a&&(!this.get_open()||this.pendingSelectedIndex==a))return this._selectedIndex;this._selectedIndex=a;this.get_open()&&(this.pendingSelectedIndex=a);this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex);this._customSelectedItem=null;this.setInvalid(x.SELECTION);
Y.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_customSelectedItem:null,_selectedItem:null,get_selectedItem:function(){return this._customSelectedItem!=null?this._customSelectedItem:this._selectedItem},set_selectedItem:function(a){if(a==null||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1){if(this._allowCustomUserValue)return this._selectedIndex=
-1,this._selectedItem=null,this._customSelectedItem=a,this.setInvalid(x.SELECTION),Y.dispatch(this,"change"),this._customSelectedItem;this.set_selectedIndex(-1);return this._selectedItem}if(this._selectedItem==a&&this._selectedIndex==b)return this._selectedItem;this.get_open()&&(this.pendingSelectedIndex=b);this._selectedIndex=b;this._selectedItem=a;this._customSelectedItem=null;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedItem},_prompt:null,get_prompt:function(){return this._prompt},
set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},_itemRendererRecycler:null,get_itemRendererRecycler:function(){return this._itemRendererRecycler},set_itemRendererRecycler:function(a){if(this._itemRendererRecycler==a)return this._itemRendererRecycler;this._itemRendererRecycler=a;this.setInvalid(x.DATA);return this._itemRendererRecycler},itemToText:function(a){return H.string(a)},itemToEnabled:function(a){return!0},textToItem:function(a){return a},
_ignoreTextInputChange:null,_ignoreListViewChange:null,_ignoreButtonToggleListView:null,_previousCustomTextInputVariant:null,_previousCustomButtonVariant:null,_previousCustomListViewVariant:null,_oldButtonFactory:null,_buttonFactory:null,get_buttonFactory:function(){return this._buttonFactory},set_buttonFactory:function(a){if(this._buttonFactory==a)return this._buttonFactory;this._buttonFactory=a;this.setInvalid(Qd.INVALIDATION_FLAG_BUTTON_FACTORY);return this._buttonFactory},_oldTextInputFactory:null,
_textInputFactory:null,get_textInputFactory:function(){return this._textInputFactory},set_textInputFactory:function(a){if(this._textInputFactory==a)return this._textInputFactory;this._textInputFactory=a;this.setInvalid(Qd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);return this._textInputFactory},_oldListViewFactory:null,_listViewFactory:null,get_listViewFactory:function(){return this._listViewFactory},set_listViewFactory:function(a){if(this._listViewFactory==a)return this._listViewFactory;this._listViewFactory=
a;this.setInvalid(Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);return this._listViewFactory},get_open:function(){return this.listView!=null?this.listView.parent!=null:!1},_filterText:null,showFocus:function(a){fa.prototype.showFocus.call(this,a);this.textInput!=null&&this.textInput.showFocus(a)},openListViewOnFocus:null,openListView:function(){this.get_open()||this.stage==null||(this.validateNow(),this._filterText=null,this._dataProvider!=null&&this._dataProvider.refresh(),this.pendingSelectedIndex=this._selectedIndex,
this.get_popUpAdapter().addEventListener("open",m(this,this.comboBox_popUpAdapter_openHandler)),this.get_popUpAdapter().addEventListener("close",m(this,this.comboBox_popUpAdapter_closeHandler)),this.get_popUpAdapter().open(this.listView,this),this.listView.set_visible(this._dataProvider!=null&&this._dataProvider.get_length()>0),this.listView.validateNow(),this.listView.addEventListener("removedFromStage",m(this,this.comboBox_listView_removedFromStageHandler)),this.textInput.addEventListener("focusOut",
m(this,this.comboBox_textInput_focusOutHandler)),this.stage.addEventListener("mouseDown",m(this,this.comboBox_stage_mouseDownHandler),!1,0,!0),this.stage.addEventListener("touchBegin",m(this,this.comboBox_stage_touchBeginHandler),!1,0,!0),this.listView.scrollToIndex(this._selectedIndex))},closeListView:function(){this.get_open()&&this.get_popUpAdapter().close()},dispose:function(){this.destroyButton();this.destroyTextInput();this.destroyListView();this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);
fa.prototype.dispose.call(this)},initializeComboBoxTheme:function(){yw.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(Qd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(Qd.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomListViewVariant!=this.get_customListViewVariant()&&
this.setInvalidationFlag(Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);var d=this.isInvalid(Qd.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(Qd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY),g=this.isInvalid(Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);d&&this.createButton();f&&this.createTextInput();g&&this.createListView();(a||g)&&this.refreshListViewData();(a||f)&&this.refreshTextInputData();(b||g||d||f)&&this.refreshSelection();(c||g||d||f)&&this.refreshEnabled();this.measure();this.layoutChildren();this._previousCustomTextInputVariant=
this.get_customTextInputVariant();this._previousCustomButtonVariant=this.get_customButtonVariant();this._previousCustomListViewVariant=this.get_customListViewVariant()},createButton:function(){this.destroyButton();var a=this._buttonFactory!=null?this._buttonFactory:Qd.defaultButtonFactory;this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():Qd.CHILD_VARIANT_BUTTON);this.button.set_focusEnabled(!1);
this.button.addEventListener("mouseDown",m(this,this.comboBox_button_mouseDownHandler));this.button.addEventListener("touchBegin",m(this,this.comboBox_button_touchBeginHandler));this.button.initializeNow();this.buttonMeasurements.save(this.button);this.addChild(this.button)},destroyButton:function(){this.button!=null&&(this.button.removeEventListener("mouseDown",m(this,this.comboBox_button_mouseDownHandler)),this.button.removeEventListener("touchBegin",m(this,this.comboBox_button_touchBeginHandler)),
this.removeChild(this.button),this._oldButtonFactory.destroy!=null&&this._oldButtonFactory.destroy(this.button),this.button=this._oldButtonFactory=null)},createTextInput:function(){this.destroyTextInput();var a=this._textInputFactory!=null?this._textInputFactory:Qd.defaultTextInputFactory;this._oldTextInputFactory=a;this.textInput=a.create();this.textInput.get_variant()==null&&this.textInput.set_variant(this.get_customTextInputVariant()!=null?this.get_customTextInputVariant():Qd.CHILD_VARIANT_TEXT_INPUT);
this.textInput.addEventListener("change",m(this,this.comboBox_textInput_changeHandler));this.textInput.addEventListener("keyDown",m(this,this.comboBox_textInput_keyDownHandler));this.textInput.addEventListener("focusIn",m(this,this.comboBox_textInput_focusInHandler));this.textInput.addEventListener("mouseDown",m(this,this.comboBox_textInput_mouseDownHandler));this.textInput.addEventListener("mouseFocusChange",m(this,this.comboBox_textInput_mouseFocusChangeHandler));this.textInput.initializeNow();
this.textInputMeasurements.save(this.textInput);this.addChild(this.textInput)},destroyTextInput:function(){this.textInput!=null&&(this.textInput.removeEventListener("change",m(this,this.comboBox_textInput_changeHandler)),this.textInput.removeEventListener("keyDown",m(this,this.comboBox_textInput_keyDownHandler)),this.textInput.removeEventListener("focusIn",m(this,this.comboBox_textInput_focusInHandler)),this.textInput.removeEventListener("mouseDown",m(this,this.comboBox_textInput_mouseDownHandler)),
this.textInput.removeEventListener("mouseFocusChange",m(this,this.comboBox_textInput_mouseFocusChangeHandler)),this.removeChild(this.textInput),this._oldTextInputFactory.destroy!=null&&this._oldTextInputFactory.destroy(this.textInput),this.textInput=this._oldTextInputFactory=null)},createListView:function(){this.destroyListView();var a=this._listViewFactory!=null?this._listViewFactory:Qd.defaultListViewFactory;this._oldListViewFactory=a;this.listView=a.create();this.listView.set_focusOwner(this);
this.listView.set_focusEnabled(!1);this.listView.get_variant()==null&&this.listView.set_variant(this.get_customListViewVariant()!=null?this.get_customListViewVariant():Qd.CHILD_VARIANT_LIST_VIEW);this.listView.addEventListener("change",m(this,this.comboBox_listView_changeHandler));this.listView.addEventListener("itemTrigger",m(this,this.comboBox_listView_itemTriggerHandler))},destroyListView:function(){this.listView!=null&&(this.listView.removeEventListener("change",m(this,this.comboBox_listView_changeHandler)),
this.listView.removeEventListener("itemTrigger",m(this,this.comboBox_listView_itemTriggerHandler)),this.listView.set_focusOwner(null),this._oldListViewFactory.destroy!=null&&this._oldListViewFactory.destroy(this.listView),this.listView=this._oldListViewFactory=null)},refreshListViewData:function(){var a=this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_dataProvider(this._dataProvider);this._ignoreListViewChange=a;this.listView.set_itemRendererRecycler(this._itemRendererRecycler);
this.listView.itemToEnabled=m(this,this.itemToEnabled);this.listView.itemToText=m(this,this.itemToText)},refreshTextInputData:function(){this.textInput.set_prompt(this._prompt)},refreshSelection:function(){var a=this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_selectedIndex(this._selectedIndex);this._ignoreListViewChange=a;a=this._ignoreTextInputChange;this._ignoreTextInputChange=!0;var b=this._customSelectedItem!=null?this._customSelectedItem:this._selectedItem;b!=null?
this.textInput.set_text(typeof b=="string"?b:this.itemToText(b)):this.textInput.set_text("");this._ignoreTextInputChange=a},refreshEnabled:function(){this.button.set_enabled(this._enabled);this.textInput.set_enabled(this._enabled);this.listView.set_enabled(this._enabled)},comboBoxFilterFunction:function(a){if(this._filterText==null||this._filterText.length==0)return!0;a=typeof a=="string"?a:this.itemToText(a);a=a.toLowerCase();return a.indexOf(this._filterText.toLowerCase())!=-1},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.buttonMeasurements.restore(this.button);this.button.validateNow();this.textInputMeasurements.restore(this.textInput);this.textInput.validateNow();f=this.get_explicitWidth();a&&(f=this.button.get_width()+this.textInput.get_width());a=this.get_explicitHeight();
b&&(a=Math.max(this.button.get_height(),this.textInput.get_height()));b=this.get_explicitMinWidth();c&&(b=this.button.get_minWidth()+this.textInput.get_minWidth());c=this.get_explicitMinHeight();d&&(c=Math.max(this.button.get_minHeight(),this.textInput.get_minHeight()));return this.saveMeasurements(f,a,b,c)},layoutChildren:function(){this.button.validateNow();this.button.set_x(this.actualWidth-this.button.get_width());this.button.set_y(0);this.button.get_height()!=this.actualHeight&&this.button.set_height(this.actualHeight);
this.textInput.set_x(0);this.textInput.set_y(0);var a=this.actualWidth-this.button.get_width();this.textInput.get_width()!=a&&this.textInput.set_width(a);this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.button.validateNow();this.textInput.validateNow()},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this.get_open()?this.pendingSelectedIndex:this._selectedIndex;switch(a.keyCode){case 33:--b;
break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 38:--b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&(b=this._dataProvider.get_length()-1);a.preventDefault();this.set_selectedIndex(b);this.textInput.get_selectionActiveIndex()!=this.textInput.get_selectionAnchorIndex()&&this.textInput.selectRange(this.textInput.get_selectionAnchorIndex(),this.textInput.get_selectionAnchorIndex());this.get_open()&&(this.listView.set_selectedIndex(b),
this.listView.scrollToIndex(b))}},comboBox_textInput_keyDownHandler:function(a){this._enabled&&(this.navigateWithKeyboard(a),a.keyCode==13&&(a.preventDefault(),a=this.listView.itemToItemState(this.listView.get_selectedItem()),a!=null&&Wh.dispatch(this,"itemTrigger",a),this.closeListView()))},comboBox_textInput_changeHandler:function(a){this._ignoreTextInputChange||(this.get_open()||this.openListView(),this._dataProvider!=null&&(this.pendingSelectedIndex=-1,this._filterText=this.textInput.get_text(),
this._dataProvider.refresh()),this.listView.set_visible(this.get_open()&&this._dataProvider!=null&&this._dataProvider.get_length()>0))},comboBox_textInput_mouseFocusChangeHandler:function(a){this.get_focusManager()!=null||a.isDefaultPrevented()||a.target!=null&&!this.textInput.contains(a.target)||a.relatedObject!=null&&!this.listView.contains(a.relatedObject)||a.preventDefault()},comboBox_textInput_focusInHandler:function(a){this._enabled&&this.openListViewOnFocus&&!this.get_open()&&(this.openListView(),
this._ignoreButtonToggleListView=!0,this.addEventListener("enterFrame",m(this,this.comboBox_focus_enterFrameHandler)))},comboBox_focus_enterFrameHandler:function(a){this.removeEventListener("enterFrame",m(this,this.comboBox_focus_enterFrameHandler));this._ignoreButtonToggleListView=!1},comboBox_textInput_focusOutHandler:function(a){(a.relatedObject==null||a.relatedObject!=this.listView&&!this.listView.contains(a.relatedObject))&&this.closeListView()},comboBox_button_mouseDownHandler:function(a){this.openListViewOnFocus&&
this.get_open()&&this._ignoreButtonToggleListView||this._enabled&&(this.get_open()?this.closeListView():this.openListView())},comboBox_button_touchBeginHandler:function(a){this.openListViewOnFocus&&this.get_open()&&this._ignoreButtonToggleListView||this._enabled&&(a.isPrimaryTouchPoint||(this.get_open()?this.closeListView():this.openListView()))},comboBox_listView_itemTriggerHandler:function(a){this._filterText=null;this.pendingSelectedIndex=a.state.index;this.dispatchEvent(a);this.get_popUpAdapter().get_persistent()||
this.closeListView()},comboBox_listView_changeHandler:function(a){if(!this._ignoreListViewChange)if(this.get_open())this.pendingSelectedIndex=this.listView.get_selectedIndex();else{this.pendingSelectedIndex=-1;this._filterText=null;if(this._selectedIndex!=this.listView.get_selectedIndex()||this._selectedItem!=this.listView.get_selectedItem())this._selectedIndex=this.listView.get_selectedIndex(),this._selectedItem=this.listView.get_selectedItem(),Y.dispatch(this,"change");this.setInvalid(x.SELECTION)}},
comboBox_listView_removedFromStageHandler:function(a){this.listView.removeEventListener("removedFromStage",m(this,this.comboBox_listView_removedFromStageHandler));this.textInput.removeEventListener("focusOut",m(this,this.comboBox_textInput_focusOutHandler));this.stage.removeEventListener("mouseDown",m(this,this.comboBox_stage_mouseDownHandler));this.stage.removeEventListener("touchBegin",m(this,this.comboBox_stage_touchBeginHandler))},comboBox_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==
null||this.textInput==null||this.textInput.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),this.stage.set_focus(this.textInput))},comboBox_removedFromStageHandler:function(a){this.closeListView()},comboBox_keyUpHandler:function(a){if(this._enabled)switch(a.keyCode){case 27:if(a.isDefaultPrevented())break;if(!this.get_open())break;a.preventDefault();this.closeListView();break;case 1073742094:!a.isDefaultPrevented()&&this.get_open()&&(a.preventDefault(),this.closeListView())}},comboBox_stage_mouseDownHandler:function(a){this.hitTestPoint(a.stageX,
a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},comboBox_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.hitTestPoint(a.stageX,a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},comboBox_popUpAdapter_openHandler:function(a){Y.dispatch(this,"open")},comboBox_popUpAdapter_closeHandler:function(a){this.get_popUpAdapter().removeEventListener("open",m(this,this.comboBox_popUpAdapter_openHandler));this.get_popUpAdapter().removeEventListener("close",
m(this,this.comboBox_popUpAdapter_closeHandler));var b=this.pendingSelectedIndex;a=this._filterText;this.pendingSelectedIndex=-1;this._filterText=null;var c=this._selectedIndex;Y.dispatch(this,"close");this._selectedIndex!=c&&(b=this._selectedIndex);c=null;if(b!=-1)c=this._dataProvider.get(b);else if(a!=null){if(b=a.toLowerCase(),this._dataProvider!=null&&this._dataProvider.get_length()>0)for(var d=this._dataProvider.iterator();d.hasNext();){var f=d.next(),g=typeof f=="string"?f:this.itemToText(f);
g=g.toLowerCase();if(g==b){c=f;break}}}else return;b=null;this._allowCustomUserValue&&c==null&&a!=null&&a.length>0&&(b=this.textToItem(a));this._dataProvider!=null&&this._dataProvider.refresh();b!=null?(this._customSelectedItem=b,this._selectedItem=null,this._selectedIndex=-1,Y.dispatch(this,"change")):c!=null?this.set_selectedItem(c):this._allowCustomUserValue&&(this._selectedItem=this._customSelectedItem=null,this._selectedIndex=-1,Y.dispatch(this,"change"));this.setInvalid(x.SELECTION)},comboBox_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1)},
comboBox_textInput_mouseDownHandler:function(a){this.textInput.get_editable()||this.textInput.get_selectable()||this.openListView()},__popUpAdapter:null,get_popUpAdapter:function(){return this.__popUpAdapter},set_popUpAdapter:function(a){if(!this.setStyle("popUpAdapter")||this.__popUpAdapter==a)return this.__popUpAdapter;this._previousClearStyle=m(this,this.clearStyle_popUpAdapter);this.__popUpAdapter=a;this.setInvalid(x.STYLES);return this.__popUpAdapter},clearStyle_popUpAdapter:function(){this.set_popUpAdapter(new Xk);
return this.get_popUpAdapter()},__customTextInputVariant:null,get_customTextInputVariant:function(){return this.__customTextInputVariant},set_customTextInputVariant:function(a){if(!this.setStyle("customTextInputVariant")||this.__customTextInputVariant==a)return this.__customTextInputVariant;this._previousClearStyle=m(this,this.clearStyle_customTextInputVariant);this.__customTextInputVariant=a;this.setInvalid(x.STYLES);return this.__customTextInputVariant},clearStyle_customTextInputVariant:function(){this.set_customTextInputVariant(null);
return this.get_customTextInputVariant()},__customButtonVariant:null,get_customButtonVariant:function(){return this.__customButtonVariant},set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);
return this.get_customButtonVariant()},__customListViewVariant:null,get_customListViewVariant:function(){return this.__customListViewVariant},set_customListViewVariant:function(a){if(!this.setStyle("customListViewVariant")||this.__customListViewVariant==a)return this.__customListViewVariant;this._previousClearStyle=m(this,this.clearStyle_customListViewVariant);this.__customListViewVariant=a;this.setInvalid(x.STYLES);return this.__customListViewVariant},clearStyle_customListViewVariant:function(){this.set_customListViewVariant(null);
return this.get_customListViewVariant()},get_styleContext:function(){return Qd},__class__:Qd,__properties__:I(fa.prototype.__properties__,{get_open:"get_open",set_listViewFactory:"set_listViewFactory",get_listViewFactory:"get_listViewFactory",set_textInputFactory:"set_textInputFactory",get_textInputFactory:"get_textInputFactory",set_buttonFactory:"set_buttonFactory",get_buttonFactory:"get_buttonFactory",set_customListViewVariant:"set_customListViewVariant",get_customListViewVariant:"get_customListViewVariant",
set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",set_customTextInputVariant:"set_customTextInputVariant",get_customTextInputVariant:"get_customTextInputVariant",set_popUpAdapter:"set_popUpAdapter",get_popUpAdapter:"get_popUpAdapter",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_prompt:"set_prompt",get_prompt:"get_prompt",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",
get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_allowCustomUserValue:"set_allowCustomUserValue",get_allowCustomUserValue:"get_allowCustomUserValue",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",get_text:"get_text",get_stageFocusTarget:"get_stageFocusTarget"})});var mp=function(){};t["feathers.core.IDateSelector"]=mp;mp.__name__="feathers.core.IDateSelector";mp.__isInterface__=!0;mp.prototype={get_selectedDate:null,
set_selectedDate:null,__class__:mp,__properties__:{set_selectedDate:"set_selectedDate",get_selectedDate:"get_selectedDate"}};var nt=function(a,b){this.enabled=!0;this.selected=!1;this.date=a;this.selected=!1};t["feathers.data.DatePickerItemState"]=nt;nt.__name__="feathers.data.DatePickerItemState";nt.prototype={owner:null,date:null,selected:null,enabled:null,__class__:nt};var Kb=function(){this.__showDatesFromAdjacentMonths=!0;this.__customWeekdayLabelVariant=this.__customDateRendererVariant=this.__customMutedDateRendererVariant=
null;this.__showMonthTitleView=this.__showMonthButtons=this.__showYearButtons=this.__showWeekdayLabels=!0;this.__monthTitleViewPosition=Wb.CENTER;this.__headerGap=this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__backgroundSkin=this.__disabledBackgroundSkin=this.__customDecrementMonthButtonVariant=this.__customIncrementMonthButtonVariant=this.__customDecrementYearButtonVariant=this.__customIncrementYearButtonVariant=this.__customMonthTitleViewVariant=null;this.pointerSelectionEnabled=
!0;this._customStartOfWeek=this._previousCustomWeekdayLabelVariant=this._previousCustomDateRendererVariant=this._previousCustomMutedDateRendererVariant=null;this._currentStartOfWeek=0;this._selectedDate=this._currentBackgroundSkin=this._backgroundSkinMeasurements=this._previousCustomDecrementMonthButtonVariant=this._previousCustomIncrementMonthButtonVariant=this._previousCustomDecrementYearButtonVariant=this._previousCustomIncrementYearButtonVariant=this._previousCustomMonthTitleViewVariant=this._requestedLocaleIDName=
this._actualLocaleIDName=this._customMonthNames=this._customWeekdayNames=null;this._ignoreSelectionChange=!1;this._selectable=!0;this._displayedMonth=(new Date).getMonth();this._displayedFullYear=(new Date).getFullYear();this.itemStatePool=new dc(function(){return new nt});this.monthTitleViewMeasurements=new Sb;this.incrementYearButtonMeasurements=new Sb;this.decrementYearButtonMeasurements=new Sb;this.incrementMonthButtonMeasurements=new Sb;this.decrementMonthButtonMeasurements=new Sb;this._mutedStorage=
new ot(null,Ne.withClass(Sc));this._defaultStorage=new ot(null,Ne.withClass(Sc));this.dateRendererToItemState=new Ta;this._dayNameLabels=[];this.initializeDatePickerTheme();fa.call(this);this.addEventListener("keyDown",m(this,this.datePicker_keyDownHandler))};t["feathers.controls.DatePicker"]=Kb;Kb.__name__="feathers.controls.DatePicker";Kb.__interfaces__=[qd,mp];Kb.defaultUpdateDateRenderer=function(a,b){w.__implements(a,re)&&a.set_text(H.string(b.date.getDate()))};Kb.defaultResetDateRenderer=function(a,
b){w.__implements(a,re)&&a.set_text(null)};Kb.__super__=fa;Kb.prototype=I(fa.prototype,{dateContainer:null,monthView:null,decrementMonthButton:null,incrementMonthButton:null,decrementYearButton:null,incrementYearButton:null,monthTitleView:null,_dayNameLabels:null,dateRendererToItemState:null,_defaultStorage:null,_mutedStorage:null,decrementMonthButtonMeasurements:null,incrementMonthButtonMeasurements:null,decrementYearButtonMeasurements:null,incrementYearButtonMeasurements:null,monthTitleViewMeasurements:null,
itemStatePool:null,_displayedFullYear:null,get_displayedFullYear:function(){return this._displayedFullYear},set_displayedFullYear:function(a){if(this._displayedFullYear==a)return this._displayedFullYear;this._displayedFullYear=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"scroll");return this._displayedFullYear},_displayedMonth:null,get_displayedMonth:function(){return this._displayedMonth},set_displayedMonth:function(a){if(a<0||a>11)throw new we("displayedMonth must be in the range 0-11");if(this._displayedMonth==
a)return this._displayedMonth;this._displayedMonth=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"scroll");return this._displayedMonth},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this._selectedDate==null||this.set_selectedDate(null);this.setInvalid(x.SELECTION);return this._selectable},_ignoreSelectionChange:null,_selectedDate:null,get_selectedDate:function(){return this._selectedDate},
set_selectedDate:function(a){this._selectable||(a=null);if(this._selectedDate==a)return this._selectedDate;this._selectedDate=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedDate},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_oldDecrementMonthButtonFactory:null,_decrementMonthButtonFactory:null,get_decrementMonthButtonFactory:function(){return this._decrementMonthButtonFactory},set_decrementMonthButtonFactory:function(a){if(this._decrementMonthButtonFactory==
a)return this._decrementMonthButtonFactory;this._decrementMonthButtonFactory=a;this.setInvalid(Kb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY);return this._decrementMonthButtonFactory},_previousCustomDecrementMonthButtonVariant:null,_oldIncrementMonthButtonFactory:null,_incrementMonthButtonFactory:null,get_incrementMonthButtonFactory:function(){return this._incrementMonthButtonFactory},set_incrementMonthButtonFactory:function(a){if(this._incrementMonthButtonFactory==a)return this._incrementMonthButtonFactory;
this._incrementMonthButtonFactory=a;this.setInvalid(Kb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY);return this._incrementMonthButtonFactory},_previousCustomIncrementMonthButtonVariant:null,_oldDecrementYearButtonFactory:null,_decrementYearButtonFactory:null,get_decrementYearButtonFactory:function(){return this._decrementYearButtonFactory},set_decrementYearButtonFactory:function(a){if(this._decrementYearButtonFactory==a)return this._decrementYearButtonFactory;this._decrementYearButtonFactory=
a;this.setInvalid(Kb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY);return this._decrementYearButtonFactory},_previousCustomDecrementYearButtonVariant:null,_oldIncrementYearButtonFactory:null,_incrementYearButtonFactory:null,get_incrementYearButtonFactory:function(){return this._incrementYearButtonFactory},set_incrementYearButtonFactory:function(a){if(this._incrementYearButtonFactory==a)return this._incrementYearButtonFactory;this._incrementYearButtonFactory=a;this.setInvalid(Kb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY);
return this._incrementYearButtonFactory},_previousCustomIncrementYearButtonVariant:null,_oldMonthTitleViewFactory:null,_monthTitleViewFactory:null,get_monthTitleViewFactory:function(){return this._monthTitleViewFactory},set_monthTitleViewFactory:function(a){if(this._monthTitleViewFactory==a)return this._monthTitleViewFactory;this._monthTitleViewFactory=a;this.setInvalid(Kb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);return this._monthTitleViewFactory},_previousCustomMonthTitleViewVariant:null,_currentMonthNames:null,
_currentWeekdayNames:null,_currentDateFormatter:null,_requestedLocaleIDName:null,get_requestedLocaleIDName:function(){return this._requestedLocaleIDName},set_requestedLocaleIDName:function(a){if(this._requestedLocaleIDName==a)return this._requestedLocaleIDName;this._requestedLocaleIDName=a;this._actualLocaleIDName=null;this.setInvalid(x.DATA);return this._requestedLocaleIDName},_actualLocaleIDName:null,get_actualLocaleIDName:function(){return this._actualLocaleIDName},setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},_customMonthNames:null,get_customMonthNames:function(){return this._customMonthNames},set_customMonthNames:function(a){if(a!=null&&a.length!=12)throw new Cb("Length of customMonthNames must be exactly equal to 12");if(this._customMonthNames==a)return this._customMonthNames;this._customMonthNames=a;this.setInvalid(x.DATA);return this._customMonthNames},_customWeekdayNames:null,get_customWeekdayNames:function(){return this._customWeekdayNames},
set_customWeekdayNames:function(a){if(a!=null&&a.length!=7)throw new Cb("Length of customWeekdayNames must be exactly equal to 7");if(this._customWeekdayNames==a)return this._customWeekdayNames;this._customWeekdayNames=a;this.setInvalid(x.DATA);return this._customWeekdayNames},_currentStartOfWeek:null,_customStartOfWeek:null,get_customStartOfWeek:function(){return this._customStartOfWeek},set_customStartOfWeek:function(a){if(a!=null&&(a<0||a>6))throw new we("startOfWeek must be in the range 0-6");
if(this._customStartOfWeek==a)return this._customStartOfWeek;this._customStartOfWeek=a;this.setInvalid(x.DATA);return this._customStartOfWeek},_oldWeekdayLabelFactory:null,_weekdayLabelFactory:null,get_weekdayLabelFactory:function(){return this._weekdayLabelFactory},set_weekdayLabelFactory:function(a){if(this._weekdayLabelFactory==a)return this._weekdayLabelFactory;this._weekdayLabelFactory=a;this.setInvalid(Kb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY);return this._weekdayLabelFactory},_previousCustomWeekdayLabelVariant:null,
_previousCustomDateRendererVariant:null,_previousCustomMutedDateRendererVariant:null,get_dateRendererRecycler:function(){return this._defaultStorage.dateRendererRecycler},set_dateRendererRecycler:function(a){if(this._defaultStorage.dateRendererRecycler==a)return this._defaultStorage.dateRendererRecycler;this._defaultStorage.oldDateRendererRecycler=this._defaultStorage.dateRendererRecycler;this._defaultStorage.dateRendererRecycler=a;this._defaultStorage.measurements=null;this._mutedStorage.oldDateRendererRecycler=
this._mutedStorage.dateRendererRecycler;this._mutedStorage.dateRendererRecycler=a;this._mutedStorage.measurements=null;this.setInvalid(Kb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);return this._defaultStorage.dateRendererRecycler},pointerSelectionEnabled:null,dispose:function(){this.destroyMonthTitleView();this.destroyDecrementMonthButton();this.destroyIncrementMonthButton();this.destroyDecrementYearButton();this.destroyIncrementYearButton();this.refreshInactiveDateRenderers(this._defaultStorage,!0);
this.refreshInactiveDateRenderers(this._mutedStorage,!0);fa.prototype.dispose.call(this)},initializeDatePickerTheme:function(){Sh.initialize()},initialize:function(){this.dateContainer==null&&(this.dateContainer=new pb,this.dateContainer.set_layout(new np),this.addChild(this.dateContainer));fa.prototype.initialize.call(this)},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomDateRendererVariant!=this.get_customDateRendererVariant()&&
this.setInvalidationFlag(Kb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this._previousCustomMutedDateRendererVariant!=this.get_customMutedDateRendererVariant()&&this.setInvalidationFlag(Kb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this._previousCustomWeekdayLabelVariant!=this.get_customWeekdayLabelVariant()&&this.setInvalidationFlag(Kb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY);this._previousCustomDecrementMonthButtonVariant!=this.get_customDecrementMonthButtonVariant()&&this.setInvalidationFlag(Kb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY);
this._previousCustomIncrementMonthButtonVariant!=this.get_customIncrementMonthButtonVariant()&&this.setInvalidationFlag(Kb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY);this._previousCustomDecrementYearButtonVariant!=this.get_customDecrementYearButtonVariant()&&this.setInvalidationFlag(Kb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY);this._previousCustomIncrementYearButtonVariant!=this.get_customIncrementYearButtonVariant()&&this.setInvalidationFlag(Kb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY);
this._previousCustomMonthTitleViewVariant!=this.get_customMonthTitleViewVariant()&&this.setInvalidationFlag(Kb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);var f=this.isInvalid(Kb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY),g=this.isInvalid(Kb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY),h=this.isInvalid(Kb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY),n=this.isInvalid(Kb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY),l=this.isInvalid(Kb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY),q=this.isInvalid(Kb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY),
u=this.isInvalid(Kb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);(d||c)&&this.refreshBackgroundSkin();u&&this.createMonthTitleView();h&&this.createDecrementMonthButton();n&&this.createIncrementMonthButton();l&&this.createDecrementYearButton();q&&this.createIncrementYearButton();g&&this.createWeekdayLabels();a&&this.refreshLocale();(a||b||f)&&this.refreshDateRenderers();(g||a||d)&&this.refreshWeekdayLabels();(c||u||h||n||l||q)&&this.refreshEnabled();(a||b)&&this.refreshMonthTitle();this.measure();this.layoutChildren();
this._previousCustomDateRendererVariant=this.get_customDateRendererVariant();this._previousCustomMutedDateRendererVariant=this.get_customMutedDateRendererVariant();this._previousCustomMonthTitleViewVariant=this.get_customMonthTitleViewVariant();this._previousCustomWeekdayLabelVariant=this.get_customWeekdayLabelVariant();this._previousCustomDecrementMonthButtonVariant=this.get_customDecrementMonthButtonVariant();this._previousCustomIncrementMonthButtonVariant=this.get_customIncrementMonthButtonVariant();
this._previousCustomDecrementYearButtonVariant=this.get_customDecrementYearButtonVariant();this._previousCustomIncrementYearButtonVariant=this.get_customIncrementYearButtonVariant()},createMonthTitleView:function(){var a=this._monthTitleViewFactory!=null?this._monthTitleViewFactory:Kb.defaultMonthTitleViewFactory;this._oldMonthTitleViewFactory=a;this.monthTitleView=a.create();this.monthTitleView.get_variant()==null&&this.monthTitleView.set_variant(this.get_customMonthTitleViewVariant()!=null?this.get_customMonthTitleViewVariant():
Kb.CHILD_VARIANT_MONTH_TITLE_VIEW);this.monthTitleView.initializeNow();this.monthTitleViewMeasurements.save(this.monthTitleView);this.addChild(this.monthTitleView)},destroyMonthTitleView:function(){this.monthTitleView!=null&&(this._oldMonthTitleViewFactory.destroy!=null&&this._oldMonthTitleViewFactory.destroy(this.monthTitleView),this.monthTitleView=this._oldMonthTitleViewFactory=null)},createDecrementMonthButton:function(){this.destroyDecrementMonthButton();var a=this._decrementMonthButtonFactory!=
null?this._decrementMonthButtonFactory:Kb.defaultDecrementMonthButtonFactory;this._oldDecrementMonthButtonFactory=a;this.decrementMonthButton=a.create();this.decrementMonthButton.get_variant()==null&&this.decrementMonthButton.set_variant(this.get_customDecrementMonthButtonVariant()!=null?this.get_customDecrementMonthButtonVariant():Kb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON);this.decrementMonthButton.initializeNow();this.decrementMonthButtonMeasurements.save(this.decrementMonthButton);this.addChild(this.decrementMonthButton);
this.decrementMonthButton.addEventListener("trigger",m(this,this.datePicker_decrementMonthButton_triggerHandler))},destroyDecrementMonthButton:function(){this.decrementMonthButton!=null&&(this.decrementMonthButton.removeEventListener("trigger",m(this,this.datePicker_decrementMonthButton_triggerHandler)),this._oldDecrementMonthButtonFactory.destroy!=null&&this._oldDecrementMonthButtonFactory.destroy(this.decrementMonthButton),this.decrementMonthButton=this._oldDecrementMonthButtonFactory=null)},createIncrementMonthButton:function(){this.destroyIncrementMonthButton();
var a=this._incrementMonthButtonFactory!=null?this._incrementMonthButtonFactory:Kb.defaultIncrementMonthButtonFactory;this._oldIncrementMonthButtonFactory=a;this.incrementMonthButton=a.create();this.incrementMonthButton.get_variant()==null&&this.incrementMonthButton.set_variant(this.get_customIncrementMonthButtonVariant()!=null?this.get_customIncrementMonthButtonVariant():Kb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON);this.incrementMonthButton.initializeNow();this.incrementMonthButtonMeasurements.save(this.incrementMonthButton);
this.addChild(this.incrementMonthButton);this.incrementMonthButton.addEventListener("trigger",m(this,this.datePicker_incrementMonthButton_triggerHandler))},destroyIncrementMonthButton:function(){this.incrementMonthButton!=null&&(this.incrementMonthButton.removeEventListener("trigger",m(this,this.datePicker_incrementMonthButton_triggerHandler)),this._oldIncrementMonthButtonFactory.destroy!=null&&this._oldIncrementMonthButtonFactory.destroy(this.incrementMonthButton),this.incrementMonthButton=this._oldIncrementMonthButtonFactory=
null)},createDecrementYearButton:function(){this.destroyDecrementYearButton();var a=this._decrementYearButtonFactory!=null?this._decrementYearButtonFactory:Kb.defaultDecrementYearButtonFactory;this._oldDecrementYearButtonFactory=a;this.decrementYearButton=a.create();this.decrementYearButton.get_variant()==null&&this.decrementYearButton.set_variant(this.get_customDecrementYearButtonVariant()!=null?this.get_customDecrementYearButtonVariant():Kb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON);this.decrementYearButton.initializeNow();
this.decrementYearButtonMeasurements.save(this.decrementYearButton);this.addChild(this.decrementYearButton);this.decrementYearButton.addEventListener("trigger",m(this,this.datePicker_decrementYearButton_triggerHandler))},destroyDecrementYearButton:function(){this.decrementYearButton!=null&&(this.decrementYearButton.removeEventListener("trigger",m(this,this.datePicker_decrementYearButton_triggerHandler)),this._oldDecrementYearButtonFactory.destroy!=null&&this._oldDecrementYearButtonFactory.destroy(this.decrementYearButton),
this.decrementYearButton=this._oldDecrementYearButtonFactory=null)},createIncrementYearButton:function(){this.destroyIncrementYearButton();var a=this._incrementYearButtonFactory!=null?this._incrementYearButtonFactory:Kb.defaultIncrementYearButtonFactory;this._oldIncrementYearButtonFactory=a;this.incrementYearButton=a.create();this.incrementYearButton.get_variant()==null&&this.incrementYearButton.set_variant(this.get_customIncrementYearButtonVariant()!=null?this.get_customIncrementYearButtonVariant():
Kb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON);this.incrementYearButton.initializeNow();this.incrementYearButtonMeasurements.save(this.incrementYearButton);this.addChild(this.incrementYearButton);this.incrementYearButton.addEventListener("trigger",m(this,this.datePicker_incrementYearButton_triggerHandler))},destroyIncrementYearButton:function(){this.incrementYearButton!=null&&(this.incrementYearButton.removeEventListener("trigger",m(this,this.datePicker_incrementYearButton_triggerHandler)),this._oldIncrementYearButtonFactory.destroy!=
null&&this._oldIncrementYearButtonFactory.destroy(this.incrementYearButton),this.incrementYearButton=this._oldIncrementYearButtonFactory=null)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.dateContainer.validateNow();this.monthTitleViewMeasurements.restore(this.monthTitleView);
f=this.monthTitleView.get_text();g=this.getMonthText(this.getMonthWithLongestName(),0);this.monthTitleView.set_text(g);this.monthTitleView.validateNow();this.decrementMonthButtonMeasurements.restore(this.decrementMonthButton);this.decrementMonthButton.validateNow();this.incrementMonthButtonMeasurements.restore(this.incrementMonthButton);this.incrementMonthButton.validateNow();this.decrementYearButtonMeasurements.restore(this.decrementYearButton);this.decrementYearButton.validateNow();this.incrementYearButtonMeasurements.restore(this.incrementYearButton);
this.incrementYearButton.validateNow();var h=0;g=0;this.get_showMonthTitleView()&&(h=this.monthTitleView.get_width(),g=this.monthTitleView.get_height());this.get_showMonthButtons()&&(h+=2*this.get_headerGap()+this.decrementMonthButton.get_width()+this.incrementMonthButton.get_width(),g=Math.max(g,Math.max(this.decrementMonthButton.get_height(),this.incrementMonthButton.get_height())));this.get_showYearButtons()&&(h+=2*this.get_headerGap()+this.decrementYearButton.get_width()+this.incrementYearButton.get_width(),
g=Math.max(g,Math.max(this.decrementYearButton.get_height(),this.incrementYearButton.get_height())));var n=this.get_explicitWidth();a&&(n=Math.max(this.dateContainer.get_width(),h),n+=this.get_paddingLeft()+this.get_paddingRight());a=this.get_explicitHeight();b&&(a=g+this.dateContainer.get_height(),a+=this.get_paddingTop()+this.get_paddingBottom());b=this.get_explicitMinWidth();c&&(b=Math.max(this.dateContainer.get_minWidth(),h),b+=this.get_paddingLeft()+this.get_paddingRight());c=this.get_explicitMinHeight();
d&&(c=g+this.dateContainer.get_minHeight(),c+=this.get_paddingTop()+this.get_paddingBottom());this.monthTitleView.set_text(f);return this.saveMeasurements(n,a,b,c)},refreshEnabled:function(){this.monthTitleView.set_enabled(this.get_enabled());this.decrementMonthButton.set_enabled(this.get_enabled());this.incrementMonthButton.set_enabled(this.get_enabled());this.decrementYearButton.set_enabled(this.get_enabled());this.incrementYearButton.set_enabled(this.get_enabled());this.dateContainer.set_enabled(this.get_enabled())},
createWeekdayLabels:function(){for(var a=0,b=this._dayNameLabels;a<b.length;){var c=b[a];++a;this.dateContainer.removeChild(c);this._oldWeekdayLabelFactory.destroy!=null&&this._oldWeekdayLabelFactory.destroy(c)}this._oldWeekdayLabelFactory=null;this._dayNameLabels.length=0;a=this._weekdayLabelFactory!=null?this._weekdayLabelFactory:Kb.defaultWeekdayLabelFactory;b=this.get_customWeekdayLabelVariant()!=null?this.get_customWeekdayLabelVariant():Kb.CHILD_VARIANT_WEEKDAY_LABEL;c=w.__cast(a.create(),ia);
this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,0);this._dayNameLabels.push(c);c=w.__cast(a.create(),ia);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,1);this._dayNameLabels.push(c);c=w.__cast(a.create(),ia);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,2);this._dayNameLabels.push(c);c=w.__cast(a.create(),ia);this._oldWeekdayLabelFactory=
a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,3);this._dayNameLabels.push(c);c=w.__cast(a.create(),ia);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,4);this._dayNameLabels.push(c);c=w.__cast(a.create(),ia);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,5);this._dayNameLabels.push(c);c=w.__cast(a.create(),ia);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&
c.set_variant(b);this.dateContainer.addChildAt(c,6);this._dayNameLabels.push(c)},refreshWeekdayLabels:function(){for(var a=0,b=this._dayNameLabels.length;a<b;){var c=a++,d=this._dayNameLabels[c];d.set_text(this._currentWeekdayNames[(c+this._currentStartOfWeek)%this._dayNameLabels.length]);d.set_visible(this.get_showWeekdayLabels());d.set_includeInLayout(this.get_showWeekdayLabels())}},refreshDateRenderers:function(){this._defaultStorage.dateRendererRecycler.update==null&&(this._defaultStorage.dateRendererRecycler.update=
Kb.defaultUpdateDateRenderer,this._defaultStorage.dateRendererRecycler.reset==null&&(this._defaultStorage.dateRendererRecycler.reset=Kb.defaultResetDateRenderer));this._mutedStorage.dateRendererRecycler.update==null&&(this._mutedStorage.dateRendererRecycler.update=Kb.defaultUpdateDateRenderer,this._mutedStorage.dateRendererRecycler.reset==null&&(this._mutedStorage.dateRendererRecycler.reset=Kb.defaultResetDateRenderer));var a=this.isInvalid(Kb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this.refreshInactiveDateRenderers(this._defaultStorage,
a);this.refreshInactiveDateRenderers(this._mutedStorage,a);this.recoverInactiveDateRenderers(this._defaultStorage);this.recoverInactiveDateRenderers(this._mutedStorage);this.renderUnrenderedData();this.freeInactiveDateRenderers(this._defaultStorage);this.freeInactiveDateRenderers(this._mutedStorage)},refreshInactiveDateRenderers:function(a,b){var c=a.inactiveDateRenderers;a.inactiveDateRenderers=a.activeDateRenderers;a.activeDateRenderers=c;if(a.activeDateRenderers.length>0)throw a=w.getClass(this),
new ob(""+a.__name__+": active date renderers should be empty before updating.");b&&(this.recoverInactiveDateRenderers(a),this.freeInactiveDateRenderers(a),a.oldDateRendererRecycler=null)},recoverInactiveDateRenderers:function(a){for(var b=0,c=a.inactiveDateRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.dateRendererToItemState.h[d.__id__];f!=null&&(this.dateRendererToItemState.remove(d),d.removeEventListener("trigger",m(this,this.datePicker_dateRenderer_triggerHandler)),d.removeEventListener("click",
m(this,this.datePicker_dateRenderer_clickHandler)),d.removeEventListener("touchTap",m(this,this.datePicker_dateRenderer_touchTapHandler)),d.removeEventListener("change",m(this,this.datePicker_dateRenderer_changeHandler)),this.resetDateRenderer(d,f,a),a.measurements!=null&&a.measurements.restore(d),this.itemStatePool.release(f))}}},freeInactiveDateRenderers:function(a){for(var b=a.oldDateRendererRecycler!=null?a.oldDateRendererRecycler:a.dateRendererRecycler,c=0,d=a.inactiveDateRenderers;c<d.length;){var f=
d[c];++c;f!=null&&this.destroyDateRenderer(f,b)}a.inactiveDateRenderers.length=0},createDateRenderer:function(a,b){if(b.inactiveDateRenderers.length==0){var c=b.dateRendererRecycler.create();if(w.__implements(c,nd)){var d=c;if(d.get_variant()==null){var f=b==this._mutedStorage?this.get_customMutedDateRendererVariant()!=null?this.get_customMutedDateRendererVariant():Kb.CHILD_VARIANT_MUTED_DATE_RENDERER:this.get_customDateRendererVariant()!=null?this.get_customDateRendererVariant():Kb.CHILD_VARIANT_DATE_RENDERER;
d.set_variant(f)}}w.__implements(c,Fa)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveDateRenderers.shift();this.updateDateRenderer(c,a,b);w.__implements(c,Qh)?c.addEventListener("trigger",m(this,this.datePicker_dateRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.datePicker_dateRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.datePicker_dateRenderer_touchTapHandler)));w.__implements(c,ud)&&c.addEventListener("change",m(this,
this.datePicker_dateRenderer_changeHandler));this.dateRendererToItemState.set(c,a);b.activeDateRenderers.push(c);return c},destroyDateRenderer:function(a,b){this.dateContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},populateCurrentItemState:function(a,b){b.owner=this;b.date=a;b.selected=this._selectedDate!=null&&this._displayedFullYear==this._selectedDate.getFullYear()&&this._displayedMonth==this._selectedDate.getMonth()&&a.getFullYear()==this._selectedDate.getFullYear()&&a.getMonth()==
this._selectedDate.getMonth()&&a.getDate()==this._selectedDate.getDate();b.enabled=this._enabled},resetDateRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c=c.oldDateRendererRecycler!=null?c.oldDateRendererRecycler:c.dateRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshDateRendererProperties(a,Kb.RESET_ITEM_STATE);a.set_visible(!0)},updateDateRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=
!0;c.dateRendererRecycler.update!=null&&c.dateRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshDateRendererProperties(a,b);a.set_visible(this.get_showDatesFromAdjacentMonths()||b.date!=null&&this._displayedFullYear==b.date.getFullYear()&&this._displayedMonth==b.date.getMonth())},refreshDateRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.date);w.__implements(a,
ud)&&a.set_selected(b.selected);this._ignoreSelectionChange=c},renderUnrenderedData:function(){var a=-(this._customStartOfWeek!=null?this._customStartOfWeek:0)+(new Date(this._displayedFullYear,this._displayedMonth,1,0,0,0)).getDay();a<0&&(a=0);var b=this._displayedFullYear,c=this._displayedMonth-1;c<0&&(c=11,--b);var d=Yk.getDaysInMonth(this._displayedMonth,this._displayedFullYear),f=Yk.getDaysInMonth(c,b),g=this._displayedFullYear,h=this._displayedMonth;a=f-a+1;a>1&&(h=c,g=b);for(b=0;b<42;){c=b++;
(h<this._displayedMonth||g<this._displayedFullYear)&&a>f&&(a=1,++h,h==12&&(h=0,++g));h==this._displayedMonth&&a>d&&(a=1,++h,h==12&&(h=0,++g));var n=this.itemStatePool.get();this.populateCurrentItemState(new Date(g,h,a,0,0,0),n);var l=h==this._displayedMonth?this._defaultStorage:this._mutedStorage,q=this.createDateRenderer(n,l);this.dateContainer.addChildAt(q,7+c);this.updateDateRenderer(q,n,l);++a}},refreshLocale:function(){this._currentDateFormatter=new op(this._requestedLocaleIDName!=null?this._requestedLocaleIDName:
"i-default",1,3);this._actualLocaleIDName=this._currentDateFormatter.actualLocaleIDName;this._currentDateFormatter.setDateTimePattern("MMMM yyyy");this._currentMonthNames=this._customMonthNames;if(this._currentMonthNames==null){var a=this._currentDateFormatter.getMonthNames(0,0);this._currentMonthNames=[];for(a=a.iterator();a.hasNext();){var b=a.next();this._currentMonthNames.push(b)}}this._currentWeekdayNames=this._customWeekdayNames;if(this._currentWeekdayNames==null)for(a=this._currentDateFormatter.getWeekdayNames(2,
1),this._currentWeekdayNames=[],a=a.iterator();a.hasNext();)b=a.next(),this._currentWeekdayNames.push(b.charAt(0));this._currentStartOfWeek=this._customStartOfWeek!=null?this._customStartOfWeek:this._currentDateFormatter.getFirstWeekday()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||
this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),
this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutChildren:function(){this.layoutBackgroundSkin();this.decrementMonthButton.set_visible(this.get_showMonthButtons());this.incrementMonthButton.set_visible(this.get_showMonthButtons());this.decrementYearButton.set_visible(this.get_showYearButtons());this.incrementYearButton.set_visible(this.get_showYearButtons());this.monthTitleView.set_visible(this.get_showMonthTitleView());this.monthTitleView.validateNow();this.decrementMonthButton.validateNow();
this.incrementMonthButton.validateNow();this.decrementYearButton.validateNow();this.incrementYearButton.validateNow();var a=0;this.get_showMonthButtons()&&(a=Math.max(a,Math.max(this.decrementMonthButton.get_height(),this.incrementMonthButton.get_height())));this.get_showYearButtons()&&(a=Math.max(a,Math.max(this.decrementYearButton.get_height(),this.incrementYearButton.get_height())));this.decrementMonthButton.get_height()!=a&&this.decrementMonthButton.set_height(a);this.incrementMonthButton.get_height()!=
a&&this.incrementMonthButton.set_height(a);this.decrementYearButton.get_height()!=a&&this.decrementYearButton.set_height(a);this.incrementYearButton.get_height()!=a&&this.incrementYearButton.set_height(a);this.get_showMonthTitleView()&&(a=Math.max(a,this.monthTitleView.get_height()));switch(this.get_monthTitleViewPosition()._hx_index){case 0:this.monthTitleView.set_x(this.get_paddingLeft());var b=this.actualWidth-this.get_paddingRight();this.get_showYearButtons()&&(b-=this.incrementYearButton.get_width(),
this.incrementYearButton.set_x(b),b-=this.get_headerGap());this.get_showMonthButtons()&&(b-=this.incrementMonthButton.get_width(),this.incrementMonthButton.set_x(b),b-=this.get_headerGap());this.get_showMonthButtons()&&(b-=this.decrementMonthButton.get_width(),this.decrementMonthButton.set_x(b),b-=this.get_headerGap());this.get_showYearButtons()&&(b-=this.decrementYearButton.get_width(),this.decrementYearButton.set_x(b),this.get_headerGap());break;case 1:this.monthTitleView.set_x(this.get_paddingLeft()+
(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this.monthTitleView.get_width())/2);b=this.get_paddingLeft();this.get_showYearButtons()&&(this.decrementYearButton.set_x(b),b+=this.decrementYearButton.get_width()+this.get_headerGap());this.get_showMonthButtons()&&(this.decrementMonthButton.set_x(b),this.decrementMonthButton.get_width(),this.get_headerGap());b=this.actualWidth-this.get_paddingRight();this.get_showYearButtons()&&(b-=this.incrementYearButton.get_width(),this.incrementYearButton.set_x(b),
b-=this.get_headerGap());this.get_showMonthButtons()&&(b-=this.incrementMonthButton.get_width(),this.incrementMonthButton.set_x(b),this.get_headerGap());break;case 2:this.monthTitleView.set_x(this.actualWidth-this.get_paddingRight()-this.monthTitleView.get_width());b=this.get_paddingLeft();this.get_showYearButtons()&&(this.decrementYearButton.set_x(b),b+=this.decrementYearButton.get_width()+this.get_headerGap());this.get_showMonthButtons()&&(this.decrementMonthButton.set_x(b),b+=this.decrementMonthButton.get_width()+
this.get_headerGap());this.get_showMonthButtons()&&(this.incrementMonthButton.set_x(b),b+=this.incrementMonthButton.get_width()+this.get_headerGap());this.get_showYearButtons()&&(this.incrementYearButton.set_x(b),this.incrementYearButton.get_width(),this.get_headerGap());break;default:throw new Cb("Invalid month position: "+H.string(this.get_monthTitleViewPosition()));}this.get_showMonthTitleView()&&this.monthTitleView.set_y(this.get_paddingTop()+(a-this.monthTitleView.get_height())/2);this.get_showMonthButtons()&&
(this.decrementMonthButton.set_y(this.get_paddingTop()+(a-this.decrementMonthButton.get_height())/2),this.incrementMonthButton.set_y(this.get_paddingTop()+(a-this.incrementMonthButton.get_height())/2));this.get_showYearButtons()&&(this.decrementYearButton.set_y(this.get_paddingTop()+(a-this.decrementYearButton.get_height())/2),this.incrementYearButton.set_y(this.get_paddingTop()+(a-this.incrementYearButton.get_height())/2));this.dateContainer.set_x(this.get_paddingLeft());this.dateContainer.set_y(this.get_paddingTop()+
a);b=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a=this.actualHeight-a-this.get_paddingTop()-this.get_paddingBottom();this.dateContainer.get_width()!=b&&this.dateContainer.set_width(b);this.dateContainer.get_height()!=a&&this.dateContainer.set_height(a);this.dateContainer.validateNow()},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&
this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},refreshMonthTitle:function(){this.monthTitleView.set_text(this.getMonthText(this.get_displayedMonth(),this.get_displayedFullYear()))},getMonthWithLongestName:function(){for(var a=0,b=-1,c=0,d=this._currentMonthNames.length;c<d;){var f=
c++,g=this._currentMonthNames[f].length;a<g&&(a=g,b=f)}return b},getMonthText:function(a,b){return this._customMonthNames!=null?""+this._currentMonthNames[a]+" "+N.lpad(b==null?"null":""+b,"0",4):this._currentDateFormatter.format(new Date(b,a,1,0,0,0))},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()){if(this._selectedDate==null)var b=new Date;else{b=this._selectedDate.getMonth();var c=this._selectedDate.getDate();switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:var d=this._selectedDate.getDay();
d!=6&&(c+=6-d);break;case 36:d=this._selectedDate.getDay();d!=0&&(c-=d);break;case 37:--c;break;case 38:c-=7;break;case 39:++c;break;case 40:c+=7;break;default:return}b=new Date(this._selectedDate.getFullYear(),b,c,this._selectedDate.getHours(),this._selectedDate.getMinutes(),this._selectedDate.getSeconds())}if(this._selectedDate==null||this._selectedDate.getTime()!=b.getTime())a.preventDefault(),this.set_selectedDate(b),this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())}},
datePicker_decrementMonthButton_triggerHandler:function(a){a=this._displayedMonth;var b=this._displayedFullYear;--a;a<0&&(a=11,--b);this.set_displayedMonth(a);this.set_displayedFullYear(b)},datePicker_incrementMonthButton_triggerHandler:function(a){a=this._displayedMonth;var b=this._displayedFullYear;++a;a>11&&(a=0,++b);this.set_displayedMonth(a);this.set_displayedFullYear(b)},datePicker_decrementYearButton_triggerHandler:function(a){this.set_displayedFullYear(this.get_displayedFullYear()-1)},datePicker_incrementYearButton_triggerHandler:function(a){this.set_displayedFullYear(this.get_displayedFullYear()+
1)},datePicker_dateRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=w.__cast(a.currentTarget,ma),a=this.dateRendererToItemState.h[a.__id__],Si.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedDate(a.date),this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())))},datePicker_dateRenderer_clickHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,
ma),a=this.dateRendererToItemState.h[a.__id__],Si.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedDate(a.date),this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())))},datePicker_dateRenderer_triggerHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,ma),a=this.dateRendererToItemState.h[a.__id__],Si.dispatch(this,"itemTrigger",a),this._selectable&&(this.set_selectedDate(a.date),
this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())))},datePicker_dateRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=w.__cast(a.currentTarget,ma);a=w.__cast(b,ud);b=this.dateRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},datePicker_keyDownHandler:function(a){this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&
this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a))},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},
__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);
return this.get_disabledBackgroundSkin()},__customDecrementMonthButtonVariant:null,get_customDecrementMonthButtonVariant:function(){return this.__customDecrementMonthButtonVariant},set_customDecrementMonthButtonVariant:function(a){if(!this.setStyle("customDecrementMonthButtonVariant")||this.__customDecrementMonthButtonVariant==a)return this.__customDecrementMonthButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementMonthButtonVariant);this.__customDecrementMonthButtonVariant=
a;this.setInvalid(x.STYLES);return this.__customDecrementMonthButtonVariant},clearStyle_customDecrementMonthButtonVariant:function(){this.set_customDecrementMonthButtonVariant(null);return this.get_customDecrementMonthButtonVariant()},__customIncrementMonthButtonVariant:null,get_customIncrementMonthButtonVariant:function(){return this.__customIncrementMonthButtonVariant},set_customIncrementMonthButtonVariant:function(a){if(!this.setStyle("customIncrementMonthButtonVariant")||this.__customIncrementMonthButtonVariant==
a)return this.__customIncrementMonthButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementMonthButtonVariant);this.__customIncrementMonthButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementMonthButtonVariant},clearStyle_customIncrementMonthButtonVariant:function(){this.set_customIncrementMonthButtonVariant(null);return this.get_customIncrementMonthButtonVariant()},__customDecrementYearButtonVariant:null,get_customDecrementYearButtonVariant:function(){return this.__customDecrementYearButtonVariant},
set_customDecrementYearButtonVariant:function(a){if(!this.setStyle("customDecrementYearButtonVariant")||this.__customDecrementYearButtonVariant==a)return this.__customDecrementYearButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementYearButtonVariant);this.__customDecrementYearButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDecrementYearButtonVariant},clearStyle_customDecrementYearButtonVariant:function(){this.set_customDecrementYearButtonVariant(null);return this.get_customDecrementYearButtonVariant()},
__customIncrementYearButtonVariant:null,get_customIncrementYearButtonVariant:function(){return this.__customIncrementYearButtonVariant},set_customIncrementYearButtonVariant:function(a){if(!this.setStyle("customIncrementYearButtonVariant")||this.__customIncrementYearButtonVariant==a)return this.__customIncrementYearButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementYearButtonVariant);this.__customIncrementYearButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementYearButtonVariant},
clearStyle_customIncrementYearButtonVariant:function(){this.set_customIncrementYearButtonVariant(null);return this.get_customIncrementYearButtonVariant()},__customMonthTitleViewVariant:null,get_customMonthTitleViewVariant:function(){return this.__customMonthTitleViewVariant},set_customMonthTitleViewVariant:function(a){if(!this.setStyle("customMonthTitleViewVariant")||this.__customMonthTitleViewVariant==a)return this.__customMonthTitleViewVariant;this._previousClearStyle=m(this,this.clearStyle_customMonthTitleViewVariant);
this.__customMonthTitleViewVariant=a;this.setInvalid(x.STYLES);return this.__customMonthTitleViewVariant},clearStyle_customMonthTitleViewVariant:function(){this.set_customMonthTitleViewVariant(null);return this.get_customMonthTitleViewVariant()},__headerGap:null,get_headerGap:function(){return this.__headerGap},set_headerGap:function(a){if(!this.setStyle("headerGap")||this.__headerGap==a)return this.__headerGap;this._previousClearStyle=m(this,this.clearStyle_headerGap);this.__headerGap=a;this.setInvalid(x.STYLES);
return this.__headerGap},clearStyle_headerGap:function(){this.set_headerGap(0);return this.get_headerGap()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},
__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||
this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,
this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__monthTitleViewPosition:null,get_monthTitleViewPosition:function(){return this.__monthTitleViewPosition},set_monthTitleViewPosition:function(a){if(!this.setStyle("monthTitleViewPosition")||this.__monthTitleViewPosition==a)return this.__monthTitleViewPosition;this._previousClearStyle=m(this,this.clearStyle_monthTitleViewPosition);
this.__monthTitleViewPosition=a;this.setInvalid(x.STYLES);return this.__monthTitleViewPosition},clearStyle_monthTitleViewPosition:function(){this.set_monthTitleViewPosition(Wb.CENTER);return this.get_monthTitleViewPosition()},__showMonthTitleView:null,get_showMonthTitleView:function(){return this.__showMonthTitleView},set_showMonthTitleView:function(a){if(!this.setStyle("showMonthTitleView")||this.__showMonthTitleView==a)return this.__showMonthTitleView;this._previousClearStyle=m(this,this.clearStyle_showMonthTitleView);
this.__showMonthTitleView=a;this.setInvalid(x.STYLES);return this.__showMonthTitleView},clearStyle_showMonthTitleView:function(){this.set_showMonthTitleView(!0);return this.get_showMonthTitleView()},__showMonthButtons:null,get_showMonthButtons:function(){return this.__showMonthButtons},set_showMonthButtons:function(a){if(!this.setStyle("showMonthButtons")||this.__showMonthButtons==a)return this.__showMonthButtons;this._previousClearStyle=m(this,this.clearStyle_showMonthButtons);this.__showMonthButtons=
a;this.setInvalid(x.STYLES);return this.__showMonthButtons},clearStyle_showMonthButtons:function(){this.set_showMonthButtons(!0);return this.get_showMonthButtons()},__showYearButtons:null,get_showYearButtons:function(){return this.__showYearButtons},set_showYearButtons:function(a){if(!this.setStyle("showYearButtons")||this.__showYearButtons==a)return this.__showYearButtons;this._previousClearStyle=m(this,this.clearStyle_showYearButtons);this.__showYearButtons=a;this.setInvalid(x.STYLES);return this.__showYearButtons},
clearStyle_showYearButtons:function(){this.set_showYearButtons(!0);return this.get_showYearButtons()},__showWeekdayLabels:null,get_showWeekdayLabels:function(){return this.__showWeekdayLabels},set_showWeekdayLabels:function(a){if(!this.setStyle("showWeekdayLabels")||this.__showWeekdayLabels==a)return this.__showWeekdayLabels;this._previousClearStyle=m(this,this.clearStyle_showWeekdayLabels);this.__showWeekdayLabels=a;this.setInvalid(x.STYLES);return this.__showWeekdayLabels},clearStyle_showWeekdayLabels:function(){this.set_showWeekdayLabels(!0);
return this.get_showWeekdayLabels()},__customWeekdayLabelVariant:null,get_customWeekdayLabelVariant:function(){return this.__customWeekdayLabelVariant},set_customWeekdayLabelVariant:function(a){if(!this.setStyle("customWeekdayLabelVariant")||this.__customWeekdayLabelVariant==a)return this.__customWeekdayLabelVariant;this._previousClearStyle=m(this,this.clearStyle_customWeekdayLabelVariant);this.__customWeekdayLabelVariant=a;this.setInvalid(x.STYLES);return this.__customWeekdayLabelVariant},clearStyle_customWeekdayLabelVariant:function(){this.set_customWeekdayLabelVariant(null);
return this.get_customWeekdayLabelVariant()},__customDateRendererVariant:null,get_customDateRendererVariant:function(){return this.__customDateRendererVariant},set_customDateRendererVariant:function(a){if(!this.setStyle("customDateRendererVariant")||this.__customDateRendererVariant==a)return this.__customDateRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customDateRendererVariant);this.__customDateRendererVariant=a;this.setInvalid(x.STYLES);return this.__customDateRendererVariant},
clearStyle_customDateRendererVariant:function(){this.set_customDateRendererVariant(null);return this.get_customDateRendererVariant()},__customMutedDateRendererVariant:null,get_customMutedDateRendererVariant:function(){return this.__customMutedDateRendererVariant},set_customMutedDateRendererVariant:function(a){if(!this.setStyle("customMutedDateRendererVariant")||this.__customMutedDateRendererVariant==a)return this.__customMutedDateRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customMutedDateRendererVariant);
this.__customMutedDateRendererVariant=a;this.setInvalid(x.STYLES);return this.__customMutedDateRendererVariant},clearStyle_customMutedDateRendererVariant:function(){this.set_customMutedDateRendererVariant(null);return this.get_customMutedDateRendererVariant()},__showDatesFromAdjacentMonths:null,get_showDatesFromAdjacentMonths:function(){return this.__showDatesFromAdjacentMonths},set_showDatesFromAdjacentMonths:function(a){if(!this.setStyle("showDatesFromAdjacentMonths")||this.__showDatesFromAdjacentMonths==
a)return this.__showDatesFromAdjacentMonths;this._previousClearStyle=m(this,this.clearStyle_showDatesFromAdjacentMonths);this.__showDatesFromAdjacentMonths=a;this.setInvalid(x.STYLES);return this.__showDatesFromAdjacentMonths},clearStyle_showDatesFromAdjacentMonths:function(){this.set_showDatesFromAdjacentMonths(!0);return this.get_showDatesFromAdjacentMonths()},get_styleContext:function(){return Kb},__class__:Kb,__properties__:I(fa.prototype.__properties__,{set_showDatesFromAdjacentMonths:"set_showDatesFromAdjacentMonths",
get_showDatesFromAdjacentMonths:"get_showDatesFromAdjacentMonths",set_dateRendererRecycler:"set_dateRendererRecycler",get_dateRendererRecycler:"get_dateRendererRecycler",set_customMutedDateRendererVariant:"set_customMutedDateRendererVariant",get_customMutedDateRendererVariant:"get_customMutedDateRendererVariant",set_customDateRendererVariant:"set_customDateRendererVariant",get_customDateRendererVariant:"get_customDateRendererVariant",set_customWeekdayLabelVariant:"set_customWeekdayLabelVariant",get_customWeekdayLabelVariant:"get_customWeekdayLabelVariant",
set_weekdayLabelFactory:"set_weekdayLabelFactory",get_weekdayLabelFactory:"get_weekdayLabelFactory",set_customStartOfWeek:"set_customStartOfWeek",get_customStartOfWeek:"get_customStartOfWeek",set_customWeekdayNames:"set_customWeekdayNames",get_customWeekdayNames:"get_customWeekdayNames",set_customMonthNames:"set_customMonthNames",get_customMonthNames:"get_customMonthNames",get_actualLocaleIDName:"get_actualLocaleIDName",set_requestedLocaleIDName:"set_requestedLocaleIDName",get_requestedLocaleIDName:"get_requestedLocaleIDName",
set_showWeekdayLabels:"set_showWeekdayLabels",get_showWeekdayLabels:"get_showWeekdayLabels",set_showYearButtons:"set_showYearButtons",get_showYearButtons:"get_showYearButtons",set_showMonthButtons:"set_showMonthButtons",get_showMonthButtons:"get_showMonthButtons",set_showMonthTitleView:"set_showMonthTitleView",get_showMonthTitleView:"get_showMonthTitleView",set_monthTitleViewPosition:"set_monthTitleViewPosition",get_monthTitleViewPosition:"get_monthTitleViewPosition",set_paddingLeft:"set_paddingLeft",
get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_headerGap:"set_headerGap",get_headerGap:"get_headerGap",set_customMonthTitleViewVariant:"set_customMonthTitleViewVariant",get_customMonthTitleViewVariant:"get_customMonthTitleViewVariant",set_monthTitleViewFactory:"set_monthTitleViewFactory",get_monthTitleViewFactory:"get_monthTitleViewFactory",
set_customIncrementYearButtonVariant:"set_customIncrementYearButtonVariant",get_customIncrementYearButtonVariant:"get_customIncrementYearButtonVariant",set_incrementYearButtonFactory:"set_incrementYearButtonFactory",get_incrementYearButtonFactory:"get_incrementYearButtonFactory",set_customDecrementYearButtonVariant:"set_customDecrementYearButtonVariant",get_customDecrementYearButtonVariant:"get_customDecrementYearButtonVariant",set_decrementYearButtonFactory:"set_decrementYearButtonFactory",get_decrementYearButtonFactory:"get_decrementYearButtonFactory",
set_customIncrementMonthButtonVariant:"set_customIncrementMonthButtonVariant",get_customIncrementMonthButtonVariant:"get_customIncrementMonthButtonVariant",set_incrementMonthButtonFactory:"set_incrementMonthButtonFactory",get_incrementMonthButtonFactory:"get_incrementMonthButtonFactory",set_customDecrementMonthButtonVariant:"set_customDecrementMonthButtonVariant",get_customDecrementMonthButtonVariant:"get_customDecrementMonthButtonVariant",set_decrementMonthButtonFactory:"set_decrementMonthButtonFactory",
get_decrementMonthButtonFactory:"get_decrementMonthButtonFactory",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_selectedDate:"set_selectedDate",get_selectedDate:"get_selectedDate",set_selectable:"set_selectable",get_selectable:"get_selectable",set_displayedMonth:"set_displayedMonth",get_displayedMonth:"get_displayedMonth",set_displayedFullYear:"set_displayedFullYear",
get_displayedFullYear:"get_displayedFullYear"})});var ot=function(a,b){this.inactiveDateRenderers=[];this.activeDateRenderers=[];this.id=a;this.dateRendererRecycler=b};t["feathers.controls._DatePicker.DateRendererStorage"]=ot;ot.__name__="feathers.controls._DatePicker.DateRendererStorage";ot.prototype={id:null,oldDateRendererRecycler:null,dateRendererRecycler:null,activeDateRenderers:null,inactiveDateRenderers:null,measurements:null,__class__:ot};var Kn=function(){this.initializeFormTheme();pb.call(this);
this.addEventListener("keyDown",m(this,this.form_keyDownHandler))};t["feathers.controls.Form"]=Kn;Kn.__name__="feathers.controls.Form";Kn.__super__=pb;Kn.prototype=I(pb.prototype,{_submitButton:null,get_submitButton:function(){return this._submitButton},set_submitButton:function(a){if(this._submitButton==a)return this._submitButton;this._submitButton!=null&&this._submitButton.removeEventListener("trigger",m(this,this.form_submitButton_triggerHandler));this._submitButton=a;this._submitButton!=null&&
this._submitButton.addEventListener("trigger",m(this,this.form_submitButton_triggerHandler),!1,0,!0);return this._submitButton},submit:function(){Qj.dispatch(this,"submit")},dispose:function(){this._submitButton!=null&&this.set_submitButton(null);pb.prototype.dispose.call(this)},initializeFormTheme:function(){zw.initialize()},form_keyDownHandler:function(a){if(this._enabled&&a.keyCode==13&&!a.isDefaultPrevented()){for(var b=w.__cast(a.target,ma);b!=this&&b!=null;){if(b instanceof Ti&&!b.submitOnEnterEnabled)return;
b=b.parent}a.preventDefault();this.submit()}},form_submitButton_triggerHandler:function(a){this.submit()},get_styleContext:function(){return Kn},__class__:Kn,__properties__:I(pb.prototype.__properties__,{set_submitButton:"set_submitButton",get_submitButton:"get_submitButton"})});var Ti=function(a,b,c){c==null&&(c=!1);a==null&&(a="");this.__textPosition=ra.TOP;this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__wordWrap=!1;this.__verticalAlign=hc.MIDDLE;this.__horizontalAlign=Wb.LEFT;this.__paddingTop=
this.__paddingRight=this.__paddingBottom=this.__paddingLeft=this.__gap=0;this.__embedFonts=!1;this._currentRequiredSkin=this._requiredSkinMeasurements=this._customTextColumnWidth=this._currentBackgroundSkin=this._backgroundSkinMeasurements=this.__requiredSkin=this.__textFormat=this.__styleSheet=this.__disabledTextFormat=null;this.submitOnEnterEnabled=!0;this._ignoreContentResize=this._selectable=this._required=!1;this._htmlText=this._contentMeasurements=this._currentContent=null;this._updatedTextStyles=
this._wrappedOnMeasure=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeFormItemTheme();fa.call(this);this.set_text(a);this.set_content(b);this.set_required(c)};t["feathers.controls.FormItem"]=Ti;Ti.__name__="feathers.controls.FormItem";Ti.__interfaces__=[Mb,re];Ti.__super__=fa;Ti.prototype=I(fa.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,
_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);this._customTextColumnWidth==null||this.get_textPosition()!=ra.LEFT&&this.get_textPosition()!=ra.RIGHT||Y.dispatch(this,"resize");return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==
a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){if(this.textField==null)return 0;var a=this._htmlText!=null&&this._htmlText.length>0;this._text!=null&&this._text.length>0||a?a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent:(this.textField.set_text("\u200b"),a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent,this.textField.set_text(""));var b=0;w.__implements(this._currentContent,re)&&(b=this._currentContent.get_y()+
this._currentContent.get_baseline());return Math.max(a,b)},_contentMeasurements:null,_currentContent:null,_ignoreContentResize:null,_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;this._content!=null&&this._content.removeEventListener("resize",m(this,this.formItem_content_resizeHandler));this._content=a;this._content!=null&&this._content.addEventListener("resize",m(this,this.formItem_content_resizeHandler),!1,0,!0);this.setInvalid(x.DATA);
return this._content},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.SELECTION);return this._selectable},get_selectionBeginIndex:function(){return this._selectable?this.textField==null?0:this.textField.get_selectionBeginIndex():-1},get_selectionEndIndex:function(){return this._selectable?this.textField==null?0:this.textField.get_selectionEndIndex():-1},_required:null,
get_required:function(){return this._required},set_required:function(a){if(this._required==a)return this._required;this._required=a;this.setInvalid(x.SELECTION);this._customTextColumnWidth==null||this.get_textPosition()!=ra.LEFT&&this.get_textPosition()!=ra.RIGHT||Y.dispatch(this,"resize");return this._required},submitOnEnterEnabled:null,_currentRequiredSkin:null,_requiredSkinMeasurements:null,_customTextColumnWidth:null,get_customTextColumnWidth:function(){return this._customTextColumnWidth},set_customTextColumnWidth:function(a){if(this._customTextColumnWidth==
a)return this._customTextColumnWidth;this._customTextColumnWidth=a;this.setInvalid(x.SIZE);return this._customTextColumnWidth},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,getTextMeasuredWidth:function(){var a=this._textMeasuredWidth;this._currentRequiredSkin!=null&&(a+=this.get_gap()+this._currentRequiredSkin.get_width());return a},getTextMeasuredMaxWidth:function(){if(this._explicitWidth!=null){var a=this.getTextMeasuredWidth(),b=this._explicitWidth;this._currentContent!=null&&(b=
w.__implements(this._currentContent,rb)?b-this._currentContent.get_minWidth():b-this._currentContent.get_width(),b-=this.get_gap());b<0&&(b=0);if(a>b)return b}return 1/0},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeFormItemTheme:function(){Aw.initialize()},initialize:function(){fa.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_multiline(!0),this.addChild(this.textField));
this.textField.addEventListener("click",m(this,this.formItem_textField_clickHandler))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(f||d)&&this.refreshBackgroundSkin();(f||b)&&this.refreshRequiredSkin();(f||d)&&this.refreshTextStyles();(a||f||d||c)&&this.refreshText(c);(a||f||b)&&this.refreshSelection();a&&this.refreshContent();(a||d)&&this.refreshEnabled();this.measure();
this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;w.__implements(this._currentBackgroundSkin,rb)&&(h=this._currentBackgroundSkin);
w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();w.__implements(this._currentRequiredSkin,da)&&this._currentRequiredSkin.validateNow();var n=null;w.__implements(this._currentContent,rb)&&(n=this._currentContent);var l=null;w.__implements(this._currentRequiredSkin,rb)&&(l=this._currentRequiredSkin);if(this._currentContent!=null){var q=0,u=0;this.get_textPosition()==ra.TOP||this.get_textPosition()==ra.BOTTOM?u=this._textMeasuredHeight+this.get_gap():this._customTextColumnWidth!=
null?q=this._customTextColumnWidth+this.get_gap():(q=this._textMeasuredWidth+this.get_gap(),this._currentRequiredSkin!=null&&(q+=this._currentRequiredSkin.get_width()+this.get_gap()));if(this.get_horizontalAlign()==Wb.JUSTIFY||this.get_verticalAlign()==hc.JUSTIFY){var v=null,z=null,r=null,F=null,J=null,L=null;this.get_horizontalAlign()==Wb.JUSTIFY&&(v=this.get_explicitWidth()!=null?this.get_explicitWidth()-q-this.get_paddingLeft()-this.get_paddingRight():null,r=this.get_explicitMinWidth()!=null?this.get_explicitMinWidth()-
q-this.get_paddingLeft()-this.get_paddingRight():null,J=this.get_explicitMaxWidth()!=null?this.get_explicitMaxWidth()-q-this.get_paddingLeft()-this.get_paddingRight():null);this.get_verticalAlign()==hc.JUSTIFY&&(z=this.get_explicitHeight()!=null?this.get_explicitHeight()-u-this.get_paddingTop()-this.get_paddingBottom():null,F=this.get_explicitMinHeight()!=null?this.get_explicitMinHeight()-u-this.get_paddingLeft()-this.get_paddingRight():null,L=this.get_explicitMaxHeight()!=null?this.get_explicitMaxHeight()-
u-this.get_paddingLeft()-this.get_paddingRight():null);df.resetFluidlyWithParentValues(this._contentMeasurements,this._currentContent,v,z,r,F,J,L)}else this._contentMeasurements.restore(this._currentContent);q=this._ignoreContentResize;this._ignoreContentResize=!0;w.__implements(this._currentContent,da)&&this._currentContent.validateNow();this._ignoreContentResize=q}q=this.get_explicitWidth();a&&(q=this._textMeasuredWidth,this._customTextColumnWidth==null||this.get_textPosition()!=ra.LEFT&&this.get_textPosition()!=
ra.RIGHT?l!=null?q+=this.get_gap()+l.get_width():this._requiredSkinMeasurements!=null&&this._requiredSkinMeasurements.width!=null&&(q+=this.get_gap()+this._requiredSkinMeasurements.width):q=this._customTextColumnWidth,q+=this.get_paddingLeft()+this.get_paddingRight(),this._currentContent!=null&&(q=this.get_textPosition()==ra.LEFT||this.get_textPosition()==ra.RIGHT?q+(this.get_gap()+this._currentContent.get_width()):Math.max(q,this._currentContent.get_width()+this.get_paddingLeft()+this.get_paddingRight())),
this._currentBackgroundSkin!=null&&(q=Math.max(this._currentBackgroundSkin.get_width(),q)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight,l!=null?a=Math.max(a,l.get_height()):this._requiredSkinMeasurements!=null&&this._requiredSkinMeasurements.height!=null&&(a=Math.max(a,this._requiredSkinMeasurements.height)),this._currentContent!=null&&(a=this.get_textPosition()==ra.LEFT||this.get_textPosition()==ra.RIGHT?Math.max(a,this._currentContent.get_height()):a+(this.get_gap()+this._currentContent.get_height())),
a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this._textMeasuredWidth,this._customTextColumnWidth==null||this.get_textPosition()!=ra.LEFT&&this.get_textPosition()!=ra.RIGHT?l!=null?b+=this.get_gap()+l.get_width():this._requiredSkinMeasurements!=null&&this._requiredSkinMeasurements.width!=null&&(b+=this.get_gap()+this._requiredSkinMeasurements.width):b=this._customTextColumnWidth,
b+=this.get_paddingLeft()+this.get_paddingRight(),this._currentContent!=null&&(this.get_textPosition()==ra.LEFT||this.get_textPosition()==ra.RIGHT?(b=n!=null?b+n.get_minWidth():b+this._currentContent.get_width(),b+=this.get_gap()):b=n!=null?Math.max(b,n.get_minWidth()+this.get_paddingLeft()+this.get_paddingRight()):Math.max(b,this._currentContent.get_width()+this.get_paddingLeft()+this.get_paddingRight())),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=
null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight,l!=null?c=Math.max(c,l.get_height()):this._requiredSkinMeasurements!=null&&this._requiredSkinMeasurements.height!=null&&(c=Math.max(c,this._requiredSkinMeasurements.height)),this._currentContent!=null&&(this.get_textPosition()==ra.LEFT||this.get_textPosition()==ra.RIGHT?c=n!=null?Math.max(c,n.get_minHeight()):Math.max(c,this._currentContent.get_height()):(c=n!=null?c+n.get_minHeight():
c+this._currentContent.get_height(),c+=this.get_gap())),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();
g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(q,a,b,c,d,f)},refreshTextStyles:function(){this.textField.get_wordWrap()!=this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=
!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.formItem_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.formItem_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),
this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this._text!=null&&this._text.length>0,c=this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_text(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),this.get_wordWrap()&&
this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&this.textField.set_wordWrap(this.get_wordWrap()),
b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=this._htmlText},calculateExplicitWidthForTextMeasurement:function(){var a=null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+this.get_paddingRight();if(this.get_content()!=
null&&(this.get_textPosition()==ra.LEFT||this.get_textPosition()==ra.RIGHT)){var b=this._ignoreContentResize;this._ignoreContentResize=!0;w.__implements(this._content,da)&&this._content.validateNow();this._ignoreContentResize=b;a-=this._content.get_width()+this.get_gap()}a<0&&(a=0);return a},refreshSelection:function(){var a=this._selectable&&this._enabled;this.textField.get_selectable()!=a&&this.textField.set_selectable(a)},getCurrentTextFormat:function(){return this.get_styleSheet()!=null?null:
this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},
addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshRequiredSkin:function(){var a=
this._currentRequiredSkin;this._currentRequiredSkin=this.getCurrentRequiredSkin();this._currentRequiredSkin!=a&&(this.removeCurrentRequiredSkin(a),this.addCurrentRequiredSkin(this._currentRequiredSkin))},getCurrentRequiredSkin:function(){return this._required?this.get_requiredSkin():null},addCurrentRequiredSkin:function(a){a==null?this._requiredSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._requiredSkinMeasurements==null?this._requiredSkinMeasurements=new Sb(a):this._requiredSkinMeasurements.save(a),
w.__implements(a,qb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentRequiredSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._requiredSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshContent:function(){var a=this._currentContent;this._currentContent=this._content;this._currentContent!=a&&(a!=null&&(this._contentMeasurements.restore(a),this.removeChild(a)),this._currentContent==null?this._contentMeasurements=null:(w.__implements(this._currentContent,
Fa)&&this._currentContent.initializeNow(),this._contentMeasurements==null?this._contentMeasurements=new Sb(this._currentContent):this._contentMeasurements.save(this._currentContent),this.addChild(this._currentContent)))},refreshEnabled:function(){this._currentContent!=null&&w.__implements(this._currentContent,Fa)&&this._currentContent.set_enabled(this._enabled)},layoutContent:function(){this.layoutBackgroundSkin();w.__implements(this._currentRequiredSkin,da)&&this._currentRequiredSkin.validateNow();
var a=this._ignoreContentResize;this._ignoreContentResize=!0;w.__implements(this._currentContent,da)&&this._currentContent.validateNow();this._ignoreContentResize=a;var b=0;this._currentRequiredSkin!=null&&(b=this.get_gap()+this._currentRequiredSkin.get_width());a=this._textMeasuredWidth;this._customTextColumnWidth==null||this.get_textPosition()!=ra.LEFT&&this.get_textPosition()!=ra.RIGHT||(a=this._customTextColumnWidth-b);var c=this._textMeasuredHeight,d=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();
if(this.get_textPosition()==ra.LEFT||this.get_textPosition()==ra.RIGHT)d-=this.get_gap()+b;d<0&&(d=0);a>d&&(a=d);a<0&&(a=0);var f=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();this.get_textPosition()!=ra.LEFT&&this.get_textPosition()!=ra.RIGHT&&(f-=this.get_gap());f<0&&(f=0);c>f&&(c=f);c<0&&(c=0);switch(this.get_textPosition()._hx_index){case 0:this.textField.set_x(this.get_paddingLeft());this.textField.set_y(this.get_paddingTop());f-=c;break;case 1:this.textField.set_x(this.actualWidth-
a-b-this.get_paddingRight());d-=a;break;case 2:this.textField.set_x(this.get_paddingLeft());this.textField.set_y(this.actualHeight-c-this.get_paddingBottom());f-=c;break;case 3:this.textField.set_x(this.get_paddingLeft());d-=a;break;default:throw new Cb("Unknown text position: "+H.string(this.get_textPosition()));}this.textField.set_width(a);var g=this.get_wordWrap();g&&!this._wrappedOnMeasure&&a>=this._textMeasuredWidth&&(g=!1);this.textField.get_wordWrap()!=g&&this.textField.set_wordWrap(g);this.textField.set_height(c);
if(this._currentContent!=null){g=this.get_paddingLeft();var h=this.get_paddingRight();switch(this.get_textPosition()._hx_index){case 0:h=this.textField.get_y()+c+this.get_gap();break;case 1:break;case 2:break;case 3:g=this.textField.get_x()+a+this.get_gap()+b;break;default:throw new Cb("Unknown text position: "+H.string(this.get_textPosition()));}this._currentContent.get_width()>d&&this._currentContent.set_width(d);this._currentContent.get_height()>f&&this._currentContent.set_height(f);switch(this.get_horizontalAlign()._hx_index){case 0:this._currentContent.set_x(g);
break;case 1:this._currentContent.set_x(g+(d-this._currentContent.get_width())/2);break;case 2:this._currentContent.set_x(g+d-this._currentContent.get_width());break;case 3:this._currentContent.set_x(g),this._currentContent.set_width(d)}switch(this.get_verticalAlign()._hx_index){case 0:this._currentContent.set_y(h);break;case 1:this._currentContent.set_y(h+(f-this._currentContent.get_height())/2);break;case 2:this._currentContent.set_y(h+f-this._currentContent.get_height());break;case 3:this._currentContent.set_y(h),
this._currentContent.set_height(f)}if(this.get_textPosition()==ra.LEFT||this.get_textPosition()==ra.RIGHT)if(w.__implements(this._currentContent,re))b=this.textField.getLineMetrics(0).ascent+2,d=this._currentContent.get_baseline(),f=Math.max(d,b),g=this._currentContent.get_y(),this.textField.set_y(g+(f-b)),this._currentContent!=null&&this._currentContent.set_y(g+(f-d));else switch(this.get_verticalAlign()._hx_index){case 0:this.textField.set_y(this._currentContent.get_y());break;case 1:this.textField.set_y(this._currentContent.get_y()+
(this._currentContent.get_height()-this.textField.get_height())/2);break;case 2:this.textField.set_y(this._currentContent.get_y()+this._currentContent.get_height()-this.textField.get_height());break;case 3:this.textField.set_y(this._currentContent.get_y())}this._currentRequiredSkin!=null&&(this._currentRequiredSkin.set_y(this.textField.get_y()+(c-this._currentRequiredSkin.get_height())/2),this._currentRequiredSkin.set_x(this.textField.get_x()+a+this.get_gap()))}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=
null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},formItem_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},formItem_textField_clickHandler:function(a){this._focusManager!=
null&&(a=null,w.__implements(this._currentContent,qd)&&(a=this._currentContent),this._focusManager.set_focus(a))},formItem_content_resizeHandler:function(a){this._ignoreContentResize||(this._contentMeasurements==null?this._contentMeasurements=new Sb(this._currentContent):this._contentMeasurements.save(this._currentContent),this.setInvalid(x.SIZE))},__requiredSkin:null,get_requiredSkin:function(){return this.__requiredSkin},set_requiredSkin:function(a){if(!this.setStyle("requiredSkin")||this.__requiredSkin==
a)return this.__requiredSkin;this._previousClearStyle=m(this,this.clearStyle_requiredSkin);this.__requiredSkin=a;this.setInvalid(x.STYLES);return this.__requiredSkin},clearStyle_requiredSkin:function(){this.set_requiredSkin(null);return this.get_requiredSkin()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=
a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);
return this.get_styleSheet()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},
__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||
this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);
this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},
clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},
__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==a)return this.__horizontalAlign;
this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);this.__horizontalAlign=a;this.setInvalid(x.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Wb.LEFT);return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);
this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(hc.MIDDLE);return this.get_verticalAlign()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);
return this.get_wordWrap()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,
get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},
__textPosition:null,get_textPosition:function(){return this.__textPosition},set_textPosition:function(a){if(!this.setStyle("textPosition")||this.__textPosition==a)return this.__textPosition;this._previousClearStyle=m(this,this.clearStyle_textPosition);this.__textPosition=a;this.setInvalid(x.STYLES);return this.__textPosition},clearStyle_textPosition:function(){this.set_textPosition(ra.TOP);return this.get_textPosition()},get_styleContext:function(){return Ti},__class__:Ti,__properties__:I(fa.prototype.__properties__,
{set_textPosition:"set_textPosition",get_textPosition:"get_textPosition",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_customTextColumnWidth:"set_customTextColumnWidth",get_customTextColumnWidth:"get_customTextColumnWidth",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",
set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_disabledTextFormat:"set_disabledTextFormat",
get_disabledTextFormat:"get_disabledTextFormat",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_requiredSkin:"set_requiredSkin",get_requiredSkin:"get_requiredSkin",set_required:"set_required",get_required:"get_required",get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",set_selectable:"set_selectable",get_selectable:"get_selectable",set_content:"set_content",get_content:"get_content",
get_baseline:"get_baseline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var pt=function(a,b,c){b==null&&(b=-1);this.sortOrder=Bh.NONE;this.enabled=!0;this.columnIndex=-1;this.column=a;this.columnIndex=b;this.text=c};t["feathers.data.GridViewHeaderState"]=pt;pt.__name__="feathers.data.GridViewHeaderState";pt.prototype={owner:null,column:null,columnIndex:null,text:null,enabled:null,sortOrder:null,__class__:pt};var qt=function(){this.enabled=!0;
this.selected=!1;this.rowIndex=-1};t["feathers.controls._GridView.GridViewRowState"]=qt;qt.__name__="feathers.controls._GridView.GridViewRowState";qt.prototype={owner:null,data:null,rowIndex:null,selected:null,enabled:null,columns:null,cellRendererRecycler:null,customColumnWidths:null,customCellRendererVariant:null,forceItemStateUpdate:null,__class__:qt};var sc=function(a,b,c){this.__dragDropIndicatorSkin=null;this.__extendedScrollBarY=this.__showHeaderDividersOnlyWhenResizable=!1;this.__customHeaderDividerVariant=
this.__columnDividerFactory=this.__customColumnDividerVariant=this.__layout=this.__columnResizeSkin=this.__headerCornerSkin=null;this.__headerDividerFactory=Lc.withClass(Xb);this.__customCellRendererVariant=this.__customHeaderRendererVariant=null;this.edgeAutoScrollDistance=8;this._dragDropLastUpdateTime=-1;this._droppedOnSelf=!1;this._dragRowIndex=-1;this._dragItem=null;this._dragDropLocalX=this._dragDropLocalY=this._dragMinDistance=0;this._dragEnabled=this._dropEnabled=this._removeOnDragDropComplete=
!1;this._dragFormat=sc.DEFAULT_DRAG_FORMAT_ITEMS;this._pendingScrollDuration=null;this._pendingScrollRowIndex=-1;this._ignoreSelectionChange=this._ignoreLayoutChanges=this._ignoreHeaderLayoutChanges=!1;this._selectable=!0;this._tempVisibleIndices=new Ri(0,0);this._visibleIndices=new Ri(0,0);this._virtualCache=[];this._rowLayoutItems=[];this._unrenderedData=[];this.rowStatePool=new dc(function(){return new qt});this.headerStatePool=new dc(function(){return new pt});this.rowRendererToRowState=new Ta;
this.dataToRowRenderer=new Ta;this.activeRowRenderers=[];this.inactiveRowRenderers=[];this.headerRendererToHeaderState=new Ta;this.dataToHeaderRenderer=new Ta;this._sortedColumn=null;this._sortOrder=Bh.NONE;this._sortableColumns=this._resizableColumns=!1;this._cellRendererRecycler=Ne.withClass(Sc);this._virtualLayout=!0;this._selectedItems=[];this._selectedIndices=[];this._selectionAnchorIndex=-1;this._allowMultipleSelection=!1;this._selectedItem=null;this._selectedIndex=-1;this._previousCustomHeaderRendererVariant=
null;this._forceItemStateUpdate=!1;this._autoPopulatedColumns=this._columns=null;this._ignoreDataProviderChanges=!1;this._childFocusEnabled=!0;this._headerScrollRect2=new Ia;this._headerScrollRect1=new Ia;this._columnDividerLayoutItems=[];this._defaultColumnDividerStorage=new mx;this._headerDividerLayoutItems=[];this._defaultHeaderDividerStorage=new nx(Lc.withClass(Xb));this._headerLayoutItems=[];this._unrenderedHeaderData=[];this._defaultHeaderStorage=new ox(Ne.withClass(Zk));this._resizingHeaderTouchPointIsMouse=
!1;this._resizingHeaderTouchPointID=null;this._resizingHeaderIndex=-1;this.initializeGridViewTheme();Ab.call(this);this._rowRendererFactory==null&&this.set_rowRendererFactory(Lc.withClass(eg));this.set_dataProvider(a);this.set_columns(b);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.gridViewPort=new Wk,this.addChild(this.gridViewPort),this.set_viewPort(this.gridViewPort));c!=null&&this.addEventListener("change",c)};t["feathers.controls.GridView"]=sc;sc.__name__="feathers.controls.GridView";
sc.__interfaces__=[ip,bt,ng,qi,lj];sc.defaultUpdateHeaderRenderer=function(a,b){w.__implements(a,re)&&a.set_text(b.text)};sc.defaultResetHeaderRenderer=function(a,b){w.__implements(a,re)&&a.set_text(null)};sc.defaultSortCompareFunction=function(a,b){a=H.string(a).toLowerCase();b=H.string(b).toLowerCase();return a<b?-1:a>b?1:0};sc.__super__=Ab;sc.prototype=I(Ab.prototype,{_headerContainer:null,_headerContainerLayout:null,_headerResizeContainer:null,_columnDividerContainer:null,_resizingHeaderIndex:null,
_resizingHeaderTouchPointID:null,_resizingHeaderTouchPointIsMouse:null,_resizingHeaderStartStageX:null,_customColumnWidths:null,_defaultHeaderStorage:null,_unrenderedHeaderData:null,_headerLayoutItems:null,_defaultHeaderDividerStorage:null,_headerDividerLayoutItems:null,_defaultColumnDividerStorage:null,_columnDividerLayoutItems:null,_currentHeaderScrollRect:null,_headerScrollRect1:null,_headerScrollRect2:null,_oldHeaderDividerMouseCursor:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=
this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},gridViewPort:null,_ignoreDataProviderChanges:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==
a)return this._dataProvider;this._virtualCache.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.gridView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.gridView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.gridView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.gridView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",
m(this,this.gridView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.gridView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.gridView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.gridView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.gridView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",
m(this,this.gridView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length(),this._dataProvider.addEventListener("change",m(this,this.gridView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",m(this,this.gridView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.gridView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",
m(this,this.gridView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.gridView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.gridView_dataProvider_resetHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.gridView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.gridView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("updateItem",
m(this,this.gridView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.gridView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedIndex(-1);this._autoPopulatedColumns!=null&&(this._autoPopulatedColumns=null,this.set_columns(null));this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._dataProvider},_autoPopulatedColumns:null,_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==
a)return this._columns;this._columns!=null&&(this._columns.removeEventListener("change",m(this,this.gridView_columns_changeHandler)),this._columns.removeEventListener("addItem",m(this,this.gridView_columns_addItemHandler)),this._columns.removeEventListener("removeItem",m(this,this.gridView_columns_removeItemHandler)));this._columns=a;this._columns!=null&&(this._columns.addEventListener("change",m(this,this.gridView_columns_changeHandler)),this._columns.addEventListener("addItem",m(this,this.gridView_columns_addItemHandler)),
this._columns.addEventListener("removeItem",m(this,this.gridView_columns_removeItemHandler)));this._customColumnWidths=this._autoPopulatedColumns=null;this.setInvalid(x.DATA);return this._columns},get_rowRendererFactory:function(){return this._rowRendererFactory},set_rowRendererFactory:function(a){if(this._rowRendererFactory==a)return this._rowRendererFactory;this._oldRowRendererFactory=this._rowRendererFactory;this._rowRendererFactory=a;this.setInvalid(sc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);
return this._rowRendererFactory},get_headerRendererRecycler:function(){return this._defaultHeaderStorage.headerRendererRecycler},set_headerRendererRecycler:function(a){if(this._defaultHeaderStorage.headerRendererRecycler==a)return this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.oldHeaderRendererRecycler=this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.headerRendererRecycler=a;this.setInvalid(sc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._defaultHeaderStorage.headerRendererRecycler},
_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_previousCustomHeaderRendererVariant:null,_rowRendererFactory:null,_oldRowRendererFactory:null,_rowRendererMeasurements:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._selectable&&
this._dataProvider!=null||(a=-1);if(this._selectedIndex==a&&this._selectedIndices.length<=1)return this._selectedIndex;if(a==-1)return this._selectedIndex=this._selectionAnchorIndex=-1,this._selectedItem=null,this._selectedIndices.length=0,this._selectedItems.length=0,this.setInvalid(x.SELECTION),Y.dispatch(this,"change"),this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._dataProvider.get(this._selectedIndex);this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;
this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;
var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b&&this._selectedIndices.length==1)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedItem},
_allowMultipleSelection:null,get_allowMultipleSelection:function(){return this._allowMultipleSelection},set_allowMultipleSelection:function(a){if(this._allowMultipleSelection==a)return this._allowMultipleSelection;this._allowMultipleSelection=a;this.setInvalid(x.SELECTION);return this._allowMultipleSelection},_selectionAnchorIndex:null,_selectedIndices:null,get_selectedIndices:function(){return this._selectedIndices},set_selectedIndices:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==
null)return this.set_selectedIndex(-1),this._selectedIndices;if(this._selectedIndices==a)return this._selectedIndices;!this._allowMultipleSelection&&a.length>1&&(a.length=1);this._selectedIndices=a;this._selectedIndex=this._selectedIndices[0];this._selectedItems.length=this._selectedIndices.length;a=0;for(var b=this._selectedIndices.length;a<b;){var c=a++;this._selectedItems[c]=this._dataProvider.get(this._selectedIndices[c])}this._selectedItem=this._selectedItems[0];this._selectionAnchorIndex=this._selectedIndex;
this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndices},_selectedItems:null,get_selectedItems:function(){return this._selectedItems},set_selectedItems:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItems;if(this._selectedItems==a)return this._selectedItems;!this._allowMultipleSelection&&a.length>1&&(a.length=1);for(var b=[],c=0;c<a.length;){var d=this._dataProvider.indexOf(a[c]);d==-1?a.splice(c,
1):(b.push(d),++c)}this._selectedIndices=b;this._selectedItems=a;a.length==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._selectedItems[0]);this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndices},_previousLayout:null,_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;
this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},_cellRendererRecycler:null,get_cellRendererRecycler:function(){return this._cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._cellRendererRecycler==a)return this._cellRendererRecycler;this._cellRendererRecycler=a;this.setInvalid(x.DATA);return this._cellRendererRecycler},_sortableColumns:null,get_sortableColumns:function(){return this._sortableColumns},set_sortableColumns:function(a){return this._sortableColumns==
a?this._sortableColumns:this._sortableColumns=a},_resizableColumns:null,get_resizableColumns:function(){return this._resizableColumns},set_resizableColumns:function(a){if(this._resizableColumns==a)return this._resizableColumns;this._resizableColumns=a;this.setInvalid(x.LAYOUT);return this._resizableColumns},_currentColumnResizeSkin:null,_currentHeaderCornerSkin:null,_sortOrder:null,get_sortOrder:function(){return this._sortOrder},set_sortOrder:function(a){this._sortedColumn==null&&(a=Bh.NONE);if(this._sortOrder==
a)return this._sortOrder;this._sortOrder=a;this.setInvalid(x.SORT);return this._sortOrder},_sortedColumn:null,get_sortedColumn:function(){return this._sortedColumn},set_sortedColumn:function(a){if(this._sortedColumn==a)return this._sortedColumn;if(this._columns.indexOf(a)==-1)return this._sortedColumn=null,this._sortOrder=Bh.NONE,this._sortedColumn;this._sortedColumn=a;this._sortedColumn!=null?this.set_sortOrder(this._sortedColumn.defaultSortOrder):this._sortOrder=Bh.NONE;this.setInvalid(x.SORT);
return this._sortedColumn},dataToHeaderRenderer:null,headerRendererToHeaderState:null,inactiveRowRenderers:null,activeRowRenderers:null,dataToRowRenderer:null,rowRendererToRowState:null,headerStatePool:null,rowStatePool:null,_unrenderedData:null,_rowLayoutItems:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this.set_selectedIndex(-1);
return this._selectable},_ignoreSelectionChange:null,_ignoreLayoutChanges:null,_ignoreHeaderLayoutChanges:null,_pendingScrollRowIndex:null,_pendingScrollDuration:null,_dragDropIndicatorSkinMeasurements:null,_dragFormat:null,get_dragFormat:function(){return this._dragFormat},set_dragFormat:function(a){a==null&&(a=sc.DEFAULT_DRAG_FORMAT_ITEMS);return this._dragFormat==a?this._dragFormat:this._dragFormat=a},_dragEnabled:null,get_dragEnabled:function(){return this._dragEnabled},set_dragEnabled:function(a){if(this._dragEnabled==
a)return this._dragEnabled;this._dragEnabled&&this.removeEventListener("dragComplete",m(this,this.gridView_dragCompleteHandler));(this._dragEnabled=a)&&this.addEventListener("dragComplete",m(this,this.gridView_dragCompleteHandler));return this._dragEnabled},_dropEnabled:null,get_dropEnabled:function(){return this._dropEnabled},set_dropEnabled:function(a){if(this._dropEnabled==a)return this._dropEnabled;this._dropEnabled&&(this.removeEventListener("dragEnter",m(this,this.gridView_dragEnterHandler)),
this.removeEventListener("dragExit",m(this,this.gridView_dragExitHandler)),this.removeEventListener("dragMove",m(this,this.gridView_dragMoveHandler)),this.removeEventListener("dragDrop",m(this,this.gridView_dragDropHandler)));if(this._dropEnabled=a)this.addEventListener("dragEnter",m(this,this.gridView_dragEnterHandler)),this.addEventListener("dragExit",m(this,this.gridView_dragExitHandler)),this.addEventListener("dragMove",m(this,this.gridView_dragMoveHandler)),this.addEventListener("dragDrop",m(this,
this.gridView_dragDropHandler));return this._dropEnabled},_removeOnDragDropComplete:null,get_removeOnDragDropComplete:function(){return this._removeOnDragDropComplete},set_removeOnDragDropComplete:function(a){return this._removeOnDragDropComplete=a},_dragDropLocalX:null,_dragDropLocalY:null,_dragMinDistance:null,_dragItem:null,_dragRowIndex:null,_dragRowRenderer:null,_droppedOnSelf:null,_dragDropLastUpdateTime:null,edgeAutoScrollDistance:null,scrollToRowIndex:function(a,b){this._dataProvider!=null&&
this._dataProvider.get_length()!=0&&(this._pendingScrollRowIndex=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemAndColumnToCellRenderer:function(a,b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];return a==null?null:a.columnToCellRenderer(b)},columnToHeaderRenderer:function(a){return this.dataToHeaderRenderer.h[a.__id__]},headerRendererToColumn:function(a){a=this.headerRendererToHeaderState.h[a.__id__];return a==null?null:a.column},itemAndColumnToCellState:function(a,
b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];return a==null?null:a.columnToCellState(b)},dispose:function(){this.refreshInactiveHeaderRenderers(!0);this.refreshInactiveRowRenderers(!0);this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);this.set_columns(null);Ab.prototype.dispose.call(this)},initializeGridViewTheme:function(){Bw.initialize()},initialize:function(){Ab.prototype.initialize.call(this);this._headerContainerLayout==null&&(this._headerContainerLayout=
new Ml,this._headerContainerLayout.set_heightResetEnabled(!1));this._headerContainer==null&&(this._headerContainer=new pb,this._headerContainer.set_layout(this._headerContainerLayout),this.addChild(this._headerContainer));this._headerResizeContainer==null&&(this._headerResizeContainer=new Da,this.addChild(this._headerResizeContainer));this._columnDividerContainer==null&&(this._columnDividerContainer=new Da,this._columnDividerContainer.mouseEnabled=!1,this._columnDividerContainer.mouseChildren=!1,
this.addChild(this._columnDividerContainer))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.SORT),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&this.setInvalidationFlag(sc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);var g=this.isInvalid(sc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this._defaultHeaderDividerStorage.headerDividerFactory!=this.get_headerDividerFactory()&&
(this._defaultHeaderDividerStorage.oldHeaderDividerFactory=this._defaultHeaderDividerStorage.headerDividerFactory,this._defaultHeaderDividerStorage.headerDividerFactory=this.get_headerDividerFactory(),this.setInvalidationFlag(sc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));this._defaultHeaderDividerStorage.customHeaderDividerVariant!=this.get_customHeaderDividerVariant()&&(this._defaultHeaderDividerStorage.customHeaderDividerVariant=this.get_customHeaderDividerVariant(),this.setInvalidationFlag(sc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));
var h=this.isInvalid(sc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this._defaultColumnDividerStorage.columnDividerFactory!=this.get_columnDividerFactory()&&(this._defaultColumnDividerStorage.oldColumnDividerFactory=this._defaultColumnDividerStorage.columnDividerFactory,this._defaultColumnDividerStorage.columnDividerFactory=this.get_columnDividerFactory(),this.setInvalidationFlag(sc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));this._defaultColumnDividerStorage.customColumnDividerVariant!=this.get_customColumnDividerVariant()&&
(this._defaultColumnDividerStorage.customColumnDividerVariant=this.get_customColumnDividerVariant(),this.setInvalidationFlag(sc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));var n=this.isInvalid(sc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.validateColumns();(a||c)&&this.refreshSortedColumn(c);f&&this.refreshHeaderCornerSkin();(f||b)&&this.refreshColumnResizeSkin();(g||d||a||c)&&this.refreshHeaderRenderers();(h||d||a||c)&&this.refreshHeaderDividers();(n||d||a||c)&&this.refreshColumnDividers();b&&
(this._headerResizeContainer.mouseEnabled=this._resizableColumns,this._headerResizeContainer.mouseChildren=this._resizableColumns);if(a||b)a=this._ignoreHeaderLayoutChanges,this._ignoreHeaderLayoutChanges=!0,this._headerContainerLayout.set_customColumnWidths(this._customColumnWidths),this._ignoreHeaderLayoutChanges=a;if(b||f)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length())),this.gridViewPort.set_layout(this.get_layout()),
this._previousLayout=this.get_layout();this.gridViewPort.refreshChildren=m(this,this.refreshRowRenderers);for(b=this._invalidationFlags.keys();b.hasNext();)f=b.next(),this.gridViewPort.setInvalid(f);this._allInvalid&&this.gridViewPort.setInvalid();Ab.prototype.update.call(this);this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();this.validateCustomColumnWidths();this.layoutHeaders();this.layoutHeaderDividers();this.layoutColumnDividers();this.handlePendingScroll()},createScroller:function(){Ab.prototype.createScroller.call(this);
this.gridViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Ab.prototype.refreshScrollerValues.call(this);if(w.__implements(this.get_layout(),ff)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=
!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.gridViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.gridViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&w.__implements(this.get_layout(),Vh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=
d;c.getVisibleIndices(this._rowLayoutItems.length,this.gridViewPort.get_visibleWidth(),this.gridViewPort.get_visibleHeight(),this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._rowLayoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:!0},calculateViewPortOffsets:function(a,b){var c=this.topViewPortOffset,d=this.rightViewPortOffset,f=this.bottomViewPortOffset,g=this.leftViewPortOffset;this.get_fixedScrollBars()&&
this.get_showScrollBars()&&Ab.prototype.calculateViewPortOffsets.call(this,a,b);if(this._headerContainer!=null){var h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=h;
this.topViewPortOffset=c;this.rightViewPortOffset=d;this.bottomViewPortOffset=f;this.leftViewPortOffset=g;this._headerContainer.validateNow();this.topViewPortOffset+=this._headerContainer.get_height();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this._headerContainer.get_width());this.chromeMeasuredMinWidth=Math.max(this.chromeMeasuredMinWidth,this._headerContainer.get_width());Ab.prototype.calculateViewPortOffsets.call(this,a,b);h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=
!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=h}},validateColumns:function(){var a=this;if(this._columns==null){var b=null;if(this._dataProvider!=null&&this._dataProvider.get_length()>0){var c=this._dataProvider.get(0);c=y.fields(c);
for(var d=Array(c.length),f=0,g=c.length;f<g;){var h=f++,n=[c[h]];d[h]=new zm(n[0],function(l){return function(q){return H.string(y.getProperty(q,l[0]))}}(n))}b=new dg(d)}else b=new dg;this.runWithInvalidationFlagsOnly(function(){a.set_columns(b)});this._autoPopulatedColumns=b}},layoutHeaders:function(){if(this._headerContainer!=null){this._headerContainer.set_x(this.get_paddingLeft());this._headerContainer.set_y(this.get_paddingTop());var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();
this._headerContainer.set_width(Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a));this._headerContainer.validateNow();if(We.fuzzyEquals(this.get_maxScrollX(),this.get_minScrollX()))this._headerContainer.set_scrollRect(null);else{var b=this._scrollRect1;this._currentScrollRect==b&&(b=this._scrollRect2);this._currentScrollRect=b;a<0&&(a=0);var c=this._headerContainer.get_height();c<0&&(c=0);b.setTo(this.get_scrollX()-
this.get_minScrollX(),0,a,c);this._headerContainer.set_scrollRect(b)}this._currentHeaderCornerSkin!=null&&(this.get_fixedScrollBars()&&!this.get_extendedScrollBarY()&&this.scrollBarY!=null&&this.scrollBarY.get_visible()?(this._currentHeaderCornerSkin.set_x(this.scrollBarY.get_x()),this._currentHeaderCornerSkin.set_width(this.scrollBarY.get_width()),this._currentHeaderCornerSkin.set_y(this._headerContainer.get_y()),this._currentHeaderCornerSkin.set_height(this._headerContainer.get_height()),this._currentHeaderCornerSkin.set_visible(!0)):
this._currentHeaderCornerSkin.set_visible(!1))}},layoutHeaderDividers:function(){this._headerResizeContainer.set_x(this._headerContainer.get_x());this._headerResizeContainer.set_y(this._headerContainer.get_y());for(var a=0,b=this._headerDividerLayoutItems.length;a<b;){var c=a++,d=this._headerDividerLayoutItems[c];d.set_visible(!this.get_showHeaderDividersOnlyWhenResizable()||this.get_resizableColumns());w.__implements(d,da)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-
d.get_width()/2);d.set_y(c.get_y());d.set_height(c.get_height())}},layoutColumnDividers:function(){this._columnDividerContainer.set_x(this._viewPort.get_x());this._columnDividerContainer.set_y(this._viewPort.get_y());for(var a=0,b=this._columnDividerLayoutItems.length;a<b;){var c=a++,d=this._columnDividerLayoutItems[c];w.__implements(d,da)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-d.get_width()/2);d.set_y(c.get_y());d.set_height(this._viewPort.get_visibleHeight())}},
layoutScrollBars:function(){if(this.get_extendedScrollBarY()){var a=this.topViewPortOffset;this.topViewPortOffset=0;Ab.prototype.layoutScrollBars.call(this);this.topViewPortOffset=a}else Ab.prototype.layoutScrollBars.call(this)},refreshHeaderCornerSkin:function(){var a=this._currentHeaderCornerSkin;this._currentHeaderCornerSkin=this.getCurrentHeaderCornerSkin();this._currentHeaderCornerSkin!=a&&(this.removeCurrentHeaderCornerSkin(a),this.addCurrentHeaderCornerSkin(this._currentHeaderCornerSkin))},
getCurrentHeaderCornerSkin:function(){return this.get_headerCornerSkin()},addCurrentHeaderCornerSkin:function(a){a!=null&&(w.__implements(a,Fa)&&a.initializeNow(),w.__implements(a,qb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentHeaderCornerSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshColumnResizeSkin:function(){var a=this._currentColumnResizeSkin;this._currentColumnResizeSkin=this.getCurrentColumnResizeSkin();this._currentColumnResizeSkin!=
a&&(this.removeCurrentColumnResizeSkin(a),this._currentColumnResizeSkin!=null&&(w.__implements(this._currentColumnResizeSkin,Fa)&&this._currentColumnResizeSkin.initializeNow(),w.__implements(this._currentColumnResizeSkin,qb)&&this._currentColumnResizeSkin.set_uiContext(this),this._currentColumnResizeSkin.set_visible(!1),this._currentColumnResizeSkin instanceof Ja&&(this._currentColumnResizeSkin.mouseEnabled=!1),this._currentColumnResizeSkin instanceof zb&&(this._currentColumnResizeSkin.mouseChildren=
!1),this.addChildAt(this._currentColumnResizeSkin,0)))},getCurrentColumnResizeSkin:function(){return this.get_columnResizeSkin()},removeCurrentColumnResizeSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshHeaderRenderers:function(){var a=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this._headerContainerLayout.set_columns(this._columns);this._ignoreHeaderLayoutChanges=a;this._defaultHeaderStorage.headerRendererRecycler.update==
null&&(this._defaultHeaderStorage.headerRendererRecycler.update=sc.defaultUpdateHeaderRenderer,this._defaultHeaderStorage.headerRendererRecycler.reset==null&&(this._defaultHeaderStorage.headerRendererRecycler.reset=sc.defaultResetHeaderRenderer));a=this.isInvalid(sc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveHeaderRenderers(a);this.findUnrenderedHeaderData();this.recoverInactiveHeaderRenderers();this.renderUnrenderedHeaderData();this.freeInactiveHeaderRenderers();if(this._defaultHeaderStorage.inactiveHeaderRenderers.length>
0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive header renderers should be empty after updating.");},refreshHeaderDividers:function(){var a=this.isInvalid(sc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this.refreshInactiveHeaderDividers(a);this.refreshActiveHeaderDividers();this.freeInactiveHeaderDividers();if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive header dividers should be empty after updating.");},refreshColumnDividers:function(){var a=
this.isInvalid(sc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.refreshInactiveColumnDividers(a);this.refreshActiveColumnDividers();this.freeInactiveColumnDividers();if(this._defaultColumnDividerStorage.inactiveColumnDividers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive column dividers should be empty after updating.");},refreshInactiveHeaderDividers:function(a){var b=this._defaultHeaderDividerStorage.inactiveHeaderDividers;this._defaultHeaderDividerStorage.inactiveHeaderDividers=
this._defaultHeaderDividerStorage.activeHeaderDividers;this._defaultHeaderDividerStorage.activeHeaderDividers=b;if(this._defaultHeaderDividerStorage.activeHeaderDividers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active header dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),this._defaultHeaderDividerStorage.oldHeaderDividerFactory=null)},freeInactiveHeaderDividers:function(){for(var a=this._defaultHeaderDividerStorage.oldHeaderDividerFactory!=null?
this._defaultHeaderDividerStorage.oldHeaderDividerFactory:this._defaultHeaderDividerStorage.headerDividerFactory,b=0,c=this._defaultHeaderDividerStorage.inactiveHeaderDividers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderDivider(d,a)}this._defaultHeaderDividerStorage.inactiveHeaderDividers.length=0},refreshActiveHeaderDividers:function(){this._headerDividerLayoutItems.length=0;if(this._defaultHeaderDividerStorage.headerDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=
a++,d=this._columns.get(c);d=this.createHeaderDivider(d,c);this._headerDividerLayoutItems[c]=d;this._defaultHeaderDividerStorage.activeHeaderDividers.push(d)}},createHeaderDivider:function(a,b){if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length==0){a=this._defaultHeaderDividerStorage.headerDividerFactory.create();if(w.__implements(a,nd)){var c=a;if(c.get_variant()==null){var d=this.get_customHeaderDividerVariant()!=null?this.get_customHeaderDividerVariant():sc.CHILD_VARIANT_HEADER_DIVIDER;
c.set_variant(d)}}w.__implements(a,Fa)&&a.initializeNow();a.addEventListener("rollOver",m(this,this.gridView_headerDivider_rollOverHandler));a.addEventListener("rollOut",m(this,this.gridView_headerDivider_rollOutHandler));a.addEventListener("mouseDown",m(this,this.gridView_headerDivider_mouseDownHandler));a.addEventListener("touchBegin",m(this,this.gridView_headerDivider_touchBeginHandler));this._headerResizeContainer.addChildAt(a,b)}else a=this._defaultHeaderDividerStorage.inactiveHeaderDividers.shift(),
this._headerResizeContainer.setChildIndex(a,b);return a},destroyHeaderDivider:function(a,b){a.removeEventListener("rollOver",m(this,this.gridView_headerDivider_rollOverHandler));a.removeEventListener("rollOut",m(this,this.gridView_headerDivider_rollOutHandler));a.removeEventListener("mouseDown",m(this,this.gridView_headerDivider_mouseDownHandler));a.removeEventListener("touchBegin",m(this,this.gridView_headerDivider_touchBeginHandler));this._headerResizeContainer.removeChild(a);b!=null&&b.destroy!=
null&&b.destroy(a)},refreshInactiveColumnDividers:function(a){var b=this._defaultColumnDividerStorage.inactiveColumnDividers;this._defaultColumnDividerStorage.inactiveColumnDividers=this._defaultColumnDividerStorage.activeColumnDividers;this._defaultColumnDividerStorage.activeColumnDividers=b;if(this._defaultColumnDividerStorage.activeColumnDividers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active column dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),
this._defaultColumnDividerStorage.oldColumnDividerFactory=null)},freeInactiveColumnDividers:function(){for(var a=this._defaultColumnDividerStorage.oldColumnDividerFactory!=null?this._defaultColumnDividerStorage.oldColumnDividerFactory:this._defaultColumnDividerStorage.columnDividerFactory,b=0,c=this._defaultColumnDividerStorage.inactiveColumnDividers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyColumnDivider(d,a)}this._defaultColumnDividerStorage.inactiveColumnDividers.length=0},refreshActiveColumnDividers:function(){this._columnDividerLayoutItems.length=
0;if(this._defaultColumnDividerStorage.columnDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=a++,d=this._columns.get(c);d=this.createColumnDivider(d,c);this._columnDividerLayoutItems[c]=d;this._defaultColumnDividerStorage.activeColumnDividers.push(d)}},createColumnDivider:function(a,b){if(this._defaultColumnDividerStorage.inactiveColumnDividers.length==0){a=this._defaultColumnDividerStorage.columnDividerFactory.create();if(w.__implements(a,nd)){var c=a;if(c.get_variant()==
null){var d=this.get_customColumnDividerVariant()!=null?this.get_customColumnDividerVariant():sc.CHILD_VARIANT_COLUMN_DIVIDER;c.set_variant(d)}}w.__implements(a,Fa)&&a.initializeNow();this._columnDividerContainer.addChildAt(a,b)}else a=this._defaultColumnDividerStorage.inactiveColumnDividers.shift(),this._columnDividerContainer.setChildIndex(a,b);return a},destroyColumnDivider:function(a,b){this._columnDividerContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},refreshInactiveHeaderRenderers:function(a){var b=
this._defaultHeaderStorage.inactiveHeaderRenderers;this._defaultHeaderStorage.inactiveHeaderRenderers=this._defaultHeaderStorage.activeHeaderRenderers;this._defaultHeaderStorage.activeHeaderRenderers=b;if(this._defaultHeaderStorage.activeHeaderRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active header renderers should be empty before updating.");a&&(this.recoverInactiveHeaderRenderers(),this.freeInactiveHeaderRenderers(),this._defaultHeaderStorage.oldHeaderRendererRecycler=
null)},recoverInactiveHeaderRenderers:function(){for(var a=0,b=this._defaultHeaderStorage.inactiveHeaderRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.headerRendererToHeaderState.h[c.__id__];if(d!=null){var f=d.column;this.headerRendererToHeaderState.remove(c);this.dataToHeaderRenderer.remove(f);c.removeEventListener("trigger",m(this,this.gridView_headerRenderer_triggerHandler));c.removeEventListener("click",m(this,this.gridView_headerRenderer_clickHandler));c.removeEventListener("touchTap",
m(this,this.gridView_headerRenderer_touchTapHandler));c.removeEventListener("resize",m(this,this.gridView_headerRenderer_resizeHandler));this.resetHeaderRenderer(c,d);this._defaultHeaderStorage.measurements!=null&&this._defaultHeaderStorage.measurements.restore(c);this.headerStatePool.release(d)}}}},freeInactiveHeaderRenderers:function(){for(var a=this._defaultHeaderStorage.oldHeaderRendererRecycler!=null?this._defaultHeaderStorage.oldHeaderRendererRecycler:this._defaultHeaderStorage.headerRendererRecycler,
b=0,c=this._defaultHeaderStorage.inactiveHeaderRenderers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderRenderer(d,a)}this._defaultHeaderStorage.inactiveHeaderRenderers.length=0},findUnrenderedHeaderData:function(){this._rowLayoutItems.length=0;if(this._columns!=null&&this._columns.get_length()!=0){this._rowLayoutItems.length=this._columns.get_length();for(var a=0,b=this._columns.get_length();a<b;){var c=a++,d=this._columns.get(c),f=this.dataToHeaderRenderer.h[d.__id__];if(f!=null){var g=
this.headerRendererToHeaderState.h[f.__id__];this.populateCurrentHeaderState(d,c,g,this._forceItemStateUpdate)&&this.updateHeaderRenderer(f,g);f.set_visible(!0);this._headerLayoutItems[c]=f;if(!V.remove(this._defaultHeaderStorage.inactiveHeaderRenderers,f))throw a=w.getClass(this),new ob(""+a.__name__+": header renderer map contains bad data for column at index "+c+". This may be caused by duplicate columns, which is not allowed.");this._defaultHeaderStorage.activeHeaderRenderers.push(f)}else this._unrenderedHeaderData.push(d)}}},
renderUnrenderedHeaderData:function(){for(var a=0,b=this._unrenderedHeaderData;a<b.length;){var c=b[a];++a;var d=this._columns.indexOf(c),f=this.headerStatePool.get();this.populateCurrentHeaderState(c,d,f,!0);c=this.createHeaderRenderer(f);c.set_visible(!0);this._headerContainer.addChildAt(c,d);this._headerLayoutItems[d]=c}this._unrenderedHeaderData.length=0},refreshRowRenderers:function(a){this._rowLayoutItems=a;a=this.gridViewPort.isInvalid(sc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);this.refreshInactiveRowRenderers(a);
this.findUnrenderedData();this.recoverInactiveRowRenderers();this.renderUnrenderedData();this.freeInactiveRowRenderers();if(this.inactiveRowRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive row renderers should be empty after updating.");},refreshInactiveRowRenderers:function(a){var b=this.inactiveRowRenderers;this.inactiveRowRenderers=this.activeRowRenderers;this.activeRowRenderers=b;if(this.activeRowRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active row renderers should be empty before updating.");
a&&(this.recoverInactiveRowRenderers(),this.freeInactiveRowRenderers(),this._oldRowRendererFactory=null)},recoverInactiveRowRenderers:function(){for(var a=0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.rowRendererToRowState.h[c.__id__];if(d!=null){var f=d.data;this.rowRendererToRowState.remove(c);this.dataToRowRenderer.remove(f);c.removeEventListener("cellTrigger",m(this,this.gridView_rowRenderer_cellTriggerHandler));c.removeEventListener("trigger",m(this,this.gridView_rowRenderer_triggerHandler));
c.removeEventListener("mouseDown",m(this,this.gridView_rowRenderer_mouseDownHandler));this.resetRowRenderer(c,d);this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(c);this.rowStatePool.release(d)}}}},freeInactiveRowRenderers:function(){for(var a=0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;c!=null&&this.destroyRowRenderer(c)}this.inactiveRowRenderers.length=0},findUnrenderedData:function(){this._rowLayoutItems.length=0;this._visibleIndices.start=0;this._visibleIndices.end=
0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){this._rowLayoutItems.length=this._dataProvider.get_length();if(this._virtualLayout&&w.__implements(this.get_layout(),Vh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._dataProvider.get_length(),this.gridViewPort.get_visibleWidth(),
this.gridViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,a=this._dataProvider.get_length(),this._visibleIndices.end=a-1;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){b=this._visibleIndices.start;for(var c=this._visibleIndices.end+1;b<c;){a=b++;var d=this._dataProvider.get(a),f=this.dataToRowRenderer.h[d.__id__];if(f!=null){var g=this.rowRendererToRowState.h[f.__id__];this.populateCurrentRowState(d,a,g,this._forceItemStateUpdate)&&this.updateRowRenderer(f,
g);this._rowLayoutItems[a]=f;if(!V.remove(this.inactiveRowRenderers,f))throw b=w.getClass(this),new ob(""+b.__name__+": row renderer map contains bad data for item at index "+a+". This may be caused by duplicate items in the data provider, which is not allowed.");this.activeRowRenderers.push(f)}else this._unrenderedData.push(d)}}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._dataProvider.indexOf(c),f=this.rowStatePool.get();this.populateCurrentRowState(c,
d,f,!0);c=this.createRowRenderer(f);c.set_visible(!0);this.activeRowRenderers.push(c);this.gridViewPort.addChild(c);this._rowLayoutItems[d]=c}this._unrenderedData.length=0},createRowRenderer:function(a){if(this.inactiveRowRenderers.length==0){var b=this._rowRendererFactory.create();this._rowRendererMeasurements==null&&(this._rowRendererMeasurements=new Sb(b));b.initializeNow()}else b=this.inactiveRowRenderers.shift();this.updateRowRenderer(b,a);b.set_gridView(this);b.addEventListener("cellTrigger",
m(this,this.gridView_rowRenderer_cellTriggerHandler));b.addEventListener("trigger",m(this,this.gridView_rowRenderer_triggerHandler));b.addEventListener("mouseDown",m(this,this.gridView_rowRenderer_mouseDownHandler));this.rowRendererToRowState.set(b,a);this.dataToRowRenderer.set(a.data,b);return b},destroyRowRenderer:function(a){var b=this._oldRowRendererFactory!=null?this._oldRowRendererFactory:this._rowRendererFactory;a.set_gridView(null);this.gridViewPort.removeChild(a);b.destroy!=null&&b.destroy(a)},
updateRowRenderer:function(a,b){this.refreshRowRendererProperties(a,b)},resetRowRenderer:function(a,b){this.refreshRowRendererProperties(a,sc.RESET_ROW_STATE)},populateCurrentRowState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.rowIndex!=b)c.rowIndex=b,f=!0;a=this._selectedIndices.indexOf(b)!=-1;if(d||c.selected!=a)c.selected=a,f=!0;a=this._enabled;if(d||c.enabled!=a)c.enabled=a,f=!0;a=this._columns;if(d||c.columns!=a)c.columns=a,f=!0;a=this._cellRendererRecycler;
if(d||c.cellRendererRecycler!=a)c.cellRendererRecycler=a,f=!0;a=this._customColumnWidths;if(d||c.customColumnWidths!=a)c.customColumnWidths=a,f=!0;a=this.get_customCellRendererVariant();if(d||c.customCellRendererVariant!=a)c.customCellRendererVariant=a,f=!0;a=this._forceItemStateUpdate;if(d||c.forceItemStateUpdate!=a)c.forceItemStateUpdate=a,f=!0;return f},refreshRowRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;a.set_data(b.data);a.set_rowIndex(b.rowIndex);
a.set_selected(b.selected);a.set_enabled(b.enabled);a.set_columns(b.columns);a.set_cellRendererRecycler(b.cellRendererRecycler);a.set_customColumnWidths(b.customColumnWidths);a.set_customCellRendererVariant(b.customCellRendererVariant);a.set_forceCellStateUpdate(b.forceItemStateUpdate);this._ignoreSelectionChange=c},createHeaderRenderer:function(a){if(this._defaultHeaderStorage.inactiveHeaderRenderers.length==0){var b=this._defaultHeaderStorage.headerRendererRecycler.create();if(w.__implements(b,
nd)){var c=b;if(c.get_variant()==null){var d=this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():sc.CHILD_VARIANT_HEADER_RENDERER;c.set_variant(d)}}w.__implements(b,Fa)&&b.initializeNow();this._defaultHeaderStorage.measurements==null&&(this._defaultHeaderStorage.measurements=new Sb(b))}else b=this._defaultHeaderStorage.inactiveHeaderRenderers.shift();this.updateHeaderRenderer(b,a);w.__implements(b,Qh)?b.addEventListener("trigger",m(this,this.gridView_headerRenderer_triggerHandler)):
(b.addEventListener("click",m(this,this.gridView_headerRenderer_clickHandler)),b.addEventListener("touchTap",m(this,this.gridView_headerRenderer_touchTapHandler)));w.__implements(b,rb)&&b.addEventListener("resize",m(this,this.gridView_headerRenderer_resizeHandler));this.headerRendererToHeaderState.set(b,a);this.dataToHeaderRenderer.set(a.column,b);this._defaultHeaderStorage.activeHeaderRenderers.push(b);return b},destroyHeaderRenderer:function(a,b){this._headerContainer.removeChild(a);b!=null&&b.destroy!=
null&&b.destroy(a)},populateCurrentHeaderState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.columnIndex!=b)c.columnIndex=b,f=!0;b=a.headerText;if(d||c.text!=b)c.text=b,f=!0;b=this._enabled;if(d||c.enabled!=b)c.enabled=b,f=!0;a=a==this._sortedColumn?this._sortOrder:Bh.NONE;if(d||c.sortOrder!=a)c.sortOrder=a,f=!0;return f},updateHeaderRenderer:function(a,b){this._defaultHeaderStorage.headerRendererRecycler.update!=null&&this._defaultHeaderStorage.headerRendererRecycler.update(a,
b);this.refreshHeaderRendererProperties(a,b)},resetHeaderRenderer:function(a,b){var c=this._defaultHeaderStorage.oldHeaderRendererRecycler!=null?this._defaultHeaderStorage.oldHeaderRendererRecycler:this._defaultHeaderStorage.headerRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this.refreshHeaderRendererProperties(a,sc.RESET_HEADER_STATE)},refreshHeaderRendererProperties:function(a,b){w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,pp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),
a.set_gridViewOwner(b.owner));w.__implements(a,qp)&&a.set_sortOrder(b.sortOrder);w.__implements(a,ri)&&a.set_layoutIndex(b.columnIndex)},refreshSelectedIndicesAfterFilterOrSort:function(){this._selectedIndex!=-1&&this.set_selectedIndex(this._dataProvider.indexOf(this._selectedItem))},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;if(w.__implements(this.get_layout(),Oj)){if(a.keyCode!=38&&a.keyCode!=
40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;b=this.get_layout().findNextKeyboardIndex(b,a,!1,this._rowLayoutItems,null,this.gridViewPort.get_visibleWidth(),this.gridViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&
(b=this._dataProvider.get_length()-1);var c=this._selectedIndex!=b;if(!c&&b!=-1){var d=this.dataToRowRenderer,f=this._dataProvider.get(b);d.h[f.__id__]==null?c=!0:w.__implements(this.get_layout(),ff)&&(d=this.get_layout().getNearestScrollPositionForIndex(b,this._dataProvider.get_length(),this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),this.get_scrollX()!=d.x||this.get_scrollY()!=d.y)&&(c=!0)}c&&(a.preventDefault(),this.set_selectedIndex(b),this._selectedIndex!=-1&&
this.scrollToRowIndex(this._selectedIndex),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},handleSelectionChange:function(a,b,c,d){if(b!=-1&&this._selectable){var f=this._selectedItems.indexOf(a);if(this._allowMultipleSelection&&(c||d))if(d){a=this._selectionAnchorIndex;a==-1&&(a=0);f=[];if(b==a)f.unshift(a);else{c=a;do f.unshift(c),c+=a>b?-1:1;while(c!=b);b!=a&&f.unshift(b)}this.set_selectedIndices(f);this._selectionAnchorIndex=a}else f==
-1?(c=this._selectedItems.slice(),c.unshift(a)):(c=this._selectedItems.slice(),c.splice(f,1)),this.set_selectedItems(c),this._selectionAnchorIndex=b;else this.set_selectedItem(a);b!=-1&&this.scrollToRowIndex(b)}else this.set_selectedItem(null)},handlePendingScroll:function(){if(this._pendingScrollRowIndex!=-1){var a=this._pendingScrollRowIndex,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollRowIndex=-1;this._pendingScrollDuration=null;if(this._dataProvider!=null&&
this._dataProvider.get_length()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(w.__implements(this.get_layout(),ff))d=this.get_layout().getNearestScrollPositionForIndex(a,this._dataProvider.get_length(),this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=this.dataToRowRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-
this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},refreshDragDropIndexIndicator:function(){if(this.get_dragDropIndicatorSkin()!=null&&w.__implements(this.get_layout(),mj)){w.__implements(this.get_dragDropIndicatorSkin(),Fa)&&this.get_dragDropIndicatorSkin().initializeNow();this._dragDropIndicatorSkinMeasurements==null?this._dragDropIndicatorSkinMeasurements=new Sb(this.get_dragDropIndicatorSkin()):
this._dragDropIndicatorSkinMeasurements.save(this.get_dragDropIndicatorSkin());var a=this.get_scrollX()+this._dragDropLocalX-this.leftViewPortOffset,b=this.get_scrollY()+this._dragDropLocalY-this.topViewPortOffset,c=this.get_layout(),d=c.getDragDropIndex(this._rowLayoutItems,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());a=c.getDragDropRegion(this._rowLayoutItems,d,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());this.get_dragDropIndicatorSkin().set_x(a.x-
this.get_scrollX()+this.leftViewPortOffset);this.get_dragDropIndicatorSkin().set_y(a.y-this.get_scrollY()+this.topViewPortOffset);a.width==0?this.get_dragDropIndicatorSkin().set_height(a.height):this.get_dragDropIndicatorSkin().set_width(a.width);this.addChild(this.get_dragDropIndicatorSkin())}},baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):
Ab.prototype.baseScrollContainer_keyDownHandler.call(this,a)},gridView_rowRenderer_triggerHandler:function(a){var b=w.__cast(a.currentTarget,eg);b=this.rowRendererToRowState.h[b.__id__];this.handleSelectionChange(b.data,b.rowIndex,a.ctrlKey,a.shiftKey)},gridView_rowRenderer_cellTriggerHandler:function(a){this.dispatchEvent(a.clone())},gridView_rowRenderer_mouseDownHandler:function(a){if(this._enabled&&this._dragEnabled&&this.stage!=null){a=w.__cast(a.currentTarget,eg);var b=this.rowRendererToRowState.h[a.__id__];
b!=null&&(this._dragRowRenderer=a,this._dragItem=b.data,this._dragRowIndex=b.rowIndex,this._dragDropLocalX=this.get_mouseX(),this._dragDropLocalY=this.get_mouseY(),this._dragMinDistance=6,this.stage.addEventListener("mouseMove",m(this,this.gridView_stage_pressAndMove_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.gridView_stage_pressAndMove_mouseUpHandler),!1,0,!0))}},gridView_stage_pressAndMove_mouseMoveHandler:function(a){var b=this.get_mouseX()-this._dragDropLocalX,
c=this.get_mouseY()-this._dragDropLocalY;if(b>this._dragMinDistance||c>this._dragMinDistance){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.gridView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.gridView_stage_pressAndMove_mouseUpHandler));a=[];b=this._allowMultipleSelection?this._selectedIndices.slice():[];b.indexOf(this._dragRowIndex)==-1&&b.push(this._dragRowIndex);b.sort(function(f,g){return f<g?-1:f>g?1:0});for(c=0;c<b.length;){var d=
b[c];++c;a.push(this._dataProvider.get(d))}b=new dt;b.set(this._dragFormat,a);a=this.rowRendererToRowState.h[this._dragRowRenderer.__id__];c=this._rowRendererFactory.create();this.updateRowRenderer(c,a);c.set_width(this._dragRowRenderer.get_width());c.set_height(this._dragRowRenderer.get_height());fb.startDrag(this,b,c,-this._dragRowRenderer.get_mouseX(),-this._dragRowRenderer.get_mouseY())}},gridView_stage_pressAndMove_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",
m(this,this.gridView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.gridView_stage_pressAndMove_mouseUpHandler));this._dragItem=null;this._dragRowIndex=-1;this._dragRowRenderer=null},gridView_dataProvider_changeHandler:function(a){this._ignoreDataProviderChanges||this.setInvalid(x.DATA)},gridView_dataProvider_addItemHandler:function(a){this._virtualCache!=null&&this._virtualCache.splice(a.index,0,null);if(this._selectedIndex!=-1){for(var b=!1,c=0,d=this._selectedIndices.length;c<
d;){var f=c++,g=this._selectedIndices[f];g>=a.index&&(this._selectedIndices[f]=g+1,b=!0)}b&&(this._selectedIndex=this._selectedIndices[0],Y.dispatch(this,"change"))}},gridView_dataProvider_removeItemHandler:function(a){this._virtualCache!=null&&V.remove(this._virtualCache,a.index);if(this._selectedIndex!=-1){for(var b=!1,c=this._selectedIndices.length-1;c>=0;){var d=this._selectedIndices[c];d==a.index?(this._selectedIndices.splice(c,1),this._selectedItems.splice(c,1),b=!0):d>a.index&&(this._selectedIndices[c]=
d-1,b=!0);--c}b&&(this._selectedIndices.length>0?(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._dataProvider.get(this._selectedIndex)):(this._selectedIndex=-1,this._selectedItem=null),Y.dispatch(this,"change"))}},gridView_dataProvider_replaceItemHandler:function(a){this._virtualCache!=null&&(this._virtualCache[a.index]=null);if(this._selectedIndex!=-1)for(var b=0,c=this._selectedIndices.length;b<c;){var d=b++,f=this._selectedIndices[d];if(f==a.index){this._selectedItems[d]=
this._dataProvider.get(f);this._selectedItem=this._selectedItems[0];Y.dispatch(this,"change");break}}},gridView_dataProvider_removeAllHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0);this.set_selectedIndex(-1)},gridView_dataProvider_resetHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.set_selectedIndex(-1)},gridView_dataProvider_sortChangeHandler:function(a){this._virtualCache!=null&&
(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.refreshSelectedIndicesAfterFilterOrSort()},gridView_dataProvider_filterChangeHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.refreshSelectedIndicesAfterFilterOrSort()},updateRowRendererForIndex:function(a){this._virtualCache!=null&&(this._virtualCache[a]=null);var b=this._dataProvider.get(a),c=this.dataToRowRenderer.h[b.__id__];
if(c==null)this.setInvalid(x.DATA);else{var d=this.rowRendererToRowState.h[c.__id__];d.owner!=null&&(c.updateCells(),this.populateCurrentRowState(b,a,d,!0),this.resetRowRenderer(c,d),this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(c),d.owner=null,this.setInvalid(x.DATA))}},validateCustomColumnWidths:function(){if(!(this._customColumnWidths==null||this._customColumnWidths.length<this._columns.get_length())){this._customColumnWidths.length>this._columns.get_length()&&(this._customColumnWidths.length=
this._columns.get_length());var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a=Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a)-this._headerContainerLayout.get_paddingLeft()-this._headerContainerLayout.get_paddingRight();for(var b=0,c=[],d=0,f=this._customColumnWidths.length;d<f;){var g=d++,h=this._columns.get(g);h.width!=null?a-=h.width:(b+=this._customColumnWidths[g],c.push(g))}b!=a&&(this._customColumnWidths=
this._customColumnWidths.slice(),this.distributeWidthToIndices(a-b,c,b),this.setInvalid(x.LAYOUT))}},calculateResizedColumnWidth:function(a){var b=this._columns.get_length();this._customColumnWidths=this._customColumnWidths==null?[]:this._customColumnWidths.slice();this._customColumnWidths.length=b;var c=this._columns.get(this._resizingHeaderIndex);c.width=null;var d=this.dataToHeaderRenderer.h[c.__id__];c=this._columns.get(this._resizingHeaderIndex);var f=this._headerContainer.get_x()+d.get_x()+
c.minWidth,g=this.actualWidth-this.rightViewPortOffset,h=this._headerContainer.get_x()+d.get_x()+d.get_width(),n=Math.min(Math.max(h+a,f),g)-d.get_x()-this._headerContainer.get_x();h=0;a=d.get_width();f=0;g=[];for(var l=0;l<b;){var q=l++;d=this._columns.get(q);q!=this._resizingHeaderIndex&&(q<this._resizingHeaderIndex?(d=this.dataToHeaderRenderer.h[d.__id__],this._customColumnWidths[q]=d.get_width(),h+=d.get_width()):d.width!=null?h+=d.width:(h+=d.minWidth,d=this.dataToHeaderRenderer.h[d.__id__],
d=d.get_width(),f+=d,this._customColumnWidths[q]=d,g[g.length]=q))}g.length==0&&(b=this._resizingHeaderIndex+1,g[0]=b,c=this._columns.get(b),f=c.width,h=h-f+c.minWidth,this._customColumnWidths[b]=f,c.width=null);b=n;d=this._headerContainer.get_width()-h;b>d&&(b=d);b<c.minWidth&&(b=c.minWidth);this._customColumnWidths[this._resizingHeaderIndex]=b;this.distributeWidthToIndices(a-b,g,f);this.setInvalid(x.LAYOUT)},distributeWidthToIndices:function(a,b,c){for(;Math.abs(a)>1;){for(var d=a,f=b.length-1;f>=
0;){var g=b[f],h=this._columns.get(g),n=this.dataToHeaderRenderer.h[h.__id__].get_width(),l=n/c*a,q=this._customColumnWidths[g]+l;q<h.minWidth&&(l+=h.minWidth-q,q=h.minWidth,b.splice(f,1),c-=n);this._customColumnWidths[g]=q;d-=l;--f}a=d}a!=0&&(this._customColumnWidths[this._customColumnWidths.length-1]+=a)},layoutColumnResizeSkin:function(a){if(this._currentColumnResizeSkin!=null){var b=this._columns.get(this._resizingHeaderIndex),c=this.dataToHeaderRenderer.h[b.__id__];b=this._headerContainer.get_x()+
c.get_x()+b.minWidth;var d=this.actualWidth-this.rightViewPortOffset;c=this._headerContainer.get_x()+c.get_x()+c.get_width();a=Math.min(Math.max(c+a,b),d)-this._currentColumnResizeSkin.get_width()/2;this._currentColumnResizeSkin.set_visible(!0);this._currentColumnResizeSkin.set_x(a);this._currentColumnResizeSkin.set_y(this.get_paddingTop());this._currentColumnResizeSkin.set_height(this.actualHeight-this.get_paddingTop()-this.bottomViewPortOffset);this.setChildIndex(this._currentColumnResizeSkin,this.get_numChildren()-
1)}},headerResizeTouchBegin:function(a,b,c,d){if(this._enabled&&this._resizableColumns&&this._resizingHeaderIndex==-1&&this.stage!=null){var f=Pd.forStage(this.stage);if(b?f.claimMouse(c):f.claimTouch(a,c))this._resizingHeaderTouchPointID=a,this._resizingHeaderTouchPointIsMouse=b,this._resizingHeaderIndex=this._headerDividerLayoutItems.indexOf(c),this._resizingHeaderStartStageX=d,this.layoutColumnResizeSkin(0),b?(this.stage.addEventListener("mouseMove",m(this,this.gridView_headerDivider_stage_mouseMoveHandler),
!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.gridView_headerDivider_stage_mouseUpHandler),!1,0,!0)):(this.stage.addEventListener("touchMove",m(this,this.gridView_headerDivider_stage_touchMoveHandler),!1,0,!0),this.stage.addEventListener("touchEnd",m(this,this.gridView_headerDivider_stage_touchEndHandler),!1,0,!0))}},headerResizeTouchMove:function(a,b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(a=c-this._resizingHeaderStartStageX,
a*=Zg.getConcatenatedScaleX(this),this.layoutColumnResizeSkin(a))},headerResizeTouchEnd:function(a,b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(b?(this.stage.removeEventListener("mouseMove",m(this,this.gridView_headerDivider_stage_mouseMoveHandler)),this.stage.removeEventListener("mouseUp",m(this,this.gridView_headerDivider_stage_mouseUpHandler))):(this.stage.removeEventListener("touchMove",m(this,this.gridView_headerDivider_stage_touchMoveHandler)),
this.stage.removeEventListener("touchEnd",m(this,this.gridView_headerDivider_stage_touchEndHandler))),this._currentColumnResizeSkin!=null&&this._currentColumnResizeSkin.set_visible(!1),a=c-this._resizingHeaderStartStageX,a*=Zg.getConcatenatedScaleX(this),this.calculateResizedColumnWidth(a),this._resizingHeaderTouchPointID=null,this._resizingHeaderTouchPointIsMouse=!1,this._resizingHeaderIndex=-1,this._oldHeaderDividerMouseCursor!=null&&(xd.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=
null))},reverseSortCompareFunction:function(a,b){return-this.sortCompareFunction(a,b)},sortCompareFunction:function(a,b){return this._sortedColumn.sortCompareFunction==null?(a=this._sortedColumn.itemToText(a),b=this._sortedColumn.itemToText(b),sc.defaultSortCompareFunction(a,b)):this._sortedColumn.sortCompareFunction(a,b)},refreshSortedColumn:function(a){if(this._dataProvider!=null){var b=this._ignoreDataProviderChanges;this._ignoreDataProviderChanges=!0;this._sortOrder==Bh.ASCENDING?this._dataProvider.set_sortCompareFunction(m(this,
this.sortCompareFunction)):this._sortOrder==Bh.DESCENDING?this._dataProvider.set_sortCompareFunction(m(this,this.reverseSortCompareFunction)):(this._dataProvider.get_sortCompareFunction()==m(this,this.sortCompareFunction)||this._dataProvider.get_sortCompareFunction()==m(this,this.sortCompareFunction)||this._dataProvider.get_sortCompareFunction()==m(this,this.reverseSortCompareFunction)||this._dataProvider.get_sortCompareFunction()==m(this,this.reverseSortCompareFunction))&&this._dataProvider.set_sortCompareFunction(null);
a&&this._dataProvider.refresh();this._ignoreDataProviderChanges=b}},updateSortedColumn:function(a){this._sortableColumns&&a.defaultSortOrder!=Bh.NONE&&(this._sortedColumn!=a?this.set_sortedColumn(a):this.set_sortOrder(this._sortOrder==Bh.ASCENDING?Bh.DESCENDING:Bh.ASCENDING))},gridView_dataProvider_updateItemHandler:function(a){this.updateRowRendererForIndex(a.index)},gridView_dataProvider_updateAllHandler:function(a){a=0;for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateRowRendererForIndex(c)}},
gridView_columns_addItemHandler:function(a){if(this._customColumnWidths!=null){var b=w.__cast(a.addedItem,zm);a=a.index;if(!(b.width!=null||a>this._customColumnWidths.length)){this._customColumnWidths.splice(a,0,0);this.get_paddingLeft();this.get_paddingRight();this._viewPort.get_width();this._headerContainerLayout.get_paddingLeft();this._headerContainerLayout.get_paddingRight();this._headerContainerLayout.get_paddingLeft();this._headerContainerLayout.get_paddingRight();for(var c=0,d=[],f=0,g=this._customColumnWidths.length;f<
g;){var h=f++;h!=a&&(b=this._columns.get(h),b.width==null&&(c+=this._customColumnWidths[h],d.push(h)))}b=c/(d.length+1);this._customColumnWidths[a]=b;this._customColumnWidths=this._customColumnWidths.slice();this.distributeWidthToIndices(-b,d,c);this.setInvalid(x.LAYOUT)}}},gridView_columns_removeItemHandler:function(a){if(this._customColumnWidths!=null){var b=w.__cast(a.removedItem,zm);a=a.index;b.width!=null||a>this._customColumnWidths.length||(this._customColumnWidths.splice(a,1),this.setInvalid(x.LAYOUT))}},
gridView_columns_changeHandler:function(a){this.setInvalid(x.DATA)},gridView_headerRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=w.__cast(a.currentTarget,ma),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),Hf.dispatchForHeader(this,"headerTrigger",a))},gridView_headerRenderer_clickHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,ma),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),Hf.dispatchForHeader(this,
"headerTrigger",a))},gridView_headerRenderer_triggerHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,ma),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),Hf.dispatchForHeader(this,"headerTrigger",a))},gridView_headerRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},gridView_headerDivider_mouseDownHandler:function(a){a=w.__cast(a.currentTarget,Ja);this.headerResizeTouchBegin(sc.POINTER_ID_MOUSE,!0,a,a.stage.get_mouseX())},
gridView_headerDivider_stage_mouseMoveHandler:function(a){a=w.__cast(a.currentTarget,gd);this.headerResizeTouchMove(sc.POINTER_ID_MOUSE,!0,a.get_mouseX())},gridView_headerDivider_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);this.headerResizeTouchEnd(sc.POINTER_ID_MOUSE,!0,a.get_mouseX())},gridView_headerDivider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=w.__cast(a.currentTarget,Ja);this.headerResizeTouchBegin(a.touchPointID,!1,b,b.stage.get_mouseX())}},gridView_headerDivider_stage_touchMoveHandler:function(a){var b=
w.__cast(a.currentTarget,gd);this.headerResizeTouchMove(a.touchPointID,!1,b.get_mouseX())},gridView_headerDivider_stage_touchEndHandler:function(a){var b=w.__cast(a.currentTarget,gd);this.headerResizeTouchEnd(a.touchPointID,!1,b.get_mouseX())},gridView_headerDivider_rollOverHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&xd.get_cursor()=="auto"&&(this._oldHeaderDividerMouseCursor=xd.get_cursor(),xd.set_cursor(ch.fromLimeCursor(id.RESIZE_WE)))},gridView_headerDivider_rollOutHandler:function(a){this._resizableColumns&&
this._resizingHeaderIndex==-1&&this._oldHeaderDividerMouseCursor!=null&&(xd.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=null)},gridView_dragCompleteHandler:function(a){if(a.dropped)if(this._droppedOnSelf)this._droppedOnSelf=!1;else if(this._removeOnDragDropComplete){a=w.__cast(a.dragData.get(this._dragFormat),Array);for(var b=0;b<a.length;){var c=a[b];++b;this._dataProvider.remove(c)}}},gridView_dragEnterHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&
(a.acceptDrag(this),this.showFocus(!0),this._dragDropLocalX=a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator(),this._dragDropLastUpdateTime=Pa.getTimer(),this.addEventListener("enterFrame",m(this,this.gridView_dragScroll_enterFrameHandler)))},gridView_dragExitHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.get_dragDropIndicatorSkin().parent==this&&this.removeChild(this.get_dragDropIndicatorSkin()));
this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.gridView_dragScroll_enterFrameHandler))},gridView_dragScroll_enterFrameHandler:function(a){a=Pa.getTimer();var b=a-this._dragDropLastUpdateTime;this._dragDropLastUpdateTime=a;a=this._dragDropLocalX-this.leftViewPortOffset;var c=this._dragDropLocalY-this.topViewPortOffset;b/=2;this.get_maxScrollY()>this.get_minScrollY()&&(b=this.get_scrollY()<this.get_maxScrollY()&&c>this._viewPort.get_visibleHeight()-
this.edgeAutoScrollDistance?b*(1-(this._viewPort.get_visibleHeight()-c)/this.edgeAutoScrollDistance):this.get_scrollY()>this.get_minScrollY()&&c<this.edgeAutoScrollDistance?b*-(1-c/this.edgeAutoScrollDistance):0,b!=0&&(c=this.get_scrollY()+b,c>this.get_maxScrollY()?c=this.get_maxScrollY():c<this.get_minScrollY()&&(c=this.get_minScrollY()),this.set_scrollY(c)));this.get_maxScrollX()>this.get_minScrollX()&&(b=this.get_scrollX()<this.get_maxScrollX()&&a>this._viewPort.get_visibleWidth()-this.edgeAutoScrollDistance?
b*(1-(this._viewPort.get_visibleWidth()-a)/this.edgeAutoScrollDistance):this.get_scrollX()>this.get_minScrollX()&&a<this.edgeAutoScrollDistance?b*-(1-a/this.edgeAutoScrollDistance):0,b!=0&&(a=this.get_scrollX()+b,a>this.get_maxScrollX()?a=this.get_maxScrollX():a<this.get_minScrollX()&&(a=this.get_minScrollX()),this.set_scrollX(a)));this.refreshDragDropIndexIndicator()},gridView_dragMoveHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&(this._dragDropLocalX=
a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator())},gridView_dragDropHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&this.get_dragDropIndicatorSkin().parent==this&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.removeChild(this.get_dragDropIndicatorSkin()));this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.gridView_dragScroll_enterFrameHandler));this._droppedOnSelf=!1;
if(this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)){var b=w.__cast(a.dragData.get(this._dragFormat),Array),c=this._dataProvider.get_length();if(w.__implements(this.get_layout(),mj)){c=this.get_layout();var d=this.get_scrollX()+a.localX-this.leftViewPortOffset,f=this.get_scrollY()+a.localY-this.topViewPortOffset;c=c.getDragDropIndex(this._rowLayoutItems,d,f,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight())}d=0;if(a.dragSource==this){for(a=0;a<b.length;)f=b[a],
++a,f=this._dataProvider.indexOf(f),f<c&&--d,this._dataProvider.removeAt(f);this._droppedOnSelf=!0}a=0;for(var g=b.length;a<g;){var h=a++;f=b[h];this._dataProvider.addAt(f,c+d+h)}}},get_styleContext:function(){return sc},__customCellRendererVariant:null,get_customCellRendererVariant:function(){return this.__customCellRendererVariant},set_customCellRendererVariant:function(a){if(!this.setStyle("customCellRendererVariant")||this.__customCellRendererVariant==a)return this.__customCellRendererVariant;
this._previousClearStyle=m(this,this.clearStyle_customCellRendererVariant);this.__customCellRendererVariant=a;this.setInvalid(x.STYLES);return this.__customCellRendererVariant},clearStyle_customCellRendererVariant:function(){this.set_customCellRendererVariant(null);return this.get_customCellRendererVariant()},__customHeaderRendererVariant:null,get_customHeaderRendererVariant:function(){return this.__customHeaderRendererVariant},set_customHeaderRendererVariant:function(a){if(!this.setStyle("customHeaderRendererVariant")||
this.__customHeaderRendererVariant==a)return this.__customHeaderRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderRendererVariant);this.__customHeaderRendererVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderRendererVariant},clearStyle_customHeaderRendererVariant:function(){this.set_customHeaderRendererVariant(null);return this.get_customHeaderRendererVariant()},__headerDividerFactory:null,get_headerDividerFactory:function(){return this.__headerDividerFactory},
set_headerDividerFactory:function(a){if(!this.setStyle("headerDividerFactory")||this.__headerDividerFactory==a)return this.__headerDividerFactory;this._previousClearStyle=m(this,this.clearStyle_headerDividerFactory);this.__headerDividerFactory=a;this.setInvalid(x.STYLES);return this.__headerDividerFactory},clearStyle_headerDividerFactory:function(){this.set_headerDividerFactory(Lc.withClass(Xb));return this.get_headerDividerFactory()},__customHeaderDividerVariant:null,get_customHeaderDividerVariant:function(){return this.__customHeaderDividerVariant},
set_customHeaderDividerVariant:function(a){if(!this.setStyle("customHeaderDividerVariant")||this.__customHeaderDividerVariant==a)return this.__customHeaderDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderDividerVariant);this.__customHeaderDividerVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderDividerVariant},clearStyle_customHeaderDividerVariant:function(){this.set_customHeaderDividerVariant(null);return this.get_customHeaderDividerVariant()},__columnDividerFactory:null,
get_columnDividerFactory:function(){return this.__columnDividerFactory},set_columnDividerFactory:function(a){if(!this.setStyle("columnDividerFactory")||this.__columnDividerFactory==a)return this.__columnDividerFactory;this._previousClearStyle=m(this,this.clearStyle_columnDividerFactory);this.__columnDividerFactory=a;this.setInvalid(x.STYLES);return this.__columnDividerFactory},clearStyle_columnDividerFactory:function(){this.set_columnDividerFactory(null);return this.get_columnDividerFactory()},__customColumnDividerVariant:null,
get_customColumnDividerVariant:function(){return this.__customColumnDividerVariant},set_customColumnDividerVariant:function(a){if(!this.setStyle("customColumnDividerVariant")||this.__customColumnDividerVariant==a)return this.__customColumnDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customColumnDividerVariant);this.__customColumnDividerVariant=a;this.setInvalid(x.STYLES);return this.__customColumnDividerVariant},clearStyle_customColumnDividerVariant:function(){this.set_customColumnDividerVariant(null);
return this.get_customColumnDividerVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__columnResizeSkin:null,get_columnResizeSkin:function(){return this.__columnResizeSkin},set_columnResizeSkin:function(a){if(!this.setStyle("columnResizeSkin")||
this.__columnResizeSkin==a)return this.__columnResizeSkin;this._previousClearStyle=m(this,this.clearStyle_columnResizeSkin);this.__columnResizeSkin=a;this.setInvalid(x.STYLES);return this.__columnResizeSkin},clearStyle_columnResizeSkin:function(){this.set_columnResizeSkin(null);return this.get_columnResizeSkin()},__headerCornerSkin:null,get_headerCornerSkin:function(){return this.__headerCornerSkin},set_headerCornerSkin:function(a){if(!this.setStyle("headerCornerSkin")||this.__headerCornerSkin==a)return this.__headerCornerSkin;
this._previousClearStyle=m(this,this.clearStyle_headerCornerSkin);this.__headerCornerSkin=a;this.setInvalid(x.STYLES);return this.__headerCornerSkin},clearStyle_headerCornerSkin:function(){this.set_headerCornerSkin(null);return this.get_headerCornerSkin()},__extendedScrollBarY:null,get_extendedScrollBarY:function(){return this.__extendedScrollBarY},set_extendedScrollBarY:function(a){if(!this.setStyle("extendedScrollBarY")||this.__extendedScrollBarY==a)return this.__extendedScrollBarY;this._previousClearStyle=
m(this,this.clearStyle_extendedScrollBarY);this.__extendedScrollBarY=a;this.setInvalid(x.STYLES);return this.__extendedScrollBarY},clearStyle_extendedScrollBarY:function(){this.set_extendedScrollBarY(!1);return this.get_extendedScrollBarY()},__showHeaderDividersOnlyWhenResizable:null,get_showHeaderDividersOnlyWhenResizable:function(){return this.__showHeaderDividersOnlyWhenResizable},set_showHeaderDividersOnlyWhenResizable:function(a){if(!this.setStyle("showHeaderDividersOnlyWhenResizable")||this.__showHeaderDividersOnlyWhenResizable==
a)return this.__showHeaderDividersOnlyWhenResizable;this._previousClearStyle=m(this,this.clearStyle_showHeaderDividersOnlyWhenResizable);this.__showHeaderDividersOnlyWhenResizable=a;this.setInvalid(x.STYLES);return this.__showHeaderDividersOnlyWhenResizable},clearStyle_showHeaderDividersOnlyWhenResizable:function(){this.set_showHeaderDividersOnlyWhenResizable(!1);return this.get_showHeaderDividersOnlyWhenResizable()},__dragDropIndicatorSkin:null,get_dragDropIndicatorSkin:function(){return this.__dragDropIndicatorSkin},
set_dragDropIndicatorSkin:function(a){if(!this.setStyle("dragDropIndicatorSkin")||this.__dragDropIndicatorSkin==a)return this.__dragDropIndicatorSkin;this._previousClearStyle=m(this,this.clearStyle_dragDropIndicatorSkin);this.__dragDropIndicatorSkin=a;this.setInvalid(x.STYLES);return this.__dragDropIndicatorSkin},clearStyle_dragDropIndicatorSkin:function(){this.set_dragDropIndicatorSkin(null);return this.get_dragDropIndicatorSkin()},__class__:sc,__properties__:I(Ab.prototype.__properties__,{set_removeOnDragDropComplete:"set_removeOnDragDropComplete",
get_removeOnDragDropComplete:"get_removeOnDragDropComplete",set_dropEnabled:"set_dropEnabled",get_dropEnabled:"get_dropEnabled",set_dragEnabled:"set_dragEnabled",get_dragEnabled:"get_dragEnabled",set_dragFormat:"set_dragFormat",get_dragFormat:"get_dragFormat",set_dragDropIndicatorSkin:"set_dragDropIndicatorSkin",get_dragDropIndicatorSkin:"get_dragDropIndicatorSkin",set_showHeaderDividersOnlyWhenResizable:"set_showHeaderDividersOnlyWhenResizable",get_showHeaderDividersOnlyWhenResizable:"get_showHeaderDividersOnlyWhenResizable",
set_extendedScrollBarY:"set_extendedScrollBarY",get_extendedScrollBarY:"get_extendedScrollBarY",set_selectable:"set_selectable",get_selectable:"get_selectable",set_sortedColumn:"set_sortedColumn",get_sortedColumn:"get_sortedColumn",set_sortOrder:"set_sortOrder",get_sortOrder:"get_sortOrder",set_headerCornerSkin:"set_headerCornerSkin",get_headerCornerSkin:"get_headerCornerSkin",set_columnResizeSkin:"set_columnResizeSkin",get_columnResizeSkin:"get_columnResizeSkin",set_resizableColumns:"set_resizableColumns",
get_resizableColumns:"get_resizableColumns",set_sortableColumns:"set_sortableColumns",get_sortableColumns:"get_sortableColumns",set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_layout:"set_layout",get_layout:"get_layout",set_selectedItems:"set_selectedItems",get_selectedItems:"get_selectedItems",set_selectedIndices:"set_selectedIndices",get_selectedIndices:"get_selectedIndices",
set_allowMultipleSelection:"set_allowMultipleSelection",get_allowMultipleSelection:"get_allowMultipleSelection",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_customColumnDividerVariant:"set_customColumnDividerVariant",get_customColumnDividerVariant:"get_customColumnDividerVariant",set_columnDividerFactory:"set_columnDividerFactory",get_columnDividerFactory:"get_columnDividerFactory",
set_customHeaderDividerVariant:"set_customHeaderDividerVariant",get_customHeaderDividerVariant:"get_customHeaderDividerVariant",set_headerDividerFactory:"set_headerDividerFactory",get_headerDividerFactory:"get_headerDividerFactory",set_customHeaderRendererVariant:"set_customHeaderRendererVariant",get_customHeaderRendererVariant:"get_customHeaderRendererVariant",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",set_forceItemStateUpdate:"set_forceItemStateUpdate",
get_forceItemStateUpdate:"get_forceItemStateUpdate",set_headerRendererRecycler:"set_headerRendererRecycler",get_headerRendererRecycler:"get_headerRendererRecycler",set_rowRendererFactory:"set_rowRendererFactory",get_rowRendererFactory:"get_rowRendererFactory",set_columns:"set_columns",get_columns:"get_columns",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var ox=function(a){this.inactiveHeaderRenderers=
[];this.activeHeaderRenderers=[];this.headerRendererRecycler=a};t["feathers.controls._GridView.HeaderRendererStorage"]=ox;ox.__name__="feathers.controls._GridView.HeaderRendererStorage";ox.prototype={oldHeaderRendererRecycler:null,headerRendererRecycler:null,activeHeaderRenderers:null,inactiveHeaderRenderers:null,measurements:null,__class__:ox};var nx=function(a){this.inactiveHeaderDividers=[];this.activeHeaderDividers=[];this.headerDividerFactory=a};t["feathers.controls._GridView.HeaderDividerStorage"]=
nx;nx.__name__="feathers.controls._GridView.HeaderDividerStorage";nx.prototype={customHeaderDividerVariant:null,oldHeaderDividerFactory:null,headerDividerFactory:null,activeHeaderDividers:null,inactiveHeaderDividers:null,__class__:nx};var mx=function(a){this.inactiveColumnDividers=[];this.activeColumnDividers=[];this.columnDividerFactory=a};t["feathers.controls._GridView.ColumnDividerStorage"]=mx;mx.__name__="feathers.controls._GridView.ColumnDividerStorage";mx.prototype={customColumnDividerVariant:null,
oldColumnDividerFactory:null,columnDividerFactory:null,activeColumnDividers:null,inactiveColumnDividers:null,__class__:mx};var rp=function(){};t["feathers.controls.IGridViewColumn"]=rp;rp.__name__="feathers.controls.IGridViewColumn";rp.__isInterface__=!0;rp.prototype={width:null,minWidth:null,__class__:rp};var zm=function(a,b,c){this.defaultSortOrder=Bh.ASCENDING;this.cellRendererRecycler=this.sortCompareFunction=null;this.minWidth=0;this.width=null;qa.call(this);this.headerText=a;b!=null&&(this.itemToText=
b);this.width=c};t["feathers.controls.GridViewColumn"]=zm;zm.__name__="feathers.controls.GridViewColumn";zm.__interfaces__=[rp];zm.__super__=qa;zm.prototype=I(qa.prototype,{headerText:null,width:null,minWidth:null,cellRendererRecycler:null,sortCompareFunction:null,defaultSortOrder:null,itemToText:function(a){return H.string(a)},__class__:zm});var sp=function(a,b,c,d,f,g){d==null&&(d=-1);a==null&&(a=Yf.STANDARD);this.enabled=!0;this.selected=!1;this.layoutIndex=-1;this.type=a;this.data=b;this.location=
c;this.layoutIndex=d;this.selected=!1;this.text=g};t["feathers.data.GroupListViewItemState"]=sp;sp.__name__="feathers.data.GroupListViewItemState";sp.prototype={owner:null,type:null,data:null,location:null,layoutIndex:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:sp};var Yc=function(a,b){this._pendingScrollLocation=this._pendingScrollDuration=this.__layout=this.__customHeaderRendererVariant=this.__customItemRendererVariant=null;this._ignoreSelectionChange=this._ignoreLayoutChanges=
!1;this._selectable=this._virtualLayout=this.pointerSelectionEnabled=!0;this._layoutHeaderIndices=[];this._layoutItems=[];this._totalLayoutCount=0;this._tempVisibleIndices=new Ri(0,0);this._visibleIndices=new Ri(0,0);this._virtualCache=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.itemStatePool=new dc(function(){return new sp});this.itemRendererToItemState=new Ta;this.stringDataToItemRenderer=new G;this.objectDataToItemRenderer=new Ta;this._additionalItemStorage=this._additionalHeaderStorage=
null;this._defaultHeaderStorage=new tp(Yf.HEADER,null,Ne.withClass(Sc));this._defaultItemStorage=new tp(Yf.STANDARD,null,Ne.withClass(Sc));this._itemRendererRecyclerMap=this._headerRendererRecyclerMap=null;this._forceItemStateUpdate=!1;this._selectedLocation=this._selectedItem=this._previousCustomHeaderRendererVariant=this._previousCustomItemRendererVariant=null;this._childFocusEnabled=!0;this.initializeGroupListViewTheme();Ab.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=
null;this.get_viewPort()==null&&(this.groupViewPort=new Wk,this.addChild(this.groupViewPort),this.set_viewPort(this.groupViewPort));this.addEventListener("keyDown",m(this,this.groupListView_keyDownHandler));b!=null&&this.addEventListener("change",b)};t["feathers.controls.GroupListView"]=Yc;Yc.__name__="feathers.controls.GroupListView";Yc.__interfaces__=[ng,qi];Yc.defaultUpdateItemRenderer=function(a,b){w.__implements(a,re)&&a.set_text(b.text)};Yc.defaultResetItemRenderer=function(a,b){w.__implements(a,
re)&&a.set_text(null)};Yc.__super__=Ab;Yc.prototype=I(Ab.prototype,{groupViewPort:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},_dataProvider:null,
get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._totalLayoutCount=this._virtualCache.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.groupListView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.groupListView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.groupListView_dataProvider_removeItemHandler)),
this._dataProvider.removeEventListener("replaceItem",m(this,this.groupListView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.groupListView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.groupListView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.groupListView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.groupListView_dataProvider_sortChangeHandler)),
this._dataProvider.removeEventListener("updateItem",m(this,this.groupListView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.groupListView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._totalLayoutCount=this.calculateTotalLayoutCount([]),this._virtualCache.length=this._totalLayoutCount,this._dataProvider.addEventListener("change",m(this,this.groupListView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",
m(this,this.groupListView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.groupListView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.groupListView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.groupListView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.groupListView_dataProvider_resetHandler)),this._dataProvider.addEventListener("filterChange",
m(this,this.groupListView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.groupListView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.groupListView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.groupListView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedLocation(null);this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");
return this._dataProvider},_selectedLocation:null,get_selectedLocation:function(){return this._selectedLocation},set_selectedLocation:function(a){this._selectable&&this._dataProvider!=null||(a=null);if(this._selectedLocation==a||this.compareLocations(this._selectedLocation,a)==0)return this._selectedLocation;if(a!=null&&a.length!=2)throw new Cb("GroupListView selectedLocation must have a length of 2");this._selectedLocation=a;this._selectedItem=this._selectedLocation==null?null:this._dataProvider.get(this._selectedLocation);
this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedLocation},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedLocation(null),this._selectedItem;var b=this._dataProvider.locationOf(a);if(this._selectedItem==a&&this.compareLocations(this._selectedLocation,b)==0)return this._selectedItem;this._selectedItem=a;this._selectedLocation=b;this.setInvalid(x.SELECTION);
Y.dispatch(this,"change");return this._selectedItem},_previousLayout:null,_previousCustomHeaderRendererVariant:null,_previousCustomItemRendererVariant:null,_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},get_itemRendererRecycler:function(){return this._defaultItemStorage.itemRendererRecycler},
set_itemRendererRecycler:function(a){if(this._defaultItemStorage.itemRendererRecycler==a)return this._defaultItemStorage.itemRendererRecycler;this._defaultItemStorage.oldItemRendererRecycler=this._defaultItemStorage.itemRendererRecycler;this._defaultItemStorage.itemRendererRecycler=a;this._defaultItemStorage.measurements=null;this.setInvalid(Yc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._defaultItemStorage.itemRendererRecycler},get_headerRendererRecycler:function(){return this._defaultHeaderStorage.itemRendererRecycler},
set_headerRendererRecycler:function(a){if(this._defaultHeaderStorage.itemRendererRecycler==a)return this._defaultHeaderStorage.itemRendererRecycler;this._defaultHeaderStorage.oldItemRendererRecycler=this._defaultHeaderStorage.itemRendererRecycler;this._defaultHeaderStorage.itemRendererRecycler=a;this.setInvalid(Yc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._defaultHeaderStorage.itemRendererRecycler},_itemRendererRecyclerMap:null,_headerRendererRecyclerMap:null,_itemRendererRecyclerIDFunction:null,
get_itemRendererRecyclerIDFunction:function(){return this._itemRendererRecyclerIDFunction},set_itemRendererRecyclerIDFunction:function(a){if(this._itemRendererRecyclerIDFunction==a)return this._itemRendererRecyclerIDFunction;this._itemRendererRecyclerIDFunction=a;this._itemRendererRecyclerIDFunction!=null&&this._additionalItemStorage==null&&(this._additionalItemStorage=[]);this.setInvalid(Yc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._itemRendererRecyclerIDFunction},_headerRendererRecyclerIDFunction:null,
get_headerRendererRecyclerIDFunction:function(){return this._headerRendererRecyclerIDFunction},set_headerRendererRecyclerIDFunction:function(a){if(this._headerRendererRecyclerIDFunction==a)return this._headerRendererRecyclerIDFunction;this._headerRendererRecyclerIDFunction=a;this._headerRendererRecyclerIDFunction!=null&&this._additionalHeaderStorage==null&&(this._additionalHeaderStorage=[]);this.setInvalid(Yc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._headerRendererRecyclerIDFunction},
_defaultItemStorage:null,_defaultHeaderStorage:null,_additionalItemStorage:null,_additionalHeaderStorage:null,objectDataToItemRenderer:null,stringDataToItemRenderer:null,itemRendererToItemState:null,itemStatePool:null,_unrenderedLocations:null,_unrenderedLayoutIndices:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_totalLayoutCount:null,_layoutItems:null,_layoutHeaderIndices:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==
a)return this._selectable;(this._selectable=a)||this.set_selectedLocation(null);return this._selectable},_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_ignoreSelectionChange:null,_ignoreLayoutChanges:null,itemToText:function(a){return H.string(a)},itemToEnabled:function(a){return!0},
itemToHeaderText:function(a){return H.string(a)},itemToItemRenderer:function(a){return a==null?null:typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},itemRendererToItem:function(a){if(a==null)return null;a=this.itemRendererToItemState.h[a.__id__];return a==null?null:a.data},locationToItemRenderer:function(a){if(this._dataProvider==null||!this.isValidLocation(a))return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToItemRenderer.h[a]:
this.objectDataToItemRenderer.h[a.__id__]},getItemRendererRecycler:function(a){return this._itemRendererRecyclerMap==null?null:this._itemRendererRecyclerMap.h[a]},setItemRendererRecycler:function(a,b){this._itemRendererRecyclerMap==null&&(this._itemRendererRecyclerMap=new G);b==null?(b=this._itemRendererRecyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._itemRendererRecyclerMap.h[a]=b,this.setInvalid(Yc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY))},getHeaderRendererRecycler:function(a){return this._headerRendererRecyclerMap==
null?null:this._headerRendererRecyclerMap.h[a]},setHeaderRendererRecycler:function(a,b){this._headerRendererRecyclerMap==null&&(this._headerRendererRecyclerMap=new G);b==null?(b=this._headerRendererRecyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._headerRendererRecyclerMap.h[a]=b,this.setInvalid(Yc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY))},_pendingScrollLocation:null,_pendingScrollDuration:null,scrollToLocation:function(a,b){this._dataProvider!=null&&this._dataProvider.getLength()!=
0&&(this._pendingScrollLocation=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(b!=null)b=this.itemRendererToItemState.h[b.__id__];else{var c=this._dataProvider.locationOf(a);if(c==null)return null;b=new sp;var d=c.length==1?Yf.HEADER:Yf.STANDARD,f=this.locationToDisplayIndex(c);this.populateCurrentItemState(a,d,c,f,b,!1)}return b},
dispose:function(){this.refreshInactiveItemRenderers(this._defaultItemStorage,!0);if(this._additionalItemStorage!=null)for(var a=0,b=this._additionalItemStorage.length;a<b;){var c=a++;c=this._additionalItemStorage[c];this.refreshInactiveItemRenderers(c,!0)}this.refreshInactiveItemRenderers(this._defaultHeaderStorage,!0);if(this._additionalHeaderStorage!=null)for(a=0,b=this._additionalHeaderStorage.length;a<b;)c=a++,c=this._additionalHeaderStorage[c],this.refreshInactiveItemRenderers(c,!0);this._selectedLocation=
this._selectedItem=null;this.set_dataProvider(null);Ab.prototype.dispose.call(this)},initializeGroupListViewTheme:function(){Cw.initialize()},update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&this.setInvalidationFlag(Yc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(Yc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);
if(a||b)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount),this.groupViewPort.set_layout(this.get_layout()),this._previousLayout=this.get_layout();this.groupViewPort.refreshChildren=m(this,this.refreshItemRenderers);for(a=this._invalidationFlags.keys();a.hasNext();)b=a.next(),this.groupViewPort.setInvalid(b);this._allInvalid&&this.groupViewPort.setInvalid();Ab.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();
this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();this.handlePendingScroll()},createScroller:function(){Ab.prototype.createScroller.call(this);this.groupViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Ab.prototype.refreshScrollerValues.call(this);if(w.__implements(this.get_layout(),ff)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=
a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.groupViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.groupViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&w.__implements(this.get_layout(),
Vh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._layoutItems.length,this.groupViewPort.get_visibleWidth(),this.groupViewPort.get_visibleHeight(),this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._layoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:
!0},refreshItemRenderers:function(a){this._layoutItems=a;this._defaultItemStorage.itemRendererRecycler.update==null&&(this._defaultItemStorage.itemRendererRecycler.update=Yc.defaultUpdateItemRenderer,this._defaultItemStorage.itemRendererRecycler.reset==null&&(this._defaultItemStorage.itemRendererRecycler.reset=Yc.defaultResetItemRenderer));this._defaultHeaderStorage.itemRendererRecycler.update==null&&(this._defaultHeaderStorage.itemRendererRecycler.update=Yc.defaultUpdateItemRenderer,this._defaultHeaderStorage.itemRendererRecycler.reset==
null&&(this._defaultHeaderStorage.itemRendererRecycler.reset=Yc.defaultResetItemRenderer));if(this._itemRendererRecyclerMap!=null){var b=this._itemRendererRecyclerMap.h;a=b;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Yc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Yc.defaultResetItemRenderer))}}if(this._headerRendererRecyclerMap!=null)for(a=b=this._headerRendererRecyclerMap.h,b=Object.keys(b),c=b.length,d=0;d<c;)f=a[b[d++]],f.update==
null&&f.update==null&&(f.update=Yc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Yc.defaultResetItemRenderer));a=this.groupViewPort.isInvalid(Yc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);b=this.groupViewPort.isInvalid(Yc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveItemRenderers(this._defaultItemStorage,a);if(this._additionalItemStorage!=null)for(c=0,d=this._additionalItemStorage.length;c<d;)f=c++,f=this._additionalItemStorage[f],this.refreshInactiveItemRenderers(f,a);this.refreshInactiveItemRenderers(this._defaultHeaderStorage,
b);if(this._additionalHeaderStorage!=null)for(c=0,d=this._additionalHeaderStorage.length;c<d;)f=c++,f=this._additionalHeaderStorage[f],this.refreshInactiveItemRenderers(f,b);this.findUnrenderedData();this.recoverInactiveItemRenderers(this._defaultItemStorage);if(this._additionalItemStorage!=null)for(c=0,d=this._additionalItemStorage.length;c<d;)f=c++,f=this._additionalItemStorage[f],this.recoverInactiveItemRenderers(f);this.recoverInactiveItemRenderers(this._defaultHeaderStorage);if(this._additionalHeaderStorage!=
null)for(c=0,d=this._additionalHeaderStorage.length;c<d;)f=c++,f=this._additionalHeaderStorage[f],this.recoverInactiveItemRenderers(f);this.renderUnrenderedData();this.freeInactiveItemRenderers(this._defaultItemStorage);if(this._defaultItemStorage.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive item renderers should be empty after updating.");if(this._additionalItemStorage!=null)for(c=0,d=this._additionalItemStorage.length;c<d;)if(f=c++,f=this._additionalItemStorage[f],
this.freeInactiveItemRenderers(f),f.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive item renderers "+f.id+" should be empty after updating.");this.freeInactiveItemRenderers(this._defaultHeaderStorage);if(this._defaultHeaderStorage.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive header renderers should be empty after updating.");if(this._additionalHeaderStorage!=null)for(c=0,d=this._additionalHeaderStorage.length;c<d;)if(f=
c++,f=this._additionalHeaderStorage[f],this.freeInactiveItemRenderers(f),f.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive header renderers "+f.id+" should be empty after updating.");},refreshInactiveItemRenderers:function(a,b){var c=a.inactiveItemRenderers;a.inactiveItemRenderers=a.activeItemRenderers;a.activeItemRenderers=c;if(a.activeItemRenderers.length>0)throw b=w.getClass(this),new ob(""+b.__name__+": active "+H.string(a.type)+" renderers should be empty before updating.");
b&&(this.recoverInactiveItemRenderers(a),this.freeInactiveItemRenderers(a),a.oldItemRendererRecycler=null)},recoverInactiveItemRenderers:function(a){for(var b=0,c=a.inactiveItemRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.itemRendererToItemState.h[d.__id__];if(f!=null){var g=f.data;this.itemRendererToItemState.remove(d);if(typeof g=="string"){var h=this.stringDataToItemRenderer;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}else this.objectDataToItemRenderer.remove(g);
a.type==Yf.STANDARD&&(d.removeEventListener("trigger",m(this,this.groupListView_itemRenderer_triggerHandler)),d.removeEventListener("click",m(this,this.groupListView_itemRenderer_clickHandler)),d.removeEventListener("touchTap",m(this,this.groupListView_itemRenderer_touchTapHandler)),d.removeEventListener("change",m(this,this.groupListView_itemRenderer_changeHandler)));d.removeEventListener("resize",m(this,this.groupListView_itemRenderer_resizeHandler));this.resetItemRenderer(d,f,a);a.measurements!=
null&&a.measurements.restore(d);this.itemStatePool.release(f)}}}},freeInactiveItemRenderers:function(a){for(var b=a.oldItemRendererRecycler!=null?a.oldItemRendererRecycler:a.itemRendererRecycler,c=0,d=a.inactiveItemRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyItemRenderer(f,b)}a.inactiveItemRenderers.length=0},findUnrenderedData:function(){this._layoutItems.length=0;this._layoutItems.length=this._totalLayoutCount;this._layoutHeaderIndices.length=0;if(this._virtualLayout&&w.__implements(this.get_layout(),
Vh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._layoutItems.length,this.groupViewPort.get_visibleWidth(),this.groupViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,this._visibleIndices.end=this._layoutItems.length-1;this.findUnrenderedDataForLocation([],
0)},findUnrenderedDataForLocation:function(a,b){if(this._dataProvider==null)return b;for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);f=this._dataProvider.get(a);b<this._visibleIndices.start||b>this._visibleIndices.end?(this._layoutItems[b]=null,a.length==1&&this._layoutHeaderIndices.push(b)):this.findItemRenderer(f,a.slice(),b);++b;if(b>this._visibleIndices.end)break;if(a.length==1&&this._dataProvider.isBranch(f)&&(b=this.findUnrenderedDataForLocation(a,b),b>this._visibleIndices.end))break;
a.pop()}return b},findItemRenderer:function(a,b,c){var d=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(d==null)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);else{var f=this.itemRendererToItemState.h[d.__id__];a=this.populateCurrentItemState(a,b.length==1?Yf.HEADER:Yf.STANDARD,b,c,f,this._forceItemStateUpdate);var g=f.recyclerID,h=this.itemStateToStorage(f);if(h.id!=g)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);
else{a&&this.updateItemRenderer(d,f,h);d.set_visible(!0);this._layoutItems[c]=d;f.type==Yf.HEADER&&this._layoutHeaderIndices.push(c);if(!V.remove(h.inactiveItemRenderers,d))throw c=w.getClass(this),new ob(""+c.__name__+": item renderer map contains bad data for item at location "+H.string(b)+". This may be caused by duplicate items in the data provider, which is not allowed.");h.activeItemRenderers.push(d)}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedLocations;a<b.length;){var c=
b[a];++a;var d=this._dataProvider.get(c),f=c.length==1?Yf.HEADER:Yf.STANDARD,g=this._unrenderedLayoutIndices.shift(),h=this.itemStatePool.get();this.populateCurrentItemState(d,f,c,g,h,!0);c=this.createItemRenderer(h);c.set_visible(!0);this.groupViewPort.addChild(c);this._layoutItems[g]=c;f==Yf.HEADER&&this._layoutHeaderIndices.push(g)}this._unrenderedLocations.length=0},createItemRenderer:function(a){var b=this.itemStateToStorage(a);if(b.inactiveItemRenderers.length==0){var c=b.itemRendererRecycler.create();
if(w.__implements(c,nd)){var d=c;if(d.get_variant()==null){var f=a.type==Yf.HEADER?this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():Yc.CHILD_VARIANT_HEADER_RENDERER:this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():Yc.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}w.__implements(c,Fa)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);a.type==Yf.STANDARD&&
(w.__implements(c,Qh)?c.addEventListener("trigger",m(this,this.groupListView_itemRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.groupListView_itemRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.groupListView_itemRenderer_touchTapHandler))),w.__implements(c,ud)&&c.addEventListener("change",m(this,this.groupListView_itemRenderer_changeHandler)));w.__implements(c,rb)&&c.addEventListener("resize",m(this,this.groupListView_itemRenderer_resizeHandler));this.itemRendererToItemState.set(c,
a);a=a.data;typeof a=="string"?this.stringDataToItemRenderer.h[a]=c:this.objectDataToItemRenderer.set(a,c);b.activeItemRenderers.push(c);return c},destroyItemRenderer:function(a,b){this.groupViewPort.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},itemOrHeaderStateToStorage:function(a,b,c,d,f){var g=null;b!=null&&(g=b(a));b=null;if(g!=null&&(c!=null&&(b=c.h[g]),b==null))throw new ob('Item renderer recycler ID "'+g+'" is not registered.');if(b==null)return d;c=0;for(d=f.length;c<d;){var h=c++;
h=f[h];if(h.itemRendererRecycler==b)return h}h=new tp(a.type,g,b);f.push(h);return h},itemStateToStorage:function(a){return a.type==Yf.HEADER?this.itemOrHeaderStateToStorage(a,this._headerRendererRecyclerIDFunction,this._headerRendererRecyclerMap,this._defaultHeaderStorage,this._additionalHeaderStorage):this.itemOrHeaderStateToStorage(a,this._itemRendererRecyclerIDFunction,this._itemRendererRecyclerMap,this._defaultItemStorage,this._additionalItemStorage)},populateCurrentItemState:function(a,b,c,
d,f,g){var h=!1;if(g||f.owner!=this)f.owner=this,h=!0;if(g||f.type!=b)f.type=b,h=!0;if(g||f.data!=a)f.data=a,h=!0;if(g||f.location!=c&&this.compareLocations(f.location,c)!=0)f.location=c,h=!0;if(g||f.layoutIndex!=d)f.layoutIndex=d,h=!0;c=c.length>1&&a==this._selectedItem;if(g||f.selected!=c)f.selected=c,h=!0;c=this._enabled&&this.itemToEnabled(a);if(g||f.enabled!=c)f.enabled=c,h=!0;a=b==Yf.HEADER?this.itemToHeaderText(a):this.itemToText(a);if(g||f.text!=a)f.text=a,h=!0;return h},updateItemRenderer:function(a,
b,c){b.recyclerID=c.id;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c.itemRendererRecycler.update!=null&&c.itemRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,b)},resetItemRenderer:function(a,b,c){c=c.oldItemRendererRecycler!=null?c.oldItemRendererRecycler:c.itemRendererRecycler;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,
Yc.RESET_ITEM_STATE)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.data);w.__implements(a,ri)&&a.set_layoutIndex(b.layoutIndex);w.__implements(a,up)&&(a.set_location(b.location),a.set_groupListViewOwner(b.owner));w.__implements(a,ud)&&a.set_selected(b.selected);this._ignoreSelectionChange=c},refreshSelectedLocationAfterFilterOrSort:function(){this._selectedLocation!=
null&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},calculateTotalLayoutCount:function(a){if(this._dataProvider==null)return 0;for(var b=this._dataProvider.getLength(a),c=b,d=0;d<b;){var f=d++;a.push(f);f=this._dataProvider.get(a);a.length==1&&this._dataProvider.isBranch(f)&&(c+=this.calculateTotalLayoutCount(a));a.pop()}return c},containsLocation:function(a,b){if(a==null||b==null||a.length>=b.length)return!1;for(var c=0,d=a.length;c<d;){var f=c++;if(a[f]!=b[f])return!1}return!0},
compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=0;g<f;){var h=g++,n=a[h];h=b[h];if(n<h)return-1;if(n>h)return 1}return c<d?-1:c>d?1:0},_currentDisplayIndex:null,displayIndexToLocation:function(a){if(a<0)return null;this._currentDisplayIndex=-1;return this.displayIndexToLocationAtBranch(a,[])},displayIndexToLocationAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(b);c<d;){var f=c++;
this._currentDisplayIndex++;b[b.length]=f;if(this._currentDisplayIndex==a)return b;f=this._dataProvider.get(b);if(b.length==1&&this._dataProvider.isBranch(f)&&(f=this.displayIndexToLocationAtBranch(a,b),f!=null))return f;--b.length}return null},locationToDisplayIndex:function(a){this._currentDisplayIndex=-1;return this.locationToDisplayIndexAtBranch([],a)},locationToDisplayIndexAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;this._currentDisplayIndex++;a[a.length]=
f;if(this.compareLocations(a,b)==0)return this._currentDisplayIndex;f=this._dataProvider.get(a);if(a.length==1&&this._dataProvider.isBranch(f)&&(f=this.locationToDisplayIndexAtBranch(a,b),f!=-1))return f;--a.length}return-1},isValidLocation:function(a){for(var b=[],c=0;c<a.length;){var d=a[c];++c;if(d<0||d>=this._dataProvider.getLength(b))return!1;b.push(d)}return!0},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._layoutItems.length!=0){var b=null,c=this.locationToDisplayIndex(this._selectedLocation),
d=c;if(w.__implements(this.get_layout(),Oj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;d=this.get_layout().findNextKeyboardIndex(d,a,!1,this._layoutItems,this._layoutHeaderIndices,this.groupViewPort.get_visibleWidth(),this.groupViewPort.get_visibleHeight());b=this.displayIndexToLocation(d);if(b==null||b.length!=2)return}else for(var f=!0,g=a.keyCode,h=-1;f;){f=!1;switch(g){case 33:--d;break;case 34:++d;break;case 35:d=
this._layoutItems.length-1;g=38;break;case 36:d=0;g=40;break;case 37:--d;break;case 38:--d;break;case 39:++d;break;case 40:++d;break;default:return}d<0?d=0:d>=this._layoutItems.length&&(d=this._layoutItems.length-1);b=this.displayIndexToLocation(d);if(b.length!=2){if(d==h)return;f=!0}h=d}c=d!=c;c||d==-1||(this.itemToItemRenderer(this._dataProvider.get(b))==null?c=!0:w.__implements(this.get_layout(),ff)&&(d=this.get_layout().getNearestScrollPositionForIndex(d,this._layoutItems.length,this.get_viewPort().get_visibleWidth(),
this.get_viewPort().get_visibleHeight()),this.get_scrollX()!=d.x||this.get_scrollY()!=d.y)&&(c=!0));c&&(a.preventDefault(),this.set_selectedLocation(b),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},handleSelectionChange:function(a,b,c,d){b!=null&&b.length==2&&this._selectable?(this.set_selectedLocation(b),b!=null&&this.scrollToLocation(b)):this.set_selectedItem(null)},
handlePendingScroll:function(){if(this._pendingScrollLocation!=null){var a=this._pendingScrollLocation,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollDuration=this._pendingScrollLocation=null;if(this._dataProvider!=null&&this._dataProvider.getLength()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(w.__implements(this.get_layout(),ff))c=this.locationToDisplayIndex(a),d=this.get_layout().getNearestScrollPositionForIndex(c,this._layoutItems.length,this.get_viewPort().get_visibleWidth(),
this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},
baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):Ab.prototype.baseScrollContainer_keyDownHandler.call(this,a)},groupListView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==32||a.keyCode==13)&&this._selectedItem!=null){var b=typeof this._selectedItem=="string"?this.stringDataToItemRenderer.h[this._selectedItem]:
this.objectDataToItemRenderer.h[this._selectedItem.__id__];a=null;b!=null&&(a=this.itemRendererToItemState.h[b.__id__]);b=!1;a==null&&(b=!0,a=this.itemStatePool.get());var c=this._selectedLocation.length==1?Yf.HEADER:Yf.STANDARD,d=this.locationToDisplayIndex(this._selectedLocation);this.populateCurrentItemState(this._selectedItem,c,this._selectedLocation,d,a,!0);ti.dispatch(this,"itemTrigger",a);b&&this.itemStatePool.release(a)}},groupListView_itemRenderer_touchTapHandler:function(a){if(this._enabled&&
!a.isPrimaryTouchPoint){var b=w.__cast(a.currentTarget,ma);b=this.itemRendererToItemState.h[b.__id__];ti.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,b.location,a.ctrlKey,a.shiftKey)}},groupListView_itemRenderer_clickHandler:function(a){if(this._enabled){var b=w.__cast(a.currentTarget,ma);b=this.itemRendererToItemState.h[b.__id__];ti.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,
b.location,a.ctrlKey,a.shiftKey)}},groupListView_itemRenderer_triggerHandler:function(a){if(this._enabled){var b=w.__cast(a.currentTarget,ma);b=this.itemRendererToItemState.h[b.__id__];ti.dispatch(this,"itemTrigger",b);this._selectable&&this.handleSelectionChange(b.data,b.location,a.ctrlKey,a.shiftKey)}},groupListView_itemRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},groupListView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=w.__cast(a.currentTarget,
ma);a=w.__cast(b,ud);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},groupListView_dataProvider_changeHandler:function(a){this._totalLayoutCount=this.calculateTotalLayoutCount([]);this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount);this.setInvalid(x.DATA)},groupListView_dataProvider_addItemHandler:function(a){this._selectedLocation!=null&&this.compareLocations(this._selectedLocation,a.location)>=
0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},groupListView_dataProvider_removeItemHandler:function(a){this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):(a=this.compareLocations(this._selectedLocation,a.location),a==0?this.set_selectedLocation(null):a>0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))))},groupListView_dataProvider_replaceItemHandler:function(a){this._selectedLocation!=
null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):this.compareLocations(this._selectedLocation,a.location)==0&&(this._selectedItem=this._dataProvider.get(a.location),Y.dispatch(this,"change")))},groupListView_dataProvider_removeAllHandler:function(a){this.set_selectedLocation(null)},groupListView_dataProvider_resetHandler:function(a){this.set_selectedLocation(null)},groupListView_dataProvider_sortChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},
groupListView_dataProvider_filterChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},updateItemRendererForLocation:function(a){var b=this.locationToDisplayIndex(a);this._virtualCache!=null&&(this._virtualCache[b]=null);var c=this._dataProvider.get(a),d=a.length==1?Yf.HEADER:Yf.STANDARD;var f=typeof c=="string"?this.stringDataToItemRenderer.h[c]:this.objectDataToItemRenderer.h[c.__id__];if(f==null)this.setInvalid(x.DATA);else{var g=this.itemRendererToItemState.h[f.__id__];if(g.owner!=
null){var h=this.itemStateToStorage(g);this.populateCurrentItemState(c,d,a,b,g,!0);this.resetItemRenderer(f,g,h);h.measurements!=null&&h.measurements.restore(f);g.owner=null;this.setInvalid(x.DATA)}}if(d==Yf.HEADER)for(b=0,c=this._dataProvider.getLength(a);b<c;)d=b++,a.push(d),this.updateItemRendererForLocation(a),a.pop()},groupListView_dataProvider_updateItemHandler:function(a){this.updateItemRendererForLocation(a.location)},groupListView_dataProvider_updateAllHandler:function(a){a=[];for(var b=
0,c=this._dataProvider.getLength();b<c;){var d=b++;a[0]=d;this.updateItemRendererForLocation(a)}},get_styleContext:function(){return Yc},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__customHeaderRendererVariant:null,
get_customHeaderRendererVariant:function(){return this.__customHeaderRendererVariant},set_customHeaderRendererVariant:function(a){if(!this.setStyle("customHeaderRendererVariant")||this.__customHeaderRendererVariant==a)return this.__customHeaderRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderRendererVariant);this.__customHeaderRendererVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderRendererVariant},clearStyle_customHeaderRendererVariant:function(){this.set_customHeaderRendererVariant(null);
return this.get_customHeaderRendererVariant()},__customItemRendererVariant:null,get_customItemRendererVariant:function(){return this.__customItemRendererVariant},set_customItemRendererVariant:function(a){if(!this.setStyle("customItemRendererVariant")||this.__customItemRendererVariant==a)return this.__customItemRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customItemRendererVariant);this.__customItemRendererVariant=a;this.setInvalid(x.STYLES);return this.__customItemRendererVariant},
clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);return this.get_customItemRendererVariant()},__class__:Yc,__properties__:I(Ab.prototype.__properties__,{set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_selectable:"set_selectable",get_selectable:"get_selectable",set_headerRendererRecyclerIDFunction:"set_headerRendererRecyclerIDFunction",get_headerRendererRecyclerIDFunction:"get_headerRendererRecyclerIDFunction",set_itemRendererRecyclerIDFunction:"set_itemRendererRecyclerIDFunction",
get_itemRendererRecyclerIDFunction:"get_itemRendererRecyclerIDFunction",set_headerRendererRecycler:"set_headerRendererRecycler",get_headerRendererRecycler:"get_headerRendererRecycler",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_customItemRendererVariant:"set_customItemRendererVariant",get_customItemRendererVariant:"get_customItemRendererVariant",
set_customHeaderRendererVariant:"set_customHeaderRendererVariant",get_customHeaderRendererVariant:"get_customHeaderRendererVariant",set_layout:"set_layout",get_layout:"get_layout",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",set_selectedLocation:"set_selectedLocation",get_selectedLocation:"get_selectedLocation",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});
var tp=function(a,b,c){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.type=a;this.id=b;this.itemRendererRecycler=c};t["feathers.controls._GroupListView.ItemRendererStorage"]=tp;tp.__name__="feathers.controls._GroupListView.ItemRendererStorage";tp.prototype={type:null,id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,inactiveItemRenderers:null,measurements:null,__class__:tp};var kk=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);
this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__indeterminateDuration=.75;this.__indeterminateFillSkin=null;this.__fillMode=rt.RESIZE;this._backgroundSkinMeasurements=this._currentBackgroundSkin=this._fillSkinMeasurements=this._currentFillSkin=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__fillSkin=this.__disabledFillSkin=null;this._indeterminateActive=this._reversedIndeterminate=this._indeterminate=!1;this._maximum=1;this._value=this._minimum=0;
fa.call(this);this.set_minimum(b);this.set_maximum(c);this.set_value(a);d!=null&&this.addEventListener("change",d)};t["feathers.controls.supportClasses.BaseProgressBar"]=kk;kk.__name__="feathers.controls.supportClasses.BaseProgressBar";kk.__interfaces__=[Dl];kk.__super__=fa;kk.prototype=I(fa.prototype,{_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._value=a;this.setInvalid(x.DATA);Y.dispatch(this,"change");return this._value},_minimum:null,
get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;this._minimum=a;this.get_initialized()&&this._value<this._minimum&&this.set_value(this._minimum);this.setInvalid(x.DATA);return this._minimum},_maximum:null,get_maximum:function(){return this._maximum},set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.get_initialized()&&this._value>this._maximum&&this.set_value(this._maximum);this.setInvalid(x.DATA);return this._maximum},
_indeterminateActive:null,_lastIndeterminateUpdateTime:null,_reversedIndeterminate:null,_savedIndeterminateFillSkinAlpha:null,_indeterminate:null,get_indeterminate:function(){return this._indeterminate},set_indeterminate:function(a){if(this._indeterminate==a)return this._indeterminate;this._indeterminate=a;this.setInvalid(x.STATE);return this._indeterminate},_backgroundSkinMeasurements:null,_currentBackgroundSkin:null,_fillSkinMeasurements:null,_currentFillSkin:null,setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},update:function(){var a=this.isInvalid(x.STYLES),b=this.isInvalid(x.STATE);if(a||b)this.refreshBackgroundSkin(),this.refreshFillSkin();this.measure();this.layoutContent()},measure:function(){var a=w.getClass(this);throw new Ce("Missing override for 'measure' in type "+a.__name__);},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=
a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),
w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshFillSkin:function(){var a=this._currentFillSkin;this._currentFillSkin=this.getCurrentFillSkin();this._currentFillSkin!=a&&(this.removeCurrentFillSkin(a),this.addCurrentFillSkin(this._currentFillSkin));!this._indeterminate&&this._indeterminateActive&&a!=
null?(a.set_alpha(this._savedIndeterminateFillSkinAlpha),this._indeterminateActive=!1,this.removeEventListener("enterFrame",m(this,this.baseProgressBar_enterFrameHandler))):this._indeterminate&&!this._indeterminateActive&&this._currentFillSkin!=null&&(this._savedIndeterminateFillSkinAlpha=this._currentFillSkin.get_alpha(),this._indeterminateActive=!0,this._lastIndeterminateUpdateTime=Pa.getTimer(),this.addEventListener("enterFrame",m(this,this.baseProgressBar_enterFrameHandler)))},getCurrentFillSkin:function(){return this._enabled||
this.get_disabledFillSkin()==null?this._indeterminate&&this.get_indeterminateFillSkin()!=null?this.get_indeterminateFillSkin():this.get_fillSkin():this.get_disabledFillSkin()},addCurrentFillSkin:function(a){a==null?this._fillSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._fillSkinMeasurements==null?this._fillSkinMeasurements=new Sb(a):this._fillSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentFillSkin:function(a){a!=null&&(w.__implements(a,
qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},layoutContent:function(){this.layoutBackground();this.layoutFill()},layoutBackground:function(){var a=w.getClass(this);throw new Ce("Missing override for 'layoutBackground' in type "+a.__name__);},layoutFill:function(){var a=w.getClass(this);throw new Ce("Missing override for 'layoutFill' in type "+a.__name__);},baseProgressBar_enterFrameHandler:function(a){if(this._enabled&&this.get_visible()&&this._indeterminate){a=Pa.getTimer();var b=
(a-this._lastIndeterminateUpdateTime)/(this.get_indeterminateDuration()*1E3);b>=1&&(b-=Math.floor(b),this._lastIndeterminateUpdateTime=a,this._reversedIndeterminate=!this._reversedIndeterminate);w.__implements(this._currentFillSkin,xm)?this._currentFillSkin.set_indeterminatePosition(b):this._currentFillSkin.set_alpha(this._savedIndeterminateFillSkinAlpha*(this._reversedIndeterminate?1-b:b))}},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||
this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==
a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__fillSkin:null,get_fillSkin:function(){return this.__fillSkin},set_fillSkin:function(a){if(!this.setStyle("fillSkin")||this.__fillSkin==a)return this.__fillSkin;this._previousClearStyle=
m(this,this.clearStyle_fillSkin);this.__fillSkin=a;this.setInvalid(x.STYLES);return this.__fillSkin},clearStyle_fillSkin:function(){this.set_fillSkin(null);return this.get_fillSkin()},__disabledFillSkin:null,get_disabledFillSkin:function(){return this.__disabledFillSkin},set_disabledFillSkin:function(a){if(!this.setStyle("disabledFillSkin")||this.__disabledFillSkin==a)return this.__disabledFillSkin;this._previousClearStyle=m(this,this.clearStyle_disabledFillSkin);this.__disabledFillSkin=a;this.setInvalid(x.STYLES);
return this.__disabledFillSkin},clearStyle_disabledFillSkin:function(){this.set_disabledFillSkin(null);return this.get_disabledFillSkin()},__fillMode:null,get_fillMode:function(){return this.__fillMode},set_fillMode:function(a){if(!this.setStyle("fillMode")||this.__fillMode==a)return this.__fillMode;this._previousClearStyle=m(this,this.clearStyle_fillMode);this.__fillMode=a;this.setInvalid(x.STYLES);return this.__fillMode},clearStyle_fillMode:function(){this.set_fillMode(rt.RESIZE);return this.get_fillMode()},
__indeterminateFillSkin:null,get_indeterminateFillSkin:function(){return this.__indeterminateFillSkin},set_indeterminateFillSkin:function(a){if(!this.setStyle("indeterminateFillSkin")||this.__indeterminateFillSkin==a)return this.__indeterminateFillSkin;this._previousClearStyle=m(this,this.clearStyle_indeterminateFillSkin);this.__indeterminateFillSkin=a;this.setInvalid(x.STYLES);return this.__indeterminateFillSkin},clearStyle_indeterminateFillSkin:function(){this.set_indeterminateFillSkin(null);return this.get_indeterminateFillSkin()},
__indeterminateDuration:null,get_indeterminateDuration:function(){return this.__indeterminateDuration},set_indeterminateDuration:function(a){if(!this.setStyle("indeterminateDuration")||this.__indeterminateDuration==a)return this.__indeterminateDuration;this._previousClearStyle=m(this,this.clearStyle_indeterminateDuration);this.__indeterminateDuration=a;this.setInvalid(x.STYLES);return this.__indeterminateDuration},clearStyle_indeterminateDuration:function(){this.set_indeterminateDuration(.75);return this.get_indeterminateDuration()},
__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||
this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=
m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);
return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__class__:kk,__properties__:I(fa.prototype.__properties__,{set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_indeterminateDuration:"set_indeterminateDuration",
get_indeterminateDuration:"get_indeterminateDuration",set_indeterminateFillSkin:"set_indeterminateFillSkin",get_indeterminateFillSkin:"get_indeterminateFillSkin",set_fillMode:"set_fillMode",get_fillMode:"get_fillMode",set_disabledFillSkin:"set_disabledFillSkin",get_disabledFillSkin:"get_disabledFillSkin",set_fillSkin:"set_fillSkin",get_fillSkin:"get_fillSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",
get_backgroundSkin:"get_backgroundSkin",set_indeterminate:"set_indeterminate",get_indeterminate:"get_indeterminate",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var qm=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeHProgressBarTheme();kk.call(this,a,b,c,d)};t["feathers.controls.HProgressBar"]=qm;qm.__name__="feathers.controls.HProgressBar";qm.__super__=kk;qm.prototype=
I(kk.prototype,{_currentMask:null,initializeHProgressBarTheme:function(){Fw.initialize()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._backgroundSkinMeasurements!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);w.__implements(this._currentBackgroundSkin,
rb);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();c=this.get_explicitWidth();a&&(c=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.width:0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.height:0);b=this.get_explicitMinWidth();d=this.get_explicitMinHeight();f=this.get_explicitMaxWidth();g=this.get_explicitMaxHeight();return this.saveMeasurements(c,a,b,d,f,g)},layoutBackground:function(){this._currentBackgroundSkin!=
null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},layoutFill:function(){if(this._currentFillSkin!=null){var a=1;this._minimum!=this._maximum&&(a=
(this._value-this._minimum)/(this._maximum-this._minimum),a<0?a=0:a>1&&(a=1));var b=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a=this._indeterminate?b:Math.round(a*b);this._currentFillSkin.set_x(this.get_paddingLeft());this._currentFillSkin.set_y(this.get_paddingTop());this._currentFillSkin.set_height(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom());switch(this.get_fillMode()._hx_index){case 0:this._currentFillSkin.set_scrollRect(null);this._currentMask==null&&
(this._currentMask=new Za(ub.SolidColor(16711935)),this.addChild(this._currentMask));this._currentFillSkin.set_mask(this._currentMask);this._currentFillSkin.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight());this._currentMask.set_x(this._currentFillSkin.get_x());this._currentMask.set_y(this._currentFillSkin.get_y());this._currentMask.set_width(a);this._currentMask.set_height(this._currentFillSkin.get_height());break;case 1:this._currentFillSkin.set_width(this.actualWidth-this.get_paddingLeft()-
this.get_paddingRight());this._currentFillSkin.set_scrollRect(new Ia(0,0,a,this._currentFillSkin.get_height()));break;case 2:this._currentFillSkin.set_mask(null),this._currentFillSkin.set_scrollRect(null),this._currentMask!=null&&(this._currentMask.parent==this&&this.removeChild(this._currentMask),this._currentMask=null),this._fillSkinMeasurements.minWidth!=null&&a<this._fillSkinMeasurements.minWidth?(a=this._fillSkinMeasurements.minWidth,this._currentFillSkin.set_visible(this._value>this._minimum)):
this._currentFillSkin.set_visible(!0),this._currentFillSkin.set_width(a)}w.__implements(this._currentFillSkin,da)&&this._currentFillSkin.validateNow()}},get_styleContext:function(){return qm},__class__:qm});var lk=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.__minimumPadding=this.__maximumPadding=0;this.__thumbSkin=this.__trackSkin=this.__secondaryTrackSkin=null;this._pointerStartX=this._pointerStartY=this._thumbStartX=this._thumbStartY=0;this._dragging=!1;this._currentThumbSkin=
this._thumbSkinMeasurements=this._currentTrackSkin=this._trackSkinMeasurements=this._currentSecondaryTrackSkin=this._secondaryTrackSkinMeasurements=null;this.liveDragging=!0;this._snapInterval=0;this._step=.01;this._maximum=1;this._value=this._minimum=0;this._isDefaultValue=!0;fa.call(this);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.set_minimum(b);this.set_maximum(c);this.set_value(a);d!=null&&this.addEventListener("change",d)};t["feathers.controls.supportClasses.BaseSlider"]=lk;lk.__name__=
"feathers.controls.supportClasses.BaseSlider";lk.__interfaces__=[qd,Dl];lk.__super__=fa;lk.prototype=I(fa.prototype,{_isDefaultValue:null,_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._isDefaultValue=!1;this._value=a;this.setInvalid(x.DATA);!this.liveDragging&&this._dragging||Y.dispatch(this,"change");return this._value},_minimum:null,get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;
this._minimum=a;this.setInvalid(x.DATA);return this._minimum},_maximum:null,get_maximum:function(){return this._maximum},set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.setInvalid(x.DATA);return this._maximum},_step:null,get_step:function(){return this._step},set_step:function(a){if(this._step==a)return this._step;this._step=a;this.setInvalid(x.DATA);return this._step},_snapInterval:null,get_snapInterval:function(){return this._snapInterval},set_snapInterval:function(a){if(this._snapInterval==
a)return this._snapInterval;this._snapInterval=a;this.setInvalid(x.DATA);return this._snapInterval},liveDragging:null,_currentThumbSkin:null,_thumbSkinMeasurements:null,_currentTrackSkin:null,_trackSkinMeasurements:null,_currentSecondaryTrackSkin:null,_secondaryTrackSkinMeasurements:null,_dragging:null,_pointerStartX:null,_pointerStartY:null,_thumbStartX:null,_thumbStartY:null,showFocus:function(a){fa.prototype.showFocus.call(this,a);if(w.__implements(this._currentThumbSkin,qd)){var b=this._currentThumbSkin;
b.get_focusEnabled()&&b.showFocus(a)}},applyValueRestrictions:function(){this.set_value(this.restrictValue(this._value))},initialize:function(){fa.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){this.isInvalid(x.SIZE);var a=this.isInvalid(x.STATE),b=this.isInvalid(x.STYLES);b&&(this.refreshThumb(),this.refreshTrack(),this.refreshSecondaryTrack());(a||b)&&this.refreshEnabled();this.measure();this.layoutContent()},measure:function(){var a=
w.getClass(this);throw new Ce("Missing override for 'measure' in type "+a.__name__);},refreshThumb:function(){var a=this._currentThumbSkin;this._currentThumbSkin=this.get_thumbSkin();this._currentThumbSkin!=a&&(a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.removeEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),this.removeChild(a)),this._currentThumbSkin!=null?(w.__implements(this._currentThumbSkin,Fa)&&this._currentThumbSkin.initializeNow(),this._thumbSkinMeasurements==
null?this._thumbSkinMeasurements=new Sb(this._currentThumbSkin):this._thumbSkinMeasurements.save(this._currentThumbSkin),this.addChild(this._currentThumbSkin),this._currentThumbSkin.addEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),w.__implements(this._currentThumbSkin,qb)&&this._currentThumbSkin.set_uiContext(this)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=a&&(a!=
null&&(w.__implements(a,qb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentTrackSkin!=null?(w.__implements(this._currentTrackSkin,Fa)&&this._currentTrackSkin.initializeNow(),this._trackSkinMeasurements==null?this._trackSkinMeasurements=new Sb(this._currentTrackSkin):this._trackSkinMeasurements.save(this._currentTrackSkin),this.addChildAt(this._currentTrackSkin,0),this._currentTrackSkin.addEventListener("mouseDown",
m(this,this.trackSkin_mouseDownHandler)),w.__implements(this._currentTrackSkin,qb)&&this._currentTrackSkin.set_uiContext(this)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentSecondaryTrackSkin!=
null?(w.__implements(this._currentSecondaryTrackSkin,Fa)&&this._currentSecondaryTrackSkin.initializeNow(),this._secondaryTrackSkinMeasurements==null?this._secondaryTrackSkinMeasurements=new Sb(this._currentSecondaryTrackSkin):this._secondaryTrackSkinMeasurements.save(this._currentSecondaryTrackSkin),this.addChildAt(this._currentSecondaryTrackSkin,this._currentTrackSkin!=null?1:0),this._currentSecondaryTrackSkin.addEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler)),w.__implements(this._currentSecondaryTrackSkin,
qb)&&this._currentSecondaryTrackSkin.set_uiContext(this)):this._secondaryTrackSkinMeasurements=null)},refreshEnabled:function(){w.__implements(this._currentThumbSkin,Fa)&&this._currentThumbSkin.set_enabled(this._enabled);w.__implements(this._currentTrackSkin,Fa)&&this._currentTrackSkin.set_enabled(this._enabled);w.__implements(this._currentSecondaryTrackSkin,Fa)&&this._currentSecondaryTrackSkin.set_enabled(this._enabled)},layoutContent:function(){this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=
null?this.layoutSplitTrack():this.layoutSingleTrack();this.layoutThumb()},layoutSplitTrack:function(){var a=w.getClass(this);throw new Ce("Missing override for 'layoutSplitTrack' in type "+a.__name__);},layoutSingleTrack:function(){var a=w.getClass(this);throw new Ce("Missing override for 'layoutSingleTrack' in type "+a.__name__);},layoutThumb:function(){var a=w.getClass(this);throw new Ce("Missing override for 'layoutThumb' in type "+a.__name__);},normalizeValue:function(a){var b=0;this._minimum!=
this._maximum&&(b=(a-this._minimum)/(this._maximum-this._minimum),b<0?b=0:b>1&&(b=1));return b},restrictValue:function(a){this._snapInterval!=0&&a!=this._minimum&&a!=this._maximum&&(a=We.roundToNearest(a,this._snapInterval));a<this._minimum?a=this._minimum:a>this._maximum&&(a=this._maximum);return a},valueToLocation:function(a){a=w.getClass(this);throw new Ce("Missing override for 'valueToLocation' in type "+a.__name__);},locationToValue:function(a,b){a=w.getClass(this);throw new Ce("Missing override for 'locationToValue' in type "+
a.__name__);},saveThumbStart:function(a,b){a=w.getClass(this);throw new Ce("Missing override for 'saveThumbStart' in type "+a.__name__);},thumbSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&(this.stage.addEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler),!1,0,!0),this._thumbStartX=this._currentThumbSkin.get_x(),this._thumbStartY=
this._currentThumbSkin.get_y(),this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=!0)},thumbSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),this.get_mouseY());a=this.restrictValue(a);this.set_value(a)},thumbSkin_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler));
this._dragging=!1;this.liveDragging||Y.dispatch(this,"change")},trackSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&(this.stage.addEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler),!1,0,!0),this.saveThumbStart(this.get_mouseX(),this.get_mouseY()),this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=
!0,a=this.locationToValue(this.get_mouseX(),this.get_mouseY()),a=this.restrictValue(a),this.set_value(a))},trackSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),this.get_mouseY());a=this.restrictValue(a);this.set_value(a)},trackSkin_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler));this._dragging=
!1;this.liveDragging||Y.dispatch(this,"change")},__thumbSkin:null,get_thumbSkin:function(){return this.__thumbSkin},set_thumbSkin:function(a){if(!this.setStyle("thumbSkin")||this.__thumbSkin==a)return this.__thumbSkin;this._previousClearStyle=m(this,this.clearStyle_thumbSkin);this.__thumbSkin=a;this.setInvalid(x.STYLES);return this.__thumbSkin},clearStyle_thumbSkin:function(){this.set_thumbSkin(null);return this.get_thumbSkin()},__trackSkin:null,get_trackSkin:function(){return this.__trackSkin},set_trackSkin:function(a){if(!this.setStyle("trackSkin")||
this.__trackSkin==a)return this.__trackSkin;this._previousClearStyle=m(this,this.clearStyle_trackSkin);this.__trackSkin=a;this.setInvalid(x.STYLES);return this.__trackSkin},clearStyle_trackSkin:function(){this.set_trackSkin(null);return this.get_trackSkin()},__secondaryTrackSkin:null,get_secondaryTrackSkin:function(){return this.__secondaryTrackSkin},set_secondaryTrackSkin:function(a){if(!this.setStyle("secondaryTrackSkin")||this.__secondaryTrackSkin==a)return this.__secondaryTrackSkin;this._previousClearStyle=
m(this,this.clearStyle_secondaryTrackSkin);this.__secondaryTrackSkin=a;this.setInvalid(x.STYLES);return this.__secondaryTrackSkin},clearStyle_secondaryTrackSkin:function(){this.set_secondaryTrackSkin(null);return this.get_secondaryTrackSkin()},__minimumPadding:null,get_minimumPadding:function(){return this.__minimumPadding},set_minimumPadding:function(a){if(!this.setStyle("minimumPadding")||this.__minimumPadding==a)return this.__minimumPadding;this._previousClearStyle=m(this,this.clearStyle_minimumPadding);
this.__minimumPadding=a;this.setInvalid(x.STYLES);return this.__minimumPadding},clearStyle_minimumPadding:function(){this.set_minimumPadding(0);return this.get_minimumPadding()},__maximumPadding:null,get_maximumPadding:function(){return this.__maximumPadding},set_maximumPadding:function(a){if(!this.setStyle("maximumPadding")||this.__maximumPadding==a)return this.__maximumPadding;this._previousClearStyle=m(this,this.clearStyle_maximumPadding);this.__maximumPadding=a;this.setInvalid(x.STYLES);return this.__maximumPadding},
clearStyle_maximumPadding:function(){this.set_maximumPadding(0);return this.get_maximumPadding()},__class__:lk,__properties__:I(fa.prototype.__properties__,{set_maximumPadding:"set_maximumPadding",get_maximumPadding:"get_maximumPadding",set_minimumPadding:"set_minimumPadding",get_minimumPadding:"get_minimumPadding",set_secondaryTrackSkin:"set_secondaryTrackSkin",get_secondaryTrackSkin:"get_secondaryTrackSkin",set_trackSkin:"set_trackSkin",get_trackSkin:"get_trackSkin",set_thumbSkin:"set_thumbSkin",
get_thumbSkin:"get_thumbSkin",set_snapInterval:"set_snapInterval",get_snapInterval:"get_snapInterval",set_step:"set_step",get_step:"get_step",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var Ln=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeHSliderTheme();lk.call(this,a,b,c,d);this.addEventListener("keyDown",m(this,this.hSlider_keyDownHandler))};t["feathers.controls.HSlider"]=
Ln;Ln.__name__="feathers.controls.HSlider";Ln.__super__=lk;Ln.prototype=I(lk.prototype,{initializeHSliderTheme:function(){Gw.initialize()},valueToLocation:function(a){w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow();a=this.normalizeValue(a);var b=this.actualWidth-this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(b-=this._currentThumbSkin.get_width());return Math.round(this.get_minimumPadding()+b*a)},locationToValue:function(a,b){b=this.actualWidth-
this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(b-=this._currentThumbSkin.get_width());a=a-this._pointerStartX-this.get_minimumPadding();return this._minimum+Math.min(Math.max(0,this._thumbStartX+a),b)/b*(this._maximum-this._minimum)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==
null;if(!(a||b||c||d||f||g))return!1;this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),w.__implements(this._currentSecondaryTrackSkin,
da)&&this._currentSecondaryTrackSkin.validateNow());f=this.get_explicitWidth();a&&(f=0,this._currentTrackSkin!=null&&(f+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(f+=this._currentSecondaryTrackSkin.get_width())));a=this.get_explicitHeight();b&&(a=0,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(a<this._currentTrackSkin.get_height()&&(a=this._currentTrackSkin.get_height()),this._currentSecondaryTrackSkin!=null&&
a<this._currentSecondaryTrackSkin.get_height()&&(a=this._currentSecondaryTrackSkin.get_height())));b=this.get_explicitMinWidth();c&&(b=0,this._currentTrackSkin!=null&&(b+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(b+=this._secondaryTrackSkinMeasurements.width)));c=this.get_explicitMinHeight();d&&(c=0,this._currentThumbSkin!=null&&(c+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(c<this._currentTrackSkin.get_height()&&(c=this._currentTrackSkin.get_height()),
this._currentSecondaryTrackSkin!=null&&a<this._currentSecondaryTrackSkin.get_height()&&(c=this._currentSecondaryTrackSkin.get_height())));return this.saveMeasurements(f,a,b,c)},saveThumbStart:function(a,b){var c=this.actualWidth;this._currentThumbSkin!=null&&(c-=this._currentThumbSkin.get_width(),a-=this._currentThumbSkin.get_width()/2);this._thumbStartX=Math.min(c-this.get_maximumPadding(),Math.max(this.get_minimumPadding(),a));this._thumbStartY=b},layoutSplitTrack:function(){var a=this.valueToLocation(this.get_value());
this._currentThumbSkin!=null&&(w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_width()/2));this._currentTrackSkin.set_x(0);this._currentTrackSkin.set_width(a);this._currentSecondaryTrackSkin.set_x(a);this._currentSecondaryTrackSkin.set_width(this.actualWidth-a);w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow();w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow();
this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2);this._currentSecondaryTrackSkin.set_y((this.actualHeight-this._currentSecondaryTrackSkin.get_height())/2)},layoutSingleTrack:function(){this._currentTrackSkin!=null&&(this._currentTrackSkin.set_x(0),this._currentTrackSkin.set_width(this.actualWidth),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow(),this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/
2))},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this.valueToLocation(this._value);this._currentThumbSkin.set_x(a);this._currentThumbSkin.set_y((this.actualHeight-this.get_thumbSkin().get_height())/2)}},hSlider_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()){var b=this._value;switch(a.keyCode){case 35:b=this._maximum;break;case 36:b=this._minimum;break;case 37:b-=this._step;break;case 39:b+=this._step;break;default:return}b<this._minimum?b=this._minimum:b>this._maximum&&
(b=this._maximum);a.preventDefault();this.set_value(b)}},get_styleContext:function(){return Ln},__class__:Ln});var mk=function(){};t["feathers.controls.IGroupedToggle"]=mk;mk.__name__="feathers.controls.IGroupedToggle";mk.__isInterface__=!0;mk.__interfaces__=[ud];mk.prototype={get_toggleGroup:null,set_toggleGroup:null,__class__:mk,__properties__:{set_toggleGroup:"set_toggleGroup",get_toggleGroup:"get_toggleGroup"}};var ct=function(a,b){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.id=
a;this.itemRendererRecycler=b};t["feathers.controls._ListView.ItemRendererStorage"]=ct;ct.__name__="feathers.controls._ListView.ItemRendererStorage";ct.prototype={id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,inactiveItemRenderers:null,measurements:null,__class__:ct};var sd=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.__textInputGap=this.__buttonGap=0;this.__buttonDirection=nj.HORIZONTAL;this.__textInputPosition=Wb.CENTER;this.__customDecrementButtonVariant=
this.__customIncrementButtonVariant=this.__customTextInputVariant=null;this._pendingTextInputChanges=!1;this._previousCustomDecrementButtonVariant=this._previousCustomIncrementButtonVariant=this._previousCustomTextInputVariant=null;this._editable=this._enableButtonsAtRangeLimits=!0;this._snapInterval=0;this._step=.01;this._maximum=1;this._value=this._minimum=0;this._isDefaultValue=!0;this.textInputMeasurements=new Sb;this.incrementButtonMeasurements=new Sb;this.decrementButtonMeasurements=new Sb;
this.initializeNumericStepperTheme();fa.call(this);this.addEventListener("focusIn",m(this,this.numericStepper_focusInHandler));this.set_minimum(b);this.set_maximum(c);this.set_value(a);d!=null&&this.addEventListener("change",d)};t["feathers.controls.NumericStepper"]=sd;sd.__name__="feathers.controls.NumericStepper";sd.__interfaces__=[Th,Dl];sd.__super__=fa;sd.prototype=I(fa.prototype,{decrementButton:null,incrementButton:null,textInput:null,decrementButtonMeasurements:null,incrementButtonMeasurements:null,
textInputMeasurements:null,_isDefaultValue:null,_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._isDefaultValue=!1;this._value=a;this.setInvalid(x.DATA);Y.dispatch(this,"change");return this._value},_minimum:null,get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;this._minimum=a;this.setInvalid(x.DATA);return this._minimum},_maximum:null,get_maximum:function(){return this._maximum},
set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.setInvalid(x.DATA);return this._maximum},_step:null,get_step:function(){return this._step},set_step:function(a){if(this._step==a)return this._step;this._step=a;this.setInvalid(x.DATA);return this._step},_snapInterval:null,get_snapInterval:function(){return this._snapInterval},set_snapInterval:function(a){if(this._snapInterval==a)return this._snapInterval;this._snapInterval=a;this.setInvalid(x.DATA);return this._snapInterval},
_editable:null,get_editable:function(){return this._editable},set_editable:function(a){if(this._editable==a)return this._editable;this._editable=a;this.setInvalid(x.STATE);return this._editable},_enableButtonsAtRangeLimits:null,get_enableButtonsAtRangeLimits:function(){return this._enableButtonsAtRangeLimits},set_enableButtonsAtRangeLimits:function(a){if(this._enableButtonsAtRangeLimits==a)return this._enableButtonsAtRangeLimits;this._enableButtonsAtRangeLimits=a;this.setInvalid(x.STATE);return this._enableButtonsAtRangeLimits},
_valueFormatFunction:null,get_valueFormatFunction:function(){return this._valueFormatFunction},set_valueFormatFunction:function(a){if(this._valueFormatFunction==a)return this._valueFormatFunction;this._valueFormatFunction=a;this.setInvalid(x.DATA);return this._valueFormatFunction},_valueParseFunction:null,get_valueParseFunction:function(){return this._valueParseFunction},set_valueParseFunction:function(a){if(this._valueParseFunction==a)return this._valueParseFunction;this._valueParseFunction=a;this.setInvalid(x.DATA);
return this._valueParseFunction},get_stageFocusTarget:function(){return this.textInput},_oldDecrementButtonFactory:null,_decrementButtonFactory:null,get_decrementButtonFactory:function(){return this._decrementButtonFactory},set_decrementButtonFactory:function(a){if(this._decrementButtonFactory==a)return this._decrementButtonFactory;this._decrementButtonFactory=a;this.setInvalid(sd.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);return this._decrementButtonFactory},_oldIncrementButtonFactory:null,_incrementButtonFactory:null,
get_incrementButtonFactory:function(){return this._incrementButtonFactory},set_incrementButtonFactory:function(a){if(this._incrementButtonFactory==a)return this._incrementButtonFactory;this._incrementButtonFactory=a;this.setInvalid(sd.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);return this._incrementButtonFactory},_oldTextInputFactory:null,_textInputFactory:null,get_textInputFactory:function(){return this._textInputFactory},set_textInputFactory:function(a){if(this._textInputFactory==a)return this._textInputFactory;
this._textInputFactory=a;this.setInvalid(sd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);return this._textInputFactory},_previousCustomDecrementButtonVariant:null,_previousCustomIncrementButtonVariant:null,_previousCustomTextInputVariant:null,_pendingTextInputChanges:null,showFocus:function(a){fa.prototype.showFocus.call(this,a);this.textInput!=null&&this.textInput.showFocus(a)},applyValueRestrictions:function(){this.set_value(this.restrictValue(this._value))},dispose:function(){this.destroyDecrementButton();
this.destroyIncrementButton();this.destroyTextInput();fa.prototype.dispose.call(this)},initializeNumericStepperTheme:function(){Lw.initialize()},initialize:function(){fa.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){var a=this.isInvalid(x.DATA);this.isInvalid(x.SIZE);var b=this.isInvalid(x.STATE);this.isInvalid(x.STYLES);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(sd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
this._previousCustomDecrementButtonVariant!=this.get_customDecrementButtonVariant()&&this.setInvalidationFlag(sd.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);this._previousCustomIncrementButtonVariant!=this.get_customIncrementButtonVariant()&&this.setInvalidationFlag(sd.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);var c=this.isInvalid(sd.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY),d=this.isInvalid(sd.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY),f=this.isInvalid(sd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
c&&this.createDecrementButton();d&&this.createIncrementButton();f&&this.createTextInput();(b||a)&&this.refreshEnabled();b&&this.refreshEditable();a&&this.refreshMeasureText();a&&this.refreshTextInputData();this.measure();this.layoutContent();this._previousCustomTextInputVariant=this.get_customTextInputVariant();this._previousCustomDecrementButtonVariant=this.get_customDecrementButtonVariant();this._previousCustomIncrementButtonVariant=this.get_customIncrementButtonVariant()},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.decrementButtonMeasurements.restore(this.decrementButton);this.decrementButton.validateNow();this.incrementButtonMeasurements.restore(this.incrementButton);this.incrementButton.validateNow();this.textInputMeasurements.restore(this.textInput);this.textInput.validateNow();
f=this.get_explicitWidth();a&&(g=Math.max(this.decrementButton.get_width(),this.incrementButton.get_width()),f=this.get_buttonDirection()==nj.VERTICAL?this.get_textInputPosition()==Wb.CENTER?Math.max(this.textInput.get_width(),g):this.textInput.get_width()+this.get_textInputGap()+g:this.get_textInputPosition()==Wb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_width():2*g+this.get_buttonGap()+this.get_textInputGap()+this.textInput.get_width());a=this.get_explicitHeight();b&&(g=Math.max(this.decrementButton.get_height(),
this.incrementButton.get_height()),a=this.get_buttonDirection()==nj.VERTICAL?this.get_textInputPosition()==Wb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_height():Math.max(this.textInput.get_height(),2*g+this.get_buttonGap()):Math.max(this.textInput.get_height(),g));b=this.get_explicitMinWidth();c&&(g=Math.max(this.decrementButton.get_width(),this.incrementButton.get_width()),b=this.get_buttonDirection()==nj.VERTICAL?this.get_textInputPosition()==Wb.CENTER?Math.max(this.textInput.get_minWidth(),
g):this.textInput.get_minWidth()+this.get_textInputGap()+g:this.get_textInputPosition()==Wb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_minWidth():2*g+this.get_buttonGap()+this.get_textInputGap()+this.textInput.get_minWidth());c=this.get_explicitMinHeight();d&&(g=Math.max(this.decrementButton.get_height(),this.incrementButton.get_height()),c=this.get_buttonDirection()==nj.VERTICAL?this.get_textInputPosition()==Wb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_minHeight():Math.max(this.textInput.get_minHeight(),
2*g+this.get_buttonGap()):Math.max(this.textInput.get_minHeight(),g));return this.saveMeasurements(f,a,b,c)},refreshMeasureText:function(){var a=Math.max(Math.max(H.string(this._minimum|0).length,H.string(this._maximum|0).length),H.string(this._step|0).length)|0,b=(Math.max(Math.max(H.string(We.roundToPrecision(this._minimum-(this._minimum|0),10)).length,H.string(We.roundToPrecision(this._maximum-(this._maximum|0),10)).length),H.string(We.roundToPrecision(this._step-(this._step|0),10)).length)|0)-
2;b<0&&(b=0);var c="",d=0;for(a+=b;d<a;)d++,c+="0";b>0&&(c+=".");this.textInput.set_measureText(c)},refreshEnabled:function(){this.decrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._minimum));this.incrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._maximum));this.textInput.set_enabled(this._enabled)},refreshEditable:function(){this.textInput.set_editable(this._editable)},refreshTextInputData:function(){var a=
We.roundToPrecision(this._value,10);this._valueFormatFunction!=null?this.textInput.set_text(this._valueFormatFunction(a)):this.textInput.set_text(a==null?"null":""+a)},parseTextInputValue:function(){var a=this._valueParseFunction!=null?this._valueParseFunction(this.textInput.get_text()):parseFloat(this.textInput.get_text());isNaN(a)||(a=this.restrictValue(a),this.set_value(a));this.setInvalid(x.DATA);this._pendingTextInputChanges=!1},layoutContent:function(){this.decrementButton.validateNow();this.incrementButton.validateNow();
this.textInput.validateNow();this.get_buttonDirection()==nj.VERTICAL?this.layoutContentWithVerticalButtons():this.layoutContentWithHorizontalButtons()},layoutContentWithHorizontalButtons:function(){var a=Math.max(this.decrementButton.get_width(),this.incrementButton.get_width()),b=this.actualWidth;b=this.get_textInputPosition()==Wb.CENTER?b-2*(a+this.get_textInputGap()):b-(2*a+this.get_buttonGap()+this.get_textInputGap());b=Math.max(0,b);this.textInput.get_width()!=b&&this.textInput.set_width(b);
this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.decrementButton.get_width()!=a&&this.decrementButton.set_width(a);this.decrementButton.get_height()!=this.actualHeight&&this.decrementButton.set_height(this.actualHeight);this.incrementButton.get_width()!=a&&this.incrementButton.set_width(a);this.incrementButton.get_height()!=this.actualHeight&&this.incrementButton.set_height(this.actualHeight);switch(this.get_textInputPosition()._hx_index){case 0:this.textInput.set_x(0);
this.textInput.set_y(0);this.incrementButton.set_x(this.actualWidth-a);this.incrementButton.set_y(0);this.decrementButton.set_x(this.actualWidth-2*a-this.get_buttonGap());this.decrementButton.set_y(0);break;case 1:this.decrementButton.set_x(0);this.decrementButton.set_y(0);this.incrementButton.set_x(this.actualWidth-a);this.incrementButton.set_y(0);this.textInput.set_x(a+this.get_textInputGap());this.textInput.set_y(0);break;case 2:this.decrementButton.set_x(0);this.decrementButton.set_y(0);this.incrementButton.set_x(a+
this.get_buttonGap());this.incrementButton.set_y(0);this.textInput.set_x(this.actualWidth-b);this.textInput.set_y(0);break;default:throw new Cb("Invalid text input position: "+H.string(this.get_textInputPosition()));}},layoutContentWithVerticalButtons:function(){switch(this.get_textInputPosition()._hx_index){case 0:var a=Math.max(this.incrementButton.get_width(),this.decrementButton.get_width()),b=(this.actualHeight-this.get_buttonGap())/2,c=Math.max(0,this.actualWidth-a-this.get_textInputGap());
this.textInput.get_width()!=c&&this.textInput.set_width(c);this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.textInput.set_x(0);this.textInput.set_y(0);this.incrementButton.set_x(this.actualWidth-a);this.incrementButton.set_y(0);this.incrementButton.get_width()!=a&&this.incrementButton.set_width(a);this.incrementButton.get_height()!=b&&this.incrementButton.set_height(b);this.decrementButton.set_x(this.actualWidth-a);this.decrementButton.set_y(this.actualHeight-
b);this.decrementButton.get_width()!=a&&this.decrementButton.set_width(a);this.decrementButton.get_height()!=b&&this.decrementButton.set_height(b);break;case 1:b=Math.max(this.decrementButton.get_height(),this.incrementButton.get_height());a=Math.max(0,this.actualHeight-2*(b+this.get_textInputGap()));this.incrementButton.set_x(0);this.incrementButton.set_y(0);this.incrementButton.get_width()!=this.actualWidth&&this.incrementButton.set_width(this.actualWidth);this.incrementButton.get_height()!=b&&
this.incrementButton.set_height(b);this.textInput.set_x(0);this.textInput.set_y(b+this.get_textInputGap());this.textInput.get_width()!=this.actualWidth&&this.textInput.set_width(this.actualWidth);this.textInput.get_height()!=a&&this.textInput.set_height(a);this.decrementButton.set_x(0);this.decrementButton.set_y(this.actualHeight-b);this.decrementButton.get_width()!=this.actualWidth&&this.decrementButton.set_width(this.actualWidth);this.decrementButton.get_height()!=b&&this.decrementButton.set_height(b);
break;case 2:a=Math.max(this.incrementButton.get_width(),this.decrementButton.get_width());b=(this.actualHeight-this.get_buttonGap())/2;c=Math.max(0,this.actualWidth-a-this.get_textInputGap());this.textInput.get_width()!=c&&this.textInput.set_width(c);this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.textInput.set_x(this.actualWidth-c);this.textInput.set_y(0);this.incrementButton.set_x(0);this.incrementButton.set_y(0);this.incrementButton.get_width()!=
a&&this.incrementButton.set_width(a);this.incrementButton.get_height()!=b&&this.incrementButton.set_height(b);this.decrementButton.set_x(0);this.decrementButton.set_y(this.actualHeight-b);this.decrementButton.get_width()!=a&&this.decrementButton.set_width(a);this.decrementButton.get_height()!=b&&this.decrementButton.set_height(b);break;default:throw new Cb("Invalid text input position: "+H.string(this.get_textInputPosition()));}},createDecrementButton:function(){this.destroyDecrementButton();var a=
this._decrementButtonFactory!=null?this._decrementButtonFactory:sd.defaultDecrementButtonFactory;this._oldDecrementButtonFactory=a;this.decrementButton=a.create();this.decrementButton.get_variant()==null&&this.decrementButton.set_variant(this.get_customDecrementButtonVariant()!=null?this.get_customDecrementButtonVariant():sd.CHILD_VARIANT_DECREMENT_BUTTON);this.decrementButton.get_text()==null&&this.decrementButton.set_text("-");this.decrementButton.addEventListener("mouseDown",m(this,this.numericStepper_decrementButton_mouseDownHandler));
this.decrementButton.addEventListener("touchBegin",m(this,this.numericStepper_decrementButton_touchBeginHandler));this.decrementButton.initializeNow();this.decrementButtonMeasurements.save(this.decrementButton);this.addChild(this.decrementButton)},destroyDecrementButton:function(){this.decrementButton!=null&&(this.decrementButton.removeEventListener("mouseDown",m(this,this.numericStepper_decrementButton_mouseDownHandler)),this.decrementButton.removeEventListener("touchBegin",m(this,this.numericStepper_decrementButton_touchBeginHandler)),
this.removeChild(this.decrementButton),this._oldDecrementButtonFactory.destroy!=null&&this._oldDecrementButtonFactory.destroy(this.decrementButton),this.decrementButton=this._oldDecrementButtonFactory=null)},createIncrementButton:function(){this.destroyIncrementButton();var a=this._incrementButtonFactory!=null?this._incrementButtonFactory:sd.defaultIncrementButtonFactory;this._oldIncrementButtonFactory=a;this.incrementButton=a.create();this.incrementButton.get_variant()==null&&this.incrementButton.set_variant(this.get_customIncrementButtonVariant()!=
null?this.get_customIncrementButtonVariant():sd.CHILD_VARIANT_INCREMENT_BUTTON);this.incrementButton.get_text()==null&&this.incrementButton.set_text("+");this.incrementButton.addEventListener("mouseDown",m(this,this.numericStepper_incrementButton_mouseDownHandler));this.incrementButton.addEventListener("touchBegin",m(this,this.numericStepper_incrementButton_touchBeginHandler));this.incrementButton.initializeNow();this.incrementButtonMeasurements.save(this.incrementButton);this.addChild(this.incrementButton)},
destroyIncrementButton:function(){this.incrementButton!=null&&(this.incrementButton.removeEventListener("mouseDown",m(this,this.numericStepper_incrementButton_mouseDownHandler)),this.incrementButton.removeEventListener("touchBegin",m(this,this.numericStepper_incrementButton_touchBeginHandler)),this.removeChild(this.incrementButton),this._oldIncrementButtonFactory.destroy!=null&&this._oldIncrementButtonFactory.destroy(this.incrementButton),this.incrementButton=this._oldIncrementButtonFactory=null)},
createTextInput:function(){this.destroyTextInput();var a=this._textInputFactory!=null?this._textInputFactory:sd.defaultTextInputFactory;this._oldTextInputFactory=a;this.textInput=a.create();this.textInput.get_variant()==null&&this.textInput.set_variant(this.get_customTextInputVariant()!=null?this.get_customTextInputVariant():sd.CHILD_VARIANT_TEXT_INPUT);this.textInput.addEventListener("keyDown",m(this,this.numericStepper_textInput_keyDownHandler));this.textInput.addEventListener("change",m(this,this.numericStepper_textInput_changeHandler));
this.textInput.addEventListener("focusIn",m(this,this.numericStepper_textInput_focusInHandler));this.textInput.addEventListener("focusOut",m(this,this.numericStepper_textInput_focusOutHandler));this.textInput.initializeNow();this.textInputMeasurements.save(this.textInput);this.addChild(this.textInput)},destroyTextInput:function(){this.textInput!=null&&(this.textInput.removeEventListener("keyDown",m(this,this.numericStepper_textInput_keyDownHandler)),this.textInput.removeEventListener("change",m(this,
this.numericStepper_textInput_changeHandler)),this.textInput.removeEventListener("focusIn",m(this,this.numericStepper_textInput_focusInHandler)),this.textInput.removeEventListener("focusOut",m(this,this.numericStepper_textInput_focusOutHandler)),this.removeChild(this.textInput),this._oldTextInputFactory.destroy!=null&&this._oldTextInputFactory.destroy(this.textInput),this.textInput=this._oldTextInputFactory=null)},restrictValue:function(a){this._snapInterval!=0&&a!=this._minimum&&a!=this._maximum&&
(a=We.roundToNearest(a,this._snapInterval));a<this._minimum?a=this._minimum:a>this._maximum&&(a=this._maximum);return a},decrement:function(){var a=this._value-this._step;a=this.restrictValue(a);this.set_value(a)},increment:function(){var a=this._value+this._step;a=this.restrictValue(a);this.set_value(a)},numericStepper_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==null||this.textInput==null||this.textInput.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),this.stage.set_focus(this.textInput))},
canKeyCodeUpdateValue:function(a){return a!=38&&a!=40&&a!=36?a==35:!0},updateValueWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._enabled&&this.canKeyCodeUpdateValue(a.keyCode)){this.parseTextInputValue();var b=this._value;switch(a.keyCode){case 35:b=this._maximum;break;case 36:b=this._minimum;break;case 38:b+=this._step;break;case 40:b-=this._step;break;default:return}b<this._minimum?b=this._minimum:b>this._maximum&&(b=this._maximum);a.preventDefault();this.set_value(b);this.textInput.get_selectionActiveIndex()!=
this.textInput.get_selectionAnchorIndex()&&this.textInput.selectRange(this.textInput.get_selectionAnchorIndex(),this.textInput.get_selectionAnchorIndex())}},numericStepper_decrementButton_mouseDownHandler:function(a){this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&this.decrement()},numericStepper_decrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&
this.decrement()},numericStepper_incrementButton_mouseDownHandler:function(a){this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&this.increment()},numericStepper_incrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&this.increment()},numericStepper_textInput_keyDownHandler:function(a){this._enabled&&!a.isDefaultPrevented()&&
(a.keyCode==13?(a.preventDefault(),this.parseTextInputValue()):this.updateValueWithKeyboard(a))},numericStepper_textInput_focusInHandler:function(a){this._pendingTextInputChanges=!1},numericStepper_textInput_changeHandler:function(a){this._pendingTextInputChanges=!0},numericStepper_textInput_focusOutHandler:function(a){this._pendingTextInputChanges&&this.parseTextInputValue()},__customDecrementButtonVariant:null,get_customDecrementButtonVariant:function(){return this.__customDecrementButtonVariant},
set_customDecrementButtonVariant:function(a){if(!this.setStyle("customDecrementButtonVariant")||this.__customDecrementButtonVariant==a)return this.__customDecrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementButtonVariant);this.__customDecrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDecrementButtonVariant},clearStyle_customDecrementButtonVariant:function(){this.set_customDecrementButtonVariant(null);return this.get_customDecrementButtonVariant()},
__customIncrementButtonVariant:null,get_customIncrementButtonVariant:function(){return this.__customIncrementButtonVariant},set_customIncrementButtonVariant:function(a){if(!this.setStyle("customIncrementButtonVariant")||this.__customIncrementButtonVariant==a)return this.__customIncrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementButtonVariant);this.__customIncrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementButtonVariant},clearStyle_customIncrementButtonVariant:function(){this.set_customIncrementButtonVariant(null);
return this.get_customIncrementButtonVariant()},__customTextInputVariant:null,get_customTextInputVariant:function(){return this.__customTextInputVariant},set_customTextInputVariant:function(a){if(!this.setStyle("customTextInputVariant")||this.__customTextInputVariant==a)return this.__customTextInputVariant;this._previousClearStyle=m(this,this.clearStyle_customTextInputVariant);this.__customTextInputVariant=a;this.setInvalid(x.STYLES);return this.__customTextInputVariant},clearStyle_customTextInputVariant:function(){this.set_customTextInputVariant(null);
return this.get_customTextInputVariant()},__textInputPosition:null,get_textInputPosition:function(){return this.__textInputPosition},set_textInputPosition:function(a){if(!this.setStyle("textInputPosition")||this.__textInputPosition==a)return this.__textInputPosition;this._previousClearStyle=m(this,this.clearStyle_textInputPosition);this.__textInputPosition=a;this.setInvalid(x.STYLES);return this.__textInputPosition},clearStyle_textInputPosition:function(){this.set_textInputPosition(Wb.CENTER);return this.get_textInputPosition()},
__buttonDirection:null,get_buttonDirection:function(){return this.__buttonDirection},set_buttonDirection:function(a){if(!this.setStyle("buttonDirection")||this.__buttonDirection==a)return this.__buttonDirection;this._previousClearStyle=m(this,this.clearStyle_buttonDirection);this.__buttonDirection=a;this.setInvalid(x.STYLES);return this.__buttonDirection},clearStyle_buttonDirection:function(){this.set_buttonDirection(nj.HORIZONTAL);return this.get_buttonDirection()},__textInputGap:null,get_textInputGap:function(){return this.__textInputGap},
set_textInputGap:function(a){if(!this.setStyle("textInputGap")||this.__textInputGap==a)return this.__textInputGap;this._previousClearStyle=m(this,this.clearStyle_textInputGap);this.__textInputGap=a;this.setInvalid(x.STYLES);return this.__textInputGap},clearStyle_textInputGap:function(){this.set_textInputGap(0);return this.get_textInputGap()},__buttonGap:null,get_buttonGap:function(){return this.__buttonGap},set_buttonGap:function(a){if(!this.setStyle("buttonGap")||this.__buttonGap==a)return this.__buttonGap;
this._previousClearStyle=m(this,this.clearStyle_buttonGap);this.__buttonGap=a;this.setInvalid(x.STYLES);return this.__buttonGap},clearStyle_buttonGap:function(){this.set_buttonGap(0);return this.get_buttonGap()},__class__:sd,__properties__:I(fa.prototype.__properties__,{set_buttonGap:"set_buttonGap",get_buttonGap:"get_buttonGap",set_textInputGap:"set_textInputGap",get_textInputGap:"get_textInputGap",set_buttonDirection:"set_buttonDirection",get_buttonDirection:"get_buttonDirection",set_textInputPosition:"set_textInputPosition",
get_textInputPosition:"get_textInputPosition",set_customTextInputVariant:"set_customTextInputVariant",get_customTextInputVariant:"get_customTextInputVariant",set_customIncrementButtonVariant:"set_customIncrementButtonVariant",get_customIncrementButtonVariant:"get_customIncrementButtonVariant",set_customDecrementButtonVariant:"set_customDecrementButtonVariant",get_customDecrementButtonVariant:"get_customDecrementButtonVariant",set_textInputFactory:"set_textInputFactory",get_textInputFactory:"get_textInputFactory",
set_incrementButtonFactory:"set_incrementButtonFactory",get_incrementButtonFactory:"get_incrementButtonFactory",set_decrementButtonFactory:"set_decrementButtonFactory",get_decrementButtonFactory:"get_decrementButtonFactory",get_stageFocusTarget:"get_stageFocusTarget",set_valueParseFunction:"set_valueParseFunction",get_valueParseFunction:"get_valueParseFunction",set_valueFormatFunction:"set_valueFormatFunction",get_valueFormatFunction:"get_valueFormatFunction",set_enableButtonsAtRangeLimits:"set_enableButtonsAtRangeLimits",
get_enableButtonsAtRangeLimits:"get_enableButtonsAtRangeLimits",set_editable:"set_editable",get_editable:"get_editable",set_snapInterval:"set_snapInterval",get_snapInterval:"get_snapInterval",set_step:"set_step",get_step:"get_step",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var eh=function(a,b){a==null&&(a=-1);this.__customToggleButtonVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=
null;this._currentItemState=new px;this._ignoreChildChanges=!1;this._layoutResult=new Kg;this._layoutMeasurements=new Sb;this._interactionMode=Mn.PREVIOUS_NEXT;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._ignoreSelectionChange=!1;this._layoutItems=[];this.activeToggleButtons=[];this.inactiveToggleButtons=[];this._toggleButtonRecycler=Ne.withClass(hd);this._previousCustomToggleButtonVariant=null;this._selectedIndex=this._maxSelectedIndex=-1;this.initializePageIndicatorTheme();
fa.call(this);this.mouseChildren=this._interactionMode==Mn.PRECISE;this.set_tabEnabled(!0);this.set_tabChildren(!1);this.set_maxSelectedIndex(a);this.addEventListener("click",m(this,this.pageIndicator_clickHandler));this.addEventListener("touchTap",m(this,this.pageIndicator_touchTapHandler));this.addEventListener("keyDown",m(this,this.pageIndicator_keyDownHandler));b!=null&&this.addEventListener("change",b)};t["feathers.controls.PageIndicator"]=eh;eh.__name__="feathers.controls.PageIndicator";eh.__interfaces__=
[qd,lj];eh.__super__=fa;eh.prototype=I(fa.prototype,{_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){if(this._selectedIndex==a)return this._selectedIndex;if(a<-1||a>this._maxSelectedIndex)throw new we("Index "+a+" is out of range "+this._maxSelectedIndex+" for PageIndicator.");this._selectedIndex=a;this.setInvalid(x.DATA);Y.dispatch(this,"change");return this._selectedIndex},_maxSelectedIndex:null,get_maxSelectedIndex:function(){return this._maxSelectedIndex},
set_maxSelectedIndex:function(a){if(this._maxSelectedIndex==a)return this._maxSelectedIndex;this._maxSelectedIndex=a;this.setInvalid(x.DATA);this._maxSelectedIndex>=0&&this._selectedIndex<0?this.set_selectedIndex(0):this.get_selectedIndex()>this._maxSelectedIndex&&this.set_selectedIndex(this._maxSelectedIndex);return this._maxSelectedIndex},_previousCustomToggleButtonVariant:null,_oldToggleButtonRecycler:null,_toggleButtonRecycler:null,get_toggleButtonRecycler:function(){return this._toggleButtonRecycler},
set_toggleButtonRecycler:function(a){if(this._toggleButtonRecycler==a)return this._toggleButtonRecycler;this._oldToggleButtonRecycler=this._toggleButtonRecycler;this._toggleButtonRecycler=a;this.setInvalid(eh.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);return this._toggleButtonRecycler},inactiveToggleButtons:null,activeToggleButtons:null,_layoutItems:null,_ignoreSelectionChange:null,_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_interactionMode:null,get_interactionMode:function(){return this._interactionMode},
set_interactionMode:function(a){if(this._interactionMode==a)return this._interactionMode;this._interactionMode=a;this.mouseChildren=this._interactionMode==Mn.PRECISE;return this._interactionMode},_layoutMeasurements:null,_layoutResult:null,_ignoreChildChanges:null,_currentItemState:null,indexToToggleButton:function(a){return a<0||a>=this.activeToggleButtons.length?null:this.activeToggleButtons[a]},dispose:function(){this.refreshInactiveToggleButtons(!0);this.set_maxSelectedIndex(-1);fa.prototype.dispose.call(this)},
initializePageIndicatorTheme:function(){Mw.initialize()},update:function(){this.isInvalid(x.DATA);var a=this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);var b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomToggleButtonVariant!=this.get_customToggleButtonVariant()&&this.setInvalidationFlag(eh.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);var f=this.isInvalid(eh.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);(d||c)&&this.refreshBackgroundSkin();(f||b||c||a)&&
this.refreshToggleButtons();this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.layoutBackgroundSkin();this.validateChildren();this._previousCustomToggleButtonVariant=this.get_customToggleButtonVariant()},refreshViewPortBounds:function(){this._layoutMeasurements.save(this)},handleLayout:function(){if(!(this.get_layout()instanceof zg||this.get_layout()instanceof uf))throw new Cb("PageIndicator must use HorizontalLayout or VerticalLayout");var a=this._ignoreChildChanges;
this._ignoreChildChanges=!0;this._layoutResult.reset();this.get_layout()!=null&&this.get_layout().layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},validateChildren:function(){for(var a=0,b=this.activeToggleButtons;a<b.length;){var c=b[a];++a;c.validateNow()}},refreshToggleButtons:function(){this._layoutItems.length=
0;this._layoutItems.length=this._maxSelectedIndex+1;var a=this.isInvalid(eh.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);this.refreshInactiveToggleButtons(a);this.recoverInactiveToggleButtons();a=0;for(var b=this._maxSelectedIndex+1;a<b;){var c=a++,d=this.createToggleButton(c);this._layoutItems[c]=d}this.freeInactiveToggleButtons();if(this.inactiveToggleButtons.length>0)throw a=w.getClass(this),new ob(a.__name__+": inactive item renderers should be empty after updating.");},refreshInactiveToggleButtons:function(a){var b=
this.inactiveToggleButtons;this.inactiveToggleButtons=this.activeToggleButtons;this.activeToggleButtons=b;if(this.activeToggleButtons.length>0)throw a=w.getClass(this),new ob(a.__name__+": active item renderers should be empty before updating.");a&&(this.recoverInactiveToggleButtons(),this.freeInactiveToggleButtons(),this._oldToggleButtonRecycler=null)},recoverInactiveToggleButtons:function(){for(var a=this._oldToggleButtonRecycler!=null?this._oldToggleButtonRecycler:this._toggleButtonRecycler,b=
0,c=this.inactiveToggleButtons;b<c.length;){var d=c[b];++b;if(d!=null){d.removeEventListener("change",m(this,this.pageIndicator_toggleButton_changeHandler));this._currentItemState.owner=this;this._currentItemState.index=-1;this._currentItemState.selected=!1;this._currentItemState.enabled=!0;var f=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;a.reset!=null&&a.reset(d,this._currentItemState);d.set_selected(this._currentItemState.selected);d.set_enabled(this._currentItemState.enabled);this._ignoreSelectionChange=
f}}},freeInactiveToggleButtons:function(){for(var a=this._oldToggleButtonRecycler!=null?this._oldToggleButtonRecycler:this._toggleButtonRecycler,b=0,c=this.inactiveToggleButtons;b<c.length;){var d=c[b];++b;d!=null&&this.destroyToggleButton(d,a)}this.inactiveToggleButtons.length=0},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},
getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutBackgroundSkin:function(){this._currentBackgroundSkin==null?(this.get_graphics().clear(),this.get_graphics().beginFill(16711935,0),this.get_graphics().drawRect(0,0,this.actualWidth,this.actualHeight),this.get_graphics().endFill()):(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&
this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},createToggleButton:function(a){var b=this._currentBackgroundSkin!=null?1:0;if(this.inactiveToggleButtons.length==0){var c=this._toggleButtonRecycler.create();if(c.get_variant()==null){var d=this.get_customToggleButtonVariant()!=null?this.get_customToggleButtonVariant():
eh.CHILD_VARIANT_TOGGLE_BUTTON;c.set_variant(d)}c.initializeNow();this.addChildAt(c,a+b)}else c=this.inactiveToggleButtons.shift(),this.setChildIndex(c,a+b);this.refreshToggleButtonProperties(c,a);c.addEventListener("change",m(this,this.pageIndicator_toggleButton_changeHandler));this.activeToggleButtons.push(c);return c},destroyToggleButton:function(a,b){this.removeChild(a);b.destroy!=null&&b.destroy(a)},populateCurrentItemState:function(a){this._currentItemState.owner=this;this._currentItemState.index=
a;this._currentItemState.selected=a==this._selectedIndex;this._currentItemState.enabled=this._enabled},refreshToggleButtonProperties:function(a,b){this.populateCurrentItemState(b);b=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this._toggleButtonRecycler.update!=null&&this._toggleButtonRecycler.update(a,this._currentItemState);a.set_selected(this._currentItemState.selected);a.set_enabled(this._currentItemState.enabled);this._ignoreSelectionChange=b},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()){var b=
this._selectedIndex;switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._maxSelectedIndex;break;case 36:b=0;break;case 37:--b;break;case 38:if(a.keyLocation==4)return;++b;break;case 39:++b;break;case 40:if(a.keyLocation==4)return;--b;break;default:return}b<0?b=0:b>this._maxSelectedIndex&&(b=this._maxSelectedIndex);a.preventDefault();this.set_selectedIndex(b)}},pageIndicator_keyDownHandler:function(a){this._enabled&&this.navigateWithKeyboard(a)},pageIndicator_toggleButton_changeHandler:function(a){this._ignoreSelectionChange||
(a=w.__cast(a.currentTarget,hd),a.get_selected()?this.set_selectedIndex(this.activeToggleButtons.indexOf(a)):a.set_selected(!0))},handleClickOrTap:function(a,b){var c=this._selectedIndex;if(c!=-1){var d=this.activeToggleButtons[c];this.get_layout()instanceof uf?b<d.get_y()?--c:b>d.get_y()+d.get_height()&&++c:a<d.get_x()?--c:a>d.get_x()+d.get_width()&&++c}c<0?c=0:c>this._maxSelectedIndex&&(c=this._maxSelectedIndex);this.set_selectedIndex(c)},pageIndicator_clickHandler:function(a){this._enabled&&this._interactionMode==
Mn.PREVIOUS_NEXT&&this.handleClickOrTap(a.localX,a.localY)},pageIndicator_touchTapHandler:function(a){this._enabled&&this._interactionMode==Mn.PREVIOUS_NEXT&&(a.isPrimaryTouchPoint||this.handleClickOrTap(a.localX,a.localY))},__customToggleButtonVariant:null,get_customToggleButtonVariant:function(){return this.__customToggleButtonVariant},set_customToggleButtonVariant:function(a){if(!this.setStyle("customToggleButtonVariant")||this.__customToggleButtonVariant==a)return this.__customToggleButtonVariant;
this._previousClearStyle=m(this,this.clearStyle_customToggleButtonVariant);this.__customToggleButtonVariant=a;this.setInvalid(x.STYLES);return this.__customToggleButtonVariant},clearStyle_customToggleButtonVariant:function(){this.set_customToggleButtonVariant(null);return this.get_customToggleButtonVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);
this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);
return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);
return this.get_disabledBackgroundSkin()},get_styleContext:function(){return eh},__class__:eh,__properties__:I(fa.prototype.__properties__,{set_interactionMode:"set_interactionMode",get_interactionMode:"get_interactionMode",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout",set_toggleButtonRecycler:"set_toggleButtonRecycler",
get_toggleButtonRecycler:"get_toggleButtonRecycler",set_customToggleButtonVariant:"set_customToggleButtonVariant",get_customToggleButtonVariant:"get_customToggleButtonVariant",set_maxSelectedIndex:"set_maxSelectedIndex",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex"})});var Mn=R["feathers.controls.PageIndicatorInteractionMode"]={__ename__:"feathers.controls.PageIndicatorInteractionMode",__constructs__:null,PREVIOUS_NEXT:{_hx_name:"PREVIOUS_NEXT",
_hx_index:0,__enum__:"feathers.controls.PageIndicatorInteractionMode",toString:E},PRECISE:{_hx_name:"PRECISE",_hx_index:1,__enum__:"feathers.controls.PageIndicatorInteractionMode",toString:E}};Mn.__constructs__=[Mn.PREVIOUS_NEXT,Mn.PRECISE];var Xd=function(){this.__customTextInputVariant=this.__customButtonVariant=this.__customDatePickerVariant=null;this.__popUpAdapter=new Xk;this.openDatePickerOnFocus=!1;this._previousCustomTextInputVariant=this._previousCustomButtonVariant=this._previousCustomDatePickerVariant=
this._requestedLocaleIDName=this._actualLocaleIDName=this._customMonthNames=this._customWeekdayNames=this._customStartOfWeek=this._filterText=null;this._ignoreTextInputChange=this._ignoreDatePickerChange=!1;this._selectedDate=null;this.textInputMeasurements=new Sb;this.buttonMeasurements=new Sb;this.initializePopUpDatePickerTheme();fa.call(this);this.addEventListener("focusIn",m(this,this.popUpDatePicker_focusInHandler))};t["feathers.controls.PopUpDatePicker"]=Xd;Xd.__name__="feathers.controls.PopUpDatePicker";
Xd.__interfaces__=[Th,qd,mp];Xd.__super__=fa;Xd.prototype=I(fa.prototype,{button:null,textInput:null,datePicker:null,buttonMeasurements:null,textInputMeasurements:null,get_stageFocusTarget:function(){return this.textInput},_currentDateFormatter:null,_selectedDate:null,get_selectedDate:function(){return this._selectedDate},set_selectedDate:function(a){if(this._selectedDate==a)return this._selectedDate;this._selectedDate=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedDate},
_prompt:null,get_prompt:function(){return this._prompt},set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},_ignoreTextInputChange:null,_ignoreDatePickerChange:null,_previousCustomTextInputVariant:null,_previousCustomButtonVariant:null,_previousCustomDatePickerVariant:null,_oldButtonFactory:null,_buttonFactory:null,get_buttonFactory:function(){return this._buttonFactory},set_buttonFactory:function(a){if(this._buttonFactory==a)return this._buttonFactory;
this._buttonFactory=a;this.setInvalid(Xd.INVALIDATION_FLAG_BUTTON_FACTORY);return this._buttonFactory},_oldTextInputFactory:null,_textInputFactory:null,get_textInputFactory:function(){return this._textInputFactory},set_textInputFactory:function(a){if(this._textInputFactory==a)return this._textInputFactory;this._textInputFactory=a;this.setInvalid(Xd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);return this._textInputFactory},_oldDatePickerFactory:null,_datePickerFactory:null,get_datePickerFactory:function(){return this._datePickerFactory},
set_datePickerFactory:function(a){if(this._datePickerFactory==a)return this._datePickerFactory;this._datePickerFactory=a;this.setInvalid(Xd.INVALIDATION_FLAG_DATE_PICKER_FACTORY);return this._datePickerFactory},_requestedLocaleIDName:null,get_requestedLocaleIDName:function(){return this._requestedLocaleIDName},set_requestedLocaleIDName:function(a){if(this._requestedLocaleIDName==a)return this._requestedLocaleIDName;this._requestedLocaleIDName=a;this._actualLocaleIDName=null;this.setInvalid(x.DATA);
return this._requestedLocaleIDName},_actualLocaleIDName:null,get_actualLocaleIDName:function(){return this._actualLocaleIDName},_customMonthNames:null,get_customMonthNames:function(){return this._customMonthNames},set_customMonthNames:function(a){if(a!=null&&a.length!=12)throw new Cb("Length of customMonthNames must be exactly equal to 12");if(this._customMonthNames==a)return this._customMonthNames;this._customMonthNames=a;this.setInvalid(x.DATA);return this._customMonthNames},_customWeekdayNames:null,
get_customWeekdayNames:function(){return this._customWeekdayNames},set_customWeekdayNames:function(a){if(a!=null&&a.length!=7)throw new Cb("Length of customWeekdayNames must be exactly equal to 7");if(this._customWeekdayNames==a)return this._customWeekdayNames;this._customWeekdayNames=a;this.setInvalid(x.DATA);return this._customWeekdayNames},_customStartOfWeek:null,get_customStartOfWeek:function(){return this._customStartOfWeek},set_customStartOfWeek:function(a){if(a!=null&&(a<0||a>6))throw new we("startOfWeek must be in the range 0-6");
if(this._customStartOfWeek==a)return this._customStartOfWeek;this._customStartOfWeek=a;this.setInvalid(x.DATA);return this._customStartOfWeek},get_open:function(){return this.datePicker!=null?this.datePicker.parent!=null:!1},_filterText:null,showFocus:function(a){fa.prototype.showFocus.call(this,a);this.textInput!=null&&this.textInput.showFocus(a)},openDatePickerOnFocus:null,openDatePicker:function(){if(!this.get_open()&&this.stage!=null){this.validateNow();this.get_popUpAdapter().addEventListener("open",
m(this,this.popUpDatePicker_popUpAdapter_openHandler));this.get_popUpAdapter().addEventListener("close",m(this,this.popUpDatePicker_popUpAdapter_closeHandler));this.get_popUpAdapter().open(this.datePicker,this);if(this.get_selectedDate()!=null)this.datePicker.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.datePicker.set_displayedMonth(this.get_selectedDate().getMonth());else{var a=new Date;this.datePicker.set_displayedFullYear(a.getFullYear());this.datePicker.set_displayedMonth(a.getMonth())}this.datePicker.validateNow();
this.textInput.addEventListener("focusOut",m(this,this.popUpDatePicker_textInput_focusOutHandler));this.datePicker.addEventListener("removedFromStage",m(this,this.popUpDatePicker_datePicker_removedFromStageHandler));this.stage.addEventListener("mouseDown",m(this,this.popUpDatePicker_stage_mouseDownHandler),!1,0,!0);this.stage.addEventListener("touchBegin",m(this,this.popUpDatePicker_stage_touchBeginHandler),!1,0,!0);this.datePicker.get_focusManager()!=null?this.datePicker.get_focusManager().set_focus(this.datePicker):
this.stage.set_focus(this.datePicker)}},closeDatePicker:function(){this.get_open()&&this.get_popUpAdapter().close()},dispose:function(){this.destroyButton();this.destroyTextInput();this.destroyDatePicker();fa.prototype.dispose.call(this)},initializePopUpDatePickerTheme:function(){Fn.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(Xd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(Xd.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomDatePickerVariant!=this.get_customDatePickerVariant()&&this.setInvalidationFlag(Xd.INVALIDATION_FLAG_DATE_PICKER_FACTORY);var d=this.isInvalid(Xd.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(Xd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY),g=this.isInvalid(Xd.INVALIDATION_FLAG_DATE_PICKER_FACTORY);d&&this.createButton();f&&this.createTextInput();g&&this.createDatePicker();
a&&this.refreshLocale();(a||b||g)&&this.refreshDatePickerData();(a||b||f)&&this.refreshTextInputData();(c||g||d||f)&&this.refreshEnabled();this.measure();this.layoutChildren();this._previousCustomTextInputVariant=this.get_customTextInputVariant();this._previousCustomButtonVariant=this.get_customButtonVariant();this._previousCustomDatePickerVariant=this.get_customDatePickerVariant()},createButton:function(){this.destroyButton();var a=this._buttonFactory!=null?this._buttonFactory:Xd.defaultButtonFactory;
this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():Xd.CHILD_VARIANT_BUTTON);this.button.set_focusEnabled(!1);this.button.addEventListener("mouseDown",m(this,this.popUpDatePicker_button_mouseDownHandler));this.button.addEventListener("touchBegin",m(this,this.popUpDatePicker_button_touchBeginHandler));this.button.initializeNow();this.buttonMeasurements.save(this.button);this.addChild(this.button)},
destroyButton:function(){this.button!=null&&(this.button.removeEventListener("mouseDown",m(this,this.popUpDatePicker_button_mouseDownHandler)),this.button.removeEventListener("touchBegin",m(this,this.popUpDatePicker_button_touchBeginHandler)),this.removeChild(this.button),this._oldButtonFactory.destroy!=null&&this._oldButtonFactory.destroy(this.button),this.button=this._oldButtonFactory=null)},createTextInput:function(){this.destroyTextInput();var a=this._textInputFactory!=null?this._textInputFactory:
Xd.defaultTextInputFactory;this._oldTextInputFactory=a;this.textInput=a.create();this.textInput.set_editable(!1);this.textInput.get_variant()==null&&this.textInput.set_variant(this.get_customTextInputVariant()!=null?this.get_customTextInputVariant():Xd.CHILD_VARIANT_TEXT_INPUT);this.textInput.initializeNow();this.textInputMeasurements.save(this.textInput);this.textInput.addEventListener("mouseDown",m(this,this.popUpDatePicker_textInput_mouseDownHandler));this.addChild(this.textInput)},destroyTextInput:function(){this.textInput!=
null&&(this.textInput.removeEventListener("mouseDown",m(this,this.popUpDatePicker_textInput_mouseDownHandler)),this.removeChild(this.textInput),this._oldTextInputFactory.destroy!=null&&this._oldTextInputFactory.destroy(this.textInput),this.textInput=this._oldTextInputFactory=null)},createDatePicker:function(){this.destroyDatePicker();var a=this._datePickerFactory!=null?this._datePickerFactory:Xd.defaultDatePickerFactory;this._oldDatePickerFactory=a;this.datePicker=a.create();this.datePicker.set_focusOwner(this);
this.datePicker.set_focusEnabled(!1);this.datePicker.get_variant()==null&&this.datePicker.set_variant(this.get_customDatePickerVariant()!=null?this.get_customDatePickerVariant():Xd.CHILD_VARIANT_DATE_PICKER);this.datePicker.addEventListener("change",m(this,this.popUpDatePicker_datePicker_changeHandler));this.datePicker.addEventListener("itemTrigger",m(this,this.popUpDatePicker_datePicker_itemTriggerHandler))},destroyDatePicker:function(){this.datePicker!=null&&(this.datePicker.removeEventListener("change",
m(this,this.popUpDatePicker_datePicker_changeHandler)),this.datePicker.removeEventListener("itemTrigger",m(this,this.popUpDatePicker_datePicker_itemTriggerHandler)),this.datePicker.set_focusOwner(null),this._oldDatePickerFactory.destroy!=null&&this._oldDatePickerFactory.destroy(this.datePicker),this.datePicker=this._oldDatePickerFactory=null)},refreshLocale:function(){this._currentDateFormatter=new op(this._requestedLocaleIDName!=null?this._requestedLocaleIDName:"i-default",4,3);this._actualLocaleIDName=
this._currentDateFormatter.actualLocaleIDName},refreshDatePickerData:function(){var a=this._ignoreDatePickerChange;this._ignoreDatePickerChange=!0;this.datePicker.set_requestedLocaleIDName(this._requestedLocaleIDName);this.datePicker.set_selectedDate(this._selectedDate);this.datePicker.set_customMonthNames(this._customMonthNames);this.datePicker.set_customWeekdayNames(this._customWeekdayNames);this.datePicker.set_customStartOfWeek(this._customStartOfWeek);this._ignoreDatePickerChange=a},refreshTextInputData:function(){this.textInput.set_prompt(this._prompt);
this._selectedDate!=null?this.textInput.set_text(this._currentDateFormatter.format(this._selectedDate)):this.textInput.set_text("")},refreshEnabled:function(){this.button.set_enabled(this._enabled);this.textInput.set_enabled(this._enabled);this.datePicker.set_enabled(this._enabled)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==
null;if(!(a||b||c||d||f||g))return!1;this.buttonMeasurements.restore(this.button);this.button.validateNow();this.textInputMeasurements.restore(this.textInput);this.textInput.validateNow();f=this.get_explicitWidth();a&&(f=this.button.get_width()+this.textInput.get_width());a=this.get_explicitHeight();b&&(a=Math.max(this.button.get_height(),this.textInput.get_height()));b=this.get_explicitMinWidth();c&&(b=this.button.get_minWidth()+this.textInput.get_minWidth());c=this.get_explicitMinHeight();d&&(c=
Math.max(this.button.get_minHeight(),this.textInput.get_minHeight()));return this.saveMeasurements(f,a,b,c)},layoutChildren:function(){this.button.validateNow();this.button.set_x(this.actualWidth-this.button.get_width());this.button.set_y(0);this.button.get_height()!=this.actualHeight&&this.button.set_height(this.actualHeight);this.textInput.set_x(0);this.textInput.set_y(0);var a=this.actualWidth-this.button.get_width();this.textInput.get_width()!=a&&this.textInput.set_width(a);this.textInput.get_height()!=
this.actualHeight&&this.textInput.set_height(this.actualHeight);this.button.validateNow();this.textInput.validateNow()},popUpDatePicker_textInput_focusOutHandler:function(a){(a.relatedObject==null||a.relatedObject!=this.datePicker&&!this.datePicker.contains(a.relatedObject))&&this.closeDatePicker()},popUpDatePicker_button_mouseDownHandler:function(a){this._enabled&&(this.get_open()?this.closeDatePicker():this.openDatePicker())},popUpDatePicker_button_touchBeginHandler:function(a){this._enabled&&(a.isPrimaryTouchPoint||
(this.get_open()?this.closeDatePicker():this.openDatePicker()))},popUpDatePicker_datePicker_changeHandler:function(a){this._ignoreDatePickerChange||this.set_selectedDate(this.datePicker.get_selectedDate())},popUpDatePicker_datePicker_itemTriggerHandler:function(a){this.dispatchEvent(a);this.get_popUpAdapter()!=null&&this.get_popUpAdapter().get_persistent()||this.closeDatePicker()},popUpDatePicker_datePicker_removedFromStageHandler:function(a){this.textInput.removeEventListener("focusOut",m(this,this.popUpDatePicker_textInput_focusOutHandler));
this.datePicker.removeEventListener("removedFromStage",m(this,this.popUpDatePicker_datePicker_removedFromStageHandler));this.stage.removeEventListener("mouseDown",m(this,this.popUpDatePicker_stage_mouseDownHandler));this.stage.removeEventListener("touchBegin",m(this,this.popUpDatePicker_stage_touchBeginHandler))},popUpDatePicker_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==null||this.textInput==null||this.textInput.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),
this.stage.set_focus(this.textInput))},popUpDatePicker_removedFromStageHandler:function(a){this.closeDatePicker()},popUpDatePicker_keyUpHandler:function(a){if(this._enabled)switch(a.keyCode){case 27:if(a.isDefaultPrevented())break;if(!this.get_open())break;a.preventDefault();this.closeDatePicker();break;case 1073742094:!a.isDefaultPrevented()&&this.get_open()&&(a.preventDefault(),this.closeDatePicker())}},popUpDatePicker_stage_mouseDownHandler:function(a){this.hitTestPoint(a.stageX,a.stageY)||this.datePicker.hitTestPoint(a.stageX,
a.stageY)||this.closeDatePicker()},popUpDatePicker_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.hitTestPoint(a.stageX,a.stageY)||this.datePicker.hitTestPoint(a.stageX,a.stageY)||this.closeDatePicker()},popUpDatePicker_popUpAdapter_openHandler:function(a){Y.dispatch(this,"open")},popUpDatePicker_popUpAdapter_closeHandler:function(a){this.get_popUpAdapter().removeEventListener("open",m(this,this.popUpDatePicker_popUpAdapter_openHandler));this.get_popUpAdapter().removeEventListener("close",
m(this,this.popUpDatePicker_popUpAdapter_closeHandler));Y.dispatch(this,"close")},popUpDatePicker_textInput_mouseDownHandler:function(a){this.get_enabled()&&this.openDatePicker()},__popUpAdapter:null,get_popUpAdapter:function(){return this.__popUpAdapter},set_popUpAdapter:function(a){if(!this.setStyle("popUpAdapter")||this.__popUpAdapter==a)return this.__popUpAdapter;this._previousClearStyle=m(this,this.clearStyle_popUpAdapter);this.__popUpAdapter=a;this.setInvalid(x.STYLES);return this.__popUpAdapter},
clearStyle_popUpAdapter:function(){this.set_popUpAdapter(new Xk);return this.get_popUpAdapter()},__customTextInputVariant:null,get_customTextInputVariant:function(){return this.__customTextInputVariant},set_customTextInputVariant:function(a){if(!this.setStyle("customTextInputVariant")||this.__customTextInputVariant==a)return this.__customTextInputVariant;this._previousClearStyle=m(this,this.clearStyle_customTextInputVariant);this.__customTextInputVariant=a;this.setInvalid(x.STYLES);return this.__customTextInputVariant},
clearStyle_customTextInputVariant:function(){this.set_customTextInputVariant(null);return this.get_customTextInputVariant()},__customButtonVariant:null,get_customButtonVariant:function(){return this.__customButtonVariant},set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},
clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);return this.get_customButtonVariant()},__customDatePickerVariant:null,get_customDatePickerVariant:function(){return this.__customDatePickerVariant},set_customDatePickerVariant:function(a){if(!this.setStyle("customDatePickerVariant")||this.__customDatePickerVariant==a)return this.__customDatePickerVariant;this._previousClearStyle=m(this,this.clearStyle_customDatePickerVariant);this.__customDatePickerVariant=a;this.setInvalid(x.STYLES);
return this.__customDatePickerVariant},clearStyle_customDatePickerVariant:function(){this.set_customDatePickerVariant(null);return this.get_customDatePickerVariant()},get_styleContext:function(){return Xd},__class__:Xd,__properties__:I(fa.prototype.__properties__,{get_open:"get_open",set_customStartOfWeek:"set_customStartOfWeek",get_customStartOfWeek:"get_customStartOfWeek",set_customWeekdayNames:"set_customWeekdayNames",get_customWeekdayNames:"get_customWeekdayNames",set_customMonthNames:"set_customMonthNames",
get_customMonthNames:"get_customMonthNames",get_actualLocaleIDName:"get_actualLocaleIDName",set_requestedLocaleIDName:"set_requestedLocaleIDName",get_requestedLocaleIDName:"get_requestedLocaleIDName",set_datePickerFactory:"set_datePickerFactory",get_datePickerFactory:"get_datePickerFactory",set_textInputFactory:"set_textInputFactory",get_textInputFactory:"get_textInputFactory",set_buttonFactory:"set_buttonFactory",get_buttonFactory:"get_buttonFactory",set_customDatePickerVariant:"set_customDatePickerVariant",
get_customDatePickerVariant:"get_customDatePickerVariant",set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",set_customTextInputVariant:"set_customTextInputVariant",get_customTextInputVariant:"get_customTextInputVariant",set_popUpAdapter:"set_popUpAdapter",get_popUpAdapter:"get_popUpAdapter",set_prompt:"set_prompt",get_prompt:"get_prompt",set_selectedDate:"set_selectedDate",get_selectedDate:"get_selectedDate",get_stageFocusTarget:"get_stageFocusTarget"})});
var rt=R["feathers.controls.ProgressBarFillMode"]={__ename__:"feathers.controls.ProgressBarFillMode",__constructs__:null,MASK:{_hx_name:"MASK",_hx_index:0,__enum__:"feathers.controls.ProgressBarFillMode",toString:E},SCROLL_RECT:{_hx_name:"SCROLL_RECT",_hx_index:1,__enum__:"feathers.controls.ProgressBarFillMode",toString:E},RESIZE:{_hx_name:"RESIZE",_hx_index:2,__enum__:"feathers.controls.ProgressBarFillMode",toString:E}};rt.__constructs__=[rt.MASK,rt.SCROLL_RECT,rt.RESIZE];var vp=function(){this._requireSelection=
!0;this._selectedIndex=-1;this._ignoreChanges=!1;this._items=[];qa.call(this)};t["feathers.core.ToggleGroup"]=vp;vp.__name__="feathers.core.ToggleGroup";vp.__interfaces__=[qi,lj];vp.__super__=qa;vp.prototype=I(qa.prototype,{_items:null,get_numItems:function(){return this._items.length},_ignoreChanges:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){var b=this._items.length;if(a<-1||a>b)throw new we("Index "+a+" is out of range "+b+" for ToggleGroup.");
b=this._selectedIndex!=a;this._selectedIndex=a;var c=this._ignoreChanges;this._ignoreChanges=!0;for(var d=0,f=this._items.length;d<f;){var g=d++;this._items[g].set_selected(g==a)}this._ignoreChanges=c;b&&Y.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._items.length-1},get_selectedItem:function(){return this._selectedIndex==-1?null:this._items[this._selectedIndex]},set_selectedItem:function(a){this.set_selectedIndex(this._items.indexOf(a));return this.get_selectedItem()},
_requireSelection:null,get_requireSelection:function(){return this._requireSelection},set_requireSelection:function(a){if(this._requireSelection==a)return this._requireSelection;(this._requireSelection=a)&&this._selectedIndex==-1&&this._items.length>0&&this.set_selectedIndex(0);return this._requireSelection},addItem:function(a){if(a==null)throw new Cb("IToggle passed to ToggleGroup addItem() must not be null.");if(this._items.indexOf(a)!=-1)throw new ob("Cannot add an item to a ToggleGroup more than once.");
this._items.push(a);a.get_selected()?this.set_selectedItem(a):this._selectedIndex<0&&this._requireSelection?this.set_selectedItem(a):a.set_selected(!1);a.addEventListener("change",m(this,this.item_changeHandler),!1,0,!0);w.__implements(a,mk)&&a.set_toggleGroup(this)},removeItem:function(a){var b=this._items.indexOf(a);b!=-1&&(V.remove(this._items,a),a.removeEventListener("change",m(this,this.item_changeHandler)),w.__implements(a,mk)&&a.set_toggleGroup(null),this._selectedIndex>b?this.set_selectedIndex(this.get_selectedIndex()-
1):this.get_selectedIndex()==b&&(this._requireSelection?(a=this._items.length-1,this._selectedIndex>a?this.set_selectedIndex(a):Y.dispatch(this,"change")):this.set_selectedIndex(-1)))},removeAllItems:function(){for(var a=0,b=this._items;a<b.length;){var c=b[a];++a;c.removeEventListener("change",m(this,this.item_changeHandler));w.__implements(c,mk)&&c.set_toggleGroup(null)}this._items.length=0;this.set_selectedIndex(-1)},hasItem:function(a){return this._items.indexOf(a)!=-1},getItemAt:function(a){if(a<
0||a>=this._items.length)throw new we("The supplied index is out of bounds.");return this._items[a]},getItemIndex:function(a){return this._items.indexOf(a)},setItemIndex:function(a,b){var c=this._items.indexOf(a);if(c<0)throw new Cb("Attempting to set index of an item that has not been added to this ToggleGroup.");c!=b&&(V.remove(this._items,a),this._items.splice(b,0,a),this._selectedIndex>=0&&(this._selectedIndex==c?this.set_selectedIndex(b):c<this._selectedIndex&&b>this._selectedIndex?this.set_selectedIndex(this.get_selectedIndex()-
1):c>this._selectedIndex&&b<this._selectedIndex&&this.set_selectedIndex(this.get_selectedIndex()+1)))},item_changeHandler:function(a){if(!this._ignoreChanges){a=w.__cast(a.currentTarget,ud);var b=this._items.indexOf(a);a.get_selected()||this._requireSelection&&this._selectedIndex==b?this.set_selectedIndex(b):a.get_selected()||this.set_selectedIndex(-1)}},__class__:vp,__properties__:{set_requireSelection:"set_requireSelection",get_requireSelection:"get_requireSelection",set_selectedItem:"set_selectedItem",
get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",get_numItems:"get_numItems"}});var oj=function(a,b,c){b==null&&(b=!1);this._toggleGroup=null;this.initializeRadioTheme();hd.call(this,a,b);hd.prototype.set_toggleable.call(this,!0);this.addEventListener("addedToStage",m(this,this.radio_addedToStageHandler));this.addEventListener("keyDown",m(this,this.radio_keyDownHandler));c!=null&&this.addEventListener("change",
c)};t["feathers.controls.Radio"]=oj;oj.__name__="feathers.controls.Radio";oj.__interfaces__=[mk];oj.__super__=hd;oj.prototype=I(hd.prototype,{set_toggleable:function(a){throw new ob("Radio toggleable must always be true");},_toggleGroup:null,get_toggleGroup:function(){return this._toggleGroup},set_toggleGroup:function(a){if(this._toggleGroup==a)return this._toggleGroup;a==null&&this._toggleGroup!=oj.defaultRadioGroup&&this.stage!=null&&(a=oj.defaultRadioGroup);this._toggleGroup!=null&&this._toggleGroup.hasItem(this)&&
this._toggleGroup.removeItem(this);this._toggleGroup=a;this._toggleGroup==null||this._toggleGroup.hasItem(this)||this._toggleGroup.addItem(this);return this._toggleGroup},dispose:function(){this._toggleGroup!=null&&this.set_toggleGroup(null);hd.prototype.dispose.call(this)},initializeRadioTheme:function(){Pw.initialize()},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._toggleGroup!=null&&a.keyLocation!=4){var b=this._toggleGroup.getItemIndex(this);if(b!=-1){for(var c=!0,d=-1;c;){c=
!1;switch(a.keyCode){case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._toggleGroup.get_numItems()&&(b=this._toggleGroup.get_numItems()-1);if(!this._toggleGroup.getItemAt(b).get_enabled()){if(b==d)return;c=!0}d=b}a.preventDefault();this._toggleGroup.set_selectedIndex(b);a=w.__cast(this._toggleGroup.get_selectedItem(),qd);this._focusManager!=null?(this._focusManager.set_focus(a),a.showFocus(!0)):this.stage.set_focus(w.__cast(a,Ja))}}},radio_addedToStageHandler:function(a){this._toggleGroup==
null&&this.set_toggleGroup(oj.defaultRadioGroup);this.addEventListener("removedFromStage",m(this,this.radio_removedFromStageHandler))},radio_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.radio_removedFromStageHandler));this._toggleGroup==oj.defaultRadioGroup&&this._toggleGroup.removeItem(this)},radio_keyDownHandler:function(a){this._enabled&&this.navigateWithKeyboard(a)},get_styleContext:function(){return oj},__class__:oj,__properties__:I(hd.prototype.__properties__,
{set_toggleGroup:"set_toggleGroup",get_toggleGroup:"get_toggleGroup"})});var Lj=R["feathers.controls.ScrollMode"]={__ename__:"feathers.controls.ScrollMode",__constructs__:null,SCROLL_RECT:{_hx_name:"SCROLL_RECT",_hx_index:0,__enum__:"feathers.controls.ScrollMode",toString:E},MASK:{_hx_name:"MASK",_hx_index:1,__enum__:"feathers.controls.ScrollMode",toString:E},MASKLESS:{_hx_name:"MASKLESS",_hx_index:2,__enum__:"feathers.controls.ScrollMode",toString:E}};Lj.__constructs__=[Lj.SCROLL_RECT,Lj.MASK,Lj.MASKLESS];
var Me=R["feathers.controls.ScrollPolicy"]={__ename__:"feathers.controls.ScrollPolicy",__constructs__:null,ON:{_hx_name:"ON",_hx_index:0,__enum__:"feathers.controls.ScrollPolicy",toString:E},OFF:{_hx_name:"OFF",_hx_index:1,__enum__:"feathers.controls.ScrollPolicy",toString:E},AUTO:{_hx_name:"AUTO",_hx_index:2,__enum__:"feathers.controls.ScrollPolicy",toString:E}};Me.__constructs__=[Me.ON,Me.OFF,Me.AUTO];var wp=function(a,b,c,d){b==null&&(b=-1);this.enabled=!0;this.selected=!1;this.index=-1;this.data=
a;this.index=b;this.selected=!1;this.text=d};t["feathers.data.TabBarItemState"]=wp;wp.__name__="feathers.data.TabBarItemState";wp.prototype={owner:null,data:null,index:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:wp};var Oe=function(a,b){this.__customTabVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this._ignoreChildChanges=!1;this._layoutResult=new Kg;this._layoutMeasurements=new Sb;this._currentBackgroundSkin=this._backgroundSkinMeasurements=
null;this._ignoreSelectionChange=!1;this._layoutItems=[];this._unrenderedData=[];this.itemStatePool=new dc(function(){return new wp});this.tabToItemState=new Ta;this.stringDataToTab=new G;this.objectDataToTab=new Ta;this._additionalStorage=null;this._defaultStorage=new st(null,Ne.withClass(hd));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._selectedItem=this._previousCustomTabVariant=null;this._selectedIndex=-1;this._dataProvider=null;this.initializeTabBarTheme();fa.call(this);this.set_dataProvider(a);
this.set_tabEnabled(!0);this.set_tabChildren(!1);this.addEventListener("keyDown",m(this,this.tabBar_keyDownHandler));b!=null&&this.addEventListener("change",b)};t["feathers.controls.TabBar"]=Oe;Oe.__name__="feathers.controls.TabBar";Oe.__interfaces__=[qd,qi,lj];Oe.defaultUpdateTab=function(a,b){a.set_text(b.text)};Oe.defaultResetTab=function(a,b){a.set_text(null)};Oe.__super__=fa;Oe.prototype=I(fa.prototype,{_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==
a)return this._dataProvider;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.tabBar_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.tabBar_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.tabBar_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.tabBar_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",
m(this,this.tabBar_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.tabBar_dataProvider_resetHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.tabBar_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.tabBar_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.tabBar_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",
m(this,this.tabBar_dataProvider_updateAllHandler)));var b=this._selectedIndex,c=this._selectedItem;this._dataProvider=a;this._dataProvider!=null&&(this._dataProvider.addEventListener("change",m(this,this.tabBar_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",m(this,this.tabBar_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.tabBar_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.tabBar_dataProvider_replaceItemHandler)),
this._dataProvider.addEventListener("removeAll",m(this,this.tabBar_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.tabBar_dataProvider_resetHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.tabBar_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.tabBar_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.tabBar_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",
m(this,this.tabBar_dataProvider_updateAllHandler)));this._dataProvider==null||this._dataProvider.get_length()==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=0,this._selectedItem=this._dataProvider.get(0));if(this._selectedIndex!=b||this._selectedItem!=c)this.setInvalid(x.SELECTION),Y.dispatch(this,"change");this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._dataProvider},_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==
null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;if(a==-1)return this._selectedIndex=-1,this._selectedItem=null,this.setInvalid(x.SELECTION),Y.dispatch(this,"change"),this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._dataProvider.get(this._selectedIndex);this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},
set_selectedItem:function(a){if(a==null||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedItem},_previousCustomTabVariant:null,get_tabRecycler:function(){return this._defaultStorage.tabRecycler},
set_tabRecycler:function(a){if(this._defaultStorage.tabRecycler==a)return this._defaultStorage.tabRecycler;this._defaultStorage.oldTabRecycler=this._defaultStorage.tabRecycler;this._defaultStorage.tabRecycler=a;this.setInvalid(Oe.INVALIDATION_FLAG_TAB_FACTORY);return this._defaultStorage.tabRecycler},_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;
this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,_tabRecyclerIDFunction:null,get_tabRecyclerIDFunction:function(){return this._tabRecyclerIDFunction},set_tabRecyclerIDFunction:function(a){if(this._tabRecyclerIDFunction==a)return this._tabRecyclerIDFunction;this._tabRecyclerIDFunction=a;this.setInvalid(Oe.INVALIDATION_FLAG_TAB_FACTORY);return this._tabRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToTab:null,stringDataToTab:null,
tabToItemState:null,itemStatePool:null,_unrenderedData:null,_layoutItems:null,_ignoreSelectionChange:null,itemToText:function(a){return H.string(a)},itemToEnabled:function(a){return!0},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_layoutMeasurements:null,_layoutResult:null,_ignoreChildChanges:null,itemToTab:function(a){return a==null?null:typeof a=="string"?this.stringDataToTab.h[a]:this.objectDataToTab.h[a.__id__]},indexToTab:function(a){if(this._dataProvider==null||a<0||a>=this._dataProvider.get_length())return null;
a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToTab.h[a]:this.objectDataToTab.h[a.__id__]},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToTab.h[a]:this.objectDataToTab.h[a.__id__];if(b!=null)b=this.tabToItemState.h[b.__id__];else{var c=this._dataProvider.indexOf(a);if(c==-1)return null;b=new wp;this.populateCurrentItemState(a,c,b,!1)}return b},getTabRecycler:function(a){return this._recyclerMap==null?null:this._recyclerMap.h[a]},
setTabRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new G);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Oe.INVALIDATION_FLAG_TAB_FACTORY))},dispose:function(){this.refreshInactiveTabs(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveTabs(this._additionalStorage[c],!0)}this._selectedItem=null;this._selectedIndex=
-1;this.set_dataProvider(null);fa.prototype.dispose.call(this)},initializeTabBarTheme:function(){Sw.initialize()},update:function(){var a=this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);var b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomTabVariant!=this.get_customTabVariant()&&this.setInvalidationFlag(Oe.INVALIDATION_FLAG_TAB_FACTORY);var f=this.isInvalid(Oe.INVALIDATION_FLAG_TAB_FACTORY);(d||c)&&this.refreshBackgroundSkin();(f||b||c||a)&&this.refreshTabs();
this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.layoutBackgroundSkin();this.validateChildren();this._previousCustomTabVariant=this.get_customTabVariant()},refreshViewPortBounds:function(){this._layoutMeasurements.save(this)},handleLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._layoutResult.reset();this.get_layout()!=null&&this.get_layout().layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=
a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},validateChildren:function(){for(var a=0,b=this._layoutItems;a<b.length;){var c=b[a];++a;if(!w.__implements(c,da))break;c.validateNow()}},refreshTabs:function(){this.get_tabRecycler().update==null&&(this.get_tabRecycler().update=Oe.defaultUpdateTab,this.get_tabRecycler().reset==null&&(this.get_tabRecycler().reset=Oe.defaultResetTab));if(this._recyclerMap!=null)for(var a=
this._recyclerMap.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Oe.defaultUpdateTab,f.reset==null&&(f.reset=Oe.defaultResetTab))}a=this.isInvalid(Oe.INVALIDATION_FLAG_TAB_FACTORY);this.refreshInactiveTabs(this._defaultStorage,a);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveTabs(d,a);this.findUnrenderedData();this.recoverInactiveTabs(this._defaultStorage);if(this._additionalStorage!=
null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveTabs(d);this.renderUnrenderedData();this.freeInactiveTabs(this._defaultStorage);if(this._defaultStorage.inactiveTabs.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive tabs should be empty after updating.");if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveTabs(d),d.inactiveTabs.length>0)throw a=
w.getClass(this),new ob(""+a.__name__+": inactive tabs "+d.id+" should be empty after updating.");},refreshInactiveTabs:function(a,b){var c=a.inactiveTabs;a.inactiveTabs=a.activeTabs;a.activeTabs=c;if(a.activeTabs.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active tabs should be empty before updating.");b&&(this.recoverInactiveTabs(a),this.freeInactiveTabs(a))},recoverInactiveTabs:function(a){var b=0;for(a=a.inactiveTabs;b<a.length;){var c=a[b];++b;if(c!=null){var d=this.tabToItemState.h[c.__id__];
if(d!=null){var f=d.data;this.tabToItemState.remove(c);if(typeof f=="string"){var g=this.stringDataToTab;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}else this.objectDataToTab.remove(f);c.removeEventListener("trigger",m(this,this.tabBar_tab_triggerHandler));c.removeEventListener("change",m(this,this.tabBar_tab_changeHandler));this.resetTab(c,d);this.itemStatePool.release(d)}}}},freeInactiveTabs:function(a){for(var b=0,c=a.inactiveTabs;b<c.length;){var d=c[b];++b;d!=null&&this.destroyTab(d)}a.inactiveTabs.length=
0},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:
(w.__implements(a,Fa)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),
this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},findUnrenderedData:function(){this._layoutItems.length=0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){this._layoutItems.length=
this._dataProvider.get_length();for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._dataProvider.get_length();b<c;){var d=b++,f=this._dataProvider.get(d);var g=typeof f=="string"?this.stringDataToTab.h[f]:this.objectDataToTab.h[f.__id__];if(g!=null){var h=this.tabToItemState.h[g.__id__],n=this.populateCurrentItemState(f,d,h,this._forceItemStateUpdate),l=h.recyclerID,q=this.itemStateToStorage(h);if(q.id!=l)this._unrenderedData.push(f);else{n&&this.updateTab(g,h,q);this._layoutItems[d]=g;this.setChildIndex(g,
d+a);if(!V.remove(q.inactiveTabs,g))throw a=w.getClass(this),new ob(""+a.__name__+": tab renderer map contains bad data for item at index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");q.activeTabs.push(g)}}else this._unrenderedData.push(f)}}},renderUnrenderedData:function(){for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._unrenderedData;b<c.length;){var d=c[b];++b;var f=this._dataProvider.indexOf(d),g=this.itemStatePool.get();this.populateCurrentItemState(d,
f,g,!0);d=this.createTab(g);this.addChildAt(d,f+a);this._layoutItems[f]=d}this._unrenderedData.length=0},createTab:function(a){var b=this.itemStateToStorage(a);if(b.inactiveTabs.length==0){var c=this.get_tabRecycler().create();if(c.get_variant()==null){var d=this.get_customTabVariant()!=null?this.get_customTabVariant():Oe.CHILD_VARIANT_TAB;c.set_variant(d)}c.initializeNow()}else c=b.inactiveTabs.shift();this.updateTab(c,a,b);c.addEventListener("trigger",m(this,this.tabBar_tab_triggerHandler));c.addEventListener("change",
m(this,this.tabBar_tab_changeHandler));this.tabToItemState.set(c,a);a=a.data;typeof a=="string"?this.stringDataToTab.h[a]=c:this.objectDataToTab.set(a,c);b.activeTabs.push(c);return c},destroyTab:function(a){this.removeChild(a);this.get_tabRecycler().destroy!=null&&this.get_tabRecycler().destroy(a)},itemStateToStorage:function(a){var b=null;this._tabRecyclerIDFunction!=null&&(b=this._tabRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new ob('Item renderer recycler ID "'+
b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<d;){var f=c++;f=this._additionalStorage[f];if(f.tabRecycler==a)return f}f=new st(b,a);this._additionalStorage.push(f);return f},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.index!=b)c.index=b,f=!0;b=a==this._selectedItem;if(d||c.selected!=b)c.selected=
b,f=!0;b=this._enabled&&this.itemToEnabled(a);if(d||c.enabled!=b)c.enabled=b,f=!0;a=this.itemToText(a);if(d||c.text!=a)c.text=a,f=!0;return f},updateTab:function(a,b,c){b.recyclerID=c.id;c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_tabRecycler().update!=null&&this.get_tabRecycler().update(a,b);this._ignoreSelectionChange=c;this.refreshTabProperties(a,b)},resetTab:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_tabRecycler()!=null&&this.get_tabRecycler().reset!=
null&&this.get_tabRecycler().reset(a,b);this._ignoreSelectionChange=c;this.refreshTabProperties(a,Oe.RESET_TAB_STATE)},refreshTabProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.data);w.__implements(a,ri)&&a.set_layoutIndex(b.index);a.set_selected(b.selected);a.set_enabled(b.enabled);this._ignoreSelectionChange=c},refreshSelectedIndicesAfterFilterOrSort:function(){this._selectedIndex!=
-1&&this.set_selectedIndex(this._dataProvider.indexOf(this._selectedItem))},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:if(a.keyLocation==4)return;--b;break;case 39:++b;break;case 40:if(a.keyLocation==4)return;++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&
(b=this._dataProvider.get_length()-1);a.preventDefault();this.set_selectedIndex(b)}},tabBar_keyDownHandler:function(a){this._enabled&&this.navigateWithKeyboard(a)},tabBar_tab_triggerHandler:function(a){a=w.__cast(a.currentTarget,hd);Rj.dispatch(this,"itemTrigger",this.tabToItemState.h[a.__id__])},tabBar_tab_changeHandler:function(a){this._ignoreSelectionChange||(a=w.__cast(a.currentTarget,hd),a.get_selected()?this.set_selectedItem(this.tabToItemState.h[a.__id__].data):a.set_selected(!0))},tabBar_dataProvider_changeHandler:function(a){this.setInvalid(x.DATA)},
tabBar_dataProvider_addItemHandler:function(a){this._selectedIndex!=-1&&this._selectedIndex>=a.index&&(this._selectedIndex++,Y.dispatch(this,"change"))},tabBar_dataProvider_removeItemHandler:function(a){this._selectedIndex!=-1&&(this._selectedIndex==a.index?(a.index==this._dataProvider.get_length()&&(this._selectedIndex=this._dataProvider.get_length()-1),this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex),Y.dispatch(this,"change")):this._selectedIndex>a.index&&
(this._selectedIndex--,Y.dispatch(this,"change")))},tabBar_dataProvider_replaceItemHandler:function(a){this._selectedIndex!=-1&&this._selectedIndex==a.index&&(this._selectedItem=this._dataProvider.get(this._selectedIndex),Y.dispatch(this,"change"))},tabBar_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1)},tabBar_dataProvider_resetHandler:function(a){this.set_selectedIndex(-1)},tabBar_dataProvider_sortChangeHandler:function(a){this.refreshSelectedIndicesAfterFilterOrSort()},tabBar_dataProvider_filterChangeHandler:function(a){this.refreshSelectedIndicesAfterFilterOrSort()},
updateTabForIndex:function(a){var b=this._dataProvider.get(a);var c=typeof b=="string"?this.stringDataToTab.h[b]:this.objectDataToTab.h[b.__id__];if(c==null)this.setInvalid(x.DATA);else{var d=this.tabToItemState.h[c.__id__];d.owner!=null&&(this.itemStateToStorage(d),this.populateCurrentItemState(b,a,d,!0),this.resetTab(c,d),d.owner=null,this.setInvalid(x.DATA))}},tabBar_dataProvider_updateItemHandler:function(a){this.updateTabForIndex(a.index)},tabBar_dataProvider_updateAllHandler:function(a){a=0;
for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateTabForIndex(c)}},__customTabVariant:null,get_customTabVariant:function(){return this.__customTabVariant},set_customTabVariant:function(a){if(!this.setStyle("customTabVariant")||this.__customTabVariant==a)return this.__customTabVariant;this._previousClearStyle=m(this,this.clearStyle_customTabVariant);this.__customTabVariant=a;this.setInvalid(x.STYLES);return this.__customTabVariant},clearStyle_customTabVariant:function(){this.set_customTabVariant(null);
return this.get_customTabVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||
this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==
a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},get_styleContext:function(){return Oe},__class__:Oe,__properties__:I(fa.prototype.__properties__,{set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout",set_tabRecyclerIDFunction:"set_tabRecyclerIDFunction",get_tabRecyclerIDFunction:"get_tabRecyclerIDFunction",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_tabRecycler:"set_tabRecycler",get_tabRecycler:"get_tabRecycler",set_customTabVariant:"set_customTabVariant",get_customTabVariant:"get_customTabVariant",set_selectedItem:"set_selectedItem",
get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var st=function(a,b){this.inactiveTabs=[];this.activeTabs=[];this.id=a;this.tabRecycler=b};t["feathers.controls._TabBar.TabStorage"]=st;st.__name__="feathers.controls._TabBar.TabStorage";st.prototype={id:null,oldTabRecycler:null,tabRecycler:null,activeTabs:null,inactiveTabs:null,
__class__:st};var tf=function(a,b,c){a==null&&(a="");this.__customErrorCalloutVariant=null;this.__showPromptWhenEmptyAndFocused=!0;this.__textPaddingTop=this.__textPaddingRight=this.__textPaddingBottom=this.__textPaddingLeft=0;this.__wordWrap=!0;this.__embedFonts=!1;this.__textFormat=this.__disabledTextFormat=this.__promptTextFormat=null;this.__smoothScrolling=!1;this.__errorFocusRectSkin=null;this._stateToSkin=new cf;this._ignoreViewPortTextChange=!1;this._previousCustomErrorCalloutVariant=null;
this._maxChars=0;this._stateToTextFormat=new cf;this._errorString=null;this._errorStatePriority=this._focusedStatePriority=0;this._displayAsPassword=!1;this._currentState=Fe.ENABLED;this._editable=this._selectable=!0;this._updatedPromptStyles=!1;this._previousTextFormat=this._previousSimpleTextFormat=this._previousPrompt=this._previousPromptTextFormat=this._previousSimplePromptTextFormat=null;this.initializeTextAreaTheme();Ab.call(this);this.set_text(a);this.set_prompt(b);this.set_tabEnabled(!0);
this.set_tabChildren(!1);this.focusRect=null;this.get_viewPort()==null&&(this.textFieldViewPort=new xp,this.textFieldViewPort.set_wordWrap(!0),this.textFieldViewPort.set_multiline(!0),this.textFieldViewPort.addEventListener("change",m(this,this.textArea_viewPort_changeHandler)),this.addChild(this.textFieldViewPort),this.set_viewPort(this.textFieldViewPort));this.addEventListener("focusIn",m(this,this.textArea_focusInHandler));this.addEventListener("focusOut",m(this,this.textArea_focusOutHandler));
c!=null&&this.addEventListener("change",c)};t["feathers.controls.TextArea"]=tf;tf.__name__="feathers.controls.TextArea";tf.__interfaces__=[Th,re,uh];tf.__super__=Ab;tf.prototype=I(Ab.prototype,{textFieldViewPort:null,promptTextField:null,errorStringCallout:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_previousPrompt:null,_previousPromptTextFormat:null,_previousSimplePromptTextFormat:null,_updatedPromptStyles:null,_promptTextMeasuredWidth:null,_promptTextMeasuredHeight:null,get_tabEnabled:function(){return this._enabled?
this.get_rawTabEnabled():!1},_editable:null,get_editable:function(){return this._editable},set_editable:function(a){if(this._editable==a)return this._editable;this._editable=a;this.setInvalid(x.STATE);return this._editable},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.DATA);return this._selectable},_currentState:null,get_currentState:function(){return this._currentState},
set_enabled:function(a){Ab.prototype.set_enabled.call(this,a);this.refreshState();return this._enabled},_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);Y.dispatch(this,"change");return this._text},get_baseline:function(){return this.textFieldViewPort==null?0:this.get_paddingTop()+this.textFieldViewPort.get_baseline()},_prompt:null,get_prompt:function(){return this._prompt},
set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},___restrict:null,get_restrict:function(){return this.___restrict},set_restrict:function(a){if(this.___restrict==a)return this.___restrict;this.___restrict=a;this.setInvalid(x.DATA);return this.___restrict},_displayAsPassword:null,get_displayAsPassword:function(){return this._displayAsPassword},set_displayAsPassword:function(a){if(this._displayAsPassword==a)return this._displayAsPassword;
this._displayAsPassword=a;this.setInvalid(x.DATA);return this._displayAsPassword},_errorStatePriority:null,get_errorStatePriority:function(){return this._errorStatePriority},set_errorStatePriority:function(a){if(this._errorStatePriority==a)return this._errorStatePriority;this._errorStatePriority=a;this.setInvalid(x.STATE);return this._errorStatePriority},_focusedStatePriority:null,get_focusedStatePriority:function(){return this._errorStatePriority},set_focusedStatePriority:function(a){if(this._focusedStatePriority==
a)return this._focusedStatePriority;this._focusedStatePriority=a;this.setInvalid(x.STATE);return this._focusedStatePriority},_errorString:null,get_errorString:function(){return this._errorString},set_errorString:function(a){if(this._errorString==a)return this._errorString;this._errorString=a;this.refreshState();this.setInvalid(x.DATA);return this._errorString},get_errorStringCalloutOpen:function(){return this.errorStringCallout!=null?this.errorStringCallout.parent!=null:!1},_stateToTextFormat:null,
get_selectionAnchorIndex:function(){return this.textFieldViewPort.get_selectionAnchorIndex()},get_selectionActiveIndex:function(){return this.textFieldViewPort.get_selectionActiveIndex()},_maxChars:null,get_maxChars:function(){return this._maxChars},set_maxChars:function(a){if(this._maxChars==a)return this._maxChars;this._maxChars=a;this.setInvalid(x.DATA);return this._maxChars},_oldErrorCalloutFactory:null,_errorCalloutFactory:null,get_errorCalloutFactory:function(){return this._errorCalloutFactory},
set_errorCalloutFactory:function(a){if(this._errorCalloutFactory==a)return this._errorCalloutFactory;this._errorCalloutFactory=a;this.setInvalid(tf.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);return this._errorCalloutFactory},_previousCustomErrorCalloutVariant:null,_ignoreViewPortTextChange:null,get_measureViewPort:function(){return!1},get_stageFocusTarget:function(){return this.textFieldViewPort},_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},setSkinForState:function(a,
b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,b),
this.setInvalid(x.STYLES))},selectRange:function(a,b){this.textFieldViewPort.selectRange(a,b)},selectAll:function(){this.textFieldViewPort.selectRange(0,this._text.length)},setTextPadding:function(a){this.set_textPaddingTop(a);this.set_textPaddingRight(a);this.set_textPaddingBottom(a);this.set_textPaddingLeft(a)},showFocus:function(a){Ab.prototype.showFocus.call(this,a);a&&this.selectRange(this._text.length,0)},dispose:function(){this.destroyErrorCallout();Ab.prototype.dispose.call(this)},initializeTextAreaTheme:function(){Uw.initialize()},
update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomErrorCalloutVariant!=this.get_customErrorCalloutVariant()&&this.setInvalidationFlag(tf.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);var f=this.isInvalid(tf.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);this._updatedPromptStyles=!1;(f||a)&&this.createErrorCallout();(a||c)&&this.refreshPrompt();(a||d||c)&&this.refreshPromptStyles();(a||d||b)&&this.refreshPromptText(b);
d&&(this.refreshTextStyles(),this.textFieldViewPort.set_embedFonts(this.get_embedFonts()),this.textFieldViewPort.set_wordWrap(this.get_wordWrap()),this.textFieldViewPort.set_paddingTop(this.get_textPaddingTop()),this.textFieldViewPort.set_paddingRight(this.get_textPaddingRight()),this.textFieldViewPort.set_paddingBottom(this.get_textPaddingBottom()),this.textFieldViewPort.set_paddingLeft(this.get_textPaddingLeft()),this.textFieldViewPort.set_smoothScrolling(this.get_smoothScrolling()));a&&(b=this._ignoreViewPortTextChange,
this._ignoreViewPortTextChange=!0,this.textFieldViewPort.set_text(this._text),this._ignoreViewPortTextChange=b,this.textFieldViewPort.set_restrict(this.___restrict),this.textFieldViewPort.set_maxChars(this._maxChars),this.textFieldViewPort.set_displayAsPassword(this._displayAsPassword),this._editable?this.textFieldViewPort.set_selectable(this._enabled):this.textFieldViewPort.set_selectable(this._enabled&&this._selectable));c&&(this.textFieldViewPort.set_enabled(this._enabled),this.textFieldViewPort.set_textFieldType(this._editable?
1:0));Ab.prototype.update.call(this);(f||c||a)&&this.refreshErrorString();this._previousCustomErrorCalloutVariant=this.get_customErrorCalloutVariant()},layoutChildren:function(){Ab.prototype.layoutChildren.call(this);this.layoutPrompt()},addCurrentBackgroundSkin:function(a){a!=null&&w.__implements(a,ee)&&a.set_stateContext(this);Ab.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&(w.__implements(a,ee)&&a.set_stateContext(null),Ab.prototype.removeCurrentBackgroundSkin.call(this,
a))},refreshTextStyles:function(){var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.textArea_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.textArea_textFormat_changeHandler),!1,0,!0),this.textFieldViewPort.set_textFormat(b)),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshPrompt:function(){this._prompt==
null?this.promptTextField!=null&&(this.removeChild(this.promptTextField),this.promptTextField=null):(this.promptTextField==null&&(this.promptTextField=new Jc,this.promptTextField.set_selectable(!1),this.promptTextField.set_mouseWheelEnabled(!1),this.promptTextField.mouseEnabled=!1,this.promptTextField.set_multiline(!0),this.addChildAt(this.promptTextField,this.getChildIndex(this.textFieldViewPort))),this.promptTextField.set_visible(this._text.length==0&&(this.get_currentState()!=Fe.FOCUSED||this.get_showPromptWhenEmptyAndFocused())))},
refreshPromptText:function(a){this._prompt!=null&&(this._prompt!=this._previousPrompt||this._updatedPromptStyles||a)&&(this.promptTextField.set_autoSize(1),(a=this._prompt.length>0)?this.promptTextField.set_text(this._prompt):this.promptTextField.set_text("\u200b"),this.promptTextField.set_wordWrap(!1),this._promptTextMeasuredWidth=this.promptTextField.get_width(),this._promptTextMeasuredHeight=this.promptTextField.get_height(),this.promptTextField.set_autoSize(2),this.promptTextField.set_wordWrap(!0),
a||this.promptTextField.set_text(""),this._previousPrompt=this._prompt)},refreshPromptStyles:function(){if(this._prompt!=null){this.promptTextField.get_embedFonts()!=this.get_embedFonts()&&(this.promptTextField.set_embedFonts(this.get_embedFonts()),this._updatedPromptStyles=!0);var a=this.getCurrentPromptTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimplePromptTextFormat&&(this._previousPromptTextFormat!=null&&this._previousPromptTextFormat.removeEventListener("change",m(this,
this.textArea_promptTextFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.textArea_promptTextFormat_changeHandler),!1,0,!0),this.promptTextField.set_defaultTextFormat(b),this._updatedPromptStyles=!0),this._previousPromptTextFormat=a,this._previousSimplePromptTextFormat=b)}},getCurrentPromptTextFormat:function(){var a=this.get_promptTextFormat();this._enabled||this.get_disabledTextFormat()==null||(a=this.get_disabledTextFormat());a==null&&(a=this.get_textFormat());return a},
refreshErrorString:function(){this.errorStringCallout!=null&&(this.errorStringCallout.set_text(this._errorString),this._currentState==Fe.FOCUSED&&this.errorStringCallout.parent==null?Aa.addPopUp(this.errorStringCallout,this,!1,!1):this._currentState!=Fe.FOCUSED&&this.errorStringCallout.parent!=null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout))},layoutPrompt:function(){if(this._prompt!=null){this.promptTextField.set_x(this.leftViewPortOffset+this.get_textPaddingLeft());this.promptTextField.set_y(this.topViewPortOffset+
this.get_textPaddingTop());var a=this.get_viewPort().get_visibleWidth()-this.get_textPaddingLeft()-this.get_textPaddingRight();a<0&&(a=0);this._promptTextMeasuredWidth>a?this.promptTextField.set_width(a):this.promptTextField.set_width(this._promptTextMeasuredWidth);a=this.get_viewPort().get_visibleHeight()-this.get_textPaddingTop()-this.get_textPaddingBottom();a<0&&(a=0);this.promptTextField.set_height(a)}},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=
null?a:Ab.prototype.getCurrentBackgroundSkin.call(this)},getCurrentTextFormat:function(){var a=this._stateToTextFormat.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},createErrorCallout:function(){this.destroyErrorCallout();if(this._errorString!=null&&this._errorString.length!=0){var a=this._errorCalloutFactory!=null?this._errorCalloutFactory:tf.defaultErrorCalloutFactory;this._oldErrorCalloutFactory=
a;this.errorStringCallout=a.create();this.errorStringCallout.get_variant()==null&&this.errorStringCallout.set_variant(this.get_customErrorCalloutVariant()!=null?this.get_customErrorCalloutVariant():tf.CHILD_VARIANT_ERROR_CALLOUT);this.errorStringCallout.set_origin(this);this.errorStringCallout.closeOnPointerOutside=!1}},destroyErrorCallout:function(){this.errorStringCallout!=null&&(this.errorStringCallout.parent!=null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout),this._oldErrorCalloutFactory.destroy!=
null&&this._oldErrorCalloutFactory.destroy(this.errorStringCallout),this.errorStringCallout=this._oldErrorCalloutFactory=null)},changeState:function(a){this._enabled||(a=Fe.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),Y.dispatch(this,"stateChange"))},getCurrentFocusRectSkin:function(){return this._errorString!=null&&this.get_errorFocusRectSkin()!=null?this.get_errorFocusRectSkin():Ab.prototype.getCurrentFocusRectSkin.call(this)},refreshState:function(){if(this._enabled){var a=
this.stage!=null&&this.stage.get_focus()==this.textFieldViewPort.get_textField(),b=this._errorString!=null;a&&(!b||this._focusedStatePriority>=this._errorStatePriority)?this.changeState(Fe.FOCUSED):this._errorString!=null?this.changeState(Fe.ERROR):this.changeState(Fe.ENABLED)}else this.changeState(Fe.DISABLED)},textArea_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==null||this.textFieldViewPort==null||this.textFieldViewPort.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),
this.stage.set_focus(this.textFieldViewPort));this.refreshState()},textArea_focusOutHandler:function(a){this.refreshState()},baseScrollContainer_keyDownHandler:function(a){},textArea_viewPort_changeHandler:function(a){this._ignoreViewPortTextChange||this.set_text(this.textFieldViewPort.get_text())},textArea_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},textArea_promptTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},get_styleContext:function(){return tf},__errorFocusRectSkin:null,
get_errorFocusRectSkin:function(){return this.__errorFocusRectSkin},set_errorFocusRectSkin:function(a){if(!this.setStyle("errorFocusRectSkin")||this.__errorFocusRectSkin==a)return this.__errorFocusRectSkin;this._previousClearStyle=m(this,this.clearStyle_errorFocusRectSkin);this.__errorFocusRectSkin=a;this.setInvalid(x.STYLES);return this.__errorFocusRectSkin},clearStyle_errorFocusRectSkin:function(){this.set_errorFocusRectSkin(null);return this.get_errorFocusRectSkin()},__smoothScrolling:null,get_smoothScrolling:function(){return this.__smoothScrolling},
set_smoothScrolling:function(a){if(!this.setStyle("smoothScrolling")||this.__smoothScrolling==a)return this.__smoothScrolling;this._previousClearStyle=m(this,this.clearStyle_smoothScrolling);this.__smoothScrolling=a;this.setInvalid(x.STYLES);return this.__smoothScrolling},clearStyle_smoothScrolling:function(){this.set_smoothScrolling(!1);return this.get_smoothScrolling()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||
this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=
m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__promptTextFormat:null,get_promptTextFormat:function(){return this.__promptTextFormat},set_promptTextFormat:function(a){if(!this.setStyle("promptTextFormat")||this.__promptTextFormat==a)return this.__promptTextFormat;this._previousClearStyle=m(this,this.clearStyle_promptTextFormat);
this.__promptTextFormat=a;this.setInvalid(x.STYLES);return this.__promptTextFormat},clearStyle_promptTextFormat:function(){this.set_promptTextFormat(null);return this.get_promptTextFormat()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);
return this.get_embedFonts()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!0);return this.get_wordWrap()},__textPaddingTop:null,get_textPaddingTop:function(){return this.__textPaddingTop},set_textPaddingTop:function(a){if(!this.setStyle("textPaddingTop")||
this.__textPaddingTop==a)return this.__textPaddingTop;this._previousClearStyle=m(this,this.clearStyle_textPaddingTop);this.__textPaddingTop=a;this.setInvalid(x.STYLES);return this.__textPaddingTop},clearStyle_textPaddingTop:function(){this.set_textPaddingTop(0);return this.get_textPaddingTop()},__textPaddingRight:null,get_textPaddingRight:function(){return this.__textPaddingRight},set_textPaddingRight:function(a){if(!this.setStyle("textPaddingRight")||this.__textPaddingRight==a)return this.__textPaddingRight;
this._previousClearStyle=m(this,this.clearStyle_textPaddingRight);this.__textPaddingRight=a;this.setInvalid(x.STYLES);return this.__textPaddingRight},clearStyle_textPaddingRight:function(){this.set_textPaddingRight(0);return this.get_textPaddingRight()},__textPaddingBottom:null,get_textPaddingBottom:function(){return this.__textPaddingBottom},set_textPaddingBottom:function(a){if(!this.setStyle("textPaddingBottom")||this.__textPaddingBottom==a)return this.__textPaddingBottom;this._previousClearStyle=
m(this,this.clearStyle_textPaddingBottom);this.__textPaddingBottom=a;this.setInvalid(x.STYLES);return this.__textPaddingBottom},clearStyle_textPaddingBottom:function(){this.set_textPaddingBottom(0);return this.get_textPaddingBottom()},__textPaddingLeft:null,get_textPaddingLeft:function(){return this.__textPaddingLeft},set_textPaddingLeft:function(a){if(!this.setStyle("textPaddingLeft")||this.__textPaddingLeft==a)return this.__textPaddingLeft;this._previousClearStyle=m(this,this.clearStyle_textPaddingLeft);
this.__textPaddingLeft=a;this.setInvalid(x.STYLES);return this.__textPaddingLeft},clearStyle_textPaddingLeft:function(){this.set_textPaddingLeft(0);return this.get_textPaddingLeft()},__showPromptWhenEmptyAndFocused:null,get_showPromptWhenEmptyAndFocused:function(){return this.__showPromptWhenEmptyAndFocused},set_showPromptWhenEmptyAndFocused:function(a){if(!this.setStyle("showPromptWhenEmptyAndFocused")||this.__showPromptWhenEmptyAndFocused==a)return this.__showPromptWhenEmptyAndFocused;this._previousClearStyle=
m(this,this.clearStyle_showPromptWhenEmptyAndFocused);this.__showPromptWhenEmptyAndFocused=a;this.setInvalid(x.STYLES);return this.__showPromptWhenEmptyAndFocused},clearStyle_showPromptWhenEmptyAndFocused:function(){this.set_showPromptWhenEmptyAndFocused(!0);return this.get_showPromptWhenEmptyAndFocused()},__customErrorCalloutVariant:null,get_customErrorCalloutVariant:function(){return this.__customErrorCalloutVariant},set_customErrorCalloutVariant:function(a){if(!this.setStyle("customErrorCalloutVariant")||
this.__customErrorCalloutVariant==a)return this.__customErrorCalloutVariant;this._previousClearStyle=m(this,this.clearStyle_customErrorCalloutVariant);this.__customErrorCalloutVariant=a;this.setInvalid(x.STYLES);return this.__customErrorCalloutVariant},clearStyle_customErrorCalloutVariant:function(){this.set_customErrorCalloutVariant(null);return this.get_customErrorCalloutVariant()},__class__:tf,__properties__:I(Ab.prototype.__properties__,{get_stageFocusTarget:"get_stageFocusTarget",set_customErrorCalloutVariant:"set_customErrorCalloutVariant",
get_customErrorCalloutVariant:"get_customErrorCalloutVariant",set_errorCalloutFactory:"set_errorCalloutFactory",get_errorCalloutFactory:"get_errorCalloutFactory",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_selectionActiveIndex:"get_selectionActiveIndex",get_selectionAnchorIndex:"get_selectionAnchorIndex",set_showPromptWhenEmptyAndFocused:"set_showPromptWhenEmptyAndFocused",get_showPromptWhenEmptyAndFocused:"get_showPromptWhenEmptyAndFocused",set_textPaddingLeft:"set_textPaddingLeft",
get_textPaddingLeft:"get_textPaddingLeft",set_textPaddingBottom:"set_textPaddingBottom",get_textPaddingBottom:"get_textPaddingBottom",set_textPaddingRight:"set_textPaddingRight",get_textPaddingRight:"get_textPaddingRight",set_textPaddingTop:"set_textPaddingTop",get_textPaddingTop:"get_textPaddingTop",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_promptTextFormat:"set_promptTextFormat",get_promptTextFormat:"get_promptTextFormat",
set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_smoothScrolling:"set_smoothScrolling",get_smoothScrolling:"get_smoothScrolling",get_errorStringCalloutOpen:"get_errorStringCalloutOpen",set_errorString:"set_errorString",get_errorString:"get_errorString",set_focusedStatePriority:"set_focusedStatePriority",get_focusedStatePriority:"get_focusedStatePriority",set_errorStatePriority:"set_errorStatePriority",
get_errorStatePriority:"get_errorStatePriority",set_errorFocusRectSkin:"set_errorFocusRectSkin",get_errorFocusRectSkin:"get_errorFocusRectSkin",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_restrict:"set_restrict",get_restrict:"get_restrict",set_prompt:"set_prompt",get_prompt:"get_prompt",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text",get_currentState:"get_currentState",set_selectable:"set_selectable",get_selectable:"get_selectable",
set_editable:"set_editable",get_editable:"get_editable"})});var Fe=R["feathers.controls.TextInputState"]={__ename__:"feathers.controls.TextInputState",__constructs__:null,ENABLED:{_hx_name:"ENABLED",_hx_index:0,__enum__:"feathers.controls.TextInputState",toString:E},DISABLED:{_hx_name:"DISABLED",_hx_index:1,__enum__:"feathers.controls.TextInputState",toString:E},FOCUSED:{_hx_name:"FOCUSED",_hx_index:2,__enum__:"feathers.controls.TextInputState",toString:E},ERROR:{_hx_name:"ERROR",_hx_index:3,__enum__:"feathers.controls.TextInputState",
toString:E}};Fe.__constructs__=[Fe.ENABLED,Fe.DISABLED,Fe.FOCUSED,Fe.ERROR];var Yb=R["feathers.controls.ToggleButtonState"]={__ename__:"feathers.controls.ToggleButtonState",__constructs__:null,UP:(B=function(a){return{_hx_index:0,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:E}},B._hx_name="UP",B.__params__=["selected"],B),HOVER:(B=function(a){return{_hx_index:1,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:E}},B._hx_name="HOVER",B.__params__=["selected"],
B),DOWN:(B=function(a){return{_hx_index:2,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:E}},B._hx_name="DOWN",B.__params__=["selected"],B),DISABLED:(B=function(a){return{_hx_index:3,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:E}},B._hx_name="DISABLED",B.__params__=["selected"],B)};Yb.__constructs__=[Yb.UP,Yb.HOVER,Yb.DOWN,Yb.DISABLED];var Mk=function(a,b){a==null&&(a=!1);this.__toggleEase=th.easeOut;this.__toggleDuration=.25;this.__paddingRight=this.__paddingLeft=
0;this.__thumbSkin=this.__trackSkin=this.__secondaryTrackSkin=null;this.__embedFonts=!1;this.__textFormat=this.__disabledTextFormat=null;this._ignoreClick=this._animateSelectionChange=!1;this._currentThumbSkin=this._thumbSkinMeasurements=this._currentTrackSkin=this._trackSkinMeasurements=this._currentSecondaryTrackSkin=this._secondaryTrackSkinMeasurements=this._toggleTween=null;this._onTextMeasuredWidth=this._onTextMeasuredHeight=this._offTextMeasuredWidth=this._offTextMeasuredHeight=0;this._updatedOnTextStyles=
this._updatedOffTextStyles=!1;this._onText=this._offText=this._previousOnText=this._previousOffText=this._previousOnTextFormat=this._previousOnSimpleTextFormat=this._previousOffTextFormat=this._previousOffSimpleTextFormat=null;this._selected=!1;this.initializeToggleSwitchTheme();fa.call(this);this.set_selected(a);this.mouseChildren=!1;this.set_buttonMode(!0);this.useHandCursor=!1;this.set_tabEnabled(!0);this.set_tabChildren(!1);this.focusRect=null;this.addEventListener("keyDown",m(this,this.toggleSwitch_keyDownHandler));
this.addEventListener("mouseDown",m(this,this.toggleSwitch_mouseDownHandler));this.addEventListener("click",m(this,this.toggleSwitch_clickHandler));this.addEventListener("touchTap",m(this,this.toggleSwitch_touchTapHandler));b!=null&&this.addEventListener("change",b)};t["feathers.controls.ToggleSwitch"]=Mk;Mk.__name__="feathers.controls.ToggleSwitch";Mk.__interfaces__=[qd,ud];Mk.__super__=fa;Mk.prototype=I(fa.prototype,{onTextField:null,offTextField:null,_selected:null,get_selected:function(){return this._selected},
set_selected:function(a){this._animateSelectionChange=!1;if(this._selected==a)return this._selected;this._selected=a;Y.dispatch(this,"change");this.setInvalid(x.SELECTION);return this._selected},_onText:null,get_onText:function(){return this._onText},set_onText:function(a){if(this._onText==a)return this._onText;this._onText=a;this.setInvalid(x.DATA);return this._onText},_offText:null,get_offText:function(){return this._offText},set_offText:function(a){if(this._offText==a)return this._offText;this._offText=
a;this.setInvalid(x.DATA);return this._offText},_previousOnText:null,_previousOffText:null,_previousOnTextFormat:null,_previousOnSimpleTextFormat:null,_previousOffTextFormat:null,_previousOffSimpleTextFormat:null,_updatedOnTextStyles:null,_updatedOffTextStyles:null,_onTextMeasuredWidth:null,_onTextMeasuredHeight:null,_offTextMeasuredWidth:null,_offTextMeasuredHeight:null,_currentThumbSkin:null,_thumbSkinMeasurements:null,_currentTrackSkin:null,_trackSkinMeasurements:null,_currentSecondaryTrackSkin:null,
_secondaryTrackSkinMeasurements:null,_toggleTween:null,_dragStartX:null,_ignoreClick:null,_animateSelectionChange:null,setSelectionWithAnimation:function(a){if(this._selected==a)return this._selected;this.set_selected(a);this._animateSelectionChange=!0;return this._selected},setPadding:function(a){this.set_paddingRight(a);this.set_paddingLeft(a)},initializeToggleSwitchTheme:function(){Yw.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),
d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._updatedOffTextStyles=this._updatedOnTextStyles=!1;f&&(this.refreshThumb(),this.refreshTrack(),this.refreshSecondaryTrack());a&&this.refreshTextFields();(a||f||d)&&this.refreshTextStyles();if(a||f||d||c)this.refreshOnText(c),this.refreshOffText(c);(b||f)&&this.refreshSelection();(d||f)&&this.refreshEnabled();this.measure();this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=
null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow());c=this.get_explicitWidth();a&&(c=0,this._currentTrackSkin!=null&&(c+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(c+=this._currentSecondaryTrackSkin.get_width())),this.onTextField!=null&&(a=this._onTextMeasuredWidth,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_width()),c<
a&&(c=a)),this.offTextField!=null&&(a=this._offTextMeasuredWidth,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_width()),c<a&&(c=a)));a=this.get_explicitHeight();b&&(a=0,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(a<this._currentTrackSkin.get_height()&&(a=this._currentTrackSkin.get_height()),this._currentSecondaryTrackSkin!=null&&a<this._currentSecondaryTrackSkin.get_height()&&(a=this._currentSecondaryTrackSkin.get_height())),
this.onTextField!=null&&a<this._onTextMeasuredHeight&&(a=this._onTextMeasuredHeight),this.offTextField!=null&&a<this._offTextMeasuredHeight&&(a=this._offTextMeasuredHeight));return this.saveMeasurements(c,a,c,a,c,a)},refreshTextFields:function(){if(this._onText==null)this.onTextField!=null&&(this.removeChild(this.onTextField),this.onTextField=null);else if(this.onTextField==null){var a=0;this._currentSecondaryTrackSkin!=null?a=2:this._currentTrackSkin!=null&&(a=1);this.onTextField=new Jc;this.addChildAt(this.onTextField,
a)}this._offText==null?this.offTextField!=null&&(this.removeChild(this.offTextField),this.offTextField=null):this.offTextField==null&&(a=0,this._currentSecondaryTrackSkin!=null?a=2:this._currentTrackSkin!=null&&(a=1),this.offTextField=new Jc,this.addChildAt(this.offTextField,a))},refreshTextStyles:function(){var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;this.offTextField!=null&&(this.offTextField.get_embedFonts()!=this.get_embedFonts()&&(this.offTextField.set_embedFonts(this.get_embedFonts()),
this._updatedOffTextStyles=!0),b!=this._previousOffSimpleTextFormat&&(this._previousOffTextFormat!=null&&this._previousOffTextFormat.removeEventListener("change",m(this,this.toggleSwitch_offTextFormat_changeHandler)),this.offTextField.get_caretIndex()!=-1&&this.offTextField.get_selectionBeginIndex()!=this.offTextField.get_selectionEndIndex()&&this.offTextField.setSelection(0,0),a!=null&&(a.addEventListener("change",m(this,this.toggleSwitch_offTextFormat_changeHandler),!1,0,!0),this.offTextField.set_defaultTextFormat(b),
this._updatedOffTextStyles=!0),this._previousOffTextFormat=a,this._previousOffSimpleTextFormat=b));this.onTextField!=null&&(this.onTextField.get_embedFonts()!=this.get_embedFonts()&&(this.onTextField.set_embedFonts(this.get_embedFonts()),this._updatedOnTextStyles=!0),b!=this._previousOnSimpleTextFormat&&(this._previousOnTextFormat!=null&&this._previousOnTextFormat.removeEventListener("change",m(this,this.toggleSwitch_onTextFormat_changeHandler)),this.onTextField.get_caretIndex()!=-1&&this.onTextField.get_selectionBeginIndex()!=
this.onTextField.get_selectionEndIndex()&&this.onTextField.setSelection(0,0),a!=null&&(a.addEventListener("change",m(this,this.toggleSwitch_onTextFormat_changeHandler),!1,0,!0),this.onTextField.set_defaultTextFormat(b),this._updatedOnTextStyles=!0),this._previousOnTextFormat=a,this._previousOnSimpleTextFormat=b))},refreshOnText:function(a){if(this.onTextField!=null){var b=this._onText!=null&&this._onText.length>0;if(this._onText!=this._previousOnText||this._updatedOnTextStyles||a)this.onTextField.set_autoSize(1),
b?this.onTextField.set_text(this._onText):this.onTextField.set_text("\u200b"),this._onTextMeasuredWidth=this.onTextField.get_textWidth()+4,this._onTextMeasuredHeight=this.onTextField.get_height(),this.onTextField.set_autoSize(2),b||this.onTextField.set_text(""),this._previousOnText=this._onText}},refreshOffText:function(a){if(this.offTextField!=null){var b=this._offText!=null&&this._offText.length>0;if(this._offText!=this._previousOffText||this._updatedOffTextStyles||a)this.offTextField.set_autoSize(1),
b?this.offTextField.set_text(this._offText):this.offTextField.set_text("\u200b"),this._offTextMeasuredWidth=this.offTextField.get_textWidth()+4,this._offTextMeasuredHeight=this.offTextField.get_height(),this.offTextField.set_autoSize(2),b||this.offTextField.set_text(""),this._previousOffText=this._offText}},getCurrentTextFormat:function(){return this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshThumb:function(){var a=this._currentThumbSkin;
this._currentThumbSkin=this.get_thumbSkin();this._currentThumbSkin!=a&&(a!=null&&a.parent==this&&(w.__implements(a,qb)&&a.set_uiContext(null),this.removeChild(a)),this._currentThumbSkin!=null?(w.__implements(this._currentThumbSkin,Fa)&&this._currentThumbSkin.initializeNow(),this._thumbSkinMeasurements==null?this._thumbSkinMeasurements=new Sb(this._currentThumbSkin):this._thumbSkinMeasurements.save(this._currentThumbSkin),w.__implements(this._currentThumbSkin,qb)&&this._currentThumbSkin.set_uiContext(this),
this.addChild(this._currentThumbSkin)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=a&&(a!=null&&a.parent==this&&(w.__implements(a,qb)&&a.set_uiContext(null),this.removeChild(a)),this._currentTrackSkin!=null?(w.__implements(this._currentTrackSkin,Fa)&&this._currentTrackSkin.initializeNow(),this._trackSkinMeasurements==null?this._trackSkinMeasurements=new Sb(this._currentTrackSkin):this._trackSkinMeasurements.save(this._currentTrackSkin),
w.__implements(this._currentTrackSkin,qb)&&this._currentTrackSkin.set_uiContext(this),this.addChildAt(this._currentTrackSkin,0)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&a.parent==this&&(w.__implements(a,qb)&&a.set_uiContext(null),this.removeChild(a)),this._currentSecondaryTrackSkin!=null?(w.__implements(this._currentSecondaryTrackSkin,
Fa)&&this._currentSecondaryTrackSkin.initializeNow(),this._secondaryTrackSkinMeasurements==null?this._secondaryTrackSkinMeasurements=new Sb(this._currentSecondaryTrackSkin):this._secondaryTrackSkinMeasurements.save(this._currentSecondaryTrackSkin),w.__implements(this._currentSecondaryTrackSkin,qb)&&this._currentSecondaryTrackSkin.set_uiContext(this),this.addChildAt(this._currentSecondaryTrackSkin,this._currentTrackSkin!=null?1:0)):this._secondaryTrackSkinMeasurements=null)},refreshSelection:function(){w.__implements(this._currentThumbSkin,
ud)&&this._currentThumbSkin.set_selected(this._selected);w.__implements(this._currentTrackSkin,ud)&&this._currentTrackSkin.set_selected(this._selected);w.__implements(this._currentSecondaryTrackSkin,ud)&&this._currentSecondaryTrackSkin.set_selected(this._selected);this._toggleTween!=null&&(Ca.stop(this._toggleTween,null,!1,!1),this._toggleTween=null)},refreshEnabled:function(){w.__implements(this._currentThumbSkin,Fa)&&this._currentThumbSkin.set_enabled(this._enabled);w.__implements(this._currentTrackSkin,
Fa)&&this._currentTrackSkin.set_enabled(this._enabled);w.__implements(this._currentSecondaryTrackSkin,Fa)&&this._currentSecondaryTrackSkin.set_enabled(this._enabled)},layoutContent:function(){this.layoutThumb();this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=null?this.layoutSplitTrack():this.layoutSingleTrack();this.layoutText()},layoutText:function(){if(this.onTextField!=null){var a=this.actualWidth-this._currentThumbSkin.get_width()-this.get_paddingLeft()-this.get_paddingRight(),
b=this._onTextMeasuredWidth;b>a&&(b=a);this.onTextField.set_width(b);this.onTextField.set_x(this.get_paddingLeft()+(a-b)/2);a=(this.actualHeight-this._onTextMeasuredHeight)/2;a<0&&(a=0);this.onTextField.set_y(a);this.onTextField.set_visible(this._currentThumbSkin.get_x()>=this.onTextField.get_x())}this.offTextField!=null&&(a=this.actualWidth-this._currentThumbSkin.get_width()-this.get_paddingLeft()-this.get_paddingRight(),b=this._offTextMeasuredWidth,b>a&&(b=a),this.offTextField.set_width(b),this.offTextField.set_x(this.actualWidth-
this.get_paddingRight()-a+(a-b)/2),a=(this.actualHeight-this._offTextMeasuredHeight)/2,a<0&&(a=0),this.offTextField.set_y(a),this.offTextField.set_visible(this._currentThumbSkin.get_x()+this._currentThumbSkin.get_width()<=this.offTextField.get_x()+b))},layoutThumb:function(){var a=this;if(this._currentThumbSkin!=null){w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow();var b=this.get_paddingLeft();this._selected&&(b=this.actualWidth-this._currentThumbSkin.get_width()-this.get_paddingRight());
this._animateSelectionChange?(this._toggleTween=Ca.update(function(c){return a._currentThumbSkin.set_x(c)},this.get_toggleDuration(),[this._currentThumbSkin.get_x()],[b],!0),this._toggleTween.ease(this.get_toggleEase()),this._toggleTween.onUpdate(m(this,this.toggleTween_onUpdate)),this._toggleTween.onComplete(m(this,this.toggleTween_onComplete))):this._toggleTween==null&&this._currentThumbSkin.set_x(b);this._currentThumbSkin.set_y((this.actualHeight-this._currentThumbSkin.get_height())/2);this._animateSelectionChange=
!1}},layoutSplitTrack:function(){if(this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=null){var a=this._currentThumbSkin.get_x()+this._currentThumbSkin.get_width()/2;this._currentTrackSkin.set_x(0);this._currentTrackSkin.set_width(a);this._currentSecondaryTrackSkin.set_x(a);this._currentSecondaryTrackSkin.set_width(this.actualWidth-a);w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow();w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow();
this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2);this._currentSecondaryTrackSkin.set_y((this.actualHeight-this._currentSecondaryTrackSkin.get_height())/2)}},layoutSingleTrack:function(){this._currentTrackSkin!=null&&(this._currentTrackSkin.set_x(0),this._currentTrackSkin.set_width(this.actualWidth),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow(),this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/
2))},toggleSwitch_keyDownHandler:function(a){!this._enabled||this.get_buttonMode()&&this.focusRect==1||a.keyCode!=32&&a.keyCode!=13||(a.preventDefault(),this.dispatchEvent(new Ic("click")))},toggleSwitch_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Pd.forStage(this.stage).claimMouse(this)&&(this._dragStartX=this.get_mouseX(),this._ignoreClick=!1,this.stage.addEventListener("mouseMove",m(this,this.toggleSwitch_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",
m(this,this.toggleSwitch_stage_mouseUpHandler),!1,0,!0))},toggleSwitch_clickHandler:function(a){this._enabled&&!this._ignoreClick&&this.setSelectionWithAnimation(!this._selected)},toggleSwitch_touchTapHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&!this._ignoreClick&&this.setSelectionWithAnimation(!this._selected)},toggleSwitch_stage_mouseMoveHandler:function(a){if(this._enabled){a=(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight())/2;var b=this.get_mouseX()-this._dragStartX,
c=this._selected;b>=a?c=!0:b<=-a&&(c=!1);this._selected!=c&&(this._ignoreClick=!0,this._dragStartX=this.get_mouseX(),this.setSelectionWithAnimation(c))}},toggleSwitch_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.toggleSwitch_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.toggleSwitch_stage_mouseUpHandler))},toggleTween_onUpdate:function(){this.layoutContent()},toggleTween_onComplete:function(){this._toggleTween=
null},toggleSwitch_onTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},toggleSwitch_offTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);
return this.get_textFormat()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},
__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__thumbSkin:null,get_thumbSkin:function(){return this.__thumbSkin},set_thumbSkin:function(a){if(!this.setStyle("thumbSkin")||
this.__thumbSkin==a)return this.__thumbSkin;this._previousClearStyle=m(this,this.clearStyle_thumbSkin);this.__thumbSkin=a;this.setInvalid(x.STYLES);return this.__thumbSkin},clearStyle_thumbSkin:function(){this.set_thumbSkin(null);return this.get_thumbSkin()},__trackSkin:null,get_trackSkin:function(){return this.__trackSkin},set_trackSkin:function(a){if(!this.setStyle("trackSkin")||this.__trackSkin==a)return this.__trackSkin;this._previousClearStyle=m(this,this.clearStyle_trackSkin);this.__trackSkin=
a;this.setInvalid(x.STYLES);return this.__trackSkin},clearStyle_trackSkin:function(){this.set_trackSkin(null);return this.get_trackSkin()},__secondaryTrackSkin:null,get_secondaryTrackSkin:function(){return this.__secondaryTrackSkin},set_secondaryTrackSkin:function(a){if(!this.setStyle("secondaryTrackSkin")||this.__secondaryTrackSkin==a)return this.__secondaryTrackSkin;this._previousClearStyle=m(this,this.clearStyle_secondaryTrackSkin);this.__secondaryTrackSkin=a;this.setInvalid(x.STYLES);return this.__secondaryTrackSkin},
clearStyle_secondaryTrackSkin:function(){this.set_secondaryTrackSkin(null);return this.get_secondaryTrackSkin()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);
return this.get_paddingRight()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__toggleDuration:null,get_toggleDuration:function(){return this.__toggleDuration},
set_toggleDuration:function(a){if(!this.setStyle("toggleDuration")||this.__toggleDuration==a)return this.__toggleDuration;this._previousClearStyle=m(this,this.clearStyle_toggleDuration);this.__toggleDuration=a;this.setInvalid(x.STYLES);return this.__toggleDuration},clearStyle_toggleDuration:function(){this.set_toggleDuration(.25);return this.get_toggleDuration()},__toggleEase:null,get_toggleEase:function(){return this.__toggleEase},set_toggleEase:function(a){if(!this.setStyle("toggleEase")||this.__toggleEase==
a)return this.__toggleEase;this._previousClearStyle=m(this,this.clearStyle_toggleEase);this.__toggleEase=a;this.setInvalid(x.STYLES);return this.__toggleEase},clearStyle_toggleEase:function(){this.set_toggleEase(th.easeOut);return this.get_toggleEase()},get_styleContext:function(){return Mk},__class__:Mk,__properties__:I(fa.prototype.__properties__,{set_toggleEase:"set_toggleEase",get_toggleEase:"get_toggleEase",set_toggleDuration:"set_toggleDuration",get_toggleDuration:"get_toggleDuration",set_paddingLeft:"set_paddingLeft",
get_paddingLeft:"get_paddingLeft",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_secondaryTrackSkin:"set_secondaryTrackSkin",get_secondaryTrackSkin:"get_secondaryTrackSkin",set_trackSkin:"set_trackSkin",get_trackSkin:"get_trackSkin",set_thumbSkin:"set_thumbSkin",get_thumbSkin:"get_thumbSkin",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_textFormat:"set_textFormat",
get_textFormat:"get_textFormat",set_offText:"set_offText",get_offText:"get_offText",set_onText:"set_onText",get_onText:"get_onText",set_selected:"set_selected",get_selected:"get_selected"})});var tt=function(a,b,c){b==null&&(b=-1);this.enabled=!0;this.columnIndex=-1;this.column=a;this.columnIndex=b;this.text=c};t["feathers.data.TreeGridViewHeaderState"]=tt;tt.__name__="feathers.data.TreeGridViewHeaderState";tt.prototype={owner:null,column:null,columnIndex:null,text:null,enabled:null,__class__:tt};
var ut=function(){this.enabled=!0;this.branch=this.opened=this.selected=!1;this.layoutIndex=-1;this.rowLocation=null};t["feathers.controls._TreeGridView.TreeGridViewRowState"]=ut;ut.__name__="feathers.controls._TreeGridView.TreeGridViewRowState";ut.prototype={owner:null,data:null,rowLocation:null,layoutIndex:null,branch:null,opened:null,selected:null,enabled:null,columns:null,cellRendererRecycler:null,customColumnWidths:null,customCellRendererVariant:null,forceItemStateUpdate:null,__class__:ut};var Cc=
function(a,b,c){this.__extendedScrollBarY=this.__showHeaderDividersOnlyWhenResizable=!1;this.__customHeaderDividerVariant=this.__columnDividerFactory=this.__customColumnDividerVariant=this.__layout=this.__columnResizeSkin=this.__headerCornerSkin=null;this.__headerDividerFactory=Lc.withClass(Xb);this._pendingScrollLocation=this._pendingScrollDuration=this.__customCellRendererVariant=this.__customHeaderRendererVariant=null;this._ignoreSelectionChange=this._ignoreOpenedChange=this._ignoreLayoutChanges=
this._ignoreHeaderLayoutChanges=!1;this._selectable=!0;this._tempVisibleIndices=new Ri(0,0);this._visibleIndices=new Ri(0,0);this._virtualCache=[];this._totalRowLayoutCount=0;this._rowLayoutItems=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.rowStatePool=new dc(function(){return new ut});this.headerStatePool=new dc(function(){return new tt});this.rowRendererToRowState=new Ta;this.dataToRowRenderer=new Ta;this.activeRowRenderers=[];this.inactiveRowRenderers=[];this.headerRendererToHeaderState=
new Ta;this.dataToHeaderRenderer=new Ta;this._resizableColumns=!1;this._cellRendererRecycler=Ne.withClass(If);this._virtualLayout=!0;this._selectedLocation=this._selectedItem=null;this._forceItemStateUpdate=!1;this._autoPopulatedColumns=this._columns=this._previousCustomHeaderRendererVariant=null;this.openBranches=[];this._childFocusEnabled=!0;this._headerScrollRect2=new Ia;this._headerScrollRect1=new Ia;this._columnDividerLayoutItems=[];this._defaultColumnDividerStorage=new qx;this._headerDividerLayoutItems=
[];this._defaultHeaderDividerStorage=new rx(Lc.withClass(Xb));this._headerLayoutItems=[];this._unrenderedHeaderData=[];this._defaultHeaderStorage=new sx(Ne.withClass(Zk));this._resizingHeaderTouchPointIsMouse=!1;this._resizingHeaderTouchPointID=null;this._resizingHeaderIndex=-1;this.initializeTreeGridViewTheme();Ab.call(this);this._rowRendererFactory==null&&this.set_rowRendererFactory(Ne.withClass(Zf));this.set_dataProvider(a);this.set_columns(b);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==
null&&(this.treeGridViewPort=new Wk,this.addChild(this.treeGridViewPort),this.set_viewPort(this.treeGridViewPort));c!=null&&this.addEventListener("change",c)};t["feathers.controls.TreeGridView"]=Cc;Cc.__name__="feathers.controls.TreeGridView";Cc.__interfaces__=[ng,qi];Cc.defaultUpdateHeaderRenderer=function(a,b){w.__implements(a,re)&&a.set_text(b.text)};Cc.defaultResetHeaderRenderer=function(a,b){w.__implements(a,re)&&a.set_text(null)};Cc.__super__=Ab;Cc.prototype=I(Ab.prototype,{_headerContainer:null,
_headerContainerLayout:null,_headerResizeContainer:null,_columnDividerContainer:null,_resizingHeaderIndex:null,_resizingHeaderTouchPointID:null,_resizingHeaderTouchPointIsMouse:null,_resizingHeaderStartStageX:null,_customColumnWidths:null,_defaultHeaderStorage:null,_unrenderedHeaderData:null,_headerLayoutItems:null,_defaultHeaderDividerStorage:null,_headerDividerLayoutItems:null,_defaultColumnDividerStorage:null,_columnDividerLayoutItems:null,_currentHeaderScrollRect:null,_headerScrollRect1:null,
_headerScrollRect2:null,_oldHeaderDividerMouseCursor:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},openBranches:null,treeGridViewPort:null,
_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._totalRowLayoutCount=this._virtualCache.length=0;this.openBranches.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.treeGridView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.treeGridView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",
m(this,this.treeGridView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.treeGridView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.treeGridView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.treeGridView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.treeGridView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("sortChange",
m(this,this.treeGridView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.treeGridView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.treeGridView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._totalRowLayoutCount=this.calculateTotalLayoutCount([]),this._virtualCache.length=this._totalRowLayoutCount,this._dataProvider.addEventListener("change",m(this,this.treeGridView_dataProvider_changeHandler)),
this._dataProvider.addEventListener("addItem",m(this,this.treeGridView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.treeGridView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.treeGridView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.treeGridView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.treeGridView_dataProvider_resetHandler)),
this._dataProvider.addEventListener("filterChange",m(this,this.treeGridView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.treeGridView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.treeGridView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.treeGridView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedLocation(null);
this._autoPopulatedColumns!=null&&(this._autoPopulatedColumns=null,this.set_columns(null));this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._dataProvider},_autoPopulatedColumns:null,_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==a)return this._columns;this._columns!=null&&(this._columns.removeEventListener("change",m(this,this.treeGridView_columns_changeHandler)),this._columns.removeEventListener("addItem",m(this,this.treeGridView_columns_addItemHandler)),
this._columns.removeEventListener("removeItem",m(this,this.treeGridView_columns_removeItemHandler)));this._columns=a;this._columns!=null&&(this._columns.addEventListener("change",m(this,this.treeGridView_columns_changeHandler)),this._columns.addEventListener("addItem",m(this,this.treeGridView_columns_addItemHandler)),this._columns.addEventListener("removeItem",m(this,this.treeGridView_columns_removeItemHandler)));this._customColumnWidths=this._autoPopulatedColumns=null;this.setInvalid(x.DATA);return this._columns},
get_rowRendererFactory:function(){return this._rowRendererFactory},set_rowRendererFactory:function(a){if(this._rowRendererFactory==a)return this._rowRendererFactory;this._oldRowRendererFactory=this._rowRendererFactory;this._rowRendererFactory=a;this.setInvalid(Cc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);return this._rowRendererFactory},get_headerRendererRecycler:function(){return this._defaultHeaderStorage.headerRendererRecycler},set_headerRendererRecycler:function(a){if(this._defaultHeaderStorage.headerRendererRecycler==
a)return this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.oldHeaderRendererRecycler=this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.headerRendererRecycler=a;this.setInvalid(Cc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._defaultHeaderStorage.headerRendererRecycler},_previousCustomHeaderRendererVariant:null,_rowRendererFactory:null,_oldRowRendererFactory:null,_rowRendererMeasurements:null,_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},
set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_selectedLocation:null,get_selectedLocation:function(){return this._selectedLocation},set_selectedLocation:function(a){this._selectable&&this._dataProvider!=null||(a=null);if(this._selectedLocation==a||this.compareLocations(this._selectedLocation,a)==0)return this._selectedLocation;this._selectedLocation=a;this._selectedItem=
this._selectedLocation==null?null:this._dataProvider.get(this._selectedLocation);this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedLocation},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedLocation(null),this._selectedItem;var b=this._dataProvider.locationOf(a);if(this._selectedItem==a&&this.compareLocations(this._selectedLocation,b)==0)return this._selectedItem;
this._selectedItem=a;this._selectedLocation=b;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedItem},_previousLayout:null,_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},_cellRendererRecycler:null,get_cellRendererRecycler:function(){return this._cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._cellRendererRecycler==
a)return this._cellRendererRecycler;this._cellRendererRecycler=a;this.setInvalid(x.DATA);return this._cellRendererRecycler},_resizableColumns:null,get_resizableColumns:function(){return this._resizableColumns},set_resizableColumns:function(a){if(this._resizableColumns==a)return this._resizableColumns;this._resizableColumns=a;this.setInvalid(x.LAYOUT);return this._resizableColumns},_currentColumnResizeSkin:null,_currentHeaderCornerSkin:null,dataToHeaderRenderer:null,headerRendererToHeaderState:null,
inactiveRowRenderers:null,activeRowRenderers:null,dataToRowRenderer:null,rowRendererToRowState:null,headerStatePool:null,rowStatePool:null,_unrenderedLocations:null,_unrenderedLayoutIndices:null,_rowLayoutItems:null,_totalRowLayoutCount:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this.set_selectedLocation(null);
return this._selectable},_ignoreSelectionChange:null,_ignoreOpenedChange:null,_ignoreLayoutChanges:null,_ignoreHeaderLayoutChanges:null,_currentDisplayIndex:null,_pendingScrollLocation:null,_pendingScrollDuration:null,scrollToLocation:function(a,b){this._dataProvider!=null&&this._dataProvider.getLength()!=0&&(this._pendingScrollLocation=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemAndColumnToCellRenderer:function(a,b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];
return a==null?null:a.columnToCellRenderer(b)},columnToHeaderRenderer:function(a){return this.dataToHeaderRenderer.h[a.__id__]},headerRendererToColumn:function(a){a=this.headerRendererToHeaderState.h[a.__id__];return a==null?null:a.column},isBranchOpen:function(a){return this._dataProvider!=null&&this._dataProvider.contains(a)?this._dataProvider.isBranch(a)?this.openBranches.indexOf(a)!=-1:!1:!1},toggleBranch:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==
null)throw new Cb("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new Cb("Cannot open item because it is not a branch.");var d=this.openBranches.indexOf(a)!=-1;b&&d||!b&&!d||(d=this.locationToDisplayIndex(c,!1),this.toggleBranchInternal(a,c,d,b),this._totalRowLayoutCount=this.calculateTotalLayoutCount([]))},toggleChildrenOf:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==null)throw new Cb("Cannot open branch because it is not in the data provider.");
if(!this._dataProvider.isBranch(a))throw new Cb("Cannot open item because it is not a branch.");var d=this.locationToDisplayIndex(c,!1);this.toggleChildrenOfInternal(a,c,d,b);this._totalRowLayoutCount=this.calculateTotalLayoutCount([])},itemAndColumnToCellState:function(a,b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];return a==null?null:a.columnToCellState(b)},dispose:function(){this.refreshInactiveHeaderRenderers(!0);this.refreshInactiveRowRenderers(!0);this._selectedLocation=this._selectedItem=
null;this.set_dataProvider(null);this.set_columns(null);Ab.prototype.dispose.call(this)},initializeTreeGridViewTheme:function(){$w.initialize()},initialize:function(){Ab.prototype.initialize.call(this);this._headerContainerLayout==null&&(this._headerContainerLayout=new Ml,this._headerContainerLayout.set_heightResetEnabled(!1));this._headerContainer==null&&(this._headerContainer=new pb,this._headerContainer.set_layout(this._headerContainerLayout),this.addChild(this._headerContainer));this._headerResizeContainer==
null&&(this._headerResizeContainer=new Da,this.addChild(this._headerResizeContainer));this._columnDividerContainer==null&&(this._columnDividerContainer=new Da,this._columnDividerContainer.mouseEnabled=!1,this._columnDividerContainer.mouseChildren=!1,this.addChild(this._columnDividerContainer))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&
this.setInvalidationFlag(Cc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);var f=this.isInvalid(Cc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this._defaultHeaderDividerStorage.headerDividerFactory!=this.get_headerDividerFactory()&&(this._defaultHeaderDividerStorage.oldHeaderDividerFactory=this._defaultHeaderDividerStorage.headerDividerFactory,this._defaultHeaderDividerStorage.headerDividerFactory=this.get_headerDividerFactory(),this.setInvalidationFlag(Cc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));this._defaultHeaderDividerStorage.customHeaderDividerVariant!=
this.get_customHeaderDividerVariant()&&(this._defaultHeaderDividerStorage.customHeaderDividerVariant=this.get_customHeaderDividerVariant(),this.setInvalidationFlag(Cc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));var g=this.isInvalid(Cc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this._defaultColumnDividerStorage.columnDividerFactory!=this.get_columnDividerFactory()&&(this._defaultColumnDividerStorage.oldColumnDividerFactory=this._defaultColumnDividerStorage.columnDividerFactory,this._defaultColumnDividerStorage.columnDividerFactory=
this.get_columnDividerFactory(),this.setInvalidationFlag(Cc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));this._defaultColumnDividerStorage.customColumnDividerVariant!=this.get_customColumnDividerVariant()&&(this._defaultColumnDividerStorage.customColumnDividerVariant=this.get_customColumnDividerVariant(),this.setInvalidationFlag(Cc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));var h=this.isInvalid(Cc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.validateColumns();d&&this.refreshHeaderCornerSkin();(d||
b)&&this.refreshColumnResizeSkin();(f||c||a)&&this.refreshHeaderRenderers();(g||c||a)&&this.refreshHeaderDividers();(h||c||a)&&this.refreshColumnDividers();b&&(this._headerResizeContainer.mouseEnabled=this._resizableColumns,this._headerResizeContainer.mouseChildren=this._resizableColumns);if(a||b)a=this._ignoreHeaderLayoutChanges,this._ignoreHeaderLayoutChanges=!0,this._headerContainerLayout.set_customColumnWidths(this._customColumnWidths),this._ignoreHeaderLayoutChanges=a;if(b||d)this._previousLayout!=
this.get_layout()&&(this._virtualCache.length=0,this._virtualCache.length=this._totalRowLayoutCount),this.treeGridViewPort.set_layout(this.get_layout()),this._previousLayout=this.get_layout();this.treeGridViewPort.refreshChildren=m(this,this.refreshRowRenderers);for(b=this._invalidationFlags.keys();b.hasNext();)d=b.next(),this.treeGridViewPort.setInvalid(d);this._allInvalid&&this.treeGridViewPort.setInvalid();Ab.prototype.update.call(this);this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();
this.validateCustomColumnWidths();this.layoutHeaders();this.layoutHeaderDividers();this.layoutColumnDividers();this.handlePendingScroll()},createScroller:function(){Ab.prototype.createScroller.call(this);this.treeGridViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Ab.prototype.refreshScrollerValues.call(this);if(w.__implements(this.get_layout(),ff)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();
this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.treeGridViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.treeGridViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&
w.__implements(this.get_layout(),Vh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._rowLayoutItems.length,this.treeGridViewPort.get_visibleWidth(),this.treeGridViewPort.get_visibleHeight(),this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._rowLayoutItems.length-1;return a==this._tempVisibleIndices.start?
b!=this._tempVisibleIndices.end:!0},calculateViewPortOffsets:function(a,b){var c=this.topViewPortOffset,d=this.rightViewPortOffset,f=this.bottomViewPortOffset,g=this.leftViewPortOffset;this.get_fixedScrollBars()&&this.get_showScrollBars()&&Ab.prototype.calculateViewPortOffsets.call(this,a,b);if(this._headerContainer!=null){var h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),
this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=h;this.topViewPortOffset=c;this.rightViewPortOffset=d;this.bottomViewPortOffset=f;this.leftViewPortOffset=g;this._headerContainer.validateNow();this.topViewPortOffset+=this._headerContainer.get_height();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this._headerContainer.get_width());this.chromeMeasuredMinWidth=
Math.max(this.chromeMeasuredMinWidth,this._headerContainer.get_width());Ab.prototype.calculateViewPortOffsets.call(this,a,b);h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=
h}},validateColumns:function(){var a=this;if(this._columns==null){var b=null;if(this._dataProvider!=null&&this._dataProvider.getLength()>0){var c=this._dataProvider.get([0]);c=y.fields(c);for(var d=Array(c.length),f=0,g=c.length;f<g;){var h=f++,n=[c[h]];d[h]=new Am(n[0],function(l){return function(q){return H.string(y.getProperty(q,l[0]))}}(n))}b=new dg(d)}else b=new dg;this.runWithInvalidationFlagsOnly(function(){a.set_columns(b)});this._autoPopulatedColumns=b}},layoutHeaders:function(){if(this._headerContainer!=
null){this._headerContainer.set_x(this.get_paddingLeft());this._headerContainer.set_y(this.get_paddingTop());var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();this._headerContainer.set_width(Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a));this._headerContainer.validateNow();if(We.fuzzyEquals(this.get_maxScrollX(),this.get_minScrollX()))this._headerContainer.set_scrollRect(null);else{var b=this._scrollRect1;
this._currentScrollRect==b&&(b=this._scrollRect2);this._currentScrollRect=b;a<0&&(a=0);var c=this._headerContainer.get_height();c<0&&(c=0);b.setTo(this.get_scrollX()-this.get_minScrollX(),0,a,c);this._headerContainer.set_scrollRect(b)}this._currentHeaderCornerSkin!=null&&(this.get_fixedScrollBars()&&!this.get_extendedScrollBarY()&&this.scrollBarY!=null&&this.scrollBarY.get_visible()?(this._currentHeaderCornerSkin.set_x(this.scrollBarY.get_x()),this._currentHeaderCornerSkin.set_width(this.scrollBarY.get_width()),
this._currentHeaderCornerSkin.set_y(this._headerContainer.get_y()),this._currentHeaderCornerSkin.set_height(this._headerContainer.get_height()),this._currentHeaderCornerSkin.set_visible(!0)):this._currentHeaderCornerSkin.set_visible(!1))}},layoutHeaderDividers:function(){this._headerResizeContainer.set_x(this._headerContainer.get_x());this._headerResizeContainer.set_y(this._headerContainer.get_y());for(var a=0,b=this._headerDividerLayoutItems.length;a<b;){var c=a++,d=this._headerDividerLayoutItems[c];
d.set_visible(!this.get_showHeaderDividersOnlyWhenResizable()||this.get_resizableColumns());w.__implements(d,da)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-d.get_width()/2);d.set_y(c.get_y());d.set_height(c.get_height())}},layoutColumnDividers:function(){this._columnDividerContainer.set_x(this._viewPort.get_x());this._columnDividerContainer.set_y(this._viewPort.get_y());for(var a=0,b=this._columnDividerLayoutItems.length;a<b;){var c=a++,d=this._columnDividerLayoutItems[c];
w.__implements(d,da)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-d.get_width()/2);d.set_y(c.get_y());d.set_height(this._viewPort.get_visibleHeight())}},layoutScrollBars:function(){if(this.get_extendedScrollBarY()){var a=this.topViewPortOffset;this.topViewPortOffset=0;Ab.prototype.layoutScrollBars.call(this);this.topViewPortOffset=a}else Ab.prototype.layoutScrollBars.call(this)},refreshHeaderCornerSkin:function(){var a=this._currentHeaderCornerSkin;this._currentHeaderCornerSkin=
this.getCurrentHeaderCornerSkin();this._currentHeaderCornerSkin!=a&&(this.removeCurrentHeaderCornerSkin(a),this.addCurrentHeaderCornerSkin(this._currentHeaderCornerSkin))},getCurrentHeaderCornerSkin:function(){return this.get_headerCornerSkin()},addCurrentHeaderCornerSkin:function(a){a!=null&&(w.__implements(a,Fa)&&a.initializeNow(),w.__implements(a,qb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentHeaderCornerSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==
this&&this.removeChild(a))},refreshColumnResizeSkin:function(){var a=this._currentColumnResizeSkin;this._currentColumnResizeSkin=this.getCurrentColumnResizeSkin();this._currentColumnResizeSkin!=a&&(this.removeCurrentColumnResizeSkin(a),this._currentColumnResizeSkin!=null&&(w.__implements(this._currentColumnResizeSkin,Fa)&&this._currentColumnResizeSkin.initializeNow(),w.__implements(this._currentColumnResizeSkin,qb)&&this._currentColumnResizeSkin.set_uiContext(this),this._currentColumnResizeSkin.set_visible(!1),
this._currentColumnResizeSkin instanceof Ja&&(this._currentColumnResizeSkin.mouseEnabled=!1),this._currentColumnResizeSkin instanceof zb&&(this._currentColumnResizeSkin.mouseChildren=!1),this.addChildAt(this._currentColumnResizeSkin,0)))},getCurrentColumnResizeSkin:function(){return this.get_columnResizeSkin()},removeCurrentColumnResizeSkin:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshHeaderRenderers:function(){var a=this._ignoreHeaderLayoutChanges;
this._ignoreHeaderLayoutChanges=!0;this._headerContainerLayout.set_columns(this._columns);this._ignoreHeaderLayoutChanges=a;this._defaultHeaderStorage.headerRendererRecycler.update==null&&(this._defaultHeaderStorage.headerRendererRecycler.update=Cc.defaultUpdateHeaderRenderer,this._defaultHeaderStorage.headerRendererRecycler.reset==null&&(this._defaultHeaderStorage.headerRendererRecycler.reset=Cc.defaultResetHeaderRenderer));a=this.isInvalid(Cc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveHeaderRenderers(a);
this.findUnrenderedHeaderData();this.recoverInactiveHeaderRenderers();this.renderUnrenderedHeaderData();this.freeInactiveHeaderRenderers();if(this._defaultHeaderStorage.inactiveHeaderRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive header renderers should be empty after updating.");},refreshHeaderDividers:function(){var a=this.isInvalid(Cc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this.refreshInactiveHeaderDividers(a);this.refreshActiveHeaderDividers();this.freeInactiveHeaderDividers();
if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive header dividers should be empty after updating.");},refreshColumnDividers:function(){var a=this.isInvalid(Cc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.refreshInactiveColumnDividers(a);this.refreshActiveColumnDividers();this.freeInactiveColumnDividers();if(this._defaultColumnDividerStorage.inactiveColumnDividers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive column dividers should be empty after updating.");
},refreshInactiveHeaderDividers:function(a){var b=this._defaultHeaderDividerStorage.inactiveHeaderDividers;this._defaultHeaderDividerStorage.inactiveHeaderDividers=this._defaultHeaderDividerStorage.activeHeaderDividers;this._defaultHeaderDividerStorage.activeHeaderDividers=b;if(this._defaultHeaderDividerStorage.activeHeaderDividers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active header dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),this._defaultHeaderDividerStorage.oldHeaderDividerFactory=
null)},freeInactiveHeaderDividers:function(){for(var a=this._defaultHeaderDividerStorage.oldHeaderDividerFactory!=null?this._defaultHeaderDividerStorage.oldHeaderDividerFactory:this._defaultHeaderDividerStorage.headerDividerFactory,b=0,c=this._defaultHeaderDividerStorage.inactiveHeaderDividers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderDivider(d,a)}this._defaultHeaderDividerStorage.inactiveHeaderDividers.length=0},refreshActiveHeaderDividers:function(){this._headerDividerLayoutItems.length=
0;if(this._defaultHeaderDividerStorage.headerDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=a++,d=this._columns.get(c);d=this.createHeaderDivider(d,c);this._headerDividerLayoutItems[c]=d;this._defaultHeaderDividerStorage.activeHeaderDividers.push(d)}},createHeaderDivider:function(a,b){if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length==0){a=this._defaultHeaderDividerStorage.headerDividerFactory.create();if(w.__implements(a,nd)){var c=a;if(c.get_variant()==
null){var d=this.get_customHeaderDividerVariant()!=null?this.get_customHeaderDividerVariant():Cc.CHILD_VARIANT_HEADER_DIVIDER;c.set_variant(d)}}w.__implements(a,Fa)&&a.initializeNow();a.addEventListener("rollOver",m(this,this.treeGridView_headerDivider_rollOverHandler));a.addEventListener("rollOut",m(this,this.treeGridView_headerDivider_rollOutHandler));a.addEventListener("mouseDown",m(this,this.treeGridView_headerDivider_mouseDownHandler));a.addEventListener("touchBegin",m(this,this.treeGridView_headerDivider_touchBeginHandler));
this._headerResizeContainer.addChildAt(a,b)}else a=this._defaultHeaderDividerStorage.inactiveHeaderDividers.shift(),this._headerResizeContainer.setChildIndex(a,b);return a},destroyHeaderDivider:function(a,b){a.removeEventListener("rollOver",m(this,this.treeGridView_headerDivider_rollOverHandler));a.removeEventListener("rollOut",m(this,this.treeGridView_headerDivider_rollOutHandler));a.removeEventListener("mouseDown",m(this,this.treeGridView_headerDivider_mouseDownHandler));a.removeEventListener("touchBegin",
m(this,this.treeGridView_headerDivider_touchBeginHandler));this._headerResizeContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},refreshInactiveColumnDividers:function(a){var b=this._defaultColumnDividerStorage.inactiveColumnDividers;this._defaultColumnDividerStorage.inactiveColumnDividers=this._defaultColumnDividerStorage.activeColumnDividers;this._defaultColumnDividerStorage.activeColumnDividers=b;if(this._defaultColumnDividerStorage.activeColumnDividers.length>0)throw a=w.getClass(this),
new ob(""+a.__name__+": active column dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),this._defaultColumnDividerStorage.oldColumnDividerFactory=null)},freeInactiveColumnDividers:function(){for(var a=this._defaultColumnDividerStorage.oldColumnDividerFactory!=null?this._defaultColumnDividerStorage.oldColumnDividerFactory:this._defaultColumnDividerStorage.columnDividerFactory,b=0,c=this._defaultColumnDividerStorage.inactiveColumnDividers;b<c.length;){var d=c[b];++b;
d!=null&&this.destroyColumnDivider(d,a)}this._defaultColumnDividerStorage.inactiveColumnDividers.length=0},refreshActiveColumnDividers:function(){this._columnDividerLayoutItems.length=0;if(this._defaultColumnDividerStorage.columnDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=a++,d=this._columns.get(c);d=this.createColumnDivider(d,c);this._columnDividerLayoutItems[c]=d;this._defaultColumnDividerStorage.activeColumnDividers.push(d)}},createColumnDivider:function(a,b){if(this._defaultColumnDividerStorage.inactiveColumnDividers.length==
0){a=this._defaultColumnDividerStorage.columnDividerFactory.create();if(w.__implements(a,nd)){var c=a;if(c.get_variant()==null){var d=this.get_customColumnDividerVariant()!=null?this.get_customColumnDividerVariant():Cc.CHILD_VARIANT_COLUMN_DIVIDER;c.set_variant(d)}}w.__implements(a,Fa)&&a.initializeNow();this._columnDividerContainer.addChildAt(a,b)}else a=this._defaultColumnDividerStorage.inactiveColumnDividers.shift(),this._columnDividerContainer.setChildIndex(a,b);return a},destroyColumnDivider:function(a,
b){this._columnDividerContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},refreshInactiveHeaderRenderers:function(a){var b=this._defaultHeaderStorage.inactiveHeaderRenderers;this._defaultHeaderStorage.inactiveHeaderRenderers=this._defaultHeaderStorage.activeHeaderRenderers;this._defaultHeaderStorage.activeHeaderRenderers=b;if(this._defaultHeaderStorage.activeHeaderRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active header renderers should be empty before updating.");
a&&(this.recoverInactiveHeaderRenderers(),this.freeInactiveHeaderRenderers(),this._defaultHeaderStorage.oldHeaderRendererRecycler=null)},recoverInactiveHeaderRenderers:function(){for(var a=0,b=this._defaultHeaderStorage.inactiveHeaderRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.headerRendererToHeaderState.h[c.__id__];if(d!=null){var f=d.column;this.headerRendererToHeaderState.remove(c);this.dataToHeaderRenderer.remove(f);c.removeEventListener("trigger",m(this,this.treeGridView_headerRenderer_triggerHandler));
c.removeEventListener("click",m(this,this.treeGridView_headerRenderer_clickHandler));c.removeEventListener("touchTap",m(this,this.treeGridView_headerRenderer_touchTapHandler));c.removeEventListener("resize",m(this,this.treeGridView_headerRenderer_resizeHandler));this.resetHeaderRenderer(c,d);this._defaultHeaderStorage.measurements!=null&&this._defaultHeaderStorage.measurements.restore(c);this.headerStatePool.release(d)}}}},freeInactiveHeaderRenderers:function(){for(var a=this._defaultHeaderStorage.oldHeaderRendererRecycler!=
null?this._defaultHeaderStorage.oldHeaderRendererRecycler:this._defaultHeaderStorage.headerRendererRecycler,b=0,c=this._defaultHeaderStorage.inactiveHeaderRenderers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderRenderer(d,a)}this._defaultHeaderStorage.inactiveHeaderRenderers.length=0},findUnrenderedHeaderData:function(){this._rowLayoutItems.length=0;if(this._columns!=null&&this._columns.get_length()!=0){this._rowLayoutItems.length=this._columns.get_length();for(var a=0,b=this._columns.get_length();a<
b;){var c=a++,d=this._columns.get(c),f=this.dataToHeaderRenderer.h[d.__id__];if(f!=null){var g=this.headerRendererToHeaderState.h[f.__id__];this.populateCurrentHeaderState(d,c,g,this._forceItemStateUpdate)&&this.updateHeaderRenderer(f,g);f.set_visible(!0);this._headerLayoutItems[c]=f;if(!V.remove(this._defaultHeaderStorage.inactiveHeaderRenderers,f))throw a=w.getClass(this),new ob(""+a.__name__+": header renderer map contains bad data for column at index "+c+". This may be caused by duplicate columns, which is not allowed.");
this._defaultHeaderStorage.activeHeaderRenderers.push(f)}else this._unrenderedHeaderData.push(d)}}},renderUnrenderedHeaderData:function(){for(var a=0,b=this._unrenderedHeaderData;a<b.length;){var c=b[a];++a;var d=this._columns.indexOf(c),f=this.headerStatePool.get();this.populateCurrentHeaderState(c,d,f,!0);c=this.createHeaderRenderer(f);c.set_visible(!0);this._headerContainer.addChildAt(c,d);this._headerLayoutItems[d]=c}this._unrenderedHeaderData.length=0},refreshRowRenderers:function(a){this._rowLayoutItems=
a;a=this.treeGridViewPort.isInvalid(Cc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);this.refreshInactiveRowRenderers(a);this.findUnrenderedData();this.recoverInactiveRowRenderers();this.renderUnrenderedData();this.freeInactiveRowRenderers();if(this.inactiveRowRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive row renderers should be empty after updating.");},refreshInactiveRowRenderers:function(a){var b=this.inactiveRowRenderers;this.inactiveRowRenderers=this.activeRowRenderers;
this.activeRowRenderers=b;if(this.activeRowRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active row renderers should be empty before updating.");a&&(this.recoverInactiveRowRenderers(),this.freeInactiveRowRenderers(),this._oldRowRendererFactory=null)},recoverInactiveRowRenderers:function(){for(var a=0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.rowRendererToRowState.h[c.__id__];if(d!=null){var f=d.data;this.rowRendererToRowState.remove(c);this.dataToRowRenderer.remove(f);
c.removeEventListener("cellTrigger",m(this,this.treeGridView_rowRenderer_cellTriggerHandler));c.removeEventListener("trigger",m(this,this.treeGridView_rowRenderer_triggerHandler));c.removeEventListener("open",m(this,this.treeGridView_rowRenderer_openHandler));c.removeEventListener("close",m(this,this.treeGridView_rowRenderer_closeHandler));this.resetRowRenderer(c,d);this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(c);this.rowStatePool.release(d)}}}},freeInactiveRowRenderers:function(){for(var a=
0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;c!=null&&this.destroyRowRenderer(c)}this.inactiveRowRenderers.length=0},findUnrenderedData:function(){this._rowLayoutItems.length=0;this._rowLayoutItems.length=this._totalRowLayoutCount;if(this._virtualLayout&&w.__implements(this.get_layout(),Vh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);
this._ignoreLayoutChanges=b;a.getVisibleIndices(this._rowLayoutItems.length,this.treeGridViewPort.get_visibleWidth(),this.treeGridViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,this._visibleIndices.end=this._rowLayoutItems.length-1;this.findUnrenderedDataForLocation([],0)},findUnrenderedDataForLocation:function(a,b){if(this._dataProvider==null)return b;for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);f=this._dataProvider.get(a);b<this._visibleIndices.start||
b>this._visibleIndices.end?this._rowLayoutItems[b]=null:this.findRowRenderer(f,a.slice(),b);++b;if(b>this._visibleIndices.end)break;if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.findUnrenderedDataForLocation(a,b),b>this._visibleIndices.end))break;a.pop()}return b},findRowRenderer:function(a,b,c){var d=this.dataToRowRenderer.h[a.__id__];if(d==null)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);else{var f=this.rowRendererToRowState.h[d.__id__];
this.populateCurrentRowState(a,b,c,f,this._forceItemStateUpdate)&&this.updateRowRenderer(d,f);d.set_visible(!0);this._rowLayoutItems[c]=d;if(!V.remove(this.inactiveRowRenderers,d))throw a=w.getClass(this),new ob(""+a.__name__+": row renderer map contains bad data for item at location "+H.string(b)+". This may be caused by duplicate items in the data provider, which is not allowed.");this.activeRowRenderers.push(d)}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedLocations;a<b.length;){var c=
b[a];++a;var d=this._unrenderedLayoutIndices.shift(),f=this._dataProvider.get(c),g=this.rowStatePool.get();this.populateCurrentRowState(f,c,d,g,!0);c=this.createRowRenderer(g);c.set_visible(!0);this.treeGridViewPort.addChild(c);this._rowLayoutItems[d]=c}this._unrenderedLocations.length=0},createRowRenderer:function(a){if(this.inactiveRowRenderers.length==0){var b=this._rowRendererFactory.create();this._rowRendererMeasurements==null&&(this._rowRendererMeasurements=new Sb(b));b.initializeNow()}else b=
this.inactiveRowRenderers.shift();this.updateRowRenderer(b,a);b.set_treeGridView(this);b.addEventListener("cellTrigger",m(this,this.treeGridView_rowRenderer_cellTriggerHandler));b.addEventListener("trigger",m(this,this.treeGridView_rowRenderer_triggerHandler));b.addEventListener("open",m(this,this.treeGridView_rowRenderer_openHandler));b.addEventListener("close",m(this,this.treeGridView_rowRenderer_closeHandler));this.rowRendererToRowState.set(b,a);this.dataToRowRenderer.set(a.data,b);this.activeRowRenderers.push(b);
return b},destroyRowRenderer:function(a){var b=this._oldRowRendererFactory!=null?this._oldRowRendererFactory:this._rowRendererFactory;a.set_treeGridView(null);this.treeGridViewPort.removeChild(a);b.destroy!=null&&b.destroy(a)},updateRowRenderer:function(a,b){this.refreshRowRendererProperties(a,b)},resetRowRenderer:function(a,b){this.refreshRowRendererProperties(a,Cc.RESET_ROW_STATE)},populateCurrentRowState:function(a,b,c,d,f){var g=!1;if(f||d.owner!=this)d.owner=this,g=!0;if(f||d.data!=a)d.data=
a,g=!0;if(f||d.rowLocation!=b&&this.compareLocations(d.rowLocation,b)!=0)d.rowLocation=b,g=!0;if(f||d.layoutIndex!=c)d.layoutIndex=c,g=!0;c=this._dataProvider!=null&&this._dataProvider.isBranch(a);if(f||d.branch!=c)d.branch=c,g=!0;a=d.branch&&this.openBranches.indexOf(a)!=-1;if(f||d.opened!=a)d.opened=a,g=!0;b=this.compareLocations(b,this._selectedLocation)==0;if(f||d.selected!=b)d.selected=b,g=!0;b=this._enabled;if(f||d.enabled!=b)d.enabled=b,g=!0;b=this._columns;if(f||d.columns!=b)d.columns=b,g=
!0;b=this._cellRendererRecycler;if(f||d.cellRendererRecycler!=b)d.cellRendererRecycler=b,g=!0;b=this._customColumnWidths;if(f||d.customColumnWidths!=b)d.customColumnWidths=b,g=!0;b=this.get_customCellRendererVariant();if(f||d.customCellRendererVariant!=b)d.customCellRendererVariant=b,g=!0;b=this._forceItemStateUpdate;if(f||d.forceItemStateUpdate!=b)d.forceItemStateUpdate=b,g=!0;return g},populateCurrentRowCellState:function(a,b,c,d,f,g,h){var n=!1;if(h||g.owner!=this)g.owner=this,n=!0;if(h||g.data!=
a)g.data=a,n=!0;if(h||g.rowLocation!=b&&this.compareLocations(g.rowLocation,b)!=0)g.rowLocation=b,n=!0;if(h||g.columnIndex!=d)g.columnIndex=d,n=!0;if(h||g.column!=c)g.column=c,n=!0;if(h||g.layoutIndex!=f)g.layoutIndex=f,n=!0;d=this._dataProvider!=null&&this._dataProvider.isBranch(a);if(h||g.branch!=d)g.branch=d,n=!0;d=g.branch&&this.openBranches.indexOf(a)!=-1;if(h||g.opened!=d)g.opened=d,n=!0;b=this.compareLocations(b,this._selectedLocation)==0;if(h||g.selected!=b)g.selected=b,n=!0;b=this._enabled;
if(h||g.enabled!=b)g.enabled=b,n=!0;a=c!=null?c.itemToText(a):null;if(h||g.text!=a)g.text=a,n=!0;return n},refreshRowRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;a.set_data(b.data);a.set_rowLocation(b.rowLocation);a.set_layoutIndex(b.layoutIndex);a.set_branch(b.branch);a.set_opened(b.opened);a.set_selected(b.selected);a.set_enabled(b.enabled);a.set_columns(b.columns);a.set_cellRendererRecycler(b.cellRendererRecycler);
a.set_customCellRendererVariant(b.customCellRendererVariant);a.set_customColumnWidths(b.customColumnWidths);a.set_forceCellStateUpdate(b.forceItemStateUpdate);this._ignoreOpenedChange=d;this._ignoreSelectionChange=c},createHeaderRenderer:function(a){if(this._defaultHeaderStorage.inactiveHeaderRenderers.length==0){var b=this._defaultHeaderStorage.headerRendererRecycler.create();if(w.__implements(b,nd)){var c=b;if(c.get_variant()==null){var d=this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():
Cc.CHILD_VARIANT_HEADER_RENDERER;c.set_variant(d)}}w.__implements(b,Fa)&&b.initializeNow();this._defaultHeaderStorage.measurements==null&&(this._defaultHeaderStorage.measurements=new Sb(b))}else b=this._defaultHeaderStorage.inactiveHeaderRenderers.shift();this.updateHeaderRenderer(b,a);w.__implements(b,Qh)?b.addEventListener("trigger",m(this,this.treeGridView_headerRenderer_triggerHandler)):(b.addEventListener("click",m(this,this.treeGridView_headerRenderer_clickHandler)),b.addEventListener("touchTap",
m(this,this.treeGridView_headerRenderer_touchTapHandler)));w.__implements(b,rb)&&b.addEventListener("resize",m(this,this.treeGridView_headerRenderer_resizeHandler));this.headerRendererToHeaderState.set(b,a);this.dataToHeaderRenderer.set(a.column,b);this._defaultHeaderStorage.activeHeaderRenderers.push(b);return b},destroyHeaderRenderer:function(a,b){this._headerContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},populateCurrentHeaderState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=
this,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.columnIndex!=b)c.columnIndex=b,f=!0;a=a.headerText;if(d||c.text!=a)c.text=a,f=!0;a=this._enabled;if(d||c.enabled!=a)c.enabled=a,f=!0;return f},updateHeaderRenderer:function(a,b){this._defaultHeaderStorage.headerRendererRecycler.update!=null&&this._defaultHeaderStorage.headerRendererRecycler.update(a,b);this.refreshHeaderRendererProperties(a,b)},resetHeaderRenderer:function(a,b){var c=this._defaultHeaderStorage.oldHeaderRendererRecycler!=null?this._defaultHeaderStorage.oldHeaderRendererRecycler:
this._defaultHeaderStorage.headerRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this.refreshHeaderRendererProperties(a,Cc.RESET_HEADER_STATE)},refreshHeaderRendererProperties:function(a,b){w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,yp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_treeGridViewOwner(b.owner));w.__implements(a,ri)&&a.set_layoutIndex(b.columnIndex)},displayIndexToLocation:function(a){this._currentDisplayIndex=-1;return this.displayIndexToLocationAtBranch(a,
[])},displayIndexToLocationAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(b);c<d;){var f=c++;this._currentDisplayIndex++;b[b.length]=f;if(this._currentDisplayIndex==a)return b;f=this._dataProvider.get(b);if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(f=this.displayIndexToLocationAtBranch(a,b),f!=null))return f;--b.length}return null},locationToDisplayIndex:function(a,b){this._currentDisplayIndex=-1;var c=null;b&&(c=[]);return this.locationToDisplayIndexAtBranch([],
a,c)},locationToDisplayIndexAtBranch:function(a,b,c){c!=null&&c.push(b[a.length]);for(var d=0,f=this._dataProvider.getLength(a);d<f;){var g=d++;this._currentDisplayIndex++;a[a.length]=g;if(this.compareLocations(a,b)==0)return this._currentDisplayIndex;g=this._dataProvider.get(a);if(this._dataProvider.isBranch(g))if(this.openBranches.indexOf(g)!=-1){if(g=this.locationToDisplayIndexAtBranch(a,b,c),g!=-1)return g}else if(c!=null&&this.compareLocations(c,a)==0)return this._currentDisplayIndex;--a.length}c!=
null&&c.pop();return-1},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._rowLayoutItems.length!=0){var b=this.locationToDisplayIndex(this._selectedLocation,!1),c=b;if(w.__implements(this.get_layout(),Oj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;c=this.get_layout().findNextKeyboardIndex(c,a,!1,this._rowLayoutItems,null,this.treeGridViewPort.get_visibleWidth(),this.treeGridViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--c;
break;case 34:++c;break;case 35:c=this._rowLayoutItems.length-1;break;case 36:c=0;break;case 37:--c;break;case 38:--c;break;case 39:++c;break;case 40:++c;break;default:return}c<0?c=0:c>=this._rowLayoutItems.length&&(c=this._rowLayoutItems.length-1);b=c!=b;var d=null;if(!b&&c!=-1){d=this.displayIndexToLocation(c);var f=this.dataToRowRenderer,g=this._dataProvider.get(d);f.h[g.__id__]==null?b=!0:w.__implements(this.get_layout(),ff)&&(f=this.get_layout().getNearestScrollPositionForIndex(c,this._rowLayoutItems.length,
this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),this.get_scrollX()!=f.x||this.get_scrollY()!=f.y)&&(b=!0)}b&&(a.preventDefault(),d==null&&(d=this.displayIndexToLocation(c)),this.set_selectedLocation(d),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},handlePendingScroll:function(){if(this._pendingScrollLocation!=null){var a=this._pendingScrollLocation,
b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollDuration=this._pendingScrollLocation=null;if(this._dataProvider!=null&&this._dataProvider.getLength()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(w.__implements(this.get_layout(),ff))c=this.locationToDisplayIndex(a,!0),d=this.get_layout().getNearestScrollPositionForIndex(c,this._rowLayoutItems.length,this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);
a=this.dataToRowRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},toggleBranchInternal:function(a,b,c,d){var f=this.dataToRowRenderer.h[a.__id__],g=null;f!=null&&(g=this.rowRendererToRowState.h[f.__id__]);var h=!1;
g==null&&(h=!0,g=this.rowStatePool.get());g.rowLocation=b;g.layoutIndex=c;var n=this.openBranches.indexOf(a)!=-1;d&&!n?(this.openBranches.push(a),this.populateCurrentRowState(a,b,c,g,!0),c=this.insertChildrenIntoVirtualCache(b,c),f!=null&&this.updateRowRenderer(f,g),d=new Bm,this.populateCurrentRowCellState(a,b,null,-1,c,d,!0),$e.dispatchForCell(this,"branchOpen",d)):!d&&n&&(V.remove(this.openBranches,a),this.populateCurrentRowState(a,b,c,g,!0),this.removeChildrenFromVirtualCache(b,c),f!=null&&this.updateRowRenderer(f,
g),d=new Bm,this.populateCurrentRowCellState(a,b,null,-1,c,d,!0),$e.dispatchForCell(this,"branchClose",d));h&&this.rowStatePool.release(g);this.setInvalid(x.DATA);return c},toggleChildrenOfInternal:function(a,b,c,d){c=this.toggleBranchInternal(a,b,c,d);a=0;for(var f=this._dataProvider.getLength(b);a<f;){var g=a++;b.push(g);g=this._dataProvider.get(b);this._dataProvider.isBranch(g)&&this.toggleChildrenOfInternal(g,b,c,d);b.pop()}},refreshOpenBranchesFromDataProviderChange:function(a,b){if(a!=null)for(var c=
this.openBranches.length-1;c>=0;){var d=this.openBranches[c];d==a?a!=b&&this.openBranches.splice(c,1):(this._dataProvider.locationOf(d)==null&&this.openBranches.splice(c,1),--c)}},baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):Ab.prototype.baseScrollContainer_keyDownHandler.call(this,a)},treeGridView_rowRenderer_triggerHandler:function(a){this._selectable&&
(a=w.__cast(a.currentTarget,Zf),this.set_selectedLocation(this.rowRendererToRowState.h[a.__id__].rowLocation.slice()),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation))},treeGridView_rowRenderer_cellTriggerHandler:function(a){this.dispatchEvent(a.clone())},treeGridView_rowRenderer_openHandler:function(a){this._ignoreOpenedChange||(a=w.__cast(a.currentTarget,Zf),this.toggleBranch(this.rowRendererToRowState.h[a.__id__].data,!0))},treeGridView_rowRenderer_closeHandler:function(a){this._ignoreOpenedChange||
(a=w.__cast(a.currentTarget,Zf),this.toggleBranch(this.rowRendererToRowState.h[a.__id__].data,!1))},treeGridView_dataProvider_changeHandler:function(a){this._totalRowLayoutCount=this.calculateTotalLayoutCount([]);this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._totalRowLayoutCount);this.setInvalid(x.DATA)},treeGridView_dataProvider_addItemHandler:function(a){this._selectedLocation!=null&&this.compareLocations(this._selectedLocation,a.location)>=0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},
treeGridView_dataProvider_removeItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):(a=this.compareLocations(this._selectedLocation,a.location),a==0?this.set_selectedLocation(null):a>0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))))},treeGridView_dataProvider_replaceItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,
a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):this.compareLocations(this._selectedLocation,a.location)==0&&(this._selectedItem=this._dataProvider.get(a.location),Y.dispatch(this,"change")))},treeGridView_dataProvider_removeAllHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},treeGridView_dataProvider_resetHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},
treeGridView_dataProvider_sortChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},treeGridView_dataProvider_filterChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},updateRowRendererForLocation:function(a){var b=this.locationToDisplayIndex(a,!1);this._virtualCache!=null&&b!=-1&&(this._virtualCache[b]=null);var c=this._dataProvider.get(a),d=this.dataToRowRenderer.h[c.__id__];if(d==null)this.setInvalid(x.DATA);else{var f=this.rowRendererToRowState.h[d.__id__];
f.owner!=null&&(d.updateCells(),this.populateCurrentRowState(c,a,b,f,!0),this.resetRowRenderer(d,f),this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(d),f.owner=null,this.setInvalid(x.DATA))}},validateCustomColumnWidths:function(){if(!(this._customColumnWidths==null||this._customColumnWidths.length<this._columns.get_length())){this._customColumnWidths.length>this._columns.get_length()&&(this._customColumnWidths.length=this._columns.get_length());var a=this.actualWidth-this.get_paddingLeft()-
this.get_paddingRight();a=Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a)-this._headerContainerLayout.get_paddingLeft()-this._headerContainerLayout.get_paddingRight();for(var b=0,c=[],d=0,f=this._customColumnWidths.length;d<f;){var g=d++,h=this._columns.get(g);h.width!=null?a-=h.width:(b+=this._customColumnWidths[g],c.push(g))}b!=a&&(this._customColumnWidths=this._customColumnWidths.slice(),this.distributeWidthToIndices(a-
b,c,b),this.setInvalid(x.LAYOUT))}},calculateResizedColumnWidth:function(a){var b=this._columns.get_length();this._customColumnWidths=this._customColumnWidths==null?[]:this._customColumnWidths.slice();this._customColumnWidths.length=b;var c=this._columns.get(this._resizingHeaderIndex);c.width=null;var d=this.dataToHeaderRenderer.h[c.__id__];c=this._columns.get(this._resizingHeaderIndex);var f=this._headerContainer.get_x()+d.get_x()+c.minWidth,g=this.actualWidth-this.rightViewPortOffset,h=this._headerContainer.get_x()+
d.get_x()+d.get_width(),n=Math.min(Math.max(h+a,f),g)-d.get_x()-this._headerContainer.get_x();h=0;a=d.get_width();f=0;g=[];for(var l=0;l<b;){var q=l++;d=this._columns.get(q);q!=this._resizingHeaderIndex&&(q<this._resizingHeaderIndex?(d=this.dataToHeaderRenderer.h[d.__id__],this._customColumnWidths[q]=d.get_width(),h+=d.get_width()):d.width!=null?h+=d.width:(h+=d.minWidth,d=this.dataToHeaderRenderer.h[d.__id__],d=d.get_width(),f+=d,this._customColumnWidths[q]=d,g[g.length]=q))}g.length==0&&(b=this._resizingHeaderIndex+
1,g[0]=b,c=this._columns.get(b),f=c.width,h=h-f+c.minWidth,this._customColumnWidths[b]=f,c.width=null);b=n;d=this._headerContainer.get_width()-h;b>d&&(b=d);b<c.minWidth&&(b=c.minWidth);this._customColumnWidths[this._resizingHeaderIndex]=b;this.distributeWidthToIndices(a-b,g,f);this.setInvalid(x.LAYOUT)},distributeWidthToIndices:function(a,b,c){for(;Math.abs(a)>1;){for(var d=a,f=b.length-1;f>=0;){var g=b[f],h=this._columns.get(g),n=this.dataToHeaderRenderer.h[h.__id__].get_width(),l=n/c*a,q=this._customColumnWidths[g]+
l;q<h.minWidth&&(l+=h.minWidth-q,q=h.minWidth,b.splice(f,1),c-=n);this._customColumnWidths[g]=q;d-=l;--f}a=d}a!=0&&(this._customColumnWidths[this._customColumnWidths.length-1]+=a)},layoutColumnResizeSkin:function(a){if(this._currentColumnResizeSkin!=null){var b=this._columns.get(this._resizingHeaderIndex),c=this.dataToHeaderRenderer.h[b.__id__];b=this._headerContainer.get_x()+c.get_x()+b.minWidth;var d=this.actualWidth-this.rightViewPortOffset;c=this._headerContainer.get_x()+c.get_x()+c.get_width();
a=Math.min(Math.max(c+a,b),d)-this._currentColumnResizeSkin.get_width()/2;this._currentColumnResizeSkin.set_visible(!0);this._currentColumnResizeSkin.set_x(a);this._currentColumnResizeSkin.set_y(this.get_paddingTop());this._currentColumnResizeSkin.set_height(this.actualHeight-this.get_paddingTop()-this.bottomViewPortOffset);this.setChildIndex(this._currentColumnResizeSkin,this.get_numChildren()-1)}},headerResizeTouchBegin:function(a,b,c,d){if(this._enabled&&this._resizableColumns&&this._resizingHeaderIndex==
-1&&this.stage!=null){var f=Pd.forStage(this.stage);if(b?f.claimMouse(c):f.claimTouch(a,c))this._resizingHeaderTouchPointID=a,this._resizingHeaderTouchPointIsMouse=b,this._resizingHeaderIndex=this._headerDividerLayoutItems.indexOf(c),this._resizingHeaderStartStageX=d,this.layoutColumnResizeSkin(0),b?(this.stage.addEventListener("mouseMove",m(this,this.treeGridView_headerDivider_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.treeGridView_headerDivider_stage_mouseUpHandler),
!1,0,!0)):(this.stage.addEventListener("touchMove",m(this,this.treeGridView_headerDivider_stage_touchMoveHandler),!1,0,!0),this.stage.addEventListener("touchEnd",m(this,this.treeGridView_headerDivider_stage_touchEndHandler),!1,0,!0))}},headerResizeTouchMove:function(a,b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(a=c-this._resizingHeaderStartStageX,a*=Zg.getConcatenatedScaleX(this),this.layoutColumnResizeSkin(a))},headerResizeTouchEnd:function(a,
b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(b?(this.stage.removeEventListener("mouseMove",m(this,this.treeGridView_headerDivider_stage_mouseMoveHandler)),this.stage.removeEventListener("mouseUp",m(this,this.treeGridView_headerDivider_stage_mouseUpHandler))):(this.stage.removeEventListener("touchMove",m(this,this.treeGridView_headerDivider_stage_touchMoveHandler)),this.stage.removeEventListener("touchEnd",m(this,this.treeGridView_headerDivider_stage_touchEndHandler))),
this._currentColumnResizeSkin!=null&&this._currentColumnResizeSkin.set_visible(!1),a=c-this._resizingHeaderStartStageX,a*=Zg.getConcatenatedScaleX(this),this.calculateResizedColumnWidth(a),this._resizingHeaderTouchPointID=null,this._resizingHeaderTouchPointIsMouse=!1,this._resizingHeaderIndex=-1,this._oldHeaderDividerMouseCursor!=null&&(xd.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=null))},refreshSelectedLocationAfterFilterOrSort:function(){this._selectedLocation!=
null&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},calculateTotalLayoutCount:function(a){if(this._dataProvider==null)return 0;for(var b=this._dataProvider.getLength(a),c=b,d=0;d<b;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(c+=this.calculateTotalLayoutCount(a));a.pop()}return c},insertChildrenIntoVirtualCache:function(a,b){for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);
++b;this._virtualCache.splice(b,0,null);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.insertChildrenIntoVirtualCache(a,b));a.pop()}return b},removeChildrenFromVirtualCache:function(a,b){var c=this._dataProvider.getLength(a);++b;for(var d=0;d<c;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&this.removeChildrenFromVirtualCache(a,b);this._virtualCache.splice(b,1);a.pop()}},containsLocation:function(a,
b){if(a==null||b==null||a.length>=b.length)return!1;for(var c=0,d=a.length;c<d;){var f=c++;if(a[f]!=b[f])return!1}return!0},compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=0;g<f;){var h=g++,n=a[h];h=b[h];if(n<h)return-1;if(n>h)return 1}return c<d?-1:c>d?1:0},treeGridView_dataProvider_updateItemHandler:function(a){this.updateRowRendererForLocation(a.location)},treeGridView_dataProvider_updateAllHandler:function(a){a=
[];for(var b=0,c=this._dataProvider.getLength();b<c;){var d=b++;a[0]=d;this.updateRowRendererForLocation(a)}},treeGridView_columns_addItemHandler:function(a){if(this._customColumnWidths!=null){var b=w.__cast(a.addedItem,Am);a=a.index;if(!(b.width!=null||a>this._customColumnWidths.length)){this._customColumnWidths.splice(a,0,0);this.get_paddingLeft();this.get_paddingRight();this._viewPort.get_width();this._headerContainerLayout.get_paddingLeft();this._headerContainerLayout.get_paddingRight();this._headerContainerLayout.get_paddingLeft();
this._headerContainerLayout.get_paddingRight();for(var c=0,d=[],f=0,g=this._customColumnWidths.length;f<g;){var h=f++;h!=a&&(b=this._columns.get(h),b.width==null&&(c+=this._customColumnWidths[h],d.push(h)))}b=c/(d.length+1);this._customColumnWidths[a]=b;this._customColumnWidths=this._customColumnWidths.slice();this.distributeWidthToIndices(-b,d,c);this.setInvalid(x.LAYOUT)}}},treeGridView_columns_removeItemHandler:function(a){if(this._customColumnWidths!=null){var b=w.__cast(a.removedItem,Am);a=a.index;
b.width!=null||a>this._customColumnWidths.length||(this._customColumnWidths.splice(a,1),this.setInvalid(x.LAYOUT))}},treeGridView_columns_changeHandler:function(a){this.setInvalid(x.DATA)},treeGridView_headerRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=w.__cast(a.currentTarget,ma),$e.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_clickHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,
ma),$e.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_triggerHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,ma),$e.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},treeGridView_headerDivider_mouseDownHandler:function(a){a=w.__cast(a.currentTarget,Ja);this.headerResizeTouchBegin(Cc.POINTER_ID_MOUSE,
!0,a,a.stage.get_mouseX())},treeGridView_headerDivider_stage_mouseMoveHandler:function(a){a=w.__cast(a.currentTarget,gd);this.headerResizeTouchMove(Cc.POINTER_ID_MOUSE,!0,a.get_mouseX())},treeGridView_headerDivider_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);this.headerResizeTouchEnd(Cc.POINTER_ID_MOUSE,!0,a.get_mouseX())},treeGridView_headerDivider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=w.__cast(a.currentTarget,Ja);this.headerResizeTouchBegin(a.touchPointID,
!1,b,b.stage.get_mouseX())}},treeGridView_headerDivider_stage_touchMoveHandler:function(a){var b=w.__cast(a.currentTarget,gd);this.headerResizeTouchMove(a.touchPointID,!1,b.get_mouseX())},treeGridView_headerDivider_stage_touchEndHandler:function(a){var b=w.__cast(a.currentTarget,gd);this.headerResizeTouchEnd(a.touchPointID,!1,b.get_mouseX())},treeGridView_headerDivider_rollOverHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&xd.get_cursor()=="auto"&&(this._oldHeaderDividerMouseCursor=
xd.get_cursor(),xd.set_cursor(ch.fromLimeCursor(id.RESIZE_WE)))},treeGridView_headerDivider_rollOutHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&this._oldHeaderDividerMouseCursor!=null&&(xd.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=null)},get_styleContext:function(){return Cc},__customCellRendererVariant:null,get_customCellRendererVariant:function(){return this.__customCellRendererVariant},set_customCellRendererVariant:function(a){if(!this.setStyle("customCellRendererVariant")||
this.__customCellRendererVariant==a)return this.__customCellRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customCellRendererVariant);this.__customCellRendererVariant=a;this.setInvalid(x.STYLES);return this.__customCellRendererVariant},clearStyle_customCellRendererVariant:function(){this.set_customCellRendererVariant(null);return this.get_customCellRendererVariant()},__customHeaderRendererVariant:null,get_customHeaderRendererVariant:function(){return this.__customHeaderRendererVariant},
set_customHeaderRendererVariant:function(a){if(!this.setStyle("customHeaderRendererVariant")||this.__customHeaderRendererVariant==a)return this.__customHeaderRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderRendererVariant);this.__customHeaderRendererVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderRendererVariant},clearStyle_customHeaderRendererVariant:function(){this.set_customHeaderRendererVariant(null);return this.get_customHeaderRendererVariant()},__headerDividerFactory:null,
get_headerDividerFactory:function(){return this.__headerDividerFactory},set_headerDividerFactory:function(a){if(!this.setStyle("headerDividerFactory")||this.__headerDividerFactory==a)return this.__headerDividerFactory;this._previousClearStyle=m(this,this.clearStyle_headerDividerFactory);this.__headerDividerFactory=a;this.setInvalid(x.STYLES);return this.__headerDividerFactory},clearStyle_headerDividerFactory:function(){this.set_headerDividerFactory(Lc.withClass(Xb));return this.get_headerDividerFactory()},
__customHeaderDividerVariant:null,get_customHeaderDividerVariant:function(){return this.__customHeaderDividerVariant},set_customHeaderDividerVariant:function(a){if(!this.setStyle("customHeaderDividerVariant")||this.__customHeaderDividerVariant==a)return this.__customHeaderDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderDividerVariant);this.__customHeaderDividerVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderDividerVariant},clearStyle_customHeaderDividerVariant:function(){this.set_customHeaderDividerVariant(null);
return this.get_customHeaderDividerVariant()},__columnDividerFactory:null,get_columnDividerFactory:function(){return this.__columnDividerFactory},set_columnDividerFactory:function(a){if(!this.setStyle("columnDividerFactory")||this.__columnDividerFactory==a)return this.__columnDividerFactory;this._previousClearStyle=m(this,this.clearStyle_columnDividerFactory);this.__columnDividerFactory=a;this.setInvalid(x.STYLES);return this.__columnDividerFactory},clearStyle_columnDividerFactory:function(){this.set_columnDividerFactory(null);
return this.get_columnDividerFactory()},__customColumnDividerVariant:null,get_customColumnDividerVariant:function(){return this.__customColumnDividerVariant},set_customColumnDividerVariant:function(a){if(!this.setStyle("customColumnDividerVariant")||this.__customColumnDividerVariant==a)return this.__customColumnDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customColumnDividerVariant);this.__customColumnDividerVariant=a;this.setInvalid(x.STYLES);return this.__customColumnDividerVariant},
clearStyle_customColumnDividerVariant:function(){this.set_customColumnDividerVariant(null);return this.get_customColumnDividerVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__columnResizeSkin:null,
get_columnResizeSkin:function(){return this.__columnResizeSkin},set_columnResizeSkin:function(a){if(!this.setStyle("columnResizeSkin")||this.__columnResizeSkin==a)return this.__columnResizeSkin;this._previousClearStyle=m(this,this.clearStyle_columnResizeSkin);this.__columnResizeSkin=a;this.setInvalid(x.STYLES);return this.__columnResizeSkin},clearStyle_columnResizeSkin:function(){this.set_columnResizeSkin(null);return this.get_columnResizeSkin()},__headerCornerSkin:null,get_headerCornerSkin:function(){return this.__headerCornerSkin},
set_headerCornerSkin:function(a){if(!this.setStyle("headerCornerSkin")||this.__headerCornerSkin==a)return this.__headerCornerSkin;this._previousClearStyle=m(this,this.clearStyle_headerCornerSkin);this.__headerCornerSkin=a;this.setInvalid(x.STYLES);return this.__headerCornerSkin},clearStyle_headerCornerSkin:function(){this.set_headerCornerSkin(null);return this.get_headerCornerSkin()},__extendedScrollBarY:null,get_extendedScrollBarY:function(){return this.__extendedScrollBarY},set_extendedScrollBarY:function(a){if(!this.setStyle("extendedScrollBarY")||
this.__extendedScrollBarY==a)return this.__extendedScrollBarY;this._previousClearStyle=m(this,this.clearStyle_extendedScrollBarY);this.__extendedScrollBarY=a;this.setInvalid(x.STYLES);return this.__extendedScrollBarY},clearStyle_extendedScrollBarY:function(){this.set_extendedScrollBarY(!1);return this.get_extendedScrollBarY()},__showHeaderDividersOnlyWhenResizable:null,get_showHeaderDividersOnlyWhenResizable:function(){return this.__showHeaderDividersOnlyWhenResizable},set_showHeaderDividersOnlyWhenResizable:function(a){if(!this.setStyle("showHeaderDividersOnlyWhenResizable")||
this.__showHeaderDividersOnlyWhenResizable==a)return this.__showHeaderDividersOnlyWhenResizable;this._previousClearStyle=m(this,this.clearStyle_showHeaderDividersOnlyWhenResizable);this.__showHeaderDividersOnlyWhenResizable=a;this.setInvalid(x.STYLES);return this.__showHeaderDividersOnlyWhenResizable},clearStyle_showHeaderDividersOnlyWhenResizable:function(){this.set_showHeaderDividersOnlyWhenResizable(!1);return this.get_showHeaderDividersOnlyWhenResizable()},__class__:Cc,__properties__:I(Ab.prototype.__properties__,
{set_showHeaderDividersOnlyWhenResizable:"set_showHeaderDividersOnlyWhenResizable",get_showHeaderDividersOnlyWhenResizable:"get_showHeaderDividersOnlyWhenResizable",set_extendedScrollBarY:"set_extendedScrollBarY",get_extendedScrollBarY:"get_extendedScrollBarY",set_selectable:"set_selectable",get_selectable:"get_selectable",set_headerCornerSkin:"set_headerCornerSkin",get_headerCornerSkin:"get_headerCornerSkin",set_columnResizeSkin:"set_columnResizeSkin",get_columnResizeSkin:"get_columnResizeSkin",
set_resizableColumns:"set_resizableColumns",get_resizableColumns:"get_resizableColumns",set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_layout:"set_layout",get_layout:"get_layout",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",set_selectedLocation:"set_selectedLocation",get_selectedLocation:"get_selectedLocation",set_forceItemStateUpdate:"set_forceItemStateUpdate",
get_forceItemStateUpdate:"get_forceItemStateUpdate",set_customColumnDividerVariant:"set_customColumnDividerVariant",get_customColumnDividerVariant:"get_customColumnDividerVariant",set_columnDividerFactory:"set_columnDividerFactory",get_columnDividerFactory:"get_columnDividerFactory",set_customHeaderDividerVariant:"set_customHeaderDividerVariant",get_customHeaderDividerVariant:"get_customHeaderDividerVariant",set_headerDividerFactory:"set_headerDividerFactory",get_headerDividerFactory:"get_headerDividerFactory",
set_customHeaderRendererVariant:"set_customHeaderRendererVariant",get_customHeaderRendererVariant:"get_customHeaderRendererVariant",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",set_headerRendererRecycler:"set_headerRendererRecycler",get_headerRendererRecycler:"get_headerRendererRecycler",set_rowRendererFactory:"set_rowRendererFactory",get_rowRendererFactory:"get_rowRendererFactory",set_columns:"set_columns",get_columns:"get_columns",
set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var sx=function(a){this.inactiveHeaderRenderers=[];this.activeHeaderRenderers=[];this.headerRendererRecycler=a};t["feathers.controls._TreeGridView.HeaderRendererStorage"]=sx;sx.__name__="feathers.controls._TreeGridView.HeaderRendererStorage";sx.prototype={oldHeaderRendererRecycler:null,headerRendererRecycler:null,activeHeaderRenderers:null,
inactiveHeaderRenderers:null,measurements:null,__class__:sx};var rx=function(a){this.inactiveHeaderDividers=[];this.activeHeaderDividers=[];this.headerDividerFactory=a};t["feathers.controls._TreeGridView.HeaderDividerStorage"]=rx;rx.__name__="feathers.controls._TreeGridView.HeaderDividerStorage";rx.prototype={customHeaderDividerVariant:null,oldHeaderDividerFactory:null,headerDividerFactory:null,activeHeaderDividers:null,inactiveHeaderDividers:null,__class__:rx};var qx=function(a){this.inactiveColumnDividers=
[];this.activeColumnDividers=[];this.columnDividerFactory=a};t["feathers.controls._TreeGridView.ColumnDividerStorage"]=qx;qx.__name__="feathers.controls._TreeGridView.ColumnDividerStorage";qx.prototype={customColumnDividerVariant:null,oldColumnDividerFactory:null,columnDividerFactory:null,activeColumnDividers:null,inactiveColumnDividers:null,__class__:qx};var Am=function(a,b,c){this.cellRendererRecycler=null;this.minWidth=0;this.width=null;qa.call(this);this.headerText=a;b!=null&&(this.itemToText=
b);this.width=c};t["feathers.controls.TreeGridViewColumn"]=Am;Am.__name__="feathers.controls.TreeGridViewColumn";Am.__interfaces__=[rp];Am.__super__=qa;Am.prototype=I(qa.prototype,{headerText:null,width:null,minWidth:null,cellRendererRecycler:null,itemToText:function(a){return H.string(a)},__class__:Am});var zp=function(a,b,c,d,f,g){d==null&&(d=!1);c==null&&(c=-1);this.enabled=!0;this.branch=this.opened=this.selected=!1;this.layoutIndex=-1;this.data=a;this.location=b;this.layoutIndex=c;this.branch=
d;this.selected=!1;this.text=g};t["feathers.data.TreeViewItemState"]=zp;zp.__name__="feathers.data.TreeViewItemState";zp.prototype={owner:null,data:null,location:null,layoutIndex:null,branch:null,opened:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:zp};var fe=function(a,b){this._pendingScrollLocation=this._pendingScrollDuration=this.__layout=this.__customItemRendererVariant=null;this._ignoreSelectionChange=this._ignoreOpenedChange=this._ignoreLayoutChanges=!1;this._selectable=
this._virtualLayout=this.pointerSelectionEnabled=!0;this._totalLayoutCount=0;this._layoutItems=[];this._tempVisibleIndices=new Ri(0,0);this._visibleIndices=new Ri(0,0);this._virtualCache=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.itemStatePool=new dc(function(){return new zp});this.itemRendererToItemState=new Ta;this.stringDataToItemRenderer=new G;this.objectDataToItemRenderer=new Ta;this._additionalStorage=null;this._defaultStorage=new vt(null,Ne.withClass(If));this._recyclerMap=
null;this._forceItemStateUpdate=!1;this._selectedLocation=this._selectedItem=this._previousCustomItemRendererVariant=null;this.openBranches=[];this._childFocusEnabled=!0;this.initializeTreeViewTheme();Ab.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.treeViewPort=new Wk,this.addChild(this.treeViewPort),this.set_viewPort(this.treeViewPort));b!=null&&this.addEventListener("change",b)};t["feathers.controls.TreeView"]=fe;fe.__name__="feathers.controls.TreeView";
fe.__interfaces__=[ng,qi];fe.defaultUpdateItemRenderer=function(a,b){w.__implements(a,re)&&a.set_text(b.text)};fe.defaultResetItemRenderer=function(a,b){w.__implements(a,re)&&a.set_text(null)};fe.__super__=Ab;fe.prototype=I(Ab.prototype,{treeViewPort:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?
this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},openBranches:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._totalLayoutCount=this._virtualCache.length=0;this.openBranches.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.treeView_dataProvider_changeHandler)),
this._dataProvider.removeEventListener("addItem",m(this,this.treeView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.treeView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.treeView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.treeView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.treeView_dataProvider_resetHandler)),
this._dataProvider.removeEventListener("filterChange",m(this,this.treeView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.treeView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.treeView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.treeView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._totalLayoutCount=this.calculateTotalLayoutCount([]),
this._virtualCache.length=this._totalLayoutCount,this._dataProvider.addEventListener("change",m(this,this.treeView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",m(this,this.treeView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.treeView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.treeView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,
this.treeView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.treeView_dataProvider_resetHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.treeView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.treeView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.treeView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,
this.treeView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedLocation(null);this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._dataProvider},_selectedLocation:null,get_selectedLocation:function(){return this._selectedLocation},set_selectedLocation:function(a){this._selectable&&this._dataProvider!=null||(a=null);if(this._selectedLocation==a||this.compareLocations(this._selectedLocation,a)==0)return this._selectedLocation;this._selectedLocation=
a;this._selectedItem=this._selectedLocation==null?null:this._dataProvider.get(this._selectedLocation);this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedLocation},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedLocation(null),this._selectedItem;var b=this._dataProvider.locationOf(a);if(this._selectedItem==a&&this.compareLocations(this._selectedLocation,
b)==0)return this._selectedItem;this._selectedItem=a;this._selectedLocation=b;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selectedItem},_previousLayout:null,_previousCustomItemRendererVariant:null,get_itemRendererRecycler:function(){return this._defaultStorage.itemRendererRecycler},set_itemRendererRecycler:function(a){if(this._defaultStorage.itemRendererRecycler==a)return this._defaultStorage.itemRendererRecycler;this._defaultStorage.oldItemRendererRecycler=this._defaultStorage.itemRendererRecycler;
this._defaultStorage.itemRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(fe.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._defaultStorage.itemRendererRecycler},_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,
_itemRendererRecyclerIDFunction:null,get_itemRendererRecyclerIDFunction:function(){return this._itemRendererRecyclerIDFunction},set_itemRendererRecyclerIDFunction:function(a){if(this._itemRendererRecyclerIDFunction==a)return this._itemRendererRecyclerIDFunction;this._itemRendererRecyclerIDFunction=a;this.setInvalid(fe.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._itemRendererRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToItemRenderer:null,stringDataToItemRenderer:null,
itemRendererToItemState:null,itemStatePool:null,_unrenderedLocations:null,_unrenderedLayoutIndices:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_layoutItems:null,_totalLayoutCount:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this.set_selectedLocation(null);return this._selectable},_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},
set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_ignoreSelectionChange:null,_ignoreOpenedChange:null,_ignoreLayoutChanges:null,_currentDisplayIndex:null,_pendingScrollLocation:null,_pendingScrollDuration:null,itemToText:function(a){return H.string(a)},itemToEnabled:function(a){return!0},isBranchOpen:function(a){return this._dataProvider!=null&&this._dataProvider.contains(a)?
this._dataProvider.isBranch(a)?this.openBranches.indexOf(a)!=-1:!1:!1},toggleBranch:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==null)throw new Cb("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new Cb("Cannot open item because it is not a branch.");var d=this.openBranches.indexOf(a)!=-1;b&&d||!b&&!d||(d=this.locationToDisplayIndex(c,!1),this.toggleBranchInternal(a,c,d,b),this._totalLayoutCount=this.calculateTotalLayoutCount([]))},
toggleChildrenOf:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==null)throw new Cb("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new Cb("Cannot open item because it is not a branch.");var d=this.locationToDisplayIndex(c,!1);this.toggleChildrenOfInternal(a,c,d,b);this._totalLayoutCount=this.calculateTotalLayoutCount([])},itemToItemRenderer:function(a){return a==null?null:typeof a=="string"?this.stringDataToItemRenderer.h[a]:
this.objectDataToItemRenderer.h[a.__id__]},itemRendererToItem:function(a){if(a==null)return null;a=this.itemRendererToItemState.h[a.__id__];return a==null?null:a.data},locationToItemRenderer:function(a){if(this._dataProvider==null||!this.isValidLocation(a))return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},scrollToLocation:function(a,b){this._dataProvider!=null&&this._dataProvider.getLength()!=0&&(this._pendingScrollLocation=
a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},getItemRendererRecycler:function(a){return this._recyclerMap==null?null:this._recyclerMap.h[a]},setItemRendererRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new G);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(fe.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY))},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToItemRenderer.h[a]:
this.objectDataToItemRenderer.h[a.__id__];if(b!=null)b=this.itemRendererToItemState.h[b.__id__];else{var c=this._dataProvider.locationOf(a);if(c==null)return null;b=new zp;var d=this.locationToDisplayIndex(c,!1);this.populateCurrentItemState(a,c,d,b,!1)}return b},dispose:function(){this.refreshInactiveItemRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveItemRenderers(this._additionalStorage[c],!0)}this._selectedLocation=
this._selectedItem=null;this.set_dataProvider(null);Ab.prototype.dispose.call(this)},initializeTreeViewTheme:function(){ax.initialize()},update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(fe.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);if(a||b)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount),this.treeViewPort.set_layout(this.get_layout()),
this._previousLayout=this.get_layout();this.treeViewPort.refreshChildren=m(this,this.refreshItemRenderers);for(a=this._invalidationFlags.keys();a.hasNext();)b=a.next(),this.treeViewPort.setInvalid(b);this._allInvalid&&this.treeViewPort.setInvalid();Ab.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();this.handlePendingScroll()},createScroller:function(){Ab.prototype.createScroller.call(this);this.treeViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Ab.prototype.refreshScrollerValues.call(this);
if(w.__implements(this.get_layout(),ff)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.treeViewPort.get_snapPositionsX();this.scroller.snapPositionsY=
this.treeViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&w.__implements(this.get_layout(),Vh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._layoutItems.length,this.treeViewPort.get_visibleWidth(),this.treeViewPort.get_visibleHeight(),
this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._layoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:!0},refreshItemRenderers:function(a){this._layoutItems=a;this._defaultStorage.itemRendererRecycler.update==null&&(this._defaultStorage.itemRendererRecycler.update=fe.defaultUpdateItemRenderer,this._defaultStorage.itemRendererRecycler.reset==null&&(this._defaultStorage.itemRendererRecycler.reset=fe.defaultResetItemRenderer));
if(this._recyclerMap!=null){a=this._recyclerMap.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=fe.defaultUpdateItemRenderer,f.reset==null&&(f.reset=fe.defaultResetItemRenderer))}}a=this.treeViewPort.isInvalid(fe.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);this.refreshInactiveItemRenderers(this._defaultStorage,a);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveItemRenderers(d,
a);this.findUnrenderedData();this.recoverInactiveItemRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveItemRenderers(d);this.renderUnrenderedData();this.freeInactiveItemRenderers(this._defaultStorage);if(this._defaultStorage.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive item renderers should be empty after updating.");if(this._additionalStorage!=
null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveItemRenderers(d),d.inactiveItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive item renderers "+d.id+" should be empty after updating.");},refreshInactiveItemRenderers:function(a,b){var c=a.inactiveItemRenderers;a.inactiveItemRenderers=a.activeItemRenderers;a.activeItemRenderers=c;if(a.activeItemRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active item renderers should be empty before updating.");
b&&(this.recoverInactiveItemRenderers(a),this.freeInactiveItemRenderers(a),a.oldItemRendererRecycler=null)},recoverInactiveItemRenderers:function(a){for(var b=0,c=a.inactiveItemRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.itemRendererToItemState.h[d.__id__];if(f!=null){var g=f.data;this.itemRendererToItemState.remove(d);if(typeof g=="string"){var h=this.stringDataToItemRenderer;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}else this.objectDataToItemRenderer.remove(g);
d.removeEventListener("trigger",m(this,this.treeView_itemRenderer_triggerHandler));d.removeEventListener("click",m(this,this.treeView_itemRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.treeView_itemRenderer_touchTapHandler));d.removeEventListener("change",m(this,this.treeView_itemRenderer_changeHandler));d.removeEventListener("resize",m(this,this.treeView_itemRenderer_resizeHandler));d.removeEventListener("open",m(this,this.treeView_itemRenderer_openHandler));d.removeEventListener("close",
m(this,this.treeView_itemRenderer_closeHandler));this.resetItemRenderer(d,f,a);a.measurements!=null&&a.measurements.restore(d);this.itemStatePool.release(f)}}}},freeInactiveItemRenderers:function(a){for(var b=a.oldItemRendererRecycler!=null?a.oldItemRendererRecycler:a.itemRendererRecycler,c=0,d=a.inactiveItemRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyItemRenderer(f,b)}a.inactiveItemRenderers.length=0},findUnrenderedData:function(){this._layoutItems.length=0;this._layoutItems.length=
this._totalLayoutCount;if(this._virtualLayout&&w.__implements(this.get_layout(),Vh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._layoutItems.length,this.treeViewPort.get_visibleWidth(),this.treeViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,this._visibleIndices.end=
this._layoutItems.length-1;this.findUnrenderedDataForLocation([],0)},findUnrenderedDataForLocation:function(a,b){if(this._dataProvider==null)return b;for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);f=this._dataProvider.get(a);b<this._visibleIndices.start||b>this._visibleIndices.end?this._layoutItems[b]=null:this.findItemRenderer(f,a.slice(),b);++b;if(b>this._visibleIndices.end)break;if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.findUnrenderedDataForLocation(a,
b),b>this._visibleIndices.end))break;a.pop()}return b},findItemRenderer:function(a,b,c){var d=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(d==null)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);else{var f=this.itemRendererToItemState.h[d.__id__];a=this.populateCurrentItemState(a,b,c,f,this._forceItemStateUpdate);var g=f.recyclerID,h=this.itemStateToStorage(f);if(h.id!=g)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);
else{a&&this.updateItemRenderer(d,f,h);d.set_visible(!0);this._layoutItems[c]=d;if(!V.remove(h.inactiveItemRenderers,d))throw c=w.getClass(this),new ob(""+c.__name__+": item renderer map contains bad data for item at location "+H.string(b)+". This may be caused by duplicate items in the data provider, which is not allowed.");h.activeItemRenderers.push(d)}}},populateCurrentItemState:function(a,b,c,d,f){var g=!1;if(f||d.owner!=this)d.owner=this,g=!0;if(f||d.data!=a)d.data=a,g=!0;if(f||d.location!=b&&
this.compareLocations(d.location,b)!=0)d.location=b,g=!0;if(f||d.layoutIndex!=c)d.layoutIndex=c,g=!0;b=this._dataProvider!=null&&this._dataProvider.isBranch(a);if(f||d.branch!=b)d.branch=b,g=!0;b=d.branch&&this.openBranches.indexOf(a)!=-1;if(f||d.opened!=b)d.opened=b,g=!0;b=a==this._selectedItem;if(f||d.selected!=b)d.selected=b,g=!0;b=this._enabled&&this.itemToEnabled(a);if(f||d.enabled!=b)d.enabled=b,g=!0;a=this.itemToText(a);if(f||d.text!=a)d.text=a,g=!0;return g},updateItemRenderer:function(a,
b,c){b.recyclerID=c.id;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;c.itemRendererRecycler.update!=null&&c.itemRendererRecycler.update(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,b)},resetItemRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;c=c.oldItemRendererRecycler!=
null?c.oldItemRendererRecycler:c.itemRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,fe.RESET_ITEM_STATE)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.data);w.__implements(a,ud)&&a.set_selected(b.selected);
w.__implements(a,$k)&&a.set_branch(b.branch);w.__implements(a,Cm)&&a.set_hierarchyDepth(b.location!=null?b.location.length-1:0);w.__implements(a,Ap)&&(a.set_location(b.location),a.set_treeViewOwner(b.owner));w.__implements(a,ri)&&a.set_layoutIndex(b.layoutIndex);w.__implements(a,mf)&&a.set_opened(b.opened);this._ignoreOpenedChange=d;this._ignoreSelectionChange=c},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedLocations;a<b.length;){var c=b[a];++a;var d=this._unrenderedLayoutIndices.shift(),
f=this._dataProvider.get(c),g=this.itemStatePool.get();this.populateCurrentItemState(f,c,d,g,!0);c=this.createItemRenderer(g);c.set_visible(!0);this.treeViewPort.addChild(c);this._layoutItems[d]=c}this._unrenderedLocations.length=0},createItemRenderer:function(a){var b=this.itemStateToStorage(a);if(b.inactiveItemRenderers.length==0){var c=b.itemRendererRecycler.create();if(w.__implements(c,nd)){var d=c;if(d.get_variant()==null){var f=this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():
fe.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}w.__implements(c,Fa)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);w.__implements(c,Qh)?c.addEventListener("trigger",m(this,this.treeView_itemRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.treeView_itemRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.treeView_itemRenderer_touchTapHandler)));w.__implements(c,ud)&&c.addEventListener("change",
m(this,this.treeView_itemRenderer_changeHandler));w.__implements(c,rb)&&c.addEventListener("resize",m(this,this.treeView_itemRenderer_resizeHandler));w.__implements(c,mf)&&(c.addEventListener("open",m(this,this.treeView_itemRenderer_openHandler)),c.addEventListener("close",m(this,this.treeView_itemRenderer_closeHandler)));this.itemRendererToItemState.set(c,a);a=a.data;typeof a=="string"?this.stringDataToItemRenderer.h[a]=c:this.objectDataToItemRenderer.set(a,c);b.activeItemRenderers.push(c);return c},
destroyItemRenderer:function(a,b){this.treeViewPort.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},itemStateToStorage:function(a){var b=null;this._itemRendererRecyclerIDFunction!=null&&(b=this._itemRendererRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new ob('Item renderer recycler ID "'+b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<
d;){var f=c++;f=this._additionalStorage[f];if(f.itemRendererRecycler==a)return f}f=new vt(b,a);this._additionalStorage.push(f);return f},refreshSelectedLocationAfterFilterOrSort:function(){this._selectedLocation!=null&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},calculateTotalLayoutCount:function(a){if(this._dataProvider==null)return 0;for(var b=this._dataProvider.getLength(a),c=b,d=0;d<b;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&
this.openBranches.indexOf(f)!=-1&&(c+=this.calculateTotalLayoutCount(a));a.pop()}return c},insertChildrenIntoVirtualCache:function(a,b){for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);++b;this._virtualCache.splice(b,0,null);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.insertChildrenIntoVirtualCache(a,b));a.pop()}return b},removeChildrenFromVirtualCache:function(a,b){var c=this._dataProvider.getLength(a);++b;for(var d=
0;d<c;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&this.removeChildrenFromVirtualCache(a,b);this._virtualCache.splice(b,1);a.pop()}},containsLocation:function(a,b){if(a==null||b==null||a.length>=b.length)return!1;for(var c=0,d=a.length;c<d;){var f=c++;if(a[f]!=b[f])return!1}return!0},compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=
0;g<f;){var h=g++,n=a[h];h=b[h];if(n<h)return-1;if(n>h)return 1}return c<d?-1:c>d?1:0},displayIndexToLocation:function(a){this._currentDisplayIndex=-1;return this.displayIndexToLocationAtBranch(a,[])},displayIndexToLocationAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(b);c<d;){var f=c++;this._currentDisplayIndex++;b[b.length]=f;if(this._currentDisplayIndex==a)return b;f=this._dataProvider.get(b);if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(f=this.displayIndexToLocationAtBranch(a,
b),f!=null))return f;--b.length}return null},locationToDisplayIndex:function(a,b){this._currentDisplayIndex=-1;var c=null;b&&(c=[]);return this.locationToDisplayIndexAtBranch([],a,c)},locationToDisplayIndexAtBranch:function(a,b,c){c!=null&&c.push(b[a.length]);for(var d=0,f=this._dataProvider.getLength(a);d<f;){var g=d++;this._currentDisplayIndex++;a[a.length]=g;if(this.compareLocations(a,b)==0)return this._currentDisplayIndex;g=this._dataProvider.get(a);if(this._dataProvider.isBranch(g))if(this.openBranches.indexOf(g)!=
-1){if(g=this.locationToDisplayIndexAtBranch(a,b,c),g!=-1)return g}else if(c!=null&&this.compareLocations(c,a)==0)return this._currentDisplayIndex;--a.length}c!=null&&c.pop();return-1},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._layoutItems.length!=0){var b=this.locationToDisplayIndex(this._selectedLocation,!1),c=b;if(w.__implements(this.get_layout(),Oj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;
c=this.get_layout().findNextKeyboardIndex(c,a,!1,this._layoutItems,null,this.treeViewPort.get_visibleWidth(),this.treeViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--c;break;case 34:++c;break;case 35:c=this._layoutItems.length-1;break;case 36:c=0;break;case 37:--c;break;case 38:--c;break;case 39:++c;break;case 40:++c;break;default:return}c<0?c=0:c>=this._layoutItems.length&&(c=this._layoutItems.length-1);b=c!=b;var d=null;if(!b&&c!=-1)if(d=this.displayIndexToLocation(c),this.itemToItemRenderer(this._dataProvider.get(d))==
null)b=!0;else if(w.__implements(this.get_layout(),ff)){var f=this.get_layout().getNearestScrollPositionForIndex(c,this._layoutItems.length,this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight());if(this.get_scrollX()!=f.x||this.get_scrollY()!=f.y)b=!0}b&&(a.preventDefault(),d==null&&(d=this.displayIndexToLocation(c)),this.set_selectedLocation(d),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation),this._focusManager!=null?this._focusManager.set_focus(this):
this.stage!=null&&this.stage.set_focus(this))}},handlePendingScroll:function(){if(this._pendingScrollLocation!=null){var a=this._pendingScrollLocation,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollDuration=this._pendingScrollLocation=null;if(this._dataProvider!=null&&this._dataProvider.getLength()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(w.__implements(this.get_layout(),ff))c=this.locationToDisplayIndex(a,!0),d=this.get_layout().getNearestScrollPositionForIndex(c,
this._layoutItems.length,this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),
this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},baseScrollContainer_keyDownHandler:function(a){if(!this._selectable)Ab.prototype.baseScrollContainer_keyDownHandler.call(this,a);else if(this._enabled&&!a.isDefaultPrevented()&&this._dataProvider!=null&&!(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1)){if(a.keyCode==37){if(this._dataProvider.isBranch(this._selectedItem)&&this.openBranches.indexOf(this._selectedItem)!=-1){this.toggleBranch(this._selectedItem,
!1);return}var b=this._selectedLocation.slice();b.pop();b.length>0&&this.set_selectedLocation(b)}if(a.keyCode==39&&this._dataProvider.isBranch(this._selectedItem)){if(this.openBranches.indexOf(this._selectedItem)==-1){this.toggleBranch(this._selectedItem,!0);return}this._dataProvider.getLength(this._selectedLocation)>0&&(b=this._selectedLocation.slice(),b.push(0),this.set_selectedLocation(b))}if(a.keyCode==13&&this._selectedItem!=null){var c=typeof this._selectedItem=="string"?this.stringDataToItemRenderer.h[this._selectedItem]:
this.objectDataToItemRenderer.h[this._selectedItem.__id__];b=null;c!=null&&(b=this.itemRendererToItemState.h[c.__id__]);c=!1;b==null&&(c=!0,b=this.itemStatePool.get());var d=this.locationToDisplayIndex(this._selectedLocation,!1);this.populateCurrentItemState(this._selectedItem,this._selectedLocation,d,b,!0);Mg.dispatch(this,"itemTrigger",b);c&&this.itemStatePool.release(b)}this._selectedLocation!=null&&a.keyCode==32?this._dataProvider.isBranch(this._selectedItem)&&(a.preventDefault(),this.toggleBranch(this._selectedItem,
this.openBranches.indexOf(this._selectedItem)==-1)):this.navigateWithKeyboard(a)}},isValidLocation:function(a){for(var b=[],c=0;c<a.length;){var d=a[c];++c;if(d<0||d>=this._dataProvider.getLength(b))return!1;b.push(d)}return!0},toggleBranchInternal:function(a,b,c,d){var f=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];var g=null;f!=null&&(g=this.itemRendererToItemState.h[f.__id__]);var h=!1;g==null&&(h=!0,g=this.itemStatePool.get());g.location=b;g.layoutIndex=
c;var n=this.openBranches.indexOf(a)!=-1;d&&!n?(this.openBranches.push(a),this.populateCurrentItemState(a,b,c,g,!0),c=this.insertChildrenIntoVirtualCache(b,c),f!=null&&(a=this.itemStateToStorage(g),this.updateItemRenderer(f,g,a)),Mg.dispatch(this,"branchOpen",g)):!d&&n&&(V.remove(this.openBranches,a),this.populateCurrentItemState(a,b,c,g,!0),this.removeChildrenFromVirtualCache(b,c),f!=null&&(a=this.itemStateToStorage(g),this.updateItemRenderer(f,g,a)),Mg.dispatch(this,"branchClose",g));h&&this.itemStatePool.release(g);
this.setInvalid(x.DATA);return c},toggleChildrenOfInternal:function(a,b,c,d){c=this.toggleBranchInternal(a,b,c,d);a=0;for(var f=this._dataProvider.getLength(b);a<f;){var g=a++;b.push(g);g=this._dataProvider.get(b);this._dataProvider.isBranch(g)&&this.toggleChildrenOfInternal(g,b,c,d);b.pop()}},refreshOpenBranchesFromDataProviderChange:function(a,b){if(a!=null)for(var c=this.openBranches.length-1;c>=0;){var d=this.openBranches[c];d==a?a!=b&&this.openBranches.splice(c,1):(this._dataProvider.locationOf(d)==
null&&this.openBranches.splice(c,1),--c)}},treeView_itemRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=w.__cast(a.currentTarget,ma),a=this.itemRendererToItemState.h[a.__id__],Mg.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedLocation(a.location.slice()),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation)))},treeView_itemRenderer_clickHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,
ma),a=this.itemRendererToItemState.h[a.__id__],Mg.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedLocation(a.location.slice()),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation)))},treeView_itemRenderer_triggerHandler:function(a){this._enabled&&(a=w.__cast(a.currentTarget,ma),a=this.itemRendererToItemState.h[a.__id__],Mg.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedLocation(a.location.slice()),
this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation)))},treeView_itemRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},treeView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=w.__cast(a.currentTarget,ma);a=w.__cast(b,ud);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},treeView_itemRenderer_openHandler:function(a){this._ignoreOpenedChange||(a=w.__cast(a.currentTarget,
ma),this.toggleBranch(this.itemRendererToItemState.h[a.__id__].data,!0))},treeView_itemRenderer_closeHandler:function(a){this._ignoreOpenedChange||(a=w.__cast(a.currentTarget,ma),this.toggleBranch(this.itemRendererToItemState.h[a.__id__].data,!1))},treeView_dataProvider_changeHandler:function(a){this._totalLayoutCount=this.calculateTotalLayoutCount([]);this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount);this.setInvalid(x.DATA)},treeView_dataProvider_addItemHandler:function(a){this._selectedLocation!=
null&&this.compareLocations(this._selectedLocation,a.location)>=0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},treeView_dataProvider_removeItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):(a=this.compareLocations(this._selectedLocation,a.location),a==0?this.set_selectedLocation(null):a>0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))))},
treeView_dataProvider_replaceItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):this.compareLocations(this._selectedLocation,a.location)==0&&(this._selectedItem=this._dataProvider.get(a.location),Y.dispatch(this,"change")))},treeView_dataProvider_removeAllHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},
treeView_dataProvider_resetHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},treeView_dataProvider_sortChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},treeView_dataProvider_filterChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},updateItemRendererForLocation:function(a){var b=this.locationToDisplayIndex(a,!1);this._virtualCache!=null&&b!=-1&&(this._virtualCache[b]=null);var c=this._dataProvider.get(a);var d=typeof c==
"string"?this.stringDataToItemRenderer.h[c]:this.objectDataToItemRenderer.h[c.__id__];if(d==null)this.setInvalid(x.DATA);else{var f=this.itemRendererToItemState.h[d.__id__];if(f.owner!=null){var g=this.itemStateToStorage(f);this.populateCurrentItemState(c,a,b,f,!0);this.resetItemRenderer(d,f,g);g.measurements!=null&&g.measurements.restore(d);f.owner=null;this.setInvalid(x.DATA)}}if(this._dataProvider.isBranch(c))for(b=0,c=this._dataProvider.getLength(a);b<c;)d=b++,a.push(d),this.updateItemRendererForLocation(a),
a.pop()},treeView_dataProvider_updateItemHandler:function(a){this.updateItemRendererForLocation(a.location)},treeView_dataProvider_updateAllHandler:function(a){a=[];for(var b=0,c=this._dataProvider.getLength();b<c;){var d=b++;a[0]=d;this.updateItemRendererForLocation(a)}},get_styleContext:function(){return fe},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);
this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__customItemRendererVariant:null,get_customItemRendererVariant:function(){return this.__customItemRendererVariant},set_customItemRendererVariant:function(a){if(!this.setStyle("customItemRendererVariant")||this.__customItemRendererVariant==a)return this.__customItemRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customItemRendererVariant);this.__customItemRendererVariant=
a;this.setInvalid(x.STYLES);return this.__customItemRendererVariant},clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);return this.get_customItemRendererVariant()},__class__:fe,__properties__:I(Ab.prototype.__properties__,{set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_selectable:"set_selectable",get_selectable:"get_selectable",set_itemRendererRecyclerIDFunction:"set_itemRendererRecyclerIDFunction",get_itemRendererRecyclerIDFunction:"get_itemRendererRecyclerIDFunction",
set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_customItemRendererVariant:"set_customItemRendererVariant",get_customItemRendererVariant:"get_customItemRendererVariant",set_layout:"set_layout",get_layout:"get_layout",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",set_selectedLocation:"set_selectedLocation",get_selectedLocation:"get_selectedLocation",
set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var vt=function(a,b){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.id=a;this.itemRendererRecycler=b};t["feathers.controls._TreeView.ItemRendererStorage"]=vt;vt.__name__="feathers.controls._TreeView.ItemRendererStorage";vt.prototype={id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,
inactiveItemRenderers:null,measurements:null,__class__:vt};var Nn=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeVProgressBarTheme();kk.call(this,a,b,c,d)};t["feathers.controls.VProgressBar"]=Nn;Nn.__name__="feathers.controls.VProgressBar";Nn.__super__=kk;Nn.prototype=I(kk.prototype,{_currentMask:null,initializeVProgressBarTheme:function(){bx.initialize()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._backgroundSkinMeasurements!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);w.__implements(this._currentBackgroundSkin,rb);w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow();c=this.get_explicitWidth();a&&(c=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.width:
0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.height:0);b=this.get_explicitMinWidth();d=this.get_explicitMinHeight();f=this.get_explicitMaxWidth();g=this.get_explicitMaxHeight();return this.saveMeasurements(c,a,b,d,f,g)},layoutBackground:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),
this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),w.__implements(this._currentBackgroundSkin,da)&&this._currentBackgroundSkin.validateNow())},layoutFill:function(){if(this._currentFillSkin!=null){var a=1;this._minimum!=this._maximum&&(a=(this._value-this._minimum)/(this._maximum-this._minimum),a<0?a=0:a>1&&(a=1));var b=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();a=this._indeterminate?b:Math.round(a*b);this._currentFillSkin.set_x(this.get_paddingLeft());
this._currentFillSkin.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight());switch(this.get_fillMode()._hx_index){case 0:this._currentFillSkin.set_scrollRect(null);this._currentMask==null&&(this._currentMask=new Za(ub.SolidColor(16711935)),this.addChild(this._currentMask));this._currentFillSkin.set_mask(this._currentMask);this._currentFillSkin.set_y(this.get_paddingTop());this._currentFillSkin.set_height(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom());this._currentMask.set_x(this._currentFillSkin.get_x());
this._currentMask.set_y(this.actualHeight-this.get_paddingBottom()-a);this._currentMask.set_width(this._currentFillSkin.get_width());this._currentMask.set_height(a);break;case 1:this._currentFillSkin.set_y(this.actualHeight-this.get_paddingBottom()-a);this._currentFillSkin.set_height(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom());this._currentFillSkin.set_scrollRect(new Ia(0,this._currentFillSkin.get_height()-a,this._currentFillSkin.get_width(),a));break;case 2:this._currentFillSkin.set_mask(null),
this._currentFillSkin.set_scrollRect(null),this._currentMask!=null&&(this._currentMask.parent==this&&this.removeChild(this._currentMask),this._currentMask=null),this._fillSkinMeasurements.minHeight!=null&&a<this._fillSkinMeasurements.minHeight?(a=this._fillSkinMeasurements.minHeight,this._currentFillSkin.set_visible(this._value>this._minimum)):this._currentFillSkin.set_visible(!0),this._currentFillSkin.set_y(this.actualHeight-this.get_paddingBottom()-a),this._currentFillSkin.set_height(a)}w.__implements(this._currentFillSkin,
da)&&this._currentFillSkin.validateNow()}},get_styleContext:function(){return Nn},__class__:Nn});var On=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeVSliderTheme();lk.call(this,a,b,c,d);this.addEventListener("keyDown",m(this,this.vSlider_keyDownHandler))};t["feathers.controls.VSlider"]=On;On.__name__="feathers.controls.VSlider";On.__super__=lk;On.prototype=I(lk.prototype,{initializeVSliderTheme:function(){cx.initialize()},valueToLocation:function(a){w.__implements(this._currentThumbSkin,
da)&&this._currentThumbSkin.validateNow();a=this.normalizeValue(a);var b=this.actualHeight-this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(b-=this._currentThumbSkin.get_height());return Math.round(this.get_maximumPadding()+b*(1-a))},locationToValue:function(a,b){a=this.actualHeight-this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(a-=this._currentThumbSkin.get_height());b=b-this._pointerStartY-this.get_maximumPadding();return this._minimum+
(1-Math.min(Math.max(0,this._thumbStartY+b),a)/a)*(this._maximum-this._minimum)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow());
this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow());f=this.get_explicitWidth();a&&(f=0,this._currentThumbSkin!=null&&(f+=this._currentThumbSkin.get_width()),this._currentTrackSkin!=
null&&(f<this._currentTrackSkin.get_width()&&(f=this._currentTrackSkin.get_width()),this._currentSecondaryTrackSkin!=null&&f<this._currentSecondaryTrackSkin.get_width()&&(f=this._currentSecondaryTrackSkin.get_width())));a=this.get_explicitHeight();b&&(a=0,this._currentTrackSkin!=null&&(a+=this._currentTrackSkin.get_height(),this._currentSecondaryTrackSkin!=null&&(a+=this._currentSecondaryTrackSkin.get_height())));b=this.get_explicitMinWidth();c&&(b=0,this._currentThumbSkin!=null&&(b+=this._currentThumbSkin.get_width()),
this._currentTrackSkin!=null&&(b<this._currentTrackSkin.get_width()&&(b=this._currentTrackSkin.get_width()),this._currentSecondaryTrackSkin!=null&&b<this._currentSecondaryTrackSkin.get_width()&&(b=this._currentSecondaryTrackSkin.get_width())));c=this.get_explicitMinHeight();d&&(c=0,this._currentTrackSkin!=null&&(c+=this._currentTrackSkin.get_height(),this._currentSecondaryTrackSkin!=null&&(c+=this._secondaryTrackSkinMeasurements.height)));return this.saveMeasurements(f,a,b,c)},saveThumbStart:function(a,
b){var c=this.actualHeight;this._currentThumbSkin!=null&&(c-=this._currentThumbSkin.get_height(),b-=this._currentThumbSkin.get_height()/2);this._thumbStartX=a;this._thumbStartY=Math.min(c-this.get_maximumPadding(),Math.max(this.get_minimumPadding(),b))},layoutSplitTrack:function(){var a=this.valueToLocation(this.get_value());this._currentThumbSkin!=null&&(w.__implements(this._currentThumbSkin,da)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_height()/2));this._currentSecondaryTrackSkin.set_y(0);
this._currentSecondaryTrackSkin.set_height(a);this._currentTrackSkin.set_y(a);this._currentTrackSkin.set_height(this.actualHeight-a);w.__implements(this._currentSecondaryTrackSkin,da)&&this._currentSecondaryTrackSkin.validateNow();w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow();this._currentSecondaryTrackSkin.set_x((this.actualWidth-this._currentSecondaryTrackSkin.get_width())/2);this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2)},
layoutSingleTrack:function(){this._currentTrackSkin!=null&&(this._currentTrackSkin.set_y(0),this._currentTrackSkin.set_height(this.actualHeight),w.__implements(this._currentTrackSkin,da)&&this._currentTrackSkin.validateNow(),this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2))},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this.valueToLocation(this._value);this._currentThumbSkin.set_x((this.actualWidth-this._currentThumbSkin.get_width())/2);this._currentThumbSkin.set_y(a)}},
vSlider_keyDownHandler:function(a){if(!a.isDefaultPrevented()&&this._enabled){var b=this._value;switch(a.keyCode){case 35:b=this._maximum;break;case 36:b=this._minimum;break;case 38:b+=this._step;break;case 40:b-=this._step;break;default:return}b<this._minimum?b=this._minimum:b>this._maximum&&(b=this._maximum);a.preventDefault();this.set_value(b)}},get_styleContext:function(){return On},__class__:On});var zh=function(){};t["feathers.controls.dataRenderers.IDataRenderer"]=zh;zh.__name__="feathers.controls.dataRenderers.IDataRenderer";
zh.__isInterface__=!0;zh.__interfaces__=[Fa];zh.prototype={get_data:null,set_data:null,__class__:zh,__properties__:{set_data:"set_data",get_data:"get_data"}};var Bp=function(a,b,c,d,f){c==null&&(c=-1);b==null&&(b=-1);this.enabled=!0;this.selected=!1;this.rowIndex=this.columnIndex=-1;this.data=a;this.rowIndex=b;this.columnIndex=c;this.selected=!1;this.text=f};t["feathers.data.GridViewCellState"]=Bp;Bp.__name__="feathers.data.GridViewCellState";Bp.prototype={owner:null,data:null,rowIndex:null,columnIndex:null,
column:null,selected:null,text:null,enabled:null,__class__:Bp};var eg=function(){this._customCellRendererVariant=null;this._forceCellStateUpdate=!1;this._data=this._columns=null;this._rowIndex=-1;this._selected=this._ignoreSelectionChange=!1;this._currentState=Yb.UP(!1);this.cellStatePool=new dc(function(){return new Bp});this._cellRendererToCellState=new Ta;this._columnToCellRenderer=new Ta;this._unrenderedData=[];this._additionalStorage=null;this._defaultStorage=new wt;pb.call(this)};t["feathers.controls.dataRenderers.GridViewRowRenderer"]=
eg;eg.__name__="feathers.controls.dataRenderers.GridViewRowRenderer";eg.__interfaces__=[uh,zh,ud,Qh];eg.defaultUpdateCellRenderer=function(a,b){w.__implements(a,re)&&a.set_text(b.text)};eg.defaultResetCellRenderer=function(a,b){w.__implements(a,re)&&a.set_text(null)};eg.__super__=pb;eg.prototype=I(pb.prototype,{_defaultStorage:null,_additionalStorage:null,_unrenderedData:null,_columnToCellRenderer:null,_cellRendererToCellState:null,cellStatePool:null,_currentState:null,get_currentState:function(){return this._currentState},
set_enabled:function(a){pb.prototype.set_enabled.call(this,a);this._enabled?(a=this._currentState,a._hx_index==3&&this.changeState(Yb.UP(a.selected))):this.changeState(Yb.DISABLED(this._selected));return this._enabled},_gridView:null,get_gridView:function(){return this._gridView},set_gridView:function(a){if(this._gridView==a)return this._gridView;this._gridView!=null&&this._gridView.removeEventListener("keyDown",m(this,this.gridViewRowRenderer_gridView_keyDownHandler));this._gridView=a;if(this._gridView!=
null)this._gridView.addEventListener("keyDown",m(this,this.gridViewRowRenderer_gridView_keyDownHandler),!1,0,!0);else if(this.refreshInactiveCellRenderers(this._defaultStorage,!0),this._additionalStorage!=null){a=0;for(var b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}}this.setInvalid(x.DATA);return this._gridView},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;
this._selected=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selected},_ignoreSelectionChange:null,_rowIndex:null,get_rowIndex:function(){return this._rowIndex},set_rowIndex:function(a){if(this._rowIndex==a)return this._rowIndex;this._rowIndex=a;this.setInvalid(x.DATA);return this._rowIndex},_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);return this._data},_columns:null,get_columns:function(){return this._columns},
set_columns:function(a){if(this._columns==a)return this._columns;this._columns!=null&&this._columns.removeEventListener("change",m(this,this.gridViewRowRenderer_columns_changeHandler));this._columns=a;this._columns!=null&&this._columns.addEventListener("change",m(this,this.gridViewRowRenderer_columns_changeHandler),!1,0,!0);this.setInvalid(x.DATA);return this._columns},get_cellRendererRecycler:function(){return this._defaultStorage.cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._defaultStorage.cellRendererRecycler==
a)return this._defaultStorage.cellRendererRecycler;this._defaultStorage.oldCellRendererRecycler=this._defaultStorage.cellRendererRecycler;this._defaultStorage.cellRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(eg.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._defaultStorage.cellRendererRecycler},_forceCellStateUpdate:null,get_forceCellStateUpdate:function(){return this._forceCellStateUpdate},set_forceCellStateUpdate:function(a){if(this._forceCellStateUpdate==a)return this._forceCellStateUpdate;
this._forceCellStateUpdate=a;this.setInvalid(x.DATA);return this._forceCellStateUpdate},_customCellRendererVariant:null,get_customCellRendererVariant:function(){return this._customCellRendererVariant},set_customCellRendererVariant:function(a){if(this._customCellRendererVariant==a)return this._customCellRendererVariant;this._customCellRendererVariant=a;this.setInvalid(eg.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._customCellRendererVariant},_customColumnWidths:null,get_customColumnWidths:function(){return this._customColumnWidths},
set_customColumnWidths:function(a){if(this._customColumnWidths==a)return this._customColumnWidths;this._customColumnWidths=a;this.setInvalid(x.DATA);return this._customColumnWidths},_rowLayout:null,_pointerToState:null,_keyToState:null,dispose:function(){this.refreshInactiveCellRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}pb.prototype.dispose.call(this)},
columnToCellRenderer:function(a){return a==null?null:this._columnToCellRenderer.h[a.__id__]},columnToCellState:function(a){if(a==null)return null;var b=this._columnToCellRenderer.h[a.__id__];if(b!=null)b=this._cellRendererToCellState.h[b.__id__];else{var c=this._columns.indexOf(a);if(c==-1)return null;b=new Bp;this.populateCurrentItemState(a,c,b,!1)}return b},initialize:function(){pb.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new tm(this,m(this,this.changeState),
Yb.UP(!1),Yb.DOWN(!1),Yb.HOVER(!1)),this._pointerToState.set_customHitTest(m(this,this.customHitTest)));this._keyToState==null&&(this._keyToState=new Dn(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1)));this.get_layout()==null&&(this._rowLayout=new Ml,this.set_layout(this._rowLayout))},changeState:function(a){this._enabled||(a=Yb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Yb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Yb.HOVER(this._selected));
break;case 2:b=a.selected;this._selected!=b&&(a=Yb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Yb.DISABLED(this._selected))}this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),Y.dispatch(this,"stateChange"))},addCurrentBackgroundSkin:function(a){a!=null&&w.__implements(a,ee)&&a.set_stateContext(this);pb.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&w.__implements(a,ee)&&a.set_stateContext(null);pb.prototype.removeCurrentBackgroundSkin.call(this,
a)},updateCells:function(){for(var a=0,b=this._columns.get_length();a<b;){var c=a++;this.updateCellRendererForColumnIndex(c)}},update:function(){this.preLayout();pb.prototype.update.call(this)},preLayout:function(){this._rowLayout.set_columns(this._columns);this._rowLayout.set_customColumnWidths(this._customColumnWidths);this._defaultStorage.cellRendererRecycler.update==null&&(this._defaultStorage.cellRendererRecycler.update=eg.defaultUpdateCellRenderer,this._defaultStorage.cellRendererRecycler.reset==
null&&(this._defaultStorage.cellRendererRecycler.reset=eg.defaultResetCellRenderer));for(var a=this._columns.iterator();a.hasNext();){var b=a.next();b.cellRendererRecycler!=null&&b.cellRendererRecycler.update==null&&(b.cellRendererRecycler.update=eg.defaultUpdateCellRenderer,b.cellRendererRecycler.reset==null&&(b.cellRendererRecycler.reset=eg.defaultResetCellRenderer))}this.refreshInactiveCellRenderers(this._defaultStorage,!1);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<
b;){var c=a++;c=this._additionalStorage[c];this.refreshInactiveCellRenderers(c,!1)}this.findUnrenderedData();this.recoverInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],this.recoverInactiveCellRenderers(c);this.renderUnrenderedData();this.freeInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],
this.freeInactiveCellRenderers(c);if(this._defaultStorage.inactiveCellRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive cell renderers should be empty after updating.");if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)if(c=a++,c=this._additionalStorage[c],c.inactiveCellRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive cell renderers should be empty after updating.");},refreshInactiveCellRenderers:function(a,b){var c=
a.inactiveCellRenderers;a.inactiveCellRenderers=a.activeCellRenderers;a.activeCellRenderers=c;if(a.activeCellRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active cell renderers should be empty before updating.");b&&(this.recoverInactiveCellRenderers(a),this.freeInactiveCellRenderers(a),a.oldCellRendererRecycler=null)},findUnrenderedData:function(){for(var a=0,b=0,c=this._columns.get_length();b<c;){var d=b++,f=this._columns.get(d),g=this._columnToCellRenderer.h[f.__id__];if(g!=
null){var h=this.cellRendererRecyclerToStorage(f.cellRendererRecycler),n=this._cellRendererToCellState.h[g.__id__];this.populateCurrentItemState(f,d,n,this._forceCellStateUpdate)&&this.updateCellRenderer(g,n,h);this.setChildIndex(g,a);if(!V.remove(h.inactiveCellRenderers,g))throw a=w.getClass(this),new ob(""+a.__name__+": cell renderer map contains bad data for item at row index "+this._rowIndex+" and column index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");
h.activeCellRenderers.push(g);++a}else this._unrenderedData.push(d)}},cellRendererRecyclerToStorage:function(a){if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var b=0,c=this._additionalStorage.length;b<c;){var d=b++;d=this._additionalStorage[d];if(d.cellRendererRecycler==a)return d}d=new wt(a);this._additionalStorage.push(d);return d},recoverInactiveCellRenderers:function(a){for(var b=0,c=a.inactiveCellRenderers;b<c.length;){var d=c[b];++b;if(d!=
null){var f=this._cellRendererToCellState.h[d.__id__];if(f!=null){var g=f.column;this._cellRendererToCellState.remove(d);this._columnToCellRenderer.remove(g);d.removeEventListener("click",m(this,this.gridViewRowRenderer_cellRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.gridViewRowRenderer_cellRenderer_touchTapHandler));d.removeEventListener("trigger",m(this,this.gridViewRowRenderer_cellRenderer_triggerHandler));d.removeEventListener("change",m(this,this.gridViewRowRenderer_cellRenderer_changeHandler));
this.resetCellRenderer(d,f,a);a.measurements!=null&&a.measurements.restore(d);this.cellStatePool.release(f)}}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._columns.get(c),f=this.cellStatePool.get();this.populateCurrentItemState(d,c,f,!0);d=this.createCellRenderer(f);this.addChildAt(d,c)}this._unrenderedData.length=0},freeInactiveCellRenderers:function(a){for(var b=a.oldCellRendererRecycler!=null?a.oldCellRendererRecycler:a.cellRendererRecycler,
c=0,d=a.inactiveCellRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyCellRenderer(f,b)}a.inactiveCellRenderers.length=0},createCellRenderer:function(a){var b=a.column,c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);if(c.inactiveCellRenderers.length==0){var d=c.cellRendererRecycler.create();if(w.__implements(d,nd)){var f=d;if(f.get_variant()==null){var g=this.get_customCellRendererVariant()!=null?this.get_customCellRendererVariant():sc.CHILD_VARIANT_CELL_RENDERER;f.set_variant(g)}}w.__implements(d,
Fa)&&d.initializeNow();c.measurements==null&&(c.measurements=new Sb(d))}else d=c.inactiveCellRenderers.shift();c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);this.updateCellRenderer(d,a,c);w.__implements(d,Qh)?d.addEventListener("trigger",m(this,this.gridViewRowRenderer_cellRenderer_triggerHandler)):(d.addEventListener("click",m(this,this.gridViewRowRenderer_cellRenderer_clickHandler)),d.addEventListener("touchTap",m(this,this.gridViewRowRenderer_cellRenderer_touchTapHandler)));w.__implements(d,
ud)&&d.addEventListener("change",m(this,this.gridViewRowRenderer_cellRenderer_changeHandler));w.__implements(d,rb)&&d.addEventListener("resize",m(this,this.gridViewRowRenderer_cellRenderer_resizeHandler));this._cellRendererToCellState.set(d,a);this._columnToCellRenderer.set(b,d);c.activeCellRenderers.push(d);return d},destroyCellRenderer:function(a,b){this.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},updateCellRendererForColumnIndex:function(a){var b=this._columns.get(a),c=this._columnToCellRenderer.h[b.__id__];
if(c==null)this.setInvalid(x.DATA);else{var d=this.cellRendererRecyclerToStorage(b.cellRendererRecycler),f=this._cellRendererToCellState.h[c.__id__];f.owner!=null&&(this.populateCurrentItemState(b,a,f,!0),this.resetCellRenderer(c,f,d),f.owner=null,this.setInvalid(x.DATA))}},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this._gridView)c.owner=this._gridView,f=!0;if(d||c.data!=this._data)c.data=this._data,f=!0;if(d||c.rowIndex!=this._rowIndex)c.rowIndex=this._rowIndex,f=!0;if(d||
c.columnIndex!=b)c.columnIndex=b,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.selected!=this._selected)c.selected=this._selected,f=!0;if(d||c.enabled!=this._enabled)c.enabled=this._enabled,f=!0;a=this._rowIndex!=-1?a.itemToText(this._data):null;if(d||c.text!=a)c.text=a,f=!0;return f},updateCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c.cellRendererRecycler.update!=null&&c.cellRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,
b)},resetCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c=c.oldCellRendererRecycler!=null?c.oldCellRendererRecycler:c.cellRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,eg.RESET_CELL_STATE)},refreshCellRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.data);
w.__implements(a,ud)&&a.set_selected(b.selected);w.__implements(a,Cp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_rowIndex(b.rowIndex),a.set_gridViewOwner(b.owner));w.__implements(a,ri)&&a.set_layoutIndex(b.rowIndex);w.__implements(a,Dm)&&a.set_pointerTarget(b.rowIndex==-1?null:this);this._ignoreSelectionChange=c},customHitTest:function(a,b){if(this.stage==null)return!1;if(this.mouseChildren&&(a=this.stage.getObjectsUnderPoint(new Ea(a,b)),a.length>0&&(a=a[a.length-1],this.contains(a))))for(;a!=
null&&a!=this;){if((!(a instanceof Ja)||a.mouseEnabled)&&w.__implements(a,qd)&&(b=a,b.parent!=this&&b.get_focusEnabled()))return!1;a=a.parent}return!0},gridViewRowRenderer_cellRenderer_touchTapHandler:function(a){if(this._enabled&&!a.isPrimaryTouchPoint&&this.customHitTest(a.stageX,a.stageY)){var b=w.__cast(a.currentTarget,ma);Hf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);pf.dispatchFromTouchEvent(this,a)}},gridViewRowRenderer_cellRenderer_clickHandler:function(a){if(this._enabled&&
this.customHitTest(a.stageX,a.stageY)){var b=w.__cast(a.currentTarget,ma);Hf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);pf.dispatchFromMouseEvent(this,a)}},gridViewRowRenderer_cellRenderer_triggerHandler:function(a){if(this._enabled&&this.customHitTest(a.stageX,a.stageY)){var b=w.__cast(a.currentTarget,ma);Hf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);this.dispatchEvent(a)}},gridViewRowRenderer_cellRenderer_resizeHandler:function(a){this._validating||
this.setInvalid(x.LAYOUT)},gridViewRowRenderer_cellRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=w.__cast(a.currentTarget,ma);a=w.__cast(b,ud);b=this._cellRendererToCellState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},gridViewRowRenderer_gridView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==32||a.keyCode==13)&&this._selected){a=this._columns.get(0);var b=this.columnToCellRenderer(a),c=null;b!=null&&(c=this._cellRendererToCellState.h[b.__id__]);
b=!1;c==null&&(b=!0,c=this.cellStatePool.get());this.populateCurrentItemState(a,0,c,!0);Hf.dispatchForCell(this,"cellTrigger",c);b&&this.cellStatePool.release(c)}},gridViewRowRenderer_columns_changeHandler:function(a){this.setInvalid(x.DATA)},get_styleContext:function(){return eg},__class__:eg,__properties__:I(pb.prototype.__properties__,{set_customColumnWidths:"set_customColumnWidths",get_customColumnWidths:"get_customColumnWidths",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",
set_forceCellStateUpdate:"set_forceCellStateUpdate",get_forceCellStateUpdate:"get_forceCellStateUpdate",set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_columns:"set_columns",get_columns:"get_columns",set_data:"set_data",get_data:"get_data",set_rowIndex:"set_rowIndex",get_rowIndex:"get_rowIndex",set_selected:"set_selected",get_selected:"get_selected",set_gridView:"set_gridView",get_gridView:"get_gridView",get_currentState:"get_currentState"})});
var wt=function(a){this.inactiveCellRenderers=[];this.activeCellRenderers=[];this.cellRendererRecycler=a};t["feathers.controls.dataRenderers._GridViewRowRenderer.CellRendererStorage"]=wt;wt.__name__="feathers.controls.dataRenderers._GridViewRowRenderer.CellRendererStorage";wt.prototype={oldCellRendererRecycler:null,cellRendererRecycler:null,activeCellRenderers:null,inactiveCellRenderers:null,measurements:null,__class__:wt};var Dm=function(){};t["feathers.core.IPointerDelegate"]=Dm;Dm.__name__="feathers.core.IPointerDelegate";
Dm.__isInterface__=!0;Dm.prototype={get_pointerTarget:null,set_pointerTarget:null,__class__:Dm,__properties__:{set_pointerTarget:"set_pointerTarget",get_pointerTarget:"get_pointerTarget"}};var ri=function(){};t["feathers.layout.ILayoutIndexObject"]=ri;ri.__name__="feathers.layout.ILayoutIndexObject";ri.__isInterface__=!0;ri.prototype={get_layoutIndex:null,set_layoutIndex:null,__class__:ri,__properties__:{set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex"}};var Sc=function(){this.__accessoryView=
null;this.__showSecondaryText=this.__showHoverAndDownStates=!0;this.__secondaryTextFormat=this.__disabledSecondaryTextFormat=this.__selectedSecondaryTextFormat=this.__alternateBackgroundSkin=null;this._stateToSecondaryTextFormat=new cf;this._ignoreAccessoryResizes=!1;this._layoutIndex=-1;this._childFocusEnabled=!0;this._secondaryHtmlText=null;this._updatedSecondaryTextStyles=!1;this._previousSecondaryText=this._previousSecondaryHTMLText=this._previousSecondaryTextFormat=this._previousSecondarySimpleTextFormat=
null;this.initializeItemRendererTheme();hd.call(this);this.mouseChildren=!0;this.set_buttonMode(!1);this.set_toggleable(!1);this.set_tabEnabled(!1);this.set_tabChildren(!0)};t["feathers.controls.dataRenderers.ItemRenderer"]=Sc;Sc.__name__="feathers.controls.dataRenderers.ItemRenderer";Sc.__interfaces__=[Dm,zh,ri,ng];Sc.__super__=hd;Sc.prototype=I(hd.prototype,{_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);
Y.dispatch(this,"dataChange");return this._data},secondaryTextField:null,_secondaryTextMeasuredWidth:null,_secondaryTextMeasuredHeight:null,_previousSecondaryText:null,_previousSecondaryHTMLText:null,_previousSecondaryTextFormat:null,_previousSecondarySimpleTextFormat:null,_updatedSecondaryTextStyles:null,_secondaryText:null,get_secondaryText:function(){return this._secondaryText},set_secondaryText:function(a){if(this._secondaryText==a)return this._secondaryText;this._secondaryText=a;this.setInvalid(x.DATA);
return this._secondaryText},_secondaryHtmlText:null,get_secondaryHtmlText:function(){return this._secondaryHtmlText},set_secondaryHtmlText:function(a){if(this._secondaryHtmlText==a)return this._secondaryHtmlText;this._secondaryHtmlText=a;this.setInvalid(x.DATA);return this._secondaryHtmlText},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=
a},_layoutIndex:null,get_layoutIndex:function(){return this._layoutIndex},set_layoutIndex:function(a){if(this._layoutIndex==a)return this._layoutIndex;this._layoutIndex=a;this.setInvalid(x.DATA);this.setInvalid(x.STYLES);return this._layoutIndex},_pointerTarget:null,get_pointerTarget:function(){return this._pointerTarget},set_pointerTarget:function(a){if(this._pointerTarget==a)return this._pointerTarget;this._pointerTarget=a;this.setInvalid(x.DATA);return this._pointerTarget},_ignoreAccessoryResizes:null,
_accessoryViewMeasurements:null,_currentAccessoryView:null,get_baseline:function(){if(this.textField==null)return 0;var a=this._text!=null&&this._text.length>0,b=this._htmlText!=null&&this._htmlText.length>0;if(!this.get_showText()||!a&&!b){a=this.textField.get_y();if(!this.get_showText()||this._text==null&&this._htmlText==null)if(this._currentIcon!=null)a=this._currentIcon.get_y()+(this._currentIcon.get_height()-this._textMeasuredHeight)/2;else if(this._currentBackgroundSkin!=null)a=(this._currentBackgroundSkin.get_height()-
this._textMeasuredHeight)/2;else return 0;this.textField.set_text("\u200b");a+=this.textField.getLineMetrics(0).ascent;this.textField.set_text("");return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_stateToSecondaryTextFormat:null,getSecondaryTextFormatForState:function(a){return this._stateToSecondaryTextFormat.get(a)},setSecondaryTextFormatForState:function(a,b){this.setStyle("setSecondaryTextFormatForState",a)&&(b==null?this._stateToSecondaryTextFormat.remove(a):this._stateToSecondaryTextFormat.set(a,
b),this.setInvalid(x.STYLES))},initializeItemRendererTheme:function(){Hw.initialize()},dispose:function(){this.set_data(null);this.set_layoutIndex(-1);this.set_pointerTarget(null);hd.prototype.dispose.call(this)},initialize:function(){hd.prototype.initialize.call(this);this._pointerToState.set_customHitTest(m(this,this.customHitTest));this._pointerTrigger.set_customHitTest(m(this,this.customHitTest))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),
d=this.isInvalid(x.STYLES);this._updatedSecondaryTextStyles=!1;a&&(this._pointerToState.set_target(this._pointerTarget!=null?this._pointerTarget:this),this.refreshSecondaryTextField());(a||d||c)&&this.refreshSecondaryTextStyles();(d||c)&&this.refreshAccessoryView();(a||d||c||b)&&this.refreshSecondaryText(b);hd.prototype.update.call(this)},refreshInteractivity:function(){hd.prototype.refreshInteractivity.call(this);this._pointerToState.set_enabled(this.get_showHoverAndDownStates());this._keyToState.set_enabled(this.get_showHoverAndDownStates())},
refreshSecondaryTextField:function(){this._secondaryText==null&&this._secondaryHtmlText==null?(this.secondaryTextField!=null&&(this.removeChild(this.secondaryTextField),this.secondaryTextField=null),this._previousSecondarySimpleTextFormat=this._previousSecondaryTextFormat=this._previousSecondaryHTMLText=this._previousSecondaryText=null):this.secondaryTextField==null&&(this.secondaryTextField=new Jc,this.secondaryTextField.set_selectable(!1),this.secondaryTextField.set_multiline(!0),this.addChild(this.secondaryTextField))},
refreshSecondaryTextStyles:function(){if(this.secondaryTextField!=null){this.secondaryTextField.get_embedFonts()!=this.get_embedFonts()&&(this.secondaryTextField.set_embedFonts(this.get_embedFonts()),this._updatedSecondaryTextStyles=!0);var a=this.getCurrentSecondaryTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSecondarySimpleTextFormat&&(this._previousSecondaryTextFormat!=null&&this._previousSecondaryTextFormat.removeEventListener("change",m(this,this.itemRenderer_secondaryTextFormat_changeHandler)),
a!=null&&(a.addEventListener("change",m(this,this.itemRenderer_secondaryTextFormat_changeHandler),!1,0,!0),this.secondaryTextField.set_defaultTextFormat(b),this._updatedSecondaryTextStyles=!0),this._previousSecondaryTextFormat=a,this._previousSecondarySimpleTextFormat=b)}},refreshSecondaryText:function(a){if(this.secondaryTextField!=null){var b=this.get_showSecondaryText()&&this._secondaryText!=null&&this._secondaryText.length>0,c=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>
0;this.secondaryTextField.set_visible(b||c);if(this._secondaryText!=this._previousSecondaryText||this._secondaryHtmlText!=this._previousSecondaryHTMLText||this._updatedSecondaryTextStyles||a)this.secondaryTextField.set_autoSize(1),c?this.secondaryTextField.set_htmlText(this._secondaryHtmlText):b?this.secondaryTextField.set_text(this._secondaryText):this.secondaryTextField.set_text("\u200b"),this._secondaryTextMeasuredWidth=this.secondaryTextField.get_width(),this._secondaryTextMeasuredHeight=this.secondaryTextField.get_height(),
this.secondaryTextField.set_autoSize(2),b||c||this.secondaryTextField.set_text(""),this._previousSecondaryText=this._secondaryText,this._previousSecondaryHTMLText=this._secondaryHtmlText}},getCurrentSecondaryTextFormat:function(){var a=this._stateToSecondaryTextFormat.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledSecondaryTextFormat()==null?this._selected&&this.get_selectedSecondaryTextFormat()!=null?this.get_selectedSecondaryTextFormat():this.get_secondaryTextFormat():
this.get_disabledSecondaryTextFormat()},refreshAccessoryView:function(){var a=this._currentAccessoryView;this._currentAccessoryView=this.getCurrentAccessoryView();this._currentAccessoryView!=a&&(this.removeCurrentAccessoryView(a),this.addCurrentAccessoryView(this._currentAccessoryView))},getCurrentAccessoryView:function(){return this.get_accessoryView()},removeCurrentAccessoryView:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.itemRenderer_accessoryView_resizeHandler)),w.__implements(a,
qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._accessoryViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},addCurrentAccessoryView:function(a){a==null?this._accessoryViewMeasurements=null:(w.__implements(a,Fa)&&a.initializeNow(),this._accessoryViewMeasurements==null?this._accessoryViewMeasurements=new Sb(a):this._accessoryViewMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),w.__implements(a,ee)&&a.set_stateContext(this),a.addEventListener("resize",
m(this,this.itemRenderer_accessoryView_resizeHandler),!1,0,!0),this.addChild(a))},customHitTest:function(a,b){var c=this._pointerTarget;c=c instanceof zb?c:null;c==null&&(c=this);if(c.stage==null)return!1;if(c.mouseChildren&&(a=c.stage.getObjectsUnderPoint(new Ea(a,b)),a.length>0&&(a=a[a.length-1],c.contains(a))))for(;a!=null&&a!=c;){if(!(a instanceof Ja&&!a.mouseEnabled||!w.__implements(a,qd)||(b=a,this._pointerTarget!=null&&b.parent==this._pointerTarget||!b.get_focusEnabled())))return!1;a=a.parent}return!0},
refreshTextFieldDimensions:function(a){var b=this._ignoreIconResizes;this._ignoreIconResizes=!0;w.__implements(this._currentIcon,da)&&this._currentIcon.validateNow();this._ignoreIconResizes=b;b=this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;w.__implements(this._currentAccessoryView,da)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=b;b=this.get_showText()&&this._text!=null;var c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;if(b||c){b=this.actualWidth;
c=this.actualHeight;a&&(b=0,a=this.get_explicitWidth(),a==null&&(a=this.get_explicitMaxWidth()),a!=null&&(b=a),c=0,a=this.get_explicitHeight(),a==null&&(a=this.get_explicitMaxHeight()),a!=null&&(c=a));b-=this.get_paddingLeft()+this.get_paddingRight();c-=this.get_paddingTop()+this.get_paddingBottom();a=this.get_gap();a==1/0&&(a=this.get_minGap());if(this._currentIcon!=null){if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==
ra.TOP||this.get_iconPosition()==ra.BOTTOM)c-=this._currentIcon.get_height()+a}this.hasAccessoryViewInLayout()&&(b-=this._currentAccessoryView.get_width()+a);this.secondaryTextField!=null&&(c-=this._secondaryTextMeasuredHeight+a);b>this._textMeasuredWidth&&(b=this._textMeasuredWidth);c>this._textMeasuredHeight&&(c=this._textMeasuredHeight);b<0&&(b=0);c<0&&(c=0);this.textField.set_width(b);(a=this.get_wordWrap())&&!this._wrappedOnMeasure&&b>=this._textMeasuredWidth&&(a=!1);this.textField.get_wordWrap()!=
a&&this.textField.set_wordWrap(a);this.textField.set_height(c)}},calculateExplicitWidthForTextMeasurement:function(){var a=hd.prototype.calculateExplicitWidthForTextMeasurement.call(this);if(a==null)return a;var b=this.get_gap();b==1/0&&(b=this.get_minGap());if(this.hasAccessoryViewInLayout()){var c=this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;w.__implements(this._currentAccessoryView,da)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=c;a-=this._currentAccessoryView.get_width()+
b}a<0&&(a=0);return a},measureContentWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)d=Math.max(d,this._secondaryTextMeasuredWidth);if(this.hasAccessoryViewInLayout()){var h=
this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;w.__implements(this._currentAccessoryView,da)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;if(b||c||f||g)d+=a;d+=this._currentAccessoryView.get_width()}if(this._currentIcon!=null)if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT){if(b||c||f||g||this.hasAccessoryViewInLayout())d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)d=
Math.max(d,this._currentIcon.get_width());return d},measureContentHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)if(d+=this._secondaryTextMeasuredHeight,b||c)d+=a;if(this.hasAccessoryViewInLayout()){var h=
this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;w.__implements(this._currentAccessoryView,da)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;d=Math.max(d,this._currentAccessoryView.get_height())}if(this._currentIcon!=null)if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM){if(b||c||f||g)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)d=Math.max(d,this._currentIcon.get_height());
return d},measureContentMinWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)d=Math.max(d,this._secondaryTextMeasuredWidth);if(this.hasAccessoryViewInLayout()){var h=this._ignoreAccessoryResizes;
this._ignoreAccessoryResizes=!0;w.__implements(this._currentAccessoryView,da)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;if(b||c||f||g)d+=a;d+=this._currentAccessoryView.get_width()}if(this._currentIcon!=null)if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT){if(b||c||f||g||this.hasAccessoryViewInLayout())d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)d=Math.max(d,this._currentIcon.get_width());
return d},measureContentMinHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)if(d+=this._secondaryTextMeasuredHeight,b||c)d+=a;if(this.hasAccessoryViewInLayout()){var h=this._ignoreAccessoryResizes;
this._ignoreAccessoryResizes=!0;w.__implements(this._currentAccessoryView,da)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;d=Math.max(d,this._currentAccessoryView.get_height())}if(this._currentIcon!=null)if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM){if(b||c||f||g)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},hasAccessoryViewInLayout:function(){return this._currentAccessoryView==
null?!1:w.__implements(this._currentAccessoryView,T)?this._currentAccessoryView.get_includeInLayout():!0},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this._selected&&this.get_selectedBackgroundSkin()!=null?this.get_selectedBackgroundSkin():this.get_alternateBackgroundSkin()!=null&&this._layoutIndex%2==1?this.get_alternateBackgroundSkin():this.get_backgroundSkin()},layoutChildren:function(){this.refreshTextFieldDimensions(!1);var a=!1,b=this.get_gap();
b==1/0&&(b=this.get_minGap(),a=!0);var c=this.get_showText()&&this._text!=null,d=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0,h=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),n=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom(),l=c||d?this._textMeasuredWidth:0,q=c||d?this._textMeasuredHeight:0;
(f||g)&&this.secondaryTextField!=null&&(l=Math.max(l,this._secondaryTextMeasuredWidth),q+=this._secondaryTextMeasuredHeight+b);if(this._currentIcon!=null){if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)l+=b+this._currentIcon.get_width();if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)q+=b+this._currentIcon.get_height()}var u=a&&(c||d||f||g)&&this._currentIcon!=null&&(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM);a=a&&(c||d||f||
g)&&this._currentIcon!=null&&(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT);if(this.hasAccessoryViewInLayout()){this._currentAccessoryView.set_x(this.actualWidth-this.get_paddingRight()-this._currentAccessoryView.get_width());switch(this.get_verticalAlign()._hx_index){case 0:this._currentAccessoryView.set_y(this.get_paddingTop());break;case 1:this._currentAccessoryView.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(n-this._currentAccessoryView.get_height())/2));
break;case 2:this._currentAccessoryView.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+n-this._currentAccessoryView.get_height()));break;default:throw new Cb("Unknown vertical align: "+H.string(this.get_verticalAlign()));}h-=this._currentAccessoryView.get_width()+b}if(this._currentIcon!=null){if(this.get_iconPosition()==ra.TOP||this.get_iconPosition()==ra.BOTTOM)switch(this.get_horizontalAlign()._hx_index){case 0:this._currentIcon.set_x(this.get_paddingLeft());break;case 1:this._currentIcon.set_x(Math.max(this.get_paddingLeft(),
this.get_paddingLeft()+(h-this._currentIcon.get_height())/2));break;case 2:this._currentIcon.set_x(Math.max(this.get_paddingLeft(),this.get_paddingLeft()+h-this._currentIcon.get_width()));break;default:throw new Cb("Unknown horizontal align: "+H.string(this.get_horizontalAlign()));}if(this.get_iconPosition()==ra.LEFT||this.get_iconPosition()==ra.RIGHT)switch(this.get_verticalAlign()._hx_index){case 0:this._currentIcon.set_y(this.get_paddingTop());break;case 1:this._currentIcon.set_y(Math.max(this.get_paddingTop(),
this.get_paddingTop()+(n-this._currentIcon.get_height())/2));break;case 2:this._currentIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+n-this._currentIcon.get_height()));break;default:throw new Cb("Unknown vertical align: "+H.string(this.get_verticalAlign()));}}this.get_paddingLeft();this.get_paddingTop();if(a)l=this.get_paddingLeft();else switch(this.get_horizontalAlign()._hx_index){case 0:l=this.get_paddingLeft();break;case 1:l=Math.max(this.get_paddingLeft(),this.get_paddingLeft()+
(h-l)/2);break;case 2:l=Math.max(this.get_paddingLeft(),this.get_paddingLeft()+h-l);break;default:throw new Cb("Unknown horizontal align: "+H.string(this.get_horizontalAlign()));}if(u)q=this.get_paddingTop();else switch(this.get_verticalAlign()._hx_index){case 0:q=this.get_paddingTop();break;case 1:q=Math.max(this.get_paddingTop(),this.get_paddingTop()+(n-q)/2);break;case 2:q=Math.max(this.get_paddingTop(),this.get_paddingTop()+n-q);break;default:throw new Cb("Unknown vertical align: "+H.string(this.get_verticalAlign()));
}this._currentIcon!=null&&(this.get_iconPosition()==ra.LEFT?(this._currentIcon.set_x(l),l+=b+this._currentIcon.get_width()):this.get_iconPosition()==ra.TOP&&(this._currentIcon.set_y(q),q+=b+this._currentIcon.get_height()));var v=0,z=0,r=h;this._currentIcon==null||this.get_iconPosition()!=ra.LEFT&&this.get_iconPosition()!=ra.RIGHT||(r-=b+this._currentIcon.get_width());if(c||d)if(this.textField.set_x(l),this.textField.set_y(q),q+=this._textMeasuredHeight+b,v=Math.max(v,this.textField.get_width()),z+=
this.textField.get_height(),f||g)z+=b;(f||g)&&this.secondaryTextField!=null&&(this.secondaryTextField.set_x(l),this.secondaryTextField.set_y(q),r=this._secondaryTextMeasuredWidth<r?this._secondaryTextMeasuredWidth:r,r<0&&(r=0),this.secondaryTextField.set_width(r),q+=this._secondaryTextMeasuredHeight+b,v=Math.max(v,r),z+=this.secondaryTextField.get_height());a&&this.get_iconPosition()==ra.LEFT?((c||d)&&this.textField.set_x(Math.max(this.textField.get_x(),this.get_paddingLeft()+h-v)),(f||g)&&this.secondaryTextField.set_x(Math.max(this.secondaryTextField.get_x(),
this.get_paddingLeft()+h-v))):u&&this.get_iconPosition()==ra.TOP&&((c||d)&&this.textField.set_y(Math.max(this.textField.get_y(),this.get_paddingTop()+n-z)),(f||g)&&this.secondaryTextField.set_y(this.get_paddingTop()+n-this.secondaryTextField.get_height()));if(c||d||f||g)l+=v+b;this._currentIcon!=null&&(this.get_iconPosition()==ra.RIGHT&&(a?this._currentIcon.set_x(Math.max(l,this.get_paddingLeft()+h-this._currentIcon.get_width())):this._currentIcon.set_x(l)),this.get_iconPosition()==ra.BOTTOM&&(u?
this._currentIcon.set_y(Math.max(q,this.get_paddingTop()+n-this._currentIcon.get_height())):this._currentIcon.set_y(q)))},itemRenderer_secondaryTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},itemRenderer_accessoryView_resizeHandler:function(a){this._ignoreAccessoryResizes||this.setInvalid(x.STYLES)},__secondaryTextFormat:null,get_secondaryTextFormat:function(){return this.__secondaryTextFormat},set_secondaryTextFormat:function(a){if(!this.setStyle("secondaryTextFormat")||this.__secondaryTextFormat==
a)return this.__secondaryTextFormat;this._previousClearStyle=m(this,this.clearStyle_secondaryTextFormat);this.__secondaryTextFormat=a;this.setInvalid(x.STYLES);return this.__secondaryTextFormat},clearStyle_secondaryTextFormat:function(){this.set_secondaryTextFormat(null);return this.get_secondaryTextFormat()},__disabledSecondaryTextFormat:null,get_disabledSecondaryTextFormat:function(){return this.__disabledSecondaryTextFormat},set_disabledSecondaryTextFormat:function(a){if(!this.setStyle("disabledSecondaryTextFormat")||
this.__disabledSecondaryTextFormat==a)return this.__disabledSecondaryTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledSecondaryTextFormat);this.__disabledSecondaryTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledSecondaryTextFormat},clearStyle_disabledSecondaryTextFormat:function(){this.set_disabledSecondaryTextFormat(null);return this.get_disabledSecondaryTextFormat()},__selectedSecondaryTextFormat:null,get_selectedSecondaryTextFormat:function(){return this.__selectedSecondaryTextFormat},
set_selectedSecondaryTextFormat:function(a){if(!this.setStyle("selectedSecondaryTextFormat")||this.__selectedSecondaryTextFormat==a)return this.__selectedSecondaryTextFormat;this._previousClearStyle=m(this,this.clearStyle_selectedSecondaryTextFormat);this.__selectedSecondaryTextFormat=a;this.setInvalid(x.STYLES);return this.__selectedSecondaryTextFormat},clearStyle_selectedSecondaryTextFormat:function(){this.set_selectedSecondaryTextFormat(null);return this.get_selectedSecondaryTextFormat()},__alternateBackgroundSkin:null,
get_alternateBackgroundSkin:function(){return this.__alternateBackgroundSkin},set_alternateBackgroundSkin:function(a){if(!this.setStyle("alternateBackgroundSkin")||this.__alternateBackgroundSkin==a)return this.__alternateBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_alternateBackgroundSkin);this.__alternateBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__alternateBackgroundSkin},clearStyle_alternateBackgroundSkin:function(){this.set_alternateBackgroundSkin(null);return this.get_alternateBackgroundSkin()},
__showSecondaryText:null,get_showSecondaryText:function(){return this.__showSecondaryText},set_showSecondaryText:function(a){if(!this.setStyle("showSecondaryText")||this.__showSecondaryText==a)return this.__showSecondaryText;this._previousClearStyle=m(this,this.clearStyle_showSecondaryText);this.__showSecondaryText=a;this.setInvalid(x.STYLES);return this.__showSecondaryText},clearStyle_showSecondaryText:function(){this.set_showSecondaryText(!0);return this.get_showSecondaryText()},__showHoverAndDownStates:null,
get_showHoverAndDownStates:function(){return this.__showHoverAndDownStates},set_showHoverAndDownStates:function(a){if(!this.setStyle("showHoverAndDownStates")||this.__showHoverAndDownStates==a)return this.__showHoverAndDownStates;this._previousClearStyle=m(this,this.clearStyle_showHoverAndDownStates);this.__showHoverAndDownStates=a;this.setInvalid(x.STYLES);return this.__showHoverAndDownStates},clearStyle_showHoverAndDownStates:function(){this.set_showHoverAndDownStates(!0);return this.get_showHoverAndDownStates()},
__accessoryView:null,get_accessoryView:function(){return this.__accessoryView},set_accessoryView:function(a){if(!this.setStyle("accessoryView")||this.__accessoryView==a)return this.__accessoryView;this._previousClearStyle=m(this,this.clearStyle_accessoryView);this.__accessoryView=a;this.setInvalid(x.STYLES);return this.__accessoryView},clearStyle_accessoryView:function(){this.set_accessoryView(null);return this.get_accessoryView()},get_styleContext:function(){return Sc},__class__:Sc,__properties__:I(hd.prototype.__properties__,
{set_accessoryView:"set_accessoryView",get_accessoryView:"get_accessoryView",set_showHoverAndDownStates:"set_showHoverAndDownStates",get_showHoverAndDownStates:"get_showHoverAndDownStates",set_showSecondaryText:"set_showSecondaryText",get_showSecondaryText:"get_showSecondaryText",set_alternateBackgroundSkin:"set_alternateBackgroundSkin",get_alternateBackgroundSkin:"get_alternateBackgroundSkin",set_selectedSecondaryTextFormat:"set_selectedSecondaryTextFormat",get_selectedSecondaryTextFormat:"get_selectedSecondaryTextFormat",
set_disabledSecondaryTextFormat:"set_disabledSecondaryTextFormat",get_disabledSecondaryTextFormat:"get_disabledSecondaryTextFormat",set_secondaryTextFormat:"set_secondaryTextFormat",get_secondaryTextFormat:"get_secondaryTextFormat",set_pointerTarget:"set_pointerTarget",get_pointerTarget:"get_pointerTarget",set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled",set_secondaryHtmlText:"set_secondaryHtmlText",
get_secondaryHtmlText:"get_secondaryHtmlText",set_secondaryText:"set_secondaryText",get_secondaryText:"get_secondaryText",set_data:"set_data",get_data:"get_data"})});var Pn=function(){};t["feathers.controls.dataRenderers.IOptionalHierarchyItemRenderer"]=Pn;Pn.__name__="feathers.controls.dataRenderers.IOptionalHierarchyItemRenderer";Pn.__isInterface__=!0;Pn.__interfaces__=[Fa];Pn.prototype={get_showHierarchy:null,set_showHierarchy:null,__class__:Pn,__properties__:{set_showHierarchy:"set_showHierarchy",
get_showHierarchy:"get_showHierarchy"}};var Cm=function(){};t["feathers.controls.dataRenderers.IHierarchicalDepthItemRenderer"]=Cm;Cm.__name__="feathers.controls.dataRenderers.IHierarchicalDepthItemRenderer";Cm.__isInterface__=!0;Cm.__interfaces__=[Fa];Cm.prototype={get_hierarchyDepth:null,set_hierarchyDepth:null,__class__:Cm,__properties__:{set_hierarchyDepth:"set_hierarchyDepth",get_hierarchyDepth:"get_hierarchyDepth"}};var $k=function(){};t["feathers.controls.dataRenderers.IHierarchicalItemRenderer"]=
$k;$k.__name__="feathers.controls.dataRenderers.IHierarchicalItemRenderer";$k.__isInterface__=!0;$k.__interfaces__=[Fa];$k.prototype={get_branch:null,set_branch:null,__class__:$k,__properties__:{set_branch:"set_branch",get_branch:"get_branch"}};var If=function(){this.__branchIcon=this.__branchOpenIcon=this.__branchClosedIcon=this.__leafIcon=this.__customDisclosureButtonVariant=null;this.__indentation=0;this._previousCustomDisclosureButtonVariant=null;this._ignoreBranchOrLeafIconResizes=!1;this._showHierarchy=
!0;this._branch=this._opened=this._ignoreOpenCloseChange=!1;this._hierarchyDepth=0;this.initializeHierarchicalItemRendererTheme();Sc.call(this)};t["feathers.controls.dataRenderers.HierarchicalItemRenderer"]=If;If.__name__="feathers.controls.dataRenderers.HierarchicalItemRenderer";If.__interfaces__=[mf,Pn,Cm,$k];If.__super__=Sc;If.prototype=I(Sc.prototype,{_hierarchyDepth:null,get_hierarchyDepth:function(){return this._hierarchyDepth},set_hierarchyDepth:function(a){if(this._hierarchyDepth==a)return this._hierarchyDepth;
this._hierarchyDepth=a;this.setInvalid(x.DATA);return this._hierarchyDepth},_branch:null,get_branch:function(){return this._branch},set_branch:function(a){if(this._branch==a)return this._branch;this._branch=a;this.setInvalid(x.DATA);return this._branch},_opened:null,get_opened:function(){return this._opened},set_opened:function(a){if(this._opened==a)return this._opened;this._opened=a;this.setInvalid(x.DATA);this._opened?Y.dispatch(this,"open"):Y.dispatch(this,"close");return this._opened},_ignoreOpenCloseChange:null,
_showHierarchy:null,get_showHierarchy:function(){return this._showHierarchy},set_showHierarchy:function(a){if(this._showHierarchy==a)return this._showHierarchy;this._showHierarchy=a;this.setInvalid(x.DATA);return this._showHierarchy},_currentBranchOrLeafIcon:null,_branchOrLeafIconMeasurements:null,_ignoreBranchOrLeafIconResizes:null,disclosureButton:null,_previousCustomDisclosureButtonVariant:null,_oldDisclosureButtonFactory:null,_disclosureButtonFactory:null,get_disclosureButtonFactory:function(){return this._disclosureButtonFactory},
set_disclosureButtonFactory:function(a){if(this._disclosureButtonFactory==a)return this._disclosureButtonFactory;this._disclosureButtonFactory=a;this.setInvalid(If.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);return this._disclosureButtonFactory},dispose:function(){this.destroyDisclosureButton();Sc.prototype.dispose.call(this)},initializeHierarchicalItemRendererTheme:function(){Vk.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);this._previousCustomDisclosureButtonVariant!=
this.get_customDisclosureButtonVariant()&&this.setInvalidationFlag(If.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);var d=this.isInvalid(If.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);d&&this.createDisclosureButton();(c||b||a)&&this.refreshBranchOrLeafIcon();a&&this.refreshBranchOrLeafStatus();(b||d)&&this.disclosureButton.set_enabled(this._enabled);(a||d)&&this.refreshOpenedState();Sc.prototype.update.call(this);this._previousCustomDisclosureButtonVariant=this.get_customDisclosureButtonVariant()},
calculateExplicitWidthForTextMeasurement:function(){var a=Sc.prototype.calculateExplicitWidthForTextMeasurement.call(this);if(a==null||!this._showHierarchy)return a;var b=this.get_gap();b==1/0&&(b=this.get_minGap());var c=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;a-=c;this.disclosureButton.validateNow();a-=this.disclosureButton.get_width()+b;this._currentBranchOrLeafIcon!=null&&(c=this._ignoreBranchOrLeafIconResizes,this._ignoreBranchOrLeafIconResizes=!0,w.__implements(this._currentBranchOrLeafIcon,
da)&&this._currentBranchOrLeafIcon.validateNow(),this._ignoreBranchOrLeafIconResizes=c,a-=this._currentBranchOrLeafIcon.get_width()+b);a<0&&(a=0);return a},measureContentWidth:function(){var a=Sc.prototype.measureContentWidth.call(this);if(!this._showHierarchy)return a;this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=!0;w.__implements(this._currentBranchOrLeafIcon,da)&&this._currentBranchOrLeafIcon.validateNow();this._ignoreBranchOrLeafIconResizes=
b;b=this.get_gap();b==1/0&&(b=this.get_minGap());var c=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;a+=c+this.disclosureButton.get_width()+b;this._currentBranchOrLeafIcon!=null&&(a+=this._currentBranchOrLeafIcon.get_width()+b);return a},measureContentMinWidth:function(){var a=Sc.prototype.measureContentMinWidth.call(this);if(!this._showHierarchy)return a;this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=!0;w.__implements(this._currentBranchOrLeafIcon,
da)&&this._currentBranchOrLeafIcon.validateNow();this._ignoreBranchOrLeafIconResizes=b;b=this.get_gap();b==1/0&&(b=this.get_minGap());var c=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;a+=c+this.disclosureButton.get_width()+b;this._currentBranchOrLeafIcon!=null&&(a+=this._currentBranchOrLeafIcon.get_width()+b);return a},layoutChildren:function(){var a=this;if(this._showHierarchy){this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=
!0;w.__implements(this._currentBranchOrLeafIcon,da)&&this._currentBranchOrLeafIcon.validateNow();this._ignoreBranchOrLeafIconResizes=b;var c=this.get_paddingLeft();b=this.get_gap();b==1/0&&(b=this.get_minGap());var d=b,f=b,g=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;this.runWithoutInvalidation(function(){var h=c+g+a.disclosureButton.get_width()+d;a._currentBranchOrLeafIcon!=null&&(h+=a._currentBranchOrLeafIcon.get_width()+f);a.set_paddingLeft(h)});Sc.prototype.layoutChildren.call(this);
this.runWithoutInvalidation(function(){a.set_paddingLeft(c)});this.disclosureButton.set_x(this.get_paddingLeft()+g);switch(this.get_verticalAlign()._hx_index){case 0:this.disclosureButton.set_y(this.get_paddingTop());break;case 1:this.disclosureButton.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this.disclosureButton.get_height())/2));break;case 2:this.disclosureButton.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+
this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this.disclosureButton.get_height()));break;default:throw new Cb("Unknown vertical align: "+H.string(this.get_verticalAlign()));}if(this._currentBranchOrLeafIcon!=null)switch(this._currentBranchOrLeafIcon.set_x(this.disclosureButton.get_x()+this.disclosureButton.get_width()+d),this.get_verticalAlign()._hx_index){case 0:this._currentBranchOrLeafIcon.set_y(this.get_paddingTop());break;case 1:this._currentBranchOrLeafIcon.set_y(Math.max(this.get_paddingTop(),
this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentBranchOrLeafIcon.get_height())/2));break;case 2:this._currentBranchOrLeafIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentBranchOrLeafIcon.get_height()));break;default:throw new Cb("Unknown vertical align: "+H.string(this.get_verticalAlign()));}}else Sc.prototype.layoutChildren.call(this)},createDisclosureButton:function(){this.destroyDisclosureButton();
var a=this._disclosureButtonFactory!=null?this._disclosureButtonFactory:If.defaultDisclosureButtonFactory;this._oldDisclosureButtonFactory=a;this.disclosureButton=a.create();this.disclosureButton.get_variant()==null&&this.disclosureButton.set_variant(this.get_customDisclosureButtonVariant()!=null?this.get_customDisclosureButtonVariant():If.CHILD_VARIANT_DISCLOSURE_BUTTON);this.disclosureButton.set_tabEnabled(!1);this.disclosureButton.addEventListener("change",m(this,this.hierarchicalItemRenderer_disclosureButton_changeHandler));
this.disclosureButton.initializeNow();this.addChild(this.disclosureButton)},destroyDisclosureButton:function(){this.disclosureButton!=null&&(this.disclosureButton.removeEventListener("change",m(this,this.hierarchicalItemRenderer_disclosureButton_changeHandler)),this.removeChild(this.disclosureButton),this._oldDisclosureButtonFactory.destroy!=null&&this._oldDisclosureButtonFactory.destroy(this.disclosureButton),this.disclosureButton=this._oldDisclosureButtonFactory=null)},refreshBranchOrLeafIcon:function(){var a=
this._currentBranchOrLeafIcon;this._currentBranchOrLeafIcon=this.getCurrentBranchOrLeafIcon();this._currentBranchOrLeafIcon!=null&&this._currentBranchOrLeafIcon.set_visible(this._showHierarchy);this._currentBranchOrLeafIcon!=a&&(this.removeCurrentBranchOrLeafIcon(a),this.addCurrentBranchOrLeafIcon(this._currentBranchOrLeafIcon))},getCurrentBranchOrLeafIcon:function(){return this._branch?this._opened&&this.get_branchOpenIcon()!=null?this.get_branchOpenIcon():this._opened||this.get_branchClosedIcon()==
null?this.get_branchIcon():this.get_branchClosedIcon():this.get_leafIcon()},removeCurrentBranchOrLeafIcon:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.hierarchicalItemRenderer_branchOrLeafIcon_resizeHandler)),w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._branchOrLeafIconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},addCurrentBranchOrLeafIcon:function(a){a==null?this._branchOrLeafIconMeasurements=null:(w.__implements(a,
Fa)&&a.initializeNow(),this._branchOrLeafIconMeasurements==null?this._branchOrLeafIconMeasurements=new Sb(a):this._branchOrLeafIconMeasurements.save(a),w.__implements(a,qb)&&a.set_uiContext(this),w.__implements(a,ee)&&a.set_stateContext(this),a.addEventListener("resize",m(this,this.hierarchicalItemRenderer_branchOrLeafIcon_resizeHandler),!1,0,!0),this.addChild(a))},refreshBranchOrLeafStatus:function(){this.disclosureButton.set_visible(this._showHierarchy&&this._branch)},refreshOpenedState:function(){var a=
this._ignoreOpenCloseChange;this._ignoreOpenCloseChange=!0;this.disclosureButton.set_selected(this._opened);this._ignoreOpenCloseChange=a},hierarchicalItemRenderer_disclosureButton_changeHandler:function(a){this._ignoreOpenCloseChange||this.set_opened(this.disclosureButton.get_selected())},hierarchicalItemRenderer_branchOrLeafIcon_resizeHandler:function(a){this._ignoreBranchOrLeafIconResizes||this.setInvalid(x.STYLES)},get_styleContext:function(){return If},__indentation:null,get_indentation:function(){return this.__indentation},
set_indentation:function(a){if(!this.setStyle("indentation")||this.__indentation==a)return this.__indentation;this._previousClearStyle=m(this,this.clearStyle_indentation);this.__indentation=a;this.setInvalid(x.STYLES);return this.__indentation},clearStyle_indentation:function(){this.set_indentation(0);return this.get_indentation()},__branchIcon:null,get_branchIcon:function(){return this.__branchIcon},set_branchIcon:function(a){if(!this.setStyle("branchIcon")||this.__branchIcon==a)return this.__branchIcon;
this._previousClearStyle=m(this,this.clearStyle_branchIcon);this.__branchIcon=a;this.setInvalid(x.STYLES);return this.__branchIcon},clearStyle_branchIcon:function(){this.set_branchIcon(null);return this.get_branchIcon()},__branchOpenIcon:null,get_branchOpenIcon:function(){return this.__branchOpenIcon},set_branchOpenIcon:function(a){if(!this.setStyle("branchOpenIcon")||this.__branchOpenIcon==a)return this.__branchOpenIcon;this._previousClearStyle=m(this,this.clearStyle_branchOpenIcon);this.__branchOpenIcon=
a;this.setInvalid(x.STYLES);return this.__branchOpenIcon},clearStyle_branchOpenIcon:function(){this.set_branchOpenIcon(null);return this.get_branchOpenIcon()},__branchClosedIcon:null,get_branchClosedIcon:function(){return this.__branchClosedIcon},set_branchClosedIcon:function(a){if(!this.setStyle("branchClosedIcon")||this.__branchClosedIcon==a)return this.__branchClosedIcon;this._previousClearStyle=m(this,this.clearStyle_branchClosedIcon);this.__branchClosedIcon=a;this.setInvalid(x.STYLES);return this.__branchClosedIcon},
clearStyle_branchClosedIcon:function(){this.set_branchClosedIcon(null);return this.get_branchClosedIcon()},__leafIcon:null,get_leafIcon:function(){return this.__leafIcon},set_leafIcon:function(a){if(!this.setStyle("leafIcon")||this.__leafIcon==a)return this.__leafIcon;this._previousClearStyle=m(this,this.clearStyle_leafIcon);this.__leafIcon=a;this.setInvalid(x.STYLES);return this.__leafIcon},clearStyle_leafIcon:function(){this.set_leafIcon(null);return this.get_leafIcon()},__customDisclosureButtonVariant:null,
get_customDisclosureButtonVariant:function(){return this.__customDisclosureButtonVariant},set_customDisclosureButtonVariant:function(a){if(!this.setStyle("customDisclosureButtonVariant")||this.__customDisclosureButtonVariant==a)return this.__customDisclosureButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDisclosureButtonVariant);this.__customDisclosureButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDisclosureButtonVariant},clearStyle_customDisclosureButtonVariant:function(){this.set_customDisclosureButtonVariant(null);
return this.get_customDisclosureButtonVariant()},__class__:If,__properties__:I(Sc.prototype.__properties__,{set_disclosureButtonFactory:"set_disclosureButtonFactory",get_disclosureButtonFactory:"get_disclosureButtonFactory",set_customDisclosureButtonVariant:"set_customDisclosureButtonVariant",get_customDisclosureButtonVariant:"get_customDisclosureButtonVariant",set_leafIcon:"set_leafIcon",get_leafIcon:"get_leafIcon",set_branchClosedIcon:"set_branchClosedIcon",get_branchClosedIcon:"get_branchClosedIcon",
set_branchOpenIcon:"set_branchOpenIcon",get_branchOpenIcon:"get_branchOpenIcon",set_branchIcon:"set_branchIcon",get_branchIcon:"get_branchIcon",set_indentation:"set_indentation",get_indentation:"get_indentation",set_showHierarchy:"set_showHierarchy",get_showHierarchy:"get_showHierarchy",set_opened:"set_opened",get_opened:"get_opened",set_branch:"set_branch",get_branch:"get_branch",set_hierarchyDepth:"set_hierarchyDepth",get_hierarchyDepth:"get_hierarchyDepth"})});var Cp=function(){};t["feathers.controls.dataRenderers.IGridViewCellRenderer"]=
Cp;Cp.__name__="feathers.controls.dataRenderers.IGridViewCellRenderer";Cp.__isInterface__=!0;Cp.__interfaces__=[Fa];Cp.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_rowIndex:null,set_rowIndex:null,get_gridViewOwner:null,set_gridViewOwner:null,__class__:Cp,__properties__:{set_gridViewOwner:"set_gridViewOwner",get_gridViewOwner:"get_gridViewOwner",set_rowIndex:"set_rowIndex",get_rowIndex:"get_rowIndex",set_columnIndex:"set_columnIndex",get_columnIndex:"get_columnIndex",
set_column:"set_column",get_column:"get_column"}};var pp=function(){};t["feathers.controls.dataRenderers.IGridViewHeaderRenderer"]=pp;pp.__name__="feathers.controls.dataRenderers.IGridViewHeaderRenderer";pp.__isInterface__=!0;pp.__interfaces__=[Fa];pp.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_gridViewOwner:null,set_gridViewOwner:null,__class__:pp,__properties__:{set_gridViewOwner:"set_gridViewOwner",get_gridViewOwner:"get_gridViewOwner",set_columnIndex:"set_columnIndex",
get_columnIndex:"get_columnIndex",set_column:"set_column",get_column:"get_column"}};var up=function(){};t["feathers.controls.dataRenderers.IGroupListViewItemRenderer"]=up;up.__name__="feathers.controls.dataRenderers.IGroupListViewItemRenderer";up.__isInterface__=!0;up.__interfaces__=[Fa];up.prototype={get_location:null,set_location:null,get_groupListViewOwner:null,set_groupListViewOwner:null,__class__:up,__properties__:{set_groupListViewOwner:"set_groupListViewOwner",get_groupListViewOwner:"get_groupListViewOwner",
set_location:"set_location",get_location:"get_location"}};var jp=function(){};t["feathers.controls.dataRenderers.IListViewItemRenderer"]=jp;jp.__name__="feathers.controls.dataRenderers.IListViewItemRenderer";jp.__isInterface__=!0;jp.__interfaces__=[Fa];jp.prototype={get_index:null,set_index:null,get_listViewOwner:null,set_listViewOwner:null,__class__:jp,__properties__:{set_listViewOwner:"set_listViewOwner",get_listViewOwner:"get_listViewOwner",set_index:"set_index",get_index:"get_index"}};var Dp=
function(){};t["feathers.controls.dataRenderers.ITreeGridViewCellRenderer"]=Dp;Dp.__name__="feathers.controls.dataRenderers.ITreeGridViewCellRenderer";Dp.__isInterface__=!0;Dp.__interfaces__=[$k];Dp.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_rowLocation:null,set_rowLocation:null,get_treeGridViewOwner:null,set_treeGridViewOwner:null,__class__:Dp,__properties__:{set_treeGridViewOwner:"set_treeGridViewOwner",get_treeGridViewOwner:"get_treeGridViewOwner",
set_rowLocation:"set_rowLocation",get_rowLocation:"get_rowLocation",set_columnIndex:"set_columnIndex",get_columnIndex:"get_columnIndex",set_column:"set_column",get_column:"get_column"}};var yp=function(){};t["feathers.controls.dataRenderers.ITreeGridViewHeaderRenderer"]=yp;yp.__name__="feathers.controls.dataRenderers.ITreeGridViewHeaderRenderer";yp.__isInterface__=!0;yp.__interfaces__=[Fa];yp.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_treeGridViewOwner:null,
set_treeGridViewOwner:null,__class__:yp,__properties__:{set_treeGridViewOwner:"set_treeGridViewOwner",get_treeGridViewOwner:"get_treeGridViewOwner",set_columnIndex:"set_columnIndex",get_columnIndex:"get_columnIndex",set_column:"set_column",get_column:"get_column"}};var Ap=function(){};t["feathers.controls.dataRenderers.ITreeViewItemRenderer"]=Ap;Ap.__name__="feathers.controls.dataRenderers.ITreeViewItemRenderer";Ap.__isInterface__=!0;Ap.__interfaces__=[$k];Ap.prototype={get_location:null,set_location:null,
get_treeViewOwner:null,set_treeViewOwner:null,__class__:Ap,__properties__:{set_treeViewOwner:"set_treeViewOwner",get_treeViewOwner:"get_treeViewOwner",set_location:"set_location",get_location:"get_location"}};var Nl=function(){this.__selectedBackgroundSkin=this.__alternateBackgroundSkin=null;this.__showHoverAndDownStates=!0;this._stateToSkin=new cf;this._pointerToState=null;this._selected=!1;this._layoutIndex=-1;this._currentState=Yb.UP(!1);this.initializeLayoutGroupItemRendererTheme();pb.call(this)};
t["feathers.controls.dataRenderers.LayoutGroupItemRenderer"]=Nl;Nl.__name__="feathers.controls.dataRenderers.LayoutGroupItemRenderer";Nl.__interfaces__=[Dm,ud,zh,ri,uh];Nl.__super__=pb;Nl.prototype=I(pb.prototype,{_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);Y.dispatch(this,"dataChange");return this._data},_currentState:null,get_currentState:function(){return this._currentState},_layoutIndex:null,get_layoutIndex:function(){return this._layoutIndex},
set_layoutIndex:function(a){if(this._layoutIndex==a)return this._layoutIndex;this._layoutIndex=a;this.setInvalid(x.DATA);this.setInvalid(x.STYLES);return this._layoutIndex},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;this._selected=a;this.setInvalid(x.DATA);this.setInvalid(x.STYLES);Y.dispatch(this,"change");this.changeState(this.get_currentState());return this._selected},_pointerTarget:null,get_pointerTarget:function(){return this._pointerTarget},
set_pointerTarget:function(a){if(this._pointerTarget==a)return this._pointerTarget;this._pointerTarget=a;this.setInvalid(x.DATA);return this._pointerTarget},_pointerToState:null,_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):
this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},initializeLayoutGroupItemRendererTheme:function(){Jw.initialize()},initialize:function(){pb.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new tm(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1),Yb.HOVER(!1)));this._pointerToState.set_customHitTest(m(this,this.customHitTest))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STYLES);a&&this._pointerToState.set_target(this._pointerTarget!=
null?this._pointerTarget:this);b&&this.refreshInteractivity();pb.prototype.update.call(this)},refreshInteractivity:function(){this._pointerToState.set_enabled(this.get_showHoverAndDownStates())},customHitTest:function(a,b){var c=this._pointerTarget;c=c instanceof zb?c:null;c==null&&(c=this);if(c.stage==null)return!1;if(c.mouseChildren&&(a=c.stage.getObjectsUnderPoint(new Ea(a,b)),a.length>0&&(a=a[a.length-1],c.contains(a))))for(;a!=null&&a!=c;){if(!(a instanceof Ja&&!a.mouseEnabled||!w.__implements(a,
qd)||(b=a,this._pointerTarget!=null&&b.parent==this._pointerTarget||!b.get_focusEnabled())))return!1;a=a.parent}return!0},changeState:function(a){this._enabled||(a=Yb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Yb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Yb.HOVER(this._selected));break;case 2:b=a.selected;this._selected!=b&&(a=Yb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Yb.DISABLED(this._selected))}this._currentState!=
a&&(this._currentState=a,this.setInvalid(x.STATE),Y.dispatch(this,"stateChange"))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledBackgroundSkin()==null?this._selected&&this.get_selectedBackgroundSkin()!=null?this.get_selectedBackgroundSkin():this.get_alternateBackgroundSkin()!=null&&this._layoutIndex%2==1?this.get_alternateBackgroundSkin():this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a!=
null&&w.__implements(a,ee)&&a.set_stateContext(this);pb.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&w.__implements(a,ee)&&a.set_stateContext(null);pb.prototype.removeCurrentBackgroundSkin.call(this,a)},get_styleContext:function(){return Nl},__showHoverAndDownStates:null,get_showHoverAndDownStates:function(){return this.__showHoverAndDownStates},set_showHoverAndDownStates:function(a){if(!this.setStyle("showHoverAndDownStates")||this.__showHoverAndDownStates==
a)return this.__showHoverAndDownStates;this._previousClearStyle=m(this,this.clearStyle_showHoverAndDownStates);this.__showHoverAndDownStates=a;this.setInvalid(x.STYLES);return this.__showHoverAndDownStates},clearStyle_showHoverAndDownStates:function(){this.set_showHoverAndDownStates(!0);return this.get_showHoverAndDownStates()},__selectedBackgroundSkin:null,get_selectedBackgroundSkin:function(){return this.__selectedBackgroundSkin},set_selectedBackgroundSkin:function(a){if(!this.setStyle("selectedBackgroundSkin")||
this.__selectedBackgroundSkin==a)return this.__selectedBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_selectedBackgroundSkin);this.__selectedBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__selectedBackgroundSkin},clearStyle_selectedBackgroundSkin:function(){this.set_selectedBackgroundSkin(null);return this.get_selectedBackgroundSkin()},__alternateBackgroundSkin:null,get_alternateBackgroundSkin:function(){return this.__alternateBackgroundSkin},set_alternateBackgroundSkin:function(a){if(!this.setStyle("alternateBackgroundSkin")||
this.__alternateBackgroundSkin==a)return this.__alternateBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_alternateBackgroundSkin);this.__alternateBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__alternateBackgroundSkin},clearStyle_alternateBackgroundSkin:function(){this.set_alternateBackgroundSkin(null);return this.get_alternateBackgroundSkin()},__class__:Nl,__properties__:I(pb.prototype.__properties__,{set_alternateBackgroundSkin:"set_alternateBackgroundSkin",get_alternateBackgroundSkin:"get_alternateBackgroundSkin",
set_selectedBackgroundSkin:"set_selectedBackgroundSkin",get_selectedBackgroundSkin:"get_selectedBackgroundSkin",set_showHoverAndDownStates:"set_showHoverAndDownStates",get_showHoverAndDownStates:"get_showHoverAndDownStates",set_pointerTarget:"set_pointerTarget",get_pointerTarget:"get_pointerTarget",set_selected:"set_selected",get_selected:"get_selected",set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex",get_currentState:"get_currentState",set_data:"set_data",get_data:"get_data"})});
var qp=function(){};t["feathers.data.ISortOrderObserver"]=qp;qp.__name__="feathers.data.ISortOrderObserver";qp.__isInterface__=!0;qp.prototype={get_sortOrder:null,set_sortOrder:null,__class__:qp,__properties__:{set_sortOrder:"set_sortOrder",get_sortOrder:"get_sortOrder"}};var Zk=function(){this.__sortAscendingIcon=this.__sortDescendingIcon=null;this._sortOrder=Bh.NONE;this.initializeSortOrderHeaderRendererTheme();Sc.call(this);this.set_toggleable(!1)};t["feathers.controls.dataRenderers.SortOrderHeaderRenderer"]=
Zk;Zk.__name__="feathers.controls.dataRenderers.SortOrderHeaderRenderer";Zk.__interfaces__=[qp];Zk.__super__=Sc;Zk.prototype=I(Sc.prototype,{_sortOrder:null,get_sortOrder:function(){return this._sortOrder},set_sortOrder:function(a){if(this._sortOrder==a)return this._sortOrder;this._sortOrder=a;this.setInvalid(x.DATA);return this._sortOrder},_currentSortOrderIcon:null,_sortOrderIconMeasurements:null,initializeSortOrderHeaderRendererTheme:function(){Ky.initialize()},update:function(){var a=this.isInvalid(x.DATA),
b=this.isInvalid(x.STATE);(this.isInvalid(x.STYLES)||b||a)&&this.refreshSortOrderIcon();Sc.prototype.update.call(this)},calculateExplicitWidthForTextMeasurement:function(){var a=Sc.prototype.calculateExplicitWidthForTextMeasurement.call(this);if(a==null)return a;var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentSortOrderIcon!=null&&(w.__implements(this._currentSortOrderIcon,da)&&this._currentSortOrderIcon.validateNow(),a-=this._currentSortOrderIcon.get_width()+b);a<0&&(a=0);return a},
measureContentWidth:function(){var a=Sc.prototype.measureContentWidth.call(this);w.__implements(this._currentSortOrderIcon,da)&&this._currentSortOrderIcon.validateNow();var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentSortOrderIcon!=null&&(a+=this._currentSortOrderIcon.get_width()+b);return a},measureContentMinWidth:function(){var a=Sc.prototype.measureContentMinWidth.call(this);w.__implements(this._currentSortOrderIcon,da)&&this._currentSortOrderIcon.validateNow();var b=this.get_gap();
b==1/0&&(b=this.get_minGap());this._currentSortOrderIcon!=null&&(a+=this._currentSortOrderIcon.get_width()+b);return a},layoutChildren:function(){var a=this;w.__implements(this._currentSortOrderIcon,da)&&this._currentSortOrderIcon.validateNow();var b=this.get_paddingRight(),c=this.get_gap();c==1/0&&(c=this.get_minGap());this.runWithoutInvalidation(function(){var d=b;a._currentSortOrderIcon!=null&&(d+=a._currentSortOrderIcon.get_width()+c);a.set_paddingRight(d)});Sc.prototype.layoutChildren.call(this);
this.runWithoutInvalidation(function(){a.set_paddingRight(b)});if(this._currentSortOrderIcon!=null)switch(this._currentSortOrderIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentSortOrderIcon.get_width()),this.get_verticalAlign()._hx_index){case 0:this._currentSortOrderIcon.set_y(this.get_paddingTop());break;case 1:this._currentSortOrderIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentSortOrderIcon.get_height())/
2));break;case 2:this._currentSortOrderIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentSortOrderIcon.get_height()));break;default:throw new Cb("Unknown vertical align: "+H.string(this.get_verticalAlign()));}},refreshSortOrderIcon:function(){var a=this._currentSortOrderIcon;this._currentSortOrderIcon=this.getCurrentSortOrderIcon();this._currentSortOrderIcon!=a&&(this.removeCurrentSortOrderIcon(a),this._currentSortOrderIcon==
null?this._sortOrderIconMeasurements=null:(w.__implements(this._currentSortOrderIcon,Fa)&&this._currentSortOrderIcon.initializeNow(),this._sortOrderIconMeasurements==null?this._sortOrderIconMeasurements=new Sb(this._currentSortOrderIcon):this._sortOrderIconMeasurements.save(this._currentSortOrderIcon),w.__implements(this._currentSortOrderIcon,qb)&&this._currentSortOrderIcon.set_uiContext(this),w.__implements(this._currentSortOrderIcon,ee)&&this._currentSortOrderIcon.set_stateContext(this),this.addChild(this._currentSortOrderIcon)))},
getCurrentSortOrderIcon:function(){switch(this._sortOrder._hx_index){case 0:return this.get_sortAscendingIcon();case 1:return this.get_sortDescendingIcon();default:return null}},removeCurrentSortOrderIcon:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._sortOrderIconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},get_styleContext:function(){return Zk},__sortAscendingIcon:null,get_sortAscendingIcon:function(){return this.__sortAscendingIcon},
set_sortAscendingIcon:function(a){if(!this.setStyle("sortAscendingIcon")||this.__sortAscendingIcon==a)return this.__sortAscendingIcon;this._previousClearStyle=m(this,this.clearStyle_sortAscendingIcon);this.__sortAscendingIcon=a;this.setInvalid(x.STYLES);return this.__sortAscendingIcon},clearStyle_sortAscendingIcon:function(){this.set_sortAscendingIcon(null);return this.get_sortAscendingIcon()},__sortDescendingIcon:null,get_sortDescendingIcon:function(){return this.__sortDescendingIcon},set_sortDescendingIcon:function(a){if(!this.setStyle("sortDescendingIcon")||
this.__sortDescendingIcon==a)return this.__sortDescendingIcon;this._previousClearStyle=m(this,this.clearStyle_sortDescendingIcon);this.__sortDescendingIcon=a;this.setInvalid(x.STYLES);return this.__sortDescendingIcon},clearStyle_sortDescendingIcon:function(){this.set_sortDescendingIcon(null);return this.get_sortDescendingIcon()},__class__:Zk,__properties__:I(Sc.prototype.__properties__,{set_sortDescendingIcon:"set_sortDescendingIcon",get_sortDescendingIcon:"get_sortDescendingIcon",set_sortAscendingIcon:"set_sortAscendingIcon",
get_sortAscendingIcon:"get_sortAscendingIcon",set_sortOrder:"set_sortOrder",get_sortOrder:"get_sortOrder"})});var Bm=function(a,b,c,d,f,g,h,n){g==null&&(g=!1);f==null&&(f=!1);d==null&&(d=-1);c==null&&(c=-1);this.enabled=!0;this.branch=this.opened=this.selected=!1;this.columnIndex=this.layoutIndex=-1;this.rowLocation=null;this.data=a;this.rowLocation=b;this.columnIndex=c;this.layoutIndex=d;this.branch=f;this.opened=g;this.selected=!1;this.text=n};t["feathers.data.TreeGridViewCellState"]=Bm;Bm.__name__=
"feathers.data.TreeGridViewCellState";Bm.prototype={owner:null,data:null,rowLocation:null,columnIndex:null,layoutIndex:null,branch:null,opened:null,column:null,selected:null,text:null,enabled:null,__class__:Bm};var Zf=function(){this._customCellRendererVariant=null;this._forceCellStateUpdate=!1;this._data=this._columns=null;this._branch=this._opened=!1;this._layoutIndex=-1;this._rowLocation=null;this._selected=this._ignoreSelectionChange=this._ignoreOpenedChange=!1;this._currentState=Yb.UP(!1);this.cellStatePool=
new dc(function(){return new Bm});this._cellRendererToCellState=new Ta;this._columnToCellRenderer=new Ta;this._unrenderedData=[];this._additionalStorage=null;this._defaultStorage=new xt;pb.call(this)};t["feathers.controls.dataRenderers.TreeGridViewRowRenderer"]=Zf;Zf.__name__="feathers.controls.dataRenderers.TreeGridViewRowRenderer";Zf.__interfaces__=[uh,zh,ud,Qh];Zf.defaultUpdateCellRenderer=function(a,b){w.__implements(a,re)&&a.set_text(b.text)};Zf.defaultResetCellRenderer=function(a,b){w.__implements(a,
re)&&a.set_text(null)};Zf.__super__=pb;Zf.prototype=I(pb.prototype,{_defaultStorage:null,_additionalStorage:null,_unrenderedData:null,_columnToCellRenderer:null,_cellRendererToCellState:null,cellStatePool:null,_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){pb.prototype.set_enabled.call(this,a);this._enabled?(a=this._currentState,a._hx_index==3&&this.changeState(Yb.UP(a.selected))):this.changeState(Yb.DISABLED(this._selected));return this._enabled},
_treeGridView:null,get_treeGridView:function(){return this._treeGridView},set_treeGridView:function(a){if(this._treeGridView==a)return this._treeGridView;this._treeGridView!=null&&this._treeGridView.removeEventListener("keyDown",m(this,this.treeGridViewRowRenderer_treeGridView_keyDownHandler));this._treeGridView=a;if(this._treeGridView!=null)this._treeGridView.addEventListener("keyDown",m(this,this.treeGridViewRowRenderer_treeGridView_keyDownHandler),!1,0,!0);else if(this.refreshInactiveCellRenderers(this._defaultStorage,
!0),this._additionalStorage!=null){a=0;for(var b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}}this.setInvalid(x.DATA);return this._treeGridView},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;this._selected=a;this.setInvalid(x.SELECTION);Y.dispatch(this,"change");return this._selected},_ignoreSelectionChange:null,_ignoreOpenedChange:null,_rowLocation:null,
get_rowLocation:function(){return this._rowLocation},set_rowLocation:function(a){if(this._rowLocation==a)return this._rowLocation;this._rowLocation=a;this.setInvalid(x.DATA);return this._rowLocation},_layoutIndex:null,get_layoutIndex:function(){return this._layoutIndex},set_layoutIndex:function(a){if(this._layoutIndex==a)return this._layoutIndex;this._layoutIndex=a;this.setInvalid(x.DATA);return this._layoutIndex},_branch:null,get_branch:function(){return this._branch},set_branch:function(a){if(this._branch==
a)return this._branch;this._branch=a;this.setInvalid(x.DATA);return this._branch},_opened:null,get_opened:function(){return this._branch},set_opened:function(a){if(this._opened==a)return this._opened;this._opened=a;this.setInvalid(x.DATA);return this._opened},_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);return this._data},_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==
a)return this._columns;this._columns!=null&&this._columns.removeEventListener("change",m(this,this.treeGridViewRowRenderer_columns_changeHandler));this._columns=a;this._columns!=null&&this._columns.addEventListener("change",m(this,this.treeGridViewRowRenderer_columns_changeHandler),!1,0,!0);this.setInvalid(x.DATA);return this._columns},get_cellRendererRecycler:function(){return this._defaultStorage.cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._defaultStorage.cellRendererRecycler==
a)return this._defaultStorage.cellRendererRecycler;this._defaultStorage.oldCellRendererRecycler=this._defaultStorage.cellRendererRecycler;this._defaultStorage.cellRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(Zf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._defaultStorage.cellRendererRecycler},_forceCellStateUpdate:null,get_forceCellStateUpdate:function(){return this._forceCellStateUpdate},set_forceCellStateUpdate:function(a){if(this._forceCellStateUpdate==a)return this._forceCellStateUpdate;
this._forceCellStateUpdate=a;this.setInvalid(x.DATA);return this._forceCellStateUpdate},_customCellRendererVariant:null,get_customCellRendererVariant:function(){return this._customCellRendererVariant},set_customCellRendererVariant:function(a){if(this._customCellRendererVariant==a)return this._customCellRendererVariant;this._customCellRendererVariant=a;this.setInvalid(Zf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._customCellRendererVariant},_customColumnWidths:null,get_customColumnWidths:function(){return this._customColumnWidths},
set_customColumnWidths:function(a){if(this._customColumnWidths==a)return this._customColumnWidths;this._customColumnWidths=a;this.setInvalid(x.DATA);return this._customColumnWidths},_rowLayout:null,_pointerToState:null,_keyToState:null,dispose:function(){this.refreshInactiveCellRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}pb.prototype.dispose.call(this)},
columnToCellRenderer:function(a){return a==null?null:this._columnToCellRenderer.h[a.__id__]},columnToCellState:function(a){if(a==null)return null;var b=this._columnToCellRenderer.h[a.__id__];if(b!=null)b=this._cellRendererToCellState.h[b.__id__];else{var c=this._columns.indexOf(a);if(c==-1)return null;b=new Bm;this.populateCurrentItemState(a,c,b,!1)}return b},initialize:function(){pb.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new tm(this,m(this,this.changeState),
Yb.UP(!1),Yb.DOWN(!1),Yb.HOVER(!1)),this._pointerToState.set_customHitTest(m(this,this.customHitTest)));this._keyToState==null&&(this._keyToState=new Dn(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1)));this.get_layout()==null&&(this._rowLayout=new Ml,this.set_layout(this._rowLayout))},changeState:function(a){this._enabled||(a=Yb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Yb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Yb.HOVER(this._selected));
break;case 2:b=a.selected;this._selected!=b&&(a=Yb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Yb.DISABLED(this._selected))}this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),Y.dispatch(this,"stateChange"))},addCurrentBackgroundSkin:function(a){a!=null&&w.__implements(a,ee)&&a.set_stateContext(this);pb.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&w.__implements(a,ee)&&a.set_stateContext(null);pb.prototype.removeCurrentBackgroundSkin.call(this,
a)},updateCells:function(){for(var a=0,b=this._columns.get_length();a<b;){var c=a++;this.updateCellRendererForColumnIndex(c)}},update:function(){this.preLayout();pb.prototype.update.call(this)},preLayout:function(){this._rowLayout.set_columns(this._columns);this._rowLayout.set_customColumnWidths(this._customColumnWidths);this._defaultStorage.cellRendererRecycler.update==null&&(this._defaultStorage.cellRendererRecycler.update=Zf.defaultUpdateCellRenderer,this._defaultStorage.cellRendererRecycler.reset==
null&&(this._defaultStorage.cellRendererRecycler.reset=Zf.defaultResetCellRenderer));for(var a=this._columns.iterator();a.hasNext();){var b=a.next();b.cellRendererRecycler!=null&&b.cellRendererRecycler.update==null&&(b.cellRendererRecycler.update=Zf.defaultUpdateCellRenderer,b.cellRendererRecycler.reset==null&&(b.cellRendererRecycler.reset=Zf.defaultResetCellRenderer))}this.refreshInactiveCellRenderers(this._defaultStorage,!1);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<
b;){var c=a++;c=this._additionalStorage[c];this.refreshInactiveCellRenderers(c,!1)}this.findUnrenderedData();this.recoverInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],this.recoverInactiveCellRenderers(c);this.renderUnrenderedData();this.freeInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],
this.freeInactiveCellRenderers(c);if(this._defaultStorage.inactiveCellRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive cell renderers should be empty after updating.");if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)if(c=a++,c=this._additionalStorage[c],c.inactiveCellRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": inactive cell renderers should be empty after updating.");},refreshInactiveCellRenderers:function(a,b){var c=
a.inactiveCellRenderers;a.inactiveCellRenderers=a.activeCellRenderers;a.activeCellRenderers=c;if(a.activeCellRenderers.length>0)throw a=w.getClass(this),new ob(""+a.__name__+": active cell renderers should be empty before updating.");b&&(this.recoverInactiveCellRenderers(a),this.freeInactiveCellRenderers(a),a.oldCellRendererRecycler=null)},findUnrenderedData:function(){for(var a=0,b=0,c=this._columns.get_length();b<c;){var d=b++,f=this._columns.get(d),g=this._columnToCellRenderer.h[f.__id__];if(g!=
null){var h=this.cellRendererRecyclerToStorage(f.cellRendererRecycler),n=this._cellRendererToCellState.h[g.__id__];this.populateCurrentItemState(f,d,n,this._forceCellStateUpdate)&&this.updateCellRenderer(g,n,h);this.setChildIndex(g,a);if(!V.remove(h.inactiveCellRenderers,g))throw a=w.getClass(this),new ob(""+a.__name__+": cell renderer map contains bad data for item at row location "+H.string(this._rowLocation)+" and column index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");
h.activeCellRenderers.push(g);++a}else this._unrenderedData.push(d)}},cellRendererRecyclerToStorage:function(a){if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var b=0,c=this._additionalStorage.length;b<c;){var d=b++;d=this._additionalStorage[d];if(d.cellRendererRecycler==a)return d}d=new xt(a);this._additionalStorage.push(d);return d},recoverInactiveCellRenderers:function(a){for(var b=0,c=a.inactiveCellRenderers;b<c.length;){var d=c[b];++b;if(d!=
null){var f=this._cellRendererToCellState.h[d.__id__];if(f!=null){var g=f.column;this._cellRendererToCellState.remove(d);this._columnToCellRenderer.remove(g);d.removeEventListener("click",m(this,this.treeGridViewRowRenderer_cellRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.treeGridViewRowRenderer_cellRenderer_touchTapHandler));d.removeEventListener("trigger",m(this,this.treeGridViewRowRenderer_cellRenderer_triggerHandler));d.removeEventListener("change",m(this,this.treeGridViewRowRenderer_cellRenderer_changeHandler));
d.removeEventListener("resize",m(this,this.treeGridViewRowRenderer_cellRenderer_resizeHandler));d.removeEventListener("open",m(this,this.treeGridViewRowRenderer_cellRenderer_openHandler));d.removeEventListener("close",m(this,this.treeGridViewRowRenderer_cellRenderer_closeHandler));this.resetCellRenderer(d,f,a);a.measurements!=null&&a.measurements.restore(d);this.cellStatePool.release(f)}}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._columns.get(c),
f=this.cellStatePool.get();this.populateCurrentItemState(d,c,f,!0);d=this.createCellRenderer(f);this.addChildAt(d,c)}this._unrenderedData.length=0},freeInactiveCellRenderers:function(a){for(var b=a.oldCellRendererRecycler!=null?a.oldCellRendererRecycler:a.cellRendererRecycler,c=0,d=a.inactiveCellRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyCellRenderer(f,b)}a.inactiveCellRenderers.length=0},createCellRenderer:function(a){var b=a.column,c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);
if(c.inactiveCellRenderers.length==0){var d=c.cellRendererRecycler.create();if(w.__implements(d,nd)){var f=d;if(f.get_variant()==null){var g=this.get_customCellRendererVariant()!=null?this.get_customCellRendererVariant():Cc.CHILD_VARIANT_CELL_RENDERER;f.set_variant(g)}}w.__implements(d,Fa)&&d.initializeNow();c.measurements==null&&(c.measurements=new Sb(d))}else d=c.inactiveCellRenderers.shift();c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);this.updateCellRenderer(d,a,c);w.__implements(d,
Qh)?d.addEventListener("trigger",m(this,this.treeGridViewRowRenderer_cellRenderer_triggerHandler)):(d.addEventListener("click",m(this,this.treeGridViewRowRenderer_cellRenderer_clickHandler)),d.addEventListener("touchTap",m(this,this.treeGridViewRowRenderer_cellRenderer_touchTapHandler)));w.__implements(d,ud)&&d.addEventListener("change",m(this,this.treeGridViewRowRenderer_cellRenderer_changeHandler));w.__implements(d,rb)&&d.addEventListener("resize",m(this,this.treeGridViewRowRenderer_cellRenderer_resizeHandler));
w.__implements(d,mf)&&(d.addEventListener("open",m(this,this.treeGridViewRowRenderer_cellRenderer_openHandler)),d.addEventListener("close",m(this,this.treeGridViewRowRenderer_cellRenderer_closeHandler)));this._cellRendererToCellState.set(d,a);this._columnToCellRenderer.set(b,d);c.activeCellRenderers.push(d);return d},destroyCellRenderer:function(a,b){this.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},updateCellRendererForColumnIndex:function(a){var b=this._columns.get(a),c=this._columnToCellRenderer.h[b.__id__];
if(c==null)this.setInvalid(x.DATA);else{var d=this.cellRendererRecyclerToStorage(b.cellRendererRecycler),f=this._cellRendererToCellState.h[c.__id__];f.owner!=null&&(this.populateCurrentItemState(b,a,f,!0),this.resetCellRenderer(c,f,d),f.owner=null,this.setInvalid(x.DATA))}},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this._treeGridView)c.owner=this._treeGridView,f=!0;if(d||c.data!=this._data)c.data=this._data,f=!0;if(d||c.rowLocation!=this._rowLocation&&this.compareLocations(c.rowLocation,
this._rowLocation)!=0)c.rowLocation=this._rowLocation,f=!0;if(d||c.columnIndex!=b)c.columnIndex=b,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.layoutIndex!=this._layoutIndex)c.layoutIndex=this._layoutIndex,f=!0;if(d||c.branch!=this._branch)c.branch=this._branch,f=!0;if(d||c.opened!=this._opened)c.opened=this._opened,f=!0;if(d||c.selected!=this._selected)c.selected=this._selected,f=!0;if(d||c.enabled!=this._enabled)c.enabled=this._enabled,f=!0;a=this._rowLocation!=null?a.itemToText(this._data):null;
if(d||c.text!=a)c.text=a,f=!0;return f},updateCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;c.cellRendererRecycler.update!=null&&c.cellRendererRecycler.update(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,b)},resetCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=
!0;c=c.oldCellRendererRecycler!=null?c.oldCellRendererRecycler:c.cellRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,Zf.RESET_CELL_STATE)},refreshCellRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;w.__implements(a,Fa)&&a.set_enabled(b.enabled);w.__implements(a,zh)&&a.set_data(b.data);w.__implements(a,
ud)&&a.set_selected(b.selected);w.__implements(a,$k)&&a.set_branch(b.branch);w.__implements(a,Pn)&&a.set_showHierarchy(b.columnIndex==0);w.__implements(a,Cm)&&a.set_hierarchyDepth(b.rowLocation!=null?b.rowLocation.length-1:0);w.__implements(a,Dp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_rowLocation(b.rowLocation),a.set_treeGridViewOwner(b.owner));w.__implements(a,ri)&&a.set_layoutIndex(b.layoutIndex);w.__implements(a,mf)&&a.set_opened(b.opened);w.__implements(a,Dm)&&a.set_pointerTarget(b.rowLocation==
null?null:this);this._ignoreOpenedChange=d;this._ignoreSelectionChange=c},compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=0;g<f;){var h=g++,n=a[h];h=b[h];if(n<h)return-1;if(n>h)return 1}return c<d?-1:c>d?1:0},customHitTest:function(a,b){if(this.stage==null)return!1;if(this.mouseChildren&&(a=this.stage.getObjectsUnderPoint(new Ea(a,b)),a.length>0&&(a=a[a.length-1],this.contains(a))))for(;a!=null&&
a!=this;){if((!(a instanceof Ja)||a.mouseEnabled)&&w.__implements(a,qd)&&(b=a,b.parent!=this&&b.get_focusEnabled()))return!1;a=a.parent}return!0},treeGridViewRowRenderer_cellRenderer_touchTapHandler:function(a){if(this._enabled&&!a.isPrimaryTouchPoint&&this.customHitTest(a.stageX,a.stageY)){var b=w.__cast(a.currentTarget,ma);$e.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);pf.dispatchFromTouchEvent(this,a)}},treeGridViewRowRenderer_cellRenderer_clickHandler:function(a){if(this._enabled&&
this.customHitTest(a.stageX,a.stageY)){var b=w.__cast(a.currentTarget,ma);$e.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);pf.dispatchFromMouseEvent(this,a)}},treeGridViewRowRenderer_cellRenderer_triggerHandler:function(a){if(this._enabled&&this.customHitTest(a.stageX,a.stageY)){var b=w.__cast(a.currentTarget,ma);$e.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);this.dispatchEvent(a)}},treeGridViewRowRenderer_cellRenderer_resizeHandler:function(a){this._validating||
this.setInvalid(x.LAYOUT)},treeGridViewRowRenderer_cellRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=w.__cast(a.currentTarget,ma);a=w.__cast(b,ud);b=this._cellRendererToCellState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},treeGridViewRowRenderer_cellRenderer_openHandler:function(a){this._ignoreOpenedChange||this.dispatchEvent(a.clone())},treeGridViewRowRenderer_cellRenderer_closeHandler:function(a){this._ignoreOpenedChange||this.dispatchEvent(a.clone())},
treeGridViewRowRenderer_treeGridView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()){if(this._selected&&a.keyCode==37){if(this._branch&&this._opened){this.get_treeGridView().toggleBranch(this._data,!1);return}var b=this._rowLocation.slice();b.pop();b.length>0&&this.get_treeGridView().set_selectedLocation(b)}if(this._selected&&a.keyCode==39&&this._branch){if(!this._opened){this.get_treeGridView().toggleBranch(this._data,!0);return}this.get_treeGridView().get_dataProvider().getLength(this._rowLocation)>
0&&(b=this._rowLocation.slice(),b.push(0),this.get_treeGridView().set_selectedLocation(b))}if(this._selected&&a.keyCode==13){b=this._columns.get(0);var c=this.columnToCellRenderer(b),d=null;c!=null&&(d=this._cellRendererToCellState.h[c.__id__]);c=!1;d==null&&(c=!0,d=this.cellStatePool.get());this.populateCurrentItemState(b,0,d,!0);$e.dispatchForCell(this,"cellTrigger",d);c&&this.cellStatePool.release(d)}this._selected&&a.keyCode==32&&this._branch&&(a.preventDefault(),this.get_treeGridView().toggleBranch(this._data,
!this._opened))}},treeGridViewRowRenderer_columns_changeHandler:function(a){this.setInvalid(x.DATA)},get_styleContext:function(){return Zf},__class__:Zf,__properties__:I(pb.prototype.__properties__,{set_customColumnWidths:"set_customColumnWidths",get_customColumnWidths:"get_customColumnWidths",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",set_forceCellStateUpdate:"set_forceCellStateUpdate",get_forceCellStateUpdate:"get_forceCellStateUpdate",
set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_columns:"set_columns",get_columns:"get_columns",set_data:"set_data",get_data:"get_data",set_opened:"set_opened",get_opened:"get_opened",set_branch:"set_branch",get_branch:"get_branch",set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex",set_rowLocation:"set_rowLocation",get_rowLocation:"get_rowLocation",set_selected:"set_selected",get_selected:"get_selected",set_treeGridView:"set_treeGridView",
get_treeGridView:"get_treeGridView",get_currentState:"get_currentState"})});var xt=function(a){this.inactiveCellRenderers=[];this.activeCellRenderers=[];this.cellRendererRecycler=a};t["feathers.controls.dataRenderers._TreeGridViewRowRenderer.CellRendererStorage"]=xt;xt.__name__="feathers.controls.dataRenderers._TreeGridViewRowRenderer.CellRendererStorage";xt.prototype={oldCellRendererRecycler:null,cellRendererRecycler:null,activeCellRenderers:null,inactiveCellRenderers:null,measurements:null,__class__:xt};
var Rd=function(){this.chromeMeasuredMaxHeight=1/0;this.chromeMeasuredHeight=this.chromeMeasuredMinHeight=0;this.chromeMeasuredMaxWidth=1/0;this.topContentOffset=this.rightContentOffset=this.bottomContentOffset=this.leftContentOffset=this.chromeMeasuredWidth=this.chromeMeasuredMinWidth=0;this._autoSizeMode=Ve.STAGE;this._waitingForTransitionFrameCount=0;this._clearAfterTransition=this._waitingForDelayedTransition=!1;this._nextViewInTransitionMeasurements=new Sb;this._previousViewInTransitionMeasurements=
new Sb;this._addedItems=new G;this._addedItemIDs=[];this._activeViewMeasurements=new Sb;this._childFocusEnabled=!0;fa.call(this);this._viewsContainer=this;this.addEventListener("addedToStage",m(this,this.baseNavigator_addedToStageHandler))};t["feathers.controls.navigators.BaseNavigator"]=Rd;Rd.__name__="feathers.controls.navigators.BaseNavigator";Rd.__interfaces__=[ng];Rd.defaultTransition=function(a,b){return new Ep(a)};Rd.__super__=fa;Rd.prototype=I(fa.prototype,{_activeItemID:null,get_activeItemID:function(){return this._activeItemID},
_activeItemView:null,get_activeItemView:function(){return this._activeItemView},_transitionActive:null,get_transitionActive:function(){return this._transitionActive},get_tabEnabled:function(){return!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled&&!this._transitionActive?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},_viewsContainer:null,_activeViewMeasurements:null,
_addedItemIDs:null,_addedItems:null,_previousViewInTransition:null,_previousViewInTransitionID:null,_previousViewInTransitionMeasurements:null,_nextViewInTransition:null,_nextViewInTransitionID:null,_nextViewInTransitionMeasurements:null,_pendingItemID:null,_pendingItemTransition:null,_clearAfterTransition:null,_delayedTransition:null,_waitingForDelayedTransition:null,_waitingTransition:null,_waitingForTransitionFrameCount:null,_activeTransition:null,_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},
set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this._activeItemView!=null&&(this._autoSizeMode==Ve.STAGE?this._activeItemView.removeEventListener("resize",m(this,this.activeItemView_resizeHandler)):this._activeItemView.addEventListener("resize",m(this,this.activeItemView_resizeHandler)));this.stage!=null&&(this._autoSizeMode==Ve.STAGE?(this.stage.addEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler)),
this.addEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler))));return this._autoSizeMode},topContentOffset:null,rightContentOffset:null,bottomContentOffset:null,leftContentOffset:null,chromeMeasuredWidth:null,chromeMeasuredMinWidth:null,chromeMeasuredMaxWidth:null,chromeMeasuredHeight:null,
chromeMeasuredMinHeight:null,chromeMeasuredMaxHeight:null,dispose:function(){this._pendingItemTransition=this._pendingItemID=null;this._transitionActive=!1;this._activeTransition!=null&&(this._activeTransition.removeEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.removeEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.stop());this._activeItemView=this._activeItemID=null;this.removeAllItems();fa.prototype.dispose.call(this)},
removeAllItems:function(){this._activeTransition!=null&&(this._clearAfterTransition=!1,this._pendingItemTransition=this._pendingItemID=null,this._activeTransition.toEnd());this._activeItemView!=null&&(this.clearActiveItemInternal(null),Y.dispatch(this,"clear"));this._addedItems.h=Object.create(null);this._addedItemIDs.length=0},hasItem:function(a){return Object.prototype.hasOwnProperty.call(this._addedItems.h,a)},getItemIDs:function(a){a==null&&(a=[]);for(var b=Object.keys(this._addedItems.h),c=b.length,
d=0;d<c;){var f=b[d++];a.push(f)}return a},update:function(){this.isInvalid(x.SIZE);this.chromeMeasuredMinWidth=this.chromeMeasuredWidth=this.leftContentOffset=this.bottomContentOffset=this.rightContentOffset=this.topContentOffset=0;this.chromeMeasuredMaxWidth=1/0;this.chromeMeasuredMinHeight=this.chromeMeasuredHeight=0;this.chromeMeasuredMaxHeight=1/0;this.measure();this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this._autoSizeMode==Ve.CONTENT||this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ea);var q=this.globalToLocal(new Ea(this.stage.stageWidth,this.stage.stageHeight));n=q.x-l.x;l=q.y-l.y}q=null;w.__implements(this._activeItemView,rb)&&(q=this._activeItemView);var u=null,v=null;this._transitionActive&&(w.__implements(this._previousViewInTransition,
rb)&&(u=this._previousViewInTransition),w.__implements(this._nextViewInTransition,rb)&&(v=this._nextViewInTransition));if(this._transitionActive){h&&(this._previousViewInTransition!=null&&this._previousViewInTransitionMeasurements.restore(this._previousViewInTransition),this._nextViewInTransition!=null&&this._nextViewInTransitionMeasurements.restore(this._nextViewInTransition));if(a)h||(z=n-this.leftContentOffset-this.rightContentOffset,this._previousViewInTransition!=null&&this._previousViewInTransition.get_width()!=
z&&this._previousViewInTransition.set_width(z),this._nextViewInTransition!=null&&this._nextViewInTransition.get_width()!=z&&this._nextViewInTransition.set_width(z));else{var z=this.get_explicitWidth()-this.leftContentOffset-this.rightContentOffset;this._previousViewInTransition!=null&&this._previousViewInTransition.get_width()!=z&&this._previousViewInTransition.set_width(z);this._nextViewInTransition!=null&&this._nextViewInTransition.get_width()!=z&&this._nextViewInTransition.set_width(z)}b?h||(z=
l-this.topContentOffset-this.leftContentOffset,this._previousViewInTransition!=null&&this._previousViewInTransition.get_height()!=z&&this._previousViewInTransition.set_height(z),this._nextViewInTransition!=null&&this._nextViewInTransition.get_height()!=z&&this._nextViewInTransition.set_height(z)):(z=this.get_explicitHeight()-this.topContentOffset-this.leftContentOffset,this._previousViewInTransition!=null&&this._previousViewInTransition.get_height()!=z&&this._previousViewInTransition.set_height(z),
this._nextViewInTransition!=null&&this._nextViewInTransition.get_height()!=z&&this._nextViewInTransition.set_height(z))}else this._activeItemView!=null&&(h&&this._activeViewMeasurements.restore(this._activeItemView),a?h||(z=n-this.leftContentOffset-this.rightContentOffset,this._activeItemView.get_width()!=z&&this._activeItemView.set_width(z)):(z=this.get_explicitWidth()-this.leftContentOffset-this.rightContentOffset,this._activeItemView.get_width()!=z&&this._activeItemView.set_width(z)),b?h||(z=l-
this.topContentOffset-this.leftContentOffset,this._activeItemView.get_height()!=z&&this._activeItemView.set_height(z)):(z=this.get_explicitHeight()-this.topContentOffset-this.leftContentOffset,this._activeItemView.get_height()!=z&&this._activeItemView.set_height(z)));this._transitionActive?(w.__implements(this._previousViewInTransition,da)&&this._previousViewInTransition.validateNow(),w.__implements(this._nextViewInTransition,da)&&this._nextViewInTransition.validateNow()):w.__implements(this._activeItemView,
da)&&this._activeItemView.validateNow();z=this.get_explicitWidth();a&&(h?(z=0,this._transitionActive?(this._previousViewInTransition!=null&&z<this._previousViewInTransition.get_width()&&(z=this._previousViewInTransition.get_width()),this._nextViewInTransition!=null&&z<this._nextViewInTransition.get_width()&&(z=this._nextViewInTransition.get_width())):this._activeItemView!=null&&(z=this._activeItemView.get_width()),z<this.chromeMeasuredWidth&&(z=this.chromeMeasuredWidth),z+=this.rightContentOffset+
this.leftContentOffset):z=n);a=this.get_explicitHeight();b&&(h?(a=0,this._transitionActive?(this._previousViewInTransition!=null&&a<this._previousViewInTransition.get_height()&&(a=this._previousViewInTransition.get_height()),this._nextViewInTransition!=null&&a<this._nextViewInTransition.get_height()&&(a=this._nextViewInTransition.get_height())):this._activeItemView!=null&&(a=this._activeItemView.get_height()),a<this.chromeMeasuredHeight&&(a=this.chromeMeasuredHeight),a+=this.topContentOffset+this.bottomContentOffset):
a=l);b=this.get_explicitMinWidth();c&&(h?(b=0,this._transitionActive?(u!=null&&b<u.get_minWidth()?b=u.get_minWidth():this._previousViewInTransition!=null&&b<this._previousViewInTransition.get_width()&&(b=this._previousViewInTransition.get_width()),v!=null&&b<v.get_minWidth()?b=v.get_minWidth():this._nextViewInTransition!=null&&b<this._nextViewInTransition.get_width()&&(b=this._nextViewInTransition.get_width())):q!=null?b=q.get_minWidth():this._activeItemView!=null&&(b=this._activeItemView.get_width()),
b<this.chromeMeasuredMinWidth&&(b=this.chromeMeasuredMinWidth),b+=this.rightContentOffset+this.leftContentOffset):b=n);c=this.get_explicitMinHeight();d&&(h?(c=0,this._transitionActive?(u!=null&&c<u.get_minHeight()?c=u.get_minHeight():this._previousViewInTransition!=null&&c<this._previousViewInTransition.get_height()&&(c=this._previousViewInTransition.get_height()),v!=null&&c<v.get_minHeight()?c=v.get_minHeight():this._nextViewInTransition!=null&&c<this._nextViewInTransition.get_height()&&(c=this._nextViewInTransition.get_height())):
q!=null?c=q.get_minHeight():this._activeItemView!=null&&(c=this._activeItemView.get_height()),c<this.chromeMeasuredMinHeight&&(c=this.chromeMeasuredMinHeight),c+=this.topContentOffset+this.bottomContentOffset):c=l);d=this.get_explicitMaxWidth();f&&(h?(d=1/0,this._transitionActive?(u!=null&&d<u.get_maxWidth()?d=u.get_maxWidth():this._previousViewInTransition!=null&&d<this._previousViewInTransition.get_width()&&(d=this._previousViewInTransition.get_width()),v!=null&&d<v.get_maxWidth()?d=v.get_maxWidth():
this._nextViewInTransition!=null&&d<this._nextViewInTransition.get_width()&&(d=this._nextViewInTransition.get_width())):q!=null?d=q.get_maxWidth():this._activeItemView!=null&&(d=this._activeItemView.get_width()),d>this.chromeMeasuredMaxWidth&&(d=this.chromeMeasuredMaxWidth),d+=this.rightContentOffset+this.leftContentOffset):d=n);f=this.get_explicitMaxHeight();g&&(h?(f=1/0,this._transitionActive?(u!=null&&f>u.get_maxHeight()?f=u.get_maxHeight():this._previousViewInTransition!=null&&f>this._previousViewInTransition.get_height()&&
(f=this._previousViewInTransition.get_height()),v!=null&&f>v.get_maxHeight()?f=v.get_maxHeight():this._nextViewInTransition!=null&&f>this._nextViewInTransition.get_height()&&(f=this._nextViewInTransition.get_height())):q!=null?f=q.get_maxHeight():this._activeItemView!=null&&(f=this._activeItemView.get_height()),f>this.chromeMeasuredMaxHeight&&(f=this.chromeMeasuredMaxHeight),f+=this.topContentOffset+this.bottomContentOffset):f=l);return this.saveMeasurements(z,a,b,c,d,f)},layoutContent:function(){var a=
this.actualWidth-this.leftContentOffset-this.rightContentOffset,b=this.actualHeight-this.topContentOffset-this.bottomContentOffset;this._viewsContainer!=null&&this._viewsContainer!=this&&(this._viewsContainer.set_x(this.leftContentOffset),this._viewsContainer.set_y(this.topContentOffset),this._viewsContainer.set_width(a),this._viewsContainer.set_height(b));this._activeItemView!=null&&(this._viewsContainer!=null&&this._viewsContainer!=this?(this._activeItemView.set_x(0),this._activeItemView.set_y(0)):
(this._activeItemView.set_x(this.leftContentOffset),this._activeItemView.set_y(this.topContentOffset)),this._activeItemView.get_width()!=a&&this._activeItemView.set_width(a),this._activeItemView.get_height()!=b&&this._activeItemView.set_height(b),w.__implements(this._activeItemView,da)&&this._activeItemView.validateNow());this._nextViewInTransition!=null&&(this._viewsContainer!=null&&this._viewsContainer!=this?(this._nextViewInTransition.set_x(0),this._nextViewInTransition.set_y(0)):(this._nextViewInTransition.set_x(this.leftContentOffset),
this._nextViewInTransition.set_y(this.topContentOffset)),this._nextViewInTransition.get_width()!=a&&this._nextViewInTransition.set_width(a),this._nextViewInTransition.get_height()!=b&&this._nextViewInTransition.set_height(b),w.__implements(this._nextViewInTransition,da)&&this._nextViewInTransition.validateNow());this._viewsContainer!=this&&w.__implements(this._viewsContainer,da)&&this._viewsContainer.validateNow()},getView:function(a){throw new ob("Missing override of BaseNavigator.getView()");},
disposeView:function(a,b){throw new ob("Missing override of BaseNavigator.disposeView()");},transitionComplete:function(){},transitionCancel:function(){},addItemInternal:function(a,b){if(Object.prototype.hasOwnProperty.call(this._addedItems.h,a))throw new Cb("Item with id '"+a+"' already defined. Cannot add two items with the same id.");this._addedItems.h[a]=b;this._addedItemIDs.push(a)},removeItemInternal:function(a){if(!Object.prototype.hasOwnProperty.call(this._addedItems.h,a))throw new Cb("Item with id '"+
a+"' cannot be removed because this id has not been added.");if(this._transitionActive&&(a==this._previousViewInTransitionID||a==this._activeItemID))throw new ob("Cannot remove an item while it is transitioning in or out.");a==this._activeItemID&&(this.clearActiveItemInternal(null),Y.dispatch(this,"clear"));var b=this._addedItems.h[a],c=this._addedItems;Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a];V.remove(this._addedItemIDs,a);return b},clearFocusFromPreviousView:function(){if(this._previousViewInTransition!=
null){if(this._focusManager!=null){if(this._focusManager.get_focus()==null)return;w.__implements(this._previousViewInTransition,qd)&&this._focusManager.get_focus()==this._previousViewInTransition?this._focusManager.set_focus(null):this._previousViewInTransition instanceof zb&&this._previousViewInTransition.contains(w.__cast(this._focusManager.get_focus(),ma))&&this._focusManager.set_focus(null)}this.stage.get_focus()!=null&&(this.stage.get_focus()==this._previousViewInTransition||this._previousViewInTransition instanceof
zb&&this._previousViewInTransition.contains(this.stage.get_focus()))&&this.stage.set_focus(this.stage)}},showItemInternal:function(a,b){if(!this.hasItem(a))throw new Cb("Item with id '"+a+"' cannot be displayed because this id has not been added.");if(this._transitionActive)return this._pendingItemID=a,this._pendingItemTransition=b,this._clearAfterTransition=!1,null;this._previousViewInTransition=this._activeItemView;this._previousViewInTransitionID=this._activeItemID;var c=this._previousViewInTransitionMeasurements;
this._previousViewInTransitionMeasurements=this._activeViewMeasurements;this._activeViewMeasurements=c;this.clearFocusFromPreviousView();this._transitionActive=!0;this._nextViewInTransition=this.getView(a);this._nextViewInTransitionMeasurements.save(this._nextViewInTransition);if(this._nextViewInTransition==null)throw new ob("Failed to display navigator item with id '"+a+"'. Call to getView() incorrectly returned null.");this._nextViewInTransitionID=a;this._autoSizeMode!=Ve.CONTENT&&this.stage!=null||
this._nextViewInTransition.addEventListener("resize",m(this,this.activeItemView_resizeHandler));a=this._previousViewInTransition==this._nextViewInTransition;this._viewsContainer.addChild(this._nextViewInTransition);w.__implements(this._nextViewInTransition,Fa)&&this._nextViewInTransition.initializeNow();this.setInvalid(x.SELECTION);this._validationQueue!=null&&this._validationQueue.get_validating()?this._validationQueue.validateNow():this._validating||this.validateNow();a?(this._activeItemView=this._nextViewInTransition,
this._activeItemID=this._nextViewInTransitionID,c=this._activeViewMeasurements,this._activeViewMeasurements=this._nextViewInTransitionMeasurements,this._nextViewInTransitionMeasurements=c,this._nextViewInTransitionID=this._nextViewInTransition=this._previousViewInTransitionID=this._previousViewInTransition=null,this._transitionActive=!1,this._activeTransition=null,Y.dispatch(this,"change")):this.startTransition(b);return this._activeItemView},clearActiveItemInternal:function(a){if(this._activeItemView!=
null)if(this._transitionActive)this._pendingItemID=null,this._pendingItemTransition=a,this._clearAfterTransition=!0;else{this.clearFocusFromPreviousView();this._transitionActive=!0;this._previousViewInTransition=this._activeItemView;this._previousViewInTransitionID=this._activeItemID;var b=this._previousViewInTransitionMeasurements;this._previousViewInTransitionMeasurements=this._activeViewMeasurements;this._activeViewMeasurements=b;this._nextViewInTransitionID=this._nextViewInTransition=null;this.setInvalid(x.SELECTION);
this.startTransition(a)}},startTransition:function(a){Xh.dispatch(this,"transitionStart",this._previousViewInTransitionID,this._previousViewInTransition,this._nextViewInTransitionID,this._nextViewInTransition);a!=null&&a!=Rd.defaultTransition?(this._nextViewInTransition!=null&&this._nextViewInTransition.set_visible(!1),this._waitingForTransitionFrameCount=0,this._waitingTransition=a,this.addEventListener("enterFrame",m(this,this.baseNavigator_transitionWait_enterFrameHandler))):(this._nextViewInTransition!=
null&&this._nextViewInTransition.set_visible(!0),this._activeTransition=Rd.defaultTransition(this._previousViewInTransition,this._nextViewInTransition),this._activeTransition.addEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.addEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.play())},startWaitingTransition:function(){this.removeEventListener("enterFrame",m(this,this.baseNavigator_transitionWait_enterFrameHandler));this._nextViewInTransition!=
null&&this._nextViewInTransition.set_visible(!0);var a=this._waitingTransition;this._waitingTransition=null;this._activeTransition=a(this._previousViewInTransition,this._nextViewInTransition);this._activeTransition.addEventListener("complete",m(this,this.transition_completeHandler));this._activeTransition.addEventListener("cancel",m(this,this.transition_cancelHandler));this._activeTransition.play()},baseNavigator_addedToStageHandler:function(a){this._autoSizeMode==Ve.STAGE&&(this.setInvalid(x.SIZE),
this.stage.addEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler)))},baseNavigator_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler))},baseNavigator_transitionWait_enterFrameHandler:function(a){this._waitingForTransitionFrameCount<
2?this._waitingForTransitionFrameCount++:this.startWaitingTransition()},baseNavigator_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},activeItemView_resizeHandler:function(a){this._validating||this._autoSizeMode!=Ve.CONTENT||this.setInvalid(x.SIZE)},transition_completeHandler:function(a){this._activeTransition=null;this._transitionActive=this._clearAfterTransition||this._pendingItemID!=null;this.transitionComplete();this._previousViewInTransition!=null&&(this._previousViewInTransition.removeEventListener("resize",
m(this,this.activeItemView_resizeHandler)),this._viewsContainer.removeChild(this._previousViewInTransition),this._previousViewInTransitionMeasurements.restore(this._previousViewInTransition),this.disposeView(this._previousViewInTransitionID,this._previousViewInTransition));a=this._nextViewInTransition;var b=this._nextViewInTransitionID,c=this._previousViewInTransition,d=this._previousViewInTransitionID;this._nextViewInTransitionID=this._nextViewInTransition=this._previousViewInTransitionID=this._previousViewInTransition=
null;this._activeItemView=a;this._activeItemID=b;var f=this._activeViewMeasurements;this._activeViewMeasurements=this._nextViewInTransitionMeasurements;this._nextViewInTransitionMeasurements=f;Xh.dispatch(this,"transitionComplete",d,c,b,a);Y.dispatch(this,"change");this.setInvalid(x.LAYOUT);this.stage==null||this.stage.get_focus()!=null&&this.stage.get_focus().stage!=null||a instanceof Ja&&this.stage.set_focus(w.__cast(a,Ja));this._transitionActive=!1;a=this._pendingItemTransition;this._pendingItemTransition=
null;this._clearAfterTransition?(this._clearAfterTransition=!1,this.clearActiveItemInternal(a)):this._pendingItemID!=null&&(b=this._pendingItemID,this._pendingItemID=null,this.showItemInternal(b,a))},transition_cancelHandler:function(a){this._activeTransition=null;this._transitionActive=this._clearAfterTransition||this._pendingItemID!=null;this._nextViewInTransition!=null&&(this._viewsContainer.removeChild(this._nextViewInTransition),this._nextViewInTransitionMeasurements.restore(this._nextViewInTransition),
this.disposeView(this._nextViewInTransitionID,this._nextViewInTransition));a=this._nextViewInTransition;var b=this._nextViewInTransitionID,c=this._previousViewInTransition,d=this._previousViewInTransitionID;this._nextViewInTransitionID=this._nextViewInTransition=this._previousViewInTransitionID=this._previousViewInTransition=null;this._activeItemView=c;this._activeItemID=d;var f=this._activeViewMeasurements;this._activeViewMeasurements=this._previousViewInTransitionMeasurements;this._previousViewInTransitionMeasurements=
f;this.transitionCancel();Xh.dispatch(this,"transitionCancel",d,c,b,a);Y.dispatch(this,"change");this.setInvalid(x.LAYOUT);this.stage==null||this.stage.get_focus()!=null&&this.stage.get_focus().stage!=null||this._activeItemView instanceof Ja&&this.stage.set_focus(w.__cast(this._activeItemView,Ja));this._transitionActive=!1;a=this._pendingItemTransition;this._pendingItemTransition=null;this._clearAfterTransition?(this._clearAfterTransition=!1,this.clearActiveItemInternal(a)):this._pendingItemID!=null&&
(b=this._pendingItemID,this._pendingItemID=null,this.showItemInternal(b,a))},__class__:Rd,__properties__:I(fa.prototype.__properties__,{set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled",get_transitionActive:"get_transitionActive",get_activeItemView:"get_activeItemView",get_activeItemID:"get_activeItemID"})});var Ag=function(){this.internalID=H.string(Ag.internalIDCounter);Ag.internalIDCounter++};
t["feathers.controls.navigators.PageItem"]=Ag;Ag.__name__="feathers.controls.navigators.PageItem";Ag.withClass=function(a){var b=new Ag;b.viewFactory=Kl.fromClass(a);return b};Ag.withFunction=function(a){var b=new Ag;b.viewFactory=Kl.fromFunction(a);return b};Ag.withDisplayObject=function(a){var b=new Ag;b.viewFactory=Kl.fromDisplayObject(a);return b};Ag.withFactory=function(a){var b=new Ag;b.viewFactory=a;return b};Ag.prototype={internalID:null,viewFactory:null,getView:function(a){return this.viewFactory.create()},
returnView:function(a){this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},__class__:Ag};var Ch=function(a){this.__customPageIndicatorVariant=null;this.__gap=0;this.__previousTransition=this.__nextTransition=null;this.__pageIndicatorPosition=ra.BOTTOM;this._ignoreSelectionChange=!1;this._previousCustomPageIndicatorVariant=null;this._simulateTouch=!1;this._swipeEnabled=!0;this._selectedItem=null;this._activeItemIndex=this._selectedIndex=-1;this.initializePageNavigatorTheme();this.set_dataProvider(a);
Rd.call(this);this._viewsContainer=new pb;this.addChild(this._viewsContainer)};t["feathers.controls.navigators.PageNavigator"]=Ch;Ch.__name__="feathers.controls.navigators.PageNavigator";Ch.__interfaces__=[qi,lj];Ch.__super__=Rd;Ch.prototype=I(Rd.prototype,{pageIndicator:null,_previousEdgePuller:null,_nextEdgePuller:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;if(this._dataProvider!=null)if(this._dataProvider.removeEventListener("addItem",
m(this,this.pageNavigator_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.pageNavigator_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.pageNavigator_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.pageNavigator_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.pageNavigator_dataProvider_resetHandler)),a==null)this.removeAllItems();
else for(var b=this._dataProvider.iterator();b.hasNext();){var c=b.next();this.removeItemInternal(c.internalID)}this._dataProvider=a;if(this._dataProvider!=null){for(b=this._dataProvider.iterator();b.hasNext();)c=b.next(),this.addItemInternal(c.internalID,c);this._dataProvider.addEventListener("addItem",m(this,this.pageNavigator_dataProvider_addItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeItem",m(this,this.pageNavigator_dataProvider_removeItemHandler),!1,0,!0);this._dataProvider.addEventListener("replaceItem",
m(this,this.pageNavigator_dataProvider_replaceItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeAll",m(this,this.pageNavigator_dataProvider_removeAllHandler),!1,0,!0);this._dataProvider.addEventListener("reset",m(this,this.pageNavigator_dataProvider_resetHandler),!1,0,!0)}this.setInvalid(x.DATA);this._dataProvider==null||this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this.set_selectedIndex(0);Y.dispatch(this,"dataChange");return this._dataProvider},_activeItemIndex:null,
_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex);this.setInvalid(x.SELECTION);return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},
set_selectedItem:function(a){if(this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;this.set_selectedIndex(this._dataProvider.indexOf(a));return this._selectedItem},_swipeEnabled:null,get_swipeEnabled:function(){return this._swipeEnabled},set_swipeEnabled:function(a){if(this._swipeEnabled==a)return this._swipeEnabled;this._swipeEnabled=a;this.setInvalid(x.DATA);return this._swipeEnabled},_simulateTouch:null,get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==
a)return this._simulateTouch;this._simulateTouch=a;this.setInvalid(x.DATA);return this._simulateTouch},_previousCustomPageIndicatorVariant:null,_oldPageIndicatorFactory:null,_pageIndicatorFactory:null,get_pageIndicatorFactory:function(){return this._pageIndicatorFactory},set_pageIndicatorFactory:function(a){if(this._pageIndicatorFactory==a)return this._pageIndicatorFactory;this._pageIndicatorFactory=a;this.setInvalid(Ch.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);return this._pageIndicatorFactory},
_ignoreSelectionChange:null,_dragTransitionContext:null,dispose:function(){this._pendingItemTransition=this._pendingItemID=null;this._transitionActive=!1;this._activeTransition!=null&&(this._activeTransition.removeEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.removeEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.stop());this.destroyPageIndicator();this._activeItemView=this._activeItemID=null;this.set_dataProvider(null);
Rd.prototype.dispose.call(this)},initialize:function(){Rd.prototype.initialize.call(this);this._previousEdgePuller==null&&(this._previousEdgePuller=new mg(this,ra.LEFT),this._previousEdgePuller.addEventListener("opening",m(this,this.pageNavigator_previousEdgePuller_openingHandler)),this._previousEdgePuller.addEventListener("cancel",m(this,this.pageNavigator_previousEdgePuller_cancelHandler)),this._previousEdgePuller.addEventListener("open",m(this,this.pageNavigator_previousEdgePuller_openHandler)));
this._nextEdgePuller==null&&(this._nextEdgePuller=new mg(this,ra.RIGHT),this._nextEdgePuller.addEventListener("opening",m(this,this.pageNavigator_nextEdgePuller_openingHandler)),this._nextEdgePuller.addEventListener("cancel",m(this,this.pageNavigator_nextEdgePuller_cancelHandler)),this._nextEdgePuller.addEventListener("open",m(this,this.pageNavigator_nextEdgePuller_openHandler)))},initializePageNavigatorTheme:function(){Nw.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION);
this._previousCustomPageIndicatorVariant!=this.get_customPageIndicatorVariant()&&this.setInvalidationFlag(Ch.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);var c=this.isInvalid(Ch.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);c&&this.createPageIndicator();a&&(this._previousEdgePuller.simulateTouch=this._simulateTouch,this._nextEdgePuller.simulateTouch=this._simulateTouch);(a||b||c)&&this.refreshSelection();Rd.prototype.update.call(this);this._previousCustomPageIndicatorVariant=this.get_customPageIndicatorVariant()},
measure:function(){this.get_explicitWidth()!=null?this.pageIndicator.set_width(this.get_explicitWidth()):this._autoSizeMode==Ve.STAGE&&this.stage!=null?this.pageIndicator.set_width(this.stage.stageWidth):this.pageIndicator.resetWidth();this.pageIndicator.validateNow();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this.pageIndicator.get_width());switch(this.get_pageIndicatorPosition()._hx_index){case 0:this.topContentOffset+=this.pageIndicator.get_height()+this.get_gap();break;case 2:this.bottomContentOffset+=
this.pageIndicator.get_height()+this.get_gap();break;default:throw new Cb("Invalid pageIndicatorPosition "+H.string(this.get_pageIndicatorPosition()));}return Rd.prototype.measure.call(this)},createPageIndicator:function(){this.destroyPageIndicator();var a=this._pageIndicatorFactory!=null?this._pageIndicatorFactory:Ch.defaultPageIndicatorFactory;this._oldPageIndicatorFactory=a;this.pageIndicator=a.create();this.pageIndicator.get_variant()==null&&this.pageIndicator.set_variant(this.get_customPageIndicatorVariant()!=
null?this.get_customPageIndicatorVariant():Ch.CHILD_VARIANT_PAGE_INDICATOR);this.pageIndicator.addEventListener("change",m(this,this.pageNavigator_pageIndicator_changeHandler));this.addChild(this.pageIndicator)},destroyPageIndicator:function(){this.pageIndicator!=null&&(this.pageIndicator.removeEventListener("change",m(this,this.pageNavigator_pageIndicator_changeHandler)),this.removeChild(this.pageIndicator),this._oldPageIndicatorFactory.destroy!=null&&this._oldPageIndicatorFactory.destroy(this.pageIndicator),
this.pageIndicator=this._oldPageIndicatorFactory=null)},layoutContent:function(){this.pageIndicator.set_x(0);this.pageIndicator.set_width(this.actualWidth);this.pageIndicator.validateNow();switch(this.get_pageIndicatorPosition()._hx_index){case 0:this.pageIndicator.set_y(0);break;case 2:this.pageIndicator.set_y(this.actualHeight-this.pageIndicator.get_height());break;default:throw new Cb("Invalid pageIndicatorPosition "+H.string(this.get_pageIndicatorPosition()));}Rd.prototype.layoutContent.call(this)},
getView:function(a){return w.__cast(this._addedItems.h[a],Ag).getView(this)},disposeView:function(a,b){w.__cast(this._addedItems.h[a],Ag).returnView(b)},refreshSelection:function(){var a=this,b=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.pageIndicator.set_maxSelectedIndex(this.get_maxSelectedIndex());this.pageIndicator.set_selectedIndex(this._selectedIndex);this._ignoreSelectionChange=b;if(this._selectedItem==null)this._activeItemIndex=-1,this.get_activeItemID()!=null&&this.clearActiveItemInternal();
else if(this._selectedItem!=null&&(b=this._activeItemIndex,this._activeItemIndex=this._selectedIndex,!this._previousEdgePuller.get_active()&&!this._nextEdgePuller.get_active()&&(this._transitionActive?this._nextViewInTransitionID:this._activeItemID)!=this._selectedItem.internalID)){var c=null;b!=-1&&b!=this._selectedIndex&&(c=b<this._selectedIndex?this.get_nextTransition():this.get_previousTransition());this.runWithInvalidationFlagsOnly(function(){a.showItemInternal(a._selectedItem.internalID,c)})}b=
this._enabled&&this._swipeEnabled&&this._selectedIndex>0&&!this._nextEdgePuller.get_active();this._previousEdgePuller.enabled=b;b=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex()&&!this._previousEdgePuller.get_active();this._nextEdgePuller.enabled=b},startPreviousDragTransition:function(a,b){var c=this;a=this.get_previousTransition()(a,b);this._previousEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new Ol(a,this._previousEdgePuller,
"change",function(d){return c._dragTransitionContext.set_position(c._previousEdgePuller.get_pullDistance()/c.actualWidth)})},startNextDragTransition:function(a,b){var c=this;a=this.get_nextTransition()(a,b);this._nextEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new Ol(a,this._nextEdgePuller,"change",function(d){return c._dragTransitionContext.set_position(c._nextEdgePuller.get_pullDistance()/c.actualWidth)})},pageNavigator_pageIndicator_changeHandler:function(a){this._ignoreSelectionChange||
this.set_selectedIndex(this.pageIndicator.get_selectedIndex())},pageNavigator_dataProvider_addItemHandler:function(a){var b=w.__cast(a.addedItem,Ag);this.addItemInternal(b.internalID,b);this.setInvalid(x.DATA);this._selectedIndex>=a.index?this.set_selectedIndex(this.get_selectedIndex()+1):this._selectedIndex==-1&&this.set_selectedIndex(0)},pageNavigator_dataProvider_removeItemHandler:function(a){var b=w.__cast(a.removedItem,Ag);this.removeItemInternal(b.internalID);this.setInvalid(x.DATA);this._dataProvider.get_length()==
0?this.set_selectedIndex(-1):this._selectedIndex>=a.index&&this.set_selectedIndex(this.get_selectedIndex()-1)},pageNavigator_dataProvider_replaceItemHandler:function(a){var b=w.__cast(a.addedItem,Ag),c=w.__cast(a.removedItem,Ag);this.removeItemInternal(c.internalID);this.addItemInternal(b.internalID,b);this.setInvalid(x.DATA);this._selectedIndex==a.index&&this.set_selectedItem(this._dataProvider.get(this._selectedIndex))},pageNavigator_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1);
a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},pageNavigator_dataProvider_resetHandler:function(a){this.set_selectedIndex(-1);a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},pageNavigator_previousEdgePuller_openingHandler:function(a){var b=this._selectedIndex-1;if(b<0)a.preventDefault();else{var c=this._previousEdgePuller.get_touchPointID();
if(c!=null){var d=Pd.forStage(this.stage);if(this._previousEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_previousTransition()!=null?(this._nextEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startPreviousDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},pageNavigator_previousEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"cancel"))},pageNavigator_previousEdgePuller_openHandler:function(a){a=this._previousEdgePuller.get_snapDuration();this._previousEdgePuller.set_snapDuration(0);this._previousEdgePuller.set_opened(!1);this._previousEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()-
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"complete"))},pageNavigator_nextEdgePuller_openingHandler:function(a){var b=this._selectedIndex+1;if(b>this.get_maxSelectedIndex())a.preventDefault();else{var c=this._nextEdgePuller.get_touchPointID();
if(c!=null){var d=Pd.forStage(this.stage);if(this._nextEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_nextTransition()!=null?(this._previousEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startNextDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},pageNavigator_nextEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"cancel"))},pageNavigator_nextEdgePuller_openHandler:function(a){a=this._nextEdgePuller.get_snapDuration();this._nextEdgePuller.set_snapDuration(0);this._nextEdgePuller.set_opened(!1);this._nextEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()+
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"complete"))},get_styleContext:function(){return Ch},__pageIndicatorPosition:null,get_pageIndicatorPosition:function(){return this.__pageIndicatorPosition},set_pageIndicatorPosition:function(a){if(!this.setStyle("pageIndicatorPosition")||
this.__pageIndicatorPosition==a)return this.__pageIndicatorPosition;this._previousClearStyle=m(this,this.clearStyle_pageIndicatorPosition);this.__pageIndicatorPosition=a;this.setInvalid(x.STYLES);return this.__pageIndicatorPosition},clearStyle_pageIndicatorPosition:function(){this.set_pageIndicatorPosition(ra.BOTTOM);return this.get_pageIndicatorPosition()},__previousTransition:null,get_previousTransition:function(){return this.__previousTransition},set_previousTransition:function(a){if(!this.setStyle("previousTransition")||
this.__previousTransition==a)return this.__previousTransition;this._previousClearStyle=m(this,this.clearStyle_previousTransition);this.__previousTransition=a;this.setInvalid(x.STYLES);return this.__previousTransition},clearStyle_previousTransition:function(){this.set_previousTransition(null);return this.get_previousTransition()},__nextTransition:null,get_nextTransition:function(){return this.__nextTransition},set_nextTransition:function(a){if(!this.setStyle("nextTransition")||this.__nextTransition==
a)return this.__nextTransition;this._previousClearStyle=m(this,this.clearStyle_nextTransition);this.__nextTransition=a;this.setInvalid(x.STYLES);return this.__nextTransition},clearStyle_nextTransition:function(){this.set_nextTransition(null);return this.get_nextTransition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},
clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__customPageIndicatorVariant:null,get_customPageIndicatorVariant:function(){return this.__customPageIndicatorVariant},set_customPageIndicatorVariant:function(a){if(!this.setStyle("customPageIndicatorVariant")||this.__customPageIndicatorVariant==a)return this.__customPageIndicatorVariant;this._previousClearStyle=m(this,this.clearStyle_customPageIndicatorVariant);this.__customPageIndicatorVariant=a;this.setInvalid(x.STYLES);return this.__customPageIndicatorVariant},
clearStyle_customPageIndicatorVariant:function(){this.set_customPageIndicatorVariant(null);return this.get_customPageIndicatorVariant()},__class__:Ch,__properties__:I(Rd.prototype.__properties__,{set_pageIndicatorFactory:"set_pageIndicatorFactory",get_pageIndicatorFactory:"get_pageIndicatorFactory",set_customPageIndicatorVariant:"set_customPageIndicatorVariant",get_customPageIndicatorVariant:"get_customPageIndicatorVariant",set_gap:"set_gap",get_gap:"get_gap",set_nextTransition:"set_nextTransition",
get_nextTransition:"get_nextTransition",set_previousTransition:"set_previousTransition",get_previousTransition:"get_previousTransition",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",set_swipeEnabled:"set_swipeEnabled",get_swipeEnabled:"get_swipeEnabled",set_pageIndicatorPosition:"set_pageIndicatorPosition",get_pageIndicatorPosition:"get_pageIndicatorPosition",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",
set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var ui=function(){this._viewToEvents=new Ta};t["feathers.controls.navigators.Route"]=ui;ui.__name__="feathers.controls.navigators.Route";ui.withClass=function(a,b,c,d,f){var g=new ui;g.path=a;g.viewFactory=Lc.withClass(b);g.actions=c;g.updateState=d;g.saveData=f;return g};ui.withFunction=function(a,b,c,d,f){var g=new ui;g.path=a;g.viewFactory=Lc.withFunction(b);
g.actions=c;g.updateState=d;g.saveData=f;return g};ui.withDisplayObject=function(a,b,c,d,f){var g=new ui;g.path=a;g.viewFactory=Lc.withDisplayObject(b);g.actions=c;g.updateState=d;g.saveData=f;return g};ui.withFactory=function(a,b,c,d,f){var g=new ui;g.path=a;g.viewFactory=b;g.actions=c;g.updateState=d;g.saveData=f;return g};ui.withRedirect=function(a,b){var c=new ui;c.path=a;c.redirectTo=b;return c};ui.prototype={path:null,updateState:function(a,b){},saveData:function(a){return null},viewFactory:null,
redirectTo:null,actions:null,_viewToEvents:null,setAction:function(a,b){this.actions==null&&(this.actions=new G);b==null?(b=this.actions,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):this.actions.h[a]=b},getView:function(a){var b=this.viewFactory.create();a=this.addActionListeners(b,a);this._viewToEvents.set(b,a);return b},returnView:function(a){this.removeEventsFromView(a,this._viewToEvents.h[a.__id__]);this._viewToEvents.remove(a);this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},
addActionListeners:function(a,b){var c=[];if(this.actions==null)return c;for(var d=Object.keys(this.actions.h),f=d.length,g=0;g<f;){var h=d[g++],n=this.createActionEventListener(this.actions.h[h],b);a.addEventListener(h,n);c.push(new tx(h,n))}return c},performAction:function(a,b,c){switch(a._hx_index){case 0:b=a.url;var d=a.newHistoryState;a=a.transition;c.push(b,d,a);break;case 1:b=a.url;d=a.newHistoryState;a=a.transition;c.replace(b,d,a);break;case 2:a=a.transition;c.goBack(a);break;case 3:a=a.transition;
c.goForward(a);break;case 4:c.go(a.n);break;case 5:c=a.callback;c(b);break;case 6:return c=a.callback,c(b)}return null},createActionEventListener:function(a,b){var c=this;return function(d){if(!b.get_transitionActive())for(var f=a;f!=null;)f=c.performAction(f,d,b)}},removeEventsFromView:function(a,b){for(var c=0;c<b.length;){var d=b[c];++c;a.removeEventListener(d.eventType,d.listener)}},__class__:ui};var tx=function(a,b){this.eventType=a;this.listener=b};t["feathers.controls.navigators._Route.ViewListener"]=
tx;tx.__name__="feathers.controls.navigators._Route.ViewListener";tx.prototype={eventType:null,listener:null,__class__:tx};var Qn=R["feathers.controls.navigators.RouterAction"]={__ename__:"feathers.controls.navigators.RouterAction",__constructs__:null,Push:(B=function(a,b,c){return{_hx_index:0,url:a,newHistoryState:b,transition:c,__enum__:"feathers.controls.navigators.RouterAction",toString:E}},B._hx_name="Push",B.__params__=["url","newHistoryState","transition"],B),Replace:(B=function(a,b,c){return{_hx_index:1,
url:a,newHistoryState:b,transition:c,__enum__:"feathers.controls.navigators.RouterAction",toString:E}},B._hx_name="Replace",B.__params__=["url","newHistoryState","transition"],B),GoBack:(B=function(a){return{_hx_index:2,transition:a,__enum__:"feathers.controls.navigators.RouterAction",toString:E}},B._hx_name="GoBack",B.__params__=["transition"],B),GoForward:(B=function(a){return{_hx_index:3,transition:a,__enum__:"feathers.controls.navigators.RouterAction",toString:E}},B._hx_name="GoForward",B.__params__=
["transition"],B),Go:(B=function(a,b){return{_hx_index:4,n:a,transition:b,__enum__:"feathers.controls.navigators.RouterAction",toString:E}},B._hx_name="Go",B.__params__=["n","transition"],B),Listener:(B=function(a){return{_hx_index:5,callback:a,__enum__:"feathers.controls.navigators.RouterAction",toString:E}},B._hx_name="Listener",B.__params__=["callback"],B),NewAction:(B=function(a){return{_hx_index:6,callback:a,__enum__:"feathers.controls.navigators.RouterAction",toString:E}},B._hx_name="NewAction",
B.__params__=["callback"],B)};Qn.__constructs__=[Qn.Push,Qn.Replace,Qn.GoBack,Qn.GoForward,Qn.Go,Qn.Listener,Qn.NewAction];var Rn=function(){this.__forwardTransition=this.__backTransition=this.__replaceTransition=null;this._cachedPaths=new G;this._preferHashRouting=!1;this.basePath=this._savedGoTransition=null;this.historyDepth=0;this.initializeRouterNavigatorTheme();Rd.call(this);this.addEventListener("addedToStage",m(this,this.routerNavigator_addedToStageHandler));this.addEventListener("removedFromStage",
m(this,this.routerNavigator_removedFromStageHandler))};t["feathers.controls.navigators.RouterNavigator"]=Rn;Rn.__name__="feathers.controls.navigators.RouterNavigator";Rn.__super__=Rd;Rn.prototype=I(Rd.prototype,{htmlWindow:null,historyDepth:null,basePath:null,_savedGoTransition:null,_preferHashRouting:null,get_preferHashRouting:function(){return this._preferHashRouting},set_preferHashRouting:function(a){if(this._preferHashRouting==a)return this._preferHashRouting;if(this._activeItemView!=null)throw new Cb("Must set preferHashRouting before a view is displayed");
return this._preferHashRouting=a},initializeRouterNavigatorTheme:function(){Qw.initialize()},addRoute:function(a){a.path==null&&(a.path="");this.addItemInternal(a.path,a);if(this.stage!=null&&this.get_activeItemView()==null){var b=this.matchRoute();b==a&&(a.redirectTo!=null?this.redirect(a):this.showItemInternal(b.path,null))}},push:function(a,b,c){if(this._activeItemView!=null){var d=null,f=this._addedItems.h[this._activeItemID];f.saveData!=null&&(d=f.saveData(this._activeItemView));f=this.htmlWindow.history.state;
f==null?f={depth:this.historyDepth,state:null,viewData:d}:f.viewData=d;var g=this.getPathname();d=g+this.get_location().search;this.basePath==null||N.startsWith(g,this.basePath+"/")||(d=!N.startsWith(g,"/"),g=this.basePath+(d?"/":"")+g,d=g+this.get_location().search);if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:")d=this.htmlWindow.location.pathname+this.get_location().search+"#"+g;this.htmlWindow.history.replaceState(f,null,d)}d=a.split("?");a=d[0];f="";d.length>1&&(f="?"+
d[1]);d=a+f;this.basePath==null||N.startsWith(a,this.basePath+"/")||(d=!N.startsWith(a,"/"),a=this.basePath+(d?"/":"")+a,d=a+f);if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:")d=this.htmlWindow.location.pathname+f+"#"+a;this.historyDepth++;this.htmlWindow.history.pushState({depth:this.historyDepth,state:b,viewData:null},null,d);c==null&&(c=this.get_forwardTransition());return this.matchRouteAndShow(c)},replace:function(a,b,c){var d=a.split("?");a=d[0];var f="";d.length>1&&(f=
"?"+d[1]);d=a+f;this.basePath==null||N.startsWith(a,this.basePath+"/")||(d=!N.startsWith(a,"/"),a=this.basePath+(d?"/":"")+a,d=a+f);if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:")d=this.htmlWindow.location.pathname+f+"#"+a;this.htmlWindow.history.replaceState({depth:this.historyDepth,state:b,viewData:null},null,d);c==null&&(c=this.get_replaceTransition());return this.matchRouteAndShow(c)},go:function(a,b){if(a==0)return this.get_activeItemView();b==null&&(b=a<0?this.get_backTransition():
this.get_forwardTransition());this._savedGoTransition=b;this.htmlWindow.history.go(a);return null},goBack:function(a){return this.go(-1,a)},goForward:function(a){return this.go(1,a)},routerNavigator_addedToStageHandler:function(a){this.htmlWindow=w.__cast(wa,Window);this.htmlWindow.addEventListener("popstate",m(this,this.htmlWindow_popstateHandler));this.matchRouteAndShow(null)},get_location:function(){return this.htmlWindow.location},get_pathname:function(){return this.getPathname()},_cachedPaths:null,
getURLVariables:function(){var a=this.get_location().search;a.length>0&&(a=V.substr(a,1,null));try{return vn._new(a)}catch(b){return Pb.lastError=b,vn._new()}},getPathname:function(){if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:"){var a=this.htmlWindow.location.hash;a=a.length==0?"/":V.substr(a,1,null)}else a=this.htmlWindow.location.pathname;this.basePath!=null&&N.startsWith(a,this.basePath+"/")&&(a=V.substr(a,this.basePath.length,null));return a},redirect:function(a){var b=
a.redirectTo,c=a.path;a=Object.create(null);if(c!=null&&c.length>0)for(var d=this.getMatcher(c),f=0,g=d.keys.length;f<g;){var h=f++;c=d.keys[h];a[c.name]=d.ereg.matched(h+1)}d=Object.keys(a);f=d.length;for(g=0;g<f;)c=d[g++],b=N.replace(b,":name",a[c]);this.replace(b)},getMatcher:function(a){var b=this._cachedPaths.h[a];b==null&&(b=Dh.toEReg(a,{end:!0}),this._cachedPaths.h[a]=b);return b},matchRoute:function(){for(var a=this.getPathname(),b=0,c=this._addedItemIDs;b<c.length;){var d=c[b];++b;if(d==
null||d.length==0||this.getMatcher(d).ereg.match(a))return this._addedItems.h[d]}return null},matchRouteAndShow:function(a){var b=this.matchRoute();if(b!=null)return b.redirectTo!=null?(this.redirect(b),null):this.showItemInternal(b.path,a);this.clearActiveItemInternal(null);return null},getView:function(a){a=w.__cast(this._addedItems.h[a],ui);var b=a.path,c=new G;if(b!=null&&b.length>0){b=this.getMatcher(b);for(var d=0,f=b.keys.length;d<f;){var g=d++,h=b.keys[g].name;g=b.ereg.matched(g+1);c.h[h]=
g}}c=new ux(a.path,this.getPathname(),c);b=a.getView(this);d=this.htmlWindow.history.state;c.historyState=d!=null?d.state:null;c.data=d!=null?d.viewData:null;c.urlVariables=this.getURLVariables();a.updateState!=null&&a.updateState(b,c);b.addEventListener("link",m(this,this.routerNavigator_activeView_linkHandler));return b},disposeView:function(a,b){b.removeEventListener("link",m(this,this.routerNavigator_activeView_linkHandler));w.__cast(this._addedItems.h[a],ui).returnView(b)},routerNavigator_removedFromStageHandler:function(a){this.htmlWindow!=
null&&(this.htmlWindow.removeEventListener("popstate",m(this,this.htmlWindow_popstateHandler)),this.htmlWindow=null)},routerNavigator_activeView_linkHandler:function(a){!a.isDefaultPrevented()&&N.startsWith(a.text,"router:")&&(a.preventDefault(),a=V.substr(a.text,7,null),this.push(a))},htmlWindow_popstateHandler:function(a){a.preventDefault();a=this.historyDepth;var b=this.htmlWindow.history.state;b!=null&&b.depth!=null&&(a=b.depth);b=this._savedGoTransition;this._savedGoTransition=null;this._activeItemView!=
null&&b==null&&(this.historyDepth>a?b=this.get_backTransition():this.historyDepth<a&&(b=this.get_forwardTransition()));this.historyDepth=a;this.matchRouteAndShow(b)},get_styleContext:function(){return Rn},__forwardTransition:null,get_forwardTransition:function(){return this.__forwardTransition},set_forwardTransition:function(a){if(!this.setStyle("forwardTransition")||this.__forwardTransition==a)return this.__forwardTransition;this._previousClearStyle=m(this,this.clearStyle_forwardTransition);this.__forwardTransition=
a;this.setInvalid(x.STYLES);return this.__forwardTransition},clearStyle_forwardTransition:function(){this.set_forwardTransition(null);return this.get_forwardTransition()},__backTransition:null,get_backTransition:function(){return this.__backTransition},set_backTransition:function(a){if(!this.setStyle("backTransition")||this.__backTransition==a)return this.__backTransition;this._previousClearStyle=m(this,this.clearStyle_backTransition);this.__backTransition=a;this.setInvalid(x.STYLES);return this.__backTransition},
clearStyle_backTransition:function(){this.set_backTransition(null);return this.get_backTransition()},__replaceTransition:null,get_replaceTransition:function(){return this.__replaceTransition},set_replaceTransition:function(a){if(!this.setStyle("replaceTransition")||this.__replaceTransition==a)return this.__replaceTransition;this._previousClearStyle=m(this,this.clearStyle_replaceTransition);this.__replaceTransition=a;this.setInvalid(x.STYLES);return this.__replaceTransition},clearStyle_replaceTransition:function(){this.set_replaceTransition(null);
return this.get_replaceTransition()},__class__:Rn,__properties__:I(Rd.prototype.__properties__,{get_pathname:"get_pathname",get_location:"get_location",set_preferHashRouting:"set_preferHashRouting",get_preferHashRouting:"get_preferHashRouting",set_replaceTransition:"set_replaceTransition",get_replaceTransition:"get_replaceTransition",set_backTransition:"set_backTransition",get_backTransition:"get_backTransition",set_forwardTransition:"set_forwardTransition",get_forwardTransition:"get_forwardTransition"})});
var Em=R["feathers.controls.navigators.StackAction"]={__ename__:"feathers.controls.navigators.StackAction",__constructs__:null,Push:(B=function(a,b,c){return{_hx_index:0,id:a,inject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:E}},B._hx_name="Push",B.__params__=["id","inject","transition"],B),Replace:(B=function(a,b,c){return{_hx_index:1,id:a,inject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:E}},B._hx_name="Replace",B.__params__=["id",
"inject","transition"],B),Pop:(B=function(a,b){return{_hx_index:2,returnedObject:a,transition:b,__enum__:"feathers.controls.navigators.StackAction",toString:E}},B._hx_name="Pop",B.__params__=["returnedObject","transition"],B),PopMultiple:(B=function(a,b,c){return{_hx_index:3,count:a,returnedObject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:E}},B._hx_name="PopMultiple",B.__params__=["count","returnedObject","transition"],B),PopToRoot:(B=function(a,b){return{_hx_index:4,
returnedObject:a,transition:b,__enum__:"feathers.controls.navigators.StackAction",toString:E}},B._hx_name="PopToRoot",B.__params__=["returnedObject","transition"],B),PopToRootAndReplace:(B=function(a,b,c){return{_hx_index:5,id:a,inject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:E}},B._hx_name="PopToRootAndReplace",B.__params__=["id","inject","transition"],B),Listener:(B=function(a){return{_hx_index:6,callback:a,__enum__:"feathers.controls.navigators.StackAction",toString:E}},
B._hx_name="Listener",B.__params__=["callback"],B),NewAction:(B=function(a){return{_hx_index:7,callback:a,__enum__:"feathers.controls.navigators.StackAction",toString:E}},B._hx_name="NewAction",B.__params__=["callback"],B)};Em.__constructs__=[Em.Push,Em.Replace,Em.Pop,Em.PopMultiple,Em.PopToRoot,Em.PopToRootAndReplace,Em.Listener,Em.NewAction];var vi=function(){this._viewToEvents=new Ta};t["feathers.controls.navigators.StackItem"]=vi;vi.__name__="feathers.controls.navigators.StackItem";vi.withClass=
function(a,b,c,d,f,g){var h=new vi;h.id=a;h.viewFactory=Kl.fromClass(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};vi.withFunction=function(a,b,c,d,f,g){var h=new vi;h.id=a;h.viewFactory=Kl.fromFunction(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};vi.withDisplayObject=function(a,b,c,d,f,g){var h=new vi;h.id=a;h.viewFactory=Kl.fromDisplayObject(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};vi.withFactory=function(a,b,
c,d,f,g){var h=new vi;h.id=a;h.viewFactory=b;h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};vi.prototype={id:null,viewFactory:null,actions:null,returnHandlers:null,pushTransition:null,popTransition:null,_viewToEvents:null,setAction:function(a,b){this.actions==null&&(this.actions=new G);b==null?(b=this.actions,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):this.actions.h[a]=b},saveData:function(a){return null},restoreData:function(a,b){},getView:function(a){var b=
this.viewFactory.create();a=this.addActionListeners(b,a);this._viewToEvents.set(b,a);return b},returnView:function(a){this.removeEventsFromView(a,this._viewToEvents.h[a.__id__]);this._viewToEvents.remove(a);this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},addActionListeners:function(a,b){var c=[];if(this.actions==null)return c;for(var d=Object.keys(this.actions.h),f=d.length,g=0;g<f;){var h=d[g++],n=this.createActionEventListener(this.actions.h[h],b);a.addEventListener(h,n);c.push(new vx(h,
n))}return c},performAction:function(a,b,c){switch(a._hx_index){case 0:b=a.id;var d=a.inject;a=a.transition;c.pushItem(b,d,a);break;case 1:b=a.id;d=a.inject;a=a.transition;c.replaceItem(b,d,a);break;case 2:b=a.returnedObject;a=a.transition;c.popItem(b,a);break;case 3:d=a.count;b=a.returnedObject;a=a.transition;c.popMultipleItems(d,b,a);break;case 4:b=a.returnedObject;a=a.transition;c.popToRootItem(b,a);break;case 5:b=a.id;d=a.inject;a=a.transition;c.popToRootItemAndReplace(b,d,a);break;case 6:c=a.callback;
c(b);break;case 7:return c=a.callback,c(b)}return null},createActionEventListener:function(a,b){var c=this;return function(d){if(!b.get_transitionActive())for(var f=a;f!=null;)f=c.performAction(f,d,b)}},removeEventsFromView:function(a,b){for(var c=0;c<b.length;){var d=b[c];++c;a.removeEventListener(d.eventType,d.listener)}},__class__:vi};var vx=function(a,b){this.eventType=a;this.listener=b};t["feathers.controls.navigators._StackItem.ViewListener"]=vx;vx.__name__="feathers.controls.navigators._StackItem.ViewListener";
vx.prototype={eventType:null,listener:null,__class__:vx};var Sn=function(){this._poppedHistoryItems=this.__pushTransition=this.__popTransition=this.__replaceTransition=null;this.savedIsPop=!1;this._popSwipeActiveEdgeSize=30;this._popSwipeEnabled=this._simulateTouch=!1;this._history=[];this.initializeStackNavigatorTheme();Rd.call(this);this.addEventListener("initialize",m(this,this.stackNavigator_initializeHandler));this.addEventListener("addedToStage",m(this,this.stackNavigator_addedToStageHandler));
this.addEventListener("removedFromStage",m(this,this.stackNavigator_removedFromStageHandler))};t["feathers.controls.navigators.StackNavigator"]=Sn;Sn.__name__="feathers.controls.navigators.StackNavigator";Sn.__super__=Rd;Sn.prototype=I(Rd.prototype,{_backEdgePuller:null,_dragTransitionContext:null,_history:null,_tempRootItemID:null,get_stackSize:function(){return this._history.length},get_rootItemID:function(){return this._history.length>0?this._history[0].id:this._tempRootItemID},set_rootItemID:function(a){if(!this.get_initialized())return this._tempRootItemID=
a;this._tempRootItemID=null;this._history.length=0;if(a==null)return this.clearActiveItemInternal(null),null;var b=new Fm(a,null,null,null);this._history.push(b);this.showItemWithInjectAndReturnedObject(a,null,null,null,null,!1);return a},_popSwipeEnabled:null,get_popSwipeEnabled:function(){return this._popSwipeEnabled},set_popSwipeEnabled:function(a){if(this._popSwipeEnabled==a)return this._popSwipeEnabled;this._popSwipeEnabled=a;this.setInvalid(x.DATA);return this._popSwipeEnabled},_simulateTouch:null,
get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==a)return this._simulateTouch;this._simulateTouch=a;this.setInvalid(x.DATA);return this._simulateTouch},_popSwipeActiveEdgeSize:null,get_popSwipeActiveEdgeSize:function(){return this._popSwipeActiveEdgeSize},set_popSwipeActiveEdgeSize:function(a){if(this._popSwipeActiveEdgeSize==a)return this._popSwipeActiveEdgeSize;this._popSwipeActiveEdgeSize=a;this.setInvalid(x.DATA);return this._popSwipeActiveEdgeSize},
savedInject:null,savedReturnedObject:null,savedIsPop:null,savedRestoreData:null,savedViewData:null,_poppedHistoryItems:null,initializeStackNavigatorTheme:function(){Rw.initialize()},addItem:function(a){this.addItemInternal(a.id,a)},removeItem:function(a){for(var b=0,c=this._history;b<c.length;){var d=c[b];++b;d.id==a&&V.remove(this._history,d)}d=this.removeItemInternal(a);return w.__cast(d,vi)},removeAllItems:function(){this._history.length=0;Rd.prototype.removeAllItems.call(this)},getItem:function(a){a=
this._addedItems.h[a];return a==null?null:w.__cast(a,vi)},pushItem:function(a,b,c){c==null&&(c=this.getItem(a),c=c!=null&&c.pushTransition!=null?c.pushTransition:this.get_pushTransition());if(this._activeItemView!=null){var d=null,f=this._addedItems.h[this._activeItemID];f.saveData!=null&&(d=f.saveData(this._activeItemView));f=this._history[this._history.length-1];f.viewData=d}f=new Fm(a,b,null,c);this._history.push(f);return this.showItemWithInjectAndReturnedObject(a,c,b,null,null,!1)},popItem:function(a,
b){if(this._history.length<=1)return this.get_activeItemView();if(b==null){var c=this.getItem(this.get_activeItemID());b=c!=null&&c.popTransition!=null?c.popTransition:this.get_popTransition()}this._poppedHistoryItems=[this._history.pop()];c=this._history[this._history.length-1];return this.showItemWithInjectAndReturnedObject(c.id,b,c.inject,a,c.viewData,!0)},popMultipleItems:function(a,b,c){if(a<=0)throw new we("popMultipleItems() must be called with a value greater than zero");if(c==null){var d=
this.getItem(this.get_activeItemID());c=d!=null&&d.popTransition!=null?d.popTransition:this.get_popTransition()}d=this._history.length-a;if(d<1)throw new we("popMultipleItems() called with value larger than available history. Received "+a+". Expected less than "+this._history.length+".");this._poppedHistoryItems=this._history.slice(d);this._history.length=d;d=this._history[this._history.length-1];return this.showItemWithInjectAndReturnedObject(d.id,c,d.inject,b,d.viewData,!0)},popToRootItem:function(a,
b){if(this._history.length<=1)return this.get_activeItemView();b==null&&(b=this.get_popTransition());this._poppedHistoryItems=this._history.slice(1);this._history.length=1;var c=this._history[0];return this.showItemWithInjectAndReturnedObject(c.id,b,c.inject,a,null,!0)},popAll:function(a){this._history.length!=0&&(a==null&&(a=this.get_popTransition()),this._poppedHistoryItems=this._history.slice(),this._history.length=0,this.clearActiveItemInternal(a))},replaceItem:function(a,b,c){c==null&&(c=this.get_replaceTransition());
var d=new Fm(a,b,null,c);this._history[this._history.length-1]=d;return this.showItemWithInjectAndReturnedObject(a,c,b,null,null,!1)},popToRootItemAndReplace:function(a,b,c){c==null&&(c=this.get_popTransition());this._history.length=1;this._history[0]=new Fm(a,b,null,c);return this.showItemWithInjectAndReturnedObject(a,c,b,null,null,!1)},initialize:function(){Rd.prototype.initialize.call(this);this._backEdgePuller==null&&(this._backEdgePuller=new mg(this,ra.LEFT),this._backEdgePuller.addEventListener("opening",
m(this,this.stackNavigator_backEdgePuller_openingHandler)),this._backEdgePuller.addEventListener("cancel",m(this,this.stackNavigator_backEdgePuller_cancelHandler)),this._backEdgePuller.addEventListener("open",m(this,this.stackNavigator_backEdgePuller_openHandler)))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION);if(a||b)a=this._enabled&&this._popSwipeEnabled&&this.get_stackSize()>1,this._backEdgePuller.enabled=a,this._backEdgePuller.set_activeBorderSize(this._popSwipeActiveEdgeSize),
this._backEdgePuller.simulateTouch=this._simulateTouch;Rd.prototype.update.call(this)},getView:function(a){var b=w.__cast(this._addedItems.h[a],vi);a=b.getView(this);this.savedInject!=null&&this.savedInject(a);b.restoreData!=null&&b.restoreData(a,this.savedViewData);if(this.savedIsPop&&(b=b.returnHandlers,b!=null&&Object.prototype.hasOwnProperty.call(b.h,this._previousViewInTransitionID)))b.h[this._previousViewInTransitionID](a,this.savedReturnedObject);return a},disposeView:function(a,b){w.__cast(this._addedItems.h[a],
vi).returnView(b)},transitionComplete:function(){this._poppedHistoryItems=null},transitionCancel:function(){if(this._poppedHistoryItems!=null){for(var a=0,b=this._poppedHistoryItems;a<b.length;){var c=b[a];++a;this._history.push(c)}this._poppedHistoryItems=null}},showItemWithInjectAndReturnedObject:function(a,b,c,d,f,g){this.savedInject=c;this.savedReturnedObject=d;this.savedViewData=f;this.savedIsPop=g;a=this.showItemInternal(a,b);this.savedReturnedObject=this.savedInject=null;this.savedIsPop=!1;
this.savedViewData=null;return a},startBackDragTransition:function(a,b){var c=this;a=this.get_popTransition()(a,b);this._backEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new Ol(a,this._backEdgePuller,"change",function(d){return c._dragTransitionContext.set_position(c._backEdgePuller.get_pullDistance()/c.actualWidth)})},stackNavigator_initializeHandler:function(a){if(this._tempRootItemID!=null){a=this._tempRootItemID;this._tempRootItemID=null;var b=new Fm(a,null,
null,null);this._history.push(b);this.showItemWithInjectAndReturnedObject(a,null,null,null,null,!1)}},stackNavigator_addedToStageHandler:function(a){this.stage.addEventListener("keyUp",m(this,this.stackNavigator_stage_keyUpHandler),!1,0,!0)},stackNavigator_removedFromStageHandler:function(a){this.stage.removeEventListener("keyUp",m(this,this.stackNavigator_stage_keyUpHandler))},stackNavigator_stage_backKeyUpHandler:function(a){a.isDefaultPrevented()||this._history.length<=1||(a.preventDefault(),this.popItem())},
stackNavigator_stage_keyUpHandler:function(a){this._enabled&&a.keyCode==1073742094&&this.stackNavigator_stage_backKeyUpHandler(a)},stackNavigator_backEdgePuller_openingHandler:function(a){if(this.get_stackSize()<=1)a.preventDefault();else{var b=this._backEdgePuller.get_touchPointID();if(b!=null){var c=Pd.forStage(this.stage);if(this._backEdgePuller.get_touchPointIsSimulated()?!c.claimMouse(this):!c.claimTouch(b,this)){a.preventDefault();return}}this.get_popTransition()!=null?this.popItem(null,m(this,
this.startBackDragTransition)):(a.preventDefault(),this.popItem())}},stackNavigator_backEdgePuller_cancelHandler:function(a){a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"cancel"));a=this._enabled&&this._popSwipeEnabled&&this.get_stackSize()>1;this._backEdgePuller.enabled=a},stackNavigator_backEdgePuller_openHandler:function(a){a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,
"complete"));a=this._backEdgePuller.get_snapDuration();this._backEdgePuller.set_snapDuration(0);this._backEdgePuller.set_opened(!1);this._backEdgePuller.set_snapDuration(a);a=this._enabled&&this._popSwipeEnabled&&this.get_stackSize()>1;this._backEdgePuller.enabled=a},get_styleContext:function(){return Sn},__pushTransition:null,get_pushTransition:function(){return this.__pushTransition},set_pushTransition:function(a){if(!this.setStyle("pushTransition")||this.__pushTransition==a)return this.__pushTransition;
this._previousClearStyle=m(this,this.clearStyle_pushTransition);this.__pushTransition=a;this.setInvalid(x.STYLES);return this.__pushTransition},clearStyle_pushTransition:function(){this.set_pushTransition(null);return this.get_pushTransition()},__popTransition:null,get_popTransition:function(){return this.__popTransition},set_popTransition:function(a){if(!this.setStyle("popTransition")||this.__popTransition==a)return this.__popTransition;this._previousClearStyle=m(this,this.clearStyle_popTransition);
this.__popTransition=a;this.setInvalid(x.STYLES);return this.__popTransition},clearStyle_popTransition:function(){this.set_popTransition(null);return this.get_popTransition()},__replaceTransition:null,get_replaceTransition:function(){return this.__replaceTransition},set_replaceTransition:function(a){if(!this.setStyle("replaceTransition")||this.__replaceTransition==a)return this.__replaceTransition;this._previousClearStyle=m(this,this.clearStyle_replaceTransition);this.__replaceTransition=a;this.setInvalid(x.STYLES);
return this.__replaceTransition},clearStyle_replaceTransition:function(){this.set_replaceTransition(null);return this.get_replaceTransition()},__class__:Sn,__properties__:I(Rd.prototype.__properties__,{set_popSwipeActiveEdgeSize:"set_popSwipeActiveEdgeSize",get_popSwipeActiveEdgeSize:"get_popSwipeActiveEdgeSize",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",set_popSwipeEnabled:"set_popSwipeEnabled",get_popSwipeEnabled:"get_popSwipeEnabled",set_rootItemID:"set_rootItemID",
get_rootItemID:"get_rootItemID",get_stackSize:"get_stackSize",set_replaceTransition:"set_replaceTransition",get_replaceTransition:"get_replaceTransition",set_popTransition:"set_popTransition",get_popTransition:"get_popTransition",set_pushTransition:"set_pushTransition",get_pushTransition:"get_pushTransition"})});var Fm=function(a,b,c,d){this.id=a;this.inject=b;this.viewData=c;this.transition=d};t["feathers.controls.navigators._StackNavigator.HistoryItem"]=Fm;Fm.__name__="feathers.controls.navigators._StackNavigator.HistoryItem";
Fm.prototype={id:null,inject:null,viewData:null,transition:null,__class__:Fm};var og=function(){this.internalID=H.string(og.internalIDCounter);og.internalIDCounter++};t["feathers.controls.navigators.TabItem"]=og;og.__name__="feathers.controls.navigators.TabItem";og.withClass=function(a,b){var c=new og;c.text=a;c.viewFactory=Kl.fromClass(b);return c};og.withFunction=function(a,b){var c=new og;c.text=a;c.viewFactory=Kl.fromFunction(b);return c};og.withDisplayObject=function(a,b){var c=new og;c.text=
a;c.viewFactory=Kl.fromDisplayObject(b);return c};og.withFactory=function(a,b){var c=new og;c.text=a;c.viewFactory=b;return c};og.prototype={internalID:null,text:null,viewFactory:null,getView:function(a){return this.viewFactory.create()},returnView:function(a){this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},__class__:og};var bh=function(a){this.__customTabBarVariant=null;this.__gap=0;this.__previousTransition=this.__nextTransition=null;this.__tabBarPosition=ra.BOTTOM;this._ignoreSelectionChange=
!1;this._previousCustomTabBarVariant=null;this._swipeEnabled=this._simulateTouch=!1;this._selectedItem=null;this._activeItemIndex=this._selectedIndex=-1;this.initializeTabNavigatorTheme();Rd.call(this);this.set_dataProvider(a);this._viewsContainer=new pb;this.addChild(this._viewsContainer)};t["feathers.controls.navigators.TabNavigator"]=bh;bh.__name__="feathers.controls.navigators.TabNavigator";bh.__interfaces__=[qi,lj];bh.__super__=Rd;bh.prototype=I(Rd.prototype,{tabBar:null,_previousEdgePuller:null,
_nextEdgePuller:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;if(this._dataProvider!=null)if(this._dataProvider.removeEventListener("addItem",m(this,this.tabNavigator_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.tabNavigator_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.tabNavigator_dataProvider_replaceItemHandler)),
this._dataProvider.removeEventListener("removeAll",m(this,this.tabNavigator_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.tabNavigator_dataProvider_resetHandler)),a==null)this.removeAllItems();else for(var b=this._dataProvider.iterator();b.hasNext();){var c=b.next();this.removeItemInternal(c.internalID)}this._dataProvider=a;if(this._dataProvider!=null){for(b=this._dataProvider.iterator();b.hasNext();)c=b.next(),this.addItemInternal(c.internalID,c);this._dataProvider.addEventListener("addItem",
m(this,this.tabNavigator_dataProvider_addItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeItem",m(this,this.tabNavigator_dataProvider_removeItemHandler),!1,0,!0);this._dataProvider.addEventListener("replaceItem",m(this,this.tabNavigator_dataProvider_replaceItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeAll",m(this,this.tabNavigator_dataProvider_removeAllHandler),!1,0,!0);this._dataProvider.addEventListener("reset",m(this,this.tabNavigator_dataProvider_resetHandler),
!1,0,!0)}this.setInvalid(x.DATA);this._dataProvider==null||this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this.set_selectedIndex(0);Y.dispatch(this,"dataChange");return this._dataProvider},_activeItemIndex:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex);
this.setInvalid(x.SELECTION);return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;this.set_selectedIndex(this._dataProvider.indexOf(a));return this._selectedItem},_swipeEnabled:null,get_swipeEnabled:function(){return this._swipeEnabled},set_swipeEnabled:function(a){if(this._swipeEnabled==
a)return this._swipeEnabled;this._swipeEnabled=a;this.setInvalid(x.DATA);return this._swipeEnabled},_simulateTouch:null,_dragTransitionContext:null,get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==a)return this._simulateTouch;this._simulateTouch=a;this.setInvalid(x.DATA);return this._simulateTouch},_previousCustomTabBarVariant:null,_oldTabBarFactory:null,_tabBarFactory:null,get_tabBarFactory:function(){return this._tabBarFactory},set_tabBarFactory:function(a){if(this._tabBarFactory==
a)return this._tabBarFactory;this._tabBarFactory=a;this.setInvalid(bh.INVALIDATION_FLAG_TAB_BAR_FACTORY);return this._tabBarFactory},_ignoreSelectionChange:null,dispose:function(){this._pendingItemTransition=this._pendingItemID=null;this._transitionActive=!1;this._activeTransition!=null&&(this._activeTransition.removeEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.removeEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.stop());
this.destroyTabBar();this._activeItemView=this._activeItemID=null;this.set_dataProvider(null);Rd.prototype.dispose.call(this)},initialize:function(){Rd.prototype.initialize.call(this);this._previousEdgePuller==null&&(this._previousEdgePuller=new mg(this,ra.LEFT),this._previousEdgePuller.addEventListener("opening",m(this,this.tabNavigator_previousEdgePuller_openingHandler)),this._previousEdgePuller.addEventListener("cancel",m(this,this.tabNavigator_previousEdgePuller_cancelHandler)),this._previousEdgePuller.addEventListener("open",
m(this,this.tabNavigator_previousEdgePuller_openHandler)));this._nextEdgePuller==null&&(this._nextEdgePuller=new mg(this,ra.RIGHT),this._nextEdgePuller.addEventListener("opening",m(this,this.tabNavigator_nextEdgePuller_openingHandler)),this._nextEdgePuller.addEventListener("cancel",m(this,this.tabNavigator_nextEdgePuller_cancelHandler)),this._nextEdgePuller.addEventListener("open",m(this,this.tabNavigator_nextEdgePuller_openHandler)))},itemToText:function(a){return a.text},initializeTabNavigatorTheme:function(){Tw.initialize()},
update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION);this._previousCustomTabBarVariant!=this.get_customTabBarVariant()&&this.setInvalidationFlag(bh.INVALIDATION_FLAG_TAB_BAR_FACTORY);var c=this.isInvalid(bh.INVALIDATION_FLAG_TAB_BAR_FACTORY);c&&this.createTabBar();if(a||c){this.tabBar.itemToText=m(this,this.itemToText);var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.tabBar.set_dataProvider(this._dataProvider);this._ignoreSelectionChange=d}a&&(this._previousEdgePuller.simulateTouch=
this._simulateTouch,this._nextEdgePuller.simulateTouch=this._simulateTouch);(a||b||c)&&this.refreshSelection();Rd.prototype.update.call(this);this._previousCustomTabBarVariant=this.get_customTabBarVariant()},measure:function(){this.get_explicitWidth()!=null?this.tabBar.set_width(this.get_explicitWidth()):this._autoSizeMode==Ve.STAGE&&this.stage!=null?this.tabBar.set_width(this.stage.stageWidth):this.tabBar.resetWidth();this.tabBar.validateNow();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,
this.tabBar.get_width());switch(this.get_tabBarPosition()._hx_index){case 0:this.topContentOffset+=this.tabBar.get_height()+this.get_gap();break;case 2:this.bottomContentOffset+=this.tabBar.get_height()+this.get_gap();break;default:throw new Cb("Invalid tabBarPosition "+H.string(this.get_tabBarPosition()));}return Rd.prototype.measure.call(this)},createTabBar:function(){this.destroyTabBar();var a=this._tabBarFactory!=null?this._tabBarFactory:bh.defaultTabBarFactory;this._oldTabBarFactory=a;this.tabBar=
a.create();this.tabBar.get_variant()==null&&this.tabBar.set_variant(this.get_customTabBarVariant()!=null?this.get_customTabBarVariant():bh.CHILD_VARIANT_TAB_BAR);this.tabBar.addEventListener("itemTrigger",m(this,this.tabNavigator_tabBar_itemTriggerHandler));this.tabBar.addEventListener("change",m(this,this.tabNavigator_tabBar_changeHandler));this.addChild(this.tabBar)},destroyTabBar:function(){this.tabBar!=null&&(this.tabBar.removeEventListener("itemTrigger",m(this,this.tabNavigator_tabBar_itemTriggerHandler)),
this.tabBar.removeEventListener("change",m(this,this.tabNavigator_tabBar_changeHandler)),this.removeChild(this.tabBar),this._oldTabBarFactory.destroy!=null&&this._oldTabBarFactory.destroy(this.tabBar),this.tabBar=this._oldTabBarFactory=null)},layoutContent:function(){this.tabBar.set_x(0);this.tabBar.set_width(this.actualWidth);this.tabBar.validateNow();switch(this.get_tabBarPosition()._hx_index){case 0:this.tabBar.set_y(0);break;case 2:this.tabBar.set_y(this.actualHeight-this.tabBar.get_height());
break;default:throw new Cb("Invalid tabBarPosition "+H.string(this.get_tabBarPosition()));}Rd.prototype.layoutContent.call(this)},getView:function(a){return w.__cast(this._addedItems.h[a],og).getView(this)},disposeView:function(a,b){w.__cast(this._addedItems.h[a],og).returnView(b)},refreshSelection:function(){var a=this,b=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.tabBar.set_selectedIndex(this._selectedIndex);this._ignoreSelectionChange=b;if(this._selectedItem==null)this._activeItemIndex=
-1,this.get_activeItemID()!=null&&this.clearActiveItemInternal();else if(this._selectedItem!=null&&(b=this._activeItemIndex,this._activeItemIndex=this._selectedIndex,!this._previousEdgePuller.get_active()&&!this._nextEdgePuller.get_active()&&(this._transitionActive?this._nextViewInTransitionID:this._activeItemID)!=this._selectedItem.internalID)){var c=null;b!=-1&&b!=this._selectedIndex&&(c=b<this._selectedIndex?this.get_nextTransition():this.get_previousTransition());this.runWithInvalidationFlagsOnly(function(){a.showItemInternal(a._selectedItem.internalID,
c)})}b=this._enabled&&this._swipeEnabled&&this._selectedIndex>0&&!this._nextEdgePuller.get_active();this._previousEdgePuller.enabled=b;b=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex()&&!this._previousEdgePuller.get_active();this._nextEdgePuller.enabled=b},startPreviousDragTransition:function(a,b){var c=this;a=this.get_previousTransition()(a,b);this._previousEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new Ol(a,this._previousEdgePuller,
"change",function(d){return c._dragTransitionContext.set_position(c._previousEdgePuller.get_pullDistance()/c.actualWidth)})},startNextDragTransition:function(a,b){var c=this;a=this.get_nextTransition()(a,b);this._nextEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new Ol(a,this._nextEdgePuller,"change",function(d){return c._dragTransitionContext.set_position(c._nextEdgePuller.get_pullDistance()/c.actualWidth)})},tabNavigator_tabBar_changeHandler:function(a){this._ignoreSelectionChange||
this.set_selectedIndex(this.tabBar.get_selectedIndex())},tabNavigator_tabBar_itemTriggerHandler:function(a){this.dispatchEvent(a)},tabNavigator_dataProvider_addItemHandler:function(a){var b=w.__cast(a.addedItem,og);this.addItemInternal(b.internalID,b);this._selectedIndex>=a.index?this.set_selectedIndex(this.get_selectedIndex()+1):this._selectedIndex==-1&&this.set_selectedIndex(0)},tabNavigator_dataProvider_removeItemHandler:function(a){var b=w.__cast(a.removedItem,og);this.removeItemInternal(b.internalID);
this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this._selectedIndex>=a.index&&this.set_selectedIndex(this.get_selectedIndex()-1)},tabNavigator_dataProvider_replaceItemHandler:function(a){var b=w.__cast(a.addedItem,og),c=w.__cast(a.removedItem,og);this.removeItemInternal(c.internalID);this.addItemInternal(b.internalID,b);this._selectedIndex==a.index&&this.set_selectedItem(this._dataProvider.get(this._selectedIndex))},tabNavigator_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1);
a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},tabNavigator_dataProvider_resetHandler:function(a){this.set_selectedIndex(-1);a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},tabNavigator_previousEdgePuller_openingHandler:function(a){var b=this._selectedIndex-1;if(b<0)a.preventDefault();else{var c=this._previousEdgePuller.get_touchPointID();
if(c!=null){var d=Pd.forStage(this.stage);if(this._previousEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_previousTransition()!=null?(this._nextEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startPreviousDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},tabNavigator_previousEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"cancel"))},tabNavigator_previousEdgePuller_openHandler:function(a){a=this._previousEdgePuller.get_snapDuration();this._previousEdgePuller.set_snapDuration(0);this._previousEdgePuller.set_opened(!1);this._previousEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()-
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"complete"))},tabNavigator_nextEdgePuller_openingHandler:function(a){var b=this._selectedIndex+1;if(b>this.get_maxSelectedIndex())a.preventDefault();else{var c=this._nextEdgePuller.get_touchPointID();
if(c!=null){var d=Pd.forStage(this.stage);if(this._nextEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_nextTransition()!=null?(this._previousEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startNextDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},tabNavigator_nextEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"cancel"))},tabNavigator_nextEdgePuller_openHandler:function(a){a=this._nextEdgePuller.get_snapDuration();this._nextEdgePuller.set_snapDuration(0);this._nextEdgePuller.set_opened(!1);this._nextEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()+
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),Y.dispatch(a,"complete"))},get_styleContext:function(){return bh},__tabBarPosition:null,get_tabBarPosition:function(){return this.__tabBarPosition},set_tabBarPosition:function(a){if(!this.setStyle("tabBarPosition")||
this.__tabBarPosition==a)return this.__tabBarPosition;this._previousClearStyle=m(this,this.clearStyle_tabBarPosition);this.__tabBarPosition=a;this.setInvalid(x.STYLES);return this.__tabBarPosition},clearStyle_tabBarPosition:function(){this.set_tabBarPosition(ra.BOTTOM);return this.get_tabBarPosition()},__previousTransition:null,get_previousTransition:function(){return this.__previousTransition},set_previousTransition:function(a){if(!this.setStyle("previousTransition")||this.__previousTransition==
a)return this.__previousTransition;this._previousClearStyle=m(this,this.clearStyle_previousTransition);this.__previousTransition=a;this.setInvalid(x.STYLES);return this.__previousTransition},clearStyle_previousTransition:function(){this.set_previousTransition(null);return this.get_previousTransition()},__nextTransition:null,get_nextTransition:function(){return this.__nextTransition},set_nextTransition:function(a){if(!this.setStyle("nextTransition")||this.__nextTransition==a)return this.__nextTransition;
this._previousClearStyle=m(this,this.clearStyle_nextTransition);this.__nextTransition=a;this.setInvalid(x.STYLES);return this.__nextTransition},clearStyle_nextTransition:function(){this.set_nextTransition(null);return this.get_nextTransition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);
return this.get_gap()},__customTabBarVariant:null,get_customTabBarVariant:function(){return this.__customTabBarVariant},set_customTabBarVariant:function(a){if(!this.setStyle("customTabBarVariant")||this.__customTabBarVariant==a)return this.__customTabBarVariant;this._previousClearStyle=m(this,this.clearStyle_customTabBarVariant);this.__customTabBarVariant=a;this.setInvalid(x.STYLES);return this.__customTabBarVariant},clearStyle_customTabBarVariant:function(){this.set_customTabBarVariant(null);return this.get_customTabBarVariant()},
__class__:bh,__properties__:I(Rd.prototype.__properties__,{set_tabBarFactory:"set_tabBarFactory",get_tabBarFactory:"get_tabBarFactory",set_customTabBarVariant:"set_customTabBarVariant",get_customTabBarVariant:"get_customTabBarVariant",set_gap:"set_gap",get_gap:"get_gap",set_nextTransition:"set_nextTransition",get_nextTransition:"get_nextTransition",set_previousTransition:"set_previousTransition",get_previousTransition:"get_previousTransition",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",
set_swipeEnabled:"set_swipeEnabled",get_swipeEnabled:"get_swipeEnabled",set_tabBarPosition:"set_tabBarPosition",get_tabBarPosition:"get_tabBarPosition",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var Fp=function(){};t["feathers.controls.popups.IPopUpAdapter"]=Fp;Fp.__name__="feathers.controls.popups.IPopUpAdapter";
Fp.__isInterface__=!0;Fp.__interfaces__=[Db];Fp.prototype={get_active:null,get_persistent:null,open:null,close:null,__class__:Fp,__properties__:{get_persistent:"get_persistent",get_active:"get_active"}};var Xk=function(){this._ignoreContentResizing=this._ignoreOriginResizing=!1;this._contentMeasurements=new Sb;this.closeOnPointerActiveOutside=!1;this._fitContentToOriginWidth=!0;this.modal=!1;this._gap=0;this.content=this.origin=null;qa.call(this)};t["feathers.controls.popups.DropDownPopUpAdapter"]=
Xk;Xk.__name__="feathers.controls.popups.DropDownPopUpAdapter";Xk.__interfaces__=[Fp];Xk.__super__=qa;Xk.prototype=I(qa.prototype,{content:null,origin:null,get_active:function(){return this.content!=null},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;this.get_active()&&this.layout();return this._gap},modal:null,_fitContentToOriginWidth:null,get_fitContentToOriginWidth:function(){return this._fitContentToOriginWidth},set_fitContentToOriginWidth:function(a){if(this._fitContentToOriginWidth==
a)return this._fitContentToOriginWidth;this._fitContentToOriginWidth=a;this.get_active()&&this.layout();return this._fitContentToOriginWidth},get_persistent:function(){return!1},closeOnPointerActiveOutside:null,_stage:null,_prevOriginX:null,_prevOriginY:null,_contentMeasurements:null,_ignoreContentResizing:null,_ignoreOriginResizing:null,open:function(a,b){if(this.get_active())throw new ob("Pop-up adapter is already open. Close the previous content before opening new content.");if(b.stage==null)throw new ob("Pop-up adapter failed to open because the origin is not added to the stage.");
this._stage=b.stage;this._stage.addEventListener("mouseDown",m(this,this.dropDownPopUpAdapter_stage_mouseDownHandler),!1,0,!0);this._stage.addEventListener("touchBegin",m(this,this.dropDownPopUpAdapter_stage_touchBeginHandler),!1,0,!0);this._stage.addEventListener("resize",m(this,this.dropDownPopUpAdapter_stage_resizeHandler),!1,0,!0);this.content=a;this.content.addEventListener("enterFrame",m(this,this.dropDownPopUpAdapter_content_enterFrameHandler),!1,0,!0);this.content.addEventListener("resize",
m(this,this.dropDownPopUpAdapter_content_resizeHandler),!1,0,!0);this.content.addEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_content_removedFromStageHandler),!1,0,!0);this.origin=b;this.origin.addEventListener("resize",m(this,this.dropDownPopUpAdapter_origin_resizeHandler),!1,0,!0);this.origin.addEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_origin_removedFromStageHandler),!1,0,!0);Aa.addPopUp(this.content,this.origin,this.modal,!1);this.get_active()&&(w.__implements(this.content,
da)&&(a=this._ignoreContentResizing,this._ignoreContentResizing=!0,this.content.validateNow(),this._ignoreContentResizing=a),this._contentMeasurements.save(this.content),this.layout(),Y.dispatch(this,"open"))},close:function(){if(this.get_active()){this._stage.removeEventListener("resize",m(this,this.dropDownPopUpAdapter_stage_resizeHandler));this._stage.removeEventListener("mouseDown",m(this,this.dropDownPopUpAdapter_stage_mouseDownHandler));this._stage.addEventListener("touchBegin",m(this,this.dropDownPopUpAdapter_stage_touchBeginHandler));
this.content.removeEventListener("enterFrame",m(this,this.dropDownPopUpAdapter_content_enterFrameHandler));this.content.removeEventListener("resize",m(this,this.dropDownPopUpAdapter_content_resizeHandler));this.content.removeEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_content_removedFromStageHandler));this.origin.removeEventListener("resize",m(this,this.dropDownPopUpAdapter_origin_resizeHandler));this.origin.removeEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_origin_removedFromStageHandler));
var a=this.content;this._stage=this.content=this.origin=null;a.parent!=null&&a.parent.removeChild(a);this._contentMeasurements.restore(a);Y.dispatch(this,"close")}},layout:function(){if(w.__implements(this.origin,da)){var a=this._ignoreOriginResizing;this._ignoreOriginResizing=!0;this.origin.validateNow();this._ignoreOriginResizing=a}var b=Aa.forStage(this._stage).get_root();a=new Ea(this.origin.get_x(),this.origin.get_y());a=this.origin.parent.localToGlobal(a);a=b.globalToLocal(a);var c=new Ea(this.origin.get_x()+
this.origin.get_width(),this.origin.get_y()+this.origin.get_height());c=this.origin.parent.localToGlobal(c);c=b.globalToLocal(c);this._prevOriginX=a.x;this._prevOriginY=a.y;var d=Math.max(0,c.x-a.x),f=!1;if(this._fitContentToOriginWidth&&w.__implements(this.content,rb)){var g=this.content;g.get_minWidth()<d&&(g.set_minWidth(d),f=!0)}g=this._ignoreContentResizing;this._ignoreContentResizing=!0;w.__implements(this.content,da)&&this.content.validateNow();this._fitContentToOriginWidth&&!f&&this.content.get_width()<
d&&this.content.set_width(d);this._ignoreContentResizing=g;d=b.globalToLocal(new Ea);b=b.globalToLocal(new Ea(this._stage.stageWidth,this._stage.stageHeight));f=a.x;f<d.x?f=d.x:f+this.content.get_width()>b.x&&(f=Math.max(d.x,b.x-this.content.get_width()));this.content.set_x(f);c=c.y+this._gap;c+this.content.get_height()>b.y&&(c=Math.max(d.y,a.y-this._gap-this.content.get_height()));this.content.set_y(c)},dropDownPopUpAdapter_origin_removedFromStageHandler:function(a){this.get_active()&&this.close()},
dropDownPopUpAdapter_content_removedFromStageHandler:function(a){this.get_active()&&this.close()},dropDownPopUpAdapter_stage_resizeHandler:function(a){this.get_active()&&(a=w.__cast(a.currentTarget,gd),gk.forStage(a).validateNow(),this.layout())},dropDownPopUpAdapter_content_resizeHandler:function(a){this.get_active()&&!this._ignoreContentResizing&&this.layout()},dropDownPopUpAdapter_origin_resizeHandler:function(a){this.get_active()&&!this._ignoreOriginResizing&&this.layout()},dropDownPopUpAdapter_content_enterFrameHandler:function(a){if(this.get_active()){a=
Aa.forStage(this._stage).get_root();var b=new Ea(this.origin.get_x(),this.origin.get_y());b=this.origin.parent.localToGlobal(b);b=a.globalToLocal(b);b.x==this._prevOriginX&&b.y==this._prevOriginY||this.layout()}},dropDownPopUpAdapter_stage_mouseDownHandler:function(a){if(this.closeOnPointerActiveOutside){a=w.__cast(a.target,ma);if(this.content instanceof zb){var b=this.content;if(b.contains(a))return}else if(this.content==a)return;if(this.origin instanceof zb){if(b=this.origin,b.contains(a))return}else if(this.origin==
a)return;this.close()}},dropDownPopUpAdapter_stage_touchBeginHandler:function(a){if(this.closeOnPointerActiveOutside&&!a.isPrimaryTouchPoint){a=w.__cast(a.target,ma);if(this.content instanceof zb){var b=this.content;if(b.contains(a))return}else if(this.content==a)return;if(this.origin instanceof zb){if(b=this.origin,b.contains(a))return}else if(this.origin==a)return;this.close()}},__class__:Xk,__properties__:{get_persistent:"get_persistent",set_fitContentToOriginWidth:"set_fitContentToOriginWidth",
get_fitContentToOriginWidth:"get_fitContentToOriginWidth",set_gap:"set_gap",get_gap:"get_gap",get_active:"get_active"}});var nk=function(){};t["feathers.controls.supportClasses.IViewPort"]=nk;nk.__name__="feathers.controls.supportClasses.IViewPort";nk.__isInterface__=!0;nk.__interfaces__=[rb,da,Fa];nk.prototype={get_visibleWidth:null,set_visibleWidth:null,get_visibleHeight:null,set_visibleHeight:null,get_minVisibleWidth:null,set_minVisibleWidth:null,get_minVisibleHeight:null,set_minVisibleHeight:null,
get_maxVisibleWidth:null,set_maxVisibleWidth:null,get_maxVisibleHeight:null,set_maxVisibleHeight:null,get_scrollX:null,set_scrollX:null,get_scrollY:null,set_scrollY:null,__class__:nk,__properties__:{set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",set_minVisibleHeight:"set_minVisibleHeight",
get_minVisibleHeight:"get_minVisibleHeight",set_minVisibleWidth:"set_minVisibleWidth",get_minVisibleWidth:"get_minVisibleWidth",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth"}};var Wk=function(){this._layoutActive=this._layoutChanged=!1;this._snapPositionsX=this._snapPositionsY=null;this._scrollX=this._scrollY=0;this._ignoreLayoutChanges=!1;this._layoutResult=new Kg;this._layoutMeasurements=new Sb;
this._layoutItems=[];this._explicitVisibleHeight=this._layout=null;this._actualVisibleHeight=0;this._maxVisibleHeight=1/0;this._actualMinVisibleHeight=0;this._explicitVisibleWidth=null;this._actualVisibleWidth=0;this._maxVisibleWidth=1/0;this._explicitMinVisibleWidth=null;this._actualMinVisibleWidth=0;fa.call(this);this._viewPortBackground=new Da;this._viewPortBackground.get_graphics().beginFill(16711935,0);this._viewPortBackground.get_graphics().drawRect(0,0,1,1);this._viewPortBackground.get_graphics().endFill();
this.addChildAt(this._viewPortBackground,0)};t["feathers.controls.supportClasses.AdvancedLayoutViewPort"]=Wk;Wk.__name__="feathers.controls.supportClasses.AdvancedLayoutViewPort";Wk.__interfaces__=[nk];Wk.__super__=fa;Wk.prototype=I(fa.prototype,{_viewPortBackground:null,_actualMinVisibleWidth:null,_explicitMinVisibleWidth:null,get_minVisibleWidth:function(){return this._explicitMinVisibleWidth==null?this._actualMinVisibleWidth:this._explicitMinVisibleWidth},set_minVisibleWidth:function(a){if(this._explicitMinVisibleWidth==
a)return this._explicitMinVisibleWidth;var b=this._explicitMinVisibleWidth;this._explicitMinVisibleWidth=a;a==null?(this._actualMinVisibleWidth=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleWidth},_maxVisibleWidth:null,get_maxVisibleWidth:function(){return this._maxVisibleWidth},set_maxVisibleWidth:function(a){if(this._maxVisibleWidth==a)return this._maxVisibleWidth;
if(a==null)throw new Cb("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE);return this._maxVisibleWidth},_actualVisibleWidth:null,_explicitVisibleWidth:null,get_visibleWidth:function(){return this._explicitVisibleWidth==null?this._actualVisibleWidth:this._explicitVisibleWidth},set_visibleWidth:function(a){if(this._explicitVisibleWidth==a)return this._explicitVisibleWidth;
this._explicitVisibleWidth=a;this._actualVisibleWidth!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_actualMinVisibleHeight:null,_explicitMinVisibleHeight:null,get_minVisibleHeight:function(){return this._explicitMinVisibleHeight==null?this._actualMinVisibleHeight:this._explicitMinVisibleHeight},set_minVisibleHeight:function(a){if(this._explicitMinVisibleHeight==a)return this._explicitMinVisibleHeight;var b=this._explicitMinVisibleHeight;this._explicitMinVisibleHeight=a;a==null?(this._actualMinVisibleHeight=
0,this.setInvalid(x.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleHeight},_maxVisibleHeight:null,get_maxVisibleHeight:function(){return this._maxVisibleHeight},set_maxVisibleHeight:function(a){if(this._maxVisibleHeight==a)return this._maxVisibleHeight;if(a==null)throw new Cb("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=
a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE);return this._maxVisibleHeight},_actualVisibleHeight:null,_explicitVisibleHeight:null,get_visibleHeight:function(){return this._explicitVisibleHeight==null?this._actualVisibleHeight:this._explicitVisibleHeight},set_visibleHeight:function(a){if(this._explicitVisibleHeight==a)return this._explicitVisibleHeight;this._explicitVisibleHeight=a;this._actualVisibleHeight!=a&&this.setInvalid(x.SIZE);
return this._explicitVisibleWidth},_layout:null,get_layout:function(){return this._layout},set_layout:function(a){if(this._layout==a)return this._layout;this._layout!=null&&(this._layout.removeEventListener("change",m(this,this.advancedLayoutViewPort_layout_changeHandler)),this._layout.removeEventListener("scroll",m(this,this.advancedLayoutViewPort_layout_scrollHandler)));this._layout=a;this._layout!=null&&(this._layout.addEventListener("change",m(this,this.advancedLayoutViewPort_layout_changeHandler)),
this._layout.addEventListener("scroll",m(this,this.advancedLayoutViewPort_layout_scrollHandler)));this.setInvalid(x.LAYOUT);return this._layout},_layoutItems:null,_layoutMeasurements:null,_layoutResult:null,_ignoreLayoutChanges:null,_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;this.setInvalid(x.SCROLL);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==
a)return this._scrollY;this._scrollY=a;this.setInvalid(x.SCROLL);return this._scrollY},_snapPositionsX:null,get_snapPositionsX:function(){return this._snapPositionsX},_snapPositionsY:null,get_snapPositionsY:function(){return this._snapPositionsY},_scroller:null,get_scroller:function(){return this._scroller},set_scroller:function(a){return this._scroller==a?this._scroller:this._scroller=a},_layoutActive:null,_layoutChanged:null,refreshChildren:function(a){},update:function(){var a=this;this.refreshLayoutMeasurements();
this.refreshLayoutProperties();this.runWithInvalidationFlagsOnly(function(){a._layoutActive=!0;var b=0;do if(a._layoutChanged=!1,a.refreshLayout(),a._invalidationFlags.clear(),a._allInvalid=!1,++b,b>=10){a._layoutActive=!1;b=w.getClass(a.parent).__name__;var c=a._layout!=null?w.getClass(a._layout).__name__:"The layout";throw new ob(""+b+" is stuck in an infinite loop during layout. "+c+" may be dispatching Event.CHANGE too frequently.");}while(a._layoutChanged);a._layoutActive=!1})},refreshLayout:function(){this.refreshChildren(this._layoutItems);
this._layoutResult.reset();this._layout!=null&&this._layout.layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this.handleLayoutResult()},refreshLayoutProperties:function(){var a=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;if(w.__implements(this._layout,ff)){var b=this._layout;b.set_scrollX(this._scrollX);b.set_scrollY(this._scrollY)}this._ignoreLayoutChanges=a},refreshLayoutMeasurements:function(){var a=this._explicitMinVisibleWidth==null,b=this._explicitMinVisibleHeight==
null,c=this._maxVisibleWidth==null,d=this._maxVisibleHeight==null;this._layoutMeasurements.width=this._explicitVisibleWidth;this._layoutMeasurements.height=this._explicitVisibleHeight;var f=this._explicitMinVisibleWidth;a&&(f=0);a=this._explicitMinVisibleHeight;b&&(a=0);b=this._maxVisibleWidth;c&&(b=1/0);c=this._maxVisibleHeight;d&&(c=1/0);this._layoutMeasurements.minWidth=f;this._layoutMeasurements.minHeight=a;this._layoutMeasurements.maxWidth=b;this._layoutMeasurements.maxHeight=c},handleLayoutResult:function(){this.saveMeasurements(this._layoutResult.contentWidth,
this._layoutResult.contentHeight,this._layoutResult.contentMinWidth,this._layoutResult.contentMinHeight);var a=this._layoutResult.viewPortHeight;this._actualVisibleWidth=this._layoutResult.viewPortWidth;this._actualVisibleHeight=a;this._actualMinVisibleWidth=this._layoutResult.contentMinWidth;this._actualMinVisibleHeight=this._layoutResult.contentMinHeight;this._viewPortBackground.set_x(Math.min(this.get_scrollX(),0));this._viewPortBackground.set_y(Math.min(this.get_scrollY(),0));this._viewPortBackground.set_width(Math.max(this.actualWidth,
this._actualVisibleWidth));this._viewPortBackground.set_height(Math.max(this.actualHeight,this._actualVisibleHeight));w.__implements(this.get_layout(),Tn)?(a=this.get_layout(),this._snapPositionsX=a.getSnapPositionsX(this._layoutItems,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsX),this._snapPositionsY=a.getSnapPositionsY(this._layoutItems,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsY)):this._snapPositionsY=this._snapPositionsX=null},advancedLayoutViewPort_layout_changeHandler:function(a){this._ignoreLayoutChanges||
(this._layoutActive?this._layoutChanged=!0:this.setInvalid(x.LAYOUT))},advancedLayoutViewPort_layout_scrollHandler:function(a){this._scroller!=null&&this._scroller.get_scrolling()&&(this._scroller.applyLayoutShift(a.x,a.y),this._layoutActive?this._layoutChanged=!0:this.setInvalid(x.LAYOUT))},__class__:Wk,__properties__:I(fa.prototype.__properties__,{set_scroller:"set_scroller",get_scroller:"get_scroller",get_snapPositionsY:"get_snapPositionsY",get_snapPositionsX:"get_snapPositionsX",set_scrollY:"set_scrollY",
get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_layout:"set_layout",get_layout:"get_layout",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_minVisibleHeight:"set_minVisibleHeight",get_minVisibleHeight:"get_minVisibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",
set_minVisibleWidth:"set_minVisibleWidth",get_minVisibleWidth:"get_minVisibleWidth"})});var ap=function(){this._manageChildVisibility=!1;this._snapPositionsX=this._snapPositionsY=null;this._scrollX=this._scrollY=0;this._explicitVisibleHeight=null;this._actualVisibleHeight=0;this._maxVisibleHeight=1/0;this._actualMinVisibleHeight=0;this._explicitVisibleWidth=null;this._actualVisibleWidth=0;this._maxVisibleWidth=1/0;this._explicitMinVisibleWidth=null;this._actualMinVisibleWidth=0;pb.call(this);this._viewPortBackground=
new Da;this._viewPortBackground.get_graphics().beginFill(16711935,0);this._viewPortBackground.get_graphics().drawRect(0,0,1,1);this._viewPortBackground.get_graphics().endFill();this._addChildAt(this._viewPortBackground,0)};t["feathers.controls.supportClasses.LayoutViewPort"]=ap;ap.__name__="feathers.controls.supportClasses.LayoutViewPort";ap.__interfaces__=[nk];ap.__super__=pb;ap.prototype=I(pb.prototype,{_viewPortBackground:null,_actualMinVisibleWidth:null,_explicitMinVisibleWidth:null,get_minVisibleWidth:function(){return this._explicitMinVisibleWidth==
null?this._actualMinVisibleWidth:this._explicitMinVisibleWidth},set_minVisibleWidth:function(a){if(this._explicitMinVisibleWidth==a)return this._explicitMinVisibleWidth;var b=this._explicitMinVisibleWidth;this._explicitMinVisibleWidth=a;a==null?(this._actualMinVisibleWidth=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleWidth},_maxVisibleWidth:null,
get_maxVisibleWidth:function(){return this._maxVisibleWidth},set_maxVisibleWidth:function(a){if(this._maxVisibleWidth==a)return this._maxVisibleWidth;if(a==null)throw new Cb("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE);return this._maxVisibleWidth},_actualVisibleWidth:null,_explicitVisibleWidth:null,get_visibleWidth:function(){return this._explicitVisibleWidth==
null?this._actualVisibleWidth:this._explicitVisibleWidth},set_visibleWidth:function(a){if(this._explicitVisibleWidth==a)return this._explicitVisibleWidth;this._explicitVisibleWidth=a;this._actualVisibleWidth!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_actualMinVisibleHeight:null,_explicitMinVisibleHeight:null,get_minVisibleHeight:function(){return this._explicitMinVisibleHeight==null?this._actualMinVisibleHeight:this._explicitMinVisibleHeight},set_minVisibleHeight:function(a){if(this._explicitMinVisibleHeight==
a)return this._explicitMinVisibleHeight;var b=this._explicitMinVisibleHeight;this._explicitMinVisibleHeight=a;a==null?(this._actualMinVisibleHeight=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleHeight},_maxVisibleHeight:null,get_maxVisibleHeight:function(){return this._maxVisibleHeight},set_maxVisibleHeight:function(a){if(this._maxVisibleHeight==
a)return this._maxVisibleHeight;if(a==null)throw new Cb("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE);return this._maxVisibleHeight},_actualVisibleHeight:null,_explicitVisibleHeight:null,get_visibleHeight:function(){return this._explicitVisibleHeight==null?this._actualVisibleHeight:this._explicitVisibleHeight},set_visibleHeight:function(a){if(this._explicitVisibleHeight==
a)return this._explicitVisibleHeight;this._explicitVisibleHeight=a;this._actualVisibleHeight!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;(this._manageChildVisibility||w.__implements(this._currentLayout,ff))&&this.setInvalid(x.LAYOUT);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==
a)return this._scrollY;this._scrollY=a;(this._manageChildVisibility||w.__implements(this._currentLayout,ff))&&this.setInvalid(x.LAYOUT);return this._scrollY},_snapPositionsX:null,get_snapPositionsX:function(){return this._snapPositionsX},_snapPositionsY:null,get_snapPositionsY:function(){return this._snapPositionsY},refreshViewPortBounds:function(){var a=this._explicitVisibleWidth==null,b=this._explicitVisibleHeight==null,c=this._explicitMinVisibleWidth==null,d=this._explicitMinVisibleHeight==null,
f=this._maxVisibleWidth==null,g=this._maxVisibleHeight==null;this._currentBackgroundSkin!=null&&df.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=this.get_autoSizeMode()==Ve.CONTENT||this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ea);var q=this.globalToLocal(new Ea(this.stage.stageWidth,this.stage.stageHeight));n=q.x-l.x;l=q.y-l.y}this._layoutMeasurements.width=a&&!h?n:this._explicitVisibleWidth;this._layoutMeasurements.height=b&&!h?l:this._explicitVisibleHeight;
a=this._explicitMinVisibleWidth;c&&(a=0);c=this._explicitMinVisibleHeight;d&&(c=0);d=this._maxVisibleWidth;f&&(d=1/0);f=this._maxVisibleHeight;g&&(f=1/0);this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.get_width()>a&&(a=this._currentBackgroundSkin.get_width()),this._currentBackgroundSkin.get_height()>c&&(c=this._currentBackgroundSkin.get_height()));this._layoutMeasurements.minWidth=a;this._layoutMeasurements.minHeight=c;this._layoutMeasurements.maxWidth=d;this._layoutMeasurements.maxHeight=
f},handleCustomLayout:function(){var a=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;if(w.__implements(this._currentLayout,ff)){var b=this._currentLayout;b.set_scrollX(this._scrollX);b.set_scrollY(this._scrollY)}this._ignoreLayoutChanges=a;pb.prototype.handleCustomLayout.call(this)},handleLayoutResult:function(){this.saveMeasurements(this._layoutResult.contentWidth,this._layoutResult.contentHeight,this._layoutResult.contentMinWidth,this._layoutResult.contentMinHeight);var a=this._layoutResult.viewPortHeight;
this._actualVisibleWidth=this._layoutResult.viewPortWidth;this._actualVisibleHeight=a;this._actualMinVisibleWidth=this._layoutResult.contentMinWidth;this._actualMinVisibleHeight=this._layoutResult.contentMinHeight;this._viewPortBackground.set_x(Math.min(this.get_scrollX(),0));this._viewPortBackground.set_y(Math.min(this.get_scrollY(),0));this._viewPortBackground.set_width(Math.max(this.actualWidth,this._actualVisibleWidth));this._viewPortBackground.set_height(Math.max(this.actualHeight,this._actualVisibleHeight));
w.__implements(this.get_layout(),Tn)?(a=this.get_layout(),this._snapPositionsX=a.getSnapPositionsX(this.items,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsX),this._snapPositionsY=a.getSnapPositionsY(this.items,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsY)):this._snapPositionsY=this._snapPositionsX=null},_manageChildVisibility:null,get_manageChildVisibility:function(){return this._manageChildVisibility},set_manageChildVisibility:function(a){if(this._manageChildVisibility==
a)return this._manageChildVisibility;if(this._manageChildVisibility=a)this.setInvalid(x.LAYOUT);else{a=0;for(var b=this.items;a<b.length;){var c=b[a];++a;c.set_visible(!0)}}return this._manageChildVisibility},update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.SCROLL);pb.prototype.update.call(this);if((a||b||c)&&this._manageChildVisibility){a=this._scrollX+this._actualVisibleWidth;b=this._scrollY+this._actualVisibleHeight;c=0;for(var d=this.items;c<d.length;){var f=
d[c];++c;f.set_visible(!(f.get_x()>a||f.get_x()+f.get_width()<this._scrollX||f.get_y()>b||f.get_y()+f.get_height()<this._scrollY))}}},refreshChildVisibility:function(){if(this._manageChildVisibility)for(var a=this._scrollX+this._actualVisibleWidth,b=this._scrollY+this._actualVisibleHeight,c=0,d=this.items;c<d.length;){var f=d[c];++c;f.set_visible(!(f.get_x()>a||f.get_x()+f.get_width()<this._scrollX||f.get_y()>b||f.get_y()+f.get_height()<this._scrollY))}},removeChild:function(a){this._manageChildVisibility&&
a!=null&&a.set_visible(!0);return pb.prototype.removeChild.call(this,a)},removeChildAt:function(a){a=pb.prototype.removeChildAt.call(this,a);this._manageChildVisibility&&a!=null&&a.set_visible(!0);return a},__class__:ap,__properties__:I(pb.prototype.__properties__,{set_manageChildVisibility:"set_manageChildVisibility",get_manageChildVisibility:"get_manageChildVisibility",get_snapPositionsY:"get_snapPositionsY",get_snapPositionsX:"get_snapPositionsX",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",
set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_minVisibleHeight:"set_minVisibleHeight",get_minVisibleHeight:"get_minVisibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",set_minVisibleWidth:"set_minVisibleWidth",
get_minVisibleWidth:"get_minVisibleWidth"})});var xp=function(){this._textFieldHasFocus=this._ignoreTextFieldScroll=!1;this._pendingSelectionAnchorIndex=this._pendingSelectionActiveIndex=-1;this._scrollX=this._scrollY=0;this._explicitVisibleHeight=null;this._actualVisibleHeight=0;this._maxVisibleHeight=1/0;this._actualMinVisibleHeight=0;this._explicitVisibleWidth=null;this._actualVisibleWidth=0;this._maxVisibleWidth=1/0;this._explicitMinVisibleWidth=null;this._paddingTop=this._paddingRight=this._paddingBottom=
this._paddingLeft=this._actualMinVisibleWidth=0;this._embedFonts=!1;this._previousText=this._previousTextFormat=this._previousWidth=this._savedLineMetrics=null;this._smoothScrolling=this._updatedTextStyles=!1;this._selectable=!0;this._maxChars=0;this._wordWrap=this._multiline=this._displayAsPassword=!1;this._textFieldType=0;fa.call(this);this.addEventListener("focusIn",m(this,this.textFieldViewPort_focusInHandler))};t["feathers.controls.supportClasses.TextFieldViewPort"]=xp;xp.__name__="feathers.controls.supportClasses.TextFieldViewPort";
xp.__interfaces__=[Th,Mb,re,nk];xp.__super__=fa;xp.prototype=I(fa.prototype,{_textField:null,get_textField:function(){return this._textField},_textFieldType:null,get_textFieldType:function(){return this._textFieldType},set_textFieldType:function(a){if(this._textFieldType==a)return this._textFieldType;this._textFieldType=a;this.setInvalid(x.DATA);return this._textFieldType},_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);
Y.dispatch(this,"change");return this._text},get_baseline:function(){if(this._textField==null)return 0;if(!(this._text!=null&&this._text.length>0)){this.get_textField().set_text("\u200b");var a=this.get_textField().get_y()+this.get_textField().getLineMetrics(0).ascent;this.get_textField().set_text("");return a}return this._textField.get_y()+this._textField.getLineMetrics(0).ascent},_wordWrap:null,get_wordWrap:function(){return this._wordWrap},set_wordWrap:function(a){if(this._wordWrap==a)return this._wordWrap;
this._wordWrap=a;this.setInvalid(x.DATA);return this._wordWrap},_multiline:null,get_multiline:function(){return this._multiline},set_multiline:function(a){if(this._multiline==a)return this._multiline;this._multiline=a;this.setInvalid(x.DATA);return this._multiline},___restrict:null,get_restrict:function(){return this.___restrict},set_restrict:function(a){if(this.___restrict==a)return this.___restrict;this.___restrict=a;this.setInvalid(x.DATA);return this.___restrict},_displayAsPassword:null,get_displayAsPassword:function(){return this._displayAsPassword},
set_displayAsPassword:function(a){if(this._displayAsPassword==a)return this._displayAsPassword;this._displayAsPassword=a;this.setInvalid(x.DATA);return this._displayAsPassword},_maxChars:null,get_maxChars:function(){return this._maxChars},set_maxChars:function(a){if(this._maxChars==a)return this._maxChars;this._maxChars=a;this.setInvalid(x.DATA);return this._maxChars},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;
this._selectable=a;this.setInvalid(x.DATA);return this._selectable},_smoothScrolling:null,get_smoothScrolling:function(){return this._smoothScrolling},set_smoothScrolling:function(a){if(this._smoothScrolling==a)return this._smoothScrolling;this._smoothScrolling=a;this.setInvalid(x.DATA);return this._smoothScrolling},_updatedTextStyles:null,_previousText:null,_previousTextFormat:null,_previousWidth:null,_savedLineMetrics:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_textFormat:null,get_textFormat:function(){return this._textFormat},
set_textFormat:function(a){if(this._textFormat==a)return this._textFormat;this._textFormat=a;this.setInvalid(x.STYLES);return this._textFormat},_embedFonts:null,get_embedFonts:function(){return this._embedFonts},set_embedFonts:function(a){if(this._embedFonts==a)return this._embedFonts;this._embedFonts=a;this.setInvalid(x.STYLES);return this._embedFonts},_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=
a;this.setInvalid(x.STYLES);return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;this.setInvalid(x.STYLES);return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;this.setInvalid(x.STYLES);return this._paddingBottom},
_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;this.setInvalid(x.STYLES);return this._paddingLeft},get_stageFocusTarget:function(){return this._textField},_actualMinVisibleWidth:null,_explicitMinVisibleWidth:null,get_minVisibleWidth:function(){return this._explicitMinVisibleWidth==null?this._actualMinVisibleWidth:this._explicitMinVisibleWidth},set_minVisibleWidth:function(a){if(this._explicitMinVisibleWidth==
a)return this._explicitMinVisibleWidth;var b=this._explicitMinVisibleWidth;this._explicitMinVisibleWidth=a;a==null?(this._actualMinVisibleWidth=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleWidth},_maxVisibleWidth:null,get_maxVisibleWidth:function(){return this._maxVisibleWidth},set_maxVisibleWidth:function(a){if(this._maxVisibleWidth==a)return this._maxVisibleWidth;
if(a==null)throw new Cb("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE);return this._maxVisibleWidth},_actualVisibleWidth:null,_explicitVisibleWidth:null,get_visibleWidth:function(){return this._explicitVisibleWidth==null?this._actualVisibleWidth:this._explicitVisibleWidth},set_visibleWidth:function(a){if(this._explicitVisibleWidth==a)return this._explicitVisibleWidth;
this._explicitVisibleWidth=a;this._actualVisibleWidth!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_actualMinVisibleHeight:null,_explicitMinVisibleHeight:null,get_minVisibleHeight:function(){return this._explicitMinVisibleHeight==null?this._actualMinVisibleHeight:this._explicitMinVisibleHeight},set_minVisibleHeight:function(a){if(this._explicitMinVisibleHeight==a)return this._explicitMinVisibleHeight;var b=this._explicitMinVisibleHeight;this._explicitMinVisibleHeight=a;a==null?(this._actualMinVisibleHeight=
0,this.setInvalid(x.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleHeight},_maxVisibleHeight:null,get_maxVisibleHeight:function(){return this._maxVisibleHeight},set_maxVisibleHeight:function(a){if(this._maxVisibleHeight==a)return this._maxVisibleHeight;if(a==null)throw new Cb("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=
a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE);return this._maxVisibleHeight},_actualVisibleHeight:null,_explicitVisibleHeight:null,get_visibleHeight:function(){return this._explicitVisibleHeight==null?this._actualVisibleHeight:this._explicitVisibleHeight},set_visibleHeight:function(a){if(this._explicitVisibleHeight==a)return this._explicitVisibleHeight;this._explicitVisibleHeight=a;this._actualVisibleHeight!=a&&this.setInvalid(x.SIZE);
return this._explicitVisibleWidth},_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;this.setInvalid(x.SCROLL);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==a)return this._scrollY;this._scrollY=a;this.setInvalid(x.SCROLL);return this._scrollY},_pendingSelectionAnchorIndex:null,get_selectionAnchorIndex:function(){return this._textField!=
null&&this._pendingSelectionAnchorIndex==-1?this._textField.get_caretIndex()==this._textField.get_selectionBeginIndex()?this._textField.get_selectionEndIndex():this._textField.get_selectionBeginIndex():this._pendingSelectionAnchorIndex},_pendingSelectionActiveIndex:null,get_selectionActiveIndex:function(){return this._textField!=null&&this._pendingSelectionActiveIndex==-1?this._textField.get_caretIndex():this._pendingSelectionActiveIndex},_textFieldHasFocus:null,_ignoreTextFieldScroll:null,setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},selectRange:function(a,b){this._pendingSelectionAnchorIndex=a;this._pendingSelectionActiveIndex=b;this.setInvalid(x.SELECTION)},initialize:function(){fa.prototype.initialize.call(this);this._textField==null&&(this._textField=new Jc,this.addChild(this._textField));this._textField.set_selectable(!0);this._textField.set_tabEnabled(!1);this._textField.set_mouseWheelEnabled(!1);this._textField.addEventListener("change",m(this,
this.textFieldViewPort_textField_changeHandler));this._textField.addEventListener("scroll",m(this,this.textFieldViewPort_textField_scrollHandler));this._textField.addEventListener("focusIn",m(this,this.textFieldViewPort_textField_focusInHandler));this._textField.addEventListener("focusOut",m(this,this.textFieldViewPort_textField_focusOutHandler))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STYLES);this._updatedTextStyles=
!1;var f=this._ignoreTextFieldScroll;this._ignoreTextFieldScroll=!0;d&&this.refreshTextStyles();(a||c||d)&&this.refreshText();this.measure();b&&this.refreshSelection();this.layoutTextField();this._ignoreTextFieldScroll=f},measureSelf:function(){var a=this._explicitVisibleWidth==null,b=this.get_explicitHeight()==null,c=this._explicitMinVisibleWidth==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=
this._explicitVisibleWidth;a&&(h=this._paddingLeft+this._paddingRight);a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight+this._paddingTop+this._paddingBottom);b=this._explicitMinVisibleWidth;c&&(b=this._paddingLeft+this._paddingRight);c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight+this._paddingTop+this._paddingBottom);d=this.get_explicitMaxWidth();f&&(d=1/0);f=this.get_explicitMaxHeight();g&&(f=1/0);return this.saveMeasurements(h,a,b,c,d,f)},measure:function(){var a=this.measureSelf(),
b=this._explicitVisibleHeight==null,c=this._explicitMinVisibleWidth==null,d=this._explicitMinVisibleHeight==null;this._actualVisibleWidth=this._explicitVisibleWidth==null?this.actualWidth:this._explicitVisibleWidth;this._actualVisibleHeight=b?this.actualHeight:this._explicitVisibleHeight;this._actualMinVisibleWidth=c?this.actualMinWidth:this._explicitMinVisibleWidth;this._actualMinVisibleHeight=d?this.actualMinHeight:this._explicitMinVisibleHeight;return a},refreshTextStyles:function(){this._textField.get_embedFonts()!=
this._embedFonts&&(this._textField.set_embedFonts(this._embedFonts),this._updatedTextStyles=!0);this._textFormat!=this._previousTextFormat&&(this._textField.set_defaultTextFormat(this._textFormat),this._updatedTextStyles=!0,this._previousTextFormat=this._textFormat)},refreshText:function(){var a=this._enabled?this._textFieldType:0;this._textField.get_type()!=a&&this._textField.set_type(a);a=this._explicitVisibleWidth!=null&&this._wordWrap;this._textField.get_wordWrap()!=a&&(this._textField.set_wordWrap(a),
this._updatedTextStyles=!0);this._textField.get_multiline()!=this._multiline&&(this._textField.set_multiline(this._multiline),this._updatedTextStyles=!0);this._textField.set_restrict(this.___restrict);this._textField.set_displayAsPassword(this._displayAsPassword);this._textField.set_maxChars(this._maxChars);this._textField.set_selectable(this._selectable);a=this._explicitVisibleWidth;a!=null&&(a-=this._paddingLeft+this._paddingRight,a<0&&(a=0));if(this._text!=this._previousText||this._updatedTextStyles||
a!=this._previousWidth){a!=null&&this._textField.set_width(a);this._textField.set_autoSize(1);var b=this._text!=null&&this._text.length>0;b?this._textField.set_text(this._text):this._textField.set_text("\u200b");this._savedLineMetrics=this._textField.getLineMetrics(0);this._textMeasuredWidth=this._textField.get_width();this._textMeasuredHeight=4+(this._savedLineMetrics.height+this._savedLineMetrics.leading)*this._textField.get_numLines();this._textField.set_autoSize(2);b||this._textField.set_text("");
this._previousText=this._text;this._previousWidth=a}},refreshSelection:function(){if(this._pendingSelectionActiveIndex!=-1||this._pendingSelectionAnchorIndex!=-1){var a=this._pendingSelectionAnchorIndex,b=this._pendingSelectionActiveIndex;this._pendingSelectionActiveIndex=this._pendingSelectionAnchorIndex=-1;this._textField.setSelection(a,b)}},layoutTextField:function(){if(this._smoothScrolling){this._textField.set_x(this._paddingLeft);this._textField.set_y(this._paddingTop);var a=Math.max(this.actualHeight,
this._actualVisibleHeight),b=Math.max(this.actualWidth,this._actualVisibleWidth)-this._paddingLeft-this._paddingRight;b<0&&(b=0);this._textField.set_width(b);a=a-this._paddingTop-this._paddingBottom;a<0&&(a=0);this._textField.set_height(a);this._textField.set_scrollV(1)}else this._textField.set_x(this._paddingLeft+this._scrollX),this._textField.set_y(this._paddingTop+this._scrollY),b=this._actualVisibleWidth-this._paddingLeft-this._paddingRight,b<0&&(b=0),this._textField.set_width(b),a=this._actualVisibleHeight-
this._paddingTop-this._paddingBottom,a<0&&(a=0),this._textField.set_height(a),this._textField.get_textHeight(),a=Math.max(0,this.actualWidth-this._actualVisibleWidth),b=Math.max(0,this.actualHeight-this._actualVisibleHeight),this._textField.get_maxScrollV()==1||b==0?this._textField.set_scrollV(1):this._textField.set_scrollV(1+Math.ceil(this._scrollY/(this._savedLineMetrics.height+this._savedLineMetrics.leading))),this._textField.get_maxScrollH()==0||a==0?this._textField.set_scrollH(0):this._textField.set_scrollH(Math.round(this._textField.get_maxScrollH()*
(this._scrollX/a)))},textFieldViewPort_textField_changeHandler:function(a){a.stopPropagation();this.set_text(this._textField.get_text());if(this._textFieldHasFocus&&(a=w.__cast(this.parent,Ab),a.validateNow(),a.get_maxScrollY()>0)){var b=this._textField.get_caretIndex();if(b==this._textField.get_length()){if(b==0)return;--b;var c=this._textField.getLineIndexOfChar(b);b=this._textField.get_text().charAt(b);b!="\n"&&b!="\r"||++c}else c=this._textField.getLineIndexOfChar(b);if(this._smoothScrolling){b=
this._savedLineMetrics.height+this._savedLineMetrics.leading;c=a.get_maxScrollY()-(this._textField.get_numLines()-c-1)*b;b=c+(this._textField.get_numLines()-Math.floor(this.get_visibleHeight()/b))*b;var d=this._scrollY;c-d>0?d=c:d-b>0&&(d=b);a.set_scrollY(d)}else this._textField.get_maxScrollV()>1&&(c=this._textField.get_maxScrollV()-(this._textField.get_numLines()-c-1),b=c+(this._textField.get_numLines()-this._textField.get_maxScrollV()),b>this._textField.get_maxScrollV()&&(b=this._textField.get_maxScrollV()),
d=this._textField.get_scrollV(),c-d>0?d=c:d-b>0&&(d=b),d!=this._textField.get_scrollV()&&a.set_scrollY((d-1)*(this._savedLineMetrics.height+this._savedLineMetrics.leading)))}},textFieldViewPort_textField_focusInHandler:function(a){this._textFieldHasFocus=!0},textFieldViewPort_textField_focusOutHandler:function(a){this._textFieldHasFocus=!1},textFieldViewPort_textField_scrollHandler:function(a){this._ignoreTextFieldScroll||this._smoothScrolling||(a=w.__cast(this.parent,Ab),a.get_maxScrollY()>0&&this._textField.get_maxScrollV()>
1&&a.set_scrollY((this._textField.get_scrollV()-1)*(this._savedLineMetrics.height+this._savedLineMetrics.leading)))},textFieldViewPort_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this._textField&&(a.stopImmediatePropagation(),this.stage.set_focus(this._textField))},__class__:xp,__properties__:I(fa.prototype.__properties__,{get_selectionActiveIndex:"get_selectionActiveIndex",get_selectionAnchorIndex:"get_selectionAnchorIndex",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",
set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_minVisibleHeight:"set_minVisibleHeight",get_minVisibleHeight:"get_minVisibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",set_minVisibleWidth:"set_minVisibleWidth",
get_minVisibleWidth:"get_minVisibleWidth",get_stageFocusTarget:"get_stageFocusTarget",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_smoothScrolling:"set_smoothScrolling",
get_smoothScrolling:"get_smoothScrolling",set_selectable:"set_selectable",get_selectable:"get_selectable",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_restrict:"set_restrict",get_restrict:"get_restrict",set_multiline:"set_multiline",get_multiline:"get_multiline",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text",set_textFieldType:"set_textFieldType",
get_textFieldType:"get_textFieldType",get_textField:"get_textField"})});var Un=function(){};t["feathers.core.IFocusManager"]=Un;Un.__name__="feathers.core.IFocusManager";Un.__isInterface__=!0;Un.__interfaces__=[Db];Un.prototype={get_root:null,get_focus:null,set_focus:null,get_focusPane:null,get_showFocusIndicator:null,get_enabled:null,set_enabled:null,findNextFocus:null,dispose:null,__class__:Un,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled",get_showFocusIndicator:"get_showFocusIndicator",
get_focusPane:"get_focusPane",set_focus:"set_focus",get_focus:"get_focus",get_root:"get_root"}};var Pl=function(a){this._showFocusIndicator=this._cancelMouseFocusChange=!1;this._root=this._focusPane=null;this._enabled=!0;qa.call(this);this.set_root(a)};t["feathers.core.DefaultFocusManager"]=Pl;Pl.__name__="feathers.core.DefaultFocusManager";Pl.__interfaces__=[Un];Pl.__super__=qa;Pl.prototype=I(qa.prototype,{_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){if(this._enabled==
a)return this._enabled;if(a&&this._root==null)throw new ob("Cannot enable focus manager without a root container.");this._enabled=a;this._root.stage!=null&&(this._enabled?this.restoreFocus():this.set_focus(null));return this._enabled},_root:null,get_root:function(){return this._root},set_root:function(a){if(this._root==a)return this._root;this._root!=null&&(this.clearFocusManager(this._root),this._root.removeEventListener("addedToStage",m(this,this.defaultFocusManager_root_addedToStageHandler)),this._root.removeEventListener("removedFromStage",
m(this,this.defaultFocusManager_root_removedFromStageHandler)),this._root.removeEventListener("added",m(this,this.defaultFocusManager_root_addedHandler)),this._root.removeEventListener("removed",m(this,this.defaultFocusManager_root_removedHandler)),this._root.removeEventListener("mouseDown",m(this,this.defaultFocusManager_root_mouseDownCaptureHandler),!0),this._root.removeEventListener("focusIn",m(this,this.defaultFocusManager_root_focusInCaptureHandler),!0),this._root.removeEventListener("mouseFocusChange",
m(this,this.defaultFocusManager_root_mouseFocusChangeHandler)),this._root.removeEventListener("activate",m(this,this.defaultFocusManager_root_activateHandler)),this._root.removeEventListener("deactivate",m(this,this.defaultFocusManager_root_deactivateHandler)),this.handleRootRemovedFromStage(this._root.stage));this._root=a;this._root!=null&&(this.handleRootAddedToStage(this._root),this.setFocusManager(this._root),this._root.addEventListener("addedToStage",m(this,this.defaultFocusManager_root_addedToStageHandler),
!1,0,!0),this._root.addEventListener("removedFromStage",m(this,this.defaultFocusManager_root_removedFromStageHandler),!1,0,!0),this._root.addEventListener("added",m(this,this.defaultFocusManager_root_addedHandler),!1,0,!0),this._root.addEventListener("removed",m(this,this.defaultFocusManager_root_removedHandler),!1,0,!0),this._root.addEventListener("mouseDown",m(this,this.defaultFocusManager_root_mouseDownCaptureHandler),!0,0,!0),this._root.addEventListener("focusIn",m(this,this.defaultFocusManager_root_focusInCaptureHandler),
!0,0,!0),this._root.addEventListener("mouseFocusChange",m(this,this.defaultFocusManager_root_mouseFocusChangeHandler),!1,0,!0),this._root.addEventListener("activate",m(this,this.defaultFocusManager_root_activateHandler),!1,0,!0),this._root.addEventListener("deactivate",m(this,this.defaultFocusManager_root_deactivateHandler),!1,0,!0));return this._root},_focusPane:null,get_focusPane:function(){this._focusPane==null&&(this._focusPane=new Da,this._focusPane.mouseEnabled=!1,this._focusPane.mouseChildren=
!1,this._focusPane.set_tabEnabled(!1),this._focusPane.set_tabChildren(!1),Aa.forStage(this._root.stage).addPopUp(this._focusPane,!1,!1));return this._focusPane},_showFocusIndicator:null,get_showFocusIndicator:function(){return this._showFocusIndicator},_focusToRestore:null,get_focus:function(){return this._root.stage==null?null:this.findFocusForDisplayObject(this._root.stage.get_focus())},set_focus:function(a){if(this._enabled&&this._root.stage!=null&&this.findFocusForDisplayObject(this._root.stage.get_focus())==
a)return this.setStageFocus(w.__cast(a,Ja)),this.get_focus();if(a!=null&&a.get_focusManager()!=this)throw new Cb("Failed to change focus. Object is not managed by this focus manager: "+H.string(a));this._enabled&&this._root.stage!=null&&this.setStageFocus(w.__cast(a,Ja));return this.get_focus()},_wrapObject:null,_cancelMouseFocusChange:null,dispose:function(){this.get_focus()!=null&&this.set_focus(null);this._focusPane!=null&&(this._focusPane.parent!=null&&this._focusPane.parent.removeChild(this._focusPane),
this._focusPane=null);var a=this._root;this.set_root(null);this._root=a;Y.dispatch(this,"clear");this._root=null},findNextFocus:function(a){a==null&&(a=!1);return this.findNextFocusInternal(a).newFocus},findNextFocusInternal:function(a){a==null&&(a=!1);var b=null,c=!1,d=this.get_focus();d!=null&&d.get_focusOwner()!=null?(a=d.get_focusOwner(),a!=null&&a.get_focusManager()!=this&&(a=null),a!=null&&(b=a)):a?(d!=null&&d.parent!=null&&(b=this.findPreviousContainerFocus(d.parent,w.__cast(d,ma),!0)),b==
null&&(b=this.findPreviousChildFocus(this._root),c=d!=null)):(d!=null&&(w.__implements(d,ng)&&d.get_childFocusEnabled()?b=this.findNextContainerFocus(w.__cast(d,zb),null,!0):d.parent!=null&&(b=this.findNextContainerFocus(d.parent,w.__cast(d,ma),!0))),b==null&&(b=this.findNextChildFocus(this._root),c=d!=null));return new Gm(b,c)},findNextRelativeFocusInternal:function(a){switch(a){case 37:a=ra.LEFT;break;case 38:a=ra.TOP;break;case 39:a=ra.RIGHT;break;case 40:a=ra.BOTTOM;break;default:return new Gm(null,
!1)}var b=this.get_focus(),c=Vn.findAllFocusableObjects(this._root);if(b==null)return c.length>0?new Gm(c[0],!1):new Gm(null,!1);for(var d=b,f=w.__cast(b,ma).getBounds(b.stage),g=0;g<c.length;){var h=c[g];++g;h!=b&&this.isValidFocus(h)&&wi.isBetterFocusForRelativePosition(w.__cast(h,ma),w.__cast(d,ma),f,a)&&(d=h)}return new Gm(d,!1)},isValidFocusWithKeyboard:function(a){return a instanceof Ja&&!a.get_tabEnabled()?!1:this.isValidFocus(a)},isValidFocus:function(a,b){b==null&&(b=!1);return a==null||
a.stage==null||a.get_focusManager()!=this||!a.get_focusEnabled()||!a.get_visible()||w.__implements(a,Fa)&&!a.get_enabled()||!b&&Aa.forStage(this._root.stage).hasModalPopUps()&&(a=w.__cast(a,ma),!Ly.isTopLevelPopUpOrIsContainedByTopLevelPopUp(a))?!1:!0},setFocusManager:function(a){w.__implements(a,Mb)&&a.set_focusManager(this);a=a instanceof zb?a:null;if(a!=null){for(var b=0,c=a.get_numChildren();b<c;){var d=b++;d=a.getChildAt(d);this.setFocusManager(d)}if(w.__implements(a,mi)){c=a.get_focusExtrasBefore();
if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.setFocusManager(d);c=a.get_focusExtrasAfter();if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.setFocusManager(d)}}},clearFocusManager:function(a){if(w.__implements(a,Mb)&&a.get_focusManager()==this){a==this._focusToRestore&&(this._focusToRestore=null);if(this.get_focus()==a){var b=null;w.__implements(a,qd)&&(b=a.get_focusOwner());b!=null&&b.get_focusManager()!=this&&(b=null);this.set_focus(b)}a.set_focusManager(null)}a=a instanceof zb?a:null;if(a!=null){b=
0;for(var c=a.get_numChildren();b<c;){var d=b++;d=a.getChildAt(d);this.clearFocusManager(d)}if(w.__implements(a,mi)){c=a.get_focusExtrasBefore();if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.clearFocusManager(d);c=a.get_focusExtrasAfter();if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.clearFocusManager(d)}}},findPreviousContainerFocus:function(a,b,c){var d=a;w.__implements(a,nk)&&!w.__implements(a,ng)&&(d=a.parent);var f=b==null;if(w.__implements(d,mi)){var g=d.get_focusExtrasAfter();if(g!=null){var h=
g.length-1;if(!f){var n=g.indexOf(b);n!=-1&&(h=n-1,f=!0)}if(f)for(;h>=0;){n=g[h];n=this.findPreviousChildFocus(n);if(n!=null)return n;--h}}}h=a.get_numChildren()-1;if(!f){g=-1;try{g=a.getChildIndex(b)}catch(l){Pb.lastError=l}g!=-1&&(h=g-1,f=!0)}if(f)for(;h>=0;){n=a.getChildAt(h);n=this.findPreviousChildFocus(n);if(n!=null)return n;--h}if(w.__implements(d,mi)&&(g=d.get_focusExtrasBefore(),g!=null&&(h=g.length-1,f||(n=g.indexOf(b),n!=-1&&(h=n-1,f=!0)),f)))for(;h>=0;){n=g[h];n=this.findPreviousChildFocus(n);
if(n!=null)return n;--h}return c&&d!=this._root?w.__implements(d,qd)&&(a=d,this.isValidFocusWithKeyboard(a))?a:this.findPreviousContainerFocus(d.parent,d,!0):null},findNextContainerFocus:function(a,b,c){var d=a;w.__implements(a,nk)&&!w.__implements(a,ng)&&(d=a.parent);var f=b==null,g=null;w.__implements(d,Nh)&&(g=d.get_focusExclusions());if(w.__implements(d,mi)){var h=d.get_focusExtrasBefore();if(h!=null){var n=0;if(!f){var l=h.indexOf(b);l!=-1&&(n=l+1,f=!0)}if(f)for(l=h.length;n<l;){var q=n++;q=
h[q];if(g==null||g.indexOf(q)==-1)if(q=this.findNextChildFocus(q),q!=null)return q}}}n=0;if(!f){h=-1;try{h=a.getChildIndex(b)}catch(u){Pb.lastError=u}h!=-1&&(n=h+1,f=!0)}if(f)for(l=a.get_numChildren();n<l;)if(q=n++,q=a.getChildAt(q),g==null||g.indexOf(q)==-1)if(q=this.findNextChildFocus(q),q!=null)return q;if(w.__implements(d,mi)&&(h=d.get_focusExtrasAfter(),h!=null&&(n=0,f||(l=h.indexOf(b),l!=-1&&(n=l+1,f=!0)),f)))for(l=h.length;n<l;)if(q=n++,q=h[q],g==null||g.indexOf(q)==-1)if(q=this.findNextChildFocus(q),
q!=null)return q;return c&&d!=this._root&&d.parent!=null&&(q=this.findNextContainerFocus(d.parent,d,!0),q!=null)?q:null},findPreviousChildFocus:function(a){var b=a instanceof zb?a:null;if(b!=null){var c=!w.__implements(b,qd);!c&&w.__implements(b,ng)&&(c=b.get_childFocusEnabled());if(c&&(b=this.findPreviousContainerFocus(b,null,!1),b!=null))return b}if(w.__implements(a,qd)&&this.isValidFocusWithKeyboard(a)){if(!w.__implements(a,mk))return a;b=a.get_toggleGroup();if(b==null||w.__implements(b.get_selectedItem(),
qd)&&(a=b.get_selectedItem(),this.get_focus()!=a))return a}return null},findNextChildFocus:function(a){if(w.__implements(a,qd)&&this.isValidFocusWithKeyboard(a)){if(!w.__implements(a,mk))return a;var b=a.get_toggleGroup();if(b==null)return a;if(w.__implements(b.get_selectedItem(),qd)&&(b=b.get_selectedItem(),this.get_focus()!=b))return b}a=a instanceof zb?a:null;return a!=null&&(b=!w.__implements(a,qd),!b&&w.__implements(a,ng)&&(b=a.get_childFocusEnabled()),b&&(a=this.findNextContainerFocus(a,null,
!1),a!=null))?a:null},setStageFocus:function(a){for(;w.__implements(a,Th);){var b=a.get_stageFocusTarget();if(b==null)break;a=b}a==null&&(a=this._root.stage);this._root.stage.window!=null&&this._root.stage.get_focus()!=a&&this._root.stage.set_focus(a)},handleRootAddedToStage:function(a){a=this._root.stage;a!=null&&(a.stageFocusRect=!1,this._enabled&&a.get_focus()==null&&a.set_focus(a),this._root.addEventListener("keyDown",m(this,this.defaultFocusManager_root_keyDownHandler),!1,0,!0),this._root.addEventListener("keyFocusChange",
m(this,this.defaultFocusManager_root_keyFocusChangeHandler),!1,0,!0))},handleRootRemovedFromStage:function(a){this.set_focus(null);this._root.stage!=null&&(this._root.removeEventListener("keyDown",m(this,this.defaultFocusManager_root_keyDownHandler)),this._root.removeEventListener("keyFocusChange",m(this,this.defaultFocusManager_root_keyFocusChangeHandler)))},defaultFocusManager_root_addedToStageHandler:function(a){this.handleRootAddedToStage(w.__cast(a.currentTarget,ma))},defaultFocusManager_root_removedFromStageHandler:function(a){this.handleRootRemovedFromStage(w.__cast(a.currentTarget,
ma))},restoreFocus:function(){this._root.stage!=null&&this._focusToRestore!=null&&this.isValidFocus(this._focusToRestore)&&this.set_focus(this._focusToRestore)},shouldBeManaged:function(a){if(a==this._root)return!0;var b=a.parent,c=!1;try{c=b.getChildIndex(a)!=-1}catch(n){Pb.lastError=n}if(c&&w.__implements(b,nk)&&!w.__implements(b,ng))b=b.parent;else if(!c&&w.__implements(b,mi)){var d=b;if(d.get_focusExtrasBefore()!=null)for(var f=0,g=d.get_focusExtrasBefore();f<g.length;){var h=g[f];++f;if(h==a){c=
!0;break}if(h instanceof zb&&(c=h.contains(h)))break}if(!c&&d.get_focusExtrasAfter()!=null)for(f=0,g=d.get_focusExtrasAfter();f<g.length;){h=g[f];++f;if(h==a){c=!0;break}if(h instanceof zb&&(c=h.contains(h)))break}}return c?b!=null&&b!=this._root?this.shouldBeManaged(b):!0:!1},defaultFocusManager_root_addedHandler:function(a){a=w.__cast(a.target,ma);this._focusPane==null||this._focusPane!=a&&!this._focusPane.contains(a)?(this.shouldBeManaged(a)&&this.setFocusManager(a),a=null,this._root.stage!=null&&
(a=this.findFocusForDisplayObject(this._root.stage.get_focus(),!0)),a==null||this.isValidFocus(a)||this.set_focus(null)):Aa.forStage(this._root.stage).addPopUp(this._focusPane,!1,!1)},defaultFocusManager_root_removedHandler:function(a){a=w.__cast(a.target,ma);this.clearFocusManager(a)},defaultFocusManager_root_mouseFocusChangeHandler:function(a){if(a.isDefaultPrevented())this._cancelMouseFocusChange=!0;else if(this._enabled){this._showFocusIndicator=!1;var b=a.relatedObject;b=b instanceof Jc?b:null;
if(b!=null){if(b.get_type()==1||b.get_selectable())return;for(var c=w.__cast(this.findFocusForDisplayObject(b),ma);w.__implements(c,Th);){var d=c.get_stageFocusTarget();if(d==null)break;c=d}if(b==c)return}a.preventDefault()}},handleKeyDownFocusWrapping:function(a){vd.playerType=="StandAlone"||vd.playerType=="Desktop"||!this._enabled||a.isDefaultPrevented()||a.keyCode!=9&&a.keyCode!=0||(this._wrapObject!=null&&(this._wrapObject.get_tabIndex()==Pl.WRAP_OBJECT_HIGH_TAB_INDEX&&this._wrapObject.set_tabIndex(-1),
this._wrapObject=null),this.findNextFocusInternal(a.shiftKey).wrapped&&(this._wrapObject=this._root.stage.get_focus(),this._wrapObject!=null&&this._wrapObject.get_tabIndex()==-1&&this._wrapObject.set_tabIndex(a.shiftKey?0:Pl.WRAP_OBJECT_HIGH_TAB_INDEX)))},handleDPadArrowKeys:function(a){a.keyLocation!=4||a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39||a.isDefaultPrevented()||(this._showFocusIndicator=!0,a=this.findNextRelativeFocusInternal(a.keyCode),this.set_focus(a.newFocus))},defaultFocusManager_root_keyDownHandler:function(a){this.handleKeyDownFocusWrapping(a);
this.handleDPadArrowKeys(a)},defaultFocusManager_root_keyFocusChangeHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==9||a.keyCode==0)){this._showFocusIndicator=!0;var b=this.findNextFocusInternal(a.shiftKey);this.set_focus(b.newFocus);this._wrapObject==null?a.preventDefault():this._wrapObject instanceof Jc&&this._wrapObject.get_type()==1&&a.preventDefault()}},findFocusForDisplayObject:function(a,b){b==null&&(b=!1);if(a==null)return null;var c=null;do{if(w.__implements(a,
qd)){var d=a;this.isValidFocus(d,b)?c!=null&&w.__implements(d,ng)&&d.get_childFocusEnabled()||(c=d):d.get_focusOwner()!=null&&this.isValidFocus(d.get_focusOwner(),b)&&(c=d.get_focusOwner(),a=w.__cast(d,ma))}if(a==this._root)break;a=a.parent}while(a!=null);return c},defaultFocusManager_root_mouseDownCaptureHandler:function(a){this._showFocusIndicator=!1;this._cancelMouseFocusChange?this._cancelMouseFocusChange=!1:this._enabled&&(a=this.findFocusForDisplayObject(a.target),this.set_focus(a))},defaultFocusManager_root_focusInCaptureHandler:function(a){this._enabled&&
(this._focusToRestore=this.findFocusForDisplayObject(w.__cast(a.target,ma)))},defaultFocusManager_root_activateHandler:function(a){this._enabled&&this.restoreFocus()},defaultFocusManager_root_deactivateHandler:function(a){this._enabled&&this.set_focus(null)},__class__:Pl,__properties__:{set_focus:"set_focus",get_focus:"get_focus",get_showFocusIndicator:"get_showFocusIndicator",get_focusPane:"get_focusPane",set_root:"set_root",get_root:"get_root",set_enabled:"set_enabled",get_enabled:"get_enabled"}});
var Gm=function(a,b){this.newFocus=a;this.wrapped=b};t["feathers.core._DefaultFocusManager.FocusResult"]=Gm;Gm.__name__="feathers.core._DefaultFocusManager.FocusResult";Gm.prototype={newFocus:null,wrapped:null,__class__:Gm};var yt=function(){};t["feathers.core.IPopUpManager"]=yt;yt.__name__="feathers.core.IPopUpManager";yt.__isInterface__=!0;yt.prototype={get_overlayFactory:null,set_overlayFactory:null,get_root:null,set_root:null,get_popUpCount:null,get_topLevelPopUpCount:null,getPopUpAt:null,isPopUp:null,
isTopLevelPopUp:null,isModal:null,hasModalPopUps:null,addPopUp:null,removePopUp:null,removeAllPopUps:null,centerPopUp:null,bringToFront:null,__class__:yt,__properties__:{get_topLevelPopUpCount:"get_topLevelPopUpCount",get_popUpCount:"get_popUpCount",set_root:"set_root",get_root:"get_root",set_overlayFactory:"set_overlayFactory",get_overlayFactory:"get_overlayFactory"}};var Wn=function(a){this._popUpToOverlay=new Ta;this._centeredPopUps=[];this.popUps=[];this._ignoreRemoval=!1;this.set_root(a)};t["feathers.core.DefaultPopUpManager"]=
Wn;Wn.__name__="feathers.core.DefaultPopUpManager";Wn.__interfaces__=[yt];Wn.defaultOverlayFactory=function(){var a=new Da;a.get_graphics().beginFill(8421504,.75);a.get_graphics().drawRect(0,0,1,1);a.get_graphics().endFill();return a};Wn.prototype={_ignoreRemoval:null,_root:null,get_root:function(){return this._root},set_root:function(a){if(this._root==a)return this._root;if(a.stage==null)throw new Cb("DefaultPopUpManager root's stage property must not be null.");var b=this._ignoreRemoval;this._ignoreRemoval=
!0;for(var c=0,d=this.popUps;c<d.length;){var f=d[c];++c;this._root.removeChild(f);var g=this._popUpToOverlay.h[f.__id__];g!=null&&this._root.removeChild(g)}this._ignoreRemoval=b;this._root=a;c=0;for(d=this.popUps;c<d.length;)f=d[c],++c,g=this._popUpToOverlay.h[f.__id__],g!=null&&this._root.addChild(g),this._root.addChild(f);return this._root},popUps:null,_centeredPopUps:null,_popUpToOverlay:null,_overlayFactory:null,get_overlayFactory:function(){return this._overlayFactory},set_overlayFactory:function(a){return this._overlayFactory==
a?this._overlayFactory:this._overlayFactory=a},get_popUpCount:function(){return this.popUps.length},get_topLevelPopUpCount:function(){for(var a=0,b=this.popUps.length-1;b>=0;){++a;if(this._popUpToOverlay.h[this.popUps[b].__id__]!=null)break;--b}return a},getPopUpAt:function(a){return this.popUps[a]},isPopUp:function(a){return this.popUps.indexOf(a)!=-1},isTopLevelPopUp:function(a){for(var b=this.popUps.length-1;b>=0;){var c=this.popUps[b];if(c==a)return!0;if(this._popUpToOverlay.h[c.__id__]!=null)break;
--b}return!1},isModal:function(a){return a==null?!1:this._popUpToOverlay.h[a.__id__]!=null},hasModalPopUps:function(){return this._popUpToOverlay.keys().hasNext()},addPopUp:function(a,b,c,d){c==null&&(c=!0);b==null&&(b=!0);var f=this.popUps.indexOf(a);f!=-1&&(this.cleanupOverlay(a),this.popUps.splice(f,1));b&&(d==null&&(d=this._overlayFactory),d==null&&(d=Wn.defaultOverlayFactory),b=d(),f=this._root.stage,d=this._root.globalToLocal(new Ea),f=this._root.globalToLocal(new Ea(f.stageWidth,f.stageHeight)),
b.set_x(d.x),b.set_y(d.y),b.set_width(f.x-d.x),b.set_height(f.y-d.y),this._root.addChild(b),this._popUpToOverlay.set(a,b));this.popUps.push(a);b=this._root.addChild(a);if(a.parent==null)return this.cleanupOverlay(a),V.remove(this.popUps,a),null;a.addEventListener("removedFromStage",m(this,this.defaultPopUpManager_popUp_removedFromStageHandler));this.popUps.length==1&&this._root.stage.addEventListener("resize",m(this,this.defaultPopUpManager_stage_resizeHandler),!1,0,!0);c&&(w.__implements(a,rb)&&
a.addEventListener("resize",m(this,this.defaultPopUpManager_popUp_resizeHandler)),this._centeredPopUps.push(a),this.centerPopUp(a));return b},removePopUp:function(a){return this.popUps.indexOf(a)==-1?a:this._root.removeChild(a)},removeAllPopUps:function(){for(var a=this.popUps.slice(),b=0;b<a.length;){var c=a[b];++b;this.isPopUp(c)&&this.removePopUp(c)}},centerPopUp:function(a){w.__implements(a,da)&&a.validateNow();var b=this._root.stage,c=this._root.globalToLocal(new Ea);b=this._root.globalToLocal(new Ea(b.stageWidth,
b.stageHeight));a.set_x(c.x+(b.x-c.x-a.get_width())/2);a.set_y(c.y+(b.y-c.y-a.get_height())/2)},bringToFront:function(a){if(!V.remove(this.popUps,a))throw new Sd("Not a popup");this.popUps.push(a);var b=this._popUpToOverlay.h[a.__id__];b!=null&&this._root.setChildIndex(b,this._root.get_numChildren()-1);this._root.setChildIndex(a,this._root.get_numChildren()-1)},cleanupOverlay:function(a){var b=this._popUpToOverlay.h[a.__id__];b!=null&&(this._root.removeChild(b),this._popUpToOverlay.remove(a))},defaultPopUpManager_popUp_removedFromStageHandler:function(a){this._ignoreRemoval||
(a=w.__cast(a.currentTarget,ma),a.removeEventListener("removedFromStage",m(this,this.defaultPopUpManager_popUp_removedFromStageHandler)),V.remove(this.popUps,a),this.cleanupOverlay(a),this.popUps.length==0&&this._root.stage.removeEventListener("resize",m(this,this.defaultPopUpManager_stage_resizeHandler)))},defaultPopUpManager_popUp_resizeHandler:function(a){a=w.__cast(a.currentTarget,ma);this.centerPopUp(a)},defaultPopUpManager_stage_resizeHandler:function(a){var b=w.__cast(a.currentTarget,gd);a=
this._root.globalToLocal(new Ea);b=this._root.globalToLocal(new Ea(b.stageWidth,b.stageHeight));for(var c=0,d=this.popUps;c<d.length;){var f=d[c];++c;f=this._popUpToOverlay.h[f.__id__];f!=null&&(f.set_x(a.x),f.set_y(a.y),f.set_width(b.x-a.x),f.set_height(b.y-a.y))}c=0;for(d=this._centeredPopUps;c<d.length;)f=d[c],++c,this.centerPopUp(f)},__class__:Wn,__properties__:{get_topLevelPopUpCount:"get_topLevelPopUpCount",get_popUpCount:"get_popUpCount",set_overlayFactory:"set_overlayFactory",get_overlayFactory:"get_overlayFactory",
set_root:"set_root",get_root:"get_root"}};var zt=function(){};t["feathers.core.IToolTipManager"]=zt;zt.__name__="feathers.core.IToolTipManager";zt.__isInterface__=!0;zt.prototype={get_root:null,dispose:null,__class__:zt,__properties__:{get_root:"get_root"}};var al=function(a){this._offsetX=this._offsetY=0;this._hideTime=-1;this._delay=.5;this._delayTimeoutID=null;this.initializeToolTipStyles();this._root=a;this._root.addEventListener("mouseMove",m(this,this.defaultToolTipManager_root_mouseMoveHandler),
!1,0,!0)};t["feathers.core.DefaultToolTipManager"]=al;al.__name__="feathers.core.DefaultToolTipManager";al.__interfaces__=[zt];al.prototype={_root:null,get_root:function(){return this._root},_target:null,_toolTip:null,_toolTipStageX:null,_toolTipStageY:null,_delayTimeoutID:null,_delay:null,_hideTime:null,_offsetX:null,_offsetY:null,dispose:function(){this.clearTarget();this._root!=null&&(this._root.removeEventListener("mouseMove",m(this,this.defaultToolTipManager_root_mouseMoveHandler)),this._root=
null)},initializeToolTipStyles:function(){Zw.initialize()},clearTarget:function(){this.hideToolTip();this._target!=null&&(this._target.removeEventListener("mouseDown",m(this,this.defaultToolTipManager_target_mouseDownHandler)),this._target.removeEventListener("rightMouseDown",m(this,this.defaultToolTipManager_target_rightMouseDownHandler)),this._target.removeEventListener("middleMouseDown",m(this,this.defaultToolTipManager_target_middleMouseDownHandler)),this._target.removeEventListener("rollOut",
m(this,this.defaultToolTipManager_target_rollOutHandler)),this._target.removeEventListener("removedFromStage",m(this,this.defaultToolTipManager_target_removedFromStageHandler)),this._target=null)},hideToolTip:function(){this._delayTimeoutID!=null&&(Pa.clearTimeout(this._delayTimeoutID),this._delayTimeoutID=null);this._toolTip!=null&&this._toolTip.parent!=null&&(Aa.removePopUp(w.__cast(this._toolTip,ma)),this._hideTime=Pa.getTimer())},hoverDelayCallback:function(){this._delayTimeoutID=null;if(this._target.get_toolTip()!=
null){if(this._toolTip==null){var a=new ia;a.set_variant(al.CHILD_VARIANT_TOOL_TIP);this._toolTip=a}this._toolTip instanceof Ja&&(a=this._toolTip,a.mouseEnabled=!1,a.set_tabEnabled(!1));this._toolTip instanceof zb&&(this._toolTip.mouseChildren=!1);w.__implements(this._toolTip,nd)&&(a=this._toolTip,a.get_variant()==null&&a.set_variant(al.CHILD_VARIANT_TOOL_TIP));this._toolTip.set_text(this._target.get_toolTip());w.__implements(this._toolTip,da)&&this._toolTip.validateNow();var b=this._target.stage,
c=Aa.forStage(b);a=c.get_root().globalToLocal(new Ea(this._toolTipStageX,this._toolTipStageY));b=c.get_root().globalToLocal(new Ea(b.stageWidth,b.stageHeight));c=a.x+this._offsetX;c<0?c=0:c+this._toolTip.get_width()>b.x&&(c=b.x-this._toolTip.get_width());a=a.y-this._toolTip.get_height()+this._offsetY;a<0?a=0:a+this._toolTip.get_height()>b.y&&(a=b.y-this._toolTip.get_height());this._toolTip.set_x(c);this._toolTip.set_y(a);Aa.addPopUp(w.__cast(this._toolTip,ma),w.__cast(this._target,ma),!1,!1)}},defaultToolTipManager_root_mouseMoveHandler:function(a){if(!a.buttonDown){for(var b=
w.__cast(a.target,ma);b!=null&&!w.__implements(b,Fa);)b=b.parent;w.__implements(b,Fa)?this._target==b?(this._toolTipStageX=a.stageX,this._toolTipStageY=a.stageY):(this.clearTarget(),this._target=b,this._target.get_toolTip()==null?this._target=null:(this._target.addEventListener("mouseDown",m(this,this.defaultToolTipManager_target_mouseDownHandler),!1,0,!0),this._target.addEventListener("rightMouseDown",m(this,this.defaultToolTipManager_target_rightMouseDownHandler),!1,0,!0),this._target.addEventListener("middleMouseDown",
m(this,this.defaultToolTipManager_target_middleMouseDownHandler),!1,0,!0),this._target.addEventListener("rollOut",m(this,this.defaultToolTipManager_target_rollOutHandler),!1,0,!0),this._target.addEventListener("removedFromStage",m(this,this.defaultToolTipManager_target_removedFromStageHandler),!1,0,!0),this._toolTipStageX=a.stageX,this._toolTipStageY=a.stageY,this._delayTimeoutID=Pa.setTimeout(m(this,this.hoverDelayCallback),this._delay*1E3|0))):this.clearTarget()}},defaultToolTipManager_target_mouseDownHandler:function(a){this.hideToolTip()},
defaultToolTipManager_target_rightMouseDownHandler:function(a){this.hideToolTip()},defaultToolTipManager_target_middleMouseDownHandler:function(a){this.hideToolTip()},defaultToolTipManager_target_rollOutHandler:function(a){this.clearTarget()},defaultToolTipManager_target_removedFromStageHandler:function(a){this.clearTarget()},__class__:al,__properties__:{get_root:"get_root"}};var No=R["feathers.core._FeathersControl.StyleDefinition"]={__ename__:"feathers.core._FeathersControl.StyleDefinition",__constructs__:null,
Name:(B=function(a){return{_hx_index:0,name:a,__enum__:"feathers.core._FeathersControl.StyleDefinition",toString:E}},B._hx_name="Name",B.__params__=["name"],B),NameAndState:(B=function(a,b){return{_hx_index:1,name:a,state:b,__enum__:"feathers.core._FeathersControl.StyleDefinition",toString:E}},B._hx_name="NameAndState",B.__params__=["name","state"],B)};No.__constructs__=[No.Name,No.NameAndState];var Cd=function(){};t["feathers.core.FocusManager"]=Cd;Cd.__name__="feathers.core.FocusManager";Cd.__properties__=
{set_focusManagerFactory:"set_focusManagerFactory",get_focusManagerFactory:"get_focusManagerFactory"};Cd.defaultFocusManagerFactory=function(a){return new Pl(a)};Cd.get_focusManagerFactory=function(){return Cd._focusManagerFactory};Cd.set_focusManagerFactory=function(a){a==null&&(Cd._focusManagerFactory=Cd.defaultFocusManagerFactory);if(Cd._focusManagerFactory==a)return Cd._focusManagerFactory;Cd._focusManagerFactory=a;return Cd._focusManagerFactory};Cd.hasRoot=function(a){return Cd.stageToManager.h.__keys__[a.__id__]!=
null};Cd.addRoot=function(a){if(a==null)throw new Cb("FocusManager stage argument must not be null.");if(Cd.stageToManager.h.__keys__[a.__id__]!=null)throw new Cb("Focus manager root already exists");var b=Cd.get_focusManagerFactory();b==null&&(b=Cd.defaultFocusManagerFactory);b=b(a);b.addEventListener("clear",Cd.focusManager_clearHandler,!1,0,!0);Cd.stageToManager.set(a,b);return b};Cd.removeRoot=function(a){a=Cd.stageToManager.h[a.__id__];a!=null&&a.dispose()};Cd.dispose=function(){for(var a=Cd.stageToManager.keys();a.hasNext();){var b=
a.next();Cd.stageToManager.h[b.__id__].dispose();Cd.stageToManager.remove(b)}};Cd.setFocus=function(a){var b=a.get_focusManager();if(b==null)throw new Cb("Cannot set focus because focus manager is null.");b.set_focus(a)};Cd.focusManager_clearHandler=function(a){a=w.__cast(a.currentTarget,Un);a.removeEventListener("clear",Cd.focusManager_clearHandler);a=a.get_root();a=a instanceof gd?a:null;a!=null&&Cd.stageToManager.remove(a)};Cd.prototype={FocusManager:function(){},__class__:Cd};var Gp=function(){};
t["feathers.core.IScaleManager"]=Gp;Gp.__name__="feathers.core.IScaleManager";Gp.__isInterface__=!0;Gp.__interfaces__=[Db];Gp.prototype={get_target:null,set_target:null,getScale:null,getBounds:null,__class__:Gp,__properties__:{set_target:"set_target",get_target:"get_target"}};var Aa=function(){};t["feathers.core.PopUpManager"]=Aa;Aa.__name__="feathers.core.PopUpManager";Aa.__properties__={get_popUpCount:"get_popUpCount",set_root:"set_root"};Aa.set_root=function(a){Aa.forStage(a.stage).set_root(a);
return a};Aa.get_popUpCount=function(){for(var a=0,b=Aa.stageToManager.iterator();b.hasNext();){var c=b.next();a+=c.get_popUpCount()}return a};Aa.forStage=function(a){if(a==null)throw new Cb("PopUpManager stage argument must not be null.");var b=Aa.stageToManager.h[a.__id__];b==null&&(b=Aa.popUpManagerFactory,b==null&&(b=Aa.defaultPopUpManagerFactory),b=b(a),Aa.stageToManager.set(a,b));return b};Aa.dispose=function(){Aa.removeAllPopUps();for(var a=Aa.stageToManager.keys();a.hasNext();){var b=a.next();
Aa.stageToManager.remove(b)}};Aa.addPopUp=function(a,b,c,d,f){d==null&&(d=!0);c==null&&(c=!0);if(b==null)throw new Cb("The pop-up's owner must not be null.");b=b.stage;if(b==null)throw new Cb("The stage property of a pop-up's owner must not be null.");return Aa.forStage(b).addPopUp(a,c,d,f)};Aa.removePopUp=function(a){var b=a.stage;return b==null?a:Aa.forStage(b).removePopUp(a)};Aa.removeAllPopUps=function(){for(var a=Aa.stageToManager.iterator();a.hasNext();)a.next().removeAllPopUps()};Aa.centerPopUp=
function(a){var b=a.stage;if(b==null)throw new Cb("A pop-up's stage property must not be null.");Aa.forStage(b).centerPopUp(a)};Aa.bringToFront=function(a){var b=a.stage;if(b==null)throw new Cb("A pop-up's stage property must not be null.");Aa.forStage(b).bringToFront(a)};Aa.isPopUp=function(a){if(a==null)return!1;var b=a.stage;return b==null?!1:Aa.forStage(b).isPopUp(a)};Aa.isModal=function(a){if(a==null)return!1;var b=a.stage;return b==null?!1:Aa.forStage(b).isModal(a)};Aa.isTopLevelPopUp=function(a){if(a==
null)return!1;var b=a.stage;return b==null?!1:Aa.forStage(b).isTopLevelPopUp(a)};Aa.defaultPopUpManagerFactory=function(a){return new Wn(a)};var Hp=function(a){qa.call(this);this._scaler=a};t["feathers.core.ScreenDensityScaleManager"]=Hp;Hp.__name__="feathers.core.ScreenDensityScaleManager";Hp.__interfaces__=[Gp];Hp.__super__=qa;Hp.prototype=I(qa.prototype,{_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;this._target!=null&&(this.removeTargetStageListeners(),
this._target.removeEventListener("addedToStage",m(this,this.screenDensityScaleManager_target_addedToStageHandler)),this._target.removeEventListener("removedFromStage",m(this,this.screenDensityScaleManager_target_removedFromStageHandler)));this._target=a;this._target!=null&&(this._target.addEventListener("addedToStage",m(this,this.screenDensityScaleManager_target_addedToStageHandler),!1,0,!0),this._target.addEventListener("removedFromStage",m(this,this.screenDensityScaleManager_target_removedFromStageHandler),
!1,0,!0),this.addTargetStageListeners());Y.dispatch(this,"change");return this._target},_scaler:null,get_scaler:function(){return this._scaler},set_scaler:function(a){if(this._scaler==a)return this._scaler;this._scaler=a;Y.dispatch(this,"change");return this._scaler},getScale:function(){var a=1;if(this._target==null)return a;var b=w.__cast(wa,Window).document.getElementById("viewport");if(b!=null&&b.localName=="meta"&&(b=b.getAttribute("content"),b.indexOf("user-scalable=no")!=-1)){var c=new Wa("initial-scale=(\\d(?:\\.\\d+)?)",
"");c.match(b)&&(b=parseFloat(c.matched(1)),a*=1/b)}return a},getBounds:function(){var a=new Ia;if(this._target==null)return a;var b=this._target.stage;if(b==null)return a;var c=Math.floor(this._target.get_scaleX())!=this._target.get_scaleX(),d=Math.floor(b.stageWidth);c&&(d=We.roundDownToNearest(d,2));a.width=d;b=Math.floor(b.stageHeight);c&&(b=We.roundDownToNearest(b,2));a.height=b;return a},addTargetStageListeners:function(){this._target!=null&&this._target.stage!=null&&this._target.stage.addEventListener("resize",
m(this,this.screenDensityScaleManager_stage_resizeHandler),!1,0,!0)},removeTargetStageListeners:function(){this._target!=null&&this._target.stage!=null&&this._target.stage.removeEventListener("resize",m(this,this.screenDensityScaleManager_stage_resizeHandler))},screenDensityScaleManager_target_addedToStageHandler:function(a){this.addTargetStageListeners()},screenDensityScaleManager_target_removedFromStageHandler:function(a){this.removeTargetStageListeners()},screenDensityScaleManager_stage_resizeHandler:function(a){Y.dispatch(this,
"change")},__class__:Hp,__properties__:{set_scaler:"set_scaler",get_scaler:"get_scaler",set_target:"set_target",get_target:"get_target"}});var be=function(){};t["feathers.core.ToolTipManager"]=be;be.__name__="feathers.core.ToolTipManager";be.__properties__={set_toolTipManagerFactory:"set_toolTipManagerFactory",get_toolTipManagerFactory:"get_toolTipManagerFactory"};be.defaultToolTipManagerFactory=function(a){return new al(a)};be.get_toolTipManagerFactory=function(){return be._toolTipManagerFactory};
be.set_toolTipManagerFactory=function(a){a==null&&(be._toolTipManagerFactory=be.defaultToolTipManagerFactory);if(be._toolTipManagerFactory==a)return be._toolTipManagerFactory;be._toolTipManagerFactory=a;return be._toolTipManagerFactory};be.hasRoot=function(a){return be.stageToManager.h.__keys__[a.__id__]!=null};be.forRoot=function(a){return be.stageToManager.h[a.__id__]};be.addRoot=function(a){if(a==null)throw new Cb("ToolTipManager stage argument must not be null.");if(be.stageToManager.h.__keys__[a.__id__]!=
null)throw new Cb("Tool tip manager root already exists");var b=be.get_toolTipManagerFactory();b==null&&(b=be.defaultToolTipManagerFactory);b=b(a);be.stageToManager.set(a,b);return b};be.removeRoot=function(a){var b=be.stageToManager.h[a.__id__];b!=null&&(b.dispose(),be.stageToManager.remove(a))};be.dispose=function(){for(var a=be.stageToManager.keys();a.hasNext();){var b=a.next();be.stageToManager.remove(b)}};be.prototype={ToolTipManager:function(){},__class__:be};var gk=function(a){this._validating=
!1;this._queue=[];this._stage=null;this._stage=a;this._stage.addEventListener("render",m(this,this.validationQueue_stage_renderHandler),!1,-1E3,!0)};t["feathers.core.ValidationQueue"]=gk;gk.__name__="feathers.core.ValidationQueue";gk.forStage=function(a){if(a==null)return null;gk.STAGE_TO_VALIDATION_QUEUE.h.__keys__[a.__id__]==null&&gk.STAGE_TO_VALIDATION_QUEUE.set(a,new gk(a));return gk.STAGE_TO_VALIDATION_QUEUE.h[a.__id__]};gk.prototype={_stage:null,_queue:null,_validating:null,get_validating:function(){return this._validating},
dispose:function(){this._stage!=null&&(this._stage.removeEventListener("render",m(this,this.validationQueue_stage_renderHandler)),this._stage=null)},addControl:function(a){if(this._queue.indexOf(a)==-1){var b=this._queue.length;if(this._validating){var c=a.get_depth();for(--b;b>=0;){var d=this._queue[b].get_depth();if(c>=d)break;--b}++b;this._queue.splice(b,0,a)}else this._queue[b]=a,this._stage.invalidate()}},validateNow:function(){if(!this._validating){var a=this._queue.length;if(a!=0){this._validating=
!0;for(a>1&&this._queue.sort(function(b,c){b=c.get_depth()-b.get_depth();return b>0?-1:b<0?1:0});this._queue.length>0;)a=this._queue.shift(),a.get_depth()<0||a.validateNow();this._validating=!1}}},validationQueue_stage_renderHandler:function(a){this.validateNow()},__class__:gk,__properties__:{get_validating:"get_validating"}};var Xn=function(){};t["openfl.utils.IExternalizable"]=Xn;Xn.__name__="openfl.utils.IExternalizable";Xn.__isInterface__=!0;Xn.prototype={readExternal:null,writeExternal:null,
__class__:Xn};var Ip=function(){};t["feathers.data.IFlatCollection"]=Ip;Ip.__name__="feathers.data.IFlatCollection";Ip.__isInterface__=!0;Ip.__interfaces__=[Db];Ip.prototype={get_length:null,get_filterFunction:null,set_filterFunction:null,get_sortCompareFunction:null,set_sortCompareFunction:null,get:null,set:null,add:null,addAt:null,addAll:null,addAllAt:null,reset:null,remove:null,removeAt:null,removeAll:null,indexOf:null,contains:null,updateAt:null,updateAll:null,iterator:null,refresh:null,__class__:Ip,
__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",set_filterFunction:"set_filterFunction",get_filterFunction:"get_filterFunction",get_length:"get_length"}};var dg=function(a){this._filterFunction=this._sortCompareFunction=null;this._pendingRefresh=!1;this._filterAndSortData=this._array=null;qa.call(this);a==null&&(a=[]);this.set_array(a)};t["feathers.data.ArrayCollection"]=dg;dg.__name__="feathers.data.ArrayCollection";dg.__interfaces__=
[Xn,Ip];dg.__super__=qa;dg.prototype=I(qa.prototype,{_filterAndSortData:null,_array:null,get_array:function(){return this._array},set_array:function(a){if(this._array==a)return this._array;a==null&&(a=[]);this._array=a;Ld.dispatch(this,"reset",-1);Y.dispatch(this,"change");return this._array},get_length:function(){this._pendingRefresh&&this.refreshFilterAndSort();return this._filterAndSortData!=null?this._filterAndSortData.length:this._array.length},_pendingRefresh:null,_filterFunction:null,get_filterFunction:function(){return this._filterFunction},
set_filterFunction:function(a){if(this._filterFunction==a)return this._filterFunction;this._filterFunction=a;this._pendingRefresh=!0;Ld.dispatch(this,"filterChange",-1);Y.dispatch(this,"change");return this._filterFunction},_sortCompareFunction:null,get_sortCompareFunction:function(){return this._sortCompareFunction},set_sortCompareFunction:function(a){if(this._sortCompareFunction==a)return this._sortCompareFunction;this._sortCompareFunction=a;this._pendingRefresh=!0;Ld.dispatch(this,"sortChange",
-1);Y.dispatch(this,"change");return this._sortCompareFunction},get:function(a){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>=this.get_length())throw new we("Failed to get item at index "+a+". Expected a value between 0 and "+(this.get_length()-1)+".");return this._filterAndSortData!=null?this._filterAndSortData[a]:this._array[a]},set:function(a,b){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>this.get_length())throw new we("Failed to set item at index "+a+". Expected a value between 0 and "+
this.get_length()+".");if(this._filterAndSortData!=null){var c=this._array.length,d=null;a<this._filterAndSortData.length&&(d=this._filterAndSortData[a],c=this._array.indexOf(d));this._array[c]=b;if(this._filterFunction!=null){c=this._filterFunction(b);a<this._filterAndSortData.length?(c?(this._filterAndSortData[a]=b,Ld.dispatch(this,"replaceItem",a,b,d)):(this._filterAndSortData.splice(a,1),Ld.dispatch(this,"removeItem",a,null,d)),Y.dispatch(this,"change")):c&&(this._filterAndSortData[this._filterAndSortData.length]=
b,Ld.dispatch(this,"addItem",a,b),Y.dispatch(this,"change"));return}if(this._sortCompareFunction!=null){V.remove(this._filterAndSortData,d);c=this.getSortedInsertionIndex(b);this._filterAndSortData[c]=b;Ld.dispatch(this,"replaceItem",a,b,d);Y.dispatch(this,"change");return}}a<this._array.length?(d=this._array[a],this._array[a]=b,Ld.dispatch(this,"replaceItem",a,b,d)):(this._array[a]=b,Ld.dispatch(this,"addItem",a,b));Y.dispatch(this,"change")},add:function(a){this.addAtInternal(a,this.get_length(),
!0)},addAt:function(a,b){this.addAtInternal(a,b,!0)},addAll:function(a){for(a=a.iterator();a.hasNext();){var b=a.next();this.add(b)}},addAllAt:function(a,b){if(b<0||b>this.get_length())throw new we("Failed to add collection at index "+b+". Expected a value between 0 and "+this.get_length()+".");for(a=a.iterator();a.hasNext();){var c=a.next();this.addAt(c,b);++b}},reset:function(a){this._pendingRefresh&&this.refreshFilterAndSort();this._filterAndSortData!=null&&(this._filterAndSortData.length=0);this._array.length=
0;if(a!=null)for(a=a.iterator();a.hasNext();){var b=a.next();this.addAtInternal(b,this.get_length(),!1)}Ld.dispatch(this,"reset",-1);Y.dispatch(this,"change")},remove:function(a){this._pendingRefresh&&this.refreshFilterAndSort();var b=this.indexOf(a);b!=-1&&(this._filterAndSortData!=null&&V.remove(this._filterAndSortData,a),V.remove(this._array,a),Ld.dispatch(this,"removeItem",b,null,a),Y.dispatch(this,"change"))},removeAt:function(a){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>=this.get_length())throw new we("Failed to remove item at index "+
a+". Expected a value between 0 and "+(this.get_length()-1)+".");if(this._filterAndSortData!=null){var b=this._filterAndSortData[a];V.remove(this._filterAndSortData,b)}else b=this._array[a];V.remove(this._array,b);Ld.dispatch(this,"removeItem",a,null,b);Y.dispatch(this,"change");return b},removeAll:function(){this._pendingRefresh&&this.refreshFilterAndSort();this._array.length!=0&&(this._filterAndSortData!=null&&(this._filterAndSortData.length=0),this._array.length=0,Ld.dispatch(this,"removeAll",
-1),Y.dispatch(this,"change"))},indexOf:function(a){this._pendingRefresh&&this.refreshFilterAndSort();return this._filterAndSortData!=null?this._filterAndSortData.indexOf(a):this._array.indexOf(a)},contains:function(a){return this.indexOf(a)!=-1},iterator:function(){this._pendingRefresh&&this.refreshFilterAndSort();return this._filterAndSortData!=null?new wg(this._filterAndSortData):new wg(this._array)},updateAt:function(a){if(a<0||a>=this.get_length())throw new we("Failed to update item at index "+
a+". Expected a value between 0 and "+(this.get_length()-1)+".");Ld.dispatch(this,"updateItem",a);this.refresh()},updateAll:function(){Ld.dispatch(this,"updateAll",-1);this.refresh()},refresh:function(){if(this._filterFunction!=null||this._sortCompareFunction!=null)this._pendingRefresh=!0,this._filterFunction!=null&&Ld.dispatch(this,"filterChange",-1),this._sortCompareFunction!=null&&Ld.dispatch(this,"sortChange",-1),Y.dispatch(this,"change")},find:function(a){for(var b=0,c=this.get_length();b<c;){var d=
b++,f=this.get(d);if(a(f,d,this))return f}return null},findIndex:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);if(a(f,d,this))return d}return-1},some:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);if(a(f,d,this))return!0}return!1},every:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);if(!a(f,d,this))return!1}return!0},forEach:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);a(f,d,this)}},map:function(a){for(var b=
[],c=0,d=this.get_length();c<d;){var f=c++,g=this.get(f);b.push(a(g,f,this))}return new dg(b)},readExternal:function(a){a=a.readObject();this.set_array(a instanceof Array?a:null)},writeExternal:function(a){a.writeObject(this.get_array())},refreshFilterAndSort:function(){this._pendingRefresh=!1;var a=this._filterAndSortData;this._filterAndSortData=null;if(this._filterFunction!=null){a!=null?a.length=0:a=[];for(var b=0,c=this._array.length;b<c;){var d=b++;d=this._array[d];this._filterFunction(d)&&a.push(d)}this._filterAndSortData=
a}else if(this._sortCompareFunction!=null){if(a!=null)for(a.length=this._array.length,b=0,c=this._array.length;b<c;)d=b++,a[d]=this._array[d];else a=this._array.slice(0);this._filterAndSortData=a}this._sortCompareFunction!=null&&this._filterAndSortData.sort(this._sortCompareFunction)},toArray:function(){return this._filterAndSortData!=null?this._filterAndSortData.slice():this._array.slice()},getSortedInsertionIndex:function(a){if(this._sortCompareFunction==null)return this._filterAndSortData.length;
for(var b=0,c=this._filterAndSortData.length;b<c;){var d=b++;if(this._sortCompareFunction(a,this._filterAndSortData[d])<1)return d}return this._filterAndSortData.length},addAtInternal:function(a,b,c){this._pendingRefresh&&this.refreshFilterAndSort();if(b<0||b>this.get_length())throw new we("Failed to add item at index "+b+". Expected a value between 0 and "+this.get_length()+".");if(this._filterAndSortData!=null){var d=this._array.length;b<this._filterAndSortData.length&&(d=this._array.indexOf(this._filterAndSortData[b]));
this._array.splice(d,0,a);d=!0;this._filterFunction!=null&&(d=this._filterFunction(a));d&&(d=b,this._sortCompareFunction!=null&&(d=this.getSortedInsertionIndex(a)),this._filterAndSortData.splice(d,0,a),c&&(Ld.dispatch(this,"addItem",b,a),Y.dispatch(this,"change")))}else this._array.splice(b,0,a),c&&(Ld.dispatch(this,"addItem",b,a),Y.dispatch(this,"change"))},__class__:dg,__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",set_filterFunction:"set_filterFunction",
get_filterFunction:"get_filterFunction",get_length:"get_length",set_array:"set_array",get_array:"get_array"}});var Yf=R["feathers.data.GroupListViewItemType"]={__ename__:"feathers.data.GroupListViewItemType",__constructs__:null,STANDARD:{_hx_name:"STANDARD",_hx_index:0,__enum__:"feathers.data.GroupListViewItemType",toString:E},HEADER:{_hx_name:"HEADER",_hx_index:1,__enum__:"feathers.data.GroupListViewItemType",toString:E}};Yf.__constructs__=[Yf.STANDARD,Yf.HEADER];var At=function(){};t["feathers.data.IHierarchicalCollection"]=
At;At.__name__="feathers.data.IHierarchicalCollection";At.__isInterface__=!0;At.__interfaces__=[Db];At.prototype={get_filterFunction:null,set_filterFunction:null,get_sortCompareFunction:null,set_sortCompareFunction:null,get:null,set:null,getLength:null,locationOf:null,contains:null,isBranch:null,addAt:null,remove:null,removeAt:null,removeAll:null,updateAt:null,updateAll:null,__class__:At,__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",
set_filterFunction:"set_filterFunction",get_filterFunction:"get_filterFunction"}};var px=function(a,b){a==null&&(a=-1);this.enabled=!0;this.selected=!1;this.index=-1;this.index=a;this.selected=!1};t["feathers.data.PageIndicatorItemState"]=px;px.__name__="feathers.data.PageIndicatorItemState";px.prototype={owner:null,index:null,selected:null,enabled:null,__class__:px};var ux=function(a,b,c,d,f){this.pattern=a;this.pathname=b;this.params=c;this.historyState=d;this.data=f};t["feathers.data.RouteState"]=
ux;ux.__name__="feathers.data.RouteState";ux.prototype={pattern:null,pathname:null,params:null,urlVariables:null,historyState:null,data:null,__class__:ux};var Bh=R["feathers.data.SortOrder"]={__ename__:"feathers.data.SortOrder",__constructs__:null,ASCENDING:{_hx_name:"ASCENDING",_hx_index:0,__enum__:"feathers.data.SortOrder",toString:E},DESCENDING:{_hx_name:"DESCENDING",_hx_index:1,__enum__:"feathers.data.SortOrder",toString:E},NONE:{_hx_name:"NONE",_hx_index:2,__enum__:"feathers.data.SortOrder",
toString:E}};Bh.__constructs__=[Bh.ASCENDING,Bh.DESCENDING,Bh.NONE];var dt=function(){this._data=new G};t["feathers.dragDrop.DragData"]=dt;dt.__name__="feathers.dragDrop.DragData";dt.prototype={_data:null,exists:function(a){return Object.prototype.hasOwnProperty.call(this._data.h,a)},get:function(a){return this._data.h[a]},set:function(a,b){this._data.h[a]=b},remove:function(a){var b=this._data;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},__class__:dt};var fb=function(){};
t["feathers.dragDrop.DragDropManager"]=fb;fb.__name__="feathers.dragDrop.DragDropManager";fb.__properties__={get_dragging:"get_dragging"};fb.get_dragging=function(){return fb.dragData!=null};fb.startDrag=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);fb.get_dragging()&&fb.cancelDrag();if(a==null)throw new Cb("Drag source must not be null.");if(b==null)throw new Cb("Drag data must not be null.");fb.dragSource=a;fb.dragData=b;fb.dragAvatar=c;fb.dragAvatarOffsetX=d;fb.dragAvatarOffsetY=f;a=w.__cast(a,
ma);fb._dragSourceStage=a.stage;fb.dragAvatar==null&&(fb._dragSourceBitmapData=new Dc(Math.ceil(a.get_width()*1),Math.ceil(a.get_height()*1)),c=new gb,c.scale(1,1),fb._dragSourceBitmapData.draw(a,c),fb.dragAvatar=new Ma(fb._dragSourceBitmapData),fb.dragAvatar.set_alpha(.75),fb.dragAvatar.set_scaleX(1),fb.dragAvatar.set_scaleY(1));fb.dragAvatar instanceof Ja&&(a=fb.dragAvatar,fb._oldDragAvatarMouseEnabled=a.mouseEnabled,a.mouseEnabled=!1);fb.dragAvatar instanceof zb&&(a=fb.dragAvatar,fb._oldDragAvatarMouseChildren=
a.mouseChildren,a.mouseChildren=!1);fb.dragAvatar.set_x(fb._dragSourceStage.get_mouseX()+fb.dragAvatarOffsetX);fb.dragAvatar.set_y(fb._dragSourceStage.get_mouseY()+fb.dragAvatarOffsetY);Aa.addPopUp(fb.dragAvatar,fb._dragSourceStage,!1,!1);fb._dragSourceStage.addEventListener("mouseMove",fb.dragDropManager_stage_mouseMoveHandler,!1,0,!0);fb._dragSourceStage.addEventListener("mouseUp",fb.dragDropManager_stage_mouseUpHandler,!1,0,!0);$f.dispatch(fb.dragSource,"dragStart",b,!1,null,null,fb.dragSource);
fb.updateDropTarget(fb._dragSourceStage,fb._dragSourceStage.get_mouseX(),fb._dragSourceStage.get_mouseY())};fb.acceptDrag=function(a){if(fb.currentDropTarget!=a)throw new Cb("Drop target cannot accept a drag at this time. Acceptance may only happen after the DragDropEvent.DRAG_ENTER event is dispatched and before the DragDropEvent.DRAG_EXIT event is dispatched.");fb.dropAccepted=!0};fb.cancelDrag=function(){fb.get_dragging()&&fb.completeDrag(!1)};fb.completeDrag=function(a){if(!fb.get_dragging())throw new ob("Drag cannot be completed because none is currently active.");
fb.currentDropTarget!=null&&($f.dispatch(fb.currentDropTarget,"dragExit",fb.dragData,!1,fb._dropTargetLocalX,fb._dropTargetLocalY,fb.dragSource),fb.currentDropTarget=null);var b=fb.dragSource,c=fb.dragData;fb.cleanup();$f.dispatch(b,"dragComplete",c,a,null,null,b)};fb.cleanup=function(){fb._dragSourceStage!=null&&(fb._dragSourceStage.removeEventListener("mouseMove",fb.dragDropManager_stage_mouseMoveHandler),fb._dragSourceStage.removeEventListener("mouseUp",fb.dragDropManager_stage_mouseUpHandler),
fb._dragSourceStage=null);fb._dragSourceBitmapData!=null&&(fb._dragSourceBitmapData.dispose(),fb._dragSourceBitmapData=null);fb.dragAvatar!=null&&(Aa.isPopUp(fb.dragAvatar)&&Aa.removePopUp(fb.dragAvatar),fb.dragAvatar instanceof Ja&&(fb.dragAvatar.mouseEnabled=fb._oldDragAvatarMouseEnabled),fb.dragAvatar instanceof zb&&(fb.dragAvatar.mouseChildren=fb._oldDragAvatarMouseChildren),fb.dragAvatar=null);fb.dragSource=null;fb.dragData=null};fb.updateDropTarget=function(a,b,c){b=new Ea(b,c);c=null;a=a.getObjectsUnderPoint(b);
for(var d=0;d<a.length;){var f=a[d];++d;if(!(f instanceof Ja)||f.mouseEnabled){for(;f!=null;){if(w.__implements(f,ip)){c=f;break}f=f.parent}if(c!=null)break}}c!=null&&(b=c.globalToLocal(b));c!=fb.currentDropTarget?(fb.currentDropTarget!=null&&$f.dispatch(fb.currentDropTarget,"dragExit",fb.dragData,!1,fb._dropTargetLocalX,fb._dropTargetLocalY,fb.dragSource),fb.currentDropTarget=c,fb.dropAccepted=!1,fb.currentDropTarget!=null&&(fb._dropTargetLocalX=b.x,fb._dropTargetLocalY=b.y,$f.dispatch(fb.currentDropTarget,
"dragEnter",fb.dragData,!1,fb._dropTargetLocalX,fb._dropTargetLocalY,fb.dragSource))):fb.currentDropTarget!=null&&(fb._dropTargetLocalX=b.x,fb._dropTargetLocalY=b.y,$f.dispatch(fb.currentDropTarget,"dragMove",fb.dragData,!1,fb._dropTargetLocalX,fb._dropTargetLocalY,fb.dragSource))};fb.dragDropManager_stage_mouseMoveHandler=function(a){a=w.__cast(a.currentTarget,gd);fb.dragAvatar!=null&&(fb.dragAvatar.set_x(a.get_mouseX()+fb.dragAvatarOffsetX),fb.dragAvatar.set_y(a.get_mouseY()+fb.dragAvatarOffsetY));
fb.updateDropTarget(a,a.get_mouseX(),a.get_mouseY())};fb.dragDropManager_stage_mouseUpHandler=function(a){a=!1;fb.currentDropTarget!=null&&fb.dropAccepted&&($f.dispatch(fb.currentDropTarget,"dragDrop",fb.dragData,!0,fb._dropTargetLocalX,fb._dropTargetLocalY,fb.dragSource),a=!0);fb.currentDropTarget=null;fb.completeDrag(a)};var Pj=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.ButtonBarEvent"]=Pj;Pj.__name__="feathers.events.ButtonBarEvent";Pj.dispatch=function(a,b,c){var d=Pj._pool.get();
d.type=b;d.state=c;a=a.dispatchEvent(d);Pj._pool.release(d);return a};Pj.__super__=pa;Pj.prototype=I(pa.prototype,{state:null,clone:function(){return new Pj(this.type,this.state)},__class__:Pj});var Si=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.DatePickerEvent"]=Si;Si.__name__="feathers.events.DatePickerEvent";Si.dispatch=function(a,b,c){var d=Si._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Si._pool.release(d);return a};Si.__super__=pa;Si.prototype=I(pa.prototype,
{state:null,clone:function(){return new Si(this.type,this.state)},__class__:Si});var $f=function(a,b,c,d,f,g){pa.call(this,a,!1,this.cancelable);this.dragData=b;this.dropped=c;this.localX=d;this.localY=f;this.dragSource=g};t["feathers.events.DragDropEvent"]=$f;$f.__name__="feathers.events.DragDropEvent";$f.dispatch=function(a,b,c,d,f,g,h){var n=$f._pool.get();n.type=b;n.dragData=c;n.dropped=d;n.localX=f;n.localY=g;n.dragSource=h;a=a.dispatchEvent(n);$f._pool.release(n);return a};$f.__super__=pa;$f.prototype=
I(pa.prototype,{dragData:null,dropped:null,localX:null,localY:null,dragSource:null,acceptDrag:function(a){fb.acceptDrag(a)},clone:function(){return new $f(this.type,this.dragData,this.dropped,this.localX,this.localY,this.dragSource)},__class__:$f});var Y=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c)};t["feathers.events.FeathersEvent"]=Y;Y.__name__="feathers.events.FeathersEvent";Y.dispatch=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);var f=Y._pool.get();f.type=b;f.bubbles=
c;f.cancelable=d;a=a.dispatchEvent(f);Y._pool.release(f);return a};Y.__super__=pa;Y.prototype=I(pa.prototype,{clone:function(){return new Y(this.type,this.bubbles,this.cancelable)},__class__:Y});var Ld=function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);pa.call(this,a,f,g);this.index=b;this.addedItem=c;this.removedItem=d};t["feathers.events.FlatCollectionEvent"]=Ld;Ld.__name__="feathers.events.FlatCollectionEvent";Ld.dispatch=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);var n=Ld._pool.get();
n.type=b;n.index=c;n.addedItem=d;n.removedItem=f;n.bubbles=g;n.cancelable=h;a=a.dispatchEvent(n);Ld._pool.release(n);return a};Ld.__super__=pa;Ld.prototype=I(pa.prototype,{index:null,addedItem:null,removedItem:null,clone:function(){return new Ld(this.type,this.index,this.addedItem,this.removedItem,this.bubbles,this.cancelable)},__class__:Ld});var Qj=function(a){pa.call(this,a,!1,!1)};t["feathers.events.FormEvent"]=Qj;Qj.__name__="feathers.events.FormEvent";Qj.dispatch=function(a,b){var c=Qj._pool.get();
c.type=b;a=a.dispatchEvent(c);Qj._pool.release(c);return a};Qj.__super__=pa;Qj.prototype=I(pa.prototype,{clone:function(){return new Qj(this.type)},__class__:Qj});var Hf=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.GridViewEvent"]=Hf;Hf.__name__="feathers.events.GridViewEvent";Hf.dispatchForCell=function(a,b,c){var d=Hf._cellPool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Hf._cellPool.release(d);return a};Hf.dispatchForHeader=function(a,b,c){var d=Hf._headerPool.get();d.type=
b;d.state=c;a=a.dispatchEvent(d);Hf._headerPool.release(d);return a};Hf.__super__=pa;Hf.prototype=I(pa.prototype,{state:null,clone:function(){return new Hf(this.type,this.state)},__class__:Hf});var ti=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.GroupListViewEvent"]=ti;ti.__name__="feathers.events.GroupListViewEvent";ti.dispatch=function(a,b,c){var d=ti._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);ti._pool.release(d);return a};ti.__super__=pa;ti.prototype=I(pa.prototype,
{state:null,clone:function(){return new ti(this.type,this.state)},__class__:ti});var Ng=function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);pa.call(this,a,f,g);this.location=b;this.addedItem=c;this.removedItem=d};t["feathers.events.HierarchicalCollectionEvent"]=Ng;Ng.__name__="feathers.events.HierarchicalCollectionEvent";Ng.dispatch=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);var n=Ng._pool.get();n.type=b;n.location=c;n.addedItem=d;n.removedItem=f;n.bubbles=g;n.cancelable=h;a=a.dispatchEvent(n);
Ng._pool.release(n);return a};Ng.__super__=pa;Ng.prototype=I(pa.prototype,{location:null,addedItem:null,removedItem:null,clone:function(){return new Ng(this.type,this.location,this.addedItem,this.removedItem,this.bubbles,this.cancelable)},__class__:Ng});var Wh=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.ListViewEvent"]=Wh;Wh.__name__="feathers.events.ListViewEvent";Wh.dispatch=function(a,b,c){var d=Wh._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Wh._pool.release(d);
return a};Wh.__super__=pa;Wh.prototype=I(pa.prototype,{state:null,clone:function(){return new Wh(this.type,this.state)},__class__:Wh});var Id=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.x=d;this.y=f};t["feathers.events.ScrollEvent"]=Id;Id.__name__="feathers.events.ScrollEvent";Id.dispatch=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=!1);c==null&&(c=!1);var h=Id._pool.get();h.type=b;h.bubbles=c;h.cancelable=d;h.x=f;h.y=
g;a=a.dispatchEvent(h);Id._pool.release(h);return a};Id.__super__=pa;Id.prototype=I(pa.prototype,{x:null,y:null,clone:function(){return new Id(this.type,this.bubbles,this.cancelable,this.x,this.y)},__class__:Id});var vh=function(a,b){pa.call(this,a);this.affectsTarget=b!=null?b:vh.defaultAffectsTarget};t["feathers.events.StyleProviderEvent"]=vh;vh.__name__="feathers.events.StyleProviderEvent";vh.dispatch=function(a,b,c){var d=vh._pool.get();d.type=b;d.affectsTarget=c!=null?c:vh.defaultAffectsTarget;
a=a.dispatchEvent(d);vh._pool.release(d);return a};vh.defaultAffectsTarget=function(a){return!0};vh.__super__=pa;vh.prototype=I(pa.prototype,{affectsTarget:null,clone:function(){return new vh(this.type,this.affectsTarget)},__class__:vh});var Rj=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.TabBarEvent"]=Rj;Rj.__name__="feathers.events.TabBarEvent";Rj.dispatch=function(a,b,c){var d=Rj._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Rj._pool.release(d);return a};Rj.__super__=
pa;Rj.prototype=I(pa.prototype,{state:null,clone:function(){return new Rj(this.type,this.state)},__class__:Rj});var Xh=function(a,b,c,d,f){pa.call(this,a,!1,!1);this.previousViewID=b;this.previousView=c;this.nextViewID=d;this.nextView=f};t["feathers.events.TransitionEvent"]=Xh;Xh.__name__="feathers.events.TransitionEvent";Xh.dispatch=function(a,b,c,d,f,g){var h=Xh._pool.get();h.type=b;h.bubbles=!1;h.cancelable=!1;h.previousViewID=c;h.previousView=d;h.nextViewID=f;h.nextView=g;a=a.dispatchEvent(h);
Xh._pool.release(h);return a};Xh.__super__=pa;Xh.prototype=I(pa.prototype,{previousView:null,previousViewID:null,nextView:null,nextViewID:null,clone:function(){return new Xh(this.type,this.previousViewID,this.previousView,this.nextViewID,this.nextView)},__class__:Xh});var $e=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.TreeGridViewEvent"]=$e;$e.__name__="feathers.events.TreeGridViewEvent";$e.dispatchForCell=function(a,b,c){var d=$e._cellPool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);
$e._cellPool.release(d);return a};$e.dispatchForHeader=function(a,b,c){var d=$e._headerPool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);$e._headerPool.release(d);return a};$e.__super__=pa;$e.prototype=I(pa.prototype,{state:null,clone:function(){return new $e(this.type,this.state)},__class__:$e});var Mg=function(a,b){pa.call(this,a,!1,!1);this.state=b};t["feathers.events.TreeViewEvent"]=Mg;Mg.__name__="feathers.events.TreeViewEvent";Mg.dispatch=function(a,b,c){var d=Mg._pool.get();d.type=b;d.state=
c;a=a.dispatchEvent(d);Mg._pool.release(d);return a};Mg.__super__=pa;Mg.prototype=I(pa.prototype,{state:null,clone:function(){return new Mg(this.type,this.state)},__class__:Mg});var pf=function(a,b,c,d,f,g,h,n,l,q,u,v,z,r,F){F==null&&(F=!1);r==null&&(r=!1);z==null&&(z=!1);v==null&&(v=!1);q==null&&(q=1);l==null&&(l=0);n==null&&(n=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=f;this.localX=
g;this.localY=h;this.stageY=this.stageX=NaN;this.sizeX=n;this.sizeY=l;this.pressure=q;this.relatedObject=u;this.ctrlKey=v;this.altKey=z;this.shiftKey=r;this.commandKey=F};t["feathers.events.TriggerEvent"]=pf;pf.__name__="feathers.events.TriggerEvent";pf.dispatchFromMouseEvent=function(a,b){var c=pf._pool.get();c=pf.fromMouseEvent(b,c);a=a.dispatchEvent(c);pf._pool.release(c);return a};pf.dispatchFromTouchEvent=function(a,b){var c=pf._pool.get();c=pf.fromTouchEvent(b,c);a=a.dispatchEvent(c);pf._pool.release(c);
return a};pf.fromMouseEvent=function(a,b){if(a.type!="click")throw new Cb("TriggerEvent.fromMouseEvent() requires MouseEvent.CLICK");if(b!=null)return b.type="trigger",b.bubbles=!1,b.cancelable=a.cancelable,b.touchPointID=-1,b.isPrimaryTouchPoint=!1,b.localX=a.localX,b.localY=a.localY,b.stageX=a.stageX,b.stageY=a.stageY,b.sizeX=0,b.sizeY=0,b.pressure=1,b.relatedObject=a.relatedObject,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.commandKey=a.commandKey,b;b=new pf("trigger",!1,a.cancelable,
-1,!1,a.localX,a.localY,0,0,1,a.relatedObject,a.ctrlKey,a.altKey,a.shiftKey,Object.prototype.hasOwnProperty.call(a,"commandKey")&&y.field(a,"commandKey"));b.stageX=a.stageX;b.stageY=a.stageY;return b};pf.fromTouchEvent=function(a,b){if(a.type!="touchTap")throw new Cb("TriggerEvent.fromTouchEvent() requires TouchEvent.TOUCH_TAP");if(b!=null)return b.type="trigger",b.bubbles=!1,b.cancelable=a.cancelable,b.touchPointID=a.touchPointID,b.isPrimaryTouchPoint=a.isPrimaryTouchPoint,b.localX=a.localX,b.localY=
a.localY,b.stageX=a.stageX,b.stageY=a.stageY,b.sizeX=a.sizeX,b.sizeY=a.sizeY,b.pressure=a.pressure,b.relatedObject=a.relatedObject,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.commandKey=a.commandKey,b;b=new pf("trigger",!1,a.cancelable,a.touchPointID,a.isPrimaryTouchPoint,a.localX,a.localY,a.sizeX,a.sizeY,a.pressure,a.relatedObject,a.ctrlKey,a.altKey,a.shiftKey,Object.prototype.hasOwnProperty.call(a,"commandKey")&&y.field(a,"commandKey"));b.stageX=a.stageX;b.stageY=a.stageY;return b};
pf.__super__=pa;pf.prototype=I(pa.prototype,{touchPointID:null,isPrimaryTouchPoint:null,altKey:null,commandKey:null,ctrlKey:null,controlKey:null,shiftKey:null,localX:null,localY:null,sizeX:null,sizeY:null,pressure:null,stageX:null,stageY:null,relatedObject:null,clone:function(){var a=new pf(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey);
a.stageX=this.stageX;a.stageY=this.stageY;return a},__class__:pf});var Ss={fromGradientBoxTransform:function(a){switch(a._hx_index){case 0:var b=a.rotation;return function(v,z,r,F,J){r=new gb;r.createGradientBox(v,z,b,F,J);return r};case 1:var c=a.rotation;return function(v,z,r,F,J){r=new gb;r.createGradientBox(v,z,c*Math.PI/180,F,J);return r};case 2:var d=a.tx,f=a.ty;return function(v,z,r,F,J){F=new gb;F.createGradientBox(v,z,r,d,f);return F};case 3:var g=a.rotation,h=a.tx,n=a.ty;return function(v,
z,r,F,J){r=new gb;r.createGradientBox(v,z,g,h,n);return r};case 4:var l=a.rotation,q=a.tx,u=a.ty;return function(v,z,r,F,J){r=new gb;r.createGradientBox(v,z,l*Math.PI/180,q,u);return r}}},fromRadians:function(a){return function(b,c,d,f,g){d=new gb;d.createGradientBox(b,c,a,f,g);return d}},fromMatrix:function(a){return function(b,c,d,f,g){return a}}},ub=R["feathers.graphics.FillStyle"]={__ename__:"feathers.graphics.FillStyle",__constructs__:null,SolidColor:(B=function(a,b){return{_hx_index:0,color:a,
alpha:b,__enum__:"feathers.graphics.FillStyle",toString:E}},B._hx_name="SolidColor",B.__params__=["color","alpha"],B),Bitmap:(B=function(a,b,c,d){return{_hx_index:1,bitmapData:a,matrix:b,repeat:c,smoothing:d,__enum__:"feathers.graphics.FillStyle",toString:E}},B._hx_name="Bitmap",B.__params__=["bitmapData","matrix","repeat","smoothing"],B),Gradient:(B=function(a,b,c,d,f,g,h,n){return{_hx_index:2,type:a,colors:b,alphas:c,ratios:d,matrix:f,spreadMethod:g,interpolationMethod:h,focalPointRatio:n,__enum__:"feathers.graphics.FillStyle",
toString:E}},B._hx_name="Gradient",B.__params__="type colors alphas ratios matrix spreadMethod interpolationMethod focalPointRatio".split(" "),B),None:{_hx_name:"None",_hx_index:3,__enum__:"feathers.graphics.FillStyle",toString:E}};ub.__constructs__=[ub.SolidColor,ub.Bitmap,ub.Gradient,ub.None];var Bt=R["feathers.graphics.GradientBoxTransform"]={__ename__:"feathers.graphics.GradientBoxTransform",__constructs__:null,RotateRadians:(B=function(a){return{_hx_index:0,rotation:a,__enum__:"feathers.graphics.GradientBoxTransform",
toString:E}},B._hx_name="RotateRadians",B.__params__=["rotation"],B),RotateDegrees:(B=function(a){return{_hx_index:1,rotation:a,__enum__:"feathers.graphics.GradientBoxTransform",toString:E}},B._hx_name="RotateDegrees",B.__params__=["rotation"],B),Translate:(B=function(a,b){return{_hx_index:2,tx:a,ty:b,__enum__:"feathers.graphics.GradientBoxTransform",toString:E}},B._hx_name="Translate",B.__params__=["tx","ty"],B),RotateRadiansAndTranslate:(B=function(a,b,c){return{_hx_index:3,rotation:a,tx:b,ty:c,
__enum__:"feathers.graphics.GradientBoxTransform",toString:E}},B._hx_name="RotateRadiansAndTranslate",B.__params__=["rotation","tx","ty"],B),RotateDegreesAndTranslate:(B=function(a,b,c){return{_hx_index:4,rotation:a,tx:b,ty:c,__enum__:"feathers.graphics.GradientBoxTransform",toString:E}},B._hx_name="RotateDegreesAndTranslate",B.__params__=["rotation","tx","ty"],B)};Bt.__constructs__=[Bt.RotateRadians,Bt.RotateDegrees,Bt.Translate,Bt.RotateRadiansAndTranslate,Bt.RotateDegreesAndTranslate];var oc=R["feathers.graphics.LineStyle"]=
{__ename__:"feathers.graphics.LineStyle",__constructs__:null,SolidColor:(B=function(a,b,c,d,f,g,h,n){return{_hx_index:0,thickness:a,color:b,alpha:c,pixelHinting:d,scaleMode:f,caps:g,joints:h,miterLimit:n,__enum__:"feathers.graphics.LineStyle",toString:E}},B._hx_name="SolidColor",B.__params__="thickness color alpha pixelHinting scaleMode caps joints miterLimit".split(" "),B),Bitmap:(B=function(a,b,c,d,f){return{_hx_index:1,thickness:a,bitmapData:b,matrix:c,repeat:d,smooth:f,__enum__:"feathers.graphics.LineStyle",
toString:E}},B._hx_name="Bitmap",B.__params__=["thickness","bitmapData","matrix","repeat","smooth"],B),Gradient:(B=function(a,b,c,d,f,g,h,n,l){return{_hx_index:2,thickness:a,type:b,colors:c,alphas:d,ratios:f,matrix:g,spreadMethod:h,interpolationMethod:n,focalPointRatio:l,__enum__:"feathers.graphics.LineStyle",toString:E}},B._hx_name="Gradient",B.__params__="thickness type colors alphas ratios matrix spreadMethod interpolationMethod focalPointRatio".split(" "),B),None:{_hx_name:"None",_hx_index:3,
__enum__:"feathers.graphics.LineStyle",toString:E}};oc.__constructs__=[oc.SolidColor,oc.Bitmap,oc.Gradient,oc.None];var fh=function(){};t["feathers.layout.ILayout"]=fh;fh.__name__="feathers.layout.ILayout";fh.__isInterface__=!0;fh.__interfaces__=[Db];fh.prototype={layout:null,__class__:fh};var Gi=function(){qa.call(this)};t["feathers.layout.AnchorLayout"]=Gi;Gi.__name__="feathers.layout.AnchorLayout";Gi.__interfaces__=[fh];Gi.__super__=qa;Gi.prototype=I(qa.prototype,{layout:function(a,b,c){for(var d=
0;d<a.length;){var f=a[d];++d;if(w.__implements(f,T)){var g=f;if(!g.get_includeInLayout())continue;var h=null;g!=null&&g.get_layoutData()instanceof fd&&(h=g.get_layoutData());if(h!=null){if(b.width!=null){var n=h.get_left(),l=h.get_right();n!=null&&l!=null&&n.get_relativeTo()==null&&l.get_relativeTo()==null&&f.set_width(b.width-n.get_value()-l.get_value())}b.height!=null&&(n=h.get_top(),l=h.get_bottom(),n!=null&&l!=null&&n.get_relativeTo()==null&&l.get_relativeTo()==null&&f.set_height(b.height-n.get_value()-
l.get_value()))}}w.__implements(f,da)&&f.validateNow()}l=n=0;for(var q=[];q.length<a.length;){var u=q.length;for(d=0;d<a.length;)if(f=a[d],++d,q.indexOf(f)==-1){g=null;if(w.__implements(f,T)&&(g=f,!g.get_includeInLayout())){q.push(f);continue}h=null;g!=null&&g.get_layoutData()instanceof fd&&(h=g.get_layoutData());w.__implements(f,da)&&f.validateNow();if(h==null)h=f.get_x()+f.get_width(),n<h&&(n=h),h=f.get_y()+f.get_height(),l<h&&(l=h);else{if(h.get_top()!=null){var v=h.get_top(),z=v.get_value();g=
v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new ob("relativeTo must have the same parent");continue}f.set_y(z);g!=null&&f.set_y(f.get_y()+(g.get_y()+g.get_height()))}if(h.get_left()!=null){v=h.get_left();z=v.get_value();g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new ob("relativeTo must have the same parent");continue}f.set_x(z);g!=null&&f.set_x(f.get_x()+(g.get_x()+g.get_width()))}if(h.get_verticalCenter()==null){z=f.get_y()+f.get_height();
if(h.get_bottom()!=null){v=h.get_bottom();var r=v.get_value();z=h.get_top()!=null?z+r:f.get_height()+r}l<z&&(l=z)}else z=f.get_height(),l<z&&(l=z);h.get_horizontalCenter()==null?(z=f.get_x()+f.get_width(),h.get_right()!=null&&(v=h.get_right(),r=v.get_value(),z=h.get_left()!=null?z+r:f.get_width()+r),n<z&&(n=z)):(h=f.get_width(),n<h&&(n=h))}q.push(f)}if(u==q.length)throw new ob("relativeTo circular reference detected");}for(var F=r=z=0,J=!0;J;){J=!1;b.width!=null?z=b.width:(z=n,b.minWidth!=null&&z<
b.minWidth?z=b.minWidth:b.maxWidth!=null&&z>b.maxWidth&&(z=b.maxWidth));b.height!=null?r=b.height:(r=l,b.minHeight!=null&&r<b.minHeight?r=b.minHeight:b.maxHeight!=null&&r>b.maxHeight&&(r=b.maxHeight));for(q.length=0;q.length<a.length;){u=q.length;for(d=0;d<a.length;)if(f=a[d],++d,q.indexOf(f)==-1){g=null;if(w.__implements(f,T)&&(g=f,!g.get_includeInLayout())){q.push(f);continue}h=null;g!=null&&g.get_layoutData()instanceof fd&&(h=g.get_layoutData());if(h!=null){if(h.get_top()!=null){v=h.get_top();
g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new ob("relativeTo must have the same parent");continue}v=v.get_value();g!=null&&(v+=g.get_y()+g.get_height());f.set_y(v)}if(h.get_left()!=null){v=h.get_left();g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new ob("relativeTo must have the same parent");continue}v=v.get_value();g!=null&&(v+=g.get_x()+g.get_width());f.set_x(v)}if(h.get_bottom()!=null){v=h.get_bottom();g=v.get_relativeTo();
if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new ob("relativeTo must have the same parent");continue}v=v.get_value();var L=r;g!=null&&(L=g.get_y());if(h.get_top()==null)f.set_y(L-v-f.get_height());else if(g=L-v-f.get_y(),g<0&&(g=0),f.get_height()!=g&&(f.set_height(g),b.width==null&&w.__implements(f,da)&&(f.validateNow(),g=f.get_x()+f.get_width(),n<g))){n=g;J=!0;break}}else h.get_verticalCenter()!=null&&f.set_y(h.get_verticalCenter()+(r-f.get_height())/2);if(h.get_right()!=null){v=h.get_right();
g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new ob("relativeTo must have the same parent");continue}v=v.get_value();L=z;g!=null&&(L=g.get_x());if(h.get_left()==null)f.set_x(L-v-f.get_width());else if(h=L-v-f.get_x(),h<0&&(h=0),f.get_width()!=h&&(f.set_width(h),b.height==null&&w.__implements(f,da)&&(f.validateNow(),h=f.get_y()+f.get_height(),l<h))){l=h;J=!0;break}}else h.get_horizontalCenter()!=null&&f.set_x(h.get_horizontalCenter()+(z-f.get_width())/2)}q.push(f)}if(!J&&
u==q.length)throw new ob("relativeTo circular reference detected");}if(J&&(++F,F>a.length))throw new ob("AnchorLayout is stuck in an infinite loop.");}c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=z;c.contentHeight=r;c.viewPortWidth=z;c.viewPortHeight=r;return c},__class__:Gi});var Jp=function(a,b){a==null&&(a=0);qa.call(this);this._value=a;this._relativeTo=b};t["feathers.layout.Anchor"]=Jp;Jp.__name__="feathers.layout.Anchor";Jp.__super__=qa;Jp.prototype=I(qa.prototype,{_value:null,
get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._value=a;Y.dispatch(this,"change");return this._value},_relativeTo:null,get_relativeTo:function(){return this._relativeTo},set_relativeTo:function(a){if(this._relativeTo==a)return this._relativeTo;this._relativeTo=a;Y.dispatch(this,"change");return this._relativeTo},__class__:Jp,__properties__:{set_relativeTo:"set_relativeTo",get_relativeTo:"get_relativeTo",set_value:"set_value",get_value:"get_value"}});
var Og={fromPixels:function(a){return new Jp(a)},fromDisplayObject:function(a){return new Jp(0,a)}},Kp=function(){};t["feathers.layout.ILayoutData"]=Kp;Kp.__name__="feathers.layout.ILayoutData";Kp.__isInterface__=!0;Kp.__interfaces__=[Db];var fd=function(a,b,c,d,f,g){this._top=this._right=this._bottom=this._left=this._horizontalCenter=this._verticalCenter=null;qa.call(this);this.set_top(a);this.set_right(b);this.set_bottom(c);this.set_left(d);this.set_horizontalCenter(f);this.set_verticalCenter(g)};
t["feathers.layout.AnchorLayoutData"]=fd;fd.__name__="feathers.layout.AnchorLayoutData";fd.__interfaces__=[Kp];fd.center=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(null,null,null,null,a,b)};fd.fill=function(a){a==null&&(a=0);return new fd(Og.fromPixels(a),Og.fromPixels(a),Og.fromPixels(a),Og.fromPixels(a))};fd.fillHorizontal=function(a){a==null&&(a=0);return new fd(null,Og.fromPixels(a),null,Og.fromPixels(a))};fd.fillVertical=function(a){a==null&&(a=0);return new fd(Og.fromPixels(a),
null,Og.fromPixels(a),null)};fd.topLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(Og.fromPixels(a),null,null,Og.fromPixels(b))};fd.topCenter=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(Og.fromPixels(a),null,null,null,b)};fd.topRight=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(Og.fromPixels(a),Og.fromPixels(b))};fd.middleLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(null,null,null,Og.fromPixels(b),null,a)};fd.middleRight=function(a,b){b==
null&&(b=0);a==null&&(a=0);return new fd(null,Og.fromPixels(b),null,null,null,a)};fd.bottomLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(null,null,Og.fromPixels(a),Og.fromPixels(b))};fd.bottomCenter=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(null,null,Og.fromPixels(a),null,b)};fd.bottomRight=function(a,b){b==null&&(b=0);a==null&&(a=0);return new fd(null,Og.fromPixels(b),Og.fromPixels(a))};fd.__super__=qa;fd.prototype=I(qa.prototype,{_top:null,get_top:function(){return this._top},
set_top:function(a){if(this._top==a)return this._top;if(this._top!=null){var b=this._top;b.removeEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler))}this._top=a;this._top!=null&&(b=this._top,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),!1,0,!0));Y.dispatch(this,"change");return this._top},_right:null,get_right:function(){return this._right},set_right:function(a){if(this._right==a)return this._right;if(this._right!=null){var b=this._right;b.removeEventListener("change",
m(this,this.anchorLayoutData_anchor_changeHandler))}this._right=a;this._right!=null&&(b=this._right,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),!1,0,!0));Y.dispatch(this,"change");return this._right},_bottom:null,get_bottom:function(){return this._bottom},set_bottom:function(a){if(this._bottom==a)return this._bottom;if(this._bottom!=null){var b=this._bottom;b.removeEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler))}this._bottom=a;this._bottom!=
null&&(b=this._bottom,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),!1,0,!0));Y.dispatch(this,"change");return this._bottom},_left:null,get_left:function(){return this._left},set_left:function(a){if(this._left==a)return this._left;if(this._left!=null){var b=this._left;b.removeEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler))}this._left=a;this._left!=null&&(b=this._left,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),
!1,0,!0));Y.dispatch(this,"change");return this._left},_horizontalCenter:null,get_horizontalCenter:function(){return this._horizontalCenter},set_horizontalCenter:function(a){if(this._horizontalCenter==a)return this._horizontalCenter;this._horizontalCenter=a;Y.dispatch(this,"change");return this._horizontalCenter},_verticalCenter:null,get_verticalCenter:function(){return this._verticalCenter},set_verticalCenter:function(a){if(this._verticalCenter==a)return this._verticalCenter;this._verticalCenter=
a;Y.dispatch(this,"change");return this._verticalCenter},anchorLayoutData_anchor_changeHandler:function(a){Y.dispatch(this,"change")},__class__:fd,__properties__:{set_verticalCenter:"set_verticalCenter",get_verticalCenter:"get_verticalCenter",set_horizontalCenter:"set_horizontalCenter",get_horizontalCenter:"get_horizontalCenter",set_left:"set_left",get_left:"get_left",set_bottom:"set_bottom",get_bottom:"get_bottom",set_right:"set_right",get_right:"get_right",set_top:"set_top",get_top:"get_top"}});
var Ve=R["feathers.layout.AutoSizeMode"]={__ename__:"feathers.layout.AutoSizeMode",__constructs__:null,STAGE:{_hx_name:"STAGE",_hx_index:0,__enum__:"feathers.layout.AutoSizeMode",toString:E},CONTENT:{_hx_name:"CONTENT",_hx_index:1,__enum__:"feathers.layout.AutoSizeMode",toString:E}};Ve.__constructs__=[Ve.STAGE,Ve.CONTENT];var np=function(){this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._horizontalGap=this._verticalGap=0;qa.call(this)};t["feathers.layout.CalendarGridLayout"]=
np;np.__name__="feathers.layout.CalendarGridLayout";np.__interfaces__=[fh];np.__super__=qa;np.prototype=I(qa.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=
a;Y.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;Y.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},
_horizontalGap:null,get_horizontalGap:function(){return this._horizontalGap},set_horizontalGap:function(a){if(this._horizontalGap==a)return this._horizontalGap;this._horizontalGap=a;Y.dispatch(this,"change");return this._horizontalGap},_verticalGap:null,get_verticalGap:function(){return this._verticalGap},set_verticalGap:function(a){if(this._verticalGap==a)return this._verticalGap;this._verticalGap=a;Y.dispatch(this,"change");return this._verticalGap},setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},setGap:function(a){this.set_horizontalGap(a);this.set_verticalGap(a)},layout:function(a,b,c){for(var d=0;d<a.length;){var f=a[d];++d;if(w.__implements(f,T)){var g=f;if(!g.get_includeInLayout())continue}w.__implements(f,da)&&f.validateNow()}var h=0,n=0;for(d=0;d<a.length;){f=a[d];++d;if(w.__implements(f,T)&&(g=f,!g.get_includeInLayout()))continue;h=Math.max(h,f.get_width());n=Math.max(n,f.get_height())}h<0&&(h=0);n<0&&(n=0);
d=Math.ceil(a.length/7);var l=b.width;l!=null?h=(l-this._paddingLeft-this._paddingRight-this._horizontalGap*7+this._horizontalGap)/7:(l=this._paddingLeft+this._paddingRight+7*(h+this._horizontalGap)-this._horizontalGap,b.minWidth!=null&&l<b.minWidth?l=b.minWidth:b.maxWidth!=null&&l>b.maxWidth&&(l=b.maxWidth));var q=b.height;q!=null?n=(q-this._paddingTop-this._paddingBottom-this._verticalGap*d+this._verticalGap)/d:(q=this._paddingTop+this._paddingBottom+d*(n+this._verticalGap)-this._verticalGap,b.minHeight!=
null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight));b=0;var u=this._paddingLeft,v=this._paddingTop;d=0;for(var z=a.length;d<z;){f=d++;f=a[f];if(w.__implements(f,T)&&(g=f,!g.get_includeInLayout()))continue;f.get_width()!=h&&f.set_width(h);f.get_height()!=n&&f.set_height(n);b>=7&&(u=this._paddingLeft,v+=n+this._verticalGap,b=0);f.set_x(u);f.set_y(v);u+=h+this._horizontalGap;++b}this.get_paddingBottom();c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=l;c.contentHeight=
q;c.viewPortWidth=l;c.viewPortHeight=q;return c},validateItems:function(a,b){for(b=0;b<a.length;){var c=a[b];++b;(!w.__implements(c,T)||c.get_includeInLayout())&&w.__implements(c,da)&&c.validateNow()}},__class__:np,__properties__:{set_verticalGap:"set_verticalGap",get_verticalGap:"get_verticalGap",set_horizontalGap:"set_horizontalGap",get_horizontalGap:"get_horizontalGap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",
set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var nj=R["feathers.layout.Direction"]={__ename__:"feathers.layout.Direction",__constructs__:null,VERTICAL:{_hx_name:"VERTICAL",_hx_index:0,__enum__:"feathers.layout.Direction",toString:E},HORIZONTAL:{_hx_name:"HORIZONTAL",_hx_index:1,__enum__:"feathers.layout.Direction",toString:E},NONE:{_hx_name:"NONE",_hx_index:2,__enum__:"feathers.layout.Direction",toString:E}};
nj.__constructs__=[nj.VERTICAL,nj.HORIZONTAL,nj.NONE];var Lp=function(){this._verticalAlign=hc.TOP;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=0;qa.call(this)};t["feathers.layout.FormLayout"]=Lp;Lp.__name__="feathers.layout.FormLayout";Lp.__interfaces__=[fh];Lp.__super__=qa;Lp.prototype=I(qa.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=
a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;Y.dispatch(this,"change");return this._paddingBottom},
_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;Y.dispatch(this,"change");return this._gap},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==
a)return this._verticalAlign;this._verticalAlign=a;Y.dispatch(this,"change");return this._verticalAlign},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){for(var d=0;d<a.length;){var f=a[d];++d;var g=f instanceof Ti?f:null;g!=null&&g.set_customTextColumnWidth(null);w.__implements(f,da)&&f.validateNow()}var h=1/0,n=1/0,l=0,q=0;for(d=0;d<a.length;){f=a[d];++d;if(w.__implements(f,T)&&(g=f,!g.get_includeInLayout()))continue;
g=f instanceof Ti?f:null;if(g!=null)switch(g.get_textPosition()._hx_index){case 1:q=Math.max(q,g.getTextMeasuredWidth());n=Math.min(n,g.getTextMeasuredMaxWidth());break;case 3:l=Math.max(l,g.getTextMeasuredWidth()),h=Math.min(h,g.getTextMeasuredMaxWidth())}}l>h&&(l=h);q>n&&(q=n);h=0;n=this._paddingTop;for(d=0;d<a.length;){f=a[d];++d;if(w.__implements(f,T)&&(g=f,!g.get_includeInLayout()))continue;g=f instanceof Ti?f:null;if(g!=null){switch(g.get_textPosition()._hx_index){case 1:g.set_customTextColumnWidth(q);
break;case 3:g.set_customTextColumnWidth(l);break;default:g.set_customTextColumnWidth(null)}w.__implements(f,da)&&f.validateNow()}h<f.get_width()&&(h=f.get_width());f.set_x(this._paddingLeft);f.set_y(n);n+=f.get_height()+this._gap}h+=this._paddingLeft+this._paddingRight;n+=this._paddingBottom;a.length>0&&(n-=this._gap);l=h;b.width!=null?l=b.width:b.minWidth!=null&&l<b.minWidth?l=b.minWidth:b.maxWidth!=null&&l>b.maxWidth&&(l=b.maxWidth);q=n;b.height!=null?q=b.height:b.minHeight!=null&&q<b.minHeight?
q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight);for(d=0;d<a.length;){f=a[d];++d;if(w.__implements(f,T)&&(g=f,!g.get_includeInLayout()))continue;f.set_width(l-this._paddingLeft-this._paddingRight)}d=n-this._paddingTop-this._paddingBottom;if(this._verticalAlign==hc.BOTTOM||this._verticalAlign==hc.MIDDLE)if(f=q-this._paddingTop-this._paddingBottom,!(d>=f))for(b=0,this._verticalAlign==hc.BOTTOM?b=f-d:this._verticalAlign==hc.MIDDLE&&(b=(f-d)/2),d=0;d<a.length;){f=a[d];++d;if(w.__implements(f,
T)&&(g=f,!g.get_includeInLayout()))continue;f.set_y(Math.max(this._paddingTop,f.get_y()+b))}h<l&&(h=l);n<q&&(n=q);c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=h;c.contentHeight=n;c.viewPortWidth=l;c.viewPortHeight=q;return c},validateItems:function(a){for(var b=0;b<a.length;){var c=a[b];++b;var d=c instanceof Ti?c:null;d!=null&&d.set_customTextColumnWidth(null);w.__implements(c,da)&&c.validateNow()}},applyHorizontalAlign:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(w.__implements(d,
T)){var f=d;if(!f.get_includeInLayout())continue}d.set_width(b-this._paddingLeft-this._paddingRight)}},applyVerticalAlign:function(a,b,c){if(this._verticalAlign==hc.BOTTOM||this._verticalAlign==hc.MIDDLE){var d=c-this._paddingTop-this._paddingBottom;if(!(b>=d))for(c=0,this._verticalAlign==hc.BOTTOM?c=d-b:this._verticalAlign==hc.MIDDLE&&(c=(d-b)/2),b=0;b<a.length;){d=a[b];++b;if(w.__implements(d,T)){var f=d;if(!f.get_includeInLayout())continue}d.set_y(Math.max(this._paddingTop,d.get_y()+c))}}},__class__:Lp,
__properties__:{set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var Ml=function(){this._heightResetEnabled=!0;this._paddingLeft=this._paddingRight=0;qa.call(this)};
t["feathers.layout.GridViewRowLayout"]=Ml;Ml.__name__="feathers.layout.GridViewRowLayout";Ml.__interfaces__=[fh];Ml.__super__=qa;Ml.prototype=I(qa.prototype,{_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==
a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==a)return this._columns;this._columns=a;Y.dispatch(this,"change");return this._columns},_customColumnWidths:null,get_customColumnWidths:function(){return this._customColumnWidths},set_customColumnWidths:function(a){if(this._customColumnWidths==a)return this._customColumnWidths;this._customColumnWidths=
a;Y.dispatch(this,"change");return this._customColumnWidths},_heightResetEnabled:null,get_heightResetEnabled:function(){return this._heightResetEnabled},set_heightResetEnabled:function(a){if(this._heightResetEnabled==a)return this._heightResetEnabled;this._heightResetEnabled=a;Y.dispatch(this,"change");return this._heightResetEnabled},setPadding:function(a){this.set_paddingRight(a);this.set_paddingLeft(a)},layout:function(a,b,c){this.applyColumnWidths(a,b.width,b.minWidth,b.maxWidth);for(var d=this._paddingLeft,
f=0,g=0;g<a.length;){var h=a[g];++g;this._heightResetEnabled&&b.height==null&&w.__implements(h,rb)&&h.resetHeight();w.__implements(h,da)&&h.validateNow();f<h.get_height()&&(f=h.get_height());h.set_x(d);d+=h.get_width()}var n=d+=this._paddingRight;b.width!=null?n=b.width:b.minWidth!=null&&n<b.minWidth?n=b.minWidth:b.maxWidth!=null&&n>b.maxWidth&&(n=b.maxWidth);var l=f;b.height!=null?l=b.height:b.minHeight!=null&&l<b.minHeight?l=b.minHeight:b.maxHeight!=null&&l>b.maxHeight&&(l=b.maxHeight);for(g=0;g<
a.length;)h=a[g],++g,h.set_height(l);d<n&&(d=n);f<l&&(f=l);c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=d;c.contentHeight=f;c.viewPortWidth=n;c.viewPortHeight=l;return c},applyViewPortHeight:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;d.set_height(b)}},applyColumnWidths:function(a,b,c,d){for(var f=[],g=0,h=0,n=0,l=0,q=this._columns.get_length();l<q;){var u=l++,v=this._columns.get(u),z=v.width,r=a[u];if(z!=null)r.set_width(z),w.__implements(r,da)&&r.validateNow();else if(this._customColumnWidths!=
null&&u<this._customColumnWidths.length)r.set_width(this._customColumnWidths[u]),w.__implements(r,da)&&r.validateNow();else{z=100;var F=0;w.__implements(r,rb)&&(w.__implements(r,da)&&r.validateNow(),F=r.get_minWidth());F=Math.max(v.minWidth,F);n=Math.max(F,n);h+=z;f.push(u);continue}g+=r.get_width()}g+=this._paddingLeft+this._paddingRight;b==null&&(b=g+f.length*n,c!=null&&b<c?b=c:d!=null&&b>d&&(b=d));b-=g;b<0&&(b=0);do{c=!1;d=0;g=b/h;for(l=0;l<f.length;)n=f[l],++l,r=a[n],v=this._columns.get(n),z=
100,q=Math.floor(g*z),v=v.minWidth,v>b&&(v=b),q<v&&(q=v,b-=q,h-=z,V.remove(f,n),c=!0),r.set_width(q),w.__implements(r,da)&&r.validateNow(),d+=q;c||(b-=d)}while(c);b>0&&f.length>0&&(n=f[f.length-1],a=a[n],a.set_width(a.get_width()+b))},__class__:Ml,__properties__:{set_heightResetEnabled:"set_heightResetEnabled",get_heightResetEnabled:"get_heightResetEnabled",set_customColumnWidths:"set_customColumnWidths",get_customColumnWidths:"get_customColumnWidths",set_columns:"set_columns",get_columns:"get_columns",
set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft"}});var ep=function(){this._fallbackFluidIndex=-1;this._verticalAlign=hc.JUSTIFY;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=0;qa.call(this)};t["feathers.layout.HDividedBoxLayout"]=ep;ep.__name__="feathers.layout.HDividedBoxLayout";ep.__interfaces__=[fh];ep.__super__=qa;ep.prototype=I(qa.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},
set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==
a)return this._paddingBottom;this._paddingBottom=a;Y.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=
a;Y.dispatch(this,"change");return this._verticalAlign},_customItemWidths:null,get_customItemWidths:function(){return this._customItemWidths},set_customItemWidths:function(a){if(this._customItemWidths==a)return this._customItemWidths;this._customItemWidths=a;Y.dispatch(this,"change");return this._customItemWidths},_fallbackFluidIndex:null,get_fallbackFluidIndex:function(){return this._fallbackFluidIndex},set_fallbackFluidIndex:function(a){if(this._fallbackFluidIndex==a)return this._fallbackFluidIndex;
this._fallbackFluidIndex=a;Y.dispatch(this,"change");return this._fallbackFluidIndex},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){for(var d=0;d<a.length;){var f=a[d],g=null;d>0&&(g=a[d-1]);if(!w.__implements(f,T)||f.get_includeInLayout()){if(this._customItemWidths!=null&&d<this._customItemWidths.length){var h=this._customItemWidths[d];h!=null&&f.set_width(h)}w.__implements(f,da)&&f.validateNow();w.__implements(g,
da)&&g.validateNow()}d+=2}this.applyPercentWidth(a,b.width,b.minWidth,b.maxWidth);h=this._paddingLeft;var n=0;for(d=0;d<a.length;){f=a[d];g=null;d>0&&(g=a[d-1]);if(!w.__implements(f,T)||f.get_includeInLayout())w.__implements(g,da)&&g.validateNow(),g!=null&&g.get_visible()&&(g.set_x(h),h+=g.get_width()),w.__implements(f,da)&&f.validateNow(),n<f.get_height()&&(n=f.get_height()),f.set_x(h),h+=f.get_width();d+=2}h+=this._paddingRight;n+=this._paddingTop+this._paddingBottom;f=h;b.width!=null?f=b.width:
b.minWidth!=null&&f<b.minWidth?f=b.minWidth:b.maxWidth!=null&&f>b.maxWidth&&(f=b.maxWidth);var l=n;b.height!=null?l=b.height:b.minHeight!=null&&l<b.minHeight?l=b.minHeight:b.maxHeight!=null&&l>b.maxHeight&&(l=b.maxHeight);this.applyPercentHeight(a,l);for(d=0;d<a.length;){g=null;d>0&&(g=a[d-1]);if(g!=null)switch(this._verticalAlign._hx_index){case 0:g.set_y(this._paddingTop);break;case 1:g.set_y(Math.max(this._paddingTop,this._paddingTop+(l-this._paddingTop-this._paddingBottom-g.get_height())/2));
break;case 2:g.set_y(Math.max(this._paddingTop,this._paddingTop+(l-this._paddingTop-this._paddingBottom)-g.get_height()));break;case 3:g.set_y(this._paddingTop),g.set_height(l-this._paddingTop-this._paddingBottom)}d+=2}h<f&&(h=f);n<l&&(n=l);c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=h;c.contentHeight=n;c.viewPortWidth=f;c.viewPortHeight=l;return c},validateItems:function(a){for(var b=0;b<a.length;){var c=a[b],d=null;b>0&&(d=a[b-1]);if(!w.__implements(c,T)||c.get_includeInLayout()){if(this._customItemWidths!=
null&&b<this._customItemWidths.length){var f=this._customItemWidths[b];f!=null&&c.set_width(f)}w.__implements(c,da)&&c.validateNow();w.__implements(d,da)&&d.validateNow()}b+=2}},applyVerticalAlign:function(a,b){for(var c=0;c<a.length;){var d=null;c>0&&(d=a[c-1]);if(d!=null)switch(this._verticalAlign._hx_index){case 0:d.set_y(this._paddingTop);break;case 1:d.set_y(Math.max(this._paddingTop,this._paddingTop+(b-this._paddingTop-this._paddingBottom-d.get_height())/2));break;case 2:d.set_y(Math.max(this._paddingTop,
this._paddingTop+(b-this._paddingTop-this._paddingBottom)-d.get_height()));break;case 3:d.set_y(this._paddingTop),d.set_height(b-this._paddingTop-this._paddingBottom)}c+=2}},applyPercentWidth:function(a,b,c,d){for(var f=[],g=[],h=0,n=0,l=0,q=this._fallbackFluidIndex,u=-1,v=0;v<a.length;){var z=a[v],r=null;v>0&&(r=a[v-1]);if(w.__implements(z,T)&&!z.get_includeInLayout())q==v&&(q=-1);else{r!=null&&r.get_visible()&&(h+=r.get_width());u=v;r=Math.floor(v/2);var F=!0;this._customItemWidths!=null&&r<this._customItemWidths.length&&
(r=this._customItemWidths[r],r!=null&&(F=!1,z.set_width(r),f.push(v),w.__implements(z,da)&&z.validateNow()));if(F){F=100;if(w.__implements(z,rb)){var J=z;z=J.get_explicitMinWidth();z!=null&&(n+=z)}l+=F;g.push(v)}else h+=z.get_width()}v+=2}h+=this._paddingLeft+this._paddingRight;b==null&&(b=h+n,c!=null&&b<c?b=c:d!=null&&b>d&&(b=d));b-=h;do{h=!1;n=0;v=b/l;v<0&&(v=0);for(c=0;c<g.length;)d=g[c],++c,z=a[d],F=100,r=Math.floor(v*F),J=null,w.__implements(z,rb)&&(J=z,J=J.get_explicitMinWidth()),J!=null&&(J>
b&&(J=b),r<J&&(r=J,b-=r,l-=F,V.remove(g,d),h=!0)),z.set_width(r),w.__implements(z,da)&&z.validateNow(),n+=r;h||(b-=n)}while(h);if(b>0&&g.length>0)d=g[g.length-1],a=a[d],a.set_width(a.get_width()+b);else if(b!=0){if(q==-1||u<q)q=u;q!=-1&&(g=a[q],r=g.get_width()+b,r<0?(b=r,r=0,V.remove(f,q)):b=0,g.set_width(r));if(b!=0)for(q=b/f.length,c=0;c<f.length;)d=f[c],++c,z=a[d],z.set_width(z.get_width()+q)}},applyPercentHeight:function(a,b){b=b-this._paddingTop-this._paddingBottom;for(var c=0;c<a.length;){var d=
a[c];if(!w.__implements(d,T)||d.get_includeInLayout()){var f=b;if(w.__implements(d,rb)){var g=d,h=g.get_explicitMinHeight();h!=null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxHeight();g!=null&&f>g&&(f=g)}d.set_height(f)}c+=2}},__class__:ep,__properties__:{set_fallbackFluidIndex:"set_fallbackFluidIndex",get_fallbackFluidIndex:"get_fallbackFluidIndex",set_customItemWidths:"set_customItemWidths",get_customItemWidths:"get_customItemWidths",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",
set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var Wb=R["feathers.layout.HorizontalAlign"]={__ename__:"feathers.layout.HorizontalAlign",__constructs__:null,LEFT:{_hx_name:"LEFT",_hx_index:0,__enum__:"feathers.layout.HorizontalAlign",toString:E},CENTER:{_hx_name:"CENTER",
_hx_index:1,__enum__:"feathers.layout.HorizontalAlign",toString:E},RIGHT:{_hx_name:"RIGHT",_hx_index:2,__enum__:"feathers.layout.HorizontalAlign",toString:E},JUSTIFY:{_hx_name:"JUSTIFY",_hx_index:3,__enum__:"feathers.layout.HorizontalAlign",toString:E}};Wb.__constructs__=[Wb.LEFT,Wb.CENTER,Wb.RIGHT,Wb.JUSTIFY];var mj=function(){};t["feathers.layout.IDragDropLayout"]=mj;mj.__name__="feathers.layout.IDragDropLayout";mj.__isInterface__=!0;mj.__interfaces__=[fh];mj.prototype={getDragDropIndex:null,getDragDropRegion:null,
__class__:mj};var Mp=function(){this._verticalAlign=hc.TOP;this._minItemWidth=0;this._maxItemWidth=1/0;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=0;qa.call(this)};t["feathers.layout.HorizontalDistributedLayout"]=Mp;Mp.__name__="feathers.layout.HorizontalDistributedLayout";Mp.__interfaces__=[mj,fh];Mp.__super__=qa;Mp.prototype=I(qa.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==
a)return this._paddingTop;this._paddingTop=a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=
a;Y.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;Y.dispatch(this,"change");return this._gap},_maxItemWidth:null,get_maxItemWidth:function(){return this._maxItemWidth},
set_maxItemWidth:function(a){if(this._maxItemWidth==a)return this._maxItemWidth;this._maxItemWidth=a;Y.dispatch(this,"change");return this._maxItemWidth},_minItemWidth:null,get_minItemWidth:function(){return this._minItemWidth},set_minItemWidth:function(a){if(this._minItemWidth==a)return this._minItemWidth;this._minItemWidth=a;Y.dispatch(this,"change");return this._minItemWidth},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==
a)return this._verticalAlign;this._verticalAlign=a;Y.dispatch(this,"change");return this._verticalAlign},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){this.applyDistributedWidth(a,b.width,b.minWidth,b.maxWidth);for(var d=this._paddingLeft,f=0,g=0;g<a.length;){var h=a[g];++g;if(w.__implements(h,T)){var n=h;if(!n.get_includeInLayout())continue}w.__implements(h,da)&&h.validateNow();f<h.get_height()&&(f=
h.get_height());h.set_x(d);d+=h.get_width()+this._gap}d+=this._paddingRight;a.length>0&&(d-=this._gap);f+=this._paddingTop+this._paddingBottom;var l=d;b.width!=null?l=b.width:b.minWidth!=null&&l<b.minWidth?l=b.minWidth:b.maxWidth!=null&&l>b.maxWidth&&(l=b.maxWidth);var q=f;b.height!=null?q=b.height:b.minHeight!=null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight);for(g=0;g<a.length;){h=a[g];++g;if(w.__implements(h,T)&&(n=h,!n.get_includeInLayout()))continue;switch(this._verticalAlign._hx_index){case 0:h.set_y(this._paddingTop);
break;case 1:h.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom-h.get_height())/2));break;case 2:h.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom)-h.get_height()));break;case 3:h.set_y(this._paddingTop),h.set_height(q-this._paddingTop-this._paddingBottom)}}d<l&&(d=l);f<q&&(f=q);c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=d;c.contentHeight=f;c.viewPortWidth=l;c.viewPortHeight=q;return c},getDragDropIndex:function(a,
b,c,d,f){c=this._paddingLeft;d=0;for(f=a.length;d<f;){var g=d++,h=a[g];if(!w.__implements(h,T)||h.get_includeInLayout()){w.__implements(h,da)&&h.validateNow();h=h.get_width();if(b<c+h/2)return g;c+=h+this._gap}}return a.length},getDragDropRegion:function(a,b,c,d,f,g,h){d=b;!(b<0)&&d>a.length&&(d=a.length);b=this._paddingLeft;for(c=0;c<d;)if(f=c++,f=a[f],!w.__implements(f,T)||f.get_includeInLayout())w.__implements(f,da)&&f.validateNow(),b+=f.get_width()+this._gap;h==null?h=new Ia(b,0,0,g):h.setTo(b,
0,0,g);return h},applyDistributedWidth:function(a,b,c,d){for(var f=0,g=0,h=0,n=0;n<a.length;){var l=a[n];++n;if(w.__implements(l,T)){var q=l;if(!q.get_includeInLayout())continue}w.__implements(l,da)&&l.validateNow();l=w.__implements(l,rb)?l.get_minWidth():l.get_width();f<l&&(f=l);g+=100;++h}b!=null?n=b:(n=this._paddingLeft+this._paddingRight+(f+this._gap)*h-this._gap,c!=null&&n<c?n=c:d!=null&&n>d&&(n=d));n-=this._paddingLeft+this._paddingRight+this._gap*(h-1);n<0&&(n=0);c=n/g;for(n=0;n<a.length;){l=
a[n];++n;if(w.__implements(l,T)&&(q=l,!q.get_includeInLayout()))continue;d=c*100;d<this._minItemWidth?d=this._minItemWidth:d>this._maxItemWidth&&(d=this._maxItemWidth);l.set_width(d);w.__implements(l,da)&&l.validateNow()}},applyVerticalAlign:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(w.__implements(d,T)){var f=d;if(!f.get_includeInLayout())continue}switch(this._verticalAlign._hx_index){case 0:d.set_y(this._paddingTop);break;case 1:d.set_y(Math.max(this._paddingTop,this._paddingTop+(b-
this._paddingTop-this._paddingBottom-d.get_height())/2));break;case 2:d.set_y(Math.max(this._paddingTop,this._paddingTop+(b-this._paddingTop-this._paddingBottom)-d.get_height()));break;case 3:d.set_y(this._paddingTop),d.set_height(b-this._paddingTop-this._paddingBottom)}}},__class__:Mp,__properties__:{set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_minItemWidth:"set_minItemWidth",get_minItemWidth:"get_minItemWidth",set_maxItemWidth:"set_maxItemWidth",get_maxItemWidth:"get_maxItemWidth",
set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var zg=function(){this._justifyResetEnabled=this._percentWidthResetEnabled=this._percentHeightResetEnabled=!1;this._verticalAlign=hc.TOP;this._horizontalAlign=Wb.LEFT;this._paddingTop=
this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;qa.call(this)};t["feathers.layout.HorizontalLayout"]=zg;zg.__name__="feathers.layout.HorizontalLayout";zg.__interfaces__=[mj,fh];zg.__super__=qa;zg.prototype=I(qa.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},
set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;Y.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==
a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;Y.dispatch(this,"change");return this._gap},_minGap:null,get_minGap:function(){return this._minGap},set_minGap:function(a){if(this._minGap==a)return this._minGap;this._minGap=a;Y.dispatch(this,"change");return this._minGap},_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},
set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;Y.dispatch(this,"change");return this._horizontalAlign},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=a;Y.dispatch(this,"change");return this._verticalAlign},_justifyResetEnabled:null,get_justifyResetEnabled:function(){return this._justifyResetEnabled},set_justifyResetEnabled:function(a){if(this._justifyResetEnabled==
a)return this._justifyResetEnabled;this._justifyResetEnabled=a;Y.dispatch(this,"change");return this._justifyResetEnabled},_percentWidthResetEnabled:null,get_percentWidthResetEnabled:function(){return this._percentWidthResetEnabled},set_percentWidthResetEnabled:function(a){if(this._percentWidthResetEnabled==a)return this._percentWidthResetEnabled;this._percentWidthResetEnabled=a;Y.dispatch(this,"change");return this._percentWidthResetEnabled},_percentHeightResetEnabled:null,get_percentHeightResetEnabled:function(){return this._percentHeightResetEnabled},
set_percentHeightResetEnabled:function(a){if(this._percentHeightResetEnabled==a)return this._percentHeightResetEnabled;this._percentHeightResetEnabled=a;Y.dispatch(this,"change");return this._percentHeightResetEnabled},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){var d=this._gap,f=this._gap==1/0;f&&(d=this._minGap);var g=this._verticalAlign==hc.JUSTIFY,h=b.width;h!=null&&(h-=this._paddingLeft+this._paddingRight);
var n=b.height;n!=null&&(n-=this._paddingTop+this._paddingBottom);for(f=0;f<a.length;){var l=a[f];++f;var q=null,u=null;if(w.__implements(l,T)){var v=l;if(!v.get_includeInLayout())continue;v=v.get_layoutData();v=v instanceof gh?v:null;v!=null&&(q=v.get_percentWidth(),u=v.get_percentHeight())}g?n!=null?l.set_height(n):this._justifyResetEnabled&&w.__implements(l,rb)&&l.resetHeight():n!=null?u!=null&&(u<0?u=0:u>100&&(u=100),l.set_height(u/100*n)):u!=null&&this._percentHeightResetEnabled&&w.__implements(l,
rb)&&l.resetHeight();q!=null&&this._percentWidthResetEnabled&&h==null&&w.__implements(l,rb)&&l.resetWidth();w.__implements(l,da)&&l.validateNow();g&&n==null&&b.maxHeight!=null&&(q=b.maxHeight-this._paddingTop-this._paddingBottom,l.get_height()>q&&(l.set_height(q),w.__implements(l,da)&&l.validateNow()))}this.applyPercentWidth(a,b.width,b.minWidth,b.maxWidth,d);g=this._paddingLeft;for(f=h=0;f<a.length;){l=a[f];++f;v=null;if(w.__implements(l,T)){u=l;if(!u.get_includeInLayout())continue;v=u.get_layoutData();
v=v instanceof gh?v:null}w.__implements(l,da)&&l.validateNow();v!=null&&v.get_marginLeft()!=null&&(g+=v.get_marginLeft());h<l.get_height()&&(h=l.get_height());l.set_x(g);g+=l.get_width()+d;v!=null&&v.get_marginRight()!=null&&(g+=v.get_marginRight())}g+=this._paddingRight;a.length>0&&(g-=d);h+=this._paddingTop+this._paddingBottom;n=g;b.width!=null?n=b.width:b.minWidth!=null&&n<b.minWidth?n=b.minWidth:b.maxWidth!=null&&n>b.maxWidth&&(n=b.maxWidth);q=h;b.height!=null?q=b.height:b.minHeight!=null&&q<
b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight);this.applyPercentHeight(a,q);for(f=0;f<a.length;){l=a[f];++f;if(w.__implements(l,T)&&(u=l,!u.get_includeInLayout()))continue;switch(this._verticalAlign._hx_index){case 0:l.set_y(this._paddingTop);break;case 1:l.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom-l.get_height())/2));break;case 2:l.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom)-
l.get_height()));break;case 3:l.set_y(this._paddingTop),l.set_height(q-this._paddingTop-this._paddingBottom)}}l=g-this._paddingLeft-this._paddingRight;d=b=0;u=n-this._paddingLeft-this._paddingRight;if(f=this._gap==1/0)d=this._minGap,a.length>1&&u>l&&(d+=(u-l)/(a.length-1)),d-=this._minGap;else{switch(this._horizontalAlign._hx_index){case 0:b=0;break;case 1:b=(u-l)/2;break;case 2:b=u-l;break;default:throw new Cb("Unknown horizontal align: "+H.string(this._horizontalAlign));}b<0&&(b=0)}if(b!=0||d!=
0)for(f=0;f<a.length;){l=a[f];++f;if(w.__implements(l,T)&&(u=l,!u.get_includeInLayout()))continue;l.set_x(Math.max(this._paddingLeft,l.get_x()+b));b+=d}g<n&&(g=n);h<q&&(h=q);c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=g;c.contentHeight=h;c.viewPortWidth=n;c.viewPortHeight=q;return c},getDragDropIndex:function(a,b,c,d,f){c=this._gap;this._gap==1/0&&(c=this._minGap);d=this._paddingLeft;f=0;for(var g=a.length;f<g;){var h=f++,n=a[h];if(!w.__implements(n,T)||n.get_includeInLayout()){w.__implements(n,
da)&&n.validateNow();n=n.get_width();if(b<d+n/2)return h;d+=n+c}}return a.length},getDragDropRegion:function(a,b,c,d,f,g,h){c=this._gap;this._gap==1/0&&(c=this._minGap);f=b;f<0?f=0:f>a.length&&(f=a.length);b=this._paddingLeft;for(d=0;d<f;){var n=d++;n=a[n];if(!w.__implements(n,T)||n.get_includeInLayout())w.__implements(n,da)&&n.validateNow(),b+=n.get_width()+c}h==null?h=new Ia(b,0,0,g):h.setTo(b,0,0,g);return h},validateItems:function(a,b){var c=this._verticalAlign==hc.JUSTIFY,d=b.width;d!=null&&
(d-=this._paddingLeft+this._paddingRight);var f=b.height;f!=null&&(f-=this._paddingTop+this._paddingBottom);for(var g=0;g<a.length;){var h=a[g];++g;var n=null,l=null;if(w.__implements(h,T)){var q=h;if(!q.get_includeInLayout())continue;q=q.get_layoutData();q=q instanceof gh?q:null;q!=null&&(n=q.get_percentWidth(),l=q.get_percentHeight())}c?f!=null?h.set_height(f):this._justifyResetEnabled&&w.__implements(h,rb)&&h.resetHeight():f!=null?l!=null&&(l<0?l=0:l>100&&(l=100),h.set_height(l/100*f)):l!=null&&
this._percentHeightResetEnabled&&w.__implements(h,rb)&&h.resetHeight();n!=null&&this._percentWidthResetEnabled&&d==null&&w.__implements(h,rb)&&h.resetWidth();w.__implements(h,da)&&h.validateNow();c&&f==null&&b.maxHeight!=null&&(n=b.maxHeight-this._paddingTop-this._paddingBottom,h.get_height()>n&&(h.set_height(n),w.__implements(h,da)&&h.validateNow()))}},applyVerticalAlign:function(a,b,c){for(b=0;b<a.length;){var d=a[b];++b;if(w.__implements(d,T)){var f=d;if(!f.get_includeInLayout())continue}switch(this._verticalAlign._hx_index){case 0:d.set_y(this._paddingTop);
break;case 1:d.set_y(Math.max(this._paddingTop,this._paddingTop+(c-this._paddingTop-this._paddingBottom-d.get_height())/2));break;case 2:d.set_y(Math.max(this._paddingTop,this._paddingTop+(c-this._paddingTop-this._paddingBottom)-d.get_height()));break;case 3:d.set_y(this._paddingTop),d.set_height(c-this._paddingTop-this._paddingBottom)}}},applyHorizontalAlign:function(a,b,c){var d=0,f=0;c=c-this._paddingLeft-this._paddingRight;if(this._gap==1/0)f=this._minGap,a.length>1&&c>b&&(f+=(c-b)/(a.length-
1)),f-=this._minGap;else{switch(this._horizontalAlign._hx_index){case 0:d=0;break;case 1:d=(c-b)/2;break;case 2:d=c-b;break;default:throw new Cb("Unknown horizontal align: "+H.string(this._horizontalAlign));}d<0&&(d=0)}if(d!=0||f!=0)for(b=d,d=0;d<a.length;){c=a[d];++d;if(w.__implements(c,T)){var g=c;if(!g.get_includeInLayout())continue}c.set_x(Math.max(this._paddingLeft,c.get_x()+b));b+=f}},applyPercentWidth:function(a,b,c,d,f){for(var g=[],h=0,n=0,l=0,q=0;q<a.length;){var u=a[q];++q;if(w.__implements(u,
T)){var v=u;if(!v.get_includeInLayout())continue;var z=v.get_layoutData(),r=z instanceof gh?z:null;if(r!=null&&(z=r.get_percentWidth(),z!=null)){z<0&&(z=0);w.__implements(v,rb)&&(u=v,n+=u.get_minWidth());l+=z;r.get_marginLeft()!=null&&(h+=r.get_marginLeft());r.get_marginRight()!=null&&(h+=r.get_marginRight());h+=f;g.push(v);continue}}h+=u.get_width()+f}h=h-f+(this._paddingLeft+this._paddingRight);l<100&&(l=100);b!=null?a=b:(a=h+n,c!=null&&a<c?a=c:d!=null&&a>d&&(a=d));a-=h;a<0&&(a=0);for(c=!0;c;)for(c=
!1,d=a/l,q=0;q<g.length;)v=g[q],++q,r=w.__cast(v.get_layoutData(),gh),z=r.get_percentWidth(),z<0&&(z=0),r=d*z,w.__implements(v,rb)&&(u=v,u=u.get_explicitMinWidth(),u!=null&&u>a&&(u=a),r<u&&(r=u,a-=r,l-=z,V.remove(g,v),c=!0)),w.__cast(v,ma).set_width(r),w.__implements(v,da)&&v.validateNow()},applyPercentHeight:function(a,b){b=b-this._paddingTop-this._paddingBottom;for(var c=0;c<a.length;){var d=a[c];++c;if(w.__implements(d,T)){var f=d;if(f.get_includeInLayout()&&(f=f.get_layoutData(),f=f instanceof
gh?f:null,f!=null&&(f=f.get_percentHeight(),f!=null))){f<0?f=0:f>100&&(f=100);f=b*f/100;if(w.__implements(d,rb)){var g=d,h=g.get_explicitMinHeight();h!=null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxHeight();g!=null&&f>g&&(f=g)}d.set_height(f)}}}},__class__:zg,__properties__:{set_percentHeightResetEnabled:"set_percentHeightResetEnabled",get_percentHeightResetEnabled:"get_percentHeightResetEnabled",set_percentWidthResetEnabled:"set_percentWidthResetEnabled",get_percentWidthResetEnabled:"get_percentWidthResetEnabled",
set_justifyResetEnabled:"set_justifyResetEnabled",get_justifyResetEnabled:"get_justifyResetEnabled",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",
get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var gh=function(a,b){this._percentWidth=this._percentHeight=this._marginLeft=this._marginRight=null;qa.call(this);this.set_percentWidth(a);this.set_percentHeight(b)};t["feathers.layout.HorizontalLayoutData"]=gh;gh.__name__="feathers.layout.HorizontalLayoutData";gh.__interfaces__=[Kp];gh.fill=function(){return new gh(100,100)};gh.fillHorizontal=function(a){a==null&&(a=100);return new gh(a,null)};
gh.fillVertical=function(a){a==null&&(a=100);return new gh(null,a)};gh.__super__=qa;gh.prototype=I(qa.prototype,{_percentWidth:null,get_percentWidth:function(){return this._percentWidth},set_percentWidth:function(a){if(this._percentWidth==a)return this._percentWidth;this._percentWidth=a;Y.dispatch(this,"change");return this._percentWidth},_percentHeight:null,get_percentHeight:function(){return this._percentHeight},set_percentHeight:function(a){if(this._percentHeight==a)return this._percentHeight;
this._percentHeight=a;Y.dispatch(this,"change");return this._percentHeight},_marginLeft:null,get_marginLeft:function(){return this._marginLeft},set_marginLeft:function(a){if(this._marginLeft==a)return this._marginLeft;this._marginLeft=a;Y.dispatch(this,"change");return this._marginLeft},_marginRight:null,get_marginRight:function(){return this._marginRight},set_marginRight:function(a){if(this._marginRight==a)return this._marginRight;this._marginRight=a;Y.dispatch(this,"change");return this._marginRight},
__class__:gh,__properties__:{set_marginRight:"set_marginRight",get_marginRight:"get_marginRight",set_marginLeft:"set_marginLeft",get_marginLeft:"get_marginLeft",set_percentHeight:"set_percentHeight",get_percentHeight:"get_percentHeight",set_percentWidth:"set_percentWidth",get_percentWidth:"get_percentWidth"}});var Oj=function(){};t["feathers.layout.IKeyboardNavigationLayout"]=Oj;Oj.__name__="feathers.layout.IKeyboardNavigationLayout";Oj.__isInterface__=!0;Oj.__interfaces__=[fh];Oj.prototype={findNextKeyboardIndex:null,
__class__:Oj};var ff=function(){};t["feathers.layout.IScrollLayout"]=ff;ff.__name__="feathers.layout.IScrollLayout";ff.__isInterface__=!0;ff.__interfaces__=[fh];ff.prototype={get_scrollX:null,set_scrollX:null,get_scrollY:null,set_scrollY:null,get_elasticTop:null,get_elasticRight:null,get_elasticBottom:null,get_elasticLeft:null,getNearestScrollPositionForIndex:null,__class__:ff,__properties__:{get_elasticLeft:"get_elasticLeft",get_elasticBottom:"get_elasticBottom",get_elasticRight:"get_elasticRight",
get_elasticTop:"get_elasticTop",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX"}};var Tn=function(){};t["feathers.layout.ISnapLayout"]=Tn;Tn.__name__="feathers.layout.ISnapLayout";Tn.__isInterface__=!0;Tn.__interfaces__=[fh];Tn.prototype={getSnapPositionsX:null,getSnapPositionsY:null,__class__:Tn};var Vh=function(){};t["feathers.layout.IVirtualLayout"]=Vh;Vh.__name__="feathers.layout.IVirtualLayout";Vh.__isInterface__=!0;Vh.__interfaces__=[ff];
Vh.prototype={get_virtualCache:null,set_virtualCache:null,getVisibleIndices:null,__class__:Vh,__properties__:{set_virtualCache:"set_virtualCache",get_virtualCache:"get_virtualCache"}};var Ri=function(a,b){this.start=a;this.end=b};t["feathers.layout.VirtualLayoutRange"]=Ri;Ri.__name__="feathers.layout.VirtualLayoutRange";Ri.prototype={start:null,end:null,__class__:Ri};var Kg=function(){this.reset()};t["feathers.layout.LayoutBoundsResult"]=Kg;Kg.__name__="feathers.layout.LayoutBoundsResult";Kg.prototype=
{contentX:null,contentY:null,viewPortWidth:null,viewPortHeight:null,contentWidth:null,contentHeight:null,contentMinWidth:null,contentMinHeight:null,contentMaxWidth:null,contentMaxHeight:null,reset:function(){this.contentMinHeight=this.contentMinWidth=this.contentHeight=this.contentWidth=this.contentY=this.contentX=0;this.contentMaxWidth=1/0;this.contentMaxHeight=1/0;this.viewPortHeight=this.viewPortWidth=0},__class__:Kg};var Sb=function(a){this.width=this.height=this.minWidth=this.minHeight=this.maxWidth=
this.maxHeight=null;this.save(a)};t["feathers.layout.Measurements"]=Sb;Sb.__name__="feathers.layout.Measurements";Sb.prototype={save:function(a){a==null?this.maxHeight=this.maxWidth=this.minHeight=this.minWidth=this.height=this.width=null:w.__implements(a,rb)?(this.width=a.get_explicitWidth(),this.height=a.get_explicitHeight(),this.minWidth=a.get_explicitMinWidth(),this.minHeight=a.get_explicitMinHeight(),this.maxWidth=a.get_explicitMaxWidth(),this.maxHeight=a.get_explicitMaxHeight()):(this.width=
a.get_width(),this.height=a.get_height(),this.minWidth=this.width,this.minHeight=this.height,this.maxWidth=this.width,this.maxHeight=this.height)},restore:function(a){w.__implements(a,rb)?(this.width==null?a.resetWidth():a.set_width(this.width),this.height==null?a.resetHeight():a.set_height(this.height),this.minWidth==null?a.resetMinWidth():a.set_minWidth(this.minWidth),this.minHeight==null?a.resetMinHeight():a.set_minHeight(this.minHeight),this.maxWidth==null?a.resetMaxWidth():a.set_maxWidth(this.maxWidth),
this.maxHeight==null?a.resetMaxHeight():a.set_maxHeight(this.maxHeight)):(this.width!=null&&a.set_width(this.width),this.height!=null&&a.set_height(this.height))},width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,__class__:Sb};var ra=R["feathers.layout.RelativePosition"]={__ename__:"feathers.layout.RelativePosition",__constructs__:null,TOP:{_hx_name:"TOP",_hx_index:0,__enum__:"feathers.layout.RelativePosition",toString:E},RIGHT:{_hx_name:"RIGHT",_hx_index:1,__enum__:"feathers.layout.RelativePosition",
toString:E},BOTTOM:{_hx_name:"BOTTOM",_hx_index:2,__enum__:"feathers.layout.RelativePosition",toString:E},LEFT:{_hx_name:"LEFT",_hx_index:3,__enum__:"feathers.layout.RelativePosition",toString:E},MANUAL:{_hx_name:"MANUAL",_hx_index:4,__enum__:"feathers.layout.RelativePosition",toString:E}};ra.__constructs__=[ra.TOP,ra.RIGHT,ra.BOTTOM,ra.LEFT,ra.MANUAL];var fA={_new:function(a){return a},fromRelativePosition:function(a){return[a]}},cp=function(){this._fallbackFluidIndex=-1;this._horizontalAlign=Wb.JUSTIFY;
this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=0;qa.call(this)};t["feathers.layout.VDividedBoxLayout"]=cp;cp.__name__="feathers.layout.VDividedBoxLayout";cp.__interfaces__=[fh];cp.__super__=qa;cp.prototype=I(qa.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},
set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;Y.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==
a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;Y.dispatch(this,"change");return this._horizontalAlign},_customItemHeights:null,get_customItemHeights:function(){return this._customItemHeights},set_customItemHeights:function(a){if(this._customItemHeights==
a)return this._customItemHeights;this._customItemHeights=a;Y.dispatch(this,"change");return this._customItemHeights},_fallbackFluidIndex:null,get_fallbackFluidIndex:function(){return this._fallbackFluidIndex},set_fallbackFluidIndex:function(a){if(this._fallbackFluidIndex==a)return this._fallbackFluidIndex;this._fallbackFluidIndex=a;Y.dispatch(this,"change");return this._fallbackFluidIndex},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},
layout:function(a,b,c){for(var d=0;d<a.length;){var f=a[d],g=null;d>0&&(g=a[d-1]);if(!w.__implements(f,T)||f.get_includeInLayout()){if(this._customItemHeights!=null&&d<this._customItemHeights.length){var h=this._customItemHeights[d];h!=null&&f.set_height(h)}w.__implements(f,da)&&f.validateNow();w.__implements(g,da)&&g.validateNow()}d+=2}this.applyPercentHeight(a,b.height,b.minHeight,b.maxHeight);h=0;var n=this._paddingTop;for(d=0;d<a.length;){f=a[d];g=null;d>0&&(g=a[d-1]);if(!w.__implements(f,T)||
f.get_includeInLayout())w.__implements(g,da)&&g.validateNow(),g!=null&&g.get_visible()&&(g.set_y(n),n+=g.get_height()),w.__implements(f,da)&&f.validateNow(),h<f.get_width()&&(h=f.get_width()),f.set_y(n),n+=f.get_height();d+=2}h+=this._paddingLeft+this._paddingRight;n+=this._paddingBottom;f=h;b.width!=null?f=b.width:b.minWidth!=null&&f<b.minWidth?f=b.minWidth:b.maxWidth!=null&&f>b.maxWidth&&(f=b.maxWidth);var l=n;b.height!=null?l=b.height:b.minHeight!=null&&l<b.minHeight?l=b.minHeight:b.maxHeight!=
null&&l>b.maxHeight&&(l=b.maxHeight);this.applyPercentWidth(a,f);for(d=0;d<a.length;){g=null;d>0&&(g=a[d-1]);if(g!=null)switch(this._horizontalAlign._hx_index){case 0:g.set_x(this._paddingLeft);break;case 1:g.set_x(Math.max(this._paddingLeft,this._paddingLeft+(f-this._paddingLeft-this._paddingRight-g.get_width())/2));break;case 2:g.set_x(Math.max(this._paddingLeft,this._paddingLeft+(f-this._paddingLeft-this._paddingRight)-g.get_width()));break;case 3:g.set_x(this._paddingLeft),g.set_width(f-this._paddingLeft-
this._paddingRight)}d+=2}h<f&&(h=f);n<l&&(n=l);c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=h;c.contentHeight=n;c.viewPortWidth=f;c.viewPortHeight=l;return c},validateItems:function(a){for(var b=0;b<a.length;){var c=a[b],d=null;b>0&&(d=a[b-1]);if(!w.__implements(c,T)||c.get_includeInLayout()){if(this._customItemHeights!=null&&b<this._customItemHeights.length){var f=this._customItemHeights[b];f!=null&&c.set_height(f)}w.__implements(c,da)&&c.validateNow();w.__implements(d,da)&&d.validateNow()}b+=
2}},applyHorizontalAlign:function(a,b){for(var c=0;c<a.length;){var d=null;c>0&&(d=a[c-1]);if(d!=null)switch(this._horizontalAlign._hx_index){case 0:d.set_x(this._paddingLeft);break;case 1:d.set_x(Math.max(this._paddingLeft,this._paddingLeft+(b-this._paddingLeft-this._paddingRight-d.get_width())/2));break;case 2:d.set_x(Math.max(this._paddingLeft,this._paddingLeft+(b-this._paddingLeft-this._paddingRight)-d.get_width()));break;case 3:d.set_x(this._paddingLeft),d.set_width(b-this._paddingLeft-this._paddingRight)}c+=
2}},applyPercentHeight:function(a,b,c,d){for(var f=[],g=[],h=0,n=0,l=0,q=this._fallbackFluidIndex,u=-1,v=0;v<a.length;){var z=a[v],r=null;v>0&&(r=a[v-1]);if(w.__implements(z,T)&&!z.get_includeInLayout())q==v&&(q=-1);else{u=v;r!=null&&r.get_visible()&&(h+=r.get_height());r=Math.floor(v/2);var F=!0;this._customItemHeights!=null&&r<this._customItemHeights.length&&(r=this._customItemHeights[r],r!=null&&(F=!1,z.set_height(r),f.push(v),w.__implements(z,da)&&z.validateNow()));if(F){F=100;if(w.__implements(z,
rb)){var J=z;z=J.get_explicitMinHeight();z!=null&&(n+=z)}l+=F;g.push(v)}else h+=z.get_height()}v+=2}h+=this._paddingTop+this._paddingBottom;b==null&&(b=h+n,c!=null&&b<c?b=c:d!=null&&b>d&&(b=d));b-=h;do{h=!1;n=0;v=b/l;v<0&&(v=0);for(c=0;c<g.length;)d=g[c],++c,z=a[d],F=100,r=Math.floor(v*F),J=null,w.__implements(z,rb)&&(J=z,J=J.get_explicitMinHeight()),J!=null&&(J>b&&(J=b),r<J&&(r=J,b-=r,l-=F,V.remove(g,d),h=!0)),z.set_height(r),w.__implements(z,da)&&z.validateNow(),n+=r;h||(b-=n)}while(h);if(b>0&&
g.length>0)d=g[g.length-1],a=a[d],a.set_height(a.get_height()+b);else if(b!=0){if(q==-1||u<q)q=u;q!=-1&&(g=a[q],r=g.get_height()+b,r<0?(b=r,r=0,V.remove(f,q)):b=0,g.set_height(r));if(b!=0)for(q=b/f.length,c=0;c<f.length;)d=f[c],++c,z=a[d],z.set_height(z.get_height()+q)}},applyPercentWidth:function(a,b){b=b-this._paddingLeft-this._paddingRight;for(var c=0;c<a.length;){var d=a[c];if(!w.__implements(d,T)||d.get_includeInLayout()){var f=b;if(w.__implements(d,rb)){var g=d,h=g.get_explicitMinWidth();h!=
null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxWidth();g!=null&&f>g&&(f=g)}d.set_width(f)}c+=2}},__class__:cp,__properties__:{set_fallbackFluidIndex:"set_fallbackFluidIndex",get_fallbackFluidIndex:"get_fallbackFluidIndex",set_customItemHeights:"set_customItemHeights",get_customItemHeights:"get_customItemHeights",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",
get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var hc=R["feathers.layout.VerticalAlign"]={__ename__:"feathers.layout.VerticalAlign",__constructs__:null,TOP:{_hx_name:"TOP",_hx_index:0,__enum__:"feathers.layout.VerticalAlign",toString:E},MIDDLE:{_hx_name:"MIDDLE",_hx_index:1,__enum__:"feathers.layout.VerticalAlign",toString:E},BOTTOM:{_hx_name:"BOTTOM",_hx_index:2,__enum__:"feathers.layout.VerticalAlign",
toString:E},JUSTIFY:{_hx_name:"JUSTIFY",_hx_index:3,__enum__:"feathers.layout.VerticalAlign",toString:E}};hc.__constructs__=[hc.TOP,hc.MIDDLE,hc.BOTTOM,hc.JUSTIFY];var uf=function(){this._justifyResetEnabled=this._percentWidthResetEnabled=this._percentHeightResetEnabled=!1;this._verticalAlign=hc.TOP;this._horizontalAlign=Wb.LEFT;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;qa.call(this)};t["feathers.layout.VerticalLayout"]=uf;uf.__name__="feathers.layout.VerticalLayout";
uf.__interfaces__=[mj,fh];uf.__super__=qa;uf.prototype=I(qa.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},
_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;Y.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},
set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;Y.dispatch(this,"change");return this._gap},_minGap:null,get_minGap:function(){return this._minGap},set_minGap:function(a){if(this._minGap==a)return this._minGap;this._minGap=a;Y.dispatch(this,"change");return this._minGap},_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;Y.dispatch(this,
"change");return this._horizontalAlign},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=a;Y.dispatch(this,"change");return this._verticalAlign},_justifyResetEnabled:null,get_justifyResetEnabled:function(){return this._justifyResetEnabled},set_justifyResetEnabled:function(a){if(this._justifyResetEnabled==a)return this._justifyResetEnabled;this._justifyResetEnabled=a;Y.dispatch(this,
"change");return this._justifyResetEnabled},_percentWidthResetEnabled:null,get_percentWidthResetEnabled:function(){return this._percentWidthResetEnabled},set_percentWidthResetEnabled:function(a){if(this._percentWidthResetEnabled==a)return this._percentWidthResetEnabled;this._percentWidthResetEnabled=a;Y.dispatch(this,"change");return this._percentWidthResetEnabled},_percentHeightResetEnabled:null,get_percentHeightResetEnabled:function(){return this._percentHeightResetEnabled},set_percentHeightResetEnabled:function(a){if(this._percentHeightResetEnabled==
a)return this._percentHeightResetEnabled;this._percentHeightResetEnabled=a;Y.dispatch(this,"change");return this._percentHeightResetEnabled},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){var d=this._gap,f=this._gap==1/0;f&&(d=this._minGap);var g=this._horizontalAlign==Wb.JUSTIFY,h=b.width;h!=null&&(h-=this._paddingLeft+this._paddingRight);var n=b.height;n!=null&&(n-=this._paddingTop+this._paddingBottom);
for(f=0;f<a.length;){var l=a[f];++f;var q=null,u=null;if(w.__implements(l,T)){var v=l;if(!v.get_includeInLayout())continue;v=v.get_layoutData();v=v instanceof dh?v:null;v!=null&&(q=v.get_percentWidth(),u=v.get_percentHeight())}g?h!=null?l.set_width(h):this._justifyResetEnabled&&w.__implements(l,rb)&&l.resetWidth():h!=null?q!=null&&(q<0?q=0:q>100&&(q=100),l.set_width(q/100*h)):q!=null&&this._percentWidthResetEnabled&&w.__implements(l,rb)&&l.resetWidth();u!=null&&this._percentHeightResetEnabled&&n==
null&&w.__implements(l,rb)&&l.resetHeight();w.__implements(l,da)&&l.validateNow();g&&h==null&&b.maxWidth!=null&&(q=b.maxWidth-this._paddingLeft-this._paddingRight,l.get_width()>q&&(l.set_width(q),w.__implements(l,da)&&l.validateNow()))}this.applyPercentHeight(a,b.height,b.minHeight,b.maxHeight,d);g=0;h=this._paddingTop;for(f=0;f<a.length;){l=a[f];++f;v=null;if(w.__implements(l,T)){u=l;if(!u.get_includeInLayout())continue;v=u.get_layoutData();v=v instanceof dh?v:null}w.__implements(l,da)&&l.validateNow();
g<l.get_width()&&(g=l.get_width());v!=null&&v.get_marginTop()!=null&&(h+=v.get_marginTop());l.set_y(h);h+=l.get_height()+d;v!=null&&v.get_marginBottom()!=null&&(h+=v.get_marginBottom())}g+=this._paddingLeft+this._paddingRight;h+=this._paddingBottom;a.length>0&&(h-=d);n=g;b.width!=null?n=b.width:b.minWidth!=null&&n<b.minWidth?n=b.minWidth:b.maxWidth!=null&&n>b.maxWidth&&(n=b.maxWidth);q=h;b.height!=null?q=b.height:b.minHeight!=null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=
b.maxHeight);this.applyPercentWidth(a,n);for(f=0;f<a.length;){l=a[f];++f;if(w.__implements(l,T)&&(u=l,!u.get_includeInLayout()))continue;switch(this._horizontalAlign._hx_index){case 0:l.set_x(this._paddingLeft);break;case 1:l.set_x(Math.max(this._paddingLeft,this._paddingLeft+(n-this._paddingLeft-this._paddingRight-l.get_width())/2));break;case 2:l.set_x(Math.max(this._paddingLeft,this._paddingLeft+(n-this._paddingLeft-this._paddingRight)-l.get_width()));break;case 3:l.set_x(this._paddingLeft),l.set_width(n-
this._paddingLeft-this._paddingRight)}}l=h-this._paddingTop-this._paddingBottom;d=b=0;u=q-this._paddingTop-this._paddingBottom;if(f=this._gap==1/0)d=this._minGap,a.length>1&&u>l&&(d+=(u-l)/(a.length-1)),d-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:b=0;break;case 1:b=(u-l)/2;break;case 2:b=u-l;break;default:throw new Cb("Unknown vertical align: "+H.string(this._verticalAlign));}b<0&&(b=0)}if(b!=0||d!=0)for(f=0;f<a.length;){l=a[f];++f;if(w.__implements(l,T)&&(u=l,!u.get_includeInLayout()))continue;
l.set_y(Math.max(this._paddingTop,l.get_y()+b));b+=d}g<n&&(g=n);h<q&&(h=q);c==null&&(c=new Kg);c.contentX=0;c.contentY=0;c.contentWidth=g;c.contentHeight=h;c.viewPortWidth=n;c.viewPortHeight=q;return c},getDragDropIndex:function(a,b,c,d,f){b=this._gap;this._gap==1/0&&(b=this._minGap);d=this._paddingTop;f=0;for(var g=a.length;f<g;){var h=f++,n=a[h];if(!w.__implements(n,T)||n.get_includeInLayout()){w.__implements(n,da)&&n.validateNow();n=n.get_height();if(c<d+n/2)return h;d+=n+b}}return a.length},getDragDropRegion:function(a,
b,c,d,f,g,h){c=this._gap;this._gap==1/0&&(c=this._minGap);g=b;g<0?g=0:g>a.length&&(g=a.length);b=this._paddingTop;for(d=0;d<g;){var n=d++;n=a[n];if(!w.__implements(n,T)||n.get_includeInLayout())w.__implements(n,da)&&n.validateNow(),b+=n.get_height()+c}h==null?h=new Ia(0,b,f,0):h.setTo(0,b,f,0);return h},validateItems:function(a,b){var c=this._horizontalAlign==Wb.JUSTIFY,d=b.width;d!=null&&(d-=this._paddingLeft+this._paddingRight);var f=b.height;f!=null&&(f-=this._paddingTop+this._paddingBottom);for(var g=
0;g<a.length;){var h=a[g];++g;var n=null,l=null;if(w.__implements(h,T)){var q=h;if(!q.get_includeInLayout())continue;q=q.get_layoutData();q=q instanceof dh?q:null;q!=null&&(n=q.get_percentWidth(),l=q.get_percentHeight())}c?d!=null?h.set_width(d):this._justifyResetEnabled&&w.__implements(h,rb)&&h.resetWidth():d!=null?n!=null&&(n<0?n=0:n>100&&(n=100),h.set_width(n/100*d)):n!=null&&this._percentWidthResetEnabled&&w.__implements(h,rb)&&h.resetWidth();l!=null&&this._percentHeightResetEnabled&&f==null&&
w.__implements(h,rb)&&h.resetHeight();w.__implements(h,da)&&h.validateNow();c&&d==null&&b.maxWidth!=null&&(n=b.maxWidth-this._paddingLeft-this._paddingRight,h.get_width()>n&&(h.set_width(n),w.__implements(h,da)&&h.validateNow()))}},applyHorizontalAlign:function(a,b,c){for(b=0;b<a.length;){var d=a[b];++b;if(w.__implements(d,T)){var f=d;if(!f.get_includeInLayout())continue}switch(this._horizontalAlign._hx_index){case 0:d.set_x(this._paddingLeft);break;case 1:d.set_x(Math.max(this._paddingLeft,this._paddingLeft+
(c-this._paddingLeft-this._paddingRight-d.get_width())/2));break;case 2:d.set_x(Math.max(this._paddingLeft,this._paddingLeft+(c-this._paddingLeft-this._paddingRight)-d.get_width()));break;case 3:d.set_x(this._paddingLeft),d.set_width(c-this._paddingLeft-this._paddingRight)}}},applyVerticalAlign:function(a,b,c){var d=0,f=0;c=c-this._paddingTop-this._paddingBottom;if(this._gap==1/0)f=this._minGap,a.length>1&&c>b&&(f+=(c-b)/(a.length-1)),f-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:d=
0;break;case 1:d=(c-b)/2;break;case 2:d=c-b;break;default:throw new Cb("Unknown vertical align: "+H.string(this._verticalAlign));}d<0&&(d=0)}if(d!=0||f!=0)for(b=d,d=0;d<a.length;){c=a[d];++d;if(w.__implements(c,T)){var g=c;if(!g.get_includeInLayout())continue}c.set_y(Math.max(this._paddingTop,c.get_y()+b));b+=f}},applyPercentWidth:function(a,b){b=b-this._paddingLeft-this._paddingRight;for(var c=0;c<a.length;){var d=a[c];++c;if(w.__implements(d,T)){var f=d;if(f.get_includeInLayout()&&(f=f.get_layoutData(),
f=f instanceof dh?f:null,f!=null&&(f=f.get_percentWidth(),f!=null))){f<0?f=0:f>100&&(f=100);f=b*f/100;if(w.__implements(d,rb)){var g=d,h=g.get_explicitMinWidth();h!=null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxWidth();g!=null&&f>g&&(f=g)}d.set_width(f)}}}},applyPercentHeight:function(a,b,c,d,f){for(var g=[],h=0,n=0,l=0,q=0;q<a.length;){var u=a[q];++q;if(w.__implements(u,T)){var v=u;if(!v.get_includeInLayout())continue;var z=v.get_layoutData(),r=z instanceof dh?z:null;if(r!=null&&(z=r.get_percentHeight(),
z!=null)){z<0&&(z=0);w.__implements(v,rb)&&(u=v,n+=u.get_minHeight());l+=z;r.get_marginTop()!=null&&(h+=r.get_marginTop());r.get_marginBottom()!=null&&(h+=r.get_marginBottom());h+=f;g.push(v);continue}}h+=u.get_height()+f}h=h-f+(this._paddingTop+this._paddingBottom);l<100&&(l=100);b!=null?a=b:(a=h+n,c!=null&&a<c?a=c:d!=null&&a>d&&(a=d));a-=h;a<0&&(a=0);for(c=!0;c;)for(c=!1,d=a/l,q=0;q<g.length;)v=g[q],++q,r=w.__cast(v.get_layoutData(),dh),z=r.get_percentHeight(),z<0&&(z=0),r=d*z,w.__implements(v,
rb)&&(u=v,u=u.get_explicitMinHeight(),u!=null&&u>a&&(u=a),r<u&&(r=u,a-=r,l-=z,V.remove(g,v),c=!0)),w.__cast(v,ma).set_height(r),w.__implements(v,da)&&v.validateNow()},__class__:uf,__properties__:{set_percentHeightResetEnabled:"set_percentHeightResetEnabled",get_percentHeightResetEnabled:"get_percentHeightResetEnabled",set_percentWidthResetEnabled:"set_percentWidthResetEnabled",get_percentWidthResetEnabled:"get_percentWidthResetEnabled",set_justifyResetEnabled:"set_justifyResetEnabled",get_justifyResetEnabled:"get_justifyResetEnabled",
set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});
var dh=function(a,b){this._percentWidth=this._percentHeight=this._marginTop=this._marginBottom=null;qa.call(this);this.set_percentWidth(a);this.set_percentHeight(b)};t["feathers.layout.VerticalLayoutData"]=dh;dh.__name__="feathers.layout.VerticalLayoutData";dh.__interfaces__=[Kp];dh.fill=function(){return new dh(100,100)};dh.fillHorizontal=function(a){a==null&&(a=100);return new dh(a,null)};dh.fillVertical=function(a){a==null&&(a=100);return new dh(null,a)};dh.__super__=qa;dh.prototype=I(qa.prototype,
{_percentWidth:null,get_percentWidth:function(){return this._percentWidth},set_percentWidth:function(a){if(this._percentWidth==a)return this._percentWidth;this._percentWidth=a;Y.dispatch(this,"change");return this._percentWidth},_percentHeight:null,get_percentHeight:function(){return this._percentHeight},set_percentHeight:function(a){if(this._percentHeight==a)return this._percentHeight;this._percentHeight=a;Y.dispatch(this,"change");return this._percentHeight},_marginTop:null,get_marginTop:function(){return this._marginTop},
set_marginTop:function(a){if(this._marginTop==a)return this._marginTop;this._marginTop=a;Y.dispatch(this,"change");return this._marginTop},_marginBottom:null,get_marginBottom:function(){return this._marginBottom},set_marginBottom:function(a){if(this._marginBottom==a)return this._marginBottom;this._marginBottom=a;Y.dispatch(this,"change");return this._marginBottom},__class__:dh,__properties__:{set_marginBottom:"set_marginBottom",get_marginBottom:"get_marginBottom",set_marginTop:"set_marginTop",get_marginTop:"get_marginTop",
set_percentHeight:"set_percentHeight",get_percentHeight:"get_percentHeight",set_percentWidth:"set_percentWidth",get_percentWidth:"get_percentWidth"}});var yh=function(){this._widthResetEnabled=!0;this._contentJustify=!1;this._verticalAlign=hc.TOP;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;this._requestedRowCount=this._requestedMinRowCount=this._requestedMaxRowCount=null;this._scrollX=this._scrollY=0;qa.call(this)};t["feathers.layout.VerticalListLayout"]=
yh;yh.__name__="feathers.layout.VerticalListLayout";yh.__interfaces__=[mj,Oj,Vh];yh.__super__=qa;yh.prototype=I(qa.prototype,{_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){return this._scrollX=a},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){return this._scrollY=a},_virtualCache:null,get_virtualCache:function(){return this._virtualCache},set_virtualCache:function(a){return this._virtualCache=a},get_elasticTop:function(){return!0},
get_elasticRight:function(){return!1},get_elasticBottom:function(){return!0},get_elasticLeft:function(){return!1},_requestedRowCount:null,get_requestedRowCount:function(){return this._requestedRowCount},set_requestedRowCount:function(a){if(this._requestedRowCount==a)return this._requestedRowCount;this._requestedRowCount=a;Y.dispatch(this,"change");return this._requestedRowCount},_requestedMinRowCount:null,get_requestedMinRowCount:function(){return this._requestedMinRowCount},set_requestedMinRowCount:function(a){if(this._requestedMinRowCount==
a)return this._requestedMinRowCount;this._requestedMinRowCount=a;Y.dispatch(this,"change");return this._requestedMinRowCount},_requestedMaxRowCount:null,get_requestedMaxRowCount:function(){return this._requestedMaxRowCount},set_requestedMaxRowCount:function(a){if(this._requestedMaxRowCount==a)return this._requestedMaxRowCount;this._requestedMaxRowCount=a;Y.dispatch(this,"change");return this._requestedMaxRowCount},_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==
a)return this._paddingTop;this._paddingTop=a;Y.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;Y.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=
a;Y.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;Y.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;Y.dispatch(this,"change");return this._gap},_minGap:null,get_minGap:function(){return this._minGap},set_minGap:function(a){if(this._minGap==
a)return this._minGap;this._minGap=a;Y.dispatch(this,"change");return this._minGap},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=a;Y.dispatch(this,"change");return this._verticalAlign},_contentJustify:null,get_contentJustify:function(){return this._contentJustify},set_contentJustify:function(a){if(this._contentJustify==a)return this._contentJustify;this._contentJustify=
a;Y.dispatch(this,"change");return this._contentJustify},_widthResetEnabled:null,get_widthResetEnabled:function(){return this._widthResetEnabled},set_widthResetEnabled:function(a){if(this._widthResetEnabled==a)return this._widthResetEnabled;this._widthResetEnabled=a;Y.dispatch(this,"change");return this._widthResetEnabled},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){var d=this._gap,f=this._gap==1/
0;f&&(d=this._minGap);var g=this.calculateMaxItemWidth(a,b),h=this.calculateViewPortWidth(g,b),n=h-this._paddingLeft-this._paddingRight;if(!this._contentJustify||g<n)g=n;n=this.calculateVirtualRowHeight(a,g);var l=this._paddingTop;f=0;for(var q=a.length;f<q;){var u=f++,v=a[u];if(v==null)v=n,this._virtualCache!=null&&(u=this._virtualCache[u],u=u instanceof hh?u:null,u!=null&&u.itemHeight!=null&&(v=u.itemHeight)),l+=v+d;else if(!w.__implements(v,T)||v.get_includeInLayout()){v.set_x(this._paddingLeft);
v.set_y(l);v.set_width(g);w.__implements(v,da)&&v.validateNow();v=v.get_height();if(this._virtualCache!=null&&(u=this._virtualCache[u],u=u instanceof hh?u:null,u!=null&&(u.itemHeight==null||u.itemHeight!=v))){var z=u.itemHeight;u.itemHeight=v;z==null&&l<this.get_scrollY()&&Id.dispatch(this,"scroll",!1,!1,0,v-n);z==null&&v==n||Y.dispatch(this,"change")}l+=v+d}}a.length>0&&(l-=d);q=l+=this._paddingBottom;b.height!=null?q=b.height:(this._requestedRowCount!=null?q=this._paddingTop+this._paddingBottom+
(this._requestedRowCount*(n+d)-d):this._requestedMinRowCount!=null&&a.length<this._requestedMinRowCount?q=this._paddingTop+this._paddingBottom+(this._requestedMinRowCount*(n+d)-d):this._requestedMaxRowCount!=null&&a.length>this._requestedMaxRowCount&&(q=this._paddingTop+this._paddingBottom+(this._requestedMaxRowCount*(n+d)-d)),b.minHeight!=null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight));v=l-this._paddingTop-this._paddingBottom;b=u=0;z=q-this._paddingTop-this._paddingBottom;
if(f=this._gap==1/0)b=this._minGap,a.length>1&&z>v&&(b+=(z-v)/(a.length-1)),b-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:u=0;break;case 1:u=(z-v)/2;break;case 2:u=z-v;break;default:throw new Cb("Unknown vertical align: "+H.string(this._verticalAlign));}u<0&&(u=0)}if(u!=0||b!=0)for(f=0;f<a.length;){v=a[f];++f;if(w.__implements(v,T)&&(z=v,!z.get_includeInLayout()))continue;v!=null&&v.set_y(Math.max(this._paddingTop,v.get_y()+u));u+=b}c==null&&(c=new Kg);c.contentX=0;c.contentY=
0;c.contentWidth=g+this._paddingLeft+this._paddingRight;c.contentHeight=l;this._requestedMinRowCount!=null&&(c.contentMinHeight=this._paddingTop+this._paddingBottom+(this._requestedMinRowCount*(n+d)-d));c.viewPortWidth=h;c.viewPortHeight=q;return c},calculateMaxItemWidth:function(a,b){for(var c=0,d=0,f=a.length;d<f;){var g=d++,h=a[g];if(this._virtualCache!=null&&this._virtualCache.length>g){var n=this._virtualCache[g];n=n instanceof hh?n:null;if(n!=null){g=n.itemWidth;c<g&&(c=g);continue}}if(h!=null&&
(!w.__implements(h,T)||h.get_includeInLayout())&&(this._widthResetEnabled&&b.width==null&&w.__implements(h,rb)&&h.resetWidth(),w.__implements(h,da)&&h.validateNow(),n=h.get_width(),c<n&&(c=n),this._virtualCache!=null)){var l=this._virtualCache[g];l=l instanceof hh?l:null;l==null&&(w.__implements(h,da)&&h.validateNow(),l=new hh(n,null),this._virtualCache[g]=l)}}b.maxWidth!=null&&(a=b.maxWidth-this._paddingLeft-this._paddingRight,c>a&&(c=a));return c},calculateViewPortWidth:function(a,b){return b.width!=
null?b.width:a+this._paddingLeft+this._paddingRight},calculateVirtualRowHeight:function(a,b){for(var c=0,d=a.length;c<d;){var f=c++,g=a[f];if(g==null){if(this._virtualCache==null||this._virtualCache.length<=f)continue;f=this._virtualCache[f];f=f instanceof hh?f:null;if(f==null||f.itemHeight==null)continue;return f.itemHeight}if(!w.__implements(g,T)||g.get_includeInLayout())return g.set_width(b),w.__implements(g,da)&&g.validateNow(),a=g.get_height(),this._virtualCache!=null&&(b=this._virtualCache[f],
b=b instanceof hh?b:null,b==null||b.itemHeight!=null&&b.itemHeight==a||(b.itemHeight=a,Y.dispatch(this,"change"))),a}return 0},getVisibleIndices:function(a,b,c,d){b=this._gap;this._gap==1/0&&(b=this._minGap);var f=-1,g=-1,h=null,n=this._paddingTop,l=this._scrollY;l<0&&(l=0);for(var q=0,u=l+c,v=0,z=0;z<a;){var r=z++,F=0;if(this._virtualCache!=null){var J=this._virtualCache[r];J=J instanceof hh?J:null;if(J!=null&&J.itemHeight!=null){if(F=J.itemHeight,h==null&&(h=F,q=Math.ceil(c/(h+b))+1,v>0)){for(J=
0;J<v;){var L=J++;n+=h+b;f==-1&&n>=l&&(f=L);if(f!=-1&&(g=L,n>=u&&g-f+1>=q))break}v=0}}else if(h!=null)F=h;else{if(v<5){++v;continue}g=f=0;break}}n+=F+b;f==-1&&n>=l&&(f=r);if(f!=-1&&(g=r,n>=u&&g-f+1>=q))break}f==-1&&this._verticalAlign!=hc.TOP&&(g=f=a-1);if((n<u||g-f+1<q)&&f>0){do if(--f,F=0,this._virtualCache!=null&&(J=this._virtualCache[f],J=J instanceof hh?J:null,J!=null&&J.itemHeight!=null?(F=J.itemHeight,h==null&&(h=F,q=Math.ceil(c/(h+b))+1)):h!=null&&(F=h)),n+=F+b,n>=u&&g-f+1>=q)break;while(f>
0)}f<0&&(f=0);h==null?g=f:g<0&&(g=f);if(d==null)return new Ri(f,g);d.start=f;d.end=g;return d},getNearestScrollPositionForIndex:function(a,b,c,d,f){var g=this._gap;this._gap==1/0&&(g=this._minGap);for(var h=null,n=c=0,l=this._paddingTop,q=0;q<b;){var u=q++,v=0;if(this._virtualCache!=null){var z=this._virtualCache[u];z=z instanceof hh?z:null;z!=null&&z.itemHeight!=null?(v=z.itemHeight,h==null&&(h=v)):h!=null&&(v=h)}if(u==a){n=l;c=n+v-d;break}l+=v+g}a=this._scrollY;a<c?a=c:a>n&&(a=n);f==null&&(f=new Ea);
f.x=this._scrollX;f.y=a;return f},getDragDropIndex:function(a,b,c,d,f){b=this._gap;this._gap==1/0&&(b=this._minGap);d=null;f=this._paddingTop;for(var g=0,h=a.length;g<h;){var n=g++,l=a[n],q=d;l==null?this._virtualCache!=null&&(l=this._virtualCache[n],l=l instanceof hh?l:null,l!=null&&l.itemHeight!=null?(q=l.itemHeight,d==null&&(d=q)):d!=null&&(q=d)):q=l.get_height();if(c<f+q/2)return n;f+=q+b}return a.length},getDragDropRegion:function(a,b,c,d,f,g,h){c=this._gap;this._gap==1/0&&(c=this._minGap);var n=
b;n<0?n=0:n>a.length&&(n=a.length);b=null;d=this._paddingTop;for(g=0;g<n;){var l=g++,q=a[l],u=0;q==null?this._virtualCache!=null&&(l=this._virtualCache[l],l=l instanceof hh?l:null,l!=null&&l.itemHeight!=null?(u=l.itemHeight,b==null&&(b=u)):b!=null&&(u=b)):u=q.get_height();d+=u+c}h==null?h=new Ia(0,d,f,0):h.setTo(0,d,f,0);return h},findNextKeyboardIndex:function(a,b,c,d,f,g,h){if(d.length==0)return-1;g=this._gap;this._gap==1/0&&(g=this._minGap);for(var n=null,l=0,q=d.length;l<q;){var u=l++;if(this._virtualCache!=
null){var v=this._virtualCache[u];v=v instanceof hh?v:null;if(v!=null&&v.itemHeight!=null){var z=v.itemHeight;if(n==null){n=z;break}}}}var r=d.length-1,F=a;if(F==-1){switch(b.keyCode){case 38:F=c?r:-1;break;case 40:F=0;break;default:F=-1}if(F==-1||f==null||f.indexOf(F)==-1)return F}var J=!0;l=b.keyCode;for(b=F;J;){J=!1;switch(l){case 33:l=0;for(u=a;u>=0;){q=d[u];z=n;q==null?this._virtualCache!=null&&(v=this._virtualCache[u],v=v instanceof hh?v:null,v!=null&&v.itemHeight!=null&&(z=v.itemHeight)):z=
q.get_height();l+=z;if(f!=null&&f.indexOf(u)!=-1)l+=g;else{if(l>h)break;l+=g;F=u}--u}l=38;break;case 34:u=0;l=a;for(q=d.length;l<q;){z=l++;var L=d[z];v=n;L==null?this._virtualCache!=null&&(L=this._virtualCache[z],L=L instanceof hh?L:null,L!=null&&L.itemHeight!=null&&(v=L.itemHeight)):v=L.get_height();u+=v;if(f!=null&&f.indexOf(z)!=-1)u+=g;else{if(u>h)break;u+=g;F=z}}l=40;break;case 35:for(q=r;q>a;){if(f==null||f.indexOf(q)==-1){F=q;break}--q}break;case 36:q=0;for(u=a;q<u;)if(z=q++,f==null||f.indexOf(z)==
-1){F=z;break}break;case 38:--F;break;case 40:++F;break;default:return a}F<0?F=c?r:0:F>r&&(F=c?0:r);if(f!=null&&f.indexOf(F)!=-1){if(F==b)return a;J=!0}b=F}return F},applyVerticalAlign:function(a,b,c){var d=0,f=0;c=c-this._paddingTop-this._paddingBottom;if(this._gap==1/0)f=this._minGap,a.length>1&&c>b&&(f+=(c-b)/(a.length-1)),f-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:d=0;break;case 1:d=(c-b)/2;break;case 2:d=c-b;break;default:throw new Cb("Unknown vertical align: "+H.string(this._verticalAlign));
}d<0&&(d=0)}if(d!=0||f!=0)for(b=d,d=0;d<a.length;){c=a[d];++d;if(w.__implements(c,T)){var g=c;if(!g.get_includeInLayout())continue}c!=null&&c.set_y(Math.max(this._paddingTop,c.get_y()+b));b+=f}},__class__:yh,__properties__:{set_widthResetEnabled:"set_widthResetEnabled",get_widthResetEnabled:"get_widthResetEnabled",set_contentJustify:"set_contentJustify",get_contentJustify:"get_contentJustify",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",
set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_requestedMaxRowCount:"set_requestedMaxRowCount",get_requestedMaxRowCount:"get_requestedMaxRowCount",set_requestedMinRowCount:"set_requestedMinRowCount",get_requestedMinRowCount:"get_requestedMinRowCount",
set_requestedRowCount:"set_requestedRowCount",get_requestedRowCount:"get_requestedRowCount",get_elasticLeft:"get_elasticLeft",get_elasticBottom:"get_elasticBottom",get_elasticRight:"get_elasticRight",get_elasticTop:"get_elasticTop",set_virtualCache:"set_virtualCache",get_virtualCache:"get_virtualCache",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX"}});var hh=function(a,b){this.itemWidth=a;this.itemHeight=b};t["feathers.layout._VerticalListLayout.VirtualCacheItem"]=
hh;hh.__name__="feathers.layout._VerticalListLayout.VirtualCacheItem";hh.prototype={itemWidth:null,itemHeight:null,__class__:hh};var Hm=function(){};t["feathers.motion.effects.IEffectContext"]=Hm;Hm.__name__="feathers.motion.effects.IEffectContext";Hm.__isInterface__=!0;Hm.__interfaces__=[Db];Hm.prototype={get_target:null,get_duration:null,get_position:null,set_position:null,play:null,playReverse:null,pause:null,stop:null,toEnd:null,interrupt:null,__class__:Hm,__properties__:{set_position:"set_position",
get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}};var Ql=function(a){qa.call(this);this._context=a;this._context.addEventListener("change",m(this,this.baseDelegateEffectContext_context_changeHandler));this._context.addEventListener("complete",m(this,this.baseDelegateEffectContext_context_completeHandler))};t["feathers.motion.effects.BaseDelegateEffectContext"]=Ql;Ql.__name__="feathers.motion.effects.BaseDelegateEffectContext";Ql.__interfaces__=[Hm];Ql.__super__=qa;
Ql.prototype=I(qa.prototype,{_context:null,get_context:function(){return this._context},get_target:function(){return this.get_context().get_target()},get_duration:function(){return this.get_context().get_duration()},get_position:function(){return this.get_context().get_position()},set_position:function(a){this.get_context().set_position(a);return this.get_context().get_position()},play:function(){this._context.play()},playReverse:function(){this._context.playReverse()},pause:function(){this._context.pause()},
stop:function(){this._context.stop()},toEnd:function(){this._context.toEnd()},interrupt:function(){this._context.interrupt()},baseDelegateEffectContext_context_changeHandler:function(a){Y.dispatch(this,"change")},baseDelegateEffectContext_context_completeHandler:function(a){Y.dispatch(this,"complete")},__class__:Ql,__properties__:{set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target",get_context:"get_context"}});var Rl=function(a,b,c){this._playing=
this._reversed=!1;this._duration=this._position=0;qa.call(this);this._target=a;this._duration=b;this._ease=c};t["feathers.motion.effects.BaseEffectContext"]=Rl;Rl.__name__="feathers.motion.effects.BaseEffectContext";Rl.__interfaces__=[Hm];Rl.__super__=qa;Rl.prototype=I(qa.prototype,{_target:null,get_target:function(){return this._target},_duration:null,get_duration:function(){return this._duration},_position:null,get_position:function(){return this._position},set_position:function(a){if(this._position==
a)return this._position;this._position=a;this.updateEffect();Y.dispatch(this,"change");return this._position},_ease:null,get_ease:function(){return this._ease},_playing:null,_reversed:null,_animatePlayback:null,play:function(){var a=this;if(!this._playing||this._reversed)this._animatePlayback!=null&&(Ca.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._playing=!0,this._reversed=!1,this._animatePlayback=Ca.update(function(b){a.set_position(b)},this._duration*(1-this._position),
[this._position],[1]),this._animatePlayback.ease(this._ease),this._animatePlayback.onComplete(m(this,this.animatePlayback_onComplete))},playReverse:function(){var a=this;this._playing&&this._reversed||(this._animatePlayback!=null&&(Ca.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._reversed=this._playing=!0,this._animatePlayback=Ca.update(function(b){a.set_position(b)},this._duration*this._position,[this._position],[0]),this._animatePlayback.ease(this._ease),this._animatePlayback.onComplete(m(this,
this.animatePlayback_onComplete)))},pause:function(){this._playing&&(this._animatePlayback!=null&&(Ca.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._playing=!1)},stop:function(){this.pause();this.cleanupEffect();Y.dispatch(this,"complete")},toEnd:function(){this.pause();this._position=1;this.cleanupEffect();Y.dispatch(this,"complete")},interrupt:function(){this.toEnd()},prepareEffect:function(){},updateEffect:function(){},cleanupEffect:function(){},animatePlayback_onComplete:function(){this._animatePlayback=
null;this.cleanupEffect();Y.dispatch(this,"complete")},__class__:Rl,__properties__:{get_ease:"get_ease",set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}});var wx=R["feathers.motion.effects.EffectInterruptBehavior"]={__ename__:"feathers.motion.effects.EffectInterruptBehavior",__constructs__:null,END:{_hx_name:"END",_hx_index:0,__enum__:"feathers.motion.effects.EffectInterruptBehavior",toString:E},STOP:{_hx_name:"STOP",_hx_index:1,__enum__:"feathers.motion.effects.EffectInterruptBehavior",
toString:E}};wx.__constructs__=[wx.END,wx.STOP];var Ol=function(a,b,c,d){this._paused=!0;Ql.call(this,a);this.set_callback(d);this.set_eventType(c);this.set_dispatcher(b)};t["feathers.motion.effects.EventToPositionEffectContext"]=Ol;Ol.__name__="feathers.motion.effects.EventToPositionEffectContext";Ol.__super__=Ql;Ol.prototype=I(Ql.prototype,{_dispatcher:null,get_dispatcher:function(){return this._dispatcher},set_dispatcher:function(a){if(this._dispatcher==a)return this._dispatcher;this.clearEvent();
this._dispatcher=a;this.updateEvent();return this.get_dispatcher()},_eventType:null,get_eventType:function(){return this._eventType},set_eventType:function(a){if(this._eventType==a)return this._eventType;this.clearEvent();this._eventType=a;this.updateEvent();return this._eventType},_callback:null,get_callback:function(){return this._callback},set_callback:function(a){return this._callback==a?this._callback:this._callback=a},_paused:null,play:function(){this._paused=!1},playReverse:function(){this._paused=
!1},pause:function(){this._paused=!0},clearEvent:function(){this._dispatcher!=null&&this._eventType!=null&&this._dispatcher.removeEventListener(this._eventType,m(this,this.eventToPositionEffectContext_dispatcher_eventHandler))},updateEvent:function(){this._dispatcher!=null&&this._eventType!=null&&this._dispatcher.addEventListener(this._eventType,m(this,this.eventToPositionEffectContext_dispatcher_eventHandler),!1,0,!0)},eventToPositionEffectContext_dispatcher_eventHandler:function(a){this._paused||
this.set_position(this._callback(a))},__class__:Ol,__properties__:I(Ql.prototype.__properties__,{set_callback:"set_callback",get_callback:"get_callback",set_eventType:"set_eventType",get_eventType:"get_eventType",set_dispatcher:"set_dispatcher",get_dispatcher:"get_dispatcher"})});var Ep=function(a){this._duration=this._position=0;qa.call(this);this._target=a};t["feathers.motion.effects.NoOpEffectContext"]=Ep;Ep.__name__="feathers.motion.effects.NoOpEffectContext";Ep.__interfaces__=[Hm];Ep.__super__=
qa;Ep.prototype=I(qa.prototype,{_target:null,get_target:function(){return this._target},_duration:null,get_duration:function(){return this._duration},_position:null,get_position:function(){return this._position},set_position:function(a){if(a!=0)throw new we("Position must always be 0.0");return this._position},play:function(){this.toEnd()},pause:function(){},playReverse:function(){this.toEnd()},stop:function(){this.toEnd()},toEnd:function(){Y.dispatch(this,"complete")},interrupt:function(){this.toEnd()},
__class__:Ep,__properties__:{set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}});var Ct=function(a,b,c){c==null&&(c=wx.END);this._actuator=b;this.interruptBehavior=c;b=this._actuator.getEase();this._actuator.ease(xn.get_easeNone());this._onComplete=this._actuator.getOnComplete();this._onCompleteParams=this._actuator.getOnCompleteParams();this._actuator.onComplete(null,null);a==null&&(a=this._actuator.getTarget());Rl.call(this,a,this._actuator.getDuration(),
b)};t["feathers.motion.effects.actuate.ActuateEffectContext"]=Ct;Ct.__name__="feathers.motion.effects.actuate.ActuateEffectContext";Ct.__super__=Rl;Ct.prototype=I(Rl.prototype,{_actuator:null,get_actuator:function(){return this._actuator},interruptBehavior:null,_onComplete:null,_onCompleteParams:null,interrupt:function(){this.interruptBehavior==wx.STOP?this.stop():this.toEnd()},updateEffect:function(){this._actuator.goto(this.get_position())},cleanupEffect:function(){if(this._onComplete!=null){var a=
this._onCompleteParams;a==null&&(a=[]);this._onComplete.apply(this._onComplete,a)}},__class__:Ct,__properties__:I(Rl.prototype.__properties__,{get_actuator:"get_actuator"})});var xx=function(){};t["feathers.motion.effects.actuate.ActuateForEffects"]=xx;xx.__name__="feathers.motion.effects.actuate.ActuateForEffects";xx.tween=function(a,b,c,d){d==null&&(d=!0);a=Ca.tween(a,b,c,d,Np);return w.__cast(a,Sl)};xx.update=function(a,b,c,d,f){f==null&&(f=!0);a=Ca.tween(a,b,{start:c,end:d},f,Op);return w.__cast(a,
Sl)};var bl=function(){};t["motion.actuators.IGenericActuator"]=bl;bl.__name__="motion.actuators.IGenericActuator";bl.__isInterface__=!0;bl.prototype={autoVisible:null,delay:null,ease:null,onComplete:null,onRepeat:null,onUpdate:null,reflect:null,repeat:null,reverse:null,smartRotation:null,snapping:null,onPause:null,onResume:null,apply:null,move:null,pause:null,resume:null,stop:null,__class__:bl};var Pp=function(){};t["feathers.motion.effects.actuate.IGotoActuator"]=Pp;Pp.__name__="feathers.motion.effects.actuate.IGotoActuator";
Pp.__isInterface__=!0;Pp.__interfaces__=[bl];Pp.prototype={goto:null,__class__:Pp};var Sl=function(){};t["feathers.motion.effects.actuate.IReadableGenericActuator"]=Sl;Sl.__name__="feathers.motion.effects.actuate.IReadableGenericActuator";Sl.__isInterface__=!0;Sl.__interfaces__=[Pp,bl];Sl.prototype={getTarget:null,getDuration:null,getAutoVisible:null,getDelay:null,getEase:null,getReflect:null,getRepeat:null,getReverse:null,getSmartRotation:null,getSnapping:null,getOnComplete:null,getOnCompleteParams:null,
getOnRepeat:null,getOnRepeatParams:null,getOnUpdate:null,getOnUpdateParams:null,getOnPause:null,getOnPauseParams:null,getOnResume:null,getOnResumeParams:null,__class__:Sl};var ok=function(a,b,c){this._autoVisible=!0;this._delay=0;this._reflect=!1;this._repeat=0;this.special=this._snapping=this._smartRotation=this._reverse=!1;this.target=a;this.properties=c;this.duration=b;this._ease=Ca.defaultEase};t["motion.actuators.GenericActuator"]=ok;ok.__name__="motion.actuators.GenericActuator";ok.__interfaces__=
[bl];ok.prototype={duration:null,id:null,properties:null,target:null,_autoVisible:null,_delay:null,_ease:null,_onComplete:null,_onCompleteParams:null,_onRepeat:null,_onRepeatParams:null,_onUpdate:null,_onUpdateParams:null,_onResume:null,_onResumeParams:null,_onPause:null,_onPauseParams:null,_reflect:null,_repeat:null,_reverse:null,_smartRotation:null,_snapping:null,special:null,apply:function(){for(var a=0,b=y.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,
c)?this.target[c]=y.field(this.properties,c):y.setProperty(this.target,c,y.field(this.properties,c))}},autoVisible:function(a){a==null&&(a=!0);this._autoVisible=a;return this},callMethod:function(a,b){b==null&&(b=[]);return a.apply(a,b)},change:function(){if(this._onUpdate!=null){var a=this._onUpdate,b=this._onUpdateParams;b==null&&(b=[]);a.apply(a,b)}},complete:function(a){a==null&&(a=!0);if(a&&(this.change(),this._onComplete!=null)){a=this._onComplete;var b=this._onCompleteParams;b==null&&(b=[]);
a.apply(a,b)}Ca.unload(this)},delay:function(a){this._delay=a;return this},ease:function(a){this._ease=a;return this},move:function(){},onComplete:function(a,b){this._onComplete=a;this._onCompleteParams=b==null?[]:b;this.duration==0&&this.complete();return this},onRepeat:function(a,b){this._onRepeat=a;this._onRepeatParams=b==null?[]:b;return this},onUpdate:function(a,b){this._onUpdate=a;this._onUpdateParams=b==null?[]:b;return this},onPause:function(a,b){this._onPause=a;this._onPauseParams=b==null?
[]:b;return this},onResume:function(a,b){this._onResume=a;this._onResumeParams=b==null?[]:b;return this},pause:function(){if(this._onPause!=null){var a=this._onPause,b=this._onPauseParams;b==null&&(b=[]);a.apply(a,b)}},reflect:function(a){a==null&&(a=!0);this._reflect=a;this.special=!0;return this},repeat:function(a){a==null&&(a=-1);this._repeat=a;return this},resume:function(){if(this._onResume!=null){var a=this._onResume,b=this._onResumeParams;b==null&&(b=[]);a.apply(a,b)}},reverse:function(a){a==
null&&(a=!0);this._reverse=a;this.special=!0;return this},smartRotation:function(a){a==null&&(a=!0);this._smartRotation=a;this.special=!0;return this},snapping:function(a){a==null&&(a=!0);this._snapping=a;this.special=!0;return this},stop:function(a,b,c){},__class__:ok};var Td=function(a,b,c){this.active=!0;this.propertyDetails=[];this.toggleVisible=this.setVisible=this.initialized=this.cacheVisible=this.paused=this.sendChange=!1;this.startTime=Pa.getTimer()/1E3;ok.call(this,a,b,c);Td.addedEvent||
(Td.addedEvent=!0,Pa.get_current().stage.addEventListener("enterFrame",Td.stage_onEnterFrame))};t["motion.actuators.SimpleActuator"]=Td;Td.__name__="motion.actuators.SimpleActuator";Td.stage_onEnterFrame=function(a){a=Pa.getTimer()/1E3;for(var b,c=0,d=0,f=Td.actuatorsLength;d<f;)d++,b=Td.actuators[c],b!=null&&b.active?(a>=b.timeOffset&&b.update(a),++c):(Td.actuators.splice(c,1),--Td.actuatorsLength)};Td.__super__=ok;Td.prototype=I(ok.prototype,{timeOffset:null,active:null,cacheVisible:null,detailsLength:null,
initialized:null,paused:null,pauseTime:null,propertyDetails:null,sendChange:null,setVisible:null,startTime:null,toggleVisible:null,reverse:function(a){a=ok.prototype.reverse.call(this,a);var b=Pa.getTimer()/1E3;this.update(b);return a},apply:function(){ok.prototype.apply.call(this);if(this.toggleVisible&&Object.prototype.hasOwnProperty.call(this.properties,"alpha")){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"visible")?y.field(a,"visible"):y.getProperty(a,"visible");b!=null&&(a=
this.target,b=y.field(this.properties,"alpha")>0,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?y.setProperty(a,"visible",b):a.visible=b)}},autoVisible:function(a){a==null&&(a=!0);this._autoVisible=a;if(!a&&(this.toggleVisible=!1,this.setVisible)){var b=this.target;a=this.cacheVisible;!Object.prototype.hasOwnProperty.call(b,"visible")||b.__properties__&&b.__properties__.set_visible?y.setProperty(b,"visible",a):b.visible=a}return this},delay:function(a){this._delay=
a;this.timeOffset=this.startTime+a;return this},getField:function(a,b){return Object.prototype.hasOwnProperty.call(a,b)?y.field(a,b):y.getProperty(a,b)},initialize:function(){for(var a,b=0,c=y.fields(this.properties);b<c.length;){var d=c[b];++b;var f=!0;!Object.prototype.hasOwnProperty.call(this.target,d)||this.target.__properties__&&this.target.__properties__["set_"+d]?(f=!1,a=y.getProperty(this.target,d)):a=y.field(this.target,d);if(typeof a=="number"){var g=this.properties;g=Object.prototype.hasOwnProperty.call(g,
d)?y.field(g,d):y.getProperty(g,d);a==null&&(a=0);g==null&&(g=0);a=new Sj(this.target,d,a,g-a,f);this.propertyDetails.push(a)}}this.detailsLength=this.propertyDetails.length;this.initialized=!0},move:function(){this.toggleVisible=Object.prototype.hasOwnProperty.call(this.properties,"alpha")&&this.target instanceof ma;if(this.toggleVisible&&this.properties.alpha!=0){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"visible")?y.field(a,"visible"):y.getProperty(a,"visible");a=!b}else a=
!1;a&&(this.setVisible=!0,a=this.target,this.cacheVisible=b=Object.prototype.hasOwnProperty.call(a,"visible")?y.field(a,"visible"):y.getProperty(a,"visible"),a=this.target,b=!0,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?y.setProperty(a,"visible",b):a.visible=b);this.timeOffset=this.startTime;Td.actuators.push(this);++Td.actuatorsLength},onUpdate:function(a,b){this._onUpdate=a;this._onUpdateParams=b==null?[]:b;this.sendChange=!0;return this},
pause:function(){this.paused||(this.paused=!0,ok.prototype.pause.call(this),this.pauseTime=Pa.getTimer())},resume:function(){this.paused&&(this.paused=!1,this.timeOffset+=(Pa.getTimer()-this.pauseTime)/1E3,ok.prototype.resume.call(this))},setField:function(a,b,c){!Object.prototype.hasOwnProperty.call(a,b)||a.__properties__&&a.__properties__["set_"+b]?y.setProperty(a,b,c):a[b]=c},setProperty:function(a,b){a.isField?a.target[a.propertyName]=b:y.setProperty(a.target,a.propertyName,b)},stop:function(a,
b,c){if(this.active)if(a==null)this.active=!1,b&&this.apply(),this.complete(c);else{var d=0;for(a=y.fields(a);d<a.length;){var f=a[d];++d;if(Object.prototype.hasOwnProperty.call(this.properties,f)){this.active=!1;b&&this.apply();this.complete(c);break}}}},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=1);this.initialized||this.initialize();if(this.special){var c=this._reverse?this._ease.calculate(1-b):this._ease.calculate(b);g=0;for(h=this.detailsLength;g<h;){var d=
g++;d=this.propertyDetails[d];if(!this._smartRotation||d.propertyName!="rotation"&&d.propertyName!="rotationX"&&d.propertyName!="rotationY"&&d.propertyName!="rotationZ")var f=d.start+d.change*c;else f=d.change%360,f>180?f-=360:f<-180&&(f+=360),f=d.start+f*c;this._snapping?this.setProperty(d,Math.round(f)):this.setProperty(d,f)}}else{c=this._ease.calculate(b);for(var g=0,h=this.detailsLength;g<h;)d=g++,d=this.propertyDetails[d],this.setProperty(d,d.start+d.change*c)}if(b==1){if(this._repeat==0){this.active=
!1;this.toggleVisible?(a=this.target,c=Object.prototype.hasOwnProperty.call(a,"alpha")?y.field(a,"alpha"):y.getProperty(a,"alpha"),a=c==0):a=!1;a&&(a=this.target,c=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?y.setProperty(a,"visible",c):a.visible=c);this.complete(!0);return}this._onRepeat!=null&&(c=this._onRepeat,b=this._onRepeatParams,b==null&&(b=[]),c.apply(c,b));this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=
this.startTime+this._delay;this._repeat>0&&this._repeat--}this.sendChange&&this.change()}},__class__:Td});var Im=function(a,b,c){this.currentParameters=[];this.tweenProperties={};Td.call(this,a,b,c);Object.prototype.hasOwnProperty.call(c,"start")||(this.properties.start=[]);Object.prototype.hasOwnProperty.call(c,"end")||(this.properties.end=this.properties.start);a=0;for(b=this.properties.start.length;a<b;)c=a++,this.currentParameters.push(this.properties.start[c])};t["motion.actuators.MethodActuator"]=
Im;Im.__name__="motion.actuators.MethodActuator";Im.__super__=Td;Im.prototype=I(Td.prototype,{currentParameters:null,tweenProperties:null,apply:function(){var a=this.target,b=this.properties.end;b==null&&(b=[]);a.apply(a,b)},complete:function(a){a==null&&(a=!0);if(this.initialized){for(var b=0,c=this.properties.start.length;b<c;){var d=b++;this.currentParameters[d]=y.field(this.tweenProperties,"param"+d)}b=this.target;c=this.currentParameters;c==null&&(c=[]);b.apply(b,c)}Td.prototype.complete.call(this,
a)},initialize:function(){for(var a,b,c=0,d=this.properties.start.length;c<d;){var f=c++;a="param"+f;b=this.properties.start[f];this.tweenProperties[a]=b;if(typeof b=="number"||typeof b=="number"&&(b|0)===b)a=new Sj(this.tweenProperties,a,b,this.properties.end[f]-b),this.propertyDetails.push(a)}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){Td.prototype.update.call(this,a);if(this.active&&!this.paused){a=0;for(var b=this.properties.start.length;a<b;){var c=
a++;this.currentParameters[c]=y.field(this.tweenProperties,"param"+c)}a=this.target;b=this.currentParameters;b==null&&(b=[]);a.apply(a,b)}},__class__:Im});var Op=function(a,b,c){Im.call(this,a,b,c)};t["feathers.motion.effects.actuate.MethodEffectActuator"]=Op;Op.__name__="feathers.motion.effects.actuate.MethodEffectActuator";Op.__interfaces__=[Sl];Op.__super__=Im;Op.prototype=I(Im.prototype,{getTarget:function(){return this.target},getDuration:function(){return this.duration},getEase:function(){return this._ease},
getAutoVisible:function(){return this._autoVisible},getDelay:function(){return this._delay},getReflect:function(){return this._reflect},getRepeat:function(){return this._repeat},getReverse:function(){return this._reverse},getSmartRotation:function(){return this._smartRotation},getSnapping:function(){return this._snapping},getOnComplete:function(){return this._onComplete},getOnCompleteParams:function(){return this._onCompleteParams},getOnRepeat:function(){return this._onRepeat},getOnRepeatParams:function(){return this._onRepeatParams},
getOnUpdate:function(){return this._onUpdate},getOnUpdateParams:function(){return this._onUpdateParams},getOnPause:function(){return this._onPause},getOnPauseParams:function(){return this._onPauseParams},getOnResume:function(){return this._onResume},getOnResumeParams:function(){return this._onResumeParams},goto:function(a){this.initialized||this.initialize();if(this.special)for(a=this._reverse?this._ease.calculate(1-a):this._ease.calculate(a),d=0,f=this.detailsLength;d<f;){var b=d++;b=this.propertyDetails[b];
if(!this._smartRotation||b.propertyName!="rotation"&&b.propertyName!="rotationX"&&b.propertyName!="rotationY"&&b.propertyName!="rotationZ")var c=b.start+b.change*a;else c=b.change%360,c>180?c-=360:c<-180&&(c+=360),c=b.start+c*a;this._snapping?this.setProperty(b,Math.round(c)):this.setProperty(b,c)}else{a=this._ease.calculate(a);for(var d=0,f=this.detailsLength;d<f;)b=d++,b=this.propertyDetails[b],this.setProperty(b,b.start+b.change*a)}d=0;for(f=this.properties.start.length;d<f;)b=d++,this.currentParameters[b]=
y.field(this.tweenProperties,"param"+b);a=this.target;d=this.currentParameters;d==null&&(d=[]);a.apply(a,d)},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=1);this.goto(b);if(b==1){if(this._repeat==0){this.active=!1;this.toggleVisible?(a=this.target,b=Object.prototype.hasOwnProperty.call(a,"alpha")?y.field(a,"alpha"):y.getProperty(a,"alpha"),a=b==0):a=!1;a&&(a=this.target,b=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?
y.setProperty(a,"visible",b):a.visible=b);this.complete(!0);return}if(this._onRepeat!=null){b=this._onRepeat;var c=this._onRepeatParams;c==null&&(c=[]);b.apply(b,c)}this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;this._repeat>0&&this._repeat--}this.sendChange&&this.change()}},__class__:Op});var Np=function(a,b,c){Td.call(this,a,b,c)};t["feathers.motion.effects.actuate.SimpleEffectActuator"]=Np;Np.__name__="feathers.motion.effects.actuate.SimpleEffectActuator";
Np.__interfaces__=[Sl];Np.__super__=Td;Np.prototype=I(Td.prototype,{getTarget:function(){return this.target},getDuration:function(){return this.duration},getEase:function(){return this._ease},getAutoVisible:function(){return this._autoVisible},getDelay:function(){return this._delay},getReflect:function(){return this._reflect},getRepeat:function(){return this._repeat},getReverse:function(){return this._reverse},getSmartRotation:function(){return this._smartRotation},getSnapping:function(){return this._snapping},
getOnComplete:function(){return this._onComplete},getOnCompleteParams:function(){return this._onCompleteParams},getOnRepeat:function(){return this._onRepeat},getOnRepeatParams:function(){return this._onRepeatParams},getOnUpdate:function(){return this._onUpdate},getOnUpdateParams:function(){return this._onUpdateParams},getOnPause:function(){return this._onPause},getOnPauseParams:function(){return this._onPauseParams},getOnResume:function(){return this._onResume},getOnResumeParams:function(){return this._onResumeParams},
goto:function(a){this.initialized||this.initialize();if(this.special)for(a=this._reverse?this._ease.calculate(1-a):this._ease.calculate(a),d=0,f=this.detailsLength;d<f;){var b=d++;b=this.propertyDetails[b];if(!this._smartRotation||b.propertyName!="rotation"&&b.propertyName!="rotationX"&&b.propertyName!="rotationY"&&b.propertyName!="rotationZ")var c=b.start+b.change*a;else c=b.change%360,c>180?c-=360:c<-180&&(c+=360),c=b.start+c*a;this._snapping?this.setProperty(b,Math.round(c)):this.setProperty(b,
c)}else{a=this._ease.calculate(a);for(var d=0,f=this.detailsLength;d<f;)b=d++,b=this.propertyDetails[b],this.setProperty(b,b.start+b.change*a)}},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=1);this.goto(b);if(b==1){if(this._repeat==0){this.active=!1;this.toggleVisible?(a=this.target,b=Object.prototype.hasOwnProperty.call(a,"alpha")?y.field(a,"alpha"):y.getProperty(a,"alpha"),a=b==0):a=!1;a&&(a=this.target,b=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||
a.__properties__&&a.__properties__.set_visible?y.setProperty(a,"visible",b):a.visible=b);this.complete(!0);return}if(this._onRepeat!=null){b=this._onRepeat;var c=this._onRepeatParams;c==null&&(c=[]);b.apply(b,c)}this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;this._repeat>0&&this._repeat--}this.sendChange&&this.change()}},__class__:Np});var pj=function(a,b,c){b==null&&(b=.5);a==null&&(a=0);this._parallax=1;this._angle=a;this._duration=b;this._ease=
c};t["feathers.motion.transitions.SlideTransitionBuilder"]=pj;pj.__name__="feathers.motion.transitions.SlideTransitionBuilder";pj.prototype={_angle:null,_duration:null,_ease:null,_interruptBehavior:null,_parallax:null,setAngle:function(a){this._angle=a;return this},setRadians:function(a){this._angle=a*180/Math.PI;return this},setUp:function(){this._angle=90;return this},setDown:function(){this._angle=270;return this},setLeft:function(){this._angle=180;return this},setRight:function(){this._angle=
0;return this},setDuration:function(a){this._duration=a;return this},setEase:function(a){this._ease=a;return this},setParallax:function(a){if(a<0||a>1)throw new we("Invalid parallax value: "+a+". Expected a value between 0.0 and 1.0.");this._parallax=a;return this},setInterruptBehavior:function(a){this._interruptBehavior=a;return this},build:function(){var a=this,b=this._angle%360;b<0&&(b+=360);var c=this._duration,d=this._ease,f=this._interruptBehavior;return function(g,h){if(g==null&&h==null)throw new Cb(pj.VIEW_REQUIRED_ERROR);
var n=null,l=0,q=0;g!=null&&(n=g.parent,l=g.get_width(),q=g.get_height());h!=null&&(n=h.parent,l=Math.max(l,h.get_width()),q=Math.max(q,h.get_height()));var u=0,v=0;if(b>=0&&b<45){u=l;var z=l/Math.cos(b*Math.PI/180);v=-Math.sqrt(z*z-l*l)}else b>=45&&b<90?(v=-q,z=q/Math.sin(b*Math.PI/180),u=Math.sqrt(z*z-q*q)):b>=90&&b<135?(v=-q,z=q/Math.cos((b-90)*Math.PI/180),u=-Math.sqrt(z*z-q*q)):b>=135&&b<180?(u=-l,z=l/Math.sin((b-90)*Math.PI/180),v=-Math.sqrt(z*z-l*l)):b>=180&&b<225?(u=-l,z=l/Math.cos((b-180)*
Math.PI/180),v=Math.sqrt(z*z-l*l)):b>=225&&b<270?(v=q,z=q/Math.sin((b-180)*Math.PI/180),u=-Math.sqrt(z*z-q*q)):b>=270&&b<315?(v=q,z=q/Math.cos((b-270)*Math.PI/180),u=Math.sqrt(z*z-q*q)):(u=l,z=l/Math.sin((b-270)*Math.PI/180),v=Math.sqrt(z*z-l*l));h!=null&&(h.set_x(-u),h.set_y(-v));n!=null&&g!=null&&h!=null&&(l=n.getChildIndex(g),q=n.getChildIndex(h),l>q&&n.swapChildren(g,h));n=xx.update(function(r,F){g!=null&&(g.set_x(r*a._parallax),g.set_y(F*a._parallax));h!=null&&(h.set_x(r-u),h.set_y(F-v))},c,
[0,0],[u,v]);d!=null&&n.ease(d);Ca.pause(n);return new Ct(null,n,f)}},__class__:pj};var xi=function(a,b){Ee.call(this,a,b)};t["feathers.skins.CircleSkin"]=xi;xi.__name__="feathers.skins.CircleSkin";xi.__super__=Ee;xi.prototype=I(Ee.prototype,{drawPath:function(){var a=this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);a=Math.max(0,b/2-a);this.get_graphics().drawCircle(this.actualWidth/2,this.actualHeight/2,a)},getRadius:function(){var a=
this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);return Math.max(0,b/2-a)},getDefaultGradientMatrixWidth:function(){var a=this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);return Math.max(0,b/2-a)},getDefaultGradientMatrixHeight:function(){var a=this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);
return Math.max(0,b/2-a)},getDefaultGradientMatrixTx:function(){var a=this.actualWidth,b=this.getCurrentBorder();b=this.getLineThickness(b)/2;var c=this.actualWidth;c>this.actualHeight&&(c=this.actualHeight);return Math.max(0,a-Math.max(0,c/2-b))/2},getDefaultGradientMatrixTy:function(){var a=this.actualHeight,b=this.getCurrentBorder();b=this.getLineThickness(b)/2;var c=this.actualWidth;c>this.actualHeight&&(c=this.actualHeight);return Math.max(0,a-Math.max(0,c/2-b))/2},__class__:xi});var xm=function(){};
t["feathers.skins.IIndeterminateSkin"]=xm;xm.__name__="feathers.skins.IIndeterminateSkin";xm.__isInterface__=!0;xm.__interfaces__=[qb];xm.prototype={get_indeterminatePosition:null,set_indeterminatePosition:null,__class__:xm,__properties__:{set_indeterminatePosition:"set_indeterminatePosition",get_indeterminatePosition:"get_indeterminatePosition"}};var Jm=function(a){wh.call(this);this.mouseChildren=!1;this.set_defaultView(a)};t["feathers.skins.MultiSkin"]=Jm;Jm.__name__="feathers.skins.MultiSkin";
Jm.__super__=wh;Jm.prototype=I(wh.prototype,{_previousView:null,_currentView:null,_currentViewMeasurements:null,_stateToView:null,_defaultView:null,get_defaultView:function(){return this._defaultView},set_defaultView:function(a){if(this._defaultView==a)return this._defaultView;this._defaultView=a;this.setInvalid(x.STYLES);return this._defaultView},_disabledView:null,get_disabledView:function(){return this._disabledView},set_disabledView:function(a){if(this._disabledView==a)return this._disabledView;
this._disabledView=a;this.setInvalid(x.STYLES);return this._disabledView},_selectedView:null,get_selectedView:function(){return this._selectedView},set_selectedView:function(a){if(this._selectedView==a)return this._disabledView;this._selectedView=a;this.setInvalid(x.STYLES);return this._selectedView},getViewForState:function(a){return this._stateToView==null?null:this._stateToView.get(a)},setViewForState:function(a,b){this._stateToView==null&&(this._stateToView=new cf);this._stateToView.get(a)!=b&&
(this._stateToView.set(a,b),this.setInvalid(x.STYLES))},update:function(){this.refreshView();this.measure();this.layoutView();this._previousView=this._currentView},refreshView:function(){var a=this._currentView;this._currentView=this.getCurrentView();this._currentView!=a&&(this.removeCurrentView(a),this._currentView==null?this._currentViewMeasurements=null:(w.__implements(this._currentView,Fa)&&this._currentView.initializeNow(),this._currentViewMeasurements==null?this._currentViewMeasurements=new Sb(this._currentView):
this._currentViewMeasurements.save(this._currentView),w.__implements(this._currentView,qb)&&this._currentView.set_uiContext(this._uiContext),w.__implements(this._currentView,ee)&&this._currentView.set_stateContext(this._stateContext),this.addChild(this._currentView)))},removeCurrentView:function(a){a!=null&&(w.__implements(a,qb)&&a.set_uiContext(null),w.__implements(a,ee)&&a.set_stateContext(null),this._currentViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},getCurrentView:function(){return this._previousView!=
null?this._previousView:this.getCurrentViewWithoutCache()},getCurrentViewWithoutCache:function(){var a=this._stateContext;a==null&&w.__implements(this._uiContext,uh)&&(a=this._uiContext);return this._stateToView!=null&&a!=null&&(a=this._stateToView.get(a.get_currentState()),a!=null)?a:this._uiContext==null?this._defaultView:this._disabledView==null||this._uiContext.get_enabled()?this._selectedView!=null&&w.__implements(this._uiContext,ud)&&this._uiContext.get_selected()?this._selectedView:this._defaultView:
this._disabledView},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentView!=null&&df.resetFluidlyWithParent(this._currentViewMeasurements,this._currentView,this);var h=null;w.__implements(this._currentView,rb)&&(h=this._currentView);w.__implements(this._currentView,da)&&
this._currentView.validateNow();var n=this.get_explicitWidth();a&&(n=0,this._currentView!=null&&(n=Math.max(this._currentView.get_width(),n)));a=this.get_explicitHeight();b&&(a=0,this._currentView!=null&&(a=Math.max(this._currentView.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=0,h!=null?b=Math.max(h.get_minWidth(),b):this._currentViewMeasurements!=null&&this._currentViewMeasurements.minWidth!=null&&(b=Math.max(this._currentViewMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&
(c=0,h!=null?c=Math.max(h.get_minHeight(),c):this._currentViewMeasurements!=null&&this._currentViewMeasurements.minHeight!=null&&(c=Math.max(this._currentViewMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._currentViewMeasurements!=null&&this._currentViewMeasurements.maxWidth!=null?this._currentViewMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._currentViewMeasurements!=null&&this._currentViewMeasurements.maxHeight!=
null?this._currentViewMeasurements.maxHeight:1/0);return this.saveMeasurements(n,a,b,c,d,f)},layoutView:function(){this._currentView!=null&&(this._currentView.get_width()!=this.actualWidth&&this._currentView.set_width(this.actualWidth),this._currentView.get_height()!=this.actualHeight&&this._currentView.set_height(this.actualHeight))},needsStateUpdate:function(){var a=!1;this._previousView!=this.getCurrentViewWithoutCache()&&(this._previousView=null,a=!0);return a},__class__:Jm,__properties__:I(wh.prototype.__properties__,
{set_selectedView:"set_selectedView",get_selectedView:"get_selectedView",set_disabledView:"set_disabledView",get_disabledView:"get_disabledView",set_defaultView:"set_defaultView",get_defaultView:"get_defaultView"})});var Dt=function(a,b,c){c==null&&(c=nj.HORIZONTAL);Ee.call(this,a,b);this._capDirection=c};t["feathers.skins.PillSkin"]=Dt;Dt.__name__="feathers.skins.PillSkin";Dt.__super__=Ee;Dt.prototype=I(Ee.prototype,{_capDirection:null,get_capDirection:function(){return this._capDirection},set_capDirection:function(a){if(this._capDirection==
a)return this._capDirection;this._capDirection=a;this.setInvalid(x.STYLES);return this._capDirection},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a);a=b/2;var c=Math.max(0,this.actualWidth-b);b=Math.max(0,this.actualHeight-b);var d=this.get_capDirection()==nj.VERTICAL?this.actualWidth:this.actualHeight;this.get_graphics().drawRoundRect(a,a,c,b,d)},__class__:Dt,__properties__:I(Ee.prototype.__properties__,{set_capDirection:"set_capDirection",get_capDirection:"get_capDirection"})});
var yi=function(a,b,c){c==null&&(c=0);this._cornerRadius=0;this._drawBaseBorder=!0;this._cornerRadiusPosition=ra.TOP;Ee.call(this,a,b);this._cornerRadius=c};t["feathers.skins.TabSkin"]=yi;yi.__name__="feathers.skins.TabSkin";yi.__super__=Ee;yi.prototype=I(Ee.prototype,{_cornerRadiusPosition:null,get_cornerRadiusPosition:function(){return this._cornerRadiusPosition},set_cornerRadiusPosition:function(a){if(this._cornerRadiusPosition==a)return this._cornerRadiusPosition;this._cornerRadiusPosition=a;
this.setInvalid(x.STYLES);return this._cornerRadiusPosition},_drawBaseBorder:null,get_drawBaseBorder:function(){return this._drawBaseBorder},set_drawBaseBorder:function(a){if(this._drawBaseBorder==a)return this._drawBaseBorder;this._drawBaseBorder=a;this.setInvalid(x.STYLES);return this._drawBaseBorder},_cornerRadius:null,get_cornerRadius:function(){return this._cornerRadius},set_cornerRadius:function(a){if(this._cornerRadius==a)return this._cornerRadius;this._cornerRadius=a;this.setInvalid(x.STYLES);
return this._cornerRadius},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=Math.max(0,this.actualWidth-b),d=Math.max(0,this.actualHeight-b),f=Math.min(this._cornerRadius,Math.min(this.actualWidth/2,this.actualHeight/2));if(f==0&&this._drawBaseBorder)this.get_graphics().drawRect(b,b,c,d);else switch(this._cornerRadiusPosition._hx_index){case 0:this.get_graphics().moveTo(b+f,b);this.get_graphics().lineTo(c-f,b);this.get_graphics().curveTo(c,b,c,b+f);this._drawBaseBorder?
(this.get_graphics().lineTo(c,d),this.get_graphics().lineTo(b,d)):(this.get_graphics().lineTo(c,this.actualHeight),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(b,this.actualHeight),this.applyLineStyle(a));this.get_graphics().lineTo(b,b+f);this.get_graphics().curveTo(b,b,b+f,b);break;case 1:this.get_graphics().moveTo(b,b);this.get_graphics().lineTo(c-f,b);this.get_graphics().curveTo(c,b,c,b+f);this.get_graphics().lineTo(c,d-f);this.get_graphics().curveTo(c,
d,c-f,d);this._drawBaseBorder?(this.get_graphics().lineTo(b,d),this.get_graphics().lineTo(b,b)):(this.get_graphics().lineTo(0,d),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(0,b),this.applyLineStyle(a));break;case 2:this._drawBaseBorder?(this.get_graphics().moveTo(b,b),this.get_graphics().lineTo(c,b)):(this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().moveTo(b,0),this.get_graphics().lineTo(c,0),this.applyLineStyle(a));this.get_graphics().lineTo(c,
d-f);this.get_graphics().curveTo(c,d,c-f,d);this.get_graphics().lineTo(b+f,d);this.get_graphics().curveTo(b,d,b,d-f);this.get_graphics().lineTo(b,b);break;case 3:this.get_graphics().moveTo(b+f,b);this._drawBaseBorder?(this.get_graphics().lineTo(c,b),this.get_graphics().lineTo(c,d)):(this.get_graphics().lineTo(this.actualWidth,b),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(this.actualWidth,d),this.applyLineStyle(a));this.get_graphics().lineTo(b+f,d);this.get_graphics().curveTo(b,
d,b,d-f);this.get_graphics().lineTo(b,b+f);this.get_graphics().curveTo(b,b,b+f,b);break;default:throw new Cb("Tab cornerRadiusPosition not supported: "+H.string(this._cornerRadiusPosition));}},__class__:yi,__properties__:I(Ee.prototype.__properties__,{set_cornerRadius:"set_cornerRadius",get_cornerRadius:"get_cornerRadius",set_drawBaseBorder:"set_drawBaseBorder",get_drawBaseBorder:"get_drawBaseBorder",set_cornerRadiusPosition:"set_cornerRadiusPosition",get_cornerRadiusPosition:"get_cornerRadiusPosition"})});
var Jf=function(a,b){this._drawBaseBorder=!0;this._pointPosition=ra.TOP;Ee.call(this,a,b)};t["feathers.skins.TriangleSkin"]=Jf;Jf.__name__="feathers.skins.TriangleSkin";Jf.__super__=Ee;Jf.prototype=I(Ee.prototype,{_pointPosition:null,get_pointPosition:function(){return this._pointPosition},set_pointPosition:function(a){if(this._pointPosition==a)return this._pointPosition;this._pointPosition=a;this.setInvalid(x.STYLES);return this._pointPosition},_drawBaseBorder:null,get_drawBaseBorder:function(){return this._drawBaseBorder},
set_drawBaseBorder:function(a){if(this._drawBaseBorder==a)return this._drawBaseBorder;this._drawBaseBorder=a;this.setInvalid(x.STYLES);return this._drawBaseBorder},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=Math.max(0,this.actualWidth-b),d=Math.max(0,this.actualHeight-b);switch(this._pointPosition._hx_index){case 0:this.get_graphics().moveTo(this.actualWidth/2,b);this._drawBaseBorder?(this.get_graphics().lineTo(c,d),this.get_graphics().lineTo(b,d)):(this.get_graphics().lineTo(c,
this.actualHeight),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(b,this.actualHeight),this.applyLineStyle(a));this.get_graphics().lineTo(this.actualWidth/2,b);break;case 1:this._drawBaseBorder?this.get_graphics().moveTo(b,b):this.get_graphics().moveTo(0,b);this.get_graphics().lineTo(c,this.actualHeight/2);this._drawBaseBorder?(this.get_graphics().lineTo(b,d),this.get_graphics().lineTo(b,b)):(this.get_graphics().lineTo(0,d),this.get_graphics().lineStyle(0,
null,0,null,null,null,null,0),this.get_graphics().lineTo(0,b),this.applyLineStyle(a));break;case 2:this._drawBaseBorder?(this.get_graphics().moveTo(b,b),this.get_graphics().lineTo(c,b)):(this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().moveTo(b,0),this.get_graphics().lineTo(c,0),this.applyLineStyle(a));this.get_graphics().lineTo(this.actualWidth/2,d);this._drawBaseBorder?this.get_graphics().lineTo(b,b):this.get_graphics().lineTo(b,0);break;case 3:this._drawBaseBorder?
(this.get_graphics().moveTo(c,b),this.get_graphics().lineTo(c,d)):(this.get_graphics().moveTo(this.actualWidth,b),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(this.actualWidth,d),this.applyLineStyle(a));this.get_graphics().lineTo(b,this.actualHeight/2);this._drawBaseBorder?this.get_graphics().lineTo(c,b):this.get_graphics().lineTo(this.actualWidth,b);break;default:throw new Cb("Triangle pointPosition not supported: "+H.string(this._pointPosition));}},__class__:Jf,
__properties__:I(Ee.prototype.__properties__,{set_drawBaseBorder:"set_drawBaseBorder",get_drawBaseBorder:"get_drawBaseBorder",set_pointPosition:"set_pointPosition",get_pointPosition:"get_pointPosition"})});var Tl=function(a,b){Ee.call(this,a,b)};t["feathers.skins.UnderlineSkin"]=Tl;Tl.__name__="feathers.skins.UnderlineSkin";Tl.__super__=Ee;Tl.prototype=I(Ee.prototype,{draw:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=this.getCurrentFill();c!=null&&(this.applyFillStyle(c),
this.get_graphics().drawRect(0,0,this.actualWidth,Math.max(0,this.actualHeight-b)),this.get_graphics().endFill());c=Math.min(this.actualWidth,b);var d=Math.max(c,this.actualWidth-b);b=Math.max(Math.min(this.actualHeight,b),this.actualHeight-b);this.applyLineStyle(a);this.get_graphics().moveTo(c,b);this.get_graphics().lineTo(d,b)},__class__:Tl});var Qp=function(a,b){this._paddingTop=this._paddingBottom=0;this._horizontalAlign=Wb.CENTER;Ee.call(this,a,b)};t["feathers.skins.VerticalLineSkin"]=Qp;Qp.__name__=
"feathers.skins.VerticalLineSkin";Qp.__super__=Ee;Qp.prototype=I(Ee.prototype,{_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;this.setInvalid(x.STYLES);return this._horizontalAlign},_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;this.setInvalid(x.STYLES);
return this._paddingTop},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;this.setInvalid(x.STYLES);return this._paddingBottom},draw:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=this.getCurrentFill();c!=null&&(this.applyFillStyle(c),this.get_graphics().drawRect(0,0,this.actualWidth,this.actualHeight),this.get_graphics().endFill());switch(this._horizontalAlign._hx_index){case 0:c=
b;break;case 1:c=this.actualWidth/2;break;case 2:c=this.actualWidth-b;break;default:throw new Cb("Unknown horizontal align: "+H.string(this._horizontalAlign));}var d=Math.min(this.actualHeight,b+this._paddingTop);b=Math.max(d,this.actualHeight-b-this._paddingTop-this._paddingBottom);this.applyLineStyle(a);this.get_graphics().moveTo(c,d);this.get_graphics().lineTo(c,b)},__class__:Qp,__properties__:I(Ee.prototype.__properties__,{set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",
set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign"})});var Rp=function(){this._endDotAlpha=0;this._dotAlpha=1;this._endDotColor=null;this._dotColor=0;this._endDotRadius=null;this._dotRadius=3;this._numEmptyDots=0;this._numDots=8;this._indeterminatePosition=0;wh.call(this)};t["feathers.skins.activity.DotsActivitySkin"]=Rp;Rp.__name__="feathers.skins.activity.DotsActivitySkin";Rp.__interfaces__=[xm];Rp.__super__=
wh;Rp.prototype=I(wh.prototype,{_indeterminatePosition:null,get_indeterminatePosition:function(){return this._indeterminatePosition},set_indeterminatePosition:function(a){if(this._indeterminatePosition==a)return this._indeterminatePosition;this._indeterminatePosition=a;this.setInvalid(x.DATA);return this._indeterminatePosition},_numDots:null,get_numDots:function(){return this._numDots},set_numDots:function(a){if(this._numDots==a)return this._numDots;this._numDots=a;this.setInvalid(x.STYLES);return this._numDots},
_numEmptyDots:null,get_numEmptyDots:function(){return this._numEmptyDots},set_numEmptyDots:function(a){if(this._numEmptyDots==a)return this._numEmptyDots;this._numEmptyDots=a;this.setInvalid(x.STYLES);return this._numEmptyDots},_dotRadius:null,get_dotRadius:function(){return this._dotRadius},set_dotRadius:function(a){if(this._dotRadius==a)return this._dotRadius;this._dotRadius=a;this.setInvalid(x.STYLES);return this._dotRadius},_endDotRadius:null,get_endDotRadius:function(){return this._endDotRadius},
set_endDotRadius:function(a){if(this._endDotRadius==a)return this._endDotRadius;this._endDotRadius=a;this.setInvalid(x.STYLES);return this._endDotRadius},_dotColor:null,get_dotColor:function(){return this._dotColor},set_dotColor:function(a){if(this._dotColor==a)return this._dotColor;this._dotColor=a;this.setInvalid(x.STYLES);return this._dotColor},_endDotColor:null,get_endDotColor:function(){return this._endDotColor},set_endDotColor:function(a){if(this._endDotColor==a)return this._endDotColor;this._endDotColor=
a;this.setInvalid(x.STYLES);return this._endDotColor},_dotAlpha:null,get_dotAlpha:function(){return this._dotAlpha},set_dotAlpha:function(a){if(this._dotAlpha==a)return this._dotAlpha;this._dotAlpha=a;this.setInvalid(x.STYLES);return this._dotAlpha},_endDotAlpha:null,get_endDotAlpha:function(){return this._endDotAlpha},set_endDotAlpha:function(a){if(this._endDotAlpha==a)return this._endDotAlpha;this._endDotAlpha=a;this.setInvalid(x.STYLES);return this._endDotAlpha},update:function(){var a=this.isInvalid(x.DATA),
b=this.isInvalid(x.SIZE);this.measure()&&(b=!0);(a||b)&&this.drawSkin()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null;if(!a&&!b)return!1;var c=this._dotRadius;this._endDotRadius!=null&&(c=this._endDotRadius);c=Math.max(this.get_dotRadius(),c);var d=this.get_explicitWidth();a&&(d=b?c*this._numDots:this.get_explicitHeight());a=this.get_explicitHeight();b&&(a=b?c*this._numDots:this.get_explicitWidth());return this.saveMeasurements(d,a)},drawSkin:function(){this.get_graphics().clear();
if(this._numDots!=0){var a=Math.min(this.actualWidth,this.actualHeight)/2,b=this.actualWidth/2,c=this.actualHeight/2,d=We.roundToNearest(this._indeterminatePosition*360,360/this._numDots),f=this._dotRadius;this._endDotRadius!=null&&(f=this._endDotRadius);var g=Math.max(this.get_dotRadius(),f);this.get_graphics().beginFill(16711935,0);this.get_graphics().drawCircle(b,c,a);this.get_graphics().endFill();var h=0;this._numDots>this._numEmptyDots&&(h=this._numEmptyDots);for(var n=0,l=this._numDots;n<l;){var q=
n++,u=Ea.polar(a-g,-q*2*Math.PI/this._numDots+d*Math.PI/180),v=q/(this._numDots-h);q=this._dotColor;this._endDotColor!=null&&this._endDotColor!=this._dotColor&&(q=this.blendColors(this._dotColor,this._endDotColor,v));var z=this._dotAlpha-(this._dotAlpha-this._endDotAlpha)*v;this.get_dotRadius();v=this.get_dotRadius()-(this.get_dotRadius()-f)*v;this.get_graphics().beginFill(q,z);this.get_graphics().drawCircle(b+u.x,c+u.y,v);this.get_graphics().endFill()}}},blendColors:function(a,b,c){var d=a>>>16&
255,f=a>>>8&255;a&=255;return d+(((b>>>16&255)-d)*c|0)<<16|f+(((b>>>8&255)-f)*c|0)<<8|a+(((b&255)-a)*c|0)},__class__:Rp,__properties__:I(wh.prototype.__properties__,{set_endDotAlpha:"set_endDotAlpha",get_endDotAlpha:"get_endDotAlpha",set_dotAlpha:"set_dotAlpha",get_dotAlpha:"get_dotAlpha",set_endDotColor:"set_endDotColor",get_endDotColor:"get_endDotColor",set_dotColor:"set_dotColor",get_dotColor:"get_dotColor",set_endDotRadius:"set_endDotRadius",get_endDotRadius:"get_endDotRadius",set_dotRadius:"set_dotRadius",
get_dotRadius:"get_dotRadius",set_numEmptyDots:"set_numEmptyDots",get_numEmptyDots:"get_numEmptyDots",set_numDots:"set_numDots",get_numDots:"get_numDots",set_indeterminatePosition:"set_indeterminatePosition",get_indeterminatePosition:"get_indeterminatePosition"})});var Sp=function(){};t["feathers.style.IStyleProvider"]=Sp;Sp.__name__="feathers.style.IStyleProvider";Sp.__isInterface__=!0;Sp.__interfaces__=[Db];Sp.prototype={applyStyles:null,__class__:Sp};var Fl=function(){qa.call(this)};t["feathers.style.ClassVariantStyleProvider"]=
Fl;Fl.__name__="feathers.style.ClassVariantStyleProvider";Fl.__interfaces__=[Sp];Fl.__super__=qa;Fl.prototype=I(qa.prototype,{styleTargets:null,setStyleFunction:function(a,b,c){var d=this;this.styleTargets==null&&(this.styleTargets=new cf);a=a.__name__;b=b==null?Yn.Class(a):Yn.ClassAndVariant(a,b);if(c==null){if(!this.styleTargets.exists(b))return;this.styleTargets.remove(b)}else{a=this.styleTargets.get(b);if(c==a||y.compare(c,a)==0)return;this.styleTargets.set(b,c)}vh.dispatch(this,"stylesChange",
function(f){var g=d.getStyleContext(f);f=d.getVariant(f);g=d.getStyleFunctionInternal(g,f,!1);return c!=g?y.compare(c,g)==0:!0})},getStyleFunction:function(a,b){return this.getStyleFunctionInternal(a,b,!0)},applyStyles:function(a){if(this.styleTargets!=null){var b=this.getStyleContext(a),c=this.getVariant(a);b=this.getStyleFunctionInternal(b,c,!1);b!=null&&b(a)}},getStyleContext:function(a){var b=null;w.__implements(a,nd)&&(b=a.get_styleContext());b==null&&(b=w.getClass(a));return b},getVariant:function(a){var b=
null;w.__implements(a,nd)&&(b=a.get_variant());return b},getStyleFunctionInternal:function(a,b,c){if(this.styleTargets==null)return null;a=a.__name__;b=b==null?Yn.Class(a):Yn.ClassAndVariant(a,b);b=this.styleTargets.get(b);return b!=null||c?b:this.styleTargets.get(Yn.Class(a))},__class__:Fl});var Yn=R["feathers.style._ClassVariantStyleProvider.StyleTarget"]={__ename__:"feathers.style._ClassVariantStyleProvider.StyleTarget",__constructs__:null,Class:(B=function(a){return{_hx_index:0,type:a,__enum__:"feathers.style._ClassVariantStyleProvider.StyleTarget",
toString:E}},B._hx_name="Class",B.__params__=["type"],B),ClassAndVariant:(B=function(a,b){return{_hx_index:1,type:a,variant:b,__enum__:"feathers.style._ClassVariantStyleProvider.StyleTarget",toString:E}},B._hx_name="ClassAndVariant",B.__params__=["type","variant"],B)};Yn.__constructs__=[Yn.Class,Yn.ClassAndVariant];var bc=function(){};t["feathers.style.Theme"]=bc;bc.__name__="feathers.style.Theme";bc.__properties__={get_fallbackTheme:"get_fallbackTheme"};bc.get_fallbackTheme=function(){bc._fallbackTheme==
null&&(bc._fallbackTheme=new Et);return bc._fallbackTheme};bc.setTheme=function(a,b,c){c==null&&(c=!0);var d=null;if(b==null)d=bc.primaryTheme,bc.primaryTheme=a;else if(bc.roots==null){bc.roots=[b];var f=new Ta;f.set(b,a);bc.rootToTheme=f}else d=bc.rootToTheme.h[b.__id__],d==null&&bc.roots.push(b),bc.rootToTheme.set(b,a);d!=null&&c&&d.dispose()};bc.getTheme=function(a){if(a instanceof ma){for(var b=a;b!=null;){if(w.__implements(b,Bd)&&!b.get_themeEnabled())return null;b=b.parent}if(bc.roots!=null){b=
0;for(var c=bc.roots;b<c.length;){var d=c[b];++b;if(d.contains(a))return bc.rootToTheme.h[d.__id__]}}}else if(a!=null&&!a.get_themeEnabled())return null;return bc.primaryTheme!=null?bc.primaryTheme:bc.get_fallbackTheme()};var ni=function(a,b,c,d,f,g,h,n,l,q,u,v,z){qa.call(this);this._textFormat=new ef(a,b,c,d,f,g,h,n,l,q,u,v,z)};t["feathers.text.TextFormat"]=ni;ni.__name__="feathers.text.TextFormat";ni.__super__=qa;ni.prototype=I(qa.prototype,{_textFormat:null,get_font:function(){return this._textFormat.font},
set_font:function(a){if(this._textFormat.font==a)return this._textFormat.font;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_font(a);Y.dispatch(this,"change");return this._textFormat.font},get_size:function(){return this._textFormat.size},set_size:function(a){if(this._textFormat.size==a)return this._textFormat.size;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_size(a);Y.dispatch(this,"change");return this._textFormat.size},get_color:function(){return this._textFormat.color},
set_color:function(a){if(this._textFormat.color==a)return this._textFormat.color;this._textFormat=pg.clone(this._textFormat);this._textFormat.color=a;Y.dispatch(this,"change");return this._textFormat.color},get_bold:function(){return this._textFormat.bold},set_bold:function(a){if(this._textFormat.bold==a)return this._textFormat.bold;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_bold(a);Y.dispatch(this,"change");return this._textFormat.bold},get_italic:function(){return this._textFormat.italic},
set_italic:function(a){if(this._textFormat.italic==a)return this._textFormat.italic;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_italic(a);Y.dispatch(this,"change");return this._textFormat.italic},get_underline:function(){return this._textFormat.underline},set_underline:function(a){if(this._textFormat.underline==a)return this._textFormat.underline;this._textFormat=pg.clone(this._textFormat);this._textFormat.underline=a;Y.dispatch(this,"change");return this._textFormat.underline},
get_url:function(){return this._textFormat.url},set_url:function(a){if(this._textFormat.url==a)return this._textFormat.url;this._textFormat=pg.clone(this._textFormat);this._textFormat.url=a;Y.dispatch(this,"change");return this._textFormat.url},get_target:function(){return this._textFormat.target},set_target:function(a){if(this._textFormat.target==a)return this._textFormat.target;this._textFormat=pg.clone(this._textFormat);this._textFormat.target=a;Y.dispatch(this,"change");return this._textFormat.target},
get_align:function(){return this._textFormat.align},set_align:function(a){if(this._textFormat.align==a)return this._textFormat.align;this._textFormat=pg.clone(this._textFormat);this._textFormat.align=a;Y.dispatch(this,"change");return this._textFormat.align},get_leftMargin:function(){return this._textFormat.leftMargin},set_leftMargin:function(a){if(this._textFormat.leftMargin==a)return this._textFormat.leftMargin;this._textFormat=pg.clone(this._textFormat);this._textFormat.leftMargin=a;Y.dispatch(this,
"change");return this._textFormat.leftMargin},get_rightMargin:function(){return this._textFormat.rightMargin},set_rightMargin:function(a){if(this._textFormat.rightMargin==a)return this._textFormat.rightMargin;this._textFormat=pg.clone(this._textFormat);this._textFormat.rightMargin=a;Y.dispatch(this,"change");return this._textFormat.rightMargin},get_indent:function(){return this._textFormat.indent},set_indent:function(a){if(this._textFormat.indent==a)return this._textFormat.indent;this._textFormat=
pg.clone(this._textFormat);this._textFormat.indent=a;Y.dispatch(this,"change");return this._textFormat.indent},get_leading:function(){return this._textFormat.leading},set_leading:function(a){if(this._textFormat.leading==a)return this._textFormat.leading;this._textFormat=pg.clone(this._textFormat);this._textFormat.leading=a;Y.dispatch(this,"change");return this._textFormat.leading},get_blockIndent:function(){return this._textFormat.blockIndent},set_blockIndent:function(a){if(this._textFormat.blockIndent==
a)return this._textFormat.blockIndent;this._textFormat=pg.clone(this._textFormat);this._textFormat.blockIndent=a;Y.dispatch(this,"change");return this._textFormat.blockIndent},get_bullet:function(){return this._textFormat.bullet},set_bullet:function(a){if(this._textFormat.bullet==a)return this._textFormat.bullet;this._textFormat=pg.clone(this._textFormat);this._textFormat.bullet=a;Y.dispatch(this,"change");return this._textFormat.bullet},get_kerning:function(){return this._textFormat.kerning},set_kerning:function(a){if(this._textFormat.kerning==
a)return this._textFormat.kerning;this._textFormat=pg.clone(this._textFormat);this._textFormat.kerning=a;Y.dispatch(this,"change");return this._textFormat.kerning},get_letterSpacing:function(){return this._textFormat.letterSpacing},set_letterSpacing:function(a){if(this._textFormat.letterSpacing==a)return this._textFormat.letterSpacing;this._textFormat=pg.clone(this._textFormat);this._textFormat.letterSpacing=a;Y.dispatch(this,"change");return this._textFormat.letterSpacing},get_tabStops:function(){return this._textFormat.tabStops},
set_tabStops:function(a){if(this._textFormat.tabStops==a)return this._textFormat.tabStops;this._textFormat=pg.clone(this._textFormat);this._textFormat.tabStops=a;Y.dispatch(this,"change");return this._textFormat.tabStops},clone:function(){var a=new ni(this.get_font(),this.get_size(),this.get_color(),this.get_bold(),this.get_italic(),this.get_underline(),this.get_url(),this.get_target(),this.get_align(),this.get_leftMargin(),this.get_rightMargin(),this.get_indent(),this.get_leading());a._textFormat.blockIndent=
this.get_blockIndent();a._textFormat.bullet=this.get_bullet();a._textFormat.kerning=this.get_kerning();a._textFormat.letterSpacing=this.get_letterSpacing();a._textFormat.tabStops=this.get_tabStops();return a},toSimpleTextFormat:function(){return this._textFormat},__class__:ni,__properties__:{set_tabStops:"set_tabStops",get_tabStops:"get_tabStops",set_letterSpacing:"set_letterSpacing",get_letterSpacing:"get_letterSpacing",set_kerning:"set_kerning",get_kerning:"get_kerning",set_bullet:"set_bullet",
get_bullet:"get_bullet",set_blockIndent:"set_blockIndent",get_blockIndent:"get_blockIndent",set_leading:"set_leading",get_leading:"get_leading",set_indent:"set_indent",get_indent:"get_indent",set_rightMargin:"set_rightMargin",get_rightMargin:"get_rightMargin",set_leftMargin:"set_leftMargin",get_leftMargin:"get_leftMargin",set_align:"set_align",get_align:"get_align",set_target:"set_target",get_target:"get_target",set_url:"set_url",get_url:"get_url",set_underline:"set_underline",get_underline:"get_underline",
set_italic:"set_italic",get_italic:"get_italic",set_bold:"set_bold",get_bold:"get_bold",set_color:"set_color",get_color:"get_color",set_size:"set_size",get_size:"get_size",set_font:"set_font",get_font:"get_font"}});var Et=function(a,b){zc.call(this,a,b)};t["feathers.themes.steel.DefaultSteelTheme"]=Et;Et.__name__="feathers.themes.steel.DefaultSteelTheme";Et.__super__=zc;Et.prototype=I(zc.prototype,{__class__:Et});var tw=function(){};t["feathers.themes.steel.components.SteelActivityIndicatorStyles"]=
tw;tw.__name__="feathers.themes.steel.components.SteelActivityIndicatorStyles";tw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(kp,null)==null&&b.setStyleFunction(kp,null,function(c){if(c.get_activitySkin()==null){var d=new Rp;d.set_numDots(8);d.set_dotRadius(3);d.set_endDotRadius(null);d.set_dotColor(a.textColor);d.set_endDotColor(null);d.set_dotAlpha(1);d.set_endDotAlpha(0);var f=1.1*d.get_dotRadius()*d.get_numDots();
d.set_width(f);d.set_height(f);c.set_activitySkin(d)}}))};var uw=function(){};t["feathers.themes.steel.components.SteelAlertStyles"]=uw;uw.__name__="feathers.themes.steel.components.SteelAlertStyles";uw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Fd,null)==null&&b.setStyleFunction(Fd,null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=
new Za,d.set_border(oc.None),d.set_fill(a.getContainerFill()),d.set_maxWidth(276),c.set_backgroundSkin(d));c.get_layout()==null&&(d=new zg,d.set_paddingTop(a.largePadding),d.set_paddingRight(a.largePadding),d.set_paddingBottom(a.largePadding),d.set_paddingLeft(a.largePadding),d.set_gap(a.mediumPadding),d.set_percentWidthResetEnabled(!0),c.set_layout(d))}),b.getStyleFunction(Ze,Fd.CHILD_VARIANT_BUTTON_BAR)==null&&b.setStyleFunction(Ze,Fd.CHILD_VARIANT_BUTTON_BAR,function(c){if(c.get_layout()==null){var d=
new Mp;d.set_paddingTop(a.largePadding);d.set_paddingRight(a.largePadding);d.set_paddingBottom(a.largePadding);d.set_paddingLeft(a.largePadding);d.set_gap(a.mediumPadding);c.set_layout(d)}}),b.getStyleFunction(ia,Fd.CHILD_VARIANT_MESSAGE_LABEL)==null&&b.setStyleFunction(ia,Fd.CHILD_VARIANT_MESSAGE_LABEL,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_layoutData()==null&&c.set_layoutData(gh.fillHorizontal());
c.set_wordWrap(!0)}))};var Wq=function(){};t["feathers.themes.steel.components.SteelApplicationStyles"]=Wq;Wq.__name__="feathers.themes.steel.components.SteelApplicationStyles";Wq.initialize=function(a){a==null&&(a=bc.get_fallbackTheme(),a=a instanceof zc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Va,null)==null&&a.setStyleFunction(Va,null,function(b){b.get_scaleManager()==null&&b.set_scaleManager(new Hp)}))};Wq.refreshStageColor=function(a,b){a!=null&&a.set_color(b.rootFillColor)};var vw=
function(){};t["feathers.themes.steel.components.SteelButtonBarStyles"]=vw;vw.__name__="feathers.themes.steel.components.SteelButtonBarStyles";vw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ze,null)==null&&b.setStyleFunction(Ze,null,function(c){if(c.get_layout()==null){var d=new zg;d.set_gap(a.mediumPadding);c.set_layout(d)}}))};var lw=function(){};t["feathers.themes.steel.components.SteelButtonStyles"]=lw;
lw.__name__="feathers.themes.steel.components.SteelButtonStyles";lw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Xb,null)==null&&b.setStyleFunction(Xb,null,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());
d.setBorderForState(Kc.DOWN,a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new Za,d.set_fill(ub.None),d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);
c.set_gap(a.smallPadding)}),b.getStyleFunction(Xb,Xb.VARIANT_PRIMARY)==null&&b.setStyleFunction(Xb,Xb.VARIANT_PRIMARY,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getActiveThemeFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getActiveFillBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new Za,d.set_fill(ub.None),
d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Xb,Xb.VARIANT_DANGER)==null&&b.setStyleFunction(Xb,Xb.VARIANT_DANGER,function(c){if(c.get_backgroundSkin()==
null){var d=new Za;d.set_fill(a.getDangerFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Kc.DOWN,a.getReversedDangerFill());d.set_border(a.getDangerBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new Za,d.set_fill(ub.None),d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}))};var ww=function(){};t["feathers.themes.steel.components.SteelCalloutStyles"]=ww;ww.__name__="feathers.themes.steel.components.SteelCalloutStyles";ww.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Wd,
null)==null&&b.setStyleFunction(Wd,null,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.TOP),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(14),d.set_height(8),c.set_topArrowSkin(d));c.get_rightArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.RIGHT),d.set_drawBaseBorder(!1),
d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(8),d.set_height(14),c.set_rightArrowSkin(d));c.get_bottomArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.BOTTOM),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(14),d.set_height(8),c.set_bottomArrowSkin(d));c.get_leftArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.LEFT),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),
d.set_width(8),d.set_height(14),c.set_leftArrowSkin(d));c.set_topArrowGap(-a.borderThickness);c.set_rightArrowGap(-a.borderThickness);c.set_bottomArrowGap(-a.borderThickness);c.set_leftArrowGap(-a.borderThickness);c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);c.set_paddingLeft(a.borderThickness);c.set_marginTop(a.xlargePadding);c.set_marginRight(a.xlargePadding);c.set_marginBottom(a.xlargePadding);c.set_marginLeft(a.xlargePadding)}))};
var xw=function(){};t["feathers.themes.steel.components.SteelCheckStyles"]=xw;xw.__name__="feathers.themes.steel.components.SteelCheckStyles";xw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(um,null)==null&&b.setStyleFunction(um,null,function(c){var d=pc.isDesktop();c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());
if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(ub.SolidColor(0,0));f.set_border(oc.None);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new Jm;c.set_icon(f);var g=new Za;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Yb.DOWN(!1),a.getSelectedInsetBorder());g.set_fill(a.getInsetFill());
g.set_disabledFill(a.getDisabledInsetFill());f.set_defaultView(g);g=new Za;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getSelectedInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Yb.DOWN(!0),a.getSelectedInsetBorder());g.set_fill(a.getReversedActiveThemeFill());g.set_disabledFill(a.getDisabledInsetFill());var h=new Hd;d?(h.get_graphics().beginFill(a.textColor),
h.get_graphics().drawRect(-1,-8,3,11),h.get_graphics().endFill(),h.get_graphics().beginFill(a.textColor),h.get_graphics().drawRect(-4,0,5,3),h.get_graphics().endFill(),h.set_x(7),h.set_y(9)):(h.get_graphics().beginFill(a.textColor),h.get_graphics().drawRect(-1,-8,3,14),h.get_graphics().endFill(),h.get_graphics().beginFill(a.textColor),h.get_graphics().drawRect(-5,3,5,3),h.get_graphics().endFill(),h.set_x(10),h.set_y(10));h.set_rotation(45);g.addChild(h);f.set_selectedView(g);d=new Za;d.set_width(20);
d.set_height(20);d.set_minWidth(20);d.set_minHeight(20);d.set_border(a.getDisabledInsetBorder());d.set_fill(a.getDisabledInsetFill());g=new Hd;g.get_graphics().beginFill(a.disabledTextColor);g.get_graphics().drawRect(-1,-8,3,14);g.get_graphics().endFill();g.get_graphics().beginFill(a.disabledTextColor);g.get_graphics().drawRect(-5,3,5,3);g.get_graphics().endFill();g.set_rotation(45);g.set_x(10);g.set_y(10);d.addChild(g);f.setViewForState(Yb.DISABLED(!0),d)}c.get_focusRectSkin()==null&&(f=new Za,f.set_fill(ub.None),
f.set_border(a.getFocusBorder()),f.set_cornerRadius(3),c.set_focusRectSkin(f),c.set_focusPaddingTop(3),c.set_focusPaddingRight(3),c.set_focusPaddingBottom(3),c.set_focusPaddingLeft(3));c.set_horizontalAlign(Wb.LEFT);c.set_gap(a.smallPadding)}))};var Uk=function(){};t["feathers.themes.steel.components.SteelCollapsibleStyles"]=Uk;Uk.__name__="feathers.themes.steel.components.SteelCollapsibleStyles";Uk.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&
(b=a.styleProvider,b.getStyleFunction(hd,Ah.CHILD_VARIANT_HEADER)==null&&b.setStyleFunction(hd,Ah.CHILD_VARIANT_HEADER,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());f.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());f.setFillForState(Yb.DOWN(!0),a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Yb.DOWN(!1),
a.getActiveFillBorder());f.setBorderForState(Yb.DOWN(!0),a.getActiveFillBorder());f.set_cornerRadius(0);f.set_minWidth(22);f.set_minHeight(22);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new Jm;c.set_icon(f);var g=new Hd;Uk.drawDisclosureClosedIcon(g,a.textColor,d);f.set_defaultView(g);g=new Hd;Uk.drawDisclosureClosedIcon(g,a.disabledTextColor,d);f.set_disabledView(g);g=new Hd;Uk.drawDisclosureOpenIcon(g,a.textColor,d);f.set_selectedView(g);g=new Hd;Uk.drawDisclosureOpenIcon(g,a.disabledTextColor,
d);f.setViewForState(Yb.DISABLED(!0),g)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(1/0);c.set_minGap(a.smallPadding);
c.set_iconPosition(ra.RIGHT);c.set_horizontalAlign(Wb.LEFT);c.set_verticalAlign(hc.MIDDLE)}))};Uk.drawDisclosureClosedIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,6),a.get_graphics().lineTo(12,6),a.get_graphics().lineTo(8,10)):(a.get_graphics().moveTo(4,6),a.get_graphics().lineTo(16,6),a.get_graphics().lineTo(10,14));a.get_graphics().lineTo(4,
6);a.get_graphics().endFill();a.get_graphics().beginFill(b);a.get_graphics().endFill()};Uk.drawDisclosureOpenIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,10),a.get_graphics().lineTo(12,10),a.get_graphics().lineTo(8,6),a.get_graphics().lineTo(4,10)):(a.get_graphics().moveTo(4,14),a.get_graphics().lineTo(16,14),a.get_graphics().lineTo(10,
6),a.get_graphics().lineTo(4,14));a.get_graphics().endFill()};var yw=function(){};t["feathers.themes.steel.components.SteelComboBoxStyles"]=yw;yw.__name__="feathers.themes.steel.components.SteelComboBoxStyles";yw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Xb,Qd.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Xb,Qd.CHILD_VARIANT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new yi;d.set_cornerRadiusPosition(ra.RIGHT);
d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.setBorderForState(Kc.DOWN,a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Jf,d.set_pointPosition(ra.BOTTOM),d.set_fill(ub.SolidColor(a.textColor)),d.set_disabledFill(ub.SolidColor(a.disabledTextColor)),d.set_width(8),d.set_height(4),
c.set_icon(d));c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(rd,Qd.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(rd,Qd.CHILD_VARIANT_TEXT_INPUT,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new yi;f.set_cornerRadiusPosition(ra.LEFT);f.set_cornerRadius(3);f.set_drawBaseBorder(!1);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());
f.set_disabledFill(a.getDisabledInsetFill());f.set_border(a.getInsetBorder());f.set_disabledBorder(a.getDisabledInsetBorder());f.setBorderForState(Fe.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),
c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}),b.getStyleFunction(Fc,Qd.CHILD_VARIANT_LIST_VIEW)==null&&b.setStyleFunction(Fc,Qd.CHILD_VARIANT_LIST_VIEW,function(c){a.styleProvider.getStyleFunction(Fc,Fc.VARIANT_POP_UP)(c)}))};var Sh=function(){};t["feathers.themes.steel.components.SteelDatePickerStyles"]=Sh;Sh.__name__="feathers.themes.steel.components.SteelDatePickerStyles";
Sh.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Kb,null)==null&&b.setStyleFunction(Kb,null,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_border(oc.None);d.set_fill(a.getContainerFill());c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new Za,d.set_fill(ub.None),d.set_border(a.getFocusBorder()),c.set_focusRectSkin(d));c.set_focusPaddingTop(3);c.set_focusPaddingRight(3);c.set_focusPaddingBottom(3);
c.set_focusPaddingLeft(3);c.set_headerGap(a.xsmallPadding)}),b.getStyleFunction(ia,Kb.CHILD_VARIANT_MONTH_TITLE_VIEW)==null&&b.setStyleFunction(ia,Kb.CHILD_VARIANT_MONTH_TITLE_VIEW,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}),b.getStyleFunction(Xb,Kb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON)==null&&b.setStyleFunction(Xb,Kb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON,function(c){var d=pc.isDesktop();
if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getButtonFill());f.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Kc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Kc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==null&&(d=new Hd,Sh.drawDecrementMonthIcon(d,
a.textColor),c.set_icon(d));c.getIconForState(Kc.DISABLED)==null&&(d=new Hd,Sh.drawDecrementMonthIcon(d,a.disabledTextColor),c.setIconForState(Kc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Xb,Kb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON)==null&&b.setStyleFunction(Xb,Kb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getButtonFill());f.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());
f.setFillForState(Kc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Kc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==null&&(d=new Hd,Sh.drawIncrementMonthIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Kc.DISABLED)==null&&(d=new Hd,Sh.drawIncrementMonthIcon(d,a.disabledTextColor),c.setIconForState(Kc.DISABLED,
d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Xb,Kb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON)==null&&b.setStyleFunction(Xb,Kb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getButtonFill());f.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Kc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Kc.DOWN,
a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==null&&(d=new Hd,Sh.drawDecrementYearIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Kc.DISABLED)==null&&(d=new Hd,Sh.drawDecrementYearIcon(d,a.disabledTextColor),c.setIconForState(Kc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Xb,Kb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON)==null&&b.setStyleFunction(Xb,
Kb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getButtonFill());f.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Kc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Kc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==
null&&(d=new Hd,Sh.drawIncrementYearIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Kc.DISABLED)==null&&(d=new Hd,Sh.drawIncrementYearIcon(d,a.disabledTextColor),c.setIconForState(Kc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(ia,Kb.CHILD_VARIANT_WEEKDAY_LABEL)==null&&b.setStyleFunction(ia,Kb.CHILD_VARIANT_WEEKDAY_LABEL,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getSecondaryTextFormat(0));c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat(0));
c.set_verticalAlign(hc.MIDDLE)}),b.getStyleFunction(Sc,Kb.CHILD_VARIANT_DATE_RENDERER)==null&&b.setStyleFunction(Sc,Kb.CHILD_VARIANT_DATE_RENDERER,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(ub.SolidColor(16711935,0));f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());f.set_border(oc.None);f.set_selectedBorder(a.getSelectedBorder());f.setBorderForState(Yb.DOWN(!1),a.getActiveFillBorder());d?(f.set_width(20),
f.set_height(20)):(f.set_width(32),f.set_height(32));f.set_cornerRadius(4);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_horizontalAlign(Wb.CENTER);c.set_verticalAlign(hc.MIDDLE);
c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}),b.getStyleFunction(Sc,Kb.CHILD_VARIANT_MUTED_DATE_RENDERER)==null&&b.setStyleFunction(Sc,Kb.CHILD_VARIANT_MUTED_DATE_RENDERER,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(ub.SolidColor(16711935,0));f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());f.set_border(oc.None);
f.set_selectedBorder(a.getSelectedBorder());f.setBorderForState(Yb.DOWN(!1),a.getActiveFillBorder());d?(f.set_width(20),f.set_height(20)):(f.set_width(32),f.set_height(32));f.set_cornerRadius(4);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getSecondaryTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==
null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_horizontalAlign(Wb.CENTER);c.set_verticalAlign(hc.MIDDLE);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}))};Sh.drawDecrementMonthIcon=function(a,b){a.get_graphics().beginFill(16711935,0);a.get_graphics().drawRect(0,0,8,8);a.get_graphics().endFill();a.get_graphics().beginFill(b);a.get_graphics().moveTo(2,4);a.get_graphics().lineTo(6,
0);a.get_graphics().lineTo(6,8);a.get_graphics().lineTo(2,4);a.get_graphics().endFill()};Sh.drawIncrementMonthIcon=function(a,b){a.get_graphics().beginFill(16711935,0);a.get_graphics().drawRect(0,0,8,8);a.get_graphics().endFill();a.get_graphics().beginFill(b);a.get_graphics().moveTo(2,0);a.get_graphics().lineTo(6,4);a.get_graphics().lineTo(2,8);a.get_graphics().lineTo(2,0);a.get_graphics().endFill()};Sh.drawDecrementYearIcon=function(a,b){a.get_graphics().beginFill(b);a.get_graphics().moveTo(0,4);
a.get_graphics().lineTo(4,0);a.get_graphics().lineTo(4,8);a.get_graphics().lineTo(0,4);a.get_graphics().moveTo(4,4);a.get_graphics().lineTo(8,0);a.get_graphics().lineTo(8,8);a.get_graphics().lineTo(4,4);a.get_graphics().endFill()};Sh.drawIncrementYearIcon=function(a,b){a.get_graphics().beginFill(b);a.get_graphics().moveTo(0,0);a.get_graphics().lineTo(4,4);a.get_graphics().lineTo(0,8);a.get_graphics().lineTo(0,0);a.get_graphics().moveTo(4,0);a.get_graphics().lineTo(8,4);a.get_graphics().lineTo(4,8);
a.get_graphics().lineTo(4,0);a.get_graphics().endFill()};var Yv=function(){};t["feathers.themes.steel.components.SteelDrawerStyles"]=Yv;Yv.__name__="feathers.themes.steel.components.SteelDrawerStyles";Yv.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Tf,null)==null&&b.setStyleFunction(Tf,null,function(c){if(c.get_overlaySkin()==null){var d=new Za;d.set_fill(a.getOverlayFill());d.set_border(oc.None);d.set_width(1);
d.set_height(1);c.set_overlaySkin(d)}}))};var Aw=function(){};t["feathers.themes.steel.components.SteelFormItemStyles"]=Aw;Aw.__name__="feathers.themes.steel.components.SteelFormItemStyles";Aw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ti,null)==null&&b.setStyleFunction(Ti,null,function(c){if(c.get_requiredSkin()==null){var d=new Hd;d.get_graphics().lineStyle(1,a.dangerTextColor);d.get_graphics().moveTo(4,
.5);d.get_graphics().lineTo(4,6.5);d.get_graphics().moveTo(1,1.5);d.get_graphics().lineTo(7,5.5);d.get_graphics().moveTo(1,5.5);d.get_graphics().lineTo(7,1.5);d.get_graphics().lineStyle();d.get_graphics().beginFill(16711935,0);d.get_graphics().drawRect(0,0,8,7);d.get_graphics().endFill();c.set_requiredSkin(d)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_gap(a.mediumPadding)}))};var zw=function(){};
t["feathers.themes.steel.components.SteelFormStyles"]=zw;zw.__name__="feathers.themes.steel.components.SteelFormStyles";zw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Kn,null)==null&&b.setStyleFunction(Kn,null,function(c){if(c.get_layout()==null){var d=new Lp;d.set_gap(a.mediumPadding);c.set_layout(d)}}))};var Bw=function(){};t["feathers.themes.steel.components.SteelGridViewStyles"]=Bw;Bw.__name__="feathers.themes.steel.components.SteelGridViewStyles";
Bw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}if(a!=null){var c=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&(g=new Za,g.set_fill(a.getThemeFill()),
g.set_border(oc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new Za,g.set_fill(a.getSubHeadingFill()),g.set_border(oc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.get_dragDropIndicatorSkin()==null&&(g=new Za,g.set_fill(a.getActiveThemeFill()),g.set_border(oc.None),g.set_width(2),g.set_height(2),f.set_dragDropIndicatorSkin(g));f.set_showHeaderDividersOnlyWhenResizable(!0);
f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(oc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&
(g=new Za,g.set_fill(a.getThemeFill()),g.set_border(oc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new Za,g.set_fill(a.getSubHeadingFill()),g.set_border(oc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_showHeaderDividersOnlyWhenResizable(!0)};b=a.styleProvider;b.getStyleFunction(sc,null)==null&&b.setStyleFunction(sc,null,function(f){pc.isDesktop()?
c(f):d(f)});b.getStyleFunction(sc,sc.VARIANT_BORDER)==null&&b.setStyleFunction(sc,sc.VARIANT_BORDER,c);b.getStyleFunction(sc,sc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(sc,sc.VARIANT_BORDERLESS,d);b.getStyleFunction(Sc,sc.CHILD_VARIANT_CELL_RENDERER)==null&&b.setStyleFunction(Sc,sc.CHILD_VARIANT_CELL_RENDERER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Za;h.set_fill(ub.SolidColor(16711935,0));h.set_border(oc.None);g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),
h.set_minHeight(26)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}a.styleProvider.getStyleFunction(Sc,null)(f)});b.getStyleFunction(Sc,sc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Sc,sc.CHILD_VARIANT_HEADER_RENDERER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Za;h.set_fill(a.getSubHeadingFill());h.set_border(oc.None);g?(h.set_width(22),h.set_height(22),h.set_minWidth(22),h.set_minHeight(22)):(h.set_width(44),
h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}f.get_textFormat()==null&&f.set_textFormat(a.getTextFormat());f.get_disabledTextFormat()==null&&f.set_disabledTextFormat(a.getDisabledTextFormat());f.get_secondaryTextFormat()==null&&f.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());f.get_disabledSecondaryTextFormat()==null&&f.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());f.set_paddingTop(a.smallPadding);f.set_paddingRight(a.largePadding);
f.set_paddingBottom(a.smallPadding);f.set_paddingLeft(a.largePadding);f.set_gap(a.smallPadding);f.set_horizontalAlign(Wb.LEFT)});b.getStyleFunction(Xb,sc.CHILD_VARIANT_HEADER_DIVIDER)==null&&b.setStyleFunction(Xb,sc.CHILD_VARIANT_HEADER_DIVIDER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Qp;h.set_fill(ub.SolidColor(16711935,0));h.set_border(a.getSubHeadingDividerBorder());h.setBorderForState(Kc.HOVER,a.getThemeBorder());g?(h.set_width(6),h.set_height(1),h.set_minWidth(6)):
(h.set_width(10),h.set_height(1),h.set_minWidth(10));h.set_minHeight(1);f.set_backgroundSkin(h)}});b.getStyleFunction(eg,null)==null&&b.setStyleFunction(eg,null,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Tl;h.set_fill(a.getContainerFill());h.set_border(a.getDividerBorder());h.set_selectedFill(a.getActiveThemeFill());h.setFillForState(Yb.DOWN(!1),a.getActiveThemeFill());g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),h.set_minHeight(26)):(h.set_width(44),h.set_height(44),
h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}})}};var Cw=function(){};t["feathers.themes.steel.components.SteelGroupListViewStyles"]=Cw;Cw.__name__="feathers.themes.steel.components.SteelGroupListViewStyles";Cw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}if(a!=null){var c=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==
null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==
null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(oc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(Yc,null)==null&&b.setStyleFunction(Yc,null,function(f){pc.isDesktop()?c(f):d(f)});b.getStyleFunction(Yc,Yc.VARIANT_BORDER)==null&&b.setStyleFunction(Yc,
Yc.VARIANT_BORDER,c);b.getStyleFunction(Yc,Yc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Yc,Yc.VARIANT_BORDERLESS,d);b.getStyleFunction(Sc,Yc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Sc,Yc.CHILD_VARIANT_HEADER_RENDERER,function(f){if(f.get_backgroundSkin()==null){var g=new Za;g.set_fill(a.getSubHeadingFill());g.set_border(oc.None);g.set_width(22);g.set_height(22);g.set_minWidth(22);g.set_minHeight(22);f.set_backgroundSkin(g)}f.get_textFormat()==null&&f.set_textFormat(a.getTextFormat());
f.get_disabledTextFormat()==null&&f.set_disabledTextFormat(a.getDisabledTextFormat());f.get_secondaryTextFormat()==null&&f.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());f.get_disabledSecondaryTextFormat()==null&&f.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());f.set_paddingTop(a.smallPadding);f.set_paddingRight(a.largePadding);f.set_paddingBottom(a.smallPadding);f.set_paddingLeft(a.largePadding);f.set_gap(a.smallPadding);f.set_horizontalAlign(Wb.LEFT)})}};var Dw=function(){};
t["feathers.themes.steel.components.SteelHDividedBoxStyles"]=Dw;Dw.__name__="feathers.themes.steel.components.SteelHDividedBoxStyles";Dw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Fj,null)==null&&b.setStyleFunction(Fj,null,function(c){if(c.get_resizeDraggingSkin()==null){var d=new Za;d.set_fill(a.getThemeFill());d.set_border(oc.None);d.set_width(2);d.set_height(2);c.set_resizeDraggingSkin(d)}}))};var Fw=function(){};
t["feathers.themes.steel.components.SteelHProgressBarStyles"]=Fw;Fw.__name__="feathers.themes.steel.components.SteelHProgressBarStyles";Fw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(qm,null)==null&&b.setStyleFunction(qm,null,function(c){if(c.get_fillSkin()==null){var d=new Za;d.set_fill(a.getActiveThemeFill());d.set_disabledFill(a.getControlDisabledFill());d.set_border(a.getActiveFillBorder());d.set_disabledBorder(a.getDisabledInsetBorder());
d.set_cornerRadius(8);d.set_minWidth(8);d.set_height(8);c.set_fillSkin(d)}c.get_backgroundSkin()==null&&(d=new Za,d.set_fill(a.getInsetFill()),d.set_disabledFill(a.getDisabledInsetFill()),d.set_border(a.getInsetBorder()),d.set_disabledBorder(a.getDisabledInsetBorder()),d.set_cornerRadius(8),d.set_width(200),d.set_height(8),c.set_backgroundSkin(d))}))};var mw=function(){};t["feathers.themes.steel.components.SteelHScrollBarStyles"]=mw;mw.__name__="feathers.themes.steel.components.SteelHScrollBarStyles";
mw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ah,null)==null&&b.setStyleFunction(ah,null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new Za;f.set_fill(a.getScrollBarThumbFill());f.set_disabledFill(a.getScrollBarThumbDisabledFill());f.set_border(oc.None);var g=d?6:4;f.set_width(g);f.set_height(g);f.set_minWidth(g);f.set_minHeight(g);f.set_cornerRadius(g/2);g=new li;g.set_keepDownStateOnRollOut(!0);
g.set_backgroundSkin(f);c.set_thumbSkin(g)}d&&c.get_trackSkin()==null&&(d=new Za,d.set_fill(a.getControlFill()),d.set_disabledFill(a.getControlDisabledFill()),d.set_border(oc.None),d.set_width(12),d.set_height(12),d.set_minWidth(12),d.set_minHeight(12),c.set_trackSkin(d));c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}),b.getStyleFunction(Xb,ah.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Xb,
ah.CHILD_VARIANT_DECREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());d.set_border(oc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Jf,d.set_pointPosition(ra.LEFT),d.set_fill(ub.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(ub.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(4),
d.set_height(8),c.set_icon(d));c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}),b.getStyleFunction(Xb,ah.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Xb,ah.CHILD_VARIANT_INCREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Kc.DOWN,
a.getReversedActiveThemeFill());d.set_border(oc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Jf,d.set_pointPosition(ra.RIGHT),d.set_fill(ub.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(ub.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(4),d.set_height(8),c.set_icon(d));c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}))};
var Gw=function(){};t["feathers.themes.steel.components.SteelHSliderStyles"]=Gw;Gw.__name__="feathers.themes.steel.components.SteelHSliderStyles";Gw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ln,null)==null&&b.setStyleFunction(Ln,null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new Xb;f.set_styleProvider(null);f.set_keepDownStateOnRollOut(!0);var g=new xi;g.set_fill(a.getButtonFill());
g.set_disabledFill(a.getButtonDisabledFill());g.setFillForState(Kc.DOWN,a.getButtonDownFill());g.set_border(a.getButtonBorder());g.set_disabledBorder(a.getButtonDisabledBorder());d?(g.set_width(20),g.set_height(20)):(g.set_width(24),g.set_height(24));f.set_backgroundSkin(g);d=new xi;d.set_fill(ub.None);d.set_border(a.getFocusBorder());f.set_focusRectSkin(d);c.set_thumbSkin(f)}c.get_trackSkin()==null&&(f=new yi,f.set_fill(a.getActiveThemeFill()),f.set_disabledFill(a.getControlDisabledFill()),f.set_border(a.getActiveFillBorder()),
f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ra.LEFT),f.set_width(100),f.set_height(8),c.set_trackSkin(f),c.get_secondaryTrackSkin()==null&&(f=new yi,f.set_fill(a.getInsetFill()),f.set_disabledFill(a.getDisabledInsetFill()),f.set_border(a.getInsetBorder()),f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ra.RIGHT),f.set_width(100),f.set_height(8),c.set_secondaryTrackSkin(f)))}))};var Ew=function(){};
t["feathers.themes.steel.components.SteelHeaderStyles"]=Ew;Ew.__name__="feathers.themes.steel.components.SteelHeaderStyles";Ew.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Mi,null)==null&&b.setStyleFunction(Mi,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getHeaderFill());f.set_border(oc.None);d?(f.set_width(32),f.set_height(32),f.set_minHeight(32)):(f.set_width(44),
f.set_height(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getHeaderTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledHeaderTextFormat());d?(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding),c.set_minGap(a.mediumPadding)):(c.set_paddingTop(a.largePadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.largePadding),
c.set_paddingLeft(a.largePadding),c.set_minGap(a.largePadding))}))};var Vk=function(){};t["feathers.themes.steel.components.SteelHierarchicalItemRendererStyles"]=Vk;Vk.__name__="feathers.themes.steel.components.SteelHierarchicalItemRendererStyles";Vk.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(If,null)==null&&b.setStyleFunction(If,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=
new Tl;f.set_fill(a.getContainerFill());f.set_border(a.getDividerBorder());f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Yb.DOWN(!1),a.getActiveThemeFill());d?(f.set_width(26),f.set_height(26),f.set_minWidth(26),f.set_minHeight(26)):(f.set_width(44),f.set_height(44),f.set_minWidth(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==
null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding);c.set_indentation(20);c.set_horizontalAlign(Wb.LEFT)}),b.getStyleFunction(hd,If.CHILD_VARIANT_DISCLOSURE_BUTTON)==null&&b.setStyleFunction(hd,If.CHILD_VARIANT_DISCLOSURE_BUTTON,
function(c){var d=pc.isDesktop();if(c.get_icon()==null){var f=new Jm;c.set_icon(f);c=new Hd;Vk.drawDisclosureClosedIcon(c,a.textColor,d);f.set_defaultView(c);c=new Hd;Vk.drawDisclosureClosedIcon(c,a.disabledTextColor,d);f.set_disabledView(c);c=new Hd;Vk.drawDisclosureOpenIcon(c,a.textColor,d);f.set_selectedView(c);c=new Hd;Vk.drawDisclosureOpenIcon(c,a.disabledTextColor,d);f.setViewForState(Yb.DISABLED(!0),c)}}))};Vk.drawDisclosureClosedIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);
c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(12,8),a.get_graphics().lineTo(4,12)):(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(16,10),a.get_graphics().lineTo(4,16));a.get_graphics().lineTo(4,4);a.get_graphics().endFill()};Vk.drawDisclosureOpenIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,
0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(12,4),a.get_graphics().lineTo(8,12)):(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(16,4),a.get_graphics().lineTo(10,16));a.get_graphics().lineTo(4,4);a.get_graphics().endFill()};var Hw=function(){};t["feathers.themes.steel.components.SteelItemRendererStyles"]=Hw;Hw.__name__="feathers.themes.steel.components.SteelItemRendererStyles";Hw.initialize=function(a){if(a==null){var b=
bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Sc,null)==null&&b.setStyleFunction(Sc,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Tl;f.set_fill(a.getContainerFill());f.set_border(a.getDividerBorder());f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Yb.DOWN(!1),a.getActiveThemeFill());d?(f.set_width(26),f.set_height(26),f.set_minWidth(26),f.set_minHeight(26)):(f.set_width(44),f.set_height(44),f.set_minWidth(44),
f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);
c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding);c.set_horizontalAlign(Wb.LEFT)}))};var Iw=function(){};t["feathers.themes.steel.components.SteelLabelStyles"]=Iw;Iw.__name__="feathers.themes.steel.components.SteelLabelStyles";Iw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ia,null)==null&&b.setStyleFunction(ia,null,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}),b.getStyleFunction(ia,ia.VARIANT_HEADING)==null&&b.setStyleFunction(ia,ia.VARIANT_HEADING,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getHeaderTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledHeaderTextFormat())}),b.getStyleFunction(ia,ia.VARIANT_DETAIL)==null&&b.setStyleFunction(ia,ia.VARIANT_DETAIL,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getDetailTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledDetailTextFormat())}),b.getStyleFunction(ia,ia.VARIANT_DANGER)==null&&b.setStyleFunction(ia,ia.VARIANT_DANGER,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getDangerTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}))};var Jw=function(){};t["feathers.themes.steel.components.SteelLayoutGroupItemRendererStyles"]=Jw;Jw.__name__="feathers.themes.steel.components.SteelLayoutGroupItemRendererStyles";
Jw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Nl,null)==null&&b.setStyleFunction(Nl,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Tl;f.set_fill(a.getContainerFill());f.set_border(a.getDividerBorder());f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Yb.DOWN(!1),a.getActiveThemeFill());d?(f.set_width(26),f.set_height(26),f.set_minWidth(26),f.set_minHeight(26)):
(f.set_width(44),f.set_height(44),f.set_minWidth(44),f.set_minHeight(44));c.set_backgroundSkin(f)}}))};var Xv=function(){};t["feathers.themes.steel.components.SteelLayoutGroupStyles"]=Xv;Xv.__name__="feathers.themes.steel.components.SteelLayoutGroupStyles";Xv.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(pb,pb.VARIANT_TOOL_BAR)==null&&b.setStyleFunction(pb,pb.VARIANT_TOOL_BAR,function(c){var d=pc.isDesktop();
if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getHeaderFill());f.set_border(oc.None);d?(f.set_width(32),f.set_height(32),f.set_minHeight(32)):(f.set_width(44),f.set_height(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_layout()==null&&(d=new zg,d.set_horizontalAlign(Wb.LEFT),d.set_verticalAlign(hc.MIDDLE),d.set_paddingTop(a.smallPadding),d.set_paddingRight(a.largePadding),d.set_paddingBottom(a.smallPadding),d.set_paddingLeft(a.largePadding),d.set_gap(a.smallPadding),c.set_layout(d))}))};
var Kw=function(){};t["feathers.themes.steel.components.SteelListViewStyles"]=Kw;Kw.__name__="feathers.themes.steel.components.SteelListViewStyles";Kw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}if(a!=null){var c=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),
g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.get_dragDropIndicatorSkin()==null&&(g=new Za,g.set_fill(a.getActiveThemeFill()),g.set_border(oc.None),g.set_width(2),g.set_height(2),f.set_dragDropIndicatorSkin(g));f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=
pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(oc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(Fc,null)==null&&b.setStyleFunction(Fc,null,function(f){pc.isDesktop()?
c(f):d(f)});b.getStyleFunction(Fc,Fc.VARIANT_BORDER)==null&&b.setStyleFunction(Fc,Fc.VARIANT_BORDER,c);b.getStyleFunction(Fc,Fc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Fc,Fc.VARIANT_BORDERLESS,d);b.getStyleFunction(Fc,Fc.VARIANT_POP_UP)==null&&b.setStyleFunction(Fc,Fc.VARIANT_POP_UP,function(f){if(f.get_layout()==null){var g=new yh;g.set_requestedMinRowCount(1);g.set_requestedMaxRowCount(5);f.set_layout(g)}c(f)})}};var Lw=function(){};t["feathers.themes.steel.components.SteelNumericStepperStyles"]=
Lw;Lw.__name__="feathers.themes.steel.components.SteelNumericStepperStyles";Lw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Xb,sd.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Xb,sd.CHILD_VARIANT_DECREMENT_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new yi;f.set_cornerRadiusPosition(ra.LEFT);f.set_drawBaseBorder(!1);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());
f.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Kc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);f.set_minWidth(22);f.set_minHeight(22);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),
c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(a.smallPadding)}),b.getStyleFunction(Xb,sd.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Xb,sd.CHILD_VARIANT_INCREMENT_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new yi;f.set_cornerRadiusPosition(ra.RIGHT);f.set_drawBaseBorder(!1);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());
f.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Kc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);f.set_minWidth(22);f.set_minHeight(22);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),
c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(a.smallPadding)}),b.getStyleFunction(rd,sd.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(rd,sd.CHILD_VARIANT_TEXT_INPUT,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_width(3);f.set_fill(a.getInsetFill());f.set_disabledFill(a.getDisabledInsetFill());f.set_border(a.getInsetBorder());
f.set_disabledBorder(a.getDisabledInsetBorder());f.setBorderForState(Fe.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),
c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}))};var Mw=function(){};t["feathers.themes.steel.components.SteelPageIndicatorStyles"]=Mw;Mw.__name__="feathers.themes.steel.components.SteelPageIndicatorStyles";Mw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(eh,null)==null&&b.setStyleFunction(eh,null,function(c){if(c.get_focusRectSkin()==null){var d=
new Za;d.set_fill(ub.None);d.set_border(a.getFocusBorder());d.set_cornerRadius(3);c.set_focusRectSkin(d)}c.get_layout()==null&&(d=new zg,d.set_gap(a.largePadding),d.set_paddingTop(a.smallPadding),d.set_paddingRight(a.smallPadding),d.set_paddingBottom(a.smallPadding),d.set_paddingLeft(a.smallPadding),d.set_horizontalAlign(Wb.CENTER),d.set_verticalAlign(hc.MIDDLE),c.set_layout(d))}),b.getStyleFunction(hd,eh.CHILD_VARIANT_TOGGLE_BUTTON)==null&&b.setStyleFunction(hd,eh.CHILD_VARIANT_TOGGLE_BUTTON,function(c){if(c.get_backgroundSkin()==
null){var d=new xi;d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.set_selectedFill(a.getThemeFill());d.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());d.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.set_selectedBorder(a.getSelectedInsetBorder());d.setBorderForState(Yb.DOWN(!1),a.getActiveFillBorder());d.set_minWidth(10);d.set_minHeight(10);c.set_backgroundSkin(d)}}))};
var Nw=function(){};t["feathers.themes.steel.components.SteelPageNavigatorStyles"]=Nw;Nw.__name__="feathers.themes.steel.components.SteelPageNavigatorStyles";Nw.initialize=function(a){a==null&&(a=bc.get_fallbackTheme(),a=a instanceof zc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Ch,null)==null&&a.setStyleFunction(Ch,null,function(b){b.set_pageIndicatorPosition(ra.BOTTOM);b.set_previousTransition((new pj).setRight().build());b.set_nextTransition((new pj).setLeft().build())}))};var pw=function(){};
t["feathers.themes.steel.components.SteelPanelStyles"]=pw;pw.__name__="feathers.themes.steel.components.SteelPanelStyles";pw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Uc,null)==null&&b.setStyleFunction(Uc,null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=new Za,d.set_fill(a.getContainerFill()),d.set_border(oc.None),c.set_backgroundSkin(d));
c.get_scrollBarsCornerSkin()==null&&(d=new Za,d.set_fill(a.getContainerFill()),d.set_border(oc.None),c.set_scrollBarsCornerSkin(d))}))};var Fn=function(){};t["feathers.themes.steel.components.SteelPopUpDatePickerStyles"]=Fn;Fn.__name__="feathers.themes.steel.components.SteelPopUpDatePickerStyles";Fn.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Xb,Xd.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Xb,Xd.CHILD_VARIANT_BUTTON,
function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new yi;f.set_cornerRadiusPosition(ra.RIGHT);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());f.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Kc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);c.set_backgroundSkin(f)}c.get_icon()==null&&(f=new Hd,Fn.drawIcon(f,a.textColor),c.set_icon(f),
c.getIconForState(Kc.DISABLED)==null&&(f=new Hd,Fn.drawIcon(f,a.disabledTextColor),c.setIconForState(Kc.DISABLED,f)));d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(a.smallPadding)}),b.getStyleFunction(rd,Xd.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(rd,
Xd.CHILD_VARIANT_TEXT_INPUT,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new yi;f.set_cornerRadiusPosition(ra.LEFT);f.set_cornerRadius(3);f.set_drawBaseBorder(!1);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());f.set_disabledFill(a.getDisabledInsetFill());f.set_border(a.getInsetBorder());f.set_disabledBorder(a.getDisabledInsetBorder());f.setBorderForState(Fe.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());
c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}),b.getStyleFunction(Kb,Xd.CHILD_VARIANT_DATE_PICKER)==
null&&b.setStyleFunction(Kb,Xd.CHILD_VARIANT_DATE_PICKER,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());d.set_cornerRadius(4);c.set_backgroundSkin(d)}c.setPadding(a.mediumPadding);c.set_headerGap(a.xsmallPadding)}))};Fn.drawIcon=function(a,b){a.get_graphics().lineStyle(1,b);a.get_graphics().drawRect(.5,1.5,11,10);a.get_graphics().moveTo(3,.5);a.get_graphics().lineTo(3,1.5);a.get_graphics().moveTo(9,.5);a.get_graphics().lineTo(9,
1.5);a.get_graphics().lineStyle();a.get_graphics().beginFill(b);a.get_graphics().drawRect(1,2,11,2);a.get_graphics().drawRect(2,5,2,2);a.get_graphics().drawRect(5,5,2,2);a.get_graphics().drawRect(8,5,2,2);a.get_graphics().drawRect(2,8,2,2);a.get_graphics().drawRect(5,8,2,2);a.get_graphics().drawRect(8,8,2,2);a.get_graphics().endFill()};var Ow=function(){};t["feathers.themes.steel.components.SteelPopUpListViewStyles"]=Ow;Ow.__name__="feathers.themes.steel.components.SteelPopUpListViewStyles";Ow.initialize=
function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ce,null)==null&&b.setStyleFunction(ce,null,function(c){pc.isDesktop()&&c.set_popUpAdapter(new Xk)}),b.getStyleFunction(Xb,ce.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Xb,ce.CHILD_VARIANT_BUTTON,function(c){a.styleProvider.getStyleFunction(Xb,null)(c);c.set_horizontalAlign(Wb.LEFT);c.set_gap(1/0);c.set_minGap(a.mediumPadding);if(c.get_icon()==null){var d=new Jf;d.set_pointPosition(ra.BOTTOM);
d.set_fill(ub.SolidColor(a.textColor));d.set_disabledFill(ub.SolidColor(a.disabledTextColor));d.set_width(8);d.set_height(4);c.set_icon(d)}c.set_iconPosition(ra.RIGHT)}),b.getStyleFunction(Fc,ce.CHILD_VARIANT_LIST_VIEW)==null&&b.setStyleFunction(Fc,ce.CHILD_VARIANT_LIST_VIEW,function(c){a.styleProvider.getStyleFunction(Fc,Fc.VARIANT_POP_UP)(c)}))};var Pw=function(){};t["feathers.themes.steel.components.SteelRadioStyles"]=Pw;Pw.__name__="feathers.themes.steel.components.SteelRadioStyles";Pw.initialize=
function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(oj,null)==null&&b.setStyleFunction(oj,null,function(c){var d=pc.isDesktop();c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(ub.SolidColor(0,0));f.set_border(oc.None);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new Jm;
c.set_icon(f);var g=new xi;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Yb.DOWN(!1),a.getSelectedInsetBorder());g.set_fill(a.getInsetFill());g.set_disabledFill(a.getDisabledInsetFill());f.set_defaultView(g);g=new xi;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),
g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getSelectedInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Yb.DOWN(!0),a.getSelectedInsetBorder());g.set_fill(a.getReversedActiveThemeFill());g.set_disabledFill(a.getDisabledInsetFill());var h=new Hd;h.get_graphics().beginFill(a.textColor);d?h.get_graphics().drawCircle(8,8,3):h.get_graphics().drawCircle(10,10,4);h.get_graphics().endFill();g.addChild(h);f.set_selectedView(g);d=new xi;d.set_width(20);
d.set_height(20);d.set_minWidth(20);d.set_minHeight(20);d.set_border(a.getDisabledInsetBorder(2));d.set_fill(a.getDisabledInsetFill());g=new Hd;g.get_graphics().beginFill(a.disabledTextColor);g.get_graphics().drawCircle(10,10,4);g.get_graphics().endFill();d.addChild(g);f.setViewForState(Yb.DISABLED(!0),d)}c.get_focusRectSkin()==null&&(f=new Za,f.set_fill(ub.None),f.set_border(a.getFocusBorder()),f.set_cornerRadius(3),c.set_focusRectSkin(f),c.set_focusPaddingTop(3),c.set_focusPaddingRight(3),c.set_focusPaddingBottom(3),
c.set_focusPaddingLeft(3));c.set_horizontalAlign(Wb.LEFT);c.set_gap(a.smallPadding)}))};var Qw=function(){};t["feathers.themes.steel.components.SteelRouterNavigatorStyles"]=Qw;Qw.__name__="feathers.themes.steel.components.SteelRouterNavigatorStyles";Qw.initialize=function(a){a==null&&(a=bc.get_fallbackTheme(),a=a instanceof zc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Rn,null)==null&&a.setStyleFunction(Rn,null,function(b){b.set_backTransition((new pj).setRight().build());b.set_forwardTransition((new pj).setLeft().build())}))};
var ow=function(){};t["feathers.themes.steel.components.SteelScrollContainerStyles"]=ow;ow.__name__="feathers.themes.steel.components.SteelScrollContainerStyles";ow.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(je,null)==null&&b.setStyleFunction(je,null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=new Za,d.set_fill(a.getContainerFill()),
d.set_border(oc.None),c.set_backgroundSkin(d));c.get_scrollBarsCornerSkin()==null&&(d=new Za,d.set_fill(a.getContainerFill()),d.set_border(oc.None),c.set_scrollBarsCornerSkin(d));c.get_focusRectSkin()==null&&(d=new Za,d.set_fill(ub.None),d.set_border(a.getFocusBorder()),c.set_focusRectSkin(d))}))};var Ky=function(){};t["feathers.themes.steel.components.SteelSortOrderHeaderRendererStyles"]=Ky;Ky.__name__="feathers.themes.steel.components.SteelSortOrderHeaderRendererStyles";Ky.initialize=function(a){if(a==
null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Zk,null)==null&&b.setStyleFunction(Zk,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getSubHeadingFill());f.set_border(oc.None);d?(f.set_width(22),f.set_height(22),f.set_minWidth(22),f.set_minHeight(22)):(f.set_width(44),f.set_height(44),f.set_minWidth(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_sortAscendingIcon()==null&&(d=new Jf,
d.set_pointPosition(ra.TOP),d.set_fill(ub.SolidColor(a.textColor)),d.set_disabledFill(ub.SolidColor(a.disabledTextColor)),d.set_width(8),d.set_height(4),c.set_sortAscendingIcon(d));c.get_sortDescendingIcon()==null&&(d=new Jf,d.set_pointPosition(ra.BOTTOM),d.set_fill(ub.SolidColor(a.textColor)),d.set_disabledFill(ub.SolidColor(a.disabledTextColor)),d.set_width(8),d.set_height(4),c.set_sortDescendingIcon(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&
c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding);c.set_horizontalAlign(Wb.LEFT)}))};var Rw=function(){};t["feathers.themes.steel.components.SteelStackNavigatorStyles"]=
Rw;Rw.__name__="feathers.themes.steel.components.SteelStackNavigatorStyles";Rw.initialize=function(a){a==null&&(a=bc.get_fallbackTheme(),a=a instanceof zc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Sn,null)==null&&a.setStyleFunction(Sn,null,function(b){b.set_popTransition((new pj).setRight().build());b.set_pushTransition((new pj).setLeft().build())}))};var Sw=function(){};t["feathers.themes.steel.components.SteelTabBarStyles"]=Sw;Sw.__name__="feathers.themes.steel.components.SteelTabBarStyles";
Sw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Oe,null)==null&&b.setStyleFunction(Oe,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_fill(a.getControlFill());f.set_disabledFill(a.getControlDisabledFill());f.set_border(oc.None);c.set_backgroundSkin(f)}c.get_focusRectSkin()==null&&(f=new Za,f.set_fill(ub.None),f.set_border(a.getFocusBorder()),c.set_focusRectSkin(f));
c.get_layout()==null&&(f=new zg,d||f.set_horizontalAlign(Wb.CENTER),c.set_layout(f))}),b.getStyleFunction(hd,Oe.CHILD_VARIANT_TAB)==null&&b.setStyleFunction(hd,Oe.CHILD_VARIANT_TAB,function(c){var d=pc.isDesktop();c.get_backgroundSkin()==null&&(d?(d=new yi,d.set_cornerRadius(3),d.set_cornerRadiusPosition(ra.TOP),d.set_drawBaseBorder(!1),d.set_maxWidth(100),d.set_minWidth(20)):(d=new Za,d.set_minWidth(44),d.set_minHeight(44)),d.set_fill(a.getButtonFill()),d.set_disabledFill(a.getButtonDisabledFill()),
d.set_selectedFill(a.getThemeFill()),d.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill()),d.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill()),d.set_border(a.getButtonBorder()),d.set_disabledBorder(a.getButtonDisabledBorder()),d.set_selectedBorder(a.getActiveFillBorder()),d.setBorderForState(Yb.DOWN(!1),a.getActiveFillBorder()),c.set_backgroundSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());
c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}))};var Tw=function(){};t["feathers.themes.steel.components.SteelTabNavigatorStyles"]=Tw;Tw.__name__="feathers.themes.steel.components.SteelTabNavigatorStyles";Tw.initialize=function(a){a==null&&(a=bc.get_fallbackTheme(),a=a instanceof zc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(bh,null)==null&&a.setStyleFunction(bh,null,
function(b){var c=pc.isDesktop();b.set_tabBarPosition(c?ra.TOP:ra.BOTTOM);c||(b.set_previousTransition((new pj).setRight().build()),b.set_nextTransition((new pj).setLeft().build()))}))};var Uw=function(){};t["feathers.themes.steel.components.SteelTextAreaStyles"]=Uw;Uw.__name__="feathers.themes.steel.components.SteelTextAreaStyles";Uw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(tf,null)==null&&b.setStyleFunction(tf,
null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);if(c.get_backgroundSkin()==null){var f=new Za;f.set_cornerRadius(3);d?(f.set_width(120),f.set_height(100)):(f.set_width(160),f.set_height(120));f.set_fill(a.getInsetFill());f.set_border(a.getInsetBorder());f.setBorderForState(Fe.FOCUSED,a.getThemeBorder());f.setBorderForState(Fe.ERROR,a.getDangerBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);c.set_paddingLeft(a.borderThickness);d?(c.set_textPaddingTop(a.smallPadding),c.set_textPaddingRight(a.mediumPadding),c.set_textPaddingBottom(a.smallPadding+1),c.set_textPaddingLeft(a.mediumPadding)):(c.set_textPaddingTop(a.mediumPadding),c.set_textPaddingRight(a.largePadding),
c.set_textPaddingBottom(a.mediumPadding+1),c.set_textPaddingLeft(a.largePadding))}),b.getStyleFunction(Ye,tf.CHILD_VARIANT_ERROR_CALLOUT)==null&&b.setStyleFunction(Ye,tf.CHILD_VARIANT_ERROR_CALLOUT,function(c){a.styleProvider.getStyleFunction(Ye,Ye.VARIANT_DANGER)(c)}))};var Vw=function(){};t["feathers.themes.steel.components.SteelTextCalloutStyles"]=Vw;Vw.__name__="feathers.themes.steel.components.SteelTextCalloutStyles";Vw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof
zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ye,null)==null&&b.setStyleFunction(Ye,null,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.TOP),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),
d.set_border(a.getContainerBorder()),d.set_width(10),d.set_height(6),c.set_topArrowSkin(d));c.get_rightArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.RIGHT),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(6),d.set_height(10),c.set_rightArrowSkin(d));c.get_bottomArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.BOTTOM),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(10),d.set_height(6),
c.set_bottomArrowSkin(d));c.get_leftArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.LEFT),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(6),d.set_height(10),c.set_leftArrowSkin(d));c.set_topArrowGap(-a.borderThickness);c.set_rightArrowGap(-a.borderThickness);c.set_bottomArrowGap(-a.borderThickness);c.set_leftArrowGap(-a.borderThickness);c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);
c.set_paddingLeft(a.borderThickness);c.set_marginTop(a.xlargePadding);c.set_marginRight(a.xlargePadding);c.set_marginBottom(a.xlargePadding);c.set_marginLeft(a.xlargePadding)}),b.getStyleFunction(Ye,Ye.VARIANT_DANGER)==null&&b.setStyleFunction(Ye,Ye.VARIANT_DANGER,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getDangerFill());
d.set_border(a.getDangerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.TOP),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(10),d.set_height(6),c.set_topArrowSkin(d));c.get_rightArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.RIGHT),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(6),d.set_height(10),c.set_rightArrowSkin(d));c.get_bottomArrowSkin()==
null&&(d=new Jf,d.set_pointPosition(ra.BOTTOM),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(10),d.set_height(6),c.set_bottomArrowSkin(d));c.get_leftArrowSkin()==null&&(d=new Jf,d.set_pointPosition(ra.LEFT),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(6),d.set_height(10),c.set_leftArrowSkin(d));c.set_topArrowGap(-a.borderThickness);c.set_rightArrowGap(-a.borderThickness);c.set_bottomArrowGap(-a.borderThickness);
c.set_leftArrowGap(-a.borderThickness);c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);c.set_paddingLeft(a.borderThickness);c.set_marginTop(a.xlargePadding);c.set_marginRight(a.xlargePadding);c.set_marginBottom(a.xlargePadding);c.set_marginLeft(a.xlargePadding)}))};var Ww=function(){};t["feathers.themes.steel.components.SteelTextInputStyles"]=Ww;Ww.__name__="feathers.themes.steel.components.SteelTextInputStyles";Ww.initialize=function(a){if(a==
null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(rd,null)==null&&b.setStyleFunction(rd,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Za;f.set_cornerRadius(3);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());f.set_border(a.getInsetBorder());f.set_disabledFill(a.getDisabledInsetFill());f.setBorderForState(Fe.FOCUSED,a.getThemeBorder());f.setBorderForState(Fe.ERROR,a.getDangerBorder());c.set_backgroundSkin(f)}c.get_textFormat()==
null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}),b.getStyleFunction(rd,
rd.VARIANT_SEARCH)==null&&b.setStyleFunction(rd,rd.VARIANT_SEARCH,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Dt;f.set_capDirection(nj.HORIZONTAL);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());f.set_border(a.getInsetBorder());f.set_disabledFill(a.getDisabledInsetFill());f.setBorderForState(Fe.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());
c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding));c.set_paddingLeft(a.largePadding)}),b.getStyleFunction(Ye,rd.CHILD_VARIANT_ERROR_CALLOUT)==null&&b.setStyleFunction(Ye,rd.CHILD_VARIANT_ERROR_CALLOUT,function(c){a.styleProvider.getStyleFunction(Ye,Ye.VARIANT_DANGER)(c)}))};
var Xw=function(){};t["feathers.themes.steel.components.SteelToggleButtonStyles"]=Xw;Xw.__name__="feathers.themes.steel.components.SteelToggleButtonStyles";Xw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(hd,null)==null&&b.setStyleFunction(hd,null,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.set_selectedFill(a.getThemeFill());
d.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_selectedBorder(a.getSelectedBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.setBorderForState(Yb.DOWN(!1),a.getActiveFillBorder());d.setBorderForState(Yb.DOWN(!0),a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new Za,d.set_fill(ub.None),d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==
null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}))};var Yw=function(){};t["feathers.themes.steel.components.SteelToggleSwitchStyles"]=Yw;Yw.__name__="feathers.themes.steel.components.SteelToggleSwitchStyles";Yw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();
a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Mk,null)==null&&b.setStyleFunction(Mk,null,function(c){var d=pc.isDesktop();if(c.get_trackSkin()==null){var f=new Za;d?(f.set_width(48),f.set_height(24),f.set_minWidth(48),f.set_minHeight(24),f.set_cornerRadius(12)):(f.set_width(64),f.set_height(32),f.set_minWidth(64),f.set_minHeight(32),f.set_cornerRadius(16));f.set_border(a.getInsetBorder());f.set_disabledBorder(a.getInsetBorder());f.set_selectedBorder(a.getSelectedInsetBorder());
f.set_fill(a.getInsetFill());f.set_selectedFill(a.getReversedActiveThemeFill());f.set_disabledFill(a.getDisabledInsetFill());var g=new si;g.set_toggleable(!1);g.set_keepDownStateOnRollOut(!0);g.set_backgroundSkin(f);c.set_trackSkin(g)}c.get_thumbSkin()==null&&(f=new xi,d?(f.set_width(24),f.set_height(24),f.set_minWidth(24),f.set_minHeight(24)):(f.set_width(32),f.set_height(32),f.set_minWidth(32),f.set_minHeight(32)),f.set_border(a.getBorder()),f.set_disabledBorder(a.getBorder()),f.set_fill(a.getButtonFill()),
f.set_disabledFill(a.getButtonDisabledFill()),g=new si,g.set_toggleable(!1),g.set_keepDownStateOnRollOut(!0),g.set_backgroundSkin(f),c.set_thumbSkin(g));c.get_focusRectSkin()==null&&(f=new Za,f.set_fill(ub.None),f.set_border(a.getFocusBorder()),d?f.set_cornerRadius(12):f.set_cornerRadius(16),c.set_focusRectSkin(f))}))};var Zw=function(){};t["feathers.themes.steel.components.SteelToolTipStyles"]=Zw;Zw.__name__="feathers.themes.steel.components.SteelToolTipStyles";Zw.initialize=function(a){if(a==null){var b=
bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ia,al.CHILD_VARIANT_TOOL_TIP)==null&&b.setStyleFunction(ia,al.CHILD_VARIANT_TOOL_TIP,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_border(a.getBorder());d.set_fill(a.getContainerFill());d.set_cornerRadius(2);d.set_maxWidth(276);c.set_backgroundSkin(d)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledDetailTextFormat());
c.set_wordWrap(!0);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}))};var $w=function(){};t["feathers.themes.steel.components.SteelTreeGridViewStyles"]=$w;$w.__name__="feathers.themes.steel.components.SteelTreeGridViewStyles";$w.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}if(a!=null){var c=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);
f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&(g=new Za,g.set_fill(a.getThemeFill()),g.set_border(oc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new Za,g.set_fill(a.getSubHeadingFill()),g.set_border(oc.None),f.set_headerCornerSkin(g));
f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_showHeaderDividersOnlyWhenResizable(!0);f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==
null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(oc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&(g=new Za,g.set_fill(a.getThemeFill()),g.set_border(oc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new Za,g.set_fill(a.getSubHeadingFill()),g.set_border(oc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));
f.set_showHeaderDividersOnlyWhenResizable(!0)};b=a.styleProvider;b.getStyleFunction(Cc,null)==null&&b.setStyleFunction(Cc,null,function(f){pc.isDesktop()?c(f):d(f)});b.getStyleFunction(Cc,Cc.VARIANT_BORDER)==null&&b.setStyleFunction(Cc,Cc.VARIANT_BORDER,c);b.getStyleFunction(Cc,Cc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Cc,Cc.VARIANT_BORDERLESS,d);b.getStyleFunction(If,Cc.CHILD_VARIANT_CELL_RENDERER)==null&&b.setStyleFunction(If,Cc.CHILD_VARIANT_CELL_RENDERER,function(f){var g=pc.isDesktop();
if(f.get_backgroundSkin()==null){var h=new Za;h.set_fill(ub.SolidColor(16711935,0));h.set_border(oc.None);g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),h.set_minHeight(26)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}a.styleProvider.getStyleFunction(If,null)(f)});b.getStyleFunction(Sc,Cc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Sc,Cc.CHILD_VARIANT_HEADER_RENDERER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==
null){var h=new Za;h.set_fill(a.getSubHeadingFill());h.set_border(oc.None);g?(h.set_width(22),h.set_height(22),h.set_minWidth(22),h.set_minHeight(22)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}f.get_textFormat()==null&&f.set_textFormat(a.getTextFormat());f.get_disabledTextFormat()==null&&f.set_disabledTextFormat(a.getDisabledTextFormat());f.get_secondaryTextFormat()==null&&f.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());f.get_disabledSecondaryTextFormat()==
null&&f.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());f.set_paddingTop(a.smallPadding);f.set_paddingRight(a.largePadding);f.set_paddingBottom(a.smallPadding);f.set_paddingLeft(a.largePadding);f.set_gap(a.smallPadding);f.set_horizontalAlign(Wb.LEFT)});b.getStyleFunction(Xb,Cc.CHILD_VARIANT_HEADER_DIVIDER)==null&&b.setStyleFunction(Xb,Cc.CHILD_VARIANT_HEADER_DIVIDER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Qp;h.set_fill(ub.SolidColor(16711935,0));
h.set_border(a.getSubHeadingDividerBorder());h.setBorderForState(Kc.HOVER,a.getThemeBorder());g?(h.set_width(6),h.set_height(1),h.set_minWidth(6)):(h.set_width(10),h.set_height(1),h.set_minWidth(10));h.set_minHeight(1);f.set_backgroundSkin(h)}});b.getStyleFunction(Zf,null)==null&&b.setStyleFunction(Zf,null,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Tl;h.set_fill(a.getContainerFill());h.set_border(a.getDividerBorder());h.set_selectedFill(a.getActiveThemeFill());h.setFillForState(Yb.DOWN(!1),
a.getActiveThemeFill());g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),h.set_minHeight(26)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}})}};var ax=function(){};t["feathers.themes.steel.components.SteelTreeViewStyles"]=ax;ax.__name__="feathers.themes.steel.components.SteelTreeViewStyles";ax.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}if(a!=null){var c=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);
f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new yh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},
d=function(f){var g=pc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&f.set_layout(new yh);f.get_backgroundSkin()==null&&(g=new Za,g.set_fill(a.getContainerFill()),g.set_border(oc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new Za,g.set_fill(ub.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(fe,null)==null&&b.setStyleFunction(fe,null,function(f){pc.isDesktop()?
c(f):d(f)});b.getStyleFunction(fe,fe.VARIANT_BORDER)==null&&b.setStyleFunction(fe,fe.VARIANT_BORDER,c);b.getStyleFunction(fe,fe.VARIANT_BORDERLESS)==null&&b.setStyleFunction(fe,fe.VARIANT_BORDERLESS,d)}};var sw=function(){};t["feathers.themes.steel.components.SteelVDividedBoxStyles"]=sw;sw.__name__="feathers.themes.steel.components.SteelVDividedBoxStyles";sw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Rh,null)==
null&&b.setStyleFunction(Rh,null,function(c){if(c.get_resizeDraggingSkin()==null){var d=new Za;d.set_fill(a.getThemeFill());d.set_border(oc.None);d.set_width(2);d.set_height(2);c.set_resizeDraggingSkin(d)}}))};var bx=function(){};t["feathers.themes.steel.components.SteelVProgressBarStyles"]=bx;bx.__name__="feathers.themes.steel.components.SteelVProgressBarStyles";bx.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Nn,
null)==null&&b.setStyleFunction(Nn,null,function(c){if(c.get_fillSkin()==null){var d=new Za;d.set_fill(a.getActiveThemeFill());d.set_disabledFill(a.getControlDisabledFill());d.set_border(a.getActiveFillBorder());d.set_disabledBorder(a.getDisabledInsetBorder());d.set_cornerRadius(8);d.set_width(8);d.set_minHeight(8);c.set_fillSkin(d)}c.get_backgroundSkin()==null&&(d=new Za,d.set_fill(a.getInsetFill()),d.set_disabledFill(a.getDisabledInsetFill()),d.set_border(a.getInsetBorder()),d.set_disabledBorder(a.getDisabledInsetBorder()),
d.set_cornerRadius(8),d.set_width(8),d.set_height(200),c.set_backgroundSkin(d))}))};var nw=function(){};t["feathers.themes.steel.components.SteelVScrollBarStyles"]=nw;nw.__name__="feathers.themes.steel.components.SteelVScrollBarStyles";nw.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction($g,null)==null&&b.setStyleFunction($g,null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new Za;f.set_fill(a.getScrollBarThumbFill());
f.set_disabledFill(a.getScrollBarThumbDisabledFill());f.set_border(oc.None);var g=d?6:4;f.set_width(g);f.set_height(g);f.set_minWidth(g);f.set_minHeight(g);f.set_cornerRadius(g/2);g=new li;g.set_keepDownStateOnRollOut(!0);g.set_backgroundSkin(f);c.set_thumbSkin(g)}d&&c.get_trackSkin()==null&&(d=new Za,d.set_fill(a.getControlFill()),d.set_disabledFill(a.getControlDisabledFill()),d.set_border(oc.None),d.set_width(12),d.set_height(12),d.set_minWidth(12),d.set_minHeight(12),c.set_trackSkin(d));c.set_paddingTop(a.xsmallPadding);
c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}),b.getStyleFunction(Xb,$g.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Xb,$g.CHILD_VARIANT_DECREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());d.set_border(oc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==
null&&(d=new Jf,d.set_pointPosition(ra.TOP),d.set_fill(ub.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(ub.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(8),d.set_height(4),c.set_icon(d));c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}),b.getStyleFunction(Xb,$g.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Xb,$g.CHILD_VARIANT_INCREMENT_BUTTON,
function(c){if(c.get_backgroundSkin()==null){var d=new Za;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Kc.DOWN,a.getReversedActiveThemeFill());d.set_border(oc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Jf,d.set_pointPosition(ra.BOTTOM),d.set_fill(ub.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(ub.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(8),d.set_height(4),c.set_icon(d));
c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}))};var cx=function(){};t["feathers.themes.steel.components.SteelVSliderStyles"]=cx;cx.__name__="feathers.themes.steel.components.SteelVSliderStyles";cx.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(On,null)==null&&b.setStyleFunction(On,
null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new Xb;f.set_styleProvider(null);f.set_keepDownStateOnRollOut(!0);var g=new xi;g.set_fill(a.getButtonFill());g.set_disabledFill(a.getButtonDisabledFill());g.setFillForState(Kc.DOWN,a.getButtonDownFill());g.set_border(a.getButtonBorder());g.set_disabledBorder(a.getButtonDisabledBorder());d?(g.set_width(20),g.set_height(20)):(g.set_width(24),g.set_height(24));f.set_backgroundSkin(g);d=new xi;d.set_fill(ub.None);d.set_border(a.getFocusBorder());
f.set_focusRectSkin(d);c.set_thumbSkin(f)}c.get_trackSkin()==null&&(f=new yi,f.set_fill(a.getActiveThemeFill()),f.set_disabledFill(a.getControlDisabledFill()),f.set_border(a.getActiveFillBorder()),f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ra.BOTTOM),f.set_width(8),f.set_height(100),c.set_trackSkin(f),c.get_secondaryTrackSkin()==null&&(f=new yi,f.set_fill(a.getInsetFill()),f.set_disabledFill(a.getDisabledInsetFill()),f.set_border(a.getInsetBorder()),
f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ra.TOP),f.set_width(8),f.set_height(100),c.set_secondaryTrackSkin(f)))}))};var Kl={fromFunction:function(a){return Lc.withFunction(a)},fromClass:function(a){return Lc.withClass(a)},fromDisplayObject:function(a){return Lc.withDisplayObject(a)}},wi=function(){};t["feathers.utils.DPadFocusUtil"]=wi;wi.__name__="feathers.utils.DPadFocusUtil";wi.isBetterFocusForRelativePosition=function(a,b,c,d){var f=a.getBounds(a.stage);
a=wi.calculateMinPrimaryAxisDistanceForRelativePosition(c,f,d);if(a==Infinity)return!1;var g=wi.calculateMaxPrimaryAxisDistanceForRelativePosition(c,f,d),h=wi.calculateSecondaryAxisDistanceForRelativePosition(c,f,d),n=wi.itemsAreOnSameAxis(c,f,d),l=Infinity,q=Infinity,u=Infinity;f=!1;b!=null&&(f=b.getBounds(b.stage),l=wi.calculateMinPrimaryAxisDistanceForRelativePosition(c,f,d),q=wi.calculateMaxPrimaryAxisDistanceForRelativePosition(c,f,d),u=wi.calculateSecondaryAxisDistanceForRelativePosition(c,
f,d),f=wi.itemsAreOnSameAxis(c,f,d));if(n&&f)return a>0?a<l:!1;b=d==ra.TOP||d==ra.BOTTOM;if(n)if(b){if(a>0&&a<q)return!0}else return!0;else if(f)if(b){if(l>0&&l<g)return!1}else return!1;return 13*a*a+h*h<13*l*l+u*u};wi.calculateSecondaryAxisDistanceForRelativePosition=function(a,b,c){return c==ra.TOP||c==ra.BOTTOM?Math.abs(a.x+a.width/2-(b.x+b.width/2)):Math.abs(a.y+a.height/2-(b.y+b.height/2))};wi.calculateMaxPrimaryAxisDistanceForRelativePosition=function(a,b,c){switch(c._hx_index){case 0:if(a.get_bottom()>
b.get_bottom()||a.y>=b.get_bottom())if(a=a.get_bottom()-b.y,a>0)return a;break;case 1:if(a.x<b.x||a.get_right()<=b.x)if(a=b.get_right()-a.x,a>0)return a;break;case 2:if(a.y<b.y||a.get_bottom()<=b.y)if(a=b.get_bottom()-a.y,a>0)return a;break;case 3:if(a.get_right()>b.get_right()||a.x>=b.get_right())if(a=a.get_right()-b.x,a>0)return a}return Infinity};wi.calculateMinPrimaryAxisDistanceForRelativePosition=function(a,b,c){switch(c._hx_index){case 0:if(a.get_bottom()>b.get_bottom()||a.y>=b.get_bottom())if(a=
a.get_bottom()-b.get_bottom(),a>0)return a;break;case 1:if(a.x<b.x||a.get_right()<=b.x)if(a=b.x-a.x,a>0)return a;break;case 2:if(a.y<b.y||a.get_bottom()<=b.y)if(a=b.y-a.y,a>0)return a;break;case 3:if(a.get_right()>b.get_right()||a.x>=b.get_right())if(a=a.get_right()-b.get_right(),a>0)return a}return Infinity};wi.itemsAreOnSameAxis=function(a,b,c){return c==ra.TOP||c==ra.BOTTOM?a.x<=b.get_right()?b.x<=a.get_right():!1:a.y<=b.get_bottom()?b.y<=a.get_bottom():!1};var Yk=function(){};t["feathers.utils.DateUtil"]=
Yk;Yk.__name__="feathers.utils.DateUtil";Yk.getDaysInMonth=function(a,b){return a==1&&b!=null&&Yk.isLeapYear(b)?Yk.FEBRUARY_NUMBER_OF_DAYS_LEAP_YEAR:Yk.MONTH_NUMBER_OF_DAYS[a]};Yk.isLeapYear=function(a){return a%100==0?a%400==0:a%4==0};var pc=function(){};t["feathers.utils.DeviceUtil"]=pc;pc.__name__="feathers.utils.DeviceUtil";pc.isDesktop=function(){return w.__cast(wa,Window).matchMedia(pc.MEDIA_QUERY_DESKTOP).matches};pc.isMobile=function(){return w.__cast(wa,Window).matchMedia(pc.MEDIA_QUERY_MOBILE).matches};
var Ne=function(){};t["feathers.utils.DisplayObjectRecycler"]=Ne;Ne.__name__="feathers.utils.DisplayObjectRecycler";Ne.withClass=function(a,b,c,d){d==null&&(d=function(g){w.__implements(g,Fa)&&g.dispose()});var f=new Ne;f.create=function(){return ab.createInstance(a,[])};f.update=b;f.reset=c;f.destroy=d;return f};Ne.withFunction=function(a,b,c,d){var f=new Ne;f.create=a;f.update=b;f.reset=c;f.destroy=d;return f};Ne.withFactory=function(a,b,c){var d=new Ne;d.create=m(a,a.create);d.update=b;d.reset=
c;d.destroy=m(a,a.destroy);return d};Ne.__super__=Lc;Ne.prototype=I(Lc.prototype,{update:function(a,b){},reset:function(a,b){},__class__:Ne});var Zg=function(){};t["feathers.utils.DisplayUtil"]=Zg;Zg.__name__="feathers.utils.DisplayUtil";Zg.getDisplayObjectDepthFromStage=function(a){if(a.stage==null)return-1;for(var b=0;a.parent!=null;)a=a.parent,++b;return b};Zg.getConcatenatedScaleX=function(a){if(a==null)throw new Cb("getConcatenatedScaleX target must not be null");var b=1;do b/=a.get_scaleX(),
a=a.parent;while(a!=null&&a!=a.stage);return b};Zg.getConcatenatedScaleY=function(a){if(a==null)throw new Cb("getConcatenatedScaleY target must not be null");var b=1;do b/=a.get_scaleY(),a=a.parent;while(a!=null&&a!=a.stage);return b};Zg.getConcatenatedScale=function(a,b){if(a==null)throw new Cb("getConcatenatedScale target must not be null");var c=1,d=1;do c/=a.get_scaleX(),d/=a.get_scaleY(),a=a.parent;while(a!=null&&a!=a.stage);if(b==null)return new Ea(c,d);b.setTo(c,d);return b};var mg=function(a,
b,c){b==null&&(b=ra.LEFT);this._animatePull=null;this._savedTouchMoves=[];this._startTouch=this._startPullDistance=this._targetPullDistance=0;this._touchPointIsSimulated=this._restoreMouseChildren=!1;this._touchPointID=null;this._snapDuration=.5;this._opened=!1;this._pendingOpened=null;this._pullableEdge=ra.LEFT;this._activeBorderSize=null;this._pullDistance=0;this._maxPullDistance=null;this.simulateTouch=!1;this.ease=th.easeOut;this.minDragDistance=6;this._active=this._dragging=!1;this.enabled=!0;
qa.call(this);this.set_target(a);this.set_pullableEdge(b);this.set_maxPullDistance(c)};t["feathers.utils.EdgePuller"]=mg;mg.__name__="feathers.utils.EdgePuller";mg.__super__=qa;mg.prototype=I(qa.prototype,{enabled:null,_active:null,get_active:function(){return this._active},_dragging:null,get_dragging:function(){return this._dragging},minDragDistance:null,ease:null,simulateTouch:null,_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;
this._target!=null&&(this.cleanupAfterDrag(),this._target.removeEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownHandler)),this._target.removeEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownCaptureHandler),!0),this._target.removeEventListener("touchBegin",m(this,this.edgePuller_target_touchBeginHandler)),this._target.removeEventListener("touchBegin",m(this,this.edgePuller_target_touchBeginCaptureHandler),!0),this._target.removeEventListener("addedToStage",m(this,this.edgePuller_target_addedToStageHandler)),
this._target.removeEventListener("removedFromStage",m(this,this.edgePuller_target_removedFromStageHandler)),this.removeStageEvents());this._target=a;this._target!=null&&(this._target.addEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownHandler),!1,0,!0),this._target.addEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownCaptureHandler),!0,0,!0),this._target.addEventListener("touchBegin",m(this,this.edgePuller_target_touchBeginHandler),!1,0,!0),this._target.addEventListener("touchBegin",
m(this,this.edgePuller_target_touchBeginCaptureHandler),!0,0,!0),this._target.addEventListener("addedToStage",m(this,this.edgePuller_target_addedToStageHandler),!1,0,!0),this._target.addEventListener("removedFromStage",m(this,this.edgePuller_target_removedFromStageHandler),!1,0,!0),this.addStageEvents());return this._target},_maxPullDistance:null,get_maxPullDistance:function(){return this._maxPullDistance},set_maxPullDistance:function(a){return this._maxPullDistance==a?this._maxPullDistance:this._maxPullDistance=
a},_pullDistance:null,get_pullDistance:function(){return this._pullDistance},_activeBorderSize:null,get_activeBorderSize:function(){return this._activeBorderSize},set_activeBorderSize:function(a){return this._activeBorderSize==a?this._activeBorderSize:this._activeBorderSize=a},_pullableEdge:null,get_pullableEdge:function(){return this._pullableEdge},set_pullableEdge:function(a){return this._pullableEdge==a?this._pullableEdge:this._pullableEdge=a},_pendingOpened:null,_opened:null,get_opened:function(){return this._pendingOpened!=
null?this._pendingOpened:this._opened},set_opened:function(a){if(this._pendingOpened!=null){if(this._pendingOpened==a)return this._pendingOpened}else if(this._opened==a)return this._opened;(this._pendingOpened=a)?this.throwTo(this.getMaxPullDistance()):this.throwTo(0);return this._pendingOpened},_snapDuration:null,get_snapDuration:function(){return this._snapDuration},set_snapDuration:function(a){return this._snapDuration==a?this._snapDuration:this._snapDuration=a},_touchPointID:null,get_touchPointID:function(){return this._touchPointID},
_touchPointIsSimulated:null,get_touchPointIsSimulated:function(){return this._touchPointIsSimulated},_restoreMouseChildren:null,_startTouch:null,_startPullDistance:null,_targetPullDistance:null,_savedTouchMoves:null,_animatePull:null,setOpened:function(a){this._pendingOpened=null;if(this._opened==a)return this._opened;(this._opened=a)?Y.dispatch(this,"open"):Y.dispatch(this,"close");return this._opened},setPullDistance:function(a){if(this._pullDistance==a)return this._pullDistance;this._pullDistance=
a;Y.dispatch(this,"change");return this._pullDistance},getMaxPullDistance:function(){if(this._maxPullDistance!=null)return this._maxPullDistance;switch(this._pullableEdge._hx_index){case 0:return this._target.get_height();case 1:return this._target.get_width();case 2:return this._target.get_height();case 3:return this._target.get_width();default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}},getTouchPosition:function(a,b){switch(this._pullableEdge._hx_index){case 0:return b;
case 1:return a;case 2:return b;case 3:return a;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}},getTouchScale:function(){switch(this._pullableEdge._hx_index){case 0:return Zg.getConcatenatedScaleY(this._target);case 1:return Zg.getConcatenatedScaleX(this._target);case 2:return Zg.getConcatenatedScaleY(this._target);case 3:return Zg.getConcatenatedScaleX(this._target);default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}},isInActiveBorder:function(a,
b,c){a=new Ea(a,b);a=this._target.globalToLocal(a);switch(this._pullableEdge._hx_index){case 0:return a.y>=0?a.y<c:!1;case 1:return a.x>=this._target.get_width()-c?a.x<this._target.get_width():!1;case 2:return a.y>=this._target.get_height()-c?a.y<this._target.get_height():!1;case 3:return a.x>=0?a.x<c:!1;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}},checkMinDrag:function(a){if(this._opened)switch(this._pullableEdge._hx_index){case 0:return a<-this.minDragDistance;
case 1:return a>this.minDragDistance;case 2:return a>this.minDragDistance;case 3:return a<-this.minDragDistance;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}switch(this._pullableEdge._hx_index){case 0:return a>this.minDragDistance;case 1:return a<-this.minDragDistance;case 2:return a<-this.minDragDistance;case 3:return a>this.minDragDistance;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}},touchBegin:function(a,b,c,
d){if(this.enabled&&(!b||this.simulateTouch)&&this._touchPointID==null&&(this._opened||this._activeBorderSize==null||this.isInActiveBorder(c,d,this._activeBorderSize))){this._animatePull!=null&&(Ca.stop(this._animatePull,null,!1,!1),this._animatePull=null);this._target.stage.addEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler),!1,0,!0);this._target.stage.addEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler),!1,0,!0);this._target.stage.addEventListener("touchMove",
m(this,this.edgePuller_target_stage_touchMoveHandler),!1,0,!0);this._target.stage.addEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler),!1,0,!0);if(this._target instanceof zb){var f=this._target;this._active&&(f.mouseChildren=!1)}this._pendingOpened=null;this._touchPointID=a;this._touchPointIsSimulated=b;this._startTouch=this.getTouchPosition(c,d);this._startPullDistance=this._pullDistance;this._savedTouchMoves.length=0}},touchMove:function(a,b,c,d){this._touchPointID!=
null&&this._touchPointID==a&&this._touchPointIsSimulated==b&&(b=this.getTouchPosition(c,d),a=b-this._startTouch,c=this.getTouchScale(),a*=c,!this._dragging&&this.enabled&&this.checkMinDrag(a)&&(this._startTouch=b,a=0,this._dragging=this.startPull()),this._dragging&&(b=this.getMaxPullDistance(),c=this._startPullDistance,c=this._pullableEdge==ra.RIGHT||this._pullableEdge==ra.BOTTOM?c-a:c+a,c<0?c=0:c>b&&(c=b),this.setPullDistance(c),this._savedTouchMoves.length>60&&(this._savedTouchMoves.length=30),
this._savedTouchMoves.push(c),this._savedTouchMoves.push(Pa.getTimer())))},touchEnd:function(a,b){if(this._touchPointID!=null&&this._touchPointID==a&&this._touchPointIsSimulated==b&&(this.cleanupAfterDrag(),this._dragging)){for(var c=Pa.getTimer()-100,d=b=a=this._savedTouchMoves.length-1;a>0&&this._savedTouchMoves[d]>c;)b=d,d-=2;c=0;this._dragging&&b!=a&&(c=(this._pullDistance-this._savedTouchMoves[b-1])/(this._savedTouchMoves[a]-this._savedTouchMoves[b]));c!=0||this._dragging?this.throwWithVelocity(c):
this.completeDrag()}},startPull:function(){if(this._active)return!0;this._active=!0;if(this._opened?!Y.dispatch(this,"closing",!1,!0):!Y.dispatch(this,"opening",!1,!0))return this._dragging=this._active=!1,this.cleanupAfterDrag(),!1;if(this._target instanceof zb){var a=this._target;this._restoreMouseChildren=a.mouseChildren;a.mouseChildren=!1}Y.dispatch(this,"change");return!0},completeDrag:function(){this._dragging=!1;this.completePull()},completePull:function(){if(this._active&&!this._dragging&&
this._animatePull==null){this._active=!1;this._target instanceof zb&&(this._target.mouseChildren=this._restoreMouseChildren);var a=this._opened,b=this._pullDistance!=0;this.setOpened(b);b==a&&Y.dispatch(this,"cancel")}},addStageEvents:function(){this._target!=null&&this._target.stage!=null&&(this._target.stage.addEventListener("touchBegin",m(this,this.edgePuller_target_stage_touchBeginHandler),!1,0,!0),this._target.stage.addEventListener("mouseDown",m(this,this.edgePuller_target_stage_mouseDownHandler),
!1,0,!0))},removeStageEvents:function(){this._target!=null&&this._target.stage!=null&&(this._target.stage.removeEventListener("touchBegin",m(this,this.edgePuller_target_stage_touchBeginHandler)),this._target.stage.removeEventListener("mouseDown",m(this,this.edgePuller_target_stage_mouseDownHandler)))},cleanupAfterDrag:function(){this._touchPointID!=null&&(this._touchPointID=null,this._touchPointIsSimulated=!1,this._target.stage!=null&&(this._target.stage.removeEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler)),
this._target.stage.removeEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler)),this._target.stage.removeEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler)),this._target.stage.removeEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler))))},throwWithVelocity:function(a){var b=this.getMaxPullDistance();this.throwTo(Math.abs(a)<=mg.MINIMUM_VELOCITY?this._pullDistance<b/2?0:b:a<0?0:b)},throwTo:function(a){var b=this;a!=null&&(this._animatePull!=
null&&(Ca.stop(this._animatePull,null,!1,!1),this._animatePull=null),this._pullDistance!=a?this.startPull()&&(this._startPullDistance=this._pullDistance,this._targetPullDistance=a,this._snapDuration>0?(this._animatePull=Ca.update(function(c){return b.setPullDistance(c)},this._snapDuration,[this._startPullDistance],[this._targetPullDistance],!0),this._animatePull.ease(this.ease),this._animatePull.onComplete(m(this,this.animatePull_onComplete))):(this.setPullDistance(this._targetPullDistance),this.completeDrag())):
this.completeDrag())},animatePull_onComplete:function(){this._animatePull=null;this.completeDrag()},edgePuller_target_addedToStageHandler:function(a){this.addStageEvents()},edgePuller_target_removedFromStageHandler:function(a){this.removeStageEvents();this.cleanupAfterDrag()},edgePuller_target_touchBeginCaptureHandler:function(a){this._active&&(a.stopImmediatePropagation(),this.edgePuller_target_touchBeginHandler(a))},edgePuller_target_touchBeginHandler:function(a){this.simulateTouch&&a.isPrimaryTouchPoint||
this.touchBegin(a.touchPointID,!1,a.stageX,a.stageY)},edgePuller_target_mouseDownCaptureHandler:function(a){this._active&&(a.stopImmediatePropagation(),this.edgePuller_target_mouseDownHandler(a))},edgePuller_target_mouseDownHandler:function(a){this._opened||(a=this._target.stage,a!=null&&this.touchBegin(mg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY()))},edgePuller_target_stage_touchMoveHandler:function(a){this.touchMove(a.touchPointID,!1,a.stageX,a.stageY)},edgePuller_target_stage_mouseMoveHandler:function(a){a=
w.__cast(a.currentTarget,gd);this.touchMove(mg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},edgePuller_target_stage_touchEndHandler:function(a){this.touchEnd(a.touchPointID,!1)},edgePuller_target_stage_mouseUpHandler:function(a){this.touchEnd(mg.POINTER_ID_MOUSE,!0)},edgePuller_target_stage_touchBeginHandler:function(a){if(this._opened&&this.enabled&&this._touchPointID==null){var b=w.__cast(a.currentTarget,gd),c=this.getMaxPullDistance();this.isInActiveBorder(a.stageX,a.stageY,c)?this.touchBegin(a.touchPointID,
!1,a.stageX,a.stageY):(this._touchPointID=a.touchPointID,b.addEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler2),!1,0,!0),b.addEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler2),!1,0,!0))}},edgePuller_target_stage_touchMoveHandler2:function(a){if(this._touchPointID!=null&&a.touchPointID==this._touchPointID){var b=w.__cast(a.currentTarget,gd),c=this.getMaxPullDistance(),d=new Ea(a.stageX,a.stageY);d=this._target.globalToLocal(d);switch(this._pullableEdge._hx_index){case 0:if(d.y>
c||d.y<0)return;break;case 1:if(d.x<this._target.get_width()-c||d.x>this._target.get_width())return;break;case 2:if(d.y<this._target.get_height()-c||d.y>this._target.get_height())return;break;case 3:if(d.x>c||d.x<0)return;break;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}b.removeEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler2));b.removeEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler2));this._touchPointID=
null;this._touchPointIsSimulated=!1;this.touchBegin(a.touchPointID,!1,a.stageX,a.stageY)}},edgePuller_target_stage_touchEndHandler2:function(a){this._touchPointID!=null&&a.touchPointID==this._touchPointID&&(a=w.__cast(a.currentTarget,gd),a.removeEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler2)),a.removeEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler2)),this._touchPointID=null,this._touchPointIsSimulated=!1)},edgePuller_target_stage_mouseDownHandler:function(a){if(this._opened&&
this.enabled&&this._touchPointID==null&&this.simulateTouch){a=w.__cast(a.currentTarget,gd);var b=this.getMaxPullDistance();this.isInActiveBorder(a.get_mouseX(),a.get_mouseY(),b)?this.touchBegin(mg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY()):(this._touchPointID=mg.POINTER_ID_MOUSE,this._touchPointIsSimulated=!0,a.addEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler2),!1,0,!0),a.addEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler2),!1,0,
!0))}},edgePuller_target_stage_mouseMoveHandler2:function(a){if(this._touchPointIsSimulated&&this._touchPointID!=null&&mg.POINTER_ID_MOUSE==this._touchPointID){a=w.__cast(a.currentTarget,gd);var b=this.getMaxPullDistance(),c=new Ea(a.get_mouseX(),a.get_mouseY());c=this._target.globalToLocal(c);switch(this._pullableEdge._hx_index){case 0:if(c.y>b||c.y<0)return;break;case 1:if(c.x<this._target.get_width()-b||c.x>this._target.get_width())return;break;case 2:if(c.y<this._target.get_height()-b||c.y>this._target.get_height())return;
break;case 3:if(c.x>b||c.x<0)return;break;default:throw new Cb("Unknown pullable edge position: "+H.string(this._pullableEdge));}a.removeEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler2));a.removeEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler2));this._touchPointID=null;this._touchPointIsSimulated=!1;this.touchBegin(mg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())}},edgePuller_target_stage_mouseUpHandler2:function(a){this._touchPointIsSimulated&&
this._touchPointID!=null&&mg.POINTER_ID_MOUSE==this._touchPointID&&(a=w.__cast(a.currentTarget,gd),a.removeEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler2)),a.removeEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler2)),this._touchPointID=null,this._touchPointIsSimulated=!1)},__class__:mg,__properties__:{get_touchPointIsSimulated:"get_touchPointIsSimulated",get_touchPointID:"get_touchPointID",set_snapDuration:"set_snapDuration",get_snapDuration:"get_snapDuration",
set_opened:"set_opened",get_opened:"get_opened",set_pullableEdge:"set_pullableEdge",get_pullableEdge:"get_pullableEdge",set_activeBorderSize:"set_activeBorderSize",get_activeBorderSize:"get_activeBorderSize",get_pullDistance:"get_pullDistance",set_maxPullDistance:"set_maxPullDistance",get_maxPullDistance:"get_maxPullDistance",set_target:"set_target",get_target:"get_target",get_dragging:"get_dragging",get_active:"get_active"}});var Pd=function(a){this._touchClaims=new Od;this._mouseClaim=null;this._stageListenerCount=
0;if(a==null)throw new Cb("Stage cannot be null.");this._stage=a};t["feathers.utils.ExclusivePointer"]=Pd;Pd.__name__="feathers.utils.ExclusivePointer";Pd.forStage=function(a){if(a==null)throw new Cb("Stage cannot be null.");var b=Pd.stageToObject.h[a.__id__];if(b!=null)return b;b=new Pd(a);Pd.stageToObject.set(a,b);return b};Pd.disposeForStage=function(a){var b=Pd.stageToObject.h[a.__id__];b!=null&&(b.dispose(),Pd.stageToObject.remove(a))};Pd.prototype={_stageListenerCount:null,_stage:null,_mouseClaim:null,
_touchClaims:null,claimTouch:function(a,b){if(b==null)throw new Cb("Target cannot be null.");if(b.stage!=this._stage)throw new Cb("Target cannot claim a pointer on the selected stage because it appears on a different stage.");if(this._touchClaims.h[a]!=null)return!1;this._touchClaims.h[a]=b;b.addEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler),!1,0,!0);this._stageListenerCount==0&&(this._stage.addEventListener("mouseUp",m(this,this.exclusivePointer_stage_mouseUpHandler),
!1,0,!0),this._stage.addEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler),!1,0,!0));this._stageListenerCount++;return!0},claimMouse:function(a){if(a==null)throw new Cb("Target cannot be null.");if(a.stage!=this._stage)throw new Cb("Target cannot claim a pointer on the selected stage because it appears on a different stage.");if(this._mouseClaim!=null)return!1;this._mouseClaim=a;a.addEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler),
!1,0,!0);this._stageListenerCount==0&&(this._stage.addEventListener("mouseUp",m(this,this.exclusivePointer_stage_mouseUpHandler),!1,0,!0),this._stage.addEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler),!1,0,!0));this._stageListenerCount++;return!0},removeTouchClaim:function(a){var b=this._touchClaims.h[a];b!=null&&(this._touchClaims.remove(a),this.hasClaimOn(b)||b.removeEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler)),this._stageListenerCount--,
this._stageListenerCount==0&&(this._stage.removeEventListener("mouseUp",m(this,this.exclusivePointer_stage_mouseUpHandler)),this._stage.removeEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler))))},removeMouseClaim:function(){var a=this._mouseClaim;a!=null&&(this._mouseClaim=null,this.hasClaimOn(a)||a.removeEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler)),this._stageListenerCount--,this._stageListenerCount==0&&(this._stage.removeEventListener("mouseUp",
m(this,this.exclusivePointer_stage_mouseUpHandler)),this._stage.removeEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler))))},hasClaim:function(){if(this._mouseClaim!=null)return!0;for(var a=this._touchClaims.keys();a.hasNext();)return a.next(),!0;return!1},getTouchClaim:function(a){return this._touchClaims.h[a]},getMouseClaim:function(){return this._mouseClaim},removeAllClaims:function(){for(var a=this._touchClaims.keys();a.hasNext();){var b=a.next();this.removeTouchClaim(b)}this.removeMouseClaim()},
dispose:function(){this.removeAllClaims()},hasClaimOn:function(a){if(this._mouseClaim==a)return!0;for(var b=this._touchClaims,c=b.keys();c.hasNext();){var d=c.next();if(b.get(d)==a)return!0}return!1},exclusivePointer_target_removedFromStageHandler:function(a){a=w.__cast(a.currentTarget,ma);this._mouseClaim==a&&this.removeMouseClaim();for(var b=this._touchClaims,c=b.keys();c.hasNext();){var d=c.next(),f=b.get(d);f==a&&this.removeTouchClaim(d)}},exclusivePointer_stage_mouseUpHandler:function(a){this.removeMouseClaim()},
exclusivePointer_stage_touchEndHandler:function(a){this.removeTouchClaim(a.touchPointID)},__class__:Pd};var Vn=function(){};t["feathers.utils.FocusUtil"]=Vn;Vn.__name__="feathers.utils.FocusUtil";Vn.findAllFocusableObjects=function(a,b){b==null&&(b=[]);w.__implements(a,qd)&&a.get_focusEnabled()&&b.push(a);if(w.__implements(a,mi)){var c=a.get_focusExtrasBefore();if(c!=null)for(var d=0,f=c.length;d<f;){var g=d++;g=c[g];Vn.findAllFocusableObjects(g,b)}}if(w.__implements(a,qd)){if(w.__implements(a,ng)&&
a.get_childFocusEnabled())for(c=w.__cast(a,zb),d=0,f=c.get_numChildren();d<f;)g=d++,g=c.getChildAt(g),Vn.findAllFocusableObjects(g,b)}else if(a instanceof zb)for(c=a,d=0,f=c.get_numChildren();d<f;)g=d++,g=c.getChildAt(g),Vn.findAllFocusableObjects(g,b);if(w.__implements(a,mi)&&(c=a.get_focusExtrasAfter(),c!=null))for(d=0,f=c.length;d<f;)g=d++,g=c[g],Vn.findAllFocusableObjects(g,b);return b};var Dn=function(a,b,c,d){this._downKeyCode=null;this._enabled=!0;this._target=this._callback=this._upState=
this._downState=null;this.set_target(a);c!=null&&(this._upState=c);d!=null&&this.set_downState(d);this._currentState=this._upState;this.set_callback(b)};t["feathers.utils.KeyToState"]=Dn;Dn.__name__="feathers.utils.KeyToState";Dn.prototype={_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;this._target!=null&&(this._target.removeEventListener("removedFromStage",m(this,this.keyToState_target_removedFromStageHandler)),this._target.removeEventListener("focusOut",
m(this,this.keyToState_target_focusOutHandler)),this._target.removeEventListener("keyDown",m(this,this.keyToState_target_keyDownHandler)),this._target.removeEventListener("keyUp",m(this,this.keyToState_target_keyUpHandler)));this._target=a;this._target!=null&&(this._currentState=this._upState,this._target.addEventListener("removedFromStage",m(this,this.keyToState_target_removedFromStageHandler)),this._target.addEventListener("focusOut",m(this,this.keyToState_target_focusOutHandler)),this._target.addEventListener("keyDown",
m(this,this.keyToState_target_keyDownHandler)),this._target.addEventListener("keyUp",m(this,this.keyToState_target_keyUpHandler)));return this._target},_callback:null,get_callback:function(){return this._callback},set_callback:function(a){if(this._callback==a)return this._callback;this._callback=a;this._callback!=null&&this._callback(this._currentState);return this._callback},_currentState:null,get_currentState:function(){return this._currentState},_upState:null,get_upState:function(){return this._upState},
set_upState:function(a){return this._upState=a},_downState:null,get_downState:function(){return this._downState},set_downState:function(a){return this._downState=a},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){if(this._enabled==a)return this._enabled;(this._enabled=a)||this.resetKeyState();return this._enabled},_downKeyCode:null,changeState:function(a){var b=this._currentState;w.__implements(this._target,uh)&&(b=this._target.get_currentState());this._currentState=
a;b!=a&&this._callback!=null&&this._callback(a)},resetKeyState:function(){this._downKeyCode!=null&&(this._downKeyCode=null,this.changeState(this._upState))},keyToState_target_removedFromStageHandler:function(a){this.resetKeyState()},keyToState_target_focusOutHandler:function(a){this.resetKeyState()},keyToState_target_keyDownHandler:function(a){if(w.__implements(this._target,qd)){var b=this._target,c=b.get_focusManager();if(c!=null&&c.get_focus()!=b)return}!this._enabled||this._downKeyCode!=null||
a.keyCode!=32&&a.keyCode!=13||(this._downKeyCode=a.keyCode,this.changeState(this._downState))},keyToState_target_keyUpHandler:function(a){a.keyCode==this._downKeyCode&&this.resetKeyState()},__class__:Dn,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled",set_downState:"set_downState",get_downState:"get_downState",set_upState:"set_upState",get_upState:"get_upState",get_currentState:"get_currentState",set_callback:"set_callback",get_callback:"get_callback",set_target:"set_target",get_target:"get_target"}};
var We=function(){};t["feathers.utils.MathUtil"]=We;We.__name__="feathers.utils.MathUtil";We.roundDownToNearest=function(a,b){b==null&&(b=1);return b==0?a:Math.floor(We.roundToPrecision(a/b,10))*b};We.roundUpToNearest=function(a,b){b==null&&(b=1);return b==0?a:Math.ceil(We.roundToPrecision(a/b,10))*b};We.roundToNearest=function(a,b){b==null&&(b=1);return b==0?a:Math.round(We.roundToPrecision(a/b,10))*b};We.roundToPrecision=function(a,b){b==null&&(b=0);b=Math.pow(10,b);return Math.round(b*a)/b};We.fuzzyEquals=
function(a,b,c){c==null&&(c=1E-6);return Math.abs(a-b)<=c};var df=function(){};t["feathers.utils.MeasurementsUtil"]=df;df.__name__="feathers.utils.MeasurementsUtil";df.resetFluidlyWithParentValues=function(a,b,c,d,f,g,h,n){if(b!=null)if(w.__implements(b,rb)){c==null&&(c=a.width);c==null?b.resetWidth():b.set_width(c);d==null&&(d=a.height);d==null?b.resetHeight():b.set_height(d);a=f;if(a==null||b.get_explicitMinWidth()!=null&&b.get_explicitMinWidth()>a)a=b.get_explicitMinWidth();a==null&&(a=0);b.set_minWidth(a);
if(g==null||b.get_explicitMinHeight()!=null&&b.get_explicitMinHeight()>g)g=b.get_explicitMinHeight();g==null&&(g=0);b.set_minHeight(g);if(h==null||b.get_explicitMaxWidth()!=null&&b.get_explicitMaxWidth()<h)h=b.get_explicitMaxWidth();h==null&&(h=1/0);b.set_maxWidth(h);if(n==null||b.get_explicitMaxHeight()!=null&&b.get_explicitMaxHeight()<n)n=b.get_explicitMaxHeight();n==null&&(n=1/0);b.set_maxHeight(n)}else c!=null?b.set_width(c):a.width!=null&&b.set_width(a.width),d!=null?b.set_height(d):a.height!=
null&&b.set_height(a.height)};df.resetFluidlyWithParent=function(a,b,c){df.resetFluidlyWithParentValues(a,b,c.get_explicitWidth(),c.get_explicitHeight(),c.get_explicitMinWidth(),c.get_explicitMinHeight(),c.get_explicitMaxWidth(),c.get_explicitMaxHeight())};var Ft=R["feathers.utils._Path2EReg.Token"]={__ename__:"feathers.utils._Path2EReg.Token",__constructs__:null,Static:(B=function(a){return{_hx_index:0,token:a,__enum__:"feathers.utils._Path2EReg.Token",toString:E}},B._hx_name="Static",B.__params__=
["token"],B),Capture:(B=function(a){return{_hx_index:1,key:a,__enum__:"feathers.utils._Path2EReg.Token",toString:E}},B._hx_name="Capture",B.__params__=["key"],B)};Ft.__constructs__=[Ft.Static,Ft.Capture];var Dh=function(){};t["feathers.utils.Path2EReg"]=Dh;Dh.__name__="feathers.utils.Path2EReg";Dh.parse=function(a){var b=new Wa("(\\\\.)|([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))","g"),c=[],d=0,f=0,g="",h=function(n){try{return b.matched(n)}catch(l){return Pb.lastError=
l,null}};b.map(a,function(n){var l=h(0),q=h(1);n=n.matchedPos().pos;g+=a.substring(f,n);f=n+l.length;if(q!=null)return g+=q.charAt(1),"";l=a.charAt(f);q=h(2);var u=h(3);n=h(4);var v=h(5),z=h(6),r=h(7),F=q==null?"/":q;g!=""&&(c.push(Ft.Static(g)),g="");u==null&&(d+=1,u=""+(d-1));c.push(Ft.Capture({name:u,prefix:q==null?"":q,delimiter:F,optional:z=="?"||z=="*",repeat:z=="+"||z=="*",partial:q!=null&&l!=""&&l!=q,asterisk:r!=null,pattern:Dh.escapeGroup(n==null?v==null?r==null?"[^"+F+"]+?":".*":v:n)}));
return""});f<a.length&&(g+=V.substr(a,f,null));g!=""&&c.push(Ft.Static(g));return c};Dh.tokensToEReg=function(a,b){b=Dh.defaults(b);var c=b.strict,d=b.end,f="",g=a[a.length-1];if(g._hx_index==0){var h=g.token;g=h.charAt(h.length-1)=="/"}else g=!1;for(var n=0;n<a.length;)switch(h=a[n],++n,h._hx_index){case 0:f+=Dh.escapeString(h.token);break;case 1:h=h.key;var l=Dh.escapeString(h.prefix),q="(?:"+h.pattern+")";h.repeat&&(q+="(?:"+l+q+")*");q=h.optional?h.partial?l+"("+q+")?":"(?:"+l+"("+q+"))?":l+"("+
q+")";f+=q}c||(f=(g?V.substr(f,0,f.length-2):f)+"(?:\\/(?=$))?");return new Wa("^"+(d?f+"$":f+(c&&g?"":"(?=\\/|$)")),Dh.flags(b))};Dh.defaults=function(a){a==null&&(a={});return{strict:a.strict==null?!1:a.strict,end:a.end==null?!0:a.end,sensitive:a.sensitive==null?!1:a.sensitive}};Dh.escapeGroup=function(a){for(var b="=!:$/()".split(""),c=0;c<b.length;){var d=b[c];++c;a=N.replace(a,d,"\\"+d)}return a};Dh.escapeString=function(a){for(var b="\\.+*?=^!:${}()[]|/".split(""),c=0;c<b.length;){var d=b[c];
++c;a=N.replace(a,d,"\\"+d)}return a};Dh.flags=function(a){return a.sensitive?"":"i"};Dh.encodeAsterisk=function(a){return(new Wa("[?#]","g")).map(a,function(b){b=b.matched(0);return"%"+N.hex(V.cca(b,0)).toUpperCase()})};Dh.toEReg=function(a,b){a=Dh.parse(a);for(var c=[],d=0;d<a.length;){var f=a[d];++d;f._hx_index==1&&c.push(f.key)}return{ereg:Dh.tokensToEReg(a,b),keys:c}};var tm=function(a,b,c,d,f){this._keepDownStateOnRollOut=this._hoverBeforeDown=this._down=!1;this._enabled=!0;this._target=this._stateContext=
this._callback=this._upState=this._downState=this._hoverState=null;this.set_target(a);c!=null&&this.set_upState(c);d!=null&&this.set_downState(d);f!=null&&this.set_hoverState(f);this._currentState=this._upState;this.set_callback(b)};t["feathers.utils.PointerToState"]=tm;tm.__name__="feathers.utils.PointerToState";tm.prototype={_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;this._target!=null&&(this._target.removeEventListener("removedFromStage",
m(this,this.pointerToState_target_removedFromStageHandler)),this._target.removeEventListener("rollOver",m(this,this.pointerToState_target_rollOverHandler)),this._target.removeEventListener("rollOut",m(this,this.pointerToState_target_rollOutHandler)),this._target.removeEventListener("mouseDown",m(this,this.pointerToState_target_mouseDownHandler)));this._target=a;this._target!=null&&(this._currentState=this._upState,this._target.addEventListener("removedFromStage",m(this,this.pointerToState_target_removedFromStageHandler)),
this._target.addEventListener("rollOver",m(this,this.pointerToState_target_rollOverHandler)),this._target.addEventListener("rollOut",m(this,this.pointerToState_target_rollOutHandler)),this._target.addEventListener("mouseDown",m(this,this.pointerToState_target_mouseDownHandler)));return this._target},_stateContext:null,get_stateContext:function(){return this._stateContext},set_stateContext:function(a){return this._stateContext==a?this._stateContext:this._stateContext=a},_callback:null,get_callback:function(){return this._callback},
set_callback:function(a){if(this._callback==a)return this._callback;this._callback=a;this._callback!=null&&this._callback(this._currentState);return this._callback},_currentState:null,get_currentState:function(){return this._currentState},_upState:null,get_upState:function(){return this._upState},set_upState:function(a){return this._upState=a},_downState:null,get_downState:function(){return this._downState},set_downState:function(a){return this._downState=a},_hoverState:null,get_hoverState:function(){return this._hoverState},
set_hoverState:function(a){return this._hoverState=a},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){return this._enabled=a},_keepDownStateOnRollOut:null,get_keepDownStateOnRollOut:function(){return this._keepDownStateOnRollOut},set_keepDownStateOnRollOut:function(a){return this._keepDownStateOnRollOut=a},_customHitTest:null,get_customHitTest:function(){return this._customHitTest},set_customHitTest:function(a){return this._customHitTest=a},_hoverBeforeDown:null,
_down:null,changeState:function(a){var b=this._currentState,c=this._stateContext;c==null&&w.__implements(this._target,uh)&&(c=this._target);c!=null&&(b=c.get_currentState());this._currentState=a;b!=a&&this._callback!=null&&this._callback(a)},resetTouchState:function(){this._hoverBeforeDown=!1;this.changeState(this._upState)},pointerToState_target_removedFromStageHandler:function(a){this._target.stage!=null&&this._target.stage.removeEventListener("mouseUp",m(this,this.pointerToState_stage_mouseUpHandler));
this.resetTouchState()},pointerToState_target_rollOverHandler:function(a){this._enabled&&(this._customHitTest==null||this._customHitTest(a.stageX,a.stageY))&&(this._hoverBeforeDown=!0,this._down?this.changeState(this._downState):this.changeState(this._hoverState))},pointerToState_target_rollOutHandler:function(a){this._enabled&&(this._hoverBeforeDown=!1,this._keepDownStateOnRollOut&&this._down?this.changeState(this._downState):this.changeState(this._upState))},pointerToState_target_mouseDownHandler:function(a){this._enabled&&
this._target.stage!=null&&(this._customHitTest==null||this._customHitTest(a.stageX,a.stageY))&&(this._down=!0,this._target.stage.addEventListener("mouseUp",m(this,this.pointerToState_stage_mouseUpHandler),!1,0,!0),this.changeState(this._downState))},pointerToState_stage_mouseUpHandler:function(a){var b=w.__cast(a.currentTarget,gd);this._down=!1;b.removeEventListener("mouseUp",m(this,this.pointerToState_stage_mouseUpHandler));this._hoverBeforeDown&&this._target.hitTestPoint(a.stageX,a.stageY)?this.changeState(this._hoverState):
this.resetTouchState()},__class__:tm,__properties__:{set_customHitTest:"set_customHitTest",get_customHitTest:"get_customHitTest",set_keepDownStateOnRollOut:"set_keepDownStateOnRollOut",get_keepDownStateOnRollOut:"get_keepDownStateOnRollOut",set_enabled:"set_enabled",get_enabled:"get_enabled",set_hoverState:"set_hoverState",get_hoverState:"get_hoverState",set_downState:"set_downState",get_downState:"get_downState",set_upState:"set_upState",get_upState:"get_upState",get_currentState:"get_currentState",
set_callback:"set_callback",get_callback:"get_callback",set_stateContext:"set_stateContext",get_stateContext:"get_stateContext",set_target:"set_target",get_target:"get_target"}};var Ps=function(a,b){this._enabled=!0;this._target=this._eventFactory=null;this.set_target(a);this.set_eventFactory(b)};t["feathers.utils.PointerTrigger"]=Ps;Ps.__name__="feathers.utils.PointerTrigger";Ps.prototype={_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;
this._target!=null&&(this._target.removeEventListener("click",m(this,this.pointerTrigger_target_clickHandler)),this._target.removeEventListener("touchTap",m(this,this.pointerTrigger_target_touchTapHandler)));this._target=a;this._target!=null&&(this._target.addEventListener("click",m(this,this.pointerTrigger_target_clickHandler)),this._target.addEventListener("touchTap",m(this,this.pointerTrigger_target_touchTapHandler)));return this._target},_eventFactory:null,get_eventFactory:function(){return this._eventFactory},
set_eventFactory:function(a){return this._eventFactory==a?this._eventFactory:this._eventFactory=a},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){return this._enabled=a},_customHitTest:null,get_customHitTest:function(){return this._customHitTest},set_customHitTest:function(a){return this._customHitTest=a},pointerTrigger_target_clickHandler:function(a){this._enabled&&(this._customHitTest==null||this._customHitTest(a.stageX,a.stageY))&&(this._eventFactory!=null?this._target.dispatchEvent(this._eventFactory()):
pf.dispatchFromMouseEvent(this._target,a))},pointerTrigger_target_touchTapHandler:function(a){!this._enabled||a.isPrimaryTouchPoint||this._customHitTest!=null&&!this._customHitTest(a.stageX,a.stageY)||(this._eventFactory!=null?this._target.dispatchEvent(this._eventFactory()):pf.dispatchFromTouchEvent(this._target,a))},__class__:Ps,__properties__:{set_customHitTest:"set_customHitTest",get_customHitTest:"get_customHitTest",set_enabled:"set_enabled",get_enabled:"get_enabled",set_eventFactory:"set_eventFactory",
get_eventFactory:"get_eventFactory",set_target:"set_target",get_target:"get_target"}};var Ly=function(){};t["feathers.utils.PopUpUtil"]=Ly;Ly.__name__="feathers.utils.PopUpUtil";Ly.isTopLevelPopUpOrIsContainedByTopLevelPopUp=function(a){if(a.stage==null)return!1;for(var b=Aa.forStage(a.stage),c=b.get_popUpCount()-b.get_topLevelPopUpCount(),d=b.get_popUpCount();c<d;){var f=c++;f=b.getPopUpAt(f);if(a==f||f instanceof zb&&f.contains(a))return!0}return!1};var Ll=function(){};t["feathers.utils.ScaleUtil"]=
Ll;Ll.__name__="feathers.utils.ScaleUtil";Ll.fitRectangle=function(a,b,c){var d=a.width,f=a.height;a=b.width;var g=b.height,h=Ll.scaleToFit(d,f,a,g);c==null&&(c=new Ia);d*=h;f*=h;c.width=d;c.height=f;c.x=b.x+(a-d)/2;c.y=b.y+(g-f)/2;return c};Ll.fillRectangle=function(a,b,c){var d=a.width,f=a.height;a=b.width;var g=b.height,h=Ll.scaleToFill(d,f,a,g);c==null&&(c=new Ia);d*=h;f*=h;c.width=d;c.height=f;c.x=b.x+(a-d)/2;c.y=b.y+(g-f)/2;return c};Ll.scaleToFit=function(a,b,c,d){a=c/a;b=d/b;return a<b?a:
b};Ll.scaleToFill=function(a,b,c,d){a=c/a;b=d/b;return a>b?a:b};var My=function(){this._buckets=[]};t["feathers.utils.ScreenDensityScaleCalculator"]=My;My.__name__="feathers.utils.ScreenDensityScaleCalculator";My.prototype={_buckets:null,addScaleForDensity:function(a,b){for(var c=this._buckets.length,d=0,f=this._buckets;d<f.length;){var g=f[d];++d;if(g.density>a)break;if(g.density==a)throw new Cb("Screen density cannot be added more than once: "+a);}d=this._buckets;a=new yx(a,b);d.splice(c,0,a)},
removeScaleForDensity:function(a){for(var b=0,c=this._buckets;b<c.length;){var d=c[b];++b;if(d.density==a){V.remove(this._buckets,d);break}}},getScale:function(a){if(this._buckets.length==0)throw new ob("Cannot choose scale because none have been added");var b=this._buckets[0];if(a<=b.density)return b.scale;for(var c=b,d=1,f=this._buckets.length;d<f;)if(b=d++,b=this._buckets[b],a>b.density)c=b;else{if(a<(b.density+c.density)/2)return c.scale;break}return b.scale},__class__:My};var yx=function(a,b){this.density=
a;this.scale=b};t["feathers.utils._ScreenDensityScaleCalculator.ScreenDensityBucket"]=yx;yx.__name__="feathers.utils._ScreenDensityScaleCalculator.ScreenDensityBucket";yx.prototype={density:null,scale:null,__class__:yx};var Oi=function(a){this._touchPointIsSimulated=!1;this._previousTouchPointID=this._touchPointID=null;this.snappingToEdge=!1;this.targetScrollX=this.targetScrollY=0;this.animateScrollXEndRatio=this.animateScrollYEndRatio=1;this.animateScrollX=this.animateScrollY=null;this.savedScrollMoves=
[];this.startTouchX=this.startTouchY=this.startScrollX=this.startScrollY=0;this.restoreMouseChildren=!1;this._fixedThrowDuration=2.996998998998728;this._logDecelerationRate=-.0020020026706730793;this.snapPositionsX=this.snapPositionsY=null;this._decelerationRate=.998;this.simulateTouch=!1;this.mouseWheelDuration=0;this._mouseWheelDeltaMode=1;this.mouseWheelYScrollsX=!1;this.mouseWheelDeltaX=this.mouseWheelDeltaY=10;this.bounceEase=null;this.ease=th.easeOut;this.elasticSnapDuration=.5;this.throwElasticity=
.05;this.elasticity=.33;this.forceElasticTop=this.forceElasticRight=this.forceElasticBottom=this.forceElasticLeft=!1;this.elasticEdges=!0;this.minDragDistance=6;this._scrolling=this._draggingX=this._draggingY=!1;this._scrollX=this._scrollY=this._minScrollX=this._minScrollY=this._maxScrollX=this._maxScrollY=this._visibleWidth=this._visibleHeight=this._contentWidth=this._contentHeight=0;this.enabledX=this.enabledY=!0;qa.call(this);this.set_target(a)};t["feathers.utils.Scroller"]=Oi;Oi.__name__="feathers.utils.Scroller";
Oi.__super__=qa;Oi.prototype=I(qa.prototype,{enabledX:null,enabledY:null,_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;Id.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==a)return this._scrollY;this._scrollY=a;Id.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollY},
get_restrictedScrollX:function(){return this._scrollX},set_restrictedScrollX:function(a){a<this._minScrollX?a=this._minScrollX:a>this._maxScrollX&&(a=this._maxScrollX);if(this._scrollX==a)return this._scrollX;this._scrollX=a;Id.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollX},get_restrictedScrollY:function(){return this._scrollY},set_restrictedScrollY:function(a){a<this._minScrollY?a=this._minScrollY:a>this._maxScrollY&&(a=this._maxScrollY);if(this._scrollY==a)return this._scrollY;
this._scrollY=a;Id.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollY},_minScrollX:null,get_minScrollX:function(){return this._minScrollX},_minScrollY:null,get_minScrollY:function(){return this._minScrollY},_maxScrollX:null,get_maxScrollX:function(){return this._maxScrollX},_maxScrollY:null,get_maxScrollY:function(){return this._maxScrollY},_visibleWidth:null,get_visibleWidth:function(){return this._visibleWidth},_visibleHeight:null,get_visibleHeight:function(){return this._visibleHeight},
_contentWidth:null,get_contentWidth:function(){return this._contentWidth},_contentHeight:null,get_contentHeight:function(){return this._contentHeight},_scrolling:null,get_scrolling:function(){return this._scrolling},_draggingX:null,get_draggingX:function(){return this._draggingX},_draggingY:null,get_draggingY:function(){return this._draggingY},minDragDistance:null,elasticEdges:null,forceElasticTop:null,forceElasticRight:null,forceElasticBottom:null,forceElasticLeft:null,elasticity:null,throwElasticity:null,
elasticSnapDuration:null,ease:null,bounceEase:null,mouseWheelDeltaX:null,mouseWheelDeltaY:null,mouseWheelYScrollsX:null,_mouseWheelDeltaMode:null,mouseWheelDuration:null,simulateTouch:null,_decelerationRate:null,get_decelerationRate:function(){return this._decelerationRate},set_decelerationRate:function(a){if(this._decelerationRate==a)return this._decelerationRate;this._decelerationRate=a;this._logDecelerationRate=Math.log(this._decelerationRate);this._fixedThrowDuration=-.1/Math.log(Math.pow(this._decelerationRate,
16.666666666666668));return this._decelerationRate},snapPositionsX:null,snapPositionsY:null,_logDecelerationRate:null,_fixedThrowDuration:null,restoreMouseChildren:null,startTouchX:null,startTouchY:null,startScrollX:null,startScrollY:null,savedScrollMoves:null,animateScrollX:null,animateScrollY:null,animateScrollXEndRatio:null,animateScrollYEndRatio:null,targetScrollX:null,targetScrollY:null,snappingToEdge:null,_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==
a)return this._target;if(this._target!=null){this.cleanupAfterDrag();this._target.removeEventListener("removedFromStage",m(this,this.scroller_target_removedFromStageHandler));this._target.removeEventListener("mouseDown",m(this,this.scroller_target_mouseDownHandler));this._target.removeEventListener("mouseDown",m(this,this.scroller_target_mouseDownCaptureHandler),!0);this._target.removeEventListener("mouseWheel",m(this,this.scroller_target_mouseWheelHandler));var b=w.__cast(wa,Window);b.removeEventListener("wheel",
m(this,this.scroller_window_wheelCaptureHandler),{capture:!0});this._target.removeEventListener("touchBegin",m(this,this.scroller_target_touchBeginHandler));this._target.removeEventListener("touchBegin",m(this,this.scroller_target_touchBeginCaptureHandler),!0);this._target.removeEventListener("click",m(this,this.scroller_target_clickCaptureHandler),!0);this._target.removeEventListener("touchTap",m(this,this.scroller_target_touchTapCaptureHandler),!0)}this._target=a;this._target!=null&&(this._target.addEventListener("mouseDown",
m(this,this.scroller_target_mouseDownHandler),!1,0,!0),this._target.addEventListener("mouseDown",m(this,this.scroller_target_mouseDownCaptureHandler),!0,0,!0),this._target.addEventListener("mouseWheel",m(this,this.scroller_target_mouseWheelHandler),!1,0,!0),b=w.__cast(wa,Window),b.addEventListener("wheel",m(this,this.scroller_window_wheelCaptureHandler),{capture:!0}),this._target.addEventListener("touchBegin",m(this,this.scroller_target_touchBeginHandler),!1,0,!0),this._target.addEventListener("touchBegin",
m(this,this.scroller_target_touchBeginCaptureHandler),!0,0,!0),this._target.addEventListener("click",m(this,this.scroller_target_clickCaptureHandler),!0,0,!0),this._target.addEventListener("touchTap",m(this,this.scroller_target_touchTapCaptureHandler),!0,0,!0));return this._target},_previousTouchPointID:null,_touchPointID:null,get_touchPointID:function(){return this._touchPointID},_touchPointIsSimulated:null,get_touchPointIsSimulated:function(){return this._touchPointIsSimulated},setDimensions:function(a,
b,c,d){this._visibleWidth=a!=null?a:0;this._visibleHeight=b!=null?b:0;this._contentWidth=c!=null?c:0;this._contentHeight=d!=null?d:0;this.calculateMinAndMax()},applyScrollRestrictions:function(){var a=!1;this._scrollX<this._minScrollX?(this._scrollX=this._minScrollX,a=!0):this._scrollX>this._maxScrollX&&(this._scrollX=this._maxScrollX,a=!0);this._scrollY<this._minScrollY?(this._scrollY=this._minScrollY,a=!0):this._scrollY>this._maxScrollY&&(this._scrollY=this._maxScrollY,a=!0);a&&Id.dispatch(this,
"scroll",!1,!1,this._scrollX,this._scrollY)},stop:function(){this.animateScrollX!=null&&(Ca.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null);this.animateScrollY!=null&&(Ca.stop(this.animateScrollY,null,!1,!1),this.animateScrollY=null);this.cleanupAfterDrag();this._draggingY=this._draggingX=!1;this.completeScroll()},applyLayoutShift:function(a,b){if(a!=null){var c=this.animateScrollX;this.animateScrollX=null;c!=null&&Ca.stop(c,null,!1,!1);this.startScrollX+=a;this.set_scrollX(this.get_scrollX()+
a);for(var d=0;d<this.savedScrollMoves.length;)this.savedScrollMoves[d]+=a,d+=3;c!=null&&(a=this.targetScrollX+a,d=Pa.getTimer()/1E3-c.startTime,d=c.duration-d,this.throwTo(a,null,d,c._ease))}if(b!=null){c=this.animateScrollY;this.animateScrollY=null;c!=null&&Ca.stop(c,null,!1,!1);this.startScrollY+=b;this.set_scrollY(this.get_scrollY()+b);for(d=1;d<this.savedScrollMoves.length;)this.savedScrollMoves[d]+=b,d+=3;c!=null&&(b=this.targetScrollY+b,d=Pa.getTimer()/1E3-c.startTime,d=c.duration-d,this.throwTo(null,
b,d,c._ease))}},throwTo:function(a,b,c,d){var f=this;c==null&&(c=this._fixedThrowDuration);d==null&&(d=this.ease);var g=!1;a!=null&&(this.animateScrollX!=null&&(Ca.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null),this._scrollX!=a?(g=!0,this.startScroll(),c==0?this.set_scrollX(a):(this.startScrollX=this._scrollX,this.targetScrollX=a,this.animateScrollX=a=Ca.update(function(h){h==null&&(h=f.targetScrollX);return f.set_scrollX(h)},c,[this._scrollX],[this.targetScrollX],!0),this.animateScrollX.ease(d),
this.animateScrollX.onComplete(m(this,this.animateScrollX_onComplete)),this.refreshAnimateScrollXEndRatio())):this.finishScrollX());b!=null&&(this.animateScrollY!=null&&(Ca.stop(this.animateScrollY,null,!1,!1),this.animateScrollY=null),this._scrollY!=b?(g=!0,this.startScroll(),c==0?this.set_scrollY(b):(this.startScrollY=this._scrollY,this.targetScrollY=b,this.animateScrollY=a=Ca.update(function(h){h==null&&(h=f.targetScrollY);return f.set_scrollY(h)},c,[this._scrollY],[this.targetScrollY],!0),this.animateScrollY.ease(d),
this.animateScrollY.onComplete(m(this,this.animateScrollY_onComplete)),this.refreshAnimateScrollYEndRatio())):this.finishScrollY());g&&c==0&&this.completeScroll()},throwWithVelocity:function(a,b){var c=null,d=null;if(a!=null)if(Math.abs(a)<=Oi.MINIMUM_VELOCITY)this.finishScrollX();else if(this.snapPositionsX!=null)for(var f=0,g=this.snapPositionsX.length;f<g;){var h=f++,n=this.snapPositionsX[h];if(a<0&&(c=n,n>this._scrollX))break;if(a>0&&(c=h==0?n:this.snapPositionsX[h-1],n>=this._scrollX))break}else c=
this._scrollX+this.calculateDistanceFromVelocity(a);if(b!=null)if(Math.abs(b)<=Oi.MINIMUM_VELOCITY)this.finishScrollY();else if(this.snapPositionsY!=null)for(f=0,g=this.snapPositionsY.length;f<g;){h=f++;a=this.snapPositionsY[h];if(b<0&&(d=a,a>this._scrollY))break;if(b>0&&(d=h==0?a:this.snapPositionsY[h-1],a>=this._scrollY))break}else d=this._scrollY+this.calculateDistanceFromVelocity(b);this.throwTo(c,d,this._fixedThrowDuration)},calculateDistanceFromVelocity:function(a){return(a-Oi.MINIMUM_VELOCITY)/
this._logDecelerationRate},refreshAnimateScrollXEndRatio:function(){var a=Math.abs(this.targetScrollX-this.startScrollX),b=0;this.targetScrollX>this._maxScrollX?b=(this.targetScrollX-this._maxScrollX)/a:this.targetScrollX<this._minScrollX&&(b=(this._minScrollX-this.targetScrollX)/a);this.animateScrollXEndRatio=b>0?this.elasticEdges?1-b+b*this.throwElasticity:1-b:1;if(this.animateScrollX!=null)if(this.animateScrollXEndRatio<1)this.animateScrollX.onUpdate(m(this,this.animateScrollX_endRatio_onUpdate));
else this.animateScrollX.onUpdate(null)},refreshAnimateScrollYEndRatio:function(){var a=Math.abs(this.targetScrollY-this.startScrollY),b=0;this.targetScrollY>this._maxScrollY?b=(this.targetScrollY-this._maxScrollY)/a:this.targetScrollY<this._minScrollY&&(b=(this._minScrollY-this.targetScrollY)/a);this.animateScrollYEndRatio=b>0?this.elasticEdges?1-b+b*this.throwElasticity:1-b:1;if(this.animateScrollY!=null)if(this.animateScrollYEndRatio<1)this.animateScrollY.onUpdate(m(this,this.animateScrollY_endRatio_onUpdate));
else this.animateScrollY.onUpdate(null)},calculateMinAndMax:function(){var a=this._minScrollX,b=this._maxScrollX,c=this._minScrollY,d=this._maxScrollY;this._minScrollY=this._minScrollX=0;this._maxScrollX=Math.max(this._contentWidth,this._visibleWidth)-this._visibleWidth;this._maxScrollY=Math.max(this._contentHeight,this._visibleHeight)-this._visibleHeight;a==this._minScrollX&&b==this._maxScrollX||this.refreshAnimateScrollXEndRatio();c==this._minScrollY&&d==this._maxScrollY||this.refreshAnimateScrollYEndRatio()},
startScroll:function(){if(!this._scrolling){this._scrolling=!0;if(this._target instanceof zb){var a=this._target;this.restoreMouseChildren=a.mouseChildren;a.mouseChildren=!1}Id.dispatch(this,"scrollStart",!1,!1,this._scrollX,this._scrollY)}},completeScroll:function(){!this._scrolling||this._draggingX||this._draggingY||this.animateScrollX!=null||this.animateScrollY!=null||(this._scrolling=!1,this._target instanceof zb&&(this._target.mouseChildren=this.restoreMouseChildren),Id.dispatch(this,"scrollComplete",
!1,!1,this._scrollX,this._scrollY))},finishScrollX:function(){this._draggingX=!1;var a=null;if(this.snapPositionsX!=null){for(var b=Infinity,c=0,d=this.snapPositionsX;c<d.length;){var f=d[c];++c;var g=Math.abs(f-this._scrollX);b>g&&(b=g,a=f)}a==this._scrollX&&(a=null)}this._scrollX<this._minScrollX?a=this._minScrollX:this._scrollX>this._maxScrollX&&(a=this._maxScrollX);a==null?this.completeScroll():this.throwTo(a,null,Math.abs(this._scrollX-a)>=1?this.elasticSnapDuration:0,this.bounceEase)},finishScrollY:function(){this._draggingY=
!1;var a=null;if(this.snapPositionsY!=null){for(var b=Infinity,c=0,d=this.snapPositionsY;c<d.length;){var f=d[c];++c;var g=Math.abs(f-this._scrollY);b>g&&(b=g,a=f)}a==this._scrollY&&(a=null)}this._scrollY<this._minScrollY?a=this._minScrollY:this._scrollY>this._maxScrollY&&(a=this._maxScrollY);a==null?this.completeScroll():this.throwTo(null,a,Math.abs(this._scrollY-a)>=1?this.elasticSnapDuration:0,this.bounceEase)},animateScrollX_endRatio_onUpdate:function(){var a=Pa.getTimer()/1E3-this.animateScrollX.startTime,
b=a/this.animateScrollX.duration,c=this.animateScrollX._ease;c!=null&&(b=c.calculate(b));b>=this.animateScrollXEndRatio&&a<this.animateScrollX.duration&&(this.elasticEdges||(this._scrollX<this._minScrollX?this.set_scrollX(this._minScrollX):this._scrollX>this._maxScrollX&&this.set_scrollX(this._maxScrollX)),Ca.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null,this.finishScrollX())},animateScrollX_onComplete:function(){this.animateScrollX=null;this.finishScrollX()},animateScrollY_endRatio_onUpdate:function(){var a=
Pa.getTimer()/1E3-this.animateScrollY.startTime,b=a/this.animateScrollY.duration,c=this.animateScrollY._ease;c!=null&&(b=c.calculate(b));b>=this.animateScrollYEndRatio&&a<this.animateScrollY.duration&&(this.elasticEdges||(this._scrollY<this._minScrollY?this.set_scrollY(this._minScrollY):this._scrollY>this._maxScrollY&&this.set_scrollY(this._maxScrollY)),Ca.stop(this.animateScrollY,null,!1,!1),this.animateScrollY=null,this.finishScrollY())},animateScrollY_onComplete:function(){this.animateScrollY=
null;this.finishScrollY()},cleanupAfterDrag:function(){this._touchPointID!=null&&(this._previousTouchPointID=this._scrolling?this._touchPointID:null,this._touchPointID=null,this._touchPointIsSimulated=!1,this._target.removeEventListener("removedFromStage",m(this,this.scroller_target_removedFromStageHandler)),this._target.stage!=null&&(this._target.stage.removeEventListener("mouseMove",m(this,this.scroller_target_stage_mouseMoveHandler)),this._target.stage.removeEventListener("mouseUp",m(this,this.scroller_target_stage_mouseUpHandler)),
this._target.stage.removeEventListener("touchMove",m(this,this.scroller_target_stage_touchMoveHandler)),this._target.stage.removeEventListener("touchEnd",m(this,this.scroller_target_stage_touchEndHandler))))},scroller_target_removedFromStageHandler:function(a){this.cleanupAfterDrag()},touchBegin:function(a,b,c,d){if((!b||this.simulateTouch)&&this._touchPointID==null){this.animateScrollX!=null&&(Ca.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null);this.animateScrollY!=null&&(Ca.stop(this.animateScrollY,
null,!1,!1),this.animateScrollY=null);this._target.addEventListener("removedFromStage",m(this,this.scroller_target_removedFromStageHandler),!1,0,!0);this._target.stage.addEventListener("mouseMove",m(this,this.scroller_target_stage_mouseMoveHandler),!1,0,!0);this._target.stage.addEventListener("mouseUp",m(this,this.scroller_target_stage_mouseUpHandler),!1,0,!0);this._target.stage.addEventListener("touchMove",m(this,this.scroller_target_stage_touchMoveHandler),!1,0,!0);this._target.stage.addEventListener("touchEnd",
m(this,this.scroller_target_stage_touchEndHandler),!1,0,!0);if(this._target instanceof zb){var f=this._target;this._scrolling&&(f.mouseChildren=!1)}this._previousTouchPointID=null;this._touchPointID=a;this._touchPointIsSimulated=b;this.startTouchX=c;this.startTouchY=d;this.startScrollX=this._scrollX;this.startScrollY=this._scrollY;this.savedScrollMoves.length=0}},touchMove:function(a,b,c,d){if(this._touchPointID!=null&&this._touchPointID==a&&this._touchPointIsSimulated==b){b=c-this.startTouchX;a=
d-this.startTouchY;for(var f=1,g=1,h=this._target;h!=h.stage;)f/=h.get_scaleX(),g/=h.get_scaleY(),h=h.parent;b*=f;a*=g;g=this.canDragX();f=this.canDragY();if(!this._draggingX&&g&&Math.abs(b)>this.minDragDistance&&(this.startTouchX=c,b=0,this._draggingX=!0,!this._draggingY&&(this.startScroll(),this._touchPointID==null))||!this._draggingY&&f&&Math.abs(a)>this.minDragDistance&&(this.startTouchY=d,a=0,this._draggingY=!0,!this._draggingX&&(this.startScroll(),this._touchPointID==null)))return;if(this._draggingX||
this._draggingY)c=this.startScrollX,g&&(c-=b,this.elasticEdges?(d=this._minScrollX,d>this.startScrollX&&(d=this.startScrollX),b=this._maxScrollX,b<this.startScrollX&&(b=this.startScrollX),c<this._minScrollX?c=this._maxScrollX>this._minScrollX||this.forceElasticLeft?c-(c-d)*(1-this.elasticity):this._minScrollX:c>this._maxScrollX&&(c=this._maxScrollX>this._minScrollX||this.forceElasticRight?c-(c-b)*(1-this.elasticity):this._maxScrollX)):c<this._minScrollX?c=this._minScrollX:c>this._maxScrollX&&(c=this._maxScrollX)),
d=this.startScrollY,f&&(d-=a,this.elasticEdges?(a=this._minScrollY,a>this.startScrollY&&(a=this.startScrollY),b=this._maxScrollY,b<this.startScrollY&&(b=this.startScrollY),d<this._minScrollY?d=this._maxScrollY>this._minScrollY||this.forceElasticTop?d-(d-a)*(1-this.elasticity):this._minScrollY:d>this._maxScrollY&&(d=this._maxScrollY>this._minScrollY||this.forceElasticBottom?d-(d-b)*(1-this.elasticity):this._maxScrollY)):d<this._minScrollY?d=this._minScrollY:d>this._maxScrollY&&(d=this._maxScrollY)),
this.set_scrollX(c),this.set_scrollY(d),this.savedScrollMoves.length>60&&(this.savedScrollMoves.length=30),this.savedScrollMoves.push(c),this.savedScrollMoves.push(d),this.savedScrollMoves.push(Pa.getTimer())}},touchEnd:function(a,b){if(this._touchPointID!=null&&this._touchPointID==a&&this._touchPointIsSimulated==b){this.cleanupAfterDrag();a=!this.canDragX();b=!this.canDragY();if(this._scrollX<this._minScrollX||this._scrollX>this._maxScrollX)a=!0,this.finishScrollX();if(this._scrollY<this._minScrollY||
this._scrollY>this._maxScrollY)b=!0,this.finishScrollY();if(!a||!b)if(this._draggingX||this._draggingY){for(var c=Pa.getTimer()-100,d=this.savedScrollMoves.length-1,f=d,g=d;d>0&&this.savedScrollMoves[g]>c;)f=g,g-=3;f==d?(!a&&this._draggingX&&this.finishScrollX(),!b&&this._draggingY&&this.finishScrollY()):(c=this.savedScrollMoves[d]-this.savedScrollMoves[f],g=d=null,c>0&&(!a&&this._draggingX&&(d=-(this._scrollX-this.savedScrollMoves[f-2])/c),!b&&this._draggingY&&(g=-(this._scrollY-this.savedScrollMoves[f-
1])/c)),d==null&&g==null||this.throwWithVelocity(d,g),d==null&&this._draggingX&&this.finishScrollX(),g==null&&this._draggingY&&this.finishScrollY())}}},canDragX:function(){return this.enabledX?this._maxScrollX>this._minScrollX||this.forceElasticLeft?!0:this.forceElasticRight:!1},canDragY:function(){return this.enabledY?this._maxScrollY>this._minScrollY||this.forceElasticTop?!0:this.forceElasticBottom:!1},scroller_target_touchBeginCaptureHandler:function(a){this._scrolling&&(a.stopImmediatePropagation(),
this.scroller_target_touchBeginHandler(a))},scroller_target_touchBeginHandler:function(a){this.simulateTouch&&a.isPrimaryTouchPoint||this.touchBegin(a.touchPointID,!1,a.stageX,a.stageY)},scroller_target_mouseDownCaptureHandler:function(a){this._scrolling&&(a.stopImmediatePropagation(),this.scroller_target_mouseDownHandler(a))},scroller_target_mouseDownHandler:function(a){a=this._target.stage;a!=null&&this.touchBegin(Oi.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},scroller_target_stage_touchMoveHandler:function(a){this.touchMove(a.touchPointID,
!1,a.stageX,a.stageY)},scroller_target_stage_mouseMoveHandler:function(a){a=w.__cast(a.currentTarget,gd);this.touchMove(Oi.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},scroller_target_stage_touchEndHandler:function(a){this.touchEnd(a.touchPointID,!1)},scroller_target_clickCaptureHandler:function(a){this._previousTouchPointID!=null&&(this._previousTouchPointID=null,a.stopImmediatePropagation())},scroller_target_touchTapCaptureHandler:function(a){this._previousTouchPointID!=null&&this._previousTouchPointID==
a.touchPointID&&(a.isPrimaryTouchPoint?this._previousTouchPointID=Oi.POINTER_ID_MOUSE:(this._previousTouchPointID=null,a.stopImmediatePropagation()))},scroller_target_stage_mouseUpHandler:function(a){this.touchEnd(Oi.POINTER_ID_MOUSE,!0)},scroller_window_wheelCaptureHandler:function(a){this._mouseWheelDeltaMode=a.deltaMode},scroller_target_mouseWheelHandler:function(a){this._scrolling&&(a.stopImmediatePropagation(),this.stop());var b=a.delta;switch(this._mouseWheelDeltaMode){case 0:b=b<0?Math.min(-1,
b/40)|0:Math.max(1,b/40)|0;break;case 2:b*=16}var c=null,d=null;this.mouseWheelYScrollsX?(c=this._scrollX,this.animateScrollX!=null&&(c=this.targetScrollX),c-=b*this.mouseWheelDeltaX,c<this._minScrollX?c=this._minScrollX:c>this._maxScrollX&&(c=this._maxScrollX)):(d=this._scrollY,this.animateScrollY!=null&&(d=this.targetScrollY),d-=b*this.mouseWheelDeltaY,d<this._minScrollY?d=this._minScrollY:d>this._maxScrollY&&(d=this._maxScrollY));if(c!=null&&c!=this._scrollX||d!=null&&d!=this._scrollY)a.preventDefault(),
this._scrolling||(a.stopImmediatePropagation(),this.stop()),c!=null&&(this._draggingX=!0),d!=null&&(this._draggingY=!0),this.mouseWheelDuration>0?this.throwTo(c,d,this.mouseWheelDuration,this.ease):(this.startScroll(),c!=null&&this.set_scrollX(c),d!=null&&this.set_scrollY(d),this._draggingY=this._draggingX=!1,this.completeScroll())},__class__:Oi,__properties__:{get_touchPointIsSimulated:"get_touchPointIsSimulated",get_touchPointID:"get_touchPointID",set_target:"set_target",get_target:"get_target",
set_decelerationRate:"set_decelerationRate",get_decelerationRate:"get_decelerationRate",get_draggingY:"get_draggingY",get_draggingX:"get_draggingX",get_scrolling:"get_scrolling",get_contentHeight:"get_contentHeight",get_contentWidth:"get_contentWidth",get_visibleHeight:"get_visibleHeight",get_visibleWidth:"get_visibleWidth",get_maxScrollY:"get_maxScrollY",get_maxScrollX:"get_maxScrollX",get_minScrollY:"get_minScrollY",get_minScrollX:"get_minScrollX",set_restrictedScrollY:"set_restrictedScrollY",get_restrictedScrollY:"get_restrictedScrollY",
set_restrictedScrollX:"set_restrictedScrollX",get_restrictedScrollX:"get_restrictedScrollX",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX"}});var pg=function(){};t["feathers.utils.TextFormatUtil"]=pg;pg.__name__="feathers.utils.TextFormatUtil";pg.clone=function(a){var b=new ef(a.font,a.size,a.color,a.bold,a.italic,a.underline,a.url,a.target,a.align,a.leftMargin,a.rightMargin,a.indent,a.leading);b.blockIndent=a.blockIndent;b.bullet=a.bullet;
b.kerning=a.kerning;b.letterSpacing=a.letterSpacing;b.tabStops=a.tabStops;return b};var Tj=R["haxe.StackItem"]={__ename__:"haxe.StackItem",__constructs__:null,CFunction:{_hx_name:"CFunction",_hx_index:0,__enum__:"haxe.StackItem",toString:E},Module:(B=function(a){return{_hx_index:1,m:a,__enum__:"haxe.StackItem",toString:E}},B._hx_name="Module",B.__params__=["m"],B),FilePos:(B=function(a,b,c,d){return{_hx_index:2,s:a,file:b,line:c,column:d,__enum__:"haxe.StackItem",toString:E}},B._hx_name="FilePos",
B.__params__=["s","file","line","column"],B),Method:(B=function(a,b){return{_hx_index:3,classname:a,method:b,__enum__:"haxe.StackItem",toString:E}},B._hx_name="Method",B.__params__=["classname","method"],B),LocalFunction:(B=function(a){return{_hx_index:4,v:a,__enum__:"haxe.StackItem",toString:E}},B._hx_name="LocalFunction",B.__params__=["v"],B)};Tj.__constructs__=[Tj.CFunction,Tj.Module,Tj.FilePos,Tj.Method,Tj.LocalFunction];var zi={callStack:function(){return Pb.toHaxe(Pb.callStack())},exceptionStack:function(a){a==
null&&(a=!1);var b=Pb.toHaxe(Pb.exceptionStack());return a?b:zi.subtract(b,zi.callStack())},toString:function(a){for(var b=new nb,c=0;c<a.length;){var d=a[c];++c;b.b+="\nCalled from ";zi.itemToString(b,d)}return b.b},subtract:function(a,b){for(var c=-1,d=-1;++d<a.length;){for(var f=0,g=b.length;f<g;){var h=f++;if(zi.equalItems(a[d],b[h])){if(c<0&&(c=d),++d,d>=a.length)break}else c=-1}if(c>=0)break}return c>=0?a.slice(0,c):a},equalItems:function(a,b){if(a==null)return b==null?!0:!1;switch(a._hx_index){case 0:return b==
null?!1:b._hx_index==0?!0:!1;case 1:return b==null?!1:b._hx_index==1?a.m==b.m:!1;case 2:if(b==null)return!1;if(b._hx_index==2){var c=b.s,d=b.line,f=b.column,g=a.column,h=a.line,n=a.s;return a.file==b.file&&h==d&&g==f?zi.equalItems(n,c):!1}return!1;case 3:return b==null?!1:b._hx_index==3?(c=b.method,d=a.method,a.classname==b.classname?d==c:!1):!1;case 4:return b==null?!1:b._hx_index==4?a.v==b.v:!1}},itemToString:function(a,b){switch(b._hx_index){case 0:a.b+="a C function";break;case 1:b=b.m;a.b+="module ";
a.b+=b==null?"null":""+b;break;case 2:var c=b.s,d=b.file,f=b.line;b=b.column;c!=null&&(zi.itemToString(a,c),a.b+=" (");a.b+=d==null?"null":""+d;a.b+=" line ";a.b+=f==null?"null":""+f;b!=null&&(a.b+=" column ",a.b+=b==null?"null":""+b);c!=null&&(a.b+=")");break;case 3:c=b.classname;b=b.method;a.b+=H.string(c==null?"<unknown>":c);a.b+=".";a.b+=b==null?"null":""+b;break;case 4:b=b.v,a.b+="local function #",a.b+=b==null?"null":""+b}}},ba=function(a,b,c){Error.call(this,a);this.message=a;this.__previousException=
b;this.__nativeException=c!=null?c:this;this.__skipStack=0;a=Error.prepareStackTrace;Error.prepareStackTrace=function(d){return d.stack};if(c instanceof Error)this.stack=c.stack;else{c=null;if(Error.captureStackTrace)Error.captureStackTrace(this,ba),c=this;else if(c=Error(),typeof c.stack=="undefined"){try{throw c;}catch(d){}this.__skipStack++}this.stack=c.stack}Error.prepareStackTrace=a};t["haxe.Exception"]=ba;ba.__name__="haxe.Exception";ba.caught=function(a){return a instanceof ba?a:a instanceof
Error?new ba(a.message,null,a):new Tp(a,null,a)};ba.thrown=function(a){if(a instanceof ba)return a.get_native();if(a instanceof Error)return a;a=new Tp(a);a.__skipStack++;return a};ba.__super__=Error;ba.prototype=I(Error.prototype,{__skipStack:null,__nativeException:null,__previousException:null,unwrap:function(){return this.__nativeException},toString:function(){return this.get_message()},details:function(){if(this.get_previous()==null){var a="Exception: "+this.toString(),b=this.get_stack();return a+
(b==null?"null":zi.toString(b))}b="";var c=this;for(a=null;c!=null;){if(a==null){var d="Exception: "+c.get_message();a=c.get_stack();b=d+(a==null?"null":zi.toString(a))+b}else a=zi.subtract(c.get_stack(),a.get_stack()),b="Exception: "+c.get_message()+(a==null?"null":zi.toString(a))+"\n\nNext "+b;a=c;c=c.get_previous()}return b},__shiftStack:function(){this.__skipStack++},get_message:function(){return this.message},get_previous:function(){return this.__previousException},get_native:function(){return this.__nativeException},
get_stack:function(){var a=this.__exceptionStack;return a==null?(a=Pb.toHaxe(Pb.normalize(this.stack),this.__skipStack),this.setProperty("__exceptionStack",a),a):a},setProperty:function(a,b){try{Object.defineProperty(this,a,{value:b})}catch(c){this[a]=b}},__class__:ba,__properties__:{get_native:"get_native",get_previous:"get_previous",get_stack:"get_stack",get_message:"get_message"}});var Sz={},Hb=function(a,b){this.high=a;this.low=b};t["haxe._Int64.___Int64"]=Hb;Hb.__name__="haxe._Int64.___Int64";
Hb.prototype={high:null,low:null,__class__:Hb};var De=function(){};t["haxe.Log"]=De;De.__name__="haxe.Log";De.formatOutput=function(a,b){var c=H.string(a);if(b==null)return c;var d=b.fileName+":"+b.lineNumber;if(b.customParams!=null){var f=0;for(b=b.customParams;f<b.length;)a=b[f],++f,c+=", "+H.string(a)}return d+": "+c};De.trace=function(a,b){a=De.formatOutput(a,b);typeof console!="undefined"&&console.log!=null&&console.log(a)};var Pb=function(){};t["haxe.NativeStackTrace"]=Pb;Pb.__name__="haxe.NativeStackTrace";
Pb.saveStack=function(a){Pb.lastError=a};Pb.callStack=function(){var a=Error(""),b=Pb.tryHaxeStack(a);if(typeof b=="undefined"){try{throw a;}catch(c){}b=a.stack}return Pb.normalize(b,2)};Pb.exceptionStack=function(){return Pb.normalize(Pb.tryHaxeStack(Pb.lastError))};Pb.toHaxe=function(a,b){b==null&&(b=0);if(a==null)return[];if(typeof a=="string"){a=a.split("\n");a[0]=="Error"&&a.shift();for(var c=[],d=0,f=a.length;d<f;){var g=d++;if(!(b>g)){var h=a[g];g=h.match(/^    at ([$A-Za-z0-9_. ]+) \(([^)]+):([0-9]+):([0-9]+)\)$/);
if(g!=null){h=g[1].split(".");h[0]=="$hxClasses"&&h.shift();var n=h.pop(),l=g[2],q=H.parseInt(g[3]);g=H.parseInt(g[4]);c.push(Tj.FilePos(n=="Anonymous function"?Tj.LocalFunction():n=="Global code"?null:Tj.Method(h.join("."),n),l,q,g))}else c.push(Tj.Module(N.trim(h)))}}return c}return b>0&&Array.isArray(a)?a.slice(b):a};Pb.tryHaxeStack=function(a){if(a==null)return[];var b=Error.prepareStackTrace;Error.prepareStackTrace=Pb.prepareHxStackTrace;a=a.stack;Error.prepareStackTrace=b;return a};Pb.prepareHxStackTrace=
function(a,b){a=[];for(var c=0;c<b.length;){var d=b[c];++c;Pb.wrapCallSite!=null&&(d=Pb.wrapCallSite(d));var f=null,g=d.getFunctionName();if(g!=null){var h=g.lastIndexOf(".");h>=0?(f=g.substring(0,h),g=g.substring(h+1),f=Tj.Method(f,g)):f=Tj.Method(null,g)}g=d.getFileName();h=g==null?-1:g.indexOf("file:");Pb.wrapCallSite!=null&&h>0&&(g=g.substring(h+6));a.push(Tj.FilePos(f,g,d.getLineNumber(),d.getColumnNumber()))}return a};Pb.normalize=function(a,b){b==null&&(b=0);if(Array.isArray(a)&&b>0)return a.slice(b);
if(typeof a=="string"){switch(a.substring(0,6)){case "Error\n":case "Error:":++b}return Pb.skipLines(a,b)}return a};Pb.skipLines=function(a,b,c){c==null&&(c=0);return b>0?(c=a.indexOf("\n",c),c<0?"":Pb.skipLines(a,--b,c+1)):a.substring(c)};var Bg=function(){this.buf=new nb;this.cache=[];this.useCache=Bg.USE_CACHE;this.useEnumIndex=Bg.USE_ENUM_INDEX;this.shash=new G;this.scount=0};t["haxe.Serializer"]=Bg;Bg.__name__="haxe.Serializer";Bg.run=function(a){var b=new Bg;b.serialize(a);return b.toString()};
Bg.prototype={buf:null,cache:null,shash:null,scount:null,useCache:null,useEnumIndex:null,toString:function(){return this.buf.b},serializeString:function(a){var b=this.shash.h[a];b!=null?(this.buf.b+="R",this.buf.b+=b==null?"null":""+b):(this.shash.h[a]=this.scount++,this.buf.b+="y",a=encodeURIComponent(a),this.buf.b+=H.string(a.length),this.buf.b+=":",this.buf.b+=a==null?"null":""+a)},serializeRef:function(a){for(var b=typeof a,c=0,d=this.cache.length;c<d;){var f=c++,g=this.cache[f];if(typeof g==
b&&g==a)return this.buf.b+="r",this.buf.b+=f==null?"null":""+f,!0}this.cache.push(a);return!1},serializeFields:function(a){for(var b=0,c=y.fields(a);b<c.length;){var d=c[b];++b;this.serializeString(d);this.serialize(y.field(a,d))}this.buf.b+="g"},serialize:function(a){var b=ab.typeof(a);switch(b._hx_index){case 0:this.buf.b+="n";break;case 1:if(a==0){this.buf.b+="z";break}this.buf.b+="i";this.buf.b+=a==null?"null":""+a;break;case 2:isNaN(a)?this.buf.b+="k":isFinite(a)?(this.buf.b+="d",this.buf.b+=
a==null?"null":""+a):this.buf.b+=a<0?"m":"p";break;case 3:this.buf.b+=a?"t":"f";break;case 4:w.__instanceof(a,kw)?(a=a.__name__,this.buf.b+="A",this.serializeString(a)):w.__instanceof(a,Rz)?(this.buf.b+="B",this.serializeString(a.__ename__)):this.useCache&&this.serializeRef(a)||(this.buf.b+="o",this.serializeFields(a));break;case 5:throw ba.thrown("Cannot serialize function");case 6:b=b.c;if(b==String){this.serializeString(a);break}if(this.useCache&&this.serializeRef(a))break;switch(b){case Array:var c=
0;this.buf.b+="a";for(var d=0,f=a.length;d<f;)b=d++,a[b]==null?++c:(c>0&&(c==1?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=c==null?"null":""+c),c=0),this.serialize(a[b]));c>0&&(c==1?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=c==null?"null":""+c));this.buf.b+="h";break;case Date:this.buf.b+="v";this.buf.b+=H.string(a.getTime());break;case Od:this.buf.b+="q";for(b=a.keys();b.hasNext();)c=b.next(),this.buf.b+=":",this.buf.b+=c==null?"null":""+c,this.serialize(a.h[c]);this.buf.b+="h";break;case hb:this.buf.b+=
"l";for(a=a.h;a!=null;)b=a.item,a=a.next,this.serialize(b);this.buf.b+="h";break;case Ta:this.buf.b+="M";for(b=a.keys();b.hasNext();){c=b.next();var g=y.field(c,"__id__");y.deleteField(c,"__id__");this.serialize(c);c.__id__=g;this.serialize(a.h[c.__id__])}this.buf.b+="h";break;case G:this.buf.b+="b";c=Object.keys(a.h);g=c.length;for(d=0;d<g;)b=c[d++],this.serializeString(b),this.serialize(a.h[b]);this.buf.b+="h";break;case Oa:this.buf.b+="s";this.buf.b+=H.string(Math.ceil(a.length*8/6));this.buf.b+=
":";b=0;c=a.length-2;g=Bg.BASE64_CODES;if(g==null){g=Array(Bg.BASE64.length);d=0;for(f=Bg.BASE64.length;d<f;){var h=d++;g[h]=V.cca(Bg.BASE64,h)}Bg.BASE64_CODES=g}for(;b<c;)d=a.b[b++],f=a.b[b++],h=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[(d<<4|f>>4)&63]),this.buf.b+=String.fromCodePoint(g[(f<<2|h>>6)&63]),this.buf.b+=String.fromCodePoint(g[h&63]);b==c?(d=a.b[b++],f=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[(d<<
4|f>>4)&63]),this.buf.b+=String.fromCodePoint(g[f<<2&63])):b==c+1&&(d=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[d<<4&63]));break;default:this.useCache&&this.cache.pop(),a.hxSerialize!=null?(this.buf.b+="C",this.serializeString(b.__name__),this.useCache&&this.cache.push(a),a.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(b.__name__),this.useCache&&this.cache.push(a),this.serializeFields(a))}break;case 7:b=b.e;if(this.useCache){if(this.serializeRef(a))break;
this.cache.pop()}this.buf.b+=H.string(this.useEnumIndex?"j":"w");this.serializeString(b.__ename__);this.useEnumIndex?(this.buf.b+=":",this.buf.b+=H.string(a._hx_index)):(b=a,this.serializeString(R[b.__enum__].__constructs__[b._hx_index]._hx_name));this.buf.b+=":";c=ab.enumParameters(a);this.buf.b+=H.string(c.length);for(b=0;b<c.length;)g=c[b],++b,this.serialize(g);this.useCache&&this.cache.push(a);break;default:throw ba.thrown("Cannot serialize "+H.string(a));}},__class__:Bg};var Gc=function(a){var b=
this;this.id=setInterval(function(){b.run()},a)};t["haxe.Timer"]=Gc;Gc.__name__="haxe.Timer";Gc.delay=function(a,b){var c=new Gc(b);c.run=function(){c.stop();a()};return c};Gc.measure=function(a,b){var c=(new Date).getTime()/1E3;a=a();De.trace((new Date).getTime()/1E3-c+"s",b);return a};Gc.stamp=function(){return(new Date).getTime()/1E3};Gc.prototype={id:null,stop:function(){this.id!=null&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:Gc};var Gt=function(){};t["haxe._Unserializer.DefaultResolver"]=
Gt;Gt.__name__="haxe._Unserializer.DefaultResolver";Gt.prototype={resolveClass:function(a){return t[a]},resolveEnum:function(a){return R[a]},__class__:Gt};var Pg=function(a){this.buf=a;this.length=this.buf.length;this.pos=0;this.scache=[];this.cache=[];a=Pg.DEFAULT_RESOLVER;a==null&&(a=new Gt,Pg.DEFAULT_RESOLVER=a);this.resolver=a};t["haxe.Unserializer"]=Pg;Pg.__name__="haxe.Unserializer";Pg.initCodes=function(){for(var a=[],b=0,c=Pg.BASE64.length;b<c;){var d=b++;a[Pg.BASE64.charCodeAt(d)]=d}return a};
Pg.run=function(a){return(new Pg(a)).unserialize()};Pg.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,setResolver:function(a){a==null?(Zn.instance==null&&(Zn.instance=new Zn),this.resolver=Zn.instance):this.resolver=a},readDigits:function(){for(var a=0,b=!1,c=this.pos;;){var d=this.buf.charCodeAt(this.pos);if(d!=d)break;if(d==45){if(this.pos!=c)break;b=!0}else{if(d<48||d>57)break;a=a*10+(d-48)}this.pos++}b&&(a*=-1);return a},readFloat:function(){for(var a=this.pos;;){var b=
this.buf.charCodeAt(this.pos);if(b!=b)break;if(b>=43&&b<58||b==101||b==69)this.pos++;else break}return parseFloat(V.substr(this.buf,a,this.pos-a))},unserializeObject:function(a){for(;;){if(this.pos>=this.length)throw ba.thrown("Invalid object");if(this.buf.charCodeAt(this.pos)==103)break;var b=this.unserialize();if(typeof b!="string")throw ba.thrown("Invalid object key");var c=this.unserialize();a[b]=c}this.pos++},unserializeEnum:function(a,b){if(this.buf.charCodeAt(this.pos++)!=58)throw ba.thrown("Invalid enum format");
var c=this.readDigits();if(c==0)return ab.createEnum(a,b);for(var d=[];c-- >0;)d.push(this.unserialize());return ab.createEnum(a,b,d)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var a=this.unserialize(),b=this.resolver.resolveClass(a);if(b==null)throw ba.thrown("Class not found "+a);return b;case 66:a=this.unserialize();b=this.resolver.resolveEnum(a);if(b==null)throw ba.thrown("Enum not found "+a);return b;case 67:a=this.unserialize();b=this.resolver.resolveClass(a);if(b==
null)throw ba.thrown("Class not found "+a);b=Object.create(b.prototype);this.cache.push(b);b.hxUnserialize(this);if(this.buf.charCodeAt(this.pos++)!=103)throw ba.thrown("Invalid custom data");return b;case 77:a=new Ta;this.cache.push(a);for(var c;this.buf.charCodeAt(this.pos)!=104;)b=this.unserialize(),a.set(b,this.unserialize());this.pos++;return a;case 82:a=this.readDigits();if(a<0||a>=this.scache.length)throw ba.thrown("Invalid string reference");return this.scache[a];case 97:b=[];for(this.cache.push(b);;){c=
this.buf.charCodeAt(this.pos);if(c==104){this.pos++;break}c==117?(this.pos++,a=this.readDigits(),b[b.length+a-1]=null):b.push(this.unserialize())}return b;case 98:a=new G;for(this.cache.push(a);this.buf.charCodeAt(this.pos)!=104;)b=this.unserialize(),c=this.unserialize(),a.h[b]=c;this.pos++;return a;case 99:a=this.unserialize();b=this.resolver.resolveClass(a);if(b==null)throw ba.thrown("Class not found "+a);b=Object.create(b.prototype);this.cache.push(b);this.unserializeObject(b);return b;case 100:return this.readFloat();
case 102:return!1;case 105:return this.readDigits();case 106:a=this.unserialize();c=this.resolver.resolveEnum(a);if(c==null)throw ba.thrown("Enum not found "+a);this.pos++;for(var d=this.readDigits(),f=c.__constructs__,g=Array(f.length),h=0,n=f.length;h<n;)b=h++,g[b]=f[b]._hx_name;b=g[d];if(b==null)throw ba.thrown("Unknown enum index "+a+"@"+d);b=this.unserializeEnum(c,b);this.cache.push(b);return b;case 107:return NaN;case 108:b=new hb;for(this.cache.push(b);this.buf.charCodeAt(this.pos)!=104;)b.add(this.unserialize());
this.pos++;return b;case 109:return-Infinity;case 110:return null;case 111:return b={},this.cache.push(b),this.unserializeObject(b),b;case 112:return Infinity;case 113:a=new Od;this.cache.push(a);for(c=this.buf.charCodeAt(this.pos++);c==58;)b=this.readDigits(),c=this.unserialize(),a.h[b]=c,c=this.buf.charCodeAt(this.pos++);if(c!=104)throw ba.thrown("Invalid IntMap format");return a;case 114:a=this.readDigits();if(a<0||a>=this.cache.length)throw ba.thrown("Invalid reference");return this.cache[a];
case 115:a=this.readDigits();c=this.buf;if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos<a)throw ba.thrown("Invalid bytes length");d=Pg.CODES;d==null&&(d=Pg.initCodes(),Pg.CODES=d);b=this.pos;f=a&3;g=b+(a-f);h=new Oa(new ArrayBuffer((a>>2)*3+(f>=2?f-1:0)));for(n=0;b<g;){var l=d[c.charCodeAt(b++)],q=d[c.charCodeAt(b++)];h.b[n++]=l<<2|q>>4;l=d[c.charCodeAt(b++)];h.b[n++]=q<<4|l>>2;q=d[c.charCodeAt(b++)];h.b[n++]=l<<6|q}f>=2&&(l=d[c.charCodeAt(b++)],q=d[c.charCodeAt(b++)],h.b[n++]=l<<2|q>>
4,f==3&&(l=d[c.charCodeAt(b++)],h.b[n++]=q<<4|l>>2));this.pos+=a;this.cache.push(h);return h;case 116:return!0;case 118:return this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&this.buf.charCodeAt(this.pos+4)==45?(b=V.strDate(V.substr(this.buf,this.pos,19)),this.pos+=
19):b=new Date(this.readFloat()),this.cache.push(b),b;case 119:a=this.unserialize();c=this.resolver.resolveEnum(a);if(c==null)throw ba.thrown("Enum not found "+a);b=this.unserializeEnum(c,this.unserialize());this.cache.push(b);return b;case 120:throw ba.thrown(this.unserialize());case 121:a=this.readDigits();if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos<a)throw ba.thrown("Invalid string length");b=V.substr(this.buf,this.pos,a);this.pos+=a;b=decodeURIComponent(b.split("+").join(" "));
this.scache.push(b);return b;case 122:return 0}this.pos--;throw ba.thrown("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos);},__class__:Pg};var Zn=function(){};t["haxe._Unserializer.NullResolver"]=Zn;Zn.__name__="haxe._Unserializer.NullResolver";Zn.prototype={resolveClass:function(a){return null},resolveEnum:function(a){return null},__class__:Zn};var Tp=function(a,b,c){ba.call(this,String(a),b,c);this.value=a;this.__skipStack++};t["haxe.ValueException"]=Tp;Tp.__name__="haxe.ValueException";
Tp.__super__=ba;Tp.prototype=I(ba.prototype,{value:null,unwrap:function(){return this.value},__class__:Tp});var Ul=function(){this.a1=1;this.a2=0};t["haxe.crypto.Adler32"]=Ul;Ul.__name__="haxe.crypto.Adler32";Ul.read=function(a){var b=new Ul,c=a.readByte(),d=a.readByte(),f=a.readByte();a=a.readByte();b.a1=f<<8|a;b.a2=c<<8|d;return b};Ul.make=function(a){var b=new Ul;b.update(a,0,a.length);return b.get()};Ul.prototype={a1:null,a2:null,get:function(){return this.a2<<16|this.a1},update:function(a,b,
c){var d=this.a1,f=this.a2,g=b;for(b+=c;g<b;)c=g++,d=(d+a.b[c])%65521,f=(f+d)%65521;this.a1=d;this.a2=f},equals:function(a){return a.a1==this.a1?a.a2==this.a2:!1},toString:function(){return N.hex(this.a2,8)+N.hex(this.a1,8)},__class__:Ul};var nc=function(a,b){nc.initTable();a!=null&&this.init(a,b)};t["haxe.crypto.Aes"]=nc;nc.__name__="haxe.crypto.Aes";nc.initTable=function(){nc.SBOX=Array(256);nc.RSBOX=Array(256);nc.SUB_BYTES_MIX_COLUMN_0=Array(256);nc.SUB_BYTES_MIX_COLUMN_1=Array(256);nc.SUB_BYTES_MIX_COLUMN_2=
Array(256);nc.SUB_BYTES_MIX_COLUMN_3=Array(256);nc.RSUB_BYTES_MIX_COLUMN_0=Array(256);nc.RSUB_BYTES_MIX_COLUMN_1=Array(256);nc.RSUB_BYTES_MIX_COLUMN_2=Array(256);nc.RSUB_BYTES_MIX_COLUMN_3=Array(256);nc.RCON=Array(11);for(var a=Array(256),b=0;b<256;){var c=b++;a[c]=c<128?c<<1:c<<1^283}var d=c=0;for(b=0;b<256;){b++;var f=d^d<<1^d<<2^d<<3^d<<4;f=f>>>8^f&255^99;nc.SBOX[c]=f;nc.RSBOX[f]=c;var g=a[c],h=a[g],n=a[h],l=a[f]*257^Sz._mul(f,16843008);nc.SUB_BYTES_MIX_COLUMN_0[c]=l<<24|l>>>8;nc.SUB_BYTES_MIX_COLUMN_1[c]=
l<<16|l>>>16;nc.SUB_BYTES_MIX_COLUMN_2[c]=l<<8|l>>>24;nc.SUB_BYTES_MIX_COLUMN_3[c]=l;l=n*16843009^h*65537^g*257^c*16843008;nc.RSUB_BYTES_MIX_COLUMN_0[f]=l<<24|l>>>8;nc.RSUB_BYTES_MIX_COLUMN_1[f]=l<<16|l>>>16;nc.RSUB_BYTES_MIX_COLUMN_2[f]=l<<8|l>>>24;nc.RSUB_BYTES_MIX_COLUMN_3[f]=l;c==0?c=d=1:(c=g^a[a[a[n^g]]],d^=a[a[d]])}nc.RCON[0]=0;nc.RCON[1]=1;nc.RCON[2]=2;nc.RCON[3]=4;nc.RCON[4]=8;nc.RCON[5]=16;nc.RCON[6]=32;nc.RCON[7]=64;nc.RCON[8]=128;nc.RCON[9]=27;nc.RCON[10]=54};nc.prototype={Nk:null,Nr:null,
roundKey:null,rRoundKey:null,keyRows:null,state:null,key:null,iv:null,set_iv:function(a){return this.iv=a},init:function(a,b){this.key=a;this.Nk=a.length>>2;this.Nr=this.Nk+6;this.keyRows=(this.Nr+1)*4;this.state=Array(this.Nk);this.set_iv(b);this.keyExpansion(a)},keyExpansion:function(a){this.roundKey=Array(this.keyRows);for(var b=0,c=this.keyRows;b<c;){var d=b++;if(d<this.Nk)this.roundKey[d]=this.bytesToInt32(a,d<<2);else{var f=this.roundKey[d-1];d%this.Nk==0?(f=f<<8|f>>>24,f=nc.SBOX[f>>>24]<<24|
nc.SBOX[f>>>16&255]<<16|nc.SBOX[f>>>8&255]<<8|nc.SBOX[f&255],f^=nc.RCON[Math.floor(d/this.Nk)|0]<<24):this.Nk>6&&d%this.Nk==4&&(f=nc.SBOX[f>>>24]<<24|nc.SBOX[f>>>16&255]<<16|nc.SBOX[f>>>8&255]<<8|nc.SBOX[f&255]);this.roundKey[d]=this.roundKey[d-this.Nk]^f}}this.rRoundKey=Array(this.keyRows);b=0;for(c=this.keyRows;b<c;)d=b++,a=this.keyRows-d,f=d%4!=0?this.roundKey[a]:this.roundKey[a-4],this.rRoundKey[d]=d<4||a<=4?f:nc.RSUB_BYTES_MIX_COLUMN_0[nc.SBOX[f>>>24]]^nc.RSUB_BYTES_MIX_COLUMN_1[nc.SBOX[f>>>
16&255]]^nc.RSUB_BYTES_MIX_COLUMN_2[nc.SBOX[f>>>8&255]]^nc.RSUB_BYTES_MIX_COLUMN_3[nc.SBOX[f&255]]},getBlockSize:function(){return 16},encrypt:function(a,b,c,d,f,g){f==null&&(f=16);c==null&&(c="NoPadding");switch(c){case "AnsiX923":var h=Ht.pad(b,16);break;case "BitPadding":h=Up.pad(b,16);break;case "ISO10126":h=It.pad(b,16);break;case "NoPadding":h=Jt.pad(b,16);break;case "NullPadding":h=Kt.pad(b,16);break;case "PKCS7":h=Lt.pad(b,16);break;case "SpacePadding":h=Mt.pad(b,16);break;case "TBC":h=Nt.pad(b,
16)}switch(a){case "cbc":Ot.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "ccm":return qg.encrypt(h,this.iv,d,f,16,m(this,this.encryptBlock));case "cfb":Pt.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "ctr":pk.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "eax":return Eh.encrypt(h,this.key,this.iv,m(this,this.encryptBlock),g);case "ecb":Qt.encrypt(h,16,m(this,this.encryptBlock));break;case "gcm":return hf.encrypt(h,this.iv,d,f,16,m(this,this.encryptBlock));
case "gcmsiv":return cc.encrypt(this.key,this.iv,h,d,m(this,this.encryptBlock),m(this,this.init));case "ofb":Vp.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "pcbc":Rt.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "siv":return ag.encrypt(this.key,h,this.iv,g,m(this,this.encryptBlock),m(this,this.init))}return h},decrypt:function(a,b,c,d,f,g){f==null&&(f=16);c==null&&(c="NoPadding");b=b.sub(0,b.length);switch(a){case "cbc":Ot.decrypt(b,this.iv,16,m(this,this.decryptBlock));
break;case "ccm":return qg.decrypt(b,this.iv,d,f,16,m(this,this.encryptBlock));case "cfb":Pt.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "ctr":pk.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "eax":return Eh.decrypt(b,this.key,this.iv,m(this,this.encryptBlock),g);case "ecb":Qt.decrypt(b,16,m(this,this.decryptBlock));break;case "gcm":return hf.decrypt(b,this.iv,d,f,16,m(this,this.encryptBlock));case "gcmsiv":return cc.decrypt(this.key,this.iv,b,d,m(this,this.encryptBlock),
m(this,this.init));case "ofb":Vp.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "pcbc":Rt.decrypt(b,this.iv,16,m(this,this.decryptBlock));break;case "siv":return ag.decrypt(this.key,b,this.iv,g,m(this,this.encryptBlock),m(this,this.init))}switch(c){case "AnsiX923":b=Ht.unpad(b);break;case "BitPadding":b=Up.unpad(b);break;case "ISO10126":b=It.unpad(b);break;case "NoPadding":b=Jt.unpad(b);break;case "NullPadding":b=Kt.unpad(b);break;case "PKCS7":b=Lt.unpad(b);break;case "SpacePadding":b=
Mt.unpad(b);break;case "TBC":b=Nt.unpad(b)}return b},encryptBlock:function(a,b,c,d){this.state[0]=this.bytesToInt32(a,b);this.state[1]=this.bytesToInt32(a,b+4);this.state[2]=this.bytesToInt32(a,b+8);this.state[3]=this.bytesToInt32(a,b+12);this.generateBlock(this.roundKey,nc.SUB_BYTES_MIX_COLUMN_0,nc.SUB_BYTES_MIX_COLUMN_1,nc.SUB_BYTES_MIX_COLUMN_2,nc.SUB_BYTES_MIX_COLUMN_3,nc.SBOX);this.int32ToBytes(this.state[0],c,d);this.int32ToBytes(this.state[1],c,d+4);this.int32ToBytes(this.state[2],c,d+8);this.int32ToBytes(this.state[3],
c,d+12)},decryptBlock:function(a,b,c,d){d==null&&(d=0);this.state[0]=this.bytesToInt32(a,b);this.state[1]=this.bytesToInt32(a,b+4);this.state[2]=this.bytesToInt32(a,b+8);this.state[3]=this.bytesToInt32(a,b+12);a=this.state[1];this.state[1]=this.state[3];this.state[3]=a;this.generateBlock(this.rRoundKey,nc.RSUB_BYTES_MIX_COLUMN_0,nc.RSUB_BYTES_MIX_COLUMN_1,nc.RSUB_BYTES_MIX_COLUMN_2,nc.RSUB_BYTES_MIX_COLUMN_3,nc.RSBOX);a=this.state[1];this.state[1]=this.state[3];this.state[3]=a;this.int32ToBytes(this.state[0],
c,d);this.int32ToBytes(this.state[1],c,d+4);this.int32ToBytes(this.state[2],c,d+8);this.int32ToBytes(this.state[3],c,d+12)},generateBlock:function(a,b,c,d,f,g){for(var h=this.state[0]^a[0],n=this.state[1]^a[1],l=this.state[2]^a[2],q=this.state[3]^a[3],u=4,v,z,r,F=1,J=this.Nr;F<J;)F++,v=b[h>>>24]^c[n>>>16&255]^d[l>>>8&255]^f[q&255]^a[u++],z=b[n>>>24]^c[l>>>16&255]^d[q>>>8&255]^f[h&255]^a[u++],r=b[l>>>24]^c[q>>>16&255]^d[h>>>8&255]^f[n&255]^a[u++],q=b[q>>>24]^c[h>>>16&255]^d[n>>>8&255]^f[l&255]^a[u++],
h=v,n=z,l=r;v=(g[h>>>24]<<24|g[n>>>16&255]<<16|g[l>>>8&255]<<8|g[q&255])^a[u++];z=(g[n>>>24]<<24|g[l>>>16&255]<<16|g[q>>>8&255]<<8|g[h&255])^a[u++];r=(g[l>>>24]<<24|g[q>>>16&255]<<16|g[h>>>8&255]<<8|g[n&255])^a[u++];q=(g[q>>>24]<<24|g[h>>>16&255]<<16|g[n>>>8&255]<<8|g[l&255])^a[u++];this.state[0]=v;this.state[1]=z;this.state[2]=r;this.state[3]=q},bytesToInt32:function(a,b){var c=(a.b[b]&255)<<24;c|=(a.b[++b]&255)<<16;c|=(a.b[++b]&255)<<8;return c|=a.b[++b]&255},int32ToBytes:function(a,b,c){b.b[c]=
a>>24;b.b[++c]=a>>16;b.b[++c]=a>>8;b.b[++c]=a},__class__:nc,__properties__:{set_iv:"set_iv"}};var Oa=function(a){this.length=a.byteLength;this.b=new Uint8Array(a);this.b.bufferValue=a;a.hxBytes=this;a.bytes=this.b};t["haxe.io.Bytes"]=Oa;Oa.__name__="haxe.io.Bytes";Oa.ofString=function(a,b){if(b==Wp.RawNative){for(var c=new Uint8Array(a.length<<1),d=0,f=a.length;d<f;){b=d++;var g=a.charCodeAt(b);c[b<<1]=g&255;c[b<<1|1]=g>>8}return new Oa(c.buffer)}c=[];for(b=0;b<a.length;)g=a.charCodeAt(b++),55296<=
g&&g<=56319&&(g=g-55232<<10|a.charCodeAt(b++)&1023),g<=127?c.push(g):(g<=2047?c.push(192|g>>6):(g<=65535?c.push(224|g>>12):(c.push(240|g>>18),c.push(128|g>>12&63)),c.push(128|g>>6&63)),c.push(128|g&63));return new Oa((new Uint8Array(c)).buffer)};Oa.ofData=function(a){var b=a.hxBytes;return b!=null?b:new Oa(a)};Oa.ofHex=function(a){if((a.length&1)!=0)throw ba.thrown("Not a hex string (odd number of digits)");for(var b=[],c=0,d=a.length>>1;c<d;){var f=a.charCodeAt(c*2),g=a.charCodeAt(c*2+1);f=(f&15)+
((f&64)>>6)*9;g=(g&15)+((g&64)>>6)*9;b.push((f<<4|g)&255);++c}return new Oa((new Uint8Array(b)).buffer)};Oa.prototype={length:null,b:null,data:null,blit:function(a,b,c,d){if(a<0||c<0||d<0||a+d>this.length||c+d>b.length)throw ba.thrown(Yh.OutsideBounds);c==0&&d==b.b.byteLength?this.b.set(b.b,a):this.b.set(b.b.subarray(c,c+d),a)},sub:function(a,b){if(a<0||b<0||a+b>this.length)throw ba.thrown(Yh.OutsideBounds);return new Oa(this.b.buffer.slice(a+this.b.byteOffset,a+this.b.byteOffset+b))},getDouble:function(a){this.data==
null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat64(a,!0)},getFloat:function(a){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat32(a,!0)},setFloat:function(a,b){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setFloat32(a,b,!0)},setUInt16:function(a,b){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,
this.b.byteLength));this.data.setUint16(a,b,!0)},getInt32:function(a){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getInt32(a,!0)},setInt32:function(a,b){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setInt32(a,b,!0)},getString:function(a,b,c){if(a<0||b<0||a+b>this.length)throw ba.thrown(Yh.OutsideBounds);c==null&&(c=Wp.UTF8);var d="",f=this.b,g=a;a+=b;switch(c._hx_index){case 0:for(;g<
a;)if(c=f[g++],c<128){if(c==0)break;d+=String.fromCodePoint(c)}else if(c<224)c=(c&63)<<6|f[g++]&127,d+=String.fromCodePoint(c);else if(c<240)b=f[g++],c=(c&31)<<12|(b&127)<<6|f[g++]&127,d+=String.fromCodePoint(c);else{b=f[g++];var h=f[g++];c=(c&15)<<18|(b&127)<<12|(h&127)<<6|f[g++]&127;d+=String.fromCodePoint(c)}break;case 1:for(;g<a;)c=f[g++]|f[g++]<<8,d+=String.fromCodePoint(c)}return d},toString:function(){return this.getString(0,this.length)},toHex:function(){for(var a="",b=[],c=0,d=16;c<d;){var f=
c++;b.push(V.cca("0123456789abcdef",f))}c=0;for(d=this.length;c<d;)f=c++,f=this.b[f],a+=String.fromCodePoint(b[f>>4]),a+=String.fromCodePoint(b[f&15]);return a},__class__:Oa};var Wp=R["haxe.io.Encoding"]={__ename__:"haxe.io.Encoding",__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:E},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:E}};Wp.__constructs__=[Wp.UTF8,Wp.RawNative];var Li=function(){};t["haxe.crypto.Base64"]=Li;
Li.__name__="haxe.crypto.Base64";Li.encode=function(a,b){b==null&&(b=!0);var c=(new St(Li.BYTES)).encodeBytes(a).toString();if(b)switch(a.length%3){case 1:c+="==";break;case 2:c+="="}return c};Li.decode=function(a,b){b==null&&(b=!0);if(b)for(;V.cca(a,a.length-1)==61;)a=V.substr(a,0,-1);return(new St(Li.BYTES)).decodeBytes(Oa.ofString(a))};var St=function(a){for(var b=a.length,c=1;b>1<<c;)++c;if(c>8||b!=1<<c)throw ba.thrown("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};
t["haxe.crypto.BaseCode"]=St;St.__name__="haxe.crypto.BaseCode";St.prototype={base:null,nbits:null,tbl:null,encodeBytes:function(a){for(var b=this.nbits,c=this.base,d=a.length*8/b|0,f=new Oa(new ArrayBuffer(d+(a.length*8%b==0?0:1))),g=0,h=0,n=(1<<b)-1,l=0,q=0;q<d;){for(;h<b;)h+=8,g<<=8,g|=a.b[l++];h-=b;f.b[q++]=c.b[g>>h&n]}h>0&&(f.b[q++]=c.b[g<<b-h&n]);return f},initTable:function(){for(var a=[],b=0;b<256;){var c=b++;a[c]=-1}b=0;for(var d=this.base.length;b<d;)c=b++,a[this.base.b[c]]=c;this.tbl=a},
decodeBytes:function(a){var b=this.nbits;this.tbl==null&&this.initTable();for(var c=this.tbl,d=a.length*b>>3,f=new Oa(new ArrayBuffer(d)),g=0,h=0,n=0,l=0;l<d;){for(;h<8;){h+=b;g<<=b;var q=c[a.b[n++]];if(q==-1)throw ba.thrown("BaseCode : invalid encoded char");g|=q}h-=8;f.b[l++]=g>>h&255}return f},__class__:St};var Mj=function(){};t["haxe.crypto.Md5"]=Mj;Mj.__name__="haxe.crypto.Md5";Mj.encode=function(a){var b=new Mj;a=b.doEncode(Mj.str2blks(a));return b.hex(a)};Mj.make=function(a){a=(new Mj).doEncode(Mj.bytes2blks(a));
var b=new Oa(new ArrayBuffer(16)),c=0;b.b[c++]=a[0]&255;b.b[c++]=a[0]>>8&255;b.b[c++]=a[0]>>16&255;b.b[c++]=a[0]>>>24;b.b[c++]=a[1]&255;b.b[c++]=a[1]>>8&255;b.b[c++]=a[1]>>16&255;b.b[c++]=a[1]>>>24;b.b[c++]=a[2]&255;b.b[c++]=a[2]>>8&255;b.b[c++]=a[2]>>16&255;b.b[c++]=a[2]>>>24;b.b[c++]=a[3]&255;b.b[c++]=a[3]>>8&255;b.b[c++]=a[3]>>16&255;b.b[c++]=a[3]>>>24;return b};Mj.bytes2blks=function(a){for(var b=(a.length+8>>6)+1,c=[],d=0,f=b*16;d<f;){var g=d++;c[g]=0}for(g=0;g<a.length;)c[g>>2]|=a.b[g]<<(((a.length<<
3)+g&3)<<3),++g;c[g>>2]|=128<<(a.length*8+g)%4*8;a=a.length*8;b=b*16-2;c[b]=a&255;c[b]|=(a>>>8&255)<<8;c[b]|=(a>>>16&255)<<16;c[b]|=(a>>>24&255)<<24;return c};Mj.str2blks=function(a){var b=Oa.ofString(a),c=(b.length+8>>6)+1;a=[];for(var d=0,f=c*16;d<f;){var g=d++;a[g]=0}g=0;f=b.length;for(d=f*8;g<f;)a[g>>2]|=b.b[g]<<(d+g)%4*8,++g;a[g>>2]|=128<<(d+g)%4*8;b=c*16-2;a[b]=d&255;a[b]|=(d>>>8&255)<<8;a[b]|=(d>>>16&255)<<16;a[b]|=(d>>>24&255)<<24;return a};Mj.prototype={bitOR:function(a,b){return(a>>>1|b>>>
1)<<1|a&1|b&1},bitXOR:function(a,b){return(a>>>1^b>>>1)<<1|a&1^b&1},bitAND:function(a,b){return(a>>>1&b>>>1)<<1|a&1&b&1},addme:function(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535},hex:function(a){for(var b="",c=0;c<a.length;){var d=a[c];++c;b+="0123456789abcdef".charAt(d>>4&15)+"0123456789abcdef".charAt(d&15);b+="0123456789abcdef".charAt(d>>12&15)+"0123456789abcdef".charAt(d>>8&15);b+="0123456789abcdef".charAt(d>>20&15)+"0123456789abcdef".charAt(d>>16&15);b+="0123456789abcdef".charAt(d>>
28&15)+"0123456789abcdef".charAt(d>>24&15)}return b},rol:function(a,b){return a<<b|a>>>32-b},cmn:function(a,b,c,d,f,g){return this.addme(this.rol(this.addme(this.addme(b,a),this.addme(d,g)),f),c)},ff:function(a,b,c,d,f,g,h){return this.cmn(this.bitOR(this.bitAND(b,c),this.bitAND(~b,d)),a,b,f,g,h)},gg:function(a,b,c,d,f,g,h){return this.cmn(this.bitOR(this.bitAND(b,d),this.bitAND(c,~d)),a,b,f,g,h)},hh:function(a,b,c,d,f,g,h){return this.cmn(this.bitXOR(this.bitXOR(b,c),d),a,b,f,g,h)},ii:function(a,
b,c,d,f,g,h){return this.cmn(this.bitXOR(c,this.bitOR(b,~d)),a,b,f,g,h)},doEncode:function(a){for(var b=1732584193,c=-271733879,d=-1732584194,f=271733878,g=0;g<a.length;){var h=b,n=c,l=d,q=f;b=this.ff(b,c,d,f,a[g],7,-680876936);f=this.ff(f,b,c,d,a[g+1],12,-389564586);d=this.ff(d,f,b,c,a[g+2],17,606105819);c=this.ff(c,d,f,b,a[g+3],22,-1044525330);b=this.ff(b,c,d,f,a[g+4],7,-176418897);f=this.ff(f,b,c,d,a[g+5],12,1200080426);d=this.ff(d,f,b,c,a[g+6],17,-1473231341);c=this.ff(c,d,f,b,a[g+7],22,-45705983);
b=this.ff(b,c,d,f,a[g+8],7,1770035416);f=this.ff(f,b,c,d,a[g+9],12,-1958414417);d=this.ff(d,f,b,c,a[g+10],17,-42063);c=this.ff(c,d,f,b,a[g+11],22,-1990404162);b=this.ff(b,c,d,f,a[g+12],7,1804603682);f=this.ff(f,b,c,d,a[g+13],12,-40341101);d=this.ff(d,f,b,c,a[g+14],17,-1502002290);c=this.ff(c,d,f,b,a[g+15],22,1236535329);b=this.gg(b,c,d,f,a[g+1],5,-165796510);f=this.gg(f,b,c,d,a[g+6],9,-1069501632);d=this.gg(d,f,b,c,a[g+11],14,643717713);c=this.gg(c,d,f,b,a[g],20,-373897302);b=this.gg(b,c,d,f,a[g+
5],5,-701558691);f=this.gg(f,b,c,d,a[g+10],9,38016083);d=this.gg(d,f,b,c,a[g+15],14,-660478335);c=this.gg(c,d,f,b,a[g+4],20,-405537848);b=this.gg(b,c,d,f,a[g+9],5,568446438);f=this.gg(f,b,c,d,a[g+14],9,-1019803690);d=this.gg(d,f,b,c,a[g+3],14,-187363961);c=this.gg(c,d,f,b,a[g+8],20,1163531501);b=this.gg(b,c,d,f,a[g+13],5,-1444681467);f=this.gg(f,b,c,d,a[g+2],9,-51403784);d=this.gg(d,f,b,c,a[g+7],14,1735328473);c=this.gg(c,d,f,b,a[g+12],20,-1926607734);b=this.hh(b,c,d,f,a[g+5],4,-378558);f=this.hh(f,
b,c,d,a[g+8],11,-2022574463);d=this.hh(d,f,b,c,a[g+11],16,1839030562);c=this.hh(c,d,f,b,a[g+14],23,-35309556);b=this.hh(b,c,d,f,a[g+1],4,-1530992060);f=this.hh(f,b,c,d,a[g+4],11,1272893353);d=this.hh(d,f,b,c,a[g+7],16,-155497632);c=this.hh(c,d,f,b,a[g+10],23,-1094730640);b=this.hh(b,c,d,f,a[g+13],4,681279174);f=this.hh(f,b,c,d,a[g],11,-358537222);d=this.hh(d,f,b,c,a[g+3],16,-722521979);c=this.hh(c,d,f,b,a[g+6],23,76029189);b=this.hh(b,c,d,f,a[g+9],4,-640364487);f=this.hh(f,b,c,d,a[g+12],11,-421815835);
d=this.hh(d,f,b,c,a[g+15],16,530742520);c=this.hh(c,d,f,b,a[g+2],23,-995338651);b=this.ii(b,c,d,f,a[g],6,-198630844);f=this.ii(f,b,c,d,a[g+7],10,1126891415);d=this.ii(d,f,b,c,a[g+14],15,-1416354905);c=this.ii(c,d,f,b,a[g+5],21,-57434055);b=this.ii(b,c,d,f,a[g+12],6,1700485571);f=this.ii(f,b,c,d,a[g+3],10,-1894986606);d=this.ii(d,f,b,c,a[g+10],15,-1051523);c=this.ii(c,d,f,b,a[g+1],21,-2054922799);b=this.ii(b,c,d,f,a[g+8],6,1873313359);f=this.ii(f,b,c,d,a[g+15],10,-30611744);d=this.ii(d,f,b,c,a[g+6],
15,-1560198380);c=this.ii(c,d,f,b,a[g+13],21,1309151649);b=this.ii(b,c,d,f,a[g+4],6,-145523070);f=this.ii(f,b,c,d,a[g+11],10,-1120210379);d=this.ii(d,f,b,c,a[g+2],15,718787259);c=this.ii(c,d,f,b,a[g+9],21,-343485551);b=this.addme(b,h);c=this.addme(c,n);d=this.addme(d,l);f=this.addme(f,q);g+=16}return[b,c,d,f]},__class__:Mj};var Ot=function(){};t["haxe.crypto.mode.CBC"]=Ot;Ot.__name__="haxe.crypto.mode.CBC";Ot.encrypt=function(a,b,c,d){b=b.b.bufferValue;for(var f=0,g=a.length,h=0;f<g;){for(var n=0,
l=c;n<l;){var q=n++;a.b[f+q]^=b.bytes[h+q]}d(a,f,a,f);h=f;b=a.b.bufferValue;f+=c}};Ot.decrypt=function(a,b,c,d){for(var f=a.length-c,g=a.length;g>0;)if(g-=c,f-=c,d(a,g,a,g),f<0)for(var h=0,n=c;h<n;){var l=h++;a.b[l]^=b.b[l]}else for(h=0,n=c;h<n;)l=h++,a.b[g+l]^=a.b[f+l]};var qg=function(){};t["haxe.crypto.mode.CCM"]=qg;qg.__name__="haxe.crypto.mode.CCM";qg.encrypt=function(a,b,c,d,f,g){if(b.length<7||b.length>13)throw ba.thrown("Nonce length must be between 7 and 13 bytes");if(d<4||d>16||(d&1)!=0)throw ba.thrown("Tag length must be even and between 4 and 16 bytes");
var h=(c.length>0?64:0)|d-2>>1<<3|15-b.length-1,n=new Oa(new ArrayBuffer(f));n.b[0]=h;n.blit(1,b,0,b.length);h=a.length;for(var l=15;h>0;)n.b[l]=h&255,h>>>=8,--l;c=qg.createAuthBlocks(n,c,a,f);c=qg.computeCBCMac(c,f,g);a=qg.encryptCTR(b,a,f,g);b=qg.encryptTag(b,c,d,f,g);f=new Oa(new ArrayBuffer(a.length+d));f.blit(0,a,0,a.length);f.blit(a.length,b,0,d);return f};qg.decrypt=function(a,b,c,d,f,g){if(b.length<7||b.length>13)throw ba.thrown("Nonce length must be between 7 and 13 bytes");if(d<4||d>16||
(d&1)!=0)throw ba.thrown("Tag length must be even and between 4 and 16 bytes");if(a.length<d)throw ba.thrown("Ciphertext too short for specified tag length");var h=a.length-d,n=a.sub(0,h);a=a.sub(h,d);n=qg.encryptCTR(b,n,f,g);var l=(c.length>0?64:0)|d-2>>1<<3|15-b.length-1;h=new Oa(new ArrayBuffer(f));h.b[0]=l;h.blit(1,b,0,b.length);l=n.length;for(var q=15;l>0;)h.b[q]=l&255,l>>>=8,--q;c=qg.createAuthBlocks(h,c,n,f);c=qg.computeCBCMac(c,f,g);b=qg.encryptTag(b,c,d,f,g);if(!qg.constantTimeCompare(b,
a))throw ba.thrown("Authentication failed");return n};qg.createAuthBlocks=function(a,b,c,d){var f=[];f.push(a);if(b.length>0){a=qg.formatAuthData(b);b=0;for(var g=a.length;g>0;){var h=new Oa(new ArrayBuffer(d)),n=g<d?g:d;h.blit(0,a,b,n);f.push(h);b+=d;g-=d}}if(c.length>0)for(b=0,g=c.length;g>0;)h=new Oa(new ArrayBuffer(d)),n=g<d?g:d,h.blit(0,c,b,n),f.push(h),b+=d,g-=d;return f};qg.computeCBCMac=function(a,b,c){for(var d=new Oa(new ArrayBuffer(b)),f=0,g=a.length;f<g;){var h=f++;h=a[h];for(var n=0,
l=b;n<l;){var q=n++;d.b[q]^=h.b[q]}c(d,0,d,0)}return d};qg.formatAuthData=function(a){if(a.length==0)return new Oa(new ArrayBuffer(0));var b=a.length;if(b<65280){var c=new Oa(new ArrayBuffer(2+b));c.b[0]=b>>>8;c.b[1]=b&255;c.blit(2,a,0,b)}else b<=-1?(c=new Oa(new ArrayBuffer(6+b)),c.b[0]=255,c.b[1]=254,c.b[2]=b>>>24,c.b[3]=b>>>16&255,c.b[4]=b>>>8&255,c.b[5]=b&255,c.blit(6,a,0,b)):(c=new Oa(new ArrayBuffer(10+b)),c.b[0]=255,c.b[1]=255,c.b[2]=0,c.b[3]=0,c.b[4]=0,c.b[5]=0,c.b[6]=b>>>24,c.b[7]=b>>>16&
255,c.b[8]=b>>>8&255,c.b[9]=b&255,c.blit(10,a,0,b));return c};qg.encryptCTR=function(a,b,c,d){if(b.length==0)return new Oa(new ArrayBuffer(0));var f=new Oa(new ArrayBuffer(b.length)),g=new Oa(new ArrayBuffer(c)),h=new Oa(new ArrayBuffer(c));g.b[0]=15-a.length-1;g.blit(1,a,0,a.length);a=0;for(var n=1,l=b.length;l>0;){for(var q=n,u=15;q>0;)g.b[u]=q&255,q>>>=8,--u;d(g,0,h,0);q=0;for(u=l<c?l:c;q<u;){var v=q++;f.b[a+v]=b.b[a+v]^h.b[v]}a+=c;l-=c;++n}return f};qg.encryptTag=function(a,b,c,d,f){var g=new Oa(new ArrayBuffer(d));
g.b[0]=15-a.length-1;g.blit(1,a,0,a.length);a=new Oa(new ArrayBuffer(d));f(g,0,a,0);f=new Oa(new ArrayBuffer(c));for(g=0;g<c;)d=g++,f.b[d]=b.b[d]^a.b[d];return f};qg.constantTimeCompare=function(a,b){if(a.length!=b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var Pt=function(){};t["haxe.crypto.mode.CFB"]=Pt;Pt.__name__="haxe.crypto.mode.CFB";Pt.encrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length;f<g;){d(b,0,b,0);for(var h=0,n=f+c>g?g-f:
c;h<n;){var l=h++;a.b[f+l]^=b.b[l];b.b[l]=a.b[f+l]}f+=c}};Pt.decrypt=function(a,b,c,d){var f=b.sub(0,b.length),g=0,h=a.length;for(b=new Oa(new ArrayBuffer(b.length));g<h;){d(f,0,b,0);for(var n=0,l=g+c>h?h-g:c;n<l;){var q=n++;f.b[q]=a.b[g+q];a.b[g+q]^=b.b[q]}g+=c}};var Kf=function(){};t["haxe.crypto.mode.CMAC"]=Kf;Kf.__name__="haxe.crypto.mode.CMAC";Kf.calculate=function(a,b){Kf.aes==null?Kf.aes=new nc(b):Kf.aes.init(b);return Kf.generate(a,b,16,(B=Kf.aes,m(B,B.encryptBlock)))};Kf.generate=function(a,
b,c,d){b=Kf.generateSubkeys(b,c,d);var f=b.k1,g=b.k2,h=a.length,n=Math.ceil(h/c);n==0&&(n=1);if(h==0)b=new Oa(new ArrayBuffer(c)),b.b[0]=128,h=!1;else if(h%c==0)b=a.sub(h-c,c),h=!0;else{var l=h%c;b=new Oa(new ArrayBuffer(c));b.blit(0,a,h-l,l);b.b[l]=128;h=!1}l=h?f:g;f=0;for(g=c;f<g;)h=f++,b.b[h]^=l.b[h];l=new Oa(new ArrayBuffer(c));f=0;for(g=n-1;f<g;){n=f++*c;for(var q=0,u=c;q<u;)h=q++,l.b[h]^=a.b[n+h];d(l,0,l,0)}f=0;for(g=c;f<g;)h=f++,l.b[h]^=b.b[h];d(l,0,l,0);return l};Kf.verify=function(a,b,c,
d){d==null&&(Kf.aes==null?Kf.aes=new nc(c):Kf.aes.init(c),d=(B=Kf.aes,m(B,B.encryptBlock)));a=Kf.generate(a,c,16,d);if(b.length!=a.length)return!1;d=c=0;for(var f=b.length;d<f;){var g=d++;c|=b.b[g]^a.b[g]}return c==0};Kf.generateSubkeys=function(a,b,c){if(b==16)a=135;else if(b==8)a=27;else throw ba.thrown("Unsupported block size for CMAC");var d=(new Oa(new ArrayBuffer(b))).sub(0,b);c(d,0,d,0);c=Kf.leftShiftOnebit(d);(d.b[0]&128)!=0&&(c.b[b-1]^=a);d=Kf.leftShiftOnebit(c);(c.b[0]&128)!=0&&(d.b[b-1]^=
a);return{k1:c,k2:d}};Kf.leftShiftOnebit=function(a){for(var b=new Oa(new ArrayBuffer(a.length)),c=0,d=0,f=a.length;d<f;){var g=d++,h=a.b[a.length-1-g];b.b[a.length-1-g]=(h<<1|c)&255;c=(h&128)!=0?1:0}return b};var pk=function(){};t["haxe.crypto.mode.CTR"]=pk;pk.__name__="haxe.crypto.mode.CTR";pk.encrypt=function(a,b,c,d){var f=new Oa(new ArrayBuffer(b.length));b=b.sub(0,b.length);for(var g=0,h=a.length;g<h;){d(b,0,f,0);for(var n=0,l=g+c>h?h-g:c;n<l;){var q=n++;a.b[g+q]^=f.b[q]}for(n=c;n-- >=0&&(b.b[n]=
b.b[n]+1&255,b.b[n]==0););g+=c}};pk.decrypt=function(a,b,c,d){pk.encrypt(a,b,c,d)};var Eh=function(){};t["haxe.crypto.mode.EAX"]=Eh;Eh.__name__="haxe.crypto.mode.EAX";Eh.encrypt=function(a,b,c,d,f){c=Eh.omac(0,c,b,d);if(f!=null&&f.length>0){for(var g=0,h=0;h<f.length;){var n=f[h];++h;g+=n.length}g=new Oa(new ArrayBuffer(g));var l=0;for(h=0;h<f.length;)n=f[h],++h,g.blit(l,n,0,n.length),l+=n.length;f=Eh.omac(1,g,b,d)}else f=Eh.omac(1,new Oa(new ArrayBuffer(0)),b,d);pk.encrypt(a,c,16,d);d=Eh.omac(2,
a,b,d);b=new Oa(new ArrayBuffer(16));for(h=0;h<16;)n=h++,b.b[n]=c.b[n]^f.b[n]^d.b[n];c=new Oa(new ArrayBuffer(a.length+16));c.blit(0,a,0,a.length);c.blit(a.length,b,0,16);return c};Eh.decrypt=function(a,b,c,d,f){if(a.length<16)return null;var g=a.length-16,h=a.sub(0,g);a=a.sub(g,16);c=Eh.omac(0,c,b,d);if(f!=null&&f.length>0){var n=0;for(g=0;g<f.length;){var l=f[g];++g;n+=l.length}n=new Oa(new ArrayBuffer(n));var q=0;for(g=0;g<f.length;)l=f[g],++g,n.blit(q,l,0,l.length),q+=l.length;f=Eh.omac(1,n,b,
d)}else f=Eh.omac(1,new Oa(new ArrayBuffer(0)),b,d);b=Eh.omac(2,h,b,d);l=new Oa(new ArrayBuffer(16));for(g=0;g<16;)n=g++,l.b[n]=c.b[n]^f.b[n]^b.b[n];if(!Eh.constantTimeEquals(a,l))return null;a=new Oa(new ArrayBuffer(h.length));a.blit(0,h,0,h.length);pk.decrypt(a,c,16,d);return a};Eh.omac=function(a,b,c,d){for(var f=new Oa(new ArrayBuffer(16+b.length)),g=0;g<15;){var h=g++;f.b[h]=0}f.b[15]=a;b.length>0&&f.blit(16,b,0,b.length);return Kf.generate(f,c,16,d)};Eh.constantTimeEquals=function(a,b){if(a.length!=
b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var Qt=function(){};t["haxe.crypto.mode.ECB"]=Qt;Qt.__name__="haxe.crypto.mode.ECB";Qt.encrypt=function(a,b,c){for(var d=0,f=a.length;d<f;)c(a,d,a,d),d+=b};Qt.decrypt=function(a,b,c){for(var d=0,f=a.length;d<f;)c(a,d,a,d),d+=b};var hf=function(){};t["haxe.crypto.mode.GCM"]=hf;hf.__name__="haxe.crypto.mode.GCM";hf.encrypt=function(a,b,c,d,f,g){if(d<4||d>16)throw ba.thrown("Tag length must be between 4 and 16 bytes (32-128 bits)");
c==null&&(c=new Oa(new ArrayBuffer(0)));var h=new Oa(new ArrayBuffer(f));g(new Oa(new ArrayBuffer(f)),0,h,0);b=hf.calculateJ0(h,b);var n=hf.incrementCounter(b);a=a.sub(0,a.length);pk.encrypt(a,n,f,g);c=hf.calculateTag(h,c,a,b,g);f=new Oa(new ArrayBuffer(a.length+d));f.blit(0,a,0,a.length);f.blit(a.length,c,0,d);return f};hf.decrypt=function(a,b,c,d,f,g){if(d<4||d>16)throw ba.thrown("Tag length must be between 4 and 16 bytes (32-128 bits)");if(a.length<d)throw ba.thrown("Ciphertext too short for specified tag length");
var h=a.length-d,n=a.sub(0,h);a=a.sub(h,d);h=new Oa(new ArrayBuffer(f));g(new Oa(new ArrayBuffer(f)),0,h,0);b=hf.calculateJ0(h,b);c=hf.calculateTag(h,c,n,b,g).sub(0,d);if(!hf.constantTimeCompare(c,a))throw ba.thrown("Authentication failed");c=hf.incrementCounter(b);n=n.sub(0,n.length);pk.encrypt(n,c,f,g);return n};hf.calculateJ0=function(a,b){if(b.length==12){var c=new Oa(new ArrayBuffer(16));c.blit(0,b,0,12);c.b[15]=1}else{c=new Oa(new ArrayBuffer(16));c=hf.ghashUpdate(a,c,b);var d=new Oa(new ArrayBuffer(16));
b=b.length*8;d.b[12]=b>>>24&255;d.b[13]=b>>>16&255;d.b[14]=b>>>8&255;d.b[15]=b&255;c=hf.ghashUpdate(a,c,d)}return c};hf.incrementCounter=function(a){a=a.sub(0,a.length);for(var b=1,c=15;b>0&&c>=12;)b=a.b[c]+b,a.b[c]=b&255,b>>>=8,--c;return a};hf.calculateTag=function(a,b,c,d,f){a=hf.ghash(a,b,c);b=new Oa(new ArrayBuffer(16));f(d,0,b,0);a.b[0]^=b.b[0];a.b[1]^=b.b[1];a.b[2]^=b.b[2];a.b[3]^=b.b[3];a.b[4]^=b.b[4];a.b[5]^=b.b[5];a.b[6]^=b.b[6];a.b[7]^=b.b[7];a.b[8]^=b.b[8];a.b[9]^=b.b[9];a.b[10]^=b.b[10];
a.b[11]^=b.b[11];a.b[12]^=b.b[12];a.b[13]^=b.b[13];a.b[14]^=b.b[14];a.b[15]^=b.b[15];return a};hf.ghash=function(a,b,c){var d=new Oa(new ArrayBuffer(16));b.length>0&&(d=hf.ghashUpdate(a,d,b));c.length>0&&(d=hf.ghashUpdate(a,d,c));var f=new Oa(new ArrayBuffer(16));b=b.length*8;c=c.length*8;f.b[4]=b>>>24&255;f.b[5]=b>>>16&255;f.b[6]=b>>>8&255;f.b[7]=b&255;f.b[12]=c>>>24&255;f.b[13]=c>>>16&255;f.b[14]=c>>>8&255;f.b[15]=c&255;d.b[0]^=f.b[0];d.b[1]^=f.b[1];d.b[2]^=f.b[2];d.b[3]^=f.b[3];d.b[4]^=f.b[4];
d.b[5]^=f.b[5];d.b[6]^=f.b[6];d.b[7]^=f.b[7];d.b[8]^=f.b[8];d.b[9]^=f.b[9];d.b[10]^=f.b[10];d.b[11]^=f.b[11];d.b[12]^=f.b[12];d.b[13]^=f.b[13];d.b[14]^=f.b[14];d.b[15]^=f.b[15];return d=hf.gmult(d,a)};hf.ghashUpdate=function(a,b,c){b=b.sub(0,16);for(var d=0,f=c.length;f>0;){var g=new Oa(new ArrayBuffer(16));g.blit(0,c,d,f<16?f:16);b.b[0]^=g.b[0];b.b[1]^=g.b[1];b.b[2]^=g.b[2];b.b[3]^=g.b[3];b.b[4]^=g.b[4];b.b[5]^=g.b[5];b.b[6]^=g.b[6];b.b[7]^=g.b[7];b.b[8]^=g.b[8];b.b[9]^=g.b[9];b.b[10]^=g.b[10];b.b[11]^=
g.b[11];b.b[12]^=g.b[12];b.b[13]^=g.b[13];b.b[14]^=g.b[14];b.b[15]^=g.b[15];b=hf.gmult(b,a);d+=16;f-=16}return b};hf.xorBytes=function(a,b){for(var c=new Oa(new ArrayBuffer(a.length)),d=0,f=a.length;d<f;){var g=d++;c.b[g]=a.b[g]^b.b[g]}return c};hf.gmult=function(a,b){var c=new Oa(new ArrayBuffer(16));b=b.sub(0,16);for(var d=0;d<128;){var f=d++;(a.b[f>>>3]>>>7-(f&7)&1)==1&&(c.b[0]^=b.b[0],c.b[1]^=b.b[1],c.b[2]^=b.b[2],c.b[3]^=b.b[3],c.b[4]^=b.b[4],c.b[5]^=b.b[5],c.b[6]^=b.b[6],c.b[7]^=b.b[7],c.b[8]^=
b.b[8],c.b[9]^=b.b[9],c.b[10]^=b.b[10],c.b[11]^=b.b[11],c.b[12]^=b.b[12],c.b[13]^=b.b[13],c.b[14]^=b.b[14],c.b[15]^=b.b[15]);f=b.b[15]&1;for(var g=0,h=0;h<16;){var n=h++,l=b.b[n],q=(l&1)<<7;b.b[n]=l>>>1|g;g=q}f==1&&(b.b[0]^=225)}return c};hf.constantTimeCompare=function(a,b){if(a.length!=b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var cc=function(){};t["haxe.crypto.mode.GCMSIV"]=cc;cc.__name__="haxe.crypto.mode.GCMSIV";cc.encrypt=function(a,b,c,d,f,g){if(a.length!=
16&&a.length!=32)throw ba.thrown("Invalid key length");if(b.length!=cc.NONCE_SIZE)throw ba.thrown("Invalid nonce length");var h=a.length==16,n=cc.subKey(0,1,b,f);h=cc.subKey(2,h?3:5,b,f);g(h);d=cc.hash(h,n,b,c,d,f);n=new Oa(new ArrayBuffer(c.length+cc.AES_BLOCK_SIZE));c.length>0&&(n.blit(0,c,0,c.length),cc.aesCTR(h,d,c,n,f));g(a,b);n.blit(c.length,d,0,cc.AES_BLOCK_SIZE);return n};cc.decrypt=function(a,b,c,d,f,g){if(a.length!=16&&a.length!=32)throw ba.thrown("Invalid key length");if(b.length!=cc.NONCE_SIZE)throw ba.thrown("Invalid nonce length");
if(c.length<cc.AES_BLOCK_SIZE)throw ba.thrown("Invalid ciphertext length");var h=a.length==16,n=c.length-cc.AES_BLOCK_SIZE,l=c.sub(0,n);c=c.sub(n,cc.AES_BLOCK_SIZE);var q=cc.subKey(0,1,b,f),u=cc.subKey(2,h?3:5,b,f);g(u);h=new Oa(new ArrayBuffer(n));n>0&&(h.blit(0,l,0,n),cc.aesCTR(u,c,l,h,f));d=cc.hash(u,q,b,h,d,f);g(a,b);if(c.length!=d.length)c=!1;else{b=a=0;for(g=c.length;b<g;)f=b++,a|=c.b[f]^d.b[f];c=a==0}return c?h:null};cc.subKey=function(a,b,c,d){var f=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE));
f.blit(f.length-c.length,c,0,c.length);c=new Oa(new ArrayBuffer(b-a+1<<3));var g=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE)),h=a;for(b+=1;h<b;){var n=h++,l=0;l==null&&(l=0);f.b[l]=n&255;f.b[l+1]=n>>8&255;f.b[l+2]=n>>16&255;f.b[l+3]=n>>24&255;d(f,0,g,0);c.blit(n-a<<3,g,0,8)}return c};cc.hash=function(a,b,c,d,f,g){cc.initPolyval(b);var h=f.length&15,n=f.length-h;for(b=0;b<n;)cc.updateBlockPolyval(f,b),b+=cc.AES_BLOCK_SIZE;h!=0&&(a=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE)),a.blit(0,f,n,h),cc.updateBlockPolyval(a,
0));h=d.length&15;n=d.length-h;for(b=0;b<n;)cc.updateBlockPolyval(d,b),b+=cc.AES_BLOCK_SIZE;h!=0&&(a=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE)),a.blit(0,d,n,h),cc.updateBlockPolyval(a,0));a=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE));f=f.length<<3&-1;a.b[0]=f&255;a.b[1]=f>>8&255;a.b[2]=f>>16&255;a.b[3]=f>>24&255;a.b[4]=0;a.b[5]=0;a.b[6]=0;a.b[7]=0;f=d.length<<3&-1;a.b[8]=f&255;a.b[9]=f>>8&255;a.b[10]=f>>16&255;a.b[11]=f>>24&255;a.b[12]=0;a.b[13]=0;a.b[14]=0;a.b[15]=0;cc.updateBlockPolyval(a,0);d=cc.s1;
f=d.high;d=d.low;a.b[0]=d;a.b[1]=d>>8&255;a.b[2]=d>>16&255;a.b[3]=d>>24&255;a.b[4]=f;a.b[5]=f>>8&255;a.b[6]=f>>16&255;a.b[7]=f>>24&255;d=cc.s0;f=d.high;d=d.low;a.b[8]=d;a.b[9]=d>>8&255;a.b[10]=d>>16&255;a.b[11]=d>>24&255;a.b[12]=f;a.b[13]=f>>8&255;a.b[14]=f>>16&255;a.b[15]=f>>24&255;d=0;for(f=c.length;d<f;)b=d++,a.b[b]^=c.b[b];a.b[cc.AES_BLOCK_SIZE-1]&=127;c=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE));g(a,0,c,0);return c};cc.initPolyval=function(a){var b=a.b[0]&255|(a.b[1]&255)<<8|(a.b[2]&255)<<16|
a.b[3]<<24,c=a.b[4]&255|(a.b[5]&255)<<8|(a.b[6]&255)<<16|a.b[7]<<24,d=a.b[8]&255|(a.b[9]&255)<<8|(a.b[10]&255)<<16|a.b[11]<<24,f=a=a.b[12]&255|(a.b[13]&255)<<8|(a.b[14]&255)<<16|a.b[15]<<24;a=f>>>1;var g=f<<31;f=d;d=f>>>1|g;g=f<<31;f=c;c=f>>>1|g;g=f<<31;f=b;b=f>>>1|g;cc.h0=new Hb(a^f<<31>>8&-520093696,d);cc.h1=new Hb(c,b);cc.s0=new Hb(0,0);cc.s1=new Hb(0,0)};cc.updatePolyval=function(a){for(var b=a.length&15,c=a.length-b,d=0;d<c;)cc.updateBlockPolyval(a,d),d+=cc.AES_BLOCK_SIZE;b!=0&&(d=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE)),
d.blit(0,a,c,b),cc.updateBlockPolyval(d,0))};cc.updateBlockPolyval=function(a,b){var c=a.b[b]&255;c|=(a.b[b+1]&255)<<8;c|=(a.b[b+2]&255)<<16;c|=a.b[b+3]<<24;var d=a.b[b+4]&255;d|=(a.b[b+5]&255)<<8;d|=(a.b[b+6]&255)<<16;var f=d|a.b[b+7]<<24,g=c;b+=8;c=a.b[b]&255;c|=(a.b[b+1]&255)<<8;c|=(a.b[b+2]&255)<<16;c|=a.b[b+3]<<24;d=a.b[b+4]&255;d|=(a.b[b+5]&255)<<8;d|=(a.b[b+6]&255)<<16;d|=a.b[b+7]<<24;b=cc.s1;f=new Hb(b.high^f,b.low^g);b=cc.s0;var h=new Hb(b.high^d,b.low^c);g=new Hb(cc.h0.high,cc.h0.low);c=
new Hb(cc.h1.high,cc.h1.low);d=new Hb(0,0);b=new Hb(0,0);for(var n=0;n<64;){n++;a=63;a&=63;var l=a==0?new Hb(h.high,h.low):a<32?new Hb(h.high>>a,h.high<<32-a|h.low>>>a):new Hb(h.high>>31,h.high>>a-32),q=a=0;if(l.high!=a||l.low!=q)d=new Hb(d.high^g.high,d.low^g.low),b=new Hb(b.high^c.high,b.low^c.low);a=0;q=1;a&=c.high;q&=c.low;l=0;var u=1;l&=g.high;u&=g.low;g=new Hb(g.high>>>1,g.low>>>1|(g.high&1)<<31);c=new Hb(c.high>>>1,c.low>>>1|(c.high&1)<<31);var v=63;v&=63;l=v==0?new Hb(l,u):v<32?new Hb(l<<
v|u>>>32-v,u<<v):new Hb(u<<v-32,0);c=new Hb(c.high^l.high,c.low^l.low);u=l=0;if(a!=l||q!=u)a=cc.E,g=new Hb(g.high^a.high,g.low^a.low);a=1;a&=63;h=a==0?new Hb(h.high,h.low):a<32?new Hb(h.high<<a|h.low>>>32-a,h.low<<a):new Hb(h.low<<a-32,0)}for(n=64;n<127;){n++;a=63;a&=63;l=a==0?new Hb(f.high,f.low):a<32?new Hb(f.high>>a,f.high<<32-a|f.low>>>a):new Hb(f.high>>31,f.high>>a-32);q=a=0;if(l.high!=a||l.low!=q)d=new Hb(d.high^g.high,d.low^g.low),b=new Hb(b.high^c.high,b.low^c.low);a=0;q=1;a&=c.high;q&=c.low;
l=0;u=1;l&=g.high;u&=g.low;g=new Hb(g.high>>>1,g.low>>>1|(g.high&1)<<31);c=new Hb(c.high>>>1,c.low>>>1|(c.high&1)<<31);v=63;v&=63;l=v==0?new Hb(l,u):v<32?new Hb(l<<v|u>>>32-v,u<<v):new Hb(u<<v-32,0);c=new Hb(c.high^l.high,c.low^l.low);u=l=0;if(a!=l||q!=u)a=cc.E,g=new Hb(g.high^a.high,g.low^a.low);a=1;a&=63;f=a==0?new Hb(f.high,f.low):a<32?new Hb(f.high<<a|f.low>>>32-a,f.low<<a):new Hb(f.low<<a-32,0)}a=63;f=a==0?new Hb(f.high,f.low):a<32?new Hb(f.high>>a,f.high<<32-a|f.low>>>a):new Hb(f.high>>31,f.high>>
a-32);f.high!=0||f.low!=0?(a=g.high&f.high,q=g.low&f.low,cc.s0=new Hb(d.high^a,d.low^q),a=c.high&f.high,q=c.low&f.low,cc.s1=new Hb(b.high^a,b.low^q)):(cc.s0=d,cc.s1=b)};cc.digestPolyval=function(a){var b=cc.s1,c=b.high;b=b.low;a.b[0]=b;a.b[1]=b>>8&255;a.b[2]=b>>16&255;a.b[3]=b>>24&255;a.b[4]=c;a.b[5]=c>>8&255;a.b[6]=c>>16&255;a.b[7]=c>>24&255;b=cc.s0;c=b.high;b=b.low;a.b[8]=b;a.b[9]=b>>8&255;a.b[10]=b>>16&255;a.b[11]=b>>24&255;a.b[12]=c;a.b[13]=c>>8&255;a.b[14]=c>>16&255;a.b[15]=c>>24&255};cc.putLong64=
function(a,b,c){var d=a.high;a=a.low;b.b[c]=a;b.b[c+1]=a>>8&255;b.b[c+2]=a>>16&255;b.b[c+3]=a>>24&255;b.b[c+4]=d;b.b[c+5]=d>>8&255;b.b[c+6]=d>>16&255;b.b[c+7]=d>>24&255};cc.aesCTR=function(a,b,c,d,f){a=new Oa(new ArrayBuffer(b.length));a.blit(0,b,0,b.length);a.b[a.length-1]|=128;b=new Oa(new ArrayBuffer(cc.AES_BLOCK_SIZE));for(var g=0;g<c.length;){f(a,0,b,0);for(var h=0,n=Math.min(cc.AES_BLOCK_SIZE,c.length-g)|0;h<n;){var l=h++;d.b[g+l]=c.b[g+l]^b.b[l]}l=1;for(h=0;h<4&&(n=h++,l=a.b[n]+l,a.b[n]=l&
255,l>>>=8,l!=0););g+=cc.AES_BLOCK_SIZE}};cc.putInt=function(a,b,c){c==null&&(c=0);b.b[c]=a&255;b.b[c+1]=a>>8&255;b.b[c+2]=a>>16&255;b.b[c+3]=a>>24&255};cc.putLong=function(a,b,c){a&=-1;b.b[c]=a&255;b.b[c+1]=a>>8&255;b.b[c+2]=a>>16&255;b.b[c+3]=a>>24&255;b.b[c+4]=0;b.b[c+5]=0;b.b[c+6]=0;b.b[c+7]=0};cc.getInt=function(a,b){return a.b[b]&255|(a.b[b+1]&255)<<8|(a.b[b+2]&255)<<16|a.b[b+3]<<24};cc.getLong=function(a,b){var c=a.b[b]&255;c|=(a.b[b+1]&255)<<8;c|=(a.b[b+2]&255)<<16;c|=a.b[b+3]<<24;var d=a.b[b+
4]&255;d|=(a.b[b+5]&255)<<8;d|=(a.b[b+6]&255)<<16;d|=a.b[b+7]<<24;return new Hb(d,c)};cc.constantTimeCompare=function(a,b){if(a.length!=b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var Vp=function(){};t["haxe.crypto.mode.OFB"]=Vp;Vp.__name__="haxe.crypto.mode.OFB";Vp.encrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length;f<g;){d(b,0,b,0);for(var h=0,n=f+c>g?g-f:c;h<n;){var l=h++;a.b[f+l]^=b.b[l]}f+=c}};Vp.decrypt=function(a,b,c,d){Vp.encrypt(a,
b,c,d)};var Rt=function(){};t["haxe.crypto.mode.PCBC"]=Rt;Rt.__name__="haxe.crypto.mode.PCBC";Rt.encrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length,h=new Oa(new ArrayBuffer(c));f<g;){for(var n=0,l=c;n<l;){var q=n++;h.b[q]=a.b[f+q];a.b[f+q]^=b.b[q]}d(a,f,a,f);n=0;for(l=c;n<l;)q=n++,b.b[q]=a.b[f+q]^h.b[q];f+=c}};Rt.decrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length,h=new Oa(new ArrayBuffer(c));f<g;){for(var n=0,l=c;n<l;){var q=n++;h.b[q]=a.b[f+q]}d(a,f,a,f);n=0;for(l=
c;n<l;)q=n++,a.b[f+q]^=b.b[q],b.b[q]=a.b[f+q]^h.b[q];f+=c}};var ag=function(){};t["haxe.crypto.mode.SIV"]=ag;ag.__name__="haxe.crypto.mode.SIV";ag.encrypt=function(a,b,c,d,f,g){d==null&&(d=[]);if(b.length>2147483631)throw ba.thrown("Text to encrypt is too long");if(a.length!=64&&a.length!=48&&a.length!=32)throw ba.thrown("Key should be 32, 48, or 64 bytes (256, 384, 512 bits)");var h=a.length>>1,n=a.sub(0,h);h=a.sub(h,h);d=ag.s2v(n,b,d,c,f,g);b=ag.computeCtr(b,h,d,f,g);f=new Oa(new ArrayBuffer(d.length+
b.length));f.blit(0,d,0,d.length);f.blit(d.length,b,0,b.length);g(a,c);return f};ag.decrypt=function(a,b,c,d,f,g){if(a.length!=64&&a.length!=48&&a.length!=32)throw ba.thrown("Key should be 32, 48, or 64 bytes (256, 384, 512 bits)");var h=a.length/2|0,n=a.sub(0,h),l=a.sub(h,h);d==null&&(d=[]);if(b.length<16)throw ba.thrown("Input length must be greater than or equal 16");h=b.sub(0,16);b=b.sub(16,b.length-16);b=ag.computeCtr(b,l,h,f,g);d=ag.s2v(n,b,d,c,f,g);g(a,c);c=a=0;for(g=h.length;c<g;)f=c++,a|=
h.b[f]^d.b[f];return a==0?b:null};ag.computeCtr=function(a,b,c,d,f){var g=new Oa(new ArrayBuffer(16));g.blit(0,c,0,16);g.b[8]&=127;g.b[12]&=127;f(b,c);pk.encrypt(a,g,16,d);return a};ag.s2v=function(a,b,c,d,f,g){if(c.length>126)throw ba.thrown("Too many associatedData fields");g(a,d);g=Kf.generate(new Oa(new ArrayBuffer(16)),a,16,f);for(var h=0;h<c.length;){var n=c[h];++h;n=Kf.generate(n,a,16,f);g=ag.dbl(g);g=ag.xor(g,n)}d!=null&&(n=Kf.generate(d,a,16,f),g=ag.dbl(g),g=ag.xor(g,n));b.length>=16?b=ag.xorend(b,
g):(b=Up.pad(b,16),b=ag.xor(ag.dbl(g),b));return Kf.generate(b,a,16,f)};ag.shiftLeft=function(a,b){for(var c=a.length,d=0;--c>=0;){var f=a.b[c]&255;b.b[c]=f<<1|d;d=f>>>7&1}return d};ag.dbl=function(a){var b=new Oa(new ArrayBuffer(a.length)),c=ag.shiftLeft(a,b);b.b[a.length-1]^=-c&135;return b};ag.xor=function(a,b){if(a.length>b.length)throw ba.thrown("in1.length must be <= in2.length");for(var c=new Oa(new ArrayBuffer(a.length)),d=0,f=c.length;d<f;){var g=d++;c.b[g]=a.b[g]^b.b[g]}return c};ag.xorend=
function(a,b){if(a.length<b.length)throw ba.thrown("in1.length must be >= in2.length");var c=new Oa(new ArrayBuffer(a.length));c.blit(0,a,0,a.length);a=a.length-b.length;for(var d=0,f=b.length;d<f;){var g=d++;c.b[g+a]^=b.b[g]}return c};var Ht=function(){};t["haxe.crypto.padding.AnsiX923"]=Ht;Ht.__name__="haxe.crypto.padding.AnsiX923";Ht.pad=function(a,b){b=b-a.length%b-1;var c=a.length+b,d=new Oa(new ArrayBuffer(c+1));d.blit(0,a,0,a.length);for(a=a.length;a<c;){var f=a++;d.b[f]=0}d.b[c]=b+1;return d};
Ht.unpad=function(a){return a.sub(0,a.length-a.b[a.length-1])};var Up=function(){};t["haxe.crypto.padding.BitPadding"]=Up;Up.__name__="haxe.crypto.padding.BitPadding";Up.pad=function(a,b){b=a.length+(b-a.length%b-1)+1;var c=new Oa(new ArrayBuffer(b));c.blit(0,a,0,a.length);c.b[a.length]=128;for(a=a.length+1;a<b;){var d=a++;c.b[d]=0}return c};Up.unpad=function(a){for(var b=0,c=a.length-1;b!=128&&c>-1;)b=a.b[c],--c;return a.sub(0,c+1)};var It=function(){};t["haxe.crypto.padding.ISO10126"]=It;It.__name__=
"haxe.crypto.padding.ISO10126";It.pad=function(a,b){b=b-a.length%b-1;var c=a.length+b,d=new Oa(new ArrayBuffer(c+1));d.blit(0,a,0,a.length);for(a=a.length;a<c;){var f=a++,g=H.random(256);d.b[f]=g}d.b[c]=b+1;return d};It.unpad=function(a){return a.sub(0,a.length-a.b[a.length-1])};var Jt=function(){};t["haxe.crypto.padding.NoPadding"]=Jt;Jt.__name__="haxe.crypto.padding.NoPadding";Jt.pad=function(a,b){return a.sub(0,a.length)};Jt.unpad=function(a){return a};var Kt=function(){};t["haxe.crypto.padding.NullPadding"]=
Kt;Kt.__name__="haxe.crypto.padding.NullPadding";Kt.pad=function(a,b){b=a.length+(b-a.length%b);var c=new Oa(new ArrayBuffer(b));c.blit(0,a,0,a.length);for(a=a.length;a<b;){var d=a++;c.b[d]=0}return c};Kt.unpad=function(a){for(var b=0,c=a.length;b==0&&c>0;)--c,b=a.b[c];return a.sub(0,c+1)};var Lt=function(){};t["haxe.crypto.padding.PKCS7"]=Lt;Lt.__name__="haxe.crypto.padding.PKCS7";Lt.pad=function(a,b){if(b>255)throw ba.thrown("PKCS#7 padding cannot be longer than 255 bytes");if(b<0)throw ba.thrown("PKCS#7 padding size must be positive");
b-=a.length%b;var c=a.length+b,d=new Oa(new ArrayBuffer(c));d.blit(0,a,0,a.length);for(a=a.length;a<c;){var f=a++;d.b[f]=b&255}return d};Lt.unpad=function(a){var b=a.b[a.length-1];if(b>a.length)throw ba.thrown("Cannot remove "+b+" bytes, because message is "+a.length+" bytes");for(var c=a.length-b,d=c,f=a.length;d<f;){var g=d++;if(a.b[g]!=b)throw ba.thrown("Invalid padding value. Got "+a.b[g]+", expected "+b+" at position "+g);}return a.sub(0,c)};var Mt=function(){};t["haxe.crypto.padding.SpacePadding"]=
Mt;Mt.__name__="haxe.crypto.padding.SpacePadding";Mt.pad=function(a,b){b=a.length+(b-a.length%b);var c=new Oa(new ArrayBuffer(b));c.blit(0,a,0,a.length);for(a=a.length;a<b;){var d=a++;c.b[d]=32}return c};Mt.unpad=function(a){for(var b=32,c=a.length;b==32&&c>0;)--c,b=a.b[c];return a.sub(0,c+1)};var Nt=function(){};t["haxe.crypto.padding.TBC"]=Nt;Nt.__name__="haxe.crypto.padding.TBC";Nt.pad=function(a,b){var c=(a.b[a.length-1]&1)==1?0:255;b=a.length+(b-a.length%b);var d=new Oa(new ArrayBuffer(b));d.blit(0,
a,0,a.length);for(a=a.length;a<b;){var f=a++;d.b[f]=c}return d};Nt.unpad=function(a){for(var b=a.length-1,c=a.b[b],d=c;d==c&&b>-1;)--b,d=a.b[b];return a.sub(0,b+1)};var Gf=function(){};t["haxe.ds.ArraySort"]=Gf;Gf.__name__="haxe.ds.ArraySort";Gf.sort=function(a,b){Gf.rec(a,b,0,a.length)};Gf.rec=function(a,b,c,d){var f=c+d>>1;if(d-c<12){if(!(d<=c))for(f=c+1;f<d;)for(var g=f++;g>c;){if(b(a[g],a[g-1])<0)Gf.swap(a,g-1,g);else break;--g}}else Gf.rec(a,b,c,f),Gf.rec(a,b,f,d),Gf.doMerge(a,b,c,f,d,f-c,d-
f)};Gf.doMerge=function(a,b,c,d,f,g,h){if(g!=0&&h!=0)if(g+h==2)b(a[d],a[c])<0&&Gf.swap(a,d,c);else{if(g>h){var n=g>>1;var l=c+n;var q=Gf.lower(a,b,d,f,l);var u=q-d}else u=h>>1,q=d+u,l=Gf.upper(a,b,c,d,q),n=l-c;Gf.rotate(a,b,l,d,q);d=l+u;Gf.doMerge(a,b,c,l,d,n,u);Gf.doMerge(a,b,d,q,f,g-n,h-u)}};Gf.rotate=function(a,b,c,d,f){if(c!=d&&d!=f)for(b=Gf.gcd(f-c,d-c);b--!=0;){for(var g=a[c+b],h=d-c,n=c+b,l=c+b+h;l!=c+b;)a[n]=a[l],n=l,l=f-l>h?l+h:c+(h-(f-l));a[n]=g}};Gf.gcd=function(a,b){for(;b!=0;){var c=
a%b;a=b;b=c}return a};Gf.upper=function(a,b,c,d,f){d-=c;for(var g,h;d>0;)g=d>>1,h=c+g,b(a[f],a[h])<0?d=g:(c=h+1,d=d-g-1);return c};Gf.lower=function(a,b,c,d,f){d-=c;for(var g,h;d>0;)g=d>>1,h=c+g,b(a[h],a[f])<0?(c=h+1,d=d-g-1):d=g;return c};Gf.swap=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d};var cl=function(){};t["haxe.ds.BalancedTree"]=cl;cl.__name__="haxe.ds.BalancedTree";cl.__interfaces__=[ja];cl.iteratorLoop=function(a,b){a!=null&&(cl.iteratorLoop(a.left,b),b.push(a.value),cl.iteratorLoop(a.right,
b))};cl.prototype={root:null,set:function(a,b){this.root=this.setLoop(a,b,this.root)},get:function(a){for(var b=this.root;b!=null;){var c=this.compare(a,b.key);if(c==0)return b.value;b=c<0?b.left:b.right}return null},remove:function(a){try{return this.root=this.removeLoop(a,this.root),!0}catch(b){Pb.lastError=b;if(typeof ba.caught(b).unwrap()=="string")return!1;throw b;}},exists:function(a){for(var b=this.root;b!=null;){var c=this.compare(a,b.key);if(c==0)return!0;b=c<0?b.left:b.right}return!1},iterator:function(){var a=
[];cl.iteratorLoop(this.root,a);return new wg(a)},keyValueIterator:function(){return new yl(this)},keys:function(){var a=[];this.keysLoop(this.root,a);return new wg(a)},setLoop:function(a,b,c){if(c==null)return new Zh(null,a,b,null);var d=this.compare(a,c.key);if(d==0)return new Zh(c.left,a,b,c.right,c==null?0:c._height);if(d<0)return a=this.setLoop(a,b,c.left),this.balance(a,c.key,c.value,c.right);a=this.setLoop(a,b,c.right);return this.balance(c.left,c.key,c.value,a)},removeLoop:function(a,b){if(b==
null)throw ba.thrown("Not_found");var c=this.compare(a,b.key);return c==0?this.merge(b.left,b.right):c<0?this.balance(this.removeLoop(a,b.left),b.key,b.value,b.right):this.balance(b.left,b.key,b.value,this.removeLoop(a,b.right))},keysLoop:function(a,b){a!=null&&(this.keysLoop(a.left,b),b.push(a.key),this.keysLoop(a.right,b))},merge:function(a,b){if(a==null)return b;if(b==null)return a;var c=this.minBinding(b);return this.balance(a,c.key,c.value,this.removeMinBinding(b))},minBinding:function(a){if(a==
null)throw ba.thrown("Not_found");return a.left==null?a:this.minBinding(a.left)},removeMinBinding:function(a){return a.left==null?a.right:this.balance(this.removeMinBinding(a.left),a.key,a.value,a.right)},balance:function(a,b,c,d){var f=a==null?0:a._height,g=d==null?0:d._height;return f>g+2?(f=a.left,g=a.right,(f==null?0:f._height)>=(g==null?0:g._height)?new Zh(a.left,a.key,a.value,new Zh(a.right,b,c,d)):new Zh(new Zh(a.left,a.key,a.value,a.right.left),a.right.key,a.right.value,new Zh(a.right.right,
b,c,d))):g>f+2?(f=d.right,g=d.left,(f==null?0:f._height)>(g==null?0:g._height)?new Zh(new Zh(a,b,c,d.left),d.key,d.value,d.right):new Zh(new Zh(a,b,c,d.left.left),d.left.key,d.left.value,new Zh(d.left.right,d.key,d.value,d.right))):new Zh(a,b,c,d,(f>g?f:g)+1)},compare:function(a,b){return y.compare(a,b)},clear:function(){this.root=null},__class__:cl};var Zh=function(a,b,c,d,f){f==null&&(f=-1);this.left=a;this.key=b;this.value=c;this.right=d;f==-1?(a=this.left,b=this.right,a=(a==null?0:a._height)>
(b==null?0:b._height)?this.left:this.right,this._height=(a==null?0:a._height)+1):this._height=f};t["haxe.ds.TreeNode"]=Zh;Zh.__name__="haxe.ds.TreeNode";Zh.prototype={left:null,right:null,key:null,value:null,_height:null,__class__:Zh};var cf=function(){};t["haxe.ds.EnumValueMap"]=cf;cf.__name__="haxe.ds.EnumValueMap";cf.__interfaces__=[ja];cf.__super__=cl;cf.prototype=I(cl.prototype,{compare:function(a,b){var c=a._hx_index-b._hx_index;if(c!=0)return c;a=ab.enumParameters(a);b=ab.enumParameters(b);
return a.length==0&&b.length==0?0:this.compareArgs(a,b)},compareArgs:function(a,b){var c=a.length-b.length;if(c!=0)return c;c=0;for(var d=a.length;c<d;){var f=c++;f=this.compareArg(a[f],b[f]);if(f!=0)return f}return 0},compareArg:function(a,b){return y.isEnumValue(a)&&y.isEnumValue(b)?this.compare(a,b):a instanceof Array&&b instanceof Array?this.compareArgs(a,b):y.compare(a,b)},__class__:cf});var uc=function(a,b){this.elt=a;this.next=b};t["haxe.ds.GenericCell"]=uc;uc.__name__="haxe.ds.GenericCell";
uc.prototype={elt:null,next:null,__class__:uc};var zx=function(){};t["haxe.ds.GenericStack"]=zx;zx.__name__="haxe.ds.GenericStack";zx.prototype={head:null,__class__:zx};var Od=function(){this.h={}};t["haxe.ds.IntMap"]=Od;Od.__name__="haxe.ds.IntMap";Od.__interfaces__=[ja];Od.prototype={h:null,set:function(a,b){this.h[a]=b},get:function(a){return this.h[a]},exists:function(a){return this.h.hasOwnProperty(a)},remove:function(a){if(!this.h.hasOwnProperty(a))return!1;delete this.h[a];return!0},keys:function(){var a=
[],b;for(b in this.h)this.h.hasOwnProperty(b)&&a.push(+b);return new wg(a)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=this.it.next();return this.ref[a]}}},keyValueIterator:function(){return new yl(this)},__class__:Od};var Uq=function(a,b){this.item=a;this.next=b};t["haxe.ds._List.ListNode"]=Uq;Uq.__name__="haxe.ds._List.ListNode";Uq.prototype={item:null,next:null,__class__:Uq};var Wv=function(a){this.head=a};t["haxe.ds._List.ListIterator"]=
Wv;Wv.__name__="haxe.ds._List.ListIterator";Wv.prototype={head:null,hasNext:function(){return this.head!=null},next:function(){var a=this.head.item;this.head=this.head.next;return a},__class__:Wv};var G=function(){this.h=Object.create(null)};t["haxe.ds.StringMap"]=G;G.__name__="haxe.ds.StringMap";G.__interfaces__=[ja];G.stringify=function(a){var b="[",c=!0,d;for(d in a)c?c=!1:b+=",",b+=d+" => "+H.string(a[d]);return b+"]"};G.prototype={h:null,exists:function(a){return Object.prototype.hasOwnProperty.call(this.h,
a)},get:function(a){return this.h[a]},set:function(a,b){this.h[a]=b},remove:function(a){return Object.prototype.hasOwnProperty.call(this.h,a)?(delete this.h[a],!0):!1},keys:function(){return new Yq(this.h)},iterator:function(){return new Xp(this.h)},keyValueIterator:function(){return new Ax(this.h)},__class__:G};var Yq=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};t["haxe.ds._StringMap.StringMapKeyIterator"]=Yq;Yq.__name__="haxe.ds._StringMap.StringMapKeyIterator";
Yq.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){return this.keys[this.current++]},__class__:Yq};var Xp=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};t["haxe.ds._StringMap.StringMapValueIterator"]=Xp;Xp.__name__="haxe.ds._StringMap.StringMapValueIterator";Xp.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){return this.h[this.keys[this.current++]]},
__class__:Xp};var Ax=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};t["haxe.ds._StringMap.StringMapKeyValueIterator"]=Ax;Ax.__name__="haxe.ds._StringMap.StringMapKeyValueIterator";Ax.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){var a=this.keys[this.current++];return{key:a,value:this.h[a]}},__class__:Ax};var $n=function(a,b,c){ba.call(this,a,b);this.posInfos=c==null?{fileName:"(unknown)",
lineNumber:0,className:"(unknown)",methodName:"(unknown)"}:c;this.__skipStack++};t["haxe.exceptions.PosException"]=$n;$n.__name__="haxe.exceptions.PosException";$n.__super__=ba;$n.prototype=I(ba.prototype,{posInfos:null,toString:function(){return""+ba.prototype.toString.call(this)+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber},__class__:$n});var qn=function(a,b,c){a==null&&(a="Not implemented");$n.call(this,a,b,c);this.__skipStack++};
t["haxe.exceptions.NotImplementedException"]=qn;qn.__name__="haxe.exceptions.NotImplementedException";qn.__super__=$n;qn.prototype=I($n.prototype,{__class__:qn});var En=function(a){this.str=a;this.pos=0};t["haxe.format.JsonParser"]=En;En.__name__="haxe.format.JsonParser";En.prototype={str:null,pos:null,doParse:function(){for(var a=this.parseRec(),b;;){var c=b=this.str.charCodeAt(this.pos++);if(c!=c)break;switch(b){case 9:case 10:case 13:case 32:break;default:this.invalidChar()}}return a},parseRec:function(){for(;;){var a=
this.str.charCodeAt(this.pos++);switch(a){case 9:case 10:case 13:case 32:break;case 34:return this.parseString();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:var b=a,c=this.pos-1,d=b==45,f=!d,g=b==48,h=a=!1,n=!1,l=!1;do switch(b=this.str.charCodeAt(this.pos++),b){case 43:case 45:h&&!n||this.invalidNumber(c);f=!1;n=!0;break;case 46:(d||a||h)&&this.invalidNumber(c);f=!1;a=!0;break;case 48:g&&!a&&this.invalidNumber(c);d&&(d=!1,g=!0);f=!0;break;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:g&&
!a&&this.invalidNumber(c);d&&=!1;f=!0;g=!1;break;case 69:case 101:(d||g||h)&&this.invalidNumber(c);f=!1;h=!0;break;default:f||this.invalidNumber(c),this.pos--,l=!0}while(!l);b=parseFloat(V.substr(this.str,c,this.pos-c));if(a)return b;a=b|0;return a==b?a:b;case 91:a=[];for(b=null;;)switch(this.str.charCodeAt(this.pos++)){case 9:case 10:case 13:case 32:break;case 44:b?b=!1:this.invalidChar();break;case 93:return b==0&&this.invalidChar(),a;default:b&&this.invalidChar(),this.pos--,a.push(this.parseRec()),
b=!0}break;case 102:a=this.pos;if(this.str.charCodeAt(this.pos++)!=97||this.str.charCodeAt(this.pos++)!=108||this.str.charCodeAt(this.pos++)!=115||this.str.charCodeAt(this.pos++)!=101)this.pos=a,this.invalidChar();return!1;case 110:a=this.pos;if(this.str.charCodeAt(this.pos++)!=117||this.str.charCodeAt(this.pos++)!=108||this.str.charCodeAt(this.pos++)!=108)this.pos=a,this.invalidChar();return null;case 116:a=this.pos;if(this.str.charCodeAt(this.pos++)!=114||this.str.charCodeAt(this.pos++)!=117||this.str.charCodeAt(this.pos++)!=
101)this.pos=a,this.invalidChar();return!0;case 123:a={};for(c=b=null;;)switch(this.str.charCodeAt(this.pos++)){case 9:case 10:case 13:case 32:break;case 34:(b!=null||c)&&this.invalidChar();b=this.parseString();break;case 44:c?c=!1:this.invalidChar();break;case 58:b==null&&this.invalidChar();a[b]=this.parseRec();b=null;c=!0;break;case 125:return b==null&&c!=0||this.invalidChar(),a;default:this.invalidChar()}break;default:this.invalidChar()}}},parseString:function(){for(var a=this.pos,b=null,c=-1;;){var d=
this.str.charCodeAt(this.pos++);if(d==34)break;if(d==92){b==null&&(b=new nb);d=this.str;var f=this.pos-a-1;b.b+=f==null?V.substr(d,a,null):V.substr(d,a,f);d=this.str.charCodeAt(this.pos++);d!=117&&c!=-1&&(b.b+=String.fromCodePoint(65533),c=-1);switch(d){case 34:case 47:case 92:b.b+=String.fromCodePoint(d);break;case 98:b.b+=String.fromCodePoint(8);break;case 102:b.b+=String.fromCodePoint(12);break;case 110:b.b+=String.fromCodePoint(10);break;case 114:b.b+=String.fromCodePoint(13);break;case 116:b.b+=
String.fromCodePoint(9);break;case 117:a=H.parseInt("0x"+V.substr(this.str,this.pos,4));this.pos+=4;c!=-1?(b.b=a<56320||a>57343?b.b+String.fromCodePoint(65533):b.b+String.fromCodePoint((c-55296<<10)+(a-56320)+65536),c=-1):a>=55296&&a<=56319?c=a:b.b+=String.fromCodePoint(a);break;default:throw ba.thrown("Invalid escape sequence \\"+String.fromCodePoint(d)+" at position "+(this.pos-1));}a=this.pos}else if(d!=d)throw ba.thrown("Unclosed string");}c!=-1&&(b.b+=String.fromCodePoint(65533));if(b==null)return V.substr(this.str,
a,this.pos-a-1);d=this.str;f=this.pos-a-1;b.b+=f==null?V.substr(d,a,null):V.substr(d,a,f);return b.b},invalidChar:function(){this.pos--;throw ba.thrown("Invalid char "+this.str.charCodeAt(this.pos)+" at position "+this.pos);},invalidNumber:function(a){throw ba.thrown("Invalid number at position "+a+": "+V.substr(this.str,a,this.pos-a));},__class__:En};var yg=function(a,b){this.replacer=a;this.indent=b;this.pretty=b!=null;this.nind=0;this.buf=new nb};t["haxe.format.JsonPrinter"]=yg;yg.__name__="haxe.format.JsonPrinter";
yg.print=function(a,b,c){b=new yg(b,c);b.write("",a);return b.buf.b};yg.prototype={buf:null,replacer:null,indent:null,pretty:null,nind:null,write:function(a,b){this.replacer!=null&&(b=this.replacer(a,b));a=ab.typeof(b);switch(a._hx_index){case 0:this.buf.b+="null";break;case 1:this.buf.b+=H.string(b);break;case 2:b=isFinite(b)?H.string(b):"null";this.buf.b+=H.string(b);break;case 3:this.buf.b+=H.string(b);break;case 4:this.fieldsString(b,y.fields(b));break;case 5:this.buf.b+='"<fun>"';break;case 6:a=
a.c;if(a==String)this.quote(b);else if(a==Array){this.buf.b+=String.fromCodePoint(91);a=b.length;for(var c=a-1,d=0;d<a;){var f=d++;f>0?this.buf.b+=String.fromCodePoint(44):this.nind++;this.pretty&&(this.buf.b+=String.fromCodePoint(10));if(this.pretty){var g=N.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=H.string(g)}this.write(f,b[f]);f==c&&(this.nind--,this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty&&(f=N.lpad("",this.indent,this.nind*this.indent.length),this.buf.b+=
H.string(f)))}this.buf.b+=String.fromCodePoint(93)}else if(a==G){c={};d=Object.keys(b.h);f=d.length;for(g=0;g<f;)a=d[g++],c[a]=b.h[a];b=c;this.fieldsString(b,y.fields(b))}else a==Date?this.quote(V.dateStr(b)):this.classString(b);break;case 7:f=b._hx_index;this.buf.b+=H.string(f==null?"null":""+f);break;case 8:this.buf.b+='"???"'}},classString:function(a){this.fieldsString(a,ab.getInstanceFields(w.getClass(a)))},fieldsString:function(a,b){this.buf.b+=String.fromCodePoint(123);for(var c=b.length,d=
c-1,f=!0,g=0;g<c;){var h=g++,n=b[h],l=y.field(a,n);if(!y.isFunction(l)){f?(this.nind++,f=!1):this.buf.b+=String.fromCodePoint(44);this.pretty&&(this.buf.b+=String.fromCodePoint(10));if(this.pretty){var q=N.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=H.string(q)}this.quote(n);this.buf.b+=String.fromCodePoint(58);this.pretty&&(this.buf.b+=String.fromCodePoint(32));this.write(n,l);h==d&&(this.nind--,this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty&&(h=N.lpad("",this.indent,
this.nind*this.indent.length),this.buf.b+=H.string(h)))}}this.buf.b+=String.fromCodePoint(125)},quote:function(a){this.buf.b+=String.fromCodePoint(34);for(var b=0,c=a.length;b<c;){var d=a.charCodeAt(b++);switch(d){case 8:this.buf.b+="\\b";break;case 9:this.buf.b+="\\t";break;case 10:this.buf.b+="\\n";break;case 12:this.buf.b+="\\f";break;case 13:this.buf.b+="\\r";break;case 34:this.buf.b+='\\"';break;case 92:this.buf.b+="\\\\";break;default:this.buf.b+=String.fromCodePoint(d)}}this.buf.b+=String.fromCodePoint(34)},
__class__:yg};var Yp=function(){this.size=this.pos=0};t["haxe.io.BytesBuffer"]=Yp;Yp.__name__="haxe.io.BytesBuffer";Yp.prototype={buffer:null,view:null,u8:null,pos:null,size:null,addByte:function(a){this.pos==this.size&&this.grow(1);this.view.setUint8(this.pos++,a)},add:function(a){this.pos+a.length>this.size&&this.grow(a.length);if(this.size!=0){var b=new Uint8Array(a.b.buffer,a.b.byteOffset,a.length);this.u8.set(b,this.pos);this.pos+=a.length}},addBytes:function(a,b,c){if(b<0||c<0||b+c>a.length)throw ba.thrown(Yh.OutsideBounds);
this.pos+c>this.size&&this.grow(c);this.size!=0&&(a=new Uint8Array(a.b.buffer,a.b.byteOffset+b,c),this.u8.set(a,this.pos),this.pos+=c)},grow:function(a){var b=this.pos+a;for(a=this.size==0?16:this.size;a<b;)a=a*3>>1;b=new ArrayBuffer(a);var c=new Uint8Array(b);this.size>0&&c.set(this.u8);this.size=a;this.buffer=b;this.u8=c;this.view=new DataView(this.buffer)},getBytes:function(){if(this.size==0)return new Oa(new ArrayBuffer(0));var a=new Oa(this.buffer);a.length=this.pos;return a},__class__:Yp};var Tt=
function(){};t["haxe.io.Input"]=Tt;Tt.__name__="haxe.io.Input";Tt.prototype={bigEndian:null,readByte:function(){throw new qn(null,null,{fileName:"haxe/io/Input.hx",lineNumber:53,className:"haxe.io.Input",methodName:"readByte"});},readBytes:function(a,b,c){var d=c,f=a.b;if(b<0||c<0||b+c>a.length)throw ba.thrown(Yh.OutsideBounds);try{for(;d>0;)f[b]=this.readByte(),++b,--d}catch(g){if(Pb.lastError=g,!(ba.caught(g).unwrap()instanceof Zp))throw g;}return c-d},set_bigEndian:function(a){return this.bigEndian=
a},readFullBytes:function(a,b,c){for(;c>0;){var d=this.readBytes(a,b,c);if(d==0)throw ba.thrown(Yh.Blocked);b+=d;c-=d}},read:function(a){for(var b=new Oa(new ArrayBuffer(a)),c=0;a>0;){var d=this.readBytes(b,c,a);if(d==0)throw ba.thrown(Yh.Blocked);c+=d;a-=d}return b},readFloat:function(){return qf.i32ToFloat(this.readInt32())},readDouble:function(){var a=this.readInt32(),b=this.readInt32();return this.bigEndian?qf.i64ToDouble(b,a):qf.i64ToDouble(a,b)},readInt16:function(){var a=this.readByte(),b=
this.readByte();a=this.bigEndian?b|a<<8:a|b<<8;return(a&32768)!=0?a-65536:a},readUInt16:function(){var a=this.readByte(),b=this.readByte();return this.bigEndian?b|a<<8:a|b<<8},readInt32:function(){var a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte();return this.bigEndian?d|c<<8|b<<16|a<<24:a|b<<8|c<<16|d<<24},readString:function(a,b){var c=new Oa(new ArrayBuffer(a));this.readFullBytes(c,0,a);return c.getString(0,a,b)},__class__:Tt,__properties__:{set_bigEndian:"set_bigEndian"}};
var ao=function(a,b,c){b==null&&(b=0);c==null&&(c=a.length-b);if(b<0||c<0||b+c>a.length)throw ba.thrown(Yh.OutsideBounds);this.b=a.b;this.pos=b;this.totlen=this.len=c};t["haxe.io.BytesInput"]=ao;ao.__name__="haxe.io.BytesInput";ao.__super__=Tt;ao.prototype=I(Tt.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(this.len==0)throw ba.thrown(new Zp);this.len--;return this.b[this.pos++]},readBytes:function(a,b,c){if(b<0||c<0||b+c>a.length)throw ba.thrown(Yh.OutsideBounds);if(this.len==
0&&c>0)throw ba.thrown(new Zp);this.len<c&&(c=this.len);var d=this.b;a=a.b;for(var f=0,g=c;f<g;){var h=f++;a[b+h]=d[this.pos+h]}this.pos+=c;this.len-=c;return c},__class__:ao});var Ut=function(){};t["haxe.io.Output"]=Ut;Ut.__name__="haxe.io.Output";Ut.prototype={bigEndian:null,writeByte:function(a){throw new qn(null,null,{fileName:"haxe/io/Output.hx",lineNumber:47,className:"haxe.io.Output",methodName:"writeByte"});},writeBytes:function(a,b,c){if(b<0||c<0||b+c>a.length)throw ba.thrown(Yh.OutsideBounds);
a=a.b;for(var d=c;d>0;)this.writeByte(a[b]),++b,--d;return c},set_bigEndian:function(a){return this.bigEndian=a},write:function(a){for(var b=a.length,c=0;b>0;){var d=this.writeBytes(a,c,b);if(d==0)throw ba.thrown(Yh.Blocked);c+=d;b-=d}},writeFullBytes:function(a,b,c){for(;c>0;){var d=this.writeBytes(a,b,c);b+=d;c-=d}},writeDouble:function(a){a=qf.doubleToI64(a);this.bigEndian?(this.writeInt32(a.high),this.writeInt32(a.low)):(this.writeInt32(a.low),this.writeInt32(a.high))},writeUInt16:function(a){if(a<
0||a>=65536)throw ba.thrown(Yh.Overflow);this.bigEndian?(this.writeByte(a>>8),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>8))},writeInt32:function(a){this.bigEndian?(this.writeByte(a>>>24),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>8&255),this.writeByte(a>>16&255),this.writeByte(a>>>24))},writeString:function(a,b){a=Oa.ofString(a,b);this.writeFullBytes(a,0,a.length)},__class__:Ut,__properties__:{set_bigEndian:"set_bigEndian"}};
var $p=function(){this.b=new Yp};t["haxe.io.BytesOutput"]=$p;$p.__name__="haxe.io.BytesOutput";$p.__super__=Ut;$p.prototype=I(Ut.prototype,{b:null,writeByte:function(a){this.b.addByte(a)},writeBytes:function(a,b,c){this.b.addBytes(a,b,c);return c},getBytes:function(){return this.b.getBytes()},__class__:$p});var Zp=function(){};t["haxe.io.Eof"]=Zp;Zp.__name__="haxe.io.Eof";Zp.prototype={toString:function(){return"Eof"},__class__:Zp};var Yh=R["haxe.io.Error"]={__ename__:"haxe.io.Error",__constructs__:null,
Blocked:{_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:E},Overflow:{_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:E},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:E},Custom:(B=function(a){return{_hx_index:3,e:a,__enum__:"haxe.io.Error",toString:E}},B._hx_name="Custom",B.__params__=["e"],B)};Yh.__constructs__=[Yh.Blocked,Yh.Overflow,Yh.OutsideBounds,Yh.Custom];var qf=function(){};t["haxe.io.FPHelper"]=qf;qf.__name__="haxe.io.FPHelper";
qf.i32ToFloat=function(a){qf.helper.setInt32(0,a,!0);return qf.helper.getFloat32(0,!0)};qf.floatToI32=function(a){qf.helper.setFloat32(0,a,!0);return qf.helper.getInt32(0,!0)};qf.i64ToDouble=function(a,b){qf.helper.setInt32(0,a,!0);qf.helper.setInt32(4,b,!0);return qf.helper.getFloat64(0,!0)};qf.doubleToI64=function(a){var b=qf.i64tmp;qf.helper.setFloat64(0,a,!0);b.low=qf.helper.getInt32(0,!0);b.high=qf.helper.getInt32(4,!0);return b};var gA={fromBytes:function(a,b,c){b==null&&(b=0);c==null&&(c=a.length-
b>>2);return new Float32Array(a.b.bufferValue,b,c)}},Cg=function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?(this.dir=V.substr(a,0,c),a=V.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=V.substr(a,0,b),a=V.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");b!=-1?(this.ext=V.substr(a,b+1,null),this.file=V.substr(a,0,b)):(this.ext=null,this.file=a)};t["haxe.io.Path"]=Cg;Cg.__name__="haxe.io.Path";Cg.withoutDirectory=function(a){a=
new Cg(a);a.dir=null;return a.toString()};Cg.directory=function(a){a=new Cg(a);return a.dir==null?"":a.dir};Cg.extension=function(a){a=new Cg(a);return a.ext==null?"":a.ext};Cg.prototype={dir:null,file:null,ext:null,backslash:null,toString:function(){return(this.dir==null?"":this.dir+(this.backslash?"\\":"/"))+this.file+(this.ext==null?"":"."+this.ext)},__class__:Cg};var wg=function(a){this.current=0;this.array=a};t["haxe.iterators.ArrayIterator"]=wg;wg.__name__="haxe.iterators.ArrayIterator";wg.prototype=
{array:null,current:null,hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]},__class__:wg};var Xq=function(a){this.current=0;this.array=a};t["haxe.iterators.ArrayKeyValueIterator"]=Xq;Xq.__name__="haxe.iterators.ArrayKeyValueIterator";Xq.prototype={current:null,array:null,hasNext:function(){return this.current<this.array.length},next:function(){return{value:this.array[this.current],key:this.current++}},__class__:Xq};var yl=function(a){this.map=
a;this.keys=a.keys()};t["haxe.iterators.MapKeyValueIterator"]=yl;yl.__name__="haxe.iterators.MapKeyValueIterator";yl.prototype={map:null,keys:null,hasNext:function(){return this.keys.hasNext()},next:function(){var a=this.keys.next();return{value:this.map.get(a),key:a}},__class__:yl};var fg=function(a,b,c){this.xml=b;this.message=a;this.position=c;this.lineNumber=1;for(a=this.positionAtLine=0;a<c;){var d=a++;d=b.charCodeAt(d);d==10?(this.lineNumber++,this.positionAtLine=0):d!=13&&this.positionAtLine++}};
t["haxe.xml.XmlParserException"]=fg;fg.__name__="haxe.xml.XmlParserException";fg.prototype={message:null,lineNumber:null,positionAtLine:null,position:null,xml:null,toString:function(){return w.getClass(this).__name__+": "+this.message+" at line "+this.lineNumber+" char "+this.positionAtLine},__class__:fg};var zl=function(){};t["haxe.xml.Parser"]=zl;zl.__name__="haxe.xml.Parser";zl.parse=function(a,b){b==null&&(b=!1);var c=Jb.createDocument();zl.doParse(a,b,0,c);return c};zl.doParse=function(a,b,c,
d){c==null&&(c=0);for(var f=null,g=1,h=1,n=null,l=0,q=0,u=0,v=new nb,z=1,r=-1;c<a.length;){var F=a.charCodeAt(c);switch(g){case 0:switch(F){case 9:case 10:case 13:case 32:break;default:g=h;continue}break;case 1:if(F==60)g=0,h=2;else{l=c;g=13;continue}break;case 2:switch(F){case 33:if(a.charCodeAt(c+1)==91){c+=2;if(V.substr(a,c,6).toUpperCase()!="CDATA[")throw ba.thrown(new fg("Expected <![CDATA[",a,c));c+=5;g=17}else if(a.charCodeAt(c+1)==68||a.charCodeAt(c+1)==100){if(V.substr(a,c+2,6).toUpperCase()!=
"OCTYPE")throw ba.thrown(new fg("Expected <!DOCTYPE",a,c));c+=8;g=16}else{if(a.charCodeAt(c+1)!=45||a.charCodeAt(c+2)!=45)throw ba.thrown(new fg("Expected \x3c!--",a,c));c+=2;g=15}l=c+1;break;case 47:if(d==null)throw ba.thrown(new fg("Expected node name",a,c));l=c+1;g=0;h=10;break;case 63:g=14;l=c;break;default:g=3;l=c;continue}break;case 3:if(!(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F==58||F==46||F==95||F==45)){if(c==l)throw ba.thrown(new fg("Expected node name",a,c));f=Jb.createElement(V.substr(a,
l,c-l));d.addChild(f);++q;g=0;h=4;continue}break;case 4:switch(F){case 47:g=11;break;case 62:g=9;break;default:g=5;l=c;continue}break;case 5:if(!(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F==58||F==46||F==95||F==45)){if(l==c)throw ba.thrown(new fg("Expected attribute name",a,c));n=V.substr(a,l,c-l);if(f.exists(n))throw ba.thrown(new fg("Duplicate attribute ["+n+"]",a,c));g=0;h=6;continue}break;case 6:if(F==61)g=0,h=7;else throw ba.thrown(new fg("Expected =",a,c));break;case 7:switch(F){case 34:case 39:v=
new nb;g=8;l=c+1;r=F;break;default:throw ba.thrown(new fg('Expected "',a,c));}break;case 8:switch(F){case 38:z=c-l;v.b+=z==null?V.substr(a,l,null):V.substr(a,l,z);g=18;z=8;l=c+1;break;case 60:case 62:if(b)throw ba.thrown(new fg("Invalid unescaped "+String.fromCodePoint(F)+" in attribute value",a,c));F==r&&(h=c-l,v.b+=h==null?V.substr(a,l,null):V.substr(a,l,h),h=v.b,v=new nb,f.set(n,h),g=0,h=4);break;default:F==r&&(h=c-l,v.b+=h==null?V.substr(a,l,null):V.substr(a,l,h),h=v.b,v=new nb,f.set(n,h),g=0,
h=4)}break;case 9:l=c=zl.doParse(a,b,c,f);g=1;break;case 10:if(!(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F==58||F==46||F==95||F==45)){if(l==c)throw ba.thrown(new fg("Expected node name",a,c));h=V.substr(a,l,c-l);if(d==null||d.nodeType!=0)throw ba.thrown(new fg("Unexpected </"+h+">, tag is not open",a,c));if(d.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(d.nodeType==null?"null":ec.toString(d.nodeType)));if(h!=d.nodeName){if(d.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+
(d.nodeType==null?"null":ec.toString(d.nodeType)));throw ba.thrown(new fg("Expected </"+d.nodeName+">",a,c));}g=0;h=12;continue}break;case 11:if(F==62)g=1;else throw ba.thrown(new fg("Expected >",a,c));break;case 12:if(F==62)return q==0&&d.addChild(Jb.createPCData("")),c;throw ba.thrown(new fg("Expected >",a,c));case 13:F==60?(h=c-l,v.b+=h==null?V.substr(a,l,null):V.substr(a,l,h),h=Jb.createPCData(v.b),v=new nb,d.addChild(h),++q,g=0,h=2):F==38&&(z=c-l,v.b+=z==null?V.substr(a,l,null):V.substr(a,l,
z),g=18,z=13,l=c+1);break;case 14:F==63&&a.charCodeAt(c+1)==62&&(++c,g=V.substr(a,l+1,c-l-2),d.addChild(Jb.createProcessingInstruction(g)),++q,g=1);break;case 15:F==45&&a.charCodeAt(c+1)==45&&a.charCodeAt(c+2)==62&&(d.addChild(Jb.createComment(V.substr(a,l,c-l))),++q,c+=2,g=1);break;case 16:F==91?++u:F==93?--u:F==62&&u==0&&(d.addChild(Jb.createDocType(V.substr(a,l,c-l))),++q,g=1);break;case 17:F==93&&a.charCodeAt(c+1)==93&&a.charCodeAt(c+2)==62&&(g=Jb.createCData(V.substr(a,l,c-l)),d.addChild(g),
++q,c+=2,g=1);break;case 18:if(F==59){l=V.substr(a,l,c-l);if(l.charCodeAt(0)==35)l=l.charCodeAt(1)==120?H.parseInt("0"+V.substr(l,1,l.length-1)):H.parseInt(V.substr(l,1,l.length-1)),v.b+=String.fromCodePoint(l);else if(Object.prototype.hasOwnProperty.call(zl.escapes.h,l))v.b+=H.string(zl.escapes.h[l]);else{if(b)throw ba.thrown(new fg("Undefined entity: "+l,a,c));v.b+=H.string("&"+l+";")}l=c+1;g=z}else if(!(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F==58||F==46||F==95||F==45)&&F!=35){if(b)throw ba.thrown(new fg("Invalid character in entity: "+
String.fromCodePoint(F),a,c));v.b+=String.fromCodePoint(38);g=c-l;v.b+=g==null?V.substr(a,l,null):V.substr(a,l,g);--c;l=c+1;g=z}}++c}g==1&&(l=c,g=13);if(g==13){if(d.nodeType==0){if(d.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(d.nodeType==null?"null":ec.toString(d.nodeType)));throw ba.thrown(new fg("Unclosed node <"+d.nodeName+">",a,c));}if(c!=l||q==0)z=c-l,v.b+=z==null?V.substr(a,l,null):V.substr(a,l,z),d.addChild(Jb.createPCData(v.b));return c}if(!b&&g==18&&
z==13)return v.b+=String.fromCodePoint(38),z=c-l,v.b+=z==null?V.substr(a,l,null):V.substr(a,l,z),d.addChild(Jb.createPCData(v.b)),c;throw ba.thrown(new fg("Unexpected end",a,c));};var rn=function(a){this.output=new nb;this.pretty=a};t["haxe.xml.Printer"]=rn;rn.__name__="haxe.xml.Printer";rn.print=function(a,b){b==null&&(b=!1);b=new rn(b);b.writeNode(a,"");return b.output.b};rn.prototype={output:null,pretty:null,writeNode:function(a,b){switch(a.nodeType){case 0:this.output.b+=H.string(b+"<");if(a.nodeType!=
Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(a.nodeType==null?"null":ec.toString(a.nodeType)));this.output.b+=H.string(a.nodeName);for(var c=a.attributes();c.hasNext();){var d=c.next();this.output.b+=H.string(" "+d+'="');d=N.htmlEscape(a.get(d),!0);this.output.b+=H.string(d);this.output.b+='"'}if(this.hasChildren(a)){this.output.b+=">";this.pretty&&(this.output.b+="\n");if(a.nodeType!=Jb.Document&&a.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element or Document but found "+
(a.nodeType==null?"null":ec.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;){var f=d[c++];this.writeNode(f,this.pretty?b+"\t":b)}this.output.b+=H.string(b+"</");if(a.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element but found "+(a.nodeType==null?"null":ec.toString(a.nodeType)));this.output.b+=H.string(a.nodeName);this.output.b+=">"}else this.output.b+="/>";this.pretty&&(this.output.b+="\n");break;case 1:if(a.nodeType==Jb.Document||a.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+
(a.nodeType==null?"null":ec.toString(a.nodeType)));a=a.nodeValue;a.length!=0&&(d=b+N.htmlEscape(a),this.output.b+=H.string(d),this.pretty&&(this.output.b+="\n"));break;case 2:this.output.b+=H.string(b+"<![CDATA[");if(a.nodeType==Jb.Document||a.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":ec.toString(a.nodeType)));this.output.b+=H.string(a.nodeValue);this.output.b+="]]\x3e";this.pretty&&(this.output.b+="\n");break;case 3:if(a.nodeType==Jb.Document||a.nodeType==
Jb.Element)throw ba.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":ec.toString(a.nodeType)));a=a.nodeValue;a=a.replace(RegExp("[\n\r\t]+","g"),"");this.output.b+=b==null?"null":""+b;d=N.trim("\x3c!--"+a+"--\x3e");this.output.b+=H.string(d);this.pretty&&(this.output.b+="\n");break;case 4:if(a.nodeType==Jb.Document||a.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":ec.toString(a.nodeType)));this.output.b+=H.string("<!DOCTYPE "+a.nodeValue+">");
this.pretty&&(this.output.b+="\n");break;case 5:if(a.nodeType==Jb.Document||a.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":ec.toString(a.nodeType)));this.output.b+=H.string("<?"+a.nodeValue+"?>");this.pretty&&(this.output.b+="\n");break;case 6:if(a.nodeType!=Jb.Document&&a.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element or Document but found "+(a.nodeType==null?"null":ec.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;)f=d[c++],
this.writeNode(f,b)}},hasChildren:function(a){if(a.nodeType!=Jb.Document&&a.nodeType!=Jb.Element)throw ba.thrown("Bad node type, expected Element or Document but found "+(a.nodeType==null?"null":ec.toString(a.nodeType)));var b=0;for(a=a.children;b<a.length;){var c=a[b++];switch(c.nodeType){case 0:case 1:return!0;case 2:case 3:if(c.nodeType==Jb.Document||c.nodeType==Jb.Element)throw ba.thrown("Bad node type, unexpected "+(c.nodeType==null?"null":ec.toString(c.nodeType)));if(N.ltrim(c.nodeValue).length!=
0)return!0}}return!1},__class__:rn};var bo=R["haxe.zip.ExtraField"]={__ename__:"haxe.zip.ExtraField",__constructs__:null,FUnknown:(B=function(a,b){return{_hx_index:0,tag:a,bytes:b,__enum__:"haxe.zip.ExtraField",toString:E}},B._hx_name="FUnknown",B.__params__=["tag","bytes"],B),FInfoZipUnicodePath:(B=function(a,b){return{_hx_index:1,name:a,crc:b,__enum__:"haxe.zip.ExtraField",toString:E}},B._hx_name="FInfoZipUnicodePath",B.__params__=["name","crc"],B),FUtf8:{_hx_name:"FUtf8",_hx_index:2,__enum__:"haxe.zip.ExtraField",
toString:E}};bo.__constructs__=[bo.FUnknown,bo.FInfoZipUnicodePath,bo.FUtf8];var Uj=R["haxe.zip.Huffman"]={__ename__:"haxe.zip.Huffman",__constructs__:null,Found:(B=function(a){return{_hx_index:0,i:a,__enum__:"haxe.zip.Huffman",toString:E}},B._hx_name="Found",B.__params__=["i"],B),NeedBit:(B=function(a,b){return{_hx_index:1,left:a,right:b,__enum__:"haxe.zip.Huffman",toString:E}},B._hx_name="NeedBit",B.__params__=["left","right"],B),NeedBits:(B=function(a,b){return{_hx_index:2,n:a,table:b,__enum__:"haxe.zip.Huffman",
toString:E}},B._hx_name="NeedBits",B.__params__=["n","table"],B)};Uj.__constructs__=[Uj.Found,Uj.NeedBit,Uj.NeedBits];var Bx=function(){};t["haxe.zip.HuffTools"]=Bx;Bx.__name__="haxe.zip.HuffTools";Bx.prototype={treeDepth:function(a){switch(a._hx_index){case 0:return 0;case 1:var b=a.right;a=this.treeDepth(a.left);b=this.treeDepth(b);return 1+(a<b?a:b);case 2:throw ba.thrown("assert");}},treeCompress:function(a){var b=this.treeDepth(a);if(b==0)return a;if(b==1){if(a._hx_index==1)return b=a.right,
Uj.NeedBit(this.treeCompress(a.left),this.treeCompress(b));throw ba.thrown("assert");}for(var c=[],d=0,f=1<<b;d<f;)d++,c.push(Uj.Found(-1));this.treeWalk(c,0,0,b,a);return Uj.NeedBits(b,c)},treeWalk:function(a,b,c,d,f){if(f._hx_index==1){var g=f.left,h=f.right;d>0?(this.treeWalk(a,b,c+1,d-1,g),this.treeWalk(a,b|1<<c,c+1,d-1,h)):a[b]=this.treeCompress(f)}else a[b]=this.treeCompress(f)},treeMake:function(a,b,c,d){if(d>b)throw ba.thrown("Invalid huffman");var f=c<<5|d;if(a.h.hasOwnProperty(f))return Uj.Found(a.h[f]);
c<<=1;++d;return Uj.NeedBit(this.treeMake(a,b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){if(c==1)return Uj.NeedBit(Uj.Found(0),Uj.Found(0));var f=[],g=[];if(d>32)throw ba.thrown("Invalid huffman");for(var h=0,n=d;h<n;)h++,f.push(0),g.push(0);h=0;for(n=c;h<n;){var l=h++;l=a[l+b];if(l>=d)throw ba.thrown("Invalid huffman");f[l]++}var q=0;h=1;for(n=d-1;h<n;)l=h++,q=q+f[l]<<1,g[l]=q;f=new Od;h=0;for(n=c;h<n;)l=h++,c=a[l+b],c!=0&&(q=g[c-1],g[c-1]=q+1,f.h[q<<5|c]=l);return this.treeCompress(Uj.NeedBit(this.treeMake(f,
d,0,1),this.treeMake(f,d,1,1)))},__class__:Bx};var Cx=function(a){this.buffer=new Oa(new ArrayBuffer(65536));this.pos=0;a&&(this.crc=new Ul)};t["haxe.zip._InflateImpl.Window"]=Cx;Cx.__name__="haxe.zip._InflateImpl.Window";Cx.prototype={buffer:null,pos:null,crc:null,slide:function(){this.crc!=null&&this.crc.update(this.buffer,0,32768);var a=new Oa(new ArrayBuffer(65536));this.pos-=32768;a.blit(0,this.buffer,32768,this.pos);this.buffer=a},addBytes:function(a,b,c){this.pos+c>65536&&this.slide();this.buffer.blit(this.pos,
a,b,c);this.pos+=c},addByte:function(a){this.pos==65536&&this.slide();this.buffer.b[this.pos]=a;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){this.crc!=null&&this.crc.update(this.buffer,0,this.pos);return this.crc},__class__:Cx};var Lf=R["haxe.zip._InflateImpl.State"]={__ename__:"haxe.zip._InflateImpl.State",__constructs__:null,Head:{_hx_name:"Head",_hx_index:0,__enum__:"haxe.zip._InflateImpl.State",toString:E},Block:{_hx_name:"Block",
_hx_index:1,__enum__:"haxe.zip._InflateImpl.State",toString:E},CData:{_hx_name:"CData",_hx_index:2,__enum__:"haxe.zip._InflateImpl.State",toString:E},Flat:{_hx_name:"Flat",_hx_index:3,__enum__:"haxe.zip._InflateImpl.State",toString:E},Crc:{_hx_name:"Crc",_hx_index:4,__enum__:"haxe.zip._InflateImpl.State",toString:E},Dist:{_hx_name:"Dist",_hx_index:5,__enum__:"haxe.zip._InflateImpl.State",toString:E},DistOne:{_hx_name:"DistOne",_hx_index:6,__enum__:"haxe.zip._InflateImpl.State",toString:E},Done:{_hx_name:"Done",
_hx_index:7,__enum__:"haxe.zip._InflateImpl.State",toString:E}};Lf.__constructs__=[Lf.Head,Lf.Block,Lf.CData,Lf.Flat,Lf.Crc,Lf.Dist,Lf.DistOne,Lf.Done];var Qg=function(a,b,c){c==null&&(c=!0);b==null&&(b=!0);this.isFinal=!1;this.htools=new Bx;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.dist=this.len=0;this.state=b?Lf.Head:Lf.Block;this.input=a;this.needed=this.nbits=this.bits=0;this.output=null;this.outpos=0;this.lengths=[];this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);
this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.window=new Cx(c)};t["haxe.zip.InflateImpl"]=Qg;Qg.__name__="haxe.zip.InflateImpl";Qg.prototype={nbits:null,bits:null,state:null,isFinal:null,huffman:null,
huffdist:null,htools:null,len:null,dist:null,needed:null,output:null,outpos:null,input:null,lengths:null,window:null,buildFixedHuffman:function(){if(Qg.FIXED_HUFFMAN!=null)return Qg.FIXED_HUFFMAN;for(var a=[],b=0;b<288;){var c=b++;a.push(c<=143?8:c<=255?9:c<=279?7:8)}Qg.FIXED_HUFFMAN=this.htools.make(a,0,288,10);return Qg.FIXED_HUFFMAN},readBytes:function(a,b,c){this.needed=c;this.outpos=b;this.output=a;if(c>0)for(;this.inflateLoop(););return c-this.needed},getBits:function(a){for(;this.nbits<a;)this.bits|=
this.input.readByte()<<this.nbits,this.nbits+=8;var b=this.bits&(1<<a)-1;this.nbits-=a;this.bits>>=a;return b},getBit:function(){this.nbits==0&&(this.nbits=8,this.bits=this.input.readByte());var a=(this.bits&1)==1;this.nbits--;this.bits>>=1;return a},getRevBits:function(a){return a==0?0:this.getBit()?1<<a-1|this.getRevBits(a-1):this.getRevBits(a-1)},resetBits:function(){this.nbits=this.bits=0},addBytes:function(a,b,c){this.window.addBytes(a,b,c);this.output.blit(this.outpos,a,b,c);this.needed-=c;
this.outpos+=c},addByte:function(a){this.window.addByte(a);this.output.b[this.outpos]=a;this.needed--;this.outpos++},addDistOne:function(a){for(var b=this.window.getLastChar(),c=0;c<a;)c++,this.addByte(b)},addDist:function(a,b){this.addBytes(this.window.buffer,this.window.pos-a,b)},applyHuffman:function(a){switch(a._hx_index){case 0:var b=a.i;return b;case 1:return b=a.left,a=a.right,this.applyHuffman(this.getBit()?a:b);case 2:return b=a.n,this.applyHuffman(a.table[this.getBits(b)])}},inflateLengths:function(a,
b){for(var c=0,d=0;c<b;){var f=this.applyHuffman(this.huffman);switch(f){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:d=f;a[c]=f;++c;break;case 16:f=c+3+this.getBits(2);if(f>b)throw ba.thrown("Invalid data");for(;c<f;)a[c]=d,++c;break;case 17:c+=3+this.getBits(3);if(c>b)throw ba.thrown("Invalid data");break;case 18:c+=11+this.getBits(7);if(c>b)throw ba.thrown("Invalid data");break;default:throw ba.thrown("Invalid data");}}},
inflateLoop:function(){switch(this.state._hx_index){case 0:var a=this.input.readByte();if((a&15)!=8)throw ba.thrown("Invalid data");var b=this.input.readByte(),c=(b&32)!=0;if(((a<<8)+b)%31!=0)throw ba.thrown("Invalid data");if(c)throw ba.thrown("Unsupported dictionary");this.state=Lf.Block;return!0;case 1:this.isFinal=this.getBit();switch(this.getBits(2)){case 0:this.len=this.input.readUInt16();if(this.input.readUInt16()!=65535-this.len)throw ba.thrown("Invalid data");this.state=Lf.Flat;a=this.inflateLoop();
this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=Lf.CData,!0;case 2:a=this.getBits(5)+257;b=this.getBits(5)+1;var d=this.getBits(4)+4;c=0;for(var f=d;c<f;){var g=c++;this.lengths[Qg.CODE_LENGTHS_POS[g]]=this.getBits(3)}c=d;for(f=19;c<f;)g=c++,this.lengths[Qg.CODE_LENGTHS_POS[g]]=0;this.huffman=this.htools.make(this.lengths,0,19,8);d=[];c=0;for(f=a+b;c<f;)c++,d.push(0);this.inflateLengths(d,a+b);this.huffdist=this.htools.make(d,a,b,16);this.huffman=
this.htools.make(d,0,a,16);this.state=Lf.CData;return!0;default:throw ba.thrown("Invalid data");}break;case 2:b=this.applyHuffman(this.huffman);if(b<256)return this.addByte(b),this.needed>0;if(b==256)this.state=this.isFinal?Lf.Crc:Lf.Block;else{b-=257;a=Qg.LEN_EXTRA_BITS_TBL[b];if(a==-1)throw ba.thrown("Invalid data");this.len=Qg.LEN_BASE_VAL_TBL[b]+this.getBits(a);b=this.huffdist==null?this.getRevBits(5):this.applyHuffman(this.huffdist);a=Qg.DIST_EXTRA_BITS_TBL[b];if(a==-1)throw ba.thrown("Invalid data");
this.dist=Qg.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw ba.thrown("Invalid data");this.state=this.dist==1?Lf.DistOne:Lf.Dist}return!0;case 3:return a=this.len<this.needed?this.len:this.needed,b=this.input.read(a),this.len-=a,this.addBytes(b,0,a),this.len==0&&(this.state=this.isFinal?Lf.Crc:Lf.Block),this.needed>0;case 4:a=this.window.checksum();if(a==null)return this.state=Lf.Done,!0;b=Ul.read(this.input);if(!a.equals(b))throw ba.thrown("Invalid CRC");this.state=
Lf.Done;return!0;case 5:for(;this.len>0&&this.needed>0;)a=this.len<this.dist?this.len:this.dist,a=this.needed<a?this.needed:a,this.addDist(this.dist,a),this.len-=a;this.len==0&&(this.state=Lf.CData);return this.needed>0;case 6:return a=this.len<this.needed?this.len:this.needed,this.addDistOne(a),this.len-=a,this.len==0&&(this.state=Lf.CData),this.needed>0;case 7:return!1}},__class__:Qg};var aq=function(a){this.i=a};t["haxe.zip.Reader"]=aq;aq.__name__="haxe.zip.Reader";aq.readZip=function(a){return(new aq(a)).read()};
aq.prototype={i:null,readZipDate:function(){var a=this.i.readUInt16(),b=a>>11&31,c=a>>5&63;a&=31;var d=this.i.readUInt16();return new Date((d>>9)+1980,(d>>5&15)-1,d&31,b,c,a<<1)},readExtraFields:function(a){for(var b=new hb;a>0;){if(a<4)throw ba.thrown("Invalid extra fields data");var c=this.i.readUInt16(),d=this.i.readUInt16();if(a<d)throw ba.thrown("Invalid extra fields data");if(c==28789){var f=this.i.readByte();if(f!=1){var g=new Yp;g.addByte(f);g.add(this.i.read(d-1));b.add(bo.FUnknown(c,g.getBytes()))}else c=
this.i.readInt32(),f=this.i.read(d-5).toString(),b.add(bo.FInfoZipUnicodePath(f,c))}else b.add(bo.FUnknown(c,this.i.read(d)));a-=4+d}return b},readEntryHeader:function(){var a=this.i,b=a.readInt32();if(b==33639248||b==101010256)return null;if(b!=67324752)throw ba.thrown("Invalid Zip Data");a.readUInt16();b=a.readUInt16();var c=(b&2048)!=0;if((b&63473)!=0)throw ba.thrown("Unsupported flags "+b);var d=a.readUInt16(),f=d!=0;if(f&&d!=8)throw ba.thrown("Unsupported compression "+d);d=this.readZipDate();
var g=a.readInt32(),h=a.readInt32(),n=a.readInt32(),l=a.readInt16(),q=a.readInt16();a=a.readString(l);q=this.readExtraFields(q);c&&q.push(bo.FUtf8);(b&8)!=0&&(g=null);return{fileName:a,fileSize:n,fileTime:d,compressed:f,dataSize:h,data:null,crc32:g,extraFields:q}},read:function(){for(var a=new hb,b=null;;){var c=this.readEntryHeader();if(c==null)break;if(c.crc32==null){if(c.compressed){b==null&&(b=new Oa(new ArrayBuffer(65536)));for(var d=new Yp,f=new Qg(this.i,!1,!1);;){var g=f.readBytes(b,0,65536);
d.addBytes(b,0,g);if(g<65536)break}c.data=d.getBytes()}else c.data=this.i.read(c.dataSize);c.crc32=this.i.readInt32();c.crc32==134695760&&(c.crc32=this.i.readInt32());c.dataSize=this.i.readInt32();c.fileSize=this.i.readInt32();c.dataSize=c.fileSize;c.compressed=!1}else c.data=this.i.read(c.dataSize);a.add(c)}return a},__class__:aq};var Ai=R["hscript.Const"]={__ename__:"hscript.Const",__constructs__:null,CInt:(B=function(a){return{_hx_index:0,v:a,__enum__:"hscript.Const",toString:E}},B._hx_name="CInt",
B.__params__=["v"],B),CFloat:(B=function(a){return{_hx_index:1,f:a,__enum__:"hscript.Const",toString:E}},B._hx_name="CFloat",B.__params__=["f"],B),CString:(B=function(a){return{_hx_index:2,s:a,__enum__:"hscript.Const",toString:E}},B._hx_name="CString",B.__params__=["s"],B)};Ai.__constructs__=[Ai.CInt,Ai.CFloat,Ai.CString];var Ya=R["hscript.Expr"]={__ename__:"hscript.Expr",__constructs__:null,EConst:(B=function(a){return{_hx_index:0,c:a,__enum__:"hscript.Expr",toString:E}},B._hx_name="EConst",B.__params__=
["c"],B),EIdent:(B=function(a){return{_hx_index:1,v:a,__enum__:"hscript.Expr",toString:E}},B._hx_name="EIdent",B.__params__=["v"],B),EVar:(B=function(a,b,c){return{_hx_index:2,n:a,t:b,e:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="EVar",B.__params__=["n","t","e"],B),EParent:(B=function(a){return{_hx_index:3,e:a,__enum__:"hscript.Expr",toString:E}},B._hx_name="EParent",B.__params__=["e"],B),EBlock:(B=function(a){return{_hx_index:4,e:a,__enum__:"hscript.Expr",toString:E}},B._hx_name="EBlock",
B.__params__=["e"],B),EField:(B=function(a,b){return{_hx_index:5,e:a,f:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="EField",B.__params__=["e","f"],B),EBinop:(B=function(a,b,c){return{_hx_index:6,op:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="EBinop",B.__params__=["op","e1","e2"],B),EUnop:(B=function(a,b,c){return{_hx_index:7,op:a,prefix:b,e:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="EUnop",B.__params__=["op","prefix","e"],B),ECall:(B=function(a,b){return{_hx_index:8,
e:a,params:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="ECall",B.__params__=["e","params"],B),EIf:(B=function(a,b,c){return{_hx_index:9,cond:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="EIf",B.__params__=["cond","e1","e2"],B),EWhile:(B=function(a,b){return{_hx_index:10,cond:a,e:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="EWhile",B.__params__=["cond","e"],B),EFor:(B=function(a,b,c){return{_hx_index:11,v:a,it:b,e:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="EFor",
B.__params__=["v","it","e"],B),EBreak:{_hx_name:"EBreak",_hx_index:12,__enum__:"hscript.Expr",toString:E},EContinue:{_hx_name:"EContinue",_hx_index:13,__enum__:"hscript.Expr",toString:E},EFunction:(B=function(a,b,c,d){return{_hx_index:14,args:a,e:b,name:c,ret:d,__enum__:"hscript.Expr",toString:E}},B._hx_name="EFunction",B.__params__=["args","e","name","ret"],B),EReturn:(B=function(a){return{_hx_index:15,e:a,__enum__:"hscript.Expr",toString:E}},B._hx_name="EReturn",B.__params__=["e"],B),EArray:(B=
function(a,b){return{_hx_index:16,e:a,index:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="EArray",B.__params__=["e","index"],B),EArrayDecl:(B=function(a){return{_hx_index:17,e:a,__enum__:"hscript.Expr",toString:E}},B._hx_name="EArrayDecl",B.__params__=["e"],B),ENew:(B=function(a,b){return{_hx_index:18,cl:a,params:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="ENew",B.__params__=["cl","params"],B),EThrow:(B=function(a){return{_hx_index:19,e:a,__enum__:"hscript.Expr",toString:E}},B._hx_name=
"EThrow",B.__params__=["e"],B),ETry:(B=function(a,b,c,d){return{_hx_index:20,e:a,v:b,t:c,ecatch:d,__enum__:"hscript.Expr",toString:E}},B._hx_name="ETry",B.__params__=["e","v","t","ecatch"],B),EObject:(B=function(a){return{_hx_index:21,fl:a,__enum__:"hscript.Expr",toString:E}},B._hx_name="EObject",B.__params__=["fl"],B),ETernary:(B=function(a,b,c){return{_hx_index:22,cond:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="ETernary",B.__params__=["cond","e1","e2"],B),ESwitch:(B=function(a,
b,c){return{_hx_index:23,e:a,cases:b,defaultExpr:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="ESwitch",B.__params__=["e","cases","defaultExpr"],B),EDoWhile:(B=function(a,b){return{_hx_index:24,cond:a,e:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="EDoWhile",B.__params__=["cond","e"],B),EMeta:(B=function(a,b,c){return{_hx_index:25,name:a,args:b,e:c,__enum__:"hscript.Expr",toString:E}},B._hx_name="EMeta",B.__params__=["name","args","e"],B),ECheckType:(B=function(a,b){return{_hx_index:26,
e:a,t:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="ECheckType",B.__params__=["e","t"],B),EForGen:(B=function(a,b){return{_hx_index:27,it:a,e:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="EForGen",B.__params__=["it","e"],B),ECast:(B=function(a,b){return{_hx_index:28,e:a,t:b,__enum__:"hscript.Expr",toString:E}},B._hx_name="ECast",B.__params__=["e","t"],B)};Ya.__constructs__=[Ya.EConst,Ya.EIdent,Ya.EVar,Ya.EParent,Ya.EBlock,Ya.EField,Ya.EBinop,Ya.EUnop,Ya.ECall,Ya.EIf,Ya.EWhile,Ya.EFor,Ya.EBreak,
Ya.EContinue,Ya.EFunction,Ya.EReturn,Ya.EArray,Ya.EArrayDecl,Ya.ENew,Ya.EThrow,Ya.ETry,Ya.EObject,Ya.ETernary,Ya.ESwitch,Ya.EDoWhile,Ya.EMeta,Ya.ECheckType,Ya.EForGen,Ya.ECast];var Rg=R["hscript.CType"]={__ename__:"hscript.CType",__constructs__:null,CTPath:(B=function(a,b){return{_hx_index:0,path:a,params:b,__enum__:"hscript.CType",toString:E}},B._hx_name="CTPath",B.__params__=["path","params"],B),CTFun:(B=function(a,b){return{_hx_index:1,args:a,ret:b,__enum__:"hscript.CType",toString:E}},B._hx_name=
"CTFun",B.__params__=["args","ret"],B),CTAnon:(B=function(a){return{_hx_index:2,fields:a,__enum__:"hscript.CType",toString:E}},B._hx_name="CTAnon",B.__params__=["fields"],B),CTParent:(B=function(a){return{_hx_index:3,t:a,__enum__:"hscript.CType",toString:E}},B._hx_name="CTParent",B.__params__=["t"],B),CTOpt:(B=function(a){return{_hx_index:4,t:a,__enum__:"hscript.CType",toString:E}},B._hx_name="CTOpt",B.__params__=["t"],B),CTNamed:(B=function(a,b){return{_hx_index:5,n:a,t:b,__enum__:"hscript.CType",
toString:E}},B._hx_name="CTNamed",B.__params__=["n","t"],B),CTExpr:(B=function(a){return{_hx_index:6,e:a,__enum__:"hscript.CType",toString:E}},B._hx_name="CTExpr",B.__params__=["e"],B)};Rg.__constructs__=[Rg.CTPath,Rg.CTFun,Rg.CTAnon,Rg.CTParent,Rg.CTOpt,Rg.CTNamed,Rg.CTExpr];var Gd=R["hscript.Error"]={__ename__:"hscript.Error",__constructs__:null,EInvalidChar:(B=function(a){return{_hx_index:0,c:a,__enum__:"hscript.Error",toString:E}},B._hx_name="EInvalidChar",B.__params__=["c"],B),EUnexpected:(B=
function(a){return{_hx_index:1,s:a,__enum__:"hscript.Error",toString:E}},B._hx_name="EUnexpected",B.__params__=["s"],B),EUnterminatedString:{_hx_name:"EUnterminatedString",_hx_index:2,__enum__:"hscript.Error",toString:E},EUnterminatedComment:{_hx_name:"EUnterminatedComment",_hx_index:3,__enum__:"hscript.Error",toString:E},EInvalidPreprocessor:(B=function(a){return{_hx_index:4,msg:a,__enum__:"hscript.Error",toString:E}},B._hx_name="EInvalidPreprocessor",B.__params__=["msg"],B),EUnknownVariable:(B=
function(a){return{_hx_index:5,v:a,__enum__:"hscript.Error",toString:E}},B._hx_name="EUnknownVariable",B.__params__=["v"],B),EInvalidIterator:(B=function(a){return{_hx_index:6,v:a,__enum__:"hscript.Error",toString:E}},B._hx_name="EInvalidIterator",B.__params__=["v"],B),EInvalidOp:(B=function(a){return{_hx_index:7,op:a,__enum__:"hscript.Error",toString:E}},B._hx_name="EInvalidOp",B.__params__=["op"],B),EInvalidAccess:(B=function(a){return{_hx_index:8,f:a,__enum__:"hscript.Error",toString:E}},B._hx_name=
"EInvalidAccess",B.__params__=["f"],B),ECustom:(B=function(a){return{_hx_index:9,msg:a,__enum__:"hscript.Error",toString:E}},B._hx_name="ECustom",B.__params__=["msg"],B)};Gd.__constructs__=[Gd.EInvalidChar,Gd.EUnexpected,Gd.EUnterminatedString,Gd.EUnterminatedComment,Gd.EInvalidPreprocessor,Gd.EUnknownVariable,Gd.EInvalidIterator,Gd.EInvalidOp,Gd.EInvalidAccess,Gd.ECustom];var Km=R["hscript.ModuleDecl"]={__ename__:"hscript.ModuleDecl",__constructs__:null,DPackage:(B=function(a){return{_hx_index:0,
path:a,__enum__:"hscript.ModuleDecl",toString:E}},B._hx_name="DPackage",B.__params__=["path"],B),DImport:(B=function(a,b,c){return{_hx_index:1,path:a,everything:b,name:c,__enum__:"hscript.ModuleDecl",toString:E}},B._hx_name="DImport",B.__params__=["path","everything","name"],B),DClass:(B=function(a){return{_hx_index:2,c:a,__enum__:"hscript.ModuleDecl",toString:E}},B._hx_name="DClass",B.__params__=["c"],B),DTypedef:(B=function(a){return{_hx_index:3,c:a,__enum__:"hscript.ModuleDecl",toString:E}},B._hx_name=
"DTypedef",B.__params__=["c"],B)};Km.__constructs__=[Km.DPackage,Km.DImport,Km.DClass,Km.DTypedef];var Vj=R["hscript.FieldAccess"]={__ename__:"hscript.FieldAccess",__constructs__:null,APublic:{_hx_name:"APublic",_hx_index:0,__enum__:"hscript.FieldAccess",toString:E},APrivate:{_hx_name:"APrivate",_hx_index:1,__enum__:"hscript.FieldAccess",toString:E},AInline:{_hx_name:"AInline",_hx_index:2,__enum__:"hscript.FieldAccess",toString:E},AOverride:{_hx_name:"AOverride",_hx_index:3,__enum__:"hscript.FieldAccess",
toString:E},AStatic:{_hx_name:"AStatic",_hx_index:4,__enum__:"hscript.FieldAccess",toString:E},AMacro:{_hx_name:"AMacro",_hx_index:5,__enum__:"hscript.FieldAccess",toString:E}};Vj.__constructs__=[Vj.APublic,Vj.APrivate,Vj.AInline,Vj.AOverride,Vj.AStatic,Vj.AMacro];var Dx=R["hscript.FieldKind"]={__ename__:"hscript.FieldKind",__constructs__:null,KFunction:(B=function(a){return{_hx_index:0,f:a,__enum__:"hscript.FieldKind",toString:E}},B._hx_name="KFunction",B.__params__=["f"],B),KVar:(B=function(a){return{_hx_index:1,
v:a,__enum__:"hscript.FieldKind",toString:E}},B._hx_name="KVar",B.__params__=["v"],B)};Dx.__constructs__=[Dx.KFunction,Dx.KVar];var qj=R["hscript._Interp.Stop"]={__ename__:"hscript._Interp.Stop",__constructs__:null,SBreak:{_hx_name:"SBreak",_hx_index:0,__enum__:"hscript._Interp.Stop",toString:E},SContinue:{_hx_name:"SContinue",_hx_index:1,__enum__:"hscript._Interp.Stop",toString:E},SReturn:{_hx_name:"SReturn",_hx_index:2,__enum__:"hscript._Interp.Stop",toString:E}};qj.__constructs__=[qj.SBreak,qj.SContinue,
qj.SReturn];var cw=function(){this.locals=new G;this.declared=[];this.resetVariables();this.initOps()};t["hscript.Interp"]=cw;cw.__name__="hscript.Interp";cw.prototype={variables:null,locals:null,binops:null,depth:null,inTry:null,declared:null,returnValue:null,resetVariables:function(){var a=this;this.variables=new G;this.variables.h["null"]=null;this.variables.h["true"]=!0;this.variables.h["false"]=!1;var b=this.variables,c=y.makeVarArgs(function(d){var f=a.posInfos(),g=d.shift();d.length>0&&(f.customParams=
d);De.trace(H.string(g),f)});b.h.trace=c},posInfos:function(){return{fileName:"hscript",lineNumber:0}},initOps:function(){var a=this;this.binops=new G;this.binops.h["+"]=function(b,c){return a.expr(b)+a.expr(c)};this.binops.h["-"]=function(b,c){return a.expr(b)-a.expr(c)};this.binops.h["*"]=function(b,c){return a.expr(b)*a.expr(c)};this.binops.h["/"]=function(b,c){return a.expr(b)/a.expr(c)};this.binops.h["%"]=function(b,c){return a.expr(b)%a.expr(c)};this.binops.h["&"]=function(b,c){return a.expr(b)&
a.expr(c)};this.binops.h["|"]=function(b,c){return a.expr(b)|a.expr(c)};this.binops.h["^"]=function(b,c){return a.expr(b)^a.expr(c)};this.binops.h["<<"]=function(b,c){return a.expr(b)<<a.expr(c)};this.binops.h[">>"]=function(b,c){return a.expr(b)>>a.expr(c)};this.binops.h[">>>"]=function(b,c){return a.expr(b)>>>a.expr(c)};this.binops.h["=="]=function(b,c){return a.expr(b)==a.expr(c)};this.binops.h["!="]=function(b,c){return a.expr(b)!=a.expr(c)};this.binops.h[">="]=function(b,c){return a.expr(b)>=
a.expr(c)};this.binops.h["<="]=function(b,c){return a.expr(b)<=a.expr(c)};this.binops.h[">"]=function(b,c){return a.expr(b)>a.expr(c)};this.binops.h["<"]=function(b,c){return a.expr(b)<a.expr(c)};this.binops.h["||"]=function(b,c){return a.expr(b)!=1?a.expr(c)==1:!0};this.binops.h["&&"]=function(b,c){return a.expr(b)==1?a.expr(c)==1:!1};this.binops.h["="]=m(this,this.assign);this.binops.h["..."]=function(b,c){return new M(a.expr(b),a.expr(c))};this.binops.h.is=function(b,c){return w.__instanceof(a.expr(b),
a.expr(c))};this.assignOp("+=",function(b,c){return b+c});this.assignOp("-=",function(b,c){return b-c});this.assignOp("*=",function(b,c){return b*c});this.assignOp("/=",function(b,c){return b/c});this.assignOp("%=",function(b,c){return b%c});this.assignOp("&=",function(b,c){return b&c});this.assignOp("|=",function(b,c){return b|c});this.assignOp("^=",function(b,c){return b^c});this.assignOp("<<=",function(b,c){return b<<c});this.assignOp(">>=",function(b,c){return b>>c});this.assignOp(">>>=",function(b,
c){return b>>>c})},setVar:function(a,b){return this.variables.h[a]=b},assign:function(a,b){b=this.expr(b);switch(a._hx_index){case 1:var c=a.v;a=this.locals.h[c];a==null?this.setVar(c,b):a.r=b;break;case 5:c=a.e;a=a.f;b=this.set(this.expr(c),a,b);break;case 16:c=a.e;a=a.index;c=this.expr(c);a=this.expr(a);w.__implements(c,ja)?w.__cast(c,ja).set(a,b):c[a]=b;break;default:throw c=Gd.EInvalidOp("="),ba.thrown(c);}return b},assignOp:function(a,b){var c=this;this.binops.h[a]=function(d,f){return c.evalAssignOp(a,
b,d,f)}},evalAssignOp:function(a,b,c,d){switch(c._hx_index){case 1:a=c.v;var f=this.locals.h[a];b=b(this.expr(c),this.expr(d));f==null?this.setVar(a,b):f.r=b;break;case 5:a=c.e;c=c.f;a=this.expr(a);b=b(this.get(a,c),this.expr(d));b=this.set(a,c,b);break;case 16:a=c.e;f=c.index;c=this.expr(a);a=this.expr(f);w.__implements(c,ja)?(b=b(w.__cast(c,ja).get(a),this.expr(d)),w.__cast(c,ja).set(a,b)):(b=b(c[a],this.expr(d)),c[a]=b);break;default:throw a=Gd.EInvalidOp(a),ba.thrown(a);}return b},increment:function(a,
b,c){switch(a._hx_index){case 1:a=a.v;var d=this.locals.h[a],f=d==null?this.resolve(a):d.r;b?(f+=c,d==null?this.setVar(a,f):d.r=f):d==null?this.setVar(a,f+c):d.r=f+c;return f;case 5:return f=a.e,a=a.f,d=this.expr(f),f=this.get(d,a),b?(f+=c,this.set(d,a,f)):this.set(d,a,f+c),f;case 16:return f=a.e,d=a.index,a=this.expr(f),d=this.expr(d),w.__implements(a,ja)?(f=w.__cast(a,ja).get(d),b?(f+=c,w.__cast(a,ja).set(d,f)):w.__cast(a,ja).set(d,f+c)):(f=a[d],b?(f+=c,a[d]=f):a[d]=f+c),f;default:throw a=Gd.EInvalidOp(c>
0?"++":"--"),ba.thrown(a);}},execute:function(a){this.depth=0;this.locals=new G;this.declared=[];return this.exprReturn(a)},exprReturn:function(a){try{return this.expr(a)}catch(b){if(Pb.lastError=b,a=ba.caught(b).unwrap(),w.__instanceof(a,qj))switch(a._hx_index){case 0:throw ba.thrown("Invalid break");case 1:throw ba.thrown("Invalid continue");case 2:return a=this.returnValue,this.returnValue=null,a}else throw b;}},duplicate:function(a){for(var b=new G,c=Object.keys(a.h),d=c.length,f=0;f<d;){var g=
c[f++];b.h[g]=a.h[g]}return b},restore:function(a){for(;this.declared.length>a;){var b=this.declared.pop();this.locals.h[b.n]=b.old}},error:function(a,b){throw ba.thrown(a);},rethrow:function(a){throw ba.thrown(a);},resolve:function(a){var b=this.variables.h[a];if(b==null&&!Object.prototype.hasOwnProperty.call(this.variables.h,a))throw a=Gd.EUnknownVariable(a),ba.thrown(a);return b},expr:function(a){var b=this;switch(a._hx_index){case 0:var c=a.c;switch(c._hx_index){case 0:var d=c.v;return d;case 1:return a=
c.f;case 2:return c.s}break;case 1:var f=a.v,g=this.locals.h[f];return g!=null?g.r:this.resolve(f);case 2:return g=a.t,g=a.n,f=a.e,this.declared.push({n:g,old:this.locals.h[g]}),a=this.locals,d=f==null?null:this.expr(f),a.h[g]={r:d},null;case 3:return f=a.e,this.expr(f);case 4:var h=a.e;a=this.declared.length;d=null;for(g=0;g<h.length;)f=h[g],++g,d=this.expr(f);this.restore(a);return d;case 5:return f=a.e,a=a.f,this.get(this.expr(f),a);case 6:d=a.op;f=a.e1;g=a.e2;a=this.binops.h[d];if(a==null)throw f=
Gd.EInvalidOp(d),ba.thrown(f);return a(f,g);case 7:switch(d=a.op,g=a.prefix,f=a.e,d){case "!":return this.expr(f)!=1;case "++":return this.increment(f,g,1);case "-":return-this.expr(f);case "--":return this.increment(f,g,-1);case "~":return~this.expr(f);default:throw f=Gd.EInvalidOp(d),ba.thrown(f);}case 8:f=a.e;var n=a.params;d=[];for(g=0;g<n.length;)a=n[g],++g,d.push(this.expr(a));if(f._hx_index==5){g=f.e;a=f.f;f=this.expr(g);if(f==null)throw g=Gd.EInvalidAccess(a),ba.thrown(g);return this.fcall(f,
a,d)}return this.call(null,this.expr(f),d);case 9:return d=a.cond,f=a.e1,g=a.e2,this.expr(d)==1?this.expr(f):g==null?null:this.expr(g);case 10:return d=a.cond,f=a.e,this.whileLoop(d,f),null;case 11:return d=a.v,h=a.it,f=a.e,this.forLoop(d,h,f),null;case 12:throw ba.thrown(qj.SBreak);case 13:throw ba.thrown(qj.SContinue);case 14:g=a.ret;n=a.args;var l=a.e,q=a.name,u=this.duplicate(this.locals),v=this,z=0;for(g=0;g<n.length;)a=n[g],++g,a.opt||(z+=1);a=function(L){if((L==null?0:L.length)!=n.length){if(L.length<
z){L="Invalid number of parameters. Got "+L.length+", required "+z;q!=null&&(L+=" for function '"+q+"'");var Q=Gd.ECustom(L);throw ba.thrown(Q);}var W=[],ka=L.length-z,ha=0;for(Q=0;Q<n.length;){var ta=n[Q];++Q;ta.opt?ka>0?(W.push(L[ha++]),--ka):W.push(null):W.push(L[ha++])}L=W}W=v.locals;ka=v.depth;v.depth++;v.locals=v.duplicate(u);Q=0;for(ha=n.length;Q<ha;)ta=Q++,v.locals.h[n[ta].name]={r:L[ta]};Q=null;L=b.declared.length;if(b.inTry)try{Q=v.exprReturn(l)}catch(za){throw Pb.lastError=za,Q=ba.caught(za).unwrap(),
b.restore(L),v.locals=W,v.depth=ka,ba.thrown(Q);}else Q=v.exprReturn(l);b.restore(L);v.locals=W;v.depth=ka;return Q};f=y.makeVarArgs(a);q!=null&&(this.depth==0?this.variables.h[q]=f:(this.declared.push({n:q,old:this.locals.h[q]}),g={r:f},this.locals.h[q]=g,u.h[q]=g));return f;case 15:throw f=a.e,this.returnValue=f==null?null:this.expr(f),ba.thrown(qj.SReturn);case 16:return f=a.e,g=a.index,d=this.expr(f),f=this.expr(g),w.__implements(d,ja)?w.__cast(d,ja).get(f):d[f];case 17:d=a.e;d.length>0?(g=d[0],
g._hx_index==6?(f=g.e1,f=g.e2,f=g.op=="=>"):f=!1):f=!1;if(f){a=[];h=[];for(g=0;g<d.length;)if(f=d[g],++g,f._hx_index==6)if(f.op=="=>")c=f.e2,a.push(this.expr(f.e1)),h.push(this.expr(c));else throw g=Gd.ECustom("Invalid map key=>value expression"),ba.thrown(g);else throw f=Gd.ECustom("Invalid map key=>value expression"),ba.thrown(f);return this.makeMap(a,h)}a=[];for(g=0;g<d.length;)f=d[g],++g,a.push(this.expr(f));return a;case 18:d=a.cl;h=a.params;a=[];for(g=0;g<h.length;)f=h[g],++g,a.push(this.expr(f));
return this.cnew(d,a);case 19:throw f=a.e,ba.thrown(this.expr(f));case 20:g=a.t;f=a.e;g=a.v;h=a.ecatch;a=this.declared.length;c=this.inTry;try{return this.inTry=!0,d=this.expr(f),this.restore(a),this.inTry=c,d}catch(L){Pb.lastError=L;f=ba.caught(L).unwrap();if(w.__instanceof(f,qj))throw this.inTry=c,ba.thrown(f);this.restore(a);this.inTry=c;this.declared.push({n:g,old:this.locals.h[g]});this.locals.h[g]={r:f};d=this.expr(h);this.restore(a);return d}break;case 21:f=a.fl;d={};for(g=0;g<f.length;)a=
f[g],++g,this.set(d,a.name,this.expr(a.e));return d;case 22:return d=a.cond,f=a.e1,g=a.e2,this.expr(d)==1?this.expr(f):this.expr(g);case 23:f=a.e;h=a.cases;a=a.defaultExpr;var r=this.expr(f),F=!1;for(g=0;g<h.length;){c=h[g];++g;f=0;for(var J=c.values;f<J.length;)if(d=J[f],++f,this.expr(d)==r){F=!0;break}if(F){r=this.expr(c.expr);break}}F||(r=a==null?null:this.expr(a));return r;case 24:return d=a.cond,f=a.e,this.doWhileLoop(d,f),null;case 25:return g=a.name,d=a.args,f=a.e,this.exprMeta(g,d,f);case 26:return g=
a.t,f=a.e,this.expr(f);case 27:h=a.it;f=a.e;d=g=null;c=h;c._hx_index==6&&c.op=="in"&&(r=c.e1,a=c.e2,r._hx_index==6&&r.op=="=>"&&(h=r.e1,r=r.e2,h._hx_index==1&&r._hx_index==1&&(d=r.v,g=h.v,c=a)));if(g==null)throw g=Gd.ECustom("Invalid for expression"),ba.thrown(g);b.forKeyValueLoop(g,d,c,f);return null;case 28:return g=a.t,f=a.e,this.expr(f)}},exprMeta:function(a,b,c){return this.expr(c)},doWhileLoop:function(a,b){var c=this.declared.length;do{var d=!0;try{this.expr(b)}catch(g){Pb.lastError=g;var f=
ba.caught(g).unwrap();if(w.__instanceof(f,qj))switch(f._hx_index){case 0:d=!1;break;case 2:throw ba.thrown(f);}else throw g;}if(!d)break}while(this.expr(a)==1);this.restore(c)},whileLoop:function(a,b){for(var c=this.declared.length;this.expr(a)==1;){var d=!0;try{this.expr(b)}catch(g){Pb.lastError=g;var f=ba.caught(g).unwrap();if(w.__instanceof(f,qj))switch(f._hx_index){case 0:d=!1;break;case 2:throw ba.thrown(f);}else throw g;}if(!d)break}this.restore(c)},makeIterator:function(a){if(a instanceof Array)return new wg(a);
a.iterator!=null&&(a=La(a));if(a.hasNext==null||a.next==null)throw a=Gd.EInvalidIterator(a),ba.thrown(a);return a},makeKeyValueIterator:function(a){if(a instanceof Array)return new Xq(a);a.keyValueIterator!=null&&(a=a instanceof Array?V.keyValueIter(a):a.keyValueIterator());if(a.hasNext==null||a.next==null)throw a=Gd.EInvalidIterator(a),ba.thrown(a);return a},forLoop:function(a,b,c){var d=this.declared.length;this.declared.push({n:a,old:this.locals.h[a]});for(b=this.makeIterator(this.expr(b));b.hasNext();){var f=
this.locals,g={r:b.next()};f.h[a]=g;f=!0;try{this.expr(c)}catch(h){if(Pb.lastError=h,g=ba.caught(h).unwrap(),w.__instanceof(g,qj))switch(g._hx_index){case 0:f=!1;break;case 2:throw ba.thrown(g);}else throw h;}if(!f)break}this.restore(d)},forKeyValueLoop:function(a,b,c,d){var f=this.declared.length;this.declared.push({n:a,old:this.locals.h[a]});this.declared.push({n:b,old:this.locals.h[b]});for(c=this.makeKeyValueIterator(this.expr(c));c.hasNext();){var g=c.next();this.locals.h[a]={r:g.key};this.locals.h[b]=
{r:g.value};g=!0;try{this.expr(d)}catch(n){Pb.lastError=n;var h=ba.caught(n).unwrap();if(w.__instanceof(h,qj))switch(h._hx_index){case 0:g=!1;break;case 2:throw ba.thrown(h);}else throw n;}if(!g)break}this.restore(f)},loopRun:function(a){var b=!0;try{a()}catch(c){if(Pb.lastError=c,a=ba.caught(c).unwrap(),w.__instanceof(a,qj))switch(a._hx_index){case 0:b=!1;break;case 2:throw ba.thrown(a);}else throw c;}return b},isMap:function(a){return w.__implements(a,ja)},getMapValue:function(a,b){return w.__cast(a,
ja).get(b)},setMapValue:function(a,b,c){w.__cast(a,ja).set(b,c)},makeMap:function(a,b){for(var c=!0,d=!0,f=!0,g=!0,h=0;h<a.length;){var n=a[h];++h;c=c&&typeof n=="string";d=d&&typeof n=="number"&&(n|0)===n;f=f&&y.isObject(n);g=g&&y.isEnumValue(n)}if(d){c=new Od;for(d=0;d<a.length;)n=a[d],f=d++,c.h[n]=b[f];return c}if(c){c=new G;for(d=0;d<a.length;)n=a[d],f=d++,c.h[n]=b[f];return c}if(g){c=new cf;for(d=0;d<a.length;)n=a[d],f=d++,c.set(n,b[f]);return c}if(f){c=new Ta;for(d=0;d<a.length;)n=a[d],f=d++,
c.set(n,b[f]);return c}b=Gd.ECustom("Invalid map keys "+H.string(a));throw ba.thrown(b);},get:function(a,b){if(a==null)throw a=Gd.EInvalidAccess(b),ba.thrown(a);return y.getProperty(a,b)},set:function(a,b,c){if(a==null)throw a=Gd.EInvalidAccess(b),ba.thrown(a);y.setProperty(a,b,c);return c},fcall:function(a,b,c){return this.call(a,this.get(a,b),c)},call:function(a,b,c){return b.apply(a,c)},cnew:function(a,b){var c=t[a];c==null&&(c=this.resolve(a));return ab.createInstance(c,b)},__class__:cw};var lb=
R["hscript.Token"]={__ename__:"hscript.Token",__constructs__:null,TEof:{_hx_name:"TEof",_hx_index:0,__enum__:"hscript.Token",toString:E},TConst:(B=function(a){return{_hx_index:1,c:a,__enum__:"hscript.Token",toString:E}},B._hx_name="TConst",B.__params__=["c"],B),TId:(B=function(a){return{_hx_index:2,s:a,__enum__:"hscript.Token",toString:E}},B._hx_name="TId",B.__params__=["s"],B),TOp:(B=function(a){return{_hx_index:3,s:a,__enum__:"hscript.Token",toString:E}},B._hx_name="TOp",B.__params__=["s"],B),TPOpen:{_hx_name:"TPOpen",
_hx_index:4,__enum__:"hscript.Token",toString:E},TPClose:{_hx_name:"TPClose",_hx_index:5,__enum__:"hscript.Token",toString:E},TBrOpen:{_hx_name:"TBrOpen",_hx_index:6,__enum__:"hscript.Token",toString:E},TBrClose:{_hx_name:"TBrClose",_hx_index:7,__enum__:"hscript.Token",toString:E},TDot:{_hx_name:"TDot",_hx_index:8,__enum__:"hscript.Token",toString:E},TQuestionDot:{_hx_name:"TQuestionDot",_hx_index:9,__enum__:"hscript.Token",toString:E},TComma:{_hx_name:"TComma",_hx_index:10,__enum__:"hscript.Token",
toString:E},TSemicolon:{_hx_name:"TSemicolon",_hx_index:11,__enum__:"hscript.Token",toString:E},TBkOpen:{_hx_name:"TBkOpen",_hx_index:12,__enum__:"hscript.Token",toString:E},TBkClose:{_hx_name:"TBkClose",_hx_index:13,__enum__:"hscript.Token",toString:E},TQuestion:{_hx_name:"TQuestion",_hx_index:14,__enum__:"hscript.Token",toString:E},TDoubleDot:{_hx_name:"TDoubleDot",_hx_index:15,__enum__:"hscript.Token",toString:E},TMeta:(B=function(a){return{_hx_index:16,s:a,__enum__:"hscript.Token",toString:E}},
B._hx_name="TMeta",B.__params__=["s"],B),TPrepro:(B=function(a){return{_hx_index:17,s:a,__enum__:"hscript.Token",toString:E}},B._hx_name="TPrepro",B.__params__=["s"],B)};lb.__constructs__=[lb.TEof,lb.TConst,lb.TId,lb.TOp,lb.TPOpen,lb.TPClose,lb.TBrOpen,lb.TBrClose,lb.TDot,lb.TQuestionDot,lb.TComma,lb.TSemicolon,lb.TBkOpen,lb.TBkClose,lb.TQuestion,lb.TDoubleDot,lb.TMeta,lb.TPrepro];var wn=function(){this.uid=0;this.preprocesorValues=new G;this.line=1;this.opChars="+*/-=!><&|^%~";this.identChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
var a=[["%"],["*","/"],["+","-"],["<<",">>",">>>"],["|","&","^"],"== != > < >= <=".split(" "),["..."],["&&"],["||"],"= += -= *= /= %= <<= >>= >>>= |= &= ^= =>".split(" "),["->"],["in","is"]];this.opPriority=new G;this.opRightAssoc=new G;for(var b=0,c=a.length;b<c;)for(var d=b++,f=0,g=a[d];f<g.length;){var h=g[f];++f;this.opPriority.h[h]=d;d==9&&(this.opRightAssoc.h[h]=!0)}h="!";this.opPriority.h[h]=h=="++"||h=="--"?-1:-2;h="++";this.opPriority.h[h]=h=="++"||h=="--"?-1:-2;h="--";this.opPriority.h[h]=
h=="++"||h=="--"?-1:-2;h="~";this.opPriority.h[h]=h=="++"||h=="--"?-1:-2};t["hscript.Parser"]=wn;wn.__name__="hscript.Parser";wn.prototype={line:null,opChars:null,identChars:null,opPriority:null,opRightAssoc:null,preprocesorValues:null,allowJSON:null,allowTypes:null,allowMetadata:null,resumeErrors:null,input:null,readPos:null,offset:null,char:null,ops:null,idents:null,uid:null,tokens:null,get_currentPos:function(){return this.readPos+this.offset},error:function(a,b,c){if(!this.resumeErrors)throw ba.thrown(a);
},invalidChar:function(a){if(!this.resumeErrors)throw ba.thrown(Gd.EInvalidChar(a));},initParser:function(a,b){this.preprocStack=[];this.tokens=new zx;this.offset=b;this.char=-1;this.ops=[];this.idents=[];a=this.uid=0;for(b=this.opChars.length;a<b;){var c=a++;this.ops[V.cca(this.opChars,c)]=!0}a=0;for(b=this.identChars.length;a<b;)c=a++,this.idents[V.cca(this.identChars,c)]=!0},parseString:function(a,b,c){c==null&&(c=0);b==null&&(b="hscript");this.initParser(b,c);this.input=a;this.readPos=0;for(a=
[];;){b=this.token();if(b==lb.TEof)break;c=this.tokens;c.head=new uc(b,c.head);this.parseFullExpr(a)}return a.length==1?a[0]:Ya.EBlock(a)},unexpected:function(a){a=Gd.EUnexpected(this.tokenString(a));if(!this.resumeErrors)throw ba.thrown(a);return null},push:function(a){var b=this.tokens;b.head=new uc(a,b.head)},ensure:function(a){var b=this.token();b!=a&&this.unexpected(b)},ensureToken:function(a){var b=this.token();ab.enumEq(b,a)||this.unexpected(b)},maybe:function(a){var b=this.token();if(ab.enumEq(b,
a))return!0;a=this.tokens;a.head=new uc(b,a.head);return!1},getIdent:function(){var a=this.token();if(a==null)return this.unexpected(a),null;if(a._hx_index==2)return a.s;this.unexpected(a);return null},expr:function(a){return a},pmin:function(a){return 0},pmax:function(a){return 0},mk:function(a,b,c){return a},isBlock:function(a){if(a==null||a==null)return!1;switch(a._hx_index){case 2:var b=a.t,c=a.e;return c!=null?this.isBlock(c):b!=null?b==null?!1:b._hx_index==2?!0:!1:!1;case 4:return!0;case 6:return c=
a.e2,this.isBlock(c);case 7:return b=a.prefix,c=a.e,b?!1:this.isBlock(c);case 9:return c=a.e1,a=a.e2,a!=null?this.isBlock(a):this.isBlock(c);case 10:return c=a.e,this.isBlock(c);case 11:return c=a.e,this.isBlock(c);case 14:return c=a.e,this.isBlock(c);case 15:return c=a.e,c!=null?this.isBlock(c):!1;case 20:return c=a.ecatch,this.isBlock(c);case 21:return!0;case 23:return!0;case 24:return c=a.e,this.isBlock(c);case 25:if(a.name==":markup")return!0;c=a.e;return this.isBlock(c);case 27:return c=a.e,
this.isBlock(c);default:return!1}},parseFullExpr:function(a){var b=this.parseExpr();a.push(b);for(var c=this.token();c==lb.TComma&&b!=null&&b!=null&&b._hx_index==2;)b=this.parseStructure("var"),a.push(b),c=this.token();c!=lb.TSemicolon&&c!=lb.TEof&&(this.isBlock(b)?(a=this.tokens,a.head=new uc(c,a.head)):this.unexpected(c))},parseObject:function(a){a=[];a:for(;;){var b=this.token(),c=null;if(b==null){this.unexpected(b);break}else switch(b._hx_index){case 1:var d=b.c;this.allowJSON||this.unexpected(b);
d._hx_index==2?c=d.s:this.unexpected(b);break;case 2:c=b.s;break;case 7:break a;default:this.unexpected(b);break a}b=this.token();b!=lb.TDoubleDot&&this.unexpected(b);a.push({name:c,e:this.parseExpr()});b=this.token();if(b==null)this.unexpected(b);else switch(b._hx_index){case 7:break a;case 10:break;default:this.unexpected(b)}}return this.parseExprNext(Ya.EObject(a))},parseExpr:function(){var a=this.token();if(a==null)return this.unexpected(a);switch(a._hx_index){case 1:var b=a.c;return this.parseExprNext(Ya.EConst(b));
case 2:var c=a.s;b=this.parseStructure(c);b==null&&(b=Ya.EIdent(c));return this.parseExprNext(b);case 3:c=a.s;if(c=="-")if(b=this.parseExpr(),b!=null&&b!=null&&b._hx_index==0)switch(a=b.c,a._hx_index){case 0:return Ya.EConst(Ai.CInt(-a.v));case 1:return Ya.EConst(Ai.CFloat(-a.f));default:return this.makeUnop(c,b)}else return this.makeUnop(c,b);if(this.opPriority.h[c]<0)return this.makeUnop(c,this.parseExpr());if(c=="<"){b=this.readPos-1;c=this.getIdent();if(this.tokens.head!=null)throw ba.thrown("assert");
if(this.readPos==b+c.length+1){c="</"+c+">";var d=this.input.indexOf(c,this.readPos);d<0&&(c="/>",d=this.input.indexOf(c,this.readPos));if(d>=0)return this.readPos=d+c.length,this.char=-1,--b,d=this.readPos-1,a=V.substr(this.input,b,d-b+1),Ya.EMeta(":markup",[],Ya.EConst(Ai.CString(a)))}}return this.unexpected(a);case 4:a=this.token();if(a==lb.TPClose)return c=this.token(),ab.enumEq(c,lb.TOp("->"))||this.unexpected(c),a=this.parseExpr(),this.mkLambda([],a,0);c=this.tokens;c.head=new uc(a,c.head);
b=this.parseExpr();a=this.token();if(a!=null)switch(a._hx_index){case 0:if(this.resumeErrors)return b;break;case 5:return this.parseExprNext(Ya.EParent(b));case 10:if(b!=null&&b._hx_index==1)return a=b.v,this.parseLambda([{name:a}],0);break;case 15:if(c=this.parseType(),a=this.token(),a!=null)switch(a._hx_index){case 5:return this.parseExprNext(Ya.ECheckType(b,c));case 10:if(b!=null&&b._hx_index==1)return a=b.v,this.parseLambda([{name:a,t:c}],0)}}return this.unexpected(a);case 6:a=this.token();if(a==
null)c=this.tokens,c.head=new uc(a,c.head);else switch(a._hx_index){case 1:b=a.c;if(this.allowJSON)if(b._hx_index==2){if(b=this.token(),c=this.tokens,c.head=new uc(b,c.head),c=this.tokens,c.head=new uc(a,c.head),b!=null&&b._hx_index==15)return this.parseExprNext(this.parseObject(0))}else c=this.tokens,c.head=new uc(a,c.head);else c=this.tokens,c.head=new uc(a,c.head);break;case 2:b=this.token();c=this.tokens;c.head=new uc(b,c.head);c=this.tokens;c.head=new uc(a,c.head);if(b!=null&&b._hx_index==15)return this.parseExprNext(this.parseObject(0));
break;case 7:return this.parseExprNext(Ya.EObject([]));default:c=this.tokens,c.head=new uc(a,c.head)}for(b=[];;){this.parseFullExpr(b);a=this.token();if(a==lb.TBrClose||this.resumeErrors&&a==lb.TEof)break;c=this.tokens;c.head=new uc(a,c.head)}return Ya.EBlock(b);case 12:b=[];a=this.token();for(d=!0;a!=lb.TBkClose&&(!this.resumeErrors||a!=lb.TEof);){if(!d)if(a!=lb.TComma)this.unexpected(a);else if(a=this.token(),a==lb.TBkClose)break;d=!1;c=this.tokens;c.head=new uc(a,c.head);b.push(this.parseExpr());
a=this.token()}if(b.length==1&&b[0]!=null&&(a=b[0],a!=null))switch(a._hx_index){case 10:return a="__a_"+this.uid++,b=Ya.EBlock([Ya.EVar(a,null,Ya.EArrayDecl([])),this.mapCompr(a,b[0]),Ya.EIdent(a)]),this.parseExprNext(b);case 11:return a="__a_"+this.uid++,b=Ya.EBlock([Ya.EVar(a,null,Ya.EArrayDecl([])),this.mapCompr(a,b[0]),Ya.EIdent(a)]),this.parseExprNext(b);case 24:return a="__a_"+this.uid++,b=Ya.EBlock([Ya.EVar(a,null,Ya.EArrayDecl([])),this.mapCompr(a,b[0]),Ya.EIdent(a)]),this.parseExprNext(b)}return this.parseExprNext(Ya.EArrayDecl(b));
case 16:return c=a.s,this.allowMetadata?(a=this.parseMetaArgs(),Ya.EMeta(c,a,this.parseExpr())):this.unexpected(a);default:return this.unexpected(a)}},parseLambda:function(a,b){a:for(;;){var c=this.getIdent(),d=this.maybe(lb.TDoubleDot)?this.parseType():null;a.push({name:c,t:d});c=this.token();if(c==null){this.unexpected(c);break}else switch(c._hx_index){case 5:break a;case 10:break;default:this.unexpected(c);break a}}d=this.token();ab.enumEq(d,lb.TOp("->"))||this.unexpected(d);c=this.parseExpr();
return this.mkLambda(a,c,b)},mkLambda:function(a,b,c){return Ya.EFunction(a,Ya.EMeta(":lambda",[],Ya.EReturn(b)))},parseMetaArgs:function(){var a=this.token();if(a!=lb.TPOpen){var b=this.tokens;b.head=new uc(a,b.head);return null}var c=[];a=this.token();if(a!=lb.TPClose)a:for(b=this.tokens,b.head=new uc(a,b.head);;)if(c.push(this.parseExpr()),a=this.token(),a==null)this.unexpected(a);else switch(a._hx_index){case 5:break a;case 10:break;default:this.unexpected(a)}return c},mapCompr:function(a,b){if(b==
null)return null;switch(b._hx_index){case 3:var c=b.e;a=Ya.EParent(this.mapCompr(a,c));break;case 4:c=b.e;if(c.length==1){var d=c[0];a=Ya.EBlock([this.mapCompr(a,d)])}else a=Ya.ECall(Ya.EField(Ya.EIdent(a),"push"),[b]);break;case 9:var f=b.cond;d=b.e1;c=b.e2;a=c==null?Ya.EIf(f,this.mapCompr(a,d),null):Ya.ECall(Ya.EField(Ya.EIdent(a),"push"),[b]);break;case 10:f=b.cond;c=b.e;a=Ya.EWhile(f,this.mapCompr(a,c));break;case 11:d=b.v;f=b.it;c=b.e;a=Ya.EFor(d,f,this.mapCompr(a,c));break;case 24:f=b.cond;
c=b.e;a=Ya.EDoWhile(f,this.mapCompr(a,c));break;case 27:f=b.it;c=b.e;a=Ya.EForGen(f,this.mapCompr(a,c));break;default:a=Ya.ECall(Ya.EField(Ya.EIdent(a),"push"),[b])}return a},makeUnop:function(a,b){if(b==null&&this.resumeErrors)return null;if(b==null)return Ya.EUnop(a,!0,b);switch(b._hx_index){case 6:var c=b.e1,d=b.e2;return Ya.EBinop(b.op,this.makeUnop(a,c),d);case 22:return c=b.cond,d=b.e1,b=b.e2,Ya.ETernary(this.makeUnop(a,c),d,b);default:return Ya.EUnop(a,!0,b)}},makeBinop:function(a,b,c){if(c==
null&&this.resumeErrors||c==null)return Ya.EBinop(a,b,c);switch(c._hx_index){case 6:var d=c.op,f=c.e1,g=c.e2,h=this.opPriority.h[a]-this.opPriority.h[d];return h<0||h==0&&!Object.prototype.hasOwnProperty.call(this.opRightAssoc.h,a)?Ya.EBinop(d,this.makeBinop(a,b,f),g):Ya.EBinop(a,b,c);case 22:return f=c.cond,g=c.e1,d=c.e2,Object.prototype.hasOwnProperty.call(this.opRightAssoc.h,a)?Ya.EBinop(a,b,c):Ya.ETernary(this.makeBinop(a,b,f),g,d);default:return Ya.EBinop(a,b,c)}},parseStructure:function(a){switch(a){case "break":return Ya.EBreak;
case "cast":var b=this.token();if(b==lb.TPOpen){a=this.parseExpr();var c=this.token();c!=lb.TComma&&this.unexpected(c);c=this.parseType();return Ya.ECast(a,c)}var d=this.tokens;d.head=new uc(b,d.head);a=this.parseExpr();return Ya.ECast(a,null);case "continue":return Ya.EContinue;case "do":return a=this.parseExpr(),b=this.token(),b==null?this.unexpected(b):b._hx_index==2?b.s!="while"&&this.unexpected(b):this.unexpected(b),b=this.parseExpr(),Ya.EDoWhile(b,a);case "else":return this.unexpected(lb.TId(a));
case "final":case "var":var f=this.getIdent();b=this.token();c=null;b==lb.TDoubleDot&&this.allowTypes&&(c=this.parseType(),b=this.token());a=null;if(b==null)c!=null?(d=this.tokens,d.head=new uc(b,d.head)):this.unexpected(b);else switch(b._hx_index){case 3:b.s=="="?a=this.parseExpr():this.unexpected(b);break;case 10:case 11:d=this.tokens;d.head=new uc(b,d.head);break;default:c!=null?(d=this.tokens,d.head=new uc(b,d.head)):this.unexpected(b)}return Ya.EVar(f,c,a);case "for":return c=this.token(),c!=
lb.TPOpen&&this.unexpected(c),b=this.parseExpr(),c=this.token(),c!=lb.TPClose&&this.unexpected(c),a=this.parseExpr(),b!=null&&b._hx_index==6&&b.op=="in"&&(d=b.e1,c=b.e2,d._hx_index==1)?Ya.EFor(d.v,c,a):Ya.EForGen(b,a);case "function":return b=this.token(),a=null,b==null?(d=this.tokens,d.head=new uc(b,d.head)):b._hx_index==2?a=b.s:(d=this.tokens,d.head=new uc(b,d.head)),b=this.parseFunctionDecl(),Ya.EFunction(b.args,b.body,a,b.ret);case "if":c=this.token();c!=lb.TPOpen&&this.unexpected(c);a=this.parseExpr();
c=this.token();c!=lb.TPClose&&this.unexpected(c);c=this.parseExpr();f=null;var g=!1;b=this.token();b==lb.TSemicolon&&(g=!0,b=this.token());ab.enumEq(b,lb.TId("else"))?f=this.parseExpr():(d=this.tokens,d.head=new uc(b,d.head),g&&(d=this.tokens,d.head=new uc(lb.TSemicolon,d.head)));return Ya.EIf(a,c,f);case "inline":return this.maybe(lb.TId("function"))||this.unexpected(lb.TId("inline")),this.parseStructure("function");case "new":a=[];a.push(this.getIdent());a:for(;;)if(b=this.token(),b==null){this.unexpected(b);
break}else switch(b._hx_index){case 4:break a;case 8:a.push(this.getIdent());break;default:this.unexpected(b);break a}b=this.parseExprList(lb.TPClose);return Ya.ENew(a.join("."),b);case "return":return b=this.token(),d=this.tokens,d.head=new uc(b,d.head),a=b==lb.TSemicolon?null:this.parseExpr(),Ya.EReturn(a);case "switch":a=this.parseExpr();g=null;f=[];c=this.token();c!=lb.TBrOpen&&this.unexpected(c);a:for(;;)if(b=this.token(),b==null){this.unexpected(b);break}else switch(b._hx_index){case 2:switch(b.s){case "case":var h=
{values:[],expr:null};f.push(h);b:for(;;)if(c=this.parseExpr(),h.values.push(c),b=this.token(),b==null){this.unexpected(b);break}else switch(b._hx_index){case 10:break;case 15:break b;default:this.unexpected(b);break b}c=[];b:for(;;)if(b=this.token(),d=this.tokens,d.head=new uc(b,d.head),b==null)this.parseFullExpr(c);else switch(b._hx_index){case 0:if(this.resumeErrors)break b;else this.parseFullExpr(c);break;case 2:switch(b.s){case "case":case "default":break b;default:this.parseFullExpr(c)}break;
case 7:break b;default:this.parseFullExpr(c)}h.expr=c.length==1?c[0]:c.length==0?Ya.EBlock([]):Ya.EBlock(c);break;case "default":g!=null&&this.unexpected(b);c=this.token();c!=lb.TDoubleDot&&this.unexpected(c);d=[];b:for(;;)if(b=this.token(),c=this.tokens,c.head=new uc(b,c.head),b==null)this.parseFullExpr(d);else switch(b._hx_index){case 0:if(this.resumeErrors)break b;else this.parseFullExpr(d);break;case 2:switch(b.s){case "case":case "default":break b;default:this.parseFullExpr(d)}break;case 7:break b;
default:this.parseFullExpr(d)}g=d.length==1?d[0]:d.length==0?Ya.EBlock([]):Ya.EBlock(d);break;default:this.unexpected(b);break a}break;case 7:break a;default:this.unexpected(b);break a}return Ya.ESwitch(a,f,g);case "throw":return a=this.parseExpr(),Ya.EThrow(a);case "try":return a=this.parseExpr(),c=this.token(),ab.enumEq(c,lb.TId("catch"))||this.unexpected(c),c=this.token(),c!=lb.TPOpen&&this.unexpected(c),b=this.getIdent(),c=this.token(),c!=lb.TDoubleDot&&this.unexpected(c),c=null,this.allowTypes?
c=this.parseType():(d=this.token(),ab.enumEq(d,lb.TId("Dynamic"))||this.unexpected(d)),d=this.token(),d!=lb.TPClose&&this.unexpected(d),d=this.parseExpr(),Ya.ETry(a,b,c,d);case "while":return b=this.parseExpr(),a=this.parseExpr(),Ya.EWhile(b,a);default:return null}},parseExprNext:function(a){var b=this.token();if(b==null){var c=this.tokens;c.head=new uc(b,c.head);return a}switch(b._hx_index){case 2:c=b.s;if(Object.prototype.hasOwnProperty.call(this.opPriority.h,c))return this.parseExprNext(this.makeBinop(c,
a,this.parseExpr()));c=this.tokens;c.head=new uc(b,c.head);return a;case 3:c=b.s;if(c=="->"){switch(a._hx_index){case 1:return c=a.v,a=this.parseExpr(),this.mkLambda([{name:c}],a,0);case 3:var d=a.e;if(d._hx_index==1)return c=d.v,a=this.parseExpr(),this.mkLambda([{name:c}],a,0);break;case 26:if(d=a.e,d._hx_index==1)return c=d.v,b=a.t,a=this.parseExpr(),this.mkLambda([{name:c,t:b}],a,0)}this.unexpected(b)}return this.opPriority.h[c]==-1?(d=this.isBlock(a)?!0:a._hx_index==3?!0:!1)?(c=this.tokens,c.head=
new uc(b,c.head),a):this.parseExprNext(Ya.EUnop(c,!1,a)):this.makeBinop(c,a,this.parseExpr());case 4:return this.parseExprNext(Ya.ECall(a,this.parseExprList(lb.TPClose)));case 8:return b=this.getIdent(),this.parseExprNext(Ya.EField(a,b));case 9:return b=this.getIdent(),d="__a_"+this.uid++,a=Ya.EBlock([Ya.EVar(d,null,a),Ya.ETernary(Ya.EBinop("==",Ya.EIdent(d),Ya.EIdent("null")),Ya.EIdent("null"),Ya.EField(Ya.EIdent(d),b))]),this.parseExprNext(a);case 12:return c=this.parseExpr(),b=this.token(),b!=
lb.TBkClose&&this.unexpected(b),this.parseExprNext(Ya.EArray(a,c));case 14:return c=this.parseExpr(),b=this.token(),b!=lb.TDoubleDot&&this.unexpected(b),b=this.parseExpr(),Ya.ETernary(a,c,b);default:return c=this.tokens,c.head=new uc(b,c.head),a}},parseFunctionArgs:function(){var a=[],b=this.token();if(b!=lb.TPClose)for(var c=!1;!c;){var d=!1;b!=null&&b._hx_index==14&&(d=!0,b=this.token());if(b==null){this.unexpected(b);break}else if(b._hx_index==2)b=b.s;else{this.unexpected(b);break}b={name:b};a.push(b);
d&&(b.opt=!0);this.allowTypes&&(this.maybe(lb.TDoubleDot)&&(b.t=this.parseType()),this.maybe(lb.TOp("="))&&(b.value=this.parseExpr()));b=this.token();if(b==null)this.unexpected(b);else switch(b._hx_index){case 5:c=!0;break;case 10:b=this.token();break;default:this.unexpected(b)}}return a},parseFunctionDecl:function(){var a=this.token();a!=lb.TPOpen&&this.unexpected(a);a=this.parseFunctionArgs();var b=null;if(this.allowTypes){var c=this.token();if(c!=lb.TDoubleDot){var d=this.tokens;d.head=new uc(c,
d.head)}else b=this.parseType()}return{args:a,ret:b,body:this.parseExpr()}},parsePath:function(){for(var a=[this.getIdent()];;){var b=this.token();if(b!=lb.TDot){var c=this.tokens;c.head=new uc(b,c.head);break}a.push(this.getIdent())}return a},parseType:function(){var a=this,b=this.token();if(b==null)return this.unexpected(b);switch(b._hx_index){case 2:var c=this.tokens;c.head=new uc(b,c.head);var d=this.parsePath(),f=null;b=this.token();if(b==null)c=this.tokens,c.head=new uc(b,c.head);else if(b._hx_index==
3)if(c=b.s,c=="<")a:for(f=[];;){c=this.token();c==null?(b=c,c=this.tokens,c.head=new uc(b,c.head),f.push(this.parseType())):c._hx_index==1?f.push(Rg.CTExpr(Ya.EConst(c.c))):(b=this.tokens,b.head=new uc(c,b.head),f.push(this.parseType()));b=this.token();if(b!=null)switch(b._hx_index){case 3:c=b.s;if(c==">")break a;if(V.cca(c,0)==62){b=this.tokens;b.head=new uc(lb.TOp(V.substr(c,1,null)),b.head);break a}break;case 10:continue}this.unexpected(b);break}else c=this.tokens,c.head=new uc(b,c.head);else c=
this.tokens,c.head=new uc(b,c.head);return this.parseTypeNext(Rg.CTPath(d,f));case 4:f=this.token();d=this.token();c=this.tokens;c.head=new uc(d,c.head);c=this.tokens;c.head=new uc(f,c.head);b=function(n){var l=a.token();l==null?a.unexpected(l):l._hx_index==3?l.s!="->"&&a.unexpected(l):a.unexpected(l);return Rg.CTFun(n,a.parseType())};if(f==null){var g=this.parseType();c=this.token();if(c==null)return this.unexpected(c);switch(c._hx_index){case 5:return this.parseTypeNext(Rg.CTParent(g));case 10:c=
[g];do c.push(this.parseType());while(this.maybe(lb.TComma));g=this.token();g!=lb.TPClose&&this.unexpected(g);return b(c);default:return this.unexpected(c)}}else switch(f._hx_index){case 2:c=f.s;if(d!=null&&d._hx_index==15){c=[];d=0;for(f=this.parseFunctionArgs();d<f.length;){g=f[d];++d;var h=g.value;if(h!=null&&!this.resumeErrors)throw ba.thrown(Gd.ECustom("Default values not allowed in function types"));c.push(Rg.CTNamed(g.name,g.opt?Rg.CTOpt(g.t):g.t))}return b(c)}g=this.parseType();c=this.token();
if(c==null)return this.unexpected(c);switch(c._hx_index){case 5:return this.parseTypeNext(Rg.CTParent(g));case 10:c=[g];do c.push(this.parseType());while(this.maybe(lb.TComma));g=this.token();g!=lb.TPClose&&this.unexpected(g);return b(c);default:return this.unexpected(c)}break;case 5:c=[];d=0;for(f=this.parseFunctionArgs();d<f.length;){g=f[d];++d;h=g.value;if(h!=null&&!this.resumeErrors)throw ba.thrown(Gd.ECustom("Default values not allowed in function types"));c.push(Rg.CTNamed(g.name,g.opt?Rg.CTOpt(g.t):
g.t))}return b(c);default:g=this.parseType();c=this.token();if(c==null)return this.unexpected(c);switch(c._hx_index){case 5:return this.parseTypeNext(Rg.CTParent(g));case 10:c=[g];do c.push(this.parseType());while(this.maybe(lb.TComma));g=this.token();g!=lb.TPClose&&this.unexpected(g);return b(c);default:return this.unexpected(c)}}break;case 6:d=[];f=null;a:for(;;)if(b=this.token(),b==null){this.unexpected(b);break}else switch(b._hx_index){case 2:c=b.s;switch(c){case "final":case "var":c=this.getIdent();
g=this.token();g!=lb.TDoubleDot&&this.unexpected(g);if(b==null?0:b._hx_index==2&&b.s=="final")f==null&&(f=[]),f.push({name:":final",params:[]});d.push({name:c,t:this.parseType(),meta:f});f=null;c=this.token();c!=lb.TSemicolon&&this.unexpected(c);break;default:if(b=this.token(),b!=lb.TDoubleDot&&this.unexpected(b),d.push({name:c,t:this.parseType(),meta:f}),b=this.token(),b==null)this.unexpected(b);else switch(b._hx_index){case 7:break a;case 10:break;default:this.unexpected(b)}}break;case 7:break a;
case 16:c=b.s;f==null&&(f=[]);f.push({name:c,params:this.parseMetaArgs()});break;default:this.unexpected(b);break a}return this.parseTypeNext(Rg.CTAnon(d));default:return this.unexpected(b)}},parseTypeNext:function(a){var b=this.token();if(b==null){var c=this.tokens;c.head=new uc(b,c.head);return a}if(b._hx_index==3){if(b.s!="->")return c=this.tokens,c.head=new uc(b,c.head),a}else return c=this.tokens,c.head=new uc(b,c.head),a;b=this.parseType();return b._hx_index==1?(b.args.unshift(a),b):Rg.CTFun([a],
b)},parseExprList:function(a){var b=[],c=this.token();if(c==a)return b;var d=this.tokens;for(d.head=new uc(c,d.head);;)if(b.push(this.parseExpr()),c=this.token(),c==null){if(c==a)break;this.unexpected(c);break}else if(c._hx_index!=10){if(c==a)break;this.unexpected(c);break}return b},parseModule:function(a,b,c){c==null&&(c=0);b==null&&(b="hscript");this.initParser(b,c);this.input=a;this.readPos=0;this.allowMetadata=this.allowTypes=!0;for(a=[];;){b=this.token();if(b==lb.TEof)break;c=this.tokens;c.head=
new uc(b,c.head);a.push(this.parseModuleDecl())}return a},parseMetadata:function(){for(var a=[];;){var b=this.token();if(b==null){var c=this.tokens;c.head=new uc(b,c.head);break}else if(b._hx_index==16)a.push({name:b.s,params:this.parseMetaArgs()});else{c=this.tokens;c.head=new uc(b,c.head);break}}return a},parseParams:function(){if(this.maybe(lb.TOp("<"))&&!this.resumeErrors)throw ba.thrown(Gd.EInvalidOp("Unsupported class type parameters"));return{}},parseModuleDecl:function(){var a=this.parseMetadata(),
b=this.getIdent(),c=!1,d=!1;a:for(;;){switch(b){case "extern":d=!0;break;case "private":c=!0;break;default:break a}b=this.getIdent()}switch(b){case "class":b=this.getIdent();var f=this.parseParams(),g=null,h=[];a:for(;;){var n=this.token();if(n==null){var l=this.tokens;l.head=new uc(n,l.head);break}else if(n._hx_index==2)switch(n.s){case "extends":g=this.parseType();break;case "implements":h.push(this.parseType());break;default:l=this.tokens;l.head=new uc(n,l.head);break a}else{l=this.tokens;l.head=
new uc(n,l.head);break}}l=[];n=this.token();for(n!=lb.TBrOpen&&this.unexpected(n);!this.maybe(lb.TBrClose);)l.push(this.parseField());return Km.DClass({name:b,meta:a,params:f,extend:g,implement:h,fields:l,isPrivate:c,isExtern:d});case "import":a=[this.getIdent()];for(c=!1;;){n=this.token();if(n!=lb.TDot){l=this.tokens;l.head=new uc(n,l.head);break}n=this.token();if(n==null)this.unexpected(n);else switch(n._hx_index){case 2:b=n.s;a.push(b);break;case 3:n.s=="*"?c=!0:this.unexpected(n);break;default:this.unexpected(n)}}b=
null;this.maybe(lb.TId("as"))&&!c&&(n=this.token(),n==null?this.unexpected(n):n._hx_index==2?b=n.s:this.unexpected(n));n=this.token();n!=lb.TSemicolon&&this.unexpected(n);return Km.DImport(a,c,b);case "package":return a=this.parsePath(),n=this.token(),n!=lb.TSemicolon&&this.unexpected(n),Km.DPackage(a);case "typedef":return b=this.getIdent(),f=this.parseParams(),n=this.token(),ab.enumEq(n,lb.TOp("="))||this.unexpected(n),n=this.parseType(),Km.DTypedef({name:b,meta:a,params:f,isPrivate:c,t:n});default:this.unexpected(lb.TId(b))}return null},
parseField:function(){var a=this.parseMetadata(),b=[];a:for(;;){var c=this.getIdent();switch(c){case "final":case "var":c=this.getIdent();var d=null,f=null;if(this.maybe(lb.TPOpen)){d=this.getIdent();f=this.token();f!=lb.TComma&&this.unexpected(f);f=this.getIdent();var g=this.token();g!=lb.TPClose&&this.unexpected(g)}g=this.maybe(lb.TDoubleDot)?this.parseType():null;var h=this.maybe(lb.TOp("="))?this.parseExpr():null;if(h!=null)if(this.isBlock(h))this.maybe(lb.TSemicolon);else{var n=this.token();
n!=lb.TSemicolon&&this.unexpected(n)}else g!=null&&(g==null?0:g._hx_index==2)?this.maybe(lb.TSemicolon):(n=this.token(),n!=lb.TSemicolon&&this.unexpected(n));return{name:c,meta:a,access:b,kind:Dx.KVar({get:d,set:f,type:g,expr:h})};case "function":return c=this.getIdent(),d=this.parseFunctionDecl(),{name:c,meta:a,access:b,kind:Dx.KFunction({args:d.args,expr:d.body,ret:d.ret})};case "inline":b.push(Vj.AInline);break;case "macro":b.push(Vj.AMacro);break;case "override":b.push(Vj.AOverride);break;case "private":b.push(Vj.APrivate);
break;case "public":b.push(Vj.APublic);break;case "static":b.push(Vj.AStatic);break;default:this.unexpected(lb.TId(c));break a}}return null},readChar:function(){return this.input.charCodeAt(this.readPos++)},readString:function(a){for(var b,c="",d=!1,f=this.line;;){b=this.input.charCodeAt(this.readPos++);if(b!=b){this.line=f;if(!this.resumeErrors)throw ba.thrown(Gd.EUnterminatedString);break}if(d)switch(d=!1,b){case 47:this.allowJSON?c+=String.fromCodePoint(b):this.invalidChar(b);break;case 34:case 39:case 92:c+=
String.fromCodePoint(b);break;case 110:c+=String.fromCodePoint(10);break;case 114:c+=String.fromCodePoint(13);break;case 116:c+=String.fromCodePoint(9);break;case 117:this.allowJSON||this.invalidChar(b);for(var g=b=0;g<4;){g++;b<<=4;var h=this.input.charCodeAt(this.readPos++);switch(h){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b+=h-48;break;case 65:case 66:case 67:case 68:case 69:case 70:b+=h-55;break;case 97:case 98:case 99:case 100:case 101:case 102:b+=h-87;
break;default:if(h!=h&&(this.line=f,!this.resumeErrors))throw ba.thrown(Gd.EUnterminatedString);this.invalidChar(h)}}c+=String.fromCodePoint(b);break;default:this.invalidChar(b)}else if(b==92)d=!0;else if(b==a)break;else b==10&&this.line++,c+=String.fromCodePoint(b)}return c},token:function(){if(this.tokens.head!=null){var a=this.tokens,b=a.head;if(b==null)return null;a.head=b.next;return b.elt}this.char<0?a=this.input.charCodeAt(this.readPos++):(a=this.char,this.char=-1);for(;;){if(a!=a)return this.char=
a,lb.TEof;switch(a){case 0:return lb.TEof;case 10:this.line++;break;case 9:case 13:case 32:break;case 34:case 39:return lb.TConst(Ai.CString(this.readString(a)));case 35:a=this.input.charCodeAt(this.readPos++);if(this.idents[a])for(b=String.fromCodePoint(a);;){a=this.input.charCodeAt(this.readPos++);if(!this.idents[a])return this.char=a,this.preprocess(b);b+=String.fromCodePoint(a)}this.invalidChar(a);break;case 40:return lb.TPOpen;case 41:return lb.TPClose;case 44:return lb.TComma;case 46:a=this.input.charCodeAt(this.readPos++);
switch(a){case 46:return a=this.input.charCodeAt(this.readPos++),a!=46&&this.invalidChar(a),lb.TOp("...");case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=a-48;for(var c=1;;)switch(a=this.input.charCodeAt(this.readPos++),c*=10,a){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=b*10+(a-48);break;default:return this.char=a,lb.TConst(Ai.CFloat(b/c))}break;default:return this.char=a,lb.TDot}break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=
a-48;for(c=0;;)switch(a=this.input.charCodeAt(this.readPos++),c*=10,a){case 46:if(c>0){if(c==10&&this.input.charCodeAt(this.readPos++)==46)return a=this.tokens,a.head=new uc(lb.TOp("..."),a.head),a=b|0,lb.TConst(a==b?Ai.CInt(a):Ai.CFloat(b));this.invalidChar(a)}c=1;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=b*10+(a-48);break;case 69:case 101:var d=this.token(),f=null;if(d==null){var g=this.tokens;g.head=new uc(d,g.head)}else switch(d._hx_index){case 1:g=
d.c;g._hx_index==0?f=g.v:(g=this.tokens,g.head=new uc(d,g.head));break;case 3:d.s=="-"?(d=this.token(),d==null?(g=this.tokens,g.head=new uc(d,g.head)):d._hx_index==1?(g=d.c,g._hx_index==0?f=-g.v:(g=this.tokens,g.head=new uc(d,g.head))):(g=this.tokens,g.head=new uc(d,g.head))):(g=this.tokens,g.head=new uc(d,g.head));break;default:g=this.tokens,g.head=new uc(d,g.head)}f==null&&this.invalidChar(a);c==0&&(c=10);return lb.TConst(Ai.CFloat(Math.pow(10,f)/c*b*10));case 120:(b>0||c>0)&&this.invalidChar(a);
for(b=0;;)switch(a=this.input.charCodeAt(this.readPos++),a){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=(b<<4)+a-48;break;case 65:case 66:case 67:case 68:case 69:case 70:b=(b<<4)+(a-55);break;case 97:case 98:case 99:case 100:case 101:case 102:b=(b<<4)+(a-87);break;default:return this.char=a,lb.TConst(Ai.CInt(b))}break;default:return this.char=a,a=b|0,lb.TConst(c>0?Ai.CFloat(b*10/c):a==b?Ai.CInt(a):Ai.CFloat(b))}break;case 58:return lb.TDoubleDot;case 59:return lb.TSemicolon;
case 61:a=this.input.charCodeAt(this.readPos++);if(a==61)return lb.TOp("==");if(a==62)return lb.TOp("=>");this.char=a;return lb.TOp("=");case 63:a=this.input.charCodeAt(this.readPos++);if(a==46)return lb.TQuestionDot;this.char=a;return lb.TQuestion;case 64:a=this.input.charCodeAt(this.readPos++);if(this.idents[a]||a==58)for(b=String.fromCodePoint(a);;){a=this.input.charCodeAt(this.readPos++);if(!this.idents[a])return this.char=a,lb.TMeta(b);b+=String.fromCodePoint(a)}this.invalidChar(a);break;case 91:return lb.TBkOpen;
case 93:return lb.TBkClose;case 123:return lb.TBrOpen;case 125:return lb.TBrClose;default:if(this.ops[a])for(b=String.fromCodePoint(a);;){a=this.input.charCodeAt(this.readPos++);a!=a&&(a=0);if(!this.ops[a])return this.char=a,lb.TOp(b);c=b;b+=String.fromCodePoint(a);if(!Object.prototype.hasOwnProperty.call(this.opPriority.h,b)&&Object.prototype.hasOwnProperty.call(this.opPriority.h,c)){if(b=="//"||b=="/*")return this.tokenComment(b,a);this.char=a;return lb.TOp(c)}}if(this.idents[a])for(b=String.fromCodePoint(a);;){a=
this.input.charCodeAt(this.readPos++);a!=a&&(a=0);if(!this.idents[a])return this.char=a,lb.TId(b);b+=String.fromCodePoint(a)}this.invalidChar(a)}a=this.input.charCodeAt(this.readPos++)}},preprocValue:function(a){return this.preprocesorValues.h[a]},preprocStack:null,parsePreproCond:function(){var a=this.token();if(a==null)return this.unexpected(a);switch(a._hx_index){case 2:return Ya.EIdent(a.s);case 3:return a.s=="!"?Ya.EUnop("!",!0,this.parsePreproCond()):this.unexpected(a);case 4:return a=this.tokens,
a.head=new uc(lb.TPOpen,a.head),this.parseExpr();default:return this.unexpected(a)}},evalPreproCond:function(a){switch(a._hx_index){case 1:return this.preprocValue(a.v)!=null;case 3:var b=a.e;return this.evalPreproCond(b);case 6:b=a.e1;var c=a.e2;switch(a.op){case "&&":return a=c,this.evalPreproCond(b)?this.evalPreproCond(a):!1;case "||":return a=c,this.evalPreproCond(b)?!0:this.evalPreproCond(a);default:if(!this.resumeErrors)throw ba.thrown(Gd.EInvalidPreprocessor("Can't eval "+R[a.__enum__].__constructs__[a._hx_index]._hx_name));
return!1}break;case 7:if(a.op=="!")return b=a.e,!this.evalPreproCond(b);if(!this.resumeErrors)throw ba.thrown(Gd.EInvalidPreprocessor("Can't eval "+R[a.__enum__].__constructs__[a._hx_index]._hx_name));return!1;default:if(!this.resumeErrors)throw ba.thrown(Gd.EInvalidPreprocessor("Can't eval "+R[a.__enum__].__constructs__[a._hx_index]._hx_name));return!1}},preprocess:function(a){switch(a){case "else":case "elseif":if(this.preprocStack.length>0){if(this.preprocStack[this.preprocStack.length-1].r)return this.preprocStack[this.preprocStack.length-
1].r=!1,this.skipTokens(),this.token();if(a=="else")return this.preprocStack.pop(),this.preprocStack.push({r:!0}),this.token();this.preprocStack.pop();return this.preprocess("if")}return lb.TPrepro(a);case "end":return this.preprocStack.length>0?(this.preprocStack.pop(),this.token()):lb.TPrepro(a);case "if":a=this.parsePreproCond();if(this.evalPreproCond(a))return this.preprocStack.push({r:!0}),this.token();this.preprocStack.push({r:!1});this.skipTokens();return this.token();default:return lb.TPrepro(a)}},
skipTokens:function(){for(var a=this.preprocStack.length-1,b=this.preprocStack[a];;){var c=this.token();if(c==lb.TEof&&!this.resumeErrors)throw ba.thrown(Gd.EInvalidPreprocessor("Unclosed"));if(this.preprocStack[a]!=b){a=this.tokens;a.head=new uc(c,a.head);break}}},tokenComment:function(a,b){var c=V.cca(a,1);if(c==47){for(;b!=13&&b!=10&&(b=this.input.charCodeAt(this.readPos++),b==b););this.char=b;return this.token()}if(c==42){c=this.line;if(a=="/**/")return this.char=b,this.token();do{for(;b!=42;)if(b==
10&&this.line++,b=this.input.charCodeAt(this.readPos++),b!=b){this.line=c;if(!this.resumeErrors)throw ba.thrown(Gd.EUnterminatedComment);break}b=this.input.charCodeAt(this.readPos++);if(b!=b){this.line=c;if(!this.resumeErrors)throw ba.thrown(Gd.EUnterminatedComment);break}}while(b!=47);return this.token()}this.char=b;return lb.TOp(a)},constString:function(a){switch(a._hx_index){case 0:return a=a.v,a==null?"null":""+a;case 1:return a=a.f,a==null?"null":""+a;case 2:return a.s}},tokenString:function(a){switch(a._hx_index){case 0:return"<eof>";
case 1:return this.constString(a.c);case 2:return a=a.s;case 3:return a=a.s;case 4:return"(";case 5:return")";case 6:return"{";case 7:return"}";case 8:return".";case 9:return"?.";case 10:return",";case 11:return";";case 12:return"[";case 13:return"]";case 14:return"?";case 15:return":";case 16:return a=a.s,"@"+a;case 17:return a=a.s,"#"+a}},__class__:wn,__properties__:{get_currentPos:"get_currentPos"}};var bq=function(){};t["hscript.Tools"]=bq;bq.__name__="hscript.Tools";bq.iter=function(a,b){switch(a._hx_index){case 2:var c=
a.e;c!=null&&b(c);break;case 3:c=a.e;b(c);break;case 4:var d=a.e;for(a=0;a<d.length;)c=d[a],++a,b(c);break;case 5:c=a.e;b(c);break;case 6:c=a.e1;a=a.e2;b(c);b(a);break;case 7:c=a.e;b(c);break;case 8:c=a.e;d=a.params;b(c);for(a=0;a<d.length;){var f=d[a];++a;b(f)}break;case 9:d=a.cond;c=a.e1;a=a.e2;b(d);b(c);a!=null&&b(a);break;case 10:d=a.cond;c=a.e;b(d);b(c);break;case 11:d=a.it;c=a.e;b(d);b(c);break;case 14:c=a.e;b(c);break;case 15:c=a.e;c!=null&&b(c);break;case 16:c=a.e;a=a.index;b(c);b(a);break;
case 17:d=a.e;for(a=0;a<d.length;)c=d[a],++a,b(c);break;case 18:d=a.params;for(a=0;a<d.length;)c=d[a],++a,b(c);break;case 19:c=a.e;b(c);break;case 20:c=a.e;d=a.ecatch;b(c);b(d);break;case 21:c=a.fl;for(a=0;a<c.length;)d=c[a],++a,b(d.e);break;case 22:d=a.cond;c=a.e1;a=a.e2;b(d);b(c);b(a);break;case 23:c=a.e;f=a.cases;var g=a.defaultExpr;b(c);for(a=0;a<f.length;){d=f[a];++a;c=0;for(var h=d.values;c<h.length;){var n=h[c];++c;b(n)}b(d.expr)}g!=null&&b(g);break;case 24:d=a.cond;c=a.e;b(d);b(c);break;case 25:d=
a.args;c=a.e;if(d!=null)for(a=0;a<d.length;)f=d[a],++a,b(f);b(c);break;case 26:c=a.e;b(c);break;case 27:d=a.it;c=a.e;b(d);b(c);break;case 28:c=a.e,b(c)}};bq.map=function(a,b){switch(a._hx_index){case 0:var c=a;break;case 1:c=a;break;case 2:var d=a.t;c=a.e;c=Ya.EVar(a.n,d,c!=null?b(c):null);break;case 3:c=a.e;c=Ya.EParent(b(c));break;case 4:var f=a.e;a=[];for(d=0;d<f.length;)c=f[d],++d,a.push(b(c));c=Ya.EBlock(a);break;case 5:c=a.e;var g=a.f;c=Ya.EField(b(c),g);break;case 6:d=a.op;c=a.e1;a=a.e2;c=
Ya.EBinop(d,b(c),b(a));break;case 7:d=a.op;g=a.prefix;c=a.e;c=Ya.EUnop(d,g,b(c));break;case 8:c=a.e;f=a.params;g=b(c);a=[];for(d=0;d<f.length;){var h=f[d];++d;a.push(b(h))}c=Ya.ECall(g,a);break;case 9:f=a.cond;c=a.e1;a=a.e2;c=Ya.EIf(b(f),b(c),a!=null?b(a):null);break;case 10:f=a.cond;c=a.e;c=Ya.EWhile(b(f),b(c));break;case 11:var n=a.v;d=a.it;c=a.e;c=Ya.EFor(n,b(d),b(c));break;case 12:case 13:c=a;break;case 14:f=a.args;c=a.e;n=a.name;d=a.ret;c=Ya.EFunction(f,b(c),n,d);break;case 15:c=a.e;c=Ya.EReturn(c!=
null?b(c):null);break;case 16:c=a.e;a=a.index;c=Ya.EArray(b(c),b(a));break;case 17:f=a.e;a=[];for(d=0;d<f.length;)c=f[d],++d,a.push(b(c));c=Ya.EArrayDecl(a);break;case 18:g=a.cl;f=a.params;a=[];for(d=0;d<f.length;)c=f[d],++d,a.push(b(c));c=Ya.ENew(g,a);break;case 19:c=a.e;c=Ya.EThrow(b(c));break;case 20:c=a.e;n=a.v;d=a.t;f=a.ecatch;c=Ya.ETry(b(c),n,d,b(f));break;case 21:c=a.fl;a=[];for(d=0;d<c.length;)g=c[d],++d,a.push({name:g.name,e:b(g.e)});c=Ya.EObject(a);break;case 22:f=a.cond;c=a.e1;a=a.e2;c=
Ya.ETernary(b(f),b(c),b(a));break;case 23:c=a.e;h=a.cases;var l=a.defaultExpr;g=b(c);a=[];for(d=0;d<h.length;){f=h[d];++d;c=[];for(var q=0,u=f.values;q<u.length;)n=u[q],++q,c.push(b(n));a.push({values:c,expr:b(f.expr)})}c=Ya.ESwitch(g,a,l==null?null:b(l));break;case 24:f=a.cond;c=a.e;c=Ya.EDoWhile(b(f),b(c));break;case 25:n=a.name;f=a.args;c=a.e;if(f==null)g=null;else{a=[];for(d=0;d<f.length;)h=f[d],++d,a.push(b(h));g=a}c=Ya.EMeta(n,g,b(c));break;case 26:c=a.e;d=a.t;c=Ya.ECheckType(b(c),d);break;
case 27:d=a.it;c=a.e;c=Ya.EForGen(b(d),b(c));break;case 28:c=a.e,d=a.t,c=Ya.ECast(b(c),d)}return c};bq.expr=function(a){return a};bq.mk=function(a,b){return a};bq.getKeyIterator=function(a,b){var c=null,d=null,f=a;if(f._hx_index==6&&f.op=="in"){var g=f.e1;a=f.e2;if(g._hx_index==6&&g.op=="=>"){var h=g.e1;g=g.e2;h._hx_index==1&&g._hx_index==1&&(d=g.v,c=h.v,f=a)}}return b(c,d,f)};var dl=function(){};t["js.Browser"]=dl;dl.__name__="js.Browser";dl.__properties__={get_supported:"get_supported"};dl.get_supported=
function(){return typeof window!="undefined"&&typeof window.location!="undefined"?typeof window.location.protocol=="string":!1};dl.getLocalStorage=function(){try{var a=window.localStorage;a.getItem("");if(a.length==0){var b="_hx_"+Math.random();a.setItem(b,b);a.removeItem(b)}return a}catch(c){return Pb.lastError=c,null}};var Ny=function(){};t["js.html._CanvasElement.CanvasUtil"]=Ny;Ny.__name__="js.html._CanvasElement.CanvasUtil";Ny.getContextWebGL=function(a,b){var c=a.getContext("webgl",b);if(c!=
null)return c;c=a.getContext("experimental-webgl",b);return c!=null?c:null};var Oy=function(){};t["js.lib._ArrayBuffer.ArrayBufferCompat"]=Oy;Oy.__name__="js.lib._ArrayBuffer.ArrayBufferCompat";Oy.sliceImpl=function(a,b){a=new Uint8Array(this,a,b==null?null:b-a);b=new Uint8Array(a.byteLength);b.set(a);return b.buffer};var Rv=function(){this.connected=!0;this.buttons=[];this.axes=[]};t["lime._internal.backend.html5.GameDeviceData"]=Rv;Rv.__name__="lime._internal.backend.html5.GameDeviceData";Rv.prototype=
{connected:null,id:null,isGamepad:null,buttons:null,axes:null,__class__:Rv};var Ex=function(a){this.parent=a;this.id=-1;this.gain=1;this.position=new ge};t["lime._internal.backend.html5.HTML5AudioSource"]=Ex;Ex.__name__="lime._internal.backend.html5.HTML5AudioSource";Ex.prototype={completed:null,gain:null,id:null,length:null,loops:null,parent:null,playing:null,position:null,dispose:function(){},init:function(){this.parent.buffer.get_src().pannerAttr({coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,
distanceModel:"inverse",maxDistance:1E4,refDistance:1,rolloffFactor:1,panningModel:"equalpower"})},play:function(){if(!this.playing&&this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){this.playing=!0;var a=this.getCurrentTime();this.completed=!1;var b=this.parent.buffer.__srcHowl._volume;this.parent.buffer.__srcHowl._volume=this.parent.get_gain();this.id=this.parent.buffer.__srcHowl.play();this.parent.buffer.__srcHowl._volume=b;this.setPosition(this.parent.get_position());this.parent.buffer.__srcHowl.on("end",
m(this,this.howl_onEnd),this.id);this.setCurrentTime(a)}},pause:function(){this.playing=!1;this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&this.parent.buffer.__srcHowl.pause(this.id)},stop:function(){this.playing=!1;this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&(this.parent.buffer.__srcHowl.stop(this.id),this.parent.buffer.__srcHowl.off("end",m(this,this.howl_onEnd),this.id))},howl_onEnd:function(){this.playing=!1;this.loops>0?(this.loops--,this.stop(),this.play()):(this.parent.buffer!=
null&&this.parent.buffer.__srcHowl!=null&&(this.parent.buffer.__srcHowl.stop(this.id),this.parent.buffer.__srcHowl.off("end",m(this,this.howl_onEnd),this.id)),this.completed=!0,this.parent.onComplete.dispatch())},getCurrentTime:function(){if(this.id==-1)return 0;if(this.completed)return this.getLength();if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){var a=(this.parent.buffer.__srcHowl.seek(this.id)*1E3|0)-this.parent.offset;return a<0?0:a}return 0},setCurrentTime:function(a){if(this.parent.buffer!=
null&&this.parent.buffer.__srcHowl!=null){var b=(a+this.parent.offset)/1E3;b<0&&(b=0);this.parent.buffer.__srcHowl.seek(b,this.id)}return a},getGain:function(){return this.gain},setGain:function(a){this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&this.id!=-1&&this.parent.buffer.__srcHowl.volume(a,this.id);return this.gain=a},getLength:function(){return this.length!=0?this.length:this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null?this.parent.buffer.__srcHowl.duration()*1E3|0:
0},setLength:function(a){return this.length=a},getLoops:function(){return this.loops},setLoops:function(a){return this.loops=a},getPitch:function(){return this.parent.buffer.__srcHowl.rate()},setPitch:function(a){this.parent.buffer.__srcHowl.rate(a);return this.getPitch()},getPosition:function(){return this.position},setPosition:function(a){this.position.x=a.x;this.position.y=a.y;this.position.z=a.z;this.position.w=a.w;this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&this.parent.buffer.__srcHowl.pos!=
null&&this.parent.buffer.__srcHowl.pos(this.position.x,this.position.y,this.position.z,this.id);return this.position},__class__:Ex};var Zb=function(){this.validStatus0=(new Wa("Tizen","gi")).match(window.navigator.userAgent)};t["lime._internal.backend.html5.HTML5HTTPRequest"]=Zb;Zb.__name__="lime._internal.backend.html5.HTML5HTTPRequest";Zb.loadImage=function(a){var b=new Mf;Zb.activeRequests<Zb.requestLimit?(Zb.activeRequests++,Zb.__loadImage(a,b,0)):Zb.requestQueue.add({instance:null,uri:a,promise:b,
type:"IMAGE",options:0});return b.future};Zb.loadImageFromBytes=function(a,b){var c=URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}));return c!=null?(a=new Mf,Zb.activeRequests<Zb.requestLimit?(Zb.activeRequests++,Zb.__loadImage(c,a,1)):Zb.requestQueue.add({instance:null,uri:c,promise:a,type:"IMAGE",options:1}),a.future):Zb.loadImage("data:"+b+";base64,"+rj.encode(a))};Zb.processQueue=function(){if(Zb.activeRequests<Zb.requestLimit&&Zb.requestQueue.length>0){Zb.activeRequests++;var a=Zb.requestQueue.pop();
switch(a.type){case "BINARY":a.instance.__loadData(a.uri,a.promise);break;case "IMAGE":Zb.__loadImage(a.uri,a.promise,a.options);break;case "TEXT":a.instance.__loadText(a.uri,a.promise);break;default:Zb.activeRequests--}}};Zb.__createBlobURIFromBytes=function(a,b){return URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}))};Zb.__fixHostname=function(a){return a==null?"":a};Zb.__fixPort=function(a,b){if(a==null||a=="")switch(b){case "ftp:":return"21";case "gopher:":return"70";case "http:":return"80";
case "https:":return"443";case "ws:":return"80";case "wss:":return"443";default:return""}return a};Zb.__fixProtocol=function(a){return a==null||a==""?"http:":a};Zb.__isInMemoryURI=function(a){return N.startsWith(a,"data:")?!0:N.startsWith(a,"blob:")};Zb.__isSameOrigin=function(a){if(a==null||a==""||Zb.__isInMemoryURI(a))return!0;Zb.originElement==null&&(Zb.originElement=window.document.createElement("a"),Zb.originHostname=Zb.__fixHostname(wa.location.hostname),Zb.originProtocol=Zb.__fixProtocol(wa.location.protocol),
Zb.originPort=Zb.__fixPort(wa.location.port,Zb.originProtocol));var b=Zb.originElement;b.href=a;b.hostname==""&&(b.href=b.href);var c=Zb.__fixHostname(b.hostname);a=Zb.__fixProtocol(b.protocol);b=Zb.__fixPort(b.port,a);c=c==""||c==Zb.originHostname;b=b==""||b==Zb.originPort;return a!="file:"&&c?b:!1};Zb.__loadImage=function(a,b,c){var d=new window.Image;Zb.__isSameOrigin(a)||(d.crossOrigin="Anonymous");Zb.supportsImageProgress==null&&(Zb.supportsImageProgress="onprogress"in d);if(Zb.supportsImageProgress||
Zb.__isInMemoryURI(a))d.addEventListener("load",function(g){Zb.__revokeBlobURI(a,c);g=new sj(null,d.width,d.height);g.__srcImage=d;Zb.activeRequests--;Zb.processQueue();b.complete(new Oc(g))},!1),d.addEventListener("progress",function(g){b.progress(g.loaded,g.total)},!1),d.addEventListener("error",function(g){Zb.__revokeBlobURI(a,c);Zb.activeRequests--;Zb.processQueue();b.error(new co(g.detail,null))},!1),d.src=a;else{var f=new XMLHttpRequest;f.onload=function(g){Zb.activeRequests--;Zb.processQueue();
(new Oc).__fromBytes(Oa.ofData(f.response),function(h){b.complete(h)})};f.onerror=function(g){b.error(new co(g.message,null))};f.onprogress=function(g){g.lengthComputable&&b.progress(g.loaded,g.total)};f.open("GET",a,!0);f.responseType="arraybuffer";f.overrideMimeType("text/plain; charset=x-user-defined");f.send(null)}};Zb.__revokeBlobURI=function(a,b){(b&1)!=0&&URL.revokeObjectURL(a)};Zb.prototype={binary:null,parent:null,request:null,validStatus0:null,cancel:function(){this.request!=null&&this.request.abort()},
init:function(a){this.parent=a},load:function(a,b,c){this.request=new XMLHttpRequest;this.parent.method=="POST"?this.request.upload!=null&&this.request.upload.addEventListener("progress",b,!1):this.request.addEventListener("progress",b,!1);this.request.onreadystatechange=c;b="";if(this.parent.data==null){c=Object.keys(this.parent.formData.h);for(var d=c.length,f=0;f<d;){var g=c[f++];b.length>0&&(b+="&");var h=this.parent.formData.h[g];if(g.indexOf("[]")>-1&&h instanceof Array){var n=[];for(h=La(h);h.hasNext();){var l=
h.next();n.push(encodeURIComponent(l))}n=n.join("&amp;"+g+"=");b+=encodeURIComponent(g)+"="+n}else n=encodeURIComponent(g)+"=",g=H.string(h),b+=n+encodeURIComponent(g)}this.parent.method=="GET"&&b!=""&&(a=a.indexOf("?")>-1?a+("&"+b):a+("?"+b),b="")}this.request.open(H.string(this.parent.method),a,!0);this.parent.timeout>0&&(this.request.timeout=this.parent.timeout);this.binary&&(this.request.responseType="arraybuffer");a=null;n=0;for(c=this.parent.headers;n<c.length;)d=c[n],++n,d.name=="Content-Type"?
a=d.value:this.request.setRequestHeader(d.name,d.value);this.parent.contentType!=null&&(a=this.parent.contentType);a==null&&(this.parent.data!=null?a="application/octet-stream":b!=""&&(a="application/x-www-form-urlencoded"));a!=null&&this.request.setRequestHeader("Content-Type",a);this.parent.withCredentials&&(this.request.withCredentials=!0);this.parent.data!=null?this.request.send(this.parent.data.b.bufferValue):this.request.send(b)},loadData:function(a){var b=new Mf;Zb.activeRequests<Zb.requestLimit?
(Zb.activeRequests++,this.__loadData(a,b)):Zb.requestQueue.add({instance:this,uri:a,promise:b,type:"BINARY",options:0});return b.future},loadText:function(a){var b=new Mf;Zb.activeRequests<Zb.requestLimit?(Zb.activeRequests++,this.__loadText(a,b)):Zb.requestQueue.add({instance:this,uri:a,promise:b,type:"TEXT",options:0});return b.future},processResponse:function(){if(this.parent.enableResponseHeaders){this.parent.responseHeaders=[];for(var a,b,c=0,d=this.request.getAllResponseHeaders().split("\n");c<
d.length;)b=d[c],++c,a=N.trim(V.substr(b,0,b.indexOf(":"))),b=N.trim(V.substr(b,b.indexOf(":")+1,null)),a!=""&&this.parent.responseHeaders.push(new Vt(a,b))}this.parent.responseStatus=this.request.status},__loadData:function(a,b){var c=this;this.binary=!0;this.load(a,function(d){b.progress(d.loaded,d.total)},function(d){c.request.readyState==4&&(d=null,c.request.responseType==""?c.request.responseText!=null&&(d=Oa.ofString(c.request.responseText)):c.request.response!=null&&(d=Oa.ofData(c.request.response)),
c.request.status!=null&&(c.request.status>=200&&c.request.status<400||c.validStatus0&&c.request.status==0)?(c.processResponse(),b.complete(d)):(c.processResponse(),b.error(new co(c.request.status,d))),c.request=null,Zb.activeRequests--,Zb.processQueue())})},__loadText:function(a,b){var c=this;this.binary=!1;this.load(a,function(d){b.progress(d.loaded,d.total)},function(d){c.request.readyState==4&&(c.request.status!=null&&(c.request.status>=200&&c.request.status<400||c.validStatus0&&c.request.status==
0)?(c.processResponse(),b.complete(c.request.responseText)):(c.processResponse(),b.error(new co(c.request.status,c.request.responseText))),c.request=null,Zb.activeRequests--,Zb.processQueue())})},__class__:Zb};var eo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Dynamic_Void"]=eo;eo.__name__="lime.app._Event_Dynamic_Void";eo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=
0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:eo};var Lm={skip:function(a){return a!=null&&a instanceof Object&&y.field(a,"__skipPrototype__")!=1?a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null?
a.buffer instanceof ArrayBuffer:!1:!0},disablePreserveClasses:function(a){a!=null&&a instanceof Object&&y.field(a,"__skipPrototype__")!=1&&!(a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null&&a.buffer instanceof ArrayBuffer)&&(a.__skipPrototype__=!0)},preserveClasses:function(a){if(a!=null&&a instanceof Object&&y.field(a,"__skipPrototype__")!=1&&!(a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null&&a.buffer instanceof ArrayBuffer)&&!Object.prototype.hasOwnProperty.call(a,"__prototype__")){if(!(a instanceof
Array)){try{a.__prototype__=a.__class__!=null?a.__class__.__name__:null}catch(d){Pb.lastError=d;return}typeof a.toString=="function"&&y.deleteField(a,"toString")}var b=0;for(a=Object.values(a);b<a.length;){var c=a[b];++b;Lm.preserveClasses(c)}}},restoreClasses:function(a,b){b==null&&(b=Math.random()*2147483647|0,y.field(a,"__restoreFlag__")==b&&++b);if(a!=null&&a instanceof Object&&y.field(a,"__skipPrototype__")!=1&&!(a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null&&a.buffer instanceof ArrayBuffer)&&
y.field(a,"__restoreFlag__")!=b){try{a.__restoreFlag__=b}catch(f){Pb.lastError=f;return}if(y.field(a,"__prototype__")!=null)try{Object.setPrototypeOf(a,t[y.field(a,"__prototype__")].prototype)}catch(f){Pb.lastError=f}var c=0;for(a=Object.values(a);c<a.length;){var d=a[c];++c;Lm.restoreClasses(d,b)}}}},Fx={__properties__:{get_portable:"get_portable"},toFunction:function(a){if(a.func!=null)return a.func;if(a.classPath!=null&&a.functionName!=null)return a.func=t[a.classPath][a.functionName],a.func;if(a.sourceCode!=
null)return a.func=(new Function("return "+a.sourceCode))(),a.func;throw ba.thrown("Object is not a valid WorkFunction: "+H.string(a));},makePortable:function(a,b){if(a.func!=null){if(a.classPath!=null||a.functionName!=null){if((t[a.classPath]&&t[a.classPath][a.functionName])!=a.func)throw ba.thrown("Could not make "+a.functionName+" portable. Either "+a.functionName+" isn't static, or "+a.classPath+" is something other than a class.");a.func=null;return!0}a.sourceCode=a.func.toString();if(a.sourceCode.indexOf("[native code]")<
0)return a.func=null,!0;a.sourceCode=null;throw ba.thrown("Only static class functions can be made portable. Set -Dlime-warn-portability to see which line caused this.");}return a.func==null},get_portable:function(a){return a.func==null}},$b=function(a,b){this.__href=a;b!=null&&(this.__worker=b,this.__worker.onmessage=m(this,this.dispatchMessage),this.onMessage=new eo);Lm.disablePreserveClasses(this)};t["lime._internal.backend.html5.HTML5Thread"]=$b;$b.__name__="lime._internal.backend.html5.HTML5Thread";
$b.current=function(){return $b.__current};$b.create=function(a){var b=new URL($b.__current.__href);b.pathname=V.substr(b.pathname,0,b.pathname.lastIndexOf("/")+1)+Na.current.meta.h.file+".js";b.hash.length>0&&(b.hash+="_");b.hash+=$b.__workerCount;$b.__workerCount++;Fx.makePortable(a);b=new $b(b.href,new Worker(b.href));b.sendMessage(a);return b};$b.zeroDelay=function(){return new Promise(function(a,b){wa.setTimeout(a)})};$b.returnMessage=function(a,b,c){c==null&&(c=!0);$b.__isWorker&&(c&&Lm.preserveClasses(a),
wa.postMessage(a,b))};$b.equals=function(a,b){return a.__href==b.__href};$b.prototype={onMessage:null,__href:null,__worker:null,sendMessage:function(a,b,c){c==null&&(c=!0);this.__worker!=null?(c&&Lm.preserveClasses(a),this.__worker.postMessage(a,b)):$b.__messages.add(a)},dispatchMessage:function(a){a=a.data;Lm.restoreClasses(a);this.onMessage!=null&&this.onMessage.dispatch(a);$b.__resolveMethods.isEmpty()?$b.__messages.add(a):$b.__resolveMethods.pop()(a)},destroy:function(){if(this.__worker!=null)this.__worker.terminate();
else if($b.__isWorker)try{wa.close()}catch(a){Pb.lastError=a}},isWorker:function(){return this.__worker==null?$b.__isWorker:!0},__class__:$b};var xc=function(a){this.__stopMousePropagation=this.imeCompositionActive=!1;this.unusedTouchesPool=new hb;this.scale=1;this.currentTouches=new Od;this.parent=a;this.cursor=id.DEFAULT;this.cacheMouseY=this.cacheMouseX=0;var b=a.__attributes;Object.prototype.hasOwnProperty.call(b,"context")||(b.context={});this.renderType=b.context.type;Object.prototype.hasOwnProperty.call(b,
"element")&&(a.element=b.element);var c=a.element;Object.prototype.hasOwnProperty.call(b,"allowHighDPI")&&b.allowHighDPI&&this.renderType!="dom"&&(this.scale=window.devicePixelRatio);a.__scale=this.scale;this.setWidth=Object.prototype.hasOwnProperty.call(b,"width")?b.width:0;this.setHeight=Object.prototype.hasOwnProperty.call(b,"height")?b.height:0;a.__width=this.setWidth;a.__height=this.setHeight;a.id=xc.windowID++;c instanceof HTMLCanvasElement?this.canvas=c:this.renderType=="dom"?this.div=window.document.createElement("div"):
this.canvas=window.document.createElement("canvas");if(this.canvas!=null){var d=this.canvas.style;d.setProperty("-webkit-transform","translateZ(0)",null);d.setProperty("transform","translateZ(0)",null)}else this.div!=null&&(d=this.div.style,d.setProperty("-webkit-transform","translate3D(0,0,0)",null),d.setProperty("transform","translate3D(0,0,0)",null),d.position="relative",d.overflow="hidden",d.setProperty("-webkit-user-select","none",null),d.setProperty("-moz-user-select","none",null),d.setProperty("-ms-user-select",
"none",null),d.setProperty("-o-user-select","none",null));a.__width==0&&a.__height==0&&(c!=null?(a.__width=c.clientWidth,a.__height=c.clientHeight):(a.__width=window.innerWidth,a.__height=window.innerHeight),this.cacheElementWidth=a.__width,this.cacheElementHeight=a.__height,this.resizeElement=!0);this.canvas!=null?(this.canvas.width=Math.round(a.__width*this.scale),this.canvas.height=Math.round(a.__height*this.scale),this.canvas.style.width=a.__width+"px",this.canvas.style.height=a.__height+"px"):
(this.div.style.width=a.__width+"px",this.div.style.height=a.__height+"px");if(Object.prototype.hasOwnProperty.call(b,"resizable")&&b.resizable||!Object.prototype.hasOwnProperty.call(b,"width")&&this.setWidth==0&&this.setHeight==0)a.__resizable=!0;this.updateSize();if(c!=null){this.canvas!=null?c!=this.canvas&&c.appendChild(this.canvas):c.appendChild(this.div);b="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" ");for(d=0;d<b.length;){var f=b[d];++d;c.addEventListener(f,m(this,this.handleMouseEvent),
!0)}c.addEventListener("contextmenu",m(this,this.handleContextMenuEvent),!0);c.addEventListener("dragstart",m(this,this.handleDragEvent),!0);c.addEventListener("dragover",m(this,this.handleDragEvent),!0);c.addEventListener("drop",m(this,this.handleDragEvent),!0);c.addEventListener("touchstart",m(this,this.handleTouchEvent),!0);c.addEventListener("touchmove",m(this,this.handleTouchEvent),!0);c.addEventListener("touchend",m(this,this.handleTouchEvent),!0);c.addEventListener("touchcancel",m(this,this.handleTouchEvent),
!0);c.addEventListener("gamepadconnected",m(this,this.handleGamepadEvent),!0);c.addEventListener("gamepaddisconnected",m(this,this.handleGamepadEvent),!0)}this.createContext();a.context.type=="webgl"&&(this.canvas.addEventListener("webglcontextlost",m(this,this.handleContextEvent),!1),this.canvas.addEventListener("webglcontextrestored",m(this,this.handleContextEvent),!1))};t["lime._internal.backend.html5.HTML5Window"]=xc;xc.__name__="lime._internal.backend.html5.HTML5Window";xc.prototype={canvas:null,
div:null,cacheElementHeight:null,cacheElementWidth:null,cacheMouseX:null,cacheMouseY:null,cursor:null,currentTouches:null,isFullscreen:null,parent:null,primaryTouch:null,renderType:null,requestedFullscreen:null,resizeElement:null,scale:null,setHeight:null,setWidth:null,textInputEnabled:null,textInputRect:null,unusedTouchesPool:null,__focusPending:null,__stopMousePropagation:null,alert:function(a,b){a!=null&&window.alert(H.string(a))},close:function(){var a=this.parent.element;if(a!=null){this.canvas!=
null?(a!=this.canvas&&a.removeChild(this.canvas),this.canvas=null):this.div!=null&&(a.removeChild(this.div),this.div=null);for(var b="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" "),c=0;c<b.length;){var d=b[c];++c;a.removeEventListener(d,m(this,this.handleMouseEvent),!0)}a.removeEventListener("contextmenu",m(this,this.handleContextMenuEvent),!0);a.removeEventListener("dragstart",m(this,this.handleDragEvent),!0);a.removeEventListener("dragover",m(this,this.handleDragEvent),!0);
a.removeEventListener("drop",m(this,this.handleDragEvent),!0);a.removeEventListener("touchstart",m(this,this.handleTouchEvent),!0);a.removeEventListener("touchmove",m(this,this.handleTouchEvent),!0);a.removeEventListener("touchend",m(this,this.handleTouchEvent),!0);a.removeEventListener("touchcancel",m(this,this.handleTouchEvent),!0);a.removeEventListener("gamepadconnected",m(this,this.handleGamepadEvent),!0);a.removeEventListener("gamepaddisconnected",m(this,this.handleGamepadEvent),!0)}this.parent.application.__removeWindow(this.parent)},
createContext:function(){var a=new Gx,b=this.parent.__attributes.context;a.window=this.parent;a.attributes=b;if(this.div!=null)a.dom=this.div,a.type="dom",a.version="";else if(this.canvas!=null){var c=null,d=this.renderType=="canvas",f=this.renderType=="opengl"||this.renderType=="opengles"||this.renderType=="webgl",g=!Object.prototype.hasOwnProperty.call(b,"version")||b.version!="1",h=!1;if(f||!d&&(!Object.prototype.hasOwnProperty.call(b,"hardware")||b.hardware)){d=Object.prototype.hasOwnProperty.call(b,
"background")&&b.background==null;f=Object.prototype.hasOwnProperty.call(b,"colorDepth")?b.colorDepth:16;var n=Object.prototype.hasOwnProperty.call(b,"antialiasing")&&b.antialiasing>0,l=Object.prototype.hasOwnProperty.call(b,"depth")?b.depth:!0,q=Object.prototype.hasOwnProperty.call(b,"stencil")&&b.stencil;b=Object.prototype.hasOwnProperty.call(b,"preserveDrawingBuffer")&&b.preserveDrawingBuffer;b={alpha:d||f>16,antialias:n,depth:l,premultipliedAlpha:!0,stencil:q,preserveDrawingBuffer:b,failIfMajorPerformanceCaveat:!1};
d=["webgl","experimental-webgl"];g&&d.unshift("webgl2");for(g=0;g<d.length&&(f=d[g],++g,c=this.canvas.getContext(f,b),c!=null&&f=="webgl2"&&(h=!0),c==null););}c==null?(a.canvas2D=this.canvas.getContext("2d"),a.type="canvas",a.version="",a.attributes.hardware=!1):(a.webgl=yd.fromWebGL2RenderContext(c),h&&(a.webgl2=c),A.context==null&&(A.context=c,A.type="webgl",A.version=h?2:1),a.type="webgl",a.version=h?"2":"1",a.attributes.hardware=!0)}this.parent.context=a},focus:function(){},focusTextInput:function(){var a=
this;this.__focusPending||(this.__focusPending=!0,Gc.delay(function(){a.__focusPending=!1;a.textInputEnabled&&xc.textInput.focus()},20))},getCursor:function(){return this.cursor},getDisplay:function(){return Rb.getDisplay(0)},getDisplayMode:function(){return Rb.getDisplay(0).currentMode},getFrameRate:function(){return this.parent.application==null?0:this.parent.application.__backend.framePeriod<0?60:this.parent.application.__backend.framePeriod==1E3?0:1E3/this.parent.application.__backend.framePeriod},
getMouseLock:function(){return!1},getOpacity:function(){return 1},getTextInputEnabled:function(){return this.textInputEnabled},handleContextEvent:function(a){switch(a.type){case "webglcontextlost":a.cancelable&&a.preventDefault();this.parent.context=null;this.parent.onRenderContextLost.dispatch();break;case "webglcontextrestored":this.createContext(),this.parent.onRenderContextRestored.dispatch(this.parent.context)}},handleContextMenuEvent:function(a){(this.parent.onMouseUp.canceled||this.parent.onMouseDown.canceled)&&
a.cancelable&&a.preventDefault()},handleCutOrCopyEvent:function(a){var b=Pe.get_text();b==null&&(b="");a.clipboardData.setData("text/plain",b);a.cancelable&&a.preventDefault()},handleDragEvent:function(a){switch(a.type){case "dragover":return a.preventDefault(),!1;case "dragstart":if(w.__cast(a.target,HTMLElement).nodeName.toLowerCase()=="img"&&a.cancelable)return a.preventDefault(),!1;break;case "drop":if(a.dataTransfer!=null&&a.dataTransfer.files.length>0)return this.parent.onDropFile.dispatch(a.dataTransfer.files),
a.preventDefault(),!1}return!0},handleFocusEvent:function(a){this.textInputEnabled&&(a.relatedTarget==null||this.isDescendent(a.relatedTarget))&&this.focusTextInput()},handleFullscreenEvent:function(a){if((document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)!=null)this.isFullscreen=!0,this.parent.__fullscreen=!0,this.requestedFullscreen&&(this.requestedFullscreen=!1,this.parent.onFullscreen.dispatch());else{this.isFullscreen=!1;
this.parent.__fullscreen=!1;this.parent.onRestore.dispatch();a=["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"];for(var b=["fullscreenerror","mozfullscreenerror","webkitfullscreenerror","MSFullscreenError"],c=0,d=a.length;c<d;){var f=c++;window.document.removeEventListener(a[f],m(this,this.handleFullscreenEvent),!1);window.document.removeEventListener(b[f],m(this,this.handleFullscreenEvent),!1)}}},handleGamepadEvent:function(a){switch(a.type){case "gamepadconnected":Te.__connect(a.gamepad.index);
a.gamepad.mapping=="standard"&&sf.__connect(a.gamepad.index);break;case "gamepaddisconnected":Te.__disconnect(a.gamepad.index),sf.__disconnect(a.gamepad.index)}},handleInputEvent:function(a){this.imeCompositionActive||xc.textInput.value==xc.dummyCharacter||(a=N.replace(xc.textInput.value,xc.dummyCharacter,""),a.length>0&&this.parent.onTextInput.dispatch(a),xc.textInput.value=xc.dummyCharacter)},handleMouseEvent:function(a){if(a.type!="wheel"){if(this.parent.element!=null)if(this.canvas!=null){var b=
this.canvas.getBoundingClientRect();var c=this.parent.__width/b.width*(a.clientX-b.left);b=this.parent.__height/b.height*(a.clientY-b.top)}else this.div!=null?(b=this.div.getBoundingClientRect(),c=a.clientX-b.left,b=a.clientY-b.top):(b=this.parent.element.getBoundingClientRect(),c=this.parent.__width/b.width*(a.clientX-b.left),b=this.parent.__height/b.height*(a.clientY-b.top));else c=a.clientX,b=a.clientY;switch(a.type){case "mousedown":a.currentTarget==this.parent.element&&(window.addEventListener("mouseup",
m(this,this.handleMouseEvent)),window.addEventListener("mousemove",m(this,this.handleMouseEvent)));this.__stopMousePropagation=!1;this.parent.clickCount=a.detail;this.parent.onMouseDown.dispatch(c,b,a.button);this.parent.clickCount=0;this.parent.onMouseDown.canceled&&a.cancelable&&a.preventDefault();break;case "mouseenter":a.target==this.parent.element&&(this.parent.onEnter.dispatch(),this.parent.onEnter.canceled&&a.cancelable&&a.preventDefault());break;case "mouseleave":a.target==this.parent.element&&
(this.parent.onLeave.dispatch(),this.parent.onLeave.canceled&&a.cancelable&&a.preventDefault());break;case "mousemove":if(this.__stopMousePropagation&&a.currentTarget!=this.parent.element){this.__stopMousePropagation=!1;return}this.__stopMousePropagation=a.currentTarget==this.parent.element;if(c!=this.cacheMouseX||b!=this.cacheMouseY)this.parent.onMouseMove.dispatch(c,b),this.parent.onMouseMoveRelative.dispatch(c-this.cacheMouseX,b-this.cacheMouseY),(this.parent.onMouseMove.canceled||this.parent.onMouseMoveRelative.canceled)&&
a.cancelable&&a.preventDefault();break;case "mouseup":if(this.__stopMousePropagation&&a.currentTarget!=this.parent.element){this.__stopMousePropagation=!1;return}window.removeEventListener("mouseup",m(this,this.handleMouseEvent));window.removeEventListener("mousemove",m(this,this.handleMouseEvent));this.__stopMousePropagation=a.currentTarget==this.parent.element;this.parent.clickCount=a.detail;this.parent.onMouseUp.dispatch(c,b,a.button);this.parent.clickCount=0;this.parent.onMouseUp.canceled&&a.cancelable&&
a.preventDefault()}this.cacheMouseX=c;this.cacheMouseY=b}else{switch(a.deltaMode){case 0:c=Vl.PIXELS;break;case 1:c=Vl.LINES;break;case 2:c=Vl.PAGES;break;default:c=Vl.UNKNOWN}this.parent.onMouseWheel.dispatch(a.deltaX,-a.deltaY,c);this.parent.onMouseWheel.canceled&&a.cancelable&&a.preventDefault()}},handlePasteEvent:function(a){if(a.clipboardData.types.indexOf("text/plain")>-1){var b=a.clipboardData.getData("text/plain");Pe.set_text(b);this.textInputEnabled&&this.parent.onTextInput.dispatch(b);a.cancelable&&
a.preventDefault()}},handleResizeEvent:function(a){this.primaryTouch=null;this.updateSize()},handleTouchEvent:function(a){a.cancelable&&a.preventDefault();var b=null;this.parent.element!=null&&(b=this.canvas!=null?this.canvas.getBoundingClientRect():this.div!=null?this.div.getBoundingClientRect():this.parent.element.getBoundingClientRect());var c=this.setWidth,d=this.setHeight;if(c==0||d==0)b!=null?(c=b.width,d=b.height):d=c=1;for(var f,g,h,n,l,q=0,u=a.changedTouches;q<u.length;){var v=u[q];++q;b!=
null?(g=c/b.width*(v.clientX-b.left),h=d/b.height*(v.clientY-b.top)):(g=v.clientX,h=v.clientY);if(a.type=="touchstart")f=this.unusedTouchesPool.pop(),f==null?f=new Ue(g/c,h/d,v.identifier,0,0,v.force,this.parent.id):(f.x=g/c,f.y=h/d,f.id=v.identifier,f.dx=0,f.dy=0,f.pressure=v.force,f.device=this.parent.id),this.currentTouches.h[v.identifier]=f,Ue.onStart.dispatch(f),this.primaryTouch==null&&(this.primaryTouch=f),f==this.primaryTouch&&this.parent.onMouseDown.dispatch(g,h,0);else if(f=this.currentTouches.h[v.identifier],
f!=null)switch(n=f.x,l=f.y,f.x=g/c,f.y=h/d,f.dx=f.x-n,f.dy=f.y-l,f.pressure=v.force,a.type){case "touchcancel":Ue.onCancel.dispatch(f);this.currentTouches.remove(v.identifier);this.unusedTouchesPool.add(f);f==this.primaryTouch&&(this.primaryTouch=null);break;case "touchend":Ue.onEnd.dispatch(f);this.currentTouches.remove(v.identifier);this.unusedTouchesPool.add(f);f==this.primaryTouch&&(this.parent.onMouseUp.dispatch(g,h,0),this.primaryTouch=null);break;case "touchmove":Ue.onMove.dispatch(f),f==this.primaryTouch&&
this.parent.onMouseMove.dispatch(g,h)}}},isDescendent:function(a){if(a==this.parent.element)return!0;for(;a!=null;){if(a.parentNode==this.parent.element)return!0;a=a.parentNode}return!1},move:function(a,b){},readPixels:function(a){if(this.canvas!=null){var b=new of(0,0,this.canvas.width,this.canvas.height);a==null?a=b:a.intersection(b,a);if(a.width>0&&a.height>0)return b=window.document.createElement("canvas"),b.width=a.width|0,b.height=a.height|0,b.getContext("2d").drawImage(this.canvas,-a.x,-a.y),
Oc.fromCanvas(b)}return null},resize:function(a,b){},setMinSize:function(a,b){},setMaxSize:function(a,b){},setBorderless:function(a){return a},setClipboard:function(a){xc.textArea==null&&(xc.textArea=window.document.createElement("textarea"),xc.textArea.style.height="0px",xc.textArea.style.left="-100px",xc.textArea.style.opacity="0",xc.textArea.style.position="fixed",xc.textArea.style.top="-100px",xc.textArea.style.width="0px",window.document.body.appendChild(xc.textArea));xc.textArea.value=a;xc.textArea.focus();
xc.textArea.select();window.document.queryCommandEnabled("copy")&&window.document.execCommand("copy");this.textInputEnabled&&this.focusTextInput()},setCursor:function(a){if(this.cursor!=a){if(a==null)this.parent.element.style.cursor="none";else{switch(a._hx_index){case 0:var b="default";break;case 1:b="crosshair";break;case 3:b="move";break;case 4:b="pointer";break;case 5:b="nesw-resize";break;case 6:b="ns-resize";break;case 7:b="nwse-resize";break;case 8:b="ew-resize";break;case 9:b="text";break;
case 10:b="wait";break;case 11:b="wait";break;default:b="auto"}this.parent.element.style.cursor=b}this.cursor=a}return this.cursor},setDisplayMode:function(a){return a},setFrameRate:function(a){this.parent.application!=null&&(a>=60?this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=-1):a>0?this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=1E3/a):this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=
1E3));return a},setFullscreen:function(a){a?this.requestedFullscreen||this.isFullscreen||(this.requestedFullscreen=!0,(B=this.parent.element,m(B,B.requestFullscreen))?(document.addEventListener("fullscreenchange",m(this,this.handleFullscreenEvent),!1),document.addEventListener("fullscreenerror",m(this,this.handleFullscreenEvent),!1),this.parent.element.requestFullscreen()):this.parent.element.mozRequestFullScreen?(document.addEventListener("mozfullscreenchange",m(this,this.handleFullscreenEvent),
!1),document.addEventListener("mozfullscreenerror",m(this,this.handleFullscreenEvent),!1),this.parent.element.mozRequestFullScreen()):this.parent.element.webkitRequestFullscreen?(document.addEventListener("webkitfullscreenchange",m(this,this.handleFullscreenEvent),!1),document.addEventListener("webkitfullscreenerror",m(this,this.handleFullscreenEvent),!1),this.parent.element.webkitRequestFullscreen()):this.parent.element.msRequestFullscreen&&(document.addEventListener("MSFullscreenChange",m(this,
this.handleFullscreenEvent),!1),document.addEventListener("MSFullscreenError",m(this,this.handleFullscreenEvent),!1),this.parent.element.msRequestFullscreen())):this.isFullscreen&&(this.requestedFullscreen=!1,document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen());return a},setIcon:function(a){yb.convertToCanvas(a);var b=window.document.querySelector("link[rel*='icon']");
b==null&&(b=window.document.createElement("link"));b.type="image/x-icon";b.rel="shortcut icon";b.href=a.buffer.get_src().toDataURL("image/x-icon");window.document.getElementsByTagName("head")[0].appendChild(b)},setMaximized:function(a){return!1},setMinimized:function(a){return!1},setMouseLock:function(a){},setOpacity:function(a){},setResizable:function(a){return a},setTextInputEnabled:function(a){if(a){if(xc.textInput==null){xc.textInput=window.document.createElement("input");var b=wa.navigator.userAgent.indexOf("Android")>=
0?"password":"text";xc.textInput.type=b;xc.textInput.style.position="absolute";xc.textInput.style.opacity="0";xc.textInput.style.color="transparent";xc.textInput.value=xc.dummyCharacter;xc.textInput.autocapitalize="off";xc.textInput.autocorrect="off";xc.textInput.autocomplete="off";xc.textInput.style.left="0px";xc.textInput.style.top="50%";(new Wa("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?(xc.textInput.style.fontSize="0px",xc.textInput.style.width="0px",xc.textInput.style.height=
"0px"):(xc.textInput.style.width="1px",xc.textInput.style.height="1px");xc.textInput.style.pointerEvents="none";xc.textInput.style.zIndex="-10000000"}xc.textInput.parentNode==null&&this.parent.element.appendChild(xc.textInput);this.textInputEnabled||(xc.textInput.addEventListener("input",m(this,this.handleInputEvent),!0),xc.textInput.addEventListener("blur",m(this,this.handleFocusEvent),!0),xc.textInput.addEventListener("cut",m(this,this.handleCutOrCopyEvent),!0),xc.textInput.addEventListener("copy",
m(this,this.handleCutOrCopyEvent),!0),xc.textInput.addEventListener("paste",m(this,this.handlePasteEvent),!0),xc.textInput.addEventListener("compositionstart",m(this,this.handleCompositionstartEvent),!0),xc.textInput.addEventListener("compositionend",m(this,this.handleCompositionendEvent),!0));xc.textInput.focus();xc.textInput.select()}else xc.textInput!=null&&(xc.textInput.blur(),xc.textInput.removeEventListener("input",m(this,this.handleInputEvent),!0),xc.textInput.removeEventListener("blur",m(this,
this.handleFocusEvent),!0),xc.textInput.removeEventListener("cut",m(this,this.handleCutOrCopyEvent),!0),xc.textInput.removeEventListener("copy",m(this,this.handleCutOrCopyEvent),!0),xc.textInput.removeEventListener("paste",m(this,this.handlePasteEvent),!0),xc.textInput.removeEventListener("compositionstart",m(this,this.handleCompositionstartEvent),!0),xc.textInput.removeEventListener("compositionend",m(this,this.handleCompositionendEvent),!0));return this.textInputEnabled=a},setTextInputRect:function(a){return this.textInputRect=
a},imeCompositionActive:null,handleCompositionstartEvent:function(a){this.imeCompositionActive=!0},handleCompositionendEvent:function(a){this.imeCompositionActive=!1;this.handleInputEvent(a)},setTitle:function(a){a!=null&&(window.document.title=a);return a},setVisible:function(a){return a},updateSize:function(){if(this.parent.__resizable){if(this.parent.element!=null){var a=this.parent.element.clientWidth;var b=this.parent.element.clientHeight}else a=window.innerWidth,b=window.innerHeight;if(a!=this.cacheElementWidth||
b!=this.cacheElementHeight){this.cacheElementWidth=a;this.cacheElementHeight=b;var c=this.resizeElement||this.setWidth==0&&this.setHeight==0;if(this.parent.element!=null&&(this.div==null||this.div!=null&&c))if(c){if(this.parent.__width!=a||this.parent.__height!=b)this.parent.__width=a|0,this.parent.__height=b|0,this.canvas!=null?this.parent.element!=this.canvas&&(this.canvas.width=Math.round(a*this.scale),this.canvas.height=Math.round(b*this.scale),this.canvas.style.width=a+"px",this.canvas.style.height=
b+"px"):(this.div.style.width=a+"px",this.div.style.height=b+"px"),this.parent.onResize.dispatch(a|0,b|0)}else{c=this.setWidth!=0?a/this.setWidth:1;var d=this.setHeight!=0?b/this.setHeight:1,f=a,g=b,h=0,n=0;c<d?(g=Math.floor(this.setHeight*c),n=Math.floor((b-g)/2)):(f=Math.floor(this.setWidth*d),h=Math.floor((a-f)/2));this.canvas!=null?this.parent.element!=this.canvas&&(this.canvas.style.width=f+"px",this.canvas.style.height=g+"px",this.canvas.style.marginLeft=h+"px",this.canvas.style.marginTop=n+
"px"):(this.div.style.width=f+"px",this.div.style.height=g+"px",this.div.style.marginLeft=h+"px",this.div.style.marginTop=n+"px")}}}},warpMouse:function(a,b){},__class__:xc};var Tz=function(){};t["lime._internal.backend.native.NativeCFFI"]=Tz;Tz.__name__="lime._internal.backend.native.NativeCFFI";var Py=function(){};t["lime._internal.format.BMP"]=Py;Py.__name__="lime._internal.format.BMP";Py.encode=function(a,b){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);
b==null&&(b=Mm.RGB);var c=14,d=40,f=a.width*a.height*4;if(b!=null)switch(b._hx_index){case 0:f=(a.width*3+a.width*3%4)*a.height;break;case 1:d=108;break;case 2:c=0,f+=a.width*a.height}var g=new Oa(new ArrayBuffer(c+d+f)),h=0;c>0&&(g.b[h++]=66,g.b[h++]=77,g.setInt32(h,g.length),h+=4,g.setUInt16(h,0),h+=2,g.setUInt16(h,0),h+=2,g.setInt32(h,c+d),h+=4);g.setInt32(h,d);h+=4;g.setInt32(h,a.width);h+=4;g.setInt32(h,b==Mm.ICO?a.height*2:a.height);h+=4;g.setUInt16(h,1);h+=2;g.setUInt16(h,b==Mm.RGB?24:32);
h+=2;g.setInt32(h,b==Mm.BITFIELD?3:0);h+=4;g.setInt32(h,f);h+=4;g.setInt32(h,11824);h+=4;g.setInt32(h,11824);h+=4;g.setInt32(h,0);h+=4;g.setInt32(h,0);h+=4;if(b==Mm.BITFIELD)for(g.setInt32(h,16711680),h+=4,g.setInt32(h,65280),h+=4,g.setInt32(h,255),h+=4,g.setInt32(h,-16777216),h+=4,g.b[h++]=32,g.b[h++]=110,g.b[h++]=105,g.b[h++]=87,c=0;c<48;)c++,g.b[h++]=0;d=a.getPixels(new of(0,0,a.width,a.height),1);if(b!=null)switch(b._hx_index){case 0:c=0;for(b=a.height;c<b;){var n=c++;n=(a.height-1-n)*4*a.width;
for(var l=0,q=a.width;l<q;){l++;n++;var u=d.b[n++];var v=d.b[n++];var z=d.b[n++];g.b[h++]=z;g.b[h++]=v;g.b[h++]=u}f=0;for(var r=a.width*3%4;f<r;)f++,g.b[h++]=0}break;case 1:c=0;for(b=a.height;c<b;)for(n=c++,n=(a.height-1-n)*4*a.width,l=0,q=a.width;l<q;){l++;var F=d.b[n++];u=d.b[n++];v=d.b[n++];z=d.b[n++];g.b[h++]=z;g.b[h++]=v;g.b[h++]=u;g.b[h++]=F}break;case 2:f=new Oa(new ArrayBuffer(a.width*a.height));c=r=0;for(b=a.height;c<b;)for(n=c++,n=(a.height-1-n)*4*a.width,l=0,q=a.width;l<q;)l++,F=d.b[n++],
u=d.b[n++],v=d.b[n++],z=d.b[n++],g.b[h++]=z,g.b[h++]=v,g.b[h++]=u,g.b[h++]=F,f.b[r++]=0;g.blit(h,f,0,a.width*a.height)}return g};var Mm=R["lime._internal.format.BMPType"]={__ename__:"lime._internal.format.BMPType",__constructs__:null,RGB:{_hx_name:"RGB",_hx_index:0,__enum__:"lime._internal.format.BMPType",toString:E},BITFIELD:{_hx_name:"BITFIELD",_hx_index:1,__enum__:"lime._internal.format.BMPType",toString:E},ICO:{_hx_name:"ICO",_hx_index:2,__enum__:"lime._internal.format.BMPType",toString:E}};Mm.__constructs__=
[Mm.RGB,Mm.BITFIELD,Mm.ICO];var rj=function(){};t["lime._internal.format.Base64"]=rj;rj.__name__="lime._internal.format.Base64";rj.decode=function(a){return Li.decode(a)};rj.encode=function(a){var b=[],c=rj.DICTIONARY,d=rj.EXTENDED_DICTIONARY,f=a.length,g=Math.floor(f/3),h=g*2;b.length=Math.ceil(f/3)*2;for(var n=0,l=0,q;l<h;)q=a.b[n]<<16|a.b[n+1]<<8|a.b[n+2],b[l]=d[q>>12&4095],b[l+1]=d[q&4095],n+=3,l+=2;switch(f-g*3){case 1:q=a.b[n]<<16;b[l]=d[q>>12&4095];b[l+1]="==";break;case 2:q=a.b[n]<<16|a.b[n+
1]<<8,b[l]=d[q>>12&4095],b[l+1]=c[q>>6&63]+"="}return b.join("")};var Wt=function(){};t["lime._internal.format.Deflate"]=Wt;Wt.__name__="lime._internal.format.Deflate";Wt.compress=function(a){a=pako.deflateRaw(a.b.bufferValue);return Oa.ofData(a)};Wt.decompress=function(a){a=pako.inflateRaw(a.b.bufferValue);return Oa.ofData(a)};var Xt=function(){};t["lime._internal.format.GZip"]=Xt;Xt.__name__="lime._internal.format.GZip";Xt.compress=function(a){a=pako.gzip(a.b.bufferValue);return Oa.ofData(a)};Xt.decompress=
function(a){a=pako.ungzip(a.b.bufferValue);return Oa.ofData(a)};var Yt=function(){};t["lime._internal.format.JPEG"]=Yt;Yt.__name__="lime._internal.format.JPEG";Yt.decodeBytes=function(a,b){return null};Yt.decodeFile=function(a,b){return null};Yt.encode=function(a,b){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);yb.convertToCanvas(a,!1);if(a.buffer.__srcCanvas!=null){a=a.buffer.__srcCanvas.toDataURL("image/jpeg",b/100);a=window.atob(a.split(";base64,")[1]);
b=new Oa(new ArrayBuffer(a.length));for(var c=0,d=a.length;c<d;){var f=c++;b.b[f]=V.cca(a,f)}return b}return null};var Zt=function(){};t["lime._internal.format.LZMA"]=Zt;Zt.__name__="lime._internal.format.LZMA";Zt.compress=function(a){var b=LZMA.compress;a=a.b.bufferValue;a=a!=null?new Uint8Array(a,0):null;b=b(a,5);return typeof b=="string"?Oa.ofString(b):Oa.ofData(b)};Zt.decompress=function(a){var b=LZMA.decompress;a=a.b.bufferValue;a=a!=null?new Uint8Array(a,0):null;b=b(a);return typeof b=="string"?
Oa.ofString(b):Oa.ofData(b)};var cq=function(){};t["lime._internal.format.PNG"]=cq;cq.__name__="lime._internal.format.PNG";cq.decodeBytes=function(a,b){return null};cq.decodeFile=function(a,b){return null};cq.encode=function(a){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);yb.convertToCanvas(a,!1);if(a.buffer.__srcCanvas!=null){a=a.buffer.__srcCanvas.toDataURL("image/png");a=window.atob(a.split(";base64,")[1]);for(var b=new Oa(new ArrayBuffer(a.length)),
c=0,d=a.length;c<d;){var f=c++;b.b[f]=V.cca(a,f)}return b}return null};var $t=function(){};t["lime._internal.format.Zlib"]=$t;$t.__name__="lime._internal.format.Zlib";$t.compress=function(a){a=pako.deflate(a.b.bufferValue);return Oa.ofData(a)};$t.decompress=function(a){a=pako.inflate(a.b.bufferValue);return Oa.ofData(a)};var yb=function(){};t["lime._internal.graphics.ImageCanvasUtil"]=yb;yb.__name__="lime._internal.graphics.ImageCanvasUtil";yb.colorTransform=function(a,b,c){yb.convertToData(a);Ub.colorTransform(a,
b,c)};yb.convertToCanvas=function(a,b){b==null&&(b=!1);var c=a.buffer;c.__srcImage!=null?(c.__srcCanvas==null&&(yb.createCanvas(a,c.__srcImage.width,c.__srcImage.height),c.__srcContext.drawImage(c.__srcImage,0,0)),c.__srcImage=null):c.__srcCanvas==null&&c.data!=null?(a.set_transparent(!0),yb.createCanvas(a,c.width,c.height),yb.createImageData(a),c.__srcContext.putImageData(c.__srcImageData,0,0)):a.type==gg.DATA&&c.__srcImageData!=null&&a.dirty&&(c.__srcContext.putImageData(c.__srcImageData,0,0),a.dirty=
!1);b?(c.data=null,c.__srcImageData=null):c.data==null&&c.__srcImageData!=null&&(c.data=c.__srcImageData.data);a.type=gg.CANVAS};yb.convertToData=function(a,b){b==null&&(b=!1);var c=a.buffer;c.__srcImage!=null&&yb.convertToCanvas(a);if(c.__srcCanvas!=null&&c.data==null)yb.createImageData(a),a.type==gg.CANVAS&&(a.dirty=!1);else if(a.type==gg.CANVAS&&c.__srcCanvas!=null&&a.dirty){if(c.__srcImageData==null)yb.createImageData(a);else{c.__srcImageData=c.__srcContext.getImageData(0,0,c.width,c.height);
var d=c.__srcImageData.data.buffer;d=d!=null?new Uint8Array(d):null;c.data=d}a.dirty=!1}b&&(a.buffer.__srcCanvas=null,a.buffer.__srcContext=null);a.type=gg.DATA};yb.copyChannel=function(a,b,c,d,f,g){yb.convertToData(b);yb.convertToData(a);Ub.copyChannel(a,b,c,d,f,g)};yb.copyPixels=function(a,b,c,d,f,g,h){h==null&&(h=!1);d==null||d.x>=a.width||d.y>=a.height||c==null||c.width<1||c.height<1||(f!=null&&f.get_transparent()&&(g==null&&(g=new Uf),b=b.clone(),b.copyChannel(f,new of(c.x+g.x,c.y+g.y,c.width,
c.height),new Uf(c.x,c.y),Bi.ALPHA,Bi.ALPHA)),yb.convertToCanvas(a,!0),h||a.get_transparent()&&b.get_transparent()&&a.buffer.__srcContext.clearRect(d.x+a.offsetX,d.y+a.offsetY,c.width+a.offsetX,c.height+a.offsetY),yb.convertToCanvas(b),b.buffer.get_src()!=null&&(a.buffer.__srcContext.globalCompositeOperation="source-over",a.buffer.__srcContext.drawImage(b.buffer.get_src(),c.x+b.offsetX|0,c.y+b.offsetY|0,c.width|0,c.height|0,d.x+a.offsetX|0,d.y+a.offsetY|0,c.width|0,c.height|0)),a.dirty=!0,a.version++)};
yb.createCanvas=function(a,b,c){var d=a.buffer;d.__srcCanvas==null&&(d.__srcCanvas=window.document.createElement("canvas"),d.__srcCanvas.width=b,d.__srcCanvas.height=c,a.get_transparent()||d.__srcCanvas.setAttribute("moz-opaque","true"),d.__srcContext=d.__srcCanvas.getContext("2d",{alpha:a.get_transparent()}))};yb.createImageData=function(a){a=a.buffer;if(a.__srcImageData==null){a.data==null?a.__srcImageData=a.__srcContext.getImageData(0,0,a.width,a.height):(a.__srcImageData=a.__srcContext.createImageData(a.width,
a.height),a.__srcImageData.data.set(a.data));var b=a.__srcImageData.data.buffer;b=b!=null?new Uint8Array(b):null;a.data=b}};yb.fillRect=function(a,b,c,d){yb.convertToCanvas(a);if(d==1){d=c>>16&255;var f=c>>8&255;var g=c&255;c=a.get_transparent()?c>>24&255:255}else d=c>>24&255,f=c>>16&255,g=c>>8&255,c=a.get_transparent()?c&255:255;b.x==0&&b.y==0&&b.width==a.width&&b.height==a.height&&a.get_transparent()&&c==0?a.buffer.__srcCanvas.width=a.buffer.width:(c<255&&a.buffer.__srcContext.clearRect(b.x+a.offsetX,
b.y+a.offsetY,b.width+a.offsetX,b.height+a.offsetY),c>0&&(a.buffer.__srcContext.fillStyle="rgba("+d+", "+f+", "+g+", "+c/255+")",a.buffer.__srcContext.fillRect(b.x+a.offsetX,b.y+a.offsetY,b.width+a.offsetX,b.height+a.offsetY)),a.dirty=!0,a.version++)};yb.floodFill=function(a,b,c,d,f){yb.convertToData(a);Ub.floodFill(a,b,c,d,f)};yb.getPixel=function(a,b,c,d){yb.convertToData(a);return Ub.getPixel(a,b,c,d)};yb.getPixel32=function(a,b,c,d){yb.convertToData(a);return Ub.getPixel32(a,b,c,d)};yb.getPixels=
function(a,b,c){yb.convertToData(a);return Ub.getPixels(a,b,c)};yb.merge=function(a,b,c,d,f,g,h,n){yb.convertToData(b);yb.convertToData(a);Ub.merge(a,b,c,d,f,g,h,n)};yb.resize=function(a,b,c){var d=a.buffer;if(d.__srcCanvas==null)yb.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{yb.convertToCanvas(a,!0);var f=d.__srcCanvas;d.__srcCanvas=null;yb.createCanvas(a,b,c);d.__srcContext.drawImage(f,0,0,b,c)}d.__srcImageData=null;d.data=null;a.dirty=!0;a.version++};yb.scroll=function(a,
b,c){if(b%a.width!=0||c%a.height!=0){var d=a.clone();yb.convertToCanvas(a,!0);a.buffer.__srcContext.clearRect(b,c,a.width,a.height);a.buffer.__srcContext.drawImage(d.get_src(),b,c);a.dirty=!0;a.version++}};yb.setPixel=function(a,b,c,d,f){yb.convertToData(a);Ub.setPixel(a,b,c,d,f)};yb.setPixel32=function(a,b,c,d,f){yb.convertToData(a);Ub.setPixel32(a,b,c,d,f)};yb.setPixels=function(a,b,c,d,f){yb.convertToData(a);Ub.setPixels(a,b,c,d,f)};yb.sync=function(a,b){a!=null&&(a.type!=gg.CANVAS||a.buffer.__srcCanvas==
null&&a.buffer.data==null?a.type==gg.DATA&&yb.convertToData(a,b):yb.convertToCanvas(a,b))};var Ub=function(){};t["lime._internal.graphics.ImageDataUtil"]=Ub;Ub.__name__="lime._internal.graphics.ImageDataUtil";Ub.displaceMap=function(a,b,c,d,f,g,h){var n=a.buffer.data,l=b.buffer.data,q=c.buffer.data,u=a.buffer.format,v=b.buffer.format,z=c.buffer.format,r=a.get_premultiplied(),F=b.get_premultiplied(),J=c.get_premultiplied();b=new ih(b);c=new ih(c);for(var L,Q,W=0,ka=0,ha,ta,za,eb=0,db=0,Ra=0,vb=0,bb,
Tb=0,Eb=b.height;Tb<Eb;){var Lb=Tb++;L=b.byteOffset+b.stride*Lb;for(var vc=0,zd=b.width;vc<zd;){var Qb=vc++;Q=L+Qb*4;za=d.x|0;ha=d.y|0;if(h){ka=b.byteOffset+b.stride*(Lb-ha+1)+(Qb-za)*4;ta=z;bb=J;bb==null&&(bb=!1);ta==null&&(ta=0);switch(ta){case 0:eb=(q[ka]&255)<<24|(q[ka+1]&255)<<16|(q[ka+2]&255)<<8|q[ka+3]&255;break;case 1:eb=(q[ka+1]&255)<<24|(q[ka+2]&255)<<16|(q[ka+3]&255)<<8|q[ka]&255;break;case 2:eb=(q[ka+2]&255)<<24|(q[ka+1]&255)<<16|(q[ka]&255)<<8|q[ka+3]&255}bb&&(eb&255)!=0&&(eb&255)!=255&&
(X.unmult=255/(eb&255),eb=(X.__clamp[Math.round((eb>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((eb>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((eb>>>8&255)*X.unmult)]&255)<<8|eb&255);ka=b.byteOffset+b.stride*(Lb-ha)+(Qb-za+1)*4;ta=z;bb=J;bb==null&&(bb=!1);ta==null&&(ta=0);switch(ta){case 0:db=(q[ka]&255)<<24|(q[ka+1]&255)<<16|(q[ka+2]&255)<<8|q[ka+3]&255;break;case 1:db=(q[ka+1]&255)<<24|(q[ka+2]&255)<<16|(q[ka+3]&255)<<8|q[ka]&255;break;case 2:db=(q[ka+2]&255)<<24|(q[ka+1]&255)<<
16|(q[ka]&255)<<8|q[ka+3]&255}bb&&(db&255)!=0&&(db&255)!=255&&(X.unmult=255/(db&255),db=(X.__clamp[Math.round((db>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((db>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((db>>>8&255)*X.unmult)]&255)<<8|db&255);ka=b.byteOffset+b.stride*(Lb-ha+1)+(Qb-za+1)*4;ta=z;bb=J;bb==null&&(bb=!1);ta==null&&(ta=0);switch(ta){case 0:Ra=(q[ka]&255)<<24|(q[ka+1]&255)<<16|(q[ka+2]&255)<<8|q[ka+3]&255;break;case 1:Ra=(q[ka+1]&255)<<24|(q[ka+2]&255)<<16|(q[ka+3]&255)<<
8|q[ka]&255;break;case 2:Ra=(q[ka+2]&255)<<24|(q[ka+1]&255)<<16|(q[ka]&255)<<8|q[ka+3]&255}bb&&(Ra&255)!=0&&(Ra&255)!=255&&(X.unmult=255/(Ra&255),Ra=(X.__clamp[Math.round((Ra>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((Ra>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((Ra>>>8&255)*X.unmult)]&255)<<8|Ra&255);ka=b.byteOffset+b.stride*(Lb-ha)+(Qb-za)*4;ta=z;bb=J;bb==null&&(bb=!1);ta==null&&(ta=0);switch(ta){case 0:vb=(q[ka]&255)<<24|(q[ka+1]&255)<<16|(q[ka+2]&255)<<8|q[ka+3]&255;break;
case 1:vb=(q[ka+1]&255)<<24|(q[ka+2]&255)<<16|(q[ka+3]&255)<<8|q[ka]&255;break;case 2:vb=(q[ka+2]&255)<<24|(q[ka+1]&255)<<16|(q[ka]&255)<<8|q[ka+3]&255}bb&&(vb&255)!=0&&(vb&255)!=255&&(X.unmult=255/(vb&255),vb=(X.__clamp[Math.round((vb>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((vb>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((vb>>>8&255)*X.unmult)]&255)<<8|vb&255);ka=Ub.bilinear(eb,db,Ra,vb,d.x-za,d.y-ha)}else{za=c.byteOffset+c.stride*(Lb-ha)+(Qb-za)*4;ha=z;ta=J;ta==null&&(ta=!1);
ha==null&&(ha=0);switch(ha){case 0:ka=(q[za]&255)<<24|(q[za+1]&255)<<16|(q[za+2]&255)<<8|q[za+3]&255;break;case 1:ka=(q[za+1]&255)<<24|(q[za+2]&255)<<16|(q[za+3]&255)<<8|q[za]&255;break;case 2:ka=(q[za+2]&255)<<24|(q[za+1]&255)<<16|(q[za]&255)<<8|q[za+3]&255}ta&&(ka&255)!=0&&(ka&255)!=255&&(X.unmult=255/(ka&255),ka=(X.__clamp[Math.round((ka>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((ka>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((ka>>>8&255)*X.unmult)]&255)<<8|ka&255)}za=(ka&255)/
255;ha=((ka>>>24&255)-128)/255*za;ta=((ka>>>16&255)-128)/255*za;za=ha*f.x+ta*g.x;bb=ha*f.y+ta*g.y;ha=Math.floor(za*b.width);ta=Math.floor(bb*b.height);if(h){W=b.byteOffset+b.stride*(Lb+ta+1)+(Qb+ha)*4;var wd=v,Ae=F;Ae==null&&(Ae=!1);wd==null&&(wd=0);switch(wd){case 0:eb=(l[W]&255)<<24|(l[W+1]&255)<<16|(l[W+2]&255)<<8|l[W+3]&255;break;case 1:eb=(l[W+1]&255)<<24|(l[W+2]&255)<<16|(l[W+3]&255)<<8|l[W]&255;break;case 2:eb=(l[W+2]&255)<<24|(l[W+1]&255)<<16|(l[W]&255)<<8|l[W+3]&255}Ae&&(eb&255)!=0&&(eb&
255)!=255&&(X.unmult=255/(eb&255),eb=(X.__clamp[Math.round((eb>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((eb>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((eb>>>8&255)*X.unmult)]&255)<<8|eb&255);W=b.byteOffset+b.stride*(Lb+ta)+(Qb+ha+1)*4;wd=v;Ae=F;Ae==null&&(Ae=!1);wd==null&&(wd=0);switch(wd){case 0:db=(l[W]&255)<<24|(l[W+1]&255)<<16|(l[W+2]&255)<<8|l[W+3]&255;break;case 1:db=(l[W+1]&255)<<24|(l[W+2]&255)<<16|(l[W+3]&255)<<8|l[W]&255;break;case 2:db=(l[W+2]&255)<<24|(l[W+1]&255)<<
16|(l[W]&255)<<8|l[W+3]&255}Ae&&(db&255)!=0&&(db&255)!=255&&(X.unmult=255/(db&255),db=(X.__clamp[Math.round((db>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((db>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((db>>>8&255)*X.unmult)]&255)<<8|db&255);W=b.byteOffset+b.stride*(Lb+ta+1)+(Qb+ha+1)*4;wd=v;Ae=F;Ae==null&&(Ae=!1);wd==null&&(wd=0);switch(wd){case 0:Ra=(l[W]&255)<<24|(l[W+1]&255)<<16|(l[W+2]&255)<<8|l[W+3]&255;break;case 1:Ra=(l[W+1]&255)<<24|(l[W+2]&255)<<16|(l[W+3]&255)<<8|l[W]&
255;break;case 2:Ra=(l[W+2]&255)<<24|(l[W+1]&255)<<16|(l[W]&255)<<8|l[W+3]&255}Ae&&(Ra&255)!=0&&(Ra&255)!=255&&(X.unmult=255/(Ra&255),Ra=(X.__clamp[Math.round((Ra>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((Ra>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((Ra>>>8&255)*X.unmult)]&255)<<8|Ra&255);Qb=b.byteOffset+b.stride*(Lb+ta)+(Qb+ha)*4;W=v;wd=F;wd==null&&(wd=!1);W==null&&(W=0);switch(W){case 0:vb=(l[Qb]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb+2]&255)<<8|l[Qb+3]&255;break;case 1:vb=(l[Qb+
1]&255)<<24|(l[Qb+2]&255)<<16|(l[Qb+3]&255)<<8|l[Qb]&255;break;case 2:vb=(l[Qb+2]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb]&255)<<8|l[Qb+3]&255}wd&&(vb&255)!=0&&(vb&255)!=255&&(X.unmult=255/(vb&255),vb=(X.__clamp[Math.round((vb>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((vb>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((vb>>>8&255)*X.unmult)]&255)<<8|vb&255);W=Ub.bilinear(eb,db,Ra,vb,za*b.width-ha,bb*b.height-ta)}else{Qb=b.byteOffset+b.stride*(Lb+ta)+(Qb+ha)*4;za=v;ha=F;ha==null&&(ha=!1);za==
null&&(za=0);switch(za){case 0:W=(l[Qb]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb+2]&255)<<8|l[Qb+3]&255;break;case 1:W=(l[Qb+1]&255)<<24|(l[Qb+2]&255)<<16|(l[Qb+3]&255)<<8|l[Qb]&255;break;case 2:W=(l[Qb+2]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb]&255)<<8|l[Qb+3]&255}ha&&(W&255)!=0&&(W&255)!=255&&(X.unmult=255/(W&255),W=(X.__clamp[Math.round((W>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((W>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((W>>>8&255)*X.unmult)]&255)<<8|W&255)}Qb=u;za=r;za==null&&(za=!1);
Qb==null&&(Qb=0);za&&((W&255)==0?W!=0&&(W=0):(W&255)!=255&&(X.a16=X.__alpha16[W&255],W=((W>>>24&255)*X.a16>>16&255)<<24|((W>>>16&255)*X.a16>>16&255)<<16|((W>>>8&255)*X.a16>>16&255)<<8|W&255));switch(Qb){case 0:n[Q]=W>>>24&255;n[Q+1]=W>>>16&255;n[Q+2]=W>>>8&255;n[Q+3]=W&255;break;case 1:n[Q]=W&255;n[Q+1]=W>>>24&255;n[Q+2]=W>>>16&255;n[Q+3]=W>>>8&255;break;case 2:n[Q]=W>>>8&255,n[Q+1]=W>>>16&255,n[Q+2]=W>>>24&255,n[Q+3]=W&255}}}a.dirty=!0;a.version++};Ub.bilinear=function(a,b,c,d,f,g){return Ub.lerpRGBA(Ub.lerpRGBA(d,
b,f),Ub.lerpRGBA(a,c,f),g)};Ub.lerpRGBA=function(a,b,c){var d=0,f=Math.floor(Ub.lerp(a>>>24&255,b>>>24&255,c));d=(f&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255;f=Math.floor(Ub.lerp(a>>>16&255,b>>>16&255,c));d=(d>>>24&255)<<24|(f&255)<<16|(d>>>8&255)<<8|d&255;f=Math.floor(Ub.lerp(a>>>8&255,b>>>8&255,c));d=(d>>>24&255)<<24|(d>>>16&255)<<16|(f&255)<<8|d&255;f=Math.floor(Ub.lerp(a&255,b&255,c));return(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|f&255};Ub.lerp4f=function(a,b,c){return new ge(Ub.lerp(a.x,
b.x,c),Ub.lerp(a.y,b.y,c),Ub.lerp(a.z,b.z,c),Ub.lerp(a.w,b.w,c))};Ub.lerp=function(a,b,c){return(1-c)*a+c*b};Ub.colorTransform=function(a,b,c){var d=a.buffer.data;if(d!=null){var f=a.buffer.format,g=a.buffer.premultiplied;b=new ih(a,b);var h=xf.getAlphaTable(c),n=xf.getRedTable(c),l=xf.getGreenTable(c);c=xf.getBlueTable(c);for(var q,u,v=0,z=0,r=b.height;z<r;){q=z++;q=b.byteOffset+b.stride*q;for(var F=0,J=b.width;F<J;){u=F++;u=q+u*4;var L=f,Q=g;Q==null&&(Q=!1);L==null&&(L=0);switch(L){case 0:v=(d[u]&
255)<<24|(d[u+1]&255)<<16|(d[u+2]&255)<<8|d[u+3]&255;break;case 1:v=(d[u+1]&255)<<24|(d[u+2]&255)<<16|(d[u+3]&255)<<8|d[u]&255;break;case 2:v=(d[u+2]&255)<<24|(d[u+1]&255)<<16|(d[u]&255)<<8|d[u+3]&255}Q&&(v&255)!=0&&(v&255)!=255&&(X.unmult=255/(v&255),v=(X.__clamp[Math.round((v>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((v>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((v>>>8&255)*X.unmult)]&255)<<8|v&255);v=(n[v>>>24&255]&255)<<24|(l[v>>>16&255]&255)<<16|(c[v>>>8&255]&255)<<8|h[v&255]&
255;L=f;Q=g;Q==null&&(Q=!1);L==null&&(L=0);Q&&((v&255)==0?v!=0&&(v=0):(v&255)!=255&&(X.a16=X.__alpha16[v&255],v=((v>>>24&255)*X.a16>>16&255)<<24|((v>>>16&255)*X.a16>>16&255)<<16|((v>>>8&255)*X.a16>>16&255)<<8|v&255));switch(L){case 0:d[u]=v>>>24&255;d[u+1]=v>>>16&255;d[u+2]=v>>>8&255;d[u+3]=v&255;break;case 1:d[u]=v&255;d[u+1]=v>>>24&255;d[u+2]=v>>>16&255;d[u+3]=v>>>8&255;break;case 2:d[u]=v>>>8&255,d[u+1]=v>>>16&255,d[u+2]=v>>>24&255,d[u+3]=v&255}}}a.dirty=!0;a.version++}};Ub.copyChannel=function(a,
b,c,d,f,g){switch(g._hx_index){case 0:var h=0;break;case 1:h=1;break;case 2:h=2;break;case 3:h=3}switch(f._hx_index){case 0:var n=0;break;case 1:n=1;break;case 2:n=2;break;case 3:n=3}f=b.buffer.data;g=a.buffer.data;if(f!=null&&g!=null){c=new ih(b,c);d=new ih(a,new of(d.x,d.y,c.width,c.height));var l=b.buffer.format,q=a.buffer.format;b=b.buffer.premultiplied;for(var u=a.buffer.premultiplied,v,z,r=0,F=0,J=0,L=0,Q=d.height;L<Q;){z=L++;v=c.byteOffset+c.stride*z;z=d.byteOffset+d.stride*z;for(var W=0,ka=
d.width;W<ka;){W++;var ha=l,ta=b;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:r=(f[v]&255)<<24|(f[v+1]&255)<<16|(f[v+2]&255)<<8|f[v+3]&255;break;case 1:r=(f[v+1]&255)<<24|(f[v+2]&255)<<16|(f[v+3]&255)<<8|f[v]&255;break;case 2:r=(f[v+2]&255)<<24|(f[v+1]&255)<<16|(f[v]&255)<<8|f[v+3]&255}ta&&(r&255)!=0&&(r&255)!=255&&(X.unmult=255/(r&255),r=(X.__clamp[Math.round((r>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((r>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((r>>>8&255)*X.unmult)]&
255)<<8|r&255);ha=q;ta=u;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:F=(g[z]&255)<<24|(g[z+1]&255)<<16|(g[z+2]&255)<<8|g[z+3]&255;break;case 1:F=(g[z+1]&255)<<24|(g[z+2]&255)<<16|(g[z+3]&255)<<8|g[z]&255;break;case 2:F=(g[z+2]&255)<<24|(g[z+1]&255)<<16|(g[z]&255)<<8|g[z+3]&255}ta&&(F&255)!=0&&(F&255)!=255&&(X.unmult=255/(F&255),F=(X.__clamp[Math.round((F>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((F>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((F>>>8&255)*X.unmult)]&255)<<
8|F&255);switch(n){case 0:J=r>>>24&255;break;case 1:J=r>>>16&255;break;case 2:J=r>>>8&255;break;case 3:J=r&255}switch(h){case 0:F=(J&255)<<24|(F>>>16&255)<<16|(F>>>8&255)<<8|F&255;break;case 1:F=(F>>>24&255)<<24|(J&255)<<16|(F>>>8&255)<<8|F&255;break;case 2:F=(F>>>24&255)<<24|(F>>>16&255)<<16|(J&255)<<8|F&255;break;case 3:F=(F>>>24&255)<<24|(F>>>16&255)<<16|(F>>>8&255)<<8|J&255}ha=q;ta=u;ta==null&&(ta=!1);ha==null&&(ha=0);ta&&((F&255)==0?F!=0&&(F=0):(F&255)!=255&&(X.a16=X.__alpha16[F&255],F=((F>>>
24&255)*X.a16>>16&255)<<24|((F>>>16&255)*X.a16>>16&255)<<16|((F>>>8&255)*X.a16>>16&255)<<8|F&255));switch(ha){case 0:g[z]=F>>>24&255;g[z+1]=F>>>16&255;g[z+2]=F>>>8&255;g[z+3]=F&255;break;case 1:g[z]=F&255;g[z+1]=F>>>24&255;g[z+2]=F>>>16&255;g[z+3]=F>>>8&255;break;case 2:g[z]=F>>>8&255,g[z+1]=F>>>16&255,g[z+2]=F>>>24&255,g[z+3]=F&255}v+=4;z+=4}}a.dirty=!0;a.version++}};Ub.copyPixels=function(a,b,c,d,f,g,h){h==null&&(h=!1);if(a.width==b.width&&a.height==b.height&&c.width==b.width&&c.height==b.height&&
c.x==0&&c.y==0&&d.x==0&&d.y==0&&f==null&&g==null&&h==0&&a.get_format()==b.get_format())a.buffer.data.set(b.buffer.data);else{var n=b.buffer.data,l=a.buffer.data;if(n==null||l==null)return;c=new ih(b,c);var q=new of(d.x,d.y,c.width,c.height);q=new ih(a,q);var u=b.buffer.format,v=a.buffer.format,z=0,r=0,F=b.buffer.premultiplied,J=a.buffer.premultiplied,L=b.buffer.bitsPerPixel/8|0,Q=a.buffer.bitsPerPixel/8|0,W=f!=null&&f.get_transparent(),ka=h||W&&!a.get_transparent()||!h&&!a.get_transparent()&&b.get_transparent();
if(W)if(Q=f.buffer.data,b=f.buffer.format,h=0,f=new ih(f,new of(c.x+(g==null?0:g.x),c.y+(g==null?0:g.y),c.width,c.height)),q.clip(d.x|0,d.y|0,f.width,f.height),ka)for(ka=0,L=q.height;ka<L;)for(W=ka++,d=c.byteOffset+c.stride*W,g=q.byteOffset+q.stride*W,W=f.byteOffset+f.stride*W,db=0,Ra=q.width;db<Ra;){db++;var ha=u;var ta=F;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:z=(n[d]&255)<<24|(n[d+1]&255)<<16|(n[d+2]&255)<<8|n[d+3]&255;break;case 1:z=(n[d+1]&255)<<24|(n[d+2]&255)<<16|(n[d+3]&255)<<
8|n[d]&255;break;case 2:z=(n[d+2]&255)<<24|(n[d+1]&255)<<16|(n[d]&255)<<8|n[d+3]&255}ta&&(z&255)!=0&&(z&255)!=255&&(X.unmult=255/(z&255),z=(X.__clamp[Math.round((z>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((z>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((z>>>8&255)*X.unmult)]&255)<<8|z&255);ha=v;ta=J;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:r=(l[g]&255)<<24|(l[g+1]&255)<<16|(l[g+2]&255)<<8|l[g+3]&255;break;case 1:r=(l[g+1]&255)<<24|(l[g+2]&255)<<16|(l[g+3]&255)<<8|l[g]&
255;break;case 2:r=(l[g+2]&255)<<24|(l[g+1]&255)<<16|(l[g]&255)<<8|l[g+3]&255}ta&&(r&255)!=0&&(r&255)!=255&&(X.unmult=255/(r&255),r=(X.__clamp[Math.round((r>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((r>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((r>>>8&255)*X.unmult)]&255)<<8|r&255);ha=b;ta=!1;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:h=(Q[W]&255)<<24|(Q[W+1]&255)<<16|(Q[W+2]&255)<<8|Q[W+3]&255;break;case 1:h=(Q[W+1]&255)<<24|(Q[W+2]&255)<<16|(Q[W+3]&255)<<8|Q[W]&255;
break;case 2:h=(Q[W+2]&255)<<24|(Q[W+1]&255)<<16|(Q[W]&255)<<8|Q[W+3]&255}ta&&(h&255)!=0&&(h&255)!=255&&(X.unmult=255/(h&255),h=(X.__clamp[Math.round((h>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((h>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((h>>>8&255)*X.unmult)]&255)<<8|h&255);ta=(h&255)/255*((z&255)/255);if(ta>0){var za=(r&255)/255;var eb=1-ta;ha=ta+za*eb;vb=X.__clamp[Math.round(((z>>>24&255)*ta+(r>>>24&255)*za*eb)/ha)];r=(vb&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|r&255;vb=
X.__clamp[Math.round(((z>>>16&255)*ta+(r>>>16&255)*za*eb)/ha)];r=(r>>>24&255)<<24|(vb&255)<<16|(r>>>8&255)<<8|r&255;ta=X.__clamp[Math.round(((z>>>8&255)*ta+(r>>>8&255)*za*eb)/ha)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(ta&255)<<8|r&255;ha=X.__clamp[Math.round(ha*255)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|ha&255;ha=v;ta=J;ta==null&&(ta=!1);ha==null&&(ha=0);ta&&((r&255)==0?r!=0&&(r=0):(r&255)!=255&&(X.a16=X.__alpha16[r&255],r=((r>>>24&255)*X.a16>>16&255)<<24|((r>>>16&255)*X.a16>>16&255)<<
16|((r>>>8&255)*X.a16>>16&255)<<8|r&255));switch(ha){case 0:l[g]=r>>>24&255;l[g+1]=r>>>16&255;l[g+2]=r>>>8&255;l[g+3]=r&255;break;case 1:l[g]=r&255;l[g+1]=r>>>24&255;l[g+2]=r>>>16&255;l[g+3]=r>>>8&255;break;case 2:l[g]=r>>>8&255,l[g+1]=r>>>16&255,l[g+2]=r>>>24&255,l[g+3]=r&255}}d+=4;g+=4;W+=4}else for(ka=0,L=q.height;ka<L;)for(W=ka++,d=c.byteOffset+c.stride*W,g=q.byteOffset+q.stride*W,W=f.byteOffset+f.stride*W,db=0,Ra=q.width;db<Ra;){db++;ha=u;ta=F;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:z=
(n[d]&255)<<24|(n[d+1]&255)<<16|(n[d+2]&255)<<8|n[d+3]&255;break;case 1:z=(n[d+1]&255)<<24|(n[d+2]&255)<<16|(n[d+3]&255)<<8|n[d]&255;break;case 2:z=(n[d+2]&255)<<24|(n[d+1]&255)<<16|(n[d]&255)<<8|n[d+3]&255}ta&&(z&255)!=0&&(z&255)!=255&&(X.unmult=255/(z&255),z=(X.__clamp[Math.round((z>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((z>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((z>>>8&255)*X.unmult)]&255)<<8|z&255);ha=b;ta=!1;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:h=(Q[W]&
255)<<24|(Q[W+1]&255)<<16|(Q[W+2]&255)<<8|Q[W+3]&255;break;case 1:h=(Q[W+1]&255)<<24|(Q[W+2]&255)<<16|(Q[W+3]&255)<<8|Q[W]&255;break;case 2:h=(Q[W+2]&255)<<24|(Q[W+1]&255)<<16|(Q[W]&255)<<8|Q[W+3]&255}ta&&(h&255)!=0&&(h&255)!=255&&(X.unmult=255/(h&255),h=(X.__clamp[Math.round((h>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((h>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((h>>>8&255)*X.unmult)]&255)<<8|h&255);vb=Math.round((h&255)/255*(z&255));z=(z>>>24&255)<<24|(z>>>16&255)<<16|(z>>>
8&255)<<8|vb&255;ha=v;ta=J;ta==null&&(ta=!1);ha==null&&(ha=0);ta&&((z&255)==0?z!=0&&(z=0):(z&255)!=255&&(X.a16=X.__alpha16[z&255],z=((z>>>24&255)*X.a16>>16&255)<<24|((z>>>16&255)*X.a16>>16&255)<<16|((z>>>8&255)*X.a16>>16&255)<<8|z&255));switch(ha){case 0:l[g]=z>>>24&255;l[g+1]=z>>>16&255;l[g+2]=z>>>8&255;l[g+3]=z&255;break;case 1:l[g]=z&255;l[g+1]=z>>>24&255;l[g+2]=z>>>16&255;l[g+3]=z>>>8&255;break;case 2:l[g]=z>>>8&255,l[g+1]=z>>>16&255,l[g+2]=z>>>24&255,l[g+3]=z&255}d+=4;g+=4;W+=4}else if(ka)for(ka=
0,L=q.height;ka<L;){W=ka++;d=c.byteOffset+c.stride*W;g=q.byteOffset+q.stride*W;for(var db=0,Ra=q.width;db<Ra;){db++;ha=u;ta=F;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:z=(n[d]&255)<<24|(n[d+1]&255)<<16|(n[d+2]&255)<<8|n[d+3]&255;break;case 1:z=(n[d+1]&255)<<24|(n[d+2]&255)<<16|(n[d+3]&255)<<8|n[d]&255;break;case 2:z=(n[d+2]&255)<<24|(n[d+1]&255)<<16|(n[d]&255)<<8|n[d+3]&255}ta&&(z&255)!=0&&(z&255)!=255&&(X.unmult=255/(z&255),z=(X.__clamp[Math.round((z>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((z>>>
16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((z>>>8&255)*X.unmult)]&255)<<8|z&255);ha=v;ta=J;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:r=(l[g]&255)<<24|(l[g+1]&255)<<16|(l[g+2]&255)<<8|l[g+3]&255;break;case 1:r=(l[g+1]&255)<<24|(l[g+2]&255)<<16|(l[g+3]&255)<<8|l[g]&255;break;case 2:r=(l[g+2]&255)<<24|(l[g+1]&255)<<16|(l[g]&255)<<8|l[g+3]&255}ta&&(r&255)!=0&&(r&255)!=255&&(X.unmult=255/(r&255),r=(X.__clamp[Math.round((r>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((r>>>16&255)*
X.unmult)]&255)<<16|(X.__clamp[Math.round((r>>>8&255)*X.unmult)]&255)<<8|r&255);ta=(z&255)/255;za=(r&255)/255;eb=1-ta;ha=ta+za*eb;if(ha==0)r=0;else{var vb=X.__clamp[Math.round(((z>>>24&255)*ta+(r>>>24&255)*za*eb)/ha)];r=(vb&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|r&255;vb=X.__clamp[Math.round(((z>>>16&255)*ta+(r>>>16&255)*za*eb)/ha)];r=(r>>>24&255)<<24|(vb&255)<<16|(r>>>8&255)<<8|r&255;ta=X.__clamp[Math.round(((z>>>8&255)*ta+(r>>>8&255)*za*eb)/ha)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(ta&255)<<8|
r&255;ha=X.__clamp[Math.round(ha*255)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|ha&255}ha=v;ta=J;ta==null&&(ta=!1);ha==null&&(ha=0);ta&&((r&255)==0?r!=0&&(r=0):(r&255)!=255&&(X.a16=X.__alpha16[r&255],r=((r>>>24&255)*X.a16>>16&255)<<24|((r>>>16&255)*X.a16>>16&255)<<16|((r>>>8&255)*X.a16>>16&255)<<8|r&255));switch(ha){case 0:l[g]=r>>>24&255;l[g+1]=r>>>16&255;l[g+2]=r>>>8&255;l[g+3]=r&255;break;case 1:l[g]=r&255;l[g+1]=r>>>24&255;l[g+2]=r>>>16&255;l[g+3]=r>>>8&255;break;case 2:l[g]=r>>>8&255,
l[g+1]=r>>>16&255,l[g+2]=r>>>24&255,l[g+3]=r&255}d+=4;g+=4}}else if(u==v&&F==J&&L==Q)for(ka=0,L=q.height;ka<L;)W=ka++,d=c.byteOffset+c.stride*W,g=q.byteOffset+q.stride*W,l.set(n.subarray(d,d+q.width*Q),g);else for(ka=0,L=q.height;ka<L;)for(W=ka++,d=c.byteOffset+c.stride*W,g=q.byteOffset+q.stride*W,db=0,Ra=q.width;db<Ra;){db++;ha=u;ta=F;ta==null&&(ta=!1);ha==null&&(ha=0);switch(ha){case 0:z=(n[d]&255)<<24|(n[d+1]&255)<<16|(n[d+2]&255)<<8|n[d+3]&255;break;case 1:z=(n[d+1]&255)<<24|(n[d+2]&255)<<16|
(n[d+3]&255)<<8|n[d]&255;break;case 2:z=(n[d+2]&255)<<24|(n[d+1]&255)<<16|(n[d]&255)<<8|n[d+3]&255}ta&&(z&255)!=0&&(z&255)!=255&&(X.unmult=255/(z&255),z=(X.__clamp[Math.round((z>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((z>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((z>>>8&255)*X.unmult)]&255)<<8|z&255);ha=v;ta=J;ta==null&&(ta=!1);ha==null&&(ha=0);ta&&((z&255)==0?z!=0&&(z=0):(z&255)!=255&&(X.a16=X.__alpha16[z&255],z=((z>>>24&255)*X.a16>>16&255)<<24|((z>>>16&255)*X.a16>>16&255)<<
16|((z>>>8&255)*X.a16>>16&255)<<8|z&255));switch(ha){case 0:l[g]=z>>>24&255;l[g+1]=z>>>16&255;l[g+2]=z>>>8&255;l[g+3]=z&255;break;case 1:l[g]=z&255;l[g+1]=z>>>24&255;l[g+2]=z>>>16&255;l[g+3]=z>>>8&255;break;case 2:l[g]=z>>>8&255,l[g+1]=z>>>16&255,l[g+2]=z>>>24&255,l[g+3]=z&255}d+=4;g+=4}}a.dirty=!0;a.version++};Ub.fillRect=function(a,b,c,d){switch(d){case 1:c=(c>>>16&255)<<24|(c>>>8&255)<<16|(c&255)<<8|c>>>24&255;break;case 2:c=(c>>>8&255)<<24|(c>>>16&255)<<16|(c>>>24&255)<<8|c&255;break}a.get_transparent()||
(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255);var f=a.buffer.data;if(f!=null){d=a.buffer.format;var g=a.buffer.premultiplied;g&&((c&255)==0?c!=0&&(c=0):(c&255)!=255&&(X.a16=X.__alpha16[c&255],c=((c>>>24&255)*X.a16>>16&255)<<24|((c>>>16&255)*X.a16>>16&255)<<16|((c>>>8&255)*X.a16>>16&255)<<8|c&255));b=new ih(a,b);for(var h,n=0,l=b.height;n<l;){g=n++;h=b.byteOffset+b.stride*g;for(var q=0,u=b.width;q<u;){g=q++;var v=h+g*4,z=d;g=!1;g==null&&(g=!1);z==null&&(z=0);g&&((c&255)==0?c!=0&&(c=0):(c&
255)!=255&&(X.a16=X.__alpha16[c&255],c=((c>>>24&255)*X.a16>>16&255)<<24|((c>>>16&255)*X.a16>>16&255)<<16|((c>>>8&255)*X.a16>>16&255)<<8|c&255));switch(z){case 0:f[v]=c>>>24&255;f[v+1]=c>>>16&255;f[v+2]=c>>>8&255;f[v+3]=c&255;break;case 1:f[v]=c&255;f[v+1]=c>>>24&255;f[v+2]=c>>>16&255;f[v+3]=c>>>8&255;break;case 2:f[v]=c>>>8&255,f[v+1]=c>>>16&255,f[v+2]=c>>>24&255,f[v+3]=c&255}}}a.dirty=!0;a.version++}};Ub.floodFill=function(a,b,c,d,f){var g=a.buffer.data;if(g!=null){f==1&&(d=(d&16777215)<<8|d>>24&
255);f=a.buffer.format;var h=a.buffer.premultiplied,n=0,l=a.buffer.width*4*(c+a.offsetY)+(b+a.offsetX)*4,q=f,u=h;u==null&&(u=!1);q==null&&(q=0);switch(q){case 0:n=(g[l]&255)<<24|(g[l+1]&255)<<16|(g[l+2]&255)<<8|g[l+3]&255;break;case 1:n=(g[l+1]&255)<<24|(g[l+2]&255)<<16|(g[l+3]&255)<<8|g[l]&255;break;case 2:n=(g[l+2]&255)<<24|(g[l+1]&255)<<16|(g[l]&255)<<8|g[l+3]&255}u&&(n&255)!=0&&(n&255)!=255&&(X.unmult=255/(n&255),n=(X.__clamp[Math.round((n>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((n>>>
16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((n>>>8&255)*X.unmult)]&255)<<8|n&255);a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,n=(n>>>24&255)<<24|(n>>>16&255)<<16|(n>>>8&255)<<8|255);if(d!=n){h&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(X.a16=X.__alpha16[d&255],d=((d>>>24&255)*X.a16>>16&255)<<24|((d>>>16&255)*X.a16>>16&255)<<16|((d>>>8&255)*X.a16>>16&255)<<8|d&255));l=[0,-1,1,0];var v=[-1,0,0,1],z=-a.offsetX,r=-a.offsetY,F=z+a.width,J=r+a.height,L=[];L.push(b);L.push(c);
for(var Q,W,ka,ha=0;L.length>0;){c=L.pop();b=L.pop();for(var ta=0;ta<4;)if(q=ta++,Q=b+l[q],W=c+v[q],!(Q<z||W<r||Q>=F||W>=J)){ka=(W*a.width+Q)*4;q=f;u=h;u==null&&(u=!1);q==null&&(q=0);switch(q){case 0:ha=(g[ka]&255)<<24|(g[ka+1]&255)<<16|(g[ka+2]&255)<<8|g[ka+3]&255;break;case 1:ha=(g[ka+1]&255)<<24|(g[ka+2]&255)<<16|(g[ka+3]&255)<<8|g[ka]&255;break;case 2:ha=(g[ka+2]&255)<<24|(g[ka+1]&255)<<16|(g[ka]&255)<<8|g[ka+3]&255}u&&(ha&255)!=0&&(ha&255)!=255&&(X.unmult=255/(ha&255),ha=(X.__clamp[Math.round((ha>>>
24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((ha>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((ha>>>8&255)*X.unmult)]&255)<<8|ha&255);if(ha==n){q=f;u=!1;u==null&&(u=!1);q==null&&(q=0);u&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(X.a16=X.__alpha16[d&255],d=((d>>>24&255)*X.a16>>16&255)<<24|((d>>>16&255)*X.a16>>16&255)<<16|((d>>>8&255)*X.a16>>16&255)<<8|d&255));switch(q){case 0:g[ka]=d>>>24&255;g[ka+1]=d>>>16&255;g[ka+2]=d>>>8&255;g[ka+3]=d&255;break;case 1:g[ka]=d&255;g[ka+1]=d>>>24&255;g[ka+
2]=d>>>16&255;g[ka+3]=d>>>8&255;break;case 2:g[ka]=d>>>8&255,g[ka+1]=d>>>16&255,g[ka+2]=d>>>24&255,g[ka+3]=d&255}L.push(Q);L.push(W)}}}a.dirty=!0;a.version++}}};Ub.gaussianBlur=function(a,b,c,d,f,g,h,n,l){h==null&&(h=1);g==null&&(g=4);f==null&&(f=4);(n=a.get_premultiplied())&&a.set_premultiplied(!1);$h.blur(a,b,c,d,f,g,h);a.dirty=!0;a.version++;n&&a.set_premultiplied(!0);return a};Ub.getColorBoundsRect=function(a,b,c,d,f){var g=a.width+1,h=0,n=a.height+1,l=0;switch(f){case 1:f=c;c=(f>>>16&255)<<24|
(f>>>8&255)<<16|(f&255)<<8|f>>>24&255;f=b;b=(f>>>16&255)<<24|(f>>>8&255)<<16|(f&255)<<8|f>>>24&255;break;case 2:f=c;c=(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;f=b;b=(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;break}a.get_transparent()||(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255,b=(b>>>24&255)<<24|(b>>>16&255)<<16|(b>>>8&255)<<8|255);f=0;for(var q=a.width;f<q;){var u=f++;var v=!1;for(var z=0,r=a.height;z<r;){var F=z++;v=a.getPixel32(u,F,0);if(v=d?(v&b)==c:(v&b)!=
c){u<g&&(g=u);break}}if(v)break}f=0;for(q=a.width;f<q;){u=f++;u=a.width-1-u;v=!1;z=0;for(r=a.height;z<r;)if(F=z++,v=a.getPixel32(u,F,0),v=d?(v&b)==c:(v&b)!=c){u>h&&(h=u);break}if(v)break}f=0;for(q=a.height;f<q;){F=f++;v=!1;z=0;for(r=a.width;z<r;)if(u=z++,v=a.getPixel32(u,F,0),v=d?(v&b)==c:(v&b)!=c){F<n&&(n=F);break}if(v)break}f=0;for(q=a.height;f<q;){F=f++;F=a.height-1-F;v=!1;z=0;for(r=a.width;z<r;)if(u=z++,v=a.getPixel32(u,F,0),v=d?(v&b)==c:(v&b)!=c){F>l&&(l=F);break}if(v)break}d=h-g;c=l-n;d>0&&
++d;c>0&&++c;d<0&&(d=0);c<0&&(c=0);g==h&&(d=1);n==l&&(c=1);g>a.width&&(g=0);n>a.height&&(n=0);return new of(g,n,d,c)};Ub.getPixel=function(a,b,c,d){var f=0,g=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;c=a.buffer.format;a=a.buffer.premultiplied;a==null&&(a=!1);c==null&&(c=0);switch(c){case 0:f=(g[b]&255)<<24|(g[b+1]&255)<<16|(g[b+2]&255)<<8|g[b+3]&255;break;case 1:f=(g[b+1]&255)<<24|(g[b+2]&255)<<16|(g[b+3]&255)<<8|g[b]&255;break;case 2:f=(g[b+2]&255)<<24|(g[b+1]&255)<<16|(g[b]&
255)<<8|g[b+3]&255}a&&(f&255)!=0&&(f&255)!=255&&(X.unmult=255/(f&255),f=(X.__clamp[Math.round((f>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((f>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((f>>>8&255)*X.unmult)]&255)<<8|f&255);f=(f>>>24&255)<<24|(f>>>16&255)<<16|(f>>>8&255)<<8|0;switch(d){case 1:return(f&255)<<24|(f>>>24&255)<<16|(f>>>16&255)<<8|f>>>8&255;case 2:return(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;default:return f}};Ub.getPixel32=function(a,b,c,d){var f=0,g=
a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;c=a.buffer.format;a=a.buffer.premultiplied;a==null&&(a=!1);c==null&&(c=0);switch(c){case 0:f=(g[b]&255)<<24|(g[b+1]&255)<<16|(g[b+2]&255)<<8|g[b+3]&255;break;case 1:f=(g[b+1]&255)<<24|(g[b+2]&255)<<16|(g[b+3]&255)<<8|g[b]&255;break;case 2:f=(g[b+2]&255)<<24|(g[b+1]&255)<<16|(g[b]&255)<<8|g[b+3]&255}a&&(f&255)!=0&&(f&255)!=255&&(X.unmult=255/(f&255),f=(X.__clamp[Math.round((f>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((f>>>16&
255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((f>>>8&255)*X.unmult)]&255)<<8|f&255);switch(d){case 1:return(f&255)<<24|(f>>>24&255)<<16|(f>>>16&255)<<8|f>>>8&255;case 2:return(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;default:return f}};Ub.getPixels=function(a,b,c){if(a.buffer.data==null)return null;var d=new Oa(new ArrayBuffer((b.width*b.height|0)*4)),f=a.buffer.data,g=a.buffer.format,h=a.buffer.premultiplied;a=new ih(a,b);for(var n,l,q=b=l=0,u=a.height;q<u;){n=q++;n=a.byteOffset+a.stride*
n;for(var v=0,z=a.width;v<z;){v++;var r=g,F=h;F==null&&(F=!1);r==null&&(r=0);switch(r){case 0:l=(f[n]&255)<<24|(f[n+1]&255)<<16|(f[n+2]&255)<<8|f[n+3]&255;break;case 1:l=(f[n+1]&255)<<24|(f[n+2]&255)<<16|(f[n+3]&255)<<8|f[n]&255;break;case 2:l=(f[n+2]&255)<<24|(f[n+1]&255)<<16|(f[n]&255)<<8|f[n+3]&255}F&&(l&255)!=0&&(l&255)!=255&&(X.unmult=255/(l&255),l=(X.__clamp[Math.round((l>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((l>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((l>>>8&255)*X.unmult)]&
255)<<8|l&255);switch(c){case 1:l=(l&255)<<24|(l>>>24&255)<<16|(l>>>16&255)<<8|l>>>8&255;break;case 2:l=(l>>>8&255)<<24|(l>>>16&255)<<16|(l>>>24&255)<<8|l&255}d.b[b++]=l>>>24&255;d.b[b++]=l>>>16&255;d.b[b++]=l>>>8&255;d.b[b++]=l&255;n+=4}}return d};Ub.merge=function(a,b,c,d,f,g,h,n){if(a.buffer.data!=null&&b.buffer.data!=null){c=new ih(b,c);d=new ih(a,new of(d.x,d.y,c.width,c.height));var l=b.buffer.data,q=a.buffer.data,u=b.buffer.format,v=a.buffer.format;b=b.buffer.premultiplied;for(var z=a.buffer.premultiplied,
r,F,J=0,L=0,Q=0,W=d.height;Q<W;){F=Q++;r=c.byteOffset+c.stride*F;F=d.byteOffset+d.stride*F;for(var ka=0,ha=d.width;ka<ha;){ka++;var ta=u,za=b;za==null&&(za=!1);ta==null&&(ta=0);switch(ta){case 0:J=(l[r]&255)<<24|(l[r+1]&255)<<16|(l[r+2]&255)<<8|l[r+3]&255;break;case 1:J=(l[r+1]&255)<<24|(l[r+2]&255)<<16|(l[r+3]&255)<<8|l[r]&255;break;case 2:J=(l[r+2]&255)<<24|(l[r+1]&255)<<16|(l[r]&255)<<8|l[r+3]&255}za&&(J&255)!=0&&(J&255)!=255&&(X.unmult=255/(J&255),J=(X.__clamp[Math.round((J>>>24&255)*X.unmult)]&
255)<<24|(X.__clamp[Math.round((J>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((J>>>8&255)*X.unmult)]&255)<<8|J&255);ta=v;za=z;za==null&&(za=!1);ta==null&&(ta=0);switch(ta){case 0:L=(q[F]&255)<<24|(q[F+1]&255)<<16|(q[F+2]&255)<<8|q[F+3]&255;break;case 1:L=(q[F+1]&255)<<24|(q[F+2]&255)<<16|(q[F+3]&255)<<8|q[F]&255;break;case 2:L=(q[F+2]&255)<<24|(q[F+1]&255)<<16|(q[F]&255)<<8|q[F+3]&255}za&&(L&255)!=0&&(L&255)!=255&&(X.unmult=255/(L&255),L=(X.__clamp[Math.round((L>>>24&255)*X.unmult)]&255)<<
24|(X.__clamp[Math.round((L>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((L>>>8&255)*X.unmult)]&255)<<8|L&255);L=((((J>>>24&255)*f+(L>>>24&255)*(256-f))/256|0)&255)<<24|(L>>>16&255)<<16|(L>>>8&255)<<8|L&255;L=(L>>>24&255)<<24|((((J>>>16&255)*g+(L>>>16&255)*(256-g))/256|0)&255)<<16|(L>>>8&255)<<8|L&255;L=(L>>>24&255)<<24|(L>>>16&255)<<16|((((J>>>8&255)*h+(L>>>8&255)*(256-h))/256|0)&255)<<8|L&255;L=(L>>>24&255)<<24|(L>>>16&255)<<16|(L>>>8&255)<<8|(((J&255)*n+(L&255)*(256-n))/256|0)&255;ta=v;
za=z;za==null&&(za=!1);ta==null&&(ta=0);za&&((L&255)==0?L!=0&&(L=0):(L&255)!=255&&(X.a16=X.__alpha16[L&255],L=((L>>>24&255)*X.a16>>16&255)<<24|((L>>>16&255)*X.a16>>16&255)<<16|((L>>>8&255)*X.a16>>16&255)<<8|L&255));switch(ta){case 0:q[F]=L>>>24&255;q[F+1]=L>>>16&255;q[F+2]=L>>>8&255;q[F+3]=L&255;break;case 1:q[F]=L&255;q[F+1]=L>>>24&255;q[F+2]=L>>>16&255;q[F+3]=L>>>8&255;break;case 2:q[F]=L>>>8&255,q[F+1]=L>>>16&255,q[F+2]=L>>>24&255,q[F+3]=L&255}r+=4;F+=4}}a.dirty=!0;a.version++}};Ub.multiplyAlpha=
function(a){var b=a.buffer.data;if(b!=null&&a.buffer.transparent){for(var c=a.buffer.format,d=0,f=0,g=b.length/4|0;f<g;){var h=f++,n=h*4,l=c,q=!1;q==null&&(q=!1);l==null&&(l=0);switch(l){case 0:d=(b[n]&255)<<24|(b[n+1]&255)<<16|(b[n+2]&255)<<8|b[n+3]&255;break;case 1:d=(b[n+1]&255)<<24|(b[n+2]&255)<<16|(b[n+3]&255)<<8|b[n]&255;break;case 2:d=(b[n+2]&255)<<24|(b[n+1]&255)<<16|(b[n]&255)<<8|b[n+3]&255}q&&(d&255)!=0&&(d&255)!=255&&(X.unmult=255/(d&255),d=(X.__clamp[Math.round((d>>>24&255)*X.unmult)]&
255)<<24|(X.__clamp[Math.round((d>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((d>>>8&255)*X.unmult)]&255)<<8|d&255);h*=4;n=c;l=!0;l==null&&(l=!1);n==null&&(n=0);l&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(X.a16=X.__alpha16[d&255],d=((d>>>24&255)*X.a16>>16&255)<<24|((d>>>16&255)*X.a16>>16&255)<<16|((d>>>8&255)*X.a16>>16&255)<<8|d&255));switch(n){case 0:b[h]=d>>>24&255;b[h+1]=d>>>16&255;b[h+2]=d>>>8&255;b[h+3]=d&255;break;case 1:b[h]=d&255;b[h+1]=d>>>24&255;b[h+2]=d>>>16&255;b[h+3]=d>>>8&255;
break;case 2:b[h]=d>>>8&255,b[h+1]=d>>>16&255,b[h+2]=d>>>24&255,b[h+3]=d&255}}a.buffer.premultiplied=!0;a.dirty=!0;a.version++}};Ub.resize=function(a,b,c){var d=a.buffer;if(d.width!=b||d.height!=c){var f=b*c*4;f=f!=null?new Uint8Array(f):null;f=new sj(f,b,c);for(var g=a.width,h=a.height,n=a.get_data(),l=f.data,q,u,v,z,r,F,J,L,Q,W=0;W<c;)for(var ka=W++,ha=0,ta=b;ha<ta;)r=ha++,L=(r+.5)/b*g-.5,Q=(ka+.5)/c*h-.5,F=L|0,J=Q|0,q=(J*g+F)*4,u=F<g-1?q+4:q,v=J<h-1?q+g*4:q,z=u!=q?v+4:v,r=(ka*b+r)*4,F=L-F,J=Q-
J,Q=1-F,L=1-J,l[r]=(sb.toFloat(n[q])*Q+sb.toFloat(n[u])*F)*L+(sb.toFloat(n[v])*Q+sb.toFloat(n[z])*F)*J|0,l[r+1]=(sb.toFloat(n[q+1])*Q+sb.toFloat(n[u+1])*F)*L+(sb.toFloat(n[v+1])*Q+sb.toFloat(n[z+1])*F)*J|0,l[r+2]=(sb.toFloat(n[q+2])*Q+sb.toFloat(n[u+2])*F)*L+(sb.toFloat(n[v+2])*Q+sb.toFloat(n[z+2])*F)*J|0,l[r+3]=n[u+3]==0||n[v+3]==0||n[z+3]==0?0:n[q+3];d.data=f.data;d.width=b;d.height=c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=null;d.__srcContext=null;a.dirty=!0;a.version++}};Ub.resizeBuffer=
function(a,b,c){var d=a.buffer,f=a.get_data(),g=b*c*4;g=g!=null?new Uint8Array(g):null;for(var h,n,l=0,q=d.height;l<q;)for(var u=l++,v=0,z=d.width;v<z;)n=v++,h=(u*d.width+n)*4,n=(u*b+n)*4,g[n]=f[h],g[n+1]=f[h+1],g[n+2]=f[h+2],g[n+3]=f[h+3];d.data=g;d.width=b;d.height=c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=null;d.__srcContext=null;a.dirty=!0;a.version++};Ub.setFormat=function(a,b){var c=a.buffer.data;if(c!=null){var d=c.length/4|0;switch(a.get_format()){case 0:var f=0;var g=1;var h=
2;var n=3;break;case 1:f=1;g=2;h=3;n=0;break;case 2:f=2,g=1,h=0,n=3}switch(b){case 0:var l=0;var q=1;var u=2;var v=3;break;case 1:l=1;q=2;u=3;v=0;break;case 2:l=2,q=1,u=0,v=3}for(var z=0;z<d;){var r=z++*4;var F=c[r+f];var J=c[r+g];var L=c[r+h];var Q=c[r+n];c[r+l]=F;c[r+q]=J;c[r+u]=L;c[r+v]=Q}a.buffer.format=b;a.dirty=!0;a.version++}};Ub.setPixel=function(a,b,c,d,f){switch(f){case 1:d=(d>>>16&255)<<24|(d>>>8&255)<<16|(d&255)<<8|d>>>24&255;break;case 2:d=(d>>>8&255)<<24|(d>>>16&255)<<16|(d>>>24&255)<<
8|d&255;break}var g=0,h=a.buffer.data,n=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;f=a.buffer.format;var l=a.buffer.premultiplied;l==null&&(l=!1);f==null&&(f=0);switch(f){case 0:g=(h[n]&255)<<24|(h[n+1]&255)<<16|(h[n+2]&255)<<8|h[n+3]&255;break;case 1:g=(h[n+1]&255)<<24|(h[n+2]&255)<<16|(h[n+3]&255)<<8|h[n]&255;break;case 2:g=(h[n+2]&255)<<24|(h[n+1]&255)<<16|(h[n]&255)<<8|h[n+3]&255}l&&(g&255)!=0&&(g&255)!=255&&(X.unmult=255/(g&255),g=(X.__clamp[Math.round((g>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((g>>>
16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((g>>>8&255)*X.unmult)]&255)<<8|g&255);d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|g&255;h=a.buffer.data;n=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;f=a.buffer.format;l=a.buffer.premultiplied;l==null&&(l=!1);f==null&&(f=0);l&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(X.a16=X.__alpha16[d&255],d=((d>>>24&255)*X.a16>>16&255)<<24|((d>>>16&255)*X.a16>>16&255)<<16|((d>>>8&255)*X.a16>>16&255)<<8|d&255));switch(f){case 0:h[n]=d>>>24&255;h[n+1]=d>>>
16&255;h[n+2]=d>>>8&255;h[n+3]=d&255;break;case 1:h[n]=d&255;h[n+1]=d>>>24&255;h[n+2]=d>>>16&255;h[n+3]=d>>>8&255;break;case 2:h[n]=d>>>8&255,h[n+1]=d>>>16&255,h[n+2]=d>>>24&255,h[n+3]=d&255}a.dirty=!0;a.version++};Ub.setPixel32=function(a,b,c,d,f){switch(f){case 1:d=(d>>>16&255)<<24|(d>>>8&255)<<16|(d&255)<<8|d>>>24&255;break;case 2:d=(d>>>8&255)<<24|(d>>>16&255)<<16|(d>>>24&255)<<8|d&255;break}a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255);var g=a.buffer.data;b=4*
(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;f=a.buffer.format;c=a.buffer.premultiplied;c==null&&(c=!1);f==null&&(f=0);c&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(X.a16=X.__alpha16[d&255],d=((d>>>24&255)*X.a16>>16&255)<<24|((d>>>16&255)*X.a16>>16&255)<<16|((d>>>8&255)*X.a16>>16&255)<<8|d&255));switch(f){case 0:g[b]=d>>>24&255;g[b+1]=d>>>16&255;g[b+2]=d>>>8&255;g[b+3]=d&255;break;case 1:g[b]=d&255;g[b+1]=d>>>24&255;g[b+2]=d>>>16&255;g[b+3]=d>>>8&255;break;case 2:g[b]=d>>>8&255,g[b+1]=d>>>16&255,g[b+
2]=d>>>24&255,g[b+3]=d&255}a.dirty=!0;a.version++};Ub.setPixels=function(a,b,c,d,f){if(a.buffer.data!=null){var g=a.buffer.data,h=a.buffer.format,n=a.buffer.premultiplied;b=new ih(a,b);var l=a.get_transparent(),q=c.bytes;c=c.offset;f=f!=qk.BIG_ENDIAN;for(var u=0,v=b.height;u<v;){var z=u++;z=b.byteOffset+b.stride*z;for(var r=0,F=b.width;r<F;){var J=r++;var L=f?q.getInt32(c):q.b[c+3]|q.b[c+2]<<8|q.b[c+1]<<16|q.b[c]<<24;c+=4;switch(d){case 1:L=(L>>>16&255)<<24|(L>>>8&255)<<16|(L&255)<<8|L>>>24&255;break;
case 2:L=(L>>>8&255)<<24|(L>>>16&255)<<16|(L>>>24&255)<<8|L&255;break}l||(L=(L>>>24&255)<<24|(L>>>16&255)<<16|(L>>>8&255)<<8|255);J=z+J*4;var Q=h,W=n;W==null&&(W=!1);Q==null&&(Q=0);W&&((L&255)==0?L!=0&&(L=0):(L&255)!=255&&(X.a16=X.__alpha16[L&255],L=((L>>>24&255)*X.a16>>16&255)<<24|((L>>>16&255)*X.a16>>16&255)<<16|((L>>>8&255)*X.a16>>16&255)<<8|L&255));switch(Q){case 0:g[J]=L>>>24&255;g[J+1]=L>>>16&255;g[J+2]=L>>>8&255;g[J+3]=L&255;break;case 1:g[J]=L&255;g[J+1]=L>>>24&255;g[J+2]=L>>>16&255;g[J+3]=
L>>>8&255;break;case 2:g[J]=L>>>8&255,g[J+1]=L>>>16&255,g[J+2]=L>>>24&255,g[J+3]=L&255}}}a.dirty=!0;a.version++}};Ub.threshold=function(a,b,c,d,f,g,h,n,l,q){switch(q){case 1:var u=h;h=(u>>>16&255)<<24|(u>>>8&255)<<16|(u&255)<<8|u>>>24&255;u=n;n=(u>>>16&255)<<24|(u>>>8&255)<<16|(u&255)<<8|u>>>24&255;u=g;g=(u>>>16&255)<<24|(u>>>8&255)<<16|(u&255)<<8|u>>>24&255;break;case 2:u=h;h=(u>>>8&255)<<24|(u>>>16&255)<<16|(u>>>24&255)<<8|u&255;u=n;n=(u>>>8&255)<<24|(u>>>16&255)<<16|(u>>>24&255)<<8|u&255;u=g;g=
(u>>>8&255)<<24|(u>>>16&255)<<16|(u>>>24&255)<<8|u&255;break}switch(f){case "!=":f=0;break;case "<":f=2;break;case "<=":f=3;break;case "==":f=1;break;case ">":f=4;break;case ">=":f=5;break;default:f=-1}if(f==-1)return 0;u=b.buffer.data;var v=a.buffer.data;if(u==null||v==null)return 0;var z=0;c=new ih(b,c);d=new ih(a,new of(d.x,d.y,c.width,c.height));var r=b.buffer.format,F=a.buffer.format;b=b.buffer.premultiplied;for(var J=a.buffer.premultiplied,L,Q,W=0,ka=0,ha=d.height;ka<ha;){Q=ka++;L=c.byteOffset+
c.stride*Q;Q=d.byteOffset+d.stride*Q;for(var ta=0,za=d.width;ta<za;){ta++;q=r;var eb=b;eb==null&&(eb=!1);q==null&&(q=0);switch(q){case 0:W=(u[L]&255)<<24|(u[L+1]&255)<<16|(u[L+2]&255)<<8|u[L+3]&255;break;case 1:W=(u[L+1]&255)<<24|(u[L+2]&255)<<16|(u[L+3]&255)<<8|u[L]&255;break;case 2:W=(u[L+2]&255)<<24|(u[L+1]&255)<<16|(u[L]&255)<<8|u[L+3]&255}eb&&(W&255)!=0&&(W&255)!=255&&(X.unmult=255/(W&255),W=(X.__clamp[Math.round((W>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((W>>>16&255)*X.unmult)]&
255)<<16|(X.__clamp[Math.round((W>>>8&255)*X.unmult)]&255)<<8|W&255);q=W&n;eb=q>>>24&255;var db=g>>>24&255;eb!=db?q=sb.gt(eb,db)?1:-1:(eb=q>>>16&255,db=g>>>16&255,eb!=db?q=sb.gt(eb,db)?1:-1:(eb=q>>>8&255,db=g>>>8&255,eb!=db?q=sb.gt(eb,db)?1:-1:(eb=q&255,db=g&255,q=eb!=db?sb.gt(eb,db)?1:-1:0)));switch(f){case 0:q=q!=0;break;case 1:q=q==0;break;case 2:q=q==-1;break;case 3:q=q==0||q==-1;break;case 4:q=q==1;break;case 5:q=q==0||q==1;break;default:q=!1}if(q){q=F;eb=J;eb==null&&(eb=!1);q==null&&(q=0);eb&&
((h&255)==0?h!=0&&(h=0):(h&255)!=255&&(X.a16=X.__alpha16[h&255],h=((h>>>24&255)*X.a16>>16&255)<<24|((h>>>16&255)*X.a16>>16&255)<<16|((h>>>8&255)*X.a16>>16&255)<<8|h&255));switch(q){case 0:v[Q]=h>>>24&255;v[Q+1]=h>>>16&255;v[Q+2]=h>>>8&255;v[Q+3]=h&255;break;case 1:v[Q]=h&255;v[Q+1]=h>>>24&255;v[Q+2]=h>>>16&255;v[Q+3]=h>>>8&255;break;case 2:v[Q]=h>>>8&255,v[Q+1]=h>>>16&255,v[Q+2]=h>>>24&255,v[Q+3]=h&255}++z}else if(l)switch(q=F,eb=J,eb==null&&(eb=!1),q==null&&(q=0),eb&&((W&255)==0?W!=0&&(W=0):(W&255)!=
255&&(X.a16=X.__alpha16[W&255],W=((W>>>24&255)*X.a16>>16&255)<<24|((W>>>16&255)*X.a16>>16&255)<<16|((W>>>8&255)*X.a16>>16&255)<<8|W&255)),q){case 0:v[Q]=W>>>24&255;v[Q+1]=W>>>16&255;v[Q+2]=W>>>8&255;v[Q+3]=W&255;break;case 1:v[Q]=W&255;v[Q+1]=W>>>24&255;v[Q+2]=W>>>16&255;v[Q+3]=W>>>8&255;break;case 2:v[Q]=W>>>8&255,v[Q+1]=W>>>16&255,v[Q+2]=W>>>24&255,v[Q+3]=W&255}L+=4;Q+=4}}z>0&&(a.dirty=!0,a.version++);return z};Ub.unmultiplyAlpha=function(a){var b=a.buffer.data;if(b!=null){for(var c=a.buffer.format,
d=0,f=0,g=b.length/4|0;f<g;){var h=f++,n=h*4,l=c,q=!0;q==null&&(q=!1);l==null&&(l=0);switch(l){case 0:d=(b[n]&255)<<24|(b[n+1]&255)<<16|(b[n+2]&255)<<8|b[n+3]&255;break;case 1:d=(b[n+1]&255)<<24|(b[n+2]&255)<<16|(b[n+3]&255)<<8|b[n]&255;break;case 2:d=(b[n+2]&255)<<24|(b[n+1]&255)<<16|(b[n]&255)<<8|b[n+3]&255}q&&(d&255)!=0&&(d&255)!=255&&(X.unmult=255/(d&255),d=(X.__clamp[Math.round((d>>>24&255)*X.unmult)]&255)<<24|(X.__clamp[Math.round((d>>>16&255)*X.unmult)]&255)<<16|(X.__clamp[Math.round((d>>>
8&255)*X.unmult)]&255)<<8|d&255);h*=4;n=c;l=!1;l==null&&(l=!1);n==null&&(n=0);l&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(X.a16=X.__alpha16[d&255],d=((d>>>24&255)*X.a16>>16&255)<<24|((d>>>16&255)*X.a16>>16&255)<<16|((d>>>8&255)*X.a16>>16&255)<<8|d&255));switch(n){case 0:b[h]=d>>>24&255;b[h+1]=d>>>16&255;b[h+2]=d>>>8&255;b[h+3]=d&255;break;case 1:b[h]=d&255;b[h+1]=d>>>24&255;b[h+2]=d>>>16&255;b[h+3]=d>>>8&255;break;case 2:b[h]=d>>>8&255,b[h+1]=d>>>16&255,b[h+2]=d>>>24&255,b[h+3]=d&255}}a.buffer.premultiplied=
!1;a.dirty=!0;a.version++}};Ub.__boxBlur=function(a,b,c,d,f,g){b.set(a);f|=0;g|=0;Ub.__boxBlurH(b,a,c,d,f,0);Ub.__boxBlurH(b,a,c,d,f,1);Ub.__boxBlurH(b,a,c,d,f,2);Ub.__boxBlurH(b,a,c,d,f,3);f=1/(g+g+1);for(var h=c*4,n,l,q,u,v,z,r=0,F=c;r<F;){n=r++;l=n*=4;q=n+g*h;u=a[n];v=a[n+h*(d-1)];z=(g+1)*u;for(var J=0,L=g;J<L;){var Q=J++;z+=a[n+Q*h]}J=0;for(L=g+1;J<L;)J++,z+=a[q]-u,b[n]=Math.round(z*f),q+=h,n+=h;u=g+1;for(J=d-g;u<J;)u++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(u=d;q<u;)q++,z+=
v-a[l],b[n]=Math.round(z*f),l+=h,n+=h}f=1/(g+g+1);h=c*4;r=0;for(F=c;r<F;){n=r++;l=n=n*4+1;q=n+g*h;u=a[n];v=a[n+h*(d-1)];z=(g+1)*u;J=0;for(L=g;J<L;)Q=J++,z+=a[n+Q*h];J=0;for(L=g+1;J<L;)J++,z+=a[q]-u,b[n]=Math.round(z*f),q+=h,n+=h;u=g+1;for(J=d-g;u<J;)u++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(u=d;q<u;)q++,z+=v-a[l],b[n]=Math.round(z*f),l+=h,n+=h}f=1/(g+g+1);h=c*4;r=0;for(F=c;r<F;){n=r++;l=n=n*4+2;q=n+g*h;u=a[n];v=a[n+h*(d-1)];z=(g+1)*u;J=0;for(L=g;J<L;)Q=J++,z+=a[n+Q*h];J=0;for(L=
g+1;J<L;)J++,z+=a[q]-u,b[n]=Math.round(z*f),q+=h,n+=h;u=g+1;for(J=d-g;u<J;)u++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(u=d;q<u;)q++,z+=v-a[l],b[n]=Math.round(z*f),l+=h,n+=h}f=1/(g+g+1);h=c*4;r=0;for(F=c;r<F;){n=r++;l=n=n*4+3;q=n+g*h;u=a[n];v=a[n+h*(d-1)];z=(g+1)*u;J=0;for(L=g;J<L;)Q=J++,z+=a[n+Q*h];J=0;for(L=g+1;J<L;)J++,z+=a[q]-u,b[n]=Math.round(z*f),q+=h,n+=h;u=g+1;for(J=d-g;u<J;)u++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(u=d;q<u;)q++,z+=v-a[l],b[n]=Math.round(z*
f),l+=h,n+=h}};Ub.__boxBlurH=function(a,b,c,d,f,g){for(var h=1/(f+f+1),n,l,q,u,v,z,r=0;r<d;){l=n=r++*c;q=n+f;u=a[n*4+g];v=a[(n+c-1)*4+g];z=(f+1)*u;for(var F=0,J=f;F<J;){var L=F++;z+=a[(n+L)*4+g]}F=0;for(J=f+1;F<J;)F++,z+=a[q*4+g]-u,b[n*4+g]=Math.round(z*h),++q,++n;u=f+1;for(F=c-f;u<F;)u++,z+=a[q*4+g]-a[l*4+g],b[n*4+g]=Math.round(z*h),++q,++l,++n;q=c-f;for(u=c;q<u;)q++,z+=v-a[l*4+g],b[n*4+g]=Math.round(z*h),++l,++n}};Ub.__boxBlurT=function(a,b,c,d,f,g){for(var h=1/(f+f+1),n=c*4,l,q,u,v,z,r,F=0;F<c;){q=
l=F++*4+g;u=l+f*n;v=a[l];z=a[l+n*(d-1)];r=(f+1)*v;for(var J=0,L=f;J<L;){var Q=J++;r+=a[l+Q*n]}J=0;for(L=f+1;J<L;)J++,r+=a[u]-v,b[l]=Math.round(r*h),u+=n,l+=n;v=f+1;for(J=d-f;v<J;)v++,r+=a[u]-a[q],b[l]=Math.round(r*h),q+=n,u+=n,l+=n;u=d-f;for(v=d;u<v;)u++,r+=z-a[q],b[l]=Math.round(r*h),q+=n,l+=n}};Ub.__calculateSourceOffset=function(a,b,c,d){c-=b.x|0;b=d-(b.y|0);return c<0||b<0||c>=a.width||b>=a.height?-1:4*(b*(a.width|0)+c)};Ub.__getBoxesForGaussianBlur=function(a,b){var c=Math.floor(Math.sqrt(12*
a*a/b+1));c%2==0&&--c;var d=c+2;a=Math.round((12*a*a-b*c*c-4*b*c-3*b)/(-4*c-4));for(var f=[],g=0;g<b;){var h=g++;f.push(h<a?c:d)}return f};Ub.__pixelCompare=function(a,b){var c=a>>>24&255,d=b>>>24&255;if(c!=d)return sb.gt(c,d)?1:-1;c=a>>>16&255;d=b>>>16&255;if(c!=d)return sb.gt(c,d)?1:-1;c=a>>>8&255;d=b>>>8&255;if(c!=d)return sb.gt(c,d)?1:-1;c=a&255;d=b&255;return c!=d?sb.gt(c,d)?1:-1:0};Ub.__translatePixel=function(a,b,c,d,f,g,h){c=4*(g*(c.width|0)+f);b=Ub.__calculateSourceOffset(b,d,f,g);b<0?a[c]=
a[c+1]=a[c+2]=a[c+3]=0:(a[c]=a[b],a[c+1]=a[b+1],a[c+2]=a[b+2],h=sb.toFloat(a[b+3])*h|0,a[c+3]=h<0?0:h>255?255:h)};var ih=function(a,b){this.image=a;b==null?this.rect=a.get_rect():(b.x<0&&(b.x=0),b.y<0&&(b.y=0),b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),b.width<0&&(b.width=0),b.height<0&&(b.height=0),this.rect=b);this.stride=a.buffer.get_stride();this.__update()};t["lime._internal.graphics._ImageDataUtil.ImageDataView"]=ih;ih.__name__="lime._internal.graphics._ImageDataUtil.ImageDataView";
ih.prototype={x:null,y:null,height:null,width:null,byteOffset:null,image:null,rect:null,stride:null,tempRect:null,clip:function(a,b,c,d){this.tempRect==null&&(this.tempRect=new of);this.tempRect.setTo(a,b,c,d);this.rect.intersection(this.tempRect,this.rect);this.__update()},hasRow:function(a){return a>=0?a<this.height:!1},offset:function(a,b){a<0?(this.rect.x+=a,this.rect.x<0&&(this.rect.x=0)):(this.rect.x+=a,this.rect.width-=a);b<0?(this.rect.y+=b,this.rect.y<0&&(this.rect.y=0)):(this.rect.y+=b,
this.rect.height-=b);this.__update()},row:function(a){return this.byteOffset+this.stride*a},__update:function(){this.x=Math.ceil(this.rect.x);this.y=Math.ceil(this.rect.y);this.width=Math.floor(this.rect.width);this.height=Math.floor(this.rect.height);this.byteOffset=this.stride*(this.y+this.image.offsetY)+(this.x+this.image.offsetX)*4},__class__:ih};var $h=function(){};t["lime._internal.graphics.StackBlur"]=$h;$h.__name__="lime._internal.graphics.StackBlur";$h.blur=function(a,b,c,d,f,g,h){a.copyPixels(b,
c,d);$h.__stackBlurCanvasRGBA(a,c.width|0,c.height|0,f,g,h)};$h.__stackBlurCanvasRGBA=function(a,b,c,d,f,g){d=Math.round(d)>>1;f=Math.round(f)>>1;if($h.MUL_TABLE!=null&&(d>=$h.MUL_TABLE.length&&(d=$h.MUL_TABLE.length-1),f>=$h.MUL_TABLE.length&&(f=$h.MUL_TABLE.length-1),!(d<0||f<0))){g<1&&(g=1);g>3&&(g=3);a=a.get_data();var h,n=d+d+1;var l=f+f+1;var q=b-1,u=c-1,v=d+1,z=f+1,r=new fo,F=r;var J=1;for(var L=n;J<L;)J++,F=F.n=new fo;F.n=r;var Q=n=new fo;J=1;for(L=l;J<L;)J++,Q=Q.n=new fo;Q.n=n;for(var W=
$h.MUL_TABLE[d],ka=$h.SHG_TABLE[d],ha=$h.MUL_TABLE[f],ta=$h.SHG_TABLE[f];g>0;){--g;var za=h=0;var eb=W,db=ka;var Ra=c;do{var vb=a[h];l=v*vb;var bb=a[h+1];var Tb=v*bb;var Eb=a[h+2];var Lb=v*Eb;J=a[h+3];var vc=v*J;F=r;Q=v;do F.r=vb,F.g=bb,F.b=Eb,F.a=J,F=F.n;while(--Q>-1);J=1;for(L=v;J<L;)Q=J++,Q=h+((q<Q?q:Q)<<2),l+=F.r=a[Q],Tb+=F.g=a[Q+1],Lb+=F.b=a[Q+2],vc+=F.a=a[Q+3],F=F.n;L=r;F=0;for(J=b;F<J;)Q=F++,a[h++]=l*eb>>>db,a[h++]=Tb*eb>>>db,a[h++]=Lb*eb>>>db,a[h++]=vc*eb>>>db,Q=Q+d+1,Q=za+(Q<q?Q:q)<<2,l-=
L.r-(L.r=a[Q]),Tb-=L.g-(L.g=a[Q+1]),Lb-=L.b-(L.b=a[Q+2]),vc-=L.a-(L.a=a[Q+3]),L=L.n;za+=b}while(--Ra>0);eb=ha;db=ta;Ra=0;for(za=b;Ra<za;){F=Ra++;h=F<<2;vb=a[h];l=z*vb;bb=a[h+1];Tb=z*bb;Eb=a[h+2];Lb=z*Eb;J=a[h+3];vc=z*J;Q=n;h=0;for(L=z;h<L;)h++,Q.r=vb,Q.g=bb,Q.b=Eb,Q.a=J,Q=Q.n;J=b;L=1;for(vb=f+1;L<vb;)bb=L++,h=J+F<<2,l+=Q.r=a[h],Tb+=Q.g=a[h+1],Lb+=Q.b=a[h+2],vc+=Q.a=a[h+3],Q=Q.n,bb<u&&(J+=b);h=F;L=n;if(g>0)for(vb=0,bb=c;vb<bb;)Eb=vb++,Q=h<<2,J=vc*eb>>>db,a[Q+3]=J,J>0?(a[Q]=l*eb>>>db,a[Q+1]=Tb*eb>>>
db,a[Q+2]=Lb*eb>>>db):a[Q]=a[Q+1]=a[Q+2]=0,Q=Eb+z,Q=F+(Q<u?Q:u)*b<<2,l-=L.r-(L.r=a[Q]),Tb-=L.g-(L.g=a[Q+1]),Lb-=L.b-(L.b=a[Q+2]),vc-=L.a-(L.a=a[Q+3]),L=L.n,h+=b;else for(var zd=0,Qb=c;zd<Qb;){var wd=zd++;Q=h<<2;J=vc*eb>>>db;a[Q+3]=J;J>0?(J=255/J,vb=(l*eb>>>db)*J|0,bb=(Tb*eb>>>db)*J|0,Eb=(Lb*eb>>>db)*J|0,a[Q]=vb>255?255:vb,a[Q+1]=bb>255?255:bb,a[Q+2]=Eb>255?255:Eb):a[Q]=a[Q+1]=a[Q+2]=0;Q=wd+z;Q=F+(Q<u?Q:u)*b<<2;l-=L.r-(L.r=a[Q]);Tb-=L.g-(L.g=a[Q+1]);Lb-=L.b-(L.b=a[Q+2]);vc-=L.a-(L.a=a[Q+3]);L=L.n;
h+=b}}}}};var fo=function(){this.a=this.b=this.g=this.r=0;this.n=null};t["lime._internal.graphics.BlurStack"]=fo;fo.__name__="lime._internal.graphics.BlurStack";fo.prototype={r:null,g:null,b:null,a:null,n:null,__class__:fo};var Uz=function(){};t["lime._internal.macros.AssetsMacro"]=Uz;Uz.__name__="lime._internal.macros.AssetsMacro";var Qy=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app.Event"]=Qy;Qy.__name__="lime.app.Event";Qy.prototype={canceled:null,
__listeners:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},dispatch:null,has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__class__:Qy};var Hc=function(a,b){if(a!=null)try{this.value=a(),this.isComplete=!0}catch(c){Pb.lastError=c,this.error=ba.caught(c).unwrap(),this.isError=!0}};t["lime.app.Future"]=Hc;Hc.__name__=
"lime.app.Future";Hc.ofEvents=function(a,b,c){var d=new Mf;a.add(m(d,d.complete),!0);b!=null&&b.add(m(d,d.error),!0);c!=null&&c.add(m(d,d.progress),!0);return d.future};Hc.withError=function(a){var b=new Hc;b.isError=!0;b.error=a;return b};Hc.withValue=function(a){var b=new Hc;b.isComplete=!0;b.value=a;return b};Hc.prototype={error:null,isComplete:null,isError:null,value:null,__completeListeners:null,__errorListeners:null,__progressListeners:null,onComplete:function(a){a!=null&&(this.isComplete?a(this.value):
this.isError||(this.__completeListeners==null&&(this.__completeListeners=[]),this.__completeListeners.push(a)));return this},onError:function(a){a!=null&&(this.isError?a(this.error):this.isComplete||(this.__errorListeners==null&&(this.__errorListeners=[]),this.__errorListeners.push(a)));return this},onProgress:function(a){a!=null&&(this.__progressListeners==null&&(this.__progressListeners=[]),this.__progressListeners.push(a));return this},ready:function(a){return this},result:function(a){a==null&&
(a=-1);this.ready(a);return this.isComplete?this.value:null},then:function(a){if(this.isComplete)return a(this.value);if(this.isError){var b=new Hc;b.isError=!0;b.error=this.error;return b}var c=new Mf;this.onError(m(c,c.error));this.onProgress(m(c,c.progress));this.onComplete(function(d){d=a(d);d.onError(m(c,c.error));d.onComplete(m(c,c.complete))});return c.future},__class__:Hc};var Mf=function(){this.future=new Hc};t["lime.app.Promise"]=Mf;Mf.__name__="lime.app.Promise";Mf.prototype={future:null,
complete:function(a){if(!this.future.isError&&(this.future.isComplete=!0,this.future.value=a,this.future.__completeListeners!=null)){for(var b=0,c=this.future.__completeListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__completeListeners=null}return this},completeWith:function(a){a.onComplete(m(this,this.complete));a.onError(m(this,this.error));a.onProgress(m(this,this.progress));return this},error:function(a){if(!this.future.isComplete&&(this.future.isError=!0,this.future.error=a,this.future.__errorListeners!=
null)){for(var b=0,c=this.future.__errorListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__errorListeners=null}return this},progress:function(a,b){if(!this.future.isError&&!this.future.isComplete&&this.future.__progressListeners!=null)for(var c=0,d=this.future.__progressListeners;c<d.length;){var f=d[c];++c;f(a,b)}return this},get_isComplete:function(){return this.future.isComplete},get_isError:function(){return this.future.isError},__class__:Mf,__properties__:{get_isError:"get_isError",get_isComplete:"get_isComplete"}};
var Hx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Array_String__Void"]=Hx;Hx.__name__="lime.app._Event_Array_String__Void";Hx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);
this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,
dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Hx};var Ix=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_Float_Void"]=Ix;Ix.__name__="lime.app._Event_Float_Float_Float_Void";Ix.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<
f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,
1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:Ix};var Jx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_Int_Void"]=Jx;Jx.__name__="lime.app._Event_Float_Float_Int_Void";
Jx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:Jx};
var dq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_Void"]=dq;dq.__name__="lime.app._Event_Float_Float_Void";dq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);
this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,
b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:dq};var Kx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_lime_ui_MouseButton_Void"]=Kx;Kx.__name__="lime.app._Event_Float_Float_lime_ui_MouseButton_Void";Kx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<
f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,
1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:Kx};var Lx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void"]=Lx;Lx.__name__=
"lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void";Lx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<
c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:
this.remove(d[g]),!this.canceled););},__class__:Lx};var Mx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_Float_Void"]=Mx;Mx.__name__="lime.app._Event_Int_Float_Void";Mx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,
0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,
a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:Mx};var au=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_Int_Void"]=au;au.__name__="lime.app._Event_Int_Int_Void";au.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);
for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,
1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:au};var km=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_Void"]=
km;km.__name__="lime.app._Event_Int_Void";km.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=
c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););
},__class__:km};var Tv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_lime_system_Orientation_Void"]=Tv;Tv.__name__="lime.app._Event_Int_lime_system_Orientation_Void";Tv.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,
0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,
a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:Tv};var Nx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"]=Nx;Nx.__name__="lime.app._Event_Int_lime_ui_JoystickHatPosition_Void";Nx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,
b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==
a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:Nx};var Ox=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=
[]};t["lime.app._Event_String_Int_Int_Void"]=Ox;Ox.__name__="lime.app._Event_String_Int_Int_Void";Ox.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},
has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,
g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:Ox};var go=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_String_Void"]=go;go.__name__="lime.app._Event_String_Void";go.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,
0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,
a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:go};var jf=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Void_Void"]=jf;jf.__name__="lime.app._Event_Void_Void";jf.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&
(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&
(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(){this.canceled=!1;for(var a=this.__listeners,b=this.__repeat,c=0;c<a.length&&(a[c](),b[c]?++c:this.remove(a[c]),!this.canceled););},__class__:jf};var Px=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};
t["lime.app._Event_haxe_Exception_Void"]=Px;Px.__name__="lime.app._Event_haxe_Exception_Void";Px.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=
0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),
c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Px};var bu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_graphics_RenderContext_Void"]=bu;bu.__name__="lime.app._Event_lime_graphics_RenderContext_Void";bu.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,
0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,
a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:bu};var Sv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_system_Orientation_Void"]=Sv;Sv.__name__="lime.app._Event_lime_system_Orientation_Void";Sv.prototype={canceled:null,__repeat:null,__priorities:null,
add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Sv};var Qx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};t["lime.app._Event_lime_system_State_Void"]=Qx;Qx.__name__="lime.app._Event_lime_system_State_Void";Qx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,
d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Qx};var Rx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_GamepadAxis_Float_Void"]=Rx;Rx.__name__="lime.app._Event_lime_ui_GamepadAxis_Float_Void";Rx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:Rx};var cu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_GamepadButton_Void"]=cu;cu.__name__="lime.app._Event_lime_ui_GamepadButton_Void";cu.prototype={canceled:null,
__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:cu};var Sx=function(){this.canceled=!1;this.__listeners=
[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Gamepad_Void"]=Sx;Sx.__name__="lime.app._Event_lime_ui_Gamepad_Void";Sx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},
cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;
for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Sx};var Tx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Joystick_Void"]=Tx;Tx.__name__="lime.app._Event_lime_ui_Joystick_Void";Tx.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Tx};var du=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=du;du.__name__="lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void";du.prototype=
{canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:du};var ho=function(){this.canceled=
!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Touch_Void"]=ho;ho.__name__="lime.app._Event_lime_ui_Touch_Void";ho.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},
cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;
for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:ho};var Uv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Window_Void"]=Uv;Uv.__name__="lime.app._Event_lime_ui_Window_Void";Uv.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Uv};var Ux=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_utils_Resource_Void"]=Ux;Ux.__name__="lime.app._Event_lime_utils_Resource_Void";Ux.prototype={canceled:null,__repeat:null,
__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Ux};var Ry=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};t["lime.app._Event_ofEvents_T_Void"]=Ry;Ry.__name__="lime.app._Event_ofEvents_T_Void";Ry.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,
d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Ry};var Oc=function(a,b,c,d,f,g,h){f==null&&(f=-1);d==null&&(d=-1);c==null&&(c=0);b==null&&(b=0);this.offsetX=b;this.offsetY=c;this.width=d;this.height=f;this.version=0;h==null&&(h=gg.CANVAS,$b.__current.__worker!=null||$b.__isWorker)&&(h=gg.DATA);this.type=h;if(a==null){if(d>0&&f>0)switch(this.type._hx_index){case 0:this.buffer=new sj(null,d,f);yb.createCanvas(this,d,f);g!=null&&g!=0&&this.fillRect(new of(0,0,d,f),
g);break;case 1:a=d*f*4,a=a!=null?new Uint8Array(a):null,this.buffer=new sj(a,d,f),g!=null&&g!=0&&this.fillRect(new of(0,0,d,f),g)}}else this.__fromImageBuffer(a)};t["lime.graphics.Image"]=Oc;Oc.__name__="lime.graphics.Image";Oc.fromBase64=function(a,b){if(a==null)return null;var c=new Oc;c.__fromBase64(a,b);return c};Oc.fromBitmapData=function(a){return a==null?null:a.image};Oc.fromBytes=function(a){if(a==null)return null;var b=new Oc;return b.__fromBytes(a)?b:null};Oc.fromCanvas=function(a){if(a==
null)return null;var b=new sj(null,a.width,a.height);b.set_src(a);a=new Oc(b);a.type=gg.CANVAS;return a};Oc.fromFile=function(a){if(a==null)return null;var b=new Oc;return b.__fromFile(a)?b:null};Oc.fromImageElement=function(a){if(a==null)return null;var b=new sj(null,a.width,a.height);b.set_src(a);a=new Oc(b);a.type=gg.CANVAS;return a};Oc.loadFromBase64=function(a,b){return a==null||b==null?Hc.withValue(null):Zb.loadImage("data:"+b+";base64,"+a)};Oc.loadFromBytes=function(a){if(a==null)return Hc.withValue(null);
if(Oc.__isPNG(a))var b="image/png";else if(Oc.__isJPG(a))b="image/jpeg";else if(Oc.__isGIF(a))b="image/gif";else if(Oc.__isWebP(a))b="image/webp";else return Hc.withValue(null);return Zb.loadImageFromBytes(a,b)};Oc.loadFromFile=function(a){return a==null?Hc.withValue(null):Zb.loadImage(a)};Oc.__isGIF=function(a){if(a==null||a.length<6)return!1;a=a.getString(0,6);return a!="GIF87a"?a=="GIF89a":!0};Oc.__isJPG=function(a){return a==null||a.length<4?!1:a.b[0]==255&&a.b[1]==216&&a.b[a.length-2]==255?a.b[a.length-
1]==217:!1};Oc.__isPNG=function(a){return a==null||a.length<8?!1:a.b[0]==137&&a.b[1]==80&&a.b[2]==78&&a.b[3]==71&&a.b[4]==13&&a.b[5]==10&&a.b[6]==26?a.b[7]==10:!1};Oc.__isWebP=function(a){return a==null||a.length<16?!1:a.getString(0,4)=="RIFF"?a.getString(8,4)=="WEBP":!1};Oc.prototype={buffer:null,dirty:null,height:null,offsetX:null,offsetY:null,rect:null,type:null,version:null,width:null,x:null,y:null,clone:function(){if(this.buffer!=null){this.type==gg.CANVAS?yb.convertToCanvas(this):yb.convertToData(this);
var a=new Oc(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.version=this.version;return a}return new Oc(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type)},colorTransform:function(a,b){a=this.__clipRect(a);if(this.buffer!=null&&a!=null)switch(this.type._hx_index){case 0:yb.colorTransform(this,a,b);break;case 1:yb.convertToData(this);Ub.colorTransform(this,a,b);break;case 2:a.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.colorTransform(a.__toFlashRectangle(),
xf.__toFlashColorTransform(b))}},copyChannel:function(a,b,c,d,f){b=this.__clipRect(b);if(this.buffer!=null&&b!=null&&!(f==Bi.ALPHA&&!this.get_transparent()||b.width<=0||b.height<=0))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),this.type._hx_index){case 0:yb.copyChannel(this,a,b,c,d,f);break;case 1:yb.convertToData(this);yb.convertToData(a);Ub.copyChannel(this,a,b,c,d,f);break;case 2:switch(d._hx_index){case 0:var g=1;break;case 1:g=2;break;case 2:g=
4;break;case 3:g=8}switch(f._hx_index){case 0:var h=1;break;case 1:h=2;break;case 2:h=4;break;case 3:h=8}b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.copyChannel(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),g,h)}},copyPixels:function(a,b,c,d,f,g){g==null&&(g=!1);if(this.buffer!=null&&a!=null&&!(b.width<=0||b.height<=0||this.width<=0||this.height<=0))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-
b.y),b.x<0&&(b.width+=b.x,b.x=0),b.y<0&&(b.height+=b.y,b.y=0),c.x+b.width>this.width&&(b.width=this.width-c.x),c.y+b.height>this.height&&(b.height=this.height-c.y),c.x<0&&(b.width+=c.x,b.x-=c.x,c.x=0),c.y<0&&(b.height+=c.y,b.y-=c.y,c.y=0),a==this&&c.x<b.get_right()&&c.y<b.get_bottom()&&(a=this.clone()),d==a&&(f==null||f.x==0&&f.y==0)&&(f=d=null),this.type._hx_index){case 0:d!=null?(yb.convertToData(this),yb.convertToData(a),d!=null&&yb.convertToData(d),Ub.copyPixels(this,a,b,c,d,f,g)):(yb.convertToCanvas(this),
yb.convertToCanvas(a),yb.copyPixels(this,a,b,c,d,f,g));break;case 1:yb.convertToData(this);yb.convertToData(a);d!=null&&yb.convertToData(d);Ub.copyPixels(this,a,b,c,d,f,g);break;case 2:b.offset(a.offsetX,a.offsetY),c.offset(this.offsetX,this.offsetY),d!=null&&f!=null&&f.offset(d.offsetX,d.offsetY),this.buffer.__srcBitmapData.copyPixels(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),d!=null?d.buffer.get_src():null,f!=null?f.__toFlashPoint():null,g)}},encode:function(a,b){b==null&&
(b=90);if(a==null)return cq.encode(this);switch(a._hx_index){case 0:return Py.encode(this);case 1:return Yt.encode(this,b);case 2:return cq.encode(this)}},fillRect:function(a,b,c){a=this.__clipRect(a);if(this.buffer!=null&&a!=null)switch(this.type._hx_index){case 0:yb.fillRect(this,a,b,c);break;case 1:yb.convertToData(this);if(this.buffer.data.length==0)break;Ub.fillRect(this,a,b,c);break;case 2:a.offset(this.offsetX,this.offsetY);if(c==null)b=(b&255)<<24|(b>>>24&255)<<16|(b>>>16&255)<<8|b>>>8&255;
else switch(c){case 1:break;case 2:b=(b&255)<<24|(b>>>8&255)<<16|(b>>>16&255)<<8|b>>>24&255;break;default:b=(b&255)<<24|(b>>>24&255)<<16|(b>>>16&255)<<8|b>>>8&255}this.buffer.__srcBitmapData.fillRect(a.__toFlashRectangle(),b)}},floodFill:function(a,b,c,d){if(this.buffer!=null)switch(this.type._hx_index){case 0:yb.floodFill(this,a,b,c,d);break;case 1:yb.convertToData(this);Ub.floodFill(this,a,b,c,d);break;case 2:if(d==null)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else switch(d){case 1:break;
case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.floodFill(a+this.offsetX,b+this.offsetY,c)}},getColorBoundsRect:function(a,b,c,d){c==null&&(c=!0);if(this.buffer==null)return null;switch(this.type._hx_index){case 0:return yb.convertToData(this),Ub.getColorBoundsRect(this,a,b,c,d);case 1:return Ub.getColorBoundsRect(this,a,b,c,d);case 2:return a=this.buffer.__srcBitmapData.getColorBoundsRect(a,
b,c),new of(a.x,a.y,a.width,a.height);default:return null}},getPixel:function(a,b,c){if(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height)return 0;switch(this.type._hx_index){case 0:return yb.getPixel(this,a,b,c);case 1:return yb.convertToData(this),Ub.getPixel(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel(a+this.offsetX,b+this.offsetY);if(c==null)return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;switch(c){case 1:return a;case 2:return(a&255)<<24|(a>>>8&255)<<16|(a>>>
16&255)<<8|a>>>24&255;default:return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255}default:return 0}},getPixel32:function(a,b,c){if(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height)return 0;switch(this.type._hx_index){case 0:return yb.getPixel32(this,a,b,c);case 1:return yb.convertToData(this),Ub.getPixel32(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel32(a+this.offsetX,b+this.offsetY);if(c==null)return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;switch(c){case 1:return a;
case 2:return(a&255)<<24|(a>>>8&255)<<16|(a>>>16&255)<<8|a>>>24&255;default:return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255}default:return 0}},getPixels:function(a,b){if(this.buffer==null)return null;switch(this.type._hx_index){case 0:return yb.getPixels(this,a,b);case 1:return yb.convertToData(this),Ub.getPixels(this,a,b);case 2:return null;default:return null}},merge:function(a,b,c,d,f,g,h){if(this.buffer!=null&&a!=null)switch(this.type._hx_index){case 0:yb.convertToCanvas(this);yb.merge(this,
a,b,c,d,f,g,h);break;case 1:yb.convertToData(this);yb.convertToData(a);Ub.merge(this,a,b,c,d,f,g,h);break;case 2:b.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.merge(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),d,f,g,h)}},resize:function(a,b){switch(this.type._hx_index){case 0:yb.resize(this,a,b);break;case 1:Ub.resize(this,a,b)}this.buffer.width=a;this.buffer.height=b;this.offsetY=this.offsetX=0;this.width=a;this.height=b},scroll:function(a,b){if(this.buffer!=
null)switch(this.type._hx_index){case 0:yb.scroll(this,a,b);break;case 1:this.copyPixels(this,this.get_rect(),new Uf(a,b));break;case 2:this.buffer.__srcBitmapData.scroll(a+this.offsetX,b+this.offsetX)}},setPixel:function(a,b,c,d){if(!(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height))switch(this.type._hx_index){case 0:yb.setPixel(this,a,b,c,d);break;case 1:yb.convertToData(this);Ub.setPixel(this,a,b,c,d);break;case 2:if(d==null)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else switch(d){case 1:break;
case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.setPixel(a+this.offsetX,b+this.offsetX,c)}},setPixel32:function(a,b,c,d){if(!(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height))switch(this.type._hx_index){case 0:yb.setPixel32(this,a,b,c,d);break;case 1:yb.convertToData(this);Ub.setPixel32(this,a,b,c,d);break;case 2:if(d==null)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>
8&255;else switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.setPixel32(a+this.offsetX,b+this.offsetY,c)}},setPixels:function(a,b,c,d){a=this.__clipRect(a);if(this.buffer!=null&&a!=null)switch(d==null&&(d=qk.BIG_ENDIAN),this.type._hx_index){case 0:yb.setPixels(this,a,b,c,d);break;case 1:yb.convertToData(this),Ub.setPixels(this,a,b,c,d)}},threshold:function(a,b,c,
d,f,g,h,n,l){n==null&&(n=!1);h==null&&(h=-1);g==null&&(g=0);if(this.buffer==null||a==null||b==null)return 0;switch(this.type._hx_index){case 0:case 1:return yb.convertToData(this),yb.convertToData(a),Ub.threshold(this,a,b,c,d,f,g,h,n,l);case 2:if(l==null){var q=g;g=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255}else switch(l){case 1:break;case 2:q=g;g=(q&255)<<24|(q>>>8&255)<<16|(q>>>16&255)<<8|q>>>24&255;break;default:q=g,g=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255}if(l==null)q=
h,h=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255;else switch(l){case 1:break;case 2:q=h;h=(q&255)<<24|(q>>>8&255)<<16|(q>>>16&255)<<8|q>>>24&255;break;default:q=h,h=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255}b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,this.offsetY);return this.buffer.__srcBitmapData.threshold(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),d,f,g,h,n)}return 0},__clipRect:function(a){return a==null||a.x<0&&(a.width-=-a.x,a.x=0,a.x+a.width<=
0)||a.y<0&&(a.height-=-a.y,a.y=0,a.y+a.height<=0)||a.x+a.width>=this.width&&(a.width-=a.x+a.width-this.width,a.width<=0)||a.y+a.height>=this.height&&(a.height-=a.y+a.height-this.height,a.height<=0)?null:a},__fromBase64:function(a,b,c){var d=this,f=new window.Image;f.addEventListener("load",function(g){d.buffer=new sj(null,f.width,f.height);d.buffer.__srcImage=f;d.offsetX=0;d.offsetY=0;d.width=d.buffer.width;d.height=d.buffer.height;c!=null&&c(d)},!1);f.src="data:"+b+";base64,"+a},__fromBytes:function(a,
b){if(Oc.__isPNG(a))var c="image/png";else if(Oc.__isJPG(a))c="image/jpeg";else if(Oc.__isGIF(a))c="image/gif";else return!1;this.__fromBase64(rj.encode(a),c,b);return!0},__fromFile:function(a,b,c){var d=this,f=new window.Image;Zb.__isSameOrigin(a)||(f.crossOrigin="Anonymous");f.onload=function(g){d.buffer=new sj(null,f.width,f.height);d.buffer.__srcImage=f;d.width=f.width;d.height=f.height;b!=null&&b(d)};f.onerror=function(g){c!=null&&c()};f.src=a;return!0},__fromImageBuffer:function(a){this.buffer=
a;a!=null&&(this.width==-1&&(this.width=a.width),this.height==-1&&(this.height=a.height))},get_data:function(){this.buffer.data==null&&this.buffer.width>0&&this.buffer.height>0&&yb.convertToData(this);return this.buffer.data},set_data:function(a){return this.buffer.data=a},get_format:function(){return this.buffer.format},set_format:function(a){this.buffer.format!=a&&this.type._hx_index==1&&Ub.setFormat(this,a);return this.buffer.format=a},get_powerOfTwo:function(){return this.buffer.width!=0&&(this.buffer.width&
~this.buffer.width+1)==this.buffer.width?this.buffer.height!=0?(this.buffer.height&~this.buffer.height+1)==this.buffer.height:!1:!1},set_powerOfTwo:function(a){if(a!=this.get_powerOfTwo()){for(var b=1,c=1;b<this.buffer.width;)b<<=1;for(;c<this.buffer.height;)c<<=1;if(b==this.buffer.width&&c==this.buffer.height)return a;switch(this.type._hx_index){case 0:yb.convertToData(this);Ub.resizeBuffer(this,b,c);break;case 1:Ub.resizeBuffer(this,b,c)}}return a},get_premultiplied:function(){return this.buffer.premultiplied},
set_premultiplied:function(a){if(a&&!this.buffer.premultiplied)switch(this.type._hx_index){case 0:case 1:yb.convertToData(this),Ub.multiplyAlpha(this)}else!a&&this.buffer.premultiplied&&this.type._hx_index==1&&(yb.convertToData(this),Ub.unmultiplyAlpha(this));return a},get_rect:function(){return new of(0,0,this.width,this.height)},get_src:function(){this.buffer.__srcCanvas!=null||this.buffer.data==null&&this.type!=gg.DATA||yb.convertToCanvas(this);return this.buffer.get_src()},set_src:function(a){return this.buffer.set_src(a)},
get_transparent:function(){return this.buffer==null?!1:this.buffer.transparent},set_transparent:function(a){return this.buffer==null?!1:this.buffer.transparent=a},__class__:Oc,__properties__:{set_transparent:"set_transparent",get_transparent:"get_transparent",set_src:"set_src",get_src:"get_src",get_rect:"get_rect",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",set_powerOfTwo:"set_powerOfTwo",get_powerOfTwo:"get_powerOfTwo",set_format:"set_format",get_format:"get_format",
set_data:"set_data",get_data:"get_data"}};var sj=function(a,b,c,d,f){d==null&&(d=32);c==null&&(c=0);b==null&&(b=0);this.data=a;this.width=b;this.height=c;this.bitsPerPixel=d;this.format=f==null?0:f;this.premultiplied=!1;this.transparent=!0};t["lime.graphics.ImageBuffer"]=sj;sj.__name__="lime.graphics.ImageBuffer";sj.prototype={bitsPerPixel:null,data:null,format:null,height:null,premultiplied:null,transparent:null,width:null,__srcBitmapData:null,__srcCanvas:null,__srcContext:null,__srcCustom:null,
__srcImage:null,__srcImageData:null,clone:function(){var a=new sj(this.data,this.width,this.height,this.bitsPerPixel);if(this.data!=null){var b=this.data.byteLength,c=null,d=null,f=null,g=null,h=null;b=b!=null?new Uint8Array(b):c!=null?new Uint8Array(c):d!=null?new Uint8Array(d.__array):f!=null?new Uint8Array(f):g!=null?h==null?new Uint8Array(g,0):new Uint8Array(g,0,h):null;a.data=b;d=c=b=null;f=this.data;h=g=null;b=b!=null?new Uint8Array(b):c!=null?new Uint8Array(c):d!=null?new Uint8Array(d.__array):
f!=null?new Uint8Array(f):g!=null?h==null?new Uint8Array(g,0):new Uint8Array(g,0,h):null;a.data.set(b)}else this.__srcImageData!=null?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcImageData.width,a.__srcCanvas.height=this.__srcImageData.height,a.__srcImageData=a.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height),b=new Uint8ClampedArray(this.__srcImageData.data),a.__srcImageData.data.set(b)):
this.__srcCanvas!=null?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcCanvas.width,a.__srcCanvas.height=this.__srcCanvas.height,a.__srcContext.drawImage(this.__srcCanvas,0,0)):a.__srcImage=this.__srcImage;a.bitsPerPixel=this.bitsPerPixel;a.format=this.format;a.premultiplied=this.premultiplied;a.transparent=this.transparent;return a},get_src:function(){return this.__srcImage!=null?this.__srcImage:this.__srcCanvas},
set_src:function(a){a instanceof Image?this.__srcImage=a:a instanceof HTMLCanvasElement&&(this.__srcCanvas=a,this.__srcContext=this.__srcCanvas.getContext("2d"));return a},get_stride:function(){return this.width*(this.bitsPerPixel/8|0)},__class__:sj,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var Bi=R["lime.graphics.ImageChannel"]={__ename__:"lime.graphics.ImageChannel",__constructs__:null,RED:{_hx_name:"RED",_hx_index:0,__enum__:"lime.graphics.ImageChannel",toString:E},
GREEN:{_hx_name:"GREEN",_hx_index:1,__enum__:"lime.graphics.ImageChannel",toString:E},BLUE:{_hx_name:"BLUE",_hx_index:2,__enum__:"lime.graphics.ImageChannel",toString:E},ALPHA:{_hx_name:"ALPHA",_hx_index:3,__enum__:"lime.graphics.ImageChannel",toString:E}};Bi.__constructs__=[Bi.RED,Bi.GREEN,Bi.BLUE,Bi.ALPHA];var eu=R["lime.graphics.ImageFileFormat"]={__ename__:"lime.graphics.ImageFileFormat",__constructs__:null,BMP:{_hx_name:"BMP",_hx_index:0,__enum__:"lime.graphics.ImageFileFormat",toString:E},JPEG:{_hx_name:"JPEG",
_hx_index:1,__enum__:"lime.graphics.ImageFileFormat",toString:E},PNG:{_hx_name:"PNG",_hx_index:2,__enum__:"lime.graphics.ImageFileFormat",toString:E}};eu.__constructs__=[eu.BMP,eu.JPEG,eu.PNG];var gg=R["lime.graphics.ImageType"]={__ename__:"lime.graphics.ImageType",__constructs__:null,CANVAS:{_hx_name:"CANVAS",_hx_index:0,__enum__:"lime.graphics.ImageType",toString:E},DATA:{_hx_name:"DATA",_hx_index:1,__enum__:"lime.graphics.ImageType",toString:E},FLASH:{_hx_name:"FLASH",_hx_index:2,__enum__:"lime.graphics.ImageType",
toString:E},CUSTOM:{_hx_name:"CUSTOM",_hx_index:3,__enum__:"lime.graphics.ImageType",toString:E}};gg.__constructs__=[gg.CANVAS,gg.DATA,gg.FLASH,gg.CUSTOM];var Gx=function(){};t["lime.graphics.RenderContext"]=Gx;Gx.__name__="lime.graphics.RenderContext";Gx.prototype={attributes:null,cairo:null,canvas2D:null,dom:null,flash:null,gl:null,gles2:null,gles3:null,type:null,version:null,webgl:null,webgl2:null,window:null,__class__:Gx};var Vz={bufferData:function(a,b,c,d,f,g){f!=null?a.bufferData(b,c,d,f,g):
a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d,f,g){f!=null?a.bufferSubData(b,c,d,f,g):a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,f,g,h,n,l,q){l!=null?a.compressedTexImage2D(b,c,d,f,g,h,n,l,q):a.compressedTexImage2D(b,c,d,f,g,h,n)},compressedTexSubImage2D:function(a,b,c,d,f,g,h,n,l,q,u){q!=null?a.compressedTexSubImage2D(b,c,d,f,g,h,n,l,q,u):a.compressedTexSubImage2D(b,c,d,f,g,h,n,l)},getBufferSubData:function(a,b,c,d,f,g){f!=null?a.getBufferSubData(b,c,d,f,g):a.getBufferSubData(b,
c,d)},readPixels:function(a,b,c,d,f,g,h,n,l){l!=null?a.readPixels(b,c,d,f,g,h,n,l):a.readPixels(b,c,d,f,g,h,n)},texImage2D:function(a,b,c,d,f,g,h,n,l,q,u){u!=null?a.texImage2D(b,c,d,f,g,h,n,l,q,u):n!=null?a.texImage2D(b,c,d,f,g,h,n,l,q):a.texImage2D(b,c,d,f,g,h)},texSubImage2D:function(a,b,c,d,f,g,h,n,l,q,u){u!=null?a.texSubImage2D(b,c,d,f,g,h,n,l,q,u):l!=null?a.texSubImage2D(b,c,d,f,g,h,n,l,q):a.texSubImage2D(b,c,d,f,g,h,n)},uniform1fv:function(a,b,c,d,f){d!=null?a.uniform1fv(b,c,d,f):a.uniform1fv(b,
c)},uniform1iv:function(a,b,c,d,f){d!=null?a.uniform1iv(b,c,d,f):a.uniform1iv(b,c)},uniform2fv:function(a,b,c,d,f){d!=null?a.uniform2fv(b,c,d,f):a.uniform2fv(b,c)},uniform2iv:function(a,b,c,d,f){d!=null?a.uniform2iv(b,c,d,f):a.uniform2iv(b,c)},uniform3fv:function(a,b,c,d,f){d!=null?a.uniform3fv(b,c,d,f):a.uniform3fv(b,c)},uniform3iv:function(a,b,c,d,f){d!=null?a.uniform3iv(b,c,d,f):a.uniform3iv(b,c)},uniform4fv:function(a,b,c,d,f){d!=null?a.uniform4fv(b,c,d,f):a.uniform4fv(b,c)},uniform4iv:function(a,
b,c,d,f){d!=null?a.uniform4iv(b,c,d,f):a.uniform4iv(b,c)},uniformMatrix2fv:function(a,b,c,d,f,g){f!=null?a.uniformMatrix2fv(b,c,d,f,g):a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d,f,g){f!=null?a.uniformMatrix3fv(b,c,d,f,g):a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,b,c,d,f,g){f!=null?a.uniformMatrix4fv(b,c,d,f,g):a.uniformMatrix4fv(b,c,d)},fromGL:function(a){return null},fromRenderContext:function(a){return a.webgl2},toWebGLRenderContext:function(a){return a}},yd={bufferData:function(a,
b,c,d){a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d){a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,f,g,h,n){a.compressedTexImage2D(b,c,d,f,g,h,n)},compressedTexSubImage2D:function(a,b,c,d,f,g,h,n,l){a.compressedTexSubImage2D(b,c,d,f,g,h,n,l)},readPixels:function(a,b,c,d,f,g,h,n){a.readPixels(b,c,d,f,g,h,n)},texImage2D:function(a,b,c,d,f,g,h,n,l,q){n!=null?a.texImage2D(b,c,d,f,g,h,n,l,q):a.texImage2D(b,c,d,f,g,h)},texSubImage2D:function(a,b,c,d,f,g,h,n,l,q){l!=null?a.texSubImage2D(b,
c,d,f,g,h,n,l,q):a.texSubImage2D(b,c,d,f,g,h,n)},uniformMatrix2fv:function(a,b,c,d){a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d){a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,b,c,d){a.uniformMatrix4fv(b,c,d)},fromWebGL2RenderContext:function(a){return a},fromRenderContext:function(a){return a.webgl},fromGL:function(a){return A.context}},eq=function(a){};t["lime.graphics.cairo.Cairo"]=eq;eq.__name__="lime.graphics.cairo.Cairo";eq.__properties__={get_versionString:"get_versionString",
get_version:"get_version"};eq.get_version=function(){return 0};eq.get_versionString=function(){return""};eq.prototype={target:null,userData:null,handle:null,arc:function(a,b,c,d,f){},arcNegative:function(a,b,c,d,f){},clip:function(){},clipExtents:function(a,b,c,d){},clipPreserve:function(){},closePath:function(){},copyPage:function(){},curveTo:function(a,b,c,d,f,g){},fill:function(){},fillExtents:function(a,b,c,d){},fillPreserve:function(){},getOperator:function(){return 0},identityMatrix:function(){},
inClip:function(a,b){return!1},inFill:function(a,b){return!1},inStroke:function(a,b){return!1},lineTo:function(a,b){},mask:function(a){},maskSurface:function(a,b,c){},moveTo:function(a,b){},newPath:function(){},paint:function(){},paintWithAlpha:function(a){},popGroup:function(){return null},popGroupToSource:function(){},pushGroup:function(){},pushGroupWithContent:function(a){},recreate:function(a){},rectangle:function(a,b,c,d){},relCurveTo:function(a,b,c,d,f,g){},relLineTo:function(a,b){},relMoveTo:function(a,
b){},resetClip:function(){},restore:function(){},rotate:function(a){},save:function(){},scale:function(a,b){},setFontSize:function(a){},setOperator:function(a){return a},setSourceRGB:function(a,b,c){},setSourceRGBA:function(a,b,c,d){},setSourceSurface:function(a,b,c){},showGlyphs:function(a){},showPage:function(){},showText:function(a){},status:function(){return 0},stroke:function(){},strokeExtents:function(a,b,c,d){},strokePreserve:function(){},textPath:function(a){},transform:function(a){},translate:function(a,
b){},get_antialias:function(){return 0},set_antialias:function(a){return a},get_currentPoint:function(){return null},get_dash:function(){return[]},set_dash:function(a){return a},get_dashCount:function(){return 0},get_fillRule:function(){return 0},set_fillRule:function(a){return a},get_fontFace:function(){return 0},set_fontFace:function(a){return a},get_fontOptions:function(){return null},set_fontOptions:function(a){return a},get_groupTarget:function(){return 0},get_hasCurrentPoint:function(){return!1},
get_lineCap:function(){return 0},set_lineCap:function(a){return a},get_lineJoin:function(){return 0},set_lineJoin:function(a){return a},get_lineWidth:function(){return 0},set_lineWidth:function(a){return a},get_matrix:function(){return null},set_matrix:function(a){return a},get_miterLimit:function(){return 0},set_miterLimit:function(a){return a},get_source:function(){return 0},set_source:function(a){return a},get_target:function(){return 0},get_tolerance:function(){return 0},set_tolerance:function(a){return a},
__class__:eq,__properties__:{set_tolerance:"set_tolerance",get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",set_miterLimit:"set_miterLimit",get_miterLimit:"get_miterLimit",set_matrix:"set_matrix",get_matrix:"get_matrix",set_lineWidth:"set_lineWidth",get_lineWidth:"get_lineWidth",set_lineJoin:"set_lineJoin",get_lineJoin:"get_lineJoin",set_lineCap:"set_lineCap",get_lineCap:"get_lineCap",get_hasCurrentPoint:"get_hasCurrentPoint",get_groupTarget:"get_groupTarget",
set_fontOptions:"set_fontOptions",get_fontOptions:"get_fontOptions",set_fontFace:"set_fontFace",get_fontFace:"get_fontFace",set_fillRule:"set_fillRule",get_fillRule:"get_fillRule",get_dashCount:"get_dashCount",set_dash:"set_dash",get_dash:"get_dash",get_currentPoint:"get_currentPoint",set_antialias:"set_antialias",get_antialias:"get_antialias"}};var Sy=function(a,b,c){c==null&&(c=0);b==null&&(b=0);this.index=a;this.x=b;this.y=c};t["lime.graphics.cairo.CairoGlyph"]=Sy;Sy.__name__="lime.graphics.cairo.CairoGlyph";
Sy.prototype={index:null,x:null,y:null,__class__:Sy};var hA={__properties__:{get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",get_data:"get_data"},_new:function(a,b,c){return 0},create:function(a,b,c,d,f){return 0},fromImage:function(a){return null},get_data:function(a){return Ci.fromFloat(0)},get_format:function(a){return 0},get_height:function(a){return 0},get_stride:function(a){return 0},get_width:function(a){return 0}},Vx={__properties__:{set_matrix:"set_matrix",
get_matrix:"get_matrix",set_filter:"set_filter",get_filter:"get_filter",set_extend:"set_extend",get_extend:"get_extend",get_colorStopCount:"get_colorStopCount"},_new:function(a){return a},addColorStopRGB:function(a,b,c,d,f){},addColorStopRGBA:function(a,b,c,d,f,g){},createForSurface:function(a){return 0},createLinear:function(a,b,c,d){return 0},createRadial:function(a,b,c,d,f,g){return 0},createRGB:function(a,b,c){return 0},createRGBA:function(a,b,c,d){return 0},get_colorStopCount:function(a){return 0},
get_extend:function(a){return 0},set_extend:function(a,b){return b},get_filter:function(a){return 0},set_filter:function(a,b){return b},get_matrix:function(a){return null},set_matrix:function(a,b){return b}},iA={flush:function(a){}},A=function(){};t["lime.graphics.opengl.GL"]=A;A.__name__="lime.graphics.opengl.GL";A.activeTexture=function(a){A.context.activeTexture(a)};A.attachShader=function(a,b){A.context.attachShader(a,b)};A.beginQuery=function(a,b){A.context.beginQuery(a,b)};A.beginTransformFeedback=
function(a){A.context.beginTransformFeedback(a)};A.bindAttribLocation=function(a,b,c){A.context.bindAttribLocation(a,b,c)};A.bindBuffer=function(a,b){A.context.bindBuffer(a,b)};A.bindBufferBase=function(a,b,c){A.context.bindBufferBase(a,b,c)};A.bindBufferRange=function(a,b,c,d,f){A.context.bindBufferRange(a,b,c,d,Ci.fromFloat(f))};A.bindFramebuffer=function(a,b){A.context.bindFramebuffer(a,b)};A.bindRenderbuffer=function(a,b){A.context.bindRenderbuffer(a,b)};A.bindSampler=function(a,b){A.context.bindSampler(a,
b)};A.bindTexture=function(a,b){A.context.bindTexture(a,b)};A.bindTransformFeedback=function(a,b){A.context.bindTransformFeedback(a,b)};A.bindVertexArray=function(a){A.context.bindVertexArray(a)};A.blitFramebuffer=function(a,b,c,d,f,g,h,n,l,q){A.context.blitFramebuffer(a,b,c,d,f,g,h,n,l,q)};A.blendColor=function(a,b,c,d){A.context.blendColor(a,b,c,d)};A.blendEquation=function(a){A.context.blendEquation(a)};A.blendEquationSeparate=function(a,b){A.context.blendEquationSeparate(a,b)};A.blendFunc=function(a,
b){A.context.blendFunc(a,b)};A.blendFuncSeparate=function(a,b,c,d){A.context.blendFuncSeparate(a,b,c,d)};A.bufferDataWEBGL=function(a,b,c,d,f){var g=A.context;d!=null?g.bufferData(a,b,c,d,f):g.bufferData(a,b,c)};A.bufferSubDataWEBGL=function(a,b,c,d,f){var g=A.context;d!=null?g.bufferSubData(a,b,c,d,f):g.bufferSubData(a,b,c)};A.checkFramebufferStatus=function(a){return A.context.checkFramebufferStatus(a)};A.clear=function(a){A.context.clear(a)};A.clearBufferfi=function(a,b,c,d){A.context.clearBufferfi(a,
b,c,d)};A.clearBufferfvWEBGL=function(a,b,c,d){A.context.clearBufferfv(a,b,c,d)};A.clearBufferivWEBGL=function(a,b,c,d){A.context.clearBufferiv(a,b,c,d)};A.clearBufferuivWEBGL=function(a,b,c,d){A.context.clearBufferuiv(a,b,c,d)};A.clearColor=function(a,b,c,d){A.context.clearColor(a,b,c,d)};A.clearDepth=function(a){A.context.clearDepth(a)};A.clearStencil=function(a){A.context.clearStencil(a)};A.clientWaitSync=function(a,b,c){return A.context.clientWaitSync(a,b,c)};A.colorMask=function(a,b,c,d){A.context.colorMask(a,
b,c,d)};A.compileShader=function(a){A.context.compileShader(a)};A.compressedTexImage2DWEBGL=function(a,b,c,d,f,g,h,n,l){var q=A.context;n!=null?q.compressedTexImage2D(a,b,c,d,f,g,h,n,l):q.compressedTexImage2D(a,b,c,d,f,g,h)};A.compressedTexImage3DWEBGL=function(a,b,c,d,f,g,h,n,l,q){A.context.compressedTexImage3D(a,b,c,d,f,g,h,n,l,q)};A.compressedTexSubImage2DWEBGL=function(a,b,c,d,f,g,h,n,l,q){var u=A.context;l!=null?u.compressedTexSubImage2D(a,b,c,d,f,g,h,n,l,q):u.compressedTexSubImage2D(a,b,c,d,
f,g,h,n)};A.compressedTexSubImage3DWEBGL=function(a,b,c,d,f,g,h,n,l,q,u,v){A.context.compressedTexSubImage3D(a,b,c,d,f,g,h,n,l,q,u,v)};A.copyTexImage2D=function(a,b,c,d,f,g,h,n){A.context.copyTexImage2D(a,b,c,d,f,g,h,n)};A.copyTexSubImage2D=function(a,b,c,d,f,g,h,n){A.context.copyTexSubImage2D(a,b,c,d,f,g,h,n)};A.copyTexSubImage3D=function(a,b,c,d,f,g,h,n,l){A.context.copyTexSubImage3D(a,b,c,d,f,g,h,n,l)};A.createBuffer=function(){return A.context.createBuffer()};A.createFramebuffer=function(){return A.context.createFramebuffer()};
A.createProgram=function(){return A.context.createProgram()};A.createQuery=function(){return A.context.createQuery()};A.createRenderbuffer=function(){return A.context.createRenderbuffer()};A.createSampler=function(){return A.context.createSampler()};A.createShader=function(a){return A.context.createShader(a)};A.createTexture=function(){return A.context.createTexture()};A.createTransformFeedback=function(){return A.context.createTransformFeedback()};A.createVertexArray=function(){return A.context.createVertexArray()};
A.cullFace=function(a){A.context.cullFace(a)};A.deleteBuffer=function(a){A.context.deleteBuffer(a)};A.deleteFramebuffer=function(a){A.context.deleteFramebuffer(a)};A.deleteProgram=function(a){A.context.deleteProgram(a)};A.deleteQuery=function(a){A.context.deleteQuery(a)};A.deleteRenderbuffer=function(a){A.context.deleteRenderbuffer(a)};A.deleteSampler=function(a){A.context.deleteSampler(a)};A.deleteShader=function(a){A.context.deleteShader(a)};A.deleteSync=function(a){A.context.deleteSync(a)};A.deleteTexture=
function(a){A.context.deleteTexture(a)};A.deleteTransformFeedback=function(a){A.context.deleteTransformFeedback(a)};A.deleteVertexArray=function(a){A.context.deleteVertexArray(a)};A.depthFunc=function(a){A.context.depthFunc(a)};A.depthMask=function(a){A.context.depthMask(a)};A.depthRange=function(a,b){A.context.depthRange(a,b)};A.detachShader=function(a,b){A.context.detachShader(a,b)};A.disable=function(a){A.context.disable(a)};A.disableVertexAttribArray=function(a){A.context.disableVertexAttribArray(a)};
A.drawArrays=function(a,b,c){A.context.drawArrays(a,b,c)};A.drawArraysInstanced=function(a,b,c,d){A.context.drawArraysInstanced(a,b,c,d)};A.drawBuffers=function(a){A.context.drawBuffers(a)};A.drawElements=function(a,b,c,d){A.context.drawElements(a,b,c,d)};A.drawElementsInstanced=function(a,b,c,d,f){A.context.drawElementsInstanced(a,b,c,d,f)};A.drawRangeElements=function(a,b,c,d,f,g){A.context.drawRangeElements(a,b,c,d,f,g)};A.enable=function(a){A.context.enable(a)};A.enableVertexAttribArray=function(a){A.context.enableVertexAttribArray(a)};
A.endQuery=function(a){A.context.endQuery(a)};A.endTransformFeedback=function(){A.context.endTransformFeedback()};A.fenceSync=function(a,b){return A.context.fenceSync(a,b)};A.finish=function(){A.context.finish()};A.flush=function(){A.context.flush()};A.framebufferRenderbuffer=function(a,b,c,d){A.context.framebufferRenderbuffer(a,b,c,d)};A.framebufferTexture2D=function(a,b,c,d,f){A.context.framebufferTexture2D(a,b,c,d,f)};A.framebufferTextureLayer=function(a,b,c,d,f){A.context.framebufferTextureLayer(a,
b,c,d,f)};A.frontFace=function(a){A.context.frontFace(a)};A.generateMipmap=function(a){A.context.generateMipmap(a)};A.getActiveAttrib=function(a,b){return A.context.getActiveAttrib(a,b)};A.getActiveUniform=function(a,b){return A.context.getActiveUniform(a,b)};A.getActiveUniformBlockName=function(a,b){return A.context.getActiveUniformBlockName(a,b)};A.getActiveUniformBlockParameter=function(a,b,c){return A.context.getActiveUniformBlockParameter(a,b,c)};A.getActiveUniforms=function(a,b,c){return A.context.getActiveUniforms(a,
b,c)};A.getAttachedShaders=function(a){return A.context.getAttachedShaders(a)};A.getAttribLocation=function(a,b){return A.context.getAttribLocation(a,b)};A.getBufferParameter=function(a,b){return A.context.getBufferParameter(a,b)};A.getBufferSubDataWEBGL=function(a,b,c,d,f){var g=A.context;d!=null?g.getBufferSubData(a,b,c,d,f):g.getBufferSubData(a,b,c)};A.getContextAttributes=function(){return A.context.getContextAttributes()};A.getError=function(){return A.context.getError()};A.getExtension=function(a){return A.context.getExtension(a)};
A.getFragDataLocation=function(a,b){return A.context.getFragDataLocation(a,b)};A.getFramebufferAttachmentParameter=function(a,b,c){return A.context.getFramebufferAttachmentParameter(a,b,c)};A.getIndexedParameter=function(a,b){return A.context.getIndexedParameter(a,b)};A.getInternalformatParameter=function(a,b,c){return A.context.getInternalformatParameter(a,b,c)};A.getParameter=function(a){return A.context.getParameter(a)};A.getProgramInfoLog=function(a){return A.context.getProgramInfoLog(a)};A.getProgramParameter=
function(a,b){return A.context.getProgramParameter(a,b)};A.getQuery=function(a,b){return A.context.getQuery(a,b)};A.getQueryParameter=function(a,b){return A.context.getQueryParameter(a,b)};A.getRenderbufferParameter=function(a,b){return A.context.getRenderbufferParameter(a,b)};A.getSamplerParameter=function(a,b){return A.context.getSamplerParameter(a,b)};A.getShaderInfoLog=function(a){return A.context.getShaderInfoLog(a)};A.getShaderParameter=function(a,b){return A.context.getShaderParameter(a,b)};
A.getShaderPrecisionFormat=function(a,b){return A.context.getShaderPrecisionFormat(a,b)};A.getShaderSource=function(a){return A.context.getShaderSource(a)};A.getSupportedExtensions=function(){return A.context.getSupportedExtensions()};A.getSyncParameter=function(a,b){return A.context.getSyncParameter(a,b)};A.getTexParameter=function(a,b){return A.context.getTexParameter(a,b)};A.getTransformFeedbackVarying=function(a,b){return A.context.getTransformFeedbackVarying(a,b)};A.getUniform=function(a,b){return A.context.getUniform(a,
b)};A.getUniformBlockIndex=function(a,b){return A.context.getUniformBlockIndex(a,b)};A.getUniformIndices=function(a,b){return A.context.getUniformIndices(a,b)};A.getUniformLocation=function(a,b){return A.context.getUniformLocation(a,b)};A.getVertexAttrib=function(a,b){return A.context.getVertexAttrib(a,b)};A.getVertexAttribOffset=function(a,b){return Ci.fromFloat(A.context.getVertexAttribOffset(a,b))};A.hint=function(a,b){A.context.hint(a,b)};A.invalidateFramebuffer=function(a,b){A.context.invalidateFramebuffer(a,
b)};A.invalidateSubFramebuffer=function(a,b,c,d,f,g){A.context.invalidateSubFramebuffer(a,b,c,d,f,g)};A.isBuffer=function(a){return A.context.isBuffer(a)};A.isContextLost=function(){return A.context.isContextLost()};A.isEnabled=function(a){return A.context.isEnabled(a)};A.isFramebuffer=function(a){return A.context.isFramebuffer(a)};A.isProgram=function(a){return A.context.isProgram(a)};A.isQuery=function(a){return A.context.isQuery(a)};A.isRenderbuffer=function(a){return A.context.isRenderbuffer(a)};
A.isSampler=function(a){return A.context.isSampler(a)};A.isShader=function(a){return A.context.isShader(a)};A.isSync=function(a){return A.context.isSync(a)};A.isTexture=function(a){return A.context.isTexture(a)};A.isTransformFeedback=function(a){return A.context.isTransformFeedback(a)};A.isVertexArray=function(a){return A.context.isVertexArray(a)};A.lineWidth=function(a){A.context.lineWidth(a)};A.linkProgram=function(a){A.context.linkProgram(a)};A.pauseTransformFeedback=function(){A.context.pauseTransformFeedback()};
A.pixelStorei=function(a,b){A.context.pixelStorei(a,b)};A.polygonOffset=function(a,b){A.context.polygonOffset(a,b)};A.readBuffer=function(a){A.context.readBuffer(a)};A.readPixelsWEBGL=function(a,b,c,d,f,g,h,n){var l=A.context;n!=null?l.readPixels(a,b,c,d,f,g,h,n):l.readPixels(a,b,c,d,f,g,h)};A.renderbufferStorage=function(a,b,c,d){A.context.renderbufferStorage(a,b,c,d)};A.renderbufferStorageMultisample=function(a,b,c,d,f){A.context.renderbufferStorageMultisample(a,b,c,d,f)};A.resumeTransformFeedback=
function(){A.context.resumeTransformFeedback()};A.sampleCoverage=function(a,b){A.context.sampleCoverage(a,b)};A.samplerParameterf=function(a,b,c){A.context.samplerParameterf(a,b,c)};A.samplerParameteri=function(a,b,c){A.context.samplerParameteri(a,b,c)};A.scissor=function(a,b,c,d){A.context.scissor(a,b,c,d)};A.shaderSource=function(a,b){A.context.shaderSource(a,b)};A.stencilFunc=function(a,b,c){A.context.stencilFunc(a,b,c)};A.stencilFuncSeparate=function(a,b,c,d){A.context.stencilFuncSeparate(a,b,
c,d)};A.stencilMask=function(a){A.context.stencilMask(a)};A.stencilMaskSeparate=function(a,b){A.context.stencilMaskSeparate(a,b)};A.stencilOp=function(a,b,c){A.context.stencilOp(a,b,c)};A.stencilOpSeparate=function(a,b,c,d){A.context.stencilOpSeparate(a,b,c,d)};A.texImage2DWEBGL=function(a,b,c,d,f,g,h,n,l,q){var u=A.context;q!=null?u.texImage2D(a,b,c,d,f,g,h,n,l,q):h!=null?u.texImage2D(a,b,c,d,f,g,h,n,l):u.texImage2D(a,b,c,d,f,g)};A.texImage3DWEBGL=function(a,b,c,d,f,g,h,n,l,q,u){A.context.texImage3D(a,
b,c,d,f,g,h,n,l,q,u)};A.texStorage2D=function(a,b,c,d,f){A.context.texStorage2D(a,b,c,d,f)};A.texStorage3D=function(a,b,c,d,f,g){A.context.texStorage3D(a,b,c,d,f,g)};A.texParameterf=function(a,b,c){A.context.texParameterf(a,b,c)};A.texParameteri=function(a,b,c){A.context.texParameteri(a,b,c)};A.texSubImage2DWEBGL=function(a,b,c,d,f,g,h,n,l,q){var u=A.context;q!=null?u.texSubImage2D(a,b,c,d,f,g,h,n,l,q):n!=null?u.texSubImage2D(a,b,c,d,f,g,h,n,l):u.texSubImage2D(a,b,c,d,f,g,h)};A.texSubImage3DWEBGL=
function(a,b,c,d,f,g,h,n,l,q,u,v){A.context.texSubImage3D(a,b,c,d,f,g,h,n,l,q,u,v)};A.transformFeedbackVaryings=function(a,b,c){A.context.transformFeedbackVaryings(a,b,c)};A.uniform1f=function(a,b){A.context.uniform1f(a,b)};A.uniform1fvWEBGL=function(a,b,c,d){var f=A.context;c!=null?f.uniform1fv(a,b,c,d):f.uniform1fv(a,b)};A.uniform1i=function(a,b){A.context.uniform1i(a,b)};A.uniform1ivWEBGL=function(a,b,c,d){var f=A.context;c!=null?f.uniform1iv(a,b,c,d):f.uniform1iv(a,b)};A.uniform1ui=function(a,
b){A.context.uniform1ui(a,b)};A.uniform1uivWEBGL=function(a,b,c,d){A.context.uniform1uiv(a,b,c,d)};A.uniform2f=function(a,b,c){A.context.uniform2f(a,b,c)};A.uniform2fvWEBGL=function(a,b,c,d){Vz.uniform2fv(A.context,a,b,c,d)};A.uniform2i=function(a,b,c){A.context.uniform2i(a,b,c)};A.uniform2ivWEBGL=function(a,b,c,d){var f=A.context;c!=null?f.uniform2iv(a,b,c,d):f.uniform2iv(a,b)};A.uniform2ui=function(a,b,c){A.context.uniform2ui(a,b,c)};A.uniform2uivWEBGL=function(a,b,c,d){A.context.uniform2uiv(a,
b,c,d)};A.uniform3f=function(a,b,c,d){A.context.uniform3f(a,b,c,d)};A.uniform3fvWEBGL=function(a,b,c,d){var f=A.context;c!=null?f.uniform3fv(a,b,c,d):f.uniform3fv(a,b)};A.uniform3i=function(a,b,c,d){A.context.uniform3i(a,b,c,d)};A.uniform3ivWEBGL=function(a,b,c,d){var f=A.context;c!=null?f.uniform3iv(a,b,c,d):f.uniform3iv(a,b)};A.uniform3ui=function(a,b,c,d){A.context.uniform3ui(a,b,c,d)};A.uniform3uivWEBGL=function(a,b,c,d){A.context.uniform3uiv(a,b,c,d)};A.uniform4f=function(a,b,c,d,f){A.context.uniform4f(a,
b,c,d,f)};A.uniform4fvWEBGL=function(a,b,c,d){var f=A.context;c!=null?f.uniform4fv(a,b,c,d):f.uniform4fv(a,b)};A.uniform4i=function(a,b,c,d,f){A.context.uniform4i(a,b,c,d,f)};A.uniform4ivWEBGL=function(a,b,c,d){var f=A.context;c!=null?f.uniform4iv(a,b,c,d):f.uniform4iv(a,b)};A.uniform4ui=function(a,b,c,d,f){A.context.uniform4ui(a,b,c,d,f)};A.uniform4uivWEBGL=function(a,b,c,d){A.context.uniform4uiv(a,b,c,d)};A.uniformBlockBinding=function(a,b,c){A.context.uniformBlockBinding(a,b,c)};A.uniformMatrix2fvWEBGL=
function(a,b,c,d,f){var g=A.context;d!=null?g.uniformMatrix2fv(a,b,c,d,f):g.uniformMatrix2fv(a,b,c)};A.uniformMatrix2x3fvWEBGL=function(a,b,c,d,f){A.context.uniformMatrix2x3fv(a,b,c,d,f)};A.uniformMatrix2x4fvWEBGL=function(a,b,c,d,f){A.context.uniformMatrix2x4fv(a,b,c,d,f)};A.uniformMatrix3fvWEBGL=function(a,b,c,d,f){var g=A.context;d!=null?g.uniformMatrix3fv(a,b,c,d,f):g.uniformMatrix3fv(a,b,c)};A.uniformMatrix3x2fvWEBGL=function(a,b,c,d,f){A.context.uniformMatrix3x2fv(a,b,c,d,f)};A.uniformMatrix3x4fvWEBGL=
function(a,b,c,d,f){A.context.uniformMatrix3x4fv(a,b,c,d,f)};A.uniformMatrix4fvWEBGL=function(a,b,c,d,f){var g=A.context;d!=null?g.uniformMatrix4fv(a,b,c,d,f):g.uniformMatrix4fv(a,b,c)};A.uniformMatrix4x2fvWEBGL=function(a,b,c,d,f){A.context.uniformMatrix4x2fv(a,b,c,d,f)};A.uniformMatrix4x3fvWEBGL=function(a,b,c,d,f){A.context.uniformMatrix4x3fv(a,b,c,d,f)};A.useProgram=function(a){A.context.useProgram(a)};A.validateProgram=function(a){A.context.validateProgram(a)};A.vertexAttrib1f=function(a,b){A.context.vertexAttrib1f(a,
b)};A.vertexAttrib1fv=function(a,b){A.context.vertexAttrib1fv(a,b)};A.vertexAttrib1fvWEBGL=function(a,b){A.context.vertexAttrib1fv(a,b)};A.vertexAttrib2f=function(a,b,c){A.context.vertexAttrib2f(a,b,c)};A.vertexAttrib2fv=function(a,b){A.context.vertexAttrib2fv(a,b)};A.vertexAttrib2fvWEBGL=function(a,b){A.context.vertexAttrib2fv(a,b)};A.vertexAttrib3f=function(a,b,c,d){A.context.vertexAttrib3f(a,b,c,d)};A.vertexAttrib3fv=function(a,b){A.context.vertexAttrib3fv(a,b)};A.vertexAttrib3fvWEBGL=function(a,
b){A.context.vertexAttrib3fv(a,b)};A.vertexAttrib4f=function(a,b,c,d,f){A.context.vertexAttrib4f(a,b,c,d,f)};A.vertexAttrib4fv=function(a,b){A.context.vertexAttrib4fv(a,b)};A.vertexAttrib4fvWEBGL=function(a,b){A.context.vertexAttrib4fv(a,b)};A.vertexAttribDivisor=function(a,b){A.context.vertexAttribDivisor(a,b)};A.vertexAttribI4i=function(a,b,c,d,f){A.context.vertexAttribI4i(a,b,c,d,f)};A.vertexAttribI4iv=function(a,b){A.context.vertexAttribI4iv(a,b)};A.vertexAttribI4ivWEBGL=function(a,b){A.context.vertexAttribI4iv(a,
b)};A.vertexAttribI4ui=function(a,b,c,d,f){A.context.vertexAttribI4ui(a,b,c,d,f)};A.vertexAttribI4uiv=function(a,b){A.context.vertexAttribI4uiv(a,b)};A.vertexAttribI4uivWEBGL=function(a,b){A.context.vertexAttribI4uiv(a,b)};A.vertexAttribIPointer=function(a,b,c,d,f){A.context.vertexAttribIPointer(a,b,c,d,f)};A.vertexAttribPointer=function(a,b,c,d,f,g){A.context.vertexAttribPointer(a,b,c,d,f,g)};A.viewport=function(a,b,c,d){A.context.viewport(a,b,c,d)};A.waitSync=function(a,b,c){A.context.waitSync(a,
b,c)};A.__getObjectID=function(a){return a==null?0:a.id};var Ty=function(){this.STACK_UNDERFLOW=1284;this.STACK_OVERFLOW=1283;this.CONTEXT_FLAG_DEBUG_BIT=2;this.DEBUG_OUTPUT=37600;this.DEBUG_SEVERITY_LOW=37192;this.DEBUG_SEVERITY_MEDIUM=37191;this.DEBUG_SEVERITY_HIGH=37190;this.DEBUG_LOGGED_MESSAGES=37189;this.MAX_DEBUG_LOGGED_MESSAGES=37188;this.MAX_DEBUG_MESSAGE_LENGTH=37187;this.MAX_LABEL_LENGTH=33512;this.SAMPLER=33510;this.QUERY=33507;this.PROGRAM=33506;this.SHADER=33505;this.BUFFER=33504;this.DEBUG_GROUP_STACK_DEPTH=
33389;this.MAX_DEBUG_GROUP_STACK_DEPTH=33388;this.DEBUG_SEVERITY_NOTIFICATION=33387;this.DEBUG_TYPE_POP_GROUP=33386;this.DEBUG_TYPE_PUSH_GROUP=33385;this.DEBUG_TYPE_MARKER=33384;this.DEBUG_TYPE_OTHER=33361;this.DEBUG_TYPE_PERFORMANCE=33360;this.DEBUG_TYPE_PORTABILITY=33359;this.DEBUG_TYPE_UNDEFINED_BEHAVIOR=33358;this.DEBUG_TYPE_DEPRECATED_BEHAVIOR=33357;this.DEBUG_TYPE_ERROR=33356;this.DEBUG_SOURCE_OTHER=33355;this.DEBUG_SOURCE_APPLICATION=33354;this.DEBUG_SOURCE_THIRD_PARTY=33353;this.DEBUG_SOURCE_SHADER_COMPILER=
33352;this.DEBUG_SOURCE_WINDOW_SYSTEM=33351;this.DEBUG_SOURCE_API=33350;this.DEBUG_CALLBACK_USER_PARAM=33349;this.DEBUG_CALLBACK_FUNCTION=33348;this.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH=33347;this.DEBUG_OUTPUT_SYNCHRONOUS=33346};t["lime.graphics.opengl.ext.KHR_debug"]=Ty;Ty.__name__="lime.graphics.opengl.ext.KHR_debug";Ty.prototype={DEBUG_OUTPUT_SYNCHRONOUS:null,DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:null,DEBUG_CALLBACK_FUNCTION:null,DEBUG_CALLBACK_USER_PARAM:null,DEBUG_SOURCE_API:null,DEBUG_SOURCE_WINDOW_SYSTEM:null,
DEBUG_SOURCE_SHADER_COMPILER:null,DEBUG_SOURCE_THIRD_PARTY:null,DEBUG_SOURCE_APPLICATION:null,DEBUG_SOURCE_OTHER:null,DEBUG_TYPE_ERROR:null,DEBUG_TYPE_DEPRECATED_BEHAVIOR:null,DEBUG_TYPE_UNDEFINED_BEHAVIOR:null,DEBUG_TYPE_PORTABILITY:null,DEBUG_TYPE_PERFORMANCE:null,DEBUG_TYPE_OTHER:null,DEBUG_TYPE_MARKER:null,DEBUG_TYPE_PUSH_GROUP:null,DEBUG_TYPE_POP_GROUP:null,DEBUG_SEVERITY_NOTIFICATION:null,MAX_DEBUG_GROUP_STACK_DEPTH:null,DEBUG_GROUP_STACK_DEPTH:null,BUFFER:null,SHADER:null,PROGRAM:null,QUERY:null,
SAMPLER:null,MAX_LABEL_LENGTH:null,MAX_DEBUG_MESSAGE_LENGTH:null,MAX_DEBUG_LOGGED_MESSAGES:null,DEBUG_LOGGED_MESSAGES:null,DEBUG_SEVERITY_HIGH:null,DEBUG_SEVERITY_MEDIUM:null,DEBUG_SEVERITY_LOW:null,DEBUG_OUTPUT:null,CONTEXT_FLAG_DEBUG_BIT:null,STACK_OVERFLOW:null,STACK_UNDERFLOW:null,__class__:Ty};var xf={__properties__:{set_redOffset:"set_redOffset",get_redOffset:"get_redOffset",set_redMultiplier:"set_redMultiplier",get_redMultiplier:"get_redMultiplier",set_greenOffset:"set_greenOffset",get_greenOffset:"get_greenOffset",
set_greenMultiplier:"set_greenMultiplier",get_greenMultiplier:"get_greenMultiplier",set_color:"set_color",get_color:"get_color",set_blueOffset:"set_blueOffset",get_blueOffset:"get_blueOffset",set_blueMultiplier:"set_blueMultiplier",get_blueMultiplier:"get_blueMultiplier",set_alphaOffset:"set_alphaOffset",get_alphaOffset:"get_alphaOffset",set_alphaMultiplier:"set_alphaMultiplier",get_alphaMultiplier:"get_alphaMultiplier"},_new:function(a){if(a==null||a.length!=20)a=xf.__identity,a=a!=null?new Float32Array(a):
null;return a},clone:function(a){a=el.toArrayBufferView(a);a=a!=null?new Float32Array(a):null;return xf._new(a)},concat:function(a,b){a[0]+=b[0];a[6]+=b[6];a[12]+=b[12];a[18]+=b[18]},copyFrom:function(a,b){a.set(b)},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=0;a[6]=1;a[7]=0;a[8]=0;a[9]=0;a[10]=0;a[11]=0;a[12]=1;a[13]=0;a[14]=0;a[15]=0;a[16]=0;a[17]=0;a[18]=1;a[19]=0},getAlphaTable:function(a){xf.__alphaTable==null&&(xf.__alphaTable=new Uint8Array(256));xf.__alphaTable[0]=0;for(var b=
1;b<256;){var c=b++;var d=Math.floor(c*a[18]+a[19]*255);d>255&&(d=255);d<0&&(d=0);xf.__alphaTable[c]=d}return xf.__alphaTable},getBlueTable:function(a){xf.__blueTable==null&&(xf.__blueTable=new Uint8Array(256));for(var b,c=0;c<256;){var d=c++;b=Math.floor(d*a[12]+a[14]*255);b>255&&(b=255);b<0&&(b=0);xf.__blueTable[d]=b}return xf.__blueTable},getGreenTable:function(a){xf.__greenTable==null&&(xf.__greenTable=new Uint8Array(256));for(var b,c=0;c<256;){var d=c++;b=Math.floor(d*a[6]+a[9]*255);b>255&&(b=
255);b<0&&(b=0);xf.__greenTable[d]=b}return xf.__greenTable},getRedTable:function(a){xf.__redTable==null&&(xf.__redTable=new Uint8Array(256));for(var b,c=0;c<256;){var d=c++;b=Math.floor(d*a[0]+a[4]*255);b>255&&(b=255);b<0&&(b=0);xf.__redTable[d]=b}return xf.__redTable},__toFlashColorTransform:function(a){return null},get_alphaMultiplier:function(a){return a[18]},set_alphaMultiplier:function(a,b){return a[18]=b},get_alphaOffset:function(a){return a[19]*255},set_alphaOffset:function(a,b){return a[19]=
b/255},get_blueMultiplier:function(a){return a[12]},set_blueMultiplier:function(a,b){return a[12]=b},get_blueOffset:function(a){return a[14]*255},set_blueOffset:function(a,b){return a[14]=b/255},get_color:function(a){return(a[4]*255|0)<<16|(a[9]*255|0)<<8|a[14]*255|0},set_color:function(a,b){a[4]=(b>>16&255)/255;a[9]=(b>>8&255)/255;a[14]=(b&255)/255;a[0]=0;a[6]=0;a[12]=0;return xf.get_color(a)},get_greenMultiplier:function(a){return a[6]},set_greenMultiplier:function(a,b){return a[6]=b},get_greenOffset:function(a){return a[9]*
255},set_greenOffset:function(a,b){return a[9]=b/255},get_redMultiplier:function(a){return a[0]},set_redMultiplier:function(a,b){return a[0]=b},get_redOffset:function(a){return a[4]*255},set_redOffset:function(a,b){return a[4]=b/255},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},gw=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=f;this.ty=g};t["lime.math.CairoMatrix3"]=
gw;gw.__name__="lime.math.CairoMatrix3";gw.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__class__:gw};var wb={__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"},_new:function(a){if(a==null||a.length!=16)a=wb.__identity,a=a!=null?new Float32Array(a):null;return a},append:function(a,b){var c=a[0],d=a[4],f=a[8],g=a[12],h=a[1],n=a[5],l=a[9],q=a[13],u=a[2],v=a[6],z=a[10],r=a[14],F=a[3],J=a[7],L=a[11],Q=a[15],W=wb.get(b,0),ka=wb.get(b,4),
ha=wb.get(b,8),ta=wb.get(b,12),za=wb.get(b,1),eb=wb.get(b,5),db=wb.get(b,9),Ra=wb.get(b,13),vb=wb.get(b,2),bb=wb.get(b,6),Tb=wb.get(b,10),Eb=wb.get(b,14),Lb=wb.get(b,3),vc=wb.get(b,7),zd=wb.get(b,11);b=wb.get(b,15);a[0]=c*W+h*ka+u*ha+F*ta;a[1]=c*za+h*eb+u*db+F*Ra;a[2]=c*vb+h*bb+u*Tb+F*Eb;a[3]=c*Lb+h*vc+u*zd+F*b;a[4]=d*W+n*ka+v*ha+J*ta;a[5]=d*za+n*eb+v*db+J*Ra;a[6]=d*vb+n*bb+v*Tb+J*Eb;a[7]=d*Lb+n*vc+v*zd+J*b;a[8]=f*W+l*ka+z*ha+L*ta;a[9]=f*za+l*eb+z*db+L*Ra;a[10]=f*vb+l*bb+z*Tb+L*Eb;a[11]=f*Lb+l*vc+
z*zd+L*b;a[12]=g*W+q*ka+r*ha+Q*ta;a[13]=g*za+q*eb+r*db+Q*Ra;a[14]=g*vb+q*bb+r*Tb+Q*Eb;a[15]=g*Lb+q*vc+r*zd+Q*b},appendRotation:function(a,b,c,d){b=wb.__getAxisRotation(a,c.x,c.y,c.z,b);d!=null&&wb.appendTranslation(b,d.x,d.y,d.z);wb.append(a,b)},appendScale:function(a,b,c,d){b=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];b=b!=null?new Float32Array(b):null;wb.append(a,wb._new(b))},appendTranslation:function(a,b,c,d){a[12]+=b;a[13]+=c;a[14]+=d},clone:function(a){a=el.toArrayBufferView(a);a=a!=null?new Float32Array(a):
null;return wb._new(a)},copyColumnFrom:function(a,b,c){switch(b){case 0:a[0]=c.x;a[1]=c.y;a[2]=c.z;a[3]=c.w;break;case 1:a[4]=c.x;a[5]=c.y;a[6]=c.z;a[7]=c.w;break;case 2:a[8]=c.x;a[9]=c.y;a[10]=c.z;a[11]=c.w;break;case 3:a[12]=c.x;a[13]=c.y;a[14]=c.z;a[15]=c.w;break;default:Vb.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:187,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnFrom"})}},copyColumnTo:function(a,b,c){switch(b){case 0:c.x=a[0];
c.y=a[1];c.z=a[2];c.w=a[3];break;case 1:c.x=a[4];c.y=a[5];c.z=a[6];c.w=a[7];break;case 2:c.x=a[8];c.y=a[9];c.z=a[10];c.w=a[11];break;case 3:c.x=a[12];c.y=a[13];c.z=a[14];c.w=a[15];break;default:Vb.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:225,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnTo"})}},copyFrom:function(a,b){a.set(b)},copyRowFrom:function(a,b,c){switch(b){case 0:a[0]=c.x;a[4]=c.y;a[8]=c.z;a[12]=c.w;break;case 1:a[1]=c.x;
a[5]=c.y;a[9]=c.z;a[13]=c.w;break;case 2:a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=c.w;break;case 3:a[3]=c.x;a[7]=c.y;a[11]=c.z;a[15]=c.w;break;default:Vb.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:272,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowFrom"})}},copyRowTo:function(a,b,c){switch(b){case 0:c.x=a[0];c.y=a[4];c.z=a[8];c.w=a[12];break;case 1:c.x=a[1];c.y=a[5];c.z=a[9];c.w=a[13];break;case 2:c.x=a[2];c.y=a[6];c.z=a[10];c.w=a[14];break;case 3:c.x=
a[3];c.y=a[7];c.z=a[11];c.w=a[15];break;default:Vb.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:310,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowTo"})}},create2D:function(a,b,c,d,f,g,h){h==null&&(h=0);g==null&&(g=0);a[0]=b;a[1]=c;a[2]=0;a[3]=0;a[4]=d;a[5]=f;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=g;a[13]=h;a[14]=0;a[15]=1},createOrtho:function(a,b,c,d,f,g,h){var n=1/(c-b),l=1/(f-d),q=1/(h-g);a[0]=2*n;a[1]=0;a[2]=0;a[3]=0;a[4]=
0;a[5]=2*l;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=-2*q;a[11]=0;a[12]=-(b+c)*n;a[13]=-(d+f)*l;a[14]=-(g+h)*q;a[15]=1},createPerspective:function(a,b,c,d,f){if(c>-1E-7&&c<1E-7)throw ba.thrown("Aspect ratio may not be 0");b*=d;var g=-b;c*=b;var h=-c;a[0]=2*d/(c-h);a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=2*d/(b-g);a[6]=0;a[7]=0;a[8]=(c+h)/(c-h);a[9]=(b+g)/(b-g);a[10]=-(f+d)/(f-d);a[11]=-1;a[12]=0;a[13]=0;a[14]=-2*f*d/(f-d);a[15]=1},deltaTransformVector:function(a,b,c){c==null&&(c=new ge);var d=b.x,f=b.y;b=b.z;c.x=
d*a[0]+f*a[4]+b*a[8]+a[3];c.y=d*a[1]+f*a[5]+b*a[9]+a[7];c.z=d*a[2]+f*a[6]+b*a[10]+a[11];return c},fromMatrix3:function(a){var b=wb._new();wb.create2D(b,a[0],a[1],a[3],a[4],a[6],a[7]);return b},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1},interpolate:function(a,b,c,d){d==null&&(d=wb._new());for(var f=0;f<16;){var g=f++;wb.set(d,g,wb.get(a,g)+(wb.get(b,g)-wb.get(a,g))*c)}return d},interpolateTo:function(a,
b,c){for(var d=0;d<16;){var f=d++;a[f]+=(wb.get(b,f)-a[f])*c}},invert:function(a){var b=wb.get_determinant(a),c=Math.abs(b)>1E-11;if(c){b=1/b;var d=a[0],f=a[4],g=a[8],h=a[12],n=a[1],l=a[5],q=a[9],u=a[13],v=a[2],z=a[6],r=a[10],F=a[14],J=a[3],L=a[7],Q=a[11],W=a[15];a[0]=b*(l*(r*W-F*Q)-q*(z*W-F*L)+u*(z*Q-r*L));a[1]=-b*(n*(r*W-F*Q)-q*(v*W-F*J)+u*(v*Q-r*J));a[2]=b*(n*(z*W-F*L)-l*(v*W-F*J)+u*(v*L-z*J));a[3]=-b*(n*(z*Q-r*L)-l*(v*Q-r*J)+q*(v*L-z*J));a[4]=-b*(f*(r*W-F*Q)-g*(z*W-F*L)+h*(z*Q-r*L));a[5]=b*(d*
(r*W-F*Q)-g*(v*W-F*J)+h*(v*Q-r*J));a[6]=-b*(d*(z*W-F*L)-f*(v*W-F*J)+h*(v*L-z*J));a[7]=b*(d*(z*Q-r*L)-f*(v*Q-r*J)+g*(v*L-z*J));a[8]=b*(f*(q*W-u*Q)-g*(l*W-u*L)+h*(l*Q-q*L));a[9]=-b*(d*(q*W-u*Q)-g*(n*W-u*J)+h*(n*Q-q*J));a[10]=b*(d*(l*W-u*L)-f*(n*W-u*J)+h*(n*L-l*J));a[11]=-b*(d*(l*Q-q*L)-f*(n*Q-q*J)+g*(n*L-l*J));a[12]=-b*(f*(q*F-u*r)-g*(l*F-u*z)+h*(l*r-q*z));a[13]=b*(d*(q*F-u*r)-g*(n*F-u*v)+h*(n*r-q*v));a[14]=-b*(d*(l*F-u*z)-f*(n*F-u*v)+h*(n*z-l*v));a[15]=b*(d*(l*r-q*z)-f*(n*r-q*v)+g*(n*z-l*v))}return c},
pointAt:function(a,b,c,d){c==null&&(c=new ge(0,0,1));d==null&&(d=new ge(0,1,0));var f=null;f==null&&(f=new ge);f.x=b.x-c.x;f.y=b.y-c.y;f.z=b.z-c.z;c=f;d=new ge(d.x,d.y,d.z,d.w);f=Math.sqrt(c.x*c.x+c.y*c.y+c.z*c.z);f!=0&&(c.x/=f,c.y/=f,c.z/=f);f=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z);f!=0&&(d.x/=f,d.y/=f,d.z/=f);var g=new ge(c.x,c.y,c.z,c.w);f=d.x*c.x+d.y*c.y+d.z*c.z;g.x*=f;g.y*=f;g.z*=f;f=null;f==null&&(f=new ge);f.x=d.x-g.x;f.y=d.y-g.y;f.z=d.z-g.z;d=f;Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)>0?(f=Math.sqrt(d.x*
d.x+d.y*d.y+d.z*d.z),f!=0&&(d.x/=f,d.y/=f,d.z/=f)):d=c.x!=0?new ge(-c.y,c.x,0):new ge(1,0,0);f=null;f==null&&(f=new ge);g=d.z*c.x-d.x*c.z;var h=d.x*c.y-d.y*c.x;f.x=d.y*c.z-d.z*c.y;f.y=g;f.z=h;f.w=1;g=f;f=Math.sqrt(g.x*g.x+g.y*g.y+g.z*g.z);f!=0&&(g.x/=f,g.y/=f,g.z/=f);a[0]=g.x;a[4]=g.y;a[8]=g.z;a[12]=0;a[1]=d.x;a[5]=d.y;a[9]=d.z;a[13]=0;a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=0;a[3]=b.x;a[7]=b.y;a[11]=b.z;a[15]=1},prepend:function(a,b){var c=wb.get(b,0),d=wb.get(b,4),f=wb.get(b,8),g=wb.get(b,12),h=wb.get(b,
1),n=wb.get(b,5),l=wb.get(b,9),q=wb.get(b,13),u=wb.get(b,2),v=wb.get(b,6),z=wb.get(b,10),r=wb.get(b,14),F=wb.get(b,3),J=wb.get(b,7),L=wb.get(b,11);b=wb.get(b,15);var Q=a[0],W=a[4],ka=a[8],ha=a[12],ta=a[1],za=a[5],eb=a[9],db=a[13],Ra=a[2],vb=a[6],bb=a[10],Tb=a[14],Eb=a[3],Lb=a[7],vc=a[11],zd=a[15];a[0]=c*Q+h*W+u*ka+F*ha;a[1]=c*ta+h*za+u*eb+F*db;a[2]=c*Ra+h*vb+u*bb+F*Tb;a[3]=c*Eb+h*Lb+u*vc+F*zd;a[4]=d*Q+n*W+v*ka+J*ha;a[5]=d*ta+n*za+v*eb+J*db;a[6]=d*Ra+n*vb+v*bb+J*Tb;a[7]=d*Eb+n*Lb+v*vc+J*zd;a[8]=f*
Q+l*W+z*ka+L*ha;a[9]=f*ta+l*za+z*eb+L*db;a[10]=f*Ra+l*vb+z*bb+L*Tb;a[11]=f*Eb+l*Lb+z*vc+L*zd;a[12]=g*Q+q*W+r*ka+b*ha;a[13]=g*ta+q*za+r*eb+b*db;a[14]=g*Ra+q*vb+r*bb+b*Tb;a[15]=g*Eb+q*Lb+r*vc+b*zd},prependRotation:function(a,b,c,d){b=wb.__getAxisRotation(a,c.x,c.y,c.z,b);d!=null&&wb.appendTranslation(b,d.x,d.y,d.z);wb.prepend(a,b)},prependScale:function(a,b,c,d){b=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];b=b!=null?new Float32Array(b):null;wb.prepend(a,wb._new(b))},prependTranslation:function(a,b,c,d){var f=
wb._new();wb.set_position(f,new ge(b,c,d));wb.prepend(a,f)},transformVector:function(a,b,c){c==null&&(c=new ge);var d=b.x,f=b.y;b=b.z;c.x=d*a[0]+f*a[4]+b*a[8]+a[12];c.y=d*a[1]+f*a[5]+b*a[9]+a[13];c.z=d*a[2]+f*a[6]+b*a[10]+a[14];c.w=d*a[3]+f*a[7]+b*a[11]+a[15];return c},transformVectors:function(a,b,c){for(var d=0,f,g,h;d+3<=b.length;)f=b[d],g=b[d+1],h=b[d+2],c[d]=f*a[0]+g*a[4]+h*a[8]+a[12],c[d+1]=f*a[1]+g*a[5]+h*a[9]+a[13],c[d+2]=f*a[2]+g*a[6]+h*a[10]+a[14],d+=3},transpose:function(a){var b=a[1];
a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b},__getAxisRotation:function(a,b,c,d,f){a=wb._new();b=new ge(b,c,d);f=Math.PI/180*-f;d=Math.cos(f);f=Math.sin(f);c=1-d;wb.set(a,0,d+b.x*b.x*c);wb.set(a,5,d+b.y*b.y*c);wb.set(a,10,d+b.z*b.z*c);d=b.x*b.y*c;var g=b.z*f;wb.set(a,4,d+g);wb.set(a,1,d-g);d=b.x*b.z*c;g=b.y*f;wb.set(a,8,d-g);wb.set(a,2,d+g);d=b.y*b.z*c;g=b.x*f;wb.set(a,9,d+g);wb.set(a,6,d-g);return a},
__swap:function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d},get_determinant:function(a){return(a[0]*a[5]-a[4]*a[1])*(a[10]*a[15]-a[14]*a[11])-(a[0]*a[9]-a[8]*a[1])*(a[6]*a[15]-a[14]*a[7])+(a[0]*a[13]-a[12]*a[1])*(a[6]*a[11]-a[10]*a[7])+(a[4]*a[9]-a[8]*a[5])*(a[2]*a[15]-a[14]*a[3])-(a[4]*a[13]-a[12]*a[5])*(a[2]*a[11]-a[10]*a[3])+(a[8]*a[13]-a[12]*a[9])*(a[2]*a[7]-a[6]*a[3])},get_position:function(a){return new ge(a[12],a[13],a[14])},set_position:function(a,b){a[12]=b.x;a[13]=b.y;a[14]=b.z;return b},get:function(a,
b){return a[b]},set:function(a,b,c){return a[b]=c}},X={__properties__:{set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"},_new:function(a){a==null&&(a=0);return a},create:function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255},multiplyAlpha:function(a){(a&255)!=0&&(a&255)!=255&&(X.a16=X.__alpha16[a&255])},readUInt8:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);switch(d){case 0:a=(b[c]&255)<<24|(b[c+1]&255)<<16|(b[c+2]&255)<<
8|b[c+3]&255;break;case 1:a=(b[c+1]&255)<<24|(b[c+2]&255)<<16|(b[c+3]&255)<<8|b[c]&255;break;case 2:a=(b[c+2]&255)<<24|(b[c+1]&255)<<16|(b[c]&255)<<8|b[c+3]&255}f&&(a&255)!=0&&(a&255)!=255&&(X.unmult=255/(a&255))},set:function(a,b,c,d,f){},unmultiplyAlpha:function(a){(a&255)!=0&&(a&255)!=255&&(X.unmult=255/(a&255))},writeUInt8:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);f&&((a&255)==0?a!=0&&(a=0):(a&255)!=255&&(X.a16=X.__alpha16[a&255],a=((a>>>24&255)*X.a16>>16&255)<<24|((a>>>16&255)*X.a16>>
16&255)<<16|((a>>>8&255)*X.a16>>16&255)<<8|a&255));switch(d){case 0:b[c]=a>>>24&255;b[c+1]=a>>>16&255;b[c+2]=a>>>8&255;b[c+3]=a&255;break;case 1:b[c]=a&255;b[c+1]=a>>>24&255;b[c+2]=a>>>16&255;b[c+3]=a>>>8&255;break;case 2:b[c]=a>>>8&255,b[c+1]=a>>>16&255,b[c+2]=a>>>24&255,b[c+3]=a&255}},__fromARGB:function(a){return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255},__fromBGRA:function(a){return(a>>>8&255)<<24|(a>>>16&255)<<16|(a>>>24&255)<<8|a&255},get_a:function(a){return a&255},set_a:function(a,
b){return b},get_b:function(a){return a>>>8&255},set_b:function(a,b){return b},get_g:function(a){return a>>>16&255},set_g:function(a,b){return b},get_r:function(a){return a>>>24&255},set_r:function(a,b){return b}},of=function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};t["lime.math.Rectangle"]=of;of.__name__="lime.math.Rectangle";of.prototype={height:null,width:null,x:null,y:null,clone:function(){return new of(this.x,this.y,this.width,
this.height)},contains:function(a,b){return a>=this.x&&b>=this.y&&a<this.get_right()?b<this.get_bottom():!1},containsPoint:function(a){return this.containsVector(a)},containsRect:function(a){return a.width<=0||a.height<=0?a.x>this.x&&a.y>this.y&&a.get_right()<this.get_right()?a.get_bottom()<this.get_bottom():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():!1},containsVector:function(a){return this.contains(a.x,a.y)},copyFrom:function(a){this.x=a.x;this.y=
a.y;this.width=a.width;this.height=a.height},equals:function(a){return a!=null&&this.x==a.x&&this.y==a.y&&this.width==a.width?this.height==a.height:!1},inflate:function(a,b){this.x-=a;this.width+=a*2;this.y-=b;this.height+=b*2},inflateVector:function(a){this.inflate(a.x,a.y)},intersection:function(a,b){b==null&&(b=new of);var c=this.x<a.x?a.x:this.x,d=this.get_right()>a.get_right()?a.get_right():this.get_right();if(d<=c)return b.setEmpty(),b;var f=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?
a.get_bottom():this.get_bottom();if(a<=f)return b.setEmpty(),b;b.x=c;b.y=f;b.width=d-c;b.height=a-f;return b},intersects:function(a){var b=this.x<a.x?a.x:this.x;if((this.get_right()>a.get_right()?a.get_right():this.get_right())<=b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return this.width<=0?!0:this.height<=0},offset:function(a,b){this.x+=a;this.y+=b},offsetVector:function(a){this.x+=a.x;this.y+=a.y},setEmpty:function(){this.x=
this.y=this.width=this.height=0},setTo:function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d},union:function(a,b){b==null&&(b=new of);if(this.width==0||this.height==0)b.copyFrom(a);else if(a.width==0||a.height==0)b.copyFrom(this);else{var c=this.x>a.x?a.x:this.x,d=this.get_right()<a.get_right()?a.get_right():this.get_right(),f=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();b.setTo(c,f,d-c,a-f)}return b},__toFlashRectangle:function(){return null},
get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new Uf(this.x+this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=a-this.x;return this.x=a},get_right:function(){return this.x+this.width},set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new Uf(this.width,
this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},get_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_topLeft:function(){return new Uf(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:of,__properties__:{set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",
get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}};var Uf=function(a,b){b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b};t["lime.math.Vector2"]=Uf;Uf.__name__="lime.math.Vector2";Uf.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Uf.interpolate=function(a,b,c,d){d==null&&(d=new Uf);d.x=b.x+c*(a.x-b.x);d.y=b.y+c*(a.y-b.y);return d};Uf.polar=function(a,b,c){c==null&&(c=new Uf);var d=a*Math.sin(b);
c.x=a*Math.cos(b);c.y=d;return c};Uf.prototype={x:null,y:null,add:function(a,b){b==null&&(b=new Uf);b.x=a.x+this.x;b.y=a.y+this.y;return b},clone:function(){return new Uf(this.x,this.y)},equals:function(a){return a!=null&&a.x==this.x?a.y==this.y:!1},normalize:function(a){if(this.x!=0||this.y!=0)a/=Math.sqrt(this.x*this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=a;this.y+=b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a,b){b==null&&(b=new Uf);b.x=this.x-a.x;b.y=
this.y-a.y;return b},__toFlashPoint:function(){return null},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y},__class__:Uf,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var ge=function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.w=d;this.x=a;this.y=b;this.z=c};t["lime.math.Vector4"]=ge;ge.__name__="lime.math.Vector4";ge.__properties__={get_Z_AXIS:"get_Z_AXIS",
get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};ge.angleBetween=function(a,b){a=new ge(a.x,a.y,a.z,a.w);var c=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);c!=0&&(a.x/=c,a.y/=c,a.z/=c);b=new ge(b.x,b.y,b.z,b.w);c=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z);c!=0&&(b.x/=c,b.y/=c,b.z/=c);return Math.acos(a.x*b.x+a.y*b.y+a.z*b.z)};ge.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*c+d*d+a*a)};ge.distanceSquared=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return c*c+d*d+a*a};ge.get_X_AXIS=
function(){return new ge(1,0,0)};ge.get_Y_AXIS=function(){return new ge(0,1,0)};ge.get_Z_AXIS=function(){return new ge(0,0,1)};ge.prototype={w:null,x:null,y:null,z:null,add:function(a,b){b==null&&(b=new ge);b.x=this.x+a.x;b.y=this.y+a.y;b.z=this.z+a.z;return b},clone:function(){return new ge(this.x,this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a,b){b==null&&(b=new ge);var c=this.z*a.x-this.x*a.z,d=this.x*a.y-this.y*a.x;b.x=this.y*a.z-this.z*a.y;
b.y=c;b.z=d;b.w=1;return b},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){b==null&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z?b?this.w==a.w:!0:!1},incrementBy:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){c==null&&(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-a.y)<b&&Math.abs(this.z-a.z)<b?c?Math.abs(this.w-a.w)<b:!0:!1},negate:function(){this.x*=-1;this.y*=
-1;this.z*=-1},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);a!=0&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a,b){b==null&&(b=new ge);b.x=this.x-a.x;b.y=this.y-a.y;b.z=this.z-a.z;return b},toString:function(){return"Vector4("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*
this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:ge,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var qe=function(){};t["lime.media.AudioBuffer"]=qe;qe.__name__="lime.media.AudioBuffer";qe.fromBase64=function(a){if(a==null)return null;a.indexOf(",")==-1&&(a="data:"+qe.__getCodec(rj.decode(a))+";base64,"+a);var b=new qe;b.set_src(new Howl({src:[a],html5:!0,preload:!1}));return b};qe.fromBytes=
function(a){if(a==null)return null;var b=new qe;b.set_src(new Howl({src:["data:"+qe.__getCodec(a)+";base64,"+rj.encode(a)],html5:!0,preload:!1}));return b};qe.fromFile=function(a){if(a==null)return null;var b=new qe;b.__srcHowl=new Howl({src:[a],preload:!1});return b};qe.fromFiles=function(a){var b=new qe;b.__srcHowl=new Howl({src:a,preload:!1});return b};qe.fromVorbisFile=function(a){return null};qe.loadFromFile=function(a){var b=new Mf,c=qe.fromFile(a);c!=null?c!=null&&(c.__srcHowl.on("load",function(){b.complete(c)}),
c.__srcHowl.on("loaderror",function(d,f){b.error(f)}),c.__srcHowl.load()):b.error(null);return b.future};qe.loadFromFiles=function(a){var b=new Mf,c=qe.fromFiles(a);c!=null?(c.__srcHowl.on("load",function(){b.complete(c)}),c.__srcHowl.on("loaderror",function(){b.error(null)}),c.__srcHowl.load()):b.error(null);return b.future};qe.__getCodec=function(a){var b=null;try{b=a.getString(0,4)}catch(d){Pb.lastError=d}switch(b){case "OggS":return"audio/ogg";case "RIFF":if(a.getString(8,4)=="WAVE")return"audio/wav";
b=a.b[1];var c=a.b[2];switch(a.b[0]){case 73:if(b==68&&c==51)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}break;case "fLaC":return"audio/flac";default:switch(b=a.b[1],c=a.b[2],a.b[0]){case 73:if(b==68&&c==51)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}}Vb.error("Unsupported sound format",{fileName:"lime/media/AudioBuffer.hx",lineNumber:450,className:"lime.media.AudioBuffer",methodName:"__getCodec"});return null};
qe.prototype={bitsPerSample:null,channels:null,data:null,sampleRate:null,__srcAudio:null,__srcBuffer:null,__srcCustom:null,__srcHowl:null,__srcSound:null,__srcVorbisFile:null,dispose:function(){this.__srcHowl.unload()},get_src:function(){return this.__srcHowl},set_src:function(a){return this.__srcHowl=a},__class__:qe,__properties__:{set_src:"set_src",get_src:"get_src"}};var fw=function(a){if(a!="custom"){if(a==null||a=="web")try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.web=
new window.AudioContext,this.type="web"}catch(b){Pb.lastError=b}this.web==null&&a!="web"&&(this.html5=new Wx,this.type="html5")}else this.type="custom"};t["lime.media.AudioContext"]=fw;fw.__name__="lime.media.AudioContext";fw.prototype={custom:null,flash:null,html5:null,openal:null,type:null,web:null,__class__:fw};var dw=function(a,b,c,d){d==null&&(d=0);b==null&&(b=0);this.onComplete=new jf;this.buffer=a;this.offset=b;this.__backend=new Ex(this);c!=null&&c!=0&&this.set_length(c);this.set_loops(d);
a!=null&&this.init()};t["lime.media.AudioSource"]=dw;dw.__name__="lime.media.AudioSource";dw.prototype={onComplete:null,buffer:null,offset:null,__backend:null,dispose:function(){this.__backend.dispose()},init:function(){this.__backend.init()},play:function(){this.__backend.play()},pause:function(){this.__backend.pause()},stop:function(){this.__backend.stop()},get_currentTime:function(){return this.__backend.getCurrentTime()},set_currentTime:function(a){return this.__backend.setCurrentTime(a)},get_gain:function(){return this.__backend.getGain()},
set_gain:function(a){return this.__backend.setGain(a)},get_length:function(){return this.__backend.getLength()},set_length:function(a){return this.__backend.setLength(a)},get_loops:function(){return this.__backend.getLoops()},set_loops:function(a){return this.__backend.setLoops(a)},get_pitch:function(){return this.__backend.getPitch()},set_pitch:function(a){return this.__backend.setPitch(a)},get_position:function(){return this.__backend.getPosition()},set_position:function(a){return this.__backend.setPosition(a)},
__class__:dw,__properties__:{set_position:"set_position",get_position:"get_position",set_pitch:"set_pitch",get_pitch:"get_pitch",set_loops:"set_loops",get_loops:"get_loops",set_length:"set_length",get_length:"get_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}};var Uy=function(){};t["lime.media.FlashAudioContext"]=Uy;Uy.__name__="lime.media.FlashAudioContext";Uy.prototype={createBuffer:function(a,b){return null},getBytesLoaded:function(a){return 0},
getBytesTotal:function(a){return 0},getID3:function(a){return null},getIsBuffering:function(a){return!1},getIsURLInaccessible:function(a){return!1},getLength:function(a){return 0},getURL:function(a){return null},close:function(a){},extract:function(a,b,c,d){return 0},load:function(a,b,c){},loadCompressedDataFromByteArray:function(a,b,c){},loadPCMFromByteArray:function(a,b,c,d,f,g){},play:function(a,b,c,d){return null},__class__:Uy};var Wx=function(){this.NETWORK_NO_SOURCE=3;this.NETWORK_LOADING=2;
this.NETWORK_IDLE=1;this.HAVE_NOTHING=this.NETWORK_EMPTY=0;this.HAVE_METADATA=1;this.HAVE_FUTURE_DATA=3;this.HAVE_ENOUGH_DATA=4;this.HAVE_CURRENT_DATA=2};t["lime.media.HTML5AudioContext"]=Wx;Wx.__name__="lime.media.HTML5AudioContext";Wx.prototype={HAVE_CURRENT_DATA:null,HAVE_ENOUGH_DATA:null,HAVE_FUTURE_DATA:null,HAVE_METADATA:null,HAVE_NOTHING:null,NETWORK_EMPTY:null,NETWORK_IDLE:null,NETWORK_LOADING:null,NETWORK_NO_SOURCE:null,canPlayType:function(a,b){return a.__srcAudio!=null?a.__srcAudio.canPlayType(b):
null},createBuffer:function(a){var b=new qe;b.__srcAudio=new Audio;b.__srcAudio.src=a;return b},getAutoplay:function(a){return a.__srcAudio!=null?a.__srcAudio.autoplay:!1},getBuffered:function(a){return a.__srcAudio!=null?a.__srcAudio.buffered:null},getCurrentSrc:function(a){return a.__srcAudio!=null?a.__srcAudio.currentSrc:null},getCurrentTime:function(a){return a.__srcAudio!=null?a.__srcAudio.currentTime:0},getDefaultPlaybackRate:function(a){return a.__srcAudio!=null?a.__srcAudio.defaultPlaybackRate:
1},getDuration:function(a){return a.__srcAudio!=null?a.__srcAudio.duration:0},getEnded:function(a){return a.__srcAudio!=null?a.__srcAudio.ended:!1},getError:function(a){return a.__srcAudio!=null?a.__srcAudio.error:null},getLoop:function(a){return a.__srcAudio!=null?a.__srcAudio.loop:!1},getMuted:function(a){return a.__srcAudio!=null?a.__srcAudio.muted:!1},getNetworkState:function(a){return a.__srcAudio!=null?a.__srcAudio.networkState:0},getPaused:function(a){return a.__srcAudio!=null?a.__srcAudio.paused:
!1},getPlaybackRate:function(a){return a.__srcAudio!=null?a.__srcAudio.playbackRate:1},getPlayed:function(a){return a.__srcAudio!=null?a.__srcAudio.played:null},getPreload:function(a){return a.__srcAudio!=null?a.__srcAudio.preload:null},getReadyState:function(a){return a.__srcAudio!=null?a.__srcAudio.readyState:0},getSeekable:function(a){return a.__srcAudio!=null?a.__srcAudio.seekable:null},getSeeking:function(a){return a.__srcAudio!=null?a.__srcAudio.seeking:!1},getSrc:function(a){return a.__srcAudio!=
null?a.__srcAudio.src:null},getStartTime:function(a){return a.__srcAudio!=null?a.__srcAudio.playbackRate:0},getVolume:function(a){return a.__srcAudio!=null?a.__srcAudio.volume:1},load:function(a){a.__srcAudio!=null&&a.__srcAudio.load()},pause:function(a){a.__srcAudio!=null&&a.__srcAudio.pause()},play:function(a){a.__srcAudio!=null&&a.__srcAudio.play()},setAutoplay:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.autoplay=b)},setCurrentTime:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.currentTime=
b)},setDefaultPlaybackRate:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.defaultPlaybackRate=b)},setLoop:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.loop=b)},setMuted:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.muted=b)},setPlaybackRate:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.playbackRate=b)},setPreload:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.preload=b)},setSrc:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.src=b)},setVolume:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.volume=
b)},__class__:Wx};var Vy=function(){this.ALL_DEVICES_SPECIFIER=4115;this.DEFAULT_ALL_DEVICES_SPECIFIER=4114;this.ENUMERATE_ALL_EXT=1;this.DEVICE_SPECIFIER=4101;this.DEFAULT_DEVICE_SPECIFIER=4100;this.ALL_ATTRIBUTES=4099;this.ATTRIBUTES_SIZE=4098;this.INVALID_CONTEXT=40962;this.INVALID_DEVICE=40961;this.STEREO_SOURCES=4113;this.MONO_SOURCES=4112;this.SYNC=4105;this.REFRESH=4104;this.EXPONENT_DISTANCE_CLAMPED=53254;this.EXPONENT_DISTANCE=53253;this.LINEAR_DISTANCE_CLAMPED=53252;this.LINEAR_DISTANCE=
53251;this.INVERSE_DISTANCE_CLAMPED=53250;this.INVERSE_DISTANCE=53249;this.DISTANCE_MODEL=53248;this.DOPPLER_VELOCITY=49153;this.SPEED_OF_SOUND=49155;this.DOPPLER_FACTOR=49152;this.EXTENSIONS=45060;this.RENDERER=45059;this.VERSION=45058;this.VENDOR=45057;this.OUT_OF_MEMORY=40965;this.INVALID_OPERATION=40964;this.INVALID_VALUE=40963;this.INVALID_ENUM=40962;this.INVALID_NAME=40961;this.NO_ERROR=0;this.SIZE=8196;this.CHANNELS=8195;this.BITS=8194;this.FREQUENCY=8193;this.FORMAT_STEREO16=4355;this.FORMAT_STEREO8=
4354;this.FORMAT_MONO16=4353;this.FORMAT_MONO8=4352;this.UNDETERMINED=4144;this.STREAMING=4137;this.STATIC=4136;this.SOURCE_TYPE=4135;this.BYTE_OFFSET=4134;this.SAMPLE_OFFSET=4133;this.SEC_OFFSET=4132;this.MAX_DISTANCE=4131;this.CONE_OUTER_GAIN=4130;this.ROLLOFF_FACTOR=4129;this.REFERENCE_DISTANCE=4128;this.BUFFERS_PROCESSED=4118;this.BUFFERS_QUEUED=4117;this.STOPPED=4116;this.PAUSED=4115;this.PLAYING=4114;this.INITIAL=4113;this.SOURCE_STATE=4112;this.ORIENTATION=4111;this.MAX_GAIN=4110;this.MIN_GAIN=
4109;this.GAIN=4106;this.BUFFER=4105;this.LOOPING=4103;this.VELOCITY=4102;this.DIRECTION=4101;this.POSITION=4100;this.PITCH=4099;this.CONE_OUTER_ANGLE=4098;this.CONE_INNER_ANGLE=4097;this.SOURCE_RELATIVE=514;this.TRUE=1;this.NONE=this.FALSE=0};t["lime.media.OpenALAudioContext"]=Vy;Vy.__name__="lime.media.OpenALAudioContext";Vy.prototype={NONE:null,FALSE:null,TRUE:null,SOURCE_RELATIVE:null,CONE_INNER_ANGLE:null,CONE_OUTER_ANGLE:null,PITCH:null,POSITION:null,DIRECTION:null,VELOCITY:null,LOOPING:null,
BUFFER:null,GAIN:null,MIN_GAIN:null,MAX_GAIN:null,ORIENTATION:null,SOURCE_STATE:null,INITIAL:null,PLAYING:null,PAUSED:null,STOPPED:null,BUFFERS_QUEUED:null,BUFFERS_PROCESSED:null,REFERENCE_DISTANCE:null,ROLLOFF_FACTOR:null,CONE_OUTER_GAIN:null,MAX_DISTANCE:null,SEC_OFFSET:null,SAMPLE_OFFSET:null,BYTE_OFFSET:null,SOURCE_TYPE:null,STATIC:null,STREAMING:null,UNDETERMINED:null,FORMAT_MONO8:null,FORMAT_MONO16:null,FORMAT_STEREO8:null,FORMAT_STEREO16:null,FREQUENCY:null,BITS:null,CHANNELS:null,SIZE:null,
NO_ERROR:null,INVALID_NAME:null,INVALID_ENUM:null,INVALID_VALUE:null,INVALID_OPERATION:null,OUT_OF_MEMORY:null,VENDOR:null,VERSION:null,RENDERER:null,EXTENSIONS:null,DOPPLER_FACTOR:null,SPEED_OF_SOUND:null,DOPPLER_VELOCITY:null,DISTANCE_MODEL:null,INVERSE_DISTANCE:null,INVERSE_DISTANCE_CLAMPED:null,LINEAR_DISTANCE:null,LINEAR_DISTANCE_CLAMPED:null,EXPONENT_DISTANCE:null,EXPONENT_DISTANCE_CLAMPED:null,REFRESH:null,SYNC:null,MONO_SOURCES:null,STEREO_SOURCES:null,INVALID_DEVICE:null,INVALID_CONTEXT:null,
ATTRIBUTES_SIZE:null,ALL_ATTRIBUTES:null,DEFAULT_DEVICE_SPECIFIER:null,DEVICE_SPECIFIER:null,ENUMERATE_ALL_EXT:null,DEFAULT_ALL_DEVICES_SPECIFIER:null,ALL_DEVICES_SPECIFIER:null,bufferData:function(a,b,c,d,f){U.bufferData(a,b,c,d,f)},buffer3f:function(a,b,c,d,f){U.buffer3f(a,b,c,d,f)},buffer3i:function(a,b,c,d,f){U.buffer3i(a,b,c,d,f)},bufferf:function(a,b,c){U.bufferf(a,b,c)},bufferfv:function(a,b,c){U.bufferfv(a,b,c)},bufferi:function(a,b,c){U.bufferi(a,b,c)},bufferiv:function(a,b,c){U.bufferiv(a,
b,c)},closeDevice:function(a){return Pc.closeDevice(a)},createContext:function(a,b){return Pc.createContext(a,b)},createBuffer:function(){return U.createBuffer()},createSource:function(){return U.createSource()},deleteBuffer:function(a){U.deleteBuffer(a)},deleteBuffers:function(a){U.deleteBuffers(a)},deleteSource:function(a){U.deleteSource(a)},deleteSources:function(a){U.deleteSources(a)},destroyContext:function(a){a!=null&&Pc.destroyContext(a)},disable:function(a){U.disable(a)},distanceModel:function(a){U.distanceModel(a)},
dopplerFactor:function(a){U.dopplerFactor(a)},dopplerVelocity:function(a){U.dopplerVelocity(a)},enable:function(a){U.enable(a)},genSource:function(){return this.createSource()},genSources:function(a){return U.genSources(a)},genBuffer:function(){return this.createBuffer()},genBuffers:function(a){return U.genBuffers(a)},getBoolean:function(a){return U.getBoolean(a)},getBooleanv:function(a,b){b==null&&(b=1);return U.getBooleanv(a,b)},getBuffer3f:function(a,b){return U.getBuffer3f(a,b)},getBuffer3i:function(a,
b){return U.getBuffer3i(a,b)},getBufferf:function(a,b){return U.getBufferf(a,b)},getBufferfv:function(a,b,c){c==null&&(c=1);return U.getBufferfv(a,b,c)},getBufferi:function(a,b){return U.getBufferi(a,b)},getBufferiv:function(a,b,c){c==null&&(c=1);return U.getBufferiv(a,b,c)},getContextsDevice:function(a){return a==null?null:Pc.getContextsDevice(a)},getCurrentContext:function(){return Pc.getCurrentContext()},getDouble:function(a){return U.getDouble(a)},getDoublev:function(a,b){b==null&&(b=1);return U.getDoublev(a,
b)},getEnumValue:function(a){return U.getEnumValue(a)},getError:function(a){return a==null?U.getError():Pc.getError(a)},getErrorString:function(a){return a==null?U.getErrorString():Pc.getErrorString(a)},getFloat:function(a){return U.getFloat(a)},getFloatv:function(a,b){b==null&&(b=1);return U.getFloatv(a,b)},getInteger:function(a){return U.getInteger(a)},getIntegerv:function(a,b,c){b==null&&(b=1);return c==null?U.getIntegerv(a,b):Pc.getIntegerv(c,a,b)},getListener3f:function(a){return U.getListener3f(a)},
getListener3i:function(a){return U.getListener3i(a)},getListenerf:function(a){return U.getListenerf(a)},getListenerfv:function(a,b){b==null&&(b=1);return U.getListenerfv(a,b)},getListeneri:function(a){return U.getListeneri(a)},getListeneriv:function(a,b){b==null&&(b=1);return U.getListeneriv(a,b)},getProcAddress:function(a){return U.getProcAddress(a)},getSource3f:function(a,b){return U.getSource3f(a,b)},getSourcef:function(a,b){return U.getSourcef(a,b)},getSource3i:function(a,b){return U.getSource3i(a,
b)},getSourcefv:function(a,b,c){return U.getSourcefv(a,b)},getSourcei:function(a,b){return U.getSourcei(a,b)},getSourceiv:function(a,b,c){c==null&&(c=1);return U.getSourceiv(a,b,c)},getString:function(a,b){return b==null?U.getString(a):Pc.getString(b,a)},isBuffer:function(a){return U.isBuffer(a)},isEnabled:function(a){return U.isEnabled(a)},isExtensionPresent:function(a){return U.isExtensionPresent(a)},isSource:function(a){return U.isSource(a)},listener3f:function(a,b,c,d){U.listener3f(a,b,c,d)},
listener3i:function(a,b,c,d){U.listener3i(a,b,c,d)},listenerf:function(a,b){U.listenerf(a,b)},listenerfv:function(a,b){U.listenerfv(a,b)},listeneri:function(a,b){U.listeneri(a,b)},listeneriv:function(a,b){U.listeneriv(a,b)},makeContextCurrent:function(a){return Pc.makeContextCurrent(a)},openDevice:function(a){return Pc.openDevice(a)},pauseDevice:function(a){Pc.pauseDevice(a)},processContext:function(a){Pc.processContext(a)},resumeDevice:function(a){Pc.resumeDevice(a)},source3f:function(a,b,c,d,f){U.source3f(a,
b,c,d,f)},source3i:function(a,b,c,d,f){U.source3i(a,b,c,d,f)},sourcef:function(a,b,c){U.sourcef(a,b,c)},sourcefv:function(a,b,c){U.sourcefv(a,b,c)},sourcei:function(a,b,c){U.sourcei(a,b,c)},sourceiv:function(a,b,c){U.sourceiv(a,b,c)},sourcePlay:function(a){U.sourcePlay(a)},sourcePlayv:function(a){U.sourcePlayv(a)},sourceStop:function(a){U.sourceStop(a)},sourceStopv:function(a){U.sourceStopv(a)},sourceRewind:function(a){U.sourceRewind(a)},sourceRewindv:function(a){U.sourceRewindv(a)},sourcePause:function(a){U.sourcePause(a)},
sourcePausev:function(a){U.sourcePausev(a)},sourceQueueBuffer:function(a,b){U.sourceQueueBuffer(a,b)},sourceQueueBuffers:function(a,b,c){U.sourceQueueBuffers(a,b,c)},sourceUnqueueBuffer:function(a){return U.sourceUnqueueBuffer(a)},sourceUnqueueBuffers:function(a,b){return U.sourceUnqueueBuffers(a,b)},speedOfSound:function(a){U.speedOfSound(a)},suspendContext:function(a){Pc.suspendContext(a)},__class__:Vy};var U=function(){};t["lime.media.openal.AL"]=U;U.__name__="lime.media.openal.AL";U.removeDirectFilter=
function(a){};U.removeSend=function(a,b){};U.auxf=function(a,b,c){};U.auxfv=function(a,b,c){};U.auxi=function(a,b,c){};U.auxiv=function(a,b,c){};U.bufferData=function(a,b,c,d,f){};U.buffer3f=function(a,b,c,d,f){};U.buffer3i=function(a,b,c,d,f){};U.bufferf=function(a,b,c){};U.bufferfv=function(a,b,c){};U.bufferi=function(a,b,c){};U.bufferiv=function(a,b,c){};U.createAux=function(){return null};U.createBuffer=function(){return null};U.createEffect=function(){return null};U.createFilter=function(){return null};
U.createSource=function(){return null};U.deleteBuffer=function(a){};U.deleteBuffers=function(a){};U.deleteSource=function(a){};U.deleteSources=function(a){};U.disable=function(a){};U.distanceModel=function(a){};U.dopplerFactor=function(a){};U.dopplerVelocity=function(a){};U.effectf=function(a,b,c){};U.effectfv=function(a,b,c){};U.effecti=function(a,b,c){};U.effectiv=function(a,b,c){};U.enable=function(a){};U.genSource=function(){return null};U.genSources=function(a){return null};U.genBuffer=function(){return null};
U.genBuffers=function(a){return null};U.getBoolean=function(a){return!1};U.getBooleanv=function(a,b){return null};U.getBuffer3f=function(a,b){return null};U.getBuffer3i=function(a,b){return null};U.getBufferf=function(a,b){return 0};U.getBufferfv=function(a,b,c){return null};U.getBufferi=function(a,b){return 0};U.getBufferiv=function(a,b,c){return null};U.getDouble=function(a){return 0};U.getDoublev=function(a,b){return null};U.getEnumValue=function(a){return 0};U.getError=function(){return 0};U.getErrorString=
function(){switch(U.getError()){case 40961:return"INVALID_NAME: Invalid parameter name";case 40962:return"INVALID_ENUM: Invalid enum value";case 40963:return"INVALID_VALUE: Invalid parameter value";case 40964:return"INVALID_OPERATION: Illegal operation or call";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};U.getFilteri=function(a,b){return 0};U.getFloat=function(a){return 0};U.getFloatv=function(a,b){return null};U.getInteger=function(a){return 0};U.getIntegerv=
function(a,b){return null};U.getListener3f=function(a){return null};U.getListener3i=function(a){return null};U.getListenerf=function(a){return 0};U.getListenerfv=function(a,b){return null};U.getListeneri=function(a){return 0};U.getListeneriv=function(a,b){return null};U.getParameter=function(a){return null};U.getProcAddress=function(a){return null};U.getSource3f=function(a,b){return null};U.getSourcef=function(a,b){return 0};U.getSource3i=function(a,b){return null};U.getSourcefv=function(a,b,c){return null};
U.getSourcei=function(a,b){return 0};U.getSourceiv=function(a,b,c){return null};U.getString=function(a){return null};U.isBuffer=function(a){return!1};U.isEnabled=function(a){return!1};U.isExtensionPresent=function(a){return!1};U.isAux=function(a){return!1};U.isEffect=function(a){return!1};U.isFilter=function(a){return!1};U.isSource=function(a){return!1};U.listener3f=function(a,b,c,d){};U.listener3i=function(a,b,c,d){};U.listenerf=function(a,b){};U.listenerfv=function(a,b){};U.listeneri=function(a,
b){};U.listeneriv=function(a,b){};U.source3f=function(a,b,c,d,f){};U.source3i=function(a,b,c,d,f){};U.sourcef=function(a,b,c){};U.sourcefv=function(a,b,c){};U.sourcei=function(a,b,c){};U.filteri=function(a,b,c){};U.filterf=function(a,b,c){};U.sourceiv=function(a,b,c){};U.sourcePlay=function(a){};U.sourcePlayv=function(a){};U.sourceStop=function(a){};U.sourceStopv=function(a){};U.sourceRewind=function(a){};U.sourceRewindv=function(a){};U.sourcePause=function(a){};U.sourcePausev=function(a){};U.sourceQueueBuffer=
function(a,b){};U.sourceQueueBuffers=function(a,b,c){};U.sourceUnqueueBuffer=function(a){return 0};U.sourceUnqueueBuffers=function(a,b){return null};U.speedOfSound=function(a){};var Pc=function(){};t["lime.media.openal.ALC"]=Pc;Pc.__name__="lime.media.openal.ALC";Pc.closeDevice=function(a){return!1};Pc.createContext=function(a,b){return null};Pc.destroyContext=function(a){};Pc.getContextsDevice=function(a){return null};Pc.getCurrentContext=function(){return null};Pc.getError=function(a){return 0};
Pc.getErrorString=function(a){switch(Pc.getError(a)){case 40961:return"INVALID_DEVICE: Invalid device (or no device?)";case 40962:return"INVALID_CONTEXT: Invalid context (or no context?)";case 40963:return"INVALID_ENUM: Invalid enum value";case 40964:return"INVALID_VALUE: Invalid param value";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};Pc.getIntegerv=function(a,b,c){return null};Pc.getString=function(a,b){return null};Pc.makeContextCurrent=function(a){return!1};
Pc.openDevice=function(a){return null};Pc.pauseDevice=function(a){};Pc.processContext=function(a){};Pc.resumeDevice=function(a){};Pc.suspendContext=function(a){};var Wy=function(){};t["lime.media.vorbis.VorbisComment"]=Wy;Wy.__name__="lime.media.vorbis.VorbisComment";Wy.prototype={userComments:null,vendor:null,__class__:Wy};var fu=function(a){this.handle=a};t["lime.media.vorbis.VorbisFile"]=fu;fu.__name__="lime.media.vorbis.VorbisFile";fu.fromBytes=function(a){return null};fu.fromFile=function(a){return null};
fu.prototype={bitstream:null,handle:null,bitrate:function(a){return 0},bitrateInstant:function(){return 0},clear:function(){},comment:function(a){return null},crosslap:function(a){return 0},info:function(a){return null},pcmSeek:function(a){return 0},pcmSeekLap:function(a){return 0},pcmSeekPage:function(a){return 0},pcmSeekPageLap:function(a){return 0},pcmTell:function(){return new Hb(0,0)},pcmTotal:function(a){return new Hb(0,0)},rawSeek:function(a){return 0},rawSeekLap:function(a){return 0},rawTell:function(){return new Hb(0,
0)},rawTotal:function(a){return new Hb(0,0)},read:function(a,b,c,d,f,g){return 0},readFloat:function(a,b){return 0},seekable:function(){return!1},serialNumber:function(a){return 0},streams:function(){return 0},timeSeek:function(a){return 0},timeSeekLap:function(a){return 0},timeSeekPage:function(a){return 0},timeSeekPageLap:function(a){return 0},timeTell:function(){return 0},timeTotal:function(a){return 0},__class__:fu};var Xy=function(){};t["lime.media.vorbis.VorbisInfo"]=Xy;Xy.__name__="lime.media.vorbis.VorbisInfo";
Xy.prototype={bitrateLower:null,bitrateNominal:null,bitrateUpper:null,channels:null,rate:null,version:null,__class__:Xy};var gu=function(){};t["lime.net._IHTTPRequest"]=gu;gu.__name__="lime.net._IHTTPRequest";gu.__isInterface__=!0;gu.prototype={contentType:null,data:null,enableResponseHeaders:null,followRedirects:null,formData:null,headers:null,method:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,manageCookies:null,cancel:null,__class__:gu};
var ai=function(a){this.uri=a;this.contentType="application/x-www-form-urlencoded";this.followRedirects=!0;this.enableResponseHeaders=!1;this.formData=new G;this.headers=[];this.method="GET";this.timeout=3E4;this.withCredentials=!1;this.manageCookies=!0;this.__backend=new Zb;this.__backend.init(this)};t["lime.net._HTTPRequest.AbstractHTTPRequest"]=ai;ai.__name__="lime.net._HTTPRequest.AbstractHTTPRequest";ai.__interfaces__=[gu];ai.prototype={contentType:null,data:null,enableResponseHeaders:null,followRedirects:null,
formData:null,headers:null,method:null,responseData:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,manageCookies:null,__backend:null,cancel:function(){this.__backend.cancel()},load:function(a){return null},__class__:ai};var Xx=function(a){ai.call(this,a)};t["lime.net.HTTPRequest"]=Xx;Xx.__name__="lime.net.HTTPRequest";Xx.__super__=ai;Xx.prototype=I(ai.prototype,{__class__:Xx});var rk=function(a){ai.call(this,a)};t["lime.net._HTTPRequest_Bytes"]=
rk;rk.__name__="lime.net._HTTPRequest_Bytes";rk.__super__=ai;rk.prototype=I(ai.prototype,{fromBytes:function(a){return a},load:function(a){var b=this;a!=null&&(this.uri=a);var c=new Mf;a=this.__backend.loadData(this.uri);a.onProgress(m(c,c.progress));a.onError(function(d){b.responseData=d.responseData;c.error(d.error)});a.onComplete(function(d){b.responseData=b.fromBytes(d);c.complete(b.responseData)});return c.future},__class__:rk});var io=function(a){ai.call(this,a)};t["lime.net._HTTPRequest_String"]=
io;io.__name__="lime.net._HTTPRequest_String";io.__super__=ai;io.prototype=I(ai.prototype,{load:function(a){var b=this;a!=null&&(this.uri=a);var c=new Mf;a=this.__backend.loadText(this.uri);a.onProgress(m(c,c.progress));a.onError(function(d){b.responseData=d.responseData;c.error(d.error)});a.onComplete(function(d){b.responseData=d;c.complete(b.responseData)});return c.future},__class__:io});var co=function(a,b){this.error=a;this.responseData=b};t["lime.net._HTTPRequestErrorResponse"]=co;co.__name__=
"lime.net._HTTPRequestErrorResponse";co.prototype={error:null,responseData:null,__class__:co};var Vt=function(a,b){b==null&&(b="");this.name=a;this.value=b};t["lime.net.HTTPRequestHeader"]=Vt;Vt.__name__="lime.net.HTTPRequestHeader";Vt.prototype={name:null,value:null,__class__:Vt};var hu=function(a){ai.call(this,a)};t["lime.net._HTTPRequest_lime_text_Font"]=hu;hu.__name__="lime.net._HTTPRequest_lime_text_Font";hu.__super__=rk;hu.prototype=I(rk.prototype,{fromBytes:function(a){return yf.fromBytes(a)},
__class__:hu});var iu=function(a){ai.call(this,a)};t["lime.net._HTTPRequest_lime_utils_Bytes"]=iu;iu.__name__="lime.net._HTTPRequest_lime_utils_Bytes";iu.__super__=rk;iu.prototype=I(rk.prototype,{fromBytes:function(a){return rg.fromBytes(a)},__class__:iu});var ju=function(a){ai.call(this,a)};t["lime.net._HTTPRequest_openfl_utils_ByteArray"]=ju;ju.__name__="lime.net._HTTPRequest_openfl_utils_ByteArray";ju.__super__=rk;ju.prototype=I(rk.prototype,{fromBytes:function(a){return mc.fromBytes(a)},__class__:ju});
var sk=function(){};t["lime.system.CFFI"]=sk;sk.__name__="lime.system.CFFI";sk.load=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=0);return sk.enabled?null:y.makeVarArgs(function(f){return{}})};sk.stringValue=function(a){return a};sk.__findNDLLFolder=function(){return""};sk.__loaderTrace=function(a){};sk.__sysName=function(){return null};sk.__tryLoad=function(a,b,c,d){return null};var zf={_new:function(a){return a},get:function(a){return 0},equals:function(a,b){return zf.get(a)==b},equalsPointer:function(a,
b){return zf.get(a)==zf.get(b)},greaterThan:function(a,b){return zf.get(a)>b},greaterThanPointer:function(a,b){return zf.get(a)>zf.get(b)},greaterThanOrEqual:function(a,b){return zf.get(a)>=b},greaterThanOrEqualPointer:function(a,b){return zf.get(a)>=zf.get(b)},lessThan:function(a,b){return zf.get(a)<b},lessThanPointer:function(a,b){return zf.get(a)<zf.get(b)},lessThanOrEqual:function(a,b){return zf.get(a)<=b},lessThanOrEqualPointer:function(a,b){return zf.get(a)<=zf.get(b)},notEquals:function(a,
b){return zf.get(a)!=b},notEqualsPointer:function(a,b){return zf.get(a)!=zf.get(b)}},Pe=function(){};t["lime.system.Clipboard"]=Pe;Pe.__name__="lime.system.Clipboard";Pe.__properties__={set_text:"set_text",get_text:"get_text"};Pe.__update=function(){var a=Pe._text;Pe._text=null;Pe._text=a;Pe.__updated=!0;Pe._text!=a&&Pe.onUpdate.dispatch()};Pe.get_text=function(){Pe.__update();return Pe._text};Pe.set_text=function(a){var b=Pe._text;Pe._text=a;var c=Na.current.__window;c!=null&&c.__backend.setClipboard(a);
Pe._text!=b&&Pe.onUpdate.dispatch();return a};var Yx=function(){};t["lime.system.Display"]=Yx;Yx.__name__="lime.system.Display";Yx.prototype={bounds:null,currentMode:null,id:null,dpi:null,orientation:null,name:null,supportedModes:null,safeArea:null,__class__:Yx};var Zx=function(a,b,c,d){this.width=a;this.height=b;this.refreshRate=c;this.pixelFormat=d};t["lime.system.DisplayMode"]=Zx;Zx.__name__="lime.system.DisplayMode";Zx.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:Zx};
var qk=R["lime.system.Endian"]={__ename__:"lime.system.Endian",__constructs__:null,LITTLE_ENDIAN:{_hx_name:"LITTLE_ENDIAN",_hx_index:0,__enum__:"lime.system.Endian",toString:E},BIG_ENDIAN:{_hx_name:"BIG_ENDIAN",_hx_index:1,__enum__:"lime.system.Endian",toString:E}};qk.__constructs__=[qk.LITTLE_ENDIAN,qk.BIG_ENDIAN];var sg=function(){};t["lime.system.JNI"]=sg;sg.__name__="lime.system.JNI";sg.transformClassName=function(a){var b=a.split(".");if(b.length<=1)return a;a="";(new Wa("^[A-Z]","")).match(b[b.length-
2])&&(a="$"+b.pop());return b.join("/")+a};sg.callMember=function(a,b,c){return a.apply(null,[b].concat(c))};sg.callStatic=function(a,b){return a.apply(null,b)};sg.createMemberField=function(a,b,c){sg.init();return new $x(null)};sg.createMemberMethod=function(a,b,c,d,f){sg.init();return null};sg.createStaticField=function(a,b,c){sg.init();return new ay(null)};sg.createStaticMethod=function(a,b,c,d,f){sg.init();return null};sg.getEnv=function(){sg.init();return null};sg.init=function(){sg.initialized||
(sg.initialized=!0)};sg.onCallback=function(a,b,c){var d=y.field(a,b);if(d!=null)return c==null&&(c=[]),d.apply(a,c);De.trace("onCallback - unknown field "+b,{fileName:"lime/system/JNI.hx",lineNumber:223,className:"lime.system.JNI",methodName:"onCallback"});return null};sg.postUICallback=function(a){a()};var $x=function(a){this.field=a};t["lime.system.JNIMemberField"]=$x;$x.__name__="lime.system.JNIMemberField";$x.prototype={field:null,get:function(a){return null},set:function(a,b){return b},__class__:$x};
var ay=function(a){this.field=a};t["lime.system.JNIStaticField"]=ay;ay.__name__="lime.system.JNIStaticField";ay.prototype={field:null,get:function(){return null},set:function(a){return a},__class__:ay};var Yy=function(a){this.method=a};t["lime.system.JNIMethod"]=Yy;Yy.__name__="lime.system.JNIMethod";Yy.prototype={method:null,callMember:function(a){return null},callStatic:function(a){return null},getMemberMethod:function(a){return a?m(this,this.callMember):y.makeVarArgs(m(this,this.callMember))},
getStaticMethod:function(a){return a?m(this,this.callStatic):y.makeVarArgs(m(this,this.callStatic))},__class__:Yy};var Jz=function(){};t["lime.system.JNISafety"]=Jz;Jz.__name__="lime.system.JNISafety";Jz.__isInterface__=!0;var Kz=function(){};t["lime.system.JNISafetyTools"]=Kz;Kz.__name__="lime.system.JNISafetyTools";Kz.onMainThread=function(){return!0};var Fh={__properties__:{get_region:"get_region",get_language:"get_language",get_systemLocale:"get_systemLocale",set_currentLocale:"set_currentLocale",
get_currentLocale:"get_currentLocale"},_new:function(a){return a},equals:function(a,b){var c=Fh.get_language(a);a=Fh.get_region(a);var d=Fh.get_language(b);b=Fh.get_region(b);var f=c==d,g=a==b;f||c==null||d==null||(f=c.toLowerCase()==d.toLowerCase());g||a==null||b==null||(g=a.toLowerCase()==b.toLowerCase());return f?g:!1},__init:function(){if(Fh.__systemLocale==null){var a=navigator.language;Fh.__systemLocale=a!=null?a:"en-US";Fh.set_currentLocale(Fh.__systemLocale)}},get_language:function(a){if(a!=
null){var b=a.indexOf("_");if(b>-1){var c=a.indexOf("-");c>-1&&c<b&&(b=c);return a.substring(0,b)}b=a.indexOf("-");if(b>-1)return a.substring(0,b)}return a},get_region:function(a){if(a!=null){var b=a.indexOf("_"),c=a.indexOf("."),d=a.indexOf("-");if(b>-1)return c>-1?a.substring(b+1,c):a.substring(b+1);if(d>-1)return c>-1?a.substring(d+1,c):a.substring(d+1)}return null},get_currentLocale:function(){Fh.__init();return Fh.currentLocale},set_currentLocale:function(a){Fh.__init();return Fh.currentLocale=
a},get_systemLocale:function(){Fh.__init();return Fh.__systemLocale}},aj=function(a,b){this.onUpdate=new Ix;this.type=a;this.id=b};t["lime.system.Sensor"]=aj;aj.__name__="lime.system.Sensor";aj.getSensors=function(a){if(a==null)return aj.sensors.slice();for(var b=[],c=0,d=aj.sensors;c<d.length;){var f=d[c];++c;f.type==a&&b.push(f)}return b};aj.registerSensor=function(a,b){a=new aj(a,b);aj.sensors.push(a);return aj.sensorByID.h[b]=a};aj.prototype={id:null,onUpdate:null,type:null,__class__:aj};var Hz=
R["lime.system.SensorType"]={__ename__:"lime.system.SensorType",__constructs__:null,ACCELEROMETER:{_hx_name:"ACCELEROMETER",_hx_index:0,__enum__:"lime.system.SensorType",toString:E}};Hz.__constructs__=[Hz.ACCELEROMETER];var Rb=function(){};t["lime.system.System"]=Rb;Rb.__name__="lime.system.System";Rb.__properties__={get_userDirectory:"get_userDirectory",get_platformVersion:"get_platformVersion",get_platformName:"get_platformName",get_platformLabel:"get_platformLabel",get_numDisplays:"get_numDisplays",
get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_deviceVendor:"get_deviceVendor",get_deviceModel:"get_deviceModel",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"};Rb.embed=Sa.lime.embed=function(a,b,c,d,f){if(Rb.__applicationEntryPoint!=
null&&Object.prototype.hasOwnProperty.call(Rb.__applicationEntryPoint.h,a)){var g=typeof b=="string"?window.document.getElementById(b):b==null?window.document.createElement("div"):b;g==null?window.console.log("[lime.embed] ERROR: Cannot find target element: "+H.string(b)):(c==null&&(c=0),d==null&&(d=0),f==null&&(f={}),Object.prototype.hasOwnProperty.call(f,"background")&&typeof f.background=="string"&&(b=N.replace(H.string(f.background),"#",""),b.indexOf("0x")>-1?f.background=H.parseInt(b):f.background=
H.parseInt("0x"+b)),f.element=g,f.width=c,f.height=d,Rb.__applicationEntryPoint.h[a](f))}};Rb.exit=function(a){var b=Na.current;if(b!=null&&(b.onExit.dispatch(a),b.onExit.canceled))return;b!=null&&b.__window!=null&&b.__window.close()};Rb.getDisplay=function(a){if(a==0){a=new Yx;a.id=0;a.name="Generic Display";a.dpi=96*window.devicePixelRatio;a.currentMode=new Zx(window.screen.width,window.screen.height,60,1);if(window.screen.orientation!=null)switch(window.screen.orientation.type){case "landscape-primary":a.orientation=
1;break;case "landscape-secondary":a.orientation=2;break;case "portrait-primary":a.orientation=3;break;case "portrait-secondary":a.orientation=4;break;default:a.orientation=0}else a.orientation=0;a.supportedModes=[a.currentMode];a.bounds=new of(0,0,a.currentMode.width,a.currentMode.height);a.safeArea=new of(0,0,a.currentMode.width,a.currentMode.height);return a}return null};Rb.getTimer=function(){return window.performance.now()|0};Rb.load=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=0);return sk.load(a,
b,c,d)};Rb.openFile=function(a){a!=null&&window.open(a,"_blank")};Rb.openURL=function(a,b){b==null&&(b="_blank");a!=null&&window.open(a,b)};Rb.__copyMissingFields=function(a,b){if(b!=null&&a!=null)for(var c=0,d=y.fields(b);c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(a,f)||(a[f]=y.field(b,f))}};Rb.__getDirectory=function(a){return null};Rb.__parseBool=function(a){return a=="true"};Rb.__registerEntryPoint=function(a,b){Rb.__applicationEntryPoint==null&&(Rb.__applicationEntryPoint=
new G);Rb.__applicationEntryPoint.h[a]=b};Rb.__runProcess=function(a,b){return null};Rb.get_allowScreenTimeout=function(){return!0};Rb.set_allowScreenTimeout=function(a){return!0};Rb.get_applicationDirectory=function(){Rb.__applicationDirectory==null&&(Rb.__applicationDirectory=Rb.__getDirectory(0));return Rb.__applicationDirectory};Rb.get_applicationStorageDirectory=function(){Rb.__applicationStorageDirectory==null&&(Rb.__applicationStorageDirectory=Rb.__getDirectory(1));return Rb.__applicationStorageDirectory};
Rb.get_deviceModel=function(){return Rb.__deviceModel};Rb.get_deviceVendor=function(){return Rb.__deviceVendor};Rb.get_desktopDirectory=function(){Rb.__desktopDirectory==null&&(Rb.__desktopDirectory=Rb.__getDirectory(2));return Rb.__desktopDirectory};Rb.get_documentsDirectory=function(){Rb.__documentsDirectory==null&&(Rb.__documentsDirectory=Rb.__getDirectory(3));return Rb.__documentsDirectory};Rb.get_endianness=function(){if(Rb.__endianness==null){var a=new ArrayBuffer(2),b=null,c=null,d=null,f=
null,g=null,h=b=b!=null?new Uint8Array(b):c!=null?new Uint8Array(c):d!=null?new Uint8Array(d.__array):f!=null?new Uint8Array(f):a!=null?g==null?new Uint8Array(a,0):new Uint8Array(a,0,g):null;g=f=d=c=b=null;b=b!=null?new Uint16Array(b):c!=null?new Uint16Array(c):d!=null?new Uint16Array(d.__array):f!=null?new Uint16Array(f):a!=null?g==null?new Uint16Array(a,0):new Uint16Array(a,0,g):null;h[0]=170;h[1]=187;Rb.__endianness=b[0]==43707?qk.BIG_ENDIAN:qk.LITTLE_ENDIAN}return Rb.__endianness};Rb.get_fontsDirectory=
function(){Rb.__fontsDirectory==null&&(Rb.__fontsDirectory=Rb.__getDirectory(4));return Rb.__fontsDirectory};Rb.get_numDisplays=function(){return 1};Rb.get_platformLabel=function(){if(Rb.__platformLabel==null){var a=Rb.get_platformName(),b=Rb.get_platformVersion();a!=null&&b!=null?Rb.__platformLabel=a+" "+b:a!=null&&(Rb.__platformLabel=a)}return Rb.__platformLabel};Rb.get_platformName=function(){Rb.__platformName==null&&(Rb.__platformName="HTML5");return Rb.__platformName};Rb.get_platformVersion=
function(){return Rb.__platformVersion};Rb.get_userDirectory=function(){Rb.__userDirectory==null&&(Rb.__userDirectory=Rb.__getDirectory(5));return Rb.__userDirectory};var Wj=function(a){this.__activeJob=new fq;this.__jobComplete=new fq;this.__jobOutput=new hb;this.workIterations=new fq;this.workIterations.value=0;this.__jobComplete.value=!1;this.mode=a!=null&&a};t["lime.system.WorkOutput"]=Wj;Wj.__name__="lime.system.WorkOutput";Wj.prototype={workIterations:null,mode:null,__jobOutput:null,__jobComplete:null,
__activeJob:null,sendComplete:function(a,b){this.__jobComplete.value||(this.__jobComplete.value=!0,a={event:"COMPLETE",message:a,jobID:this.__activeJob.value.id},$b.__current.__worker!=null||$b.__isWorker?$b.returnMessage(a,b):this.__jobOutput.add(a))},sendError:function(a,b){this.__jobComplete.value||(this.__jobComplete.value=!0,a={event:"ERROR",message:a,jobID:this.__activeJob.value.id},$b.__current.__worker!=null||$b.__isWorker?$b.returnMessage(a,b):this.__jobOutput.add(a))},sendProgress:function(a,
b){this.__jobComplete.value||(a={event:"PROGRESS",message:a,jobID:this.__activeJob.value.id},$b.__current.__worker!=null||$b.__isWorker?$b.returnMessage(a,b):this.__jobOutput.add(a))},sendUncaughtError:function(a){this.__jobComplete.value||(this.__jobComplete.value=!0,a={event:"UNCAUGHT_ERROR",message:a,jobID:this.__activeJob.value.id},$b.__current.__worker!=null||$b.__isWorker?$b.returnMessage(a,null):this.__jobOutput.add(a))},sendThreadEvent:function(a,b){$b.__current.__worker!=null||$b.__isWorker?
$b.returnMessage(a,b):this.__jobOutput.add(a)},resetJobProgress:function(){this.__jobComplete.value=!1;this.workIterations.value=0},createThread:function(a){var b=this;a=$b.create(a);a.onMessage.add(function(c){b.__jobOutput.add(c)});return a},get_activeJob:function(){return this.__activeJob.value},set_activeJob:function(a){return this.__activeJob.value=a},__class__:Wj,__properties__:{set_activeJob:"set_activeJob",get_activeJob:"get_activeJob"}};var af=function(a,b,c){b==null&&(b=1);a==null&&(a=0);
this.__singleThreadedJobs=new ku;this.__singleThreadedJobRunning=!1;this.__threads=[];this.__queuedExitEvents=0;this.__multiThreadedJobs=new ku;this.workPriority=1;this.onUncaughtError=new Px;this.onRun=new Qx;this.onProgress=new eo;this.onError=new eo;this.onComplete=new eo;this.activeThreads=this.__idleThreads=0;if($b.__current.__worker!=null||$b.__isWorker)throw ba.thrown("Call new ThreadPool() only from the main thread.");Wj.call(this,c);this.minThreads=a;this.maxThreads=b};t["lime.system.ThreadPool"]=
af;af.__name__="lime.system.ThreadPool";af.isMainThread=function(){return!($b.__current.__worker!=null||$b.__isWorker)};af.__executeThread=function(){(async function(){for(var a=$b.__messages.isEmpty()?await new Promise(function(n,l){$b.__resolveMethods.add(n)}):await (new Promise(function(n,l){wa.setTimeout(n)})).then(function(n){return $b.__messages.pop()}),b=new Wj(!0),c=null,d=!0;;){if(c==null){c=await (new Promise(function(n,l){wa.setTimeout(n)})).then(function(n){return $b.__messages.pop()});
c!=null||d||(d={event:"IDLE",threadID:a.threadID},$b.__current.__worker!=null||$b.__isWorker?$b.returnMessage(d,null):b.__jobOutput.add(d));for(;c==null;)c=$b.__messages.isEmpty()?await new Promise(function(n,l){$b.__resolveMethods.add(n)}):await (new Promise(function(n,l){wa.setTimeout(n)})).then(function(n){return $b.__messages.pop()});b.__jobComplete.value=!1;b.workIterations.value=0;d=!1}if(c.event=="EXIT"){a={event:"EXIT",threadID:a.threadID};$b.__current.__worker!=null||$b.__isWorker?$b.returnMessage(a,
null):b.__jobOutput.add(a);$b.__current.destroy();break}if(c.event!="WORK"||c.doWork==null||c.jobID==null)c=null;else{var f=new jo(c.doWork,c.state,c.jobID);b.__activeJob.value=f;f=null;try{for(;;){if(b.__jobComplete.value)var g=!1;else f=await (new Promise(function(n,l){wa.setTimeout(n)})).then(function(n){return $b.__messages.pop()}),g=f==null;if(!g)break;if(b.workIterations.value==0){var h={event:"WORK",jobID:c.jobID,threadID:a.threadID};$b.__current.__worker!=null||$b.__isWorker?$b.returnMessage(h,
null):b.__jobOutput.add(h)}b.workIterations.value+=1;Fx.toFunction(c.doWork)(c.state,b)}}catch(n){c=ba.caught(n),b.sendUncaughtError(c)}b.__activeJob.value=null;f==null||b.__jobComplete.value?c=f:(c=f,b.__jobComplete.value=!1,b.workIterations.value=0)}}})()};af.timestamp=function(){return(new Date).getTime()/1E3};af.__super__=Wj;af.prototype=I(Wj.prototype,{activeThreads:null,__idleThreads:null,maxThreads:null,minThreads:null,onComplete:null,onError:null,onProgress:null,onRun:null,onUncaughtError:null,
workPriority:null,__doWork:null,__multiThreadedJobs:null,__queuedExitEvents:null,__threads:null,__singleThreadedJobRunning:null,__singleThreadedJobs:null,cancel:function(a){if($b.__current.__worker!=null||$b.__isWorker)throw ba.thrown("Call cancel() only from the main thread.");if(a!=null){var b=this.__multiThreadedJobs,c=b.jobs;for(b=b.startIndex;b<c.length;){var d=c[b++];d.startTime>=0&&(d.duration=(new Date).getTime()/1E3-d.startTime);this.__activeJob.value=d;this.onError.dispatch(a);this.__activeJob.value=
null}}b=this.__multiThreadedJobs;b.jobs.length=0;c=b.startIndex=0;for(b=this.__threads.length;c<b;)d=c++,d=this.__threads[d],d!=null&&d.jobID!=null&&d.thread.sendMessage({event:"IDLE"});if(a!=null)for(b=this.__singleThreadedJobs,c=b.jobs,b=b.startIndex;b<c.length;)d=c[b++],this.__activeJob.value=d,this.onError.dispatch(a);b=this.__singleThreadedJobs;b.jobs.length=0;b.startIndex=0;0!=this.__singleThreadedJobRunning&&(af.__totalWorkPriority-=this.workPriority);this.__singleThreadedJobRunning=!1;this.__jobComplete.value=
!1;this.__activeJob.value=null},cancelJob:function(a){if(this.__singleThreadedJobs.removeJob(a)!=null)return a=this.__singleThreadedJobs,a=a.jobs.length-a.startIndex>0,a!=this.__singleThreadedJobRunning&&(af.__totalWorkPriority=a?af.__totalWorkPriority+this.workPriority:af.__totalWorkPriority-this.workPriority),this.__singleThreadedJobRunning=a,!0;if(this.__multiThreadedJobs.removeJob(a)!=null){for(var b=0,c=this.__threads;b<c.length;){var d=c[b];++b;if(d!=null&&d.jobID==a){d.thread.sendMessage({event:"IDLE"});
break}}return!0}return!1},queue:function(a,b){return this.run(a,b)},run:function(a,b,c){if($b.__current.__worker!=null||$b.__isWorker)throw ba.thrown("Call run() only from the main thread.");c==null&&(c=this.mode);if(a==null){if(this.__doWork==null||c==1)throw ba.thrown("run() requires doWork argument.");a=this.__doWork}b==null&&(b={});a=new jo(a,b);c==1?(this.__multiThreadedJobs.jobs.push(a),this.__runMultiThreadedJob(a)):(this.__singleThreadedJobs.jobs.push(a),1!=this.__singleThreadedJobRunning&&
(af.__totalWorkPriority+=this.workPriority),this.__singleThreadedJobRunning=!0);Na.current==null||Na.current.onUpdate.has(m(this,this.__update))||Na.current.onUpdate.add(m(this,this.__update));return a.id},__dispatchJobOutput:function(a){var b=this.__activeJob.value;this.__activeJob.value=null;var c=this.__singleThreadedJobs;c.jobs.length-c.startIndex>0?(c=this.__singleThreadedJobs,c=a.jobID==c.jobs[c.startIndex].id):c=!1;if(c)c=this.__singleThreadedJobs,this.__activeJob.value=c.jobs[c.startIndex];
else if(c=this.__multiThreadedJobs.getJob(a.jobID),(this.__activeJob.value=c)!=null)this.__activeJob.value.startTime>=0&&(c=(new Date).getTime()/1E3,this.__activeJob.value.duration=c-this.__activeJob.value.startTime),a.event!="COMPLETE"&&a.event!="ERROR"&&a.event!="UNCAUGHT_ERROR"||this.__multiThreadedJobs.removeJob(this.__activeJob.value.id);else if(a.jobID!=null){this.__activeJob.value=b;return}switch(a.event){case "COMPLETE":this.onComplete.dispatch(a.message);break;case "ERROR":this.onError.dispatch(a.message);
break;case "EXIT":c=this.__threads[a.threadID];c.jobID!=null?this.activeThreads--:this.__idleThreads--;this.__threads[a.threadID]=null;this.__queuedExitEvents--;break;case "IDLE":this.__onThreadIdle(a.threadID);break;case "PROGRESS":this.onProgress.dispatch(a.message);break;case "UNCAUGHT_ERROR":a.message instanceof ba?this.onUncaughtError.__listeners.length>0?(this.onUncaughtError.dispatch(a.message),a=null):a=a.message.details():a=H.string(a.message);a!=null&&(this.__activeJob.value=null,Vb.error(a,
{fileName:"lime/system/ThreadPool.hx",lineNumber:529,className:"lime.system.ThreadPool",methodName:"__dispatchJobOutput"}));break;case "WORK":c=(new Date).getTime(),this.__activeJob.value.startTime=c/1E3,this.onRun.dispatch(this.__activeJob.value.state),c=this.__threads[a.threadID],c.jobID==null&&(this.__idleThreads--,this.activeThreads++),c.jobID=a.jobID}this.__activeJob.value=b},sendComplete:function(a,b){if(!this.__jobComplete.value){if($b.__current.__worker!=null||$b.__isWorker)var c=!1;else c=
this.__singleThreadedJobs,c=this.__activeJob.value==c.jobs[c.startIndex];c?(this.__jobComplete.value=!0,this.__dispatchJobOutput({event:"COMPLETE",message:a,jobID:this.__activeJob.value.id})):Wj.prototype.sendComplete.call(this,a,b)}},sendError:function(a,b){if(!this.__jobComplete.value){if($b.__current.__worker!=null||$b.__isWorker)var c=!1;else c=this.__singleThreadedJobs,c=this.__activeJob.value==c.jobs[c.startIndex];c?(this.__jobComplete.value=!0,this.__dispatchJobOutput({event:"ERROR",message:a,
jobID:this.__activeJob.value.id})):Wj.prototype.sendError.call(this,a,b)}},sendProgress:function(a,b){if(!this.__jobComplete.value){if($b.__current.__worker!=null||$b.__isWorker)var c=!1;else c=this.__singleThreadedJobs,c=this.__activeJob.value==c.jobs[c.startIndex];c?this.__dispatchJobOutput({event:"PROGRESS",message:a,jobID:this.__activeJob.value.id}):Wj.prototype.sendProgress.call(this,a,b)}},__update:function(a){if($b.__current.__worker==null&&!$b.__isWorker){a=(new Date).getTime()/1E3;if(af.__totalWorkPriority>
0){var b=60;Na.current.__window!=null&&(b=Na.current.__window.__backend.getFrameRate());a+=af.workLoad*this.workPriority/(b*af.__totalWorkPriority)}for(var c;;){b=this.__singleThreadedJobs;b.jobs.length-b.startIndex>0?(c=(new Date).getTime()/1E3,b=c<a):b=!1;if(!b)break;b=this.__singleThreadedJobs;this.__activeJob.value=b.jobs[b.startIndex];this.__activeJob.value.startTime>=0||(this.__activeJob.value.startTime=c,this.onRun.dispatch(this.__activeJob.value.state));this.__jobComplete.value=!1;this.workIterations.value=
0;try{do this.workIterations.value+=1,Fx.toFunction(this.__activeJob.value.doWork)(this.__activeJob.value.state,this);while(!this.__jobComplete.value&&(new Date).getTime()/1E3<a)}catch(d){b=ba.caught(d),this.__jobComplete.value=!0,this.__dispatchJobOutput({event:"UNCAUGHT_ERROR",message:b,jobID:this.__activeJob.value.id})}b=(new Date).getTime()/1E3;this.__activeJob.value.duration+=b-c;this.__activeJob.value=null;this.__jobComplete.value&&(this.__singleThreadedJobs.shift(),b=this.__singleThreadedJobs,
b=b.jobs.length-b.startIndex>0,b!=this.__singleThreadedJobRunning&&(af.__totalWorkPriority=b?af.__totalWorkPriority+this.workPriority:af.__totalWorkPriority-this.workPriority),this.__singleThreadedJobRunning=b)}for(this.__runMultiThreadedJobs();;){c=this.__jobOutput.pop();if(c==null)break;this.__dispatchJobOutput(c)}b=this.__singleThreadedJobs;this.activeThreads+(b.jobs.length-b.startIndex>0?1:0)+this.__queuedExitEvents<=0&&Na.current.onUpdate.remove(m(this,this.__update))}},__onThreadIdle:function(a){if($b.__current.__worker!=
null||$b.__isWorker)throw ba.thrown("Call __onThreadIdle() only from the main thread.");var b=this.__threads[a];b!=null&&(b.jobID!=null&&(b.jobID=null,this.activeThreads--,this.__idleThreads++),this.__runMultiThreadedJobs(),this.__idleThreads-this.__queuedExitEvents>this.minThreads&&(b.thread.destroy(),this.__threads[a]=null,this.__idleThreads--))},__runMultiThreadedJob:function(a){if(a.startTime>=0)throw ba.thrown("Job "+a.id+" was already started!");Fx.makePortable(a.doWork);var b={event:"WORK",
jobID:a.id,doWork:a.doWork,state:a.state},c=null;if(this.__idleThreads-this.__queuedExitEvents>0)for(var d=0,f=this.__threads;d<f.length;){var g=f[d];++d;if(g!=null&&g.jobID==null){c=g;break}}if(c==null){if(this.activeThreads+(this.__idleThreads-this.__queuedExitEvents)>=this.maxThreads)return;var h=this.createThread({func:af.__executeThread,classPath:"lime.system.ThreadPool",functionName:"__executeThread"});d=0;for(f=this.__threads;d<f.length;)if(g=f[d],++d,g.thread==h){c=g;break}if(c==null)return}c.jobID=
a.id;c.thread.sendMessage(b);this.__idleThreads--;this.activeThreads++;a.startTime=0},__runMultiThreadedJobs:function(){if(!(this.activeThreads>=this.maxThreads)){var a=this.__multiThreadedJobs,b=a.jobs;for(a=a.startIndex;a<b.length;){var c=b[a++];if(!(c.startTime>=0)&&(this.__runMultiThreadedJob(c),this.activeThreads>=this.maxThreads))break}}},createThread:function(a){a=Wj.prototype.createThread.call(this,a);var b=this.__threads.indexOf(null);b<0&&(b=this.__threads.length);this.__threads[b]={thread:a,
jobID:null};this.__idleThreads++;a.sendMessage({threadID:b});return a},get_activeJobs:function(){var a=this.__singleThreadedJobs;return this.activeThreads+(a.jobs.length-a.startIndex>0?1:0)},get_currentThreads:function(){return this.activeThreads+(this.__idleThreads-this.__queuedExitEvents)},get_doWork:function(){return this},get_idleThreads:function(){return this.__idleThreads-this.__queuedExitEvents},set___singleThreadedJobRunning:function(a){a!=this.__singleThreadedJobRunning&&(af.__totalWorkPriority=
a?af.__totalWorkPriority+this.workPriority:af.__totalWorkPriority-this.workPriority);return this.__singleThreadedJobRunning=a},set_workPriority:function(a){this.__singleThreadedJobRunning&&(af.__totalWorkPriority+=a-this.workPriority);return this.workPriority=a},__class__:af,__properties__:I(Wj.prototype.__properties__,{set___singleThreadedJobRunning:"set___singleThreadedJobRunning",get_doWork:"get_doWork",set_workPriority:"set_workPriority",get_idleThreads:"get_idleThreads",get_currentThreads:"get_currentThreads",
get_activeJobs:"get_activeJobs"})});var ku=function(){this.startIndex=0;this.jobs=[]};t["lime.system._ThreadPool.JobArray"]=ku;ku.__name__="lime.system._ThreadPool.JobArray";ku.prototype={jobs:null,startIndex:null,clear:function(){this.startIndex=this.jobs.length=0},first:function(){return this.jobs[this.startIndex]},getJob:function(a){for(var b=this.startIndex,c=this.jobs.length;b<c;){var d=b++;if(this.jobs[d].id==a)return this.jobs[d]}return null},get_length:function(){return this.jobs.length-this.startIndex},
iterator:function(){return new by(this.jobs,this.startIndex)},push:function(a){return this.jobs.push(a)},removeJob:function(a){for(var b=this.startIndex,c=this.jobs.length;b<c;){var d=b++,f=this.jobs[d];if(f.id==a){if((d-this.startIndex)*2<=this.jobs.length-this.startIndex){for(a=d;a>this.startIndex;)this.jobs[a]=this.jobs[a-1],--a;this.shift()}else this.jobs.splice(d,1);return f}}return null},shift:function(){var a=this.jobs[this.startIndex];this.jobs[this.startIndex]=null;this.startIndex++;this.startIndex>=
this.jobs.length?this.startIndex=this.jobs.length=0:this.startIndex>=100&&(this.jobs.splice(0,this.startIndex),this.startIndex=0);return a},__class__:ku,__properties__:{get_length:"get_length"}};var by=function(a,b){this.jobs=a;this.index=b};t["lime.system._ThreadPool.JobArrayIterator"]=by;by.__name__="lime.system._ThreadPool.JobArrayIterator";by.prototype={index:null,jobs:null,hasNext:function(){return this.index<this.jobs.length},next:function(){return this.jobs[this.index++]},__class__:by};var jo=
function(a,b,c){this.startTime=-1;this.duration=0;this.id=c!=null?c:jo.nextID++;this.doWork=a;this.state=b};t["lime.system.JobData"]=jo;jo.__name__="lime.system.JobData";jo.prototype={id:null,doWork:null,state:null,duration:null,startTime:null,get_started:function(){return this.startTime>=0},__class__:jo,__properties__:{get_started:"get_started"}};var Wz=function(){};t["lime.system.JSAsync"]=Wz;Wz.__name__="lime.system.JSAsync";var fq=function(){};t["lime.system.Tls"]=fq;fq.__name__="lime.system.Tls";
fq.prototype={value:null,__class__:fq};var yf=function(a){a!=null&&(this.name=a);this.__init||(this.ascender==void 0&&(this.ascender=0),this.descender==void 0&&(this.descender=0),this.height==void 0&&(this.height=0),this.numGlyphs==void 0&&(this.numGlyphs=0),this.underlinePosition==void 0&&(this.underlinePosition=0),this.underlineThickness==void 0&&(this.underlineThickness=0),this.unitsPerEM==void 0&&(this.unitsPerEM=0),this.__fontID!=null?mb.isLocal(this.__fontID)&&this.__fromBytes(mb.getBytes(this.__fontID)):
this.__fontPath!=null&&this.__fromFile(this.__fontPath))};t["lime.text.Font"]=yf;yf.__name__="lime.text.Font";yf.fromBytes=function(a){if(a==null)return null;var b=new yf;b.__fromBytes(a);return b};yf.fromFile=function(a){if(a==null)return null;var b=new yf;b.__fromFile(a);return b};yf.loadFromBytes=function(a){return Hc.withValue(yf.fromBytes(a))};yf.loadFromFile=function(a){return(new hu).load(a).then(function(b){return b!=null?Hc.withValue(b):Hc.withError("")})};yf.loadFromName=function(a){return(new yf).__loadFromName(a)};
yf.__measureFontNode=function(a){var b=window.document.createElement("span");b.setAttribute("aria-hidden","true");var c=window.document.createTextNode("BESbswy");b.appendChild(c);c=b.style;c.display="block";c.position="absolute";c.top="-9999px";c.left="-9999px";c.fontSize="300px";c.width="auto";c.height="auto";c.lineHeight="normal";c.margin="0";c.padding="0";c.fontVariant="normal";c.whiteSpace="nowrap";c.fontFamily=a;window.document.body.appendChild(b);return b};yf.prototype={ascender:null,descender:null,
height:null,name:null,numGlyphs:null,src:null,underlinePosition:null,underlineThickness:null,strikethroughPosition:null,strikethroughThickness:null,unitsPerEM:null,__fontID:null,__fontPath:null,__init:null,decompose:function(){return null},getGlyph:function(a){return-1},getGlyphs:function(a){return null},getGlyphMetrics:function(a){return null},renderGlyph:function(a,b){return null},renderGlyphs:function(a,b){return null},__copyFrom:function(a){a!=null&&(this.ascender=a.ascender,this.descender=a.descender,
this.height=a.height,this.name=a.name,this.numGlyphs=a.numGlyphs,this.src=a.src,this.underlinePosition=a.underlinePosition,this.underlineThickness=a.underlineThickness,this.unitsPerEM=a.unitsPerEM,this.__fontID=a.__fontID,this.__fontPath=a.__fontPath,this.__init=!0)},__fromBytes:function(a){this.__fontPath=null},__fromFile:function(a){this.__fontPath=a},__initializeSource:function(){this.__init=!0},__loadFromName:function(a){var b=this,c=new Mf;this.name=a;var d=wa.navigator.userAgent.toLowerCase(),
f=d.indexOf(" safari/")>=0&&d.indexOf(" chrome/")<0;d=(new Wa("(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)","i")).match(d);if(!f&&!d&&window.document.fonts&&(B=window.document.fonts,m(B,B.load)))window.document.fonts.load("1em '"+a+"'").then(function(r){c.complete(b)},function(r){Vb.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:656,className:"lime.text.Font",methodName:"__loadFromName"});c.complete(b)});else{var g=yf.__measureFontNode("'"+a+"', sans-serif"),h=yf.__measureFontNode("'"+
a+"', serif"),n=g.offsetWidth,l=h.offsetWidth,q=-1,u=0,v,z;q=window.setInterval(function(){u+=1;v=g.offsetWidth!=n||h.offsetWidth!=l;z=u*50>=3E3;if(v||z)window.clearInterval(q),g.parentNode.removeChild(g),h.parentNode.removeChild(h),h=g=null,z&&Vb.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:692,className:"lime.text.Font",methodName:"__loadFromName"}),c.complete(b)},50)}return c.future},__setSize:function(a,b){},__class__:yf};var Zy=function(){};t["lime.text.GlyphMetrics"]=
Zy;Zy.__name__="lime.text.GlyphMetrics";Zy.prototype={advance:null,height:null,horizontalBearing:null,verticalBearing:null,__class__:Zy};var Lz=function(){};t["lime.text.harfbuzz.HB"]=Lz;Lz.__name__="lime.text.harfbuzz.HB";Lz.shape=function(a,b,c){};var jA={__properties__:{set_segmentProperties:"set_segmentProperties",get_segmentProperties:"get_segmentProperties",set_script:"set_script",get_script:"get_script",set_replacementCodepoint:"set_replacementCodepoint",get_replacementCodepoint:"get_replacementCodepoint",
set_length:"set_length",get_length:"get_length",set_language:"set_language",get_language:"get_language",set_flags:"set_flags",get_flags:"get_flags",set_direction:"set_direction",get_direction:"get_direction",set_contentType:"set_contentType",get_contentType:"get_contentType",set_clusterLevel:"set_clusterLevel",get_clusterLevel:"get_clusterLevel",get_allocationSuccessful:"get_allocationSuccessful"},_new:function(){return null},add:function(a,b,c){},addString:function(a,b,c,d){},addCodepoints:function(a,
b,c,d,f){},addUTF8:function(a,b,c,d){},addUTF16:function(a,b,c,d,f){},addUTF32:function(a,b,c,d,f){},clearContents:function(a){},getGlyphInfo:function(a){return null},getGlyphPositions:function(a){return null},guessSegmentProperties:function(a){},normalizeGlyphs:function(a){},preallocate:function(a,b){return!1},reset:function(a){},reverse:function(a){},reverseClusters:function(a){},get_allocationSuccessful:function(a){return!1},get_clusterLevel:function(a){return 0},set_clusterLevel:function(a,b){return b},
get_contentType:function(a){return 0},set_contentType:function(a,b){return b},get_direction:function(a){return 0},set_direction:function(a,b){return b},get_empty:function(){return null},get_flags:function(a){return 0},set_flags:function(a,b){return b},get_language:function(a){return null},set_language:function(a,b){return b},get_length:function(a){return 0},set_length:function(a,b){return b},get_replacementCodepoint:function(a){return 0},set_replacementCodepoint:function(a,b){return b},get_script:function(a){return 0},
set_script:function(a,b){return b},get_segmentProperties:function(a){return null},set_segmentProperties:function(a,b){return b}},$y=function(){};t["lime.text.harfbuzz.HBFeature"]=$y;$y.__name__="lime.text.harfbuzz.HBFeature";$y.prototype={__class__:$y};var az=function(){};t["lime.text.harfbuzz.HBGlyphInfo"]=az;az.__name__="lime.text.harfbuzz.HBGlyphInfo";az.prototype={codepoint:null,mask:null,cluster:null,__class__:az};var bz=function(){};t["lime.text.harfbuzz.HBGlyphPosition"]=bz;bz.__name__="lime.text.harfbuzz.HBGlyphPosition";
bz.prototype={xAdvance:null,xOffset:null,yAdvance:null,yOffset:null,__class__:bz};var Xz={_new:function(a){return null},toString:function(a){return null},fromString:function(a){return Xz._new(a)}},cz=function(){};t["lime.text.harfbuzz.HBSegmentProperties"]=cz;cz.__name__="lime.text.harfbuzz.HBSegmentProperties";cz.prototype={__class__:cz};var gq=function(){this.onSelectMultiple=new Hx;this.onSelect=new go;this.onSave=new go;this.onOpen=new Ux;this.onCancel=new jf};t["lime.ui.FileDialog"]=gq;gq.__name__=
"lime.ui.FileDialog";gq.prototype={onCancel:null,onOpen:null,onSave:null,onSelect:null,onSelectMultiple:null,browse:function(a,b,c,d){this.onCancel.dispatch();return!1},open:function(a,b,c){this.onCancel.dispatch();return!1},save:function(a,b,c,d,f){f==null&&(f="application/octet-stream");if(a==null)return this.onCancel.dispatch(),!1;b="";Oc.__isPNG(a)?(f="image/png",b=".png"):Oc.__isJPG(a)?(f="image/jpeg",b=".jpg"):Oc.__isGIF(a)?(f="image/gif",b=".gif"):Oc.__isWebP(a)&&(f="image/webp",b=".webp");
c=c!=null?Cg.withoutDirectory(c):"download"+b;b=a.b.bufferValue;b=b.slice(0,a.length);window.saveAs(new Blob([b],{type:f}),c,!0);this.onSave.dispatch(c);return!0},__class__:gq};var lu=R["lime.ui.FileDialogType"]={__ename__:"lime.ui.FileDialogType",__constructs__:null,OPEN:{_hx_name:"OPEN",_hx_index:0,__enum__:"lime.ui.FileDialogType",toString:E},OPEN_MULTIPLE:{_hx_name:"OPEN_MULTIPLE",_hx_index:1,__enum__:"lime.ui.FileDialogType",toString:E},SAVE:{_hx_name:"SAVE",_hx_index:2,__enum__:"lime.ui.FileDialogType",
toString:E},OPEN_DIRECTORY:{_hx_name:"OPEN_DIRECTORY",_hx_index:3,__enum__:"lime.ui.FileDialogType",toString:E}};lu.__constructs__=[lu.OPEN,lu.OPEN_MULTIPLE,lu.SAVE,lu.OPEN_DIRECTORY];var sf=function(a){this.onDisconnect=new jf;this.onButtonUp=new cu;this.onButtonDown=new cu;this.onAxisMove=new Rx;this.id=a;this.connected=!0;this.__jsGamepad=Te.__getDeviceData()[this.id]};t["lime.ui.Gamepad"]=sf;sf.__name__="lime.ui.Gamepad";sf.addMappings=function(a){};sf.__connect=function(a){if(!sf.devices.h.hasOwnProperty(a)){var b=
new sf(a);sf.devices.h[a]=b;sf.onConnect.dispatch(b)}};sf.__disconnect=function(a){var b=sf.devices.h[a];b!=null&&(b.connected=!1);sf.devices.remove(a);b!=null&&b.onDisconnect.dispatch()};sf.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,__jsGamepad:null,rumble:function(a,b,c){var d=this.__jsGamepad.vibrationActuator?this.__jsGamepad.vibrationActuator:this.__jsGamepad.hapticActuators?this.__jsGamepad.hapticActuators[0]:null;d!=null&&(d.playEffect?
d.playEffect("dual-rumble",{duration:c,strongMagnitude:a,weakMagnitude:b}):d.pulse&&d.pulse(a,c))},get_guid:function(){return this.__jsGamepad.id},get_name:function(){return this.__jsGamepad.id},__class__:sf,__properties__:{get_name:"get_name",get_guid:"get_guid"}};var Te=function(a){this.onHatMove=new Nx;this.onDisconnect=new jf;this.onButtonUp=new km;this.onButtonDown=new km;this.onAxisMove=new Mx;this.id=a;this.connected=!0};t["lime.ui.Joystick"]=Te;Te.__name__="lime.ui.Joystick";Te.__connect=
function(a){if(!Te.devices.h.hasOwnProperty(a)){var b=new Te(a);Te.devices.h[a]=b;Te.onConnect.dispatch(b)}};Te.__disconnect=function(a){var b=Te.devices.h[a];b!=null&&(b.connected=!1);Te.devices.remove(a);b!=null&&b.onDisconnect.dispatch()};Te.__getDeviceData=function(){var a=null;try{a=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null}catch(b){Pb.lastError=b}return a};Te.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,
onButtonUp:null,onDisconnect:null,onHatMove:null,get_guid:function(){return Te.__getDeviceData()[this.id].id},get_name:function(){return Te.__getDeviceData()[this.id].id},get_numAxes:function(){return Te.__getDeviceData()[this.id].axes.length},get_numButtons:function(){return Te.__getDeviceData()[this.id].buttons.length},get_numHats:function(){return 0},__class__:Te,__properties__:{get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}};
var Ac={__properties__:{set_shiftKey:"set_shiftKey",get_shiftKey:"get_shiftKey",set_numLock:"set_numLock",get_numLock:"get_numLock",set_metaKey:"set_metaKey",get_metaKey:"get_metaKey",set_ctrlKey:"set_ctrlKey",get_ctrlKey:"get_ctrlKey",set_capsLock:"set_capsLock",get_capsLock:"get_capsLock",set_altKey:"set_altKey",get_altKey:"get_altKey"},get_altKey:function(a){return(a&256)<=0?(a&512)>0:!0},set_altKey:function(a,b){return b},get_capsLock:function(a){return(a&8192)<=0?(a&8192)>0:!0},set_capsLock:function(a,
b){return b},get_ctrlKey:function(a){return(a&64)<=0?(a&128)>0:!0},set_ctrlKey:function(a,b){return b},get_metaKey:function(a){return(a&1024)<=0?(a&2048)>0:!0},set_metaKey:function(a,b){return b},get_numLock:function(a){return(a&4096)<=0?(a&4096)>0:!0},set_numLock:function(a,b){return b},get_shiftKey:function(a){return(a&1)<=0?(a&2)>0:!0},set_shiftKey:function(a,b){return b}},id=R["lime.ui.MouseCursor"]={__ename__:"lime.ui.MouseCursor",__constructs__:null,ARROW:{_hx_name:"ARROW",_hx_index:0,__enum__:"lime.ui.MouseCursor",
toString:E},CROSSHAIR:{_hx_name:"CROSSHAIR",_hx_index:1,__enum__:"lime.ui.MouseCursor",toString:E},DEFAULT:{_hx_name:"DEFAULT",_hx_index:2,__enum__:"lime.ui.MouseCursor",toString:E},MOVE:{_hx_name:"MOVE",_hx_index:3,__enum__:"lime.ui.MouseCursor",toString:E},POINTER:{_hx_name:"POINTER",_hx_index:4,__enum__:"lime.ui.MouseCursor",toString:E},RESIZE_NESW:{_hx_name:"RESIZE_NESW",_hx_index:5,__enum__:"lime.ui.MouseCursor",toString:E},RESIZE_NS:{_hx_name:"RESIZE_NS",_hx_index:6,__enum__:"lime.ui.MouseCursor",
toString:E},RESIZE_NWSE:{_hx_name:"RESIZE_NWSE",_hx_index:7,__enum__:"lime.ui.MouseCursor",toString:E},RESIZE_WE:{_hx_name:"RESIZE_WE",_hx_index:8,__enum__:"lime.ui.MouseCursor",toString:E},TEXT:{_hx_name:"TEXT",_hx_index:9,__enum__:"lime.ui.MouseCursor",toString:E},WAIT:{_hx_name:"WAIT",_hx_index:10,__enum__:"lime.ui.MouseCursor",toString:E},WAIT_ARROW:{_hx_name:"WAIT_ARROW",_hx_index:11,__enum__:"lime.ui.MouseCursor",toString:E},CUSTOM:{_hx_name:"CUSTOM",_hx_index:12,__enum__:"lime.ui.MouseCursor",
toString:E}};id.__constructs__=[id.ARROW,id.CROSSHAIR,id.DEFAULT,id.MOVE,id.POINTER,id.RESIZE_NESW,id.RESIZE_NS,id.RESIZE_NWSE,id.RESIZE_WE,id.TEXT,id.WAIT,id.WAIT_ARROW,id.CUSTOM];var Vl=R["lime.ui.MouseWheelMode"]={__ename__:"lime.ui.MouseWheelMode",__constructs__:null,PIXELS:{_hx_name:"PIXELS",_hx_index:0,__enum__:"lime.ui.MouseWheelMode",toString:E},LINES:{_hx_name:"LINES",_hx_index:1,__enum__:"lime.ui.MouseWheelMode",toString:E},PAGES:{_hx_name:"PAGES",_hx_index:2,__enum__:"lime.ui.MouseWheelMode",
toString:E},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:3,__enum__:"lime.ui.MouseWheelMode",toString:E}};Vl.__constructs__=[Vl.PIXELS,Vl.LINES,Vl.PAGES,Vl.UNKNOWN];var Ue=function(a,b,c,d,f,g,h){this.x=a;this.y=b;this.id=c;this.dx=d;this.dy=f;this.pressure=g;this.device=h};t["lime.ui.Touch"]=Ue;Ue.__name__="lime.ui.Touch";Ue.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:Ue};var lm=function(a,b){this.__maxWidth=this.__maxHeight=2147483647;this.clickCount=this.__minWidth=
this.__minHeight=0;this.onTextInput=new go;this.onTextEdit=new Ox;this.onShow=new jf;this.onRestore=new jf;this.onResize=new au;this.onRenderContextRestored=new bu;this.onRenderContextLost=new jf;this.onRender=new bu;this.onMove=new dq;this.onMouseWheel=new Lx;this.onMouseUp=new Jx;this.onMouseMoveRelative=new dq;this.onMouseMove=new dq;this.onMouseDown=new Kx;this.onMinimize=new jf;this.onMaximize=new jf;this.onLeave=new jf;this.onKeyUp=new du;this.onKeyDown=new du;this.onHide=new jf;this.onFullscreen=
new jf;this.onFocusOut=new jf;this.onFocusIn=new jf;this.onExpose=new jf;this.onEnter=new jf;this.onDropFile=new go;this.onDeactivate=new jf;this.onClose=new jf;this.onActivate=new jf;this.application=a;this.__attributes=b!=null?b:{};Object.prototype.hasOwnProperty.call(this.__attributes,"parameters")&&(this.parameters=this.__attributes.parameters);this.__height=this.__width=0;this.__fullscreen=!1;this.__scale=1;this.__y=this.__x=0;this.__title=Object.prototype.hasOwnProperty.call(this.__attributes,
"title")?this.__attributes.title:"";this.__hidden=!1;this.__borderless=Object.prototype.hasOwnProperty.call(this.__attributes,"borderless")&&this.__attributes.borderless;this.__resizable=Object.prototype.hasOwnProperty.call(this.__attributes,"resizable")&&this.__attributes.resizable;this.__maximized=Object.prototype.hasOwnProperty.call(this.__attributes,"maximized")&&this.__attributes.maximized;this.__minimized=Object.prototype.hasOwnProperty.call(this.__attributes,"minimized")&&this.__attributes.minimized;
this.id=-1;this.__backend=new xc(this)};t["lime.ui.Window"]=lm;lm.__name__="lime.ui.Window";lm.prototype={application:null,context:null,display:null,element:null,hidden:null,id:null,onActivate:null,onClose:null,onDeactivate:null,onDropFile:null,onEnter:null,onExpose:null,onFocusIn:null,onFocusOut:null,onFullscreen:null,onHide:null,onKeyDown:null,onKeyUp:null,onLeave:null,onMaximize:null,onMinimize:null,onMouseDown:null,onMouseMove:null,onMouseMoveRelative:null,onMouseUp:null,onMouseWheel:null,onMove:null,
onRender:null,onRenderContextLost:null,onRenderContextRestored:null,onResize:null,onRestore:null,onShow:null,onTextEdit:null,onTextInput:null,parameters:null,scale:null,stage:null,clickCount:null,__attributes:null,__backend:null,__borderless:null,__fullscreen:null,__height:null,__hidden:null,__maximized:null,__minimized:null,__resizable:null,__scale:null,__title:null,__width:null,__x:null,__y:null,__minWidth:null,__minHeight:null,__maxWidth:null,__maxHeight:null,alert:function(a,b){this.__backend.alert(a,
b)},close:function(){this.__backend.close()},focus:function(){this.__backend.focus()},move:function(a,b){this.__backend.move(a,b);this.__x=a;this.__y=b},readPixels:function(a){return this.__backend.readPixels(a)},resize:function(a,b){a<this.__minWidth?a=this.__minWidth:a>this.__maxWidth&&(a=this.__maxWidth);b<this.__minHeight?b=this.__minHeight:b>this.__maxHeight&&(b=this.__maxHeight);this.__backend.resize(a,b);this.__width=a;this.__height=b},setMinSize:function(a,b){this.__backend.setMinSize(a,b);
this.__minWidth=a;this.__minHeight=b;(this.__width<this.__minWidth||this.__height<this.__minHeight)&&this.resize(this.__width,this.__height)},setMaxSize:function(a,b){this.__backend.setMaxSize(a,b);this.__maxWidth=a;this.__maxHeight=b;(this.__width>this.__maxWidth||this.__height>this.__maxHeight)&&this.resize(this.__width,this.__height)},setIcon:function(a){a!=null&&this.__backend.setIcon(a)},toString:function(){return"[object Window]"},warpMouse:function(a,b){this.__backend.warpMouse(a,b)},get_cursor:function(){return this.__backend.getCursor()},
set_cursor:function(a){return this.__backend.setCursor(a)},get_display:function(){return this.__backend.getDisplay()},get_displayMode:function(){return this.__backend.getDisplayMode()},set_displayMode:function(a){return this.__backend.setDisplayMode(a)},get_borderless:function(){return this.__borderless},set_borderless:function(a){return this.__borderless=this.__backend.setBorderless(a)},get_frameRate:function(){return this.__backend.getFrameRate()},set_frameRate:function(a){return this.__backend.setFrameRate(a)},
get_fullscreen:function(){return this.__fullscreen},set_fullscreen:function(a){return this.__fullscreen=this.__backend.setFullscreen(a)},get_height:function(){return this.__height},set_height:function(a){this.resize(this.__width,a);return this.__height},get_hidden:function(){return this.__hidden},get_maxHeight:function(){return this.__maxHeight},set_maxHeight:function(a){this.setMaxSize(this.__maxWidth,a);return this.__maxHeight},get_maximized:function(){return this.__maximized},set_maximized:function(a){this.__minimized=
!1;return this.__maximized=this.__backend.setMaximized(a)},get_maxWidth:function(){return this.__maxWidth},set_maxWidth:function(a){this.setMinSize(a,this.__maxHeight);return this.__maxWidth},get_minHeight:function(){return this.__minHeight},set_minHeight:function(a){this.setMinSize(this.__minWidth,a);return this.__minHeight},get_minimized:function(){return this.__minimized},set_minimized:function(a){this.__maximized=!1;return this.__minimized=this.__backend.setMinimized(a)},get_minWidth:function(){return this.__minWidth},
set_minWidth:function(a){this.setMinSize(a,this.__minHeight);return this.__minWidth},get_mouseLock:function(){return this.__backend.getMouseLock()},set_mouseLock:function(a){this.__backend.setMouseLock(a);return a},get_opacity:function(){return this.__backend.getOpacity()},set_opacity:function(a){this.__backend.setOpacity(a);return a},get_resizable:function(){return this.__resizable},set_resizable:function(a){return this.__resizable=this.__backend.setResizable(a)},get_scale:function(){return this.__scale},
get_textInputEnabled:function(){return this.__backend.getTextInputEnabled()},set_textInputEnabled:function(a){return this.__backend.setTextInputEnabled(a)},setTextInputRect:function(a){return this.__backend.setTextInputRect(a)},get_title:function(){return this.__title},set_title:function(a){return this.__title=this.__backend.setTitle(a)},get_visible:function(){return!this.__hidden},set_visible:function(a){this.__hidden=!this.__backend.setVisible(a);return!this.__hidden},get_width:function(){return this.__width},
set_width:function(a){this.resize(a,this.__height);return this.__width},get_x:function(){return this.__x},set_x:function(a){this.move(a,this.__y);return this.__x},get_y:function(){return this.__y},set_y:function(a){this.move(this.__x,a);return this.__y},__class__:lm,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_title:"set_title",get_title:"get_title",set_textInputEnabled:"set_textInputEnabled",
get_textInputEnabled:"get_textInputEnabled",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_opacity:"set_opacity",get_opacity:"get_opacity",set_mouseLock:"set_mouseLock",get_mouseLock:"get_mouseLock",set_minWidth:"set_minWidth",get_minWidth:"get_minWidth",set_minimized:"set_minimized",get_minimized:"get_minimized",set_minHeight:"set_minHeight",get_minHeight:"get_minHeight",set_maxWidth:"set_maxWidth",get_maxWidth:"get_maxWidth",set_maximized:"set_maximized",get_maximized:"get_maximized",
set_maxHeight:"set_maxHeight",get_maxHeight:"get_maxHeight",get_hidden:"get_hidden",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_displayMode:"set_displayMode",get_displayMode:"get_displayMode",get_display:"get_display",set_cursor:"set_cursor",get_cursor:"get_cursor",set_borderless:"set_borderless",get_borderless:"get_borderless"}};var Yz=R["lime.utils.TAError"]={__ename__:"lime.utils.TAError",
__constructs__:null,RangeError:{_hx_name:"RangeError",_hx_index:0,__enum__:"lime.utils.TAError",toString:E}};Yz.__constructs__=[Yz.RangeError];var tj=function(){this.data=new G;this.paths=[]};t["lime.utils.AssetBundle"]=tj;tj.__name__="lime.utils.AssetBundle";tj.fromBytes=function(a){a=new ao(a);return tj.__extractBundle(a)};tj.fromFile=function(a){return null};tj.loadFromBytes=function(a){return Hc.withValue(tj.fromBytes(a))};tj.loadFromFile=function(a){return rg.loadFromFile(a).then(tj.loadFromBytes)};
tj.__extractBundle=function(a){var b=aq.readZip(a);a=new tj;for(b=b.h;b!=null;){var c=b.item;b=b.next;if(c.compressed){var d=a.data,f=c.fileName,g=rg.decompress(c.data,tk.DEFLATE);d.h[f]=g}else a.data.h[c.fileName]=c.data;a.paths.push(c.fileName)}return a};tj.prototype={data:null,paths:null,__class__:tj};var cy=function(){this.enabled=!0;this.audio=new G;this.font=new G;this.image=new G;this.version=915027};t["lime.utils.AssetCache"]=cy;cy.__name__="lime.utils.AssetCache";cy.prototype={audio:null,
enabled:null,image:null,font:null,version:null,exists:function(a,b){return(b=="IMAGE"||b==null)&&Object.prototype.hasOwnProperty.call(this.image.h,a)||(b=="FONT"||b==null)&&Object.prototype.hasOwnProperty.call(this.font.h,a)||(b=="SOUND"||b=="MUSIC"||b==null)&&Object.prototype.hasOwnProperty.call(this.audio.h,a)?!0:!1},set:function(a,b,c){switch(b){case "FONT":this.font.h[a]=c;break;case "IMAGE":if(!(c instanceof Oc))throw ba.thrown("Cannot cache non-Image asset: "+H.string(c)+" as Image");this.image.h[a]=
c;break;case "MUSIC":case "SOUND":if(!(c instanceof qe))throw ba.thrown("Cannot cache non-AudioBuffer asset: "+H.string(c)+" as AudioBuffer");this.audio.h[a]=c;break;default:throw ba.thrown(b+" assets are not cachable");}},clear:function(a){if(a==null)this.audio=new G,this.font=new G,this.image=new G;else{var b=this.audio.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];if(N.startsWith(f,a)){var g=this.audio;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}}b=this.font.h;b=Object.keys(b);
c=b.length;for(d=0;d<c;)f=b[d++],N.startsWith(f,a)&&(g=this.font,Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]);b=this.image.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],N.startsWith(f,a)&&(g=this.image,Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f])}},__class__:cy};var ed=function(){this.types=new G;this.sizes=new G;this.preload=new G;this.paths=new G;this.pathGroups=new G;this.classTypes=new G;this.cachedText=new G;this.cachedImages=new G;this.cachedFonts=new G;this.cachedBytes=
new G;this.cachedAudioBuffers=new G;this.onChange=new jf;this.bytesTotal=this.bytesLoaded=0};t["lime.utils.AssetLibrary"]=ed;ed.__name__="lime.utils.AssetLibrary";ed.fromBytes=function(a,b){return ed.fromManifest(xe.fromBytes(a,b))};ed.fromFile=function(a,b){return ed.fromManifest(xe.fromFile(a,b))};ed.fromBundle=function(a){if(Object.prototype.hasOwnProperty.call(a.data.h,"library.json")){var b=xe.fromBytes(a.data.h["library.json"]);if(b!=null){if(b.libraryType==null)var c=new ed;else if(c=t[b.libraryType],
c!=null)c=ab.createInstance(c,b.libraryArgs);else return Vb.warn("Could not find library type: "+b.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:122,className:"lime.utils.AssetLibrary",methodName:"fromBundle"}),null;c.__fromBundle(a,b);return c}}else return c=new ed,c.__fromBundle(a),c;return null};ed.fromManifest=function(a){if(a==null)return null;if(a.libraryType==null)var b=new ed;else if(b=t[a.libraryType],b!=null)b=ab.createInstance(b,a.libraryArgs);else return Vb.warn("Could not find library type: "+
a.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:160,className:"lime.utils.AssetLibrary",methodName:"fromManifest"}),null;b.__fromManifest(a);return b};ed.loadFromBytes=function(a,b){return xe.loadFromBytes(a,b).then(function(c){return ed.loadFromManifest(c)})};ed.loadFromFile=function(a,b){return xe.loadFromFile(a,b).then(function(c){return ed.loadFromManifest(c)})};ed.loadFromManifest=function(a){a=ed.fromManifest(a);return a!=null?a.load():Hc.withError("Could not load asset manifest")};
ed.prototype={onChange:null,assetsLoaded:null,assetsTotal:null,bytesLoaded:null,bytesLoadedCache:null,bytesTotal:null,cachedAudioBuffers:null,cachedBytes:null,cachedFonts:null,cachedImages:null,cachedText:null,classTypes:null,loaded:null,pathGroups:null,paths:null,preload:null,promise:null,sizes:null,types:null,exists:function(a,b){b=b!=null?w.__cast(b,String):null;a=this.types.h[a];return a==null||a!=b&&(b!="SOUND"&&b!="MUSIC"||a!="MUSIC"&&a!="SOUND")&&b!="BINARY"&&b!=null&&(a!="BINARY"||b!="TEXT")?
!1:!0},getAsset:function(a,b){switch(b){case "BINARY":return this.getBytes(a);case "FONT":return this.getFont(a);case "IMAGE":return this.getImage(a);case "MUSIC":case "SOUND":return this.getAudioBuffer(a);case "TEMPLATE":throw ba.thrown("Not sure how to get template: "+a);case "TEXT":return this.getText(a);default:throw ba.thrown("Unknown asset type: "+b);}},getAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?this.cachedAudioBuffers.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,
a)?qe.fromBytes(w.__cast(ab.createInstance(this.classTypes.h[a],[]),Oa)):qe.fromFile(this.getPath(a))},getBytes:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a))return this.cachedBytes.h[a];if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a)){var b=rg.ofString(this.cachedText.h[a]);return this.cachedBytes.h[a]=b}return Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?w.__cast(ab.createInstance(this.classTypes.h[a],[]),Oa):rg.fromFile(this.getPath(a))},getFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,
a)?this.cachedFonts.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?w.__cast(ab.createInstance(this.classTypes.h[a],[]),yf):yf.fromFile(this.getPath(a))},getImage:function(a){return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?this.cachedImages.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?w.__cast(ab.createInstance(this.classTypes.h[a],[]),Oc):Oc.fromFile(this.getPath(a))},getPath:function(a){return Object.prototype.hasOwnProperty.call(this.paths.h,
a)?this.paths.h[a]:Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?this.pathGroups.h[a][0]:null},getText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return this.cachedText.h[a];a=this.getBytes(a);return a==null?null:a.getString(0,a.length)},isLocal:function(a,b){if(Object.prototype.hasOwnProperty.call(this.classTypes.h,a))return!0;b=w.__cast(b,String);if(b==null)return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.cachedText.h,
a)||Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)||Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?!0:Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);switch(b){case "FONT":return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);case "IMAGE":return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a);case "MUSIC":case "SOUND":return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a);default:return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,
a)?!0:Object.prototype.hasOwnProperty.call(this.cachedText.h,a)}},list:function(a){for(var b=a!=null?w.__cast(a,String):null,c=[],d=Object.keys(this.types.h),f=d.length,g=0;g<f;){var h=d[g++];(b==null||this.exists(h,a))&&c.push(h)}return c},loadAsset:function(a,b){switch(b){case "BINARY":return this.loadBytes(a);case "FONT":return this.loadFont(a);case "IMAGE":return this.loadImage(a);case "MUSIC":case "SOUND":return this.loadAudioBuffer(a);case "TEMPLATE":throw ba.thrown("Not sure how to load template: "+
a);case "TEXT":return this.loadText(a);default:throw ba.thrown("Unknown asset type: "+b);}},load:function(){if(this.loaded)return Hc.withValue(this);if(this.promise==null){this.promise=new Mf;this.bytesLoadedCache=new G;this.assetsLoaded=0;this.assetsTotal=1;for(var a=Object.keys(this.preload.h),b=a.length,c=0;c<b;){var d=a[c++];if(this.preload.h[d]){Vb.verbose("Preloading asset: "+d+" ["+this.types.h[d]+"]",{fileName:"lime/utils/AssetLibrary.hx",lineNumber:408,className:"lime.utils.AssetLibrary",
methodName:"load"});var f=this.types.h[d];if(f!=null)switch(f){case "BINARY":this.assetsTotal++;f=this.loadBytes(d);f.onProgress(function(g,h){return function(n,l){h[0].load_onProgress(g[0],n,l)}}([d],[this]));f.onError(function(g,h){return function(n){h[0].load_onError(g[0],n)}}([d],[this]));f.onComplete(function(g,h){return function(n){h[0].loadBytes_onComplete(g[0],n)}}([d],[this]));break;case "FONT":this.assetsTotal++;f=this.loadFont(d);f.onProgress(function(g,h){return function(n,l){h[0].load_onProgress(g[0],
n,l)}}([d],[this]));f.onError(function(g,h){return function(n){h[0].load_onError(g[0],n)}}([d],[this]));f.onComplete(function(g,h){return function(n){h[0].loadFont_onComplete(g[0],n)}}([d],[this]));break;case "IMAGE":this.assetsTotal++;f=this.loadImage(d);f.onProgress(function(g,h){return function(n,l){h[0].load_onProgress(g[0],n,l)}}([d],[this]));f.onError(function(g,h){return function(n){h[0].load_onError(g[0],n)}}([d],[this]));f.onComplete(function(g,h){return function(n){h[0].loadImage_onComplete(g[0],
n)}}([d],[this]));break;case "MUSIC":case "SOUND":this.assetsTotal++;f=this.loadAudioBuffer(d);f.onProgress(function(g,h){return function(n,l){h[0].load_onProgress(g[0],n,l)}}([d],[this]));f.onError(function(g,h){return function(n){h[0].loadAudioBuffer_onError(g[0],n)}}([d],[this]));f.onComplete(function(g,h){return function(n){h[0].loadAudioBuffer_onComplete(g[0],n)}}([d],[this]));break;case "TEXT":this.assetsTotal++,f=this.loadText(d),f.onProgress(function(g,h){return function(n,l){h[0].load_onProgress(g[0],
n,l)}}([d],[this])),f.onError(function(g,h){return function(n){h[0].load_onError(g[0],n)}}([d],[this])),f.onComplete(function(g,h){return function(n){h[0].loadText_onComplete(g[0],n)}}([d],[this]))}}}this.__assetLoaded(null)}return this.promise.future},loadAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?Hc.withValue(this.cachedAudioBuffers.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?Hc.withValue(qe.fromBytes(w.__cast(ab.createInstance(this.classTypes.h[a],
[]),Oa))):Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?qe.loadFromFiles(this.pathGroups.h[a]):qe.loadFromFile(this.paths.h[a])},loadBytes:function(a){return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?Hc.withValue(this.cachedBytes.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?Hc.withValue(ab.createInstance(this.classTypes.h[a],[])):rg.loadFromFile(this.getPath(a))},loadFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a)?
Hc.withValue(this.cachedFonts.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?(a=ab.createInstance(this.classTypes.h[a],[]),a.__loadFromName(a.name)):yf.loadFromName(this.getPath(a))},loadImage:function(a){var b=this;return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?Hc.withValue(this.cachedImages.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?Hc.withValue(ab.createInstance(this.classTypes.h[a],[])):Object.prototype.hasOwnProperty.call(this.cachedBytes.h,
a)?Oc.loadFromBytes(this.cachedBytes.h[a]).then(function(c){var d=b.cachedBytes;Object.prototype.hasOwnProperty.call(d.h,a)&&delete d.h[a];b.cachedImages.h[a]=c;return Hc.withValue(c)}):Oc.loadFromFile(this.getPath(a))},loadText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return Hc.withValue(this.cachedText.h[a]);if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.classTypes.h,a)){var b=this.getBytes(a);if(b==null)return Hc.withValue(null);
b=b.getString(0,b.length);this.cachedText.h[a]=b;return Hc.withValue(b)}return(new io).load(this.getPath(a))},unload:function(){this.cachedBytes.h=Object.create(null);this.cachedFonts.h=Object.create(null);this.cachedImages.h=Object.create(null);this.cachedAudioBuffers.h=Object.create(null);this.cachedText.h=Object.create(null)},__assetLoaded:function(a){this.assetsLoaded++;a!=null&&Vb.verbose("Loaded asset: "+a+" ["+this.types.h[a]+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"lime/utils/AssetLibrary.hx",
lineNumber:637,className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"});if(a!=null){var b=Object.prototype.hasOwnProperty.call(this.sizes.h,a)?this.sizes.h[a]:0;if(Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)){var c=this.bytesLoadedCache.h[a];c<b&&(this.bytesLoaded+=b-c)}else this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b}this.assetsLoaded<this.assetsTotal?this.promise.progress(this.bytesLoaded,this.bytesTotal):(this.loaded=!0,this.promise.progress(this.bytesTotal,this.bytesTotal),
this.promise.complete(this))},__cacheBreak:function(a){return mb.__cacheBreak(a)},__fromBundle:function(a,b){if(b!=null){var c=0;for(b=b.assets;c<b.length;){var d=b[c];++c;var f=Object.prototype.hasOwnProperty.call(d,"id")?d.id:d.path;var g=a.data.h[d.path];if(Object.prototype.hasOwnProperty.call(d,"type")){var h=d.type;h=="TEXT"?this.cachedText.h[f]=g!=null?H.string(g):null:this.cachedBytes.h[f]=g;this.types.h[f]=d.type}else this.cachedBytes.h[f]=g,this.types.h[f]="BINARY"}}else for(c=0,b=a.paths;c<
b.length;)f=b[c],++c,this.cachedBytes.h[f]=a.data.h[f],this.types.h[f]="BINARY"},__fromManifest:function(a){var b=a.version>=2,c=a.rootPath;c==null&&(c="");c!=""&&(c+="/");for(var d=0,f=a.assets;d<f.length;){var g=f[d];++d;var h=b&&Object.prototype.hasOwnProperty.call(g,"size")?g.size:100;var n=Object.prototype.hasOwnProperty.call(g,"id")?g.id:g.path;if(Object.prototype.hasOwnProperty.call(g,"path")){var l=this.paths;var q=this.__cacheBreak(this.__resolvePath(c+H.string(y.field(g,"path"))));l.h[n]=
q}if(Object.prototype.hasOwnProperty.call(g,"pathGroup")){l=y.field(g,"pathGroup");q=0;for(var u=l.length;q<u;){var v=q++;l[v]=this.__cacheBreak(this.__resolvePath(c+l[v]))}this.pathGroups.h[n]=l}this.sizes.h[n]=h;this.types.h[n]=g.type;Object.prototype.hasOwnProperty.call(g,"preload")&&(this.preload.h[n]=y.field(g,"preload"));Object.prototype.hasOwnProperty.call(g,"className")&&(h=y.field(g,"className"),h=t[h],this.classTypes.h[n]=h)}d=this.bytesTotal=0;for(f=a.assets;d<f.length;)g=f[d],++d,n=Object.prototype.hasOwnProperty.call(g,
"id")?g.id:g.path,Object.prototype.hasOwnProperty.call(this.preload.h,n)&&this.preload.h[n]&&Object.prototype.hasOwnProperty.call(this.sizes.h,n)&&(this.bytesTotal+=this.sizes.h[n])},__resolvePath:function(a){a=N.replace(a,"\\","/");var b=a.indexOf(":");N.startsWith(a,"http")&&b>0?(b+=3,a=V.substr(a,0,b)+N.replace(V.substr(a,b,null),"//","/")):a=N.replace(a,"//","/");if(a.indexOf("./")>-1){a=a.split("/");b=[];for(var c=0,d=a.length;c<d;){var f=c++;a[f]==".."?f==0||b[f-1]==".."?b.push(".."):b.pop():
a[f]=="."?f==0&&b.push("."):b.push(a[f])}a=b.join("/")}return a},loadAudioBuffer_onComplete:function(a,b){this.cachedAudioBuffers.h[a]=b;if(Object.prototype.hasOwnProperty.call(this.pathGroups.h,a))for(var c=this.pathGroups.h[a],d=Object.keys(this.pathGroups.h),f=d.length,g=0;g<f;){var h=d[g++];if(h!=a)for(var n=0;n<c.length;){var l=c[n];++n;if(this.pathGroups.h[h].indexOf(l)>-1){this.cachedAudioBuffers.h[h]=b;break}}}this.__assetLoaded(a)},loadAudioBuffer_onError:function(a,b){b!=null&&b!=""?Vb.warn('Could not load "'+
a+'": '+H.string(b),{fileName:"lime/utils/AssetLibrary.hx",lineNumber:883,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"}):Vb.warn('Could not load "'+a+'"',{fileName:"lime/utils/AssetLibrary.hx",lineNumber:887,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"});this.loadAudioBuffer_onComplete(a,new qe)},loadBytes_onComplete:function(a,b){this.cachedBytes.h[a]=b;this.__assetLoaded(a)},loadFont_onComplete:function(a,b){this.cachedFonts.h[a]=b;this.__assetLoaded(a)},
loadImage_onComplete:function(a,b){this.cachedImages.h[a]=b;this.__assetLoaded(a)},loadText_onComplete:function(a,b){this.cachedText.h[a]=b;this.__assetLoaded(a)},load_onError:function(a,b){b!=null&&b!=""?this.promise.error('Error loading asset "'+a+'": '+H.string(b)):this.promise.error('Error loading asset "'+a+'"')},load_onProgress:function(a,b,c){if(b>0){var d=this.sizes.h[a];c>0?(b/=c,b>1&&(b=1),b=Math.floor(b*d)):b>d&&(b=d);Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)?(d=this.bytesLoadedCache.h[a],
b!=d&&(this.bytesLoaded+=b-d)):this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b;this.promise.progress(this.bytesLoaded,this.bytesTotal)}},__class__:ed};var xe=function(){this.assets=[];this.libraryArgs=[];this.version=2};t["lime.utils.AssetManifest"]=xe;xe.__name__="lime.utils.AssetManifest";xe.fromBytes=function(a,b){return a!=null?xe.parse(a.getString(0,a.length),b):null};xe.fromFile=function(a,b){a=xe.__resolvePath(a);b=xe.__resolveRootPath(b,a);return a==null?null:xe.fromBytes(rg.fromFile(a),
b)};xe.loadFromBytes=function(a,b){return Hc.withValue(xe.fromBytes(a,b))};xe.loadFromFile=function(a,b){a=xe.__resolvePath(a);b=xe.__resolveRootPath(b,a);return a==null?null:rg.loadFromFile(a).then(function(c){return Hc.withValue(xe.fromBytes(c,b))})};xe.parse=function(a,b){if(a==null||a=="")return null;a=(new En(a)).doParse();var c=new xe;Object.prototype.hasOwnProperty.call(a,"name")&&(c.name=a.name);Object.prototype.hasOwnProperty.call(a,"libraryType")&&(c.libraryType=a.libraryType);Object.prototype.hasOwnProperty.call(a,
"libraryArgs")&&(c.libraryArgs=a.libraryArgs);if(Object.prototype.hasOwnProperty.call(a,"assets")){var d=a.assets;Object.prototype.hasOwnProperty.call(a,"version")&&a.version<=2?c.assets=Pg.run(d):c.assets=d}Object.prototype.hasOwnProperty.call(a,"rootPath")&&(c.rootPath=a.rootPath);b!=null&&b!=""&&(c.rootPath=c.rootPath==null||c.rootPath==""?b:b+"/"+c.rootPath);return c};xe.__resolvePath=function(a){if(a==null)return null;var b=a.indexOf("?");var c=b>-1?V.substr(a,0,b):a;for(c=N.replace(c,"\\","/");N.endsWith(c,
"/");)c=V.substr(c,0,c.length-1);return N.endsWith(c,".bundle")?b>-1?c+"/library.json"+V.substr(a,b,null):c+"/library.json":a};xe.__resolveRootPath=function(a,b){if(a!=null)return a;a=b.indexOf("?");a=a>-1?V.substr(b,0,a):b;for(a=N.replace(a,"\\","/");N.endsWith(a,"/");){if(a=="/")return a;a=V.substr(a,0,a.length-1)}return N.endsWith(a,".bundle")?a:Cg.directory(a)};xe.prototype={assets:null,libraryArgs:null,libraryType:null,name:null,rootPath:null,version:null,serialize:function(){var a={};a.version=
this.version;a.libraryType=this.libraryType;a.libraryArgs=this.libraryArgs;a.name=this.name;a.assets=Bg.run(this.assets);a.rootPath=this.rootPath;return yg.print(a,null,null)},__class__:xe};var mb=function(){};t["lime.utils.Assets"]=mb;mb.__name__="lime.utils.Assets";mb.exists=function(a,b){b==null&&(b="BINARY");var c=a.indexOf(":"),d=a.substring(0,c);a=a.substring(c+1);d=mb.getLibrary(d);return d!=null?d.exists(a,b):!1};mb.getAsset=function(a,b,c){if(c&&mb.cache.enabled)switch(b){case "FONT":var d=
mb.cache.font.h[a];if(d!=null)return d;break;case "IMAGE":d=mb.cache.image.h[a];if(mb.isValidImage(d))return d;break;case "MUSIC":case "SOUND":d=mb.cache.audio.h[a];if(mb.isValidAudio(d))return d;break;case "TEMPLATE":throw ba.thrown("Not sure how to get template: "+a);case "BINARY":case "TEXT":c=!1;break;default:return null}var f=a.indexOf(":");d=a.substring(0,f);f=a.substring(f+1);var g=mb.getLibrary(d);if(g!=null)if(g.exists(f,b)){if(g.isLocal(f,b))return d=g.getAsset(f,b),c&&mb.cache.enabled&&
mb.cache.set(a,b,d),d;Vb.error(b+' asset "'+a+'" exists, but only asynchronously',{fileName:"lime/utils/Assets.hx",lineNumber:133,className:"lime.utils.Assets",methodName:"getAsset"})}else Vb.error("There is no "+b+' asset with an ID of "'+a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:138,className:"lime.utils.Assets",methodName:"getAsset"});else Vb.error(mb.__libraryNotFound(d),{fileName:"lime/utils/Assets.hx",lineNumber:143,className:"lime.utils.Assets",methodName:"getAsset"});return null};
mb.getAudioBuffer=function(a,b){b==null&&(b=!0);return mb.getAsset(a,"SOUND",b)};mb.getBytes=function(a){return mb.getAsset(a,"BINARY",!1)};mb.getFont=function(a,b){b==null&&(b=!0);return mb.getAsset(a,"FONT",b)};mb.getImage=function(a,b){b==null&&(b=!0);return mb.getAsset(a,"IMAGE",b)};mb.getLibrary=function(a){if(a==null||a=="")a="default";return mb.libraries.h[a]};mb.getPath=function(a){var b=a.indexOf(":"),c=a.substring(0,b);b=a.substring(b+1);var d=mb.getLibrary(c);if(d!=null){if(d.exists(b,
null))return d.getPath(b);Vb.error('There is no asset with an ID of "'+a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:240,className:"lime.utils.Assets",methodName:"getPath"})}else Vb.error(mb.__libraryNotFound(c),{fileName:"lime/utils/Assets.hx",lineNumber:245,className:"lime.utils.Assets",methodName:"getPath"});return null};mb.getText=function(a){return mb.getAsset(a,"TEXT",!1)};mb.hasLibrary=function(a){if(a==null||a=="")a="default";return Object.prototype.hasOwnProperty.call(mb.libraries.h,
a)};mb.isLocal=function(a,b,c){c==null&&(c=!0);if(c&&mb.cache.enabled&&mb.cache.exists(a,b))return!0;var d=a.indexOf(":");c=a.substring(0,d);a=a.substring(d+1);c=mb.getLibrary(c);return c!=null?c.isLocal(a,b):!1};mb.isValidAudio=function(a){return a!=null};mb.isValidImage=function(a){return a!=null?a.buffer!=null:!1};mb.list=function(a){for(var b=[],c=mb.libraries.h,d=Object.keys(c),f=d.length,g=0;g<f;){var h=c[d[g++]].list(a);h!=null&&(b=b.concat(h))}return b};mb.loadAsset=function(a,b,c){if(c&&
mb.cache.enabled)switch(b){case "FONT":var d=mb.cache.font.h[a];if(d!=null)return Hc.withValue(d);break;case "IMAGE":d=mb.cache.image.h[a];if(mb.isValidImage(d))return Hc.withValue(d);break;case "MUSIC":case "SOUND":d=mb.cache.audio.h[a];if(mb.isValidAudio(d))return Hc.withValue(d);break;case "TEMPLATE":throw ba.thrown("Not sure how to get template: "+a);case "BINARY":case "TEXT":c=!1;break;default:return null}var f=a.indexOf(":");d=a.substring(0,f);f=a.substring(f+1);var g=mb.getLibrary(d);if(g!=
null){if(g.exists(f,b)){d=g.loadAsset(f,b);if(c&&mb.cache.enabled)d.onComplete(function(h){mb.cache.set(a,b,h)});return d}return Hc.withError("There is no "+b+' asset with an ID of "'+a+'"')}return Hc.withError(mb.__libraryNotFound(d))};mb.loadAudioBuffer=function(a,b){b==null&&(b=!0);return mb.loadAsset(a,"SOUND",b)};mb.loadBytes=function(a){return mb.loadAsset(a,"BINARY",!1)};mb.loadFont=function(a,b){b==null&&(b=!0);return mb.loadAsset(a,"FONT",b)};mb.loadImage=function(a,b){b==null&&(b=!0);return mb.loadAsset(a,
"IMAGE",b)};mb.loadLibrary=function(a){var b=new Mf,c=mb.getLibrary(a);if(c!=null)return c.load();c=a;var d=null;if(Object.prototype.hasOwnProperty.call(mb.bundlePaths.h,a))tj.loadFromFile(mb.bundlePaths.h[a]).onComplete(function(f){f==null?b.error('Cannot load bundle for library "'+a+'"'):(f=ed.fromBundle(f),f==null?b.error('Cannot open library "'+a+'"'):(mb.libraries.h[a]=f,f.onChange.add((B=mb.onChange,m(B,B.dispatch))),b.completeWith(f.load())))}).onError(function(f){b.error('There is no asset library with an ID of "'+
a+'"')});else Object.prototype.hasOwnProperty.call(mb.libraryPaths.h,a)?(c=mb.libraryPaths.h[a],d=Cg.directory(c)):(N.endsWith(c,".bundle")?(d=c,c+="/library.json"):d=Cg.directory(c),c=mb.__cacheBreak(c)),xe.loadFromFile(c,d).onComplete(function(f){f==null?b.error('Cannot parse asset manifest for library "'+a+'"'):(f=ed.fromManifest(f),f==null?b.error('Cannot open library "'+a+'"'):(mb.libraries.h[a]=f,f.onChange.add((B=mb.onChange,m(B,B.dispatch))),b.completeWith(f.load())))}).onError(function(f){b.error('There is no asset library with an ID of "'+
a+'"')});return b.future};mb.loadText=function(a){return mb.loadAsset(a,"TEXT",!1)};mb.registerLibrary=function(a,b){if(a==null||a=="")a="default";if(Object.prototype.hasOwnProperty.call(mb.libraries.h,a)){if(mb.libraries.h[a]==b)return;mb.unloadLibrary(a)}b!=null&&b.onChange.add(mb.library_onChange);mb.libraries.h[a]=b};mb.unloadLibrary=function(a){mb.removeLibrary(a,!0)};mb.removeLibrary=function(a,b){b==null&&(b=!0);if(a==null||a=="")a="default";var c=mb.libraries.h[a];c!=null&&(mb.cache.clear(a+
":"),c.onChange.remove(mb.library_onChange),b&&c.unload());b=mb.libraries;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]};mb.__cacheBreak=function(a){mb.cache.version>0&&(a=a.indexOf("?")>-1?a+("&"+mb.cache.version):a+("?"+mb.cache.version));return a};mb.__libraryNotFound=function(a){if(a==null||a=="")a="default";return Na.current==null||Na.current.__preloader==null||Na.current.__preloader.complete?'There is no asset library named "'+a+'"':'There is no asset library named "'+a+'", or it is not yet preloaded'};
mb.library_onChange=function(){mb.cache.clear();mb.onChange.dispatch()};var dz=function(a){var b=a.indexOf(":");this.libraryName=a.substring(0,b);this.symbolName=a.substring(b+1);this.library=mb.getLibrary(this.libraryName)};t["lime.utils._Assets.LibrarySymbol"]=dz;dz.__name__="lime.utils._Assets.LibrarySymbol";dz.prototype={library:null,libraryName:null,symbolName:null,isLocal:function(a){return this.library.isLocal(this.symbolName,a)},exists:function(a){return this.library.exists(this.symbolName,
a)},__class__:dz};var kA={_new:function(a,b){b==null&&(b=0);return new uj(a,b)},set:function(a,b,c,d,f){d!=null&&(b=Oa.ofData(d));b!=null||c==null?(a.bytes=b,a.offset=f!=null?f:0):(a.bytes=Oa.ofData(c.buffer),a.offset=f!=null?c.byteOffset+f:c.byteOffset)},__arrayGet:function(a,b){return a.bytes!=null?a.bytes.b[b+a.offset]:0},__arraySet:function(a,b,c){a.bytes==null&&(a.bytes.b[b+a.offset]=c);return c},fromArrayBufferView:function(a){return a==null?null:new uj(Oa.ofData(a.buffer),a.byteOffset)},fromArrayBuffer:function(a){return a==
null?null:new uj(Oa.ofData(a),0)},fromBytes:function(a){return new uj(a,0)},fromBytesData:function(a){return a==null?new uj(null,0):new uj(Oa.ofData(a),0)},fromFile:function(a){return new uj(rg.fromFile(a),0)},fromLimeBytes:function(a){return new uj(a,0)},toUInt8Array:function(a){var b=a.bytes.b.bufferValue;a=a.offset/8|0;a==null&&(a=0);return b!=null?new Uint8Array(b,a):null},toUInt8ClampedArray:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/8|0;a==null&&
(a=0);return b!=null?new Uint8ClampedArray(b,a):null},toInt8Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/8|0;a==null&&(a=0);return b!=null?new Int8Array(b,a):null},toUInt16Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;a==null&&(a=0);return b!=null?new Uint16Array(b,a):null},toInt16Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;a==null&&(a=0);
return b!=null?new Int16Array(b,a):null},toUInt32Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;a==null&&(a=0);return b!=null?new Uint32Array(b,a):null},toInt32Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;a==null&&(a=0);return b!=null?new Int32Array(b,a):null},toFloat32Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;a==null&&(a=0);return b!=
null?new Float32Array(b,a):null},toFloat64Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/64|0;a==null&&(a=0);return b!=null?new Float64Array(b,a):null}},uj=function(a,b){this.bytes=a;this.offset=b};t["lime.utils.BytePointerData"]=uj;uj.__name__="lime.utils.BytePointerData";uj.prototype={bytes:null,offset:null,__class__:uj};var rg={_new:function(a,b){b=new Oa(b);b.length=a;return b},alloc:function(a){return new Oa(new ArrayBuffer(a))},compress:function(a,
b){switch(b._hx_index){case 0:return Wt.compress(a);case 1:return Xt.compress(a);case 2:return Zt.compress(a);case 3:return $t.compress(a)}},decompress:function(a,b){switch(b._hx_index){case 0:return Wt.decompress(a);case 1:return Xt.decompress(a);case 2:return Zt.decompress(a);case 3:return $t.decompress(a)}},fastGet:function(a,b){return a.bytes[b]},fromBytes:function(a){return a==null?null:rg._new(a.length,a.b.bufferValue)},fromFile:function(a){return null},loadFromBytes:function(a){return Hc.withValue(rg.fromBytes(a))},
loadFromFile:function(a){return(new iu).load(a)},ofData:function(a){a=Oa.ofData(a);return rg._new(a.length,a.b.bufferValue)},ofString:function(a){a=Oa.ofString(a);return rg._new(a.length,a.b.bufferValue)}},tk=R["lime.utils.CompressionAlgorithm"]={__ename__:"lime.utils.CompressionAlgorithm",__constructs__:null,DEFLATE:{_hx_name:"DEFLATE",_hx_index:0,__enum__:"lime.utils.CompressionAlgorithm",toString:E},GZIP:{_hx_name:"GZIP",_hx_index:1,__enum__:"lime.utils.CompressionAlgorithm",toString:E},LZMA:{_hx_name:"LZMA",
_hx_index:2,__enum__:"lime.utils.CompressionAlgorithm",toString:E},ZLIB:{_hx_name:"ZLIB",_hx_index:3,__enum__:"lime.utils.CompressionAlgorithm",toString:E}};tk.__constructs__=[tk.DEFLATE,tk.GZIP,tk.LZMA,tk.ZLIB];var Ci={_new:function(a){return a},fromFloat:function(a){return a},fromBytesPointer:function(a){return Ci.fromFloat(0)},fromArrayBufferView:function(a){return Ci.fromFloat(0)},fromArrayBuffer:function(a){return Ci.fromFloat(0)},fromBytes:function(a){return Ci.fromFloat(0)},fromBytesData:function(a){return Ci.fromFloat(0)},
fromLimeBytes:function(a){return Ci.fromBytes(a)},fromCFFIPointer:function(a){return Ci.fromFloat(0)},fromFile:function(a){return Ci.fromFloat(0)},__withOffset:function(a,b){return Ci.fromFloat(0)},equals:function(a,b){return a==b},equalsPointer:function(a,b){return a==b},greaterThan:function(a,b){return a>b},greaterThanPointer:function(a,b){return zf.get(a)>zf.get(b)},greaterThanOrEqual:function(a,b){return a>=b},greaterThanOrEqualPointer:function(a,b){return zf.get(a)>=zf.get(b)},lessThan:function(a,
b){return a<b},lessThanPointer:function(a,b){return zf.get(a)<zf.get(b)},lessThanOrEqual:function(a,b){return a<=b},lessThanOrEqualPointer:function(a,b){return zf.get(a)<=zf.get(b)},notEquals:function(a,b){return a!=b},notEqualsPointer:function(a,b){return a!=b},plus:function(a,b){return Ci.__withOffset(a,b)},plusPointer:function(a,b){return Ci.__withOffset(a,b|0)},minus:function(a,b){return Ci.__withOffset(a,-b)},minusPointer:function(a,b){return Ci.__withOffset(a,-(b|0))}},el={toArrayBufferView:function(a){return a},
fromBytes:function(a,b,c){b==null&&(b=0);return b==null?new Float32Array(a.b.bufferValue):c==null?new Float32Array(a.b.bufferValue,b):new Float32Array(a.b.bufferValue,b,c)},toBytes:function(a){return new Oa(new Uint8Array(a.buffer))},toString:function(a){return a!=null?"Float32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null}},Vb=function(){};t["lime.utils.Log"]=Vb;Vb.__name__="lime.utils.Log";Vb.debug=function(a,b){Vb.level>=4&&console.debug("["+b.className+"] "+H.string(a))};Vb.error=
function(a,b){if(Vb.level>=1){a="["+b.className+"] ERROR: "+H.string(a);if(Vb.throwErrors)throw ba.thrown(a);console.error(a)}};Vb.info=function(a,b){Vb.level>=3&&console.info("["+b.className+"] "+H.string(a))};Vb.print=function(a){console.log(a)};Vb.println=function(a){console.log(a)};Vb.verbose=function(a,b){Vb.level>=5&&(a="["+b.className+"] "+H.string(a),console.log(a))};Vb.warn=function(a,b){Vb.level>=2&&console.warn("["+b.className+"] WARNING: "+H.string(a))};var Vv=function(){this.bytesTotalCache=
new G;this.bytesLoadedCache2=new G;this.bytesLoadedCache=new Ta;this.onProgress=new au;this.onComplete=new jf;this.bytesTotal=this.bytesLoaded=0;this.libraries=[];this.libraryNames=[];this.onProgress.add(m(this,this.update))};t["lime.utils.Preloader"]=Vv;Vv.__name__="lime.utils.Preloader";Vv.prototype={complete:null,onComplete:null,onProgress:null,bytesLoaded:null,bytesLoadedCache:null,bytesLoadedCache2:null,bytesTotal:null,bytesTotalCache:null,initLibraryNames:null,libraries:null,libraryNames:null,
loadedLibraries:null,loadedStage:null,preloadComplete:null,preloadStarted:null,simulateProgress:null,addLibrary:function(a){this.libraries.push(a)},addLibraryName:function(a){this.libraryNames.indexOf(a)==-1&&this.libraryNames.push(a)},load:function(){for(var a=this,b=0,c=this.libraries;b<c.length;){var d=c[b];++b;this.bytesTotal+=d.bytesTotal}this.loadedLibraries=-1;this.preloadStarted=!1;b=0;for(c=this.libraries;b<c.length;)d=[c[b]],++b,Vb.verbose("Preloading asset library",{fileName:"lime/utils/Preloader.hx",
lineNumber:134,className:"lime.utils.Preloader",methodName:"load"}),d[0].load().onProgress(function(f){return function(g,h){a.bytesLoaded=a.bytesLoadedCache.h.__keys__[f[0].__id__]==null?a.bytesLoaded+g:a.bytesLoaded+(g-a.bytesLoadedCache.h[f[0].__id__]);a.bytesLoadedCache.set(f[0],g);a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,a.bytesTotal)}}(d)).onComplete(function(f){return function(g){a.bytesLoaded=a.bytesLoadedCache.h.__keys__[f[0].__id__]==null?a.bytesLoaded+f[0].bytesTotal:a.bytesLoaded+
((f[0].bytesTotal|0)-a.bytesLoadedCache.h[f[0].__id__]);a.loadedAssetLibrary()}}(d)).onError(function(){return function(f){Vb.error(f,{fileName:"lime/utils/Preloader.hx",lineNumber:170,className:"lime.utils.Preloader",methodName:"load"})}}());b=0;for(c=this.libraryNames;b<c.length;)++b,this.bytesTotal+=200;this.loadedLibraries++;this.preloadStarted=!0;this.updateProgress()},loadedAssetLibrary:function(a){this.loadedLibraries++;var b=this.loadedLibraries;this.preloadStarted||++b;var c=this.libraries.length+
this.libraryNames.length;a!=null?Vb.verbose("Loaded asset library: "+a+" ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:197,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"}):Vb.verbose("Loaded asset library ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:201,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"});this.updateProgress()},start:function(){this.complete||this.simulateProgress||!this.preloadComplete||(this.complete=!0,this.onComplete.dispatch())},
update:function(a,b){},updateProgress:function(){var a=this;this.simulateProgress||this.onProgress.dispatch(this.bytesLoaded,this.bytesTotal);if(this.loadedLibraries==this.libraries.length&&!this.initLibraryNames){this.initLibraryNames=!0;for(var b=0,c=this.libraryNames;b<c.length;){var d=[c[b]];++b;Vb.verbose("Preloading asset library: "+d[0],{fileName:"lime/utils/Preloader.hx",lineNumber:239,className:"lime.utils.Preloader",methodName:"updateProgress"});mb.loadLibrary(d[0]).onProgress(function(f){return function(g,
h){h>0&&(Object.prototype.hasOwnProperty.call(a.bytesTotalCache.h,f[0])||(a.bytesTotalCache.h[f[0]]=h,a.bytesTotal+=h-200),g>h&&(g=h),Object.prototype.hasOwnProperty.call(a.bytesLoadedCache2.h,f[0])?a.bytesLoaded+=g-a.bytesLoadedCache2.h[f[0]]:a.bytesLoaded+=g,a.bytesLoadedCache2.h[f[0]]=g,a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,a.bytesTotal))}}(d)).onComplete(function(f){return function(g){g=200;Object.prototype.hasOwnProperty.call(a.bytesTotalCache.h,f[0])&&(g=a.bytesTotalCache.h[f[0]]);
Object.prototype.hasOwnProperty.call(a.bytesLoadedCache2.h,f[0])?a.bytesLoaded+=g-a.bytesLoadedCache2.h[f[0]]:a.bytesLoaded+=g;a.loadedAssetLibrary(f[0])}}(d)).onError(function(){return function(f){Vb.error(f,{fileName:"lime/utils/Preloader.hx",lineNumber:293,className:"lime.utils.Preloader",methodName:"updateProgress"})}}())}}this.simulateProgress||this.loadedLibraries!=this.libraries.length+this.libraryNames.length||(this.preloadComplete||(this.preloadComplete=!0,Vb.verbose("Preload complete",{fileName:"lime/utils/Preloader.hx",
lineNumber:306,className:"lime.utils.Preloader",methodName:"updateProgress"})),this.start())},__class__:Vv};var Ys=function(){Fc.call(this);this.set_selectable(!1);this.set_backgroundSkin(null);this.set_disabledBackgroundSkin(null)};t["moonshine.editor.text._TextEditor.TextEditorListView"]=Ys;Ys.__name__="moonshine.editor.text._TextEditor.TextEditorListView";Ys.__super__=Fc;Ys.prototype=I(Fc.prototype,{get_tabEnabled:function(){return this._enabled?this.get_rawTabEnabled():!1},__class__:Ys});var Hn=
function(a,b){b==null&&(b=0);a==null&&(a=0);this.line=a;this.character=b};t["moonshine.editor.text.TextEditorPosition"]=Hn;Hn.__name__="moonshine.editor.text.TextEditorPosition";Hn.prototype={line:null,character:null,__class__:Hn};var hq=function(a,b,c,d,f){this.didWrap=!1;this.current=null;this.selectedIndex=-1;this.search=a;this.backwards=b;this.allowWrap=c;d==null&&(d=[]);this.results=d;f==null&&(f=[]);this.replaced=f};t["moonshine.editor.text.TextEditorSearchResult"]=hq;hq.__name__="moonshine.editor.text.TextEditorSearchResult";
hq.prototype={selectedIndex:null,current:null,results:null,replaced:null,didWrap:null,search:null,backwards:null,allowWrap:null,__class__:hq};var dy=function(a,b,c,d,f,g){this.index=a;this.length=b;this.startLine=c;this.startChar=d;this.endLine=f;this.endChar=g};t["moonshine.editor.text.SearchResultItem"]=dy;dy.__name__="moonshine.editor.text.SearchResultItem";dy.prototype={index:null,length:null,startLine:null,startChar:null,endLine:null,endChar:null,__class__:dy};var Af=function(a,b,c,d,f){this._startLine=
a;this._startChar=b;this._endLine=c;this._endChar=d;this._newText=f};t["moonshine.editor.text.changes.TextEditorChange"]=Af;Af.__name__="moonshine.editor.text.changes.TextEditorChange";Af.prototype={_startLine:null,get_startLine:function(){return this._startLine},_startChar:null,get_startChar:function(){return this._startChar},_endLine:null,get_endLine:function(){return this._endLine},_endChar:null,get_endChar:function(){return this._endChar},_newText:null,get_newText:function(){return this._newText},
__class__:Af,__properties__:{get_newText:"get_newText",get_endChar:"get_endChar",get_endLine:"get_endLine",get_startChar:"get_startChar",get_startLine:"get_startLine"}};var Jd=function(a,b,c){pa.call(this,a);this.changes=b;this.origin=c!=null?c:Jd.ORIGIN_LOCAL};t["moonshine.editor.text.events.TextEditorChangeEvent"]=Jd;Jd.__name__="moonshine.editor.text.events.TextEditorChangeEvent";Jd.__super__=pa;Jd.prototype=I(pa.prototype,{changes:null,origin:null,clone:function(){return new Jd(this.type,this.changes,
this.origin)},__class__:Jd});var Il=function(a){pa.call(this,a)};t["moonshine.editor.text.events.TextEditorEvent"]=Il;Il.__name__="moonshine.editor.text.events.TextEditorEvent";Il.__super__=pa;Il.prototype=I(pa.prototype,{clone:function(){return new Il(this.type)},__class__:Il});var wf=function(a,b){pa.call(this,a);this.lineIndex=b};t["moonshine.editor.text.events.TextEditorLineEvent"]=wf;wf.__name__="moonshine.editor.text.events.TextEditorLineEvent";wf.__super__=pa;wf.prototype=I(pa.prototype,{lineIndex:null,
clone:function(){return new wf(this.type,this.lineIndex)},__class__:wf});var Hl=function(a,b){this.styleRanges=null;this.caretIndex=-1;qa.call(this);this.text=a;this.lineIndex=b};t["moonshine.editor.text.lines.TextLineModel"]=Hl;Hl.__name__="moonshine.editor.text.lines.TextLineModel";Hl.__super__=qa;Hl.prototype=I(qa.prototype,{lineIndex:null,caretIndex:null,text:null,debuggerStoppedAtLine:null,styleRanges:null,__class__:Hl});var Uh=function(){this.__highlightAllFindResults=!1;this.__gutterGap=this.__gutterPaddingLeft=
this.__gutterPaddingRight=0;this.__lineNumberTextFormat=this.__gutterBackgroundSkin=this.__breakpointGutterBackgroundSkin=this.__backgroundSkin=this.__focusedBackgroundSkin=this.__debuggerStoppedBackgroundSkin=this.__selectedTextBackgroundSkin=this.__selectedTextBackgroundSkinFactory=this.__selectedTextUnfocusedBackgroundSkin=this.__selectedTextUnfocusedBackgroundSkinFactory=this.__searchResultBackgroundSkinFactory=this.__textStyles=this.__breakpointSkin=this.__unverifiedBreakpointSkin=null;this.__embedFonts=
!1;this._searchResult=null;this._currentSearchResults=[];this._searchResultBackgroundSkins=[];this._selectionStartIndex=this._selectionEndIndex=this._linkStartChar=this._linkEndChar=-1;this._textEditorHasFocus=!1;this._caretIndex=-1;this._defaultTextStyleContext=0;this._selectedTextBackgroundSkins=[];this._allowToggleBreakpoints=this._wordWrap=this._selectedTextSkinsAreFocused=!1;this._showLineNumbers=!0;this._lineNumberWidth=null;this._caretX=this._gutterWidth=0;this._debuggerStopped=!1;this._breakpointVerified=
this._renderTabsWithSpaces=!0;this._tabWidth=4;this._numLines=-1;this._minLineNumberCharacters=1;this._lineIndex=-1;this._spaceToTabOffsets=[];this._tabToSpaceOffsets=[];ez.initialize();fa.call(this);this._caretTimer=new iq(600);this._caretTimer.addEventListener("timer",m(this,this.textLineRenderer_caretTimer_timerHandler));this.addEventListener("mouseDown",m(this,this.textLineRenderer_mouseDownHandler))};t["moonshine.editor.text.lines.TextLineRenderer"]=Uh;Uh.__name__="moonshine.editor.text.lines.TextLineRenderer";
Uh.__super__=fa;Uh.prototype=I(fa.prototype,{_oldMouseCursor:null,_mainTextField:null,_lineNumberTextField:null,_tabToSpaceOffsets:null,_spaceToTabOffsets:null,_renderedText:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;this.refreshTabOffsets();this.refreshRenderedText();this.setInvalid(x.DATA);return this._text},_lineIndex:null,get_lineIndex:function(){return this._lineIndex},set_lineIndex:function(a){if(this._lineIndex==
a)return this._lineIndex;this._lineIndex=a;this.setInvalid(x.DATA);return this._lineIndex},_minLineNumberCharacters:null,get_minLineNumberCharacters:function(){return this._minLineNumberCharacters},set_minLineNumberCharacters:function(a){if(this._minLineNumberCharacters==a)return this._minLineNumberCharacters;this._minLineNumberCharacters=a;this.setInvalid(x.DATA);return this._minLineNumberCharacters},_numLines:null,get_numLines:function(){return this._numLines},set_numLines:function(a){if(this._numLines==
a)return this._numLines;this._numLines=a;this.setInvalid(x.DATA);return this._numLines},_tabWidth:null,get_tabWidth:function(){return this._tabWidth},set_tabWidth:function(a){if(this._tabWidth==a)return this._tabWidth;this._tabWidth=a;this.setInvalid(x.DATA);return this._tabWidth},_styleRanges:null,get_styleRanges:function(){return this._styleRanges},set_styleRanges:function(a){if(this._styleRanges==a)return this._styleRanges;this._styleRanges=a;this.setInvalid(x.DATA);return this._styleRanges},_breakpoint:null,
get_breakpoint:function(){return this._breakpoint},set_breakpoint:function(a){if(this._breakpoint==a)return this._breakpoint;this._breakpoint=a;this.setInvalid(x.DATA);return this._breakpoint},_breakpointVerified:null,get_breakpointVerified:function(){return this._breakpointVerified},set_breakpointVerified:function(a){if(this._breakpointVerified==a)return this._breakpointVerified;this._breakpointVerified=a;this.setInvalid(x.DATA);return this._breakpointVerified},_renderTabsWithSpaces:null,_debuggerStopped:null,
get_debuggerStopped:function(){return this._debuggerStopped},set_debuggerStopped:function(a){if(this._debuggerStopped==a)return this._debuggerStopped;this._debuggerStopped=a;this.setInvalid(x.STATE);return this._debuggerStopped},_caretX:null,get_caretX:function(){return this._caretX},_gutterWidth:null,get_gutterWidth:function(){return this._gutterWidth},_lineNumberWidth:null,get_lineNumberWidth:function(){return this._lineNumberWidth},set_lineNumberWidth:function(a){if(this._lineNumberWidth==a)return this._lineNumberWidth;
this._lineNumberWidth=a;this.setInvalid(x.DATA);return this._lineNumberWidth},_showLineNumbers:null,get_showLineNumbers:function(){return this._showLineNumbers},set_showLineNumbers:function(a){if(this._showLineNumbers==a)return this._showLineNumbers;this._showLineNumbers=a;this.setInvalid(x.DATA);return this._showLineNumbers},_allowToggleBreakpoints:null,get_allowToggleBreakpoints:function(){return this._allowToggleBreakpoints},set_allowToggleBreakpoints:function(a){if(this._allowToggleBreakpoints==
a)return this._allowToggleBreakpoints;this._allowToggleBreakpoints=a;this.setInvalid(x.DATA);return this._allowToggleBreakpoints},_oldScrollX:null,_caretTimer:null,_caretSkin:null,_wordWrap:null,get_wordWrap:function(){return this._wordWrap},set_wordWrap:function(a){if(this._wordWrap==a)return this._wordWrap;this._wordWrap=a;this.setInvalid(x.DATA);return this._wordWrap},_currentGutterBackgroundSkin:null,_currentBackgroundSkin:null,_selectedTextSkinsAreFocused:null,_selectedTextBackgroundSkins:null,
_defaultTextStyleContext:null,get_defaultTextStyleContext:function(){return this._defaultTextStyleContext},set_defaultTextStyleContext:function(a){if(this._defaultTextStyleContext==a)return this._defaultTextStyleContext;this._defaultTextStyleContext=a;this.setInvalid(x.STYLES);return this._defaultTextStyleContext},_currentBreakpointSkin:null,_caretIndex:null,get_caretIndex:function(){return this._caretIndex},set_caretIndex:function(a){if(this._caretIndex==a)return this._caretIndex;this._caretIndex=
a;this.refreshCaretTimer();this.setInvalid(x.STATE);return this._caretIndex},_textEditorHasFocus:null,get_textEditorHasFocus:function(){return this._textEditorHasFocus},set_textEditorHasFocus:function(a){if(this._textEditorHasFocus==a)return this._textEditorHasFocus;this._textEditorHasFocus=a;this.refreshCaretTimer();this.setInvalid(x.STATE);return this._textEditorHasFocus},_selectionStartIndex:null,get_selectionStartIndex:function(){return this._selectionStartIndex},set_selectionStartIndex:function(a){if(this._selectionStartIndex==
a)return this._selectionStartIndex;this._selectionStartIndex=a;this.setInvalid(x.STATE);return this._selectionStartIndex},_selectionEndIndex:null,get_selectionEndIndex:function(){return this._selectionEndIndex},set_selectionEndIndex:function(a){if(this._selectionEndIndex==a)return this._selectionEndIndex;this._selectionEndIndex=a;this.setInvalid(x.STATE);return this._selectionEndIndex},_linkStartChar:null,get_linkStartChar:function(){return this._linkStartChar},set_linkStartChar:function(a){if(this._linkStartChar==
a)return this._linkStartChar;this._linkStartChar=a;this.setInvalid(x.DATA);return this._linkStartChar},_linkEndChar:null,get_linkEndChar:function(){return this._linkEndChar},set_linkEndChar:function(a){if(this._linkEndChar==a)return this._linkEndChar;this._linkEndChar=a;this.setInvalid(x.DATA);return this._linkEndChar},_searchResultBackgroundSkins:null,_currentSearchResults:null,_searchResult:null,get_searchResult:function(){return this._searchResult},set_searchResult:function(a){if(this._searchResult==
a)return this._searchResult;this._searchResult=a;this.setInvalid(x.STATE);return this._searchResult},_textEditorOwner:null,get_textEditorOwner:function(){return this._textEditorOwner},set_textEditorOwner:function(a){if(this._textEditorOwner==a)return this._textEditorOwner;this._textEditorOwner!=null&&this._textEditorOwner.removeEventListener("scroll",m(this,this.textLineRenderer_textEditorOwner_scrollHandler));this._textEditorOwner=a;this._textEditorOwner!=null&&this._textEditorOwner.addEventListener("scroll",
m(this,this.textLineRenderer_textEditorOwner_scrollHandler),!1,0,!0);this.setInvalid(x.DATA);return this._textEditorOwner},getCharBoundaries:function(a){this.validateNow();if(this._mainTextField==null)return null;var b=this.textIndexToRenderedIndex(a);if(a=b==this._mainTextField.get_text().length){if(b==0)return new Ia(this._mainTextField.get_x(),this._mainTextField.get_y(),0,this._mainTextField.get_textHeight());--b}b=this._mainTextField.getCharBoundaries(b);if(b==null)return null;b.x+=this._mainTextField.get_x();
b.y+=this._mainTextField.get_y();a&&(b.x+=b.width,b.width=0);return b},getCharIndexAtPoint:function(a,b){this.validateNow();if(this._mainTextField==null)return-1;a=this._mainTextField.getCharIndexAtPoint(a-this._mainTextField.get_x(),b-this._mainTextField.get_y());return a==-1?a:this.renderedIndexToTextIndex(a)},getSelectionCharIndexAtPoint:function(a,b,c){c==null&&(c=!0);this.validateNow();if(this._mainTextField==null||a<this._gutterWidth)return 0;if(a>=this._mainTextField.get_x()+this._mainTextField.get_width())return this._mainTextField.get_text().length;
var d=a-this._mainTextField.get_x();b-=this._mainTextField.get_y();if(d<3)d=3;else{var f=this._mainTextField.get_width()-3;d>f&&(d=f)}b<2?b=2:(f=this._mainTextField.get_height()-2,b>f&&(b=f));d=this._mainTextField.getCharIndexAtPoint(d,b);d!=-1&&c&&(c=this._mainTextField.getCharBoundaries(d),c!=null&&a>=this._gutterWidth+c.x+c.width/2&&++d);return this.renderedIndexToTextIndex(d)},initialize:function(){this._mainTextField==null&&(this._mainTextField=new Jc,this._mainTextField.set_autoSize(1),this._mainTextField.set_selectable(!1),
this._mainTextField.set_mouseWheelEnabled(!1),this._mainTextField.addEventListener("rollOver",m(this,this.textLineRenderer_mainTextField_rollOverHandler)),this._mainTextField.addEventListener("rollOut",m(this,this.textLineRenderer_mainTextField_rollOutHandler)),this.addChild(this._mainTextField));this._lineNumberTextField==null&&(this._lineNumberTextField=new Jc,this._lineNumberTextField.set_autoSize(1),this._lineNumberTextField.set_selectable(!1),this._lineNumberTextField.set_mouseWheelEnabled(!1),
this._lineNumberTextField.addEventListener("mouseDown",m(this,this.textLineRenderer_lineNumberTextField_mouseDownHandler)),this.addChild(this._lineNumberTextField))},update:function(){var a=this.isInvalid(x.DATA);this.isInvalid(x.SCROLL);var b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);(c||d||a)&&this.refreshCurrentSearchResults();(c||d)&&this.refreshBackgroundSkin();if(a||d)this.refreshGutterBackgroundSkin(),this.refreshBreakpointSkin();d&&this.refreshCaretSkin();
if(a||d)this.refreshLineNumber(),this.refreshText();(a||d)&&this.refreshLineNumberTextStyles();(a||d)&&this.refreshGutterWidth();(a||d||b)&&this.refreshWordWrap();this.measure();this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;c=this.get_explicitWidth();a&&(c=
this._gutterWidth+this._mainTextField.get_width());a=this.get_explicitHeight();b&&(a=this._mainTextField.get_height(),this._showLineNumbers&&(a=Math.max(a,this._lineNumberTextField.get_height())));return this.saveMeasurements(c,a)},refreshLineNumber:function(){var a=H.string(this.get_lineIndex()+1),b=Math.max(this._minLineNumberCharacters,H.string(this.get_numLines()).length)|0;a=N.lpad(a," ",b);this._lineNumberTextField.set_text(a)},refreshLineNumberTextStyles:function(){var a=this.get_lineNumberTextFormat();
if(a==null){if(this.get_textStyles()==null)return;a=this.get_textStyles().h[this._defaultTextStyleContext]}a!=null&&(this._lineNumberTextField.setTextFormat(a),this._lineNumberTextField.set_embedFonts(this.get_embedFonts()))},refreshTabOffsets:function(){this._tabToSpaceOffsets.length=0;this._spaceToTabOffsets.length=0;if(this._text!=null&&this._text.length!=0&&this._renderTabsWithSpaces)for(var a=0,b=0,c=0;;){c=this._text.indexOf("\t",c);if(c==-1)break;a+=c-b;b=a%this._tabWidth;b==0&&(b=4);this._tabToSpaceOffsets.push(c);
this._tabToSpaceOffsets.push(b);for(var d=a+1,f=a+b;d<f;){var g=d++;this._spaceToTabOffsets.push(g);this._spaceToTabOffsets.push(-1)}++c;a+=b;b=c}},refreshRenderedText:function(){if(this._text==null||this._text.length==0)this._renderedText=" ";else if(this._renderTabsWithSpaces){this._renderedText="";for(var a=0,b=0;a<this._tabToSpaceOffsets.length;){var c=this._tabToSpaceOffsets[a];++a;var d=this._tabToSpaceOffsets[a];++a;b=this._text.substring(b,c);d=N.rpad(""," ",d);this._renderedText+=b+d;b=c+
1}this._renderedText+=this._text.substring(b)}else this._renderedText=this._text},textIndexToRenderedIndex:function(a){if(!this._renderTabsWithSpaces)return a;for(var b=a,c=0;c<this._tabToSpaceOffsets.length;){var d=this._tabToSpaceOffsets[c];++c;if(d>=a)break;d=this._tabToSpaceOffsets[c];++c;b+=d-1}return b},renderedIndexToTextIndex:function(a){if(!this._renderTabsWithSpaces)return a;for(var b=a,c=0;c<this._spaceToTabOffsets.length;){var d=this._spaceToTabOffsets[c];++c;if(d>a)break;d=this._spaceToTabOffsets[c];
++c;b+=d}return b},refreshText:function(){this._mainTextField.set_text(this._renderedText);if(this.get_textStyles()!=null){var a=this._text.length,b=this._linkStartChar;b>a&&(b=a);var c=this._linkEndChar;c>a&&(c=a);for(var d=0;;){var f=0,g=a,h=this._defaultTextStyleContext;this._styleRanges!=null&&d<this._styleRanges.length&&(f=this._styleRanges[d],++d,d<this._styleRanges.length&&(h=this._styleRanges[d]),++d,g=a,d<this._styleRanges.length&&(g=this._styleRanges[d]));if(f>=a)break;g>a&&(g=a);if(f==
g)if(this._styleRanges!=null&&d<this._styleRanges.length)continue;else break;h=this.get_textStyles().h[h];h==null&&(h=this.get_textStyles().h[this._defaultTextStyleContext]);if(b!=-1&&b>=f&&b<g){var n=this.textIndexToRenderedIndex(b),l=this.textIndexToRenderedIndex(c);f=this.textIndexToRenderedIndex(f);g=this.textIndexToRenderedIndex(g);var q=pg.clone(h);q.underline=!0;n>f&&this._mainTextField.setTextFormat(h,f,n);this._mainTextField.setTextFormat(q,n,l);l<g&&this._mainTextField.setTextFormat(h,l,
g)}else h.underline==null&&(h.underline=!1),f=this.textIndexToRenderedIndex(f),g=this.textIndexToRenderedIndex(g),this._mainTextField.setTextFormat(h,f,g);if(!(this._styleRanges!=null&&d<this._styleRanges.length))break}if(this._text==null||this._text.length==0)h=this.get_textStyles().h[this._defaultTextStyleContext],this._mainTextField.setTextFormat(h);this._mainTextField.set_embedFonts(this.get_embedFonts())}},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=
this.getCurrentBackgroundSkin();a!=this._currentBackgroundSkin&&(a!=null&&(w.__implements(a,qb)&&w.__cast(a,qb).set_uiContext(null),this.removeChild(a)),this._currentBackgroundSkin!=null&&(this.addChildAt(this._currentBackgroundSkin,0),w.__implements(this._currentBackgroundSkin,qb)&&w.__cast(this._currentBackgroundSkin,qb).set_uiContext(this)))},getCurrentBackgroundSkin:function(){return this._debuggerStopped&&this.get_debuggerStoppedBackgroundSkin()!=null?this.get_debuggerStoppedBackgroundSkin():
this._textEditorHasFocus&&this._caretIndex!=-1&&this._selectionStartIndex==-1&&this._selectionEndIndex==-1&&this.get_focusedBackgroundSkin()!=null?this.get_focusedBackgroundSkin():this.get_backgroundSkin()},refreshGutterWidth:function(){this._gutterWidth=0;this._allowToggleBreakpoints&&this._currentBreakpointSkin!=null&&(w.__implements(this._currentBreakpointSkin,da)&&w.__cast(this._currentBreakpointSkin,da).validateNow(),this._gutterWidth+=this._currentBreakpointSkin.get_width());this._showLineNumbers&&
(this._gutterWidth>0&&(this._gutterWidth+=this.get_gutterGap()),this.get_lineNumberWidth()!=null?this._gutterWidth+=this.get_lineNumberWidth():this._gutterWidth+=this._lineNumberTextField.get_width());this._gutterWidth+=this.get_gutterPaddingLeft()+this.get_gutterPaddingRight()},refreshGutterBackgroundSkin:function(){var a=this._currentGutterBackgroundSkin;this._currentGutterBackgroundSkin=this.getCurrentGutterBackgroundSkin();a!=this._currentGutterBackgroundSkin&&(a!=null&&(w.__implements(a,qb)&&
w.__cast(a,qb).set_uiContext(null),this.removeChild(a)),this._currentGutterBackgroundSkin!=null&&(this.addChildAt(this._currentGutterBackgroundSkin,this.getChildIndex(this._lineNumberTextField)),w.__implements(this._currentGutterBackgroundSkin,qb)&&w.__cast(this._currentGutterBackgroundSkin,qb).set_uiContext(this)))},getCurrentGutterBackgroundSkin:function(){return this._breakpoint&&this.get_breakpointGutterBackgroundSkin()!=null?this.get_breakpointGutterBackgroundSkin():this.get_gutterBackgroundSkin()},
refreshCaretSkin:function(){var a=0;this.get_textStyles()!=null&&(a=this.get_textStyles().h[this._defaultTextStyleContext].color);this._caretSkin==null&&(this._caretSkin=new Za(ub.SolidColor(a)),this._caretSkin.set_width(2),this._caretSkin.set_height(2),this.addChildAt(this._caretSkin,this.getChildIndex(this._mainTextField)+1));this._caretSkin.mouseChildren=!1;this._caretSkin.mouseEnabled=!1;this._caretSkin.set_fill(ub.SolidColor(a))},refreshBreakpointSkin:function(){var a=this._currentBreakpointSkin;
this._currentBreakpointSkin=this.getCurrentBreakpointSkin();a!=this._currentBreakpointSkin&&(a!=null&&(w.__implements(a,qb)&&w.__cast(a,qb).set_uiContext(null),this.removeChild(a)),this._currentBreakpointSkin!=null&&(this.addChild(this._currentBreakpointSkin),w.__implements(this._currentBreakpointSkin,qb)&&w.__cast(this._currentBreakpointSkin,qb).set_uiContext(this)))},getCurrentBreakpointSkin:function(){return this.get_breakpointVerified()||this.get_unverifiedBreakpointSkin()==null?this.get_breakpointSkin():
this.get_unverifiedBreakpointSkin()},refreshSearchResultBackgroundSkins:function(){var a=this._currentSearchResults.length,b=a-this._searchResultBackgroundSkins.length;if(b<0){var c=0;for(b=-b;c<b;){c++;var d=this._searchResultBackgroundSkins.pop();w.__implements(d,qb)&&w.__cast(d,qb).set_uiContext(null);this.removeChild(d)}}if(a!=0&&this.get_searchResultBackgroundSkinFactory()!=null){var f=this.getChildIndex(this._mainTextField);this._selectedTextBackgroundSkins.length>0&&++f;c=0;for(b=a;c<b;){a=
c++;d=this._currentSearchResults[a];var g=this._mainTextField.getCharBoundaries(d.startChar),h=this._mainTextField.getCharBoundaries(d.endChar-1);g!=null&&h!=null&&(a<this._searchResultBackgroundSkins.length?d=this._searchResultBackgroundSkins[a]:(d=this.get_searchResultBackgroundSkinFactory()(),this._searchResultBackgroundSkins[a]=d,this.addChildAt(d,f),w.__implements(d,qb)&&w.__cast(d,qb).set_uiContext(this)),d.set_x(this._mainTextField.get_x()+g.x),d.set_y(this._mainTextField.get_y()+g.y),d.set_width(h.x+
h.width-g.x),d.set_height(h.y+h.height-g.y))}}},refreshSelectedTextBackgroundSkins:function(){if(this._selectedTextSkinsAreFocused!=this._textEditorHasFocus)for(var a=0,b=this._selectedTextBackgroundSkins.length;a<b;){a++;var c=this._selectedTextBackgroundSkins.shift();w.__implements(c,qb)&&w.__cast(c,qb).set_uiContext(null);this.removeChild(c)}this._selectedTextSkinsAreFocused=this._textEditorHasFocus;var d=this.get_selectedTextBackgroundSkin();this._textEditorHasFocus||this.get_selectedTextUnfocusedBackgroundSkin()==
null||(d=this.get_selectedTextUnfocusedBackgroundSkin());var f=this.get_selectedTextBackgroundSkinFactory();this._textEditorHasFocus||this.get_selectedTextUnfocusedBackgroundSkinFactory()==null||(f=this.get_selectedTextUnfocusedBackgroundSkinFactory());var g=-1,h=-1,n=0,l=0,q=this._mainTextField.get_text().length,u=this._text!=null?this._text.length:0;this._selectionStartIndex==-1||this._selectionEndIndex==-1||f==null&&d==null||(g=this._selectionStartIndex<this._selectionEndIndex?this._selectionStartIndex:
this._selectionEndIndex,g>u&&(g=u),h=this._selectionStartIndex<this._selectionEndIndex?this._selectionEndIndex:this._selectionStartIndex,h>u&&(h=u),g=this.textIndexToRenderedIndex(g),h=this.textIndexToRenderedIndex(h),this._wordWrap?(n=g==q?this._mainTextField.getLineIndexOfChar(g-1):this._mainTextField.getLineIndexOfChar(g),a=h==q?this._mainTextField.getLineIndexOfChar(h-1):this._mainTextField.getLineIndexOfChar(h),l=a-n+1):l=1);b=l-this._selectedTextBackgroundSkins.length;if(b<0)for(a=0,b=-b;a<
b;)a++,c=this._selectedTextBackgroundSkins.pop(),w.__implements(c,qb)&&w.__cast(c,qb).set_uiContext(null),this.removeChild(c);if(l!=0){var v=this.getChildIndex(this._mainTextField),z=n>0?this._mainTextField.getLineOffset(n):n;a=0;for(b=l;a<b;){var r=a++;if(r<this._selectedTextBackgroundSkins.length)c=this._selectedTextBackgroundSkins[r];else if(f!=null)c=f(),this._selectedTextBackgroundSkins[r]=c,this.addChildAt(c,v),w.__implements(c,qb)&&w.__cast(c,qb).set_uiContext(this);else if(d.parent==null)c=
d,this._selectedTextBackgroundSkins[r]=c,this.addChildAt(c,v),w.__implements(c,qb)&&w.__cast(c,qb).set_uiContext(this);else continue;l=u>0?q:0;this._wordWrap&&u>0&&(l=this._mainTextField.getLineLength(n+r));r=g;r<z&&(r=z);var F=z+l,J=h;J>F&&(J=F);var L=!1;J>=F&&(L=!0,J=l>0?F-1:0);F=this._mainTextField.getCharBoundaries(r);F==null&&r>0&&(F=this._mainTextField.getCharBoundaries(r-1),F!=null&&(F.x+=F.width,F.width=0));var Q=this._mainTextField.getCharBoundaries(J);Q==null&&J>0&&(Q=this._mainTextField.getCharBoundaries(J-
1),Q!=null&&(Q.x+=Q.width,Q.width=0));F==null||Q==null?c.set_visible(!1):(L=L?Q.width:0,c.set_x(this._gutterWidth+F.x),c.set_y(this._mainTextField.get_y()+F.y),L=Q.x+L-F.x,l==0&&r==J&&(L=this._mainTextField.get_width()),c.set_width(L),c.set_height(Q.y+Q.height-F.y),c.set_visible(!0));z+=l}}},refreshCaretPosition:function(){if(this._caretSkin==null)this._caretX=0;else if(this._textEditorHasFocus&&this._caretIndex!=-1){var a=this._text!=null?this._text.length:0,b=this._caretIndex;this._caretIndex>=
a&&(b=a>0?a-1:0);var c=this.textIndexToRenderedIndex(b),d=this._gutterWidth,f=this._mainTextField.get_y(),g=this._mainTextField.getCharBoundaries(c);g==null&&c>0&&(g=this._mainTextField.getCharBoundaries(c-1),g!=null&&(g.x+=g.width,g.width=0));g!=null?(d+=g.x,f+=g.y,c=g.height,a>0&&this._caretIndex>b&&(d=this._renderTabsWithSpaces&&this._text.charAt(b)=="\t"?d+g.width*this._tabWidth:d+g.width)):c=this._mainTextField.getLineMetrics(0).height;this._caretSkin.set_x(d);this._caretSkin.set_y(f);this._caretSkin.set_height(c);
this._caretSkin.set_visible(!0);this._caretX=this._caretSkin.get_x()}else this._caretSkin.set_visible(!1),this._caretX=0},refreshWordWrap:function(){this.get_explicitWidth()!=null&&this._wordWrap&&this._text.length>0?(this._mainTextField.set_width(this.get_explicitWidth()-this._gutterWidth),this._mainTextField.set_wordWrap(this._wordWrap)):this._mainTextField.set_wordWrap(!1)},layoutContent:function(){var a=this._textEditorOwner!=null?this._textEditorOwner.get_scrollX():0;this._oldScrollX=a;this._currentGutterBackgroundSkin!=
null&&(this._currentGutterBackgroundSkin.set_width(this._gutterWidth),this._currentGutterBackgroundSkin.set_height(this.actualHeight),this._currentGutterBackgroundSkin.set_x(a),this._currentGutterBackgroundSkin.set_y(0));this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_height(this.actualHeight),this._currentGutterBackgroundSkin!=null?(this._currentBackgroundSkin.set_width(this.actualWidth-this._gutterWidth),this._currentBackgroundSkin.set_x(this._gutterWidth)):(this._currentBackgroundSkin.set_width(this.actualWidth),
this._currentBackgroundSkin.set_x(0)),this._currentBackgroundSkin.set_y(0));this._currentBreakpointSkin!=null&&(this._currentBreakpointSkin.set_visible(this._allowToggleBreakpoints&&this._breakpoint),w.__implements(this._currentBreakpointSkin,da)&&w.__cast(this._currentBreakpointSkin,da).validateNow(),this._currentBreakpointSkin.set_x(a+this.get_gutterPaddingLeft()),this._currentBreakpointSkin.set_y((this.actualHeight-this._currentBreakpointSkin.get_height())/2));this._lineNumberTextField.set_visible(this._showLineNumbers);
this._lineNumberTextField.set_x(a+this._gutterWidth-this._lineNumberTextField.get_width()-this.get_gutterPaddingRight());this._mainTextField.set_x(this._gutterWidth);this._mainTextField.set_width(this.actualWidth-this._gutterWidth);a=this._mainTextField.get_height();var b=this._lineNumberTextField.get_height();a==b?(this._mainTextField.set_y((this.actualHeight-a)/2),this._lineNumberTextField.set_y(this._mainTextField.get_y())):a>b?(this._mainTextField.set_y((this.actualHeight-a)/2),this._lineNumberTextField.set_y(this._mainTextField.get_y()+
this._mainTextField.getLineMetrics(0).ascent-this._lineNumberTextField.getLineMetrics(0).ascent)):(this._lineNumberTextField.set_y((this.actualHeight-this._lineNumberTextField.get_height())/2),this._mainTextField.set_y(this._lineNumberTextField.get_y()+this._lineNumberTextField.getLineMetrics(0).ascent-this._mainTextField.getLineMetrics(0).ascent));this.refreshCaretPosition();this.refreshSelectedTextBackgroundSkins();this.refreshSearchResultBackgroundSkins()},refreshCaretTimer:function(){this._caretTimer.reset();
this._textEditorHasFocus&&this._caretIndex!=-1&&this._caretTimer.start()},refreshCurrentSearchResults:function(){this._currentSearchResults.length=0;if(this.get_highlightAllFindResults()&&this._searchResult!=null)for(var a=0,b=this._searchResult.results;a<b.length;){var c=b[a];++a;this.get_lineIndex()<c.startLine||this.get_lineIndex()>c.endLine||this._currentSearchResults.push(c)}},textLineRenderer_mainTextField_rollOverHandler:function(a){this._oldMouseCursor=xd.get_cursor();xd.set_cursor("ibeam")},
textLineRenderer_mainTextField_rollOutHandler:function(a){xd.set_cursor(this._oldMouseCursor);this._oldMouseCursor=null},textLineRenderer_mouseDownHandler:function(a){this._allowToggleBreakpoints&&(this.get_mouseX()>this._lineNumberTextField.get_x()||this.dispatchEvent(new wf(wf.TOGGLE_BREAKPOINT,this.get_lineIndex())))},textLineRenderer_caretTimer_timerHandler:function(a){this._caretSkin!=null&&this._caretSkin.set_visible(!this._caretSkin.get_visible())},textLineRenderer_lineNumberTextField_mouseDownHandler:function(a){this.dispatchEvent(new wf(wf.SELECT_LINE,
this.get_lineIndex()))},textLineRenderer_textEditorOwner_scrollHandler:function(a){a=w.__cast(a.currentTarget,pi);this._oldScrollX!=a.get_scrollX()&&this.setInvalid(x.SCROLL)},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);
return this.get_embedFonts()},__lineNumberTextFormat:null,get_lineNumberTextFormat:function(){return this.__lineNumberTextFormat},set_lineNumberTextFormat:function(a){if(!this.setStyle("lineNumberTextFormat")||this.__lineNumberTextFormat==a)return this.__lineNumberTextFormat;this._previousClearStyle=m(this,this.clearStyle_lineNumberTextFormat);this.__lineNumberTextFormat=a;this.setInvalid(x.STYLES);return this.__lineNumberTextFormat},clearStyle_lineNumberTextFormat:function(){this.set_lineNumberTextFormat(null);
return this.get_lineNumberTextFormat()},__gutterBackgroundSkin:null,get_gutterBackgroundSkin:function(){return this.__gutterBackgroundSkin},set_gutterBackgroundSkin:function(a){if(!this.setStyle("gutterBackgroundSkin")||this.__gutterBackgroundSkin==a)return this.__gutterBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_gutterBackgroundSkin);this.__gutterBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__gutterBackgroundSkin},clearStyle_gutterBackgroundSkin:function(){this.set_gutterBackgroundSkin(null);
return this.get_gutterBackgroundSkin()},__breakpointGutterBackgroundSkin:null,get_breakpointGutterBackgroundSkin:function(){return this.__breakpointGutterBackgroundSkin},set_breakpointGutterBackgroundSkin:function(a){if(!this.setStyle("breakpointGutterBackgroundSkin")||this.__breakpointGutterBackgroundSkin==a)return this.__breakpointGutterBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_breakpointGutterBackgroundSkin);this.__breakpointGutterBackgroundSkin=a;this.setInvalid(x.STYLES);
return this.__breakpointGutterBackgroundSkin},clearStyle_breakpointGutterBackgroundSkin:function(){this.set_breakpointGutterBackgroundSkin(null);return this.get_breakpointGutterBackgroundSkin()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);
return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__focusedBackgroundSkin:null,get_focusedBackgroundSkin:function(){return this.__focusedBackgroundSkin},set_focusedBackgroundSkin:function(a){if(!this.setStyle("focusedBackgroundSkin")||this.__focusedBackgroundSkin==a)return this.__focusedBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_focusedBackgroundSkin);this.__focusedBackgroundSkin=a;this.setInvalid(x.STYLES);
return this.__focusedBackgroundSkin},clearStyle_focusedBackgroundSkin:function(){this.set_focusedBackgroundSkin(null);return this.get_focusedBackgroundSkin()},__debuggerStoppedBackgroundSkin:null,get_debuggerStoppedBackgroundSkin:function(){return this.__debuggerStoppedBackgroundSkin},set_debuggerStoppedBackgroundSkin:function(a){if(!this.setStyle("debuggerStoppedBackgroundSkin")||this.__debuggerStoppedBackgroundSkin==a)return this.__debuggerStoppedBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_debuggerStoppedBackgroundSkin);
this.__debuggerStoppedBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__debuggerStoppedBackgroundSkin},clearStyle_debuggerStoppedBackgroundSkin:function(){this.set_debuggerStoppedBackgroundSkin(null);return this.get_debuggerStoppedBackgroundSkin()},__selectedTextBackgroundSkin:null,get_selectedTextBackgroundSkin:function(){return this.__selectedTextBackgroundSkin},set_selectedTextBackgroundSkin:function(a){if(!this.setStyle("selectedTextBackgroundSkin")||this.__selectedTextBackgroundSkin==
a)return this.__selectedTextBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_selectedTextBackgroundSkin);this.__selectedTextBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__selectedTextBackgroundSkin},clearStyle_selectedTextBackgroundSkin:function(){this.set_selectedTextBackgroundSkin(null);return this.get_selectedTextBackgroundSkin()},__selectedTextBackgroundSkinFactory:null,get_selectedTextBackgroundSkinFactory:function(){return this.__selectedTextBackgroundSkinFactory},set_selectedTextBackgroundSkinFactory:function(a){if(!this.setStyle("selectedTextBackgroundSkinFactory")||
this.__selectedTextBackgroundSkinFactory==a)return this.__selectedTextBackgroundSkinFactory;this._previousClearStyle=m(this,this.clearStyle_selectedTextBackgroundSkinFactory);this.__selectedTextBackgroundSkinFactory=a;this.setInvalid(x.STYLES);return this.__selectedTextBackgroundSkinFactory},clearStyle_selectedTextBackgroundSkinFactory:function(){this.set_selectedTextBackgroundSkinFactory(null);return this.get_selectedTextBackgroundSkinFactory()},__selectedTextUnfocusedBackgroundSkin:null,get_selectedTextUnfocusedBackgroundSkin:function(){return this.__selectedTextUnfocusedBackgroundSkin},
set_selectedTextUnfocusedBackgroundSkin:function(a){if(!this.setStyle("selectedTextUnfocusedBackgroundSkin")||this.__selectedTextUnfocusedBackgroundSkin==a)return this.__selectedTextUnfocusedBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_selectedTextUnfocusedBackgroundSkin);this.__selectedTextUnfocusedBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__selectedTextUnfocusedBackgroundSkin},clearStyle_selectedTextUnfocusedBackgroundSkin:function(){this.set_selectedTextUnfocusedBackgroundSkin(null);
return this.get_selectedTextUnfocusedBackgroundSkin()},__selectedTextUnfocusedBackgroundSkinFactory:null,get_selectedTextUnfocusedBackgroundSkinFactory:function(){return this.__selectedTextUnfocusedBackgroundSkinFactory},set_selectedTextUnfocusedBackgroundSkinFactory:function(a){if(!this.setStyle("selectedTextUnfocusedBackgroundSkinFactory")||this.__selectedTextUnfocusedBackgroundSkinFactory==a)return this.__selectedTextUnfocusedBackgroundSkinFactory;this._previousClearStyle=m(this,this.clearStyle_selectedTextUnfocusedBackgroundSkinFactory);
this.__selectedTextUnfocusedBackgroundSkinFactory=a;this.setInvalid(x.STYLES);return this.__selectedTextUnfocusedBackgroundSkinFactory},clearStyle_selectedTextUnfocusedBackgroundSkinFactory:function(){this.set_selectedTextUnfocusedBackgroundSkinFactory(null);return this.get_selectedTextUnfocusedBackgroundSkinFactory()},__searchResultBackgroundSkinFactory:null,get_searchResultBackgroundSkinFactory:function(){return this.__searchResultBackgroundSkinFactory},set_searchResultBackgroundSkinFactory:function(a){if(!this.setStyle("searchResultBackgroundSkinFactory")||
this.__searchResultBackgroundSkinFactory==a)return this.__searchResultBackgroundSkinFactory;this._previousClearStyle=m(this,this.clearStyle_searchResultBackgroundSkinFactory);this.__searchResultBackgroundSkinFactory=a;this.setInvalid(x.STYLES);return this.__searchResultBackgroundSkinFactory},clearStyle_searchResultBackgroundSkinFactory:function(){this.set_searchResultBackgroundSkinFactory(null);return this.get_searchResultBackgroundSkinFactory()},__textStyles:null,get_textStyles:function(){return this.__textStyles},
set_textStyles:function(a){if(!this.setStyle("textStyles")||this.__textStyles==a)return this.__textStyles;this._previousClearStyle=m(this,this.clearStyle_textStyles);this.__textStyles=a;this.setInvalid(x.STYLES);return this.__textStyles},clearStyle_textStyles:function(){this.set_textStyles(null);return this.get_textStyles()},__breakpointSkin:null,get_breakpointSkin:function(){return this.__breakpointSkin},set_breakpointSkin:function(a){if(!this.setStyle("breakpointSkin")||this.__breakpointSkin==a)return this.__breakpointSkin;
this._previousClearStyle=m(this,this.clearStyle_breakpointSkin);this.__breakpointSkin=a;this.setInvalid(x.STYLES);return this.__breakpointSkin},clearStyle_breakpointSkin:function(){this.set_breakpointSkin(null);return this.get_breakpointSkin()},__unverifiedBreakpointSkin:null,get_unverifiedBreakpointSkin:function(){return this.__unverifiedBreakpointSkin},set_unverifiedBreakpointSkin:function(a){if(!this.setStyle("unverifiedBreakpointSkin")||this.__unverifiedBreakpointSkin==a)return this.__unverifiedBreakpointSkin;
this._previousClearStyle=m(this,this.clearStyle_unverifiedBreakpointSkin);this.__unverifiedBreakpointSkin=a;this.setInvalid(x.STYLES);return this.__unverifiedBreakpointSkin},clearStyle_unverifiedBreakpointSkin:function(){this.set_unverifiedBreakpointSkin(null);return this.get_unverifiedBreakpointSkin()},__gutterGap:null,get_gutterGap:function(){return this.__gutterGap},set_gutterGap:function(a){if(!this.setStyle("gutterGap")||this.__gutterGap==a)return this.__gutterGap;this._previousClearStyle=m(this,
this.clearStyle_gutterGap);this.__gutterGap=a;this.setInvalid(x.STYLES);return this.__gutterGap},clearStyle_gutterGap:function(){this.set_gutterGap(0);return this.get_gutterGap()},__gutterPaddingLeft:null,get_gutterPaddingLeft:function(){return this.__gutterPaddingLeft},set_gutterPaddingLeft:function(a){if(!this.setStyle("gutterPaddingLeft")||this.__gutterPaddingLeft==a)return this.__gutterPaddingLeft;this._previousClearStyle=m(this,this.clearStyle_gutterPaddingLeft);this.__gutterPaddingLeft=a;this.setInvalid(x.STYLES);
return this.__gutterPaddingLeft},clearStyle_gutterPaddingLeft:function(){this.set_gutterPaddingLeft(0);return this.get_gutterPaddingLeft()},__gutterPaddingRight:null,get_gutterPaddingRight:function(){return this.__gutterPaddingRight},set_gutterPaddingRight:function(a){if(!this.setStyle("gutterPaddingRight")||this.__gutterPaddingRight==a)return this.__gutterPaddingRight;this._previousClearStyle=m(this,this.clearStyle_gutterPaddingRight);this.__gutterPaddingRight=a;this.setInvalid(x.STYLES);return this.__gutterPaddingRight},
clearStyle_gutterPaddingRight:function(){this.set_gutterPaddingRight(0);return this.get_gutterPaddingRight()},__highlightAllFindResults:null,get_highlightAllFindResults:function(){return this.__highlightAllFindResults},set_highlightAllFindResults:function(a){if(!this.setStyle("highlightAllFindResults")||this.__highlightAllFindResults==a)return this.__highlightAllFindResults;this._previousClearStyle=m(this,this.clearStyle_highlightAllFindResults);this.__highlightAllFindResults=a;this.setInvalid(x.STYLES);
return this.__highlightAllFindResults},clearStyle_highlightAllFindResults:function(){this.set_highlightAllFindResults(!1);return this.get_highlightAllFindResults()},get_styleContext:function(){return Uh},__class__:Uh,__properties__:I(fa.prototype.__properties__,{set_textEditorOwner:"set_textEditorOwner",get_textEditorOwner:"get_textEditorOwner",set_searchResult:"set_searchResult",get_searchResult:"get_searchResult",set_highlightAllFindResults:"set_highlightAllFindResults",get_highlightAllFindResults:"get_highlightAllFindResults",
set_linkEndChar:"set_linkEndChar",get_linkEndChar:"get_linkEndChar",set_linkStartChar:"set_linkStartChar",get_linkStartChar:"get_linkStartChar",set_selectionEndIndex:"set_selectionEndIndex",get_selectionEndIndex:"get_selectionEndIndex",set_selectionStartIndex:"set_selectionStartIndex",get_selectionStartIndex:"get_selectionStartIndex",set_textEditorHasFocus:"set_textEditorHasFocus",get_textEditorHasFocus:"get_textEditorHasFocus",set_caretIndex:"set_caretIndex",get_caretIndex:"get_caretIndex",set_gutterPaddingRight:"set_gutterPaddingRight",
get_gutterPaddingRight:"get_gutterPaddingRight",set_gutterPaddingLeft:"set_gutterPaddingLeft",get_gutterPaddingLeft:"get_gutterPaddingLeft",set_gutterGap:"set_gutterGap",get_gutterGap:"get_gutterGap",set_unverifiedBreakpointSkin:"set_unverifiedBreakpointSkin",get_unverifiedBreakpointSkin:"get_unverifiedBreakpointSkin",set_breakpointSkin:"set_breakpointSkin",get_breakpointSkin:"get_breakpointSkin",set_defaultTextStyleContext:"set_defaultTextStyleContext",get_defaultTextStyleContext:"get_defaultTextStyleContext",
set_textStyles:"set_textStyles",get_textStyles:"get_textStyles",set_searchResultBackgroundSkinFactory:"set_searchResultBackgroundSkinFactory",get_searchResultBackgroundSkinFactory:"get_searchResultBackgroundSkinFactory",set_selectedTextUnfocusedBackgroundSkinFactory:"set_selectedTextUnfocusedBackgroundSkinFactory",get_selectedTextUnfocusedBackgroundSkinFactory:"get_selectedTextUnfocusedBackgroundSkinFactory",set_selectedTextUnfocusedBackgroundSkin:"set_selectedTextUnfocusedBackgroundSkin",get_selectedTextUnfocusedBackgroundSkin:"get_selectedTextUnfocusedBackgroundSkin",
set_selectedTextBackgroundSkinFactory:"set_selectedTextBackgroundSkinFactory",get_selectedTextBackgroundSkinFactory:"get_selectedTextBackgroundSkinFactory",set_selectedTextBackgroundSkin:"set_selectedTextBackgroundSkin",get_selectedTextBackgroundSkin:"get_selectedTextBackgroundSkin",set_debuggerStoppedBackgroundSkin:"set_debuggerStoppedBackgroundSkin",get_debuggerStoppedBackgroundSkin:"get_debuggerStoppedBackgroundSkin",set_focusedBackgroundSkin:"set_focusedBackgroundSkin",get_focusedBackgroundSkin:"get_focusedBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_breakpointGutterBackgroundSkin:"set_breakpointGutterBackgroundSkin",get_breakpointGutterBackgroundSkin:"get_breakpointGutterBackgroundSkin",set_gutterBackgroundSkin:"set_gutterBackgroundSkin",get_gutterBackgroundSkin:"get_gutterBackgroundSkin",set_lineNumberTextFormat:"set_lineNumberTextFormat",get_lineNumberTextFormat:"get_lineNumberTextFormat",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_wordWrap:"set_wordWrap",
get_wordWrap:"get_wordWrap",set_allowToggleBreakpoints:"set_allowToggleBreakpoints",get_allowToggleBreakpoints:"get_allowToggleBreakpoints",set_showLineNumbers:"set_showLineNumbers",get_showLineNumbers:"get_showLineNumbers",set_lineNumberWidth:"set_lineNumberWidth",get_lineNumberWidth:"get_lineNumberWidth",get_gutterWidth:"get_gutterWidth",get_caretX:"get_caretX",set_debuggerStopped:"set_debuggerStopped",get_debuggerStopped:"get_debuggerStopped",set_breakpointVerified:"set_breakpointVerified",get_breakpointVerified:"get_breakpointVerified",
set_breakpoint:"set_breakpoint",get_breakpoint:"get_breakpoint",set_styleRanges:"set_styleRanges",get_styleRanges:"get_styleRanges",set_tabWidth:"set_tabWidth",get_tabWidth:"get_tabWidth",set_numLines:"set_numLines",get_numLines:"get_numLines",set_minLineNumberCharacters:"set_minLineNumberCharacters",get_minLineNumberCharacters:"get_minLineNumberCharacters",set_lineIndex:"set_lineIndex",get_lineIndex:"get_lineIndex",set_text:"set_text",get_text:"get_text"})});var gx=function(a){this._textEditor=a;
this._textEditor.addEventListener("copy",m(this,this.clipboardManager_textEditor_copyHandler),!1,0,!0);this._textEditor.addEventListener("cut",m(this,this.clipboardManager_textEditor_cutHandler),!1,0,!0)};t["moonshine.editor.text.managers.ClipboardManager"]=gx;gx.__name__="moonshine.editor.text.managers.ClipboardManager";gx.prototype={_textEditor:null,copy:function(){this._textEditor.get_hasSelection()&&Ui.get_generalClipboard().setData(2,this._textEditor.get_selectedText(),!1)},cut:function(){if(this._textEditor.get_readOnly())throw new ob("Cannot cut when editor is read-only");
this.copy();if(this._textEditor.get_hasSelection()){var a=Nm.deleteSelection(this._textEditor);a!=null&&this._textEditor.dispatchEvent(new Jd(Jd.TEXT_CHANGE,[a]))}},paste:function(){if(this._textEditor.get_readOnly())throw new ob("Cannot paste when editor is read-only");if(Ui.get_generalClipboard().hasFormat(2)){var a=Ui.get_generalClipboard().getData(2);a=Nm.deleteSelection(this._textEditor,a==null?null:H.string(a));a!=null&&this._textEditor.dispatchEvent(new Jd(Jd.TEXT_CHANGE,[a]))}},clipboardManager_textEditor_cutHandler:function(a){this._textEditor.get_readOnly()||
a.isDefaultPrevented()||this.cut()},clipboardManager_textEditor_copyHandler:function(a){a.isDefaultPrevented()||this.copy()},clipboardManager_textEditor_pasteHandler:function(a){this._textEditor.get_readOnly()||a.isDefaultPrevented()||this.paste()},__class__:gx};var hp=function(a){this._listening=!1;this._ranges=[];this._textEditor=a;this._textEditor.addEventListener(Jd.TEXT_CHANGE,m(this,this.colorManager_textEditor_textChangeHandler),!1,0,!0)};t["moonshine.editor.text.managers.ColorManager"]=hp;
hp.__name__="moonshine.editor.text.managers.ColorManager";hp.prototype={_textEditor:null,_parser:null,get_parser:function(){return this._parser},set_parser:function(a){if(this._parser==a)return this._parser;this._parser=a;this.reset();return this._parser},_ranges:null,_listening:null,reset:function(){this._ranges.length=0;this.invalidate(0,this._textEditor.get_lines().get_length()-1)},invalidate:function(a,b,c){c==null&&(c=!1);b==null&&(b=0);for(var d=!1,f=this._ranges.length-1;f>=0;){var g=this._ranges[f];
if(g.end<a)break;if(g.start>a)g.start+=b,g.end+=b;else{d=!0;g.end+=b;break}--f}d||(d=this._ranges,a=new ey(a,a+b),d.splice(f+1,0,a));this._listening||c||(this.startListening(),this.process())},process:function(){for(var a=this._textEditor.get_lines().get_length(),b=Pa.getTimer()+hp.CHUNK_TIMESPAN;this._ranges.length>0;){var c=this._ranges[0],d=c.start,f=c.end;if(this._parser!=null){var g=d>0?this._textEditor.get_lines().get(d-1):null;g=this.getEndContext(g!=null?g.styleRanges:null);this._parser.setContext(g)}for(g=
f+1;d<g;){var h=d++,n=this._textEditor.get_lines().get(h),l=n.styleRanges,q=this._parser!=null?this._parser.parse(n.text+"\n",h,0,h,n.text.length):null;if(l==null||q==null||l.join(",")!=q.join(","))n.styleRanges=q,this._textEditor.get_lines().updateAt(h);h==f&&h<a-1&&(n=this.getEndContext(n.styleRanges),l=this._textEditor.get_lines().get(h+1),l=this.getStartContext(l.styleRanges),n!=l&&this.invalidate(h+1));if(Pa.getTimer()>b){h==f?this._ranges.shift():c.start=h+1;return}}this._ranges.shift()}this.stopListening()},
getStartContext:function(a){return a!=null&&a.length>1?a[1]:this._parser!=null?this._parser.get_defaultContext():0},getEndContext:function(a){return a!=null&&a.length>1?a[a.length-1]:this._parser!=null?this._parser.get_defaultContext():0},applyChange:function(a){this.applyChangeRemove(a);a.get_newText()!=null&&this.applyChangeInsert(a);this._ranges.length==0?this.stopListening():this._listening||(this.startListening(),this.process())},applyChangeInsert:function(a){var b=(new Wa("\r?\n|\r","g")).split(a.get_newText()).length;
this.invalidate(a.get_startLine(),b-1,!0)},applyChangeRemove:function(a){for(var b=this._ranges.length-1;b>=0;){var c=this._ranges[b];if(a.get_startLine()>c.end)break;else{var d=(Math.min(a.get_endLine(),c.end)|0)-a.get_startLine();c.start=Math.min(c.start,a.get_startLine())|0;c.end-=d;c.end<c.start&&this._ranges.splice(b,1)}--b}a.get_startLine()==a.get_endLine()&&a.get_startChar()==a.get_endChar()||this.invalidate(a.get_startLine(),0,!0)},startListening:function(){this._listening||(this._listening=
!0,this._textEditor.addEventListener("enterFrame",m(this,this.colorManager_textEditor_enterFrameHandler),!1,0,!0))},stopListening:function(){this._listening&&(this._listening=!1,this._textEditor.removeEventListener("enterFrame",m(this,this.colorManager_textEditor_enterFrameHandler)))},colorManager_textEditor_textChangeHandler:function(a){this._ranges.length==0?this.stopListening():this._listening||(this.startListening(),this.process());var b=0;for(a=a.changes;b<a.length;){var c=a[b];++b;this.applyChange(c)}},
colorManager_textEditor_enterFrameHandler:function(a){this.process()},__class__:hp,__properties__:{set_parser:"set_parser",get_parser:"get_parser"}};var ey=function(a,b){this.start=a;this.end=b};t["moonshine.editor.text.managers._ColorManager.LineRange"]=ey;ey.__name__="moonshine.editor.text.managers._ColorManager.LineRange";ey.prototype={start:null,end:null,__class__:ey};var ex=function(a){this._activeAutoClosingPairLineIndex=this._activeAutoClosingPairStartCharIndex=this._activeAutoClosingPairEndCharIndex=
-1;this._textEditor=a;this._textEditor.addEventListener("keyDown",m(this,this.editManager_textEditor_keyDownHandler),!1,0,!0);this._textEditor.addEventListener("textInput",m(this,this.editManager_textEditor_textInputHandler),!1,0,!0);this._textEditor.addEventListener(Jd.TEXT_CHANGE,m(this,this.editManager_textEditor_textChangePriorityHandler),!1,100,!0);this._textEditor.addEventListener(Jd.TEXT_CHANGE,m(this,this.editManager_textEditor_textChangeHandler),!1,0,!0);this._textEditor.addEventListener(Il.SELECTION_CHANGE,
m(this,this.editManager_textEditor_selectionChangeHandler),!1,0,!0);this._textEditor.addEventListener("clear",m(this,this.editManager_textEditor_clearHandler),!1,0,!0)};t["moonshine.editor.text.managers.EditManager"]=ex;ex.__name__="moonshine.editor.text.managers.EditManager";ex.prototype={_textEditor:null,_activeAutoClosingPair:null,_activeAutoClosingPairLineIndex:null,_activeAutoClosingPairStartCharIndex:null,_activeAutoClosingPairEndCharIndex:null,toggleLineComment:function(){var a=this._textEditor.lineComment,
b=null;if(a==null||a.length==0){b=this._textEditor.blockComment;if(b==null||b.length<2)return;a=b[0];b=b[1]}var c=this._textEditor.get_caretLineIndex(),d=c;this._textEditor.get_selectionStartLineIndex()!=this._textEditor.get_selectionEndLineIndex()&&(c=this._textEditor.get_selectionStartLineIndex(),d=this._textEditor.get_selectionEndLineIndex());if(d<c){var f=c;c=d;d=f}f=!0;for(var g=-1,h=new Wa("^\\s*"+a.replace(Wa.escapeRe,"\\$&"),""),n=c,l=d+1;n<l;){var q=n++,u=this._textEditor.get_lines().get(q).text;
h.match(u)?b!=null&&(g=u.lastIndexOf(b),g==-1&&(f=!1)):f=!1}h=this._textEditor.get_selectionStartLineIndex();var v=this._textEditor.get_selectionStartCharIndex(),z=this._textEditor.get_selectionEndLineIndex(),r=this._textEditor.get_selectionEndCharIndex();v==-1&&(h=this._textEditor.get_caretLineIndex(),v=this._textEditor.get_caretCharIndex(),z=h,r=v);var F=2147483647;n=c;for(l=d+1;n<l;){q=n++;u=this._textEditor.get_lines().get(q).text;var J=Kd.getIndentCountAtStartOfLine(u,this._textEditor.get_tabWidth());
F>J&&(F=J)}var L=new Wa("^\\s*",""),Q=[];n=c;for(l=d+1;n<l;)if(q=n++,u=this._textEditor.get_lines().get(q).text,L.match(u))if(c=L.matched(0).length,f)J=a.length,u.charAt(c+J)==" "&&++J,Q.push(new Af(q,c,q,c+J)),b!=null&&Q.push(new Af(q,g,q,g+b.length)),q==h&&(v-=J),q==z&&(r-=J);else{J=Kd.getIndentCountAtStartOfLine(u,this._textEditor.get_tabWidth());if(J>F){d=c-1;for(var W=0;d>=0&&J>F;)u.charAt(d)=="\t"?(--J,--c):(++W,W==this._textEditor.get_tabWidth()&&(--J,c-=W,W=0),--d)}Q.push(new Af(q,c,q,c,a+
" "));b!=null&&Q.push(new Af(q,u.length,q,u.length," "+b));u=a.length+1;q==h&&(v+=u);q==z&&(r+=u)}this.dispatchChanges(Q);this._textEditor.setSelection(h,v,z,r)},toggleBlockComment:function(){var a=this._textEditor.blockComment;if(!(a==null||a.length<2)){var b=this._textEditor.get_caretLineIndex(),c=this._textEditor.get_caretCharIndex(),d=b,f=c;if(this._textEditor.get_selectionStartLineIndex()!=this._textEditor.get_selectionEndLineIndex()||this._textEditor.get_selectionStartCharIndex()!=this._textEditor.get_selectionEndCharIndex())b=
this._textEditor.get_selectionStartLineIndex(),c=this._textEditor.get_selectionStartCharIndex(),d=this._textEditor.get_selectionEndLineIndex(),f=this._textEditor.get_selectionEndCharIndex();if(d<b||d==b&&f<c){var g=b;b=d;d=g;g=c;c=f;f=g}g=a[0];a=a[1];var h=-1,n=-1,l=this._textEditor.get_lines().get(b).text,q=this._textEditor.get_lines().get(d).text,u=l.lastIndexOf(g,c);if(u!=-1){var v=q.indexOf(a,f);v!=-1&&(h=u,n=v+a.length)}u=c;v=f;var z=[];h!=-1&&n!=-1?(c=a.length,q.charAt(n-a.length-1)==" "&&++c,
z.push(new Af(d,n-c,d,n)),c=g.length,l.charAt(h+a.length)==" "&&++c,z.push(new Af(b,h,b,h+c)),u-=c,b==d&&(v-=c)):(u+=g.length+1,v+=g.length+1,b==d&&c==f?z.push(new Af(b,c,b,c,g+"  "+a)):(z.push(new Af(d,f,d,f," "+a)),z.push(new Af(b,c,b,c,g+" "))));this.dispatchChanges(z);this._textEditor.setSelection(b,u,d,v)}},indent:function(a){if(this._textEditor.get_selectionStartLineIndex()!=this._textEditor.get_selectionEndLineIndex()){var b=[];if(this._textEditor.get_selectionStartLineIndex()<this._textEditor.get_caretLineIndex()){var c=
this._textEditor.get_selectionStartLineIndex();var d=this._textEditor.get_caretLineIndex();var f=this._textEditor.get_selectionStartCharIndex();var g=this._textEditor.get_caretCharIndex()}else c=this._textEditor.get_caretLineIndex(),d=this._textEditor.get_selectionStartLineIndex(),f=this._textEditor.get_caretCharIndex(),g=this._textEditor.get_selectionStartCharIndex();f==this._textEditor.get_lines().get(c).text.length&&++c;g==0&&--d;for(var h=new Wa("^[ \t]+",""),n=c;n<=d;){var l=this._textEditor.get_lines().get(n).text,
q="";h.match(l)&&(q=h.matched(0));if(a){var u=Kd.getIndentCountAtStartOfLine(q,this._textEditor.get_tabWidth(),!0);if(u>0){l=this.getIndentString();var v="",z=0;for(--u;z<u;)z++,v+=l;b.push(new Af(n,0,n,q.length,v));n==c&&(f-=q.length,f<0&&(f=0),f+=v.length);n==d&&(g-=q.length,g<0&&(g=0),g+=v.length)}}else{v=Kd.getIndentCountAtStartOfLine(q,this._textEditor.get_tabWidth());l=Math.ceil(v);l==v&&++l;v=this.getIndentString();z="";for(u=0;u<l;)u++,z+=v;b.push(new Af(n,0,n,q.length,z));n==c&&(f-=q.length,
f<0&&(f=0),f+=z.length);n==d&&(g-=q.length,g<0&&(g=0),g+=z.length)}++n}b.length>0&&(this.dispatchChanges(b),this._textEditor.setSelection(c,f,d,g))}else a?(a=this._textEditor.get_caretLineIndex(),b=this._textEditor.get_selectionStartCharIndex(),c=this._textEditor.get_selectionEndCharIndex(),b==-1&&(b=this._textEditor.get_caretCharIndex(),c=this._textEditor.get_caretCharIndex()),d=this.createDecreaseIndentTextEditorChange(a),d!=null&&(h=d.get_endChar()-d.get_startChar(),b-=h,c-=h,b<0&&(b=0),c<0&&(c=
0),this.dispatchChanges([d]),this._textEditor.setSelection(a,b,a,c))):this.insertText(this.getIndentString())},isBetweenBrackets:function(){if(this._textEditor.brackets==null)return!1;var a=this._textEditor.get_lines().get(this._textEditor.get_caretLineIndex()),b=this._textEditor.get_caretCharIndex();if(b==0||b>=a.text.length)return!1;for(var c=a.text.charAt(b-1),d=0,f=this._textEditor.brackets;d<f.length;){var g=f[d];++d;if(g[0]==c){var h=a.text.charAt(b);if(g[1]==h)return!0}}return!1},findFullIndentForNewLine:function(a){for(var b=
new Wa("^\\s*",""),c=a;c>=0;)if(a=this._textEditor.get_lines().get(c).text,b.match(a)){var d=b.matched(0);if(N.trim(a).length>0||c==0){if(this._textEditor.brackets!=null)for(b=0,c=this._textEditor.brackets;b<c.length;){var f=c[b];++b;var g=a.lastIndexOf(f[0]);if(g!=-1&&(f=a.lastIndexOf(f[1]),f==-1||f<g)){d+=this.getIndentString();break}}return d}--c}return""},getIndentString:function(){return this._textEditor.insertSpacesForTabs?Kd.repeatStr(" ",this._textEditor.get_tabWidth()):"\t"},textEndsInUnterminatedStringOrComment:function(a){for(var b=
this._textEditor.lineComment,c=this._textEditor.blockComment!=null?this._textEditor.blockComment[0]:null,d=this._textEditor.blockComment!=null?this._textEditor.blockComment[1]:null,f=["'",'"'],g=null,h="",n="",l=0;l<a.length;){var q=a.charAt(l);if(g!=null)q==g&&(g=null);else if(f.indexOf(q)!=-1)g=q,n=h="";else{if(b!=null){var u=b.charAt(h.length);if(q==u){if(h+=q,h==b)return!0}else h=""}if(c!=null)if(u=c.charAt(n.length),q==u){if(n+=q,n==c){h=a.indexOf(d,l+c.length);if(h==-1)return!0;l+=h+d.length;
n=h=""}}else n=""}++l}return g!=null},insertText:function(a){if(this._textEditor.get_hasSelection())a=Nm.deleteSelection(this._textEditor,a),a!=null&&this.dispatchChanges([a]);else{if(this._textEditor.autoClosingPairs!=null)for(var b=0,c=this._textEditor.autoClosingPairs;b<c.length;){var d=c[b];++b;var f=this._textEditor.get_caretLineIndex(),g=this._textEditor.get_caretCharIndex();if(this._activeAutoClosingPair!=null&&g==this._activeAutoClosingPairEndCharIndex&&this._activeAutoClosingPair.open==d.open&&
d.close==a){a=g+d.open.length;this._textEditor.setSelection(f,a,f,a);return}var h=a;if(d.open.length>1){var n=this._textEditor.get_caretLine().text,l=d.open.length-h.length;l>0&&g>=l&&(h=V.substr(n,g-l,l)+h)}if(d.open==h&&(h=V.substr(this._textEditor.get_caretLine().text,0,g),!this.textEndsInUnterminatedStringOrComment(h))){a+=d.close;this.dispatchChanges([new Af(f,g,f,g,a)]);a=g+a.length-d.close.length;this._textEditor.setSelection(f,a,f,a);this._activeAutoClosingPair=d;this._activeAutoClosingPairLineIndex=
f;this._activeAutoClosingPairEndCharIndex=this._activeAutoClosingPairStartCharIndex=a;return}}f=null;if(this._textEditor.brackets!=null&&N.trim(this._textEditor.get_caretLine().text).length==0)for(b=0,c=this._textEditor.brackets;b<c.length;)d=c[b],++b,a==d[1]&&(f=this.createDecreaseIndentTextEditorChange(this._textEditor.get_caretLineIndex()));if(f!=null){if(this._textEditor.get_caretCharIndex()==f.get_endChar()){this.dispatchChanges([new Af(f.get_startLine(),f.get_startChar(),f.get_endLine(),f.get_endChar(),
a)]);return}this.dispatchChanges([f])}b=this._textEditor.get_caretLineIndex();c=this._textEditor.get_caretCharIndex();this.dispatchChanges([new Af(b,c,b,c,a)])}},createRemoveAtCursorTextEditorChange:function(a,b){if(this._textEditor.get_hasSelection())return Nm.deleteSelection(this._textEditor);var c=this._textEditor.get_caretLineIndex(),d=c,f=this._textEditor.get_caretCharIndex(),g=f;if(f!=0||a)if(f==this._textEditor.get_lines().get(c).text.length&&a){if(c==this._textEditor.get_lines().get_length()-
1)return null;++d;f=this._textEditor.get_lines().get(c).text.length;g=0}else a?g+=b?Kd.wordBoundaryForward(this._textEditor.get_lines().get(c).text.substring(f)):1:f-=b?Kd.wordBoundaryBackward(this._textEditor.get_lines().get(c).text.substring(0,g)):1;else{if(c==0)return null;--c;f=this._textEditor.get_lines().get(c).text.length;g=0}return new Af(c,f,d,g)},createDecreaseIndentTextEditorChange:function(a){var b=Kd.getFirstIndentAtStartOfLine(this._textEditor.get_lines().get(a).text,this._textEditor.get_tabWidth());
return b.length==0?null:new Af(a,0,a,b.length)},dispatchChanges:function(a){this._textEditor.dispatchEvent(new Jd(Jd.TEXT_CHANGE,a))},editManager_textEditor_keyDownHandler:function(a){if(!a.isDefaultPrevented()){switch(a.keyCode){case 8:var b=this.createRemoveAtCursorTextEditorChange(!1,a.altKey);b!=null&&(this._activeAutoClosingPair!=null&&b.get_startLine()==this._activeAutoClosingPairLineIndex&&b.get_endChar()==this._activeAutoClosingPairEndCharIndex&&this._activeAutoClosingPairStartCharIndex==
this._activeAutoClosingPairEndCharIndex&&(b=new Af(b.get_startLine(),b.get_startChar(),b.get_endLine(),b.get_endChar()+this._activeAutoClosingPair.close.length)),this.dispatchChanges([b]));break;case 9:this.indent(a.shiftKey);a.preventDefault();break;case 13:b=this.findFullIndentForNewLine(this._textEditor.get_caretLineIndex());if(this.isBetweenBrackets()){var c=b+this.getIndentString(),d=this._textEditor.get_caretLineIndex()+1,f=c.length;this.insertText(this._textEditor.get_lineDelimiter()+c+this._textEditor.get_lineDelimiter()+
b);this._textEditor.setSelection(d,f,d,f)}else this.insertText(this._textEditor.get_lineDelimiter()+b);break;case 46:b=this.createRemoveAtCursorTextEditorChange(!0,a.altKey);b!=null&&(this._textEditor.get_hasSelection()||(this.checkForClearActiveAutoClosingPair(b.get_startLine(),b.get_startChar()),this.checkForClearActiveAutoClosingPair(b.get_endLine(),b.get_endChar())),this.dispatchChanges([b]));break;case 111:case 191:a.ctrlKey&&a.altKey?(this.toggleBlockComment(),a.preventDefault()):a.ctrlKey&&
(this.toggleLineComment(),a.preventDefault())}a.keyCode==25&&a.preventDefault()}},editManager_textEditor_textInputHandler:function(a){a=a.text;(new Wa("[^\\x00-\\x1F\\x7F\\x80-\\x9F]","")).match(a)&&this.insertText(a)},applyChange:function(a){var b=a.get_startLine(),c=a.get_startChar(),d=a.get_endLine(),f=a.get_endChar(),g=a.get_newText();this._activeAutoClosingPair!=null&&c<=this._activeAutoClosingPairEndCharIndex&&f<=this._activeAutoClosingPairEndCharIndex&&(this._activeAutoClosingPairEndCharIndex-=
f-c,g!=null&&(this._activeAutoClosingPairEndCharIndex+=g.length));a=null;g!=null&&g.length>0&&(a=(new Wa("\r?\n|\r","g")).split(g));g=this._textEditor.get_lines().get(b);var h=this._textEditor.get_lines().get(d);c=g.text.substring(0,c);f=h.text.substring(f);if(b!=d){var n=b+1,l=b-d;d=l;for(h=0;d<h;)d++,this._textEditor.get_lines().removeAt(n);this.updateLineIndices(this._textEditor,n,l)}if(a==null)g.text=c+f,this._textEditor.get_lines().updateAt(b);else for(a.length>1&&this.updateLineIndices(this._textEditor,
b+1,a.length-1),d=0,h=a.length;d<h;)l=d++,n="",l==0&&(n=c),n+=a[l],l==a.length-1&&(n+=f),l=b+l,l==b?(g.text=n,this._textEditor.get_lines().updateAt(l)):this._textEditor.get_lines().addAt(new Hl(n,l),l)},updateLineIndices:function(a,b,c){a=a.get_lines();for(var d=a.get_length();b<d;){var f=b++;a.get(f).lineIndex+=c;a.updateAt(f)}},sortTextChanges:function(a,b){return a.get_startLine()<b.get_startLine()?1:b.get_startLine()<a.get_startLine()?-1:a.get_startChar()<b.get_startChar()?1:b.get_startChar()<
a.get_startChar()?-1:0},mergeChanges:function(a){for(var b=0,c=null;b<a.length;){var d=a[b];if(d.get_startLine()!=d.get_endLine()||d.get_startChar()!=d.get_endChar()||d.get_newText()!=null&&d.get_newText().length!=0){if(d.get_startLine()<0||d.get_startChar()<0||d.get_endLine()<0||d.get_endChar()<0||d.get_startLine()>d.get_endLine()||d.get_startLine()==d.get_endLine()&&d.get_startChar()>d.get_endChar())throw new we("Invalid text editor change. Start: ("+d.get_startLine()+", "+d.get_startChar()+"), End: ("+
d.get_endLine()+", "+d.get_endChar()+")");if(c==null)c=d;else if(d.get_endLine()>c.get_startLine()||d.get_endLine()==c.get_startLine()&&(d.get_endChar()>c.get_startChar()||d.get_startChar()==c.get_startChar())){if(c.get_startLine()==c.get_endLine()&&c.get_startChar()==c.get_endChar()&&c.get_newText()!=null&&c.get_startLine()==d.get_startLine()&&c.get_startChar()==d.get_startChar()){var f="";c.get_newText()!=null&&(f+=c.get_newText());d.get_newText()!=null&&(f+=d.get_newText());c=new Af(d.get_startLine(),
d.get_startChar(),d.get_endLine(),d.get_endChar(),f);a[b-1]=c;a.splice(b,1);continue}throw new Cb("TextEditorChanges must not overlap. { startLine: "+c.get_startLine()+", startChar: "+c.get_startChar()+", endLine: "+c.get_endLine()+", endChar: "+c.get_endChar()+" } overlaps with { startLine: "+d.get_startLine()+", startChar: "+d.get_startChar()+", endLine: "+d.get_endLine()+", endChar: "+d.get_endChar()+"}.");}++b}else a.splice(b,1)}},editManager_textEditor_textChangePriorityHandler:function(a){a.origin!=
Jd.ORIGIN_UNDO&&(Gf.sort(a.changes,m(this,this.sortTextChanges)),this.mergeChanges(a.changes))},editManager_textEditor_textChangeHandler:function(a){var b=0;for(a=a.changes;b<a.length;){var c=a[b];++b;this.applyChange(c)}},checkForClearActiveAutoClosingPair:function(a,b){if(this._activeAutoClosingPair!=null){var c=!1;if(a!=this._activeAutoClosingPairLineIndex)c=!0;else if(b<this._activeAutoClosingPairStartCharIndex||b>this._activeAutoClosingPairEndCharIndex)c=!0;c&&(this._activeAutoClosingPair=null,
this._activeAutoClosingPairEndCharIndex=this._activeAutoClosingPairStartCharIndex=this._activeAutoClosingPairLineIndex=-1)}},editManager_textEditor_selectionChangeHandler:function(a){this.checkForClearActiveAutoClosingPair(this._textEditor.get_caretLineIndex(),this._textEditor.get_caretCharIndex())},editManager_textEditor_clearHandler:function(a){a=Nm.deleteSelection(this._textEditor);a!=null&&this._textEditor.dispatchEvent(new Jd(Jd.TEXT_CHANGE,[a]))},__class__:ex};var hx=function(a){this._textEditor=
a;this._textEditor.addEventListener(Jd.TEXT_CHANGE,m(this,this.findReplaceManager_textEditor_textChangeHandler))};t["moonshine.editor.text.managers.FindReplaceManager"]=hx;hx.__name__="moonshine.editor.text.managers.FindReplaceManager";hx.prototype={_textEditor:null,_findResult:null,find:function(a,b,c,d){d==null&&(d=!0);c==null&&(c=!0);b==null&&(b=!1);var f=this._textEditor.get_text(),g=a instanceof Wa?a:null;g==null&&a!=null&&(a=a==null?"null":H.string(a),a.length>0&&(g=new Wa(a.replace(Wa.escapeRe,
"\\$&"),"i")));f=this.findInternal(f,g);this._findResult=new hq(g,b,c,f);if(f.length==0)return d&&this._textEditor.removeSelection(),this._findResult;this._findResult=this.findNextInternal(this._findResult,b,!0,c);d&&this.applySearch(this._findResult);return this._findResult},findNext:function(a,b){b==null&&(b=!0);a==null&&(a=!1);if(this._findResult==null)return new hq(null,a,b);this._findResult=this.findNextInternal(this._findResult,a,!1,b);this.applySearch(this._findResult);return this._findResult},
replace:function(a,b,c,d){d==null&&(d=!0);c==null&&(c=!1);b==null&&(b=!1);if(this._findResult==null)return new hq(null,c,d);d=this._textEditor.get_text();c=[];if(b){b=0;for(var f=this._findResult.results;b<f.length;){var g=f[b];++b;this.addChangesForReplace(d,a,g,c)}a=this._findResult.results.slice();this._findResult.replaced=a;this._findResult.results.length=0}else b=this._findResult.results.splice(this._findResult.selectedIndex,1),this._findResult.replaced=b,this.addChangesForReplace(d,a,b[0],c);
this._textEditor.dispatchEvent(new Jd(Jd.TEXT_CHANGE,c));this.applySearch(this._findResult);return this._findResult},findInternal:function(a,b){var c=[];if(b!=null)for(var d=0;b.matchSub(a,d);)if(b.matched(0)!=null){var f=b.matchedPos();d=f.pos+f.len;var g=Kd.charIdx2LineCharIdx(a,f.pos,this._textEditor.get_lineDelimiter());c.push(new dy(f.pos,f.len,g.line,g.character,g.line,g.character+f.len))}else break;return c},findNextInternal:function(a,b,c,d){d==null&&(d=!0);c==null&&(c=!1);b==null&&(b=!1);
var f=this._textEditor.get_text(),g=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():this._textEditor.get_caretLineIndex(),h=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex();f=Kd.lineCharIdx2charIdx(f,g,h,this._textEditor.get_lineDelimiter());g=a.results;h=-1;if(b)for(var n=Math.min(g.length-1,a.selectedIndex-1)|0;n>=0;){var l=g[n];if(l.index<f){h=n;break}--n}else for(var q=a.selectedIndex+1,
u=g.length;q<u;)if(n=q++,l=g[n],c){if(l.index>=f){h=n;break}}else if(l.index>f){h=n;break}d&&h==-1&&g.length!=0&&(h=b?g.length-1:0);a.replaced.length=0;if(h==-1)return a;a.selectedIndex=h;a.current=a.selectedIndex==-1?null:a.results[a.selectedIndex];return a},addChangesForReplace:function(a,b,c,d){d.push(new Af(c.startLine,c.startChar,c.endLine,c.endChar,b))},applySearch:function(a){var b=-1,c=-1,d=-1,f=-1;a=a.current;a!=null&&(b=a.startLine,c=a.startChar,d=a.endLine,f=a.endChar);this._textEditor.setSelection(b,
c,d,f);this._textEditor.scrollToCaret()},findReplaceManager_textEditor_textChangeHandler:function(a){this._findResult!=null&&this.find(this._findResult.search,this._findResult.backwards,this._findResult.allowWrap,!1)},__class__:hx};var xh=function(a){this.macHomeAndEndEnabled=!1;this._dragScrollDeltaX=this._dragScrollDeltaY=this._clickCount=this._lastClickTime=0;this._savedCaretLineIndex=this._savedCaretCharIndex=this._dragStartLine=this._dragStartChar=this._dragEndChar=-1;this._textEditor=a;this._textEditor.addEventListener("keyDown",
m(this,this.selectionManager_textEditor_keyDownHandler),!1,0,!0);this._textEditor.addEventListener("keyDown",m(this,this.selectionManager_textEditor_keyDownCaptureHandler),!0,0,!0);this._textEditor.addEventListener(Jd.TEXT_CHANGE,m(this,this.selectionManager_textEditor_textChangePriorityHandler),!1,100,!0);this._textEditor.addEventListener(Jd.TEXT_CHANGE,m(this,this.selectionManager_textEditor_textChangeHandler),!1,0,!0);this._textEditor.addEventListener("selectAll",m(this,this.selectionManager_textEditor_selectAllHandler),
!1,0,!0);this._textEditor.addEventListener("mouseDown",m(this,this.selectionManager_textEditor_mouseDownHandler),!1,0,!0)};t["moonshine.editor.text.managers.SelectionManager"]=xh;xh.__name__="moonshine.editor.text.managers.SelectionManager";xh.prototype={_textEditor:null,_savedCaretLineIndex:null,_savedCaretCharIndex:null,_dragStartLine:null,_dragStartChar:null,_dragEndChar:null,_dragScrollDeltaX:null,_dragScrollDeltaY:null,_dragLocalPoint:null,_dragScrollTimer:null,_clickCount:null,_lastClickTime:null,
_lastClickPos:null,macHomeAndEndEnabled:null,applyChanges:function(a){for(var b=this._savedCaretLineIndex,c=this._savedCaretCharIndex,d=0;d<a.length;){var f=a[d];++d;if(b>f.get_startLine()&&b<f.get_endLine()||b==f.get_startLine()&&b==f.get_endLine()&&c>f.get_startChar()&&c<f.get_endChar()||b==f.get_startLine()&&b<f.get_endLine()&&c>=f.get_startChar()||b>f.get_startLine()&&b==f.get_endLine()&&c<=f.get_endChar())b=f.get_endLine(),c=f.get_endChar();if(f.get_endLine()==b&&f.get_endChar()<=c){var g=f.get_endChar();
f.get_startLine()==b&&(g-=f.get_startChar());c-=g}b>=f.get_endLine()&&(b-=f.get_endLine()-f.get_startLine(),b!=f.get_endLine()&&b==f.get_startLine()&&(c+=f.get_startChar()));g=f.get_newText();g!=null&&g.length>0&&(g=(new Wa("\r?\n|\r","g")).split(g),b==f.get_startLine()&&c>=f.get_startChar()&&(g.length>1&&(c-=f.get_startChar()),c+=g[g.length-1].length),b>=f.get_startLine()&&(b+=g.length-1))}this._textEditor.setSelection(b,c,b,c)},focusSelectionStart:function(){var a=this._textEditor.get_selectionStartLineIndex(),
b=this._textEditor.get_selectionStartCharIndex();this._textEditor.setSelection(a,b,a,b)},updateDragSelect:function(){var a=this._dragLocalPoint,b=this._dragStartLine,c=this._dragEndChar,d=this._dragStartLine,f=this._dragEndChar;this._textEditor.validateNow();var g=this._textEditor.localToTextEditorPosition(a,!0);if(g!=null){var h=g.character;h<this._dragStartChar&&g.line<=this._dragStartLine?c=this._dragEndChar:h>this._dragEndChar&&g.line>=this._dragStartLine?c=this._dragStartChar:g.line<this._dragStartLine?
c=this._dragEndChar:g.line>this._dragStartLine&&(c=this._dragStartChar);if(h!=-1)this._clickCount==1?(d=g.line,f=h):this._clickCount==2?(d=g.line,d<b||d==b&&h<c?f=h-Kd.wordBoundaryBackward(this._textEditor.get_lines().get(d).text.substring(0,h)):(f=h+Kd.wordBoundaryForward(this._textEditor.get_lines().get(d).text.substring(h)),this._textEditor.get_lines().get(d).text.charAt(f-1)==" "&&--f)):this._clickCount==3&&(d=g.line,f=this._textEditor.get_lines().get(d).text.length);else if(a.x<this._textEditor.get_gutterWidth())d=
g.line+(b>g.line||b==g.line&&c>0?0:1),f=0,d>=this._textEditor.get_lines().get_length()&&(d=this._textEditor.get_lines().get_length()-1,f=this._textEditor.get_lines().get(d).text.length);else return;this._textEditor.setSelection(b,c,d,f)}},startDragScroll:function(){this._dragScrollTimer=new iq(xh.SCROLL_INTERVAL);this._dragScrollTimer.addEventListener("timer",m(this,this.selectionManager_dragScrollTimer_timerHandler));this._dragScrollTimer.start()},stopDragScroll:function(){this._dragScrollTimer!=
null&&(this._dragScrollTimer.stop(),this._dragScrollTimer=null)},keyboardHome:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():this._textEditor.get_caretLineIndex(),c=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex();this._textEditor.get_hasSelection()&&!a.shiftKey&&this._textEditor.removeSelection();if(a.ctrlKey)a.shiftKey?this._textEditor.setSelection(b,c,0,0):this._textEditor.setSelection(0,
0,0,0),this._textEditor.set_lineScrollY(0);else{var d=this._textEditor.get_lines().get(this._textEditor.get_caretLineIndex());d=Kd.indentAmount(d.text);d=this._textEditor.get_caretCharIndex()==d?0:d;a.shiftKey?this._textEditor.setSelection(b,c,this._textEditor.get_caretLineIndex(),d):this._textEditor.setSelection(this._textEditor.get_caretLineIndex(),d,this._textEditor.get_caretLineIndex(),d)}},keyboardEnd:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():
this._textEditor.get_caretLineIndex(),c=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex();this._textEditor.get_hasSelection()&&!a.shiftKey&&this._textEditor.removeSelection();if(a.ctrlKey){var d=this._textEditor.get_lines().get_length()-1,f=this._textEditor.get_lines().get(d).text.length;a.shiftKey?this._textEditor.setSelection(b,c,d,f):this._textEditor.setSelection(d,f,d,f);this._textEditor.set_lineScrollY(this._textEditor.get_maxLineScrollY())}else f=
this._textEditor.get_lines().get(this._textEditor.get_caretLineIndex()).text.length,a.shiftKey?this._textEditor.setSelection(b,c,this._textEditor.get_caretLineIndex(),f):this._textEditor.setSelection(this._textEditor.get_caretLineIndex(),f,this._textEditor.get_caretLineIndex(),f)},keyboardPageUp:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():this._textEditor.get_caretLineIndex(),c=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():
this._textEditor.get_caretCharIndex();this._textEditor.get_hasSelection()&&!a.shiftKey&&this._textEditor.removeSelection();if(a.ctrlKey){var d=this._textEditor.get_lineScrollY();a.shiftKey?this._textEditor.setSelection(b,c,d,this._textEditor.get_caretCharIndex()):this._textEditor.setSelectionAdvanced(d,this._textEditor.get_expandedCaretCharIndex(),d,this._textEditor.get_expandedCaretCharIndex(),!1)}else d=Math.max(this._textEditor.get_caretLineIndex()-this._textEditor.get_visibleLines(),0)|0,a.shiftKey?
this._textEditor.setSelection(b,c,d,this._textEditor.get_caretCharIndex()):this._textEditor.setSelectionAdvanced(d,this._textEditor.get_expandedCaretCharIndex(),d,this._textEditor.get_expandedCaretCharIndex(),!1),this._textEditor.set_lineScrollY(this._textEditor.get_lineScrollY()-this._textEditor.get_visibleLines())},keyboardPageDown:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():this._textEditor.get_caretLineIndex(),c=this._textEditor.get_hasSelection()?
this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex();this._textEditor.get_hasSelection()&&!a.shiftKey&&this._textEditor.removeSelection();if(a.ctrlKey){var d=this._textEditor.get_lineScrollY()+this._textEditor.get_visibleLines()-2;a.shiftKey?this._textEditor.setSelection(b,c,d,this._textEditor.get_caretCharIndex()):this._textEditor.setSelectionAdvanced(d,this._textEditor.get_expandedCaretCharIndex(),d,this._textEditor.get_expandedCaretCharIndex(),!1)}else d=Math.min(this._textEditor.get_caretLineIndex()+
this._textEditor.get_visibleLines(),this._textEditor.get_lines().get_length()-1)|0,a.shiftKey?this._textEditor.setSelection(b,c,d,this._textEditor.get_caretCharIndex()):this._textEditor.setSelectionAdvanced(d,this._textEditor.get_expandedCaretCharIndex(),d,this._textEditor.get_expandedCaretCharIndex(),!1),a=this._textEditor,a.set_lineScrollY(a.get_lineScrollY()+this._textEditor.get_visibleLines())},keyboardLeft:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():
this._textEditor.get_caretLineIndex(),c=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex(),d=1,f=this._textEditor.get_lines().get(this._textEditor.get_caretLineIndex());a.commandKey?(!a.shiftKey&&this._textEditor.get_hasSelection()&&this._textEditor.removeSelection(),d=Kd.indentAmount(f.text),d=this._textEditor.get_caretCharIndex()==d?0:d,a.shiftKey?this._textEditor.setSelection(b,c,this._textEditor.get_caretLineIndex(),d):this._textEditor.setSelection(this._textEditor.get_caretLineIndex(),
d,this._textEditor.get_caretLineIndex(),d)):this._textEditor.get_hasSelection()&&!a.shiftKey?((this._textEditor.get_caretLineIndex()>this._textEditor.get_selectionStartLineIndex()||this._textEditor.get_caretCharIndex()>this._textEditor.get_selectionStartCharIndex())&&this.focusSelectionStart(),this._textEditor.removeSelection()):this._textEditor.get_caretCharIndex()>0?(a.altKey&&(d=Kd.wordBoundaryBackward(f.text.substring(0,this._textEditor.get_caretCharIndex()))),d=this._textEditor.get_caretCharIndex()-
d,a.shiftKey?this._textEditor.setSelection(b,c,this._textEditor.get_caretLineIndex(),d):this._textEditor.setSelection(this._textEditor.get_caretLineIndex(),d,this._textEditor.get_caretLineIndex(),d)):(f=this._textEditor.get_caretLineIndex()-1,f>=0&&(d=this._textEditor.get_lines().get(f).text.length,a.shiftKey?this._textEditor.setSelection(b,c,f,d):this._textEditor.setSelection(f,d,f,d)))},keyboardRight:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():
this._textEditor.get_caretLineIndex(),c=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex(),d=1,f=this._textEditor.get_lines().get(this._textEditor.get_caretLineIndex());a.commandKey?(!a.shiftKey&&this._textEditor.get_hasSelection()&&this._textEditor.removeSelection(),d=f.text.length,a.shiftKey?this._textEditor.setSelection(b,c,this._textEditor.get_caretLineIndex(),d):this._textEditor.setSelection(this._textEditor.get_caretLineIndex(),
d,this._textEditor.get_caretLineIndex(),d)):this._textEditor.get_hasSelection()&&!a.shiftKey?((this._textEditor.get_caretLineIndex()<this._textEditor.get_selectionStartLineIndex()||this._textEditor.get_caretCharIndex()<this._textEditor.get_selectionStartCharIndex())&&this.focusSelectionStart(),this._textEditor.removeSelection()):this._textEditor.get_caretCharIndex()<f.text.length?(a.altKey&&(d=Kd.wordBoundaryForward(f.text.substring(this._textEditor.get_caretCharIndex()))),d=this._textEditor.get_caretCharIndex()+
d,a.shiftKey?this._textEditor.setSelection(b,c,this._textEditor.get_caretLineIndex(),d):this._textEditor.setSelection(this._textEditor.get_caretLineIndex(),d,this._textEditor.get_caretLineIndex(),d)):(f=this._textEditor.get_caretLineIndex()+1,f<this._textEditor.get_lines().get_length()&&(d=0,a.shiftKey?this._textEditor.setSelection(b,c,f,d):this._textEditor.setSelection(f,d,f,d)))},keyboardUp:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():this._textEditor.get_caretLineIndex(),
c=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex();if(a.commandKey)!a.shiftKey&&this._textEditor.get_hasSelection()&&this._textEditor.removeSelection(),a.shiftKey?this._textEditor.setSelection(b,c,0,0):this._textEditor.setSelection(0,0,0,0);else if(a.ctrlKey){if(this._textEditor.get_lineScrollY()>0){if(!this._textEditor.get_hasSelection()&&this._textEditor.get_caretLineIndex()>this._textEditor.get_lineScrollY()+this._textEditor.get_visibleLines()-
2){var d=this._textEditor.get_lineScrollY()+this._textEditor.get_visibleLines()-2;this._textEditor.setSelectionAdvanced(d,this._textEditor.get_expandedCaretCharIndex(),d,this._textEditor.get_expandedCaretCharIndex(),!1)}this._textEditor.set_lineScrollY(this._textEditor.get_lineScrollY()-1)}}else{this._textEditor.get_hasSelection()&&!a.shiftKey&&this._textEditor.removeSelection();d=this._textEditor.get_caretLineIndex()-1;var f=a.shiftKey?this._textEditor.get_caretCharIndex():this._textEditor.get_expandedCaretCharIndex();
d<0&&(f=d=0);a.shiftKey?this._textEditor.setSelection(b,c,d,f):this._textEditor.setSelectionAdvanced(d,f,d,f,!1)}},keyboardDown:function(a){var b=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():this._textEditor.get_caretLineIndex(),c=this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex();if(a.commandKey){!a.shiftKey&&this._textEditor.get_hasSelection()&&this._textEditor.removeSelection();var d=this._textEditor.get_lines().get_length()-
1,f=this._textEditor.get_lines().get(d).text.length;a.shiftKey?this._textEditor.setSelection(b,c,d,f):this._textEditor.setSelection(d,f,d,f)}else a.ctrlKey?this._textEditor.get_lineScrollY()<this._textEditor.get_maxLineScrollY()&&(!this._textEditor.get_hasSelection()&&this._textEditor.get_caretLineIndex()<this._textEditor.get_lineScrollY()+1&&(d=this._textEditor.get_lineScrollY()+1,this._textEditor.setSelectionAdvanced(d,this._textEditor.get_expandedCaretCharIndex(),d,this._textEditor.get_expandedCaretCharIndex(),
!1)),this._textEditor.set_lineScrollY(this._textEditor.get_lineScrollY()+1)):(this._textEditor.get_hasSelection()&&!a.shiftKey&&this._textEditor.removeSelection(),d=this._textEditor.get_caretLineIndex()+1,f=a.shiftKey?this._textEditor.get_caretCharIndex():this._textEditor.get_expandedCaretCharIndex(),d>=this._textEditor.get_lines().get_length()&&(d=this._textEditor.get_lines().get_length()-1,f=this._textEditor.get_lines().get(this._textEditor.get_lines().get_length()-1).text.length),a.shiftKey?this._textEditor.setSelection(b,
c,d,f):this._textEditor.setSelectionAdvanced(d,f,d,f,!1))},selectionManager_textEditor_keyDownHandler:function(a){if(!a.isDefaultPrevented()&&a.keyCode==65&&a.ctrlKey&&!a.altKey){var b=this._textEditor.get_lines().get_length()-1;this._textEditor.setSelection(0,0,b,this._textEditor.get_lines().get(b).text.length);this._textEditor.scrollToCaret();a.preventDefault()}},selectionManager_textEditor_keyDownCaptureHandler:function(a){if(!a.isDefaultPrevented()){var b=!0;switch(a.keyCode){case 33:this.keyboardPageUp(a);
break;case 34:this.keyboardPageDown(a);break;case 35:if(this.macHomeAndEndEnabled&&N.startsWith(vd.get_version(),"MAC")){this._textEditor.set_lineScrollY(this._textEditor.get_maxLineScrollY());a.preventDefault();return}this.keyboardEnd(a);break;case 36:if(this.macHomeAndEndEnabled&&N.startsWith(vd.get_version(),"MAC")){this._textEditor.set_lineScrollY(0);a.preventDefault();return}this.keyboardHome(a);break;case 37:this.keyboardLeft(a);break;case 38:this.keyboardUp(a);break;case 39:this.keyboardRight(a);
break;case 40:this.keyboardDown(a);break;default:b=!1}b&&(a.preventDefault(),this._textEditor.scrollToCaret())}},selectionManager_textEditor_textChangePriorityHandler:function(a){a.origin!=Jd.ORIGIN_REMOTE&&(this._savedCaretLineIndex=this._textEditor.get_caretLineIndex(),this._savedCaretCharIndex=this._textEditor.get_caretCharIndex())},selectionManager_textEditor_textChangeHandler:function(a){a.origin!=Jd.ORIGIN_REMOTE&&(this._textEditor.removeSelection(),this.applyChanges(a.changes),this._textEditor.scrollToCaret())},
selectionManager_textEditor_selectAllHandler:function(a){a=this._textEditor.get_lines().get_length()-1;this._textEditor.setSelection(0,0,a,this._textEditor.get_lines().get(a).text.length);this._textEditor.scrollToCaret()},selectionManager_textEditor_mouseDownHandler:function(a){this._textEditor.validateNow();var b=new Ea(this._textEditor.get_mouseX(),this._textEditor.get_mouseY());if(this._textEditor.getViewPortVisibleBounds().containsPoint(b)){this._clickCount>0&&Pa.getTimer()-this._lastClickTime<
300&&Ea.distance(b,this._lastClickPos)<10?this._clickCount=this._clickCount%3+1:this._clickCount=1;var c=this._textEditor.localToTextEditorPosition(b,!0);if(c!=null&&c.character!=-1){var d=!0;if(b.x<this._textEditor.get_gutterWidth()){if(this._textEditor.get_selectionStartLineIndex()!=c.line&&this._textEditor.get_selectionEndLineIndex()!=c.line)return;var f=this._textEditor.get_selectionStartLineIndex();a=this._textEditor.get_selectionStartCharIndex();var g=this._textEditor.get_selectionEndLineIndex();
c=this._textEditor.get_selectionEndCharIndex();d=!1}else if(this._clickCount==1)f=a.shiftKey?this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartLineIndex():this._textEditor.get_caretLineIndex():c.line,a=a.shiftKey?this._textEditor.get_hasSelection()?this._textEditor.get_selectionStartCharIndex():this._textEditor.get_caretCharIndex():c.character,g=c.line,c=c.character;else if(this._clickCount==2)f=g=c.line,a=c.character-Kd.wordBoundaryBackward(this._textEditor.get_lines().get(f).text.substring(0,
c.character)),c=c.character+Kd.wordBoundaryForward(this._textEditor.get_lines().get(g).text.substring(c.character)),this._textEditor.get_lines().get(g).text.charAt(c-1)==" "&&--c;else if(this._clickCount==3)f=g=c.line,a=0,c=this._textEditor.get_lines().get(f).text.length;else return;d&&this._textEditor.setSelection(f,a,g,c);this._dragStartLine=f;this._dragStartChar=a;this._dragEndChar=c;this._dragLocalPoint=b;this._textEditor.stage.addEventListener("mouseMove",m(this,this.selectionManager_stage_mouseMoveHandler),
!1,0,!0);this._textEditor.stage.addEventListener("mouseUp",m(this,this.selectionManager_stage_mouseUpHandler),!1,0,!0);this._lastClickPos=b;this._lastClickTime=Pa.getTimer()}}},selectionManager_stage_mouseMoveHandler:function(a){this._dragLocalPoint=a=new Ea(this._textEditor.get_mouseX(),this._textEditor.get_mouseY());this._dragScrollDeltaY=this._dragScrollDeltaX=0;var b=this._textEditor.getViewPortVisibleBounds(),c=b.x+this._textEditor.get_gutterWidth(),d=b.x+b.width;b=b.y+b.height;a.x<=c+xh.SCROLL_THRESHOLD?
this._dragScrollDeltaX=Math.ceil(a.x-(c+xh.SCROLL_THRESHOLD)):a.x>=d-xh.SCROLL_THRESHOLD&&(this._dragScrollDeltaX=Math.ceil(a.x-(d-xh.SCROLL_THRESHOLD)));a.y<=xh.SCROLL_THRESHOLD?this._dragScrollDeltaY=Math.ceil((a.y-xh.SCROLL_THRESHOLD)/xh.SCROLL_THRESHOLD):a.y>=b-xh.SCROLL_THRESHOLD&&(this._dragScrollDeltaY=Math.ceil((a.y-(b-xh.SCROLL_THRESHOLD))/xh.SCROLL_THRESHOLD));this._dragScrollDeltaX==0&&this._dragScrollDeltaY==0?(this.stopDragScroll(),this.updateDragSelect()):this._dragScrollTimer==null&&
this.startDragScroll()},selectionManager_stage_mouseUpHandler:function(a){a=w.__cast(a.currentTarget,gd);a.removeEventListener("mouseMove",m(this,this.selectionManager_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.selectionManager_stage_mouseUpHandler));this.stopDragScroll();this._dragEndChar=this._dragStartChar=this._dragStartLine=-1},selectionManager_dragScrollTimer_timerHandler:function(a){a=this._textEditor.get_scrollX()+this._dragScrollDeltaX;a<0?a=0:a>this._textEditor.get_maxScrollX()&&
(a=this._textEditor.get_maxScrollX());this._textEditor.set_scrollX(a);a=this._textEditor.get_lineScrollY()+this._dragScrollDeltaY;a<0?a=0:a>this._textEditor.get_maxLineScrollY()&&(a=this._textEditor.get_maxLineScrollY());this._textEditor.set_lineScrollY(a);this.updateDragSelect()},__class__:xh};var fx=function(a){this._savedAt=0;this._redoStack=[];this._undoStack=[];this._textEditor=a;this._textEditor.addEventListener("keyDown",m(this,this.undoManager_textEditor_keyDownHandler),!1,0,!0);this._textEditor.addEventListener(Jd.TEXT_CHANGE,
m(this,this.undoManager_textEditor_textChangeHandler),!1,10,!0)};t["moonshine.editor.text.managers.UndoManager"]=fx;fx.__name__="moonshine.editor.text.managers.UndoManager";fx.prototype={_undoStack:null,_redoStack:null,_textEditor:null,_savedAt:null,get_edited:function(){return this._savedAt!=this._undoStack.length},save:function(){this._savedAt=this._undoStack.length},clear:function(){this._undoStack.length=0;this._savedAt=this._redoStack.length=0},undo:function(){if(this._undoStack.length!=0){var a=
this._undoStack.pop();this._redoStack.push(a);this._textEditor.dispatchEvent(new Jd(Jd.TEXT_CHANGE,a.undo,Jd.ORIGIN_UNDO))}},redo:function(){if(this._redoStack.length!=0){var a=this._redoStack.pop();this._undoStack.push(a);this._textEditor.dispatchEvent(new Jd(Jd.TEXT_CHANGE,a.redo,Jd.ORIGIN_UNDO))}},isOneLineRemoveOnly:function(a){if(a.length!=1)return!1;a=a[0];return a.get_newText()!=null&&a.get_newText().length!=0||a.get_startLine()!=a.get_endLine()?!1:a.get_startChar()!=a.get_endChar()},isOneLineInsertOnly:function(a){if(a.length!=
1)return!1;a=a[0];return a.get_startLine()==a.get_endLine()&&a.get_startChar()==a.get_endChar()?this.isOneLineOfNotEmptyText(a.get_newText()):!1},isOneLineOfNotEmptyText:function(a){return a==null||a.length==0?!1:!(new Wa("\r?\n|\r","g")).match(a)},collectChanges:function(a){a=a.slice();if(this._undoStack.length>0&&this._undoStack.length!=this._savedAt){var b=this._undoStack[this._undoStack.length-1].redo;if(this.isOneLineInsertOnly(a)&&this.isOneLineInsertOnly(b)){var c=a[0];b=b[0];c.get_startLine()==
b.get_startLine()&&c.get_startChar()==b.get_startChar()+b.get_newText().length&&(c=b.get_newText()+c.get_newText(),a[0]=new Af(b.get_startLine(),b.get_startChar(),b.get_endLine(),b.get_endChar(),c),this._undoStack.pop())}}c=a.slice();c.reverse();b=Array(c.length);for(var d=0,f=c.length;d<f;){var g=d++,h=c[g],n=null,l=1;if(h.get_startLine()!=h.get_endLine()||h.get_startChar()!=h.get_endChar()){n="";for(var q=h.get_startLine(),u=h.get_endLine()+1;q<u;){var v=q++,z=this._textEditor.get_lines().get(v),
r=v==h.get_startLine()?h.get_startChar():0,F=v==h.get_endLine()?h.get_endChar():z.text.length;v>h.get_startLine()&&(n+="\n",++l);n+=z.text.substring(r,F)}}q=h.get_startLine();u=h.get_startChar();v=h.get_endLine();z=h.get_endChar();h=h.get_newText()!=null?(new Wa("\r?\n|\r","g")).split(h.get_newText()):[""];n!=null&&(l==1?z-=n.length:v-=l-h.length);h.length>0&&(v=q+h.length-1,z=h[h.length-1].length,v==q&&(z+=u));b[g]=new Af(q,u,v,z,n)}this._undoStack.length<this._savedAt&&(this._savedAt=-1);this._redoStack.length=
0;this._undoStack.push(new fy(b,a))},undoManager_textEditor_keyDownHandler:function(a){if(a.ctrlKey&&!a.altKey)switch(a.keyCode){case 89:if(a.isDefaultPrevented())break;a.preventDefault();this.redo();break;case 90:a.isDefaultPrevented()||(a.preventDefault(),a.shiftKey?this.redo():this.undo())}},undoManager_textEditor_textChangeHandler:function(a){a.changes!=null&&a.changes.length!=0&&a.origin==Jd.ORIGIN_LOCAL&&this.collectChanges(a.changes)},__class__:fx,__properties__:{get_edited:"get_edited"}};
var fy=function(a,b){this.undo=a;this.redo=b};t["moonshine.editor.text.managers._UndoManager.UndoRedoChanges"]=fy;fy.__name__="moonshine.editor.text.managers._UndoManager.UndoRedoChanges";fy.prototype={undo:null,redo:null,__class__:fy};var jx=function(){};t["moonshine.editor.text.syntax.format.CSSSyntaxFormatBuilder"]=jx;jx.__name__="moonshine.editor.text.syntax.format.CSSSyntaxFormatBuilder";jx.prototype={_colorSettings:null,_fontSettings:null,setColorSettings:function(a){this._colorSettings=a;return this},
setFontSettings:function(a){this._fontSettings=a;return this},build:function(){this._colorSettings==null&&(this._colorSettings=new kj);this._fontSettings==null&&(this._fontSettings=new Jn);var a=new Od,b=this.getTextFormat(this._colorSettings.typeNameColor);a.h[xb.CSS_TEXT]=b;b=this.getTextFormat(this._colorSettings.fieldNameColor);a.h[xb.CSS_PROPERTY]=b;b=this.getTextFormat(this._colorSettings.valueColor);a.h[xb.CSS_VALUE]=b;b=this.getTextFormat(this._colorSettings.colorColor);a.h[xb.CSS_COLOR]=
b;b=this.getTextFormat(this._colorSettings.numberColor);a.h[xb.CSS_NUMBER]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[xb.CSS_MEDIA]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[xb.CSS_BRACEOPEN]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[xb.CSS_BRACECLOSE]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[xb.CSS_COLON1]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[xb.CSS_COLON2]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);
a.h[xb.CSS_COLON3]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[xb.CSS_STRING1]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[xb.CSS_STRING2]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[xb.CSS_STRING3]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[xb.CSS_STRING4]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[xb.CSS_COMMENT1]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[xb.CSS_COMMENT2]=b;b=this.getTextFormat(this._colorSettings.commentColor);
a.h[xb.CSS_COMMENT3]=b;return a},getTextFormat:function(a){a=new ef(this._fontSettings.fontFamily,this._fontSettings.fontSize,a);a.tabStops=this._fontSettings.tabStops;return a},__class__:jx};var kx=function(){};t["moonshine.editor.text.syntax.format.JSSyntaxFormatBuilder"]=kx;kx.__name__="moonshine.editor.text.syntax.format.JSSyntaxFormatBuilder";kx.prototype={_colorSettings:null,_fontSettings:null,setColorSettings:function(a){this._colorSettings=a;return this},setFontSettings:function(a){this._fontSettings=
a;return this},build:function(){this._colorSettings==null&&(this._colorSettings=new kj);this._fontSettings==null&&(this._fontSettings=new Jn);var a=new Od,b=this.getTextFormat(this._colorSettings.invalidColor);a.h[0]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[bd.JS_CODE]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[bd.JS_STRING1]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[bd.JS_STRING2]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[bd.JS_COMMENT]=
b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[bd.JS_MULTILINE_COMMENT]=b;b=this.getTextFormat(this._colorSettings.regExpColor);a.h[bd.JS_REGULAR_EXPRESSION]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[bd.JS_BOOLEAN_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[bd.JS_UNDEFINED_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[bd.JS_NULL_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[bd.JS_KEYWORD]=b;
b=this.getTextFormat(this._colorSettings.fieldKeywordColor);a.h[bd.JS_VAR_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.methodKeywordColor);a.h[bd.JS_FUNCTION_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.typeKeywordColor);a.h[bd.JS_TYPE_KEYWORD]=b;return a},getTextFormat:function(a){a=new ef(this._fontSettings.fontFamily,this._fontSettings.fontSize,a);a.tabStops=this._fontSettings.tabStops;return a},__class__:kx};var ix=function(){};t["moonshine.editor.text.syntax.format.PlainTextFormatBuilder"]=
ix;ix.__name__="moonshine.editor.text.syntax.format.PlainTextFormatBuilder";ix.prototype={_colorSettings:null,_fontSettings:null,setColorSettings:function(a){this._colorSettings=a;return this},setFontSettings:function(a){this._fontSettings=a;return this},build:function(){this._colorSettings==null&&(this._colorSettings=new kj);this._fontSettings==null&&(this._fontSettings=new Jn);var a=new Od,b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[In.TEXT]=b;return a},getTextFormat:function(a){a=
new ef(this._fontSettings.fontFamily,this._fontSettings.fontSize,a);a.tabStops=this._fontSettings.tabStops;return a},__class__:ix};var kj=function(){this.unverifiedBreakpointColor=8684676;this.breakpointColor=15012864;this.searchResultBackgroundColor=11054228;this.debuggerStoppedLineBackgroundColor=16777164;this.focusedLineBackgroundColor=15596539;this.selectionUnfocusedBackgroundAlpha=.5;this.selectionUnfocusedBackgroundColor=11392767;this.selectionBackgroundAlpha=1;this.selectionBackgroundColor=
11392767;this.preprocessorColor=10687765;this.annotationColor=8421376;this.punctuationTagBrackets=8388608;this.tagAttributeNameColor=16711680;this.tagNameColor=8388608;this.typeNameColor=this.languageConstantNameColor=2523033;this.parameterNameColor=4224;this.methodNameColor=7953958;this.fieldNameColor=4224;this.keywordColor=this.fieldKeywordColor=this.methodKeywordColor=this.typeKeywordColor=this.moduleKeywordColor=this.thisSelfKeywordColor=255;this.colorColor=this.valueColor=283045;this.regExpColor=
8462143;this.commentColor=32768;this.numberColor=624216;this.stringColor=10687765;this.invalidColor=13447473;this.foregroundColor=1250067;this.backgroundColor=16777214};t["moonshine.editor.text.syntax.format.SyntaxColorSettings"]=kj;kj.__name__="moonshine.editor.text.syntax.format.SyntaxColorSettings";kj.monokai=function(){var a=new kj;a.backgroundColor=2566178;a.foregroundColor=16316658;a.invalidColor=16009031;a.stringColor=15129460;a.numberColor=11436543;a.commentColor=8946799;a.regExpColor=11436543;
a.colorColor=11436543;a.valueColor=11436543;a.keywordColor=16328306;a.fieldKeywordColor=6740463;a.methodKeywordColor=6740463;a.typeKeywordColor=6740463;a.moduleKeywordColor=16328306;a.thisSelfKeywordColor=16619295;a.fieldNameColor=16316658;a.methodNameColor=10936878;a.parameterNameColor=16619295;a.typeNameColor=6740463;a.languageConstantNameColor=2523033;a.tagNameColor=16328306;a.tagAttributeNameColor=10936878;a.punctuationTagBrackets=16316658;a.annotationColor=11053218;a.preprocessorColor=11053218;
a.selectionBackgroundColor=8883089;a.selectionBackgroundAlpha=.5019607843137255;a.selectionUnfocusedBackgroundColor=8883089;a.selectionUnfocusedBackgroundAlpha=.5019607843137255;a.focusedLineBackgroundColor=3618093;a.debuggerStoppedLineBackgroundColor=6776141;a.searchResultBackgroundColor=5332074;a.breakpointColor=15012864;a.unverifiedBreakpointColor=8684676;return a};kj.defaultDark=function(){var a=new kj;a.backgroundColor=1973790;a.foregroundColor=12303291;a.invalidColor=16009031;a.stringColor=
13537656;a.numberColor=11914920;a.commentColor=6986069;a.regExpColor=6579861;a.colorColor=13537656;a.valueColor=13537656;a.keywordColor=5676246;a.fieldKeywordColor=5676246;a.methodKeywordColor=5676246;a.typeKeywordColor=5676246;a.moduleKeywordColor=5676246;a.thisSelfKeywordColor=5676246;a.fieldNameColor=9230588;a.methodNameColor=14276516;a.parameterNameColor=10280190;a.typeNameColor=5163440;a.languageConstantNameColor=2523033;a.tagNameColor=5676246;a.tagAttributeNameColor=9230588;a.punctuationTagBrackets=
8421504;a.annotationColor=10526784;a.preprocessorColor=8355711;a.selectionBackgroundColor=2510712;a.selectionBackgroundAlpha=1;a.selectionUnfocusedBackgroundColor=2510712;a.selectionUnfocusedBackgroundAlpha=.5;a.focusedLineBackgroundColor=2371632;a.debuggerStoppedLineBackgroundColor=5591104;a.searchResultBackgroundColor=5332074;a.breakpointColor=15012864;a.unverifiedBreakpointColor=8684676;return a};kj.defaultLight=function(){return new kj};kj.prototype={backgroundColor:null,foregroundColor:null,
invalidColor:null,stringColor:null,numberColor:null,commentColor:null,regExpColor:null,colorColor:null,valueColor:null,keywordColor:null,fieldKeywordColor:null,methodKeywordColor:null,typeKeywordColor:null,moduleKeywordColor:null,thisSelfKeywordColor:null,fieldNameColor:null,methodNameColor:null,parameterNameColor:null,typeNameColor:null,languageConstantNameColor:null,tagNameColor:null,tagAttributeNameColor:null,punctuationTagBrackets:null,annotationColor:null,preprocessorColor:null,selectionBackgroundColor:null,
selectionBackgroundAlpha:null,selectionUnfocusedBackgroundColor:null,selectionUnfocusedBackgroundAlpha:null,focusedLineBackgroundColor:null,debuggerStoppedLineBackgroundColor:null,searchResultBackgroundColor:null,breakpointColor:null,unverifiedBreakpointColor:null,__class__:kj};var Jn=function(a,b){b==null&&(b=14);a==null&&(a="_typewriter");for(var c=[],d=0,f=0;f<100;)f++,d+=32,c.push(d);this.tabStops=c;this.fontFamily=a;this.fontSize=b};t["moonshine.editor.text.syntax.format.SyntaxFontSettings"]=
Jn;Jn.__name__="moonshine.editor.text.syntax.format.SyntaxFontSettings";Jn.prototype={fontFamily:null,fontSize:null,tabStops:null,__class__:Jn};var ko=function(){};t["moonshine.editor.text.syntax.parser.ILineParser"]=ko;ko.__name__="moonshine.editor.text.syntax.parser.ILineParser";ko.__isInterface__=!0;ko.prototype={get_defaultContext:null,setContext:null,parse:null,__class__:ko,__properties__:{get_defaultContext:"get_defaultContext"}};var Om=function(){this.context=this._defaultContext=0;qa.call(this)};
t["moonshine.editor.text.syntax.parser.context.ContextSwitchLineParser"]=Om;Om.__name__="moonshine.editor.text.syntax.parser.context.ContextSwitchLineParser";Om.__interfaces__=[ko];Om.__super__=qa;Om.prototype=I(qa.prototype,{switchManager:null,parserManager:null,context:null,_defaultContext:null,get_defaultContext:function(){return this._defaultContext},setContext:function(a){this.context=a},parse:function(a,b,c,d,f){var g=[],h=a,n=0;if(this.switchManager!=null)for(;h.length>0;){var l=null,q=new Wa("^\\s+",
"");if(q.match(h)){q=q.matchedPos();if(q.len==h.length)break;n+=q.len;h=V.substr(a,n,null)}var u=this.context!=0?this.context:this._defaultContext;if(this.parserManager!=null){var v=this.parserManager.getParser(u);v!=null&&(u=v.contextMask)}q=this.switchManager.getSwitches(u);if(q!=null)for(var z=0;z<q.length;){var r=q[z];++z;r.pattern!=null?r.pattern.match(h)&&(u=r.pattern.matchedPos(),l==null||u.pos<l.index)&&(l={swtch:r,index:u.pos,length:u.len}):l={swtch:r,index:0,length:0};if(l!=null&&l.index==
0)break}if(l!=null)h=l.swtch,q=l.index,l=l.length,z=n+q+(h.post?l:0),g.length==0&&z>0&&(g.push(0),g.push(this.context!=0?this.context:this._defaultContext)),this.context=h.to,g.length>0&&g[g.length-1]!=this.context&&(g[g.length-2]==z?g[g.length-1]=this.context:(g.push(z),g.push(this.context))),n+=q+l,h=V.substr(a,n,null);else break}g.length==0&&(g.push(0),g.push(this.context!=0?this.context:this._defaultContext));if(this.parserManager!=null)for(l=g.length-1;l>0;){u=g[l];v=this.parserManager.getParser(u);
if(v!=null){q=g[l-1];z=v.contextMask;r=l<g.length-1?g[l+1]:a.length;h=a.substring(q,r)+"\n";v.parser.setContext(u&~z);h=v.parser.parse(h,b,c,d,f);g.splice(l-1,2);for(u=0;u<h.length;){n=h[u]+q;if(r<0||n<r)v=l-1+u,g.splice(v,0,n),++v,g.splice(v,0,h[u+1]|z);u+=2}this.context=g[g.length-1]}l-=2}return g},__class__:Om,__properties__:{get_defaultContext:"get_defaultContext"}});var xb=function(){Om.call(this);this._defaultContext=this.context=xb.CSS_TEXT;this.switchManager=new gy([new Md([xb.CSS_TEXT],xb.CSS_COMMENT1,
new Wa("/\\*","")),new Md([xb.CSS_COMMENT1],xb.CSS_TEXT,new Wa("\\*/",""),!0),new Md([xb.CSS_PROPERTY],xb.CSS_COMMENT2,new Wa("/\\*","")),new Md([xb.CSS_COMMENT2],xb.CSS_PROPERTY,new Wa("\\*/",""),!0),new Md([xb.CSS_VALUE],xb.CSS_COMMENT3,new Wa("/\\*","")),new Md([xb.CSS_COMMENT3],xb.CSS_VALUE,new Wa("\\*/",""),!0),new Md([xb.CSS_TEXT],xb.CSS_MEDIA,new Wa("@media(?=[;{\\s])",""),!0),new Md([xb.CSS_MEDIA],xb.CSS_TEXT,new Wa("[{\r\n]","")),new Md([xb.CSS_TEXT,xb.CSS_MEDIA],xb.CSS_COLON1,new Wa(";",
"")),new Md([xb.CSS_COLON1],xb.CSS_TEXT),new Md([xb.CSS_TEXT],xb.CSS_BRACEOPEN,new Wa("\\{","")),new Md([xb.CSS_BRACEOPEN],xb.CSS_PROPERTY),new Md([xb.CSS_PROPERTY,xb.CSS_VALUE],xb.CSS_BRACECLOSE,new Wa("\\}","")),new Md([xb.CSS_BRACECLOSE],xb.CSS_TEXT,new Wa("(?=.)","")),new Md([xb.CSS_PROPERTY],xb.CSS_COLON2,new Wa(":","")),new Md([xb.CSS_COLON2],xb.CSS_VALUE),new Md([xb.CSS_VALUE],xb.CSS_PROPERTY,new Wa("[\r\n]","")),new Md([xb.CSS_VALUE],xb.CSS_COLON3,new Wa(";","")),new Md([xb.CSS_COLON3],xb.CSS_PROPERTY),
new Md([xb.CSS_VALUE],xb.CSS_COLOR,new Wa("#[0-9a-fA-F]{3,8}","")),new Md([xb.CSS_COLOR],xb.CSS_VALUE),new Md([xb.CSS_VALUE],xb.CSS_NUMBER,new Wa("\\-?((\\.[0-9]+)|([0-9]+(\\.[0-9]+)?))","")),new Md([xb.CSS_NUMBER],xb.CSS_VALUE),new Md([xb.CSS_TEXT],xb.CSS_STRING1,new Wa('"',"")),new Md([xb.CSS_TEXT],xb.CSS_STRING2,new Wa("'","")),new Md([xb.CSS_STRING1],xb.CSS_STRING1,new Wa('\\\\["\r\n]',"")),new Md([xb.CSS_STRING2],xb.CSS_STRING2,new Wa("\\\\['\r\n]","")),new Md([xb.CSS_STRING1],xb.CSS_TEXT,new Wa('"|(?=[\r\n])',
""),!0),new Md([xb.CSS_STRING2],xb.CSS_TEXT,new Wa("'|(?=[\r\n])",""),!0),new Md([xb.CSS_VALUE],xb.CSS_STRING3,new Wa('"',"")),new Md([xb.CSS_VALUE],xb.CSS_STRING4,new Wa("'","")),new Md([xb.CSS_STRING3],xb.CSS_STRING3,new Wa('\\\\["\r\n]',"")),new Md([xb.CSS_STRING4],xb.CSS_STRING4,new Wa("\\\\['\r\n]","")),new Md([xb.CSS_STRING3],xb.CSS_VALUE,new Wa('"|(?=[\r\n])',""),!0),new Md([xb.CSS_STRING4],xb.CSS_VALUE,new Wa("'|(?=[\r\n])",""),!0)])};t["moonshine.editor.text.syntax.parser.CSSLineParser"]=
xb;xb.__name__="moonshine.editor.text.syntax.parser.CSSLineParser";xb.__super__=Om;xb.prototype=I(Om.prototype,{__class__:xb});var fz=function(a,b){this.contextMask=a;this.parser=b};t["moonshine.editor.text.syntax.parser.InlineParser"]=fz;fz.__name__="moonshine.editor.text.syntax.parser.InlineParser";fz.prototype={contextMask:null,parser:null,__class__:fz};var Pm=function(){this.context=this._defaultContext=1;this.keywordSet=new G;this.caseSensitiveKeywords=!0;qa.call(this)};t["moonshine.editor.text.syntax.parser.LineParser"]=
Pm;Pm.__name__="moonshine.editor.text.syntax.parser.LineParser";Pm.__interfaces__=[ko];Pm.__super__=qa;Pm.prototype=I(qa.prototype,{wordBoundaries:null,patterns:null,endPatterns:null,keywords:null,caseSensitiveKeywords:null,keywordSet:null,context:null,_defaultContext:null,get_defaultContext:function(){return this._defaultContext},result:null,setContext:function(a){this.context=a},parse:function(a,b,c,d,f){this.initializeKeywordSet();this.result=[];if(this.endPatterns!=null)for(b=0,c=this.endPatterns;b<
c.length;)if(d=c[b],++b,d.type==this.context){this.result.push(0);this.result.push(this.context);this.findContextEnd(a,d.expression);break}this.result.length==0&&this.splitOnContext(a);this.context=this.result[this.result.length-1];return this.result},findContextEnd:function(a,b){if(b.match(a)){var c=b.matchedPos();b=c.len;c=c.pos;this.splitOnContext(V.substr(a,c+b,null),c+b)}},initializeKeywordSet:function(){this.keywordSet.h=Object.create(null);if(this.keywords!=null)for(var a=this.keywords.keys();a.hasNext();)for(var b=
a.next(),c=this.keywords.h[b],d=0;d<c.length;){var f=c[d];++d;this.caseSensitiveKeywords||(f=f.toLowerCase());this.keywordSet.h[f]=b}},splitOnContext:function(a,b){b==null&&(b=0);for(var c=0,d=-1,f="";a.length>0;){var g=0;if(this.patterns!=null)for(var h=0,n=this.patterns;h<n.length;){var l=n[h];++h;var q=l.expression;if(q.match(a)){g=q.matched(0).length;d=c;c=l.type;break}}g==0?(g=1,f+=a.charAt(0),d=c,c=this._defaultContext):c!=d&&d==this._defaultContext&&(this.splitOnKeywords(f,b-f.length),f="");
c!=d&&f.length==0&&(this.result.push(b),this.result.push(c));b+=g;a=a.substring(g)}f.length>0&&this.splitOnKeywords(f,b-f.length)},splitOnKeywords:function(a,b){for(var c=0,d=0,f=a.length;;){var g=c,h=f,n=!1;this.wordBoundaries!=null&&(n=this.wordBoundaries.matchSub(a,c));n?(c=this.wordBoundaries.matchedPos(),h=c.pos,c=h+c.len):c=f;var l=a.substring(g,h);this.caseSensitiveKeywords||(l=l.toLowerCase());Object.prototype.hasOwnProperty.call(this.keywordSet.h,l)?d=this.keywordSet.h[l]:(new Wa("^\\s+$",
"m")).match(l)||(d=this._defaultContext);d!=-1&&(this.result.push(b+g),this.result.push(d));d=this._defaultContext;d!=-1&&(this.result.push(b+h),this.result.push(d));if(!n||c>=f)break}},__class__:Pm,__properties__:{get_defaultContext:"get_defaultContext"}});var bd=function(){Pm.call(this);this._defaultContext=this.context=bd.JS_CODE;this.wordBoundaries=new Wa("([\\s,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+)","g");this.patterns=[new uk(bd.JS_STRING1,new Wa('^"(?:\\\\\\\\|\\\\"|[^\n])*?(?:"|\\\\\n|(?=\n))',
"")),new uk(bd.JS_STRING2,new Wa("^'(?:\\\\\\\\|\\\\'|[^\n])*?(?:'|\\\\\n|(?=\n))","")),new uk(bd.JS_COMMENT,new Wa("^//.*","")),new uk(bd.JS_MULTILINE_COMMENT,new Wa("^/\\*.*?(?:\\*/|\n)","")),new uk(bd.JS_REGULAR_EXPRESSION,new Wa("^/(?:\\\\\\\\|\\\\/|\\[(?:\\\\\\\\|\\\\\\]|.)+?\\]|[^*/])(?:\\\\\\\\|\\\\/|\\[(?:\\\\\\\\|\\\\\\]|.)+?\\]|.)*?/[gismx]*",""))];this.endPatterns=[new uk(bd.JS_STRING1,new Wa('(?:^|[^\\\\])("|(?=\n))',"")),new uk(bd.JS_STRING2,new Wa("(?:^|[^\\\\])('|(?=\n))","")),new uk(bd.JS_MULTILINE_COMMENT,
new Wa("\\*/",""))];var a=new Od;a.h[bd.JS_NULL_KEYWORD]=["null"];a.h[bd.JS_UNDEFINED_KEYWORD]=["undefined"];a.h[bd.JS_BOOLEAN_KEYWORD]=["true","false"];a.h[bd.JS_VAR_KEYWORD]=["var","const","let"];a.h[bd.JS_FUNCTION_KEYWORD]=["function"];a.h[bd.JS_TYPE_KEYWORD]=["class"];a.h[bd.JS_KEYWORD]="break case catch continue debugger default delete do else export extends finally for if import in instanceof new return super switch this throw try typeof void while with yield enum implements interface package private protected public static".split(" ");
this.keywords=a};t["moonshine.editor.text.syntax.parser.JSLineParser"]=bd;bd.__name__="moonshine.editor.text.syntax.parser.JSLineParser";bd.__super__=Pm;bd.prototype=I(Pm.prototype,{__class__:bd});var uk=function(a,b){this.type=a;this.expression=b};t["moonshine.editor.text.syntax.parser.LineParserPattern"]=uk;uk.__name__="moonshine.editor.text.syntax.parser.LineParserPattern";uk.prototype={type:null,expression:null,__class__:uk};var In=function(){};t["moonshine.editor.text.syntax.parser.PlainTextLineParser"]=
In;In.__name__="moonshine.editor.text.syntax.parser.PlainTextLineParser";In.__interfaces__=[ko];In.prototype={get_defaultContext:function(){return 0},setContext:function(a){},parse:function(a,b,c,d,f){return[0,0,a.length]},__class__:In,__properties__:{get_defaultContext:"get_defaultContext"}};var Md=function(a,b,c,d){d==null&&(d=!1);this.from=a;this.to=b;this.pattern=c;this.post=d};t["moonshine.editor.text.syntax.parser.context.ContextSwitch"]=Md;Md.__name__="moonshine.editor.text.syntax.parser.context.ContextSwitch";
Md.prototype={from:null,to:null,pattern:null,post:null,__class__:Md};var gy=function(a){this.switches=new Od;for(var b=0;b<a.length;){var c=a[b];++b;this.addSwitch(c)}};t["moonshine.editor.text.syntax.parser.context.ContextSwitchManager"]=gy;gy.__name__="moonshine.editor.text.syntax.parser.context.ContextSwitchManager";gy.prototype={switches:null,addSwitch:function(a,b){b==null&&(b=!1);for(var c=0,d=a.from;c<d.length;){var f=d[c];++c;this.switches.h.hasOwnProperty(f)||(this.switches.h[f]=[]);b?this.switches.h[f].unshift(a):
this.switches.h[f].push(a)}},getSwitches:function(a){return this.switches.h[a]},__class__:gy};var gz=function(a){this.parsers=new Od;for(var b=0;b<a.length;){var c=a[b];++b;this.addParser(c)}};t["moonshine.editor.text.syntax.parser.context.InlineParserManager"]=gz;gz.__name__="moonshine.editor.text.syntax.parser.context.InlineParserManager";gz.prototype={parsers:null,addParser:function(a){this.parsers.h[a.contextMask]=a},getParser:function(a){return this.parsers.h[a&61440]},__class__:gz};var Jy=function(){};
t["moonshine.editor.text.theme.TextEditorStyles"]=Jy;Jy.__name__="moonshine.editor.text.theme.TextEditorStyles";Jy.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}if(a!=null){var c=a.styleProvider;c.getStyleFunction(pi,null)==null&&c.setStyleFunction(pi,null,function(d){var f=a.get_darkMode();d.get_backgroundSkin()==null&&(f=new Za(ub.SolidColor(f?1973790:16777214)),f.set_width(10),f.set_height(10),d.set_backgroundSkin(f))});c.getStyleFunction(Fc,pi.CHILD_VARIANT_LIST_VIEW)==
null&&c.setStyleFunction(Fc,pi.CHILD_VARIANT_LIST_VIEW,function(d){c.getStyleFunction(Fc,null)(d)})}};var ez=function(){};t["moonshine.editor.text.theme.TextLineRendererStyles"]=ez;ez.__name__="moonshine.editor.text.theme.TextLineRendererStyles";ez.initialize=function(a){if(a==null){var b=bc.get_fallbackTheme();a=b instanceof zc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Uh,null)==null&&b.setStyleFunction(Uh,null,function(c){var d=a.get_darkMode();c.set_gutterPaddingLeft(6);c.set_gutterPaddingRight(8);
c.set_gutterGap(2);if(c.get_backgroundSkin()==null){var f=new Za(ub.SolidColor(d?1973790:16777214));f.set_height(16);c.set_backgroundSkin(f)}c.get_focusedBackgroundSkin()==null&&c.set_focusedBackgroundSkin(new Za(ub.SolidColor(d?3026478:15596539)));c.get_debuggerStoppedBackgroundSkin()==null&&c.set_debuggerStoppedBackgroundSkin(new Za(ub.SolidColor(d?5131822:16777164)));c.get_selectedTextBackgroundSkinFactory()==null&&c.set_selectedTextBackgroundSkinFactory(function(){return new Za(ub.SolidColor(d?
5131886:13623799,.85))});c.get_selectedTextUnfocusedBackgroundSkinFactory()==null&&c.set_selectedTextUnfocusedBackgroundSkinFactory(function(){return new Za(ub.SolidColor(d?5131886:13623799,.75))});c.get_gutterBackgroundSkin()==null&&(f=new Za(ub.SolidColor(d?1973790:16777214)),f.set_height(16),c.set_gutterBackgroundSkin(f));c.get_searchResultBackgroundSkinFactory()==null&&c.set_searchResultBackgroundSkinFactory(function(){return new Za(ub.SolidColor(16378290,.75),oc.SolidColor(1,16378290,.95))});
c.get_breakpointSkin()==null&&(f=new xi(ub.SolidColor(15012864)),f.set_width(10),f.set_height(10),c.set_breakpointSkin(f));c.get_unverifiedBreakpointSkin()==null&&(f=new xi(ub.SolidColor(8684676)),f.set_width(10),f.set_height(10),c.set_unverifiedBreakpointSkin(f))}))};var Qi=function(a,b){this.open=a;this.close=b};t["moonshine.editor.text.utils.AutoClosingPair"]=Qi;Qi.__name__="moonshine.editor.text.utils.AutoClosingPair";Qi.prototype={open:null,close:null,__class__:Qi};var Nm=function(){};t["moonshine.editor.text.utils.TextEditorUtil"]=
Nm;Nm.__name__="moonshine.editor.text.utils.TextEditorUtil";Nm.deleteSelection=function(a,b){if(!a.get_hasSelection()&&(b==null||b.length==0))return null;var c=a.get_caretLineIndex(),d=a.get_caretCharIndex(),f=c,g=d;a.get_hasSelection()&&(c=a.get_selectionStartLineIndex(),d=a.get_selectionStartCharIndex(),f=a.get_selectionEndLineIndex(),g=a.get_selectionEndCharIndex(),c>f||c==f&&d>g)&&(c=a.get_selectionEndLineIndex(),d=a.get_selectionEndCharIndex(),f=a.get_selectionStartLineIndex(),g=a.get_selectionStartCharIndex());
return new Af(c,d,f,g,b)};Nm.applyTextChangeToLines=function(a,b){a=a.slice();var c=b.get_startLine(),d=b.get_startChar(),f=b.get_endLine(),g=b.get_endChar(),h=b.get_newText();b=null;h!=null&&h.length>0&&(b=(new Wa("\r?\n|\r","g")).split(h));d=a[c].substring(0,d);g=a[f].substring(g);c!=f&&a.splice(c+1,f-c);if(b==null)a[c]=d+g;else for(f=0,h=b.length;f<h;){var n=f++,l="";n==0&&(l=d);l+=b[n];n==b.length-1&&(l+=g);a[c+n]=l}return a};var Kd=function(){};t["moonshine.editor.text.utils.TextUtil"]=Kd;Kd.__name__=
"moonshine.editor.text.utils.TextUtil";Kd.isWordCharacter=function(a,b){if(a.length!=1)throw new Cb("Length of character must be 1");b==null&&(b=Kd.DEFAULT_NON_WORD_CHARACTERS);return b.indexOf(a)==-1};Kd.startOfWord=function(a,b,c){c==null&&(c=Kd.DEFAULT_NON_WORD_CHARACTERS);for(var d=b;d>=0;){var f=a.charAt(d);if(c.indexOf(f)!=-1)return d==b?d:d+1;--d}return 0};Kd.endOfWord=function(a,b,c){c==null&&(c=Kd.DEFAULT_NON_WORD_CHARACTERS);for(var d=b,f=a.length;d<f;){var g=d++,h=a.charAt(g);if(c.indexOf(h)!=
-1)return g==b?g+1:g}return a.length};Kd.wordBoundaryForward=function(a){return a.length-a.replace(RegExp("^(?:\\s+|[^\\s,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*|[,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*)",""),"").length};Kd.wordBoundaryBackward=function(a){return a.length-a.replace(RegExp("(?:\\s+|[^\\s,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*|[,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*)$",""),"").length};Kd.indentAmount=function(a){a=a.length-a.replace(RegExp("^\t+",""),"").length;return a>0?a:0};Kd.indentAmountBySpaceAndTab=
function(a){var b=RegExp("^(\\s+).*$",""),c=a.replace(b,"$1"),d=c.length;b=RegExp("[ ]","g");a=d-c.replace(b,"").length;d=c.length;b=RegExp("\t","g");b=d-c.replace(b,"").length;return{space:a,tab:b}};Kd.repeatStr=function(a,b){var c=[];c.length=b+1;return c.join(a)};Kd.charIdx2LineCharIdx=function(a,b,c){var d=V.substr(a,0,b).split(c).length-1;a=d>0?b-a.lastIndexOf(c,b-1)-c.length:b;return new Hn(d,a)};Kd.lineCharIdx2charIdx=function(a,b,c,d){return a.split(d).slice(0,b).join("").length+b*d.length+
c};Kd.getFirstIndentAtStartOfLine=function(a,b,c){c==null&&(c=!1);var d=a.charAt(0);if(d=="\t")return d;if(d==" "){for(var f=1;f<b;){var g=f++;g=a.charAt(g);if(g=="\t"){d+=g;break}if(g!=" "){if(c)break;return""}d+=g}return d}return""};Kd.getIndentAtStartOfLine=function(a,b,c){c==null&&(c=!1);for(var d="",f="",g=0,h=a.length;g<h;){var n=g++;n=a.charAt(n);if(n=="\t")f.length>0&&(d+=f,f=""),d+=n;else if(n==" ")f+=n,f.length==b&&(d+=f,f="");else break}c&&f.length>0&&(d+=f);return d};Kd.getIndentCountAtStartOfLine=
function(a,b,c){c==null&&(c=!1);for(var d=0,f=0,g=0,h=a.length;g<h;){var n=g++;n=a.charAt(n);if(n=="\t")++d,f=0;else if(n==" ")++f,f==b&&(++d,f=0);else break}c&&f>0&&++d;return d};var Qe=function(){};t["motion.easing.IEasing"]=Qe;Qe.__name__="motion.easing.IEasing";Qe.__isInterface__=!0;Qe.prototype={calculate:null,ease:null,__class__:Qe};var mu=function(){};t["motion.easing._Expo.ExpoEaseIn"]=mu;mu.__name__="motion.easing._Expo.ExpoEaseIn";mu.__interfaces__=[Qe];mu.prototype={calculate:function(a){return a==
0?0:Math.exp(6.931471805599453*(a-1))},ease:function(a,b,c,d){return a==0?b:c*Math.exp(6.931471805599453*(a/d-1))+b},__class__:mu};var nu=function(){};t["motion.easing._Expo.ExpoEaseInOut"]=nu;nu.__name__="motion.easing._Expo.ExpoEaseInOut";nu.__interfaces__=[Qe];nu.prototype={calculate:function(a){return a==0?0:a==1?1:(a/=.5)<1?.5*Math.exp(6.931471805599453*(a-1)):.5*(2-Math.exp(-6.931471805599453*--a))},ease:function(a,b,c,d){return a==0?b:a==d?b+c:(a/=d/2)<1?c/2*Math.exp(6.931471805599453*(a-1))+
b:c/2*(2-Math.exp(-6.931471805599453*--a))+b},__class__:nu};var ou=function(){};t["motion.easing._Expo.ExpoEaseOut"]=ou;ou.__name__="motion.easing._Expo.ExpoEaseOut";ou.__interfaces__=[Qe];ou.prototype={calculate:function(a){return a==1?1:1-Math.exp(-6.931471805599453*a)},ease:function(a,b,c,d){return a==d?b+c:c*(1-Math.exp(-6.931471805599453*a/d))+b},__class__:ou};var jk=function(){};t["motion.easing.Expo"]=jk;jk.__name__="motion.easing.Expo";var Ca=function(){};t["motion.Actuate"]=Ca;Ca.__name__=
"motion.Actuate";Ca.apply=function(a,b,c){Ca.stop(a,b);c==null&&(c=Ca.defaultActuator);a=ab.createInstance(c,[a,0,b]);a.apply();return a};Ca.effects=function(a,b,c){c==null&&(c=!0);return new hy(a,b,c)};Ca.getLibrary=function(a,b){b==null&&(b=!0);Ca.targetLibraries.h.__keys__[a.__id__]==null&&b&&Ca.targetLibraries.set(a,[]);return Ca.targetLibraries.h[a.__id__]};Ca.isActive=function(){for(var a=!1,b=Ca.targetLibraries.iterator();b.hasNext();){b.next();a=!0;break}return a};Ca.motionPath=function(a,
b,c,d){d==null&&(d=!0);return Ca.tween(a,b,c,d,pu)};Ca.pause=function(a){if(w.__implements(a,bl))a.pause();else{var b=Ca.getLibrary(a,!1);if(b!=null)for(var c=0;c<b.length;)a=b[c],++c,a.pause()}};Ca.pauseAll=function(){for(var a=Ca.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=0;c<b.length;){var d=b[c];++c;d.pause()}};Ca.reset=function(){for(var a=Ca.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=b.length-1;c>=0;)b[c].stop(null,!1,!1),--c;Ca.targetLibraries=new Ta};Ca.resume=
function(a){if(w.__implements(a,bl))a.resume();else{var b=Ca.getLibrary(a,!1);if(b!=null)for(var c=0;c<b.length;)a=b[c],++c,a.resume()}};Ca.resumeAll=function(){for(var a=Ca.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=0;c<b.length;){var d=b[c];++c;d.resume()}};Ca.stop=function(a,b,c,d){d==null&&(d=!0);c==null&&(c=!1);if(a!=null)if(w.__implements(a,bl))a.stop(null,c,d);else if(a=Ca.getLibrary(a,!1),a!=null){if(typeof b=="string"){var f={};f[b]=null;b=f}else if(b instanceof Array){f=
{};var g=0;for(b=w.__cast(b,Array);g<b.length;){var h=b[g];++g;f[h]=null}b=f}for(f=a.length-1;f>=0;)a[f].stop(b,c,d),--f}};Ca.timer=function(a,b){return Ca.tween(new qu(0),a,new qu(1),!1,b)};Ca.transform=function(a,b,c){c==null&&(c=!0);b==null&&(b=0);return new iy(a,b,c)};Ca.tween=function(a,b,c,d,f){d==null&&(d=!0);if(a!=null){if(b>0){f==null&&(f=Ca.defaultActuator);a=ab.createInstance(f,[a,b,c]);b=Ca.getLibrary(a.target);if(d){for(d=b.length-1;d>=0;)b[d].stop(a.properties,!1,!1),--d;b=Ca.getLibrary(a.target)}b.push(a);
a.move();return a}return Ca.apply(a,c,f)}return null};Ca.unload=function(a){var b=a.target;Ca.targetLibraries.h.__keys__[b.__id__]!=null&&(V.remove(Ca.targetLibraries.h[b.__id__],a),Ca.targetLibraries.h[b.__id__].length==0&&Ca.targetLibraries.remove(b))};Ca.update=function(a,b,c,d,f){f==null&&(f=!0);return Ca.tween(a,b,{start:c,end:d},f,Im)};var hy=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};t["motion._Actuate.EffectsOptions"]=hy;hy.__name__="motion._Actuate.EffectsOptions";hy.prototype=
{duration:null,overwrite:null,target:null,filter:function(a,b){b.filter=a;return Ca.tween(this.target,this.duration,b,this.overwrite,ru)},__class__:hy};var iy=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};t["motion._Actuate.TransformOptions"]=iy;iy.__name__="motion._Actuate.TransformOptions";iy.prototype={duration:null,overwrite:null,target:null,color:function(a,b,c){b==null&&(b=1);a==null&&(a=0);a={colorValue:a,colorStrength:b};c!=null&&(a.colorAlpha=c);return Ca.tween(this.target,
this.duration,a,this.overwrite,jq)},sound:function(a,b){var c={};a!=null&&(c.soundVolume=a);b!=null&&(c.soundPan=b);return Ca.tween(this.target,this.duration,c,this.overwrite,jq)},__class__:iy};var qu=function(a){this.progress=a};t["motion._Actuate.TweenTimer"]=qu;qu.__name__="motion._Actuate.TweenTimer";qu.prototype={progress:null,__class__:qu};var hz=function(){this._x=new fl;this._y=new fl;this._rotation=null};t["motion.MotionPath"]=hz;hz.__name__="motion.MotionPath";hz.prototype={_rotation:null,
_x:null,_y:null,bezier:function(a,b,c,d,f){f==null&&(f=1);return this.bezierN(a,b,[c],[d],f)},bezierN:function(a,b,c,d,f){f==null&&(f=1);this._x.addPath(new lo(a,c,f));this._y.addPath(new lo(b,d,f));return this},bezierSpline:function(a,b,c){c==null&&(c=1);this._x.addPath(new kq(a,c));this._y.addPath(new kq(b,c));return this},line:function(a,b,c){c==null&&(c=1);return this.bezierN(a,b,[],[],c)},get_rotation:function(){this._rotation==null&&(this._rotation=new su(this._x,this._y));return this._rotation},
get_x:function(){return this._x},get_y:function(){return this._y},__class__:hz,__properties__:{get_y:"get_y",get_x:"get_x",get_rotation:"get_rotation"}};var gl=function(){};t["motion.IComponentPath"]=gl;gl.__name__="motion.IComponentPath";gl.__isInterface__=!0;gl.prototype={get_start:null,set_start:null,get_end:null,end:null,strength:null,calculate:null,__class__:gl,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var fl=function(){this.paths=[];this.strength=0};t["motion._MotionPath.ComponentPath"]=
fl;fl.__name__="motion._MotionPath.ComponentPath";fl.__interfaces__=[gl];fl.prototype={strength:null,paths:null,addPath:function(a){this.paths.length>0&&a.set_start(this.paths[this.paths.length-1].get_end());this.paths.push(a);this.strength+=a.strength},calculate:function(a){if(this.paths.length==1)return this.paths[0].calculate(a);a*=this.strength;for(var b=0,c=this.paths;b<c.length;){var d=c[b];++b;if(a-d.strength>1E-7)a-=d.strength;else return d.calculate(a/d.strength)}return 0},get_start:function(){return this.paths.length>
0?this.paths[0].get_start():0},set_start:function(a){return this.paths.length>0?this.paths[0].set_start(a):0},get_end:function(){return this.paths.length>0?this.paths[this.paths.length-1].get_end():this.get_start()},__class__:fl,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var lo=function(a,b,c){this._end=a;this.control=b;this.strength=c};t["motion._MotionPath.BezierPath"]=lo;lo.__name__="motion._MotionPath.BezierPath";lo.__interfaces__=[gl];lo.prototype={control:null,
end:null,strength:null,_start:null,_end:null,calculate:function(a){var b=1-a;switch(this.control.length){case 0:return b*this._start+a*this._end;case 1:return b*b*this._start+2*b*a*this.control[0]+a*a*this._end;case 2:return b*b*b*this._start+3*b*b*a*this.control[0]+3*b*a*a*this.control[1]+a*a*a*this._end;default:if(b<1E-7)return this._end;a/=b;var c=this.control.length+1;b=Math.pow(b,c);for(var d=b*this._start,f=1;f<c;){var g=f++;b*=a*(c+1-g)/g;d+=b*this.control[g-1]}return d+a/c*b*this._end}},get_start:function(){return this._start},
set_start:function(a){return this._start=a},get_end:function(){return this._end},__class__:lo,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var kq=function(a,b){fl.call(this);this.through=a;this.strength=b};t["motion._MotionPath.BezierSplinePath"]=kq;kq.__name__="motion._MotionPath.BezierSplinePath";kq.__super__=fl;kq.prototype=I(fl.prototype,{through:null,computeControlPoints:function(a){a=[a].concat(this.through);for(var b=a.length,c=[],d=0;d<b;)d++,c.push([0,0]);
var f=c,g=[],h=[],n=[],l=[];g[0]=0;h[0]=2;n[0]=1;l[0]=a[0]+2*a[1];c=1;for(d=b-1;c<d;){var q=c++;g[q]=1;h[q]=4;n[q]=1;l[q]=4*a[q]+2*a[q+1]}g[b-1]=1;h[b-1]=2;n[b-1]=0;l[b-1]=3*a[b-1];c=1;for(d=b;c<d;){q=c++;var u=g[q]/h[q-1];h[q]-=u*n[q-1];l[q]-=u*l[q-1]}f[b-1][0]=l[b-1]/h[b-1];for(q=b-2;q>=0;)f[q][0]=(l[q]-n[q]*f[q+1][0])/h[q],--q;c=0;for(d=b-1;c<d;)q=c++,f[q][1]=2*a[q+1]-f[q+1][0];f[b-1][1]=.5*(a[b]+f[b-1][0]);f.pop();return f},set_start:function(a){if(this.paths.length==0||Math.abs(a-this.get_start())>
1E-7){var b=this.computeControlPoints(a),c=this.strength/b.length;this.strength=0;this.paths.splice(0,this.paths.length);for(var d=0,f=b.length;d<f;){var g=d++;this.addPath(new lo(this.through[g],b[g],c))}}return fl.prototype.set_start.call(this,a)},get_end:function(){return this.through[this.through.length-1]},__class__:kq});var su=function(a,b){this.step=.01;this._x=a;this._y=b;this.offset=0;this.set_start(this.calculate(0))};t["motion._MotionPath.RotationPath"]=su;su.__name__="motion._MotionPath.RotationPath";
su.__interfaces__=[gl];su.prototype={offset:null,strength:null,_start:null,step:null,_x:null,_y:null,calculate:function(a){var b=this._x.calculate(a)-this._x.calculate(a+this.step);a=this._y.calculate(a)-this._y.calculate(a+this.step);b=180/Math.PI*Math.atan2(a,b);return b=(b+this.offset)%360},get_start:function(){return this._start},set_start:function(a){return this._start},get_end:function(){return this.calculate(1)},__class__:su,__properties__:{set_start:"set_start",get_start:"get_start",get_end:"get_end"}};
var ru=function(a,b,c){this.filterIndex=-1;Td.call(this,a,b,c);if(w.__instanceof(c.filter,kw))for(this.filterClass=c.filter,a.get_filters().length==0&&a.set_filters([ab.createInstance(this.filterClass,[])]),b=0,a=a.get_filters();b<a.length;)c=a[b],++b,w.__instanceof(c,this.filterClass)&&(this.filter=c);else this.filterIndex=c.filter,this.filter=a.get_filters()[this.filterIndex]};t["motion.actuators.FilterActuator"]=ru;ru.__name__="motion.actuators.FilterActuator";ru.__super__=Td;ru.prototype=I(Td.prototype,
{filter:null,filterClass:null,filterIndex:null,apply:function(){for(var a=0,b=y.fields(this.properties);a<b.length;){var c=b[a];++a;c!="filter"&&y.setProperty(this.filter,c,y.field(this.properties,c))}this.setFilter()},initialize:function(){for(var a,b,c=0,d=y.fields(this.properties);c<d.length;)a=d[c],++c,a!="filter"&&(b=this.filter,b=Object.prototype.hasOwnProperty.call(b,a)?y.field(b,a):y.getProperty(b,a),a=new Sj(this.filter,a,b,y.field(this.properties,a)-b,Object.prototype.hasOwnProperty.call(this.filter,
"set_"+a)),this.propertyDetails.push(a));this.detailsLength=this.propertyDetails.length;this.initialized=!0},setFilter:function(){var a=this.target.get_filters();if(this.filterIndex>-1)a[this.filterIndex]=this.filter;else for(var b=0,c=a.length;b<c;){var d=b++;w.__instanceof(a[d],this.filterClass)&&(a[d]=this.filter)}b=this.target;!Object.prototype.hasOwnProperty.call(b,"filters")||b.__properties__&&b.__properties__.set_filters?y.setProperty(b,"filters",a):b.filters=a},update:function(a){Td.prototype.update.call(this,
a);this.setFilter()},__class__:ru});var pu=function(a,b,c){Td.call(this,a,b,c)};t["motion.actuators.MotionPathActuator"]=pu;pu.__name__="motion.actuators.MotionPathActuator";pu.__super__=Td;pu.prototype=I(Td.prototype,{apply:function(){for(var a=0,b=y.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,c)?this.target[c]=w.__cast(y.field(this.properties,c),gl).get_end():y.setProperty(this.target,c,w.__cast(y.field(this.properties,c),gl).get_end())}},
initialize:function(){for(var a,b=0,c=y.fields(this.properties);b<c.length;){var d=c[b];++b;a=w.__cast(y.field(this.properties,d),gl);if(a!=null){var f=!0;Object.prototype.hasOwnProperty.call(this.target,d)?a.set_start(y.field(this.target,d)):(f=!1,a.set_start(y.getProperty(this.target,d)));a=new vk(this.target,d,a,f);this.propertyDetails.push(a)}}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=
1);this.initialized||this.initialize();if(this.special){var c=this._reverse?this._ease.calculate(1-b):this._ease.calculate(b);f=0;for(g=this.propertyDetails;f<g.length;){var d=g[f];++f;this._snapping?d.isField?d.target[d.propertyName]=Math.round(w.__cast(d,vk).path.calculate(c)):y.setProperty(d.target,d.propertyName,Math.round(w.__cast(d,vk).path.calculate(c))):d.isField?d.target[d.propertyName]=w.__cast(d,vk).path.calculate(c):y.setProperty(d.target,d.propertyName,w.__cast(d,vk).path.calculate(c))}}else{c=
this._ease.calculate(b);for(var f=0,g=this.propertyDetails;f<g.length;)d=g[f],++f,d.isField?d.target[d.propertyName]=w.__cast(d,vk).path.calculate(c):y.setProperty(d.target,d.propertyName,w.__cast(d,vk).path.calculate(c))}if(b==1){if(this._repeat==0){this.active=!1;this.toggleVisible?(a=this.target,d=Object.prototype.hasOwnProperty.call(a,"alpha")?y.field(a,"alpha"):y.getProperty(a,"alpha"),a=d==0):a=!1;a&&(a=this.target,d=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?
y.setProperty(a,"visible",d):a.visible=d);this.complete(!0);return}this._onRepeat!=null&&(d=this._onRepeat,c=this._onRepeatParams,c==null&&(c=[]),d.apply(d,c));this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;this._repeat>0&&this._repeat--}this.sendChange&&this.change()}},__class__:pu});var Sj=function(a,b,c,d,f){f==null&&(f=!0);this.target=a;this.propertyName=b;this.start=c;this.change=d;this.isField=f};t["motion.actuators.PropertyDetails"]=
Sj;Sj.__name__="motion.actuators.PropertyDetails";Sj.prototype={change:null,isField:null,propertyName:null,start:null,target:null,__class__:Sj};var vk=function(a,b,c,d){d==null&&(d=!0);Sj.call(this,a,b,0,0,d);this.path=c};t["motion.actuators.PropertyPathDetails"]=vk;vk.__name__="motion.actuators.PropertyPathDetails";vk.__super__=Sj;vk.prototype=I(Sj.prototype,{path:null,__class__:vk});var jq=function(a,b,c){Td.call(this,a,b,c)};t["motion.actuators.TransformActuator"]=jq;jq.__name__="motion.actuators.TransformActuator";
jq.__super__=Td;jq.prototype=I(Td.prototype,{endColorTransform:null,endSoundTransform:null,tweenColorTransform:null,tweenSoundTransform:null,apply:function(){this.initialize();if(this.endColorTransform!=null){var a=this.target,b;a=b=Object.prototype.hasOwnProperty.call(a,"transform")?y.field(a,"transform"):y.getProperty(a,"transform");b=this.endColorTransform;!Object.prototype.hasOwnProperty.call(a,"colorTransform")||a.__properties__&&a.__properties__.set_colorTransform?y.setProperty(a,"colorTransform",
b):a.colorTransform=b}this.endSoundTransform!=null&&(a=this.target,b=this.endSoundTransform,!Object.prototype.hasOwnProperty.call(a,"soundTransform")||a.__properties__&&a.__properties__.set_soundTransform?y.setProperty(a,"soundTransform",b):a.soundTransform=b)},initialize:function(){Object.prototype.hasOwnProperty.call(this.properties,"colorValue")&&this.target instanceof ma&&this.initializeColor();(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")||Object.prototype.hasOwnProperty.call(this.properties,
"soundPan"))&&this.initializeSound();this.detailsLength=this.propertyDetails.length;this.initialized=!0},initializeColor:function(){this.endColorTransform=new wc;var a=this.properties.colorValue,b=this.properties.colorStrength;if(b<1){if(b<.5){var c=1;b*=2}else c=1-(b-.5)*2,b=1;this.endColorTransform.redMultiplier=c;this.endColorTransform.greenMultiplier=c;this.endColorTransform.blueMultiplier=c;this.endColorTransform.redOffset=b*(a>>16&255);this.endColorTransform.greenOffset=b*(a>>8&255);this.endColorTransform.blueOffset=
b*(a&255)}else this.endColorTransform.redMultiplier=0,this.endColorTransform.greenMultiplier=0,this.endColorTransform.blueMultiplier=0,this.endColorTransform.redOffset=a>>16&255,this.endColorTransform.greenOffset=a>>8&255,this.endColorTransform.blueOffset=a&255;a="redMultiplier greenMultiplier blueMultiplier redOffset greenOffset blueOffset".split(" ");if(Object.prototype.hasOwnProperty.call(this.properties,"colorAlpha"))this.endColorTransform.alphaMultiplier=this.properties.colorAlpha,a.push("alphaMultiplier");
else{var d=this.target;var f=Object.prototype.hasOwnProperty.call(d,"alpha")?y.field(d,"alpha"):y.getProperty(d,"alpha");this.endColorTransform.alphaMultiplier=f}d=this.target;c=f=Object.prototype.hasOwnProperty.call(d,"transform")?y.field(d,"transform"):y.getProperty(d,"transform");c=f=Object.prototype.hasOwnProperty.call(c,"colorTransform")?y.field(c,"colorTransform"):y.getProperty(c,"colorTransform");this.tweenColorTransform=new wc;for(b=0;b<a.length;){var g=a[b];++b;f=Object.prototype.hasOwnProperty.call(c,
g)?y.field(c,g):y.getProperty(c,g);var h=this.tweenColorTransform;d=this.endColorTransform;d=Object.prototype.hasOwnProperty.call(d,g)?y.field(d,g):y.getProperty(d,g);g=new Sj(h,g,f,d-f);this.propertyDetails.push(g)}},initializeSound:function(){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?y.field(a,"soundTransform"):y.getProperty(a,"soundTransform");b==null&&(a=this.target,b=new ki,!Object.prototype.hasOwnProperty.call(a,"soundTransform")||a.__properties__&&a.__properties__.set_soundTransform?
y.setProperty(a,"soundTransform",b):a.soundTransform=b);a=this.target;var c=b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?y.field(a,"soundTransform"):y.getProperty(a,"soundTransform");a=this.target;this.endSoundTransform=b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?y.field(a,"soundTransform"):y.getProperty(a,"soundTransform");this.tweenSoundTransform=new ki;Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")&&(this.endSoundTransform.volume=this.properties.soundVolume,
this.propertyDetails.push(new Sj(this.tweenSoundTransform,"volume",c.volume,this.endSoundTransform.volume-c.volume)));Object.prototype.hasOwnProperty.call(this.properties,"soundPan")&&(this.endSoundTransform.pan=this.properties.soundPan,this.propertyDetails.push(new Sj(this.tweenSoundTransform,"pan",c.pan,this.endSoundTransform.pan-c.pan)))},update:function(a){Td.prototype.update.call(this,a);if(this.endColorTransform!=null){var b=this.target;b=a=Object.prototype.hasOwnProperty.call(b,"transform")?
y.field(b,"transform"):y.getProperty(b,"transform");a=this.tweenColorTransform;!Object.prototype.hasOwnProperty.call(b,"colorTransform")||b.__properties__&&b.__properties__.set_colorTransform?y.setProperty(b,"colorTransform",a):b.colorTransform=a}this.endSoundTransform!=null&&(b=this.target,a=this.tweenSoundTransform,!Object.prototype.hasOwnProperty.call(b,"soundTransform")||b.__properties__&&b.__properties__.set_soundTransform?y.setProperty(b,"soundTransform",a):b.soundTransform=a)},__class__:jq});
var lq=function(){};t["motion.easing._Bounce.BounceEaseIn"]=lq;lq.__name__="motion.easing._Bounce.BounceEaseIn";lq.__interfaces__=[Qe];lq._ease=function(a,b,c,d){a=d-a;return c-((a/=d)<.36363636363636365?7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375))+b};lq.prototype={calculate:function(a){a=1-a;return 1-((a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*
(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375)},ease:function(a,b,c,d){a=d-a;return c-((a/=d)<.36363636363636365?7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375))+b},__class__:lq};var tu=function(){};t["motion.easing._Bounce.BounceEaseInOut"]=tu;tu.__name__="motion.easing._Bounce.BounceEaseInOut";
tu.__interfaces__=[Qe];tu.prototype={calculate:function(a){if(a<.5)return a=1-a*2,(1-((a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375))*.5;a=a*2-1;return((a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375)*.5+.5},ease:function(a,
b,c,d){if(a<d/2)return a=d-a*2,(c-((a/=d)<.36363636363636365?7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375)))*.5+b;a=a*2-d;return((a/=d)<.36363636363636365?7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375))*.5+c*.5+b},__class__:tu};var mq=function(){};
t["motion.easing._Bounce.BounceEaseOut"]=mq;mq.__name__="motion.easing._Bounce.BounceEaseOut";mq.__interfaces__=[Qe];mq._ease=function(a,b,c,d){return(a/=d)<.36363636363636365?7.5625*a*a*c+b:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75)+b:a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375)+b:c*(7.5625*(a-=.9545454545454546)*a+.984375)+b};mq.prototype={calculate:function(a){return(a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<
.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375},ease:function(a,b,c,d){return(a/=d)<.36363636363636365?7.5625*a*a*c+b:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75)+b:a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375)+b:c*(7.5625*(a-=.9545454545454546)*a+.984375)+b},__class__:mq};var Qk=function(){};t["motion.easing.Bounce"]=Qk;Qk.__name__="motion.easing.Bounce";var uu=function(){};t["motion.easing._Cubic.CubicEaseIn"]=uu;uu.__name__=
"motion.easing._Cubic.CubicEaseIn";uu.__interfaces__=[Qe];uu.prototype={calculate:function(a){return a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a+b},__class__:uu};var vu=function(){};t["motion.easing._Cubic.CubicEaseInOut"]=vu;vu.__name__="motion.easing._Cubic.CubicEaseInOut";vu.__interfaces__=[Qe];vu.prototype={calculate:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},ease:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},__class__:vu};var wu=function(){};t["motion.easing._Cubic.CubicEaseOut"]=
wu;wu.__name__="motion.easing._Cubic.CubicEaseOut";wu.__interfaces__=[Qe];wu.prototype={calculate:function(a){return--a*a*a+1},ease:function(a,b,c,d){a=a/d-1;return c*(a*a*a+1)+b},__class__:wu};var Rk=function(){};t["motion.easing.Cubic"]=Rk;Rk.__name__="motion.easing.Cubic";var nq=function(a,b){this.a=a;this.p=b};t["motion.easing._Elastic.ElasticEaseIn"]=nq;nq.__name__="motion.easing._Elastic.ElasticEaseIn";nq.__interfaces__=[Qe];nq.prototype={a:null,p:null,calculate:function(a){if(a==0)return 0;
if(a==1)return 1;if(this.a<1){this.a=1;var b=this.p/4}else b=this.p/(2*Math.PI)*Math.asin(1/this.a);return-(this.a*Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a-b)/this.p))},ease:function(a,b,c,d){if(a==0)return b;if((a/=d)==1)return b+c;this.a<Math.abs(c)?(this.a=c,c=this.p/4):c=this.p/(2*Math.PI)*Math.asin(c/this.a);return-(this.a*Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a*d-c)/this.p))+b},__class__:nq};var oq=function(a,b){this.a=a;this.p=b};t["motion.easing._Elastic.ElasticEaseInOut"]=
oq;oq.__name__="motion.easing._Elastic.ElasticEaseInOut";oq.__interfaces__=[Qe];oq.prototype={a:null,p:null,calculate:function(a){return a==0?0:(a/=.5)==2?1:a<1?-.5*(Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a-.11249999999999999)/.44999999999999996)):Math.exp(-6.931471805599453*--a)*Math.sin(2*Math.PI*(a-.11249999999999999)/.44999999999999996)*.5+1},ease:function(a,b,c,d){if(a==0)return b;if((a/=d/2)==2)return b+c;if(this.a<Math.abs(c)){this.a=c;var f=this.p/4}else f=this.p/(2*Math.PI)*
Math.asin(c/this.a);return a<1?-.5*(this.a*Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a*d-f)/this.p))+b:this.a*Math.exp(-6.931471805599453*--a)*Math.sin(2*Math.PI*(a*d-f)/this.p)*.5+c+b},__class__:oq};var pq=function(a,b){this.a=a;this.p=b};t["motion.easing._Elastic.ElasticEaseOut"]=pq;pq.__name__="motion.easing._Elastic.ElasticEaseOut";pq.__interfaces__=[Qe];pq.prototype={a:null,p:null,calculate:function(a){if(a==0)return 0;if(a==1)return 1;if(this.a<1){this.a=1;var b=this.p/4}else b=this.p/
(2*Math.PI)*Math.asin(1/this.a);return this.a*Math.exp(-6.931471805599453*a)*Math.sin(2*Math.PI*(a-b)/this.p)+1},ease:function(a,b,c,d){if(a==0)return b;if((a/=d)==1)return b+c;if(this.a<Math.abs(c)){this.a=c;var f=this.p/4}else f=this.p/(2*Math.PI)*Math.asin(c/this.a);return this.a*Math.exp(-6.931471805599453*a)*Math.sin(2*Math.PI*(a*d-f)/this.p)+c+b},__class__:pq};var hj=function(){};t["motion.easing.Elastic"]=hj;hj.__name__="motion.easing.Elastic";hj.easeInWith=function(a,b){return new nq(a,b)};
hj.easeInOutWith=function(a,b){return new oq(a,b)};hj.easeOutWith=function(a,b){return new pq(a,b)};var xn=function(){};t["motion.easing.Linear"]=xn;xn.__name__="motion.easing.Linear";xn.__properties__={get_easeNone:"get_easeNone"};xn.get_easeNone=function(){return new xu};var xu=function(){};t["motion.easing.LinearEaseNone"]=xu;xu.__name__="motion.easing.LinearEaseNone";xu.__interfaces__=[Qe];xu.prototype={calculate:function(a){return a},ease:function(a,b,c,d){return c*a/d+b},__class__:xu};var yu=
function(){};t["motion.easing._Quad.QuadEaseIn"]=yu;yu.__name__="motion.easing._Quad.QuadEaseIn";yu.__interfaces__=[Qe];yu.prototype={calculate:function(a){return a*a},ease:function(a,b,c,d){return c*(a/=d)*a+b},__class__:yu};var zu=function(){};t["motion.easing._Quad.QuadEaseInOut"]=zu;zu.__name__="motion.easing._Quad.QuadEaseInOut";zu.__interfaces__=[Qe];zu.prototype={calculate:function(a){return(a*=2)<1?.5*a*a:-.5*((a-1)*(a-3)-1)},ease:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*((a-1)*(a-
3)-1)+b},__class__:zu};var Au=function(){};t["motion.easing._Quad.QuadEaseOut"]=Au;Au.__name__="motion.easing._Quad.QuadEaseOut";Au.__interfaces__=[Qe];Au.prototype={calculate:function(a){return-a*(a-2)},ease:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},__class__:Au};var Ni=function(){};t["motion.easing.Quad"]=Ni;Ni.__name__="motion.easing.Quad";var Bu=function(){};t["motion.easing._Quart.QuartEaseIn"]=Bu;Bu.__name__="motion.easing._Quart.QuartEaseIn";Bu.__interfaces__=[Qe];Bu.prototype={calculate:function(a){return a*
a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a*a+b},__class__:Bu};var Cu=function(){};t["motion.easing._Quart.QuartEaseInOut"]=Cu;Cu.__name__="motion.easing._Quart.QuartEaseInOut";Cu.__interfaces__=[Qe];Cu.prototype={calculate:function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},ease:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},__class__:Cu};var Du=function(){};t["motion.easing._Quart.QuartEaseOut"]=Du;Du.__name__="motion.easing._Quart.QuartEaseOut";Du.__interfaces__=
[Qe];Du.prototype={calculate:function(a){return-(--a*a*a*a-1)},ease:function(a,b,c,d){a=a/d-1;return-c*(a*a*a*a-1)+b},__class__:Du};var th=function(){};t["motion.easing.Quart"]=th;th.__name__="motion.easing.Quart";var Eu=function(){};t["motion.easing._Quint.QuintEaseIn"]=Eu;Eu.__name__="motion.easing._Quint.QuintEaseIn";Eu.__interfaces__=[Qe];Eu.prototype={calculate:function(a){return a*a*a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a*a*a+b},__class__:Eu};var Fu=function(){};t["motion.easing._Quint.QuintEaseInOut"]=
Fu;Fu.__name__="motion.easing._Quint.QuintEaseInOut";Fu.__interfaces__=[Qe];Fu.prototype={calculate:function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},ease:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},__class__:Fu};var Gu=function(){};t["motion.easing._Quint.QuintEaseOut"]=Gu;Gu.__name__="motion.easing._Quint.QuintEaseOut";Gu.__interfaces__=[Qe];Gu.prototype={calculate:function(a){return--a*a*a*a*a+1},ease:function(a,b,c,d){a=a/d-1;return c*(a*a*a*a*a+1)+
b},__class__:Gu};var Sk=function(){};t["motion.easing.Quint"]=Sk;Sk.__name__="motion.easing.Quint";var Hu=function(){};t["motion.easing._Sine.SineEaseIn"]=Hu;Hu.__name__="motion.easing._Sine.SineEaseIn";Hu.__interfaces__=[Qe];Hu.prototype={calculate:function(a){return 1-Math.cos(Math.PI/2*a)},ease:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},__class__:Hu};var Iu=function(){};t["motion.easing._Sine.SineEaseInOut"]=Iu;Iu.__name__="motion.easing._Sine.SineEaseInOut";Iu.__interfaces__=[Qe];
Iu.prototype={calculate:function(a){return-(Math.cos(Math.PI*a)-1)/2},ease:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},__class__:Iu};var Ju=function(){};t["motion.easing._Sine.SineEaseOut"]=Ju;Ju.__name__="motion.easing._Sine.SineEaseOut";Ju.__interfaces__=[Qe];Ju.prototype={calculate:function(a){return Math.sin(Math.PI/2*a)},ease:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},__class__:Ju};var Tk=function(){};t["motion.easing.Sine"]=Tk;Tk.__name__="motion.easing.Sine";var Zz=
{exists:function(a,b){return a.exists(b)},get:function(a,b){return a.get(b)},keyValueIterator:function(a){return a.keyValueIterator()},remove:function(a,b){return a.remove(b)},set:function(a,b,c){a.set(b,c);return c},iterator:function(a){return a.keys()},each:function(a){return a.iterator()},toStringMap:function(a,b){return new G},toIntMap:function(a,b){return new Od},toFloatMap:function(a,b){return new mo},toEnumValueMapMap:function(a,b){return new cf},toObjectMap:function(a,b){return new Ta},toUtilsObjectMap:function(a,
b){return new no},toClassMap:function(a,b){return new oo},fromStringMap:function(a){return a},fromIntMap:function(a){return a},fromFloatMap:function(a){return a},fromObjectMap:function(a){return a},fromUtilsObjectMap:function(a){return a},fromClassMap:function(a){return a}},Pa=function(){};t["openfl.Lib"]=Pa;Pa.__name__="openfl.Lib";Pa.__properties__={get_current:"get_current",get_application:"get_application"};Pa.as=function(a,b){return w.__instanceof(a,b)?a:null};Pa.attach=function(a){return new ek};
Pa.clearInterval=function(a){Pa.__timers.h.hasOwnProperty(a)&&(Pa.__timers.h[a].stop(),Pa.__timers.remove(a))};Pa.clearTimeout=function(a){Pa.__timers.h.hasOwnProperty(a)&&(Pa.__timers.h[a].stop(),Pa.__timers.remove(a))};Pa.getDefinitionByName=function(a){if(a==null)return null;a=N.replace(a,"::",".");return t[a]};Pa.getQualifiedClassName=function(a){if(a==null)return null;var b=w.__instanceof(a,kw)?a:w.getClass(a);return b==null?typeof a=="boolean"||a==$v?"Bool":typeof a=="number"&&(a|0)===a||a==
jw?"Int":typeof a=="number"||a==Iz?"Float":null:b.__name__};Pa.getQualifiedSuperclassName=function(a){if(a==null)return null;a=w.__instanceof(a,kw)?a:w.getClass(a);if(a==null)return null;a=a.__super__;return a==null?null:a.__name__};Pa.getTimer=function(){return Rb.getTimer()};Pa.describeType=function(a){Pa.notImplemented({fileName:"openfl/Lib.hx",lineNumber:272,className:"openfl.Lib",methodName:"describeType"});return null};Pa.getURL=function(a,b){Pa.navigateToURL(a,b)};Pa.navigateToURL=function(a,
b){b==null&&(b="_blank");var c=a.url;if(ab.typeof(a.data)==ac.TObject){for(var d="",f=y.fields(a.data),g=0;g<f.length;){var h=f[g];++g;d.length>0&&(d+="&");var n=encodeURIComponent(h)+"=";h=H.string(y.field(a.data,h));d+=n+encodeURIComponent(h)}c=c.indexOf("?")>-1?c+("&"+d):c+("?"+d)}Rb.openURL(c,b)};Pa.encodeURIComponent=function(a){return encodeURIComponent(a)};Pa.decodeURIComponent=function(a){return decodeURIComponent(a.split("+").join(" "))};Pa.notImplemented=function(a){var b=a.className+"."+
a.methodName;Object.prototype.hasOwnProperty.call(Pa.__sentWarnings.h,b)||(Pa.__sentWarnings.h[b]=!0,Vb.warn(a.methodName+" is not implemented",a))};Pa.preventDefaultTouchMove=function(){window.document.addEventListener("touchmove",function(a){a.preventDefault()},!1)};Pa.sendToURL=function(a){(new Jj).load(a)};Pa.setInterval=function(a,b,c){var d=++Pa.__lastTimerID;b=new Gc(b);Pa.__timers.h[d]=b;b.run=function(){if(Pa.get_current()!=null&&Pa.get_current().stage!=null&&Pa.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,
c==null?[]:c)}catch(g){Pb.lastError=g;var f=ba.caught(g).unwrap();Pa.get_current().stage.__handleError(f)}else a.apply(a,c==null?[]:c)};return d};Pa.setTimeout=function(a,b,c){var d=++Pa.__lastTimerID,f=Pa.__timers;b=Gc.delay(function(){Pa.__timers.remove(d);if(Pa.get_current()!=null&&Pa.get_current().stage!=null&&Pa.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,c==null?[]:c)}catch(h){Pb.lastError=h;var g=ba.caught(h).unwrap();Pa.get_current().stage.__handleError(g)}else a.apply(a,
c==null?[]:c)},b);f.h[d]=b;return d};Pa.trace=function(a){De.trace(a,{fileName:"openfl/Lib.hx",lineNumber:672,className:"openfl.Lib",methodName:"trace"})};Pa.isXMLName=function(a){return a!=null&&(new Wa("^[a-zA-Z_]","")).match(a)&&!(new Wa("^[xX][mM][lL]","")).match(a)&&(new Wa("^[a-zA-Z0-9_\\-\\.]+$","")).match(a)?!0:!1};Pa.getClassByAlias=function(a){if(!Object.prototype.hasOwnProperty.call(Pa.__registeredClassAliases.h,a))throw new Sd("Class "+a+" could not be found.");return Pa.__registeredClassAliases.h[a]};
Pa.registerClassAlias=function(a,b){if(b==null)throw new Ce("Parameter classObject must be non-null");if(a==null)throw new Ce("Parameter aliasName must be non-null");Pa.__registeredClassAliases.h[a]=b;Pa.__registeredClasses.set(b,a)};Pa.get_application=function(){return md.application};Pa.get_current=function(){md.current==null&&(md.current=new ek);return md.current};var hl=function(){};t["openfl._Vector.IVector"]=hl;hl.__name__="openfl._Vector.IVector";hl.__isInterface__=!0;hl.prototype={get_length:null,
set_length:null,fixed:null,concat:null,copy:null,filter:null,get:null,indexOf:null,insertAt:null,iterator:null,join:null,lastIndexOf:null,pop:null,push:null,removeAt:null,reverse:null,set:null,shift:null,slice:null,sort:null,splice:null,toString:null,unshift:null,__tempIndex:null,__class__:hl,__properties__:{set_length:"set_length",get_length:"get_length"}};var bj=function(a,b,c){b==null&&(b=!1);a==null&&(a=0);c==null&&(c=[]);this.__array=c;a>0&&this.set_length(a);this.fixed=b};t["openfl._Vector.BoolVector"]=
bj;bj.__name__="openfl._Vector.BoolVector";bj.__interfaces__=[hl];bj.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new bj(0,!1,this.__array.slice()):a.__array.length>0?new bj(0,!1,this.__array.concat(a.__array)):new bj(0,!1,this.__array.slice())},copy:function(){return new bj(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new bj(0,b,c)},get:function(a){return a>=
this.__array.length?!1:this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new wg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},
pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:!1},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new bj(0,!1,
this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new bj(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=!1}else for(;this.__array.length>
a;)this.__array.pop()}return this.__array.length},__class__:bj,__properties__:{set_length:"set_length",get_length:"get_length"}};var dj=function(a,b,c,d){d==null&&(d=!1);b==null&&(b=!1);a==null&&(a=0);if(d){if(this.__array=[],c!=null){d=0;for(var f=c.length;d<f;){var g=d++;this.__array[g]=c[g]}}}else c==null&&(c=[]),this.__array=c;a>0&&this.set_length(a);this.fixed=b};t["openfl._Vector.FloatVector"]=dj;dj.__name__="openfl._Vector.FloatVector";dj.__interfaces__=[hl];dj.prototype={fixed:null,__array:null,
__tempIndex:null,concat:function(a){return a==null?new dj(0,!1,this.__array.slice()):a.__array.length>0?new dj(0,!1,this.__array.concat(a.__array)):new dj(0,!1,this.__array.slice())},copy:function(){return new dj(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new dj(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;
if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new wg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},
removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new dj(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new dj(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},
toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(a!=this.__array.length&&!this.fixed){var b=this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:dj,__properties__:{set_length:"set_length",get_length:"get_length"}};var ej=function(a,
b,c){b==null&&(b=!1);a==null&&(a=0);c==null&&(c=[]);this.__array=c;a>0&&this.set_length(a);this.fixed=b};t["openfl._Vector.FunctionVector"]=ej;ej.__name__="openfl._Vector.FunctionVector";ej.__interfaces__=[hl];ej.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new ej(0,!1,this.__array.slice()):a.__array.length>0?new ej(0,!1,this.__array.concat(a.__array)):new ej(0,!1,this.__array.slice())},copy:function(){return new ej(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=
this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new ej(0,b,c)},get:function(a){return a>=this.__array.length?null:this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new wg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,
b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:null},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?
null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new ej(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new ej(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=
this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=null}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:ej,__properties__:{set_length:"set_length",get_length:"get_length"}};var cj=function(a,b,c){b==null&&(b=!1);a==null&&(a=0);c==null&&(c=[]);this.__array=c;a>0&&this.set_length(a);this.fixed=b};t["openfl._Vector.IntVector"]=cj;cj.__name__="openfl._Vector.IntVector";cj.__interfaces__=[hl];cj.prototype={fixed:null,__array:null,__tempIndex:null,
concat:function(a){return a==null?new cj(0,!1,this.__array.slice()):a.__array.length>0?new cj(0,!1,this.__array.concat(a.__array)):new cj(0,!1,this.__array.slice())},copy:function(){return new cj(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new cj(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==
a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new wg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||
a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new cj(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new cj(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=
null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:cj,__properties__:{set_length:"set_length",get_length:"get_length"}};var Fi=function(a,b,c,d){d==null&&(d=!1);b==null&&(b=!1);a==null&&(a=0);if(d){if(this.__array=
[],c!=null){d=0;for(var f=c.length;d<f;){var g=d++;this.__array[g]=c[g]}}}else c==null&&(c=[]),this.__array=c;a>0&&this.set_length(a);this.fixed=b};t["openfl._Vector.ObjectVector"]=Fi;Fi.__name__="openfl._Vector.ObjectVector";Fi.__interfaces__=[hl];Fi.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new Fi(0,!1,this.__array.slice()):a.__array.length>0?new Fi(0,!1,this.__array.concat(a.__array)):new Fi(0,!1,this.__array.slice())},copy:function(){return new Fi(0,
this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Fi(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new wg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},
lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:null},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=
b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new Fi(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Fi(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=
this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;)b++,this.__array.push(null);else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Fi,__properties__:{set_length:"set_length",get_length:"get_length"}};var Ui=function(){};t["openfl.desktop.Clipboard"]=Ui;Ui.__name__="openfl.desktop.Clipboard";Ui.__properties__={get_generalClipboard:"get_generalClipboard"};Ui.get_generalClipboard=function(){Ui.__generalClipboard==null&&(Ui.__generalClipboard=new Ui,Ui.__generalClipboard.__systemClipboard=
!0);return Ui.__generalClipboard};Ui.prototype={__htmlText:null,__richText:null,__systemClipboard:null,__text:null,clear:function(){this.__systemClipboard?Pe.set_text(null):this.__text=this.__richText=this.__htmlText=null},clearData:function(a){if(this.__systemClipboard)switch(a){case 0:case 1:case 2:Pe.set_text(null)}else switch(a){case 0:this.__htmlText=null;break;case 1:this.__richText=null;break;case 2:this.__text=null}},getData:function(a,b){if(this.__systemClipboard)switch(a){case 0:case 1:case 2:return Pe.get_text();
default:return null}switch(a){case 0:return this.__htmlText;case 1:return this.__richText;case 2:return this.__text;default:return null}},hasFormat:function(a){if(this.__systemClipboard)switch(a){case 0:case 1:case 2:return Pe.get_text()!=null;default:return!1}switch(a){case 0:return this.__htmlText!=null;case 1:return this.__richText!=null;case 2:return this.__text!=null;default:return!1}},setData:function(a,b,c){if(this.__systemClipboard)switch(a){case 0:case 1:case 2:return a=b,Pe.set_text(a==
null?null:H.string(a)),!0;default:return!1}switch(a){case 0:return a=b,this.__htmlText=a==null?null:H.string(a),!0;case 1:return a=b,this.__richText=a==null?null:H.string(a),!0;case 2:return a=b,this.__text=a==null?null:H.string(a),!0;default:return!1}},setDataHandler:function(a,b,c){md.notImplemented({fileName:"openfl/desktop/Clipboard.hx",lineNumber:514,className:"openfl.desktop.Clipboard",methodName:"setDataHandler"});return!1},get_formats:function(){var a=[];this.hasFormat(0)&&a.push(0);this.hasFormat(1)&&
a.push(1);this.hasFormat(2)&&a.push(2);return a},__class__:Ui,__properties__:{get_formats:"get_formats"}};var Lo=function(){Na.call(this);md.application==null&&(md.application=this);md.current==null&&(md.current=new ek);md.current.__loaderInfo=Xj.create(null);md.current.__loaderInfo.content=md.current};t["openfl.display.Application"]=Lo;Lo.__name__="openfl.display.Application";Lo.__super__=Na;Lo.prototype=I(Na.prototype,{createWindow:function(a){var b=new qq(this,a);md.current.__loaderInfo.width==
-1&&(md.current.__loaderInfo.width=b.__width,md.current.__loaderInfo.height=b.__height);this.__windows.push(b);this.__windowByID.h[b.id]=b;var c=this;b.onClose.add(function(){c.__onWindowClose(b)},!1,-1E4);this.__window==null&&(this.__window=b,b.onActivate.add(m(this,this.onWindowActivate)),b.onRenderContextLost.add(m(this,this.onRenderContextLost)),b.onRenderContextRestored.add(m(this,this.onRenderContextRestored)),b.onDeactivate.add(m(this,this.onWindowDeactivate)),b.onDropFile.add(m(this,this.onWindowDropFile)),
b.onEnter.add(m(this,this.onWindowEnter)),b.onExpose.add(m(this,this.onWindowExpose)),b.onFocusIn.add(m(this,this.onWindowFocusIn)),b.onFocusOut.add(m(this,this.onWindowFocusOut)),b.onFullscreen.add(m(this,this.onWindowFullscreen)),b.onKeyDown.add(m(this,this.onKeyDown)),b.onKeyUp.add(m(this,this.onKeyUp)),b.onLeave.add(m(this,this.onWindowLeave)),b.onMinimize.add(m(this,this.onWindowMinimize)),b.onMouseDown.add(m(this,this.onMouseDown)),b.onMouseMove.add(m(this,this.onMouseMove)),b.onMouseMoveRelative.add(m(this,
this.onMouseMoveRelative)),b.onMouseUp.add(m(this,this.onMouseUp)),b.onMouseWheel.add(m(this,this.onMouseWheel)),b.onMove.add(m(this,this.onWindowMove)),b.onRender.add(m(this,this.render)),b.onResize.add(m(this,this.onWindowResize)),b.onRestore.add(m(this,this.onWindowRestore)),b.onTextEdit.add(m(this,this.onTextEdit)),b.onTextInput.add(m(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(b);return b},exec:function(){return Na.prototype.exec.call(this)},__checkForAllWindowsClosed:function(){this.__windows.length>
0||Na.prototype.__checkForAllWindowsClosed.call(this)},__onModuleExit:function(a){this.onExit.canceled||(md.application==this&&(md.application=null),Na.prototype.__onModuleExit.call(this,a))},__class__:Lo});var Ma=function(a,b,c){c==null&&(c=!1);ma.call(this);this.__drawableType=2;this.__bitmapData=a;this.pixelSnapping=b;this.smoothing=c;b==null&&(this.pixelSnapping=1)};t["openfl.display.Bitmap"]=Ma;Ma.__name__="openfl.display.Bitmap";Ma.__super__=ma;Ma.prototype=I(ma.prototype,{pixelSnapping:null,
smoothing:null,__image:null,__bitmapData:null,__imageVersion:null,__enterFrame:function(a){this.__bitmapData==null||this.__bitmapData.image==null||this.__bitmapData.image.version==this.__imageVersion||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=Ia.__pool.get();this.__bitmapData!=null?c.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height):c.setTo(0,0,0,0);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ia.__pool.release(c)},
__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||this.__bitmapData==null||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var h=this.__renderTransform,n=h.a*h.d-h.b*h.c;c=n==0?-h.tx:1/n*(h.c*(h.ty-b)+h.d*(a-h.tx));h=this.__renderTransform;n=h.a*h.d-h.b*h.c;a=n==0?-h.ty:1/n*(h.a*(b-h.ty)+h.b*(h.tx-a));if(c>0&&a>0&&c<=this.__bitmapData.width&&a<=this.__bitmapData.height){if(this.__scrollRect!=null&&!this.__scrollRect.contains(c,a))return!1;
d==null||f||d.push(g);return!0}return!1},__hitTestMask:function(a,b){if(this.__bitmapData==null)return!1;this.__getRenderTransform();var c=this.__renderTransform,d=c.a*c.d-c.b*c.c,f=d==0?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;a=d==0?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a));return f>0&&a>0&&f<=this.__bitmapData.width&&a<=this.__bitmapData.height?!0:!1},get_bitmapData:function(){return this.__bitmapData},set_bitmapData:function(a){this.__bitmapData=a;this.smoothing=
!1;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());this.__imageVersion=-1;return this.__bitmapData},set_height:function(a){this.__bitmapData!=null?this.set_scaleY(a/this.__bitmapData.height):this.set_scaleY(0);return a},set_width:function(a){this.__bitmapData!=null?this.set_scaleX(a/this.__bitmapData.width):this.set_scaleX(0);return a},__class__:Ma,__properties__:I(ma.prototype.__properties__,{set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"})});var Ia=function(a,
b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};t["openfl.geom.Rectangle"]=Ia;Ia.__name__="openfl.geom.Rectangle";Ia.prototype={height:null,width:null,x:null,y:null,clone:function(){return new Ia(this.x,this.y,this.width,this.height)},contains:function(a,b){return a>=this.x&&b>=this.y&&a<this.get_right()?b<this.get_bottom():!1},containsPoint:function(a){return this.contains(a.x,a.y)},containsRect:function(a){return a.width<=0||a.height<=
0?a.x>this.x&&a.y>this.y&&a.get_right()<this.get_right()?a.get_bottom()<this.get_bottom():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():!1},copyFrom:function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height},equals:function(a){return a==this?!0:a!=null&&this.x==a.x&&this.y==a.y&&this.width==a.width?this.height==a.height:!1},inflate:function(a,b){this.x-=a;this.width+=a*2;this.y-=b;this.height+=b*2},inflatePoint:function(a){this.inflate(a.x,
a.y)},intersection:function(a){var b=this.x<a.x?a.x:this.x,c=this.get_right()>a.get_right()?a.get_right():this.get_right();if(c<=b)return new Ia;var d=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();return a<=d?new Ia:new Ia(b,d,c-b,a-d)},intersectionToOutput:function(a,b){b==null&&(b=new Ia);var c=this.x<a.x?a.x:this.x,d=this.get_right()>a.get_right()?a.get_right():this.get_right();if(d<=c)return b.setTo(0,0,0,0),b;var f=this.y<a.y?a.y:this.y;a=this.get_bottom()>
a.get_bottom()?a.get_bottom():this.get_bottom();if(a<=f)return b.setTo(0,0,0,0),b;b.setTo(c,f,d-c,a-f);return b},intersects:function(a){var b=this.x<a.x?a.x:this.x;if((this.get_right()>a.get_right()?a.get_right():this.get_right())<=b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return this.width<=0?!0:this.height<=0},offset:function(a,b){this.x+=a;this.y+=b},offsetPoint:function(a){this.x+=a.x;this.y+=a.y},setEmpty:function(){this.x=
this.y=this.width=this.height=0},setTo:function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d},toString:function(){return"(x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"},union:function(a){if(this.width==0||this.height==0)return a.clone();if(a.width==0||a.height==0)return this.clone();var b=this.x>a.x?a.x:this.x,c=this.get_right()<a.get_right()?a.get_right():this.get_right(),d=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();
return new Ia(b,d,c-b,a-d)},unionToOutput:function(a,b){b==null&&(b=new Ia);if(this.width==0||this.height==0)return b.setTo(a.x,a.y,a.width,a.height),b;if(a.width==0||a.height==0)return b.setTo(this.x,this.y,this.width,this.height),b;var c=this.x>a.x?a.x:this.x,d=this.get_right()<a.get_right()?a.get_right():this.get_right(),f=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();b.setTo(c,f,d-c,a-f);return b},__contract:function(a,b,c,d){if(this.width!=0||this.height!=
0){var f=0,g=0,h=0,n=0;this.x<a&&(f=a-this.x);this.y<b&&(g=b-this.y);this.get_right()>a+c&&(h=a+c-this.get_right());this.get_bottom()>b+d&&(n=b+d-this.get_bottom());this.x+=f;this.y+=g;this.width+=h-f;this.height+=n-g}},__expand:function(a,b,c,d){if(this.width==0&&this.height==0)this.x=a,this.y=b,this.width=c,this.height=d;else{var f=this.get_right(),g=this.get_bottom();this.x>a&&(this.x=a,this.width=f-a);this.y>b&&(this.y=b,this.height=g-b);f<a+c&&(this.width=a+c-this.x);g<b+d&&(this.height=b+d-
this.y)}},__toLimeRectangle:function(){Ia.__limeRectangle==null&&(Ia.__limeRectangle=new of);Ia.__limeRectangle.setTo(this.x,this.y,this.width,this.height);return Ia.__limeRectangle},__transform:function(a,b){var c=b.a*this.x+b.c*this.y,d=c,f=b.b*this.x+b.d*this.y,g=f,h=b.a*(this.x+this.width)+b.c*this.y,n=b.b*(this.x+this.width)+b.d*this.y;h<c&&(c=h);n<f&&(f=n);h>d&&(d=h);n>g&&(g=n);h=b.a*(this.x+this.width)+b.c*(this.y+this.height);n=b.b*(this.x+this.width)+b.d*(this.y+this.height);h<c&&(c=h);n<
f&&(f=n);h>d&&(d=h);n>g&&(g=n);h=b.a*this.x+b.c*(this.y+this.height);n=b.b*this.x+b.d*(this.y+this.height);h<c&&(c=h);n<f&&(f=n);h>d&&(d=h);n>g&&(g=n);a.setTo(c+b.tx,f+b.ty,d-c,g-f)},get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new Ea(this.x+this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=
a-this.x;return this.x=a},get_right:function(){return this.x+this.width},set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new Ea(this.width,this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},get_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_topLeft:function(){return new Ea(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:Ia,__properties__:{set_topLeft:"set_topLeft",
get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}};var Dc=function(a,b,c,d){d==null&&(d=-1);c==null&&(c=!0);this.__drawableType=0;this.transparent=c;a==null&&(a=0);b==null&&(b=0);a<0&&(a=0);b<0&&(b=0);this.width=a;this.height=b;this.rect=new Ia(0,0,
a,b);this.__textureWidth=a;this.__textureHeight=b;a>0&&b>0&&(c?(d&-16777216)==0&&(d=0):d=-16777216|d&16777215,this.image=new Oc(null,0,0,a,b,d<<8|d>>>24&255),this.image.set_transparent(c),this.readable=this.__isValid=!0);this.__renderTransform=new gb;this.__worldAlpha=1;this.__worldTransform=new gb;this.__worldColorTransform=new wc;this.__renderable=!0;this.__asset=!1};t["openfl.display.BitmapData"]=Dc;Dc.__name__="openfl.display.BitmapData";Dc.__interfaces__=[kc];Dc.fromBase64=function(a,b){return null};
Dc.fromBytes=function(a,b){return null};Dc.fromCanvas=function(a,b){b==null&&(b=!0);if(a==null)return null;var c=new Dc(0,0,b,0);c.__fromImage(Oc.fromCanvas(a));c.image.set_transparent(b);return c};Dc.fromFile=function(a){return null};Dc.fromImage=function(a,b){b==null&&(b=!0);if(a==null||a.buffer==null)return null;var c=new Dc(0,0,b,0);c.__fromImage(a);c.image.set_transparent(b);return c.image!=null?c:null};Dc.fromTexture=function(a){if(a==null)return null;var b=new Dc(a.__width,a.__height,!0,0);
b.readable=!1;b.__texture=a;b.__textureContext=a.__textureContext;b.image=null;return b};Dc.loadFromBase64=function(a,b){return Oc.loadFromBase64(a,b).then(function(c){return Hc.withValue(Dc.fromImage(c))})};Dc.loadFromBytes=function(a,b){return Oc.loadFromBytes(mc.toBytes(a)).then(function(c){c=Dc.fromImage(c);b!=null&&c.__applyAlpha(b);return Hc.withValue(c)})};Dc.loadFromFile=function(a){return Oc.loadFromFile(a).then(function(b){return Hc.withValue(Dc.fromImage(b))})};Dc.prototype={height:null,
image:null,readable:null,rect:null,transparent:null,width:null,__blendMode:null,__drawableType:null,__framebuffer:null,__framebufferContext:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__indexBufferGrid:null,__isMask:null,__isValid:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__stencilBuffer:null,__surface:null,__texture:null,__textureContext:null,__textureHeight:null,__textureVersion:null,__textureWidth:null,__transform:null,__uvRect:null,
__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__vertexBufferGrid:null,__vertexBufferHeight:null,__vertexBufferScaleX:null,__vertexBufferScaleY:null,__vertexBufferWidth:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__asset:null,applyFilter:function(a,b,c,d){if(this.readable&&a!=null&&a.readable){a=d.__needSecondBitmapData;var f=d.__preserveObject,g=null;var h=a?new Dc(this.width,this.height,!0,0):this;f&&(g=new Dc(this.width,this.height,!0,0));d.__preserveObject&&
g.copyPixels(this,this.rect,c);b=d.__applyFilter(h,this,b,c);d.__preserveObject&&b.draw(g,null,null);a&&b==h&&(h.image.version=this.image.version,this.image=h.image);this.image.dirty=!0;this.image.version++}},clone:function(){if(this.__isValid)if(this.readable||this.image!=null)var a=Dc.fromImage(this.image.clone(),this.transparent);else a=new Dc(0,0,this.transparent,0),a.width=this.width,a.height=this.height,a.__textureWidth=this.__textureWidth,a.__textureHeight=this.__textureHeight,a.rect.copyFrom(this.rect),
a.__framebuffer=this.__framebuffer,a.__framebufferContext=this.__framebufferContext,a.__texture=this.__texture,a.__textureContext=this.__textureContext,a.__isValid=!0;else a=new Dc(this.width,this.height,this.transparent,0);a.__worldTransform.copyFrom(this.__worldTransform);a.__renderTransform.copyFrom(this.__renderTransform);return a},colorTransform:function(a,b){this.readable&&this.image.colorTransform(a.__toLimeRectangle(),b.__toLimeColorMatrix())},compare:function(a){if(a==this)return 0;if(a==
null)return-1;if(this.readable==0||a.readable==0)return-2;if(this.width!=a.width)return-3;if(this.height!=a.height)return-4;if(this.image!=null&&a.image!=null&&this.image.get_format()==a.image.get_format()){for(var b=this.image.get_data(),c=a.image.get_data(),d=!0,f=0,g=b.length;f<g;){var h=f++;if(b[h]!=c[h]){d=!1;break}}if(d)return 0}b=null;f=0;for(g=this.height;f<g;){h=f++;for(var n=0,l=this.width;n<l;){var q=n++;c=!1;var u=this.getPixel32(q,h);var v=a.getPixel32(q,h);d=0;if(u!=v){var z=(u>>>16&
255)-(v>>>16&255),r=(u>>>8&255)-(v>>>8&255),F=(u&255)-(v&255);z<0&&(z*=-1);r<0&&(r*=-1);F<0&&(F*=-1);z==0&&r==0&&F==0?(u=(u>>>24&255)-(v>>>24&255),u!=0&&(d=(d>>>24&255)<<24|16711680|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|65280|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,d=(u&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)):(d=(d>>>24&255)<<24|(z&255)<<16|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(r&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<
16|(d>>>8&255)<<8|F&255,d=-16777216|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)}c&&(b==null&&(b=new Dc(this.width,this.height,this.transparent||a.transparent,0)),b.setPixel32(q,h,d))}}return b==null?0:b},copyChannel:function(a,b,c,d,f){if(this.readable){switch(d){case 1:d=Bi.RED;break;case 2:d=Bi.GREEN;break;case 4:d=Bi.BLUE;break;case 8:d=Bi.ALPHA;break;default:return}switch(f){case 1:f=Bi.RED;break;case 2:f=Bi.GREEN;break;case 4:f=Bi.BLUE;break;case 8:f=Bi.ALPHA;break;default:return}this.image.copyChannel(a.image,
b.__toLimeRectangle(),c.__toLimeVector2(),d,f)}},copyPixels:function(a,b,c,d,f,g){g==null&&(g=!1);this.readable&&a!=null&&(f!=null&&(Dc.__tempVector.x=f.x,Dc.__tempVector.y=f.y),this.image.copyPixels(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d!=null?d.image:null,f!=null?Dc.__tempVector:null,g))},dispose:function(){if(this.image!=null&&this.image.type==gg.CANVAS&&!this.__asset){var a=this.image.buffer.__srcCanvas,b=this.image.buffer.__srcContext;a!=null&&(a.width=0,a.height=0);b!=null&&b.clearRect(0,
0,0,0)}this.image=null;this.height=this.width=0;this.rect=null;this.readable=this.__isValid=!1;this.__textureContext=this.__texture=this.__framebufferContext=this.__framebuffer=this.__vertexBuffer=this.__surface=null},disposeImage:function(){this.readable=!1},draw:function(a,b,c,d,f,g){g==null&&(g=!1);if(a!=null){var h=!0,n=null;a instanceof ma&&(n=w.__cast(a,ma),n.get_visible()||(h=!1,n.set_visible(!0)));a.__update(!1,!0);var l=gb.__pool.get();l.copyFrom(a.__renderTransform);l.invert();b!=null&&
l.concat(b);b=null;f!=null&&(b=gb.__pool.get(),b.copyFrom(l),b.invert());var q=new wc;q.__copyFrom(a.__worldColorTransform);q.__invert();if(this.readable||Pa.get_current().stage.context3D==null){if(c!=null){var u=Ia.__pool.get(),v=gb.__pool.get();a.__getBounds(u,v);var z=Math.ceil(u.width),r=Math.ceil(u.height);v.tx=-u.x;v.ty=-u.y;z=new Dc(z,r,!0,0);z.draw(a,v);z.colorTransform(z.rect,c);z.__renderTransform.identity();z.__renderTransform.tx=u.x;z.__renderTransform.ty=u.y;z.__renderTransform.concat(a.__renderTransform);
z.__worldAlpha=a.__worldAlpha;z.__worldColorTransform.__copyFrom(a.__worldColorTransform);a=z;Ia.__pool.release(u);gb.__pool.release(v)}yb.convertToCanvas(this.image);c=new il(this.image.buffer.__srcContext);c.__allowSmoothing=g;c.__overrideBlendMode=d;c.__worldTransform=l;c.__worldAlpha=1/a.__worldAlpha;c.__worldColorTransform=q;f!=null&&c.__pushMaskRect(f,b);this.__drawCanvas(a,c)}else this.__textureContext==null&&(this.__textureContext=Na.current.__window.context),c!=null&&q.__combine(c),c=new yc(Pa.get_current().stage.context3D,
this),c.__allowSmoothing=g,c.__pixelRatio=Pa.get_current().stage.window.__scale,c.__overrideBlendMode=d,c.__worldTransform=l,c.__worldAlpha=1/a.__worldAlpha,c.__worldColorTransform=q,c.__resize(this.width,this.height),f!=null&&c.__pushMaskRect(f,b),this.__drawGL(a,c);f!=null&&(c.__popMaskRect(),gb.__pool.release(b));gb.__pool.release(l);n==null||h||n.set_visible(!1)}},drawWithQuality:function(a,b,c,d,f,g,h){g==null&&(g=!1);this.draw(a,b,c,d,f,h!=2&&g)},encode:function(a,b,c){if(!this.readable||a==
null)return null;c==null&&(c=new Xc(0));var d=this.image;if(!a.equals(this.rect)){var f=gb.__pool.get();f.tx=Math.round(-a.x);f.ty=Math.round(-a.y);a=new Dc(Math.ceil(a.width),Math.ceil(a.height),!0,0);a.draw(this,f);d=a.image;gb.__pool.release(f)}return b instanceof jy?(c.writeBytes(mc.fromBytes(d.encode(eu.PNG)),0,0),c):b instanceof Ku?(c.writeBytes(mc.fromBytes(d.encode(eu.JPEG,w.__cast(b,Ku).quality)),0,0),c):null},fillRect:function(a,b){this.__fillRect(a,b,!0)},floodFill:function(a,b,c){this.readable&&
this.image.floodFill(a,b,c,1)},generateFilterRect:function(a,b){return a.clone()},getIndexBuffer:function(a,b){if(this.__indexBuffer==null||this.__indexBufferContext!=a.__context||b!=null&&this.__indexBufferGrid==null||this.__indexBufferGrid!=null&&!this.__indexBufferGrid.equals(b)){this.__indexBufferContext=a.__context;this.__indexBuffer=null;if(b!=null){this.__indexBufferGrid==null&&(this.__indexBufferGrid=new Ia);this.__indexBufferGrid.copyFrom(b);var c=b.width;b=b.height;c!=0&&b!=0?(this.__indexBufferData=
new Uint16Array(54),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=0,this.__indexBufferData[8]=5,this.__indexBufferData[9]=5,this.__indexBufferData[10]=0,this.__indexBufferData[11]=2,this.__indexBufferData[12]=6,this.__indexBufferData[13]=4,this.__indexBufferData[14]=7,this.__indexBufferData[15]=7,this.__indexBufferData[16]=
4,this.__indexBufferData[17]=5,this.__indexBufferData[18]=8,this.__indexBufferData[19]=9,this.__indexBufferData[20]=0,this.__indexBufferData[21]=0,this.__indexBufferData[22]=9,this.__indexBufferData[23]=1,this.__indexBufferData[24]=10,this.__indexBufferData[25]=8,this.__indexBufferData[26]=4,this.__indexBufferData[27]=4,this.__indexBufferData[28]=8,this.__indexBufferData[29]=0,this.__indexBufferData[30]=11,this.__indexBufferData[31]=10,this.__indexBufferData[32]=6,this.__indexBufferData[33]=6,this.__indexBufferData[34]=
10,this.__indexBufferData[35]=4,this.__indexBufferData[36]=12,this.__indexBufferData[37]=13,this.__indexBufferData[38]=8,this.__indexBufferData[39]=8,this.__indexBufferData[40]=13,this.__indexBufferData[41]=9,this.__indexBufferData[42]=14,this.__indexBufferData[43]=12,this.__indexBufferData[44]=10,this.__indexBufferData[45]=10,this.__indexBufferData[46]=12,this.__indexBufferData[47]=8,this.__indexBufferData[48]=15,this.__indexBufferData[49]=14,this.__indexBufferData[50]=11,this.__indexBufferData[51]=
11,this.__indexBufferData[52]=14,this.__indexBufferData[53]=10,this.__indexBuffer=a.createIndexBuffer(54)):c==0&&b!=0?(this.__indexBufferData=new Uint16Array(18),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=5,this.__indexBufferData[8]=0,this.__indexBufferData[9]=0,this.__indexBufferData[10]=5,this.__indexBufferData[11]=1,this.__indexBufferData[12]=
6,this.__indexBufferData[13]=7,this.__indexBufferData[14]=4,this.__indexBufferData[15]=4,this.__indexBufferData[16]=7,this.__indexBufferData[17]=5,this.__indexBuffer=a.createIndexBuffer(18)):c!=0&&b==0&&(this.__indexBufferData=new Uint16Array(18),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=0,this.__indexBufferData[8]=5,this.__indexBufferData[9]=
5,this.__indexBufferData[10]=0,this.__indexBufferData[11]=2,this.__indexBufferData[12]=6,this.__indexBufferData[13]=4,this.__indexBufferData[14]=7,this.__indexBufferData[15]=7,this.__indexBufferData[16]=4,this.__indexBufferData[17]=5,this.__indexBuffer=a.createIndexBuffer(18))}else this.__indexBufferGrid=null;this.__indexBuffer==null&&(this.__indexBufferData=new Uint16Array(6),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=
1,this.__indexBufferData[5]=3,this.__indexBuffer=a.createIndexBuffer(6));this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},getVertexBuffer:function(a,b,c){if(this.__vertexBuffer==null||this.__vertexBufferContext!=a.__context||b!=null&&this.__vertexBufferGrid==null||this.__vertexBufferGrid!=null&&!this.__vertexBufferGrid.equals(b)||c!=null&&(this.__vertexBufferWidth!=c.get_width()||this.__vertexBufferHeight!=c.get_height()||this.__vertexBufferScaleX!=c.get_scaleX()||
this.__vertexBufferScaleY!=c.get_scaleY())){this.__uvRect=new Ia(0,0,this.width,this.height);this.__vertexBufferContext=a.__context;this.__vertexBuffer=null;c!=null&&(this.__vertexBufferWidth=c.get_width(),this.__vertexBufferHeight=c.get_height(),this.__vertexBufferScaleX=c.get_scaleX(),this.__vertexBufferScaleY=c.get_scaleY());if(b!=null&&c!=null){this.__vertexBufferGrid==null&&(this.__vertexBufferGrid=new Ia);this.__vertexBufferGrid.copyFrom(b);this.__vertexBufferWidth=c.get_width();this.__vertexBufferHeight=
c.get_height();this.__vertexBufferScaleX=c.get_scaleX();this.__vertexBufferScaleY=c.get_scaleY();var d=b.width,f=b.height;if(d!=0&&f!=0){this.__vertexBufferData=new Float32Array(224);var g=b.x,h=b.y,n=this.width-d-g,l=this.height-f-h;b=g/this.width;var q=h/this.height;d/=this.width;f/=this.height;g/=c.get_scaleX();h/=c.get_scaleY();n/=c.get_scaleX();var u=l/c.get_scaleY();l=c.get_width()/c.get_scaleX()-g-n;n=c.get_height()/c.get_scaleY()-h-u;this.__vertexBufferData[0]=g;this.__vertexBufferData[1]=
h;this.__vertexBufferData[3]=1*b;this.__vertexBufferData[4]=1*q;this.__vertexBufferData[15]=h;this.__vertexBufferData[18]=1*q;this.__vertexBufferData[28]=g;this.__vertexBufferData[31]=1*b;this.__vertexBufferData[56]=g+l;this.__vertexBufferData[57]=h;this.__vertexBufferData[59]=1*(b+d);this.__vertexBufferData[60]=1*q;this.__vertexBufferData[70]=g+l;this.__vertexBufferData[73]=1*(b+d);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=h;this.__vertexBufferData[87]=1;this.__vertexBufferData[88]=
1*q;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=1;this.__vertexBufferData[112]=g;this.__vertexBufferData[113]=h+n;this.__vertexBufferData[115]=1*b;this.__vertexBufferData[116]=1*(q+f);this.__vertexBufferData[127]=h+n;this.__vertexBufferData[130]=1*(q+f);this.__vertexBufferData[140]=g+l;this.__vertexBufferData[141]=h+n;this.__vertexBufferData[143]=1*(b+d);this.__vertexBufferData[144]=1*(q+f);this.__vertexBufferData[154]=this.width;this.__vertexBufferData[155]=h+n;this.__vertexBufferData[157]=
1;this.__vertexBufferData[158]=1*(q+f);this.__vertexBufferData[168]=g;this.__vertexBufferData[169]=this.height;this.__vertexBufferData[171]=1*b;this.__vertexBufferData[172]=1;this.__vertexBufferData[183]=this.height;this.__vertexBufferData[186]=1;this.__vertexBufferData[196]=g+l;this.__vertexBufferData[197]=this.height;this.__vertexBufferData[199]=1*(b+d);this.__vertexBufferData[200]=1;this.__vertexBufferData[210]=this.width;this.__vertexBufferData[211]=this.height;this.__vertexBufferData[213]=1;
this.__vertexBufferData[214]=1;this.__vertexBuffer=a.createVertexBuffer(16,14)}else d==0&&f!=0?(this.__vertexBufferData=new Float32Array(112),h=b.y,l=this.height-f-h,q=h/this.height,f/=this.height,h/=c.get_scaleY(),u=l/c.get_scaleY(),n=c.get_height()/c.get_scaleY()-h-u,c=c.get_width()/c.get_scaleX(),this.__vertexBufferData[0]=c,this.__vertexBufferData[1]=h,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1*q,this.__vertexBufferData[15]=h,this.__vertexBufferData[18]=1*q,this.__vertexBufferData[28]=
c,this.__vertexBufferData[31]=1,this.__vertexBufferData[56]=c,this.__vertexBufferData[57]=h+n,this.__vertexBufferData[59]=1,this.__vertexBufferData[60]=1*(q+f),this.__vertexBufferData[71]=h+n,this.__vertexBufferData[74]=1*(q+f),this.__vertexBufferData[84]=c,this.__vertexBufferData[85]=this.height,this.__vertexBufferData[87]=1,this.__vertexBufferData[88]=1,this.__vertexBufferData[99]=this.height,this.__vertexBufferData[102]=1,this.__vertexBuffer=a.createVertexBuffer(8,14)):f==0&&d!=0&&(this.__vertexBufferData=
new Float32Array(112),g=b.x,n=this.width-d-g,b=g/this.width,d/=this.width,g/=c.get_scaleX(),n/=c.get_scaleX(),l=c.get_width()/c.get_scaleX()-g-n,c=c.get_height()/c.get_scaleY(),this.__vertexBufferData[0]=g,this.__vertexBufferData[1]=c,this.__vertexBufferData[3]=1*b,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=c,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=g,this.__vertexBufferData[31]=1*b,this.__vertexBufferData[56]=g+l,this.__vertexBufferData[57]=c,this.__vertexBufferData[59]=
1*(b+d),this.__vertexBufferData[60]=1,this.__vertexBufferData[70]=g+l,this.__vertexBufferData[73]=1*(b+d),this.__vertexBufferData[84]=this.width,this.__vertexBufferData[85]=c,this.__vertexBufferData[87]=1,this.__vertexBufferData[88]=1,this.__vertexBufferData[98]=this.width,this.__vertexBufferData[101]=1,this.__vertexBuffer=a.createVertexBuffer(8,14))}else this.__vertexBufferGrid=null;this.__vertexBuffer==null&&(this.__vertexBufferData=new Float32Array(56),this.__vertexBufferData[0]=this.width,this.__vertexBufferData[1]=
this.height,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=this.height,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=this.width,this.__vertexBufferData[31]=1,this.__vertexBuffer=a.createVertexBuffer(3,14));this.__vertexBuffer.uploadFromTypedArray(el.toArrayBufferView(this.__vertexBufferData))}return this.__vertexBuffer},getColorBoundsRect:function(a,b,c){c==null&&(c=!0);if(!this.readable)return new Ia(0,0,this.width,this.height);a=this.image.getColorBoundsRect(a,
b,c,1);return new Ia(a.x,a.y,a.width,a.height)},getPixel:function(a,b){return this.readable?this.image.getPixel(a,b,1):0},getPixel32:function(a,b){return this.readable?this.image.getPixel32(a,b,1):0},getPixels:function(a){if(!this.readable)return null;a==null&&(a=this.rect);a=mc.fromBytes(this.image.getPixels(a.__toLimeRectangle(),1));a.__endian=0;return a},getSurface:function(){if(!this.readable)return null;this.__surface==null&&(this.__surface=hA.fromImage(this.image));return this.__surface},getTexture:function(a){if(!this.__isValid)return null;
if(this.__texture==null||this.__textureContext!=a.__context)this.__textureContext=a.__context,this.__texture=a.createRectangleTexture(this.width,this.height,1,!1),this.__textureVersion=-1;yb.sync(this.image,!1);this.image!=null&&this.image.version>this.__textureVersion&&(this.__surface!=null&&iA.flush(this.__surface),a=this.image,pd.__supportsBGRA||a.get_format()==0||(a=a.clone(),a.set_format(0)),this.__texture.__uploadFromImage(a),this.__textureVersion=this.image.version,this.__textureWidth=a.buffer.width,
this.__textureHeight=a.buffer.height);this.readable||this.image==null||(this.image=this.__surface=null);return this.__texture},getVector:function(a){a=this.getPixels(a);for(var b=sb.toFloat(mc.get_length(a))/sb.toFloat(4)|0,c=tb.toIntVector(null,b,!0),d=0;d<b;){var f=d++;c.set(f,a.readUnsignedInt())}return c},histogram:function(a){a=a!=null?a:new Ia(0,0,this.width,this.height);a=this.getPixels(a);for(var b=[],c=[],d=0;d<256;)d++,c.push(0);b.push(c);c=[];for(d=0;d<256;)d++,c.push(0);b.push(c);c=[];
for(d=0;d<256;)d++,c.push(0);b.push(c);c=[];for(d=0;d<256;)d++,c.push(0);b.push(c);d=b;b=0;for(c=mc.get_length(a);b<c;){var f=b++;++d[f%4][a.readUnsignedByte()]}return d},hitTest:function(a,b,c,d,f){f==null&&(f=1);if(!this.readable)return!1;c instanceof Ma&&(c=w.__cast(c,Ma).__bitmapData);if(c instanceof Ea){f=c;c=f.x-a.x|0;var g=f.y-a.y|0;if(this.rect.contains(c,g)){var h=this.getPixel32(c,g);if((h>>24&255)>b)return!0}}else if(c instanceof Dc){h=c;d==null?g=c=0:(c=Math.round(d.x-a.x),g=Math.round(d.y-
a.y));d=Ia.__pool.get();d.setTo(c,g,h.width,h.height);if(this.rect.intersects(d)){c<0?(d.x=0,d.width=Math.min(h.width+c,this.width)):d.width=Math.min(h.width,this.width-c);g<0?(d.y=0,d.height=Math.min(h.height+g,this.height)):d.height=Math.min(h.height,this.height-g);a=this.getPixels(d);d.x=c<0?-c:0;d.y=g<0?-g:0;g=h.getPixels(d);h=d.width*d.height|0;c=0;for(var n=h;c<n;){c++;h=a.readUnsignedInt();var l=g.readUnsignedInt();if(sb.gt(h>>>24&255,b)&&sb.gt(l>>>24&255,f))return Ia.__pool.release(d),!0}}Ia.__pool.release(d)}else if(c instanceof
Ia){f=Ia.__pool.get();f.copyFrom(c);f.offset(-a.x,-a.y);f.__contract(0,0,this.width,this.height);if(f.width>0&&f.height>0)for(a=this.getPixels(f),h=sb.toFloat(mc.get_length(a))/sb.toFloat(4)|0,c=0,n=h;c<n;)if(c++,h=a.readUnsignedInt(),sb.gt(h>>>24&255,b))return Ia.__pool.release(f),!0;Ia.__pool.release(f)}return!1},lock:function(){},merge:function(a,b,c,d,f,g,h){this.readable&&a!=null&&a.readable&&b!=null&&c!=null&&this.image.merge(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,f,g,h)},noise:function(a,
b,c,d,f){f==null&&(f=!1);d==null&&(d=7);c==null&&(c=255);b==null&&(b=0);if(this.readable){var g=function(){a=a*1103515245+12345;return(Math.abs(a/65536)|0)%32768};g();c-=b;var h=(d&1)==1,n=(d&2)>>1==1,l=(d&4)>>2==1;d=(d&8)>>3==1;for(var q=0,u=this.height;q<u;)for(var v=q++,z=0,r=this.width;z<r;){var F=z++,J=0,L=0,Q=0,W=255;f?(J=Q=L=b+g()%c,W=255):(h&&(J=b+g()%c),n&&(Q=b+g()%c),l&&(L=b+g()%c),d&&(W=b+g()%c));W=(W<<8)+J;W=(W<<8)+Q;W=(W<<8)+L;this.setPixel32(F,v,W)}}},paletteMap:function(a,b,c,d,f,g,
h){var n=b.width|0,l=b.height|0;a=a.getPixels(b);b=0;for(var q=l*n;b<q;){var u=b++;var v=a.readUnsignedInt();var z=h==null?v&-16777216:h[v>>24&255];var r=d==null?v&16711680:d[v>>16&255];var F=f==null?v&65280:f[v>>8&255];v=g==null?v&255:g[v&255];r=z+r+F+v;a.position=u*4;a.writeUnsignedInt(r)}a.position=0;d=Ia.__pool.get();d.setTo(c.x,c.y,n,l);this.setPixels(d,a);Ia.__pool.release(d)},perlinNoise:function(a,b,c,d,f,g,h,n,l){n==null&&(n=!1);h==null&&(h=7);this.readable&&(new Qm(d,c,h,n,.5,f,.15)).fill(this,
a,b,0)},scroll:function(a,b){this.readable&&this.image.scroll(a,b)},setPixel:function(a,b,c){this.readable&&this.image.setPixel(a,b,c,1)},setPixel32:function(a,b,c){this.readable&&this.image.setPixel32(a,b,c,1)},setPixels:function(a,b){if(this.readable&&a!=null){var c=a.width*a.height*4;if(sb.toFloat(b.length-b.position)<c)throw new Sd("End of file was encountered.",2030);this.image.setPixels(a.__toLimeRectangle(),mc.toBytePointer(b),1,Mz.toLimeEndian(b.__endian))}},setVector:function(a,b){var c=
new Xc(0);mc.set_length(c,b.get_length()*4);for(b=b.iterator();b.hasNext();){var d=b.next();c.writeUnsignedInt(d)}c.position=0;this.setPixels(a,c)},threshold:function(a,b,c,d,f,g,h,n){n==null&&(n=!1);h==null&&(h=-1);g==null&&(g=0);return a==null||b==null||c==null||b.x>a.width||b.y>a.height||c.x>this.width||c.y>this.height?0:this.image.threshold(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,f,g,h,n,1)},unlock:function(a){},__applyAlpha:function(a){yb.convertToCanvas(this.image);yb.createImageData(this.image);
for(var b=this.image.buffer.data,c=0,d=mc.get_length(a);c<d;){var f=c++;b[f*4+3]=a.readUnsignedByte()}this.image.version++},__drawCairo:function(a,b){},__drawCanvas:function(a,b){var c=this.image.buffer;b.__allowSmoothing||b.applySmoothing(c.__srcContext,!1);b.__render(a);b.__allowSmoothing||b.applySmoothing(c.__srcContext,!0);c.__srcContext.setTransform(1,0,0,1,0,0);c.__srcImageData=null;c.data=null;this.image.dirty=!0;this.image.version++},__drawGL:function(a,b){var c=b.__context3D,d=c.__state.renderToTexture,
f=c.__state.renderToTextureDepthStencil,g=c.__state.renderToTextureAntiAlias,h=c.__state.renderToTextureSurfaceSelector;c.setRenderToTexture(this.getTexture(c),!0);b.__render(a);d!=null?c.setRenderToTexture(d,f,g,h):c.setRenderToBackBuffer()},__fillRect:function(a,b,c){if(a!=null)if(this.transparent&&(b&-16777216)==0&&(b=0),c&&this.__texture!=null&&this.__texture.__glFramebuffer!=null&&Pa.get_current().stage.__renderer.__type=="opengl"){c=Pa.get_current().stage.__renderer.__context3D;var d=!this.rect.equals(a),
f=c.__state.renderToTexture,g=c.__state.renderToTextureDepthStencil,h=c.__state.renderToTextureAntiAlias,n=c.__state.renderToTextureSurfaceSelector;c.setRenderToTexture(this.__texture);if(d){var l=Math.floor(a.x),q=Math.floor(a.y),u=a.width>0?Math.ceil(a.get_right())-l:0,v=a.height>0?Math.ceil(a.get_bottom())-q:0;c.__backBufferWantsBestResolution&&(l=Math.floor(a.x/c.__stage.window.__scale),q=Math.floor(a.y/c.__stage.window.__scale),u=a.width>0?Math.ceil(a.get_right()/c.__stage.window.__scale)-l:
0,v=a.height>0?Math.ceil(a.get_bottom()/c.__stage.window.__scale)-q:0);Dc.__fillRectRectangle.setTo(l,q,u,v);c.setScissorRectangle(Dc.__fillRectRectangle)}c.__clear(d,(b>>>16&255)/255,(b>>>8&255)/255,(b&255)/255,this.transparent?(b>>>24&255)/255:1,0,0,1);d&&c.setScissorRectangle(null);f!=null?c.setRenderToTexture(f,g,h,n):c.setRenderToBackBuffer()}else this.readable&&this.image.fillRect(a.__toLimeRectangle(),b,1)},__fromBase64:function(a,b){a=Oc.fromBase64(a,b);this.__fromImage(a)},__fromBytes:function(a,
b){a=Oc.fromBytes(mc.toBytes(a));this.__fromImage(a);b!=null&&this.__applyAlpha(b)},__fromFile:function(a){a=Oc.fromFile(a);this.__fromImage(a)},__fromImage:function(a){a!=null&&a.buffer!=null&&(this.image=a,this.width=a.width,this.height=a.height,this.rect=new Ia(0,0,a.width,a.height),this.__textureWidth=this.width,this.__textureHeight=this.height,this.__isValid=this.readable=!0)},__getBounds:function(a,b){var c=Ia.__pool.get();this.rect.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ia.__pool.release(c)},
__loadFromBase64:function(a,b){var c=this;return Oc.loadFromBase64(a,b).then(function(d){c.__fromImage(d);return Hc.withValue(c)})},__loadFromBytes:function(a,b){var c=this;return Oc.loadFromBytes(mc.toBytes(a)).then(function(d){c.__fromImage(d);b!=null&&c.__applyAlpha(b);return Hc.withValue(c)})},__loadFromFile:function(a){var b=this;return Oc.loadFromFile(a).then(function(c){b.__fromImage(c);return Hc.withValue(b)})},__resize:function(a,b){this.width=a;this.height=b;this.rect.width=a;this.rect.height=
b;this.__textureWidth=a;this.__textureHeight=b},__setUVRect:function(a,b,c,d,f){if(this.getVertexBuffer(a)!=null&&(d!=this.__uvRect.width||f!=this.__uvRect.height||b!=this.__uvRect.x||c!=this.__uvRect.y)){this.__uvRect==null&&(this.__uvRect=new Ia);this.__uvRect.setTo(b,c,d,f);a=this.__textureWidth>0?b/this.__textureWidth:0;c=this.__textureHeight>0?c/this.__textureHeight:0;b=this.__textureWidth>0?d/this.__textureWidth:0;var g=this.__textureHeight>0?f/this.__textureHeight:0;this.__vertexBufferData[0]=
d;this.__vertexBufferData[1]=f;this.__vertexBufferData[3]=a+b;this.__vertexBufferData[4]=c+g;this.__vertexBufferData[15]=f;this.__vertexBufferData[17]=a;this.__vertexBufferData[18]=c+g;this.__vertexBufferData[28]=d;this.__vertexBufferData[31]=a+b;this.__vertexBufferData[32]=c;this.__vertexBufferData[45]=a;this.__vertexBufferData[46]=c;this.__vertexBuffer.uploadFromTypedArray(el.toArrayBufferView(this.__vertexBufferData))}},__sync:function(){yb.sync(this.image,!1)},__update:function(a,b){this.__updateTransforms()},
__updateTransforms:function(a){a==null?this.__worldTransform.identity():this.__worldTransform.copyFrom(a);this.__renderTransform.copyFrom(this.__worldTransform)},__class__:Dc};var Gh=function(){qa.call(this);this.__allowSmoothing=!0;this.__pixelRatio=1;this.__tempColorTransform=new wc;this.__worldAlpha=1;this.__blendMode=10};t["openfl.display.DisplayObjectRenderer"]=Gh;Gh.__name__="openfl.display.DisplayObjectRenderer";Gh.__super__=qa;Gh.prototype=I(qa.prototype,{__allowSmoothing:null,__blendMode:null,
__cleared:null,__context:null,__overrideBlendMode:null,__pixelRatio:null,__roundPixels:null,__stage:null,__tempColorTransform:null,__transparent:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__clear:function(){},__getAlpha:function(a){return a*this.__worldAlpha},__getColorTransform:function(a){return this.__worldColorTransform!=null?(this.__tempColorTransform.__copyFrom(this.__worldColorTransform),this.__tempColorTransform.__combine(a),this.__tempColorTransform):
a},__popMask:function(){},__popMaskObject:function(a,b){},__popMaskRect:function(){},__pushMask:function(a){},__pushMaskObject:function(a,b){},__pushMaskRect:function(a,b){},__render:function(a){},__renderEvent:function(a){if(a.__customRenderEvent!=null&&a.__renderable){a.__customRenderEvent.allowSmoothing=this.__allowSmoothing;a.__customRenderEvent.objectMatrix.copyFrom(a.__renderTransform);a.__customRenderEvent.objectColorTransform.__copyFrom(a.__worldColorTransform);a.__customRenderEvent.renderer=
this;switch(this.__type){case "cairo":a.__customRenderEvent.type="renderCairo";break;case "canvas":a.__customRenderEvent.type="renderCanvas";break;case "dom":a.__customRenderEvent.type=a.stage!=null&&a.__worldVisible?"renderDOM":"clearDOM";break;case "opengl":this.__cleared||this.__clear();this.setShader(a.__worldShader);this.__context3D.__flushGL();a.__customRenderEvent.type="renderOpenGL";break;default:return}this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(a.__customRenderEvent);
this.__popMaskObject(a);this.__type=="opengl"&&this.setViewport()}},__resize:function(a,b){},__setBlendMode:function(a){},__shouldCacheHardware:function(a,b){if(a==null)return null;switch(a.__drawableType){case 4:case 5:if(b==1)return!0;b=this.__shouldCacheHardware_DisplayObject(a,b);if(b==1)return!0;if(a.__children!=null){var c=0;for(a=a.__children;c<a.length;){var d=a[c];++c;b=this.__shouldCacheHardware_DisplayObject(d,b);if(b==1)return!0}}return b;case 7:return b==1?!0:!1;case 9:return!0;default:return this.__shouldCacheHardware_DisplayObject(a,
b)}},__shouldCacheHardware_DisplayObject:function(a,b){return b==1||a.__filters!=null?!0:b==0||a.__graphics!=null&&!Ha.isCompatible(a.__graphics)?!1:null},__updateCacheBitmap:function(a,b){if(a==null)return!1;switch(a.__drawableType){case 2:var c=a;if(c.__bitmapData==null||c.__filters==null&&this.__type=="opengl"&&c.__cacheBitmap==null)return!1;b=c.__bitmapData.image!=null&&c.__bitmapData.image.version!=c.__imageVersion;break;case 7:var d=a;if(d.__filters==null&&this.__type=="opengl"&&d.__cacheBitmap==
null&&!d.__domRender)return!1;b&&(d.__renderDirty=!0);b=b||d.__dirty;break;case 9:if(a.__filters==null&&this.__type=="opengl"&&a.__cacheBitmap==null)return!1}if(a.__isCacheBitmapRender)return!1;d=wc.__pool.get();d.__copyFrom(a.__worldColorTransform);this.__worldColorTransform!=null&&d.__combine(this.__worldColorTransform);var f=!1;if(a.get_cacheAsBitmap()||this.__type!="opengl"&&!d.__isDefault(!0)){f=null;var g=(b=a.__cacheBitmap==null||a.__renderDirty&&(b||a.__children!=null&&a.__children.length>
0)||a.opaqueBackground!=a.__cacheBitmapBackground)||a.__graphics!=null&&a.__graphics.__softwareDirty||!a.__cacheBitmapColorTransform.__equals(d,!0),h=b||a.__graphics!=null&&a.__graphics.__hardwareDirty,n=this.__type;if(g||h)n=="opengl"&&this.__shouldCacheHardware(a,null)==0&&(n="canvas"),!g||n!="canvas"&&n!="cairo"||(b=!0),h&&n=="opengl"&&(b=!0);g=b||!a.__cacheBitmap.__worldTransform.equals(a.__worldTransform);c=a.__filters!=null;if(this.__type=="dom"&&!c)return!1;if(c&&!b){if(g){h=a.__cacheBitmap.__worldTransform;
var l=a.__worldTransform;var q=Math.abs(h.a-l.a)>1E-4||Math.abs(h.b-l.b)>1E-4||Math.abs(h.c-l.c)>1E-4||Math.abs(h.d-l.d)>1E-4}else q=!1;h=0;for(l=a.__filters;h<l.length;){var u=l[h];++h;if(u.__renderDirty){b=!0;break}if(q&&u instanceof Rm){a.__cacheBitmapData=null;b=!0;break}}}a.__cacheBitmapMatrix==null&&(a.__cacheBitmapMatrix=new gb);h=a.__cacheAsBitmapMatrix!=null?a.__cacheAsBitmapMatrix:a.__renderTransform;b||h.a==a.__cacheBitmapMatrix.a&&h.b==a.__cacheBitmapMatrix.b&&h.c==a.__cacheBitmapMatrix.c&&
h.d==a.__cacheBitmapMatrix.d||(b=!0);!b&&this.__type!="opengl"&&a.__cacheBitmapData!=null&&a.__cacheBitmapData.image!=null&&a.__cacheBitmapData.image.version<a.__cacheBitmapData.__textureVersion&&(b=!0);if(!b)for(l=a;l!=null;){if(l.get_scrollRect()!=null){g=!0;break}l=l.parent}a.__cacheBitmapMatrix.copyFrom(h);a.__cacheBitmapMatrix.tx=0;var v=q=a.__cacheBitmapMatrix.ty=0,z=0,r=0,F=u=0;l=this.__pixelRatio;if(g||b)f=Ia.__pool.get(),a.__getFilterBounds(f,a.__cacheBitmapMatrix),z=f.width>0?Math.ceil((f.width+
1)*l):0,r=f.height>0?Math.ceil((f.height+1)*l):0,u=f.x>0?Math.ceil(f.x):Math.floor(f.x),F=f.y>0?Math.ceil(f.y):Math.floor(f.y),a.__cacheBitmapData!=null?z>a.__cacheBitmapData.width||r>a.__cacheBitmapData.height?(q=Math.ceil(Math.max(z*1.25,a.__cacheBitmapData.width)),v=Math.ceil(Math.max(r*1.25,a.__cacheBitmapData.height)),b=!0):(q=a.__cacheBitmapData.width,v=a.__cacheBitmapData.height):(q=z,v=r);if(b)if(g=!0,a.__cacheBitmapBackground=a.opaqueBackground,z>=.5&&r>=.5){var J=a.opaqueBackground!=null&&
(q!=z||v!=r),L=a.opaqueBackground!=null?-16777216|a.opaqueBackground:0,Q=J?0:L,W=this.__type=="opengl";a.__cacheBitmapData==null||q>a.__cacheBitmapData.width||v>a.__cacheBitmapData.height?(a.__cacheBitmapData=new Dc(q,v,!0,Q),a.__cacheBitmap==null&&(a.__cacheBitmap=new Ma),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null):a.__cacheBitmapData.__fillRect(a.__cacheBitmapData.rect,Q,W);J&&(f.setTo(0,0,z,r),a.__cacheBitmapData.__fillRect(f,L,W))}else return wc.__pool.release(d),
a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapRenderer=null,a.__drawableType==7&&(d=a,d.__cacheBitmap!=null&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX*l,d.__cacheBitmap.__renderTransform.ty-=d.__offsetY*l)),!0;else a.__cacheBitmapData=a.__cacheBitmap.get_bitmapData(),a.__cacheBitmapData2=null,a.__cacheBitmapData3=null;if(g||b)a.__cacheBitmap.__worldTransform.copyFrom(a.__worldTransform),h==a.__renderTransform?(a.__cacheBitmap.__renderTransform.identity(),
a.__cacheBitmap.__renderTransform.scale(1/l,1/l),a.__cacheBitmap.__renderTransform.tx=a.__renderTransform.tx+u,a.__cacheBitmap.__renderTransform.ty=a.__renderTransform.ty+F):(a.__cacheBitmap.__renderTransform.copyFrom(a.__cacheBitmapMatrix),a.__cacheBitmap.__renderTransform.invert(),a.__cacheBitmap.__renderTransform.concat(a.__renderTransform),a.__cacheBitmap.__renderTransform.a*=1/l,a.__cacheBitmap.__renderTransform.d*=1/l,a.__cacheBitmap.__renderTransform.tx+=u,a.__cacheBitmap.__renderTransform.ty+=
F);a.__cacheBitmap.smoothing=this.__allowSmoothing;a.__cacheBitmap.__renderable=a.__renderable;a.__cacheBitmap.__worldAlpha=a.__worldAlpha;a.__cacheBitmap.__worldBlendMode=a.__worldBlendMode;a.__cacheBitmap.__worldShader=a.__worldShader;a.__cacheBitmap.set_clippingLayer(a.__mask);if(b){if(a.__cacheBitmapRenderer==null||n!=a.__cacheBitmapRenderer.__type)n=="opengl"?a.__cacheBitmapRenderer=new yc(w.__cast(this,yc).__context3D,a.__cacheBitmapData):(a.__cacheBitmapData.image==null&&(a.__cacheBitmapData=
new Dc(q,v,!0,a.opaqueBackground!=null?-16777216|a.opaqueBackground:0),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData),yb.convertToCanvas(a.__cacheBitmapData.image),a.__cacheBitmapRenderer=new il(a.__cacheBitmapData.image.buffer.__srcContext)),a.__cacheBitmapRenderer.__worldTransform=new gb,a.__cacheBitmapRenderer.__worldColorTransform=new wc;a.__cacheBitmapColorTransform==null&&(a.__cacheBitmapColorTransform=new wc);a.__cacheBitmapRenderer.__stage=a.stage;a.__cacheBitmapRenderer.__allowSmoothing=
this.__allowSmoothing;a.__cacheBitmapRenderer.__setBlendMode(10);a.__cacheBitmapRenderer.__worldAlpha=1/a.__worldAlpha;a.__cacheBitmapRenderer.__worldTransform.copyFrom(a.__renderTransform);a.__cacheBitmapRenderer.__worldTransform.invert();a.__cacheBitmapRenderer.__worldTransform.concat(a.__cacheBitmapMatrix);a.__cacheBitmapRenderer.__worldTransform.tx-=u;a.__cacheBitmapRenderer.__worldTransform.ty-=F;a.__cacheBitmapRenderer.__worldTransform.scale(l,l);a.__cacheBitmapRenderer.__pixelRatio=l;a.__cacheBitmapRenderer.__worldColorTransform.__copyFrom(d);
a.__cacheBitmapRenderer.__worldColorTransform.__invert();a.__isCacheBitmapRender=!0;if(a.__cacheBitmapRenderer.__type=="opengl"){J=a.__cacheBitmapRenderer;L=J.__context3D;Q=L.__state.renderToTexture;W=L.__state.renderToTextureDepthStencil;var ka=L.__state.renderToTextureAntiAlias,ha=L.__state.renderToTextureSurfaceSelector,ta=this.__blendMode;this.__suspendClipAndMask();J.__copyShader(this);a.__cacheBitmapData.__setUVRect(L,0,0,z,r);J.__setRenderTarget(a.__cacheBitmapData);a.__cacheBitmapData.image!=
null&&(a.__cacheBitmapData.__textureVersion=a.__cacheBitmapData.image.version+1);a.__cacheBitmapData.__drawGL(a,J);if(c){var za=!1;h=0;for(l=a.__filters;h<l.length;)u=l[h],++h,u.__preserveObject&&(za=!0);c=a.__cacheBitmapData;F=null;a.__cacheBitmapData2==null||q>a.__cacheBitmapData2.width||v>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new Dc(q,v,!0,0):(a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),a.__cacheBitmapData2.image!=null&&(a.__cacheBitmapData2.__textureVersion=a.__cacheBitmapData2.image.version+
1));a.__cacheBitmapData2.__setUVRect(L,0,0,z,r);n=a.__cacheBitmapData2;za&&(a.__cacheBitmapData3==null||q>a.__cacheBitmapData3.width||v>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new Dc(q,v,!0,0):(a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),a.__cacheBitmapData3.image!=null&&(a.__cacheBitmapData3.__textureVersion=a.__cacheBitmapData3.image.version+1)),a.__cacheBitmapData3.__setUVRect(L,0,0,z,r),F=a.__cacheBitmapData3);J.__setBlendMode(10);J.__worldAlpha=1;J.__worldTransform.identity();
J.__worldColorTransform.__identity();h=0;for(l=a.__filters;h<l.length;){u=l[h];++h;u.__preserveObject&&(J.__setRenderTarget(F),J.__renderFilterPass(c,J.__defaultDisplayShader,u.__smooth));v=0;for(z=u.__numShaderPasses;v<z;)q=v++,q=u.__initShader(J,q,u.__preserveObject?F:null),J.__setBlendMode(u.__shaderBlendMode),J.__setRenderTarget(n),J.__renderFilterPass(c,q,u.__smooth),q=c,c=n,n=q;u.__renderDirty=!1}a.__cacheBitmap.__bitmapData=c}this.__blendMode=10;this.__setBlendMode(ta);this.__copyShader(J);
Q!=null?L.setRenderToTexture(Q,W,ka,ha):L.setRenderToBackBuffer();this.__resumeClipAndMask(J);this.setViewport();a.__cacheBitmapColorTransform.__copyFrom(d)}else{a.__cacheBitmapData.__drawCanvas(a,a.__cacheBitmapRenderer);if(c){za=z=!1;h=0;for(l=a.__filters;h<l.length;)u=l[h],++h,u.__needSecondBitmapData&&(z=!0),u.__preserveObject&&(za=!0);c=a.__cacheBitmapData;F=null;z?(a.__cacheBitmapData2==null||a.__cacheBitmapData2.image==null||q>a.__cacheBitmapData2.width||v>a.__cacheBitmapData2.height?a.__cacheBitmapData2=
new Dc(q,v,!0,0):a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),n=a.__cacheBitmapData2):n=c;za&&(a.__cacheBitmapData3==null||a.__cacheBitmapData3.image==null||q>a.__cacheBitmapData3.width||v>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new Dc(q,v,!0,0):a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),F=a.__cacheBitmapData3);a.__tempPoint==null&&(a.__tempPoint=new Ea);v=a.__tempPoint;h=0;for(l=a.__filters;h<l.length;)u=l[h],++h,u.__preserveObject&&F.copyPixels(c,c.rect,v),
q=u.__applyFilter(n,c,c.rect,v),u.__preserveObject&&q.draw(F,null,a.__objectTransform!=null?a.__objectTransform.__colorTransform:null),u.__renderDirty=!1,z&&q==n&&(q=c,c=n,n=q);a.__cacheBitmapData!=c&&(q=a.__cacheBitmapData,a.__cacheBitmapData=c,a.__cacheBitmapData2=q,a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null);a.__cacheBitmap.__imageVersion=a.__cacheBitmapData.__textureVersion}a.__cacheBitmapColorTransform.__copyFrom(d);a.__cacheBitmapColorTransform.__isDefault(!0)||
(a.__cacheBitmapColorTransform.alphaMultiplier=1,a.__cacheBitmapData.colorTransform(a.__cacheBitmapData.rect,a.__cacheBitmapColorTransform))}a.__isCacheBitmapRender=!1}(g||b)&&Ia.__pool.release(f);f=g}else a.__cacheBitmap!=null&&(this.__type=="dom"&&this.__renderDrawableClear(a.__cacheBitmap),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapColorTransform=null,a.__cacheBitmapRenderer=null,f=!0);wc.__pool.release(d);f&&a.__drawableType==
7&&(d=a,d.__cacheBitmap!=null&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX,d.__cacheBitmap.__renderTransform.ty-=d.__offsetY));return f},__affineChanged:function(a,b,c){c==null&&(c=1E-4);return Math.abs(a.a-b.a)>c||Math.abs(a.b-b.b)>c||Math.abs(a.c-b.c)>c?!0:Math.abs(a.d-b.d)>c},__isShaderFilter:function(a){return a instanceof Rm},__class__:Gh});var Lu=function(a){Gh.call(this)};t["openfl.display.CairoRenderer"]=Lu;Lu.__name__="openfl.display.CairoRenderer";Lu.__super__=Gh;Lu.prototype=I(Gh.prototype,
{cairo:null,__matrix:null,__matrix3:null,applyMatrix:function(a,b){b==null&&(b=this.cairo);this.__matrix.copyFrom(a);this.cairo==b&&this.__worldTransform!=null&&this.__matrix.concat(this.__worldTransform);this.__matrix3[0]=this.__matrix.a;this.__matrix3[1]=this.__matrix.b;this.__matrix3[3]=this.__matrix.c;this.__matrix3[4]=this.__matrix.d;this.__roundPixels?(this.__matrix3[6]=Math.round(this.__matrix.tx),this.__matrix3[7]=Math.round(this.__matrix.ty)):(this.__matrix3[6]=this.__matrix.tx,this.__matrix3[7]=
this.__matrix.ty);b.set_matrix(this.__matrix3)},__clear:function(){if(this.cairo!=null&&(this.cairo.identityMatrix(),this.__stage!=null&&this.__stage.__clearBeforeRender)){var a=this.__blendMode;this.__setBlendMode(10);this.cairo.setSourceRGB(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2]);this.cairo.paint();this.__setBlendMode(a)}},__popMask:function(){this.cairo.restore()},__popMaskObject:function(a,b){b==null&&(b=!0);a.__isCacheBitmapRender||a.__mask==null||
this.__popMask();b&&a.__scrollRect!=null&&this.__popMaskRect()},__popMaskRect:function(){this.cairo.restore()},__pushMask:function(a){this.cairo.save();this.applyMatrix(a.__renderTransform,this.cairo);this.cairo.newPath();this.__renderDrawableMask(a);this.cairo.clip()},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=null&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||a.__mask==null||this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.cairo.save();
this.applyMatrix(b,this.cairo);this.cairo.newPath();this.cairo.rectangle(a.x,a.y,a.width,a.height);this.cairo.clip()},__render:function(a){this.cairo!=null&&this.__renderDrawable(a)},__renderDrawable:function(a){if(a!=null)switch(a.__drawableType){case 6:!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(this.__pushMaskObject(a),this.__renderDrawable(a.__currentState),this.__popMaskObject(a),this.__renderEvent(a))}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 2:this.cairo.rectangle(0,
0,a.get_width(),a.get_height());break;case 6:this.__renderDrawableMask(a.__currentState)}},__setBlendMode:function(a){this.__overrideBlendMode!=null&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a,this.__setBlendModeCairo(this.cairo,a))},__setBlendModeCairo:function(a,b){switch(b){case 0:a.setOperator(12);break;case 2:a.setOperator(17);break;case 3:a.setOperator(23);break;case 5:a.setOperator(21);break;case 7:a.setOperator(2);break;case 8:a.setOperator(18);break;case 9:a.setOperator(14);
break;case 11:a.setOperator(16);break;case 12:a.setOperator(15);break;default:a.setOperator(2)}},__class__:Lu});var il=function(a){Gh.call(this);this.context=a;this.__tempMatrix=new gb;this.__type="canvas"};t["openfl.display.CanvasRenderer"]=il;il.__name__="openfl.display.CanvasRenderer";il.__super__=Gh;il.prototype=I(Gh.prototype,{context:null,__isDOM:null,__tempMatrix:null,applySmoothing:function(a,b){a.imageSmoothingEnabled=b},setTransform:function(a,b){b==null?b=this.context:this.context==b&&
this.__worldTransform!=null&&(this.__tempMatrix.copyFrom(a),this.__tempMatrix.concat(this.__worldTransform),a=this.__tempMatrix);this.__roundPixels?b.setTransform(a.a,a.b,a.c,a.d,a.tx|0,a.ty|0):b.setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty)},__clear:function(){if(this.__stage!=null){var a=this.__blendMode;this.__blendMode=null;this.__setBlendMode(10);this.context.setTransform(1,0,0,1,0,0);this.context.globalAlpha=1;!this.__stage.__transparent&&this.__stage.__clearBeforeRender?(this.context.fillStyle=this.__stage.__colorString,
this.context.fillRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale)):this.__stage.__transparent&&this.__stage.__clearBeforeRender&&this.context.clearRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale);this.__setBlendMode(a)}},__popMask:function(){this.context.restore()},__popMaskObject:function(a,b){b==null&&(b=!0);a.__isCacheBitmapRender||a.__mask==null||this.__popMask();
b&&a.__scrollRect!=null&&this.__popMaskRect()},__popMaskRect:function(){this.context.restore()},__pushMask:function(a){this.context.save();this.setTransform(a.__renderTransform,this.context);this.context.beginPath();this.__renderDrawableMask(a);this.context.closePath();this.context.clip()},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=null&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||a.__mask==null||this.__pushMask(a.__mask)},__pushMaskRect:function(a,
b){this.context.save();this.setTransform(b,this.context);this.context.beginPath();this.context.rect(a.x,a.y,a.width,a.height);this.context.clip()},__render:function(a){this.__renderDrawable(a)},__renderDrawable:function(a){if(a!=null)switch(a.__drawableType){case 0:Mu.renderDrawable(a,this);break;case 2:po.renderDrawable(a,this);break;case 3:Wl.renderDrawable(a,this);break;case 4:case 5:Nu.renderDrawable(a,this);break;case 6:Ou.renderDrawable(a,this);break;case 7:oa.renderDrawable(a,this);break;case 8:Sm.renderDrawable(a,
this);break;case 9:vj.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 0:Mu.renderDrawableMask(a,this);break;case 2:po.renderDrawableMask(a,this);break;case 3:Wl.renderDrawableMask(a,this);break;case 4:case 5:Nu.renderDrawableMask(a,this);break;case 6:Ou.renderDrawableMask(a,this);break;case 7:oa.renderDrawableMask(a,this);break;case 8:Sm.renderDrawableMask(a,this);break;case 9:vj.renderDrawableMask(a,this)}},__setBlendMode:function(a){this.__overrideBlendMode!=
null&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a,this.__setBlendModeContext(this.context,a))},__setBlendModeContext:function(a,b){switch(b){case 0:a.globalCompositeOperation="lighter";break;case 2:a.globalCompositeOperation="darken";break;case 3:a.globalCompositeOperation="difference";break;case 5:a.globalCompositeOperation="hard-light";break;case 8:a.globalCompositeOperation="lighten";break;case 9:a.globalCompositeOperation="multiply";break;case 11:a.globalCompositeOperation=
"overlay";break;case 12:a.globalCompositeOperation="screen";break;default:a.globalCompositeOperation="source-over"}},__class__:il});var iz={fromInt:function(a){return a},fromString:function(a){switch(a){case "none":return 0;case "round":return 1;case "square":return 2;default:return null}},toInt:function(a){return a},toString:function(a){switch(a){case 0:return"none";case 1:return"round";case 2:return"square";default:return null}}},Pu=function(a){ma.call(this);this.__drawableType=10;this.__element=
a};t["openfl.display.DOMElement"]=Pu;Pu.__name__="openfl.display.DOMElement";Pu.__super__=ma;Pu.prototype=I(ma.prototype,{__active:null,__element:null,__class__:Pu});var rq=function(a){Gh.call(this);this.element=a;ma.__supportDOM=!0;a=window.getComputedStyle(document.documentElement,"");a=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||a.OLink===""&&["","o"])[1];"WebKit|Moz|MS|O".match(new RegExp("("+a+")","i"));a[0].toUpperCase();a.substr(1);this.__vendorPrefix=a;this.__transformProperty=
a=="webkit"?"-webkit-transform":"transform";this.__transformOriginProperty=a=="webkit"?"-webkit-transform-origin":"transform-origin";this.__clipRects=[];this.__z=this.__numClipRects=0;this.__type="dom";this.__canvasRenderer=new il(null);this.__canvasRenderer.__isDOM=!0};t["openfl.display.DOMRenderer"]=rq;rq.__name__="openfl.display.DOMRenderer";rq.__super__=Gh;rq.prototype=I(Gh.prototype,{element:null,__canvasRenderer:null,__clipRects:null,__currentClipRect:null,__numClipRects:null,__transformOriginProperty:null,
__transformProperty:null,__vendorPrefix:null,__z:null,applyStyle:function(a,b){a!=null&&b!=null&&(a.__style!=null&&b.parentElement==this.element||this.__initializeElement(a,b),a.__style=b.style,this.__updateClip(a),this.__applyStyle(a,!0,!0,!0))},clearStyle:function(a){a!=null&&a.parentElement==this.element&&this.element.removeChild(a)},__applyStyle:function(a,b,c,d){var f=a.__style;if(b&&a.__renderTransformChanged){b=a.__renderTransform;var g=this.__roundPixels;g==null&&(g=!1);f.setProperty(this.__transformProperty,
g?"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+(b.tx|0)+", "+(b.ty|0)+", 0, 1)":"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+b.tx+", "+b.ty+", 0, 1)",null)}a.__worldZ!=++this.__z&&(a.__worldZ=this.__z,f.setProperty("z-index",a.__worldZ==null?"null":""+a.__worldZ,null));c&&a.__worldAlphaChanged&&(a.__worldAlpha<1?f.setProperty("opacity",a.__worldAlpha==null?"null":""+a.__worldAlpha,null):f.removeProperty("opacity"));d&&a.__worldClipChanged&&(a.__worldClip==
null?f.removeProperty("clip"):(a=a.__worldClip,f.setProperty("clip","rect("+a.y+"px, "+a.get_right()+"px, "+a.get_bottom()+"px, "+a.x+"px)",null)))},__initializeElement:function(a,b){var c=a.__style=b.style;c.setProperty("position","absolute",null);c.setProperty("top","0",null);c.setProperty("left","0",null);c.setProperty(this.__transformOriginProperty,"0 0 0",null);this.element.appendChild(b);a.__worldAlphaChanged=!0;a.__renderTransformChanged=!0;a.__worldVisibleChanged=!0;a.__worldClipChanged=!0;
a.__worldClip=null;a.__worldZ=-1},__popMask:function(){this.__popMaskRect()},__popMaskObject:function(a,b){b==null&&(b=!0);a.__mask!=null&&this.__popMask();b&&a.__scrollRect!=null&&this.__popMaskRect()},__popMaskRect:function(){this.__numClipRects>0&&(this.__numClipRects--,this.__currentClipRect=this.__numClipRects>0?this.__clipRects[this.__numClipRects-1]:null)},__pushMask:function(a){this.__pushMaskRect(a.getBounds(a),a.__renderTransform)},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=
null&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__mask!=null&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=new Ia);var c=this.__clipRects[this.__numClipRects];a.__transform(c,b);this.__numClipRects>0&&(a=this.__clipRects[this.__numClipRects-1],c.__contract(a.x,a.y,a.width,a.height));c.height<0&&(c.height=0);c.width<0&&(c.width=0);this.__currentClipRect=c;this.__numClipRects++},__render:function(a){this.element.style.background=
this.__stage.__transparent?"none":this.__stage.__colorString;this.__z=1;this.__renderDrawable(a)},__renderDrawable:function(a){if(a!=null)switch(a.__drawableType){case 2:Yd.renderDrawable(a,this);break;case 3:jh.renderDrawable(a,this);break;case 4:case 5:Qu.renderDrawable(a,this);break;case 6:Ru.renderDrawable(a,this);break;case 7:kh.renderDrawable(a,this);break;case 8:jl.renderDrawable(a,this);break;case 9:wk.renderDrawable(a,this);break;case 10:a.stage!=null&&a.__worldVisible&&a.__renderable?(a.__active||
(this.__initializeElement(a,a.__element),a.__active=!0),this.__updateClip(a),this.__applyStyle(a,!0,!0,!0)):a.__active&&(this.element.removeChild(a.__element),a.__active=!1),jh.renderDrawable(a,this)}},__renderDrawableClear:function(a){if(a!=null)switch(a.__drawableType){case 2:Yd.renderDrawableClear(a,this);break;case 3:jh.renderDrawableClear(a,this);break;case 4:case 5:Qu.renderDrawableClear(a,this);break;case 6:Ru.renderDrawableClear(a,this);break;case 7:kh.renderDrawableClear(a,this);break;case 8:jl.renderDrawableClear(a,
this);break;case 9:wk.renderDrawableClear(a,this)}},__setBlendMode:function(a){this.__overrideBlendMode!=null&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a)},__updateClip:function(a){if(this.__currentClipRect==null)a.__worldClipChanged=a.__worldClip!=null,a.__worldClip=null;else{a.__worldClip==null&&(a.__worldClip=new Ia);var b=Ia.__pool.get(),c=gb.__pool.get();c.copyFrom(a.__renderTransform);c.invert();this.__currentClipRect.__transform(b,c);b.equals(a.__worldClip)?a.__worldClipChanged=
!1:(a.__worldClip.copyFrom(b),a.__worldClipChanged=!0);Ia.__pool.release(b);gb.__pool.release(c)}},__class__:rq});var bi=function(a){this.byteCode=a;this.precisionHint=1;this.__glSourceDirty=!0;this.__numPasses=1;this.__data=$z._new(a)};t["openfl.display.Shader"]=bi;bi.__name__="openfl.display.Shader";bi.prototype={byteCode:null,glProgram:null,precisionHint:null,program:null,__alpha:null,__bitmap:null,__colorMultiplier:null,__colorOffset:null,__context:null,__data:null,__glFragmentSource:null,__glSourceDirty:null,
__glVertexSource:null,__hasColorTransform:null,__inputBitmapData:null,__isGenerated:null,__matrix:null,__numPasses:null,__paramBool:null,__paramFloat:null,__paramInt:null,__position:null,__textureCoord:null,__texture:null,__textureSize:null,__clearUseArray:function(){for(var a=0,b=this.__paramBool;a<b.length;){var c=b[a];++a;c.__useArray=!1}a=0;for(b=this.__paramFloat;a<b.length;)c=b[a],++a,c.__useArray=!1;a=0;for(b=this.__paramInt;a<b.length;)c=b[a],++a,c.__useArray=!1},__createGLShader:function(a,
b){var c=this.__context.gl,d=c.createShader(b);c.shaderSource(d,a);c.compileShader(d);var f=c.getShaderInfoLog(d),g=f!=null&&N.trim(f)!="",h=c.getShaderParameter(d,c.COMPILE_STATUS);if(g||h==0)b=(h==0?"Error":"Info")+(b==c.VERTEX_SHADER?" compiling vertex shader":" compiling fragment shader"),b=b+("\n"+f)+("\n"+a),h==0?Vb.error(b,{fileName:"openfl/display/Shader.hx",lineNumber:336,className:"openfl.display.Shader",methodName:"__createGLShader"}):g&&Vb.debug(b,{fileName:"openfl/display/Shader.hx",
lineNumber:337,className:"openfl.display.Shader",methodName:"__createGLShader"});return d},__createGLProgram:function(a,b){var c=this.__context.gl;a=this.__createGLShader(a,c.VERTEX_SHADER);var d=this.__createGLShader(b,c.FRAGMENT_SHADER);b=c.createProgram();for(var f=0,g=this.__paramFloat;f<g.length;){var h=g[f];++f;if(h.name.indexOf("Position")>-1&&N.startsWith(h.name,"openfl_")){c.bindAttribLocation(b,0,h.name);break}}c.attachShader(b,a);c.attachShader(b,d);c.linkProgram(b);c.getProgramParameter(b,
c.LINK_STATUS)==0&&(c="Unable to initialize the shader program\n"+c.getProgramInfoLog(b),Vb.error(c,{fileName:"openfl/display/Shader.hx",lineNumber:370,className:"openfl.display.Shader",methodName:"__createGLProgram"}));return b},__disable:function(){this.program!=null&&this.__disableGL()},__disableGL:function(){for(var a=this.__context.gl,b=0,c=0,d=this.__inputBitmapData;c<d.length;){var f=d[c];++c;f.__disableGL(this.__context,b);++b;if(b==a.MAX_TEXTURE_IMAGE_UNITS)break}c=0;for(d=this.__paramBool;c<
d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramFloat;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramInt;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);this.__context.__bindGLArrayBuffer(null);this.__context.__context.type=="opengl"&&a.disable(a.TEXTURE_2D)},__enable:function(){this.__init();this.program!=null&&this.__enableGL()},__enableGL:function(){for(var a=0,b=this.__context.gl,c=0,d=this.__inputBitmapData;c<d.length;){var f=d[c];++c;
b.uniform1i(f.index,a);++a}this.__context.__context.type=="opengl"&&a>0&&b.enable(b.TEXTURE_2D)},__init:function(){this.__data==null&&(this.__data=$z._new(null));this.__glFragmentSource==null||this.__glVertexSource==null||this.program!=null&&!this.__glSourceDirty||this.__initGL()},__initGL:function(){if(this.__glSourceDirty||this.__paramBool==null)this.__glSourceDirty=!1,this.program=null,this.__inputBitmapData=[],this.__paramBool=[],this.__paramFloat=[],this.__paramInt=[],this.__processGLData(this.get_glVertexSource(),
"attribute"),this.__processGLData(this.get_glVertexSource(),"uniform"),this.__processGLData(this.get_glFragmentSource(),"uniform");if(this.__context!=null&&this.program==null){var a=this.__context.gl,b=this.precisionHint==1?"precision mediump float;\n":"precision lowp float;\n",c=b+this.get_glVertexSource();b+=this.get_glFragmentSource();var d=c+b;Object.prototype.hasOwnProperty.call(this.__context.__programs.h,d)?this.program=this.__context.__programs.h[d]:(this.program=this.__context.createProgram(1),
this.program.__glProgram=this.__createGLProgram(c,b),this.__context.__programs.h[d]=this.program);if(this.program!=null){this.glProgram=this.program.__glProgram;c=0;for(b=this.__inputBitmapData;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramBool;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramFloat;c<
b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramInt;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name)}}},__processGLData:function(a,b){var c=0,d;for(d=b=="uniform"?new Wa("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new Wa("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var f=d.matched(1);var g=d.matched(2);
if(!N.startsWith(g,"gl_")){c=b=="uniform";if(N.startsWith(f,"sampler")){f=new Su;f.name=g;f.__isUniform=c;this.__inputBitmapData.push(f);switch(g){case "bitmap":this.__bitmap=f;break;case "openfl_Texture":this.__texture=f}this.__data[g]=f;this.__isGenerated&&(this[g]=f)}else if(!Object.prototype.hasOwnProperty.call(this.__data,g)||y.field(this.__data,g)==null){switch(f){case "bool":var h=0;break;case "bvec2":h=1;break;case "bvec3":h=2;break;case "bvec4":h=3;break;case "dvec2":case "vec2":h=5;break;
case "dvec3":case "vec3":h=6;break;case "dvec4":case "vec4":h=7;break;case "double":case "float":h=4;break;case "mat2":case "mat2x2":h=12;break;case "mat2x3":h=13;break;case "mat2x4":h=14;break;case "mat3x2":h=15;break;case "mat3":case "mat3x3":h=16;break;case "mat3x4":h=17;break;case "mat4x2":h=18;break;case "mat4x3":h=19;break;case "mat4":case "mat4x4":h=20;break;case "int":case "uint":h=8;break;case "ivec2":case "uvec2":h=9;break;case "ivec3":case "uvec3":h=10;break;case "ivec4":case "uvec4":h=
11;break;default:h=null}switch(h){case 1:case 5:case 9:f=2;break;case 2:case 6:case 10:f=3;break;case 3:case 7:case 11:case 12:f=4;break;case 16:f=9;break;case 20:f=16;break;default:f=1}switch(h){case 12:var n=2;break;case 16:n=3;break;case 20:n=4;break;default:n=1}switch(h){case 0:case 1:case 2:case 3:var l=new qo;l.set_name(g);l.type=h;l.__arrayLength=n;l.__isBool=!0;l.__isUniform=c;l.__length=f;this.__paramBool.push(l);g=="openfl_HasColorTransform"&&(this.__hasColorTransform=l);this.__data[g]=
l;this.__isGenerated&&(this[g]=l);break;case 8:case 9:case 10:case 11:l=new qo;l.set_name(g);l.type=h;l.__arrayLength=n;l.__isInt=!0;l.__isUniform=c;l.__length=f;this.__paramInt.push(l);this.__data[g]=l;this.__isGenerated&&(this[g]=l);break;default:l=new qo;l.set_name(g);l.type=h;l.__arrayLength=n;n>0&&(h=n*n,h=h!=null?new Float32Array(h):null,l.__uniformMatrix=h);l.__isFloat=!0;l.__isUniform=c;l.__length=f;this.__paramFloat.push(l);if(N.startsWith(g,"openfl_"))switch(g){case "openfl_Alpha":this.__alpha=
l;break;case "openfl_ColorMultiplier":this.__colorMultiplier=l;break;case "openfl_ColorOffset":this.__colorOffset=l;break;case "openfl_Matrix":this.__matrix=l;break;case "openfl_Position":this.__position=l;break;case "openfl_TextureCoord":this.__textureCoord=l;break;case "openfl_TextureSize":this.__textureSize=l}this.__data[g]=l;this.__isGenerated&&(this[g]=l)}}g=d.matchedPos();c=g.pos+g.len}}},__update:function(){this.program!=null&&this.__updateGL()},__updateFromBuffer:function(a,b){this.program!=
null&&this.__updateGLFromBuffer(a,b)},__updateGL:function(){for(var a=0,b=0,c=this.__inputBitmapData;b<c.length;){var d=c[b];++b;d.__updateGL(this.__context,a);++a}b=0;for(c=this.__paramBool;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramFloat;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramInt;b<c.length;)a=c[b],++b,a.__updateGL(this.__context)},__updateGLFromBuffer:function(a,b){for(var c=0,d,f,g,h,n,l=0,q=a.inputCount;l<q;)n=l++,d=a.inputRefs[n],
f=a.inputs[n],g=a.inputFilter[n],h=a.inputMipFilter[n],n=a.inputWrap[n],f!=null&&(d.__updateGL(this.__context,c,f,g,h,n),++c);l=this.__context.gl;a.paramDataLength>0?(a.paramDataBuffer==null&&(a.paramDataBuffer=l.createBuffer()),this.__context.__bindGLArrayBuffer(a.paramDataBuffer),yd.bufferData(l,l.ARRAY_BUFFER,a.paramData,l.DYNAMIC_DRAW)):this.__context.__bindGLArrayBuffer(null);f=d=c=0;g=a.paramBoolCount;h=a.paramFloatCount;var u=a.paramData,v=null,z=null,r=null;l=0;for(q=a.paramCount;l<q;){n=
l++;var F=!1;if(n<g){var J=a.paramRefs_Bool[c];for(var L=0,Q=a.overrideBoolCount;L<Q;){var W=L++;if(J.name==a.overrideBoolNames[W]){v=a.overrideBoolValues[W];F=!0;break}}F?J.__updateGL(this.__context,v):J.__updateGLFromBuffer(this.__context,u,a.paramPositions[n],a.paramLengths[n],b);++c}else if(n<g+h){J=a.paramRefs_Float[d];L=0;for(Q=a.overrideFloatCount;L<Q;)if(W=L++,J.name==a.overrideFloatNames[W]){z=a.overrideFloatValues[W];F=!0;break}F?J.__updateGL(this.__context,z):J.__updateGLFromBuffer(this.__context,
u,a.paramPositions[n],a.paramLengths[n],b);++d}else{J=a.paramRefs_Int[f];L=0;for(Q=a.overrideIntCount;L<Q;)if(W=L++,J.name==a.overrideIntNames[W]){r=a.overrideIntValues[W];F=!0;break}F?J.__updateGL(this.__context,r):J.__updateGLFromBuffer(this.__context,u,a.paramPositions[n],a.paramLengths[n],b);++f}}},get_data:function(){(this.__glSourceDirty||this.__data==null)&&this.__init();return this.__data},set_data:function(a){return this.__data=a},get_glFragmentSource:function(){return this.__glFragmentSource},
set_glFragmentSource:function(a){a!=this.__glFragmentSource&&(this.__glSourceDirty=!0);return this.__glFragmentSource=a},get_glVertexSource:function(){return this.__glVertexSource},set_glVertexSource:function(a){a!=this.__glVertexSource&&(this.__glSourceDirty=!0);return this.__glVertexSource=a},__class__:bi,__properties__:{set_glVertexSource:"set_glVertexSource",get_glVertexSource:"get_glVertexSource",set_glFragmentSource:"set_glFragmentSource",get_glFragmentSource:"get_glFragmentSource",set_data:"set_data",
get_data:"get_data"}};var Tu=function(a){this.__glFragmentSource==null&&(this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\n\t\t}");
this.__glVertexSource==null&&(this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
bi.call(this,a);this.__isGenerated=!0;this.__initGL()};t["openfl.display.DisplayObjectShader"]=Tu;Tu.__name__="openfl.display.DisplayObjectShader";Tu.__super__=bi;Tu.prototype=I(bi.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Tu});var Jc=function(){this.__renderedOnCanvasWhileOnDOM=this.__forceCachedBitmapUpdate=!1;
this.__mouseScrollVCounter=0;this.condenseWhite=!1;Ja.call(this);this.__wordSelection=!1;this.__drawableType=7;this.__selectionIndex=this.__caretIndex=0;this.__displayAsPassword=!1;this.__passwordChar="*";this.__graphics=new Mh(this);this.__graphics.__commands.clear();this.__textEngine=new Wc(this);this.__layoutDirty=!0;this.__offsetY=this.__offsetX=0;this.__mouseWheelEnabled=!0;this.__text="";Jc.__defaultTextFormat==null&&(Jc.__defaultTextFormat=new ef("Times New Roman",12,0,!1,!1,!1,"","",3,0,0,
0,0),Jc.__defaultTextFormat.blockIndent=0,Jc.__defaultTextFormat.bullet=!1,Jc.__defaultTextFormat.letterSpacing=0,Jc.__defaultTextFormat.kerning=!1);this.__textFormat=Jc.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new Hh(this.__textFormat,0,0));this.addEventListener("mouseDown",m(this,this.this_onMouseDown));this.addEventListener("focusIn",m(this,this.this_onFocusIn));this.addEventListener("focusOut",m(this,this.this_onFocusOut));this.addEventListener("keyDown",m(this,this.this_onKeyDown));
this.addEventListener("mouseWheel",m(this,this.this_onMouseWheel))};t["openfl.text.TextField"]=Jc;Jc.__name__="openfl.text.TextField";Jc.__super__=Ja;Jc.prototype=I(Ja.prototype,{condenseWhite:null,__wordSelection:null,__lineSelection:null,__specialSelectionInitialIndex:null,__bounds:null,__caretIndex:null,__cursorTimer:null,__dirty:null,__displayAsPassword:null,__passwordChar:null,__domRender:null,__inputEnabled:null,__isHTML:null,__layoutDirty:null,__mouseScrollVCounter:null,__mouseWheelEnabled:null,
__offsetX:null,__offsetY:null,__selectionIndex:null,__showCursor:null,__styleSheet:null,__text:null,__htmlText:null,__textEngine:null,__textFormat:null,__div:null,__renderedOnCanvasWhileOnDOM:null,__forceCachedBitmapUpdate:null,appendText:function(a){a!=null&&a!=""&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__updateText(this.__text+a),this.__selectionIndex=this.__caretIndex=this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-
1).end=this.__text.length)},getCharBoundaries:function(a){if(a<0||a>this.__text.length-1)return null;var b=new Ia;return this.__getCharBoundaries(a,b)?b:null},getCharIndexAtPoint:function(a,b){if(a<=2||a>this.get_width()+4||b<=0||b>this.get_height()+4)return-1;this.__updateLayout();a+=this.get_scrollH();for(var c=0,d=this.get_scrollV()-1;c<d;){var f=c++;b+=this.__textEngine.lineHeights.get(f)}for(c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var g=c.next();if(b>=g.offsetY&&b<=g.offsetY+
g.height&&a>=g.offsetX&&a<=g.offsetX+g.width){c=b=0;for(d=g.positions.length;c<d;)if(f=c++,b+=g.positions[f],a<=g.offsetX+b)return g.startIndex+f;return g.endIndex}}return-1},getFirstCharInParagraph:function(a){if(a<0||a>this.get_text().length)return-1;if(this.__textEngine.lineBreaks.get_length()==0)return 0;for(var b=0,c=this.__textEngine.lineBreaks.get_length();b<c;){var d=b++;if(a<=this.__textEngine.lineBreaks.get(d))return d==0?0:this.__textEngine.lineBreaks.get(d-1)+1}return this.__textEngine.lineBreaks.get(this.__textEngine.lineBreaks.get_length()-
1)+1},getLineIndexAtPoint:function(a,b){this.__updateLayout();if(a<=2||a>this.get_width()+4||b<=0||b>this.get_height()+4)return-1;a=0;for(var c=this.get_scrollV()-1;a<c;){var d=a++;b+=this.__textEngine.lineHeights.get(d)}for(a=this.__textEngine.layoutGroups.iterator();a.hasNext();)if(c=a.next(),b>=c.offsetY&&b<=c.offsetY+c.height)return c.lineIndex;return-1},getLineIndexOfChar:function(a){if(a<0||a>this.__text.length)return-1;this.__updateLayout();for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=
b.next();if(c.startIndex<=a&&c.endIndex>=a)return c.lineIndex}return-1},getLineLength:function(a){this.__updateLayout();if(a<0||a>this.__textEngine.numLines-1)return 0;for(var b=-1,c=-1,d=this.__textEngine.layoutGroups.iterator();d.hasNext();){var f=d.next();if(f.lineIndex==a)b==-1&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.startIndex;break}}c==-1&&(c=this.__text.length);return c-b},getLineMetrics:function(a){this.__updateLayout();var b=this.__textEngine.lineAscents.get(a),c=this.__textEngine.lineDescents.get(a),
d=this.__textEngine.lineLeadings.get(a),f=this.__textEngine.lineHeights.get(a);a=this.__textEngine.lineWidths.get(a);switch(this.__textFormat.align){case 0:var g=(this.__textEngine.width-a)/2;break;case 1:case 4:g=this.__textEngine.width-a-2;break;case 2:case 3:case 5:g=2}return new ky(g,a,f,b,c,d)},getLineOffset:function(a){this.__updateLayout();if(a<0)throw new we;if(a>this.__textEngine.numLines-1)return-1;for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=b.next();if(c.lineIndex==
a)return c.startIndex}return 0},getLineText:function(a){this.__updateLayout();if(a<0)throw new we;if(a>this.__textEngine.numLines-1)return null;for(var b=-1,c=-1,d=this.__textEngine.layoutGroups.iterator();d.hasNext();){var f=d.next();if(f.lineIndex==a)b==-1&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.startIndex;break}}c==-1&&(c=this.__text.length);return this.__textEngine.text.substring(b,c)},getParagraphLength:function(a){if(a<0||a>this.get_text().length)return-1;var b=this.getFirstCharInParagraph(a);
if(a>=this.get_text().length)return this.get_text().length-b+1;a=this.__textEngine.getLineBreakIndex(a)+1;a==0&&(a=this.__text.length);return a-b},getTextFormat:function(a,b){b==null&&(b=-1);a==null&&(a=-1);var c=null;if(a>=this.get_text().length||a<-1||b>this.get_text().length||b<-1)throw new we("The supplied index is out of bounds");a==-1&&(a=0);b==-1&&(b=this.get_text().length);if(a>=b)return new ef;for(var d=this.__textEngine.textFormatRanges.iterator();d.hasNext();){var f=d.next();if(f.start<=
a&&f.end>a||f.start<b&&f.end>=b)c==null?c=f.format.clone():(f.format.font!=c.font&&c.set_font(null),f.format.size!=c.size&&c.set_size(null),f.format.color!=c.color&&(c.color=null),f.format.bold!=c.bold&&c.set_bold(null),f.format.italic!=c.italic&&c.set_italic(null),f.format.underline!=c.underline&&(c.underline=null),f.format.url!=c.url&&(c.url=null),f.format.target!=c.target&&(c.target=null),f.format.align!=c.align&&(c.align=null),f.format.leftMargin!=c.leftMargin&&(c.leftMargin=null),f.format.rightMargin!=
c.rightMargin&&(c.rightMargin=null),f.format.indent!=c.indent&&(c.indent=null),f.format.leading!=c.leading&&(c.leading=null),f.format.blockIndent!=c.blockIndent&&(c.blockIndent=null),f.format.bullet!=c.bullet&&(c.bullet=null),f.format.kerning!=c.kerning&&(c.kerning=null),f.format.letterSpacing!=c.letterSpacing&&(c.letterSpacing=null),f.format.tabStops!=c.tabStops&&(c.tabStops=null))}c==null&&(c=new ef);return c},replaceSelectedText:function(a){this.__replaceSelectedText(a,!1)},replaceText:function(a,
b,c){this.__replaceText(a,b,c,!1)},setSelection:function(a,b){this.__selectionIndex=a;this.__caretIndex=b;this.__updateScrollV();this.__updateScrollH();this.stage!=null&&this.stage.get_focus()==this&&(this.__stopCursorTimer(),this.__startCursorTimer())},setTextFormat:function(a,b,c){c==null&&(c=-1);b==null&&(b=-1);var d=this.get_text().length;b==-1?(c==-1&&(c=d),b=0):c==-1&&(c=b+1);if(b!=c){if(b<0||c<=0||c<b||b>=d||c>d)throw new we;if(b==0&&c==d){this.__textEngine.textFormatRanges.set_length(1);var f=
this.__textEngine.textFormatRanges.get(0);f.start=0;f.end=d;f.format.__merge(a)}else{d=0;for(var g;d<this.__textEngine.textFormatRanges.get_length();)if(f=this.__textEngine.textFormatRanges.get(d),f.end<=b)++d;else if(f.start>=c)break;else if(f.start<=b&&f.end>=c)if(f.start==b&&f.end==c){f.format=f.format.clone();f.format.__merge(a);break}else if(f.start==b)g=new Hh(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d,g),f.start=c,d+=2;else{f.end==c?(g=new Hh(f.format.clone(),
b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g)):(g=new Hh(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g),g=new Hh(f.format.clone(),c,f.end),this.__textEngine.textFormatRanges.insertAt(d+2,g));f.end=b;break}else if(f.start>=b&&f.end<=c)f.start==b?(f.format=f.format.clone(),f.format.__merge(a),f.end=c):this.__textEngine.textFormatRanges.removeAt(d);else if(f.start>b&&f.end>b){f.start=c;break}else f.start<b&&f.end<=c?(g=new Hh(f.format.clone(),
b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g),f.end=b,d+=2):(++d,Vb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/TextField.hx",lineNumber:1630,className:"openfl.text.TextField",methodName:"setTextFormat"}))}this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__setStageReference:function(a){this.__stopTextInput();
Ja.prototype.__setStageReference.call(this,a)},__allowMouseFocus:function(){return this.mouseEnabled},__caretBeginningOfLine:function(){this.__caretIndex=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))},__caretBeginningOfNextLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);this.__caretIndex=a<this.__textEngine.numLines-1?this.getLineOffset(a+1):this.__text.length},__caretBeginningOfPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);if(a>0){var b=
this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex));this.__caretIndex=this.__caretIndex==b?this.getLineOffset(a-1):b}},__caretEndOfLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);this.__caretIndex=a<this.__textEngine.numLines-1?this.getLineOffset(a+1)-1:this.__text.length},__caretNextCharacter:function(){this.__caretIndex<this.__text.length&&this.__caretIndex++},__caretNextLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);a<this.__textEngine.numLines-1&&
(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a+1))},__caretPreviousCharacter:function(){this.__caretIndex>0&&this.__caretIndex--},__caretPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);a>0&&(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a-1))},__disableInput:function(){this.__inputEnabled&&this.stage!=null&&(this.stage.window.__backend.setTextInputEnabled(!1),this.stage.window.onTextInput.remove(m(this,this.window_onTextInput)),
this.stage.window.onKeyDown.remove(m(this,this.window_onKeyDown)),this.__inputEnabled=!1,this.__stopCursorTimer())},__dispatch:function(a){if(a.eventPhase==2&&a.type=="mouseUp"){var b=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);b!=null&&(b=b.format.url,b!=null&&b!=""&&(N.startsWith(b,"event:")?this.dispatchEvent(new Dg("link",!0,!1,V.substr(b,6,null))):Pa.getURL(new se(b))))}return Ja.prototype.__dispatch.call(this,a)},__enableInput:function(){if(this.stage!=null){this.stage.window.__backend.setTextInputEnabled(!0);
var a=this.getBounds(this.stage);a=new of(a.x,a.y,a.width,a.height);this.stage.window.setTextInputRect(a);this.__inputEnabled||(this.stage.window.__backend.setTextInputEnabled(!0),this.stage.window.onTextInput.has(m(this,this.window_onTextInput))||(this.stage.window.onTextInput.add(m(this,this.window_onTextInput)),this.stage.window.onKeyDown.add(m(this,this.window_onKeyDown))),this.__inputEnabled=!0,this.__stopCursorTimer(),this.__startCursorTimer())}},__getAdvance:function(a){return a},__getBounds:function(a,
b){this.__updateLayout();var c=Ia.__pool.get();c.copyFrom(this.__textEngine.bounds);c.offset(this.__offsetX,this.__offsetY);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ia.__pool.release(c)},__getCharBoundaries:function(a,b){if(a<0||a>this.__text.length-1)return!1;this.__updateLayout();for(var c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var d=c.next();if(a>=d.startIndex&&a<d.endIndex)try{for(var f=d.offsetX,g=0,h=a-d.startIndex;g<h;){var n=g++;f+=d.positions[n]}b.setTo(f,
d.offsetY,d.positions[a-d.startIndex],d.ascent+d.descent);return!0}catch(l){Pb.lastError=l}}return!1},__getCharIndexOnDifferentLine:function(a,b){if(a<0||a>this.__text.length||b<0||b>this.__textEngine.numLines-1)return-1;for(var c=null,d=null,f=this.__textEngine.layoutGroups.iterator();f.hasNext();){var g=f.next();if(a>=g.startIndex&&a<=g.endIndex){c=g.offsetX;for(var h=0,n=a-g.startIndex;h<n;){var l=h++;c+=g.positions[l]}if(d!=null)return this.__getPosition(c,d)}if(g.lineIndex==b){d=g.offsetY+g.height/
2;g=0;for(h=this.get_scrollV()-1;g<h;)n=g++,d-=this.__textEngine.lineHeights.get(n);if(c!=null)return this.__getPosition(c,d)}}return-1},__getCursor:function(){var a=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);return a!=null&&a.format.url!=""?"button":this.__textEngine.selectable?"ibeam":null},__getGroup:function(a,b,c){c==null&&(c=!1);this.__updateLayout();a+=this.get_scrollH();for(var d=0,f=this.get_scrollV()-1;d<f;){var g=d++;b+=this.__textEngine.lineHeights.get(g)}!c&&b>this.__textEngine.textHeight&&
(b=this.__textEngine.textHeight);var h=!0;d=0;for(f=this.__textEngine.layoutGroups.get_length();d<f;){g=d++;var n=this.__textEngine.layoutGroups.get(g);g=g<this.__textEngine.layoutGroups.get_length()-1?this.__textEngine.layoutGroups.get(g+1):null;h&&(b<n.offsetY&&(b=n.offsetY),a<n.offsetX&&(a=n.offsetX),h=!1);if(b>=n.offsetY&&b<=n.offsetY+n.height||!c&&g==null)if(a>=n.offsetX&&a<=n.offsetX+n.width||!c&&(g==null||g.lineIndex!=n.lineIndex))return n}return null},__getPosition:function(a,b){b=this.__getGroup(a,
b);if(b==null)return this.__text.length;for(var c=0,d=0,f=b.positions.length;d<f;){var g=d++;c+=b.positions[g];if(a<=b.offsetX+c){if(a<=b.offsetX+(c-b.positions[g])+b.positions[g]/2)return b.startIndex+g;if(b.startIndex+g<b.endIndex)return b.startIndex+g+1;break}}return b.endIndex},__getPositionByIdentifier:function(a,b,c){a=this.__getPosition(a,b);c=c?"\n":" .,;:!?()[]{}<>/\\|-=+*&^%$#@~`'\"\n";b=this.__text.charAt(a);if(this.__specialSelectionInitialIndex<=a)for(;c.indexOf(b)==-1&&a<this.__text.length;)++a,
b=this.__text.charAt(a);else{for(;c.indexOf(b)==-1&&a>0;)--a,b=this.__text.charAt(a);if(a==0)return a;++a}return a},__getOppositeIdentifierBound:function(a,b){b=b?"\n":" .,;:!?()[]{}<>/\\|-=+*&^%$#@~`'\"\n";var c=this.__text.charAt(a);if(a<=this.__caretIndex){if(a==0)return a;do--a,c=this.__text.charAt(a);while(b.indexOf(c)==-1&&a>0);if(a==0)return a;++a}else for(;b.indexOf(c)==-1&&a<this.__text.length;)++a,c=this.__text.charAt(a);return a},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||
f&&!this.mouseEnabled||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();this.__updateLayout();c=this.__renderTransform;f=c.a*c.d-c.b*c.c;var h=f==0?-c.tx:1/f*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;f=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(h,f==0?-c.ty:1/f*(c.a*(b-c.ty)+c.b*(c.tx-a)))?(d!=null&&d.push(g),!0):!1},__hitTestMask:function(a,b){this.__getRenderTransform();this.__updateLayout();var c=this.__renderTransform,d=c.a*
c.d-c.b*c.c,f=d==0?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(f,d==0?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a)))?!0:!1},__replaceSelectedText:function(a,b){b==null&&(b=!0);a==null&&(a="");if(a!=""||this.__selectionIndex!=this.__caretIndex){var c=this.__caretIndex<this.__selectionIndex?this.__caretIndex:this.__selectionIndex,d=this.__caretIndex>this.__selectionIndex?this.__caretIndex:this.__selectionIndex;if(!(c==d&&this.__textEngine.maxChars>
0&&this.__text.length==this.__textEngine.maxChars)){c>this.__text.length&&(c=this.__text.length);d>this.__text.length&&(d=this.__text.length);if(d<c){var f=d;d=c;c=f}c<0&&(c=0);this.__replaceText(c,d,a,b)}}},__replaceText:function(a,b,c,d){if(!(b<a||a<0||b>this.__text.length||c==null)){d&&(c=this.__textEngine.restrictText(c),this.__textEngine.maxChars>0&&(d=this.__textEngine.maxChars-this.__text.length+(b-a),d<=0?c="":d<c.length&&(c=V.substr(c,0,d))));this.__updateText(this.__text.substring(0,a)+
c+this.__text.substring(b));d=c.length-(b-a);for(var f=0,g;f<this.__textEngine.textFormatRanges.get_length();){g=this.__textEngine.textFormatRanges.get(f);if(a==b)g.start==g.end?g.start!=0?Vb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/TextField.hx",lineNumber:2211,className:"openfl.text.TextField",methodName:"__replaceText"}):g.end+=d:g.end>=a&&(g.start>=a?(g.start+=d,g.end+=d):g.start<a&&
g.end>=b&&(g.end+=d));else if(g.end>a)if(g.start>b)g.start+=d,g.end+=d;else if(g.start<=a&&g.end>b)g.end+=d;else if(g.start>=a&&g.end<=b){g=this.__textEngine.textFormatRanges;g.__tempIndex=f--;for(var h=0,n=[];h<n.length;){var l=n[h++];g.insertAt(g.__tempIndex,l);g.__tempIndex++}g.splice(g.__tempIndex,1)}else g.end>b&&g.start>a&&g.start<=b?(g.start=a,g.end+=d):g.start<a&&g.end>a&&g.end<=b&&(g.end=a);++f}this.__textEngine.textFormatRanges.get_length()==0?this.__textEngine.textFormatRanges.push(new Hh(this.get_defaultTextFormat().clone(),
0,c.length)):a==b&&this.__textEngine.textFormatRanges.get(0).start>0?this.__textEngine.textFormatRanges.unshift(new Hh(this.get_defaultTextFormat().clone(),0,this.__textEngine.textFormatRanges.get(0).start)):a!=b&&this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end<this.__text.length&&this.__textEngine.textFormatRanges.push(new Hh(this.get_defaultTextFormat().clone(),this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end,
this.__text.length));this.__selectionIndex=this.__caretIndex=a+c.length;this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__startCursorTimer:function(){this.get_type()==1?(this.__inputEnabled&&(this.__cursorTimer=Gc.delay(m(this,this.__startCursorTimer),600),this.__showCursor=!this.__showCursor),this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())):this.get_selectable()&&(this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()))},__startTextInput:function(){this.__caretIndex<0&&(this.__selectionIndex=this.__caretIndex=this.__text.length);(ma.__supportDOM?this.__renderedOnCanvasWhileOnDOM:1)&&this.__enableInput()},__stopCursorTimer:function(){this.__cursorTimer!=null&&(this.__cursorTimer.stop(),this.__cursorTimer=null);this.__showCursor&&(this.__showCursor=!1,this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},__stopTextInput:function(){(ma.__supportDOM?
this.__renderedOnCanvasWhileOnDOM:1)&&this.__disableInput()},__updateLayout:function(){if(this.__layoutDirty){var a=this.__textEngine.width;this.__textEngine.update();if(this.__textEngine.autoSize!=2){if(this.__textEngine.width!=a)switch(this.__textEngine.autoSize){case 0:this.set_x(this.get_x()+(a-this.__textEngine.width)/2);break;case 3:this.set_x(this.get_x()+(a-this.__textEngine.width))}this.__textEngine.getBounds()}this.__layoutDirty=!1;this.setSelection(this.__selectionIndex,this.__caretIndex)}},
__updateMouseDrag:function(){if(this.stage!=null){var a=this.get_scrollH(),b=this.get_scrollV(),c=this.getBounds(this);this.get_mouseX()>c.width-1?this.set_scrollH(this.get_scrollH()+(Math.max(Math.min((this.get_mouseX()-c.width)*.1,10),1)|0)):this.get_mouseX()<1&&this.set_scrollH(this.get_scrollH()-(Math.max(Math.min(this.get_mouseX()*-.1,10),1)|0));this.__mouseScrollVCounter++;this.__mouseScrollVCounter>this.stage.get_frameRate()/10&&(this.get_mouseY()>c.height-2?this.set_scrollV(Math.min(this.get_scrollV()+
Math.max(Math.min((this.get_mouseY()-c.height)*.03,5),1),this.get_maxScrollV())|0):this.get_mouseY()<2&&this.set_scrollV(this.get_scrollV()-(Math.max(Math.min(this.get_mouseY()*-.03,5),1)|0)),this.__mouseScrollVCounter=0);this.get_scrollH()==a&&this.get_scrollV()==b||this.stage_onMouseMove(null)}},__updateScrollH:function(){this.__updateLayout();var a=this.getBounds(this);if(this.get_textWidth()<=a.width-4)this.set_scrollH(0);else{var b=this.get_scrollH();if(this.__caretIndex==0||this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))==
this.__caretIndex)b=0;else{var c=Ia.__pool.get(),d=!1;this.__caretIndex<this.__text.length&&(d=this.__getCharBoundaries(this.__caretIndex,c));d||(this.__getCharBoundaries(this.__caretIndex-1,c),c.x+=c.width);for(;c.x<b&&b>0;)b-=24;for(;c.x>b+a.width-4;)b+=24;Ia.__pool.release(c)}b>0&&this.get_type()!=1&&(c=this.getLineLength(this.getLineIndexOfChar(this.__caretIndex)),this.get_scrollH()+a.width-4>c&&this.set_scrollH(Math.ceil(c-a.width+4)));b<0?this.set_scrollH(0):b>this.get_maxScrollH()?this.set_scrollH(this.get_maxScrollH()):
this.set_scrollH(b)}},__updateScrollV:function(){this.__updateLayout();if(this.get_textHeight()<=this.get_height()-4)this.set_scrollV(1);else{var a=this.getLineIndexOfChar(this.__caretIndex);a==-1&&this.__caretIndex>0&&(a=this.getLineIndexOfChar(this.__caretIndex-1)+1);if(a+1<this.get_scrollV())this.set_scrollV(a+1);else if(a+1>this.get_bottomScrollV()){var b=0;for(a>=this.__textEngine.lineHeights.get_length()&&(a=this.__textEngine.lineHeights.get_length()-1);a>=0;){b+=this.__textEngine.lineHeights.get(a);
if(b>this.get_height()-4){a+=b-this.get_height()<0?1:2;break}--a}this.set_scrollV(a)}else this.set_scrollV(this.get_scrollV())}},__updateText:function(a){ma.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=this.__text!=a);this.__textEngine.set_text(a);this.__text=this.__textEngine.text;this.stage!=null&&this.stage.get_focus()==this?(this.__text.length<this.__selectionIndex&&(this.__selectionIndex=this.__text.length),this.__text.length<this.__caretIndex&&(this.__caretIndex=
this.__text.length)):this.__isHTML?this.__selectionIndex=this.__caretIndex=this.__text.length:this.__caretIndex=this.__selectionIndex=0;if(!this.__displayAsPassword||ma.__supportDOM&&!this.__renderedOnCanvasWhileOnDOM)this.__textEngine.set_text(this.__text);else{a="";for(var b=0,c=this.get_text().length;b<c;)b++,a+=this.__passwordChar;this.__textEngine.set_text(a)}},__updateTransforms:function(a){Ja.prototype.__updateTransforms.call(this,a);a=this.__renderTransform;var b=this.__offsetX,c=this.__offsetY;
a.tx=b*a.a+c*a.c+a.tx;a.ty=b*a.b+c*a.d+a.ty},get_antiAliasType:function(){return this.__textEngine.antiAliasType},set_antiAliasType:function(a){return this.__textEngine.antiAliasType=a},get_autoSize:function(){return this.__textEngine.autoSize},set_autoSize:function(a){a!=this.__textEngine.autoSize&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.autoSize=a},get_background:function(){return this.__textEngine.background},
set_background:function(a){a!=this.__textEngine.background&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.background=a},get_backgroundColor:function(){return this.__textEngine.backgroundColor},set_backgroundColor:function(a){a!=this.__textEngine.backgroundColor&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.backgroundColor=a},get_border:function(){return this.__textEngine.border},
set_border:function(a){a!=this.__textEngine.border&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.border=a},get_borderColor:function(){return this.__textEngine.borderColor},set_borderColor:function(a){a!=this.__textEngine.borderColor&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.borderColor=a},get_bottomScrollV:function(){this.__updateLayout();return this.__textEngine.get_bottomScrollV()},
get_caretIndex:function(){return this.__caretIndex},get_defaultTextFormat:function(){return this.__textFormat.clone()},set_defaultTextFormat:function(a){this.__textFormat.__merge(a);this.__dirty=this.__layoutDirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_displayAsPassword:function(){return this.__displayAsPassword},set_displayAsPassword:function(a){a!=this.__displayAsPassword&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()),this.__displayAsPassword=a,this.__updateText(this.__text));return a},get_embedFonts:function(){return this.__textEngine.embedFonts},set_embedFonts:function(a){return this.__textEngine.embedFonts=a},get_gridFitType:function(){return this.__textEngine.gridFitType},set_gridFitType:function(a){return this.__textEngine.gridFitType=a},get_height:function(){this.__updateLayout();return this.__textEngine.height*Math.abs(this.get_scaleY())},set_height:function(a){a!=this.__textEngine.height&&
(this.__setTransformDirty(),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.height=a);return this.__textEngine.height*Math.abs(this.get_scaleY())},get_htmlText:function(){return this.__isHTML?this.__htmlText:this.__text},set_htmlText:function(a){if(a==null)throw a=new Ce("Error #2007: Parameter text must be non-null."),a.errorID=2007,a;this.__isHTML&&this.__text==a||(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()));this.__isHTML=!0;this.condenseWhite&&(a=a.replace(RegExp("\\s+","g")," "));this.__htmlText=a;a=jc.parse(a,this.get_multiline(),this.__styleSheet,this.__textFormat,this.__textEngine.textFormatRanges);this.__updateText(a);return a},get_length:function(){return this.__text!=null?this.__text.length:0},get_maxChars:function(){return this.__textEngine.maxChars},set_maxChars:function(a){a!=this.__textEngine.maxChars&&(this.__textEngine.maxChars=a,this.__layoutDirty=
this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_maxScrollH:function(){this.__updateLayout();return this.__textEngine.maxScrollH},get_maxScrollV:function(){this.__updateLayout();return this.__textEngine.get_maxScrollV()},get_mouseWheelEnabled:function(){return this.__mouseWheelEnabled},set_mouseWheelEnabled:function(a){return this.__mouseWheelEnabled=a},get_multiline:function(){return this.__textEngine.multiline},set_multiline:function(a){return this.__textEngine.multiline=
a},get_numLines:function(){this.__updateLayout();return this.__textEngine.numLines},get_restrict:function(){return this.__textEngine.restrict},set_restrict:function(a){this.__textEngine.restrict!=a&&(this.__textEngine.set_restrict(a),this.__updateText(this.__text));return a},get_scrollH:function(){return this.__textEngine.scrollH},set_scrollH:function(a){this.__updateLayout();a>this.__textEngine.maxScrollH&&(a=this.__textEngine.maxScrollH);a<0&&(a=0);a!=this.__textEngine.scrollH&&(this.__dirty=!0,
this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.scrollH=a,this.dispatchEvent(new pa("scroll")));return this.__textEngine.scrollH},get_scrollV:function(){return this.__textEngine.get_scrollV()},set_scrollV:function(a){this.__updateLayout();a>this.__textEngine.get_maxScrollV()&&(a=this.__textEngine.get_maxScrollV());a<1&&(a=1);if(a!=this.__textEngine.get_scrollV()||this.__textEngine.get_scrollV()==0)this.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()),this.__textEngine.set_scrollV(a),this.dispatchEvent(new pa("scroll"));return this.__textEngine.get_scrollV()},get_selectable:function(){return this.__textEngine.selectable},set_selectable:function(a){a!=this.__textEngine.selectable&&this.get_type()==1&&(this.stage!=null&&this.stage.get_focus()==this?this.__startTextInput():a||this.__stopTextInput());return this.__textEngine.selectable=a},get_selectionBeginIndex:function(){return Math.min(this.__caretIndex,this.__selectionIndex)|
0},get_selectionEndIndex:function(){return Math.max(this.__caretIndex,this.__selectionIndex)|0},get_sharpness:function(){return this.__textEngine.sharpness},set_sharpness:function(a){a!=this.__textEngine.sharpness&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.sharpness=a},get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){this.__styleSheet!=null&&a==null||a==null||(this.__isHTML&&a!=this.__styleSheet&&
(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.set_htmlText(this.__htmlText)),this.set_type(0));return this.__styleSheet=a},get_tabEnabled:function(){return this.__tabEnabled==null?this.__textEngine.type==1:this.__tabEnabled},get_text:function(){return this.__text},set_text:function(a){if(a==null)throw a=new Ce("Error #2007: Parameter text must be non-null."),a.errorID=2007,a;if(this.__styleSheet!=null)return this.set_htmlText(a);
if(this.__isHTML||this.__text!=a)this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());else return a;if(this.__textEngine.textFormatRanges.get_length()>1){var b=this.__textEngine.textFormatRanges,c=this.__textEngine.textFormatRanges.get_length()-1;b.__tempIndex=1;for(var d=0,f=[];d<f.length;){var g=f[d++];b.insertAt(b.__tempIndex,g);b.__tempIndex++}b.splice(b.__tempIndex,c)}b=this.__textEngine.textFormatRanges.get(0);b.format=this.__textFormat;
b.start=0;b.end=a.length;this.__isHTML=!1;this.__updateText(a);return a},get_textColor:function(){return this.__textFormat.color},set_textColor:function(a){a!=this.__textFormat.color&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));for(var b=this.__textEngine.textFormatRanges.iterator();b.hasNext();)b.next().format.color=a;return this.__textFormat.color=a},get_textWidth:function(){this.__updateLayout();return this.__textEngine.textWidth},get_textHeight:function(){this.__updateLayout();
return this.__textEngine.textHeight},get_type:function(){return this.__textEngine.type},set_type:function(a){this.__styleSheet!=null&&(a=0);a!=this.__textEngine.type&&(this.__textEngine.type=a,a==1?(this.addEventListener("addedToStage",m(this,this.this_onAddedToStage)),this.this_onFocusIn(null),this.__textEngine.__useIntAdvances=!0):(this.removeEventListener("addedToStage",m(this,this.this_onAddedToStage)),this.__stopTextInput(),this.__textEngine.__useIntAdvances=null),this.__layoutDirty=this.__dirty=
!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.type},get_width:function(){this.__updateLayout();return this.__textEngine.width*Math.abs(this.__scaleX)},set_width:function(a){a!=this.__textEngine.width&&(this.__setTransformDirty(),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.width=a);return this.__textEngine.width*Math.abs(this.__scaleX)},get_wordWrap:function(){return this.__textEngine.wordWrap},
set_wordWrap:function(a){a!=this.__textEngine.wordWrap&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.wordWrap=a},get_passwordChar:function(){return this.__passwordChar},set_passwordChar:function(a){a!=this.__passwordChar&&(this.__passwordChar=a,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__updateText(this.__text));return a},get_x:function(){return this.__transform.tx+this.__offsetX},
set_x:function(a){a!=this.__transform.tx+this.__offsetX&&this.__setTransformDirty();this.__transform.tx=a-this.__offsetX;return a},get_y:function(){return this.__transform.ty+this.__offsetY},set_y:function(a){a!=this.__transform.ty+this.__offsetY&&this.__setTransformDirty();this.__transform.ty=a-this.__offsetY;return a},stage_onMouseMove:function(a){if(this.stage!=null&&this.get_selectable()&&this.__selectionIndex>=0&&(this.__updateLayout(),a=this.__lineSelection?this.__getPositionByIdentifier(this.get_mouseX()+
this.get_scrollH(),this.get_mouseY(),!0):this.__wordSelection?this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1):this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY()),a!=this.__caretIndex)){this.__caretIndex=a;if(this.__wordSelection||this.__lineSelection)this.__selectionIndex=this.__getOppositeIdentifierBound(this.__specialSelectionInitialIndex,this.__lineSelection);a=!0;ma.__supportDOM&&(this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=
!0),a=!1);a&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))}},stage_onMouseUp:function(a){a=a.currentTarget;a.removeEventListener("enterFrame",m(this,this.this_onEnterFrame));a.removeEventListener("mouseMove",m(this,this.stage_onMouseMove));a.removeEventListener("mouseUp",m(this,this.stage_onMouseUp));if(this.stage==a&&a.get_focus()==this){this.__getWorldTransform();this.__updateLayout();if(this.__lineSelection||this.__wordSelection){a=0;this.__lineSelection?
a=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!0):this.__wordSelection&&(a=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1));var b=Math.max(this.__selectionIndex,a)|0;this.__selectionIndex=Math.min(this.__selectionIndex,a)|0;this.__caretIndex=b}this.__lineSelection=this.__wordSelection=!1;this.__inputEnabled&&(this.this_onFocusIn(null),this.__stopCursorTimer(),this.__startCursorTimer(),ma.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&
(this.__forceCachedBitmapUpdate=!0))}},this_onAddedToStage:function(a){this.this_onFocusIn(null)},this_onEnterFrame:function(a){this.__updateMouseDrag()},this_onFocusIn:function(a){this.get_type()==1&&this.stage!=null&&this.stage.get_focus()==this?this.__startTextInput():this.get_type()!=1&&this.get_selectable()&&this.stage!=null&&this.stage.get_focus()==this&&this.__startCursorTimer()},this_onFocusOut:function(a){this.__stopCursorTimer();this.__stopTextInput();this.__selectionIndex!=this.__caretIndex&&
(this.__selectionIndex=this.__caretIndex,this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},this_onKeyDown:function(a){this.get_selectable()&&this.get_type()!=1&&a.keyCode==67&&(a.commandKey||a.ctrlKey)&&(this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||Pe.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex)))},this_onMouseDown:function(a){if(this.get_selectable()||this.get_type()==1)this.__lineSelection=a.clickCount==
3,this.__wordSelection=a.clickCount==2,this.__lineSelection?(a=this.__caretIndex,this.__caretIndex=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!0),this.__selectionIndex=this.__getOppositeIdentifierBound(a,!0)):this.__wordSelection?(a=this.__caretIndex,this.__caretIndex=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1),this.__selectionIndex=this.__getOppositeIdentifierBound(a,!1),this.__specialSelectionInitialIndex=a):
this.__selectionIndex=this.__caretIndex=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY()),this.setSelection(this.__caretIndex,this.__selectionIndex),this.__updateLayout(),ma.__supportDOM||(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())),this.stage!=null&&(this.stage.addEventListener("enterFrame",m(this,this.this_onEnterFrame)),this.stage.addEventListener("mouseMove",m(this,this.stage_onMouseMove)),this.stage.addEventListener("mouseUp",
m(this,this.stage_onMouseUp)))},this_onMouseWheel:function(a){this.get_mouseWheelEnabled()&&this.set_scrollV(Math.min(this.get_scrollV()-a.delta,this.get_maxScrollV())|0)},window_onKeyDown:function(a,b){switch(a){case 8:this.__selectionIndex==this.__caretIndex&&this.__caretIndex>0&&(this.__selectionIndex=this.__caretIndex-1);this.__selectionIndex!=this.__caretIndex?(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new pa("change",!0))):(this.__stopCursorTimer(),
this.__startCursorTimer());break;case 97:this.get_selectable()&&(Ac.get_metaKey(b)||Ac.get_ctrlKey(b))&&this.setSelection(0,this.__text.length);break;case 99:if(Ac.get_metaKey(b)||Ac.get_ctrlKey(b))this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||Pe.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:!Ac.get_metaKey(b)&&!Ac.get_ctrlKey(b)||this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||(Pe.set_text(this.__text.substring(this.__caretIndex,
this.__selectionIndex)),this.replaceSelectedText(""),this.dispatchEvent(new pa("change",!0)));break;case 127:this.__selectionIndex==this.__caretIndex&&this.__caretIndex<this.__text.length&&(this.__selectionIndex=this.__caretIndex+1);this.__selectionIndex!=this.__caretIndex?(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new pa("change",!0))):(this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741898:this.get_selectable()&&(Ac.get_metaKey(b)||
Ac.get_ctrlKey(b)?this.__caretIndex=0:this.__caretBeginningOfLine(),Ac.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741901:this.get_selectable()&&(Ac.get_metaKey(b)||Ac.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretEndOfLine(),Ac.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741903:this.get_selectable()&&
(Ac.get_metaKey(b)||Ac.get_ctrlKey(b)?this.__caretBeginningOfNextLine():this.__caretNextCharacter(),Ac.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741904:this.get_selectable()&&(Ac.get_metaKey(b)||Ac.get_ctrlKey(b)?this.__caretBeginningOfPreviousLine():this.__caretPreviousCharacter(),Ac.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;
case 1073741905:this.get_selectable()&&(Ac.get_metaKey(b)||Ac.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretNextLine(),Ac.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741906:this.get_selectable()&&(Ac.get_metaKey(b)||Ac.get_ctrlKey(b)?this.__caretIndex=0:this.__caretPreviousLine(),Ac.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));
break;case 13:case 1073741912:this.__textEngine.multiline?(a=new Dg("textInput",!0,!0,"\n"),this.dispatchEvent(a),a.isDefaultPrevented()||(this.__replaceSelectedText("\n",!0),this.dispatchEvent(new pa("change",!0)))):(this.__stopCursorTimer(),this.__startCursorTimer())}},window_onTextInput:function(a){this.__replaceSelectedText(a,!0);this.dispatchEvent(new pa("change",!0))},__class__:Jc,__properties__:I(Ja.prototype.__properties__,{set_passwordChar:"set_passwordChar",get_passwordChar:"get_passwordChar",
set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_type:"set_type",get_type:"get_type",get_textWidth:"get_textWidth",get_textHeight:"get_textHeight",set_textColor:"set_textColor",get_textColor:"get_textColor",set_text:"set_text",get_text:"get_text",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_sharpness:"set_sharpness",get_sharpness:"get_sharpness",get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",set_selectable:"set_selectable",
get_selectable:"get_selectable",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_scrollH:"set_scrollH",get_scrollH:"get_scrollH",set_restrict:"set_restrict",get_restrict:"get_restrict",get_numLines:"get_numLines",set_multiline:"set_multiline",get_multiline:"get_multiline",set_mouseWheelEnabled:"set_mouseWheelEnabled",get_mouseWheelEnabled:"get_mouseWheelEnabled",get_maxScrollV:"get_maxScrollV",get_maxScrollH:"get_maxScrollH",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_length:"get_length",
set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_gridFitType:"set_gridFitType",get_gridFitType:"get_gridFitType",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_defaultTextFormat:"set_defaultTextFormat",get_defaultTextFormat:"get_defaultTextFormat",get_caretIndex:"get_caretIndex",get_bottomScrollV:"get_bottomScrollV",set_borderColor:"set_borderColor",get_borderColor:"get_borderColor",
set_border:"set_border",get_border:"get_border",set_backgroundColor:"set_backgroundColor",get_backgroundColor:"get_backgroundColor",set_background:"set_background",get_background:"get_background",set_autoSize:"set_autoSize",get_autoSize:"get_autoSize",set_antiAliasType:"set_antiAliasType",get_antiAliasType:"get_antiAliasType"})});var Uu=function(a,b,c){c==null&&(c=0);b==null&&(b=10);a==null&&(a=10);this.lastText=null;Jc.call(this);this.set_x(a);this.set_y(b);this.currentFPS=0;this.set_selectable(!1);
this.mouseEnabled=!1;this.set_defaultTextFormat(new ef("_sans",12,c));this.set_text("FPS: ");this.currentTime=this.cacheCount=0;this.times=[]};t["openfl.display.FPS"]=Uu;Uu.__name__="openfl.display.FPS";Uu.__super__=Jc;Uu.prototype=I(Jc.prototype,{currentFPS:null,cacheCount:null,currentTime:null,times:null,lastText:null,__enterFrame:function(a){this.currentTime+=a;for(this.times.push(this.currentTime);this.times[0]<this.currentTime-1E3;)this.times.shift();a=this.times.length;this.currentFPS=Math.round((a+
this.cacheCount)/2);if(a!=this.cacheCount){var b="FPS: "+this.currentFPS;b!=this.lastText&&(this.set_text(b),this.lastText=b)}this.cacheCount=a},__class__:Uu});var ly=function(a,b){qa.call(this);this.name=a;this.frame=b};t["openfl.display.FrameLabel"]=ly;ly.__name__="openfl.display.FrameLabel";ly.__super__=qa;ly.prototype=I(qa.prototype,{frame:null,name:null,__class__:ly});var jz=function(a,b){this.script=a;this.frame=b};t["openfl.display.FrameScript"]=jz;jz.__name__="openfl.display.FrameScript";
jz.prototype={frame:null,script:null,__class__:jz};var Mh=function(a){this.__dirty=!0;this.__owner=a;this.__commands=new lh;this.__positionY=this.__positionX=this.__strokePadding=0;this.__renderTransform=new gb;this.__usedShaderBuffers=new hb;this.__worldTransform=new gb;this.__height=this.__width=0;this.__bitmapScaleY=this.__bitmapScaleX=1;this.__shaderBufferPool=new dc(function(){return new Vu});this.moveTo(0,0)};t["openfl.display.Graphics"]=Mh;Mh.__name__="openfl.display.Graphics";Mh.prototype=
{__bounds:null,__commands:null,__dirty:null,__hardwareDirty:null,__height:null,__managed:null,__positionX:null,__positionY:null,__quadBuffer:null,__renderTransform:null,__shaderBufferPool:null,__softwareDirty:null,__strokePadding:null,__transformDirty:null,__triangleIndexBuffer:null,__triangleIndexBufferCount:null,__triangleIndexBufferData:null,__usedShaderBuffers:null,__vertexBuffer:null,__vertexBufferCount:null,__vertexBufferCountUVT:null,__vertexBufferData:null,__vertexBufferDataUVT:null,__vertexBufferUVT:null,
__visible:null,__owner:null,__width:null,__worldTransform:null,__canvas:null,__context:null,__bitmap:null,__bitmapScaleX:null,__bitmapScaleY:null,beginBitmapFill:function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!0);this.__commands.beginBitmapFill(a,b!=null?b.clone():null,c,d);this.__visible=!0},beginFill:function(a,b){b==null&&(b=1);a==null&&(a=0);this.__commands.beginFill(a&16777215,b);b>0&&(this.__visible=!0)},beginGradientFill:function(a,b,c,d,f,g,h,n){n==null&&(n=0);h==null&&(h=1);g==null&&(g=0);
if(b!=null&&b.length!=0){if(c==null){c=[];for(var l=0,q=b.length;l<q;)l++,c.push(1)}if(d==null)for(d=[],l=0,q=b.length;l<q;){var u=l++;d.push(Math.ceil(u/(b.length-1)*255))}if(!(c.length<b.length||d.length<b.length))for(this.__commands.beginGradientFill(a,b,c,d,f,g,h,n),l=0;l<c.length;)if(a=c[l],++l,a>0){this.__visible=!0;break}}},beginShaderFill:function(a,b){a!=null&&(b=this.__shaderBufferPool.get(),this.__usedShaderBuffers.add(b),b.update(a),this.__commands.beginShaderFill(b))},clear:function(){for(var a=
this.__usedShaderBuffers.h;a!=null;){var b=a.item;a=a.next;this.__shaderBufferPool.release(b)}this.__usedShaderBuffers.clear();this.__commands.clear();this.__strokePadding=0;this.__bounds!=null&&(this.set___dirty(!0),this.__transformDirty=!0,this.__bounds=null);this.__visible=!1;this.__positionY=this.__positionX=0;this.moveTo(0,0)},copyFrom:function(a){this.__bounds=a.__bounds!=null?a.__bounds.clone():null;this.__commands=a.__commands.copy();this.set___dirty(!0);this.__strokePadding=a.__strokePadding;
this.__positionX=a.__positionX;this.__positionY=a.__positionY;this.__transformDirty=!0;this.__visible=a.__visible},cubicCurveTo:function(a,b,c,d,f,g){var h=this.__findExtrema(this.__positionX,a,c,f),n=this.__findExtrema(this.__positionY,b,d,g);this.__inflateBounds(h.min-this.__strokePadding,n.min-this.__strokePadding);this.__inflateBounds(h.max+this.__strokePadding,n.max+this.__strokePadding);this.__positionX=f;this.__positionY=g;this.__commands.cubicCurveTo(a,b,c,d,f,g);this.set___dirty(!0)},curveTo:function(a,
b,c,d){this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);var f=a<c&&a>this.__positionX||a>c&&a<this.__positionX?c:this.__calculateBezierQuadPoint((this.__positionX-a)/(this.__positionX-2*a+c),this.__positionX,a,c);var g=b<d&&b>this.__positionY||b>d&&b<this.__positionY?d:this.__calculateBezierQuadPoint((this.__positionY-b)/(this.__positionY-2*b+d),this.__positionY,
b,d);this.__inflateBounds(f-this.__strokePadding,g-this.__strokePadding);this.__inflateBounds(f+this.__strokePadding,g+this.__strokePadding);this.__positionX=c;this.__positionY=d;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__commands.curveTo(a,b,c,d);this.set___dirty(!0)},drawCircle:function(a,b,c){c<=0||(this.__inflateBounds(a-c-this.__strokePadding,
b-c-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+c+this.__strokePadding),this.__commands.drawCircle(a,b,c),this.set___dirty(!0))},drawEllipse:function(a,b,c,d){c<=0||d<=0||(this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding),this.__commands.drawEllipse(a,b,c,d),this.set___dirty(!0))},drawGraphicsData:function(a){for(a=a.iterator();a.hasNext();){var b=a.next();switch(b.__graphicsDataType){case 0:if(b.fill!=
null){var c=b.thickness;isNaN(c)&&(c=null);switch(b.fill.__graphicsFillType){case 0:var d=b.fill;this.lineStyle(c,d.color,d.alpha,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);break;case 1:d=b.fill;this.lineStyle(c,0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);this.lineGradientStyle(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 2:d=b.fill,this.lineStyle(c,0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit),
this.lineBitmapStyle(d.bitmapData,d.matrix,d.repeat,d.smooth)}}else this.lineStyle();break;case 1:d=b;this.beginFill(d.color,d.alpha);break;case 2:d=b;this.beginGradientFill(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 3:this.drawPath(b.commands,b.data,b.winding);break;case 4:d=b;this.beginBitmapFill(d.bitmapData,d.matrix,d.repeat,d.smooth);break;case 5:this.endFill();break;case 6:this.drawQuads(b.rects,b.indices,b.transforms);break;
case 7:this.drawTriangles(b.vertices,b.indices,b.uvtData,b.culling);break;case 8:this.beginShaderFill(b.shader,b.matrix)}}},drawPath:function(a,b,c){c==null&&(c=0);var d=0;c==1&&this.__commands.windingNonZero();a=a.iterator();a:for(;a.hasNext();)switch(a.next()){case 1:this.moveTo(b.get(d),b.get(d+1));d+=2;break;case 2:this.lineTo(b.get(d),b.get(d+1));d+=2;break;case 3:this.curveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3));d+=4;break;case 4:this.moveTo(b.get(d+2),b.get(d+3));break a;case 5:this.lineTo(b.get(d+
2),b.get(d+3));break a;case 6:this.cubicCurveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3),b.get(d+4),b.get(d+5)),d+=6}},drawQuads:function(a,b,c){if(a!=null){var d=b!=null,f=!1,g=!1,h=d?b.get_length():Math.floor(a.get_length()/4);if(h!=0){c!=null&&(c.get_length()>=h*6?g=f=!0:c.get_length()>=h*4?f=!0:c.get_length()>=h*2&&(g=!0));for(var n=Ia.__pool.get(),l=gb.__pool.get(),q=Infinity,u=Infinity,v=-Infinity,z=-Infinity,r,F=0;F<h;){var J=F++;r=d?b.get(J)*4:J*4;r<0||(n.setTo(0,0,a.get(r+2),a.get(r+3)),
n.width<=0||n.height<=0||(f&&g?(r=J*6,l.setTo(c.get(r),c.get(r+1),c.get(r+2),c.get(r+3),c.get(r+4),c.get(r+5))):f?(r=J*4,l.setTo(c.get(r),c.get(r+1),c.get(r+2),c.get(r+3),n.x,n.y)):g?(r=J*2,l.tx=c.get(r),l.ty=c.get(r+1)):(l.tx=n.x,l.ty=n.y),n.__transform(n,l),q>n.x&&(q=n.x),u>n.y&&(u=n.y),v<n.get_right()&&(v=n.get_right()),z<n.get_bottom()&&(z=n.get_bottom())))}this.__inflateBounds(q,u);this.__inflateBounds(v,z);this.__commands.drawQuads(a,b,c);this.set___dirty(!0);this.__visible=!0;Ia.__pool.release(n);
gb.__pool.release(l)}}},drawRect:function(a,b,c,d){if(c!=0||d!=0){var f=c<0?-1:1,g=d<0?-1:1;this.__inflateBounds(a-this.__strokePadding*f,b-this.__strokePadding*g);this.__inflateBounds(a+c+this.__strokePadding*f,b+d+this.__strokePadding*g);this.__commands.drawRect(a,b,c,d);this.set___dirty(!0)}},drawRoundRect:function(a,b,c,d,f,g){if(c!=0||d!=0){var h=c<0?-1:1,n=d<0?-1:1;this.__inflateBounds(a-this.__strokePadding*h,b-this.__strokePadding*n);this.__inflateBounds(a+c+this.__strokePadding*h,b+d+this.__strokePadding*
n);this.__commands.drawRoundRect(a,b,c,d,f,g);this.set___dirty(!0)}},drawRoundRectComplex:function(a,b,c,d,f,g,h,n){if(!(c<=0||d<=0)){this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding);this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding);var l=a+c,q=b+d;c=c<d?c*2:d*2;f<c||(f=c);g<c||(g=c);h<c||(h=c);n<c||(n=c);c=1-Math.sin(Math.PI/180*45);d=1-Math.tan(Math.PI/180*22.5);var u=n*c,v=n*d;this.moveTo(l,q-n);this.curveTo(l,q-v,l-u,q-u);this.curveTo(l-v,q,l-n,q);u=h*
c;v=h*d;this.lineTo(a+h,q);this.curveTo(a+v,q,a+u,q-u);this.curveTo(a,q-v,a,q-h);u=f*c;v=f*d;this.lineTo(a,b+f);this.curveTo(a,b+v,a+u,b+u);this.curveTo(a+v,b,a+f,b);u=g*c;v=g*d;this.lineTo(l-g,b);this.curveTo(l-v,b,l-u,b+u);this.curveTo(l,b+v,l,b+g);this.lineTo(l,q-n);this.set___dirty(!0)}},drawTriangles:function(a,b,c,d){d==null&&(d=1);if(a!=null&&a.get_length()!=0){var f=a.get_length()/2|0;if(b==null){if(f%3!=0)throw new Cb("Not enough vertices to close a triangle.");b=tb.toIntVector(null);for(var g=
0,h=f;g<h;){var n=g++;b.push(n)}}d==null&&(d=1);var l=Infinity,q=Infinity,u=-Infinity,v=-Infinity;g=0;for(h=f;g<h;)n=g++,f=a.get(n*2),n=a.get(n*2+1),l>f&&(l=f),q>n&&(q=n),u<f&&(u=f),v<n&&(v=n);this.__inflateBounds(l,q);this.__inflateBounds(u,v);this.__commands.drawTriangles(a,b,c,d);this.set___dirty(!0);this.__visible=!0}},endFill:function(){this.__commands.endFill()},lineBitmapStyle:function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!0);this.__commands.lineBitmapStyle(a,b!=null?b.clone():null,c,d)},lineGradientStyle:function(a,
b,c,d,f,g,h,n){n==null&&(n=0);h==null&&(h=1);g==null&&(g=0);if(c==null){c=[];for(var l=0,q=b.length;l<q;)l++,c.push(1)}if(d==null)for(d=[],l=0,q=b.length;l<q;){var u=l++;d.push(Math.ceil(u/(b.length-1)*255))}this.__commands.lineGradientStyle(a,b,c,d,f,g,h,n)},lineStyle:function(a,b,c,d,f,g,h,n){n==null&&(n=3);f==null&&(f=2);d==null&&(d=!1);c==null&&(c=1);b==null&&(b=0);g==null&&(g=1);h==null&&(h=2);a!=null&&(h==1?a>this.__strokePadding&&(this.__strokePadding=Math.ceil(a)):a/2>this.__strokePadding&&
(this.__strokePadding=Math.ceil(a/2)));this.__commands.lineStyle(a,b,c,d,f,g,h,n);a!=null&&(this.__visible=!0)},lineTo:function(a,b){isFinite(a)&&isFinite(b)&&(this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding),this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding),this.__positionX=a,this.__positionY=b,this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding),this.__inflateBounds(this.__positionX+
this.__strokePadding*2,this.__positionY+this.__strokePadding),this.__commands.lineTo(a,b),this.set___dirty(!0))},moveTo:function(a,b){this.__positionX=a;this.__positionY=b;this.__commands.moveTo(a,b)},overrideBlendMode:function(a){a==null&&(a=10);this.__commands.overrideBlendMode(a)},readGraphicsData:function(a){a==null&&(a=!0);var b=tb.toObjectVector(null);this.__owner.__readGraphicsData(b,a);return b},__calculateBezierCubicPoint:function(a,b,c,d,f){var g=1-a;return g*g*g*b+3*c*a*(g*g)+3*d*g*(a*
a)+a*a*a*f},__calculateBezierQuadPoint:function(a,b,c,d){var f=1-a;return f*f*b+2*f*a*c+a*a*d},__cleanup:function(){this.__bounds!=null&&this.__canvas!=null&&(this.set___dirty(!0),this.__transformDirty=!0);this.__bitmap=null;this.__canvas!=null&&(this.__canvas.width=0,this.__canvas.height=0,this.__canvas=null);this.__context!=null&&(this.__context.clearRect(0,0,0,0),this.__context=null)},__getBounds:function(a,b){if(this.__bounds!=null){var c=Ia.__pool.get();this.__bounds.__transform(c,b);a.__expand(c.x,
c.y,c.width,c.height);Ia.__pool.release(c)}},__hitTest:function(a,b,c,d){if(this.__bounds==null)return!1;var f=d.a*d.d-d.b*d.c,g=f==0?-d.tx:1/f*(d.c*(d.ty-b)+d.d*(a-d.tx));f=d.a*d.d-d.b*d.c;a=f==0?-d.ty:1/f*(d.a*(b-d.ty)+d.b*(d.tx-a));return g>this.__bounds.x&&a>this.__bounds.y&&this.__bounds.contains(g,a)?c?C.hitTest(this,g,a):!0:!1},__findExtrema:function(a,b,c,d){var f=[];if(!(b<d&&b>a||b>d&&b<a)||!(c<d&&c>a||c>d&&c<a)){var g=-a+3*b+d-3*c,h=2*a-4*b+2*c,n=b-a,l=h*h-4*g*n;g==0?(g=-n/h,g>0&&g<1&&
f.push(this.__calculateBezierCubicPoint(g,a,b,c,d))):l>=0&&(n=(-h+Math.sqrt(l))/(2*g),g=(-h-Math.sqrt(l))/(2*g),n>0&&n<1&&f.push(this.__calculateBezierCubicPoint(n,a,b,c,d)),g>0&&g<1&&f.push(this.__calculateBezierCubicPoint(g,a,b,c,d)))}b=a;f.push(d);for(d=0;d<f.length;)c=f[d],++d,c<b&&(b=c),c>a&&(a=c);return{min:b,max:a}},__inflateBounds:function(a,b){this.__bounds==null?(this.__bounds=new Ia(a,b,0,0),this.__transformDirty=!0):(a<this.__bounds.x&&(this.__bounds.width+=this.__bounds.x-a,this.__bounds.x=
a,this.__transformDirty=!0),b<this.__bounds.y&&(this.__bounds.height+=this.__bounds.y-b,this.__bounds.y=b,this.__transformDirty=!0),a>this.__bounds.x+this.__bounds.width&&(this.__bounds.width=a-this.__bounds.x),b>this.__bounds.y+this.__bounds.height&&(this.__bounds.height=b-this.__bounds.y))},__readGraphicsData:function(a){for(var b=new wj(this.__commands),c=null,d,f=0,g=this.__commands.types;f<g.length;){d=g[f];++f;switch(d._hx_index){case 4:case 5:case 6:case 7:case 9:case 10:case 17:case 18:c==
null&&(c=new ro);break;default:c!=null&&(a.push(c),c=null)}switch(d._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_BITMAP_FILL;d=b;a.push(new Wu(d.buffer.o[d.oPos],d.buffer.o[d.oPos+1],d.buffer.b[d.bPos],d.buffer.b[d.bPos+1]));break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_FILL;d=b;a.push(new sq(d.buffer.i[d.iPos],d.buffer.f[d.fPos]));break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_GRADIENT_FILL;d=b;a.push(new Xu(d.buffer.o[d.oPos],d.buffer.ii[d.iiPos],d.buffer.ff[d.ffPos],d.buffer.ii[d.iiPos+1],d.buffer.o[d.oPos+1],d.buffer.o[d.oPos+2],d.buffer.o[d.oPos+3],d.buffer.f[d.fPos]));break;case 3:break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;
break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.CUBIC_CURVE_TO;d=b;c.cubicCurveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+
3],d.buffer.f[d.fPos+4],d.buffer.f[d.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.CURVE_TO;d=b;c.curveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=
3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_CIRCLE;d=b;c.__drawCircle(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_ELLIPSE;d=b;c.__drawEllipse(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_RECT;d=b;c.__drawRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;
case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=xa.DRAW_ROUND_RECT;d=b;c.__drawRoundRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],d.buffer.o[d.oPos]!=null?d.buffer.o[d.oPos]:d.buffer.f[d.fPos+4]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=
3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.END_FILL;a.push(new Yu);break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;
b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_BITMAP_STYLE;c=null;
break;case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=
2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_GRADIENT_STYLE;break;case 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=
4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_STYLE;var h=b;d=new Zu(h.buffer.o[h.oPos],h.buffer.b[h.bPos],h.buffer.o[h.oPos+1],h.buffer.o[h.oPos+2],h.buffer.o[h.oPos+3],h.buffer.f[h.fPos+1]);d.fill=new sq(h.buffer.i[h.iPos],h.buffer.f[h.fPos]);a.push(d);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_TO;d=b;c.lineTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;
case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.MOVE_TO;d=b;c.moveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1]);break;default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=d}}c!=null&&a.push(c)},__update:function(a,b){if(this.__bounds==null||this.__bounds.width<=
0||this.__bounds.height<=0)(this.__width>=1||this.__height>=1)&&this.set___dirty(!0),this.__height=this.__width=0;else{var c=this.__owner.__renderTransform;if(c!=null){var d=c.b==0?Math.abs(c.a):Math.sqrt(c.a*c.a+c.b*c.b);var f=c.c==0?Math.abs(c.d):Math.sqrt(c.c*c.c+c.d*c.d);a!=null&&(d=a.b==0?d*a.a:d*Math.sqrt(a.a*a.a+a.b*a.b),f=a.c==0?f*a.d:f*Math.sqrt(a.c*a.c+a.d*a.d));a=Math.abs(this.__bounds.width*d);d=Math.abs(this.__bounds.height*f);if(a<1||d<1)(this.__width>=1||this.__height>=1)&&this.set___dirty(!0),
this.__height=this.__width=0;else{Mh.maxTextureWidth!=null&&a>Mh.maxTextureWidth&&(a=Mh.maxTextureWidth);Mh.maxTextureWidth!=null&&d>Mh.maxTextureHeight&&(d=Mh.maxTextureHeight);f=Math.ceil(a+1);a=Math.ceil(d+1);if(this.__owner.__worldScale9Grid!=null){this.__renderTransform.a=b;this.__renderTransform.d=b;d=1/b;var g=1/b}else this.__renderTransform.a=f/this.__bounds.width,this.__renderTransform.d=a/this.__bounds.height,d=1/this.__renderTransform.a,g=1/this.__renderTransform.d;this.__worldTransform.a=
d*c.a;this.__worldTransform.b=d*c.b;this.__worldTransform.c=g*c.c;this.__worldTransform.d=g*c.d;g=this.__bounds.x;var h=this.__bounds.y;d=g*c.a+h*c.c+c.tx;c=g*c.b+h*c.d+c.ty;b>1?(b=1/b,this.__worldTransform.tx=Math.round(d/b)*b,this.__worldTransform.ty=Math.round(c/b)*b):(this.__worldTransform.tx=Math.round(d),this.__worldTransform.ty=Math.round(c));b=this.__worldTransform;g=b.a*b.d-b.b*b.c;this.__renderTransform.tx=g==0?-b.tx:1/g*(b.c*(b.ty-c)+b.d*(d-b.tx));b=this.__worldTransform;g=b.a*b.d-b.b*
b.c;this.__renderTransform.ty=g==0?-b.ty:1/g*(b.a*(c-b.ty)+b.b*(b.tx-d));f==this.__width&&a==this.__height||this.set___dirty(!0);this.__width=f;this.__height=a}}}},set___dirty:function(a){if(a&&this.__owner!=null){var b=this.__owner;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}a&&(this.__hardwareDirty=this.__softwareDirty=!0);return this.__dirty=a},__class__:Mh,__properties__:{set___dirty:"set___dirty"}};var Xl=function(){};t["openfl.display.IGraphicsFill"]=Xl;Xl.__name__="openfl.display.IGraphicsFill";
Xl.__isInterface__=!0;Xl.prototype={__graphicsFillType:null,__class__:Xl};var xj=function(){};t["openfl.display.IGraphicsData"]=xj;xj.__name__="openfl.display.IGraphicsData";xj.__isInterface__=!0;xj.prototype={__graphicsDataType:null,__class__:xj};var Wu=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!0);this.bitmapData=a;this.matrix=b;this.repeat=c;this.smooth=d;this.__graphicsDataType=4;this.__graphicsFillType=2};t["openfl.display.GraphicsBitmapFill"]=Wu;Wu.__name__="openfl.display.GraphicsBitmapFill";
Wu.__interfaces__=[Xl,xj];Wu.prototype={bitmapData:null,matrix:null,repeat:null,smooth:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Wu};var Yu=function(){this.__graphicsDataType=5;this.__graphicsFillType=3};t["openfl.display.GraphicsEndFill"]=Yu;Yu.__name__="openfl.display.GraphicsEndFill";Yu.__interfaces__=[Xl,xj];Yu.prototype={__graphicsDataType:null,__graphicsFillType:null,__class__:Yu};var Xu=function(a,b,c,d,f,g,h,n){n==null&&(n=0);a==null&&(a=0);g==null&&(g=0);h==null&&(h=
1);this.type=a;this.colors=b;this.alphas=c;this.ratios=d;this.matrix=f;this.spreadMethod=g;this.interpolationMethod=h;this.focalPointRatio=n;this.__graphicsDataType=2;this.__graphicsFillType=1};t["openfl.display.GraphicsGradientFill"]=Xu;Xu.__name__="openfl.display.GraphicsGradientFill";Xu.__interfaces__=[Xl,xj];Xu.prototype={alphas:null,colors:null,focalPointRatio:null,interpolationMethod:null,matrix:null,ratios:null,spreadMethod:null,type:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Xu};
var $u=function(){};t["openfl.display.IGraphicsPath"]=$u;$u.__name__="openfl.display.IGraphicsPath";$u.__isInterface__=!0;var ro=function(a,b,c){c==null&&(c=0);this.commands=a;this.data=b;this.winding=c;this.__graphicsDataType=3};t["openfl.display.GraphicsPath"]=ro;ro.__name__="openfl.display.GraphicsPath";ro.__interfaces__=[$u,xj];ro.prototype={commands:null,data:null,winding:null,__graphicsDataType:null,cubicCurveTo:function(a,b,c,d,f,g){this.commands==null&&(this.commands=tb.toIntVector(null));
this.data==null&&(this.data=tb.toFloatVector(null));this.commands.push(6);this.data.push(a);this.data.push(b);this.data.push(c);this.data.push(d);this.data.push(f);this.data.push(g)},curveTo:function(a,b,c,d){this.commands==null&&(this.commands=tb.toIntVector(null));this.data==null&&(this.data=tb.toFloatVector(null));this.commands.push(3);this.data.push(a);this.data.push(b);this.data.push(c);this.data.push(d)},lineTo:function(a,b){this.commands==null&&(this.commands=tb.toIntVector(null));this.data==
null&&(this.data=tb.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},moveTo:function(a,b){this.commands==null&&(this.commands=tb.toIntVector(null));this.data==null&&(this.data=tb.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},wideLineTo:function(a,b){this.commands==null&&(this.commands=tb.toIntVector(null));this.data==null&&(this.data=tb.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},wideMoveTo:function(a,
b){this.commands==null&&(this.commands=tb.toIntVector(null));this.data==null&&(this.data=tb.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},__drawCircle:function(a,b,c){this.__drawRoundRect(a-c,b-c,c*2,c*2,c*2,c*2)},__drawEllipse:function(a,b,c,d){this.__drawRoundRect(a,b,c,d,c,d)},__drawRect:function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.lineTo(a,b)},__drawRoundRect:function(a,b,c,d,f,g){f*=.5;g*=.5;f>c/2&&(f=c/2);
g>d/2&&(g=d/2);c=a+c;d=b+d;var h=-f+f*.7071067811865476,n=-f+f*.41421356237309503,l=-g+g*.7071067811865476,q=-g+g*.41421356237309503;this.moveTo(c,d-g);this.curveTo(c,d+q,c+h,d+l);this.curveTo(c+n,d,c-f,d);this.lineTo(a+f,d);this.curveTo(a-n,d,a-h,d+l);this.curveTo(a,d+q,a,d-g);this.lineTo(a,b+g);this.curveTo(a,b-q,a-h,b-l);this.curveTo(a-n,b,a+f,b);this.lineTo(c-f,b);this.curveTo(c+n,b,c+h,b-l);this.curveTo(c,b-q,c,b+g);this.lineTo(c,d-g)},__class__:ro};var my=function(a,b,c){this.rects=a;this.indices=
b;this.transforms=c;this.__graphicsDataType=6};t["openfl.display.GraphicsQuadPath"]=my;my.__name__="openfl.display.GraphicsQuadPath";my.__interfaces__=[$u,xj];my.prototype={indices:null,rects:null,transforms:null,__graphicsDataType:null,__class__:my};var av=function(a){this.__glFragmentSource==null&&(this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform sampler2D bitmap;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (bitmap, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\n\t\t}");
this.__glVertexSource==null&&(this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
bi.call(this,a);this.__isGenerated=!0;this.__initGL()};t["openfl.display.GraphicsShader"]=av;av.__name__="openfl.display.GraphicsShader";av.__super__=bi;av.prototype=I(bi.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,bitmap:null,__class__:av});var ny=function(a,b){this.shader=a;this.matrix=b;this.__graphicsDataType=8;this.__graphicsFillType=4};t["openfl.display.GraphicsShaderFill"]=
ny;ny.__name__="openfl.display.GraphicsShaderFill";ny.__interfaces__=[Xl,xj];ny.prototype={matrix:null,shader:null,__graphicsDataType:null,__graphicsFillType:null,__class__:ny};var sq=function(a,b){b==null&&(b=1);a==null&&(a=0);this.alpha=b;this.color=a;this.__graphicsDataType=1;this.__graphicsFillType=0};t["openfl.display.GraphicsSolidFill"]=sq;sq.__name__="openfl.display.GraphicsSolidFill";sq.__interfaces__=[Xl,xj];sq.prototype={alpha:null,color:null,__graphicsDataType:null,__graphicsFillType:null,
__class__:sq};var kz=function(){};t["openfl.display.IGraphicsStroke"]=kz;kz.__name__="openfl.display.IGraphicsStroke";kz.__isInterface__=!0;var Zu=function(a,b,c,d,f,g,h){g==null&&(g=3);f==null&&(f=2);d==null&&(d=0);c==null&&(c=2);b==null&&(b=!1);a==null&&(a=NaN);this.caps=d;this.fill=h;this.joints=f;this.miterLimit=g;this.pixelHinting=b;this.scaleMode=c;this.thickness=a;this.__graphicsDataType=0};t["openfl.display.GraphicsStroke"]=Zu;Zu.__name__="openfl.display.GraphicsStroke";Zu.__interfaces__=
[kz,xj];Zu.prototype={caps:null,fill:null,joints:null,miterLimit:null,pixelHinting:null,scaleMode:null,thickness:null,__graphicsDataType:null,__class__:Zu};var oy=function(a,b,c,d){d==null&&(d=1);this.vertices=a;this.indices=b;this.uvtData=c;this.culling=d;this.__graphicsDataType=7};t["openfl.display.GraphicsTrianglePath"]=oy;oy.__name__="openfl.display.GraphicsTrianglePath";oy.__interfaces__=[$u,xj];oy.prototype={culling:null,indices:null,uvtData:null,vertices:null,__graphicsDataType:null,__class__:oy};
var so=function(){};t["openfl.display.IDisplayObjectLoader"]=so;so.__name__="openfl.display.IDisplayObjectLoader";so.__isInterface__=!0;so.prototype={load:null,loadBytes:null,__class__:so};var tq=function(){};t["openfl.display.ITileContainer"]=tq;tq.__name__="openfl.display.ITileContainer";tq.__isInterface__=!0;tq.prototype={get_numTiles:null,addTile:null,addTileAt:null,addTiles:null,contains:null,getTileAt:null,getTileIndex:null,removeTile:null,removeTileAt:null,removeTiles:null,setTileIndex:null,
sortTiles:null,swapTiles:null,swapTilesAt:null,__class__:tq,__properties__:{get_numTiles:"get_numTiles"}};var Ku=function(a){a==null&&(a=80);this.quality=a};t["openfl.display.JPEGEncoderOptions"]=Ku;Ku.__name__="openfl.display.JPEGEncoderOptions";Ku.prototype={quality:null,__class__:Ku};var lz={fromInt:function(a){return a},fromString:function(a){switch(a){case "bevel":return 0;case "miter":return 1;case "round":return 2;default:return null}},toInt:function(a){return a},toString:function(a){switch(a){case 0:return"bevel";
case 1:return"miter";case 2:return"round";default:return null}}},bv=function(){};t["openfl.display._internal.BitmapDataLoader"]=bv;bv.__name__="openfl.display._internal.BitmapDataLoader";bv.__interfaces__=[so];bv.prototype={load:function(a,b,c){var d=this;if(c.contentType.indexOf("image/")>-1&&a.method=="GET"&&(a.requestHeaders==null||a.requestHeaders.length==0)&&a.userAgent==null)return Dc.loadFromFile(a.url).then(function(h){h=new Ma(h);return Hc.withValue(h)});var f=new Mf,g=new Jj;g.dataFormat=
0;g.addEventListener("complete",function(h){f.completeWith(d.loadBytes(g.data,b,c))});g.addEventListener("ioError",function(h){f.error(h)});g.addEventListener("progress",function(h){f.progress(h.bytesLoaded|0,h.bytesTotal|0)});g.load(a);return f.future},loadBytes:function(a,b,c){return Dc.loadFromBytes(a).then(function(d){d=new Ma(d);return Hc.withValue(d)})},__class__:bv};var cv=function(){};t["openfl.display._internal.ScriptLoader"]=cv;cv.__name__="openfl.display._internal.ScriptLoader";cv.__interfaces__=
[so];cv.prototype={load:function(a,b,c){if(c.contentType!=null&&(c.contentType.indexOf("/javascript")>-1||c.contentType.indexOf("/ecmascript")>-1)){var d=new Mf,f=new Jj;f.dataFormat=1;f.addEventListener("complete",function(g){eval("(function () {"+H.string(f.data)+"})()");d.complete(new Da)});f.addEventListener("ioError",function(g){d.error(g)});f.addEventListener("progress",function(g){d.progress(g.bytesLoaded|0,g.bytesTotal|0)});f.load(a);return d.future}return null},loadBytes:function(a,b,c){return null},
__class__:cv};var dv=function(){};t["openfl.display._internal.AssetManifestLoader"]=dv;dv.__name__="openfl.display._internal.AssetManifestLoader";dv.__interfaces__=[so];dv.prototype={load:function(a,b,c){if(c.contentType!=null&&c.contentType.indexOf("/json")>-1){var d=new Mf,f=new Jj;f.dataFormat=1;f.addEventListener("complete",function(g){g=a.url;var h=g.indexOf("?");h>-1&&(g=g.substring(0,h));var n=xe.parse(f.data,Cg.directory(g));if(n==null)d.error("Cannot parse asset manifest");else{var l=ed.fromManifest(n);
if(l==null)d.error("Cannot open library");else if(l instanceof Bf)l.load().onComplete(function(q){c.assetLibrary=l;Z.registerLibrary(c.url,l);n.name==null||Z.hasLibrary(n.name)||Z.registerLibrary(n.name,l);q=l.getMovieClip("");d.complete(q)}).onProgress(m(d,d.progress)).onError(m(d,d.error));else d.error("Library is not an OpenFL AssetLibrary")}});f.addEventListener("ioError",function(g){d.error(g)});f.addEventListener("progress",function(g){d.progress(g.bytesLoaded|0,g.bytesTotal|0)});f.load(a);
return d.future}return null},loadBytes:function(a,b,c){return null},__class__:dv};var Vf=function(){zb.call(this);this.__drawableType=4;this.contentLoaderInfo=Xj.create(this);this.uncaughtErrorEvents=this.contentLoaderInfo.uncaughtErrorEvents;this.__unloaded=!0};t["openfl.display.Loader"]=Vf;Vf.__name__="openfl.display.Loader";Vf.__registerDefaultLoaders=function(){var a=[new bv,new cv,new dv];Vf.__registeredLoaders=Vf.__registeredLoaders==null?a:a.concat(Vf.__registeredLoaders)};Vf.registerLoader=
function(a){a!=null&&(Vf.__registeredLoaders==null&&(Vf.__registeredLoaders=[]),V.remove(Vf.__registeredLoaders,a),Vf.__registeredLoaders.push(a))};Vf.__super__=zb;Vf.prototype=I(zb.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__unloaded:null,addChild:function(a){throw new Sd("Error #2069: The Loader class does not implement this method.",2069);},addChildAt:function(a,b){throw new Sd("Error #2069: The Loader class does not implement this method.",2069);},
close:function(){md.notImplemented({fileName:"openfl/display/Loader.hx",lineNumber:245,className:"openfl.display.Loader",methodName:"close"})},load:function(a,b){this.unload();var c=new pa("open");this.contentLoaderInfo.dispatchEvent(c);this.contentLoaderInfo.loaderURL=Pa.get_current().get_loaderInfo().url;this.contentLoaderInfo.url=a.url;this.__unloaded=!1;if(a.contentType==null||a.contentType==""){c="";var d=a.url,f=d.indexOf("?");for(f>-1&&(d=d.substring(0,f));N.endsWith(d,"/");)d=d.substring(0,
d.length-1);N.endsWith(d,".bundle")&&(d+="/library.json",a.url=f>-1?d+a.url.substring(f):d);f=d.lastIndexOf(".");f>-1&&(c=d.substring(f+1));switch(c){case "gif":c="image/gif";break;case "jpeg":case "jpg":c="image/jpeg";break;case "js":c="application/javascript";break;case "json":c="application/json";break;case "png":c="image/png";break;case "swf":c="application/x-shockwave-flash";break;default:c="application/x-www-form-urlencoded"}this.contentLoaderInfo.contentType=c}else this.contentLoaderInfo.contentType=
a.contentType;d=null;for(c=Vf.__registeredLoaders.length;c>0&&(--c,d=Vf.__registeredLoaders[c],d=d.load(a,b,this.contentLoaderInfo),d==null););d!=null?(d.onComplete(m(this,this.Loader_onComplete)),d.onProgress(m(this,this.Loader_onProgress)),d.onError(m(this,this.Loader_onError))):this.__dispatchError("No DisplayObject loader found")},loadBytes:function(a,b){for(var c=null,d=Vf.__registeredLoaders.length;d>0&&(--d,c=Vf.__registeredLoaders[d],c=c.loadBytes(a,b,this.contentLoaderInfo),c==null););c!=
null?(c.onComplete(m(this,this.Loader_onComplete)),c.onProgress(m(this,this.Loader_onProgress)),c.onError(m(this,this.Loader_onError))):this.__dispatchError("No DisplayObject loader found")},removeChild:function(a){if(a==this.content)return zb.prototype.removeChild.call(this,this.content);throw new Sd("Error #2069: The Loader class does not implement this method.",2069);},removeChildAt:function(a){throw new Sd("Error #2069: The Loader class does not implement this method.",2069);},setChildIndex:function(a,
b){throw new Sd("Error #2069: The Loader class does not implement this method.",2069);},unload:function(){this.__unloaded||(this.content!=null&&this.content.parent==this&&zb.prototype.removeChild.call(this,this.content),this.__library!=null&&(Z.unloadLibrary(this.contentLoaderInfo.url),this.__library=null),this.content=null,this.contentLoaderInfo.url=null,this.contentLoaderInfo.contentType=null,this.contentLoaderInfo.content=null,this.contentLoaderInfo.bytesLoaded=0,this.contentLoaderInfo.bytesTotal=
0,this.contentLoaderInfo.width=0,this.contentLoaderInfo.height=0,this.__unloaded=!0,this.contentLoaderInfo.dispatchEvent(new pa("unload")))},unloadAndStop:function(a){this.content!=null&&this.content.__stopAllMovieClips();a=0;for(var b=this.get_numChildren();a<b;){var c=a++;this.getChildAt(c).__stopAllMovieClips()}this.unload()},__dispatchError:function(a){if(a instanceof pa)this.contentLoaderInfo.dispatchEvent(a);else{var b=new Oh("ioError");b.text=H.string(a);this.contentLoaderInfo.dispatchEvent(b)}},
Loader_onComplete:function(a){if(a==null)this.__dispatchError("Unknown error");else{this.content=a;this.contentLoaderInfo.content=a;if(this.contentLoaderInfo.width==-1||this.contentLoaderInfo.height==-1){var b=a.get_width()|0;this.contentLoaderInfo.width=b;b=a.get_height()|0;this.contentLoaderInfo.height=b}zb.prototype.addChildAt.call(this,a,0);this.contentLoaderInfo.dispatchEvent(new pa("complete"))}},Loader_onError:function(a){this.__dispatchError(a)},Loader_onProgress:function(a,b){var c=new sh("progress");
c.bytesLoaded=a;c.bytesTotal=b;this.contentLoaderInfo.dispatchEvent(c)},__class__:Vf});var Xj=function(){this.frameRate=this.height=this.width=-1;qa.call(this);this.applicationDomain=to.currentDomain;this.bytesTotal=this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};t["openfl.display.LoaderInfo"]=Xj;Xj.__name__="openfl.display.LoaderInfo";Xj.create=function(a){var b=new Xj;b.uncaughtErrorEvents=new ev;a!=null?b.loader=a:b.url=Xj.__rootURL;return b};Xj.__super__=qa;Xj.prototype=I(qa.prototype,
{applicationDomain:null,assetLibrary:null,bytes:null,bytesLoaded:null,bytesTotal:null,childAllowsParent:null,content:null,contentType:null,frameRate:null,height:null,loader:null,loaderURL:null,parameters:null,parentAllowsChild:null,sameDomain:null,sharedEvents:null,uncaughtErrorEvents:null,url:null,width:null,__completed:null,__complete:function(){this.__completed||(this.bytesLoaded<this.bytesTotal&&(this.bytesLoaded=this.bytesTotal),this.__update(this.bytesLoaded,this.bytesTotal),this.__completed=
!0,this.dispatchEvent(new pa("complete")))},__update:function(a,b){this.bytesLoaded=a;this.bytesTotal=b;this.dispatchEvent(new sh("progress",!1,!1,a,b))},__class__:Xj});var ek=function(){Da.call(this);this.__enabled=!0};t["openfl.display.MovieClip"]=ek;ek.__name__="openfl.display.MovieClip";ek.fromTimeline=function(a){var b=new ek;b.attachTimeline(a);return b};ek.__super__=Da;ek.prototype=I(Da.prototype,{__enabled:null,__hasDown:null,__hasOver:null,__hasUp:null,__mouseIsDown:null,__scene:null,__timeline:null,
addFrameScript:function(a,b){this.__timeline!=null&&this.__timeline.__addFrameScript(a,b)},attachTimeline:function(a){this.__timeline=a;a!=null&&(a.__attachMovieClip(this),this.play())},gotoAndPlay:function(a,b){this.__timeline!=null&&this.__timeline.__gotoAndPlay(a,b)},gotoAndStop:function(a,b){this.__timeline!=null&&this.__timeline.__gotoAndStop(a,b)},nextFrame:function(){this.__timeline!=null&&this.__timeline.__nextFrame()},nextScene:function(){this.__timeline!=null&&this.__timeline.__nextScene()},
play:function(){this.__timeline!=null&&this.__timeline.__play()},prevFrame:function(){this.__timeline!=null&&this.__timeline.__prevFrame()},prevScene:function(){this.__timeline!=null&&this.__timeline.__prevScene()},stop:function(){this.__timeline!=null&&this.__timeline.__stop()},__enterFrame:function(a){this.__timeline!=null&&this.__timeline.__enterFrame(a);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__enterFrame(a)}},__stopAllMovieClips:function(){Da.prototype.__stopAllMovieClips.call(this);
this.stop()},__tabTest:function(a){this.__enabled&&Da.prototype.__tabTest.call(this,a)},__onMouseDown:function(a){this.__enabled&&this.__hasDown&&this.gotoAndStop("_down");this.__mouseIsDown=!0;this.stage!=null&&this.stage.addEventListener("mouseUp",m(this,this.__onMouseUp),!0)},__onMouseUp:function(a){this.__mouseIsDown=!1;this.stage!=null&&this.stage.removeEventListener("mouseUp",m(this,this.__onMouseUp));this.__buttonMode&&(Ke.__eq(a.target,this)&&this.__enabled&&this.__hasOver?this.gotoAndStop("_over"):
this.__enabled&&this.__hasUp&&this.gotoAndStop("_up"))},__onRollOut:function(a){this.__enabled&&(this.__mouseIsDown&&this.__hasOver?this.gotoAndStop("_over"):this.__hasUp&&this.gotoAndStop("_up"))},__onRollOver:function(a){this.__enabled&&this.__hasOver&&this.gotoAndStop("_over")},set_buttonMode:function(a){if(this.__buttonMode!=a){if(a){this.__hasUp=this.__hasOver=this.__hasDown=!1;for(var b=0,c=this.get_currentLabels();b<c.length;){var d=c[b];++b;switch(d.name){case "_down":this.__hasDown=!0;break;
case "_over":this.__hasOver=!0;break;case "_up":this.__hasUp=!0}}if(this.__hasDown||this.__hasOver||this.__hasUp)this.addEventListener("rollOver",m(this,this.__onRollOver)),this.addEventListener("rollOut",m(this,this.__onRollOut)),this.addEventListener("mouseDown",m(this,this.__onMouseDown))}else this.removeEventListener("rollOver",m(this,this.__onRollOver)),this.removeEventListener("rollOut",m(this,this.__onRollOut)),this.removeEventListener("mouseDown",m(this,this.__onMouseDown));this.__buttonMode=
a}return a},get_currentFrame:function(){return this.__timeline!=null?this.__timeline.__currentFrame:1},get_currentFrameLabel:function(){return this.__timeline!=null?this.__timeline.__currentFrameLabel:null},get_currentLabel:function(){return this.__timeline!=null?this.__timeline.__currentLabel:null},get_currentLabels:function(){return this.__timeline!=null?this.__timeline.__currentLabels.slice():[]},get_currentScene:function(){if(this.__timeline!=null)return this.__timeline.__currentScene;this.__scene==
null&&(this.__scene=new py("",[],1));return this.__scene},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},get_framesLoaded:function(){return this.__timeline!=null?this.__timeline.__framesLoaded:1},get_isPlaying:function(){return this.__timeline!=null?this.__timeline.__isPlaying:!1},get_scenes:function(){return this.__timeline!=null?this.__timeline.scenes.slice():[this.get_currentScene()]},get_totalFrames:function(){return this.__timeline!=null?this.__timeline.__totalFrames:
1},__class__:ek,__properties__:I(Da.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_scenes:"get_scenes",get_isPlaying:"get_isPlaying",get_framesLoaded:"get_framesLoaded",set_enabled:"set_enabled",get_enabled:"get_enabled",get_currentScene:"get_currentScene",get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})});var yc=function(a,b){Gh.call(this);this.__context3D=a;this.__context=
a.__context;this.__gl=this.gl=a.__context.webgl;this.__defaultRenderTarget=b;this.__flipped=this.__defaultRenderTarget==null;Mh.maxTextureWidth==null&&(Mh.maxTextureWidth=Mh.maxTextureHeight=this.__gl.getParameter(this.__gl.MAX_TEXTURE_SIZE));this.__matrix=wb._new();this.__values=[];this.__softwareRenderer=new il(null);this.__type="opengl";this.__setBlendMode(10);this.__context3D.__setGLBlend(!0);this.__clipRects=[];this.__maskObjects=[];this.__numClipRects=0;this.__projection=wb._new();this.__projectionFlipped=
wb._new();this.__stencilReference=0;this.__tempRect=new Ia;yc.__staticDefaultDisplayShader==null&&(yc.__staticDefaultDisplayShader=new Tu);yc.__staticDefaultGraphicsShader==null&&(yc.__staticDefaultGraphicsShader=new av);yc.__staticMaskShader==null&&(yc.__staticMaskShader=new Tm);this.__defaultDisplayShader=yc.__staticDefaultDisplayShader;this.__defaultGraphicsShader=yc.__staticDefaultGraphicsShader;this.__defaultShader=this.__defaultDisplayShader;this.__initShader(this.__defaultShader);this.__scrollRectMasks=
new dc(function(){return new Hd});this.__maskShader=yc.__staticMaskShader};t["openfl.display.OpenGLRenderer"]=yc;yc.__name__="openfl.display.OpenGLRenderer";yc.__super__=Gh;yc.prototype=I(Gh.prototype,{gl:null,__context3D:null,__clipRects:null,__currentDisplayShader:null,__currentGraphicsShader:null,__currentRenderTarget:null,__currentShader:null,__currentShaderBuffer:null,__defaultDisplayShader:null,__defaultGraphicsShader:null,__defaultRenderTarget:null,__defaultShader:null,__displayHeight:null,
__displayWidth:null,__flipped:null,__gl:null,__height:null,__maskShader:null,__matrix:null,__maskObjects:null,__numClipRects:null,__offsetX:null,__offsetY:null,__projection:null,__projectionFlipped:null,__scrollRectMasks:null,__softwareRenderer:null,__stencilReference:null,__tempRect:null,__updatedStencil:null,__upscaled:null,__values:null,__width:null,applyAlpha:function(a){yc.__alphaValue[0]=a*this.__worldAlpha;this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addFloatOverride("openfl_Alpha",
yc.__alphaValue):this.__currentShader!=null&&this.__currentShader.__alpha!=null&&(this.__currentShader.__alpha.value=yc.__alphaValue)},applyBitmapData:function(a,b,c){c==null&&(c=!1);this.__currentShaderBuffer!=null?a!=null&&(yc.__textureSizeValue[0]=a.__textureWidth,yc.__textureSizeValue[1]=a.__textureHeight,this.__currentShaderBuffer.addFloatOverride("openfl_TextureSize",yc.__textureSizeValue)):this.__currentShader!=null&&(this.__currentShader.__bitmap!=null&&(this.__currentShader.__bitmap.input=
a,this.__currentShader.__bitmap.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__bitmap.mipFilter=2,this.__currentShader.__bitmap.wrap=c?2:0),this.__currentShader.__texture!=null&&(this.__currentShader.__texture.input=a,this.__currentShader.__texture.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__texture.mipFilter=2,this.__currentShader.__texture.wrap=c?2:0),this.__currentShader.__textureSize!=null&&(a!=null?(yc.__textureSizeValue[0]=a.__textureWidth,yc.__textureSizeValue[1]=
a.__textureHeight,this.__currentShader.__textureSize.value=yc.__textureSizeValue):this.__currentShader.__textureSize.value=null))},applyColorTransform:function(a){var b=a!=null&&!a.__isDefault(!0);this.applyHasColorTransform(b);b?(a.__setArrays(yc.__colorMultipliersValue,yc.__colorOffsetsValue),this.__currentShaderBuffer!=null?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",yc.__colorMultipliersValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",yc.__colorOffsetsValue)):
this.__currentShader!=null&&(this.__currentShader.__colorMultiplier!=null&&(this.__currentShader.__colorMultiplier.value=yc.__colorMultipliersValue),this.__currentShader.__colorOffset!=null&&(this.__currentShader.__colorOffset.value=yc.__colorOffsetsValue))):this.__currentShaderBuffer!=null?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",yc.__emptyColorValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",yc.__emptyColorValue)):this.__currentShader!=null&&(this.__currentShader.__colorMultiplier!=
null&&(this.__currentShader.__colorMultiplier.value=yc.__emptyColorValue),this.__currentShader.__colorOffset!=null&&(this.__currentShader.__colorOffset.value=yc.__emptyColorValue))},applyHasColorTransform:function(a){yc.__hasColorTransformValue[0]=a;this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addBoolOverride("openfl_HasColorTransform",yc.__hasColorTransformValue):this.__currentShader!=null&&this.__currentShader.__hasColorTransform!=null&&(this.__currentShader.__hasColorTransform.value=
yc.__hasColorTransformValue)},applyMatrix:function(a){this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addFloatOverride("openfl_Matrix",a):this.__currentShader!=null&&this.__currentShader.__matrix!=null&&(this.__currentShader.__matrix.value=a)},getMatrix:function(a){this.gl!=null?(a=this.__getMatrix(a,1),wb.set(this.__matrix,0,a[0]),wb.set(this.__matrix,1,a[1]),wb.set(this.__matrix,2,a[2]),wb.set(this.__matrix,3,a[3]),wb.set(this.__matrix,4,a[4]),wb.set(this.__matrix,5,a[5]),wb.set(this.__matrix,
6,a[6]),wb.set(this.__matrix,7,a[7]),wb.set(this.__matrix,8,a[8]),wb.set(this.__matrix,9,a[9]),wb.set(this.__matrix,10,a[10]),wb.set(this.__matrix,11,a[11]),wb.set(this.__matrix,12,a[12]),wb.set(this.__matrix,13,a[13]),wb.set(this.__matrix,14,a[14]),wb.set(this.__matrix,15,a[15])):(wb.identity(this.__matrix),wb.set(this.__matrix,0,a.a),wb.set(this.__matrix,1,a.b),wb.set(this.__matrix,4,a.c),wb.set(this.__matrix,5,a.d),wb.set(this.__matrix,12,a.tx),wb.set(this.__matrix,13,a.ty));return this.__matrix},
setShader:function(a){this.__currentShaderBuffer=null;this.__currentShader!=a&&(a==null?(this.__currentShader=null,this.__context3D.setProgram(null)):(this.__currentShader=a,this.__initShader(a),this.__context3D.setProgram(a.program),this.__context3D.__flushGLProgram(),this.__currentShader.__enable(),this.__context3D.__state.shader=a))},setViewport:function(){this.__gl.viewport(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight)},updateShader:function(){this.__currentShader!=null&&
(this.__currentShader.__position!=null&&(this.__currentShader.__position.__useArray=!0),this.__currentShader.__textureCoord!=null&&(this.__currentShader.__textureCoord.__useArray=!0),this.__context3D.setProgram(this.__currentShader.program),this.__context3D.__flushGLProgram(),this.__context3D.__flushGLTextures(),this.__currentShader.__update())},useAlphaArray:function(){this.__currentShader!=null&&this.__currentShader.__alpha!=null&&(this.__currentShader.__alpha.__useArray=!0)},useColorTransformArray:function(){this.__currentShader!=
null&&(this.__currentShader.__colorMultiplier!=null&&(this.__currentShader.__colorMultiplier.__useArray=!0),this.__currentShader.__colorOffset!=null&&(this.__currentShader.__colorOffset.__useArray=!0))},__cleanup:function(){this.__stencilReference>0&&(this.__stencilReference=0,this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));this.__numClipRects>0&&(this.__numClipRects=0,this.__scissorRect())},__clear:function(){this.__stage==null||this.__stage.__transparent?this.__context3D.clear(0,
0,0,0,0,0,1):this.__context3D.clear(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2],1,0,0,1);this.__cleared=!0},__clearShader:function(){this.__currentShader!=null&&(this.__currentShaderBuffer==null?this.__currentShader.__bitmap!=null&&(this.__currentShader.__bitmap.input=null):this.__currentShaderBuffer.clearOverride(),this.__currentShader.__texture!=null&&(this.__currentShader.__texture.input=null),this.__currentShader.__textureSize!=null&&(this.__currentShader.__textureSize.value=
null),this.__currentShader.__hasColorTransform!=null&&(this.__currentShader.__hasColorTransform.value=null),this.__currentShader.__position!=null&&(this.__currentShader.__position.value=null),this.__currentShader.__matrix!=null&&(this.__currentShader.__matrix.value=null),this.__currentShader.__clearUseArray())},__copyShader:function(a){this.__currentShader=a.__currentShader;this.__currentShaderBuffer=a.__currentShaderBuffer;this.__currentDisplayShader=a.__currentDisplayShader;this.__currentGraphicsShader=
a.__currentGraphicsShader},__getMatrix:function(a,b){var c=gb.__pool.get();c.copyFrom(a);c.concat(this.__worldTransform);if(b==0||b==1&&c.b==0&&c.c==0&&c.a<1.001&&c.a>.999&&c.d<1.001&&c.d>.999)c.tx=Math.round(c.tx),c.ty=Math.round(c.ty);wb.identity(this.__matrix);wb.set(this.__matrix,0,c.a);wb.set(this.__matrix,1,c.b);wb.set(this.__matrix,4,c.c);wb.set(this.__matrix,5,c.d);wb.set(this.__matrix,12,c.tx);wb.set(this.__matrix,13,c.ty);wb.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);
this.__values[0]=wb.get(this.__matrix,0);this.__values[1]=wb.get(this.__matrix,1);this.__values[2]=wb.get(this.__matrix,2);this.__values[3]=wb.get(this.__matrix,3);this.__values[4]=wb.get(this.__matrix,4);this.__values[5]=wb.get(this.__matrix,5);this.__values[6]=wb.get(this.__matrix,6);this.__values[7]=wb.get(this.__matrix,7);this.__values[8]=wb.get(this.__matrix,8);this.__values[9]=wb.get(this.__matrix,9);this.__values[10]=wb.get(this.__matrix,10);this.__values[11]=wb.get(this.__matrix,11);this.__values[12]=
wb.get(this.__matrix,12);this.__values[13]=wb.get(this.__matrix,13);this.__values[14]=wb.get(this.__matrix,14);this.__values[15]=wb.get(this.__matrix,15);gb.__pool.release(c);return this.__values},__initShader:function(a){return a!=null?(a.__context==null&&(a.__context=this.__context3D,a.__init()),a):this.__defaultShader},__initDisplayShader:function(a){return a!=null?(a.__context==null&&(a.__context=this.__context3D,a.__init()),a):this.__defaultDisplayShader},__initGraphicsShader:function(a){return a!=
null?(a.__context==null&&(a.__context=this.__context3D,a.__init()),a):this.__defaultGraphicsShader},__initShaderBuffer:function(a){return a!=null?this.__initGraphicsShader(a.shader):this.__defaultGraphicsShader},__popMask:function(){if(this.__stencilReference!=0){var a=this.__maskObjects.pop();this.__stencilReference>1?(this.__context3D.setStencilActions(2,1,0,0,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255),this.__context3D.setColorMask(!1,!1,!1,!1),this.__renderDrawableMask(a),
this.__stencilReference--,this.__context3D.setStencilActions(2,1,5,5,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0),this.__context3D.setColorMask(!0,!0,!0,!0)):(this.__stencilReference=0,this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0))}},__popMaskObject:function(a,b){b==null&&(b=!0);a.__mask!=null&&this.__popMask();b&&a.__scrollRect!=null&&(a.__renderTransform.b!=0||a.__renderTransform.c!=0?(this.__scrollRectMasks.release(this.__maskObjects[this.__maskObjects.length-
1]),this.__popMask()):this.__popMaskRect())},__popMaskRect:function(){this.__numClipRects>0&&(this.__numClipRects--,this.__numClipRects>0?this.__scissorRect(this.__clipRects[this.__numClipRects-1]):this.__scissorRect())},__pushMask:function(a){this.__stencilReference==0&&(this.__context3D.clear(0,0,0,0,0,0,4),this.__updatedStencil=!0);this.__context3D.setStencilActions(2,1,2,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.__context3D.setColorMask(!1,!1,!1,!1);
this.__renderDrawableMask(a);this.__maskObjects.push(a);this.__stencilReference++;this.__context3D.setStencilActions(2,1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0);this.__context3D.setColorMask(!0,!0,!0,!0)},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=null&&(a.__renderTransform.b!=0||a.__renderTransform.c!=0?(b=this.__scrollRectMasks.get(),b.get_graphics().clear(),b.get_graphics().beginFill(65280),b.get_graphics().drawRect(a.__scrollRect.x,
a.__scrollRect.y,a.__scrollRect.width,a.__scrollRect.height),b.__renderTransform.copyFrom(a.__renderTransform),this.__pushMask(b)):this.__pushMaskRect(a.__scrollRect,a.__renderTransform));a.__mask!=null&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=new Ia);var c=gb.__pool.get();c.copyFrom(b);c.concat(this.__worldTransform);b=this.__clipRects[this.__numClipRects];a.__transform(b,c);this.__numClipRects>0&&
(a=this.__clipRects[this.__numClipRects-1],b.__contract(a.x,a.y,a.width,a.height));b.height<0&&(b.height=0);b.width<0&&(b.width=0);gb.__pool.release(c);this.__scissorRect(b);this.__numClipRects++},__render:function(a){this.__context3D.setColorMask(!0,!0,!0,!0);this.__context3D.setCulling(3);this.__context3D.setDepthTest(!1,0);this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0);this.__context3D.setScissorRectangle(null);this.__blendMode=null;this.__setBlendMode(10);
if(this.__defaultRenderTarget==null){if(this.__context3D.__backBufferWantsBestResolution?yc.__scissorRectangle.setTo(this.__offsetX/this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):yc.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight),this.__context3D.setScissorRectangle(yc.__scissorRectangle),this.__upscaled=this.__worldTransform.a!=1||this.__worldTransform.d!=1,this.__renderDrawable(a),
this.__offsetX>0||this.__offsetY>0)this.__offsetX>0&&(yc.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height),this.__context3D.setScissorRectangle(yc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),yc.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height),this.__context3D.setScissorRectangle(yc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),
this.__offsetY>0&&(yc.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY),this.__context3D.setScissorRectangle(yc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),yc.__scissorRectangle.setTo(0,this.__offsetY+this.__displayHeight,this.__width,this.__height),this.__context3D.setScissorRectangle(yc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),
this.__context3D.setScissorRectangle(null)}else{this.__context3D.__backBufferWantsBestResolution?yc.__scissorRectangle.setTo(this.__offsetX/this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):yc.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(yc.__scissorRectangle);var b=a.__mask,c=a.__scrollRect;a.__mask=null;a.__scrollRect=null;this.__renderDrawable(a);
a.__mask=b;a.__scrollRect=c}this.__context3D.present()},__renderDrawable:function(a){if(a!=null)switch(a.__drawableType){case 0:fv.renderDrawable(a,this);break;case 2:Vi.renderDrawable(a,this);break;case 3:kl.renderDrawable(a,this);break;case 4:case 5:gv.renderDrawable(a,this);break;case 6:hv.renderDrawable(a,this);break;case 7:ll.renderDrawable(a,this);break;case 8:Wi.renderDrawable(a,this);break;case 9:Ka.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 0:fv.renderDrawableMask(a,
this);break;case 2:Vi.renderDrawableMask(a,this);break;case 3:kl.renderDrawableMask(a,this);break;case 4:case 5:gv.renderDrawableMask(a,this);break;case 6:hv.renderDrawableMask(a,this);break;case 7:ll.renderDrawableMask(a,this);break;case 8:Wi.renderDrawableMask(a,this);break;case 9:Ka.renderDrawableMask(a,this)}},__renderFilterPass:function(a,b,c,d){d==null&&(d=!0);if(a!=null&&b!=null&&this.__defaultRenderTarget!=null){var f=this.__context3D.__state.renderToTexture,g=this.__context3D.__state.renderToTextureDepthStencil,
h=this.__context3D.__state.renderToTextureAntiAlias,n=this.__context3D.__state.renderToTextureSurfaceSelector;this.__context3D.setRenderToTexture(this.__defaultRenderTarget.getTexture(this.__context3D),!1);d&&this.__context3D.clear(0,0,0,0,0,0,1);b=this.__initShader(b);this.setShader(b);this.applyAlpha(1);this.applyBitmapData(a,c);this.applyColorTransform(null);this.applyMatrix(this.__getMatrix(a.__renderTransform,1));this.updateShader();c=a.getVertexBuffer(this.__context3D);b.__position!=null&&this.__context3D.setVertexBufferAt(b.__position.index,
c,0,3);b.__textureCoord!=null&&this.__context3D.setVertexBufferAt(b.__textureCoord.index,c,3,2);a=a.getIndexBuffer(this.__context3D);this.__context3D.drawTriangles(a);f!=null?this.__context3D.setRenderToTexture(f,g,h,n):this.__context3D.setRenderToBackBuffer();this.__clearShader()}},__resize:function(a,b){this.__width=a;this.__height=b;a=this.__defaultRenderTarget==null?this.__stage.stageWidth:this.__defaultRenderTarget.width;b=this.__defaultRenderTarget==null?this.__stage.stageHeight:this.__defaultRenderTarget.height;
if(this.__defaultRenderTarget==null){var c=this.__worldTransform;c=Math.round(0*c.a+0*c.c+c.tx)}else c=0;this.__offsetX=c;this.__defaultRenderTarget==null?(c=this.__worldTransform,c=Math.round(0*c.b+0*c.d+c.ty)):c=0;this.__offsetY=c;this.__defaultRenderTarget==null?(c=this.__worldTransform,c=Math.round(a*c.a+0*c.c+c.tx-this.__offsetX)):c=a;this.__displayWidth=c;this.__defaultRenderTarget==null?(c=this.__worldTransform,c=Math.round(0*c.b+b*c.d+c.ty-this.__offsetY)):c=b;this.__displayHeight=c;wb.createOrtho(this.__projection,
0,this.__displayWidth+this.__offsetX*2,0,this.__displayHeight+this.__offsetY*2,-1E3,1E3);wb.createOrtho(this.__projectionFlipped,0,this.__displayWidth+this.__offsetX*2,this.__displayHeight+this.__offsetY*2,0,-1E3,1E3)},__resumeClipAndMask:function(a){this.__stencilReference>0?(this.__context3D.setStencilActions(2,1,5,5,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0)):(this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));this.__numClipRects>
0?this.__scissorRect(this.__clipRects[this.__numClipRects-1]):this.__scissorRect()},__scissorRect:function(a){if(a!=null){var b=Math.floor(a.x),c=Math.floor(a.y),d=a.width>0?Math.ceil(a.get_right())-b:0,f=a.height>0?Math.ceil(a.get_bottom())-c:0;this.__context3D.__backBufferWantsBestResolution&&(f=1.5/this.__pixelRatio,b=a.x/this.__pixelRatio,c=a.y/this.__pixelRatio,d=a.width>0?a.get_right()/this.__pixelRatio-b+f:0,f=a.height>0?a.get_bottom()/this.__pixelRatio-c+f:0);d<0&&(d=0);f<0&&(f=0);yc.__scissorRectangle.setTo(b,
c,d,f);this.__context3D.setScissorRectangle(yc.__scissorRectangle)}else this.__context3D.setScissorRectangle(null)},__setBlendMode:function(a){this.__overrideBlendMode!=null&&(a=this.__overrideBlendMode);if(this.__blendMode!=a)switch(this.__blendMode=a,a){case 0:this.__context3D.setBlendFactors(2,2);break;case 9:this.__context3D.setBlendFactors(1,5);break;case 12:this.__context3D.setBlendFactors(2,6);break;case 14:this.__context3D.setBlendFactors(2,2);this.__context3D.__setGLBlendEquation(this.__gl.FUNC_REVERSE_SUBTRACT);
break;default:this.__context3D.setBlendFactors(2,5)}},__setRenderTarget:function(a){this.__defaultRenderTarget=a;this.__flipped=a==null;a!=null&&this.__resize(a.width,a.height)},__setShaderBuffer:function(a){this.setShader(a.shader);this.__currentShaderBuffer=a},__suspendClipAndMask:function(){this.__stencilReference>0&&(this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));this.__numClipRects>0&&this.__scissorRect()},__updateShaderBuffer:function(a){this.__currentShader!=
null&&this.__currentShaderBuffer!=null&&this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer,a)},__class__:yc});var jy=function(a){a==null&&(a=!1);this.fastCompression=a};t["openfl.display.PNGEncoderOptions"]=jy;jy.__name__="openfl.display.PNGEncoderOptions";jy.prototype={fastCompression:null,__class__:jy};var Tq=function(a){this.onComplete=new jf;this.display=a;a!=null&&(a.addEventListener("unload",m(this,this.display_onUnload)),Pa.get_current().addChild(a))};t["openfl.display.Preloader"]=
Tq;Tq.__name__="openfl.display.Preloader";Tq.prototype={onComplete:null,complete:null,display:null,ready:null,start:function(){this.ready=!0;Pa.get_current().get_loaderInfo().__complete();if(this.display!=null){var a=new pa("complete",!0,!0);this.display.dispatchEvent(a);a.isDefaultPrevented()||this.display.dispatchEvent(new pa("unload"))}else this.complete||(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){Pa.get_current().get_loaderInfo().__update(a,b);this.display!=null&&this.display.dispatchEvent(new sh("progress",
!0,!0,a,b))},display_onUnload:function(a){this.display!=null&&(this.display.removeEventListener("unload",m(this,this.display_onUnload)),this.display.parent==Pa.get_current()&&Pa.get_current().removeChild(this.display),Pa.get_current().stage.set_focus(null),this.display=null);this.ready&&!this.complete&&(this.complete=!0,this.onComplete.dispatch())},__class__:Tq};var iv=function(){Da.call(this);var a=this.getBackgroundColor(),b=0;.299*(a>>16&255)+.587*(a>>8&255)+.114*(a&255)<70&&(b=16777215);a=this.getHeight()/
2-3.5;var c=this.getWidth()-60;this.outline=new Hd;this.outline.get_graphics().beginFill(b,.07);this.outline.get_graphics().drawRect(0,0,c,7);this.outline.set_x(30);this.outline.set_y(a);this.outline.set_alpha(0);this.addChild(this.outline);this.progress=new Hd;this.progress.get_graphics().beginFill(b,.35);this.progress.get_graphics().drawRect(0,0,c-4,3);this.progress.set_x(32);this.progress.set_y(a+2);this.progress.set_scaleX(0);this.progress.set_alpha(0);this.addChild(this.progress);this.startAnimation=
Pa.getTimer()+100;this.endAnimation=this.startAnimation+1E3;this.addEventListener("addedToStage",m(this,this.this_onAddedToStage))};t["openfl.display.DefaultPreloader"]=iv;iv.__name__="openfl.display.DefaultPreloader";iv.__super__=Da;iv.prototype=I(Da.prototype,{endAnimation:null,outline:null,progress:null,startAnimation:null,getBackgroundColor:function(){var a=Pa.get_current().stage.window.context.attributes;return Object.prototype.hasOwnProperty.call(a,"background")&&a.background!=null?a.background:
0},getHeight:function(){var a=Pa.get_current().stage.window.__height;return a>0?a:Pa.get_current().stage.stageHeight},getWidth:function(){var a=Pa.get_current().stage.window.__width;return a>0?a:Pa.get_current().stage.stageWidth},onInit:function(){this.addEventListener("enterFrame",m(this,this.this_onEnterFrame))},onLoaded:function(){this.removeEventListener("enterFrame",m(this,this.this_onEnterFrame));this.dispatchEvent(new pa("unload"))},onUpdate:function(a,b){var c=0;b>0&&(c=a/b,c>1&&(c=1));this.progress.set_scaleX(c)},
this_onAddedToStage:function(a){this.removeEventListener("addedToStage",m(this,this.this_onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);this.addEventListener("progress",m(this,this.this_onProgress));this.addEventListener("complete",m(this,this.this_onComplete))},this_onComplete:function(a){a.preventDefault();this.removeEventListener("progress",m(this,this.this_onProgress));this.removeEventListener("complete",m(this,this.this_onComplete));
this.onLoaded()},this_onEnterFrame:function(a){a=(Pa.getTimer()-this.startAnimation)/(this.endAnimation-this.startAnimation);a<0&&(a=0);a>1&&(a=1);this.outline.set_alpha(this.progress.set_alpha(a))},this_onProgress:function(a){this.onUpdate(a.bytesLoaded|0,a.bytesTotal|0)},__class__:iv});var py=function(a,b,c){this.name=a;this.labels=b;this.numFrames=c};t["openfl.display.Scene"]=py;py.__name__="openfl.display.Scene";py.prototype={labels:null,name:null,numFrames:null,__class__:py};var $z={_new:function(a){return{}}},
Su=function(){this.channels=0;this.filter=5;this.index=this.height=0;this.mipFilter=2;this.wrap=this.width=0};t["openfl.display.ShaderInput"]=Su;Su.__name__="openfl.display.ShaderInput";Su.prototype={channels:null,filter:null,height:null,index:null,input:null,mipFilter:null,name:null,width:null,wrap:null,__isUniform:null,__disableGL:function(a,b){b<0||a.setTextureAt(b,null)},__updateGL:function(a,b,c,d,f,g){c=c!=null?c:this.input;d=d!=null?d:this.filter;f=f!=null?f:this.mipFilter;g=g!=null?g:this.wrap;
c!=null?(a.setTextureAt(b,c.getTexture(a)),a.setSamplerStateAt(b,g,d,f)):a.setTextureAt(b,null)},__class__:Su};var qo=function(){this.index=0};t["openfl.display.ShaderParameter"]=qo;qo.__name__="openfl.display.ShaderParameter";qo.prototype={index:null,name:null,type:null,value:null,__arrayLength:null,__internal:null,__isBool:null,__isFloat:null,__isInt:null,__isUniform:null,__length:null,__uniformMatrix:null,__useArray:null,__disableGL:function(a){if(!(this.index<0||(a=a.gl,this.__isUniform)))for(var b=
0,c=this.__arrayLength;b<c;){var d=b++;a.disableVertexAttribArray(this.index+d)}},__updateGL:function(a,b){if(!(this.index<0)){a=a.gl;b=b!=null?b:this.value;var c=this.__isBool?b:null,d=this.__isFloat?b:null,f=this.__isInt?b:null;if(this.__isUniform)if(b!=null&&b.length>=this.__length)switch(this.type){case 0:a.uniform1i(this.index,c[0]?1:0);break;case 1:a.uniform2i(this.index,c[0]?1:0,c[1]?1:0);break;case 2:a.uniform3i(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.uniform4i(this.index,c[0]?
1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.uniform1f(this.index,d[0]);break;case 5:a.uniform2f(this.index,d[0],d[1]);break;case 6:a.uniform3f(this.index,d[0],d[1],d[2]);break;case 7:a.uniform4f(this.index,d[0],d[1],d[2],d[3]);break;case 8:a.uniform1i(this.index,f[0]);break;case 9:a.uniform2i(this.index,f[0],f[1]);break;case 10:a.uniform3i(this.index,f[0],f[1],f[2]);break;case 11:a.uniform4i(this.index,f[0],f[1],f[2],f[3]);break;case 12:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];
this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];yd.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];this.__uniformMatrix[4]=d[4];this.__uniformMatrix[5]=d[5];this.__uniformMatrix[6]=d[6];this.__uniformMatrix[7]=d[7];this.__uniformMatrix[8]=d[8];yd.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=d[0],this.__uniformMatrix[1]=
d[1],this.__uniformMatrix[2]=d[2],this.__uniformMatrix[3]=d[3],this.__uniformMatrix[4]=d[4],this.__uniformMatrix[5]=d[5],this.__uniformMatrix[6]=d[6],this.__uniformMatrix[7]=d[7],this.__uniformMatrix[8]=d[8],this.__uniformMatrix[9]=d[9],this.__uniformMatrix[10]=d[10],this.__uniformMatrix[11]=d[11],this.__uniformMatrix[12]=d[12],this.__uniformMatrix[13]=d[13],this.__uniformMatrix[14]=d[14],this.__uniformMatrix[15]=d[15],yd.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else switch(this.type){case 4:a.uniform1f(this.index,
0);break;case 5:a.uniform2f(this.index,0,0);break;case 6:a.uniform3f(this.index,0,0,0);break;case 7:a.uniform4f(this.index,0,0,0,0);break;case 0:case 8:a.uniform1i(this.index,0);break;case 1:case 9:a.uniform2i(this.index,0,0);break;case 2:case 10:a.uniform3i(this.index,0,0,0);break;case 3:case 11:a.uniform4i(this.index,0,0,0,0);break;case 12:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;yd.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);
break;case 16:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;this.__uniformMatrix[4]=0;this.__uniformMatrix[5]=0;this.__uniformMatrix[6]=0;this.__uniformMatrix[7]=0;this.__uniformMatrix[8]=0;yd.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=0,this.__uniformMatrix[1]=0,this.__uniformMatrix[2]=0,this.__uniformMatrix[3]=0,this.__uniformMatrix[4]=0,this.__uniformMatrix[5]=0,this.__uniformMatrix[6]=0,
this.__uniformMatrix[7]=0,this.__uniformMatrix[8]=0,this.__uniformMatrix[9]=0,this.__uniformMatrix[10]=0,this.__uniformMatrix[11]=0,this.__uniformMatrix[12]=0,this.__uniformMatrix[13]=0,this.__uniformMatrix[14]=0,this.__uniformMatrix[15]=0,yd.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else if(this.__useArray||b!=null&&b.length!=this.__length)for(g=0,h=this.__arrayLength;g<h;)n=g++,a.enableVertexAttribArray(this.index+n);else{for(var g=0,h=this.__arrayLength;g<h;){var n=g++;a.disableVertexAttribArray(this.index+
n)}if(b!=null)switch(this.type){case 0:a.vertexAttrib1f(this.index,c[0]?1:0);break;case 1:a.vertexAttrib2f(this.index,c[0]?1:0,c[1]?1:0);break;case 2:a.vertexAttrib3f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.vertexAttrib4f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.vertexAttrib1f(this.index,d[0]);break;case 5:a.vertexAttrib2f(this.index,d[0],d[1]);break;case 6:a.vertexAttrib3f(this.index,d[0],d[1],d[2]);break;case 7:a.vertexAttrib4f(this.index,d[0],d[1],d[2],d[3]);
break;case 8:a.vertexAttrib1f(this.index,f[0]);break;case 9:a.vertexAttrib2f(this.index,f[0],f[1]);break;case 10:a.vertexAttrib3f(this.index,f[0],f[1],f[2]);break;case 11:a.vertexAttrib4f(this.index,f[0],f[1],f[2],f[3]);break;case 12:a.vertexAttrib2f(this.index+0,d[0],d[1]);a.vertexAttrib2f(this.index+1,d[2],d[3]);break;case 16:a.vertexAttrib3f(this.index+0,d[0],d[1],d[2]);a.vertexAttrib3f(this.index+1,d[3],d[4],d[5]);a.vertexAttrib3f(this.index+2,d[6],d[7],d[8]);break;case 20:a.vertexAttrib4f(this.index+
0,d[0],d[1],d[2],d[3]),a.vertexAttrib4f(this.index+1,d[4],d[5],d[6],d[7]),a.vertexAttrib4f(this.index+2,d[8],d[9],d[10],d[11]),a.vertexAttrib4f(this.index+3,d[12],d[13],d[14],d[15])}else switch(this.type){case 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+
1,0,0);break;case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,0,0,0)}}}},__updateGLFromBuffer:function(a,b,c,d,f){if(!(this.index<0))if(a=a.gl,this.__isUniform){if(d>=this.__length)switch(this.type){case 4:a.uniform1f(this.index,b[c]);break;case 5:a.uniform2f(this.index,
b[c],b[c+1]);break;case 6:a.uniform3f(this.index,b[c],b[c+1],b[c+2]);break;case 7:a.uniform4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);break;case 0:case 8:a.uniform1i(this.index,b[c]|0);break;case 1:case 9:a.uniform2i(this.index,b[c]|0,b[c+1]|0);break;case 2:case 10:a.uniform3i(this.index,b[c]|0,b[c+1]|0,b[c+2]|0);break;case 3:case 11:a.uniform4i(this.index,b[c]|0,b[c+1]|0,b[c+2]|0,b[c+3]|0);break;case 12:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=
b[c+3];yd.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];this.__uniformMatrix[4]=b[c+4];this.__uniformMatrix[5]=b[c+5];this.__uniformMatrix[6]=b[c+6];this.__uniformMatrix[7]=b[c+7];this.__uniformMatrix[8]=b[c+8];yd.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=b[c],this.__uniformMatrix[1]=b[c+1],this.__uniformMatrix[2]=
b[c+2],this.__uniformMatrix[3]=b[c+3],this.__uniformMatrix[4]=b[c+4],this.__uniformMatrix[5]=b[c+5],this.__uniformMatrix[6]=b[c+6],this.__uniformMatrix[7]=b[c+7],this.__uniformMatrix[8]=b[c+8],this.__uniformMatrix[9]=b[c+9],this.__uniformMatrix[10]=b[c+10],this.__uniformMatrix[11]=b[c+11],this.__uniformMatrix[12]=b[c+12],this.__uniformMatrix[13]=b[c+13],this.__uniformMatrix[14]=b[c+14],this.__uniformMatrix[15]=b[c+15],yd.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}}else if(this.__internal||
d!=0&&d!=this.__length){b=a.FLOAT;this.__isBool?b=a.INT:this.__isInt&&(b=a.INT);g=0;for(h=this.__arrayLength;g<h;)n=g++,a.enableVertexAttribArray(this.index+n);if(d>0)for(g=0,h=this.__arrayLength;g<h;)n=g++,a.vertexAttribPointer(this.index+n,this.__length,b,!1,this.__length*4,(c+f*this.__length+n*this.__arrayLength)*4)}else{for(var g=0,h=this.__arrayLength;g<h;){var n=g++;a.disableVertexAttribArray(this.index+n)}if(d>0)switch(this.type){case 0:case 4:case 8:a.vertexAttrib1f(this.index,b[c]);break;
case 1:case 5:case 9:a.vertexAttrib2f(this.index,b[c],b[c+1]);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,b[c],b[c+1],b[c+2]);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);break;case 12:a.vertexAttrib2f(this.index+0,b[c],b[c+1]);a.vertexAttrib2f(this.index+1,b[c+2],b[c+2+1]);break;case 16:a.vertexAttrib3f(this.index+0,b[c],b[c+1],b[c+2]);a.vertexAttrib3f(this.index+1,b[c+3],b[c+3+1],b[c+3+2]);a.vertexAttrib3f(this.index+2,b[c+6],b[c+6+1],b[c+6+2]);
break;case 20:a.vertexAttrib4f(this.index+0,b[c],b[c+1],b[c+2],b[c+3]),a.vertexAttrib4f(this.index+1,b[c+4],b[c+4+1],b[c+4+2],b[c+4+3]),a.vertexAttrib4f(this.index+2,b[c+8],b[c+8+1],b[c+8+2],b[c+8+3]),a.vertexAttrib4f(this.index+3,b[c+12],b[c+12+1],b[c+12+2],b[c+12+3])}else switch(this.type){case 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,
0,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+1,0,0);break;case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,0,0,0)}}},set_name:function(a){this.__internal=N.startsWith(a,"openfl_");return this.name=a},__class__:qo,__properties__:{set_name:"set_name"}};
var Hd=function(){ma.call(this);this.__drawableType=3};t["openfl.display.Shape"]=Hd;Hd.__name__="openfl.display.Shape";Hd.__super__=ma;Hd.prototype=I(ma.prototype,{get_graphics:function(){this.__graphics==null&&(this.__graphics=new Mh(this));return this.__graphics},__class__:Hd,__properties__:I(ma.prototype.__properties__,{get_graphics:"get_graphics"})});var uo=function(a,b,c,d){Ja.call(this);this.__drawableType=6;this.enabled=!0;this.trackAsMenu=!1;this.useHandCursor=!0;this.__upState=a!=null?a:
new ma;this.__overState=b;this.__downState=c;this.set_hitTestState(d!=null?d:new ma);this.addEventListener("mouseDown",m(this,this.__this_onMouseDown));this.addEventListener("mouseOut",m(this,this.__this_onMouseOut));this.addEventListener("mouseOver",m(this,this.__this_onMouseOver));this.addEventListener("mouseUp",m(this,this.__this_onMouseUp));this.__tabEnabled=!0;this.set___currentState(this.__upState);uo.__constructor!=null&&(a=uo.__constructor,uo.__constructor=null,a(this))};t["openfl.display.SimpleButton"]=
uo;uo.__name__="openfl.display.SimpleButton";uo.__super__=Ja;uo.prototype=I(Ja.prototype,{enabled:null,trackAsMenu:null,useHandCursor:null,__currentState:null,__downState:null,__hitTestState:null,__ignoreEvent:null,__overState:null,__previousStates:null,__soundTransform:null,__upState:null,__getBounds:function(a,b){Ja.prototype.__getBounds.call(this,a,b);var c=gb.__pool.get(),d=this.__currentState.__transform;c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*
b.a+d.ty*b.c+b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getBounds(a,c);gb.__pool.release(c)},__getRenderBounds:function(a,b){if(this.__scrollRect!=null)Ja.prototype.__getRenderBounds.call(this,a,b);else if(Ja.prototype.__getBounds.call(this,a,b),this.__currentState!=null){var c=gb.__pool.get(),d=this.__currentState.__transform;c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*b.a+d.ty*b.c+b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getRenderBounds(a,
c);gb.__pool.release(c)}},__getCursor:function(){return this.useHandCursor&&!this.__ignoreEvent&&this.enabled?"button":null},__hitTest:function(a,b,c,d,f,g){var h=!1;this.get_hitTestState()!=null?this.get_hitTestState().__hitTest(a,b,c,d,f,g)&&(d!=null&&(d.length==0?d[0]=g:d[d.length-1]=g),h=!f||this.mouseEnabled):this.__currentState!=null&&(!g.get_visible()||this.__isMask||f&&!this.mouseEnabled||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b)?h=!1:this.__currentState.__hitTest(a,b,c,d,
f,g)&&(h=f));if(d!=null)for(;d.length>1&&d[d.length-1]==d[d.length-2];)d.pop();return h},__hitTestMask:function(a,b){var c=!1;this.__currentState.__hitTestMask(a,b)&&(c=!0);return c},__setStageReference:function(a){Ja.prototype.__setStageReference.call(this,a);this.__currentState!=null&&this.__currentState.__setStageReference(a);this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__setStageReference(a)},__setTransformDirty:function(){Ja.prototype.__setTransformDirty.call(this);
this.__currentState!=null&&this.__currentState.__setTransformDirty();this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__setTransformDirty()},__update:function(a,b){Ja.prototype.__update.call(this,a,b);b&&(this.__currentState!=null&&this.__currentState.__update(a,!0),this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__update(a,!0))},__updateTransforms:function(a){Ja.prototype.__updateTransforms.call(this,
a);this.__currentState!=null&&this.__currentState.__updateTransforms();this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__updateTransforms()},get_downState:function(){return this.__downState},set_downState:function(a){this.__downState!=null&&this.__currentState==this.__downState&&this.set___currentState(a);return this.__downState=a},get_hitTestState:function(){return this.__hitTestState},set_hitTestState:function(a){this.__hitTestState!=null&&this.__hitTestState!=
a&&this.__hitTestState!=this.get_downState()&&this.__hitTestState!=this.get_upState()&&this.__hitTestState!=this.get_overState()&&(this.__hitTestState.__renderParent=null);a!=null&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__hitTestState=a},get_overState:function(){return this.__overState},set_overState:function(a){this.__overState!=null&&this.__currentState==this.__overState&&this.set___currentState(a);return this.__overState=a},get_soundTransform:function(){this.__soundTransform==
null&&(this.__soundTransform=new ki);return new ki(this.__soundTransform.volume,this.__soundTransform.pan)},set_soundTransform:function(a){this.__soundTransform=new ki(a.volume,a.pan);return a},get_upState:function(){return this.__upState},set_upState:function(a){this.__upState!=null&&this.__currentState==this.__upState&&this.set___currentState(a);return this.__upState=a},set___currentState:function(a){this.__currentState!=null&&this.__currentState!=this.get_hitTestState()&&(this.__currentState.__renderParent=
null);a!=null&&a.parent!=null&&a.parent.removeChild(a);ma.__supportDOM&&this.__previousStates==null&&(this.__previousStates=tb.toObjectVector(null));if(a!=this.__currentState){if(ma.__supportDOM){this.__currentState!=null&&(this.__currentState.__setStageReference(null),this.__previousStates.push(this.__currentState));var b=this.__previousStates.indexOf(a,0);if(b>-1){var c=this.__previousStates;c.__tempIndex=b;b=0;for(var d=[];b<d.length;){var f=d[b++];c.insertAt(c.__tempIndex,f);c.__tempIndex++}c.splice(c.__tempIndex,
1)}}a!=null&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}return this.__currentState=a},__this_onMouseDown:function(a){this.enabled&&this.set___currentState(this.get_downState())},__this_onMouseOut:function(a){this.__ignoreEvent=!1;this.get_upState()!=this.__currentState&&this.set___currentState(this.get_upState())},__this_onMouseOver:function(a){a.buttonDown&&(this.__ignoreEvent=
!0);this.get_overState()!=this.__currentState&&this.get_overState()!=null&&!this.__ignoreEvent&&this.enabled&&this.set___currentState(this.get_overState())},__this_onMouseUp:function(a){this.__ignoreEvent=!1;this.enabled&&this.get_overState()!=null?this.set___currentState(this.get_overState()):this.set___currentState(this.get_upState())},__class__:uo,__properties__:I(Ja.prototype.__properties__,{set___currentState:"set___currentState",set_upState:"set_upState",get_upState:"get_upState",set_soundTransform:"set_soundTransform",
get_soundTransform:"get_soundTransform",set_overState:"set_overState",get_overState:"get_overState",set_hitTestState:"set_hitTestState",get_hitTestState:"get_hitTestState",set_downState:"set_downState",get_downState:"get_downState"})});var gd=function(a,b){this.__oldStageOrientation=3;zb.call(this);this.__drawableType=5;this.set_name(null);this.__color=-1;this.__colorSplit=[255,255,255];this.__colorString="#FFFFFF";this.__contentsScaleFactor=1;this.__deltaTime=this.__currentTabOrderIndex=0;this.__displayState=
2;this.__logicalHeight=this.__logicalWidth=this.__lastClickTime=this.__untransformedMouseY=this.__untransformedMouseX=this.__mouseY=this.__mouseX=0;this.__displayMatrix=new gb;this.__displayRect=new Ia;this.__renderDirty=!0;this.stage3Ds=tb.toObjectVector(null);this.stage3Ds.push(new Um(this));this.stage3Ds.push(new Um(this));this.stage3Ds.push(new Um(this));this.stage3Ds.push(new Um(this));this.stage=this;this.align=6;this.allowsFullScreenInteractive=this.allowsFullScreen=!0;this.__quality=1;this.__scaleMode=
2;this.showDefaultContextMenu=!0;this.softKeyboardRect=new Ia;this.stageFocusRect=!0;this.__macKeyboard=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)||/Mac/.test(navigator.platform);this.__clearBeforeRender=!0;this.__forceRender=!1;this.__stack=[];this.__rollOutStack=[];this.__mouseOutStack=[];this.__touchData=new Od;Pa.get_current().__loaderInfo==null&&(Pa.get_current().__loaderInfo=Xj.create(null),Pa.get_current().__loaderInfo.content=Pa.get_current());this.__uncaughtErrorEvents=
Pa.get_current().__loaderInfo.uncaughtErrorEvents;this.application=a.application;this.window=a;this.set_color(b);this.__contentsScaleFactor=a.__scale;this.__wasFullscreen=a.__fullscreen;this.__resize();Pa.get_current().stage==null&&this.stage.addChild(Pa.get_current())};t["openfl.display.Stage"]=gd;gd.__name__="openfl.display.Stage";gd.__interfaces__=[sa];gd.__properties__={get_supportsOrientationChange:"get_supportsOrientationChange"};gd.get_supportsOrientationChange=function(){return!1};gd.__super__=
zb;gd.prototype=I(zb.prototype,{align:null,allowsFullScreen:null,allowsFullScreenInteractive:null,application:null,context3D:null,showDefaultContextMenu:null,softKeyboardRect:null,stage3Ds:null,stageFocusRect:null,stageHeight:null,stageWidth:null,window:null,__cacheFocus:null,__clearBeforeRender:null,__color:null,__colorSplit:null,__colorString:null,__contentsScaleFactor:null,__currentTabOrderIndex:null,__deltaTime:null,__dirty:null,__displayMatrix:null,__displayRect:null,__displayState:null,__dragBounds:null,
__dragObject:null,__dragOffsetX:null,__dragOffsetY:null,__focus:null,__forceRender:null,__fullscreen:null,__fullScreenSourceRect:null,__invalidated:null,__lastClickTime:null,__lastClickTarget:null,__logicalWidth:null,__logicalHeight:null,__macKeyboard:null,__mouseDownLeft:null,__mouseDownMiddle:null,__mouseDownRight:null,__mouseOutStack:null,__mouseOverTarget:null,__mouseX:null,__mouseY:null,__untransformedMouseX:null,__untransformedMouseY:null,__pendingMouseEvent:null,__pendingMouseX:null,__pendingMouseY:null,
__quality:null,__renderer:null,__rendering:null,__rollOutStack:null,__scaleMode:null,__stack:null,__touchData:null,__transparent:null,__uncaughtErrorEvents:null,__wasDirty:null,__wasFullscreen:null,__primaryTouch:null,__oldStageOrientation:null,invalidate:function(){this.__renderDirty=this.__invalidated=!0},localToGlobal:function(a){return a.clone()},setOrientation:function(a){},__broadcastEvent:function(a){if(Object.prototype.hasOwnProperty.call(ma.__broadcastEvents.h,a.type))for(var b=ma.__broadcastEvents.h[a.type],
c=0;c<b.length;){var d=b[c];++c;if(d.stage==this||d.stage==null)if(this.__uncaughtErrorEvents.__enabled)try{d.__dispatch(a)}catch(f){Pb.lastError=f,d=ba.caught(f).unwrap(),this.__handleError(d)}else d.__dispatch(a)}},__createRenderer:function(){var a=this.window.__width*this.window.__scale|0,b=this.window.__height*this.window.__scale|0;switch(this.window.context.type){case "canvas":this.__renderer=new il(this.window.context.canvas2D);break;case "dom":this.__renderer=new rq(this.window.context.dom);
break;case "opengl":case "opengles":case "webgl":this.context3D=new $c(this),this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,0,!0,!0,!0),this.context3D.present(),this.__renderer=new yc(this.context3D)}if(this.__renderer!=null){var c=this.get_quality();this.__renderer.__allowSmoothing=c!=2;this.__renderer.__pixelRatio=this.window.__scale;this.__renderer.__worldTransform=this.__displayMatrix;this.__renderer.__stage=this;this.__renderer.__resize(a,b)}},__dispatchEvent:function(a){if(this.__uncaughtErrorEvents.__enabled)try{var b=
zb.prototype.__dispatchEvent.call(this,a)}catch(c){Pb.lastError=c,a=ba.caught(c).unwrap(),this.__handleError(a),b=!1}else b=zb.prototype.__dispatchEvent.call(this,a);return b},__dispatchPendingMouseEvent:function(){if(this.__pendingMouseEvent)this.__onMouse("mouseMove",this.__pendingMouseX,this.__pendingMouseY,0),this.__pendingMouseEvent=!1;else if(this.__mouseOverTarget!=null)if(!this.__mouseOverTarget.__transformDirty&&this.__mouseOverTarget.stage!=null&&this.__mouseOverTarget.get_visible()&&this.__mouseOverTarget.mouseEnabled)for(var a=
this.__mouseOverTarget.parent;a!=null;){if(a.__transformDirty||a.stage==null||!a.get_visible()||!a.mouseChildren){this.__onMouse(null,this.__untransformedMouseX,this.__untransformedMouseY,0);break}a=a.parent}else this.__onMouse(null,this.__untransformedMouseX,this.__untransformedMouseY,0)},__dispatchStack:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{var c=b.length;if(c==0){a.eventPhase=2;var d=a.target;d.__dispatch(a)}else{a.eventPhase=1;a.target=b[b.length-1];for(var f=0,g=c-1;f<g;){var h=
f++;b[h].__dispatch(a);if(a.__isCanceled)return}a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&a.bubbles)for(a.eventPhase=3,h=c-2;h>=0;){b[h].__dispatch(a);if(a.__isCanceled)break;--h}}}catch(n){Pb.lastError=n,a=ba.caught(n).unwrap(),this.__handleError(a)}else if(c=b.length,c==0)a.eventPhase=2,d=a.target,d.__dispatch(a);else{a.eventPhase=1;a.target=b[b.length-1];f=0;for(g=c-1;f<g;)if(h=f++,b[h].__dispatch(a),a.__isCanceled)return;a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&
a.bubbles)for(a.eventPhase=3,h=c-2;h>=0;){b[h].__dispatch(a);if(a.__isCanceled)break;--h}}},__dispatchTarget:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{return a.__dispatchEvent(b)}catch(c){return Pb.lastError=c,a=ba.caught(c).unwrap(),this.__handleError(a),!1}else return a.__dispatchEvent(b)},__drag:function(a){var b=this.__dragObject.parent;if(b!=null){b=b.__getWorldTransform();var c=b.a*b.d-b.b*b.c;if(c==0)a.x=-b.tx,a.y=-b.ty;else{var d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx));a.y=1/c*
(b.a*(a.y-b.ty)+b.b*(b.tx-a.x));a.x=d}}b=a.x+this.__dragOffsetX;a=a.y+this.__dragOffsetY;this.__dragBounds!=null&&(b<this.__dragBounds.x?b=this.__dragBounds.x:b>this.__dragBounds.get_right()&&(b=this.__dragBounds.get_right()),a<this.__dragBounds.y?a=this.__dragBounds.y:a>this.__dragBounds.get_bottom()&&(a=this.__dragBounds.get_bottom()));this.__dragObject.set_x(b);this.__dragObject.set_y(a)},__getInteractive:function(a){a!=null&&a.push(this);return!0},__globalToLocal:function(a,b){a!=b&&b.copyFrom(a);
return b},__handleError:function(a){var b=new xl("uncaughtError",!0,!0,a);Pa.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(b);if(!b.__preventDefault){b=zi.toString(zi.exceptionStack());console.log(b);b=H.string(a);console.log(b);try{if(a!=null&&Object.prototype.hasOwnProperty.call(a,"stack")&&a.stack!=null&&a.stack!="")console.log(a.stack),a.stack=a.stack;else{var c=zi.toString(zi.callStack());console.log(c)}}catch(d){Pb.lastError=d}throw a;}},__onKey:function(a,b,c){this.__dispatchPendingMouseEvent();
Ic.__altKey=Ac.get_altKey(c);Ic.__commandKey=Ac.get_metaKey(c);Ic.__controlKey=Ac.get_ctrlKey(c);Ic.__ctrlKey=this.__macKeyboard?Ac.get_ctrlKey(c)||Ac.get_metaKey(c):Ac.get_ctrlKey(c);Ic.__shiftKey=Ac.get_shiftKey(c);var d=[];this.__focus==null?this.__getInteractive(d):this.__focus.__getInteractive(d);if(d.length>0){switch(b){case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:var f=
3;break;case 1073742048:case 1073742049:case 1073742050:case 1073742051:f=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:f=2;break;default:f=0}switch(b){case 8:b=8;break;case 9:b=9;break;case 13:b=13;break;case 27:b=27;break;case 32:b=32;break;case 33:b=49;break;case 34:b=222;break;case 35:b=51;break;case 36:b=52;break;case 37:b=53;break;case 38:b=55;break;case 39:b=222;break;case 40:b=57;break;case 41:b=48;break;case 42:b=56;break;case 44:b=188;break;case 45:b=189;break;
case 46:b=190;break;case 47:b=191;break;case 48:b=48;break;case 49:b=49;break;case 50:b=50;break;case 51:b=51;break;case 52:b=52;break;case 53:b=53;break;case 54:b=54;break;case 55:b=55;break;case 56:b=56;break;case 57:b=57;break;case 58:b=186;break;case 59:b=186;break;case 60:b=60;break;case 61:b=187;break;case 62:b=190;break;case 63:b=191;break;case 64:b=50;break;case 91:b=219;break;case 92:b=220;break;case 93:b=221;break;case 94:b=54;break;case 95:b=189;break;case 96:b=192;break;case 97:b=65;break;
case 98:b=66;break;case 99:b=67;break;case 100:b=68;break;case 101:b=69;break;case 102:b=70;break;case 103:b=71;break;case 104:b=72;break;case 105:b=73;break;case 106:b=74;break;case 107:b=75;break;case 108:b=76;break;case 109:b=77;break;case 110:b=78;break;case 111:b=79;break;case 112:b=80;break;case 113:b=81;break;case 114:b=82;break;case 115:b=83;break;case 116:b=84;break;case 117:b=85;break;case 118:b=86;break;case 119:b=87;break;case 120:b=88;break;case 121:b=89;break;case 122:b=90;break;case 127:b=
46;break;case 1073741881:b=20;break;case 1073741882:b=112;break;case 1073741883:b=113;break;case 1073741884:b=114;break;case 1073741885:b=115;break;case 1073741886:b=116;break;case 1073741887:b=117;break;case 1073741888:b=118;break;case 1073741889:b=119;break;case 1073741890:b=120;break;case 1073741891:b=121;break;case 1073741892:b=122;break;case 1073741893:b=123;break;case 1073741894:b=301;break;case 1073741895:b=145;break;case 1073741896:b=19;break;case 1073741897:b=45;break;case 1073741898:b=36;
break;case 1073741899:b=33;break;case 1073741901:b=35;break;case 1073741902:b=34;break;case 1073741903:b=39;break;case 1073741904:b=37;break;case 1073741905:b=40;break;case 1073741906:b=38;break;case 1073741907:b=144;break;case 1073741908:b=111;break;case 1073741909:b=106;break;case 1073741910:b=109;break;case 1073741911:b=107;break;case 1073741912:b=13;break;case 1073741913:b=97;break;case 1073741914:b=98;break;case 1073741915:b=99;break;case 1073741916:b=100;break;case 1073741917:b=101;break;case 1073741918:b=
102;break;case 1073741919:b=103;break;case 1073741920:b=104;break;case 1073741921:b=105;break;case 1073741922:b=96;break;case 1073741923:b=110;break;case 1073741925:b=302;break;case 1073741928:b=124;break;case 1073741929:b=125;break;case 1073741930:b=126;break;case 1073741982:b=13;break;case 1073742044:b=110;break;case 1073742048:b=17;break;case 1073742049:b=16;break;case 1073742050:b=18;break;case 1073742051:b=15;break;case 1073742052:b=17;break;case 1073742053:b=16;break;case 1073742054:b=18;break;
case 1073742055:b=15;break}var g=Bb.__getCharCode(b,Ac.get_shiftKey(c),Ac.get_capsLock(c));if(a=="keyUp"&&(b==32||b==13)&&this.__focus instanceof Da){var h=w.__cast(this.__focus,Da);if(h.get_buttonMode()&&h.focusRect==1){var n=Ea.__pool.get(),l=Ea.__pool.get();l.x=this.__mouseX;l.y=this.__mouseY;h=Ic.__create("click",0,0,this.__mouseX,this.__mouseY,h.__globalToLocal(l,n),h);this.__dispatchStack(h,d);h.__updateAfterEventFlag&&this.__renderAfterEvent();Ea.__pool.release(l);Ea.__pool.release(n)}}f=new Vm(a,
!0,!0,g,b,f,this.__macKeyboard?Ac.get_ctrlKey(c)||Ac.get_metaKey(c):Ac.get_ctrlKey(c),Ac.get_altKey(c),Ac.get_shiftKey(c),Ac.get_ctrlKey(c),Ac.get_metaKey(c));d.reverse();this.__dispatchStack(f,d);if(f.__preventDefault)a=="keyDown"?this.window.onKeyDown.cancel():this.window.onKeyUp.cancel();else if(a=="keyDown"&&b==9){d=[];this.__tabTest(d);g=-1;a=null;b=Ac.get_shiftKey(c)?-1:1;if(d.length>1){Gf.sort(d,function(q,u){return q.get_tabIndex()-u.get_tabIndex()});if(d[d.length-1].get_tabIndex()!=-1)for(l=
0;l<d.length;){if(d[l].get_tabIndex()>-1){l>0&&d.splice(0,l);break}++l}if(this.get_focus()!=null){l=this.get_focus();for(n=d.indexOf(l);n==-1&&l!=null;){g=l.parent;if(g!=null&&g.get_tabChildren()){l=g.getChildIndex(l);if(l==-1){l=g;continue}for(l+=b;Ac.get_shiftKey(c)?l>=0:l<g.get_numChildren();){h=g.getChildAt(l);if(h instanceof Ja&&(n=w.__cast(h,Ja),n=d.indexOf(n),n!=-1)){b=0;break}l+=b}}else Ac.get_shiftKey(c)&&(n=d.indexOf(g),n!=-1&&(b=0));l=g}g=n<0?0:n+b}else g=this.__currentTabOrderIndex}else d.length==
1&&(a=d[0],this.get_focus()==a&&(a=null));n=g>=0&&g<d.length;d.length==1||d.length==0&&this.get_focus()!=null?g=0:d.length>1&&(g<0&&(g+=d.length),g%=d.length,a=d[g],a==this.get_focus()&&(g+=b,g<0&&(g+=d.length),g%=d.length,a=d[g]));b=null;this.get_focus()!=null&&(b=new yj("keyFocusChange",!0,!0,a,Ac.get_shiftKey(c),0),d=[],this.get_focus().__getInteractive(d),d.reverse(),this.__dispatchStack(b,d),b.isDefaultPrevented()&&this.window.onKeyDown.cancel());b!=null&&b.isDefaultPrevented()||(this.__currentTabOrderIndex=
g,a!=null&&this.set_focus(a),n&&this.window.onKeyDown.cancel())}else if(a=="keyDown"&&this.get_focus()!=null&&!(this.get_focus()instanceof Jc)&&(this.__macKeyboard?Ac.get_ctrlKey(c)||Ac.get_metaKey(c):Ac.get_ctrlKey(c))&&!Ac.get_altKey(c)&&!Ac.get_shiftKey(c))switch(b){case 65:c=new pa("selectAll",!0,!0);this.get_focus().dispatchEvent(c);break;case 67:c=new pa("copy",!0,!0);this.get_focus().dispatchEvent(c);break;case 86:c=new pa("paste",!0,!0);this.get_focus().dispatchEvent(c);break;case 88:c=new pa("cut",
!0,!0),this.get_focus().dispatchEvent(c)}f.__updateAfterEventFlag&&this.__renderAfterEvent()}},__onLimeCreateWindow:function(a){if(this.window==a){var b=this;a.onActivate.add(function(){b.__onLimeWindowActivate(a)});var c=this;a.onClose.add(function(){c.__onLimeWindowClose(a)},!1,-9E3);var d=this;a.onDeactivate.add(function(){d.__onLimeWindowDeactivate(a)});var f=this;var g=function(Ra){f.__onLimeWindowDropFile(a,Ra)};a.onDropFile.add(g);var h=this;a.onEnter.add(function(){h.__onLimeWindowEnter(a)});
var n=this;a.onExpose.add(function(){n.__onLimeWindowExpose(a)});var l=this;a.onFocusIn.add(function(){l.__onLimeWindowFocusIn(a)});var q=this;a.onFocusOut.add(function(){q.__onLimeWindowFocusOut(a)});var u=this;a.onFullscreen.add(function(){u.__onLimeWindowFullscreen(a)});var v=this;g=function(Ra,vb){v.__onLimeKeyDown(a,Ra,vb)};a.onKeyDown.add(g);var z=this;g=function(Ra,vb){z.__onLimeKeyUp(a,Ra,vb)};a.onKeyUp.add(g);var r=this;a.onLeave.add(function(){r.__onLimeWindowLeave(a)});var F=this;a.onMinimize.add(function(){F.__onLimeWindowMinimize(a)});
var J=this;g=function(Ra,vb,bb){J.__onLimeMouseDown(a,Ra,vb,bb)};a.onMouseDown.add(g);var L=this;g=function(Ra,vb){L.__onLimeMouseMove(a,Ra,vb)};a.onMouseMove.add(g);var Q=this;g=function(Ra,vb){Q.__onLimeMouseMoveRelative(a,Ra,vb)};a.onMouseMoveRelative.add(g);var W=this;g=function(Ra,vb,bb){W.__onLimeMouseUp(a,Ra,vb,bb)};a.onMouseUp.add(g);var ka=this;g=function(Ra,vb,bb){ka.__onLimeMouseWheel(a,Ra,vb,bb)};a.onMouseWheel.add(g);var ha=this;g=function(Ra,vb){ha.__onLimeWindowMove(a,Ra,vb)};a.onMove.add(g);
a.onRender.add(m(this,this.__onLimeRender));a.onRenderContextLost.add(m(this,this.__onLimeRenderContextLost));a.onRenderContextRestored.add(m(this,this.__onLimeRenderContextRestored));var ta=this;g=function(Ra,vb){ta.__onLimeWindowResize(a,Ra,vb)};a.onResize.add(g);var za=this;a.onRestore.add(function(){za.__onLimeWindowRestore(a)});var eb=this;g=function(Ra,vb,bb){eb.__onLimeTextEdit(a,Ra,vb,bb)};a.onTextEdit.add(g);var db=this;g=function(Ra){db.__onLimeTextInput(a,Ra)};a.onTextInput.add(g);this.__onLimeWindowCreate(a)}},
__onLimeGamepadAxisMove:function(a,b,c){if(this.__uncaughtErrorEvents.__enabled)try{Tc.__onGamepadAxisMove(a,b,c)}catch(d){Pb.lastError=d,a=ba.caught(d).unwrap(),this.__handleError(a)}else Tc.__onGamepadAxisMove(a,b,c)},__onLimeGamepadButtonDown:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Tc.__onGamepadButtonDown(a,b)}catch(c){Pb.lastError=c,a=ba.caught(c).unwrap(),this.__handleError(a)}else Tc.__onGamepadButtonDown(a,b)},__onLimeGamepadButtonUp:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Tc.__onGamepadButtonUp(a,
b)}catch(c){Pb.lastError=c,a=ba.caught(c).unwrap(),this.__handleError(a)}else Tc.__onGamepadButtonUp(a,b)},__onLimeGamepadConnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Tc.__onGamepadConnect(a)}catch(h){Pb.lastError=h;var b=ba.caught(h).unwrap();this.__handleError(b)}else Tc.__onGamepadConnect(a);var c=this;b=function(h,n){c.__onLimeGamepadAxisMove(a,h,n)};a.onAxisMove.add(b);var d=this;b=function(h){d.__onLimeGamepadButtonDown(a,h)};a.onButtonDown.add(b);var f=this;b=function(h){f.__onLimeGamepadButtonUp(a,
h)};a.onButtonUp.add(b);var g=this;a.onDisconnect.add(function(){g.__onLimeGamepadDisconnect(a)})},__onLimeGamepadDisconnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Tc.__onGamepadDisconnect(a)}catch(b){Pb.lastError=b,a=ba.caught(b).unwrap(),this.__handleError(a)}else Tc.__onGamepadDisconnect(a)},__onLimeKeyDown:function(a,b,c){this.window!=null&&this.window==a&&this.__onKey("keyDown",b,c)},__onLimeKeyUp:function(a,b,c){this.window!=null&&this.window==a&&this.__onKey("keyUp",b,c)},
__onLimeModuleExit:function(a){this.window!=null&&(a=new pa("deactivate"),this.__broadcastEvent(a))},__onLimeMouseDown:function(a,b,c,d){if(this.window!=null&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var f="middleMouseDown";break;case 2:f="rightMouseDown";break;default:f="mouseDown"}this.__onMouse(f,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||d!=2||a.onMouseDown.cancel()}},__onLimeMouseMove:function(a,b,c){this.window!=null&&this.window==a&&(this.__pendingMouseEvent=
!0,this.__pendingMouseX=b*a.__scale|0,this.__pendingMouseY=c*a.__scale|0)},__onLimeMouseMoveRelative:function(a,b,c){},__onLimeMouseUp:function(a,b,c,d){if(this.window!=null&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var f="middleMouseUp";break;case 2:f="rightMouseUp";break;default:f="mouseUp"}this.__onMouse(f,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||d!=2||a.onMouseUp.cancel()}},__onLimeMouseWheel:function(a,b,c,d){this.window!=null&&this.window==a&&(this.__dispatchPendingMouseEvent(),
d==Vl.PIXELS?this.__onMouseWheel(b*a.__scale|0,c*a.__scale|0,d):this.__onMouseWheel(b|0,c|0,d))},__onLimeDisplayOrientationChange:function(a,b){switch(b){case 1:a=1;break;case 2:a=2;break;case 3:a=0;break;case 4:a=4;break;default:a=3}b=this.__oldStageOrientation;this.__oldStageOrientation=a;this.dispatchEvent(new Wm("orientationChange",!0,!1,b,a))},__renderAfterEvent:function(){this.__render(this.window.context)},__render:function(a){a=!1;var b=this.__renderer!=null&&(this.__renderDirty||this.__forceRender);
if(this.__invalidated&&b){this.__invalidated=!1;var c=new pa("render");this.__broadcastEvent(c)}this.__update(!1,!0);if(this.__renderer!=null){if(this.context3D!=null){for(c=this.stage3Ds.iterator();c.hasNext();){var d=c.next();this.context3D.__renderStage3D(d)}this.context3D.__present&&(b=!0)}b?(this.context3D==null&&this.__renderer.__clear(),this.__renderer.__render(this)):this.context3D==null&&(a=!0);this.context3D!=null&&(this.context3D.__present?(this.__renderer.__cleared||this.__renderer.__clear(),
this.context3D.__present=!1,this.context3D.__cleared=!1):a=!0);this.__renderer.__cleared=!1}return a},__onLimeRender:function(a){this.__rendering||(this.__rendering=!0,this.__broadcastEvent(new pa("enterFrame")),this.__broadcastEvent(new pa("frameConstructed")),this.__broadcastEvent(new pa("exitFrame")),this.__renderable=!0,this.__enterFrame(this.__deltaTime),this.__deltaTime=0,this.__render(a)&&this.window.onRender.cancel(),this.__rendering=!1)},__onLimeRenderContextLost:function(){this.context3D=
this.__renderer=null;for(var a=this.stage3Ds.iterator();a.hasNext();)a.next().__lostContext()},__onLimeRenderContextRestored:function(a){this.__createRenderer();for(a=this.stage3Ds.iterator();a.hasNext();)a.next().__restoreContext()},__onLimeTextEdit:function(a,b,c,d){},__onLimeTextInput:function(a,b){if(this.window!=null&&this.window==a){var c=[];this.__focus==null?this.__getInteractive(c):this.__focus.__getInteractive(c);b=new Dg("textInput",!0,!0,b);c.length>0?(c.reverse(),this.__dispatchStack(b,
c)):this.__dispatchEvent(b);b.isDefaultPrevented()&&a.onTextInput.cancel()}},__onLimeTouchCancel:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a,b)},__onLimeTouchMove:function(a){this.__onTouch("touchMove",a,this.__primaryTouch==a)},__onLimeTouchEnd:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a,b)},__onLimeTouchStart:function(a){this.__primaryTouch==null&&(this.__primaryTouch=a);this.__onTouch("touchBegin",
a,this.__primaryTouch==a)},__onLimeUpdate:function(a){this.__deltaTime=a;this.__dispatchPendingMouseEvent()},__onLimeWindowActivate:function(a){},__onLimeWindowClose:function(a){this.window==a&&(this.window=null);this.__primaryTouch=null;a=new pa("deactivate");this.__broadcastEvent(a)},__onLimeWindowCreate:function(a){if(this.window!=null&&this.window==a&&(a.context!=null&&this.__createRenderer(),a.get_display()!=null))switch(a.get_display().orientation){case 1:this.__oldStageOrientation=1;break;
case 2:this.__oldStageOrientation=2;break;case 3:this.__oldStageOrientation=0;break;case 4:this.__oldStageOrientation=4;break;default:this.__oldStageOrientation=3}},__onLimeWindowDeactivate:function(a){},__onLimeWindowDropFile:function(a,b){},__onLimeWindowEnter:function(a){},__onLimeWindowExpose:function(a){this.window!=null&&this.window==a&&(this.__renderDirty=!0)},__onLimeWindowFocusIn:function(a){this.window!=null&&this.window==a&&(this.__renderDirty=!0,a=new pa("activate"),this.__broadcastEvent(a),
this.set_focus(this.__cacheFocus))},__onLimeWindowFocusOut:function(a){this.window!=null&&this.window==a&&(this.__primaryTouch=null,a=new pa("deactivate"),this.__broadcastEvent(a),a=this.get_focus(),this.set_focus(null),this.__cacheFocus=a,Ic.__altKey=!1,Ic.__commandKey=!1,Ic.__ctrlKey=!1,Ic.__shiftKey=!1)},__onLimeWindowFullscreen:function(a){this.window!=null&&this.window==a&&(this.__resize(),this.__wasFullscreen||(this.__wasFullscreen=!0,this.__displayState==2&&(this.__displayState=1),this.__dispatchEvent(new Ej("fullScreen",
!1,!1,!0,!0))))},__onLimeWindowLeave:function(a){this.window==null||this.window!=a||Ic.__buttonDown||(this.__dispatchPendingMouseEvent(),a=new pa("mouseLeave"),this.__dispatchEvent(a))},__onLimeWindowMinimize:function(a){},__onLimeWindowMove:function(a,b,c){},__onLimeWindowResize:function(a,b,c){this.window!=null&&this.window==a&&(this.__resize(),this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new Ej("fullScreen",!1,!1,!1,!0))))},__onLimeWindowRestore:function(a){this.window!=
null&&this.window==a&&this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new Ej("fullScreen",!1,!1,!1,!0)))},__onMouse:function(a,b,c,d){if(!(d>2)){this.__untransformedMouseX=b;this.__untransformedMouseY=c;var f=Ea.__pool.get();f.setTo(b,c);b=this.__displayMatrix;c=b.a*b.d-b.b*b.c;if(c==0)f.x=-b.tx,f.y=-b.ty;else{var g=1/c*(b.c*(b.ty-f.y)+b.d*(f.x-b.tx));f.y=1/c*(b.a*(f.y-b.ty)+b.b*(b.tx-f.x));f.x=g}this.__mouseX=f.x;this.__mouseY=f.y;b=[];this.__hitTest(this.__mouseX,
this.__mouseY,!0,b,!0,this)?g=b[b.length-1]:(g=this,b=[this]);g==null&&(g=this);var h=null,n=!1;if(a!=null)switch(a){case "middleMouseDown":this.__mouseDownMiddle=g;n=!0;break;case "middleMouseUp":this.__mouseDownMiddle==g&&(h="middleClick");this.__mouseDownMiddle=null;n=!0;break;case "mouseDown":this.get_focus()!=null?this.get_focus()!=g&&(c=new yj("mouseFocusChange",!0,!0,g,!1,0),this.get_focus().dispatchEvent(c),c.isDefaultPrevented()||(g.__allowMouseFocus()?this.set_focus(g):this.set_focus(null))):
g.__allowMouseFocus()?this.set_focus(g):this.set_focus(null);this.__mouseDownLeft=g;this.__lastClickTarget!=g&&(this.__lastClickTarget=null,this.__lastClickTime=0);n=Ic.__buttonDown=!0;break;case "mouseUp":this.__mouseDownLeft!=null&&(Ic.__buttonDown=!1,this.__mouseDownLeft==g?h="click":(n=Ic.__create("releaseOutside",1,0,this.__mouseX,this.__mouseY,new Ea(this.__mouseX,this.__mouseY),this),this.__mouseDownLeft.dispatchEvent(n)),this.__mouseDownLeft=null);n=!0;break;case "rightMouseDown":this.__mouseDownRight=
g;n=!0;break;case "rightMouseUp":this.__mouseDownRight==g&&(h="rightClick"),this.__mouseDownRight=null,n=!0}c=Ea.__pool.get();a!=null&&(n=Ic.__create(a,d,n?this.window.clickCount:0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(n,b),n.__updateAfterEventFlag&&this.__renderAfterEvent());h!=null&&(n=Ic.__create(h,d,0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(n,b),n.__updateAfterEventFlag&&this.__renderAfterEvent(),a=="mouseUp"&&(g.doubleClickEnabled?
(a=Pa.getTimer(),a-this.__lastClickTime<500&&g==this.__lastClickTarget?(n=Ic.__create("doubleClick",d,0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(n,b),n.__updateAfterEventFlag&&this.__renderAfterEvent(),this.__lastClickTime=0,this.__lastClickTarget=null):(this.__lastClickTarget=g,this.__lastClickTime=a)):(this.__lastClickTarget=null,this.__lastClickTime=0)));if(xd.__cursor=="auto"&&!xd.__hidden){n=null;if(this.__mouseDownLeft!=null)n=this.__mouseDownLeft.__getCursor();
else for(a=0;a<b.length;)if(n=b[a],++a,n=n.__getCursor(),n!=null&&this.window!=null){this.window.set_cursor(ch.toLimeCursor(n));break}n==null&&this.window!=null&&this.window.set_cursor(id.ARROW)}g!=this.__mouseOverTarget&&this.__mouseOverTarget!=null&&(n=Ic.__create("mouseOut",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),this.__mouseOverTarget),this.__dispatchStack(n,this.__mouseOutStack),n.__updateAfterEventFlag&&this.__renderAfterEvent());for(a=0;a<this.__rollOutStack.length;)h=
this.__rollOutStack[a],b.indexOf(h)==-1?(V.remove(this.__rollOutStack,h),h.hasEventListener("rollOut")&&(n=Ic.__create("rollOut",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),h),n.bubbles=!1,this.__dispatchTarget(h,n),n.__updateAfterEventFlag&&this.__renderAfterEvent())):++a;var l=null;g!=this.__mouseOverTarget&&(this.__mouseOverTarget=l=g,this.__mouseOutStack=b);for(a=0;a<b.length;)h=b[a],++a,this.__rollOutStack.indexOf(h)==-1&&this.__mouseOverTarget!=null&&(h.hasEventListener("rollOver")&&
(n=Ic.__create("rollOver",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),h),n.bubbles=!1,this.__dispatchTarget(h,n),n.__updateAfterEventFlag&&this.__renderAfterEvent()),this.__rollOutStack.push(h));l!=null&&(n=Ic.__create("mouseOver",d,0,this.__mouseX,this.__mouseY,l.__globalToLocal(f,c),l),this.__dispatchStack(n,b),n.__updateAfterEventFlag&&this.__renderAfterEvent());this.__dragObject!=null&&(this.__drag(f),d=null,this.__mouseOverTarget==this.__dragObject?(g=this.__dragObject.mouseEnabled,
a=this.__dragObject.mouseChildren,this.__dragObject.mouseEnabled=!1,this.__dragObject.mouseChildren=!1,b=[],this.__hitTest(this.__mouseX,this.__mouseY,!0,b,!0,this)&&(d=b[b.length-1]),this.__dragObject.mouseEnabled=g,this.__dragObject.mouseChildren=a):this.__mouseOverTarget!=this&&(d=this.__mouseOverTarget),this.__dragObject.dropTarget=d);Ea.__pool.release(f);Ea.__pool.release(c)}},__onMouseWheel:function(a,b,c){var d=this.__mouseX,f=this.__mouseY;a=[];if(this.__hitTest(this.__mouseX,this.__mouseY,
!0,a,!0,this))var g=a[a.length-1];else g=this,a=[this];g==null&&(g=this);c=Ea.__pool.get();c.setTo(d,f);d=this.__displayMatrix;f=d.a*d.d-d.b*d.c;if(f==0)c.x=-d.tx,c.y=-d.ty;else{var h=1/f*(d.c*(d.ty-c.y)+d.d*(c.x-d.tx));c.y=1/f*(d.a*(c.y-d.ty)+d.b*(d.tx-c.x));c.x=h}b|=0;b=Ic.__create("mouseWheel",0,0,this.__mouseX,this.__mouseY,g.__globalToLocal(c,c),g,b);b.cancelable=!0;this.__dispatchStack(b,a);b.isDefaultPrevented()&&this.window.onMouseWheel.cancel();b.__updateAfterEventFlag&&this.__renderAfterEvent();
Ea.__pool.release(c)},__onTouch:function(a,b,c){var d=Ea.__pool.get();d.setTo(Math.round(b.x*this.window.__width*this.window.__scale),Math.round(b.y*this.window.__height*this.window.__scale));var f=this.__displayMatrix,g=f.a*f.d-f.b*f.c;if(g==0)d.x=-f.tx,d.y=-f.ty;else{var h=1/g*(f.c*(f.ty-d.y)+f.d*(d.x-f.tx));d.y=1/g*(f.a*(d.y-f.ty)+f.b*(f.tx-d.x));d.x=h}f=d.x;g=d.y;h=[];if(this.__hitTest(f,g,!1,h,!0,this))var n=h[h.length-1];else n=this,h=[this];n==null&&(n=this);var l=b.id;if(this.__touchData.h.hasOwnProperty(l))var q=
this.__touchData.h[l];else q=Xm.__pool.get(),q.reset(),q.touch=b,this.__touchData.h[l]=q;var u=null,v=!1;switch(a){case "touchBegin":q.touchDownTarget=n;break;case "touchEnd":q.touchDownTarget==n&&(u="touchTap"),q.touchDownTarget=null,v=!0}var z=Ea.__pool.get();a=Sf.__create(a,null,f,g,n.__globalToLocal(d,z),n);a.touchPointID=l;a.isPrimaryTouchPoint=c;a.pressure=b.pressure;this.__dispatchStack(a,h);a.__updateAfterEventFlag&&this.__renderAfterEvent();u!=null&&(a=Sf.__create(u,null,f,g,n.__globalToLocal(d,
z),n),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchStack(a,h),a.__updateAfterEventFlag&&this.__renderAfterEvent());u=q.touchOverTarget;n!=u&&u!=null&&(a=Sf.__create("touchOut",null,f,g,u.__globalToLocal(d,z),u),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchTarget(u,a),a.__updateAfterEventFlag&&this.__renderAfterEvent());for(var r=q.rollOutStack,F,J=0;J<r.length;)F=r[J],h.indexOf(F)==-1?(V.remove(r,F),a=Sf.__create("touchRollOut",null,
f,g,u.__globalToLocal(d,z),u),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(F,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()):++J;for(J=0;J<h.length;)F=h[J],++J,r.indexOf(F)==-1&&(F.hasEventListener("touchRollOver")&&(a=Sf.__create("touchRollOver",null,f,g,u.__globalToLocal(d,z),F),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(F,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()),F.hasEventListener("touchRollOut")&&
r.push(F));n!=u&&(n!=null&&(a=Sf.__create("touchOver",null,f,g,n.__globalToLocal(d,z),n),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.bubbles=!0,a.pressure=b.pressure,this.__dispatchTarget(n,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()),q.touchOverTarget=n);Ea.__pool.release(d);Ea.__pool.release(z);v&&(this.__touchData.remove(l),q.reset(),Xm.__pool.release(q))},__registerLimeModule:function(a){a.onCreateWindow.add(m(this,this.__onLimeCreateWindow));a.onUpdate.add(m(this,this.__onLimeUpdate));
a.onExit.add(m(this,this.__onLimeModuleExit),!1,0);a.onDisplayOrientationChange.add(m(this,this.__onLimeDisplayOrientationChange));for(a=sf.devices.iterator();a.hasNext();){var b=a.next();this.__onLimeGamepadConnect(b)}sf.onConnect.add(m(this,this.__onLimeGamepadConnect));Ue.onStart.add(m(this,this.__onLimeTouchStart));Ue.onMove.add(m(this,this.__onLimeTouchMove));Ue.onEnd.add(m(this,this.__onLimeTouchEnd));Ue.onCancel.add(m(this,this.__onLimeTouchCancel))},__applyScaleAndAlign:function(a,b,c,d){a=
this.__logicalWidth-Math.round((this.__logicalWidth*c-a)/c);b=this.__logicalHeight-Math.round((this.__logicalHeight*d-b)/d);var f=0,g=0;switch(this.align){case 0:f=Math.round((this.__logicalWidth-a)/2);g=Math.round(this.__logicalHeight-b);break;case 1:g=Math.round(this.__logicalHeight-b);break;case 2:f=Math.round(this.__logicalWidth-a);g=Math.round(this.__logicalHeight-b);break;case 3:g=Math.round((this.__logicalHeight-b)/2);break;case 4:f=Math.round(this.__logicalWidth-a);g=Math.round((this.__logicalHeight-
b)/2);break;case 5:f=Math.round((this.__logicalWidth-a)/2);break;case 7:f=Math.round(this.__logicalWidth-a)}this.__displayMatrix.translate(-f,-g);this.__displayMatrix.scale(c,d);this.__displayRect.setTo(f,g,a,b)},__resize:function(){var a=this.stageWidth,b=this.stageHeight,c=this.window.__width*this.window.__scale|0,d=this.window.__height*this.window.__scale|0;this.__displayMatrix.identity();if(this.get_fullScreenSourceRect()!=null&&this.window.__fullscreen){this.stageWidth=this.get_fullScreenSourceRect().width|
0;this.stageHeight=this.get_fullScreenSourceRect().height|0;var f=c/this.stageWidth,g=d/this.stageHeight;this.__displayMatrix.translate(-this.get_fullScreenSourceRect().x,-this.get_fullScreenSourceRect().y);this.__displayMatrix.scale(f,g);this.__displayRect.setTo(this.get_fullScreenSourceRect().get_left(),this.get_fullScreenSourceRect().get_right(),this.get_fullScreenSourceRect().get_top(),this.get_fullScreenSourceRect().get_bottom())}else if(this.__logicalWidth==0||this.__logicalHeight==0||this.get_scaleMode()==
2||c==0||d==0)this.stageWidth=Math.round(c/this.window.__scale),this.stageHeight=Math.round(d/this.window.__scale),this.__displayMatrix.scale(this.window.__scale,this.window.__scale),this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight);else switch(this.stageWidth=this.__logicalWidth,this.stageHeight=this.__logicalHeight,this.get_scaleMode()){case 0:f=c/this.__logicalWidth;g=d/this.__logicalHeight;this.__displayMatrix.scale(f,g);this.__displayRect.setTo(0,0,this.__logicalWidth,this.__logicalHeight);
break;case 1:f=c/this.__logicalWidth;g=d/this.__logicalHeight;f=Math.max(f,g);this.__applyScaleAndAlign(c,d,f,f);break;default:f=c/this.__logicalWidth,g=d/this.__logicalHeight,f=Math.min(f,g),this.__applyScaleAndAlign(c,d,f,f)}this.context3D!=null&&this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,0,!0,!0,!0);for(f=this.stage3Ds.iterator();f.hasNext();)f.next().__resize(c,d);this.__renderer!=null&&this.__renderer.__resize(c,d);this.__renderDirty=!0;if(this.stageWidth!=a||this.stageHeight!=
b)this.__setTransformDirty(),a=new pa("resize"),this.__dispatchEvent(a)},__setLogicalSize:function(a,b){this.__logicalWidth=a;this.__logicalHeight=b;this.__resize()},__startDrag:function(a,b,c){if(c==null)this.__dragBounds=null;else{this.__dragBounds=new Ia;var d=c.get_right(),f=c.get_bottom();this.__dragBounds.x=d<c.x?d:c.x;this.__dragBounds.y=f<c.y?f:c.y;this.__dragBounds.width=Math.abs(c.width);this.__dragBounds.height=Math.abs(c.height)}this.__dragObject=a;this.__dragObject!=null&&(b?this.__dragOffsetY=
this.__dragOffsetX=0:(a=Ea.__pool.get(),a.setTo(this.get_mouseX(),this.get_mouseY()),b=this.__dragObject.parent,b!=null&&(b=b.__getWorldTransform(),c=b.a*b.d-b.b*b.c,c==0?(a.x=-b.tx,a.y=-b.ty):(d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx)),a.y=1/c*(b.a*(a.y-b.ty)+b.b*(b.tx-a.x)),a.x=d)),this.__dragOffsetX=this.__dragObject.get_x()-a.x,this.__dragOffsetY=this.__dragObject.get_y()-a.y,Ea.__pool.release(a)))},__stopDrag:function(a){this.__dragObject=this.__dragBounds=null},__unregisterLimeModule:function(a){a.onCreateWindow.remove(m(this,
this.__onLimeCreateWindow));a.onUpdate.remove(m(this,this.__onLimeUpdate));a.onExit.remove(m(this,this.__onLimeModuleExit));a.onDisplayOrientationChange.remove(m(this,this.__onLimeDisplayOrientationChange));sf.onConnect.remove(m(this,this.__onLimeGamepadConnect));Ue.onStart.remove(m(this,this.__onLimeTouchStart));Ue.onMove.remove(m(this,this.__onLimeTouchMove));Ue.onEnd.remove(m(this,this.__onLimeTouchEnd));Ue.onCancel.remove(m(this,this.__onLimeTouchCancel))},__update:function(a,b){a?this.__transformDirty&&
(zb.prototype.__update.call(this,!0,b),b&&(this.__transformDirty=!1)):this.__transformDirty||this.__renderDirty?(zb.prototype.__update.call(this,!1,b),b&&ma.__supportDOM&&(this.__wasDirty=!0)):!this.__renderDirty&&this.__wasDirty&&(zb.prototype.__update.call(this,!1,b),b&&(this.__wasDirty=!1))},get_autoOrients:function(){return!1},set_autoOrients:function(a){return!1},get_color:function(){return this.__color},set_color:function(a){a==null?(this.__transparent=!0,a=0):this.__transparent=!1;this.__color!=
a&&(this.__colorSplit[0]=((a&16711680)>>>16)/255,this.__colorSplit[1]=((a&65280)>>>8)/255,this.__colorSplit[2]=(a&255)/255,this.__colorString="#"+N.hex(a&16777215,6),this.__renderDirty=!0,this.__color=-16777216|a&16777215);return a},get_contentsScaleFactor:function(){return this.__contentsScaleFactor},get_deviceOrientation:function(){switch(this.application.get_deviceOrientation()){case 1:return 1;case 2:return 2;case 3:return 0;case 4:return 4;default:return 3}},get_displayState:function(){return this.__displayState},
set_displayState:function(a){this.window!=null&&(a==2?this.window.__fullscreen&&this.window.set_fullscreen(!1):this.window.__fullscreen||this.window.set_fullscreen(!0));return this.__displayState=a},get_focus:function(){return this.__focus},set_focus:function(a){if(a!=this.__focus||a==null&&this.__cacheFocus!=null){var b=this.__focus;this.__cacheFocus=this.__focus=a;if(b!=null){var c=new yj("focusOut",!0,!1,a,!1,0),d=[];b.__getInteractive(d);d.reverse();this.__dispatchStack(c,d)}a!=null&&(c=new yj("focusIn",
!0,!1,b,!1,0),d=[],a.__getInteractive(d),d.reverse(),this.__dispatchStack(c,d))}return a},get_frameRate:function(){return this.window!=null?this.window.__backend.getFrameRate():0},set_frameRate:function(a){return this.window!=null?this.window.__backend.setFrameRate(a):a},get_fullScreenHeight:function(){return Math.ceil(this.window.get_display().currentMode.height*this.window.__scale)},get_fullScreenSourceRect:function(){return this.__fullScreenSourceRect==null?null:this.__fullScreenSourceRect.clone()},
set_fullScreenSourceRect:function(a){a==null?this.__fullScreenSourceRect!=null&&(this.__fullScreenSourceRect=null,this.__resize()):a.equals(this.__fullScreenSourceRect)||(this.__fullScreenSourceRect=a.clone(),this.__resize());return a},get_fullScreenWidth:function(){return Math.ceil(this.window.get_display().currentMode.width*this.window.__scale)},set_height:function(a){return this.get_height()},get_mouseX:function(){return this.__mouseX},get_mouseY:function(){return this.__mouseY},get_orientation:function(){var a=
this.window.get_display();if(a!=null)switch(a.orientation){case 1:return 2;case 2:return 1;case 3:return 0;case 4:return 4}return 3},get_quality:function(){return this.__quality},set_quality:function(a){this.__quality=a;if(this.__renderer!=null){var b=this.get_quality();this.__renderer.__allowSmoothing=b!=2}return a},set_rotation:function(a){return 0},get_scaleMode:function(){return this.__scaleMode},set_scaleMode:function(a){a!=this.__scaleMode&&(this.__scaleMode=a,this.__resize());return a},set_scaleX:function(a){return 0},
set_scaleY:function(a){return 0},get_supportedOrientations:function(){return tb.toNullVector(null)},get_tabEnabled:function(){return!1},set_tabEnabled:function(a){throw new ob("Error: The Stage class does not implement this property or method.");},get_tabIndex:function(){return-1},set_tabIndex:function(a){throw new ob("Error: The Stage class does not implement this property or method.");},set_transform:function(a){return this.get_transform()},set_width:function(a){return this.get_width()},set_x:function(a){return 0},
set_y:function(a){return 0},__class__:gd,__properties__:I(zb.prototype.__properties__,{get_supportedOrientations:"get_supportedOrientations",set_scaleMode:"set_scaleMode",get_scaleMode:"get_scaleMode",set_quality:"set_quality",get_quality:"get_quality",get_orientation:"get_orientation",get_fullScreenWidth:"get_fullScreenWidth",set_fullScreenSourceRect:"set_fullScreenSourceRect",get_fullScreenSourceRect:"get_fullScreenSourceRect",get_fullScreenHeight:"get_fullScreenHeight",set_frameRate:"set_frameRate",
get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",get_deviceOrientation:"get_deviceOrientation",get_contentsScaleFactor:"get_contentsScaleFactor",set_color:"set_color",get_color:"get_color",set_autoOrients:"set_autoOrients",get_autoOrients:"get_autoOrients"})});var Um=function(a){qa.call(this);this.__stage=a;this.__height=0;this.__projectionTransform=new Cf;this.__renderTransform=new Cf;this.__y=this.__x=
this.__width=0;this.visible=!0;a.stageWidth>0&&a.stageHeight>0&&this.__resize(a.stageWidth,a.stageHeight)};t["openfl.display.Stage3D"]=Um;Um.__name__="openfl.display.Stage3D";Um.__super__=qa;Um.prototype=I(qa.prototype,{context3D:null,visible:null,__contextLost:null,__contextRequested:null,__height:null,__indexBuffer:null,__projectionTransform:null,__renderTransform:null,__stage:null,__vertexBuffer:null,__width:null,__x:null,__y:null,__canvas:null,__renderContext:null,__style:null,__webgl:null,requestContext3D:function(a,
b){this.__contextLost?this.__contextRequested=!0:this.context3D!=null?(this.__contextRequested=!0,Gc.delay(m(this,this.__dispatchCreate),1)):this.__contextRequested||(this.__contextRequested=!0,Gc.delay(m(this,this.__createContext),1))},requestContext3DMatchingProfiles:function(a){this.requestContext3D()},__createContext:function(){var a=this.__stage,b=a.__renderer;if(b.__type=="cairo"||b.__type=="canvas")this.__dispatchError();else if(b.__type=="opengl")this.context3D=new $c(a,a.context3D.__contextState,
this),this.__dispatchCreate();else if(b.__type=="dom")if(a.context3D==null){this.__canvas=window.document.createElement("canvas");this.__canvas.width=a.stageWidth;this.__canvas.height=a.stageHeight;var c=a.window.context.attributes,d=Object.prototype.hasOwnProperty.call(c,"background")&&c.background==null,f=Object.prototype.hasOwnProperty.call(c,"colorDepth")?c.colorDepth:32;c=Object.prototype.hasOwnProperty.call(c,"antialiasing")&&c.antialiasing>0;this.__webgl=Ny.getContextWebGL(this.__canvas,{alpha:d||
f>16,antialias:c,depth:!0,premultipliedAlpha:!0,stencil:!0,preserveDrawingBuffer:!1});this.__webgl!=null&&(A.context==null&&(A.context=this.__webgl,A.type="webgl",A.version=1),a.context3D=new $c(a),a.context3D.configureBackBuffer(a.window.__width,a.window.__height,0,!0,!0,!0),a.context3D.present(),b.element.appendChild(this.__canvas),this.__style=this.__canvas.style,this.__style.setProperty("position","absolute",null),this.__style.setProperty("top","0",null),this.__style.setProperty("left","0",null),
this.__style.setProperty(b.__transformOriginProperty,"0 0 0",null),this.__style.setProperty("z-index","-1",null));a.context3D!=null&&(this.context3D=new $c(a,a.context3D.__contextState,this));this.__dispatchCreate()}else this.__dispatchError()},__dispatchError:function(){this.__contextRequested=!1;this.dispatchEvent(new tg("error",!1,!1,"Context3D not available"))},__dispatchCreate:function(){this.__contextRequested&&(this.__contextRequested=!1,this.dispatchEvent(new pa("context3DCreate")))},__lostContext:function(){this.__contextLost=
!0;this.context3D!=null&&(this.context3D.__dispose(),this.__contextRequested=!0)},__resize:function(a,b){if(a!=this.__width||b!=this.__height){this.__canvas!=null&&(this.__canvas.width=a,this.__canvas.height=b);this.__projectionTransform.copyRawDataFrom(tb.toFloatVector(null,null,null,[2/(a>0?a:1),0,0,0,0,-2/(b>0?b:1),0,0,0,0,-.001,0,-1,1,0,1]));var c=this.__stage.window.__scale;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x*c,this.__y*c,0);this.__renderTransform.append(this.__projectionTransform);
this.__width=a;this.__height=b}},__restoreContext:function(){this.__contextLost=!1;this.__createContext()},get_x:function(){return this.__x},set_x:function(a){if(this.__x==a)return a;this.__x=a;var b=this.__stage.window.__scale;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x*b,this.__y*b,0);this.__renderTransform.append(this.__projectionTransform);return a},get_y:function(){return this.__y},set_y:function(a){if(this.__y==a)return a;this.__y=a;var b=this.__stage.window.__scale;
this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x*b,this.__y*b,0);this.__renderTransform.append(this.__projectionTransform);return a},__class__:Um,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var Yl=function(a,b,c,d,f,g,h,n){n==null&&(n=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=1);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.__id=a;this.__matrix=new gb;b!=0&&this.set_x(b);c!=0&&this.set_y(c);d!=1&&this.set_scaleX(d);
f!=1&&this.set_scaleY(f);g!=0&&this.set_rotation(g);this.__dirty=!0;this.__length=0;this.__originX=h;this.__originY=n;this.__alpha=1;this.__blendMode=null;this.__visible=!0};t["openfl.display.Tile"]=Yl;Yl.__name__="openfl.display.Tile";Yl.prototype={data:null,parent:null,__alpha:null,__blendMode:null,__colorTransform:null,__dirty:null,__id:null,__length:null,__matrix:null,__originX:null,__originY:null,__rect:null,__rotation:null,__rotationCosine:null,__rotationSine:null,__scaleX:null,__scaleY:null,
__shader:null,__tileset:null,__visible:null,clone:function(){var a=new Yl(this.__id);a.__alpha=this.__alpha;a.__blendMode=this.__blendMode;a.__originX=this.__originX;a.__originY=this.__originY;this.__rect!=null&&(a.__rect=this.__rect.clone());a.set_matrix(this.__matrix.clone());a.__shader=this.__shader;a.set_tileset(this.__tileset);this.__colorTransform!=null&&(a.__colorTransform=this.__colorTransform.__clone());return a},getBounds:function(a){var b=new Ia;this.__findTileRect(b);var c=gb.__pool.get();
if(a!=null&&a!=this){c.copyFrom(this.__getWorldTransform());var d=gb.__pool.get();d.copyFrom(a.__getWorldTransform());d.invert();c.concat(d);gb.__pool.release(d)}else c.identity();this.__getBounds(b,c);gb.__pool.release(c);return b},__getBounds:function(a,b){a.__transform(a,b)},hitTestTile:function(a){if(a!=null&&a.parent!=null&&this.parent!=null){var b=this.getBounds(this);a=a.getBounds(this);return b.intersects(a)}return!1},invalidate:function(){this.__setRenderDirty()},__findTileRect:function(a){if(this.get_tileset()==
null)if(this.parent!=null){var b=this.parent.__findTileset();b==null?a.setTo(0,0,0,0):(b=b.getRect(this.get_id()),b==null?a.setTo(0,0,0,0):a.copyFrom(b))}else a.setTo(0,0,0,0);else a.copyFrom(this.get_tileset().getRect(this.get_id()));a.x=0;a.y=0},__findTileset:function(){return this.get_tileset()!=null?this.get_tileset():this.parent instanceof uq?this.parent.get_tileset():this.parent==null?null:this.parent.__findTileset()},__getWorldTransform:function(){var a=this.get_matrix().clone();this.parent!=
null&&a.concat(this.parent.__getWorldTransform());return a},__setRenderDirty:function(){this.__dirty||(this.__dirty=!0,this.parent!=null&&this.parent.__setRenderDirty())},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__alpha=a,this.__setRenderDirty());return a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){a!=this.__blendMode&&(this.__blendMode=a,this.__setRenderDirty());return a},get_colorTransform:function(){return this.__colorTransform},
set_colorTransform:function(a){a!=this.__colorTransform&&(this.__colorTransform=a,this.__setRenderDirty());return a},get_height:function(){var a=Ia.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.height;Ia.__pool.release(a);return b},set_height:function(a){var b=Ia.__pool.get();this.__findTileRect(b);b.height!=0&&this.set_scaleY(a/b.height);Ia.__pool.release(b);return a},get_id:function(){return this.__id},set_id:function(a){a!=this.__id&&(this.__id=a,this.__setRenderDirty());
return a},get_matrix:function(){return this.__matrix},set_matrix:function(a){a!=this.__matrix&&(this.__scaleY=this.__scaleX=this.__rotation=null,this.__matrix=a,this.__setRenderDirty());return a},get_originX:function(){return this.__originX},set_originX:function(a){a!=this.__originX&&(this.__originX=a,this.__setRenderDirty());return a},get_originY:function(){return this.__originY},set_originY:function(a){a!=this.__originY&&(this.__originY=a,this.__setRenderDirty());return a},get_rect:function(){return this.__rect},
set_rect:function(a){a!=this.__rect&&(this.__rect=a,this.__setRenderDirty());return a},get_rotation:function(){if(this.__rotation==null)if(this.__matrix.b==0&&this.__matrix.c==0)this.__rotationSine=this.__rotation=0,this.__rotationCosine=1;else{var a=Math.atan2(this.__matrix.d,this.__matrix.c)-Math.PI/2;this.__rotation=180/Math.PI*a;this.__rotationSine=Math.sin(a);this.__rotationCosine=Math.cos(a)}return this.__rotation},set_rotation:function(a){if(a!=this.__rotation){this.__rotation=a;var b=Math.PI/
180*a;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);b=this.get_scaleX();var c=this.get_scaleY();this.__matrix.a=this.__rotationCosine*b;this.__matrix.b=this.__rotationSine*b;this.__matrix.c=-this.__rotationSine*c;this.__matrix.d=this.__rotationCosine*c;this.__setRenderDirty()}return a},get_scaleX:function(){this.__scaleX==null&&(this.get_matrix().b==0?this.__scaleX=this.__matrix.a:this.__scaleX=Math.sqrt(this.__matrix.a*this.__matrix.a+this.__matrix.b*this.__matrix.b));return this.__scaleX},
set_scaleX:function(a){if(a!=this.__scaleX){this.__scaleX=a;if(this.__matrix.b==0)this.__matrix.a=a;else{this.get_rotation();var b=this.__rotationSine*a;this.__matrix.a=this.__rotationCosine*a;this.__matrix.b=b}this.__setRenderDirty()}return a},get_scaleY:function(){this.__scaleY==null&&(this.__scaleY=this.__matrix.c==0?this.get_matrix().d:Math.sqrt(this.__matrix.c*this.__matrix.c+this.__matrix.d*this.__matrix.d));return this.__scaleY},set_scaleY:function(a){if(a!=this.__scaleY){this.__scaleY=a;if(this.__matrix.c==
0)this.__matrix.d=a;else{this.get_rotation();var b=this.__rotationCosine*a;this.__matrix.c=-this.__rotationSine*a;this.__matrix.d=b}this.__setRenderDirty()}return a},get_shader:function(){return this.__shader},set_shader:function(a){a!=this.__shader&&(this.__shader=a,this.__setRenderDirty());return a},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__setRenderDirty());return a},get_visible:function(){return this.__visible},set_visible:function(a){a!=
this.__visible&&(this.__visible=a,this.__setRenderDirty());return a},get_width:function(){var a=Ia.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.width;Ia.__pool.release(a);return b},set_width:function(a){var b=Ia.__pool.get();this.__findTileRect(b);b.width!=0&&this.set_scaleX(a/b.width);Ia.__pool.release(b);return a},get_x:function(){return this.__matrix.tx},set_x:function(a){a!=this.__matrix.tx&&(this.__matrix.tx=a,this.__setRenderDirty());return a},get_y:function(){return this.__matrix.ty},
set_y:function(a){a!=this.__matrix.ty&&(this.__matrix.ty=a,this.__setRenderDirty());return a},__class__:Yl,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_tileset:"set_tileset",get_tileset:"get_tileset",set_shader:"set_shader",get_shader:"get_shader",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",
set_rect:"set_rect",get_rect:"get_rect",set_originY:"set_originY",get_originY:"get_originY",set_originX:"set_originX",get_originX:"get_originX",set_matrix:"set_matrix",get_matrix:"get_matrix",set_id:"set_id",get_id:"get_id",set_height:"set_height",get_height:"get_height",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform",set_blendMode:"set_blendMode",get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}};var vo=function(a,b,c,d,f,g,h){h==null&&(h=
0);g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);Yl.call(this,-1,a,b,c,d,f,g,h);this.__tiles=[];this.__length=0};t["openfl.display.TileContainer"]=vo;vo.__name__="openfl.display.TileContainer";vo.__interfaces__=[tq];vo.__super__=Yl;vo.prototype=I(Yl.prototype,{__tiles:null,addTile:function(a){if(a==null)return null;a.parent==this&&(V.remove(this.__tiles,a),this.__length--);this.__tiles[this.get_numTiles()]=a;a.parent=this;this.__length++;this.__setRenderDirty();
return a},addTileAt:function(a,b){if(a==null)return null;a.parent==this&&(V.remove(this.__tiles,a),this.__length--);this.__tiles.splice(b,0,a);a.parent=this;this.__length++;this.__setRenderDirty();return a},addTiles:function(a){for(var b=0;b<a.length;){var c=a[b];++b;this.addTile(c)}return a},clone:function(){for(var a=new vo,b=0,c=this.__tiles;b<c.length;){var d=c[b];++b;a.addTile(d.clone())}return a},contains:function(a){return this.__tiles.indexOf(a)>-1},getBounds:function(a){for(var b=new Ia,
c,d=0,f=this.__tiles;d<f.length;)c=f[d],++d,c=c.getBounds(a),b.__expand(c.x,c.y,c.width,c.height);return b},getTileAt:function(a){return a>=0&&a<this.get_numTiles()?this.__tiles[a]:null},getTileIndex:function(a){for(var b=0,c=this.__tiles.length;b<c;){var d=b++;if(this.__tiles[d]==a)return d}return-1},removeTile:function(a){a!=null&&a.parent==this&&(a.parent=null,V.remove(this.__tiles,a),this.__length--,this.__setRenderDirty());return a},removeTileAt:function(a){return a>=0&&a<this.get_numTiles()?
this.removeTile(this.__tiles[a]):null},removeTiles:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);a<0&&(a=0);b>this.__tiles.length-1&&(b=this.__tiles.length-1);a=this.__tiles.splice(a,b-a+1);for(b=0;b<a.length;){var c=a[b];++b;c.parent=null}this.__length=this.__tiles.length;this.__setRenderDirty()},setTileIndex:function(a,b){b>=0&&b<=this.get_numTiles()&&a.parent==this&&(V.remove(this.__tiles,a),this.__tiles.splice(b,0,a),this.__setRenderDirty())},sortTiles:function(a){this.__tiles.sort(a);
this.__setRenderDirty()},swapTiles:function(a,b){if(a.parent==this&&b.parent==this){var c=this.__tiles.indexOf(a),d=this.__tiles.indexOf(b);this.__tiles[c]=b;this.__tiles[d]=a;this.__setRenderDirty()}},swapTilesAt:function(a,b){var c=this.__tiles[a];this.__tiles[a]=this.__tiles[b];this.__tiles[b]=c;this.__setRenderDirty()},get_numTiles:function(){return this.__length},get_height:function(){for(var a=Ia.__pool.get(),b,c=0,d=this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),a.__expand(b.x,b.y,
b.width,b.height);this.__getBounds(a,this.get_matrix());c=a.height;Ia.__pool.release(a);return c},set_height:function(a){for(var b=Ia.__pool.get(),c,d=0,f=this.__tiles;d<f.length;)c=f[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);b.height!=0&&this.set_scaleY(a/b.height);Ia.__pool.release(b);return a},get_width:function(){for(var a=Ia.__pool.get(),b,c=0,d=this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),a.__expand(b.x,b.y,b.width,b.height);this.__getBounds(a,this.get_matrix());
c=a.width;Ia.__pool.release(a);return c},set_width:function(a){for(var b=Ia.__pool.get(),c,d=0,f=this.__tiles;d<f.length;)c=f[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);b.width!=0&&this.set_scaleX(a/b.width);Ia.__pool.release(b);return a},__class__:vo,__properties__:I(Yl.prototype.__properties__,{get_numTiles:"get_numTiles"})});var uq=function(a,b,c,d){d==null&&(d=!0);ma.call(this);this.__drawableType=9;this.__tileset=c;this.smoothing=d;this.tileColorTransformEnabled=this.tileBlendModeEnabled=
this.tileAlphaEnabled=!0;this.__group=new vo;this.__group.set_tileset(c);this.__width=a;this.__height=b};t["openfl.display.Tilemap"]=uq;uq.__name__="openfl.display.Tilemap";uq.__interfaces__=[tq];uq.__super__=ma;uq.prototype=I(ma.prototype,{tileAlphaEnabled:null,tileBlendModeEnabled:null,tileColorTransformEnabled:null,smoothing:null,__group:null,__tileset:null,__buffer:null,__bufferDirty:null,__height:null,__width:null,addTile:function(a){return this.__group.addTile(a)},addTileAt:function(a,b){return this.__group.addTileAt(a,
b)},addTiles:function(a){return this.__group.addTiles(a)},contains:function(a){return this.__group.contains(a)},getTileAt:function(a){return this.__group.getTileAt(a)},getTileIndex:function(a){return this.__group.getTileIndex(a)},getTiles:function(){return this.__group.clone()},removeTile:function(a){return this.__group.removeTile(a)},removeTileAt:function(a){return this.__group.removeTileAt(a)},removeTiles:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);this.__group.removeTiles(a,b)},setTileIndex:function(a,
b){this.__group.setTileIndex(a,b)},setTiles:function(a){for(var b=0,c=this.__group.__tiles;b<c.length;){var d=c[b];++b;this.removeTile(d)}b=0;for(c=a.__tiles;b<c.length;)d=c[b],++b,this.addTile(d)},sortTiles:function(a){this.__group.sortTiles(a)},swapTiles:function(a,b){this.__group.swapTiles(a,b)},swapTilesAt:function(a,b){this.__group.swapTilesAt(a,b)},__enterFrame:function(a){this.__group.__dirty&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,
b){var c=Ia.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ia.__pool.release(c)},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var h=this.__renderTransform,n=h.a*h.d-h.b*h.c;c=n==0?-h.tx:1/n*(h.c*(h.ty-b)+h.d*(a-h.tx));h=this.__renderTransform;n=h.a*h.d-h.b*h.c;a=n==0?-h.ty:1/n*(h.a*(b-h.ty)+h.b*(h.tx-a));return c>0&&a>
0&&c<=this.__width&&a<=this.__height?(d==null||f||d.push(g),!0):!1},__renderFlash:function(){},get_height:function(){return this.__height*Math.abs(this.get_scaleY())},set_height:function(a){this.__height=a|0;return this.__height*Math.abs(this.get_scaleY())},get_numTiles:function(){return this.__group.__length},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__group.set_tileset(a),this.__group.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()));return a},get_width:function(){return this.__width*Math.abs(this.__scaleX)},set_width:function(a){this.__width=a|0;return this.__width*Math.abs(this.__scaleX)},__class__:uq,__properties__:I(ma.prototype.__properties__,{set_tileset:"set_tileset",get_tileset:"get_tileset",get_numTiles:"get_numTiles"})});var qy=function(a,b){this.__bitmapData=a;this.rectData=tb.toFloatVector(null);this.__data=[];if(b!=null)for(a=0;a<b.length;){var c=b[a];++a;this.addRect(c)}};t["openfl.display.Tileset"]=
qy;qy.__name__="openfl.display.Tileset";qy.prototype={rectData:null,__bitmapData:null,__data:null,addRect:function(a){if(a==null)return-1;this.rectData.push(a.x);this.rectData.push(a.y);this.rectData.push(a.width);this.rectData.push(a.height);a=new jv(a);a.__update(this.__bitmapData);this.__data.push(a);return this.__data.length-1},clone:function(){for(var a=new qy(this.__bitmapData,null),b=Ia.__pool.get(),c=0,d=this.__data;c<d.length;){var f=d[c];++c;b.setTo(f.x,f.y,f.width,f.height);a.addRect(b)}Ia.__pool.release(b);
return a},hasRect:function(a){for(var b=0,c=this.__data;b<c.length;){var d=c[b];++b;if(a.x==d.x&&a.y==d.y&&a.width==d.width&&a.height==d.height)return!0}return!1},getRect:function(a){return a<this.__data.length&&a>=0?new Ia(this.__data[a].x,this.__data[a].y,this.__data[a].width,this.__data[a].height):null},getRectID:function(a){for(var b,c=0,d=this.__data.length;c<d;){var f=c++;b=this.__data[f];if(a.x==b.x&&a.y==b.y&&a.width==b.width&&a.height==b.height)return f}return null},get_bitmapData:function(){return this.__bitmapData},
set_bitmapData:function(a){this.__bitmapData=a;for(var b=0,c=this.__data;b<c.length;){var d=c[b];++b;d.__update(this.__bitmapData)}return a},get_numRects:function(){return this.__data.length},__class__:qy,__properties__:{get_numRects:"get_numRects",set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"}};var jv=function(a){a!=null&&(this.x=a.x|0,this.y=a.y|0,this.width=a.width|0,this.height=a.height|0)};t["openfl.display.TileData"]=jv;jv.__name__="openfl.display.TileData";jv.prototype={height:null,
width:null,x:null,y:null,__bitmapData:null,__uvHeight:null,__uvWidth:null,__uvX:null,__uvY:null,__update:function(a){if(a!=null){var b=a.width;a=a.height;this.__uvX=this.x/b;this.__uvY=this.y/a;this.__uvWidth=(this.x+this.width)/b;this.__uvHeight=(this.y+this.height)/a}},__class__:jv};var mz=function(){this.__totalFrames=this.__framesLoaded=1;this.__currentLabels=[];this.__currentFrame=1;this.__lastFrameUpdate=this.__lastFrameScriptEval=-1};t["openfl.display.Timeline"]=mz;mz.__name__="openfl.display.Timeline";
mz.prototype={frameRate:null,scenes:null,scripts:null,__currentFrame:null,__currentFrameLabel:null,__currentLabel:null,__currentLabels:null,__currentScene:null,__frameScripts:null,__framesLoaded:null,__frameTime:null,__isPlaying:null,__lastFrameScriptEval:null,__lastFrameUpdate:null,__scope:null,__timeElapsed:null,__totalFrames:null,attachMovieClip:function(a){},enterFrame:function(a){},initializeSprite:function(a){},__addFrameScript:function(a,b){a<0||(a+=1,b!=null?(this.__frameScripts==null&&(this.__frameScripts=
new Od),this.__frameScripts.h[a]=function(c){b()}):this.__frameScripts!=null&&this.__frameScripts.remove(a))},__attachMovieClip:function(a){this.__scope=a;this.__framesLoaded=this.__totalFrames=0;if(this.scenes!=null&&this.scenes.length>0){for(var b=0,c=this.scenes;b<c.length;){var d=c[b];++b;this.__totalFrames+=d.numFrames;this.__framesLoaded+=d.numFrames;d.labels!=null&&(this.__currentLabels=this.__currentLabels.concat(d.labels))}this.__currentScene=this.scenes[0]}if(this.scripts!=null&&this.scripts.length>
0)for(this.__frameScripts=new Od,b=0,c=this.scripts;b<c.length;)d=c[b],++b,this.__frameScripts.h.hasOwnProperty(d.frame)?this.__frameScripts.h[d.frame]=function(f,g){return function(h){g[0](h);f[0](h)}}([d.script],[this.__frameScripts.h[d.frame]]):this.__frameScripts.h[d.frame]=d.script;this.attachMovieClip(a)},__enterFrame:function(a){if(this.__isPlaying){a=this.__getNextFrame(a);if(this.__lastFrameScriptEval==a)return;if(this.__frameScripts!=null){if(a<this.__currentFrame){if(!this.__evaluateFrameScripts(this.__totalFrames))return;
this.__currentFrame=1}if(!this.__evaluateFrameScripts(a))return}else this.__currentFrame=a}this.__updateSymbol(this.__currentFrame)},__evaluateFrameScripts:function(a){if(this.__frameScripts==null)return!0;var b=this.__currentFrame;for(a+=1;b<a;){var c=b++;if(c!=this.__lastFrameScriptEval&&(this.__currentFrame=this.__lastFrameScriptEval=c,this.__frameScripts.h.hasOwnProperty(c)&&(this.__updateSymbol(c),(0,this.__frameScripts.h[c])(this.__scope),this.__currentFrame!=c)||!this.__isPlaying))return!1}return!0},
__getNextFrame:function(a){this.frameRate!=null?(this.__timeElapsed+=a,a=this.__currentFrame+Math.floor(this.__timeElapsed/this.__frameTime),a<1&&(a=1),a>this.__totalFrames&&(a=Math.floor((a-1)%this.__totalFrames)+1),this.__timeElapsed%=this.__frameTime):(a=this.__currentFrame+1,a>this.__totalFrames&&(a=1));return a},__goto:function(a){a<1?a=1:a>this.__totalFrames&&(a=this.__totalFrames);this.__lastFrameScriptEval=-1;this.__currentFrame=a;this.__updateSymbol(this.__currentFrame);this.__evaluateFrameScripts(this.__currentFrame)},
__gotoAndPlay:function(a,b){this.__play();this.__goto(this.__resolveFrameReference(a))},__gotoAndStop:function(a,b){this.__stop();this.__goto(this.__resolveFrameReference(a))},__nextFrame:function(){this.__stop();this.__goto(this.__currentFrame+1)},__nextScene:function(){},__play:function(){this.__isPlaying||this.__totalFrames<2||(this.__isPlaying=!0,this.frameRate!=null&&(this.__frameTime=1E3/this.frameRate|0,this.__timeElapsed=0))},__prevFrame:function(){this.__stop();this.__goto(this.__currentFrame-
1)},__prevScene:function(){},__stop:function(){this.__isPlaying=!1},__resolveFrameReference:function(a){if(typeof a=="number"&&(a|0)===a)return a;if(typeof a=="string"){for(var b=0,c=this.__currentLabels;b<c.length;){var d=c[b];++b;if(d.name==a)return d.frame}throw new Cb("Error #2109: Frame label "+a+" not found in scene.");}throw ba.thrown("Invalid type for frame "+a.__name__);},__updateFrameLabel:function(){this.__currentFrameLabel=this.__currentLabel=null;for(var a=0,b=this.__currentLabels;a<
b.length;){var c=b[a];++a;if(c.frame<this.__currentFrame)this.__currentLabel=c.name;else if(c.frame==this.__currentFrame)this.__currentFrameLabel=this.__currentLabel=c.name;else break}},__updateSymbol:function(a){this.__currentFrame!=this.__lastFrameUpdate&&(this.__updateFrameLabel(),this.enterFrame(a),this.__lastFrameUpdate=this.__currentFrame)},__class__:mz};var qq=function(a,b){lm.call(this,a,b);this.stage=new gd(this,Object.prototype.hasOwnProperty.call(b.context,"background")?b.context.background:
16777215);if(Object.prototype.hasOwnProperty.call(b,"parameters"))try{this.stage.get_loaderInfo().parameters=b.parameters}catch(c){Pb.lastError=c}this.stage.__setLogicalSize(b.width,b.height);Object.prototype.hasOwnProperty.call(b,"resizable")&&!b.resizable&&this.stage.set_scaleMode(3);a.addModule(this.stage)};t["openfl.display.Window"]=qq;qq.__name__="openfl.display.Window";qq.__super__=lm;qq.prototype=I(lm.prototype,{close:function(){lm.prototype.close.call(this);this.onClose.canceled||this.stage==
null||(this.application.removeModule(this.stage),this.stage=null)},__class__:qq});var wo=function(a,b,c,d,f,g,h){h==null&&(h=.05);g==null&&(g=!1);this.stitch=g;this.stitch_threshold=h;this.octaves=b;this.channels=c;this.grayscale=d;this.calculateOctaves(f)};t["openfl.display._internal.AbstractNoise"]=wo;wo.__name__="openfl.display._internal.AbstractNoise";wo.prototype={octaves:null,stitch:null,stitch_threshold:null,channels:null,grayscale:null,octaves_frequencies:null,octaves_persistences:null,persistence_max:null,
fill:function(a,b,c,d){},stitching:function(a,b,c,d,f,g,h,n){var l=b>>16&255,q=b>>8&255;b&=255;if(h-f<c){var u=a.getPixel32(h-c,d),v=u>>8&255,z=u&255;f=(h-c)/f;l=this.mixI(u>>16&255,l,f);q=this.mixI(v,q,f);b=this.mixI(z,b,f)}n-g<d&&(u=a.getPixel32(c,n-d),v=u>>8&255,z=u&255,f=(n-d)/g,l=this.mixI(u>>16&255,l,f),q=this.mixI(v,q,f),b=this.mixI(z,b,f));return-16777216|l<<16|q<<8|b},color:function(a,b,c){var d=0,f=0,g=0;null!=a&&(d=this.noiseToColor(a));null!=b&&(f=this.noiseToColor(b));null!=c&&(g=this.noiseToColor(c));
return-16777216|d<<16|f<<8|g},noiseToColor:function(a){return(a*this.persistence_max+1)*128|0},fade:function(a){return a*a*a*(a*(a*6-15)+10)},mixI:function(a,b,c){return(1-c)*a+c*b|0},mix:function(a,b,c){return(1-c)*a+c*b},fastfloor:function(a){return a>0?a|0:a-1|0},dot2d:function(a,b,c){return a[0]*b+a[1]*c},dot:function(a,b,c,d){return a[0]*b+a[1]*c+a[2]*d},calculateOctaves:function(a){this.octaves_frequencies=[];this.octaves_persistences=[];for(var b=this.persistence_max=0,c=this.octaves;b<c;){var d=
b++;var f=Math.pow(2,d);d=Math.pow(a,d);this.persistence_max+=d;this.octaves_frequencies.push(f);this.octaves_persistences.push(d)}this.persistence_max=1/this.persistence_max},__class__:wo};var kv=function(){};t["openfl.display._internal.CairoBitmap"]=kv;kv.__name__="openfl.display._internal.CairoBitmap";kv.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(c>0&&a.__bitmapData!=null&&a.__bitmapData.__isValid){var d=b.cairo;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);
b.applyMatrix(a.__renderTransform,d);var f=a.__bitmapData.getSurface();f!=null&&(f=Vx.createForSurface(f),Vx.set_filter(f,b.__allowSmoothing&&a.smoothing?1:3),d.set_source(f),c==1?d.paint():d.paintWithAlpha(c));b.__popMaskObject(a);b.__setBlendMode(10)}}};kv.renderDrawable=function(a,b){};kv.renderDrawableMask=function(a,b){b.cairo.rectangle(0,0,a.get_width(),a.get_height())};var nz=function(){};t["openfl.display._internal.CairoBitmapData"]=nz;nz.__name__="openfl.display._internal.CairoBitmapData";
nz.renderDrawable=function(a,b){};nz.renderDrawableMask=function(a,b){};var lv=function(){};t["openfl.display._internal.CairoDisplayObject"]=lv;lv.__name__="openfl.display._internal.CairoDisplayObject";lv.render=function(a,b){};lv.renderDrawable=function(a,b){};lv.renderDrawableMask=function(a,b){};var oz=function(){};t["openfl.display._internal.CairoDisplayObjectContainer"]=oz;oz.__name__="openfl.display._internal.CairoDisplayObjectContainer";oz.renderDrawable=function(a,b){};oz.renderDrawableMask=
function(a,b){};var mv=function(){};t["openfl.display._internal.CairoGraphics"]=mv;mv.__name__="openfl.display._internal.CairoGraphics";mv.hitTest=function(a,b,c){return!1};mv.render=function(a,b){};mv.renderMask=function(a,b){};var pz=function(){this.scale9MinX=this.scale9MinY=this.scale9MaxX=this.scale9MaxY=this.unscaledMinX=this.unscaledMinY=this.unscaledMaxX=this.unscaledMaxY=null};t["openfl.display._internal._CairoGraphics.Scale9GridBounds"]=pz;pz.__name__="openfl.display._internal._CairoGraphics.Scale9GridBounds";
pz.prototype={scale9MinX:null,scale9MinY:null,scale9MaxX:null,scale9MaxY:null,unscaledMinX:null,unscaledMinY:null,unscaledMaxX:null,unscaledMaxY:null,getScaleX:function(){if(this.scale9MaxX==null||this.unscaledMaxX==null)return 1;var a=this.unscaledMaxX-this.unscaledMinX;return a==0?1:(this.scale9MaxX-this.scale9MinX)/a},getScaleY:function(){if(this.scale9MaxY==null||this.unscaledMaxY==null)return 1;var a=this.unscaledMaxY-this.unscaledMinY;return a==0?1:(this.scale9MaxY-this.scale9MinY)/a},clear:function(){this.scale9MaxY=
this.scale9MinY=this.scale9MaxX=this.scale9MinX=this.unscaledMaxY=this.unscaledMinY=this.unscaledMaxX=this.unscaledMinX=null},applyUnscaledX:function(a){if(this.unscaledMinX==null||this.unscaledMinX>a)this.unscaledMinX=a;if(this.unscaledMaxX==null||this.unscaledMaxX<a)this.unscaledMaxX=a},applyUnscaledY:function(a){if(this.unscaledMinY==null||this.unscaledMinY>a)this.unscaledMinY=a;if(this.unscaledMaxY==null||this.unscaledMaxY<a)this.unscaledMaxY=a},applyScaledX:function(a){if(this.scale9MinX==null||
this.scale9MinX>a)this.scale9MinX=a;if(this.scale9MaxX==null||this.scale9MaxX<a)this.scale9MaxX=a},applyScaledY:function(a){if(this.scale9MinY==null||this.scale9MinY>a)this.scale9MinY=a;if(this.scale9MaxY==null||this.scale9MaxY<a)this.scale9MaxY=a},__class__:pz};var nv=function(){};t["openfl.display._internal.CairoShape"]=nv;nv.__name__="openfl.display._internal.CairoShape";nv.render=function(a,b){};nv.renderDrawable=function(a,b){};nv.renderDrawableMask=function(a,b){};var qz=function(){};t["openfl.display._internal.CairoSimpleButton"]=
qz;qz.__name__="openfl.display._internal.CairoSimpleButton";qz.renderDrawable=function(a,b){!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};qz.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var ov=function(){};t["openfl.display._internal.CairoTextField"]=ov;ov.__name__="openfl.display._internal.CairoTextField";ov.render=function(a,b,c){};ov.renderDrawable=function(a,
b){};ov.renderDrawableMask=function(a,b){};var Ym=function(){};t["openfl.display._internal.CairoTilemap"]=Ym;Ym.__name__="openfl.display._internal.CairoTilemap";Ym.render=function(a,b){if(a.__renderable&&a.__group.__tiles.length!=0){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=Ia.__pool.get();d.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(d,a.__renderTransform);Ym.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,
b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,null,d,fj._new());b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(d)}}};Ym.renderTileContainer=function(a,b,c,d,f,g,h,n,l,q,u,v,z,r){var F=b.cairo,J=gb.__pool.get();a=a.__tiles;for(var L,Q,W,ka=null,ha,ta=0;ta<a.length;)if(ha=a[ta],++ta,J.setTo(1,0,0,1,-ha.get_originX(),-ha.get_originY()),J.concat(ha.get_matrix()),J.concat(c),L=ha.get_tileset()!=null?ha.get_tileset():d,Q=ha.get_alpha()*
h,(W=ha.get_visible())&&!(Q<=0))if(g||(Q=1),n&&(ka=ha.__blendMode!=null?ha.__blendMode:l),ha.__length>0)Ym.renderTileContainer(ha,b,J,L,f,g,Q,n,ka,q,u,v,z,r);else if(L!=null){W=ha.get_id();if(W==-1){if(ha=ha.__rect,ha==null||ha.width<=0||ha.height<=0)continue}else{ha=L.__data[W];if(ha==null)continue;z.setTo(ha.x,ha.y,ha.width,ha.height);ha=z}L=L.__bitmapData;L!=null&&L.image!=null&&(L!=q&&(u=L.getSurface(),v=Vx.createForSurface(u),Vx.set_filter(v,f?1:3),F.set_source(v),q=L),n&&b.__setBlendMode(ka),
b.applyMatrix(J,F),r[6]=ha.x,r[7]=ha.y,Vx.set_matrix(v,r),F.set_source(v),F.save(),F.newPath(),F.rectangle(0,0,ha.width,ha.height),F.clip(),Q==1?F.paint():F.paintWithAlpha(Q),F.restore())}gb.__pool.release(J)};Ym.renderDrawable=function(a,b){};Ym.renderDrawableMask=function(a,b){};var po=function(){};t["openfl.display._internal.CanvasBitmap"]=po;po.__name__="openfl.display._internal.CanvasBitmap";po.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(c>0&&a.__bitmapData!=
null&&a.__bitmapData.__isValid&&a.__bitmapData.readable){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a,!1);yb.convertToCanvas(a.__bitmapData.image);d.globalAlpha=c;c=a.__scrollRect;b.setTransform(a.__renderTransform,d);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);c==null?d.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):d.drawImage(a.__bitmapData.image.get_src(),c.x,c.y,c.width,c.height,c.x,c.y,c.width,
c.height);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a,!1)}}};po.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);a.__bitmapData!=null&&a.__bitmapData.image!=null&&(a.__imageVersion=a.__bitmapData.image.version);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||(n=b.__getAlpha(a.__worldAlpha),n<=0))){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>
0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);l=b.context;b.setTransform(a.__renderTransform,l);var c=a.opaqueBackground;l.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";l.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(n=b.__getAlpha(a.__worldAlpha),!(n<=0)&&(c=a.__graphics,c!=null))){C.render(c,b);var d=c.__width,f=c.__height,g=c.__canvas;if(g!=null&&c.__visible&&d>=1&&f>=1){var h=c.__worldTransform;l=b.context;
q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),l.globalAlpha=n,n=gb.__pool.get(),n.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),n.concat(h),b.setTransform(n,l),l.drawImage(g,0,0,d,f),gb.__pool.release(n),b.__popMaskObject(a)}}}a.__renderable&&(n=b.__getAlpha(a.__worldAlpha),n>0&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(l=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a,!1),yb.convertToCanvas(a.__bitmapData.image),
l.globalAlpha=n,q=a.__scrollRect,b.setTransform(a.__renderTransform,l),b.__allowSmoothing&&a.smoothing||(l.imageSmoothingEnabled=!1),q==null?l.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):l.drawImage(a.__bitmapData.image.get_src(),q.x,q.y,q.width,q.height,q.x,q.y,q.width,q.height),b.__allowSmoothing&&a.smoothing||(l.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))}else if(c=a.__cacheBitmap,c.__renderable){var n=b.__getAlpha(c.__worldAlpha);
if(n>0&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var l=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);yb.convertToCanvas(c.__bitmapData.image);l.globalAlpha=n;var q=c.__scrollRect;b.setTransform(c.__renderTransform,l);b.__allowSmoothing&&c.smoothing||(l.imageSmoothingEnabled=!1);q==null?l.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):l.drawImage(c.__bitmapData.image.get_src(),q.x,q.y,q.width,
q.height,q.x,q.y,q.width,q.height);b.__allowSmoothing&&c.smoothing||(l.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};po.renderDrawableMask=function(a,b){b.context.rect(0,0,a.get_width(),a.get_height())};var Mu=function(){};t["openfl.display._internal.CanvasBitmapData"]=Mu;Mu.__name__="openfl.display._internal.CanvasBitmapData";Mu.renderDrawable=function(a,b){if(a.readable){var c=a.image;c.type==gg.DATA&&yb.convertToCanvas(c);var d=b.context;d.globalAlpha=1;b.setTransform(a.__renderTransform,
d);d.drawImage(c.get_src(),0,0,c.width,c.height)}};Mu.renderDrawableMask=function(a,b){};var Wl=function(){};t["openfl.display._internal.CanvasDisplayObject"]=Wl;Wl.__name__="openfl.display._internal.CanvasDisplayObject";Wl.render=function(a,b){if((a.opaqueBackground!=null||a.__graphics!=null)&&a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);
var d=b.context;b.setTransform(a.__renderTransform,d);var f=a.opaqueBackground;d.fillStyle="rgb("+(f>>>16&255)+","+(f>>>8&255)+","+(f&255)+")";d.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(c=b.__getAlpha(a.__worldAlpha),!(c<=0)&&(f=a.__graphics,f!=null))){C.render(f,b);var g=f.__width,h=f.__height,n=f.__canvas;if(n!=null&&f.__visible&&g>=1&&h>=1){var l=f.__worldTransform;d=b.context;var q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),
b.__pushMaskObject(a),d.globalAlpha=c,c=gb.__pool.get(),c.scale(1/f.__bitmapScaleX,1/f.__bitmapScaleY),c.concat(l),b.setTransform(c,d),d.drawImage(n,0,0,g,h),gb.__pool.release(c),b.__popMaskObject(a)}}}}};Wl.renderDrawable=function(a,b){if(a.get_mask()==null||a.get_mask().get_width()>0&&a.get_mask().get_height()>0)if(b.__updateCacheBitmap(a,!1),a.__cacheBitmap!=null&&!a.__isCacheBitmapRender){var c=a.__cacheBitmap;if(c.__renderable){var d=b.__getAlpha(c.__worldAlpha);if(d>0&&c.__bitmapData!=null&&
c.__bitmapData.__isValid&&c.__bitmapData.readable){var f=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);yb.convertToCanvas(c.__bitmapData.image);f.globalAlpha=d;var g=c.__scrollRect;b.setTransform(c.__renderTransform,f);b.__allowSmoothing&&c.smoothing||(f.imageSmoothingEnabled=!1);g==null?f.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):f.drawImage(c.__bitmapData.image.get_src(),g.x,g.y,g.width,g.height,g.x,g.y,g.width,
g.height);b.__allowSmoothing&&c.smoothing||(f.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}}else if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||(d=b.__getAlpha(a.__worldAlpha),d<=0||(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),f=b.context,b.setTransform(a.__renderTransform,f),d=a.opaqueBackground,f.fillStyle="rgb("+(d>>>16&255)+","+(d>>>8&255)+","+(d&255)+")",f.fillRect(0,
0,a.get_width(),a.get_height()),b.__popMaskObject(a)),a.__graphics==null||!a.__renderable||(d=b.__getAlpha(a.__worldAlpha),d<=0||(c=a.__graphics,c==null)))))){C.render(c,b);var h=c.__width,n=c.__height,l=c.__canvas;if(l!=null&&c.__visible&&h>=1&&n>=1){var q=c.__worldTransform;f=b.context;g=a.__scrollRect;if(g==null||g.width>0&&g.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),f.globalAlpha=d,d=gb.__pool.get(),d.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),d.concat(q),b.setTransform(d,
f),f.drawImage(l,0,0,h,n),gb.__pool.release(d),b.__popMaskObject(a)}}b.__renderEvent(a)};Wl.renderDrawableMask=function(a,b){a.__graphics!=null&&C.renderMask(a.__graphics,b)};var Nu=function(){};t["openfl.display._internal.CanvasDisplayObjectContainer"]=Nu;Nu.__name__="openfl.display._internal.CanvasDisplayObjectContainer";Nu.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);if(!(!a.__renderable||
a.__worldAlpha<=0||a.get_mask()!=null&&(a.get_mask().get_width()<=0||a.get_mask().get_height()<=0))&&(Wl.renderDrawable(a,b),a.__cacheBitmap==null||a.__isCacheBitmapRender)){b.__pushMaskObject(a);if(b.__stage!=null){c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawable(f);f.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);b.__popMaskObject(a)}};Nu.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=
c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);a.__graphics!=null&&C.renderMask(a.__graphics,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var lh=function(){lh.empty==null?(this.types=[],this.b=[],this.i=[],this.f=[],this.o=[],this.ff=[],this.ii=[],this.copyOnWrite=!0):this.clear()};t["openfl.display._internal.DrawCommandBuffer"]=lh;lh.__name__="openfl.display._internal.DrawCommandBuffer";lh.prototype={types:null,b:null,copyOnWrite:null,f:null,
ff:null,i:null,ii:null,o:null,append:function(a){if(this.get_length()==0)return this.types=a.types,this.b=a.b,this.i=a.i,this.f=a.f,this.o=a.o,this.ff=a.ff,this.ii=a.ii,this.copyOnWrite=a.copyOnWrite=!0,a;for(var b=new wj(a),c=0,d=a.types;c<d.length;){var f=d[c];++c;switch(f._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=
4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_BITMAP_FILL;f=b;this.beginBitmapFill(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],
f.buffer.b[f.bPos+1]);break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_FILL;f=b;this.beginFill(f.buffer.i[f.iPos],f.buffer.f[f.fPos]);break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;
case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_GRADIENT_FILL;f=b;this.beginGradientFill(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+
3],f.buffer.f[f.fPos]);break;case 3:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_SHADER_FILL;f=b;this.beginShaderFill(f.buffer.o[f.oPos]);break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=
4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.CUBIC_CURVE_TO;f=b;this.cubicCurveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.f[f.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.CURVE_TO;f=b;this.curveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_CIRCLE;f=b;this.drawCircle(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;
b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_ELLIPSE;
f=b;this.drawEllipse(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 8:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=
2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_QUADS;f=b;this.drawQuads(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_RECT;f=b;this.drawRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+
2],f.buffer.f[f.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_ROUND_RECT;f=b;this.drawRoundRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.o[f.oPos]);break;case 12:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;
case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_TRIANGLES;f=b;this.drawTriangles(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+
2],f.buffer.o[f.oPos+3]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.END_FILL;this.endFill();break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;
b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_BITMAP_STYLE;f=b;this.lineBitmapStyle(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],f.buffer.b[f.bPos+1]);break;case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=
1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=xa.LINE_GRADIENT_STYLE;f=b;this.lineGradientStyle(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.f[f.fPos]);break;case 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;
case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_STYLE;f=b;this.lineStyle(f.buffer.o[f.oPos],f.buffer.i[f.iPos],f.buffer.f[f.fPos],f.buffer.b[f.bPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+
3],f.buffer.f[f.fPos+1]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_TO;f=b;this.lineTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;
case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.MOVE_TO;f=b;this.moveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1]);break;case 20:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.OVERRIDE_MATRIX;
f=b;this.overrideMatrix(f.buffer.o[f.oPos]);break;case 21:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.WINDING_EVEN_ODD;this.windingEvenOdd();break;case 22:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=
4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.WINDING_NON_ZERO;this.windingNonZero()}}b.destroy();return a},beginBitmapFill:function(a,b,c,d){this.prepareWrite();this.types.push(xa.BEGIN_BITMAP_FILL);this.o.push(a);this.o.push(b);this.b.push(c);
this.b.push(d)},beginFill:function(a,b){this.prepareWrite();this.types.push(xa.BEGIN_FILL);this.i.push(a);this.f.push(b)},beginGradientFill:function(a,b,c,d,f,g,h,n){this.prepareWrite();this.types.push(xa.BEGIN_GRADIENT_FILL);this.o.push(a);this.ii.push(b);this.ff.push(c);this.ii.push(d);this.o.push(f);this.o.push(g);this.o.push(h);this.f.push(n)},beginShaderFill:function(a){this.prepareWrite();this.types.push(xa.BEGIN_SHADER_FILL);this.o.push(a)},clear:function(){this.types=lh.empty.types;this.b=
lh.empty.b;this.i=lh.empty.i;this.f=lh.empty.f;this.o=lh.empty.o;this.ff=lh.empty.ff;this.ii=lh.empty.ii;this.copyOnWrite=!0},copy:function(){var a=new lh;a.append(this);return a},cubicCurveTo:function(a,b,c,d,f,g){this.prepareWrite();this.types.push(xa.CUBIC_CURVE_TO);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(f);this.f.push(g)},curveTo:function(a,b,c,d){this.prepareWrite();this.types.push(xa.CURVE_TO);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},destroy:function(){this.clear();
this.ii=this.ff=this.o=this.f=this.i=this.b=this.types=null},drawCircle:function(a,b,c){this.prepareWrite();this.types.push(xa.DRAW_CIRCLE);this.f.push(a);this.f.push(b);this.f.push(c)},drawEllipse:function(a,b,c,d){this.prepareWrite();this.types.push(xa.DRAW_ELLIPSE);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawQuads:function(a,b,c){this.prepareWrite();this.types.push(xa.DRAW_QUADS);this.o.push(a);this.o.push(b);this.o.push(c)},drawRect:function(a,b,c,d){this.prepareWrite();this.types.push(xa.DRAW_RECT);
this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawRoundRect:function(a,b,c,d,f,g){this.prepareWrite();this.types.push(xa.DRAW_ROUND_RECT);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(f);this.o.push(g)},drawTriangles:function(a,b,c,d){this.prepareWrite();this.types.push(xa.DRAW_TRIANGLES);this.o.push(a);this.o.push(b);this.o.push(c);this.o.push(d)},endFill:function(){this.prepareWrite();this.types.push(xa.END_FILL)},lineBitmapStyle:function(a,b,c,d){this.prepareWrite();
this.types.push(xa.LINE_BITMAP_STYLE);this.o.push(a);this.o.push(b);this.b.push(c);this.b.push(d)},lineGradientStyle:function(a,b,c,d,f,g,h,n){this.prepareWrite();this.types.push(xa.LINE_GRADIENT_STYLE);this.o.push(a);this.ii.push(b);this.ff.push(c);this.ii.push(d);this.o.push(f);this.o.push(g);this.o.push(h);this.f.push(n)},lineStyle:function(a,b,c,d,f,g,h,n){this.prepareWrite();this.types.push(xa.LINE_STYLE);this.o.push(a);this.i.push(b);this.f.push(c);this.b.push(d);this.o.push(f);this.o.push(g);
this.o.push(h);this.f.push(n)},lineTo:function(a,b){this.prepareWrite();this.types.push(xa.LINE_TO);this.f.push(a);this.f.push(b)},moveTo:function(a,b){this.prepareWrite();this.types.push(xa.MOVE_TO);this.f.push(a);this.f.push(b)},prepareWrite:function(){this.copyOnWrite&&(this.types=this.types.slice(),this.b=this.b.slice(),this.i=this.i.slice(),this.f=this.f.slice(),this.o=this.o.slice(),this.ff=this.ff.slice(),this.ii=this.ii.slice(),this.copyOnWrite=!1)},overrideBlendMode:function(a){this.prepareWrite();
this.types.push(xa.OVERRIDE_BLEND_MODE);this.o.push(a)},overrideMatrix:function(a){this.prepareWrite();this.types.push(xa.OVERRIDE_MATRIX);this.o.push(a)},windingEvenOdd:function(){this.prepareWrite();this.types.push(xa.WINDING_EVEN_ODD)},windingNonZero:function(){this.prepareWrite();this.types.push(xa.WINDING_NON_ZERO)},get_length:function(){return this.types.length},__class__:lh,__properties__:{get_length:"get_length"}};var C=function(){};t["openfl.display._internal.CanvasGraphics"]=C;C.__name__=
"openfl.display._internal.CanvasGraphics";C.closePath=function(a){a==null&&(a=!1);if(C.context.strokeStyle!=null){a||C.context.closePath();if(!C.hitTesting&&C.strokePattern!=null){var b=C.graphics.__owner.__scale9Grid!=null&&!C.graphics.__owner.__isMask&&C.graphics.__worldTransform.b==0&&C.graphics.__worldTransform.c==0;if(C.bitmapStrokeMatrix!=null||b&&C.strokeScale9Bounds!=null&&C.bitmapStroke!=null){var c=gb.__pool.get();C.bitmapStrokeMatrix!=null?c.copyFrom(C.bitmapStrokeMatrix):c.identity();
if(b&&C.strokeScale9Bounds!=null&&C.bitmapStroke!=null){b=C.strokeScale9Bounds.getScaleX();var d=C.strokeScale9Bounds.getScaleY();b>0&&d>0&&c.scale(b,d)}b=new DOMMatrix([c.a,c.b,c.c,c.d,c.tx,c.ty]);C.strokePattern.setTransform(b);gb.__pool.release(c)}}C.context.stroke();a&&C.context.closePath();C.context.beginPath()}};C.createBitmapFill=function(a,b,c){yb.convertToCanvas(a.image);C.setSmoothing(c);return C.context.createPattern(a.image.get_src(),b?"repeat":"no-repeat")};C.createGradientPattern=function(a,
b,c,d,f,g,h,n){h=!1;f==null&&(f=gb.__pool.get(),f.identity(),h=!0);switch(a){case 0:if(g==0){a=Ea.__pool.get();a.setTo(-819.2,0);n=a.x;var l=a.y;a.x=n*f.a+l*f.c+f.tx;a.y=n*f.b+l*f.d+f.ty;var q=Ea.__pool.get();q.setTo(819.2,0);n=q.x;l=q.y;q.x=n*f.a+l*f.c+f.tx;q.y=n*f.b+l*f.d+f.ty;n=C.graphics.__owner.__scale9Grid;if(l=n!=null&&!C.graphics.__owner.__isMask&&C.graphics.__worldTransform.b==0&&C.graphics.__worldTransform.c==0)a.x=C.toScale9Position(a.x,n.x,n.width,C.bounds.width,C.graphics.__owner.get_scaleX()),
a.y=C.toScale9Position(a.y,n.y,n.height,C.bounds.height,C.graphics.__owner.get_scaleY()),q.x=C.toScale9Position(q.x,n.x,n.width,C.bounds.width,C.graphics.__owner.get_scaleX()),q.y=C.toScale9Position(q.y,n.y,n.height,C.bounds.height,C.graphics.__owner.get_scaleY());n=C.context.createLinearGradient(a.x,a.y,q.x,q.y);C.pendingMatrix=null;C.inversePendingMatrix=null;l=0;for(var u=b.length;l<u;){var v=l++;g=d[v]/255;g<0?g=0:g>1&&(g=1);n.addColorStop(g,C.getRGBA(b[v],c[v]))}a!=null&&Ea.__pool.release(a);
q!=null&&Ea.__pool.release(q);h&&gb.__pool.release(f);return n}n=.5*((g==0?1:25)-1)*1638.4;h=window.document.createElement("canvas");a=h.getContext("2d");q=C.getDimensions(f);h.width=C.context.canvas.width;h.height=C.context.canvas.height;n=C.context.createLinearGradient(-819.2-n,0,819.2+n,0);if(g==1)for(var z=0,r=.04;z<1;){l=0;for(u=b.length;l<u;)v=l++,g=d[v]/255,g=z+g*r,g<0?g=0:g>1&&(g=1),n.addColorStop(g,C.getRGBA(b[v],c[v]));z+=r;for(l=b.length-1;l>=0;)g=d[l]/255,g=z+(1-g)*r,g<0?g=0:g>1&&(g=1),
n.addColorStop(g,C.getRGBA(b[l],c[l])),--l;z+=r}else if(g==2)for(z=0,r=.04;z<1;){l=0;for(u=b.length;l<u;)v=l++,g=d[v]/255,g=z+g*r,g<0?g=0:g>1&&(g=.999),n.addColorStop(g,C.getRGBA(b[v],c[v]));g=z+.001;g<0?g=0:g>1&&(g=1);n.addColorStop(g-.001,C.getRGBA(b[b.length-1],c[c.length-1]));n.addColorStop(g,C.getRGBA(b[0],c[0]));z+=r}C.pendingMatrix=new gb;C.pendingMatrix.tx=f.tx-q.width/2;C.pendingMatrix.ty=f.ty-q.height/2;C.inversePendingMatrix=C.pendingMatrix.clone();C.inversePendingMatrix.invert();b=new Path2D;
b.rect(0,0,h.width,h.height);b.closePath();f=new DOMMatrix([f.a,f.b,f.c,f.d,f.tx,f.ty]);c=f.inverse();d=new Path2D;d.addPath(b,c);a.fillStyle=n;a.setTransform(f.a,f.b,f.c,f.d,f.e,f.f);a.fill(d);return C.context.createPattern(h,"no-repeat");case 1:n>1?n=1:n<-1&&(n=-1);a=Ea.__pool.get();a.x=n*819.2;a.y=0;n=a.x;l=a.y;a.x=n*f.a+l*f.c+f.tx;a.y=n*f.b+l*f.d+f.ty;q=Ea.__pool.get();q.setTo(0,0);n=q.x;l=q.y;q.x=n*f.a+l*f.c+f.tx;q.y=n*f.b+l*f.d+f.ty;g=Ea.__pool.get();g.x=819.2;g.y=0;n=g.x;l=g.y;g.x=n*f.a+l*
f.c+f.tx;g.y=n*f.b+l*f.d+f.ty;n=C.graphics.__owner.__scale9Grid;if(l=n!=null&&!C.graphics.__owner.__isMask&&C.graphics.__worldTransform.b==0&&C.graphics.__worldTransform.c==0)a.x=C.toScale9Position(a.x,n.x,n.width,C.bounds.width,C.graphics.__owner.get_scaleX()),a.y=C.toScale9Position(a.y,n.y,n.height,C.bounds.height,C.graphics.__owner.get_scaleY()),q.x=C.toScale9Position(q.x,n.x,n.width,C.bounds.width,C.graphics.__owner.get_scaleX()),q.y=C.toScale9Position(q.y,n.y,n.height,C.bounds.height,C.graphics.__owner.get_scaleY()),
g.x=C.toScale9Position(g.x,n.x,n.width,C.bounds.width,C.graphics.__owner.get_scaleX()),g.y=C.toScale9Position(g.y,n.y,n.height,C.bounds.height,C.graphics.__owner.get_scaleY());n=g.x-q.x;l=g.y-q.y;Ea.__pool.release(g);n=C.context.createRadialGradient(a.x,a.y,0,q.x,q.y,Math.sqrt(n*n+l*l));C.pendingMatrix=null;C.inversePendingMatrix=null;l=0;for(u=b.length;l<u;)v=l++,g=d[v]/255,g<0?g=0:g>1&&(g=1),n.addColorStop(g,C.getRGBA(b[v],c[v]));a!=null&&Ea.__pool.release(a);q!=null&&Ea.__pool.release(q);h&&gb.__pool.release(f);
return n}};C.getRGBA=function(a,b){var c=(a&16711680)>>>16,d=(a&65280)>>>8;a&=255;return"rgba("+(c==null?"null":H.string(sb.toFloat(c)))+", "+(d==null?"null":H.string(sb.toFloat(d)))+", "+(a==null?"null":H.string(sb.toFloat(a)))+", "+b+")"};C.getDimensions=function(a){var b=Math.cos(Math.atan2(a.c,a.a)),c=a.a/b*1638.4;a=a.d/b*1638.4;c==0&&a==0&&(c=a=819.2);return{width:c,height:a}};C.createTempPatternCanvas=function(a,b,c,d){var f=window.document.createElement("canvas"),g=f.getContext("2d");f.width=
c;f.height=d;a=a.image.get_src();g.fillStyle=g.createPattern(a,b?"repeat":"no-repeat");g.beginPath();g.moveTo(0,0);g.lineTo(0,d);g.lineTo(c,d);g.lineTo(c,0);g.lineTo(0,0);g.closePath();C.hitTesting||g.fill(C.windingRule);return f};C.drawRoundRect=function(a,b,c,d,f,g,h,n,l,q,u){g==null&&(g=f);f*=.5;g*=.5;f>c/2&&(f=c/2);g>d/2&&(g=d/2);if(h!=null){var v=C.toScale9Position(a,h.x,h.width,n,q),z=C.toScale9Position(b,h.y,h.height,l,u),r=C.toScale9Position(a+c,h.x,h.width,n,q),F=C.toScale9Position(b+d,h.y,
h.height,l,u);if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(a),C.applyScale9GridUnscaledY(b),C.applyScale9GridUnscaledX(a+c),C.applyScale9GridUnscaledY(b+d),C.applyScale9GridScaledX(v),C.applyScale9GridScaledY(z),C.applyScale9GridScaledX(r),C.applyScale9GridScaledY(F);var J=C.toScale9Position(a+f,h.x,h.width,n,q),L=C.toScale9Position(b+g,h.y,h.height,l,u);a=C.toScale9Position(a+c-f,h.x,h.width,n,q);b=C.toScale9Position(b+
d-g,h.y,h.height,l,u);C.context.moveTo(J,z);C.context.lineTo(a,z);C.context.quadraticCurveTo(r,z,r,L);C.context.lineTo(r,b);C.context.quadraticCurveTo(r,F,a,F);C.context.lineTo(J,F);C.context.quadraticCurveTo(v,F,v,b);C.context.lineTo(v,L);C.context.quadraticCurveTo(v,z,J,z)}else v=a+c,d=b+d,z=-f+f*.7071067811865476,r=-f+f*.41421356237309503,F=-g+g*.7071067811865476,J=-g+g*.41421356237309503,C.context.moveTo(v,d-g),C.context.quadraticCurveTo(v,d+J,v+z,d+F),C.context.quadraticCurveTo(v+r,d,v-f,d),
C.context.lineTo(a+f,d),C.context.quadraticCurveTo(a-r,d,a-z,d+F),C.context.quadraticCurveTo(a,d+J,a,d-g),C.context.lineTo(a,b+g),C.context.quadraticCurveTo(a,b-J,a-z,b-F),C.context.quadraticCurveTo(a-r,b,a+f,b),C.context.lineTo(v-f,b),C.context.quadraticCurveTo(v+r,b,v+z,b-F),C.context.quadraticCurveTo(v,b-J,v,b+g),C.context.lineTo(v,d-g)};C.endFill=function(){C.context.beginPath();C.playCommands(C.fillCommands,!1);C.fillCommands.clear()};C.endStroke=function(){C.context.beginPath();C.playCommands(C.strokeCommands,
!0);C.context.closePath();C.strokeCommands.clear()};C.toScale9Position=function(a,b,c,d,f){if(f<=0)return 0;var g=d-c-b;d=d*f-b-g;return a<=b?d<0?a*(b+g+d)/(b+g):a:a>=b+c?d<0?(b+(a-b-c))*(b+g+d)/(b+g):b+d+(a-b-c):d<0?b*(b+g+d)/(b+g):b+d*(a-b)/c};C.applyScale9GridUnscaledX=function(a){C.fillScale9Bounds!=null&&C.bitmapFill!=null&&C.fillScale9Bounds.applyUnscaledX(a);C.strokeScale9Bounds!=null&&C.bitmapStroke!=null&&C.strokeScale9Bounds.applyUnscaledX(a)};C.applyScale9GridUnscaledY=function(a){C.fillScale9Bounds!=
null&&C.bitmapFill!=null&&C.fillScale9Bounds.applyUnscaledY(a);C.strokeScale9Bounds!=null&&C.bitmapStroke!=null&&C.strokeScale9Bounds.applyUnscaledY(a)};C.applyScale9GridScaledX=function(a){C.fillScale9Bounds!=null&&C.bitmapFill!=null&&C.fillScale9Bounds.applyScaledX(a);C.strokeScale9Bounds!=null&&C.bitmapStroke!=null&&C.strokeScale9Bounds.applyScaledX(a)};C.applyScale9GridScaledY=function(a){C.fillScale9Bounds!=null&&C.bitmapFill!=null&&C.fillScale9Bounds.applyScaledY(a);C.strokeScale9Bounds!=null&&
C.bitmapStroke!=null&&C.strokeScale9Bounds.applyScaledY(a)};C.hitTest=function(a,b,c){C.bounds=a.__bounds;C.graphics=a;if(a.__commands.get_length()==0||C.bounds==null||C.bounds.width<=0||C.bounds.height<=0)return C.graphics=null,!1;C.hitTesting=!0;var d=a.__renderTransform,f=b*d.b+c*d.d+d.ty;b=b*d.a+c*d.c+d.tx;c=f;b-=C.bounds.x*d.a+C.bounds.y*d.c+d.tx;c-=C.bounds.x*d.b+C.bounds.y*d.d+d.ty;f=a.__canvas;var g=a.__context;a.__canvas=C.hitTestCanvas;a.__context=C.hitTestContext;C.context=a.__context;
C.context.setTransform(d.a,d.b,d.c,d.d,d.tx,d.ty);C.fillCommands.clear();C.strokeCommands.clear();C.hasFill=!1;C.hasStroke=!1;C.bitmapFill=null;C.bitmapRepeat=!1;C.windingRule="evenodd";d=new wj(a.__commands);for(var h=0,n=a.__commands.types;h<n.length;){var l=n[h];++h;switch(l._hx_index){case 0:case 1:case 2:case 3:C.endFill();if(C.hasFill&&C.context.isPointInPath(b,c,C.windingRule))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;C.endStroke();if(C.hasStroke&&C.context.isPointInStroke(b,
c))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;if(l==xa.BEGIN_BITMAP_FILL){switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=
4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.BEGIN_BITMAP_FILL;l=d;C.fillCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);C.strokeCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1])}else if(l==xa.BEGIN_GRADIENT_FILL){switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.BEGIN_GRADIENT_FILL;l=d;C.fillCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos]);C.strokeCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos])}else if(l==xa.BEGIN_SHADER_FILL){switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.BEGIN_SHADER_FILL;l=d;C.fillCommands.beginShaderFill(l.buffer.o[l.oPos]);C.strokeCommands.beginShaderFill(l.buffer.o[l.oPos])}else{switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.BEGIN_FILL;l=d;C.fillCommands.beginFill(l.buffer.i[l.iPos],1);C.strokeCommands.beginFill(l.buffer.i[l.iPos],1)}break;case 4:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;
case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=
1}d.prev=xa.CUBIC_CURVE_TO;l=d;C.fillCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+5]);C.strokeCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+5]);break;case 5:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=
1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.CURVE_TO;l=d;C.fillCommands.curveTo(l.buffer.f[l.fPos],
l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);C.strokeCommands.curveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 6:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.DRAW_CIRCLE;l=d;C.fillCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2]);C.strokeCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2]);break;case 7:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.DRAW_ELLIPSE;l=d;C.fillCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);C.strokeCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 9:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;
case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.DRAW_RECT;l=d;C.fillCommands.drawRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+
2],l.buffer.f[l.fPos+3]);C.strokeCommands.drawRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 10:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=
4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.DRAW_ROUND_RECT;l=d;C.fillCommands.drawRoundRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);C.strokeCommands.drawRoundRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+
2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);break;case 13:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=
2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.END_FILL;C.endFill();if(C.hasFill&&C.context.isPointInPath(b,c,C.windingRule))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;C.endStroke();if(C.hasStroke&&C.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;C.hasFill=!1;C.bitmapFill=null;break;case 14:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.LINE_BITMAP_STYLE;l=d;C.strokeCommands.lineBitmapStyle(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);break;case 15:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=
4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.LINE_GRADIENT_STYLE;l=d;C.strokeCommands.lineGradientStyle(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+
3],l.buffer.f[l.fPos]);break;case 16:C.endStroke();if(C.hasStroke&&C.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;
case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.LINE_STYLE;l=d;C.strokeCommands.lineStyle(l.buffer.o[l.oPos],l.buffer.i[l.iPos],1,l.buffer.b[l.bPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos+1]);break;case 17:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.LINE_TO;l=d;C.fillCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);C.strokeCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);break;case 18:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=
4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=xa.MOVE_TO;l=d;C.fillCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);C.strokeCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);break;case 21:C.windingRule="evenodd";break;case 22:C.windingRule=
"nonzero";break;default:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=
1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=l}}h=!1;C.fillCommands.get_length()>0&&C.endFill();C.hasFill&&C.context.isPointInPath(b,c,C.windingRule)&&(h=!0);C.strokeCommands.get_length()>0&&C.endStroke();C.hasStroke&&C.context.isPointInStroke(b,c)&&(h=!0);d.destroy();a.__canvas=f;a.__context=g;C.graphics=null;return h};C.isCCW=function(a,b,c,d,f,g){return(c-a)*(g-b)-(d-b)*(f-a)<0};C.normalizeUVT=function(a,b){b==null&&
(b=!1);for(var c=-Infinity,d,f=a.get_length(),g=1,h=f+1;g<h;)d=g++,b&&d%3==0||(d=a.get(d-1),c<d&&(c=d));if(!b)return{max:c,uvt:a};var n=tb.toFloatVector(null);g=1;for(h=f+1;g<h;)d=g++,b&&d%3==0||n.push(a.get(d-1));return{max:c,uvt:n}};C.playCommands=function(a,b){b==null&&(b=!1);C.bounds=C.graphics.__bounds;var c=C.bounds.x,d=C.bounds.y,f=0,g=0,h=!1,n=0,l=0,q=!1;C.windingRule="evenodd";C.setSmoothing(!0);var u=!1,v=C.graphics.__owner.__scale9Grid,z=v!=null&&!C.graphics.__owner.__isMask&&C.graphics.__worldTransform.b==
0&&C.graphics.__worldTransform.c==0;z||(v=null,C.fillScale9Bounds!=null&&C.fillScale9Bounds.clear(),C.strokeScale9Bounds!=null&&C.strokeScale9Bounds.clear());var r=new wj(a),F,J,L,Q=null,W=null,ka=0,ha=a.types;a:for(;ka<ha.length;){var ta=ha[ka];++ka;switch(ta._hx_index){case 0:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=
3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.BEGIN_BITMAP_FILL;var za=r;if(za.buffer.o[za.oPos].readable)C.context.fillStyle=C.createBitmapFill(za.buffer.o[za.oPos],za.buffer.b[za.bPos],
za.buffer.b[za.bPos+1]),C.bitmapFill=za.buffer.o[za.oPos];else{var eb=N.hex(0,6);C.context.fillStyle="#"+eb;C.bitmapFill=null}C.bitmapRepeat=za.buffer.b[za.bPos];C.hasFill=!0;C.fillScale9Bounds!=null?C.fillScale9Bounds.clear():z&&C.bitmapFill!=null&&(C.fillScale9Bounds=new pv);za.buffer.o[za.oPos+1]!=null?(C.pendingMatrix=za.buffer.o[za.oPos+1],C.inversePendingMatrix=za.buffer.o[za.oPos+1].clone(),C.inversePendingMatrix.invert()):(C.pendingMatrix=null,C.inversePendingMatrix=null);break;case 1:switch(r.prev._hx_index){case 0:r.oPos+=
2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=
2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.BEGIN_FILL;var db=r;if(db.buffer.f[db.fPos]<.005)C.hasFill=!1;else{if(db.buffer.f[db.fPos]==1){var Ra=N.hex(db.buffer.i[db.iPos]&16777215,6);C.context.fillStyle="#"+Ra}else{var vb=(db.buffer.i[db.iPos]&16711680)>>>16;var bb=(db.buffer.i[db.iPos]&65280)>>>8;var Tb=db.buffer.i[db.iPos]&255;C.context.fillStyle="rgba("+vb+", "+bb+", "+Tb+", "+db.buffer.f[db.fPos]+")"}C.hasFill=!0;C.setSmoothing(!0)}C.bitmapFill=null;C.fillScale9Bounds!=null&&
C.fillScale9Bounds.clear();break;case 2:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=
4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.BEGIN_GRADIENT_FILL;var Eb=r;C.context.fillStyle=C.createGradientPattern(Eb.buffer.o[Eb.oPos],Eb.buffer.ii[Eb.iiPos],Eb.buffer.ff[Eb.ffPos],Eb.buffer.ii[Eb.iiPos+1],Eb.buffer.o[Eb.oPos+1],Eb.buffer.o[Eb.oPos+2],Eb.buffer.o[Eb.oPos+3],Eb.buffer.f[Eb.fPos]);C.hasFill=!0;C.bitmapFill=null;C.setSmoothing(!0);C.fillScale9Bounds!=null&&C.fillScale9Bounds.clear();break;
case 3:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=
1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.BEGIN_SHADER_FILL;var Lb=r,vc=Lb.buffer.o[Lb.oPos];if(vc.inputCount>0){C.bitmapFill=vc.inputs[0];if(C.bitmapFill.readable)C.context.fillStyle=C.createBitmapFill(C.bitmapFill,vc.inputWrap[0]!=0,vc.inputFilter[0]!=5);else{var zd=N.hex(0,6);C.context.fillStyle="#"+zd}C.hasFill=!0;C.pendingMatrix=null;C.inversePendingMatrix=null}C.fillScale9Bounds!=null&&C.fillScale9Bounds.clear();break;case 4:switch(r.prev._hx_index){case 0:r.oPos+=
2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=
2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.CUBIC_CURVE_TO;var Qb=r;u=!0;if(z){var wd=C.toScale9Position(Qb.buffer.f[Qb.fPos],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Ae=C.toScale9Position(Qb.buffer.f[Qb.fPos+1],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),bg=C.toScale9Position(Qb.buffer.f[Qb.fPos+2],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Df=C.toScale9Position(Qb.buffer.f[Qb.fPos+3],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),
Sg=C.toScale9Position(Qb.buffer.f[Qb.fPos+4],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Nf=C.toScale9Position(Qb.buffer.f[Qb.fPos+5],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(Qb.buffer.f[Qb.fPos+4]),C.applyScale9GridUnscaledY(Qb.buffer.f[Qb.fPos+5]),C.applyScale9GridScaledX(Sg),C.applyScale9GridScaledY(Nf);C.context.bezierCurveTo(wd-c,Ae-
d,bg-c,Df-d,Sg-c,Nf-d);f=Sg;g=Nf}else C.context.bezierCurveTo(Qb.buffer.f[Qb.fPos]-c,Qb.buffer.f[Qb.fPos+1]-d,Qb.buffer.f[Qb.fPos+2]-c,Qb.buffer.f[Qb.fPos+3]-d,Qb.buffer.f[Qb.fPos+4]-c,Qb.buffer.f[Qb.fPos+5]-d),f=Qb.buffer.f[Qb.fPos+4],g=Qb.buffer.f[Qb.fPos+5];break;case 5:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=
3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.CURVE_TO;var he=r;u=!0;if(z){var ie=C.toScale9Position(he.buffer.f[he.fPos],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),
ml=C.toScale9Position(he.buffer.f[he.fPos+1],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),td=C.toScale9Position(he.buffer.f[he.fPos+2],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),ne=C.toScale9Position(he.buffer.f[he.fPos+3],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(he.buffer.f[he.fPos+2]),C.applyScale9GridUnscaledY(he.buffer.f[he.fPos+
3]),C.applyScale9GridScaledX(td),C.applyScale9GridScaledY(ne);C.context.quadraticCurveTo(ie-c,ml-d,td-c,ne-d);f=td;g=ne}else C.context.quadraticCurveTo(he.buffer.f[he.fPos]-c,he.buffer.f[he.fPos+1]-d,he.buffer.f[he.fPos+2]-c,he.buffer.f[he.fPos+3]-d),f=he.buffer.f[he.fPos+2],g=he.buffer.f[he.fPos+3];break;case 6:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;
case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.DRAW_CIRCLE;var Mc=r;u=!0;if(z){var xk=C.toScale9Position(Mc.buffer.f[Mc.fPos]-Mc.buffer.f[Mc.fPos+
2],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Zc=C.toScale9Position(Mc.buffer.f[Mc.fPos+1]-Mc.buffer.f[Mc.fPos+2],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),jd=C.toScale9Position(Mc.buffer.f[Mc.fPos]+Mc.buffer.f[Mc.fPos+2],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Zd=C.toScale9Position(Mc.buffer.f[Mc.fPos+1]+Mc.buffer.f[Mc.fPos+2],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=
null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(Mc.buffer.f[Mc.fPos]-Mc.buffer.f[Mc.fPos+2]),C.applyScale9GridUnscaledY(Mc.buffer.f[Mc.fPos+1]-Mc.buffer.f[Mc.fPos+2]),C.applyScale9GridUnscaledX(Mc.buffer.f[Mc.fPos]+Mc.buffer.f[Mc.fPos+2]),C.applyScale9GridUnscaledY(Mc.buffer.f[Mc.fPos+1]+Mc.buffer.f[Mc.fPos+2]),C.applyScale9GridScaledX(xk),C.applyScale9GridScaledY(Zc),C.applyScale9GridScaledX(jd),C.applyScale9GridScaledY(Zd);var Nc=xk-c;var Ud=Zc-d;var kf=jd-xk;var hg=Zd-Zc;if(kf!=0||hg!=0){var Tg=
kf/2*.5522848;var rf=hg/2*.5522848;var yk=Nc+kf;var zk=Ud+hg;var bf=Nc+kf/2;var ig=Ud+hg/2;C.context.moveTo(Nc,ig);C.context.bezierCurveTo(Nc,ig-rf,bf-Tg,Ud,bf,Ud);C.context.bezierCurveTo(bf+Tg,Ud,yk,ig-rf,yk,ig);C.context.bezierCurveTo(yk,ig+rf,bf+Tg,zk,bf,zk);C.context.bezierCurveTo(bf-Tg,zk,Nc,ig+rf,Nc,ig)}}else Mc.buffer.f[Mc.fPos+2]!=0&&(C.context.moveTo(Mc.buffer.f[Mc.fPos]-c+Mc.buffer.f[Mc.fPos+2],Mc.buffer.f[Mc.fPos+1]-d),C.context.arc(Mc.buffer.f[Mc.fPos]-c,Mc.buffer.f[Mc.fPos+1]-d,Mc.buffer.f[Mc.fPos+
2],0,Math.PI*2,!0));break;case 7:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=
4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.DRAW_ELLIPSE;var od=r;u=!0;if(z){var mh=C.toScale9Position(od.buffer.f[od.fPos],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Zl=C.toScale9Position(od.buffer.f[od.fPos+1],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),nl=C.toScale9Position(od.buffer.f[od.fPos]+od.buffer.f[od.fPos+2],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),
xo=C.toScale9Position(od.buffer.f[od.fPos+1]+od.buffer.f[od.fPos+3],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(od.buffer.f[od.fPos]),C.applyScale9GridUnscaledY(od.buffer.f[od.fPos+1]),C.applyScale9GridUnscaledX(od.buffer.f[od.fPos]+od.buffer.f[od.fPos+2]),C.applyScale9GridUnscaledY(od.buffer.f[od.fPos+1]+od.buffer.f[od.fPos+3]),C.applyScale9GridScaledX(mh),
C.applyScale9GridScaledY(Zl),C.applyScale9GridScaledX(nl),C.applyScale9GridScaledY(xo);Nc=mh;Ud=Zl;kf=nl-mh;hg=xo-Zl}else Nc=od.buffer.f[od.fPos],Ud=od.buffer.f[od.fPos+1],kf=od.buffer.f[od.fPos+2],hg=od.buffer.f[od.fPos+3];if(kf!=0||hg!=0)Nc-=c,Ud-=d,Tg=kf/2*.5522848,rf=hg/2*.5522848,yk=Nc+kf,zk=Ud+hg,bf=Nc+kf/2,ig=Ud+hg/2,C.context.moveTo(Nc,ig),C.context.bezierCurveTo(Nc,ig-rf,bf-Tg,Ud,bf,Ud),C.context.bezierCurveTo(bf+Tg,Ud,yk,ig-rf,yk,ig),C.context.bezierCurveTo(yk,ig+rf,bf+Tg,zk,bf,zk),C.context.bezierCurveTo(bf-
Tg,zk,Nc,ig+rf,Nc,ig);break;case 8:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=
4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.DRAW_QUADS;var Ak=r,ci=Ak.buffer.o[Ak.oPos],ol=Ak.buffer.o[Ak.oPos+1],ue=Ak.buffer.o[Ak.oPos+2],pl=ol!=null,$l=!1,Re=!1,Yj=pl?ol.get_length():Math.floor(ci.get_length()/4);if(Yj==0)return;ue!=null&&(ue.get_length()>=Yj*6?Re=$l=!0:ue.get_length()>=Yj*4?$l=!0:ue.get_length()>=Yj*2&&(Re=!0));var Ge=Ia.__pool.get(),He=gb.__pool.get(),am=C.graphics.__renderTransform;
C.context.save();for(var bm=0,Zm=Yj;bm<Zm;){var Bk=bm++;var Di=pl?ol.get(Bk)*4:Bk*4;if(!(Di<0||(Ge.setTo(ci.get(Di),ci.get(Di+1),ci.get(Di+2),ci.get(Di+3)),Ge.width<=0||Ge.height<=0))){if($l&&Re){var Of=Bk*6;He.setTo(ue.get(Of),ue.get(Of+1),ue.get(Of+2),ue.get(Of+3),ue.get(Of+4),ue.get(Of+5))}else $l?(Of=Bk*4,He.setTo(ue.get(Of),ue.get(Of+1),ue.get(Of+2),ue.get(Of+3),Ge.x,Ge.y)):Re?(Of=Bk*2,He.tx=ue.get(Of),He.ty=ue.get(Of+1)):(He.tx=Ge.x,He.ty=Ge.y);He.tx+=f-c;He.ty+=g-d;He.concat(am);C.context.setTransform(He.a,
He.b,He.c,He.d,He.tx,He.ty);C.bitmapFill!=null&&C.bitmapFill.readable?C.context.drawImage(C.bitmapFill.image.get_src(),Ge.x,Ge.y,Ge.width,Ge.height,0,0,Ge.width,Ge.height):C.context.fillRect(0,0,Ge.width,Ge.height)}}Ia.__pool.release(Ge);gb.__pool.release(He);C.context.restore();break;case 9:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;
break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.DRAW_RECT;var fc=r;var ql=!1;if(C.bitmapFill!=null&&C.bitmapFill.readable&&!C.hitTesting&&!z){var Ck=
L=J=F=0;var ug=!0;if(C.pendingMatrix!=null)if(C.pendingMatrix.b!=0||C.pendingMatrix.c!=0)ug=!1;else{Q==null&&(Q=Ea.__pool.get());W==null&&(W=Ea.__pool.get());Q.setTo(fc.buffer.f[fc.fPos],fc.buffer.f[fc.fPos+1]);var rl=C.inversePendingMatrix,$m=Q.x,Zj=Q.y;Q.x=$m*rl.a+Zj*rl.c+rl.tx;Q.y=$m*rl.b+Zj*rl.d+rl.ty;W.setTo(fc.buffer.f[fc.fPos]+fc.buffer.f[fc.fPos+2],fc.buffer.f[fc.fPos+1]+fc.buffer.f[fc.fPos+3]);var Ug=C.inversePendingMatrix,vg=W.x,yo=W.y;W.x=vg*Ug.a+yo*Ug.c+Ug.tx;W.y=vg*Ug.b+yo*Ug.d+Ug.ty;
F=Q.y;Ck=Q.x;L=W.y;J=W.x}else F=fc.buffer.f[fc.fPos+1],Ck=fc.buffer.f[fc.fPos],L=fc.buffer.f[fc.fPos+1]+fc.buffer.f[fc.fPos+3],J=fc.buffer.f[fc.fPos]+fc.buffer.f[fc.fPos+2];ug&&F>=0&&Ck>=0&&J<=C.bitmapFill.width&&L<=C.bitmapFill.height&&(ql=!0,C.hitTesting||C.context.drawImage(C.bitmapFill.image.get_src(),Ck,F,J-Ck,L-F,fc.buffer.f[fc.fPos]-c,fc.buffer.f[fc.fPos+1]-d,fc.buffer.f[fc.fPos+2],fc.buffer.f[fc.fPos+3]))}if(!ql)if(u=!0,z){var lf=C.toScale9Position(fc.buffer.f[fc.fPos],v.x,v.width,C.bounds.width,
C.graphics.__owner.get_scaleX()),sl=C.toScale9Position(fc.buffer.f[fc.fPos+1],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),vq=C.toScale9Position(fc.buffer.f[fc.fPos]+fc.buffer.f[fc.fPos+2],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),tl=C.toScale9Position(fc.buffer.f[fc.fPos+1]+fc.buffer.f[fc.fPos+3],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(fc.buffer.f[fc.fPos]),
C.applyScale9GridUnscaledY(fc.buffer.f[fc.fPos+1]),C.applyScale9GridUnscaledX(fc.buffer.f[fc.fPos]+fc.buffer.f[fc.fPos+2]),C.applyScale9GridUnscaledY(fc.buffer.f[fc.fPos+1]+fc.buffer.f[fc.fPos+3]),C.applyScale9GridScaledX(lf),C.applyScale9GridScaledY(sl),C.applyScale9GridScaledX(vq),C.applyScale9GridScaledY(tl);var Eg=vq-lf,Dk=tl-sl;Eg==0&&Dk==0||C.context.rect(lf-c,sl-d,Eg,Dk)}else fc.buffer.f[fc.fPos+2]==0&&fc.buffer.f[fc.fPos+3]==0||C.context.rect(fc.buffer.f[fc.fPos]-c,fc.buffer.f[fc.fPos+1]-
d,fc.buffer.f[fc.fPos+2],fc.buffer.f[fc.fPos+3]);break;case 10:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;
r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.DRAW_ROUND_RECT;var Fg=r;u=!0;C.drawRoundRect(Fg.buffer.f[Fg.fPos]-c,Fg.buffer.f[Fg.fPos+1]-d,Fg.buffer.f[Fg.fPos+2],Fg.buffer.f[Fg.fPos+3],Fg.buffer.f[Fg.fPos+4],Fg.buffer.o[Fg.oPos],v,C.bounds.width,C.bounds.height,C.graphics.__owner.get_scaleX(),C.graphics.__owner.get_scaleY());break;case 12:switch(r.prev._hx_index){case 0:r.oPos+=
2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=
2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.DRAW_TRIANGLES;var di=r,$d=di.buffer.o[di.oPos],Xi=di.buffer.o[di.oPos+1],Ih=di.buffer.o[di.oPos+2],Jh=null,Ek=C.bitmapFill==null;if(Ek&&Ih!=null)break a;if(!Ek&&Ih!=null){var qv=Ih.get_length()!=$d.get_length(),wq=C.normalizeUVT(Ih,qv),rv=wq.max;Ih=wq.uvt;Jh=rv>1?C.createTempPatternCanvas(C.bitmapFill,C.bitmapRepeat,C.bounds.width|0,C.bounds.height|0):C.createTempPatternCanvas(C.bitmapFill,C.bitmapRepeat,C.bitmapFill.width,C.bitmapFill.height)}for(var zj=
0,xq=Xi.get_length(),Aj,cm,Bj,ve,Gg,ak,ei,Yi,Fk,Kh,Vg,Hg,Wg,nh,jg,bk,ck,Pf,oh,kg,Ig,Cj,yq,zq,ry,rz,zo,Ie;zj<xq;){Aj=zj;cm=zj+1;Bj=zj+2;ve=Xi.get(Aj)*2;Gg=Xi.get(Aj)*2+1;ak=Xi.get(cm)*2;ei=Xi.get(cm)*2+1;Yi=Xi.get(Bj)*2;Fk=Xi.get(Bj)*2+1;if(z){var sz=C.toScale9Position($d.get(ve),v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),tz=C.toScale9Position($d.get(Gg),v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),uz=C.toScale9Position($d.get(ak),v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),
vz=C.toScale9Position($d.get(ei),v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY()),Aq=C.toScale9Position($d.get(Yi),v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),sy=C.toScale9Position($d.get(Fk),v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX($d.get(ve)),C.applyScale9GridUnscaledY($d.get(Gg)),C.applyScale9GridUnscaledX($d.get(ak)),C.applyScale9GridUnscaledY($d.get(ei)),
C.applyScale9GridUnscaledX($d.get(Yi)),C.applyScale9GridUnscaledY($d.get(Fk)),C.applyScale9GridScaledX(sz),C.applyScale9GridScaledY(tz),C.applyScale9GridScaledX(uz),C.applyScale9GridScaledY(vz),C.applyScale9GridScaledX(Aq),C.applyScale9GridScaledY(sy);Kh=sz-c;Vg=tz-d;Hg=uz-c;Wg=vz-d;nh=Aq-c;jg=sy-d}else Kh=$d.get(ve)-c,Vg=$d.get(Gg)-d,Hg=$d.get(ak)-c,Wg=$d.get(ei)-d,nh=$d.get(Yi)-c,jg=$d.get(Fk)-d;switch(di.buffer.o[di.oPos+3]){case 0:if((Hg-Kh)*(jg-Vg)-(Wg-Vg)*(nh-Kh)<0){zj+=3;continue}break;case 2:if(!((Hg-
Kh)*(jg-Vg)-(Wg-Vg)*(nh-Kh)<0)){zj+=3;continue}}if(Ek||Ih==null){C.context.beginPath();C.context.moveTo(Kh,Vg);C.context.lineTo(Hg,Wg);C.context.lineTo(nh,jg);C.context.closePath();var Bq=0,Cq=0,Lh=1,dm=1;if(!C.hitTesting&&z&&C.fillScale9Bounds!=null&&C.bitmapFill!=null){var lg=C.fillScale9Bounds.getScaleX(),Jg=C.fillScale9Bounds.getScaleY();if(lg>0&&Jg>0){C.context.scale(lg,Jg);Lh=1/lg;dm=1/Jg;var ty=C.fillScale9Bounds.unscaledMinX%C.bitmapFill.width,Dq=C.fillScale9Bounds.unscaledMinY%C.bitmapFill.height,
Eq=C.fillScale9Bounds.scale9MinX%(C.bitmapFill.width*lg)/lg,sv=C.fillScale9Bounds.scale9MinY%(C.bitmapFill.height*Jg)/Jg,em=Eq-ty,an=sv-Dq;C.context.translate(em,an);Bq=-em;Cq=-an}}C.hitTesting||C.context.fill(C.windingRule);!C.hitTesting&&z&&C.fillScale9Bounds!=null&&C.bitmapFill!=null&&(C.context.translate(Bq,Cq),C.context.scale(Lh,dm));zj+=3}else bk=Ih.get(ve)*Jh.width,Pf=Ih.get(ak)*Jh.width,kg=Ih.get(Yi)*Jh.width,ck=Ih.get(Gg)*Jh.height,oh=Ih.get(ei)*Jh.height,Ig=Ih.get(Fk)*Jh.height,Cj=bk*(Ig-
oh)-Pf*Ig+kg*oh+(Pf-kg)*ck,Cj==0?(zj+=3,C.context.restore()):(C.context.save(),C.context.beginPath(),C.context.moveTo(Kh,Vg),C.context.lineTo(Hg,Wg),C.context.lineTo(nh,jg),C.context.closePath(),C.context.clip(),yq=-(ck*(nh-Hg)-oh*nh+Ig*Hg+(oh-Ig)*Kh)/Cj,zq=(oh*jg+ck*(Wg-jg)-Ig*Wg+(Ig-oh)*Vg)/Cj,ry=(bk*(nh-Hg)-Pf*nh+kg*Hg+(Pf-kg)*Kh)/Cj,rz=-(Pf*jg+bk*(Wg-jg)-kg*Wg+(kg-Pf)*Vg)/Cj,zo=(bk*(Ig*Hg-oh*nh)+ck*(Pf*nh-kg*Hg)+(kg*oh-Pf*Ig)*Kh)/Cj,Ie=(bk*(Ig*Wg-oh*jg)+ck*(Pf*jg-kg*Wg)+(kg*oh-Pf*Ig)*Vg)/Cj,C.context.transform(yq,
zq,ry,rz,zo,Ie),C.context.drawImage(Jh,0,0,Jh.width,Jh.height),C.context.restore(),zj+=3)}break;case 14:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;
case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.LINE_BITMAP_STYLE;var Xg=r;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-c,g-d);if(Xg.buffer.o[Xg.oPos].readable)C.strokePattern=C.createBitmapFill(Xg.buffer.o[Xg.oPos],Xg.buffer.b[Xg.bPos],Xg.buffer.b[Xg.bPos+1]),C.context.strokeStyle=C.strokePattern,C.bitmapStroke=Xg.buffer.o[Xg.oPos],
C.bitmapStrokeMatrix=Xg.buffer.o[Xg.oPos+1];else{var uy=N.hex(0,6);C.context.strokeStyle="#"+uy;C.strokePattern=null;C.bitmapStroke=null;C.bitmapStrokeMatrix=null}C.strokeScale9Bounds!=null?C.strokeScale9Bounds.clear():z&&C.bitmapStroke!=null&&(C.strokeScale9Bounds=new pv);C.hasStroke=!0;break;case 15:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=
4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.LINE_GRADIENT_STYLE;var ph=r;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-c,g-d);C.strokePattern=
C.createGradientPattern(ph.buffer.o[ph.oPos],ph.buffer.ii[ph.iiPos],ph.buffer.ff[ph.ffPos],ph.buffer.ii[ph.iiPos+1],ph.buffer.o[ph.oPos+1],ph.buffer.o[ph.oPos+2],ph.buffer.o[ph.oPos+3],ph.buffer.f[ph.fPos]);C.context.strokeStyle=C.strokePattern;C.setSmoothing(!0);C.hasStroke=!0;C.bitmapStroke=null;C.bitmapStrokeMatrix=null;break;case 16:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;
break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.LINE_STYLE;var Nd=r;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-
c,g-d);if(Nd.buffer.o[Nd.oPos]==null)C.hasStroke=!1;else{C.hasStroke=!0;C.context.lineWidth=Nd.buffer.o[Nd.oPos]>0?Nd.buffer.o[Nd.oPos]:1;var wz=Nd.buffer.o[Nd.oPos+3]==null?"round":(Nd.buffer.o[Nd.oPos+3]==null?"null":lz.toString(Nd.buffer.o[Nd.oPos+3])).toLowerCase();C.context.lineJoin=wz;var fm=Nd.buffer.o[Nd.oPos+2]==null?"round":Nd.buffer.o[Nd.oPos+2]==0?"butt":(Nd.buffer.o[Nd.oPos+2]==null?"null":iz.toString(Nd.buffer.o[Nd.oPos+2])).toLowerCase();C.context.lineCap=fm;C.context.miterLimit=Nd.buffer.f[Nd.fPos+
1];if(Nd.buffer.f[Nd.fPos]==1){var ul=N.hex(Nd.buffer.i[Nd.iPos]&16777215,6);C.context.strokeStyle="#"+ul}else vb=(Nd.buffer.i[Nd.iPos]&16711680)>>>16,bb=(Nd.buffer.i[Nd.iPos]&65280)>>>8,Tb=Nd.buffer.i[Nd.iPos]&255,C.context.strokeStyle="rgba("+vb+", "+bb+", "+Tb+", "+Nd.buffer.f[Nd.fPos]+")";C.setSmoothing(!0)}C.strokePattern=null;C.bitmapStroke=null;C.bitmapStrokeMatrix=null;break;case 17:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;
r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.LINE_TO;
var Ef=r;u=!0;if(z){var bn=C.toScale9Position(Ef.buffer.f[Ef.fPos],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),cn=C.toScale9Position(Ef.buffer.f[Ef.fPos+1],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(Ef.buffer.f[Ef.fPos]),C.applyScale9GridUnscaledY(Ef.buffer.f[Ef.fPos+1]),C.applyScale9GridScaledX(bn),C.applyScale9GridScaledY(cn);f==bn&&g==cn||
C.context.lineTo(bn-c,cn-d);f=bn;g=cn}else f==Ef.buffer.f[Ef.fPos]&&g==Ef.buffer.f[Ef.fPos+1]||C.context.lineTo(Ef.buffer.f[Ef.fPos]-c,Ef.buffer.f[Ef.fPos+1]-d),f=Ef.buffer.f[Ef.fPos],g=Ef.buffer.f[Ef.fPos+1];f==n&&g==l&&(h=!0);break;case 18:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;
case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=xa.MOVE_TO;var qh=r;if(z){var vy=C.toScale9Position(qh.buffer.f[qh.fPos],v.x,v.width,C.bounds.width,C.graphics.__owner.get_scaleX()),dn=C.toScale9Position(qh.buffer.f[qh.fPos+
1],v.y,v.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(qh.buffer.f[qh.fPos]),C.applyScale9GridUnscaledY(qh.buffer.f[qh.fPos+1]),C.applyScale9GridScaledX(vy),C.applyScale9GridScaledY(dn);C.context.moveTo(vy-c,dn-d);f=vy;g=dn}else C.context.moveTo(qh.buffer.f[qh.fPos]-c,qh.buffer.f[qh.fPos+1]-d),f=qh.buffer.f[qh.fPos],g=qh.buffer.f[qh.fPos+1];q&&f!=n&&g!=l&&(h=!0);n=
f;l=g;q=!0;break;case 21:C.windingRule="evenodd";break;case 22:C.windingRule="nonzero";break;default:switch(r.prev._hx_index){case 0:r.oPos+=2;r.bPos+=2;break;case 1:r.iPos+=1;r.fPos+=1;break;case 2:r.oPos+=4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 3:r.oPos+=1;break;case 4:r.fPos+=6;break;case 5:r.fPos+=4;break;case 6:r.fPos+=3;break;case 7:r.fPos+=4;break;case 8:r.oPos+=3;break;case 9:r.fPos+=4;break;case 10:r.fPos+=5;r.oPos+=1;break;case 12:r.oPos+=4;break;case 14:r.oPos+=2;r.bPos+=2;break;case 15:r.oPos+=
4;r.iiPos+=2;r.ffPos+=1;r.fPos+=1;break;case 16:r.oPos+=4;r.iPos+=1;r.fPos+=2;r.bPos+=1;break;case 17:r.fPos+=2;break;case 18:r.fPos+=2;break;case 19:r.oPos+=1;break;case 20:r.oPos+=1}r.prev=ta}}Q!=null&&Ea.__pool.release(Q);W!=null&&Ea.__pool.release(W);r.destroy();if(u){if(b&&C.hasStroke){if(C.hasFill){if(f!=n||g!=l)C.context.lineTo(n-c,l-d),h=!0;h&&C.closePath(!0)}else h&&f==n&&g==l&&C.closePath(!0);if(!C.hitTesting&&C.strokePattern!=null&&(C.bitmapStrokeMatrix!=null||z&&C.strokeScale9Bounds!=
null&&C.bitmapStroke!=null)){var fi=gb.__pool.get();C.bitmapStrokeMatrix!=null?fi.copyFrom(C.bitmapStrokeMatrix):fi.identity();z&&C.strokeScale9Bounds!=null&&C.bitmapStroke!=null&&(lg=C.strokeScale9Bounds.getScaleX(),Jg=C.strokeScale9Bounds.getScaleY(),lg>0&&Jg>0&&fi.scale(lg,Jg));var tv=new DOMMatrix([fi.a,fi.b,fi.c,fi.d,fi.tx,fi.ty]);C.strokePattern.setTransform(tv);gb.__pool.release(fi)}C.hitTesting||C.context.stroke()}b||!C.hasFill&&C.bitmapFill==null||(C.context.translate(-C.bounds.x,-C.bounds.y),
Cq=Bq=0,dm=Lh=1,!C.hitTesting&&z&&C.fillScale9Bounds!=null&&C.bitmapFill!=null&&(lg=C.fillScale9Bounds.getScaleX(),Jg=C.fillScale9Bounds.getScaleY(),lg>0&&Jg>0&&(C.context.scale(lg,Jg),Lh=1/lg,dm=1/Jg,ty=C.fillScale9Bounds.unscaledMinX%C.bitmapFill.width,Dq=C.fillScale9Bounds.unscaledMinY%C.bitmapFill.height,Eq=C.fillScale9Bounds.scale9MinX%(C.bitmapFill.width*lg)/lg,sv=C.fillScale9Bounds.scale9MinY%(C.bitmapFill.height*Jg)/Jg,em=Eq-ty,an=sv-Dq,C.context.translate(em,an),Bq=-em,Cq=-an)),C.pendingMatrix!=
null?(C.context.transform(C.pendingMatrix.a,C.pendingMatrix.b,C.pendingMatrix.c,C.pendingMatrix.d,C.pendingMatrix.tx,C.pendingMatrix.ty),C.hitTesting||C.context.fill(C.windingRule),C.context.transform(C.inversePendingMatrix.a,C.inversePendingMatrix.b,C.inversePendingMatrix.c,C.inversePendingMatrix.d,C.inversePendingMatrix.tx,C.inversePendingMatrix.ty)):C.hitTesting||C.context.fill(C.windingRule),!C.hitTesting&&z&&C.fillScale9Bounds!=null&&C.bitmapFill!=null&&(C.context.translate(Bq,Cq),C.context.scale(Lh,
dm)),C.context.translate(C.bounds.x,C.bounds.y),C.context.closePath())}};C.render=function(a,b){var c=b.__pixelRatio;a.__owner.__scale9Grid==null||a.__owner.__isMask||a.__worldTransform.b!=0||a.__worldTransform.c!=0?(a.__bitmapScaleX=1,a.__bitmapScaleY=1):(a.__bitmapScaleX=a.__owner.get_scaleX(),a.__bitmapScaleY=a.__owner.get_scaleY());a.__update(b.__worldTransform,c);if(a.__softwareDirty){C.hitTesting=!1;C.graphics=a;C.allowSmoothing=b.__allowSmoothing;C.worldAlpha=b.__getAlpha(a.__owner.__worldAlpha);
C.bounds=a.__bounds;var d=a.__width,f=a.__height;if(!a.__visible||a.__commands.get_length()==0||C.bounds==null||d<1||f<1)a.__canvas=null,a.__context=null,a.__bitmap=null;else{a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"));C.context=a.__context;var g=a.__renderTransform,h=a.__canvas;c=b.__pixelRatio;var n=d*c|0,l=f*c|0;b.__setBlendModeContext(C.context,10);b.__isDOM?(h.width==n&&h.height==l?C.context.clearRect(0,0,n,l):(h.width=n,h.height=
l,h.style.width=d+"px",h.style.height=f+"px"),d=a.__renderTransform,C.context.setTransform(d.a*c,d.b*c,d.c*c,d.d*c,d.tx*c,d.ty*c)):(h.width==n&&h.height==l?(C.context.closePath(),C.context.setTransform(1,0,0,1,0,0),C.context.clearRect(0,0,n,l)):(h.width=d,h.height=f),C.context.setTransform(g.a,g.b,g.c,g.d,g.tx,g.ty));C.fillCommands.clear();C.strokeCommands.clear();C.hasFill=!1;C.hasStroke=!1;C.bitmapFill=null;c=C.bitmapRepeat=!1;f=d=0;C.windingRule="evenodd";g=new wj(a.__commands);h=0;for(n=a.__commands.types;h<
n.length;)switch(l=n[h],++h,l._hx_index){case 0:case 1:case 2:case 3:C.endFill();C.endStroke();if(l==xa.BEGIN_BITMAP_FILL){switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=
2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.BEGIN_BITMAP_FILL;l=g;C.fillCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);C.strokeCommands.beginBitmapFill(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1])}else if(l==xa.BEGIN_GRADIENT_FILL){switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.BEGIN_GRADIENT_FILL;l=g;C.fillCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos]);C.strokeCommands.beginGradientFill(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos])}else if(l==xa.BEGIN_SHADER_FILL){switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.BEGIN_SHADER_FILL;l=g;C.fillCommands.beginShaderFill(l.buffer.o[l.oPos]);C.strokeCommands.beginShaderFill(l.buffer.o[l.oPos])}else{switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=
5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.BEGIN_FILL;l=g;C.fillCommands.beginFill(l.buffer.i[l.iPos],l.buffer.f[l.fPos]);C.strokeCommands.beginFill(l.buffer.i[l.iPos],l.buffer.f[l.fPos])}break;case 4:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;
case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=
1;break;case 20:g.oPos+=1}g.prev=xa.CUBIC_CURVE_TO;l=g;C.fillCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+5]);c?C.strokeCommands.cubicCurveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.f[l.fPos+5]):(d=l.buffer.f[l.fPos+4],f=l.buffer.f[l.fPos+5]);break;case 5:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;
g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;
case 20:g.oPos+=1}g.prev=xa.CURVE_TO;l=g;C.fillCommands.curveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);c?C.strokeCommands.curveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]):(d=l.buffer.f[l.fPos+2],f=l.buffer.f[l.fPos+3]);break;case 6:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=
6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.DRAW_CIRCLE;l=g;C.fillCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+
1],l.buffer.f[l.fPos+2]);c&&C.strokeCommands.drawCircle(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2]);break;case 7:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=
2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.DRAW_ELLIPSE;l=g;C.fillCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);c&&C.strokeCommands.drawEllipse(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);break;case 8:switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.DRAW_QUADS;l=g;C.fillCommands.drawQuads(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2]);break;case 9:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=
1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.DRAW_RECT;l=g;C.fillCommands.drawRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3]);c&&C.strokeCommands.drawRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+
3]);break;case 10:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;
g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.DRAW_ROUND_RECT;l=g;C.fillCommands.drawRoundRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);c&&C.strokeCommands.drawRoundRect(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1],l.buffer.f[l.fPos+2],l.buffer.f[l.fPos+3],l.buffer.f[l.fPos+4],l.buffer.o[l.oPos]);break;case 12:switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.DRAW_TRIANGLES;l=g;C.fillCommands.drawTriangles(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3]);break;case 13:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=
4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.END_FILL;C.endFill();C.endStroke();C.hasFill=!1;C.bitmapFill=null;f=d=0;break;case 14:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=
4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.LINE_BITMAP_STYLE;
l=g;c||d==0&&f==0||(C.strokeCommands.moveTo(d,f),f=d=0);c=!0;C.strokeCommands.lineBitmapStyle(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.b[l.bPos],l.buffer.b[l.bPos+1]);break;case 15:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=
5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.LINE_GRADIENT_STYLE;l=g;c||d==0&&f==0||(C.strokeCommands.moveTo(d,f),f=d=0);c=!0;C.strokeCommands.lineGradientStyle(l.buffer.o[l.oPos],l.buffer.ii[l.iiPos],l.buffer.ff[l.ffPos],l.buffer.ii[l.iiPos+1],l.buffer.o[l.oPos+
1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos]);break;case 16:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=
2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.LINE_STYLE;l=g;c||l.buffer.o[l.oPos]==null||d==0&&f==0||(C.strokeCommands.moveTo(d,f),f=d=0);c=l.buffer.o[l.oPos]!=null;C.strokeCommands.lineStyle(l.buffer.o[l.oPos],l.buffer.i[l.iPos],l.buffer.f[l.fPos],l.buffer.b[l.bPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.f[l.fPos+1]);break;case 17:switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.LINE_TO;l=g;C.fillCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);c?C.strokeCommands.lineTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]):(d=l.buffer.f[l.fPos],f=l.buffer.f[l.fPos+1]);break;case 18:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=
4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.MOVE_TO;l=g;C.fillCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]);c?C.strokeCommands.moveTo(l.buffer.f[l.fPos],l.buffer.f[l.fPos+1]):(d=
l.buffer.f[l.fPos],f=l.buffer.f[l.fPos+1]);break;case 19:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=
1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.OVERRIDE_BLEND_MODE;l=g;b.__setBlendModeContext(C.context,l.buffer.o[l.oPos]);break;case 21:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=
4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=xa.WINDING_EVEN_ODD;C.fillCommands.windingEvenOdd();C.windingRule="evenodd";break;case 22:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;
case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=
1;break;case 20:g.oPos+=1}g.prev=xa.WINDING_NON_ZERO;C.fillCommands.windingNonZero();C.windingRule="nonzero";break;default:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=
2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=l}C.fillCommands.get_length()>0&&C.endFill();C.strokeCommands.get_length()>0&&C.endStroke();g.destroy();a.__bitmap==null?a.__bitmap=Dc.fromCanvas(a.__canvas):a.__bitmap.width!=a.__canvas.width||a.__bitmap.height!=a.__canvas.height?(b=a.__bitmap.__texture,b!=null&&b.dispose(),
a.__bitmap=Dc.fromCanvas(a.__canvas)):a.__bitmap.image.version++}a.__softwareDirty=!1;a.set___dirty(!1);C.graphics=null}};C.renderMask=function(a,b){if(a.__commands.get_length()!=0){C.context=b.context;b=new wj(a.__commands);var c=0;for(a=a.__commands.types;c<a.length;){var d=a[c];++c;switch(d._hx_index){case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;
case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.CUBIC_CURVE_TO;d=b;C.context.bezierCurveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-
0,d.buffer.f[d.fPos+2]-0,d.buffer.f[d.fPos+3]-0,d.buffer.f[d.fPos+4]-0,d.buffer.f[d.fPos+5]-0);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;
break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.CURVE_TO;d=b;C.context.quadraticCurveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2]-0,d.buffer.f[d.fPos+3]-0);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;
case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_CIRCLE;d=b;C.context.arc(d.buffer.f[d.fPos]-
0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2],0,Math.PI*2,!0);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_ELLIPSE;var f=b;d=f.buffer.f[f.fPos];var g=f.buffer.f[f.fPos+1];var h=f.buffer.f[f.fPos+2];var n=f.buffer.f[f.fPos+3];d-=0;g-=0;f=h/2*.5522848;var l=n/2*.5522848;var q=d+h;var u=g+n;h=d+h/2;n=g+n/2;C.context.moveTo(d,n);C.context.bezierCurveTo(d,n-l,h-f,g,h,g);C.context.bezierCurveTo(h+f,g,q,n-l,q,n);C.context.bezierCurveTo(q,
n+l,h+f,u,h,u);C.context.bezierCurveTo(h-f,u,d,n+l,d,n);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=
1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_RECT;d=b;C.context.beginPath();C.context.rect(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);C.context.closePath();break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=
1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.DRAW_ROUND_RECT;d=b;C.drawRoundRect(d.buffer.f[d.fPos]-
0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],d.buffer.o[d.oPos]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.LINE_TO;d=b;C.context.lineTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;
break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.MOVE_TO;d=b;C.context.moveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0);break;
default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;
b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=d}}b.destroy()}};C.setSmoothing=function(a){C.allowSmoothing||(a=!1);C.context.imageSmoothingEnabled!=a&&(C.context.imageSmoothingEnabled=a)};var pv=function(){this.scale9MinX=this.scale9MinY=this.scale9MaxX=this.scale9MaxY=this.unscaledMinX=this.unscaledMinY=this.unscaledMaxX=this.unscaledMaxY=null};t["openfl.display._internal._CanvasGraphics.Scale9GridBounds"]=pv;pv.__name__="openfl.display._internal._CanvasGraphics.Scale9GridBounds";
pv.prototype={scale9MinX:null,scale9MinY:null,scale9MaxX:null,scale9MaxY:null,unscaledMinX:null,unscaledMinY:null,unscaledMaxX:null,unscaledMaxY:null,getScaleX:function(){if(this.scale9MaxX==null||this.unscaledMaxX==null)return 1;var a=this.unscaledMaxX-this.unscaledMinX;return a==0?1:(this.scale9MaxX-this.scale9MinX)/a},getScaleY:function(){if(this.scale9MaxY==null||this.unscaledMaxY==null)return 1;var a=this.unscaledMaxY-this.unscaledMinY;return a==0?1:(this.scale9MaxY-this.scale9MinY)/a},clear:function(){this.scale9MaxY=
this.scale9MinY=this.scale9MaxX=this.scale9MinX=this.unscaledMaxY=this.unscaledMinY=this.unscaledMaxX=this.unscaledMinX=null},applyUnscaledX:function(a){if(this.unscaledMinX==null||this.unscaledMinX>a)this.unscaledMinX=a;if(this.unscaledMaxX==null||this.unscaledMaxX<a)this.unscaledMaxX=a},applyUnscaledY:function(a){if(this.unscaledMinY==null||this.unscaledMinY>a)this.unscaledMinY=a;if(this.unscaledMaxY==null||this.unscaledMaxY<a)this.unscaledMaxY=a},applyScaledX:function(a){if(this.scale9MinX==null||
this.scale9MinX>a)this.scale9MinX=a;if(this.scale9MaxX==null||this.scale9MaxX<a)this.scale9MaxX=a},applyScaledY:function(a){if(this.scale9MinY==null||this.scale9MinY>a)this.scale9MinY=a;if(this.scale9MaxY==null||this.scale9MaxY<a)this.scale9MaxY=a},__class__:pv};var xz=function(){};t["openfl.display._internal.CanvasShape"]=xz;xz.__name__="openfl.display._internal.CanvasShape";xz.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){var d=a.__graphics;if(d!=null){C.render(d,
b);var f=d.__width,g=d.__height,h=d.__canvas;if(h!=null&&d.__visible&&f>=1&&g>=1){var n=d.__worldTransform,l=b.context,q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),l.globalAlpha=c,c=gb.__pool.get(),c.scale(1/d.__bitmapScaleX,1/d.__bitmapScaleY),c.concat(n),b.setTransform(c,l),l.drawImage(h,0,0,f,g),gb.__pool.release(c),b.__popMaskObject(a)}}}}};var Ou=function(){};t["openfl.display._internal.CanvasSimpleButton"]=Ou;Ou.__name__="openfl.display._internal.CanvasSimpleButton";
Ou.renderDrawable=function(a,b){!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};Ou.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var oa=function(){};t["openfl.display._internal.CanvasTextField"]=oa;oa.__name__="openfl.display._internal.CanvasTextField";oa.render=function(a,b,c){var d=a.__textEngine,f=!(d.background||d.border),g=f?d.textBounds:d.bounds;c=a.__graphics;
var h=0;if(a.__dirty){a.__updateLayout();c.__bounds==null&&(c.__bounds=new Ia);if(a.get_text().length==0){h=d.bounds.width-4;var n=a.get_defaultTextFormat().align;h=n==3?0:n==4?h:h/2;switch(n){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;
case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}f&&(g.y=d.bounds.y,g.x=h)}c.__bounds.copyFrom(g)}n=b.__pixelRatio;if(c.__bitmapScaleX!=n||c.__bitmapScaleY!=n)c.__softwareDirty=!0;c.__update(b.__worldTransform,n);if(a.__dirty||c.__softwareDirty){var l=Math.round(c.__width*n),q=Math.round(c.__height*n);if(!(d.text!=null&&d.text!=""||d.background||d.border||d.__hasFocus||
d.type==1&&d.selectable)||(d.width<=0||d.height<=0)&&d.autoSize!=2)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));oa.context=c.__context;c.__canvas.width=l;c.__canvas.height=q;b.__isDOM&&(c.__canvas.style.width=Math.round(l/n)+"px",
c.__canvas.style.height=Math.round(q/n)+"px");l=gb.__pool.get();l.scale(n,n);l.concat(c.__renderTransform);oa.context.setTransform(l.a,l.b,l.c,l.d,l.tx,l.ty);gb.__pool.release(l);oa.clearRect==null&&(oa.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");oa.clearRect&&oa.context.clearRect(0,0,c.__canvas.width,c.__canvas.height);if(d.text!=null&&d.text!=""||d.__hasFocus){f=d.text;c.__context.imageSmoothingEnabled=!b.__allowSmoothing||d.antiAliasType==0&&d.sharpness==
400?!1:!0;if(d.border||d.background){oa.context.rect(.5,.5,g.width-1,g.height-1);if(d.background){var u=N.hex(d.backgroundColor&16777215,6);oa.context.fillStyle="#"+u;oa.context.fill()}d.border&&(oa.context.lineWidth=1,u=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+u,oa.context.stroke())}oa.context.textBaseline="alphabetic";oa.context.textAlign="start";b=-a.get_scrollH();var v=h=0;for(u=a.get_scrollV()-1;v<u;){var z=v++;h-=d.lineHeights.get(z)}var r;for(l=d.layoutGroups.iterator();l.hasNext();)if(q=
l.next(),!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>d.get_bottomScrollV()-1)break;var F="#"+N.hex(q.format.color&16777215,6);oa.context.font=Wc.getFont(q.format);oa.context.fillStyle=F;oa.context.fillText(f.substring(q.startIndex,q.endIndex),q.offsetX+b-g.x,q.offsetY+q.ascent+h-g.y);if(a.__caretIndex>-1&&d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex){v=r=0;for(u=a.__caretIndex-q.startIndex;v<u;){z=v++;if(q.positions.length<=
z)break;r+=q.positions[z]}v=0;u=a.get_scrollV();for(z=q.lineIndex+1;u<z;){var J=u++;v+=d.lineHeights.get(J-1)}oa.context.beginPath();u=N.hex(q.format.color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(q.offsetX+r-a.get_scrollH()-g.x,v+2-g.y);oa.context.lineWidth=1;oa.context.lineTo(q.offsetX+r-a.get_scrollH()-g.x,v+Wc.getFormatHeight(a.get_defaultTextFormat())-1-g.y);oa.context.stroke();oa.context.closePath()}}else if(q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex||q.startIndex<=
a.__selectionIndex&&q.endIndex>=a.__selectionIndex||q.startIndex>a.__caretIndex&&q.endIndex<a.__selectionIndex||q.startIndex>a.__selectionIndex&&q.endIndex<a.__caretIndex)r=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>r&&(r=q.startIndex),q.endIndex<v&&(v=q.endIndex),z=a.getCharBoundaries(r),v>=q.endIndex?(u=a.getCharBoundaries(q.endIndex-1),u!=null&&(u.x+=u.width+2)):u=a.getCharBoundaries(v),z!=null&&u!=null&&(oa.context.fillStyle="#000000",
oa.context.fillRect(z.x+b-g.x,z.y+h,u.x-z.x,q.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(f.substring(r,v),b+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=F,oa.context.lineWidth=1,r=q.offsetX+b-g.x,v=Math.ceil(q.offsetY+h+q.ascent-g.y)+Math.floor(q.ascent*.185)+.5,oa.context.moveTo(r,v),oa.context.lineTo(r+q.width,v),oa.context.stroke(),oa.context.closePath());q.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=
F,oa.context.lineWidth=1,F=q.offsetX+b-g.x,r=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),oa.context.moveTo(F,r),oa.context.lineTo(F+q.width,r),oa.context.stroke(),oa.context.closePath())}}else{if(d.border||d.background)d.border?oa.context.rect(.5,.5,g.width-1,g.height-1):oa.context.rect(0,0,g.width,g.height),d.background&&(u=N.hex(d.backgroundColor&16777215,6),oa.context.fillStyle="#"+u,oa.context.fill()),d.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",u=N.hex(d.borderColor&16777215,6),
oa.context.strokeStyle="#"+u,oa.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){b=-a.get_scrollH()+(f?0:h);v=h=0;for(u=a.get_scrollV()-1;v<u;)z=v++,h+=d.lineHeights.get(z);oa.context.beginPath();u=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(b+2.5,h+2.5);oa.context.lineWidth=1;oa.context.lineTo(b+2.5,h+Wc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}c.__bitmap==null?c.__bitmap=Dc.fromCanvas(c.__canvas):
c.__bitmap.width!=c.__canvas.width||c.__bitmap.height!=c.__canvas.height?(d=c.__bitmap.__texture,d!=null&&d.dispose(),c.__bitmap=Dc.fromCanvas(c.__canvas)):c.__bitmap.image.version++;c.__bitmapScaleX=n;c.__bitmapScaleY=n;c.__visible=!0;a.__dirty=!1;c.__softwareDirty=!1;c.set___dirty(!1)}}};oa.renderDrawable=function(a,b){b.__isDOM&&!a.__renderedOnCanvasWhileOnDOM&&(a.__renderedOnCanvasWhileOnDOM=!0,a.get_type()==1&&a.replaceText(0,a.__text.length,a.__text),a.__isHTML&&a.__updateText(jc.parse(a.__text,
a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges)),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));if(a.get_mask()==null||a.get_mask().get_width()>0&&a.get_mask().get_height()>0)if(b.__updateCacheBitmap(a,a.__dirty),a.__cacheBitmap==null||a.__isCacheBitmapRender){var c=a.__textEngine,d=!(c.background||c.border),f=d?c.textBounds:c.bounds,g=a.__graphics,h=0;if(a.__dirty){a.__updateLayout();g.__bounds==null&&(g.__bounds=
new Ia);if(a.get_text().length==0){var n=c.bounds.width-4;var l=a.get_defaultTextFormat().align;h=l==3?0:l==4?n:n/2;switch(l){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;
h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}d&&(f.y=c.bounds.y,f.x=h)}g.__bounds.copyFrom(f)}l=b.__pixelRatio;if(g.__bitmapScaleX!=l||g.__bitmapScaleY!=l)g.__softwareDirty=!0;g.__update(b.__worldTransform,l);if(a.__dirty||g.__softwareDirty){n=Math.round(g.__width*l);var q=Math.round(g.__height*l);if(!(c.text!=null&&c.text!=""||c.background||c.border||c.__hasFocus||c.type==1&&c.selectable)||(c.width<=0||c.height<=0)&&c.autoSize!=2)a.__graphics.__canvas=
null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));oa.context=g.__context;g.__canvas.width=n;g.__canvas.height=q;b.__isDOM&&(g.__canvas.style.width=Math.round(n/l)+"px",g.__canvas.style.height=Math.round(q/l)+"px");n=gb.__pool.get();n.scale(l,l);n.concat(g.__renderTransform);
oa.context.setTransform(n.a,n.b,n.c,n.d,n.tx,n.ty);gb.__pool.release(n);oa.clearRect==null&&(oa.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");oa.clearRect&&oa.context.clearRect(0,0,g.__canvas.width,g.__canvas.height);if(c.text!=null&&c.text!=""||c.__hasFocus){n=c.text;g.__context.imageSmoothingEnabled=!b.__allowSmoothing||c.antiAliasType==0&&c.sharpness==400?!1:!0;if(c.border||c.background){oa.context.rect(.5,.5,f.width-1,f.height-1);if(c.background){var u=N.hex(c.backgroundColor&
16777215,6);oa.context.fillStyle="#"+u;oa.context.fill()}c.border&&(oa.context.lineWidth=1,u=N.hex(c.borderColor&16777215,6),oa.context.strokeStyle="#"+u,oa.context.stroke())}oa.context.textBaseline="alphabetic";oa.context.textAlign="start";q=-a.get_scrollH();var v=d=0;for(u=a.get_scrollV()-1;v<u;){var z=v++;d-=c.lineHeights.get(z)}var r;for(h=c.layoutGroups.iterator();h.hasNext();){var F=h.next();if(!(F.lineIndex<a.get_scrollV()-1)){if(F.lineIndex>c.get_bottomScrollV()-1)break;var J="#"+N.hex(F.format.color&
16777215,6);oa.context.font=Wc.getFont(F.format);oa.context.fillStyle=J;oa.context.fillText(n.substring(F.startIndex,F.endIndex),F.offsetX+q-f.x,F.offsetY+F.ascent+d-f.y);if(a.__caretIndex>-1&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&F.startIndex<=a.__caretIndex&&F.endIndex>=a.__caretIndex){v=r=0;for(u=a.__caretIndex-F.startIndex;v<u;){z=v++;if(F.positions.length<=z)break;r+=F.positions[z]}v=0;u=a.get_scrollV();for(z=F.lineIndex+1;u<z;){var L=u++;v+=c.lineHeights.get(L-
1)}oa.context.beginPath();u=N.hex(F.format.color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(F.offsetX+r-a.get_scrollH()-f.x,v+2-f.y);oa.context.lineWidth=1;oa.context.lineTo(F.offsetX+r-a.get_scrollH()-f.x,v+Wc.getFormatHeight(a.get_defaultTextFormat())-1-f.y);oa.context.stroke();oa.context.closePath()}}else if(F.startIndex<=a.__caretIndex&&F.endIndex>=a.__caretIndex||F.startIndex<=a.__selectionIndex&&F.endIndex>=a.__selectionIndex||F.startIndex>a.__caretIndex&&F.endIndex<a.__selectionIndex||
F.startIndex>a.__selectionIndex&&F.endIndex<a.__caretIndex)r=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,F.startIndex>r&&(r=F.startIndex),F.endIndex<v&&(v=F.endIndex),z=a.getCharBoundaries(r),v>=F.endIndex?(u=a.getCharBoundaries(F.endIndex-1),u!=null&&(u.x+=u.width+2)):u=a.getCharBoundaries(v),z!=null&&u!=null&&(oa.context.fillStyle="#000000",oa.context.fillRect(z.x+q-f.x,z.y+d,u.x-z.x,F.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(n.substring(r,
v),q+z.x-f.x,F.offsetY+F.ascent+d));F.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=J,oa.context.lineWidth=1,r=F.offsetX+q-f.x,v=Math.ceil(F.offsetY+d+F.ascent-f.y)+Math.floor(F.ascent*.185)+.5,oa.context.moveTo(r,v),oa.context.lineTo(r+F.width,v),oa.context.stroke(),oa.context.closePath());F.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=J,oa.context.lineWidth=1,J=F.offsetX+q-f.x,r=Math.ceil(F.offsetY+d+2*F.ascent/3-f.y),oa.context.moveTo(J,r),oa.context.lineTo(J+
F.width,r),oa.context.stroke(),oa.context.closePath())}}}else{if(c.border||c.background)c.border?oa.context.rect(.5,.5,f.width-1,f.height-1):oa.context.rect(0,0,f.width,f.height),c.background&&(u=N.hex(c.backgroundColor&16777215,6),oa.context.fillStyle="#"+u,oa.context.fill()),c.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",u=N.hex(c.borderColor&16777215,6),oa.context.strokeStyle="#"+u,oa.context.stroke());if(a.__caretIndex>-1&&c.selectable&&a.__showCursor){q=-a.get_scrollH()+(d?0:h);
v=d=0;for(u=a.get_scrollV()-1;v<u;)z=v++,d+=c.lineHeights.get(z);oa.context.beginPath();u=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(q+2.5,d+2.5);oa.context.lineWidth=1;oa.context.lineTo(q+2.5,d+Wc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}g.__bitmap==null?g.__bitmap=Dc.fromCanvas(g.__canvas):g.__bitmap.width!=g.__canvas.width||g.__bitmap.height!=g.__canvas.height?(c=g.__bitmap.__texture,c!=null&&
c.dispose(),g.__bitmap=Dc.fromCanvas(g.__canvas)):g.__bitmap.image.version++;g.__bitmapScaleX=l;g.__bitmapScaleY=l;g.__visible=!0;a.__dirty=!1;g.__softwareDirty=!1;g.set___dirty(!1)}}f=!1;a.__textEngine.antiAliasType==0&&a.__textEngine.gridFitType==1&&(f=b.context.imageSmoothingEnabled)&&(b.context.imageSmoothingEnabled=!1);a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||(h=b.__getAlpha(a.__worldAlpha),h<=0||(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>
0&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c=b.context,b.setTransform(a.__renderTransform,c),J=a.opaqueBackground,c.fillStyle="rgb("+(J>>>16&255)+","+(J>>>8&255)+","+(J&255)+")",c.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),a.__graphics==null||!a.__renderable||(h=b.__getAlpha(a.__worldAlpha),h<=0||(g=a.__graphics,!(g!=null&&(C.render(g,b),n=g.__width,q=g.__height,d=g.__canvas,d!=null&&g.__visible&&n>=1&&q>=1&&(l=g.__worldTransform,c=b.context,F=a.__scrollRect,
F==null||F.width>0&&F.height>0)))))))||(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c.globalAlpha=h,h=gb.__pool.get(),h.scale(1/g.__bitmapScaleX,1/g.__bitmapScaleY),h.concat(l),b.setTransform(h,c),c.drawImage(d,0,0,n,q),gb.__pool.release(h),b.__popMaskObject(a));f&&(b.context.imageSmoothingEnabled=!0)}else a=a.__cacheBitmap,a.__renderable&&(h=b.__getAlpha(a.__worldAlpha),h>0&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(c=b.context,b.__setBlendMode(a.__worldBlendMode),
b.__pushMaskObject(a,!1),yb.convertToCanvas(a.__bitmapData.image),c.globalAlpha=h,F=a.__scrollRect,b.setTransform(a.__renderTransform,c),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!1),F==null?c.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):c.drawImage(a.__bitmapData.image.get_src(),F.x,F.y,F.width,F.height,F.x,F.y,F.width,F.height),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))};oa.renderDrawableMask=
function(a,b){Wl.renderDrawableMask(a,b)};var vj=function(){};t["openfl.display._internal.CanvasTilemap"]=vj;vj.__name__="openfl.display._internal.CanvasTilemap";vj.render=function(a,b){if(a.__renderable&&a.__group.__tiles.length!=0){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var f=Ia.__pool.get();f.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(f,a.__renderTransform);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=
!1);vj.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,f);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(f)}}};vj.renderTileContainer=function(a,b,c,d,f,g,h,n,l,q,u,v){var z=b.context,r=b.__roundPixels,F=gb.__pool.get(),J=a.__tiles,L,Q=null,W=0;for(a=a.__length;W<a;){var ka=W++;var ha=J[ka];F.setTo(1,0,0,1,
-ha.get_originX(),-ha.get_originY());F.concat(ha.get_matrix());F.concat(c);r&&(F.tx=Math.round(F.tx),F.ty=Math.round(F.ty));var ta=ha.get_tileset()!=null?ha.get_tileset():d;ka=ha.get_alpha()*h;if((L=ha.get_visible())&&!(ka<=0))if(g||(ka=1),n&&(Q=ha.__blendMode!=null?ha.__blendMode:l),ha.__length>0)vj.renderTileContainer(ha,b,F,ta,f,g,ka,n,Q,q,u,v);else if(ta!=null){L=ha.get_id();if(L==-1){if(ha=ha.__rect,ha==null||ha.width<=0||ha.height<=0)continue}else{ha=ta.__data[L];if(ha==null)continue;v.setTo(ha.x,
ha.y,ha.width,ha.height);ha=v}ta=ta.__bitmapData;ta!=null&&ta.image!=null&&(ta!=q&&(ta.image.buffer.__srcImage==null&&yb.convertToCanvas(ta.image),u=ta.image.get_src(),q=ta),z.globalAlpha=ka,n&&b.__setBlendMode(Q),b.setTransform(F,z),z.drawImage(u,ha.x,ha.y,ha.width,ha.height,0,0,ha.width,ha.height))}}gb.__pool.release(F)};vj.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||
(n=b.__getAlpha(a.__worldAlpha),n<=0||(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),l=b.context,b.setTransform(a.__renderTransform,l),n=a.opaqueBackground,l.fillStyle="rgb("+(n>>>16&255)+","+(n>>>8&255)+","+(n&255)+")",l.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),a.__graphics==null||!a.__renderable||(n=b.__getAlpha(a.__worldAlpha),n<=0))))){var c=a.__graphics;if(c!=null){C.render(c,
b);var d=c.__width,f=c.__height,g=c.__canvas;if(g!=null&&c.__visible&&d>=1&&f>=1){var h=c.__worldTransform;l=b.context;q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),l.globalAlpha=n,n=gb.__pool.get(),n.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),n.concat(h),b.setTransform(n,l),l.drawImage(g,0,0,d,f),gb.__pool.release(n),b.__popMaskObject(a)}}}a.__renderable&&a.__group.__tiles.length!=0&&(n=b.__getAlpha(a.__worldAlpha),n<=0||(l=b.context,
b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c=Ia.__pool.get(),c.setTo(0,0,a.__width,a.__height),b.__pushMaskRect(c,a.__renderTransform),b.__allowSmoothing&&a.smoothing||(l.imageSmoothingEnabled=!1),vj.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,n,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,c),b.__allowSmoothing&&a.smoothing||(l.imageSmoothingEnabled=!0),b.__popMaskRect(),b.__popMaskObject(a),Ia.__pool.release(c)))}else if(c=
a.__cacheBitmap,c.__renderable){var n=b.__getAlpha(c.__worldAlpha);if(n>0&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var l=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);yb.convertToCanvas(c.__bitmapData.image);l.globalAlpha=n;var q=c.__scrollRect;b.setTransform(c.__renderTransform,l);b.__allowSmoothing&&c.smoothing||(l.imageSmoothingEnabled=!1);q==null?l.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):
l.drawImage(c.__bitmapData.image.get_src(),q.x,q.y,q.width,q.height,q.x,q.y,q.width,q.height);b.__allowSmoothing&&c.smoothing||(l.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};vj.renderDrawableMask=function(a,b){};var Sm=function(){};t["openfl.display._internal.CanvasVideo"]=Sm;Sm.__name__="openfl.display._internal.CanvasVideo";Sm.render=function(a,b){if(a.__renderable&&a.__stream!=null){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){var d=b.context;if(a.__stream.__video!=
null){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);d.globalAlpha=c;c=a.__scrollRect;var f=a.smoothing;b.setTransform(a.__worldTransform,d);f||(d.imageSmoothingEnabled=!1);c==null?d.drawImage(a.__stream.__video,0,0,a.get_width(),a.get_height()):d.drawImage(a.__stream.__video,c.x,c.y,c.width,c.height,c.x,c.y,c.width,c.height);f||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a)}}}};Sm.renderDrawable=function(a,b){Sm.render(a,b);b.__renderEvent(a)};Sm.renderDrawableMask=function(a,b){};
var Vi=function(){};t["openfl.display._internal.Context3DBitmap"]=Vi;Vi.__name__="openfl.display._internal.Context3DBitmap";Vi.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)&&a.__bitmapData!=null&&a.__bitmapData.__isValid){var c=b.__context3D;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=b.__initDisplayShader(a.__worldShader);b.setShader(d);b.applyBitmapData(a.__bitmapData,b.__allowSmoothing&&(a.smoothing||b.__upscaled));b.applyMatrix(b.__getMatrix(a.__renderTransform,
a.pixelSnapping));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);b.updateShader();var f=a.__bitmapData.getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);d=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(d);b.__clearShader();b.__popMaskObject(a)}};Vi.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);a.__bitmapData!=null&&a.__bitmapData.image!=null&&(a.__imageVersion=
a.__bitmapData.image.version);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ia.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/
255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(d)}a.__graphics!=null&&Dj.render(a,b)}Vi.render(a,b)}else Vi.render(a.__cacheBitmap,b);b.__renderEvent(a)};Vi.renderDrawableMask=function(a,b){Vi.renderMask(a,b)};Vi.renderMask=function(a,b){if(a.__bitmapData!=null&&a.__bitmapData.__isValid){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(Tm.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,a.pixelSnapping));b.updateShader();
var f=a.__bitmapData.getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var fv=function(){};t["openfl.display._internal.Context3DBitmapData"]=fv;fv.__name__="openfl.display._internal.Context3DBitmapData";fv.renderDrawable=function(a,b){var c=b.__context3D;b.__setBlendMode(10);var d=b.__defaultDisplayShader;b.setShader(d);
b.applyBitmapData(a,b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);b.updateShader();var f=a.getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};fv.renderDrawableMask=function(a,b){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(a,
b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.updateShader();var f=a.getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};var gm=function(a,b,c,d){this.context3D=a;this.elementType=b;this.dataPerVertex=d;this.vertexCount=this.indexCount=0;this.resize(c)};t["openfl.display._internal.Context3DBuffer"]=gm;gm.__name__=
"openfl.display._internal.Context3DBuffer";gm.prototype={dataPerVertex:null,elementCount:null,elementType:null,indexBufferData:null,indexBuffers:null,indexCount:null,vertexBuffer:null,vertexBufferData:null,vertexCount:null,context3D:null,drawElements:function(a,b){b==null&&(b=-1);if(this.indexCount!=0&&this.vertexCount!=0&&this.elementType._hx_index==0)if(b==-1&&(b=this.elementCount*2),a<10922&&b-a<10922)this.context3D.drawTriangles(this.indexBuffers[0],a,b*2);else for(var c=a+b;a<c;){var d=Math.floor(a/
10922);b=Math.min(c-a,10922)|0;if(b<=0)break;this.context3D.drawTriangles(this.indexBuffers[d],(a-d*10922)*3,b*2);a+=b}},flushVertexBufferData:function(){this.vertexBufferData.length>this.vertexCount&&(this.vertexCount=this.vertexBufferData.length,this.vertexBuffer=this.context3D.createVertexBuffer(this.vertexCount,this.dataPerVertex,0));this.vertexBuffer.uploadFromTypedArray(el.toArrayBufferView(this.vertexBufferData))},resize:function(a,b){b==null&&(b=-1);this.elementCount=a;b==-1&&(b=this.dataPerVertex);
b!=this.dataPerVertex&&(this.vertexBuffer=null,this.vertexCount=0,this.dataPerVertex=b);var c=0;switch(this.elementType._hx_index){case 0:c=a*4;break;case 1:c=a*3;break;case 2:c=a*3}b*=c;if(this.vertexBufferData==null){var d=c=null,f=null,g=null,h=null;this.vertexBufferData=b=b!=null?new Float32Array(b):c!=null?new Float32Array(c):d!=null?new Float32Array(d.__array):f!=null?new Float32Array(f):g!=null?h==null?new Float32Array(g,0):new Float32Array(g,0,h):null}else b>this.vertexBufferData.length&&
(a=this.vertexBufferData,h=g=f=d=c=null,this.vertexBufferData=b=b!=null?new Float32Array(b):c!=null?new Float32Array(c):d!=null?new Float32Array(d.__array):f!=null?new Float32Array(f):g!=null?h==null?new Float32Array(g,0):new Float32Array(g,0,h):null,this.vertexBufferData.set(a))},__class__:gm};var uv=R["openfl.display._internal.Context3DElementType"]={__ename__:"openfl.display._internal.Context3DElementType",__constructs__:null,QUADS:{_hx_name:"QUADS",_hx_index:0,__enum__:"openfl.display._internal.Context3DElementType",
toString:E},TRIANGLES:{_hx_name:"TRIANGLES",_hx_index:1,__enum__:"openfl.display._internal.Context3DElementType",toString:E},TRIANGLE_INDICES:{_hx_name:"TRIANGLE_INDICES",_hx_index:2,__enum__:"openfl.display._internal.Context3DElementType",toString:E}};uv.__constructs__=[uv.QUADS,uv.TRIANGLES,uv.TRIANGLE_INDICES];var kl=function(){};t["openfl.display._internal.Context3DDisplayObject"]=kl;kl.__name__="openfl.display._internal.Context3DDisplayObject";kl.render=function(a,b){if(!(a.opaqueBackground==
null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ia.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(d)}a.__graphics!=null&&
Dj.render(a,b)}};kl.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap!=null&&!a.__isCacheBitmapRender)Vi.render(a.__cacheBitmap,b);else if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ia.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);
var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(d)}a.__graphics!=null&&Dj.render(a,b)}b.__renderEvent(a)};kl.renderDrawableMask=function(a,b){a.__graphics!=null&&Dj.renderMask(a,b)};kl.renderMask=function(a,b){if(a.opaqueBackground!=null||a.__graphics!=null)a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height(),a.__graphics!=null&&Dj.renderMask(a,b)};var gv=function(){};
t["openfl.display._internal.Context3DDisplayObjectContainer"]=gv;gv.__name__="openfl.display._internal.Context3DDisplayObjectContainer";gv.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);if(a.__renderable&&!(a.__worldAlpha<=0)&&(kl.renderDrawable(a,b),a.__cacheBitmap==null||a.__isCacheBitmapRender)){if(a.__children.length>0)if(b.__pushMaskObject(a),b.__stage!=null){c=0;for(d=a.__children;c<
d.length;){var f=d[c];++c;b.__renderDrawable(f);f.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);a.__children.length>0&&b.__popMaskObject(a)}};gv.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);a.__graphics!=null&&Dj.renderMask(a,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var Ha=function(){};
t["openfl.display._internal.Context3DGraphics"]=Ha;Ha.__name__="openfl.display._internal.Context3DGraphics";Ha.buildBuffer=function(a,b){var c=0,d=0,f=0,g=a.__bounds,h=new wj(a.__commands),n=b.__context3D,l=Ia.__pool.get(),q=gb.__pool.get(),u=null,v=a.__owner.__scale9Grid,z=v!=null&&!a.__owner.__isMask&&a.__worldTransform.b==0&&a.__worldTransform.c==0;z||(v=null);for(var r=0,F=a.__commands.types;r<F.length;){var J=F[r];++r;switch(J._hx_index){case 0:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=
2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;
break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.BEGIN_BITMAP_FILL;var L=h;u=L.buffer.o[L.oPos];break;case 1:u=null;switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=
2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=J;break;case 2:u=null;switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;
break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=J;break;case 3:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=
1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.BEGIN_SHADER_FILL;var Q=h,W=Q.buffer.o[Q.oPos];
u=null;if(W!=null)for(var ka=0,ha=W.inputCount;ka<ha;){var ta=ka++;if(W.inputRefs[ta].name=="bitmap"){u=W.inputs[ta];break}}break;case 6:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;
case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.DRAW_CIRCLE;var za=h,eb=za.buffer.f[za.fPos],db=za.buffer.f[za.fPos+1],Ra=za.buffer.f[za.fPos+2],vb=a.__owner.get_scaleX(),bb=a.__owner.get_scaleY();en.buildEllipseVerticesAndIndices(eb-Ra,db-Ra,Ra,Ra,vb,bb,Ha.tempVerticesVector,Ha.tempIndicesVector);var Tb=
Ha.tempVerticesVector,Eb=Ha.tempIndicesVector,Lb=null;if(z){Ha.tempScale9VerticesVector==null?Ha.tempScale9VerticesVector=tb.toFloatVector(null,Tb.get_length()):Ha.tempScale9VerticesVector.set_length(Tb.get_length());for(var vc=0,zd=Tb.get_length(),Qb=!0;vc<zd;)Qb?Ha.tempScale9VerticesVector.set(vc,Ha.toScale9Position(Tb.get(vc),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ha.tempScale9VerticesVector.set(vc,Ha.toScale9Position(Tb.get(vc),v.y,v.height,g.height,a.__owner.get_scaleY())/
a.__owner.get_scaleY()),++vc,Qb=!Qb;Tb=Ha.tempScale9VerticesVector}u!=null&&Lb==null&&(Lb=Ha.tempUvtVector,Ha.populateUvtVector(Tb,u,Lb));var wd=Eb!=null,Ae=Math.floor(Tb.get_length()/2),bg=wd?Eb.get_length():Ae,Df=Lb!=null,Sg=Df&&Lb.get_length()>=Ae*3,Nf=Sg?4:2,he=Sg?3:2,ie=Nf+2,ml=Sg?f:d;Ha.resizeVertexBuffer(a,Sg,ml+bg*ie);for(var td=Sg?a.__vertexBufferDataUVT:a.__vertexBufferData,ne,Mc,xk,Zc,jd=0,Zd=bg;jd<Zd;){var Nc=jd++;ne=ml+Nc*ie;Mc=wd?Eb.get(Nc)*2:Nc*2;xk=wd?Eb.get(Nc)*he:Nc*he;Sg?(Zc=Lb.get(xk+
2),td[ne]=Tb.get(Mc)/Zc,td[ne+1]=Tb.get(Mc+1)/Zc,td[ne+2]=0,td[ne+3]=1/Zc):(td[ne]=Tb.get(Mc),td[ne+1]=Tb.get(Mc+1));td[ne+Nf]=Df?Lb.get(xk):0;td[ne+Nf+1]=Df?Lb.get(xk+1):0}Sg?f+=bg*ie:d+=bg*ie;break;case 7:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=
4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.DRAW_ELLIPSE;var Ud=h,kf=Ud.buffer.f[Ud.fPos],hg=Ud.buffer.f[Ud.fPos+1],Tg=Ud.buffer.f[Ud.fPos+2]/2,rf=Ud.buffer.f[Ud.fPos+3]/2,yk=a.__owner.get_scaleX(),zk=a.__owner.get_scaleY();en.buildEllipseVerticesAndIndices(kf,
hg,Tg,rf,yk,zk,Ha.tempVerticesVector,Ha.tempIndicesVector);var bf=Ha.tempVerticesVector,ig=Ha.tempIndicesVector,od=null;if(z){Ha.tempScale9VerticesVector==null?Ha.tempScale9VerticesVector=tb.toFloatVector(null,bf.get_length()):Ha.tempScale9VerticesVector.set_length(bf.get_length());for(var mh=0,Zl=bf.get_length(),nl=!0;mh<Zl;)nl?Ha.tempScale9VerticesVector.set(mh,Ha.toScale9Position(bf.get(mh),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ha.tempScale9VerticesVector.set(mh,Ha.toScale9Position(bf.get(mh),
v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++mh,nl=!nl;bf=Ha.tempScale9VerticesVector}u!=null&&od==null&&(od=Ha.tempUvtVector,Ha.populateUvtVector(bf,u,od));var xo=ig!=null,Ak=Math.floor(bf.get_length()/2),ci=xo?ig.get_length():Ak,ol=od!=null,ue=ol&&od.get_length()>=Ak*3,pl=ue?4:2,$l=ue?3:2,Re=pl+2,Yj=ue?f:d;Ha.resizeVertexBuffer(a,ue,Yj+ci*Re);for(var Ge=ue?a.__vertexBufferDataUVT:a.__vertexBufferData,He,am,bm,Zm,Bk=0,Di=ci;Bk<Di;){var Of=Bk++;He=Yj+Of*Re;am=xo?ig.get(Of)*
2:Of*2;bm=xo?ig.get(Of)*$l:Of*$l;ue?(Zm=od.get(bm+2),Ge[He]=bf.get(am)/Zm,Ge[He+1]=bf.get(am+1)/Zm,Ge[He+2]=0,Ge[He+3]=1/Zm):(Ge[He]=bf.get(am),Ge[He+1]=bf.get(am+1));Ge[He+pl]=ol?od.get(bm):0;Ge[He+pl+1]=ol?od.get(bm+1):0}ue?f+=ci*Re:d+=ci*Re;break;case 8:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=
4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.DRAW_QUADS;var fc=h,ql=fc.buffer.o[fc.oPos],Ck=fc.buffer.o[fc.oPos+1],ug=fc.buffer.o[fc.oPos+2],rl=Ck!=null,$m=!1,Zj=!1,Ug=rl?Ck.get_length():Math.floor(ql.get_length()/
4);if(Ug==0)return;ug!=null&&(ug.get_length()>=Ug*6?Zj=$m=!0:ug.get_length()>=Ug*4?$m=!0:ug.get_length()>=Ug*2&&(Zj=!0));a.__quadBuffer==null?a.__quadBuffer=new gm(n,uv.QUADS,Ug,4):a.__quadBuffer.resize(c+Ug,4);var vg=a.__quadBuffer.vertexBufferData,yo=1,lf=1;u!=null&&(yo=u.width,lf=u.height);for(var sl=0,vq=Ug;sl<vq;){var tl=sl++;var Eg=(c+tl)*16;var Dk=rl?Ck.get(tl)*4:tl*4;if(!(Dk<0)){l.setTo(ql.get(Dk),ql.get(Dk+1),ql.get(Dk+2),ql.get(Dk+3));var Fg=l.width;var di=l.height;if(!(Fg<=0||di<=0)){if($m&&
Zj){var $d=tl*6;q.setTo(ug.get($d),ug.get($d+1),ug.get($d+2),ug.get($d+3),ug.get($d+4),ug.get($d+5))}else $m?($d=tl*4,q.setTo(ug.get($d),ug.get($d+1),ug.get($d+2),ug.get($d+3),l.x,l.y)):Zj?($d=tl*2,q.tx=ug.get($d),q.ty=ug.get($d+1)):(q.tx=l.x,q.ty=l.y);var Xi=l.x/yo;var Ih=l.y/lf;var Jh=l.get_right()/yo;var Ek=l.get_bottom()/lf;var qv=0*q.a+0*q.c+q.tx;var wq=0*q.b+0*q.d+q.ty;var rv=Fg*q.a+0*q.c+q.tx;var zj=Fg*q.b+0*q.d+q.ty;var xq=0*q.a+di*q.c+q.tx;var Aj=0*q.b+di*q.d+q.ty;var cm=Fg*q.a+di*q.c+q.tx;
var Bj=Fg*q.b+di*q.d+q.ty;vg[Eg]=qv;vg[Eg+1]=wq;vg[Eg+2]=Xi;vg[Eg+3]=Ih;vg[Eg+4]=rv;vg[Eg+4+1]=zj;vg[Eg+4+2]=Jh;vg[Eg+4+3]=Ih;vg[Eg+8]=xq;vg[Eg+8+1]=Aj;vg[Eg+8+2]=Xi;vg[Eg+8+3]=Ek;vg[Eg+12]=cm;vg[Eg+12+1]=Bj;vg[Eg+12+2]=Jh;vg[Eg+12+3]=Ek}}}c+=Ug;break;case 9:if(u!=null){switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=
3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.DRAW_RECT;var ve=h;Ha.tempVerticesVector.set_length(8);Ha.tempVerticesVector.set(0,ve.buffer.f[ve.fPos]);Ha.tempVerticesVector.set(1,
ve.buffer.f[ve.fPos+1]);Ha.tempVerticesVector.set(2,ve.buffer.f[ve.fPos]+ve.buffer.f[ve.fPos+2]);Ha.tempVerticesVector.set(3,ve.buffer.f[ve.fPos+1]);Ha.tempVerticesVector.set(4,ve.buffer.f[ve.fPos]);Ha.tempVerticesVector.set(5,ve.buffer.f[ve.fPos+1]+ve.buffer.f[ve.fPos+3]);Ha.tempVerticesVector.set(6,ve.buffer.f[ve.fPos]+ve.buffer.f[ve.fPos+2]);Ha.tempVerticesVector.set(7,ve.buffer.f[ve.fPos+1]+ve.buffer.f[ve.fPos+3]);Ha.tempIndicesVector.set_length(6);Ha.tempIndicesVector.set(0,0);Ha.tempIndicesVector.set(1,
1);Ha.tempIndicesVector.set(2,2);Ha.tempIndicesVector.set(3,1);Ha.tempIndicesVector.set(4,2);Ha.tempIndicesVector.set(5,3);var Gg=Ha.tempVerticesVector,ak=Ha.tempIndicesVector,ei=null;if(z){Ha.tempScale9VerticesVector==null?Ha.tempScale9VerticesVector=tb.toFloatVector(null,Gg.get_length()):Ha.tempScale9VerticesVector.set_length(Gg.get_length());for(var Yi=0,Fk=Gg.get_length(),Kh=!0;Yi<Fk;)Kh?Ha.tempScale9VerticesVector.set(Yi,Ha.toScale9Position(Gg.get(Yi),v.x,v.width,g.width,a.__owner.get_scaleX())/
a.__owner.get_scaleX()):Ha.tempScale9VerticesVector.set(Yi,Ha.toScale9Position(Gg.get(Yi),v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++Yi,Kh=!Kh;Gg=Ha.tempScale9VerticesVector}u!=null&&ei==null&&(ei=Ha.tempUvtVector,Ha.populateUvtVector(Gg,u,ei));var Vg=ak!=null,Hg=Math.floor(Gg.get_length()/2),Wg=Vg?ak.get_length():Hg,nh=ei!=null,jg=nh&&ei.get_length()>=Hg*3,bk=jg?4:2,ck=jg?3:2,Pf=bk+2,oh=jg?f:d;Ha.resizeVertexBuffer(a,jg,oh+Wg*Pf);for(var kg=jg?a.__vertexBufferDataUVT:
a.__vertexBufferData,Ig,Cj,yq,zq,ry=0,rz=Wg;ry<rz;){var zo=ry++;Ig=oh+zo*Pf;Cj=Vg?ak.get(zo)*2:zo*2;yq=Vg?ak.get(zo)*ck:zo*ck;jg?(zq=ei.get(yq+2),kg[Ig]=Gg.get(Cj)/zq,kg[Ig+1]=Gg.get(Cj+1)/zq,kg[Ig+2]=0,kg[Ig+3]=1/zq):(kg[Ig]=Gg.get(Cj),kg[Ig+1]=Gg.get(Cj+1));kg[Ig+bk]=nh?ei.get(yq):0;kg[Ig+bk+1]=nh?ei.get(yq+1):0}jg?f+=Wg*Pf:d+=Wg*Pf}break;case 10:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=
1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.DRAW_ROUND_RECT;var Ie=h,sz=Ie.buffer.f[Ie.fPos],tz=Ie.buffer.f[Ie.fPos+
1],uz=Ie.buffer.f[Ie.fPos+2],vz=Ie.buffer.f[Ie.fPos+3],Aq=Ie.buffer.f[Ie.fPos+4]/2,sy=(Ie.buffer.o[Ie.oPos]!=null?Ie.buffer.o[Ie.oPos]:Ie.buffer.f[Ie.fPos+4])/2,Bq=z&&Ie.buffer.f[Ie.fPos]+Aq<=v.x&&Ie.buffer.f[Ie.fPos]+Ie.buffer.f[Ie.fPos+2]-Aq>=v.x+v.width?1:a.__owner.get_scaleX(),Cq=z&&Ie.buffer.f[Ie.fPos+1]+sy<=v.y&&Ie.buffer.f[Ie.fPos+1]+Ie.buffer.f[Ie.fPos+3]-Aq>=v.y+v.height?1:a.__owner.get_scaleY();en.buildRoundRectVerticesAndIndices(sz,tz,uz,vz,Aq,sy,Bq,Cq,Ha.tempVerticesVector,Ha.tempIndicesVector);
var Lh=Ha.tempVerticesVector,dm=Ha.tempIndicesVector,lg=null;if(z){Ha.tempScale9VerticesVector==null?Ha.tempScale9VerticesVector=tb.toFloatVector(null,Lh.get_length()):Ha.tempScale9VerticesVector.set_length(Lh.get_length());for(var Jg=0,ty=Lh.get_length(),Dq=!0;Jg<ty;)Dq?Ha.tempScale9VerticesVector.set(Jg,Ha.toScale9Position(Lh.get(Jg),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ha.tempScale9VerticesVector.set(Jg,Ha.toScale9Position(Lh.get(Jg),v.y,v.height,g.height,a.__owner.get_scaleY())/
a.__owner.get_scaleY()),++Jg,Dq=!Dq;Lh=Ha.tempScale9VerticesVector}u!=null&&lg==null&&(lg=Ha.tempUvtVector,Ha.populateUvtVector(Lh,u,lg));var Eq=dm!=null,sv=Math.floor(Lh.get_length()/2),em=Eq?dm.get_length():sv,an=lg!=null,Xg=an&&lg.get_length()>=sv*3,uy=Xg?4:2,ph=Xg?3:2,Nd=uy+2,wz=Xg?f:d;Ha.resizeVertexBuffer(a,Xg,wz+em*Nd);for(var fm=Xg?a.__vertexBufferDataUVT:a.__vertexBufferData,ul,Ef,bn,cn,qh=0,vy=em;qh<vy;){var dn=qh++;ul=wz+dn*Nd;Ef=Eq?dm.get(dn)*2:dn*2;bn=Eq?dm.get(dn)*ph:dn*ph;Xg?(cn=lg.get(bn+
2),fm[ul]=Lh.get(Ef)/cn,fm[ul+1]=Lh.get(Ef+1)/cn,fm[ul+2]=0,fm[ul+3]=1/cn):(fm[ul]=Lh.get(Ef),fm[ul+1]=Lh.get(Ef+1));fm[ul+uy]=an?lg.get(bn):0;fm[ul+uy+1]=an?lg.get(bn+1):0}Xg?f+=em*Nd:d+=em*Nd;break;case 12:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=
4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=xa.DRAW_TRIANGLES;var fi=h,tv=fi.buffer.o[fi.oPos+1],Gk=fi.buffer.o[fi.oPos],Ao=fi.buffer.o[fi.oPos+2];if(z){Ha.tempScale9VerticesVector==null?Ha.tempScale9VerticesVector=tb.toFloatVector(null,Gk.get_length()):
Ha.tempScale9VerticesVector.set_length(Gk.get_length());for(var vv=0,lA=Gk.get_length(),Nz=!0;vv<lA;)Nz?Ha.tempScale9VerticesVector.set(vv,Ha.toScale9Position(Gk.get(vv),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ha.tempScale9VerticesVector.set(vv,Ha.toScale9Position(Gk.get(vv),v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++vv,Nz=!Nz;Gk=Ha.tempScale9VerticesVector}u!=null&&Ao==null&&(Ao=Ha.tempUvtVector,Ha.populateUvtVector(Gk,u,Ao));var Oz=tv!=null,
aA=Math.floor(Gk.get_length()/2),yz=Oz?tv.get_length():aA,Pz=Ao!=null,Fq=Pz&&Ao.get_length()>=aA*3,Qz=Fq?4:2,bA=Fq?3:2,zz=Qz+2,cA=Fq?f:d;Ha.resizeVertexBuffer(a,Fq,cA+yz*zz);for(var Bo=Fq?a.__vertexBufferDataUVT:a.__vertexBufferData,fn,wy,Az,Bz,dA=0,mA=yz;dA<mA;){var xy=dA++;fn=cA+xy*zz;wy=Oz?tv.get(xy)*2:xy*2;Az=Oz?tv.get(xy)*bA:xy*bA;Fq?(Bz=Ao.get(Az+2),Bo[fn]=Gk.get(wy)/Bz,Bo[fn+1]=Gk.get(wy+1)/Bz,Bo[fn+2]=0,Bo[fn+3]=1/Bz):(Bo[fn]=Gk.get(wy),Bo[fn+1]=Gk.get(wy+1));Bo[fn+Qz]=Pz?Ao.get(Az):0;Bo[fn+
Qz+1]=Pz?Ao.get(Az+1):0}Fq?f+=yz*zz:d+=yz*zz;break;case 13:u=null;break;default:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=
2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=J}}c>0&&a.__quadBuffer.flushVertexBufferData();if(d>0){var gn=a.__vertexBuffer;if(gn==null||d>a.__vertexBufferCount)gn=n.createVertexBuffer(d,4,0),a.__vertexBuffer=gn,a.__vertexBufferCount=d;gn.uploadFromTypedArray(el.toArrayBufferView(a.__vertexBufferData))}if(f>0){gn=a.__vertexBufferUVT;if(gn==null||f>a.__vertexBufferCountUVT)gn=
n.createVertexBuffer(f,6,0),a.__vertexBufferUVT=gn,a.__vertexBufferCountUVT=f;gn.uploadFromTypedArray(el.toArrayBufferView(a.__vertexBufferDataUVT))}Ia.__pool.release(l);gb.__pool.release(q)};Ha.isCompatible=function(a){if(a.__owner.__worldScale9Grid!=null)return!1;var b=new wj(a.__commands),c=!1,d=!1,f=!1,g=0;for(a=a.__commands.types;g<a.length;){var h=a[g];++g;switch(h._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=xa.BEGIN_BITMAP_FILL;
c=b;if(c.buffer.o[c.oPos+1]!=null)return b.destroy(),!1;d=!0;f=c=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=
1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 1:d=!1;c=!0;f=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;
case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 3:c=d=!1;f=!0;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 8:if(c||d||f){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;
break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;
case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h}else return b.destroy(),!1;break;case 9:if(c||d||f){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;
case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h}else return b.destroy(),!1;break;case 12:if(c||d||f){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=
4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h}else return b.destroy(),!1;break;case 13:f=c=d=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;
break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=
2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 19:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;default:return b.destroy(),!1}}b.destroy();return!0};Ha.render=function(a,b){if(a.__visible&&a.__commands.get_length()!=0){if(a.__bitmap!=null&&!a.__dirty||!Ha.isCompatible(a)){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer.__worldTransform;
b.__softwareRenderer.__worldTransform=a.__owner.__drawableType==7?gb.__identity:b.__worldTransform;C.render(a,b.__softwareRenderer);b.__softwareRenderer.__worldTransform=c}else{a.__bitmap=null;a.__update(b.__worldTransform,b.__pixelRatio);var d=a.__bounds,f=a.__width,g=a.__height;if(d!=null&&f>=1&&g>=1){(a.__hardwareDirty||a.__quadBuffer==null&&a.__vertexBuffer==null&&a.__vertexBufferUVT==null)&&Ha.buildBuffer(a,b);var h=a.__owner.__scale9Grid,n=h!=null&&!a.__owner.__isMask&&a.__worldTransform.b==
0&&a.__worldTransform.c==0;n||(h=null);for(var l=new wj(a.__commands),q=b.__context3D,u=gb.__pool.get(),v=null,z=null,r=!1,F=!1,J=null,L=0,Q=0,W=0,ka=0,ha=0,ta=a.__commands.types;ha<ta.length;){var za=ta[ha];++ha;switch(za._hx_index){case 0:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;
case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.BEGIN_BITMAP_FILL;var eb=l;z=eb.buffer.o[eb.oPos];r=eb.buffer.b[eb.bPos];F=eb.buffer.b[eb.bPos+1];J=v=null;break;case 1:switch(l.prev._hx_index){case 0:l.oPos+=
2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=
2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.BEGIN_FILL;var db=l;J=(db.buffer.i[db.iPos]|0)&16777215|(db.buffer.f[db.fPos]*255|0)<<24;z=v=null;break;case 2:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=
1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=za;J=0;z=v=null;break;case 3:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=
4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.BEGIN_SHADER_FILL;var Ra=l;v=Ra.buffer.o[Ra.oPos];Q=0;z=v==null||v.shader==null||v.shader.__bitmap==
null?null:v.shader.__bitmap.input;J=null;break;case 6:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=
1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.DRAW_CIRCLE;var vb=l,bb=vb.buffer.f[vb.fPos+2],Tb=Math.PI*(bb+bb)/4|0;Tb<6&&(Tb=6);var Eb=Tb,Lb=Eb*2,vc=(Eb-2)*3,zd=0;z!=null&&zd==0&&(zd=Lb);if(z!=null||v!=null||zd==0&&J!=null){var Qb=Math.floor(Lb/2),wd=vc>0?vc:Qb,Ae=zd>=Qb*3,bg=Ae?4:2,Df=bg+2,Sg=Ae?a.__vertexBufferUVT:a.__vertexBuffer,Nf=Ae?ka:W,he=b.__getMatrix(a.__owner.__renderTransform,
1);if(v==null||Ha.maskRender){if(z!=null){var ie=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ie);b.applyMatrix(he);b.applyBitmapData(z,F,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{ie=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ie);b.applyMatrix(he);b.applyBitmapData(Ha.blankBitmapData,!0,r);var ml=J;Ha.tempColorTransform.redOffset=ml>>>16&255;Ha.tempColorTransform.greenOffset=ml>>>8&255;Ha.tempColorTransform.blueOffset=
ml&255;Ha.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((ml>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ha.tempColorTransform)}b.updateShader()}else ie=b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(he),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);ie.__position!=null&&q.setVertexBufferAt(ie.__position.index,Sg,Nf,Ae?4:2);ie.__textureCoord!=null&&q.setVertexBufferAt(ie.__textureCoord.index,
Sg,Nf+bg,2);q.setCulling(3);q.__drawTriangles(0,wd);Q+=wd;Ae?ka+=Df*wd:W+=Df*wd;q.setCulling(0);b.__clearShader()}break;case 7:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=
2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.DRAW_ELLIPSE;var td=l,ne=td.buffer.f[td.fPos+2]/2,Mc=td.buffer.f[td.fPos+3]/2,xk=a.__owner.get_scaleX(),Zc=a.__owner.get_scaleY(),jd=Math.PI*(ne*xk+Mc*Zc)/4|0;jd<6&&(jd=6);var Zd=jd,Nc=Zd*2,Ud=(Zd-2)*3,kf=0;z!=null&&kf==0&&(kf=Nc);if(z!=null||v!=null||kf==0&&J!=null){var hg=
Math.floor(Nc/2),Tg=Ud>0?Ud:hg,rf=kf>=hg*3,yk=rf?4:2,zk=yk+2,bf=rf?a.__vertexBufferUVT:a.__vertexBuffer,ig=rf?ka:W,od=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ha.maskRender){if(z!=null){var mh=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(mh);b.applyMatrix(od);b.applyBitmapData(z,F,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{mh=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(mh);b.applyMatrix(od);
b.applyBitmapData(Ha.blankBitmapData,!0,r);var Zl=J;Ha.tempColorTransform.redOffset=Zl>>>16&255;Ha.tempColorTransform.greenOffset=Zl>>>8&255;Ha.tempColorTransform.blueOffset=Zl&255;Ha.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Zl>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ha.tempColorTransform)}b.updateShader()}else mh=b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(od),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),
b.__updateShaderBuffer(Q);mh.__position!=null&&q.setVertexBufferAt(mh.__position.index,bf,ig,rf?4:2);mh.__textureCoord!=null&&q.setVertexBufferAt(mh.__textureCoord.index,bf,ig+yk,2);q.setCulling(3);q.__drawTriangles(0,Tg);Q+=Tg;rf?ka+=zk*Tg:W+=zk*Tg;q.setCulling(0);b.__clearShader()}break;case 8:if(z!=null||J!=null){switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=
6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.DRAW_QUADS;var nl=l,xo=nl.buffer.o[nl.oPos],Ak=nl.buffer.o[nl.oPos+1],ci=Ak!=
null?Ak.get_length():Math.floor(xo.get_length()/4),ol=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ha.maskRender){if(z!=null){var ue=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ue);b.applyMatrix(ol);b.applyBitmapData(z,F,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{ue=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ue);b.applyMatrix(ol);b.applyBitmapData(Ha.blankBitmapData,!0,r);var pl=
J;Ha.tempColorTransform.redOffset=pl>>>16&255;Ha.tempColorTransform.greenOffset=pl>>>8&255;Ha.tempColorTransform.blueOffset=pl&255;Ha.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((pl>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ha.tempColorTransform)}b.updateShader()}else ue=b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(ol),b.applyBitmapData(z,!1,r),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform);
for(var $l=L+ci;L<$l;){ci=Math.min($l-L,q.__quadIndexBufferElements)|0;if(ci<=0)break;v==null||Ha.maskRender||b.__updateShaderBuffer(Q);ue.__position!=null&&q.setVertexBufferAt(ue.__position.index,a.__quadBuffer.vertexBuffer,L*16,2);ue.__textureCoord!=null&&q.setVertexBufferAt(ue.__textureCoord.index,a.__quadBuffer.vertexBuffer,L*16+2,2);q.drawTriangles(q.__quadIndexBuffer,0,ci*2);Q+=ci*4;L+=ci}b.__clearShader()}break;case 9:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=
1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;
break;case 20:l.oPos+=1}l.prev=xa.DRAW_RECT;var Re=l;if(z!=null){var Yj=0;z!=null&&Yj==0&&(Yj=8);if(z!=null||v!=null||Yj==0&&J!=null){var Ge=Yj>=12,He=Ge?4:2,am=He+2,bm=Ge?a.__vertexBufferUVT:a.__vertexBuffer,Zm=Ge?ka:W,Bk=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ha.maskRender){if(z!=null){var Di=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Di);b.applyMatrix(Bk);b.applyBitmapData(z,F,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Di=
Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Di);b.applyMatrix(Bk);b.applyBitmapData(Ha.blankBitmapData,!0,r);var Of=J;Ha.tempColorTransform.redOffset=Of>>>16&255;Ha.tempColorTransform.greenOffset=Of>>>8&255;Ha.tempColorTransform.blueOffset=Of&255;Ha.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Of>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ha.tempColorTransform)}b.updateShader()}else Di=b.__initShaderBuffer(v),b.__setShaderBuffer(v),
b.applyMatrix(Bk),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);Di.__position!=null&&q.setVertexBufferAt(Di.__position.index,bm,Zm,Ge?4:2);Di.__textureCoord!=null&&q.setVertexBufferAt(Di.__textureCoord.index,bm,Zm+He,2);q.setCulling(3);q.__drawTriangles(0,6);Q+=6;Ge?ka+=am*6:W+=am*6;q.setCulling(0);b.__clearShader()}}else if(J!=null){var fc=Re.buffer.f[Re.fPos],ql=Re.buffer.f[Re.fPos+1];f=Re.buffer.f[Re.fPos+2];g=Re.buffer.f[Re.fPos+3];if(n){var Ck=
Ha.toScale9Position(Re.buffer.f[Re.fPos],h.x,h.width,d.width,a.__owner.get_scaleX()),ug=Ha.toScale9Position(Re.buffer.f[Re.fPos+1],h.y,h.height,d.height,a.__owner.get_scaleY()),rl=Ha.toScale9Position(Re.buffer.f[Re.fPos]+Re.buffer.f[Re.fPos+2],h.x,h.width,d.width,a.__owner.get_scaleX()),$m=Ha.toScale9Position(Re.buffer.f[Re.fPos+1]+Re.buffer.f[Re.fPos+3],h.y,h.height,d.height,a.__owner.get_scaleY());fc=Ck/a.__owner.get_scaleX();ql=ug/a.__owner.get_scaleY();f=(rl-Ck)/a.__owner.get_scaleX();g=($m-ug)/
a.__owner.get_scaleY()}u.identity();u.scale(f,g);u.tx=fc;u.ty=ql;u.concat(a.__owner.__renderTransform);var Zj=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Zj);b.applyMatrix(b.__getMatrix(u,1));b.applyBitmapData(Ha.blankBitmapData,!0,r);var Ug=J;Ha.tempColorTransform.redOffset=Ug>>>16&255;Ha.tempColorTransform.greenOffset=Ug>>>8&255;Ha.tempColorTransform.blueOffset=Ug&255;Ha.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Ug>>>24&255)/255*a.__owner.__worldAlpha);
b.applyColorTransform(Ha.tempColorTransform);b.updateShader();var vg=Ha.blankBitmapData.getVertexBuffer(q);Zj.__position!=null&&q.setVertexBufferAt(Zj.__position.index,vg,0,3);Zj.__textureCoord!=null&&q.setVertexBufferAt(Zj.__textureCoord.index,vg,3,2);var yo=Ha.blankBitmapData.getIndexBuffer(q);q.drawTriangles(yo);Q+=4;b.__clearShader()}break;case 10:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=
1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.DRAW_ROUND_RECT;var lf=l,sl=lf.buffer.f[lf.fPos+4]/2,
vq=(lf.buffer.o[lf.oPos]!=null?lf.buffer.o[lf.oPos]:lf.buffer.f[lf.fPos+4])/2,tl=n&&lf.buffer.f[lf.fPos]+sl<=h.x&&lf.buffer.f[lf.fPos]+lf.buffer.f[lf.fPos+2]-sl>=h.x+h.width?1:a.__owner.get_scaleX(),Eg=n&&lf.buffer.f[lf.fPos+1]+vq<=h.y&&lf.buffer.f[lf.fPos+1]+lf.buffer.f[lf.fPos+3]-sl>=h.y+h.height?1:a.__owner.get_scaleY(),Dk=Math.ceil(Math.PI*(sl*tl+vq*Eg)/8);Dk<3&&(Dk=3);var Fg=Dk*4,di=Fg*2,$d=(Fg-2)*3,Xi=0;z!=null&&Xi==0&&(Xi=di);if(z!=null||v!=null||Xi==0&&J!=null){var Ih=Math.floor(di/2),Jh=
$d>0?$d:Ih,Ek=Xi>=Ih*3,qv=Ek?4:2,wq=qv+2,rv=Ek?a.__vertexBufferUVT:a.__vertexBuffer,zj=Ek?ka:W,xq=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ha.maskRender){if(z!=null){var Aj=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Aj);b.applyMatrix(xq);b.applyBitmapData(z,F,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Aj=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Aj);b.applyMatrix(xq);b.applyBitmapData(Ha.blankBitmapData,
!0,r);var cm=J;Ha.tempColorTransform.redOffset=cm>>>16&255;Ha.tempColorTransform.greenOffset=cm>>>8&255;Ha.tempColorTransform.blueOffset=cm&255;Ha.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((cm>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ha.tempColorTransform)}b.updateShader()}else Aj=b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(xq),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);Aj.__position!=
null&&q.setVertexBufferAt(Aj.__position.index,rv,zj,Ek?4:2);Aj.__textureCoord!=null&&q.setVertexBufferAt(Aj.__textureCoord.index,rv,zj+qv,2);q.setCulling(3);q.__drawTriangles(0,Jh);Q+=Jh;Ek?ka+=wq*Jh:W+=wq*Jh;q.setCulling(0);b.__clearShader()}break;case 12:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=
4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.DRAW_TRIANGLES;var Bj=l,ve=Bj.buffer.o[Bj.oPos+1],Gg=Bj.buffer.o[Bj.oPos+2],ak=Bj.buffer.o[Bj.oPos+3],ei=Bj.buffer.o[Bj.oPos].get_length(),Yi=ve!=
null?ve.get_length():0,Fk=Gg!=null?Gg.get_length():0;z!=null&&Fk==0&&(Fk=ei);if(z!=null||v!=null||Fk==0&&J!=null){var Kh=Math.floor(ei/2),Vg=Yi>0?Yi:Kh,Hg=Fk>=Kh*3,Wg=Hg?4:2,nh=Wg+2,jg=Hg?a.__vertexBufferUVT:a.__vertexBuffer,bk=Hg?ka:W,ck=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ha.maskRender){if(z!=null){var Pf=Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Pf);b.applyMatrix(ck);b.applyBitmapData(z,F,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Pf=
Ha.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Pf);b.applyMatrix(ck);b.applyBitmapData(Ha.blankBitmapData,!0,r);var oh=J;Ha.tempColorTransform.redOffset=oh>>>16&255;Ha.tempColorTransform.greenOffset=oh>>>8&255;Ha.tempColorTransform.blueOffset=oh&255;Ha.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((oh>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ha.tempColorTransform)}b.updateShader()}else Pf=b.__initShaderBuffer(v),b.__setShaderBuffer(v),
b.applyMatrix(ck),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);Pf.__position!=null&&q.setVertexBufferAt(Pf.__position.index,jg,bk,Hg?4:2);Pf.__textureCoord!=null&&q.setVertexBufferAt(Pf.__textureCoord.index,jg,bk+Wg,2);switch(ak){case 0:q.setCulling(0);break;case 1:q.setCulling(3);break;case 2:q.setCulling(1)}q.__drawTriangles(0,Vg);Q+=Vg;Hg?ka+=nh*Vg:W+=nh*Vg;switch(ak){case 1:case 2:q.setCulling(0)}b.__clearShader()}break;case 13:v=J=z=null;switch(l.prev._hx_index){case 0:l.oPos+=
2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=
2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=za;q.setCulling(3);break;case 18:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=
4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.MOVE_TO;break;case 19:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=
4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=xa.OVERRIDE_BLEND_MODE;var kg=l;b.__setBlendMode(kg.buffer.o[kg.oPos]);break;default:switch(l.prev._hx_index){case 0:l.oPos+=2;l.bPos+=2;break;case 1:l.iPos+=1;l.fPos+=1;break;case 2:l.oPos+=4;l.iiPos+=
2;l.ffPos+=1;l.fPos+=1;break;case 3:l.oPos+=1;break;case 4:l.fPos+=6;break;case 5:l.fPos+=4;break;case 6:l.fPos+=3;break;case 7:l.fPos+=4;break;case 8:l.oPos+=3;break;case 9:l.fPos+=4;break;case 10:l.fPos+=5;l.oPos+=1;break;case 12:l.oPos+=4;break;case 14:l.oPos+=2;l.bPos+=2;break;case 15:l.oPos+=4;l.iiPos+=2;l.ffPos+=1;l.fPos+=1;break;case 16:l.oPos+=4;l.iPos+=1;l.fPos+=2;l.bPos+=1;break;case 17:l.fPos+=2;break;case 18:l.fPos+=2;break;case 19:l.oPos+=1;break;case 20:l.oPos+=1}l.prev=za}}gb.__pool.release(u)}a.set___dirty(!1)}a.__hardwareDirty=
!1}};Ha.renderMask=function(a,b){Ha.maskRender=!0;Ha.render(a,b);Ha.maskRender=!1};Ha.resizeIndexBuffer=function(a,b,c){if(!b){var d=b?null:a.__triangleIndexBufferData,f=null;if(d==null){var g=f=null,h=null,n=null,l=null;f=c=c!=null?new Uint16Array(c):f!=null?new Uint16Array(f):g!=null?new Uint16Array(g.__array):h!=null?new Uint16Array(h):n!=null?l==null?new Uint16Array(n,0):new Uint16Array(n,0,l):null}else c>d.length&&(l=n=h=g=f=null,f=c=c!=null?new Uint16Array(c):f!=null?new Uint16Array(f):g!=null?
new Uint16Array(g.__array):h!=null?new Uint16Array(h):n!=null?l==null?new Uint16Array(n,0):new Uint16Array(n,0,l):null,f.set(d));f==null||b||(a.__triangleIndexBufferData=f)}};Ha.resizeVertexBuffer=function(a,b,c){var d=b?a.__vertexBufferDataUVT:a.__vertexBufferData,f=null;if(d==null){var g=f=null,h=null,n=null,l=null;f=c=c!=null?new Float32Array(c):f!=null?new Float32Array(f):g!=null?new Float32Array(g.__array):h!=null?new Float32Array(h):n!=null?l==null?new Float32Array(n,0):new Float32Array(n,0,
l):null}else c>d.length&&(l=n=h=g=f=null,f=c=c!=null?new Float32Array(c):f!=null?new Float32Array(f):g!=null?new Float32Array(g.__array):h!=null?new Float32Array(h):n!=null?l==null?new Float32Array(n,0):new Float32Array(n,0,l):null,f.set(d));f!=null&&(b?a.__vertexBufferDataUVT=f:a.__vertexBufferData=f)};Ha.populateUvtVector=function(a,b,c){for(var d=a.get(0),f=d,g=a.get(1),h=g,n=2,l=a.get_length();n<l;){var q=a.get(n);d>q?d=q:f<q&&(f=q);q=a.get(n+1);g>q?g=q:h<q&&(h=q);n+=2}d=f-d;g=h-g;c.set_length(l);
for(n=0;n<l;)c.set(n,d*(a.get(n)/d)/b.width),c.set(n+1,g*(a.get(n+1)/g)/b.height),n+=2};Ha.toScale9Position=function(a,b,c,d,f){if(f<=0)return 0;var g=d-c-b;d=d*f-b-g;return a<=b?d<0?a*(b+g+d)/(b+g):a:a>=b+c?d<0?(b+(a-b-c))*(b+g+d)/(b+g):b+d+(a-b-c):d<0?b*(b+g+d)/(b+g):b+d*(a-b)/c};var en=function(){};t["openfl.display._internal._Context3DGraphics.PolygonFunctions"]=en;en.__name__="openfl.display._internal._Context3DGraphics.PolygonFunctions";en.getEllipseNumVertices=function(a,b){a=Math.PI*(a+b)/
4|0;a<6&&(a=6);return a};en.buildEllipseVerticesAndIndices=function(a,b,c,d,f,g,h,n){f=Math.PI*(c*f+d*g)/4|0;f<6&&(f=6);g=2*Math.PI/f;var l=0;h.set_length(f*2);for(var q=0,u=f;q<u;){var v=q++;h.set(v*2,Math.cos(l)*c+a+c);h.set(v*2+1,Math.sin(l)*d+b+d);l+=g}n.set_length((f-2)*3);q=0;for(u=f-2;q<u;)v=q++,n.set(v*3,0),n.set(v*3+1,v+1),n.set(v*3+2,v+2)};en.getRoundRectNumVertices=function(a,b){a=Math.ceil(Math.PI*(a+b)/8);a<3&&(a=3);return a*4};en.buildRoundRectVerticesAndIndices=function(a,b,c,d,f,g,
h,n,l,q){h=Math.ceil(Math.PI*(f*h+g*n)/8);h<3&&(h=3);n=h*4;var u=n/4|0,v=Math.PI/2/(u-1),z=0,r=c-f-f,F=d-g-g,J=!0;l.set_length(n*2);var L=0,Q=u;for(h=0;h<4;){for(h++;L<Q;)l.set(L*2,r+Math.cos(z)*f+a+f),l.set(L*2+1,F+Math.sin(z)*g+b+g),z+=v,++L;z-=v;J?r=r==0?c-f-f:0:F=F==0?d-g-g:0;J=!J;Q+=u}q.set_length((n-2)*3);h=0;for(b=n-2;h<b;)a=h++,q.set(a*3,0),q.set(a*3+1,a+1),q.set(a*3+2,a+2)};var Tm=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_Texture;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t\tif (color.a == 0.0) {\n\n\t\t\t\tdiscard;\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = color;\n\n\t\t\t}\n\n\t\t}");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");bi.call(this);this.__isGenerated=!0;this.__initGL()};t["openfl.display._internal.Context3DMaskShader"]=Tm;Tm.__name__="openfl.display._internal.Context3DMaskShader";
Tm.__super__=bi;Tm.prototype=I(bi.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_Texture:null,__class__:Tm});var Dj=function(){};t["openfl.display._internal.Context3DShape"]=Dj;Dj.__name__="openfl.display._internal.Context3DShape";Dj.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)){var c=a.__graphics;if(c!=null){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);Ha.render(c,b);if(c.__bitmap!=null&&c.__visible){var d=b.__context3D,f=b.__initDisplayShader(a.__worldShader);
b.setShader(f);b.applyBitmapData(c.__bitmap,!0);var g=gb.__pool.get();g.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY);g.concat(c.__worldTransform);b.applyMatrix(b.__getMatrix(g,1));gb.__pool.release(g);b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);b.updateShader();g=c.__bitmap.getVertexBuffer(d);f.__position!=null&&d.setVertexBufferAt(f.__position.index,g,0,3);f.__textureCoord!=null&&d.setVertexBufferAt(f.__textureCoord.index,g,3,2);c=c.__bitmap.getIndexBuffer(d);d.drawTriangles(c);
b.__clearShader()}b.__popMaskObject(a)}}};Dj.renderMask=function(a,b){var c=a.__graphics;if(c!=null&&(Ha.renderMask(c,b),c.__bitmap!=null)){a=b.__context3D;var d=b.__maskShader;b.setShader(d);b.applyBitmapData(c.__bitmap,!0);b.applyMatrix(b.__getMatrix(c.__worldTransform,1));b.updateShader();var f=c.__bitmap.getVertexBuffer(a);d.__position!=null&&a.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&a.setVertexBufferAt(d.__textureCoord.index,f,3,2);c=c.__bitmap.getIndexBuffer(a);a.drawTriangles(c);
b.__clearShader()}};var hv=function(){};t["openfl.display._internal.Context3DSimpleButton"]=hv;hv.__name__="openfl.display._internal.Context3DSimpleButton";hv.renderDrawable=function(a,b){!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};hv.renderDrawableMask=function(a,b){a.__currentState!=null&&b.__renderDrawableMask(a.__currentState)};var ll=function(){};t["openfl.display._internal.Context3DTextField"]=
ll;ll.__name__="openfl.display._internal.Context3DTextField";ll.render=function(a,b){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer,d=a.__textEngine,f=!(d.background||d.border),g=f?d.textBounds:d.bounds;b=a.__graphics;var h=0;if(a.__dirty){a.__updateLayout();b.__bounds==null&&(b.__bounds=new Ia);if(a.get_text().length==0){h=d.bounds.width-4;var n=a.get_defaultTextFormat().align;h=n==3?0:n==4?h:h/2;switch(n){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/
2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}f&&(g.y=d.bounds.y,g.x=h)}b.__bounds.copyFrom(g)}n=c.__pixelRatio;if(b.__bitmapScaleX!=n||b.__bitmapScaleY!=
n)b.__softwareDirty=!0;b.__update(c.__worldTransform,n);if(a.__dirty||b.__softwareDirty){var l=Math.round(b.__width*n),q=Math.round(b.__height*n);if(!(d.text!=null&&d.text!=""||d.background||d.border||d.__hasFocus||d.type==1&&d.selectable)||(d.width<=0||d.height<=0)&&d.autoSize!=2)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),
a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));oa.context=b.__context;b.__canvas.width=l;b.__canvas.height=q;c.__isDOM&&(b.__canvas.style.width=Math.round(l/n)+"px",b.__canvas.style.height=Math.round(q/n)+"px");l=gb.__pool.get();l.scale(n,n);l.concat(b.__renderTransform);oa.context.setTransform(l.a,l.b,l.c,l.d,l.tx,l.ty);gb.__pool.release(l);oa.clearRect==null&&(oa.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");oa.clearRect&&oa.context.clearRect(0,
0,b.__canvas.width,b.__canvas.height);if(d.text!=null&&d.text!=""||d.__hasFocus){f=d.text;b.__context.imageSmoothingEnabled=!c.__allowSmoothing||d.antiAliasType==0&&d.sharpness==400?!1:!0;if(d.border||d.background){oa.context.rect(.5,.5,g.width-1,g.height-1);if(d.background){var u=N.hex(d.backgroundColor&16777215,6);oa.context.fillStyle="#"+u;oa.context.fill()}d.border&&(oa.context.lineWidth=1,u=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+u,oa.context.stroke())}oa.context.textBaseline=
"alphabetic";oa.context.textAlign="start";c=-a.get_scrollH();var v=h=0;for(u=a.get_scrollV()-1;v<u;){var z=v++;h-=d.lineHeights.get(z)}var r;for(l=d.layoutGroups.iterator();l.hasNext();)if(q=l.next(),!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>d.get_bottomScrollV()-1)break;var F="#"+N.hex(q.format.color&16777215,6);oa.context.font=Wc.getFont(q.format);oa.context.fillStyle=F;oa.context.fillText(f.substring(q.startIndex,q.endIndex),q.offsetX+c-g.x,q.offsetY+q.ascent+h-g.y);if(a.__caretIndex>-1&&
d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex){v=r=0;for(u=a.__caretIndex-q.startIndex;v<u;){z=v++;if(q.positions.length<=z)break;r+=q.positions[z]}v=0;u=a.get_scrollV();for(z=q.lineIndex+1;u<z;){var J=u++;v+=d.lineHeights.get(J-1)}oa.context.beginPath();u=N.hex(q.format.color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(q.offsetX+r-a.get_scrollH()-g.x,v+2-g.y);oa.context.lineWidth=1;oa.context.lineTo(q.offsetX+
r-a.get_scrollH()-g.x,v+Wc.getFormatHeight(a.get_defaultTextFormat())-1-g.y);oa.context.stroke();oa.context.closePath()}}else if(q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex||q.startIndex<=a.__selectionIndex&&q.endIndex>=a.__selectionIndex||q.startIndex>a.__caretIndex&&q.endIndex<a.__selectionIndex||q.startIndex>a.__selectionIndex&&q.endIndex<a.__caretIndex)r=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>r&&(r=q.startIndex),
q.endIndex<v&&(v=q.endIndex),z=a.getCharBoundaries(r),v>=q.endIndex?(u=a.getCharBoundaries(q.endIndex-1),u!=null&&(u.x+=u.width+2)):u=a.getCharBoundaries(v),z!=null&&u!=null&&(oa.context.fillStyle="#000000",oa.context.fillRect(z.x+c-g.x,z.y+h,u.x-z.x,q.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(f.substring(r,v),c+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=F,oa.context.lineWidth=1,r=q.offsetX+c-g.x,v=Math.ceil(q.offsetY+h+q.ascent-
g.y)+Math.floor(q.ascent*.185)+.5,oa.context.moveTo(r,v),oa.context.lineTo(r+q.width,v),oa.context.stroke(),oa.context.closePath());q.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=F,oa.context.lineWidth=1,F=q.offsetX+c-g.x,r=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),oa.context.moveTo(F,r),oa.context.lineTo(F+q.width,r),oa.context.stroke(),oa.context.closePath())}}else{if(d.border||d.background)d.border?oa.context.rect(.5,.5,g.width-1,g.height-1):oa.context.rect(0,0,g.width,g.height),
d.background&&(u=N.hex(d.backgroundColor&16777215,6),oa.context.fillStyle="#"+u,oa.context.fill()),d.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",u=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+u,oa.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){c=-a.get_scrollH()+(f?0:h);v=h=0;for(u=a.get_scrollV()-1;v<u;)z=v++,h+=d.lineHeights.get(z);oa.context.beginPath();u=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(c+
2.5,h+2.5);oa.context.lineWidth=1;oa.context.lineTo(c+2.5,h+Wc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}b.__bitmap==null?b.__bitmap=Dc.fromCanvas(b.__canvas):b.__bitmap.width!=b.__canvas.width||b.__bitmap.height!=b.__canvas.height?(d=b.__bitmap.__texture,d!=null&&d.dispose(),b.__bitmap=Dc.fromCanvas(b.__canvas)):b.__bitmap.image.version++;b.__bitmapScaleX=n;b.__bitmapScaleY=n;b.__visible=!0;a.__dirty=!1;b.__softwareDirty=!1;b.set___dirty(!1)}}a.__graphics.__hardwareDirty=
!1};ll.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(ll.render(a,b),!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ia.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;
c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(d)}a.__graphics!=null&&Dj.render(a,b)}}else Vi.render(a.__cacheBitmap,b);b.__renderEvent(a)};ll.renderDrawableMask=function(a,b){ll.renderMask(a,b);kl.renderDrawableMask(a,b)};ll.renderMask=function(a,b){var c=b.__softwareRenderer,d=a.__textEngine,f=!(d.background||d.border),g=f?d.textBounds:d.bounds;b=a.__graphics;var h=0;if(a.__dirty){a.__updateLayout();b.__bounds==null&&(b.__bounds=
new Ia);if(a.get_text().length==0){h=d.bounds.width-4;var n=a.get_defaultTextFormat().align;h=n==3?0:n==4?h:h/2;switch(n){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;
h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}f&&(g.y=d.bounds.y,g.x=h)}b.__bounds.copyFrom(g)}n=c.__pixelRatio;if(b.__bitmapScaleX!=n||b.__bitmapScaleY!=n)b.__softwareDirty=!0;b.__update(c.__worldTransform,n);if(a.__dirty||b.__softwareDirty){var l=Math.round(b.__width*n),q=Math.round(b.__height*n);if(!(d.text!=null&&d.text!=""||d.background||d.border||d.__hasFocus||d.type==1&&d.selectable)||(d.width<=0||d.height<=0)&&d.autoSize!=2)a.__graphics.__canvas=
null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));oa.context=b.__context;b.__canvas.width=l;b.__canvas.height=q;c.__isDOM&&(b.__canvas.style.width=Math.round(l/n)+"px",b.__canvas.style.height=Math.round(q/n)+"px");l=gb.__pool.get();l.scale(n,n);l.concat(b.__renderTransform);
oa.context.setTransform(l.a,l.b,l.c,l.d,l.tx,l.ty);gb.__pool.release(l);oa.clearRect==null&&(oa.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");oa.clearRect&&oa.context.clearRect(0,0,b.__canvas.width,b.__canvas.height);if(d.text!=null&&d.text!=""||d.__hasFocus){f=d.text;b.__context.imageSmoothingEnabled=!c.__allowSmoothing||d.antiAliasType==0&&d.sharpness==400?!1:!0;if(d.border||d.background){oa.context.rect(.5,.5,g.width-1,g.height-1);if(d.background){var u=N.hex(d.backgroundColor&
16777215,6);oa.context.fillStyle="#"+u;oa.context.fill()}d.border&&(oa.context.lineWidth=1,u=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+u,oa.context.stroke())}oa.context.textBaseline="alphabetic";oa.context.textAlign="start";c=-a.get_scrollH();var v=h=0;for(u=a.get_scrollV()-1;v<u;){var z=v++;h-=d.lineHeights.get(z)}var r;for(l=d.layoutGroups.iterator();l.hasNext();)if(q=l.next(),!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>d.get_bottomScrollV()-1)break;var F="#"+N.hex(q.format.color&
16777215,6);oa.context.font=Wc.getFont(q.format);oa.context.fillStyle=F;oa.context.fillText(f.substring(q.startIndex,q.endIndex),q.offsetX+c-g.x,q.offsetY+q.ascent+h-g.y);if(a.__caretIndex>-1&&d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex){v=r=0;for(u=a.__caretIndex-q.startIndex;v<u;){z=v++;if(q.positions.length<=z)break;r+=q.positions[z]}v=0;u=a.get_scrollV();for(z=q.lineIndex+1;u<z;){var J=u++;v+=d.lineHeights.get(J-
1)}oa.context.beginPath();u=N.hex(q.format.color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(q.offsetX+r-a.get_scrollH()-g.x,v+2-g.y);oa.context.lineWidth=1;oa.context.lineTo(q.offsetX+r-a.get_scrollH()-g.x,v+Wc.getFormatHeight(a.get_defaultTextFormat())-1-g.y);oa.context.stroke();oa.context.closePath()}}else if(q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex||q.startIndex<=a.__selectionIndex&&q.endIndex>=a.__selectionIndex||q.startIndex>a.__caretIndex&&q.endIndex<a.__selectionIndex||
q.startIndex>a.__selectionIndex&&q.endIndex<a.__caretIndex)r=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>r&&(r=q.startIndex),q.endIndex<v&&(v=q.endIndex),z=a.getCharBoundaries(r),v>=q.endIndex?(u=a.getCharBoundaries(q.endIndex-1),u!=null&&(u.x+=u.width+2)):u=a.getCharBoundaries(v),z!=null&&u!=null&&(oa.context.fillStyle="#000000",oa.context.fillRect(z.x+c-g.x,z.y+h,u.x-z.x,q.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(f.substring(r,
v),c+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=F,oa.context.lineWidth=1,r=q.offsetX+c-g.x,v=Math.ceil(q.offsetY+h+q.ascent-g.y)+Math.floor(q.ascent*.185)+.5,oa.context.moveTo(r,v),oa.context.lineTo(r+q.width,v),oa.context.stroke(),oa.context.closePath());q.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=F,oa.context.lineWidth=1,F=q.offsetX+c-g.x,r=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),oa.context.moveTo(F,r),oa.context.lineTo(F+
q.width,r),oa.context.stroke(),oa.context.closePath())}}else{if(d.border||d.background)d.border?oa.context.rect(.5,.5,g.width-1,g.height-1):oa.context.rect(0,0,g.width,g.height),d.background&&(u=N.hex(d.backgroundColor&16777215,6),oa.context.fillStyle="#"+u,oa.context.fill()),d.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",u=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+u,oa.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){c=-a.get_scrollH()+(f?0:h);
v=h=0;for(u=a.get_scrollV()-1;v<u;)z=v++,h+=d.lineHeights.get(z);oa.context.beginPath();u=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+u;oa.context.moveTo(c+2.5,h+2.5);oa.context.lineWidth=1;oa.context.lineTo(c+2.5,h+Wc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}b.__bitmap==null?b.__bitmap=Dc.fromCanvas(b.__canvas):b.__bitmap.width!=b.__canvas.width||b.__bitmap.height!=b.__canvas.height?(d=b.__bitmap.__texture,d!=null&&
d.dispose(),b.__bitmap=Dc.fromCanvas(b.__canvas)):b.__bitmap.image.version++;b.__bitmapScaleX=n;b.__bitmapScaleY=n;b.__visible=!0;a.__dirty=!1;b.__softwareDirty=!1;b.set___dirty(!1)}}a.__graphics.__hardwareDirty=!1};var Ka=function(){};t["openfl.display._internal.Context3DTilemap"]=Ka;Ka.__name__="openfl.display._internal.Context3DTilemap";Ka.buildBuffer=function(a,b){if(!a.__renderable||a.__group.__tiles.length==0||a.__worldAlpha<=0)a.__group.__dirty=!1;else{Ka.numTiles=0;Ka.vertexBufferData=a.__buffer!=
null?a.__buffer.vertexBufferData:null;Ka.vertexDataPosition=0;var c=Ia.__pool.get(),d=gb.__pool.get(),f=gb.__pool.get();Ka.dataPerVertex=4;a.tileAlphaEnabled&&Ka.dataPerVertex++;a.tileColorTransformEnabled&&(Ka.dataPerVertex+=8);Ka.buildBufferTileContainer(a,a.__group,b,f,a.__tileset,a.tileAlphaEnabled,a.__worldAlpha,a.tileColorTransformEnabled,a.__worldColorTransform,null,c,d);a.__buffer.flushVertexBufferData();Ia.__pool.release(c);gb.__pool.release(d);gb.__pool.release(f)}};Ka.buildBufferTileContainer=
function(a,b,c,d,f,g,h,n,l,q,u,v,z){z==null&&(z=!0);var r=gb.__pool.get(),F=c.__roundPixels,J=b.__tiles;z&&Ka.resizeBuffer(a,Ka.numTiles+Ka.getRecursiveLength(b));z=null;for(var L,Q,W,ka,ha,ta,za,eb,db,Ra,vb,bb=g?5:4,Tb=0;Tb<J.length;){ka=J[Tb];++Tb;r.setTo(1,0,0,1,-ka.get_originX(),-ka.get_originY());r.concat(ka.get_matrix());r.concat(d);F&&(r.tx=Math.round(r.tx),r.ty=Math.round(r.ty));var Eb=ka.get_tileset()!=null?ka.get_tileset():f;var Lb=ka.get_alpha()*h;var vc=ka.get_visible();ka.__dirty=!1;
if(vc&&!(Lb<=0))if(n&&(ka.get_colorTransform()!=null?l==null?z=ka.get_colorTransform():(Ka.cacheColorTransform==null&&(Ka.cacheColorTransform=new wc),z=Ka.cacheColorTransform,z.redMultiplier=l.redMultiplier*ka.get_colorTransform().redMultiplier,z.greenMultiplier=l.greenMultiplier*ka.get_colorTransform().greenMultiplier,z.blueMultiplier=l.blueMultiplier*ka.get_colorTransform().blueMultiplier,z.alphaMultiplier=l.alphaMultiplier*ka.get_colorTransform().alphaMultiplier,z.redOffset=l.redOffset+ka.get_colorTransform().redOffset,
z.greenOffset=l.greenOffset+ka.get_colorTransform().greenOffset,z.blueOffset=l.blueOffset+ka.get_colorTransform().blueOffset,z.alphaOffset=l.alphaOffset+ka.get_colorTransform().alphaOffset):z=l),g||(Lb=1),ka.__length>0)Ka.buildBufferTileContainer(a,ka,c,r,Eb,g,Lb,n,z,q,u,v,!1);else if(Eb!=null&&(vc=ka.get_id(),L=Eb.__bitmapData,L!=null)){if(vc==-1){Q=ka.__rect;if(Q==null||Q.width<=0||Q.height<=0)continue;Eb=Q.x/L.width;ka=Q.y/L.height;vc=Q.get_right()/L.width;ha=Q.get_bottom()/L.height}else{L=Eb.__data[vc];
if(L==null)continue;u.setTo(L.x,L.y,L.width,L.height);Q=u;Eb=L.__uvX;ka=L.__uvY;vc=L.__uvWidth;ha=L.__uvHeight}L=Q.width;W=Q.height;Q=0*r.a+0*r.c+r.tx;ta=0*r.b+0*r.d+r.ty;za=L*r.a+0*r.c+r.tx;eb=L*r.b+0*r.d+r.ty;db=0*r.a+W*r.c+r.tx;Ra=0*r.b+W*r.d+r.ty;vb=L*r.a+W*r.c+r.tx;W=L*r.b+W*r.d+r.ty;L=Ka.vertexDataPosition;Ka.vertexBufferData[L]=Q;Ka.vertexBufferData[L+1]=ta;Ka.vertexBufferData[L+2]=Eb;Ka.vertexBufferData[L+3]=ka;Ka.vertexBufferData[L+Ka.dataPerVertex]=za;Ka.vertexBufferData[L+Ka.dataPerVertex+
1]=eb;Ka.vertexBufferData[L+Ka.dataPerVertex+2]=vc;Ka.vertexBufferData[L+Ka.dataPerVertex+3]=ka;Ka.vertexBufferData[L+Ka.dataPerVertex*2]=db;Ka.vertexBufferData[L+Ka.dataPerVertex*2+1]=Ra;Ka.vertexBufferData[L+Ka.dataPerVertex*2+2]=Eb;Ka.vertexBufferData[L+Ka.dataPerVertex*2+3]=ha;Ka.vertexBufferData[L+Ka.dataPerVertex*3]=vb;Ka.vertexBufferData[L+Ka.dataPerVertex*3+1]=W;Ka.vertexBufferData[L+Ka.dataPerVertex*3+2]=vc;Ka.vertexBufferData[L+Ka.dataPerVertex*3+3]=ha;g&&(Ka.vertexBufferData[L+Ka.dataPerVertex*
0+4]=Lb,Ka.vertexBufferData[L+Ka.dataPerVertex+4]=Lb,Ka.vertexBufferData[L+Ka.dataPerVertex*2+4]=Lb,Ka.vertexBufferData[L+Ka.dataPerVertex*3+4]=Lb);if(n)if(z!=null)for(Lb=0;Lb<4;)Eb=Lb++,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb]=z.redMultiplier,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+1]=z.greenMultiplier,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+2]=z.blueMultiplier,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+3]=z.alphaMultiplier,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+4]=z.redOffset,
Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+5]=z.greenOffset,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+6]=z.blueOffset,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+7]=z.alphaOffset;else for(Lb=0;Lb<4;)Eb=Lb++,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb]=1,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+1]=1,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+2]=1,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+3]=1,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+4]=0,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+
bb+5]=0,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+6]=0,Ka.vertexBufferData[L+Ka.dataPerVertex*Eb+bb+7]=0;Ka.vertexDataPosition+=Ka.dataPerVertex*4}}b.__dirty=!1;gb.__pool.release(r)};Ka.flush=function(a,b,c){Ka.currentShader==null&&(Ka.currentShader=b.__defaultDisplayShader);if(Ka.bufferPosition>Ka.lastFlushedPosition&&Ka.currentBitmapData!=null&&Ka.currentShader!=null){var d=b.__initDisplayShader(Ka.currentShader);b.setShader(d);b.applyBitmapData(Ka.currentBitmapData,a.smoothing);b.applyMatrix(b.__getMatrix(a.__renderTransform,
1));a.tileAlphaEnabled?b.useAlphaArray():b.applyAlpha(a.__worldAlpha);a.tileBlendModeEnabled&&b.__setBlendMode(c);a.tileColorTransformEnabled?(b.applyHasColorTransform(!0),b.useColorTransformArray()):b.applyColorTransform(a.__worldColorTransform);b.updateShader();c=a.__buffer.vertexBuffer;for(var f=Ka.lastFlushedPosition*Ka.dataPerVertex*4,g;Ka.lastFlushedPosition<Ka.bufferPosition;){g=Math.min(Ka.bufferPosition-Ka.lastFlushedPosition,Ka.context.__quadIndexBufferElements)|0;if(g<=0)break;d.__position!=
null&&Ka.context.setVertexBufferAt(d.__position.index,c,f,2);d.__textureCoord!=null&&Ka.context.setVertexBufferAt(d.__textureCoord.index,c,f+2,2);a.tileAlphaEnabled&&d.__alpha!=null&&Ka.context.setVertexBufferAt(d.__alpha.index,c,f+4,1);if(a.tileColorTransformEnabled){var h=a.tileAlphaEnabled?5:4;d.__colorMultiplier!=null&&Ka.context.setVertexBufferAt(d.__colorMultiplier.index,c,f+h,4);d.__colorOffset!=null&&Ka.context.setVertexBufferAt(d.__colorOffset.index,c,f+h+4,4)}Ka.context.drawTriangles(Ka.context.__quadIndexBuffer,
0,g*2);Ka.lastFlushedPosition+=g}b.__clearShader()}Ka.lastUsedBitmapData=Ka.currentBitmapData;Ka.lastUsedShader=Ka.currentShader};Ka.getRecursiveLength=function(a){a=a.__tiles;for(var b=0,c=0;c<a.length;){var d=a[c];++c;d.__length>0?b+=Ka.getRecursiveLength(d):++b}return b};Ka.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)&&(Ka.context=b.__context3D,Ka.buildBuffer(a,b),Ka.numTiles!=0)){Ka.bufferPosition=0;Ka.lastFlushedPosition=0;Ka.lastUsedBitmapData=null;Ka.lastUsedShader=null;Ka.currentBitmapData=
null;Ka.currentShader=null;Ka.currentBlendMode=a.__worldBlendMode;a.tileBlendModeEnabled||b.__setBlendMode(Ka.currentBlendMode);b.__pushMaskObject(a);var c=Ia.__pool.get();c.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(c,a.__renderTransform);Ka.renderTileContainer(a,b,a.__group,a.__worldShader,a.__tileset,a.__worldAlpha,a.tileBlendModeEnabled,Ka.currentBlendMode,null);Ka.flush(a,b,Ka.currentBlendMode);b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(c)}};Ka.renderDrawable=function(a,b){b.__updateCacheBitmap(a,
!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ia.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,
1);b.__popMaskRect();b.__popMaskObject(a);Ia.__pool.release(d)}a.__graphics!=null&&Dj.render(a,b)}Ka.render(a,b)}else Vi.render(a.__cacheBitmap,b);b.__renderEvent(a)};Ka.renderDrawableMask=function(a,b){if(a.opaqueBackground!=null||a.__graphics!=null)a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height(),a.__graphics!=null&&Dj.renderMask(a,b);Ka.renderMask(a,b)};Ka.renderTileContainer=function(a,b,c,d,f,g,h,n,l){c=c.__tiles;for(var q,u,v,z=null,r,F=0;F<c.length;){var J=
c[F];++F;q=J.get_tileset()!=null?J.get_tileset():f;u=J.get_alpha()*g;if((v=J.get_visible())&&!(u<=0))if(v=J.get_shader()!=null?J.get_shader():d,h&&(z=J.__blendMode!=null?J.__blendMode:n),J.__length>0)Ka.renderTileContainer(a,b,J,v,q,u,h,z,l);else if(q!=null&&(r=J.get_id(),u=q.__bitmapData,u!=null)){if(r==-1){if(q=J.__rect,q==null||q.width<=0||q.height<=0)continue}else if(q=q.__data[r],q==null)continue;(Ka.bufferPosition-Ka.lastFlushedPosition>=16383||v!=Ka.currentShader||u!=Ka.currentBitmapData&&
Ka.currentBitmapData!=null||Ka.currentBlendMode!=z)&&Ka.flush(a,b,Ka.currentBlendMode);Ka.currentBitmapData=u;Ka.currentShader=v;Ka.currentBlendMode=z;Ka.bufferPosition++}}};Ka.renderMask=function(a,b){};Ka.resizeBuffer=function(a,b){Ka.numTiles=b;a.__buffer==null?a.__buffer=new gm(Ka.context,uv.QUADS,Ka.numTiles,Ka.dataPerVertex):a.__buffer.resize(Ka.numTiles,Ka.dataPerVertex);Ka.vertexBufferData=a.__buffer.vertexBufferData};var Wi=function(){};t["openfl.display._internal.Context3DVideo"]=Wi;Wi.__name__=
"openfl.display._internal.Context3DVideo";Wi.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)&&a.__stream!=null&&a.__stream.__video!=null){var c=b.__context3D,d=c.gl;if(a.__getTexture(c)!=null){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var f=b.__initDisplayShader(a.__worldShader);b.setShader(f);b.applyBitmapData(null,!0,!1);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);f.__textureSize!=null&&
(Wi.__textureSizeValue[0]=a.__stream!=null?a.__stream.__video.videoWidth:0,Wi.__textureSizeValue[1]=a.__stream!=null?a.__stream.__video.videoHeight:0,f.__textureSize.value=Wi.__textureSizeValue);b.updateShader();c.setTextureAt(0,a.__getTexture(c));c.__flushGLTextures();d.uniform1i(f.__texture.index,0);a.smoothing?(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR)):(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MIN_FILTER,d.NEAREST));d=a.__getVertexBuffer(c);f.__position!=null&&c.setVertexBufferAt(f.__position.index,d,0,3);f.__textureCoord!=null&&c.setVertexBufferAt(f.__textureCoord.index,d,3,2);f=a.__getIndexBuffer(c);c.drawTriangles(f);b.__clearShader();b.__popMaskObject(a)}}};Wi.renderDrawable=function(a,b){Wi.render(a,b);b.__renderEvent(a)};Wi.renderDrawableMask=function(a,b){Wi.renderMask(a,b)};Wi.renderMask=function(a,b){if(a.__stream!=null&&a.__stream.__video!=null){var c=b.__context3D,
d=b.__maskShader;b.setShader(d);b.applyBitmapData(Tm.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.updateShader();var f=a.__getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.__getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var Yd=function(){};t["openfl.display._internal.DOMBitmap"]=Yd;Yd.__name__="openfl.display._internal.DOMBitmap";Yd.clear=function(a,
b){jh.clear(a,b);a.__image!=null&&(b.element.removeChild(a.__image),a.__image=null,a.__style=null);a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};Yd.render=function(a,b){if(a.stage!=null&&a.__worldVisible&&a.__renderable&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable){b.__pushMaskObject(a);if(a.__bitmapData.image.buffer.__srcImage!=null){var c=a.__bitmapData.image.buffer.__srcImage.src;N.startsWith(c,"data:")||N.startsWith(c,"blob:")?
Yd.renderCanvas(a,b):Yd.renderImage(a,b)}else Yd.renderCanvas(a,b);b.__popMaskObject(a)}else Yd.clear(a,b)};Yd.renderCanvas=function(a,b){a.__image!=null&&(b.element.removeChild(a.__image),a.__image=null);a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),a.__imageVersion=-1,b.__allowSmoothing&&a.smoothing||(a.__context.imageSmoothingEnabled=!1),b.__initializeElement(a,a.__canvas));a.__imageVersion!=a.__bitmapData.image.version&&(yb.convertToCanvas(a.__bitmapData.image),
a.__canvas.width=a.__bitmapData.width+1,a.__canvas.width=a.__bitmapData.width,a.__canvas.height=a.__bitmapData.height,a.__context.drawImage(a.__bitmapData.image.buffer.__srcCanvas,0,0),a.__imageVersion=a.__bitmapData.image.version);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};Yd.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height();var c=a.__graphics;if(a.stage!=
null&&a.__worldVisible&&a.__renderable&&c!=null){C.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Zi.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=
!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Zi.clear(a,b);a.stage!=null&&a.__worldVisible&&a.__renderable&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable?(b.__pushMaskObject(a),a.__bitmapData.image.buffer.__srcImage!=null?(d=a.__bitmapData.image.buffer.__srcImage.src,N.startsWith(d,"data:")||N.startsWith(d,"blob:")?Yd.renderCanvas(a,b):Yd.renderImage(a,b)):Yd.renderCanvas(a,b),b.__popMaskObject(a)):Yd.clear(a,b)}else b.__renderDrawableClear(a),
a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,N.startsWith(d,"data:")||N.startsWith(d,"blob:")?Yd.renderCanvas(c,b):Yd.renderImage(c,b)):Yd.renderCanvas(c,b),b.__popMaskObject(c)):Yd.clear(c,b);b.__renderEvent(a)};Yd.renderDrawableClear=function(a,b){Yd.clear(a,b)};
Yd.renderImage=function(a,b){a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null);a.__image==null&&(a.__image=window.document.createElement("img"),a.__image.crossOrigin="Anonymous",a.__image.src=a.__bitmapData.image.buffer.__srcImage.src,b.__initializeElement(a,a.__image));b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};var jh=function(){};t["openfl.display._internal.DOMDisplayObject"]=jh;jh.__name__="openfl.display._internal.DOMDisplayObject";jh.clear=function(a,b){a.__cacheBitmap!=
null&&Yd.clear(a.__cacheBitmap,b);Zi.clear(a,b)};jh.render=function(a,b){a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height();var c=a.__graphics;if(a.stage!=null&&a.__worldVisible&&a.__renderable&&c!=null){C.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):
Zi.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Zi.clear(a,b)};jh.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height();var c=
a.__graphics;if(a.stage!=null&&a.__worldVisible&&a.__renderable&&c!=null){C.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Zi.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=
!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Zi.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,N.startsWith(d,"data:")||N.startsWith(d,"blob:")?
Yd.renderCanvas(c,b):Yd.renderImage(c,b)):Yd.renderCanvas(c,b),b.__popMaskObject(c)):Yd.clear(c,b);b.__renderEvent(a)};jh.renderDrawableClear=function(a,b){jh.clear(a,b)};var Qu=function(){};t["openfl.display._internal.DOMDisplayObjectContainer"]=Qu;Qu.__name__="openfl.display._internal.DOMDisplayObjectContainer";Qu.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&b.__renderDrawable(d)}for(c=a.__removedChildren.iterator();c.hasNext();)d=
c.next(),d.stage==null&&d.__cleanup();a.__removedChildren.set_length(0);jh.renderDrawable(a,b);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){b.__pushMaskObject(a);if(b.__stage!=null){c=0;for(d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f),f.__renderDirty=!1;a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);b.__popMaskObject(a)}else{c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawableClear(f)}Zi.clear(a,b);a.__cacheBitmap.stage=
a.stage}};Qu.renderDrawableClear=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&b.__renderDrawableClear(d)}for(c=a.__removedChildren.iterator();c.hasNext();)d=c.next(),d.stage==null&&d.__cleanup();a.__removedChildren.set_length(0);c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawableClear(f)}jh.clear(a,b)};var Zi=function(){};t["openfl.display._internal.DOMShape"]=Zi;Zi.__name__="openfl.display._internal.DOMShape";Zi.clear=function(a,
b){a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};Zi.render=function(a,b){var c=a.__graphics;if(a.stage!=null&&a.__worldVisible&&a.__renderable&&c!=null){C.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Zi.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);
var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Zi.clear(a,b)};var Ru=function(){};t["openfl.display._internal.DOMSimpleButton"]=Ru;Ru.__name__="openfl.display._internal.DOMSimpleButton";Ru.renderDrawable=function(a,b){b.__pushMaskObject(a);for(var c=a.__previousStates.iterator();c.hasNext();){var d=c.next();b.__renderDrawable(d)}a.__previousStates.set_length(0);
a.__currentState!=null&&(a.__currentState.stage!=a.stage&&a.__currentState.__setStageReference(a.stage),b.__renderDrawable(a.__currentState));b.__popMaskObject(a);b.__renderEvent(a)};Ru.renderDrawableClear=function(a,b){jh.renderDrawableClear(a,b)};var kh=function(){};t["openfl.display._internal.DOMTextField"]=kh;kh.__name__="openfl.display._internal.DOMTextField";kh.clear=function(a,b){jh.clear(a,b);a.__div!=null&&(b.element.removeChild(a.__div),a.__div=null,a.__style=null)};kh.measureText=function(a){var b=
a.__textEngine,c=a.__div;c==null&&(c=window.document.createElement("div"),c.innerHTML=b.text.replace(RegExp("\n","g"),"<br>"),c.style.setProperty("font",Wc.getFont(a.__textFormat),null),c.style.setProperty("pointer-events","none",null),c.style.position="absolute",c.style.top="110%",window.document.body.appendChild(c));b.__measuredWidth=c.clientWidth;a.__div==null&&(c.style.width=H.string(b.width-4)+"px");b.__measuredHeight=c.clientHeight;a.__div==null&&window.document.body.removeChild(c)};kh.render=
function(a,b){var c=a.__textEngine;if(a.stage!=null&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||a.__div==null)if(c.text!=""||c.background||c.border||c.type==1){a.__updateLayout();a.__div==null&&(a.__div=window.document.createElement("div"),b.__initializeElement(a,a.__div),a.__style.setProperty("outline","none",null),a.__div.addEventListener("input",function(v){v.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new Dg("textInput",
!1,!1,a.get_htmlText())))},!0));c.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow","hidden",null);c.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select","text",null),a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor",
"inherit",null);a.__div.contentEditable=c.type==1;var d=a.__style;c.background?d.setProperty("background-color","#"+N.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var f=c.width,g=c.height,h="";a.__isHTML&&a.__updateText(jc.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges));for(var n=-a.get_scrollH(),l=c.layoutGroups.iterator();l.hasNext();){var q=l.next();if(!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>c.get_bottomScrollV()-
1)break;h+='<div style="';q.format.font!=null&&(h+="font: "+Wc.getFont(q.format)+"; ");q.format.color!=null&&(h+="color: #"+N.hex(q.format.color&16777215,6)+"; ");q.format.underline==1&&(h+="text-decoration: underline; ");if(q.format.align!=null)switch(q.format.align){case 0:h+="text-align: center; ";break;case 2:h+="text-align: justify; ";break;case 4:h+="text-align: right; ";break;default:h+="text-align: left; "}q.format.leftMargin!=null&&(h+="padding-left: "+q.format.leftMargin*1+"px; ");q.format.rightMargin!=
null&&(h+="padding-right: "+q.format.rightMargin*1+"px; ");q.format.indent!=null&&(h+="text-indent: "+q.format.indent*1+"px; ");h+="left: "+(q.offsetX+n)+"px; top: "+(q.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(q.format.url!=null&&q.format.url!=""){var u="text-decoration: underline; ";q.format.color!=null&&(u+="color: #"+N.hex(q.format.color&16777215,6)+"; ");h+="<a style='"+u+"' href='"+q.format.url+"' target='"+q.format.target+"'>"}h=a.__isHTML?h+N.replace(c.text.substring(q.startIndex,
q.endIndex)," ","&nbsp;"):h+N.replace(N.htmlEscape(c.text.substring(q.startIndex,q.endIndex))," ","&nbsp;");q.format.url!=null&&q.format.url!=""&&(h+="</a>");h+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+N.hex(c.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=!0,a.__transformDirty=!0):d.border!=""&&(d.removeProperty("border"),a.__renderTransformChanged=!0);d.setProperty("width",f+"px",null);d.setProperty("height",g+"px",null);a.__div.innerHTML=
h;a.__dirty=!1}else a.__div!=null&&(b.element.removeChild(a.__div),a.__div=null);a.__div!=null&&(c=b.__roundPixels,b.__roundPixels=!0,b.__updateClip(a),b.__applyStyle(a,!0,!0,!0),b.__roundPixels=c)}else kh.clear(a,b)};kh.renderDrawable=function(a,b){a.__domRender=!0;b.__updateCacheBitmap(a,a.__forceCachedBitmapUpdate);a.__forceCachedBitmapUpdate=!1;a.__domRender=!1;if(a.__cacheBitmap==null||a.__isCacheBitmapRender){a.__renderedOnCanvasWhileOnDOM&&(a.__renderedOnCanvasWhileOnDOM=!1,a.__isHTML&&a.__htmlText!=
null&&(a.__updateText(a.__htmlText),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())));var c=a.__textEngine;if(a.stage!=null&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||a.__div==null)if(c.text!=""||c.background||c.border||c.type==1){a.__updateLayout();a.__div==null&&(a.__div=window.document.createElement("div"),b.__initializeElement(a,a.__div),a.__style.setProperty("outline","none",null),a.__div.addEventListener("input",
function(v){v.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new Dg("textInput",!1,!1,a.get_htmlText())))},!0));c.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow","hidden",null);c.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select",
"text",null),a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor","inherit",null);a.__div.contentEditable=c.type==1;var d=a.__style;c.background?d.setProperty("background-color","#"+N.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var f=c.width,g=c.height,h="";a.__isHTML&&a.__updateText(jc.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges));
for(var n=-a.get_scrollH(),l=c.layoutGroups.iterator();l.hasNext();){var q=l.next();if(!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>c.get_bottomScrollV()-1)break;h+='<div style="';q.format.font!=null&&(h+="font: "+Wc.getFont(q.format)+"; ");q.format.color!=null&&(h+="color: #"+N.hex(q.format.color&16777215,6)+"; ");q.format.underline==1&&(h+="text-decoration: underline; ");if(q.format.align!=null)switch(q.format.align){case 0:h+="text-align: center; ";break;case 2:h+="text-align: justify; ";break;
case 4:h+="text-align: right; ";break;default:h+="text-align: left; "}q.format.leftMargin!=null&&(h+="padding-left: "+q.format.leftMargin*1+"px; ");q.format.rightMargin!=null&&(h+="padding-right: "+q.format.rightMargin*1+"px; ");q.format.indent!=null&&(h+="text-indent: "+q.format.indent*1+"px; ");h+="left: "+(q.offsetX+n)+"px; top: "+(q.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(q.format.url!=null&&q.format.url!=""){var u="text-decoration: underline; ";q.format.color!=null&&
(u+="color: #"+N.hex(q.format.color&16777215,6)+"; ");h+="<a style='"+u+"' href='"+q.format.url+"' target='"+q.format.target+"'>"}h=a.__isHTML?h+N.replace(c.text.substring(q.startIndex,q.endIndex)," ","&nbsp;"):h+N.replace(N.htmlEscape(c.text.substring(q.startIndex,q.endIndex))," ","&nbsp;");q.format.url!=null&&q.format.url!=""&&(h+="</a>");h+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+N.hex(c.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=
!0,a.__transformDirty=!0):d.border!=""&&(d.removeProperty("border"),a.__renderTransformChanged=!0);d.setProperty("width",f+"px",null);d.setProperty("height",g+"px",null);a.__div.innerHTML=h;a.__dirty=!1}else a.__div!=null&&(b.element.removeChild(a.__div),a.__div=null);a.__div!=null&&(c=b.__roundPixels,b.__roundPixels=!0,b.__updateClip(a),b.__applyStyle(a,!0,!0,!0),b.__roundPixels=c)}else kh.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&
c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,N.startsWith(d,"data:")||N.startsWith(d,"blob:")?Yd.renderCanvas(c,b):Yd.renderImage(c,b)):Yd.renderCanvas(c,b),b.__popMaskObject(c)):Yd.clear(c,b);b.__renderEvent(a)};kh.renderDrawableClear=function(a,b){kh.clear(a,b)};kh.__getAttributeMatch=function(a){return a.matched(2)!=null?a.matched(2):a.matched(3)};
var wk=function(){};t["openfl.display._internal.DOMTilemap"]=wk;wk.__name__="openfl.display._internal.DOMTilemap";wk.clear=function(a,b){jh.clear(a,b);a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};wk.render=function(a,b){if(a.stage!=null&&a.__worldVisible&&a.__renderable&&a.__group.__tiles.length>0){a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),b.__initializeElement(a,a.__canvas));a.__canvas.width=
a.__width;a.__canvas.height=a.__height;b.__canvasRenderer.context=a.__context;var c=a.__renderTransform;a.__renderTransform=gb.__identity;var d=b.__canvasRenderer;if((a.opaqueBackground!=null||a.__graphics!=null)&&a.__renderable){var f=d.__getAlpha(a.__worldAlpha);if(!(f<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var g=d.context;d.setTransform(a.__renderTransform,g);f=a.opaqueBackground;
g.fillStyle="rgb("+(f>>>16&255)+","+(f>>>8&255)+","+(f&255)+")";g.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(f=d.__getAlpha(a.__worldAlpha),!(f<=0))){var h=a.__graphics;if(h!=null){C.render(h,d);var n=h.__width,l=h.__height,q=h.__canvas;if(q!=null&&h.__visible&&n>=1&&l>=1){var u=h.__worldTransform;g=d.context;var v=a.__scrollRect;if(v==null||v.width>0&&v.height>0)d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g.globalAlpha=f,
f=gb.__pool.get(),f.scale(1/h.__bitmapScaleX,1/h.__bitmapScaleY),f.concat(u),d.setTransform(f,g),g.drawImage(q,0,0,n,l),gb.__pool.release(f),d.__popMaskObject(a)}}}}}d=b.__canvasRenderer;a.__renderable&&a.__group.__tiles.length!=0&&(f=d.__getAlpha(a.__worldAlpha),f<=0||(g=d.context,d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),h=Ia.__pool.get(),h.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(h,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!1),vj.renderTileContainer(a.__group,
d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,f,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,h),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),Ia.__pool.release(h)));a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else wk.clear(a,b)};wk.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender)if(a.stage!=
null&&a.__worldVisible&&a.__renderable&&a.__group.__tiles.length>0){a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),b.__initializeElement(a,a.__canvas));a.__canvas.width=a.__width;a.__canvas.height=a.__height;b.__canvasRenderer.context=a.__context;var c=a.__renderTransform;a.__renderTransform=gb.__identity;var d=b.__canvasRenderer;if((a.opaqueBackground!=null||a.__graphics!=null)&&a.__renderable){var f=d.__getAlpha(a.__worldAlpha);if(!(f<=
0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var g=d.context;d.setTransform(a.__renderTransform,g);f=a.opaqueBackground;g.fillStyle="rgb("+(f>>>16&255)+","+(f>>>8&255)+","+(f&255)+")";g.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(f=d.__getAlpha(a.__worldAlpha),!(f<=0))){var h=a.__graphics;if(h!=null){C.render(h,d);var n=h.__width,l=
h.__height,q=h.__canvas;if(q!=null&&h.__visible&&n>=1&&l>=1){var u=h.__worldTransform;g=d.context;var v=a.__scrollRect;if(v==null||v.width>0&&v.height>0)d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g.globalAlpha=f,f=gb.__pool.get(),f.scale(1/h.__bitmapScaleX,1/h.__bitmapScaleY),f.concat(u),d.setTransform(f,g),g.drawImage(q,0,0,n,l),gb.__pool.release(f),d.__popMaskObject(a)}}}}}d=b.__canvasRenderer;a.__renderable&&a.__group.__tiles.length!=0&&(f=d.__getAlpha(a.__worldAlpha),f<=0||(g=
d.context,d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),h=Ia.__pool.get(),h.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(h,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!1),vj.renderTileContainer(a.__group,d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,f,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,h),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),Ia.__pool.release(h)));
a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else wk.clear(a,b);else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,N.startsWith(d,"data:")||N.startsWith(d,"blob:")?Yd.renderCanvas(c,b):
Yd.renderImage(c,b)):Yd.renderCanvas(c,b),b.__popMaskObject(c)):Yd.clear(c,b);b.__renderEvent(a)};wk.renderDrawableClear=function(a,b){wk.clear(a,b)};var jl=function(){};t["openfl.display._internal.DOMVideo"]=jl;jl.__name__="openfl.display._internal.DOMVideo";jl.clear=function(a,b){jh.clear(a,b);a.__active&&(b.element.removeChild(a.__stream.__video),a.__active=!1)};jl.render=function(a,b){a.stage!=null&&a.__stream!=null&&a.__worldVisible&&a.__renderable?(a.__active||(b.__initializeElement(a,a.__stream.__video),
a.__active=!0,a.__dirty=!0),a.__dirty&&(a.__stream.__video.width=a.__width|0,a.__stream.__video.height=a.__height|0,a.__dirty=!1),b.__updateClip(a),b.__applyStyle(a,!0,!0,!0)):jl.clear(a,b)};jl.renderDrawable=function(a,b){jl.render(a,b);b.__renderEvent(a)};jl.renderDrawableClear=function(a,b){jh.renderDrawableClear(a,b)};var wj=function(a){this.buffer=a;this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=xa.UNKNOWN};t["openfl.display._internal.DrawCommandReader"]=
wj;wj.__name__="openfl.display._internal.DrawCommandReader";wj.prototype={buffer:null,bPos:null,iiPos:null,iPos:null,ffPos:null,fPos:null,oPos:null,prev:null,tsPos:null,advance:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=
3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}},bool:function(a){return this.buffer.b[this.bPos+a]},destroy:function(){this.buffer=null;this.reset()},fArr:function(a){return this.buffer.ff[this.ffPos+
a]},float:function(a){return this.buffer.f[this.fPos+a]},iArr:function(a){return this.buffer.ii[this.iiPos+a]},int:function(a){return this.buffer.i[this.iPos+a]},obj:function(a){return this.buffer.o[this.oPos+a]},readBeginBitmapFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=
3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.BEGIN_BITMAP_FILL;return this},readBeginFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.BEGIN_FILL;return this},readBeginGradientFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.BEGIN_GRADIENT_FILL;return this},readBeginShaderFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.BEGIN_SHADER_FILL;return this},readCubicCurveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.CUBIC_CURVE_TO;return this},readCurveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.CURVE_TO;return this},readDrawCircle:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.DRAW_CIRCLE;return this},readDrawEllipse:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.DRAW_ELLIPSE;return this},readDrawQuads:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.DRAW_QUADS;return this},readDrawRect:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.DRAW_RECT;return this},readDrawRoundRect:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.DRAW_ROUND_RECT;return this},readDrawTriangles:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.DRAW_TRIANGLES;return this},readEndFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.END_FILL;return this},readLineBitmapStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.LINE_BITMAP_STYLE;return this},readLineGradientStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;
case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.LINE_GRADIENT_STYLE;return this},readLineStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.LINE_STYLE;return this},readLineTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.LINE_TO;return this},readMoveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.MOVE_TO;return this},readOverrideBlendMode:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.OVERRIDE_BLEND_MODE;return this},readOverrideMatrix:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.OVERRIDE_MATRIX;return this},readWindingEvenOdd:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.WINDING_EVEN_ODD;return this},readWindingNonZero:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=xa.WINDING_NON_ZERO;return this},reset:function(){this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0},skip:function(a){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;
case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=
a},__class__:wj};var xa=R["openfl.display._internal.DrawCommandType"]={__ename__:"openfl.display._internal.DrawCommandType",__constructs__:null,BEGIN_BITMAP_FILL:{_hx_name:"BEGIN_BITMAP_FILL",_hx_index:0,__enum__:"openfl.display._internal.DrawCommandType",toString:E},BEGIN_FILL:{_hx_name:"BEGIN_FILL",_hx_index:1,__enum__:"openfl.display._internal.DrawCommandType",toString:E},BEGIN_GRADIENT_FILL:{_hx_name:"BEGIN_GRADIENT_FILL",_hx_index:2,__enum__:"openfl.display._internal.DrawCommandType",toString:E},
BEGIN_SHADER_FILL:{_hx_name:"BEGIN_SHADER_FILL",_hx_index:3,__enum__:"openfl.display._internal.DrawCommandType",toString:E},CUBIC_CURVE_TO:{_hx_name:"CUBIC_CURVE_TO",_hx_index:4,__enum__:"openfl.display._internal.DrawCommandType",toString:E},CURVE_TO:{_hx_name:"CURVE_TO",_hx_index:5,__enum__:"openfl.display._internal.DrawCommandType",toString:E},DRAW_CIRCLE:{_hx_name:"DRAW_CIRCLE",_hx_index:6,__enum__:"openfl.display._internal.DrawCommandType",toString:E},DRAW_ELLIPSE:{_hx_name:"DRAW_ELLIPSE",_hx_index:7,
__enum__:"openfl.display._internal.DrawCommandType",toString:E},DRAW_QUADS:{_hx_name:"DRAW_QUADS",_hx_index:8,__enum__:"openfl.display._internal.DrawCommandType",toString:E},DRAW_RECT:{_hx_name:"DRAW_RECT",_hx_index:9,__enum__:"openfl.display._internal.DrawCommandType",toString:E},DRAW_ROUND_RECT:{_hx_name:"DRAW_ROUND_RECT",_hx_index:10,__enum__:"openfl.display._internal.DrawCommandType",toString:E},DRAW_TILES:{_hx_name:"DRAW_TILES",_hx_index:11,__enum__:"openfl.display._internal.DrawCommandType",
toString:E},DRAW_TRIANGLES:{_hx_name:"DRAW_TRIANGLES",_hx_index:12,__enum__:"openfl.display._internal.DrawCommandType",toString:E},END_FILL:{_hx_name:"END_FILL",_hx_index:13,__enum__:"openfl.display._internal.DrawCommandType",toString:E},LINE_BITMAP_STYLE:{_hx_name:"LINE_BITMAP_STYLE",_hx_index:14,__enum__:"openfl.display._internal.DrawCommandType",toString:E},LINE_GRADIENT_STYLE:{_hx_name:"LINE_GRADIENT_STYLE",_hx_index:15,__enum__:"openfl.display._internal.DrawCommandType",toString:E},LINE_STYLE:{_hx_name:"LINE_STYLE",
_hx_index:16,__enum__:"openfl.display._internal.DrawCommandType",toString:E},LINE_TO:{_hx_name:"LINE_TO",_hx_index:17,__enum__:"openfl.display._internal.DrawCommandType",toString:E},MOVE_TO:{_hx_name:"MOVE_TO",_hx_index:18,__enum__:"openfl.display._internal.DrawCommandType",toString:E},OVERRIDE_BLEND_MODE:{_hx_name:"OVERRIDE_BLEND_MODE",_hx_index:19,__enum__:"openfl.display._internal.DrawCommandType",toString:E},OVERRIDE_MATRIX:{_hx_name:"OVERRIDE_MATRIX",_hx_index:20,__enum__:"openfl.display._internal.DrawCommandType",
toString:E},WINDING_EVEN_ODD:{_hx_name:"WINDING_EVEN_ODD",_hx_index:21,__enum__:"openfl.display._internal.DrawCommandType",toString:E},WINDING_NON_ZERO:{_hx_name:"WINDING_NON_ZERO",_hx_index:22,__enum__:"openfl.display._internal.DrawCommandType",toString:E},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:23,__enum__:"openfl.display._internal.DrawCommandType",toString:E}};xa.__constructs__=[xa.BEGIN_BITMAP_FILL,xa.BEGIN_FILL,xa.BEGIN_GRADIENT_FILL,xa.BEGIN_SHADER_FILL,xa.CUBIC_CURVE_TO,xa.CURVE_TO,xa.DRAW_CIRCLE,
xa.DRAW_ELLIPSE,xa.DRAW_QUADS,xa.DRAW_RECT,xa.DRAW_ROUND_RECT,xa.DRAW_TILES,xa.DRAW_TRIANGLES,xa.END_FILL,xa.LINE_BITMAP_STYLE,xa.LINE_GRADIENT_STYLE,xa.LINE_STYLE,xa.LINE_TO,xa.MOVE_TO,xa.OVERRIDE_BLEND_MODE,xa.OVERRIDE_MATRIX,xa.WINDING_EVEN_ODD,xa.WINDING_NON_ZERO,xa.UNKNOWN];var hm=function(){};t["openfl.display._internal.FlashRenderer"]=hm;hm.__name__="openfl.display._internal.FlashRenderer";hm.register=function(a){hm.instances==null&&(hm.instances=Zz.toObjectMap(null,!0),Pa.get_current().stage.addEventListener("enterFrame",
hm.render,!1,-2147483648));hm.instances.set(a,!0)};hm.render=function(a){for(a=hm.instances.keys();a.hasNext();)a.next().__renderFlash()};var yy=function(){};t["openfl.display._internal.IDisplayObject"]=yy;yy.__name__="openfl.display._internal.IDisplayObject";yy.__isInterface__=!0;yy.prototype={__renderFlash:null,__class__:yy};var hn=function(){};t["openfl.display._internal.FlashTilemap"]=hn;hn.__name__="openfl.display._internal.FlashTilemap";hn.render=function(a){};hn.renderTileContainer=function(a,
b,c,d,f,g,h,n,l,q,u,v){};var Qm=function(a,b,c,d,f,g,h){h==null&&(h=.05);g==null&&(g=!1);wo.call(this,a,b,c,d,f,g,h);this.p_perm=[];for(b=0;b<512;)c=b++,this.p_perm[c]=Qm.P[c&255];this.base_factor=.03125;this.setSeed(a)};t["openfl.display._internal.PerlinNoise"]=Qm;Qm.__name__="openfl.display._internal.PerlinNoise";Qm.__super__=wo;Qm.prototype=I(wo.prototype,{p_perm:null,x_offset:null,y_offset:null,z_offset:null,base_factor:null,fill:function(a,b,c,d){var f=a.width,g=a.height,h=this.octaves,n=this.octaves_frequencies,
l=this.octaves_persistences,q=(1&this.channels)==1,u=(2&this.channels)==2,v=(4&this.channels)==4,z=0;q&&++z;u&&++z;v&&++z;var r=this.grayscale,F=this.stitch_threshold*f|0,J=this.stitch_threshold*g|0,L=b*this.base_factor+this.x_offset;c=c*this.base_factor+this.y_offset;d=d*this.base_factor+this.z_offset;for(var Q=0;Q<g;){var W=Q++;b=L;for(var ka=0,ha=f;ka<ha;){for(var ta=ka++,za=0,eb=0,db=0,Ra=0,vb=h;Ra<vb;){var bb=Ra++,Tb=n[bb];bb=l[bb];za+=this.noise(b*Tb,c*Tb,d*Tb)*bb;r||(1<z&&(eb+=this.noise((b+
1)*Tb,(c+1)*Tb,d*Tb)*bb),2<z&&(db+=this.noise((b+2)*Tb,(c+2)*Tb,d*Tb)*bb))}Ra=0;r?Ra=this.color(za,za,za):q&&u&&v?Ra=this.color(za,eb,db):q&&u?Ra=this.color(za,eb,null):q&&v?Ra=this.color(za,null,eb):u&&v?Ra=this.color(null,za,eb):q?Ra=this.color(za,null,null):u?Ra=this.color(null,za,null):v&&(Ra=this.color(null,null,za));this.stitch&&(Ra=this.stitching(a,Ra,ta,W,F,J,f,g));a.setPixel32(ta,W,Ra);b+=this.base_factor}c+=this.base_factor}},noise:function(a,b,c){var d=a-a%1,f=b-b%1,g=c-c%1;a-=d;b-=f;c-=
g;var h=(d|0)&255,n=(f|0)&255,l=(g|0)&255;g=this.fade(a);f=this.fade(b);d=this.fade(c);var q=this.p_perm[h]+n,u=this.p_perm[q]+l;q=this.p_perm[q+1]+l;n=this.p_perm[h+1]+n;h=this.p_perm[n]+l;var v=this.p_perm[n+1]+l,z=a-1,r=b-1,F=c-1,J=this.p_perm[v+1]&15;l=((J&1)==0?J<8?z:r:J<8?-z:-r)+((J&2)==0?J<4?r:J==12?z:F:J<4?-r:J==14?-z:-F);J=this.p_perm[q+1]&15;n=((J&1)==0?J<8?a:r:J<8?-a:-r)+((J&2)==0?J<4?r:J==12?a:F:J<4?-r:J==14?-a:-F);J=this.p_perm[h+1]&15;var L=((J&1)==0?J<8?z:b:J<8?-z:-b)+((J&2)==0?J<4?
b:J==12?z:F:J<4?-b:J==14?-z:-F);J=this.p_perm[u+1]&15;F=((J&1)==0?J<8?a:b:J<8?-a:-b)+((J&2)==0?J<4?b:J==12?a:F:J<4?-b:J==14?-a:-F);J=this.p_perm[v]&15;v=((J&1)==0?J<8?z:r:J<8?-z:-r)+((J&2)==0?J<4?r:J==12?z:c:J<4?-r:J==14?-z:-c);J=this.p_perm[q]&15;q=((J&1)==0?J<8?a:r:J<8?-a:-r)+((J&2)==0?J<4?r:J==12?a:c:J<4?-r:J==14?-a:-c);J=this.p_perm[h]&15;h=((J&1)==0?J<8?z:b:J<8?-z:-b)+((J&2)==0?J<4?b:J==12?z:c:J<4?-b:J==14?-z:-c);J=this.p_perm[u]&15;a=((J&1)==0?J<8?a:b:J<8?-a:-b)+((J&2)==0?J<4?b:J==12?a:c:J<
4?-b:J==14?-a:-c);F+=g*(L-F);a+=g*(h-a);a+=f*(q+g*(v-q)-a);return a+d*(F+f*(n+g*(l-n)-F)-a)},setSeed:function(a){this.x_offset=a=a*16807%2147483647|0;this.y_offset=a=a*16807%2147483647|0;this.z_offset=a*16807%2147483647|0},__class__:Qm});var jn=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);f==null&&(f=!1);d==null&&(d=0);c==null&&(c=2);b==null&&(b=5);a==null&&(a=0);this.wrap=a;this.filter=b;this.mipfilter=c;this.lodBias=d;this.ignoreSampler=f;this.centroid=g;this.textureAlpha=h};t["openfl.display._internal.SamplerState"]=
jn;jn.__name__="openfl.display._internal.SamplerState";jn.prototype={centroid:null,filter:null,ignoreSampler:null,lodBias:null,mipfilter:null,mipmapGenerated:null,textureAlpha:null,wrap:null,clone:function(){var a=new jn(this.wrap,this.filter,this.mipfilter,this.lodBias,this.ignoreSampler,this.centroid,this.textureAlpha);a.mipmapGenerated=this.mipmapGenerated;return a},copyFrom:function(a){a==null||a.ignoreSampler||(this.wrap=a.wrap,this.filter=a.filter,this.mipfilter=a.mipfilter,this.lodBias=a.lodBias,
this.centroid=a.centroid,this.textureAlpha=a.textureAlpha)},equals:function(a){return a==null?!1:this.wrap==a.wrap&&this.filter==a.filter&&this.mipfilter==a.mipfilter&&this.lodBias==a.lodBias?this.textureAlpha==a.textureAlpha:!1},__class__:jn};var Vu=function(){this.inputRefs=[];this.inputFilter=[];this.inputMipFilter=[];this.inputs=[];this.inputWrap=[];this.overrideIntNames=[];this.overrideIntValues=[];this.overrideFloatNames=[];this.overrideFloatValues=[];this.overrideBoolNames=[];this.overrideBoolValues=
[];this.paramLengths=[];this.paramPositions=[];this.paramRefs_Bool=[];this.paramRefs_Float=[];this.paramRefs_Int=[];this.paramTypes=[]};t["openfl.display._internal.ShaderBuffer"]=Vu;Vu.__name__="openfl.display._internal.ShaderBuffer";Vu.prototype={inputCount:null,inputRefs:null,inputFilter:null,inputMipFilter:null,inputs:null,inputWrap:null,overrideBoolCount:null,overrideBoolNames:null,overrideBoolValues:null,overrideFloatCount:null,overrideFloatNames:null,overrideFloatValues:null,overrideIntCount:null,
overrideIntNames:null,overrideIntValues:null,paramBoolCount:null,paramCount:null,paramData:null,paramDataBuffer:null,paramDataLength:null,paramFloatCount:null,paramIntCount:null,paramLengths:null,paramPositions:null,paramRefs_Bool:null,paramRefs_Float:null,paramRefs_Int:null,paramTypes:null,shader:null,addBoolOverride:function(a,b){this.overrideBoolNames[this.overrideBoolCount]=a;this.overrideBoolValues[this.overrideBoolCount]=b;this.overrideBoolCount++},addFloatOverride:function(a,b){this.overrideFloatNames[this.overrideFloatCount]=
a;this.overrideFloatValues[this.overrideFloatCount]=b;this.overrideFloatCount++},addIntOverride:function(a,b){this.overrideIntNames[this.overrideIntCount]=a;this.overrideIntValues[this.overrideIntCount]=b;this.overrideIntCount++},clearOverride:function(){this.overrideBoolCount=this.overrideFloatCount=this.overrideIntCount=0},update:function(a){this.paramIntCount=this.paramFloatCount=this.paramDataLength=this.paramCount=this.paramBoolCount=this.overrideBoolCount=this.overrideFloatCount=this.overrideIntCount=
this.inputCount=0;this.shader=null;if(a!=null){a.__init();this.inputCount=a.__inputBitmapData.length;for(var b,c=0,d=this.inputCount;c<d;){var f=c++;b=a.__inputBitmapData[f];this.inputs[f]=b.input;this.inputFilter[f]=b.filter;this.inputMipFilter[f]=b.mipFilter;this.inputRefs[f]=b;this.inputWrap[f]=b.wrap}b=a.__paramBool.length;var g=a.__paramFloat.length,h=a.__paramInt.length;this.paramCount=b+g+h;this.paramBoolCount=b;this.paramFloatCount=g;this.paramIntCount=h;var n=0;c=0;for(d=b;c<d;){f=c++;var l=
a.__paramBool[f];this.paramPositions[n]=this.paramDataLength;var q=l.value!=null?l.value.length:0;this.paramLengths[n]=q;this.paramDataLength+=q;this.paramTypes[n]=0;this.paramRefs_Bool[f]=l;++n}c=0;for(d=g;c<d;)f=c++,l=a.__paramFloat[f],this.paramPositions[n]=this.paramDataLength,q=l.value!=null?l.value.length:0,this.paramLengths[n]=q,this.paramDataLength+=q,this.paramTypes[n]=1,this.paramRefs_Float[f]=l,++n;c=0;for(d=h;c<d;)f=c++,l=a.__paramInt[f],this.paramPositions[n]=this.paramDataLength,q=l.value!=
null?l.value.length:0,this.paramLengths[n]=q,this.paramDataLength+=q,this.paramTypes[n]=2,this.paramRefs_Int[f]=l,++n;if(this.paramDataLength>0)if(this.paramData==null){c=this.paramDataLength;var u=l=n=h=d=null;this.paramData=c=c!=null?new Float32Array(c):d!=null?new Float32Array(d):h!=null?new Float32Array(h.__array):n!=null?new Float32Array(n):l!=null?u==null?new Float32Array(l,0):new Float32Array(l,0,u):null}else this.paramDataLength>this.paramData.length&&(c=this.paramDataLength,u=l=n=h=d=null,
c=c!=null?new Float32Array(c):d!=null?new Float32Array(d):h!=null?new Float32Array(h.__array):n!=null?new Float32Array(n):l!=null?u==null?new Float32Array(l,0):new Float32Array(l,0,u):null,c.set(this.paramData),this.paramData=c);c=u=l=n=h=0;for(d=this.paramCount;c<d;)if(f=c++,q=this.paramLengths[f],f<b){f=this.paramRefs_Bool[h];++h;for(var v=0;v<q;){var z=v++;this.paramData[u]=f.value[z]?1:0;++u}}else if(f<b+g)for(f=this.paramRefs_Float[n],++n,v=0;v<q;)z=v++,this.paramData[u]=f.value[z],++u;else for(f=
this.paramRefs_Int[l],++l,v=0;v<q;)z=v++,this.paramData[u]=f.value[z],++u;this.shader=a}},__class__:Vu};var Gq=function(){this.drawCallsCounter=this.currentDrawCallsNum=this.currentDrawCallsNum=this.drawCallsCounter=0};t["openfl.display._internal.stats.DrawCallCounter"]=Gq;Gq.__name__="openfl.display._internal.stats.DrawCallCounter";Gq.prototype={currentDrawCallsNum:null,drawCallsCounter:null,increment:function(){this.drawCallsCounter++},reset:function(){this.currentDrawCallsNum=this.drawCallsCounter;
this.drawCallsCounter=0},__class__:Gq};var dk=function(){};t["openfl.display._internal.stats.Context3DStats"]=dk;dk.__name__="openfl.display._internal.stats.Context3DStats";dk.incrementDrawCall=function(a){dk.drawCallsCounters.h[a].increment()};dk.resetDrawCalls=function(){for(var a=dk.drawCallsCounters.iterator();a.hasNext();)a.next().reset()};dk.totalDrawCalls=function(){for(var a=0,b=dk.drawCallsCounters.iterator();b.hasNext();){var c=b.next();a+=c.currentDrawCallsNum}return a};dk.contextDrawCalls=
function(a){return dk.drawCallsCounters.h[a].currentDrawCallsNum};var $c=function(a,b,c){this.profile=3;this.driverInfo="OpenGL (Direct blitting)";this.backBufferHeight=this.backBufferWidth=0;qa.call(this);this.__stage=a;this.__contextState=b;this.__stage3D=c;this.__context=a.window.context;this.gl=this.__context.webgl;this.__contextState==null&&(this.__contextState=new Hq);this.__state=new Hq;var d;this.__vertexConstants=new Float32Array(512);this.__fragmentConstants=new Float32Array(512);var f=
null;a=[1,1,1,1];var g=d=c=b=null;this.__positionScale=a=f!=null?new Float32Array(f):a!=null?new Float32Array(a):b!=null?new Float32Array(b.__array):c!=null?new Float32Array(c):d!=null?g==null?new Float32Array(d,0):new Float32Array(d,0,g):null;this.__programs=new G;$c.__glMaxViewportDims==-1&&($c.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS));this.maxBackBufferHeight=this.maxBackBufferWidth=$c.__glMaxViewportDims;$c.__glMaxTextureMaxAnisotropy==-1&&(a=this.gl.getExtension("EXT_texture_filter_anisotropic"),
a!=null&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||(a=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic")),a!=null&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||(a=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")),a!=null?($c.__glTextureMaxAnisotropy=a.TEXTURE_MAX_ANISOTROPY_EXT,$c.__glMaxTextureMaxAnisotropy=this.gl.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)):($c.__glTextureMaxAnisotropy=0,$c.__glMaxTextureMaxAnisotropy=
0));$c.__glDepthStencil==-1&&($c.__glDepthStencil=this.gl.DEPTH_STENCIL);$c.__glMemoryTotalAvailable==-1&&(a=this.gl.getExtension("NVX_gpu_memory_info"),a!=null&&($c.__glMemoryTotalAvailable=a.GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,$c.__glMemoryCurrentAvailable=a.GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX));$c.__driverInfo==null&&(a=this.gl.getParameter(this.gl.VENDOR),b=this.gl.getParameter(this.gl.VERSION),c=this.gl.getParameter(this.gl.RENDERER),d=this.gl.getParameter(this.gl.SHADING_LANGUAGE_VERSION),
$c.__driverInfo="OpenGL Vendor="+a+" Version="+b+" Renderer="+c+" GLSL="+d);this.driverInfo=$c.__driverInfo;this.__quadIndexBufferElements=16383;f=this.__quadIndexBufferCount=this.__quadIndexBufferElements*6;g=d=c=b=a=null;a=f!=null?new Uint16Array(f):a!=null?new Uint16Array(a):b!=null?new Uint16Array(b.__array):c!=null?new Uint16Array(c):d!=null?g==null?new Uint16Array(d,0):new Uint16Array(d,0,g):null;d=c=b=0;for(g=this.__quadIndexBufferElements;d<g;)d++,a[b]=c,a[b+1]=c+1,a[b+2]=c+2,a[b+3]=c+2,a[b+
4]=c+1,a[b+5]=c+3,b+=6,c+=4;this.__quadIndexBuffer=this.createIndexBuffer(this.__quadIndexBufferCount);this.__quadIndexBuffer.uploadFromTypedArray(a)};t["openfl.display3D.Context3D"]=$c;$c.__name__="openfl.display3D.Context3D";$c.__super__=qa;$c.prototype=I(qa.prototype,{backBufferHeight:null,backBufferWidth:null,driverInfo:null,maxBackBufferHeight:null,maxBackBufferWidth:null,profile:null,gl:null,__backBufferAntiAlias:null,__backBufferTexture:null,__backBufferWantsBestResolution:null,__backBufferWantsBestResolutionOnBrowserZoom:null,
__cleared:null,__context:null,__contextState:null,__renderStage3DProgram:null,__enableErrorChecking:null,__fragmentConstants:null,__frontBufferTexture:null,__positionScale:null,__present:null,__programs:null,__quadIndexBuffer:null,__quadIndexBufferCount:null,__quadIndexBufferElements:null,__stage:null,__stage3D:null,__state:null,__vertexConstants:null,clear:function(a,b,c,d,f,g,h){h==null&&(h=7);g==null&&(g=0);f==null&&(f=1);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.__clear(!1,
a,b,c,d,f,g,h)},__clear:function(a,b,c,d,f,g,h,n){n==null&&(n=7);h==null&&(h=0);g==null&&(g=1);f==null&&(f=1);d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);this.__flushGLFramebuffer();this.__flushGLViewport();var l=0;if((n&1)!=0){this.__state.renderToTexture==null&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared||(this.__stage.__renderer.__cleared=!0),this.__cleared=!0);l|=this.gl.COLOR_BUFFER_BIT;if(this.__contextState.colorMaskRed!=1||this.__contextState.colorMaskGreen!=1||this.__contextState.colorMaskBlue!=
1||this.__contextState.colorMaskAlpha!=1)this.gl.colorMask(!0,!0,!0,!0),this.__contextState.colorMaskRed=!0,this.__contextState.colorMaskGreen=!0,this.__contextState.colorMaskBlue=!0,this.__contextState.colorMaskAlpha=!0;this.gl.clearColor(b,c,d,f)}(n&2)!=0&&(l|=this.gl.DEPTH_BUFFER_BIT,this.__contextState.depthMask!=1&&(this.gl.depthMask(!0),this.__contextState.depthMask=!0),this.gl.clearDepth(g));(n&4)!=0&&(l|=this.gl.STENCIL_BUFFER_BIT,this.__contextState.stencilWriteMask!=255&&(this.gl.stencilMask(255),
this.__contextState.stencilWriteMask=255),this.gl.clearStencil(h),this.__contextState.stencilWriteMask=255);l!=0&&(a?this.__flushGLScissor():this.__setGLScissorTest(!1),this.gl.clear(l))},configureBackBuffer:function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);d==null&&(d=!0);f&&(a=a*this.__stage.window.__scale|0,b=b*this.__stage.window.__scale|0);if(this.__stage3D==null)this.backBufferWidth=a,this.backBufferHeight=b,this.__backBufferAntiAlias=c,this.__state.backBufferEnableDepthAndStencil=d,this.__backBufferWantsBestResolution=
f,this.__backBufferWantsBestResolutionOnBrowserZoom=g;else{if(this.__backBufferTexture==null||this.backBufferWidth!=a||this.backBufferHeight!=b){this.__backBufferTexture!=null&&this.__backBufferTexture.dispose();this.__frontBufferTexture!=null&&this.__frontBufferTexture.dispose();this.__backBufferTexture=this.createRectangleTexture(a,b,1,!0);this.__frontBufferTexture=this.createRectangleTexture(a,b,1,!0);this.__stage3D.__vertexBuffer==null&&(this.__stage3D.__vertexBuffer=this.createVertexBuffer(4,
5));var h=f?a:a*this.__stage.window.__scale|0,n=f?b:b*this.__stage.window.__scale|0;h=tb.toFloatVector(null,null,null,[h,n,0,1,1,0,n,0,0,1,h,0,0,1,0,0,0,0,0,0]);this.__stage3D.__vertexBuffer.uploadFromVector(h,0,20);this.__stage3D.__indexBuffer==null&&(this.__stage3D.__indexBuffer=this.createIndexBuffer(6),h=tb.toIntVector(null,null,null,[0,1,2,2,1,3]),this.__stage3D.__indexBuffer.uploadFromVector(h,0,6))}this.backBufferWidth=a;this.backBufferHeight=b;this.__backBufferAntiAlias=c;this.__state.backBufferEnableDepthAndStencil=
d;this.__backBufferWantsBestResolution=f;this.__backBufferWantsBestResolutionOnBrowserZoom=g;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(d,c,0);this.__frontBufferTexture.__getGLFramebuffer(d,c,0)}},createCubeTexture:function(a,b,c,d){d==null&&(d=0);return new Co(this,a,b,c,d)},createIndexBuffer:function(a,b){b==null&&(b=1);return new zy(this,a,b)},createProgram:function(a){a==null&&(a=0);return new Ay(this,a)},createRectangleTexture:function(a,b,c,d){return new Iq(this,
a,b,Jq.toString(c),d)},createTexture:function(a,b,c,d,f){f==null&&(f=0);return new kn(this,a,b,c,d,f)},createVertexBuffer:function(a,b,c){c==null&&(c=1);return new By(this,a,b,Cz.toString(c))},createVideoTexture:function(){return new wv(this)},dispose:function(a){this.gl=null;this.__dispose()},drawToBitmapData:function(a,b,c){if(a!=null)if(b=b!=null?b.__toLimeRectangle():new of(0,0,this.backBufferWidth,this.backBufferHeight),c=c!=null?c.__toLimeVector2():new Uf,this.__stage.context3D==this){if(this.__stage.window!=
null){if(this.__stage3D!=null){var d=-this.__stage3D.get_x()|0,f=-this.__stage3D.get_y()|0;c.x=d;c.y=f}f=this.__stage.window.readPixels();a.image.copyPixels(f,b,c)}}else if(this.__backBufferTexture!=null){d=this.__state.renderToTexture;this.setRenderToBackBuffer();this.__flushGLFramebuffer();this.__flushGLViewport();f=this.backBufferWidth*this.backBufferHeight*4;var g=f=f!=null?new Uint8Array(f):null;f=this.gl;f.readPixels(0,0,this.backBufferWidth,this.backBufferHeight,this.__backBufferTexture.__format,
this.gl.UNSIGNED_BYTE,g);f=new Oc(new sj(g,this.backBufferWidth,this.backBufferHeight,32,2));a.image.copyPixels(f,b,c);d!=null&&this.setRenderToTexture(d,this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,this.__state.renderToTextureSurfaceSelector)}},drawTriangles:function(a,b,c){c==null&&(c=-1);b==null&&(b=0);this.__state.renderToTexture==null&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());
this.__flushGL();this.__state.program!=null&&this.__state.program.__flush();c=c==-1?a.__numIndices:c*3;this.__bindGLElementArrayBuffer(a.__id);this.gl.drawElements(this.gl.TRIANGLES,c,this.gl.UNSIGNED_SHORT,b*2)},present:function(){this.setRenderToBackBuffer();if(this.__stage3D!=null&&this.__backBufferTexture!=null){this.__cleared||this.clear(0,0,0,0,1,0,1);var a=this.__backBufferTexture;this.__backBufferTexture=this.__frontBufferTexture;this.__frontBufferTexture=a;this.__state.__primaryGLFramebuffer=
this.__backBufferTexture.__getGLFramebuffer(this.__state.backBufferEnableDepthAndStencil,this.__backBufferAntiAlias,0);this.__cleared=!1}this.__present=!0},setBlendFactors:function(a,b){this.setBlendFactorsSeparate(a,b,a,b)},setBlendFactorsSeparate:function(a,b,c,d){this.__state.blendSourceRGBFactor=a;this.__state.blendDestinationRGBFactor=b;this.__state.blendSourceAlphaFactor=c;this.__state.blendDestinationAlphaFactor=d;this.__setGLBlendEquation(this.gl.FUNC_ADD)},setColorMask:function(a,b,c,d){this.__state.colorMaskRed=
a;this.__state.colorMaskGreen=b;this.__state.colorMaskBlue=c;this.__state.colorMaskAlpha=d},setCulling:function(a){this.__state.culling=a},setDepthTest:function(a,b){this.__state.depthMask=a;this.__state.depthCompareMode=b},setProgram:function(a){this.__state.program=a;this.__state.shader=null;if(a!=null)for(var b=0,c=a.__samplerStates.length;b<c;){var d=b++;this.__state.samplerStates[d]==null?this.__state.samplerStates[d]=a.__samplerStates[d].clone():this.__state.samplerStates[d].copyFrom(a.__samplerStates[d])}},
setProgramConstantsFromByteArray:function(a,b,c,d,f){if(c!=0&&this.__state.program!=null&&(this.__state.program==null||this.__state.program.__format!=1)){c==-1&&(c=(mc.get_length(d)>>>2)-f);var g=(a=a==1)?this.__vertexConstants:this.__fragmentConstants;d=mc.toBytes(d);var h=0;h==null&&(h=0);d=h==null?new Float32Array(d.b.bufferValue):new Float32Array(d.b.bufferValue,h);h=b*4;f=sb.toFloat(f)/sb.toFloat(4)|0;for(var n=0,l=c*4;n<l;){var q=n++;g[h+q]=d[f+q]}this.__state.program!=null&&this.__state.program.__markDirty(a,
b,c)}},setProgramConstantsFromMatrix:function(a,b,c,d){d==null&&(d=!1);if(this.__state.program!=null&&this.__state.program.__format==1)this.__flushGLProgram(),a=new Float32Array(16),a[0]=c.rawData.get(0),a[1]=c.rawData.get(1),a[2]=c.rawData.get(2),a[3]=c.rawData.get(3),a[4]=c.rawData.get(4),a[5]=c.rawData.get(5),a[6]=c.rawData.get(6),a[7]=c.rawData.get(7),a[8]=c.rawData.get(8),a[9]=c.rawData.get(9),a[10]=c.rawData.get(10),a[11]=c.rawData.get(11),a[12]=c.rawData.get(12),a[13]=c.rawData.get(13),a[14]=
c.rawData.get(14),a[15]=c.rawData.get(15),yd.uniformMatrix4fv(this.gl,b,d,a);else{var f=(a=a==1)?this.__vertexConstants:this.__fragmentConstants;c=c.rawData;var g=b*4;d?(f[g++]=c.get(0),f[g++]=c.get(4),f[g++]=c.get(8),f[g++]=c.get(12),f[g++]=c.get(1),f[g++]=c.get(5),f[g++]=c.get(9),f[g++]=c.get(13),f[g++]=c.get(2),f[g++]=c.get(6),f[g++]=c.get(10),f[g++]=c.get(14),f[g++]=c.get(3),f[g++]=c.get(7),f[g++]=c.get(11)):(f[g++]=c.get(0),f[g++]=c.get(1),f[g++]=c.get(2),f[g++]=c.get(3),f[g++]=c.get(4),f[g++]=
c.get(5),f[g++]=c.get(6),f[g++]=c.get(7),f[g++]=c.get(8),f[g++]=c.get(9),f[g++]=c.get(10),f[g++]=c.get(11),f[g++]=c.get(12),f[g++]=c.get(13),f[g++]=c.get(14));f[g++]=c.get(15);this.__state.program!=null&&this.__state.program.__markDirty(a,b,4)}},setProgramConstantsFromVector:function(a,b,c,d){d==null&&(d=-1);if(d!=0&&(this.__state.program==null||this.__state.program.__format!=1)){d==-1&&(d=c.get_length()>>2);for(var f=(a=a==1)?this.__vertexConstants:this.__fragmentConstants,g=0,h=b*4,n=0,l=d;n<l;)n++,
f[h++]=c.get(g++),f[h++]=c.get(g++),f[h++]=c.get(g++),f[h++]=c.get(g++);this.__state.program!=null&&this.__state.program.__markDirty(a,b,d)}},setRenderToBackBuffer:function(){this.__state.renderToTexture=null},setRenderToTexture:function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=!1);this.__state.renderToTexture=a;this.__state.renderToTextureDepthStencil=b;this.__state.renderToTextureAntiAlias=c;this.__state.renderToTextureSurfaceSelector=d},setSamplerStateAt:function(a,b,c,d){this.__state.samplerStates[a]==
null&&(this.__state.samplerStates[a]=new jn);a=this.__state.samplerStates[a];a.wrap=b;a.filter=c;a.mipfilter=d},setScissorRectangle:function(a){a!=null?(this.__state.scissorEnabled=!0,this.__state.scissorRectangle.copyFrom(a)):this.__state.scissorEnabled=!1},setStencilActions:function(a,b,c,d,f){f==null&&(f=5);d==null&&(d=5);c==null&&(c=5);b==null&&(b=0);a==null&&(a=2);this.__state.stencilTriangleFace=a;this.__state.stencilCompareMode=b;this.__state.stencilPass=c;this.__state.stencilDepthFail=d;this.__state.stencilFail=
f},setStencilReferenceValue:function(a,b,c){c==null&&(c=255);b==null&&(b=255);this.__state.stencilReferenceValue=a;this.__state.stencilReadMask=b;this.__state.stencilWriteMask=c},setTextureAt:function(a,b){this.__state.textures[a]=b},setVertexBufferAt:function(a,b,c,d){d==null&&(d=4);c==null&&(c=0);if(!(a<0))if(b==null)this.gl.disableVertexAttribArray(a),this.__bindGLArrayBuffer(null);else switch(this.__bindGLArrayBuffer(b.__id),this.gl.enableVertexAttribArray(a),c*=4,d){case 0:this.gl.vertexAttribPointer(a,
4,this.gl.UNSIGNED_BYTE,!0,b.__stride,c);break;case 1:this.gl.vertexAttribPointer(a,1,this.gl.FLOAT,!1,b.__stride,c);break;case 2:this.gl.vertexAttribPointer(a,2,this.gl.FLOAT,!1,b.__stride,c);break;case 3:this.gl.vertexAttribPointer(a,3,this.gl.FLOAT,!1,b.__stride,c);break;case 4:this.gl.vertexAttribPointer(a,4,this.gl.FLOAT,!1,b.__stride,c);break;default:throw new ob;}},__bindGLArrayBuffer:function(a){this.__contextState.__currentGLArrayBuffer!=a&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a),this.__contextState.__currentGLArrayBuffer=
a)},__bindGLElementArrayBuffer:function(a){this.__contextState.__currentGLElementArrayBuffer!=a&&(this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,a),this.__contextState.__currentGLElementArrayBuffer=a)},__bindGLFramebuffer:function(a){this.__contextState.__currentGLFramebuffer!=a&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,a),this.__contextState.__currentGLFramebuffer=a)},__bindGLTexture2D:function(a){this.gl.bindTexture(this.gl.TEXTURE_2D,a);this.__contextState.__currentGLTexture2D=a},__bindGLTextureCubeMap:function(a){this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP,
a);this.__contextState.__currentGLTextureCubeMap=a},__dispose:function(){this.driverInfo+=" (Disposed)";this.__stage3D!=null&&(this.__stage3D.__indexBuffer=null,this.__stage3D.__vertexBuffer=null,this.__stage3D=this.__stage3D.context3D=null);this.__positionScale=this.__frontBufferTexture=this.__fragmentConstants=this.__renderStage3DProgram=this.__context=this.__backBufferTexture=null;this.__present=!1;this.__vertexConstants=this.__stage=this.__quadIndexBuffer=null},__drawTriangles:function(a,b){a==
null&&(a=0);this.__state.renderToTexture==null&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());this.__flushGL();this.__state.program!=null&&this.__state.program.__flush();this.gl.drawArrays(this.gl.TRIANGLES,a,b)},__flushGL:function(){this.__flushGLProgram();this.__flushGLFramebuffer();this.__flushGLViewport();this.__flushGLBlend();if(this.__contextState.colorMaskRed!=this.__state.colorMaskRed||this.__contextState.colorMaskGreen!=
this.__state.colorMaskGreen||this.__contextState.colorMaskBlue!=this.__state.colorMaskBlue||this.__contextState.colorMaskAlpha!=this.__state.colorMaskAlpha)this.gl.colorMask(this.__state.colorMaskRed,this.__state.colorMaskGreen,this.__state.colorMaskBlue,this.__state.colorMaskAlpha),this.__contextState.colorMaskRed=this.__state.colorMaskRed,this.__contextState.colorMaskGreen=this.__state.colorMaskGreen,this.__contextState.colorMaskBlue=this.__state.colorMaskBlue,this.__contextState.colorMaskAlpha=
this.__state.colorMaskAlpha;this.__flushGLCulling();this.__flushGLDepth();this.__flushGLScissor();this.__flushGLStencil();this.__flushGLTextures()},__flushGLBlend:function(){if(this.__contextState.blendDestinationRGBFactor!=this.__state.blendDestinationRGBFactor||this.__contextState.blendSourceRGBFactor!=this.__state.blendSourceRGBFactor||this.__contextState.blendDestinationAlphaFactor!=this.__state.blendDestinationAlphaFactor||this.__contextState.blendSourceAlphaFactor!=this.__state.blendSourceAlphaFactor)this.__setGLBlend(!0),
this.__state.blendDestinationRGBFactor==this.__state.blendDestinationAlphaFactor&&this.__state.blendSourceRGBFactor==this.__state.blendSourceAlphaFactor?this.gl.blendFunc(this.__getGLBlend(this.__state.blendSourceRGBFactor),this.__getGLBlend(this.__state.blendDestinationRGBFactor)):this.gl.blendFuncSeparate(this.__getGLBlend(this.__state.blendSourceRGBFactor),this.__getGLBlend(this.__state.blendDestinationRGBFactor),this.__getGLBlend(this.__state.blendSourceAlphaFactor),this.__getGLBlend(this.__state.blendDestinationAlphaFactor)),
this.__contextState.blendDestinationRGBFactor=this.__state.blendDestinationRGBFactor,this.__contextState.blendSourceRGBFactor=this.__state.blendSourceRGBFactor,this.__contextState.blendDestinationAlphaFactor=this.__state.blendDestinationAlphaFactor,this.__contextState.blendSourceAlphaFactor=this.__state.blendSourceAlphaFactor},__flushGLColor:function(){if(this.__contextState.colorMaskRed!=this.__state.colorMaskRed||this.__contextState.colorMaskGreen!=this.__state.colorMaskGreen||this.__contextState.colorMaskBlue!=
this.__state.colorMaskBlue||this.__contextState.colorMaskAlpha!=this.__state.colorMaskAlpha)this.gl.colorMask(this.__state.colorMaskRed,this.__state.colorMaskGreen,this.__state.colorMaskBlue,this.__state.colorMaskAlpha),this.__contextState.colorMaskRed=this.__state.colorMaskRed,this.__contextState.colorMaskGreen=this.__state.colorMaskGreen,this.__contextState.colorMaskBlue=this.__state.colorMaskBlue,this.__contextState.colorMaskAlpha=this.__state.colorMaskAlpha},__flushGLCulling:function(){if(this.__contextState.culling!=
this.__state.culling){if(this.__state.culling==3)this.__setGLCullFace(!1);else switch(this.__setGLCullFace(!0),this.__state.culling){case 0:this.gl.cullFace(this.gl.BACK);break;case 1:this.gl.cullFace(this.gl.FRONT);break;case 2:this.gl.cullFace(this.gl.FRONT_AND_BACK);break;case 3:break;default:throw new ob;}this.__contextState.culling=this.__state.culling}},__flushGLDepth:function(){var a=this.__state.depthMask&&(this.__state.renderToTexture!=null?this.__state.renderToTextureDepthStencil:this.__state.backBufferEnableDepthAndStencil);
this.__contextState.depthMask!=a&&(this.gl.depthMask(a),this.__contextState.depthMask=a);if(this.__contextState.depthCompareMode!=this.__state.depthCompareMode){switch(this.__state.depthCompareMode){case 0:this.gl.depthFunc(this.gl.ALWAYS);break;case 1:this.gl.depthFunc(this.gl.EQUAL);break;case 2:this.gl.depthFunc(this.gl.GREATER);break;case 3:this.gl.depthFunc(this.gl.GEQUAL);break;case 4:this.gl.depthFunc(this.gl.LESS);break;case 5:this.gl.depthFunc(this.gl.LEQUAL);break;case 6:this.gl.depthFunc(this.gl.NEVER);
break;case 7:this.gl.depthFunc(this.gl.NOTEQUAL);break;default:throw new ob;}this.__contextState.depthCompareMode=this.__state.depthCompareMode}},__flushGLFramebuffer:function(){if(this.__state.renderToTexture!=null){if(this.__contextState.renderToTexture!=this.__state.renderToTexture||this.__contextState.renderToTextureSurfaceSelector!=this.__state.renderToTextureSurfaceSelector){var a=this.__state.renderToTexture.__getGLFramebuffer(this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,
this.__state.renderToTextureSurfaceSelector);this.__bindGLFramebuffer(a);this.__contextState.renderToTexture=this.__state.renderToTexture;this.__contextState.renderToTextureAntiAlias=this.__state.renderToTextureAntiAlias;this.__contextState.renderToTextureDepthStencil=this.__state.renderToTextureDepthStencil;this.__contextState.renderToTextureSurfaceSelector=this.__state.renderToTextureSurfaceSelector}this.__setGLDepthTest(this.__state.renderToTextureDepthStencil);this.__setGLStencilTest(this.__state.renderToTextureDepthStencil);
this.__setGLFrontFace(!0)}else{if(this.__stage==null&&this.backBufferWidth==0&&this.backBufferHeight==0)throw new Sd("Context3D backbuffer has not been configured");if(this.__contextState.renderToTexture!=null||this.__contextState.__currentGLFramebuffer!=this.__state.__primaryGLFramebuffer||this.__contextState.backBufferEnableDepthAndStencil!=this.__state.backBufferEnableDepthAndStencil)this.__bindGLFramebuffer(this.__state.__primaryGLFramebuffer),this.__contextState.renderToTexture=null,this.__contextState.backBufferEnableDepthAndStencil=
this.__state.backBufferEnableDepthAndStencil;this.__setGLDepthTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLStencilTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLFrontFace(this.__stage.context3D!=this)}},__flushGLProgram:function(){var a=this.__state.shader,b=this.__state.program;this.__contextState.shader!=a&&(this.__contextState.shader!=null&&this.__contextState.shader.__disable(),a!=null&&a.__enable(),this.__contextState.shader=a);this.__contextState.program!=b&&
(this.__contextState.program!=null&&this.__contextState.program.__disable(),b!=null&&b.__enable(),this.__contextState.program=b);b!=null&&b.__format==0&&(this.__positionScale[1]=this.__stage.context3D==this&&this.__state.renderToTexture==null?1:-1,b.__setPositionScale(this.__positionScale))},__flushGLScissor:function(){if(this.__state.scissorEnabled){this.__setGLScissorTest(!0);this.__contextState.scissorEnabled=!0;var a=this.__state.scissorRectangle.x|0,b=this.__state.scissorRectangle.y|0,c=this.__state.scissorRectangle.width|
0,d=this.__state.scissorRectangle.height|0;this.__backBufferWantsBestResolution&&(a=this.__state.scissorRectangle.x*this.__stage.window.__scale|0,b=this.__state.scissorRectangle.y*this.__stage.window.__scale|0,c=this.__state.scissorRectangle.width*this.__stage.window.__scale|0,d=this.__state.scissorRectangle.height*this.__stage.window.__scale|0);this.__state.renderToTexture==null&&this.__stage3D==null&&(b=(this.__stage.window.__height*this.__stage.window.__scale|0)-d-b);if(this.__contextState.scissorRectangle.x!=
a||this.__contextState.scissorRectangle.y!=b||this.__contextState.scissorRectangle.width!=c||this.__contextState.scissorRectangle.height!=d)this.gl.scissor(a,b,c,d),this.__contextState.scissorRectangle.setTo(a,b,c,d)}else this.__contextState.scissorEnabled!=this.__state.scissorEnabled&&(this.__setGLScissorTest(!1),this.__contextState.scissorEnabled=!1)},__flushGLStencil:function(){if(this.__contextState.stencilTriangleFace!=this.__state.stencilTriangleFace||this.__contextState.stencilPass!=this.__state.stencilPass||
this.__contextState.stencilDepthFail!=this.__state.stencilDepthFail||this.__contextState.stencilFail!=this.__state.stencilFail)this.gl.stencilOpSeparate(this.__getGLTriangleFace(this.__state.stencilTriangleFace),this.__getGLStencilAction(this.__state.stencilFail),this.__getGLStencilAction(this.__state.stencilDepthFail),this.__getGLStencilAction(this.__state.stencilPass)),this.__contextState.stencilTriangleFace=this.__state.stencilTriangleFace,this.__contextState.stencilPass=this.__state.stencilPass,
this.__contextState.stencilDepthFail=this.__state.stencilDepthFail,this.__contextState.stencilFail=this.__state.stencilFail;this.__contextState.stencilWriteMask!=this.__state.stencilWriteMask&&(this.gl.stencilMask(this.__state.stencilWriteMask),this.__contextState.stencilWriteMask=this.__state.stencilWriteMask);if(this.__contextState.stencilCompareMode!=this.__state.stencilCompareMode||this.__contextState.stencilReferenceValue!=this.__state.stencilReferenceValue||this.__contextState.stencilReadMask!=
this.__state.stencilReadMask)this.gl.stencilFunc(this.__getGLCompareMode(this.__state.stencilCompareMode),this.__state.stencilReferenceValue,this.__state.stencilReadMask),this.__contextState.stencilCompareMode=this.__state.stencilCompareMode,this.__contextState.stencilReferenceValue=this.__state.stencilReferenceValue,this.__contextState.stencilReadMask=this.__state.stencilReadMask},__flushGLTextures:function(){for(var a=0,b,c,d=0,f=this.__state.textures.length;d<f;){var g=d++;b=this.__state.textures[g];
c=this.__state.samplerStates[g];c==null&&(this.__state.samplerStates[g]=new jn,c=this.__state.samplerStates[g]);this.gl.activeTexture(this.gl.TEXTURE0+a);b!=null?(b.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__getTexture()):this.__bindGLTextureCubeMap(b.__getTexture()),this.__contextState.textures[g]=b,b.__setSamplerState(c)):this.__bindGLTexture2D(null);this.__state.program!=null&&this.__state.program.__format==0&&c.textureAlpha&&(this.gl.activeTexture(this.gl.TEXTURE0+a+4),b!=
null&&b.__alphaTexture!=null?(b.__alphaTexture.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__alphaTexture.__getTexture()):this.__bindGLTextureCubeMap(b.__alphaTexture.__getTexture()),b.__alphaTexture.__setSamplerState(c),this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,1)):(this.__bindGLTexture2D(null),this.__state.program.__agalAlphaSamplerEnabled[a]!=null&&this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,0)));++a}},__flushGLViewport:function(){if(this.__state.renderToTexture==
null)if(this.__stage.context3D==this){var a=this.backBufferWidth,b=this.backBufferHeight;this.__stage3D!=null||this.__backBufferWantsBestResolution||(a=this.backBufferWidth*this.__stage.window.__scale|0,b=this.backBufferHeight*this.__stage.window.__scale|0);var c=this.__stage3D==null?0:this.__stage3D.get_x()|0,d=this.__stage.window.__height*this.__stage.window.__scale-b-(this.__stage3D==null?0:this.__stage3D.get_y())|0;this.gl.viewport(c,d,a,b)}else this.gl.viewport(0,0,this.backBufferWidth,this.backBufferHeight);
else b=a=0,this.__state.renderToTexture instanceof kn?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Iq?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Co&&(b=this.__state.renderToTexture,b=a=b.__size),this.gl.viewport(0,0,a,b)},__getGLBlend:function(a){switch(a){case 0:return this.gl.DST_ALPHA;case 1:return this.gl.DST_COLOR;case 2:return this.gl.ONE;case 3:return this.gl.ONE_MINUS_DST_ALPHA;case 4:return this.gl.ONE_MINUS_DST_COLOR;
case 5:return this.gl.ONE_MINUS_SRC_ALPHA;case 6:return this.gl.ONE_MINUS_SRC_COLOR;case 7:return this.gl.SRC_ALPHA;case 8:return this.gl.SRC_COLOR;case 9:return this.gl.ZERO;default:throw new ob;}},__getGLCompareMode:function(a){switch(a){case 0:return this.gl.ALWAYS;case 1:return this.gl.EQUAL;case 2:return this.gl.GREATER;case 3:return this.gl.GEQUAL;case 4:return this.gl.LESS;case 5:return this.gl.LEQUAL;case 6:return this.gl.NEVER;case 7:return this.gl.NOTEQUAL;default:return this.gl.EQUAL}},
__getGLStencilAction:function(a){switch(a){case 0:return this.gl.DECR;case 1:return this.gl.DECR_WRAP;case 2:return this.gl.INCR;case 3:return this.gl.INCR_WRAP;case 4:return this.gl.INVERT;case 5:return this.gl.KEEP;case 6:return this.gl.REPLACE;case 7:return this.gl.ZERO;default:return this.gl.KEEP}},__getGLTriangleFace:function(a){switch(a){case 0:return this.gl.BACK;case 1:return this.gl.FRONT;case 2:return this.gl.FRONT_AND_BACK;case 3:return this.gl.NONE;default:return this.gl.FRONT_AND_BACK}},
__renderStage3D:function(a){var b=a.context3D;if(b!=null&&b!=this&&b.__frontBufferTexture!=null&&a.visible&&this.backBufferHeight>0&&this.backBufferWidth>0){if(this.__renderStage3DProgram==null){var c=new va;c.assemble(Dz.toString(1),"m44 op, va0, vc0\nmov v0, va1");var d=new va;d.assemble(Dz.toString(0),"tex ft1, v0, fs0 <2d,nearest,nomip>\nmov oc, ft1");this.__renderStage3DProgram=this.createProgram();this.__renderStage3DProgram.upload(c.agalcode,d.agalcode)}this.setProgram(this.__renderStage3DProgram);
this.setBlendFactors(2,9);this.setColorMask(!0,!0,!0,!0);this.setCulling(3);this.setDepthTest(!1,0);this.setStencilActions();this.setStencilReferenceValue(0,0,0);this.setScissorRectangle(null);this.setTextureAt(0,b.__frontBufferTexture);this.setVertexBufferAt(0,a.__vertexBuffer,0,3);this.setVertexBufferAt(1,a.__vertexBuffer,3,2);this.setProgramConstantsFromMatrix(1,0,a.__renderTransform,!0);this.drawTriangles(a.__indexBuffer);this.__present=!0}},__setGLBlend:function(a){this.__contextState.__enableGLBlend!=
a&&(a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this.__contextState.__enableGLBlend=a)},__setGLBlendEquation:function(a){this.__contextState.__glBlendEquation!=a&&(this.gl.blendEquation(a),this.__contextState.__glBlendEquation=a)},__setGLCullFace:function(a){this.__contextState.__enableGLCullFace!=a&&(a?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this.__contextState.__enableGLCullFace=a)},__setGLDepthTest:function(a){this.__contextState.__enableGLDepthTest!=
a&&(a?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this.__contextState.__enableGLDepthTest=a)},__setGLFrontFace:function(a){this.__contextState.__frontFaceGLCCW!=a&&(this.gl.frontFace(a?this.gl.CCW:this.gl.CW),this.__contextState.__frontFaceGLCCW=a)},__setGLScissorTest:function(a){this.__contextState.__enableGLScissorTest!=a&&(a?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this.__contextState.__enableGLScissorTest=a)},__setGLStencilTest:function(a){this.__contextState.__enableGLStencilTest!=
a&&(a?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this.__contextState.__enableGLStencilTest=a)},get_enableErrorChecking:function(){return this.__enableErrorChecking},set_enableErrorChecking:function(a){return this.__enableErrorChecking=a},get_totalGPUMemory:function(){if($c.__glMemoryCurrentAvailable!=-1){var a=this.gl.getParameter($c.__glMemoryCurrentAvailable),b=this.gl.getParameter($c.__glMemoryTotalAvailable);if(b>0)return(b-a)*1024}return 0},__class__:$c,__properties__:{get_totalGPUMemory:"get_totalGPUMemory",
set_enableErrorChecking:"set_enableErrorChecking",get_enableErrorChecking:"get_enableErrorChecking"}});var Cz={fromString:function(a){switch(a){case "dynamicDraw":return 0;case "staticDraw":return 1;default:return null}},toString:function(a){switch(a){case 0:return"dynamicDraw";case 1:return"staticDraw";default:return null}}},Dz={fromString:function(a){switch(a){case "fragment":return 0;case "vertex":return 1;default:return null}},toString:function(a){switch(a){case 0:return"fragment";case 1:return"vertex";
default:return null}}},Jq={fromString:function(a){switch(a){case "bgrPacked565":return 0;case "bgra":return 1;case "bgraPacked4444":return 2;case "compressed":return 3;case "compressedAlpha":return 4;case "rgbaHalfFloat":return 5;default:return null}},toString:function(a){switch(a){case 0:return"bgrPacked565";case 1:return"bgra";case 2:return"bgraPacked4444";case 3:return"compressed";case 4:return"compressedAlpha";case 5:return"rgbaHalfFloat";default:return null}}},zy=function(a,b,c){this.__context=
a;this.__numIndices=b;a=this.__context.gl;this.__id=a.createBuffer();this.__usage=c==0?a.DYNAMIC_DRAW:a.STATIC_DRAW};t["openfl.display3D.IndexBuffer3D"]=zy;zy.__name__="openfl.display3D.IndexBuffer3D";zy.prototype={__context:null,__id:null,__memoryUsage:null,__numIndices:null,__tempUInt16Array:null,__usage:null,dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,b,c,d){b+=c*2;a=mc.toArrayBuffer(a);b==null&&(b=0);d=a!=null?d==null?new Uint16Array(a,b):new Uint16Array(a,
b,d):null;this.uploadFromTypedArray(d)},uploadFromTypedArray:function(a,b){a!=null&&(b=this.__context.gl,this.__context.__bindGLElementArrayBuffer(this.__id),yd.bufferData(b,b.ELEMENT_ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(a!=null){var d=b+c,f=this.__tempUInt16Array;if(this.__tempUInt16Array==null||this.__tempUInt16Array.length<c)this.__tempUInt16Array=c!=null?new Uint16Array(c):null,f!=null&&this.__tempUInt16Array.set(f);for(c=b;c<d;)f=c++,this.__tempUInt16Array[f-b]=
a.get(f);this.uploadFromTypedArray(this.__tempUInt16Array)}},__class__:zy};var Ay=function(a,b){this.__context=a;this.__format=b;this.__format==0?(this.__agalSamplerUsageMask=0,this.__agalUniforms=new hb,this.__agalSamplerUniforms=new hb,this.__agalAlphaSamplerUniforms=new hb,this.__agalAlphaSamplerEnabled=[]):(this.__glslAttribNames=[],this.__glslAttribTypes=[],this.__glslSamplerNames=[],this.__glslUniformLocations=[],this.__glslUniformNames=[],this.__glslUniformTypes=[]);this.__samplerStates=[]};
t["openfl.display3D.Program3D"]=Ay;Ay.__name__="openfl.display3D.Program3D";Ay.prototype={__agalAlphaSamplerEnabled:null,__agalAlphaSamplerUniforms:null,__agalFragmentUniformMap:null,__agalPositionScale:null,__agalSamplerUniforms:null,__agalSamplerUsageMask:null,__agalUniforms:null,__agalVertexUniformMap:null,__context:null,__format:null,__glFragmentShader:null,__glFragmentSource:null,__glProgram:null,__glslAttribNames:null,__glslAttribTypes:null,__glslSamplerNames:null,__glslUniformLocations:null,
__glslUniformNames:null,__glslUniformTypes:null,__glVertexShader:null,__glVertexSource:null,__samplerStates:null,dispose:function(){this.__deleteShaders()},getAttributeIndex:function(a){if(this.__format==0)return N.startsWith(a,"va")?H.parseInt(a.substring(2)):-1;for(var b=0,c=this.__glslAttribNames.length;b<c;){var d=b++;if(this.__glslAttribNames[d]==a)return d}return-1},getConstantIndex:function(a){if(this.__format==0)return N.startsWith(a,"vc")?H.parseInt(a.substring(2)):N.startsWith(a,"fc")?H.parseInt(a.substring(2)):
-1;for(var b=0,c=this.__glslUniformNames.length;b<c;){var d=b++;if(this.__glslUniformNames[d]==a)return this.__glslUniformLocations[d]}return-1},upload:function(a,b){if(this.__format==0){var c=[];a=Yg.convertToGLSL(a,null);b=Yg.convertToGLSL(b,c);Vb.level==5&&(Vb.info(a,{fileName:"openfl/display3D/Program3D.hx",lineNumber:399,className:"openfl.display3D.Program3D",methodName:"upload"}),Vb.info(b,{fileName:"openfl/display3D/Program3D.hx",lineNumber:400,className:"openfl.display3D.Program3D",methodName:"upload"}));
this.__deleteShaders();this.__uploadFromGLSL(a,b);this.__buildAGALUniformList();b=0;for(a=c.length;b<a;){var d=b++;this.__samplerStates[d]=c[d]}}},uploadSources:function(a,b){if(this.__format==1){var c="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+a,d="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+
b;if(c!=this.__glVertexSource||d!=this.__glFragmentSource){this.__processGLSLData(a,"attribute");this.__processGLSLData(a,"uniform");this.__processGLSLData(b,"uniform");this.__deleteShaders();this.__uploadFromGLSL(c,d);var f=this.__glslSamplerNames;d=this.__glslAttribNames;var g=this.__glslAttribTypes;a=this.__glslUniformNames;this.__glslSamplerNames=[];this.__glslAttribNames=[];this.__glslAttribTypes=[];this.__glslUniformLocations=[];b=this.__context.gl;for(c=0;c<f.length;){var h=f[c];++c;var n=
b.getUniformLocation(this.__glProgram,h);this.__glslSamplerNames[n]=h}c=0;for(f=d.length;c<f;)h=c++,n=b.getAttribLocation(this.__glProgram,d[h]),this.__glslAttribNames[n]=d[h],this.__glslAttribTypes[n]=g[h];c=0;for(f=a.length;c<f;)h=c++,d=b.getUniformLocation(this.__glProgram,a[h]),this.__glslUniformLocations[h]=d}}},__buildAGALUniformList:function(){if(this.__format!=1){var a=this.__context.gl;this.__agalUniforms.clear();this.__agalSamplerUniforms.clear();this.__agalAlphaSamplerUniforms.clear();
this.__agalAlphaSamplerEnabled=[];this.__agalSamplerUsageMask=0;var b=a.getProgramParameter(this.__glProgram,a.ACTIVE_UNIFORMS);for(var c=new hb,d=new hb,f=0;f<b;){var g=f++,h=a.getActiveUniform(this.__glProgram,g),n=h.name,l=h.size,q=h.type;h=new xv(this.__context);h.name=n;h.size=l;h.type=q;h.location=a.getUniformLocation(this.__glProgram,h.name);n=h.name.indexOf("[");n>=0&&(h.name=h.name.substring(0,n));switch(h.type){case 35674:h.regCount=2;break;case 35675:h.regCount=3;break;case 35676:h.regCount=
4;break;default:h.regCount=1}h.regCount*=h.size;this.__agalUniforms.add(h);if(h.name=="vcPositionScale")this.__agalPositionScale=h;else if(N.startsWith(h.name,"vc"))h.regIndex=H.parseInt(h.name.substring(2)),h.regData=this.__context.__vertexConstants,c.add(h);else if(N.startsWith(h.name,"fc"))h.regIndex=H.parseInt(h.name.substring(2)),h.regData=this.__context.__fragmentConstants,d.add(h);else if(N.startsWith(h.name,"sampler")&&h.name.indexOf("alpha")==-1)for(h.regIndex=H.parseInt(h.name.substring(7)),
this.__agalSamplerUniforms.add(h),n=0,l=h.regCount;n<l;)q=n++,this.__agalSamplerUsageMask|=1<<h.regIndex+q;else N.startsWith(h.name,"sampler")&&N.endsWith(h.name,"_alpha")?(n=h.name.indexOf("_")-7,h.regIndex=H.parseInt(h.name.substring(7,7+n))+4,this.__agalAlphaSamplerUniforms.add(h)):N.startsWith(h.name,"sampler")&&N.endsWith(h.name,"_alphaEnabled")&&(h.regIndex=H.parseInt(h.name.substring(7)),this.__agalAlphaSamplerEnabled[h.regIndex]=h);Vb.level==5&&Vb.verbose(""+g+" name:"+h.name+" type:"+h.type+
" size:"+h.size+" location:"+H.string(h.location),{fileName:"openfl/display3D/Program3D.hx",lineNumber:577,className:"openfl.display3D.Program3D",methodName:"__buildAGALUniformList"})}this.__agalVertexUniformMap=new Kq(ib.array(c));this.__agalFragmentUniformMap=new Kq(ib.array(d))}},__deleteShaders:function(){var a=this.__context.gl;this.__glProgram!=null&&(this.__glProgram=null);this.__glVertexShader!=null&&(a.deleteShader(this.__glVertexShader),this.__glVertexShader=null);this.__glFragmentShader!=
null&&(a.deleteShader(this.__glFragmentShader),this.__glFragmentShader=null)},__disable:function(){},__enable:function(){var a=this.__context.gl;a.useProgram(this.__glProgram);if(this.__format==0){this.__agalVertexUniformMap.markAllDirty();this.__agalFragmentUniformMap.markAllDirty();for(var b=this.__agalSamplerUniforms.h;b!=null;){var c=b.item;b=b.next;if(c.regCount==1)a.uniform1i(c.location,c.regIndex);else throw new ob("!!! TODO: uniform location on webgl");}for(b=this.__agalAlphaSamplerUniforms.h;b!=
null;)if(c=b.item,b=b.next,c.regCount==1)a.uniform1i(c.location,c.regIndex);else throw new ob("!!! TODO: uniform location on webgl");}},__flush:function(){this.__format==0&&(this.__agalVertexUniformMap.flush(),this.__agalFragmentUniformMap.flush())},__getSamplerState:function(a){return this.__samplerStates[a]},__markDirty:function(a,b,c){this.__format!=1&&(a?this.__agalVertexUniformMap.markDirty(b,c):this.__agalFragmentUniformMap.markDirty(b,c))},__processGLSLData:function(a,b){var c=0,d;for(d=b==
"uniform"?new Wa("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new Wa("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var f=d.matched(1);var g=d.matched(2);if(!N.startsWith(g,"gl_")){if(N.startsWith(f,"sampler"))this.__glslSamplerNames.push(g);else{switch(f){case "bool":c=0;break;case "bvec2":c=1;break;case "bvec3":c=2;break;case "bvec4":c=3;break;case "dvec2":case "vec2":c=5;break;case "dvec3":case "vec3":c=6;break;case "dvec4":case "vec4":c=7;break;case "double":case "float":c=4;
break;case "mat2":case "mat2x2":c=12;break;case "mat2x3":c=13;break;case "mat2x4":c=14;break;case "mat3x2":c=15;break;case "mat3":case "mat3x3":c=16;break;case "mat3x4":c=17;break;case "mat4x2":c=18;break;case "mat4x3":c=19;break;case "mat4":case "mat4x4":c=20;break;case "int":case "uint":c=8;break;case "ivec2":case "uvec2":c=9;break;case "ivec3":case "uvec3":c=10;break;case "ivec4":case "uvec4":c=11;break;default:c=null}b=="uniform"?(this.__glslUniformNames.push(g),this.__glslUniformTypes.push(c)):
(this.__glslAttribNames.push(g),this.__glslAttribTypes.push(c))}g=d.matchedPos();c=g.pos+g.len}}},__setPositionScale:function(a){this.__format!=1&&this.__agalPositionScale!=null&&this.__context.gl.uniform4fv(this.__agalPositionScale.location,a)},__setSamplerState:function(a,b){this.__samplerStates[a]=b},__uploadFromGLSL:function(a,b){var c=this.__context.gl;this.__glVertexSource=a;this.__glFragmentSource=b;this.__glVertexShader=c.createShader(c.VERTEX_SHADER);c.shaderSource(this.__glVertexShader,
a);c.compileShader(this.__glVertexShader);if(c.getShaderParameter(this.__glVertexShader,c.COMPILE_STATUS)==0){var d="Error compiling vertex shader\n"+c.getShaderInfoLog(this.__glVertexShader);Vb.error(d+("\n"+a),{fileName:"openfl/display3D/Program3D.hx",lineNumber:869,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"})}this.__glFragmentShader=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(this.__glFragmentShader,b);c.compileShader(this.__glFragmentShader);c.getShaderParameter(this.__glFragmentShader,
c.COMPILE_STATUS)==0&&(d="Error compiling fragment shader\n"+c.getShaderInfoLog(this.__glFragmentShader),Vb.error(d+("\n"+b),{fileName:"openfl/display3D/Program3D.hx",lineNumber:881,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}));this.__glProgram=c.createProgram();if(this.__format==0)for(b=0;b<16;){var f=b++;d="va"+f;a.indexOf(" "+d)!=-1&&c.bindAttribLocation(this.__glProgram,f,d)}else for(b=0,a=this.__glslAttribNames;b<a.length;)if(d=a[b],++b,d.indexOf("Position")>-1&&N.startsWith(d,
"openfl_")){c.bindAttribLocation(this.__glProgram,0,d);break}c.attachShader(this.__glProgram,this.__glVertexShader);c.attachShader(this.__glProgram,this.__glFragmentShader);c.linkProgram(this.__glProgram);c.getProgramParameter(this.__glProgram,c.LINK_STATUS)==0&&(d="Unable to initialize the shader program\n"+c.getProgramInfoLog(this.__glProgram),Vb.error(d,{fileName:"openfl/display3D/Program3D.hx",lineNumber:922,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}))},__class__:Ay};
var xv=function(a){this.context=a;this.isDirty=!0;this.regDataPointer=new uj(null,0)};t["openfl.display3D.Uniform"]=xv;xv.__name__="openfl.display3D.Uniform";xv.prototype={name:null,location:null,type:null,size:null,regData:null,regIndex:null,regCount:null,isDirty:null,context:null,regDataPointer:null,flush:function(){var a=this.context.gl,b=this.regIndex*4;switch(this.type){case 35664:Vz.uniform2fv(a,this.location,this.regData.subarray(b,b+this.regCount*2));break;case 35665:var c=this.location;b=
this.regData.subarray(b,b+this.regCount*3);var d=null;d!=null?a.uniform3fv(c,b,d,null):a.uniform3fv(c,b);break;case 35666:c=this.location;b=this.regData.subarray(b,b+this.regCount*4);d=null;d!=null?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b);break;case 35674:yd.uniformMatrix2fv(a,this.location,!1,this.regData.subarray(b,b+this.size*2*2));break;case 35675:yd.uniformMatrix3fv(a,this.location,!1,this.regData.subarray(b,b+this.size*3*3));break;case 35676:yd.uniformMatrix4fv(a,this.location,!1,this.regData.subarray(b,
b+this.size*4*4));break;default:c=this.location,b=this.regData.subarray(b,b+this.regCount*4),d=null,d!=null?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b)}},__getUniformRegisters:function(a,b){return this.regData.subarray(a,a+b)},__class__:xv};var Kq=function(a){this.__uniforms=a;this.__uniforms.sort(function(h,n){return y.compare(h.regIndex,n.regIndex)});var b=0;a=0;for(var c=this.__uniforms;a<c.length;){var d=c[a];++a;d.regIndex+d.regCount>b&&(b=d.regIndex+d.regCount)}this.__registerLookup=tb.toObjectVector(null,
b);a=0;for(c=this.__uniforms;a<c.length;){d=c[a];++a;b=0;for(var f=d.regCount;b<f;){var g=b++;this.__registerLookup.set(d.regIndex+g,d)}}this.__anyDirty=this.__allDirty=!0};t["openfl.display3D.UniformMap"]=Kq;Kq.__name__="openfl.display3D.UniformMap";Kq.prototype={__allDirty:null,__anyDirty:null,__registerLookup:null,__uniforms:null,flush:function(){if(this.__anyDirty){for(var a=0,b=this.__uniforms;a<b.length;){var c=b[a];++a;if(this.__allDirty||c.isDirty)c.flush(),c.isDirty=!1}this.__anyDirty=this.__allDirty=
!1}},markAllDirty:function(){this.__anyDirty=this.__allDirty=!0},markDirty:function(a,b){if(!this.__allDirty)for(b=a+b,b>this.__registerLookup.get_length()&&(b=this.__registerLookup.get_length());a<b;){var c=this.__registerLookup.get(a);c!=null?(this.__anyDirty=c.isDirty=!0,a=c.regIndex+c.regCount):++a}},__class__:Kq};var By=function(a,b,c,d){this.__context=a;this.__numVertices=b;this.__vertexSize=c;a=this.__context.gl;this.__id=a.createBuffer();this.__stride=this.__vertexSize*4;this.__usage=Cz.fromString(d)==
0?a.DYNAMIC_DRAW:a.STATIC_DRAW};t["openfl.display3D.VertexBuffer3D"]=By;By.__name__="openfl.display3D.VertexBuffer3D";By.prototype={__context:null,__data:null,__id:null,__memoryUsage:null,__numVertices:null,__stride:null,__tempFloat32Array:null,__usage:null,__vertexSize:null,dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,b,c,d){b+=c*this.__stride;d*=this.__vertexSize;a=mc.toArrayBuffer(a);b==null&&(b=0);a=a!=null?d==null?new Float32Array(a,b):new Float32Array(a,
b,d):null;this.uploadFromTypedArray(el.toArrayBufferView(a))},uploadFromTypedArray:function(a,b){a!=null&&(b=this.__context.gl,this.__context.__bindGLArrayBuffer(this.__id),yd.bufferData(b,b.ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(a!=null){b*=this.__vertexSize;var d=c*this.__vertexSize;c=b+d;var f=this.__tempFloat32Array;if(this.__tempFloat32Array==null||this.__tempFloat32Array.length<d)this.__tempFloat32Array=d!=null?new Float32Array(d):null,f!=null&&this.__tempFloat32Array.set(f);
for(d=b;d<c;)f=d++,this.__tempFloat32Array[f-b]=a.get(f);this.uploadFromTypedArray(el.toArrayBufferView(this.__tempFloat32Array))}},__class__:By};var Yg=function(){};t["openfl.display3D._internal.AGALConverter"]=Yg;Yg.__name__="openfl.display3D._internal.AGALConverter";Yg.prefixFromType=function(a,b){switch(a){case 0:return"va";case 1:return b==Hk.VERTEX?"vc":"fc";case 2:return b==Hk.VERTEX?"vt":"ft";case 3:return"output_";case 4:return"v";case 5:return"sampler";default:throw new ob("Invalid data!");
}};Yg.readUInt64=function(a){var b=a.readInt();a=a.readInt();return new Hb(a,b)};Yg.convertToGLSL=function(a,b){a.position=0;a.__endian=1;var c=a.readByte()&255;if(c==176)return a.readUTF();if(c!=160)throw new ob("Magic value must be 0xA0, may not be AGAL");var d=a.readInt();if((a.readByte()&255)!=161)throw new ob("Shader type ID must be 0xA1");c=(a.readByte()&255)==0?Hk.VERTEX:Hk.FRAGMENT;for(var f=new yv,g="";;){var h=a.position;if(!sb.gt(mc.get_length(a),h))break;var n=a.readInt();h=a.readUnsignedInt();
var l=Yg.readUInt64(a),q=Yg.readUInt64(a);h=Do.parse(h,c);l=ln.parse(l,c,h.mask);var u=ln.parse(q,c,h.mask);g+="\t";switch(n){case 0:g+=H.string(h.toGLSL()+" = "+l.toGLSL()+"; // mov");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 1:g+=H.string(h.toGLSL()+" = "+l.toGLSL()+" + "+u.toGLSL()+"; // add");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 2:g+=H.string(h.toGLSL()+" = "+l.toGLSL()+" - "+u.toGLSL()+"; // sub");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);
f.addSR(u,kb.VECTOR_4);break;case 3:g+=H.string(h.toGLSL()+" = "+l.toGLSL()+" * "+u.toGLSL()+"; // mul");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 4:g+=H.string(h.toGLSL()+" = "+l.toGLSL()+" / "+u.toGLSL()+"; // div");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 5:g=l.toGLSL().indexOf(".")>-1?g+H.string(h.toGLSL()+" = 1.0 / "+l.toGLSL()+"; // rcp"):g+H.string(h.toGLSL()+" = vec4(1) / "+l.toGLSL()+"; // rcp");f.addDR(h,kb.VECTOR_4);
f.addSR(l,kb.VECTOR_4);break;case 6:g+=H.string(h.toGLSL()+" = min("+l.toGLSL()+", "+u.toGLSL()+"); // min");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 7:g+=H.string(h.toGLSL()+" = max("+l.toGLSL()+", "+u.toGLSL()+"); // max");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 8:g+=H.string(h.toGLSL()+" = fract("+l.toGLSL()+"); // frc");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 9:g+=H.string(h.toGLSL()+" = sqrt("+l.toGLSL()+
"); // sqrt");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 10:g+=H.string(h.toGLSL()+" = inversesqrt("+l.toGLSL()+"); // rsq");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 11:g+=H.string(h.toGLSL()+" = pow("+l.toGLSL()+", "+u.toGLSL()+"); // pow");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 12:g+=H.string(h.toGLSL()+" = log2("+l.toGLSL()+"); // log");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 13:g+=H.string(h.toGLSL()+" = exp2("+
l.toGLSL()+"); // exp");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 14:g+=H.string(h.toGLSL()+" = normalize("+l.toGLSL()+"); // normalize");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 15:g+=H.string(h.toGLSL()+" = sin("+l.toGLSL()+"); // sin");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 16:g+=H.string(h.toGLSL()+" = cos("+l.toGLSL()+"); // cos");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 17:l.sourceMask=u.sourceMask=7;g+=H.string(h.toGLSL()+" = cross(vec3("+
l.toGLSL()+"), vec3("+u.toGLSL()+")); // crs");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 18:l.sourceMask=u.sourceMask=7;g+=H.string(h.toGLSL()+" = vec4(dot(vec3("+l.toGLSL()+"), vec3("+u.toGLSL()+")))"+h.getWriteMask()+"; // dp3");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 19:l.sourceMask=u.sourceMask=15;g+=H.string(h.toGLSL()+" = vec4(dot(vec4("+l.toGLSL()+"), vec4("+u.toGLSL()+")))"+h.getWriteMask()+"; // dp4");f.addDR(h,
kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 20:g+=H.string(h.toGLSL()+" = abs("+l.toGLSL()+"); // abs");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 21:g+=H.string(h.toGLSL()+" = -"+l.toGLSL()+"; // neg");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 22:g+=H.string(h.toGLSL()+" = clamp("+l.toGLSL()+", 0.0, 1.0); // saturate");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 23:n=f.getRegisterUsage(u);n!=kb.VECTOR_4&&n!=kb.VECTOR_4_ARRAY?(g+=
H.string(h.toGLSL()+" = "+l.toGLSL()+" * mat3("+u.toGLSL(!1)+"); // m33"),f.addDR(h,kb.VECTOR_4),f.addSR(l,kb.VECTOR_4),f.addSR(u,kb.MATRIX_4_4)):(l.sourceMask=u.sourceMask=7,g+=H.string(h.toGLSL()+" = vec3(dot("+l.toGLSL(!0)+","+u.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+u.toGLSL(!0,1)+"),dot("+l.toGLSL(!0)+","+u.toGLSL(!0,2)+")); // m33"),f.addDR(h,kb.VECTOR_4),f.addSR(l,kb.VECTOR_4),f.addSR(u,kb.VECTOR_4,0),f.addSR(u,kb.VECTOR_4,1),f.addSR(u,kb.VECTOR_4,2));break;case 24:n=f.getRegisterUsage(u);
n!=kb.VECTOR_4&&n!=kb.VECTOR_4_ARRAY?(g+=H.string(h.toGLSL()+" = "+l.toGLSL()+" * "+u.toGLSL(!1)+"; // m44"),f.addDR(h,kb.VECTOR_4),f.addSR(l,kb.VECTOR_4),f.addSR(u,kb.MATRIX_4_4)):(l.sourceMask=u.sourceMask=15,g+=H.string(h.toGLSL()+" = vec4(dot("+l.toGLSL(!0)+","+u.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+u.toGLSL(!0,1)+"), dot("+l.toGLSL(!0)+","+u.toGLSL(!0,2)+"), dot("+l.toGLSL(!0)+","+u.toGLSL(!0,3)+")); // m44"),f.addDR(h,kb.VECTOR_4),f.addSR(l,kb.VECTOR_4),f.addSR(u,kb.VECTOR_4,0),f.addSR(u,
kb.VECTOR_4,1),f.addSR(u,kb.VECTOR_4,2),f.addSR(u,kb.VECTOR_4,3));break;case 25:h.mask&=7;n=f.getRegisterUsage(u);n!=kb.VECTOR_4&&n!=kb.VECTOR_4_ARRAY?(g+=H.string(h.toGLSL()+" = "+l.toGLSL()+" * "+u.toGLSL(!1)+"; // m34"),f.addDR(h,kb.VECTOR_4),f.addSR(l,kb.VECTOR_4),f.addSR(u,kb.MATRIX_4_4)):(l.sourceMask=u.sourceMask=15,g+=H.string(h.toGLSL()+" = vec3(dot("+l.toGLSL(!0)+","+u.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+u.toGLSL(!0,1)+"),dot("+l.toGLSL(!0)+","+u.toGLSL(!0,2)+")); // m34"),f.addDR(h,
kb.VECTOR_4),f.addSR(l,kb.VECTOR_4),f.addSR(u,kb.VECTOR_4,0),f.addSR(u,kb.VECTOR_4,1),f.addSR(u,kb.VECTOR_4,2));break;case 26:if(d<2)throw new ob("Version must be 2");g+=H.string(h.toGLSL()+" = ddx("+l.toGLSL()+"); // ddx");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 27:if(d<2)throw new ob("Version must be 2");g+=H.string(h.toGLSL()+" = ddy("+l.toGLSL()+"); // ddy");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);break;case 28:if(d<2)throw new ob("Version must be 2");l.sourceMask=u.sourceMask=
1;g+=H.string("if ("+l.toGLSL()+" == "+u.toGLSL()+") { // ife");f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 29:if(d<2)throw new ob("Version must be 2");l.sourceMask=u.sourceMask=1;g+=H.string("if ("+l.toGLSL()+" != "+u.toGLSL()+") { // ine");f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 30:if(d<2)throw new ob("Version must be 2");l.sourceMask=u.sourceMask=1;g+=H.string("if ("+l.toGLSL()+" >= "+u.toGLSL()+") { // ifg");f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 31:if(d<
2)throw new ob("Version must be 2");l.sourceMask=u.sourceMask=1;g+=H.string("if ("+l.toGLSL()+" < "+u.toGLSL()+") { // ifl");f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 32:if(d<2)throw new ob("Version must be 2");g+="} else { // els";break;case 33:if(d<2)throw new ob("Version must be 2");g+="} // eif";break;case 39:l.sourceMask=15;g+=H.string("if (any(lessThan("+l.toGLSL()+", vec4(0)))) discard;");f.addSR(l,kb.VECTOR_4);break;case 40:u=Eo.parse(q,c);switch(u.d){case 0:u.t==2?(l.sourceMask=
3,f.addSaR(u,kb.SAMPLER_2D_ALPHA),g+=H.string("if ("+u.toGLSL()+"_alphaEnabled) {\n"),g+=H.string("\t\t"+h.toGLSL()+" = vec4(texture2D("+u.toGLSL()+", "+l.toGLSL()+").xyz, texture2D("+u.toGLSL()+"_alpha, "+l.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=H.string("\t\t"+h.toGLSL()+" = texture2D("+u.toGLSL()+", "+l.toGLSL()+"); // tex\n"),g+="\t}"):(l.sourceMask=3,f.addSaR(u,kb.SAMPLER_2D),g+=H.string(h.toGLSL()+" = texture2D("+u.toGLSL()+", "+l.toGLSL()+"); // tex"));break;case 1:u.t==2?
(l.sourceMask=7,f.addSaR(u,kb.SAMPLER_CUBE_ALPHA),g+=H.string("if ("+u.toGLSL()+"_alphaEnabled) {\n"),g+=H.string("\t\t"+h.toGLSL()+" = vec4(textureCube("+u.toGLSL()+", "+l.toGLSL()+").xyz, textureCube("+u.toGLSL()+"_alpha, "+l.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=H.string("\t\t"+h.toGLSL()+" = textureCube("+u.toGLSL()+", "+l.toGLSL()+"); // tex"),g+="\t}"):(l.sourceMask=7,g+=H.string(h.toGLSL()+" = textureCube("+u.toGLSL()+", "+l.toGLSL()+"); // tex"),f.addSaR(u,kb.SAMPLER_CUBE))}f.addDR(h,
kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);b!=null&&(b[u.n]=u.toSamplerState());break;case 41:l.sourceMask=u.sourceMask=15;g+=H.string(h.toGLSL()+" = vec4(greaterThanEqual("+l.toGLSL()+", "+u.toGLSL()+"))"+h.getWriteMask()+"; // ste");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 42:l.sourceMask=u.sourceMask=15;g+=H.string(h.toGLSL()+" = vec4(lessThan("+l.toGLSL()+", "+u.toGLSL()+"))"+h.getWriteMask()+"; // slt");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);
break;case 44:l.sourceMask=u.sourceMask=15;g+=H.string(h.toGLSL()+" = vec4(equal("+l.toGLSL()+", "+u.toGLSL()+"))"+h.getWriteMask()+"; // seq");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;case 45:l.sourceMask=u.sourceMask=15;g+=H.string(h.toGLSL()+" = vec4(notEqual("+l.toGLSL()+", "+u.toGLSL()+"))"+h.getWriteMask()+"; // sne");f.addDR(h,kb.VECTOR_4);f.addSR(l,kb.VECTOR_4);f.addSR(u,kb.VECTOR_4);break;default:throw new ob("Opcode "+n);}g+="\n"}Yg.limitedProfile==null&&
(d=A.context.getParameter(7938),Yg.limitedProfile=d.indexOf("OpenGL ES")>-1||d.indexOf("WebGL")>-1);a=""+H.string("// AGAL "+(c==Hk.VERTEX?"vertex":"fragment")+" shader\n");a=Yg.limitedProfile?a+"#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n":a+"#version 120\n";a+=H.string(f.toGLSL(!1));c==Hk.VERTEX&&(a+="uniform vec4 vcPositionScale;\n");a=a+"void main() {\n"+H.string(f.toGLSL(!0));a+=H.string(g);c==Hk.VERTEX&&(a+="\tgl_Position *= vcPositionScale;\n");
return a+"}\n"};var Do=function(){};t["openfl.display3D._internal._AGALConverter.DestRegister"]=Do;Do.__name__="openfl.display3D._internal._AGALConverter.DestRegister";Do.parse=function(a,b){var c=new Do;c.programType=b;c.type=a>>>24&15;c.mask=a>>>16&15;c.n=a&65535;return c};Do.prototype={mask:null,n:null,programType:null,type:null,getWriteMask:function(){var a=".";(this.mask&1)!=0&&(a+="x");(this.mask&2)!=0&&(a+="y");(this.mask&4)!=0&&(a+="z");(this.mask&8)!=0&&(a+="w");return a},toGLSL:function(a){a==
null&&(a=!0);var b=this.type==3?this.programType==Hk.VERTEX?"gl_Position":"gl_FragColor":Yg.prefixFromType(this.type,this.programType)+this.n;a&&this.mask!=15&&(b+=this.getWriteMask());return b},__class__:Do};var Hk=R["openfl.display3D._internal._AGALConverter.ProgramType"]={__ename__:"openfl.display3D._internal._AGALConverter.ProgramType",__constructs__:null,VERTEX:{_hx_name:"VERTEX",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",toString:E},FRAGMENT:{_hx_name:"FRAGMENT",
_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",toString:E}};Hk.__constructs__=[Hk.VERTEX,Hk.FRAGMENT];var yv=function(){this.mEntries=[]};t["openfl.display3D._internal.RegisterMap"]=yv;yv.__name__="openfl.display3D._internal.RegisterMap";yv.prototype={mEntries:null,add:function(a,b,c,d){for(var f=0,g=this.mEntries;f<g.length;){var h=g[f];++f;if(h.type==a&&h.name==b&&h.number==c){if(h.usage!=d)throw new ob("Cannot use register in multiple ways yet (mat4/vec4)");return}}h=
new Cy;h.type=a;h.name=b;h.number=c;h.usage=d;this.mEntries.push(h)},addDR:function(a,b){this.add(a.type,a.toGLSL(!1),a.n,b)},addSaR:function(a,b){this.add(a.type,a.toGLSL(),a.n,b)},addSR:function(a,b,c){c==null&&(c=0);a.d!=0?(this.add(a.itype,Yg.prefixFromType(a.itype,a.programType)+a.n,a.n,kb.VECTOR_4),this.add(a.type,Yg.prefixFromType(a.type,a.programType)+a.o,a.o,kb.VECTOR_4_ARRAY)):this.add(a.type,a.toGLSL(!1,c),a.n+c,b)},getRegisterUsage:function(a){return a.d!=0?kb.VECTOR_4_ARRAY:this.getUsage(a.type,
a.toGLSL(!1),a.n)},getUsage:function(a,b,c){for(var d=0,f=this.mEntries;d<f.length;){var g=f[d];++d;if(g.type==a&&g.name==b&&g.number==c)return g.usage}return kb.UNUSED},toGLSL:function(a){this.mEntries.sort(function(g,h){return g.number-h.number});this.mEntries.sort(function(g,h){return w.__cast(g.type,jw)-w.__cast(h.type,jw)});for(var b="",c=0,d=this.mEntries.length;c<d;){var f=c++;f=this.mEntries[f];if(!(a&&f.type!=2||!a&&f.type==2)&&f.type!=3){switch(f.type){case 0:b+="attribute ";break;case 1:b+=
"uniform ";break;case 2:b+="\t";break;case 3:break;case 4:b+="varying ";break;case 5:b+="uniform ";break;default:throw new ob;}switch(f.usage._hx_index){case 0:Vb.info("Missing switch patten: RegisterUsage.UNUSED",{fileName:"openfl/display3D/_internal/AGALConverter.hx",lineNumber:825,className:"openfl.display3D._internal.RegisterMap",methodName:"toGLSL"});break;case 1:b+="vec4 ";break;case 2:b+="mat4 ";break;case 3:b+="sampler2D ";break;case 5:b+="samplerCube ";break;case 7:b+="vec4 "}f.usage==kb.SAMPLER_2D_ALPHA?
(b+="sampler2D ",b+=H.string(f.name),b+=";\n",b+="uniform ",b+="sampler2D ",b+=H.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=H.string(f.name+"_alphaEnabled")):f.usage==kb.SAMPLER_CUBE_ALPHA?(b+="samplerCube ",b+=H.string(f.name),b+=";\n",b+="uniform ",b+="samplerCube ",b+=H.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=H.string(f.name+"_alphaEnabled")):b=f.usage==kb.VECTOR_4_ARRAY?b+H.string(f.name+"[128]"):b+H.string(f.name);b+=";\n"}}return b},__class__:yv};var Cy=
function(){};t["openfl.display3D._internal._AGALConverter.RegisterMapEntry"]=Cy;Cy.__name__="openfl.display3D._internal._AGALConverter.RegisterMapEntry";Cy.prototype={name:null,number:null,type:null,usage:null,__class__:Cy};var kb=R["openfl.display3D._internal._AGALConverter.RegisterUsage"]={__ename__:"openfl.display3D._internal._AGALConverter.RegisterUsage",__constructs__:null,UNUSED:{_hx_name:"UNUSED",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E},VECTOR_4:{_hx_name:"VECTOR_4",
_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E},MATRIX_4_4:{_hx_name:"MATRIX_4_4",_hx_index:2,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E},SAMPLER_2D:{_hx_name:"SAMPLER_2D",_hx_index:3,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E},SAMPLER_2D_ALPHA:{_hx_name:"SAMPLER_2D_ALPHA",_hx_index:4,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E},SAMPLER_CUBE:{_hx_name:"SAMPLER_CUBE",
_hx_index:5,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E},SAMPLER_CUBE_ALPHA:{_hx_name:"SAMPLER_CUBE_ALPHA",_hx_index:6,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E},VECTOR_4_ARRAY:{_hx_name:"VECTOR_4_ARRAY",_hx_index:7,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:E}};kb.__constructs__=[kb.UNUSED,kb.VECTOR_4,kb.MATRIX_4_4,kb.SAMPLER_2D,kb.SAMPLER_2D_ALPHA,kb.SAMPLER_CUBE,kb.SAMPLER_CUBE_ALPHA,kb.VECTOR_4_ARRAY];
var Eo=function(){};t["openfl.display3D._internal._AGALConverter.SamplerRegister"]=Eo;Eo.__name__="openfl.display3D._internal._AGALConverter.SamplerRegister";Eo.parse=function(a,b){var c=new Eo;c.programType=b;b=60;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;c.f=b;b=56;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;c.m=b;b=52;b=b==0?new Hb(a.high,a.low):b<
32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;c.w=b;b=48;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;c.s=b;b=44;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;c.d=b;b=40;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;c.t=b;b=32;b=b==0?new Hb(a.high,
a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;c.type=b;b=16;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&255;c.b=b;b=a.low&65535;c.n=b;return c};Eo.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){return Yg.prefixFromType(this.type,this.programType)+this.n},toSamplerState:function(){switch(this.f){case 0:var a=5;break;
case 1:a=4;break;default:throw new ob;}switch(this.m){case 0:var b=2;break;case 1:b=1;break;case 2:b=0;break;default:throw new ob;}switch(this.w){case 0:var c=0;break;case 1:c=2;break;default:throw new ob;}return new jn(c,a,b,(this.b<<24>>24)/8,(this.s&4)==4,(this.s&1)==1,this.t==2)},__class__:Eo};var ln=function(){};t["openfl.display3D._internal._AGALConverter.SourceRegister"]=ln;ln.__name__="openfl.display3D._internal._AGALConverter.SourceRegister";ln.parse=function(a,b,c){var d=new ln;d.programType=
b;b=63;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&1;d.d=b;b=48;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&3;d.q=b;b=40;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&15;d.itype=b;b=32;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=
b.low&15;d.type=b;b=24;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&255;d.s=b;b=16;b=b==0?new Hb(a.high,a.low):b<32?new Hb(a.high>>b,a.high<<32-b|a.low>>>b):new Hb(a.high>>31,a.high>>b-32);b=b.low&255;d.o=b;b=a.low&65535;d.n=b;d.sourceMask=c;return d};ln.prototype={d:null,itype:null,n:null,o:null,programType:null,q:null,s:null,sourceMask:null,type:null,toGLSL:function(a,b){b==null&&(b=0);a==null&&(a=!0);if(this.type==3)return this.programType==
Hk.VERTEX?"gl_Position":"gl_FragColor";var c=this.s==228&&this.sourceMask==15,d="";if(this.type!=5&&!c){if((this.sourceMask&1)!=0)switch(this.s&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if((this.sourceMask&2)!=0)switch(this.s>>2&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if((this.sourceMask&4)!=0)switch(this.s>>4&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if((this.sourceMask&8)!=0)switch(this.s>>
6&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}}c=Yg.prefixFromType(this.type,this.programType);if(this.d==0)c+=this.n+b;else{c+=this.o;var f="";switch(this.q){case 0:f="x";break;case 1:f="y";break;case 2:f="z";break;case 3:f="w"}f=Yg.prefixFromType(this.itype,this.programType)+this.n+"."+f;c+="[ int("+f+") +"+b+"]"}a&&d!=""&&(c+="."+d);return c},__class__:ln};var Lq=function(a,b){this.version=0;a.position=b;var c=a.readUTFBytes(3);a.position=b;if(c!="ATF")throw new ob("ATF signature not found");
a.b[b+6]==255?(this.version=a.b[b+7],a.position=b+8,c=this.__readUInt32(a)):(this.version=0,a.position=b+3,c=this.__readUInt24(a));if(sb.gt(w.__cast(b+c,jw),mc.get_length(a)))throw new ob("ATF length exceeds byte array length");this.data=a};t["openfl.display3D._internal.ATFReader"]=Lq;Lq.__name__="openfl.display3D._internal.ATFReader";Lq.prototype={atfFormat:null,cubeMap:null,data:null,height:null,mipCount:null,version:null,width:null,readHeader:function(a,b,c){var d=this.data.readUnsignedByte(),
f=d>>>7;if(!c&&f!=0)throw new ob("ATF Cube map not expected");if(c&&f!=1)throw new ob("ATF Cube map expected");this.cubeMap=c;this.atfFormat=d&127;this.atfFormat!=3&&this.atfFormat!=5&&Vb.warn("Only ATF block compressed textures without JPEG-XR+LZMA are supported",{fileName:"openfl/display3D/_internal/ATFReader.hx",lineNumber:97,className:"openfl.display3D._internal.ATFReader",methodName:"readHeader"});this.width=1<<this.data.readUnsignedByte();this.height=1<<this.data.readUnsignedByte();if(this.width!=
a||this.height!=b)throw new ob("ATF width and height dont match");this.mipCount=this.data.readUnsignedByte();return this.atfFormat==5},readTextures:function(a){for(var b=this.version<3?3:4,c=0,d=this.cubeMap?6:1;c<d;)for(var f=c++,g=0,h=this.mipCount;g<h;)for(var n=g++,l=0,q=b;l<q;){var u=l++,v=this.version==0?this.__readUInt24(this.data):this.__readUInt32(this.data);if(sb.gt(this.data.position+v,mc.get_length(this.data)))throw new ob("Block length exceeds ATF file length");if(sb.gt(v,0)){var z=new Oa(new ArrayBuffer(v)),
r=this.data,F=mc.fromBytes(z),J=0,L=v;L==null&&(L=0);J==null&&(J=0);r.readBytes(F,J,L);a(f,n,u,this.width>>n,this.height>>n,v,z)}}},__readUInt24:function(a){var b=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=a.readUnsignedByte()},__readUInt32:function(a){var b=a.readUnsignedByte()<<24;b|=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=a.readUnsignedByte()},__class__:Lq};var Hq=function(){this.backBufferEnableDepthAndStencil=!1;this.blendDestinationAlphaFactor=9;this.blendSourceAlphaFactor=
2;this.blendDestinationRGBFactor=9;this.blendSourceRGBFactor=2;this.colorMaskAlpha=this.colorMaskBlue=this.colorMaskGreen=this.colorMaskRed=!0;this.culling=3;this.depthCompareMode=4;this.depthMask=!0;this.samplerStates=[];this.scissorRectangle=new Ia;this.stencilCompareMode=0;this.stencilPass=this.stencilFail=this.stencilDepthFail=5;this.stencilReadMask=255;this.stencilReferenceValue=0;this.stencilTriangleFace=2;this.stencilWriteMask=255;this.textures=[];this.__frontFaceGLCCW=!0;this.__glBlendEquation=
32774};t["openfl.display3D._internal.Context3DState"]=Hq;Hq.__name__="openfl.display3D._internal.Context3DState";Hq.prototype={backBufferEnableDepthAndStencil:null,blendDestinationAlphaFactor:null,blendSourceAlphaFactor:null,blendDestinationRGBFactor:null,blendSourceRGBFactor:null,colorMaskRed:null,colorMaskGreen:null,colorMaskBlue:null,colorMaskAlpha:null,culling:null,depthCompareMode:null,depthMask:null,program:null,renderToTexture:null,renderToTextureAntiAlias:null,renderToTextureDepthStencil:null,
renderToTextureSurfaceSelector:null,samplerStates:null,scissorEnabled:null,scissorRectangle:null,stencilCompareMode:null,stencilDepthFail:null,stencilFail:null,stencilPass:null,stencilReadMask:null,stencilReferenceValue:null,stencilTriangleFace:null,stencilWriteMask:null,textures:null,shader:null,__currentGLArrayBuffer:null,__currentGLElementArrayBuffer:null,__currentGLFramebuffer:null,__currentGLTexture2D:null,__currentGLTextureCubeMap:null,__enableGLBlend:null,__enableGLCullFace:null,__enableGLDepthTest:null,
__enableGLScissorTest:null,__enableGLStencilTest:null,__frontFaceGLCCW:null,__glBlendEquation:null,__primaryGLFramebuffer:null,__rttDepthGLRenderbuffer:null,__rttGLFramebuffer:null,__rttGLRenderbuffer:null,__rttStencilGLRenderbuffer:null,__class__:Hq};var pd=function(a){qa.call(this);this.__context=a;var b=this.__context.gl;this.__textureID=b.createTexture();this.__textureContext=this.__context.__context;if(pd.__supportsBGRA==null){pd.__textureInternalFormat=b.RGBA;pd.__supportsBGRA=!1;pd.__textureFormat=
b.RGBA;pd.__compressedFormats=new Od;pd.__compressedFormatsAlpha=new Od;a=b.getExtension("WEBGL_compressed_texture_s3tc");var c=b.getExtension("WEBGL_compressed_texture_etc1");b=b.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");if(a!=null){var d=a.COMPRESSED_RGBA_S3TC_DXT1_EXT;pd.__compressedFormats.h[0]=d;d=a.COMPRESSED_RGBA_S3TC_DXT5_EXT;pd.__compressedFormatsAlpha.h[0]=d}c!=null&&(d=c.COMPRESSED_RGB_ETC1_WEBGL,pd.__compressedFormats.h[2]=d,d=c.COMPRESSED_RGB_ETC1_WEBGL,pd.__compressedFormatsAlpha.h[2]=
d);b!=null&&(d=b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,pd.__compressedFormats.h[1]=d,d=b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,pd.__compressedFormatsAlpha.h[1]=d)}this.__internalFormat=pd.__textureInternalFormat;this.__format=pd.__textureFormat};t["openfl.display3D.textures.TextureBase"]=pd;pd.__name__="openfl.display3D.textures.TextureBase";pd.__super__=qa;pd.prototype=I(qa.prototype,{__alphaTexture:null,__context:null,__format:null,__glDepthRenderbuffer:null,__glFramebuffer:null,__glStencilRenderbuffer:null,
__height:null,__internalFormat:null,__optimizeForRenderToTexture:null,__samplerState:null,__streamingLevels:null,__textureContext:null,__textureID:null,__textureTarget:null,__width:null,dispose:function(){var a=this.__context.gl;this.__alphaTexture!=null&&(this.__alphaTexture.dispose(),this.__alphaTexture=null);this.__textureID!=null&&(a.deleteTexture(this.__textureID),this.__textureID=null);this.__glFramebuffer!=null&&(a.deleteFramebuffer(this.__glFramebuffer),this.__glFramebuffer=null);this.__glDepthRenderbuffer!=
null&&(a.deleteRenderbuffer(this.__glDepthRenderbuffer),this.__glDepthRenderbuffer=null);this.__glStencilRenderbuffer!=null&&(a.deleteRenderbuffer(this.__glStencilRenderbuffer),this.__glStencilRenderbuffer=null)},__getGLFramebuffer:function(a,b,c){b=this.__context.gl;this.__glFramebuffer==null&&(this.__glFramebuffer=b.createFramebuffer(),this.__context.__bindGLFramebuffer(this.__glFramebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.__textureID,0),this.__context.__enableErrorChecking&&
(c=b.checkFramebufferStatus(b.FRAMEBUFFER),c!=b.FRAMEBUFFER_COMPLETE&&Vb.warn("Error: Context3D.setRenderToTexture status:"+c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:201,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})));a&&this.__glDepthRenderbuffer==null&&(this.__context.__bindGLFramebuffer(this.__glFramebuffer),$c.__glDepthStencil!=0?(this.__glStencilRenderbuffer=this.__glDepthRenderbuffer=
b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,$c.__glDepthStencil,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer)):(this.__glDepthRenderbuffer=b.createRenderbuffer(),this.__glStencilRenderbuffer=b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,
this.__width,this.__height),b.bindRenderbuffer(b.RENDERBUFFER,this.__glStencilRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.STENCIL_INDEX8,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glStencilRenderbuffer)),this.__context.__enableErrorChecking&&(c=b.checkFramebufferStatus(b.FRAMEBUFFER),c!=b.FRAMEBUFFER_COMPLETE&&Vb.warn("Error: Context3D.setRenderToTexture status:"+
c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:239,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})),b.bindRenderbuffer(b.RENDERBUFFER,null));return this.__glFramebuffer},__getImage:function(a){var b=a.image;if(!a.__isValid||b==null)return null;yb.sync(b,!1);a=this.__context.gl;b.type==gg.DATA||b.get_premultiplied()?!b.get_premultiplied()&&b.get_transparent()&&(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
0),b=b.clone(),b.set_premultiplied(!0)):a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);b.get_format()!=0&&(b=b.clone(),b.set_format(0),b.buffer.premultiplied=!0);return b},__getTexture:function(){return this.__textureID},__setSamplerState:function(a){if(!a.equals(this.__samplerState)){var b=this.__context.gl;this.__textureTarget==this.__context.gl.TEXTURE_CUBE_MAP?this.__context.__bindGLTextureCubeMap(this.__textureID):this.__context.__bindGLTexture2D(this.__textureID);var c;switch(a.wrap){case 0:var d=
c=b.CLAMP_TO_EDGE;break;case 1:c=b.CLAMP_TO_EDGE;d=b.REPEAT;break;case 2:d=c=b.REPEAT;break;case 3:c=b.REPEAT;d=b.CLAMP_TO_EDGE;break;default:throw new Sd("wrap bad enum");}var f=a.filter==5?b.NEAREST:b.LINEAR;switch(a.mipfilter){case 0:var g=a.filter==5?b.NEAREST_MIPMAP_LINEAR:b.LINEAR_MIPMAP_LINEAR;break;case 1:g=a.filter==5?b.NEAREST_MIPMAP_NEAREST:b.LINEAR_MIPMAP_NEAREST;break;case 2:g=a.filter==5?b.NEAREST:b.LINEAR;break;default:throw new Sd("mipfiter bad enum");}b.texParameteri(this.__textureTarget,
b.TEXTURE_MIN_FILTER,g);b.texParameteri(this.__textureTarget,b.TEXTURE_MAG_FILTER,f);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_S,c);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_T,d);this.__samplerState==null&&(this.__samplerState=a.clone());this.__samplerState.copyFrom(a);return!0}return!1},__uploadFromImage:function(a){var b=this.__context.gl,c;if(this.__textureTarget==b.TEXTURE_2D){if(a.buffer.bitsPerPixel==1)var d=c=b.ALPHA;else c=pd.__textureInternalFormat,d=pd.__textureFormat;
this.__context.__bindGLTexture2D(this.__textureID);a.type==gg.DATA||a.get_premultiplied()?!a.get_premultiplied()&&a.get_transparent()&&b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1):b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);a.type==gg.DATA?yd.texImage2D(b,b.TEXTURE_2D,0,c,a.buffer.width,a.buffer.height,0,d,b.UNSIGNED_BYTE,a.get_data()):yd.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,a.get_src());this.__context.__bindGLTexture2D(null)}},__class__:pd});var Co=function(a,b,c,d,f){pd.call(this,
a);this.__width=this.__height=this.__size=b;this.__optimizeForRenderToTexture=d;this.__streamingLevels=f;this.__textureTarget=this.__context.gl.TEXTURE_CUBE_MAP;this.__uploadedSides=0};t["openfl.display3D.textures.CubeTexture"]=Co;Co.__name__="openfl.display3D.textures.CubeTexture";Co.__super__=pd;Co.prototype=I(pd.prototype,{__framebufferSurface:null,__size:null,__uploadedSides:null,uploadCompressedTextureFromByteArray:function(a,b,c){c==null&&(c=!1);var d=this;c?Gc.delay(function(){d.__uploadCompressedTextureFromByteArray(a,
b);var f=new pa("textureReady");d.dispatchEvent(f)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c,d){c==null&&(c=0);if(a!=null&&(d=this.__size>>c,d!=0&&(a=this.__getImage(a),a!=null)))if(c==0&&a.buffer!=null&&a.buffer.data==null&&a.buffer.get_src()!=null){var f=this.__context.gl;d=this.__size>>c;d!=0&&(d=this.__sideToTarget(b),this.__context.__bindGLTextureCubeMap(this.__textureID),yd.texImage2D(f,d,c,this.__internalFormat,this.__format,f.UNSIGNED_BYTE,a.buffer.get_src()),
this.__context.__bindGLTextureCubeMap(null),this.__uploadedSides|=1<<b)}else this.uploadFromTypedArray(a.get_data(),b,c)},uploadFromByteArray:function(a,b,c,d){d==null&&(d=0);b==0?this.uploadFromTypedArray(a.b,c,d):(a=mc.toArrayBuffer(a),b==null&&(b=0),b=a!=null?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,c,d))},uploadFromTypedArray:function(a,b,c){c==null&&(c=0);if(a!=null){var d=this.__context.gl,f=this.__size>>c;if(f!=0){var g=this.__sideToTarget(b);this.__context.__bindGLTextureCubeMap(this.__textureID);
yd.texImage2D(d,g,c,this.__internalFormat,f,f,0,this.__format,d.UNSIGNED_BYTE,a);this.__context.__bindGLTextureCubeMap(null);this.__uploadedSides|=1<<b}}},__getGLFramebuffer:function(a,b,c){var d=this.__context.gl;this.__glFramebuffer==null&&(this.__glFramebuffer=d.createFramebuffer(),this.__framebufferSurface=-1);if(this.__framebufferSurface!=c&&(this.__framebufferSurface=c,this.__context.__bindGLFramebuffer(this.__glFramebuffer),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+
c,this.__textureID,0),this.__context.__enableErrorChecking)){var f=d.checkFramebufferStatus(d.FRAMEBUFFER);f!=d.FRAMEBUFFER_COMPLETE&&Vb.error("Error: Context3D.setRenderToTexture status:"+f+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/CubeTexture.hx",lineNumber:279,className:"openfl.display3D.textures.CubeTexture",methodName:"__getGLFramebuffer"})}return pd.prototype.__getGLFramebuffer.call(this,a,b,c)},__setSamplerState:function(a){if(pd.prototype.__setSamplerState.call(this,
a)){var b=this.__context.gl;a.mipfilter==2||this.__samplerState.mipmapGenerated||(b.generateMipmap(b.TEXTURE_CUBE_MAP),this.__samplerState.mipmapGenerated=!0);if($c.__glMaxTextureMaxAnisotropy!=0){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>$c.__glMaxTextureMaxAnisotropy&&(a=$c.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_CUBE_MAP,$c.__glTextureMaxAnisotropy,a)}return!0}return!1},__sideToTarget:function(a){var b=this.__context.gl;switch(a){case 0:return b.TEXTURE_CUBE_MAP_POSITIVE_X;
case 1:return b.TEXTURE_CUBE_MAP_NEGATIVE_X;case 2:return b.TEXTURE_CUBE_MAP_POSITIVE_Y;case 3:return b.TEXTURE_CUBE_MAP_NEGATIVE_Y;case 4:return b.TEXTURE_CUBE_MAP_POSITIVE_Z;case 5:return b.TEXTURE_CUBE_MAP_NEGATIVE_Z;default:throw new ob;}},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Lq(a,b);var d=a.readHeader(this.__size,this.__size,!0),f=this.__context.gl;this.__context.__bindGLTextureCubeMap(this.__textureID);var g=!1;a.readTextures(function(u,v,z,r,F,J,L){var Q=d?
pd.__compressedFormatsAlpha.h[z]:pd.__compressedFormats.h[z];if(Q!=0)if(g=!0,u=c.__sideToTarget(u),c.__format=Q,c.__internalFormat=Q,d&&z==2){J=J/2|0;var W=z=null,ka=null,ha=null,ta=L.b.buffer,za=0;za==null&&(za=0);z=z!=null?new Uint8Array(z):W!=null?new Uint8Array(W):ka!=null?new Uint8Array(ka.__array):ha!=null?new Uint8Array(ha):ta!=null?J==null?new Uint8Array(ta,za):new Uint8Array(ta,za,J):null;yd.compressedTexImage2D(f,u,v,c.__internalFormat,r,F,0,z);var eb=new Co(c.__context,c.__size,3,c.__optimizeForRenderToTexture,
c.__streamingLevels);eb.__format=Q;eb.__internalFormat=Q;c.__context.__bindGLTextureCubeMap(eb.__textureID);ha=ka=W=z=null;ta=L.b.buffer;za=J;za==null&&(za=0);z=z!=null?new Uint8Array(z):W!=null?new Uint8Array(W):ka!=null?new Uint8Array(ka.__array):ha!=null?new Uint8Array(ha):ta!=null?J==null?new Uint8Array(ta,za):new Uint8Array(ta,za,J):null;yd.compressedTexImage2D(f,u,v,eb.__internalFormat,r,F,0,z);c.__alphaTexture=eb}else ha=ka=W=z=null,ta=L.b.buffer,za=0,za==null&&(za=0),z=z!=null?new Uint8Array(z):
W!=null?new Uint8Array(W):ka!=null?new Uint8Array(ka.__array):ha!=null?new Uint8Array(ha):ta!=null?J==null?new Uint8Array(ta,za):new Uint8Array(ta,za,J):null,yd.compressedTexImage2D(f,u,v,c.__internalFormat,r,F,0,z)});if(!g){a=this.__size*this.__size*4;var h=b=null,n=null,l=null,q=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):n!=null?new Uint8Array(n):l!=null?q==null?new Uint8Array(l,0):new Uint8Array(l,0,q):null;yd.texImage2D(f,this.__sideToTarget(0),
0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=l=n=h=b=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):n!=null?new Uint8Array(n):l!=null?q==null?new Uint8Array(l,0):new Uint8Array(l,0,q):null;yd.texImage2D(f,this.__sideToTarget(1),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=l=n=h=b=null;a=a!=null?new Uint8Array(a):b!=null?
new Uint8Array(b):h!=null?new Uint8Array(h.__array):n!=null?new Uint8Array(n):l!=null?q==null?new Uint8Array(l,0):new Uint8Array(l,0,q):null;yd.texImage2D(f,this.__sideToTarget(2),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=l=n=h=b=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):n!=null?new Uint8Array(n):l!=null?q==null?new Uint8Array(l,0):new Uint8Array(l,0,q):null;yd.texImage2D(f,this.__sideToTarget(3),
0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=l=n=h=b=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):n!=null?new Uint8Array(n):l!=null?q==null?new Uint8Array(l,0):new Uint8Array(l,0,q):null;yd.texImage2D(f,this.__sideToTarget(4),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=l=n=h=b=null;a=a!=null?new Uint8Array(a):b!=null?
new Uint8Array(b):h!=null?new Uint8Array(h.__array):n!=null?new Uint8Array(n):l!=null?q==null?new Uint8Array(l,0):new Uint8Array(l,0,q):null;yd.texImage2D(f,this.__sideToTarget(5),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a)}this.__context.__bindGLTextureCubeMap(null)},__class__:Co});var Iq=function(a,b,c,d,f){pd.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=f;this.__textureTarget=this.__context.gl.TEXTURE_2D;this.uploadFromTypedArray(null);
f&&this.__getGLFramebuffer(!0,0,0)};t["openfl.display3D.textures.RectangleTexture"]=Iq;Iq.__name__="openfl.display3D.textures.RectangleTexture";Iq.__super__=pd;Iq.prototype=I(pd.prototype,{uploadFromBitmapData:function(a){if(a!=null&&(a=this.__getImage(a),a!=null))if(a.buffer!=null&&a.buffer.data==null&&a.buffer.get_src()!=null){var b=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);yd.texImage2D(b,this.__textureTarget,0,this.__internalFormat,this.__format,b.UNSIGNED_BYTE,a.buffer.get_src());
this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data())},uploadFromByteArray:function(a,b){b==0?this.uploadFromTypedArray(a.b):(a=mc.toArrayBuffer(a),b==null&&(b=0),b=a!=null?new Uint8Array(a,b):null,this.uploadFromTypedArray(b))},uploadFromTypedArray:function(a){var b=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);yd.texImage2D(b,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,b.UNSIGNED_BYTE,a);this.__context.__bindGLTexture2D(null)},
__setSamplerState:function(a){if(pd.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;if($c.__glMaxTextureMaxAnisotropy!=0){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>$c.__glMaxTextureMaxAnisotropy&&(a=$c.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,$c.__glTextureMaxAnisotropy,a)}return!0}return!1},__class__:Iq});var kn=function(a,b,c,d,f,g){pd.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=
f;this.__streamingLevels=g;a=this.__context.gl;this.__textureTarget=a.TEXTURE_2D;this.__context.__bindGLTexture2D(this.__textureID);yd.texImage2D(a,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,a.UNSIGNED_BYTE,null);this.__context.__bindGLTexture2D(null);f&&this.__getGLFramebuffer(!0,0,0)};t["openfl.display3D.textures.Texture"]=kn;kn.__name__="openfl.display3D.textures.Texture";kn.__super__=pd;kn.prototype=I(pd.prototype,{uploadCompressedTextureFromByteArray:function(a,
b,c){c==null&&(c=!1);var d=this;c?Gc.delay(function(){d.__uploadCompressedTextureFromByteArray(a,b);var f=new pa("textureReady");d.dispatchEvent(f)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c){b==null&&(b=0);if(a!=null){c=this.__width>>b;var d=this.__height>>b;if(c!=0||d!=0){c==0&&(c=1);d==0&&(d=1);if(a.width!=c||a.height!=d)c=new Dc(c,d,!0,0),c.draw(a),a=c;a=this.__getImage(a);if(a!=null)if(b==0&&a.buffer!=null&&a.buffer.data==null&&a.buffer.get_src()!=
null){var f=this.__context.gl;c=this.__width>>b;d=this.__height>>b;if(c!=0||d!=0)this.__context.__bindGLTexture2D(this.__textureID),yd.texImage2D(f,this.__textureTarget,b,this.__internalFormat,this.__format,f.UNSIGNED_BYTE,a.buffer.get_src()),this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data(),b)}}},uploadFromByteArray:function(a,b,c){c==null&&(c=0);b==0?this.uploadFromTypedArray(a.b,c):(a=mc.toArrayBuffer(a),b==null&&(b=0),b=a!=null?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,
c))},uploadFromTypedArray:function(a,b){b==null&&(b=0);if(a!=null){var c=this.__context.gl,d=this.__width>>b,f=this.__height>>b;if(d!=0||f!=0)d==0&&(d=1),f==0&&(f=1),this.__context.__bindGLTexture2D(this.__textureID),yd.texImage2D(c,this.__textureTarget,b,this.__internalFormat,d,f,0,this.__format,c.UNSIGNED_BYTE,a),this.__context.__bindGLTexture2D(null)}},__setSamplerState:function(a){if(pd.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;a.mipfilter==2||this.__samplerState.mipmapGenerated||
(b.generateMipmap(b.TEXTURE_2D),this.__samplerState.mipmapGenerated=!0);if($c.__glMaxTextureMaxAnisotropy!=0){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>$c.__glMaxTextureMaxAnisotropy&&(a=$c.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,$c.__glTextureMaxAnisotropy,a)}return!0}return!1},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Lq(a,b);var d=a.readHeader(this.__width,this.__height,!1),f=this.__context.gl;
this.__context.__bindGLTexture2D(this.__textureID);var g=!1;a.readTextures(function(h,n,l,q,u,v,z){h=d?pd.__compressedFormatsAlpha.h[l]:pd.__compressedFormats.h[l];if(h!=0)if(g=!0,c.__format=h,c.__internalFormat=h,d&&l==2){v=v/2|0;var r=l=null,F=null,J=null,L=z.b.buffer,Q=0;Q==null&&(Q=0);l=l!=null?new Uint8Array(l):r!=null?new Uint8Array(r):F!=null?new Uint8Array(F.__array):J!=null?new Uint8Array(J):L!=null?v==null?new Uint8Array(L,Q):new Uint8Array(L,Q,v):null;yd.compressedTexImage2D(f,c.__textureTarget,
n,c.__internalFormat,q,u,0,l);var W=new kn(c.__context,c.__width,c.__height,3,c.__optimizeForRenderToTexture,c.__streamingLevels);W.__format=h;W.__internalFormat=h;c.__context.__bindGLTexture2D(W.__textureID);J=F=r=l=null;L=z.b.buffer;Q=v;Q==null&&(Q=0);l=l!=null?new Uint8Array(l):r!=null?new Uint8Array(r):F!=null?new Uint8Array(F.__array):J!=null?new Uint8Array(J):L!=null?v==null?new Uint8Array(L,Q):new Uint8Array(L,Q,v):null;yd.compressedTexImage2D(f,W.__textureTarget,n,W.__internalFormat,q,u,0,
l);c.__alphaTexture=W}else J=F=r=l=null,L=z.b.buffer,Q=0,Q==null&&(Q=0),l=l!=null?new Uint8Array(l):r!=null?new Uint8Array(r):F!=null?new Uint8Array(F.__array):J!=null?new Uint8Array(J):L!=null?v==null?new Uint8Array(L,Q):new Uint8Array(L,Q,v):null,yd.compressedTexImage2D(f,c.__textureTarget,n,c.__internalFormat,q,u,0,l)});g||(a=this.__width*this.__height*4,a=a!=null?new Uint8Array(a):null,yd.texImage2D(f,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,f.UNSIGNED_BYTE,
a));this.__context.__bindGLTexture2D(null)},__class__:kn});var wv=function(a){pd.call(this,a);this.__textureTarget=this.__context.gl.TEXTURE_2D};t["openfl.display3D.textures.VideoTexture"]=wv;wv.__name__="openfl.display3D.textures.VideoTexture";wv.__super__=pd;wv.prototype=I(pd.prototype,{videoHeight:null,videoWidth:null,__cacheTime:null,__netStream:null,attachNetStream:function(a){var b=this;this.__netStream!=null&&this.__netStream.__video.removeEventListener("canplay",m(this,this.__onCanPlay),!1);
this.__cacheTime=-1;this.__netStream=a;this.__netStream!=null&&(this.__netStream.__video.readyState>=2?Gc.delay(function(){b.__textureReady()},0):this.__netStream.__video.addEventListener("canplay",m(this,this.__onCanPlay),!1))},dispose:function(){this.__netStream!=null&&this.__netStream.__video!=null&&this.__netStream.__video.removeEventListener("timeupdate",m(this,this.__onTimeUpdate));pd.prototype.dispose.call(this)},__onCanPlay:function(a){this.__netStream.__video.addEventListener("timeupdate",
m(this,this.__onTimeUpdate));this.__textureReady()},__onTimeUpdate:function(a){this.__netStream!=null&&this.__netStream.__video.currentTime!=this.__cacheTime&&this.__netStream.__video.readyState>=2&&this.__textureReady()},__getTexture:function(){if(this.__netStream.__video.currentTime!=this.__cacheTime&&this.__netStream.__video.readyState>=2){var a=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);yd.texImage2D(a,a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,this.__netStream.__video);
this.__cacheTime=this.__netStream.__video.currentTime}return this.__textureID},__textureReady:function(){this.videoWidth=this.__netStream.__video.videoWidth;this.videoHeight=this.__netStream.__video.videoHeight;var a=new pa("textureReady");this.dispatchEvent(a)},__class__:wv});var Sd=function(a,b){b==null&&(b=0);a==null&&(a="");ba.call(this,a);this.errorID=b;this.name="Error";this.__skipStack++};t["openfl.errors.Error"]=Sd;Sd.__name__="openfl.errors.Error";Sd.__super__=ba;Sd.prototype=I(ba.prototype,
{errorID:null,name:null,getStackTrace:function(){return zi.toString(zi.exceptionStack())},toString:function(){return this.get_message()!=null?this.get_message():"Error"},__class__:Sd});var Cb=function(a){a==null&&(a="");Sd.call(this,a);this.name="ArgumentError";this.__skipStack++};t["openfl.errors.ArgumentError"]=Cb;Cb.__name__="openfl.errors.ArgumentError";Cb.__super__=Sd;Cb.prototype=I(Sd.prototype,{__class__:Cb});var rm=function(a){a==null&&(a="");Sd.call(this,a);this.name="IOError";this.__skipStack++};
t["openfl.errors.IOError"]=rm;rm.__name__="openfl.errors.IOError";rm.__super__=Sd;rm.prototype=I(Sd.prototype,{__class__:rm});var Ik=function(a,b){rm.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030;this.__skipStack++};t["openfl.errors.EOFError"]=Ik;Ik.__name__="openfl.errors.EOFError";Ik.__super__=rm;Ik.prototype=I(rm.prototype,{__class__:Ik});var ob=function(a){a==null&&(a="");Sd.call(this,a,0);this.name="IllegalOperationError";this.__skipStack++};t["openfl.errors.IllegalOperationError"]=
ob;ob.__name__="openfl.errors.IllegalOperationError";ob.__super__=Sd;ob.prototype=I(Sd.prototype,{__class__:ob});var we=function(a){a==null&&(a="");Sd.call(this,a,0);this.name="RangeError";this.__skipStack++};t["openfl.errors.RangeError"]=we;we.__name__="openfl.errors.RangeError";we.__super__=Sd;we.prototype=I(Sd.prototype,{__class__:we});var mt=function(a){a==null&&(a="");Sd.call(this,a,0);this.name="SecurityError";this.__skipStack++};t["openfl.errors.SecurityError"]=mt;mt.__name__="openfl.errors.SecurityError";
mt.__super__=Sd;mt.prototype=I(Sd.prototype,{__class__:mt});var Ce=function(a){a==null&&(a="");Sd.call(this,a,0);this.name="TypeError";this.__skipStack++};t["openfl.errors.TypeError"]=Ce;Ce.__name__="openfl.errors.TypeError";Ce.__super__=Sd;Ce.prototype=I(Sd.prototype,{__class__:Ce});var vl=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.activating=d};t["openfl.events.ActivityEvent"]=vl;vl.__name__="openfl.events.ActivityEvent";vl.__super__=pa;vl.prototype=
I(pa.prototype,{activating:null,clone:function(){var a=new vl(this.type,this.bubbles,this.cancelable,this.activating);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ActivityEvent",["type","bubbles","cancelable","activating"])},__init:function(){pa.prototype.__init.call(this);this.activating=!1},__class__:vl});var Dg=function(a,b,c,d){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);
this.text=d};t["openfl.events.TextEvent"]=Dg;Dg.__name__="openfl.events.TextEvent";Dg.__super__=pa;Dg.prototype=I(pa.prototype,{text:null,clone:function(){var a=new Dg(this.type,this.bubbles,this.cancelable,this.text);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TextEvent",["type","bubbles","cancelable","text"])},__init:function(){pa.prototype.__init.call(this);this.text=""},__class__:Dg});var tg=function(a,
b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);Dg.call(this,a,b,c,d);this.errorID=f};t["openfl.events.ErrorEvent"]=tg;tg.__name__="openfl.events.ErrorEvent";tg.__super__=Dg;tg.prototype=I(Dg.prototype,{errorID:null,clone:function(){var a=new tg(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ErrorEvent",["type","bubbles",
"cancelable","text","errorID"])},__init:function(){Dg.prototype.__init.call(this);this.errorID=0},__class__:tg});var Mq=function(a,b,c,d,f){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);tg.call(this,a,b,c);this.text=d;this.error=f};t["openfl.events.AsyncErrorEvent"]=Mq;Mq.__name__="openfl.events.AsyncErrorEvent";Mq.__super__=tg;Mq.prototype=I(tg.prototype,{error:null,clone:function(){var a=new Mq(this.type,this.bubbles,this.cancelable,this.text,this.error);a.target=this.target;a.currentTarget=this.currentTarget;
a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("AsyncErrorEvent",["type","bubbles","cancelable","text","error"])},__init:function(){tg.prototype.__init.call(this);this.text="";this.error=null},__class__:Mq});var mn=function(a,b,c,d){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);Dg.call(this,a,b,c);this.data=d};t["openfl.events.DataEvent"]=mn;mn.__name__="openfl.events.DataEvent";mn.__super__=Dg;mn.prototype=I(Dg.prototype,{data:null,clone:function(){var a=
new mn(this.type,this.bubbles,this.cancelable,this.data);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("DataEvent",["type","bubbles","cancelable","data"])},__init:function(){Dg.prototype.__init.call(this);this.data=""},__class__:mn});var Mo=function(a){this.active=!1;this.reset(a)};t["openfl.events._EventDispatcher.DispatchIterator"]=Mo;Mo.__name__="openfl.events._EventDispatcher.DispatchIterator";Mo.prototype=
{active:null,index:null,isCopy:null,list:null,copy:function(){this.isCopy||(this.list=this.list.slice(),this.isCopy=!0)},hasNext:function(){return this.index<this.list.length},next:function(){return this.list[this.index++]},remove:function(a,b){if(this.active)if(this.isCopy){b=this.index;for(var c=this.list.length;b<c;){var d=b++;if(this.list[d]==a){this.list.splice(d,1);break}}}else b<this.index&&this.index--},reset:function(a){this.list=a;this.isCopy=!1;this.index=0},start:function(){this.active=
!0},stop:function(){this.active=!1},__class__:Mo};var mm=function(a,b,c,d){d&&mm.supportsWeakReference?this.weakRefCallback=new WeakRef(a):this.callback=a;this.useCapture=b;this.priority=c;this.useWeakReference=d};t["openfl.events._EventDispatcher.Listener"]=mm;mm.__name__="openfl.events._EventDispatcher.Listener";mm.prototype={callback:null,weakRefCallback:null,priority:null,useCapture:null,useWeakReference:null,match:function(a,b){var c=this.callback;return this.weakRefCallback!=null&&(c=this.weakRefCallback.deref(),
c==null)?!1:c==a?this.useCapture==b:!1},__class__:mm};var yj=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=!1);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.keyCode=g;this.shiftKey=f;this.relatedObject=d};t["openfl.events.FocusEvent"]=yj;yj.__name__="openfl.events.FocusEvent";yj.__super__=pa;yj.prototype=I(pa.prototype,{keyCode:null,relatedObject:null,shiftKey:null,clone:function(){var a=new yj(this.type,this.bubbles,this.cancelable,this.relatedObject,this.shiftKey,this.keyCode);a.target=
this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FocusEvent","type bubbles cancelable relatedObject shiftKey keyCode".split(" "))},__init:function(){pa.prototype.__init.call(this);this.keyCode=0;this.shiftKey=!1;this.relatedObject=null},__class__:yj});var Ej=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);c==null&&(c=!1);b==null&&(b=!1);vl.call(this,a,b,c);this.fullScreen=d;this.interactive=f};t["openfl.events.FullScreenEvent"]=
Ej;Ej.__name__="openfl.events.FullScreenEvent";Ej.__super__=vl;Ej.prototype=I(vl.prototype,{fullScreen:null,interactive:null,clone:function(){var a=new Ej(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FullscreenEvent",["type","bubbles","cancelable","fullscreen","interactive"])},__init:function(){vl.prototype.__init.call(this);this.interactive=
this.fullScreen=!1},__class__:Ej});var Jk=function(a,b,c,d){c==null&&(c=!1);b==null&&(b=!0);pa.call(this,a,b,c);this.device=d};t["openfl.events.GameInputEvent"]=Jk;Jk.__name__="openfl.events.GameInputEvent";Jk.__super__=pa;Jk.prototype=I(pa.prototype,{device:null,clone:function(){var a=new Jk(this.type,this.bubbles,this.cancelable,this.device);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("GameInputEvent",
["type","bubbles","cancelable","device"])},__init:function(){pa.prototype.__init.call(this);this.bubbles=!0;this.device=null},__class__:Jk});var im=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);this.responseHeaders=[];this.status=d;this.redirected=f;pa.call(this,a,b,c)};t["openfl.events.HTTPStatusEvent"]=im;im.__name__="openfl.events.HTTPStatusEvent";im.__super__=pa;im.prototype=I(pa.prototype,{redirected:null,responseHeaders:null,responseURL:null,status:null,
clone:function(){var a=new im(this.type,this.bubbles,this.cancelable,this.status,this.redirected);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("HTTPStatusEvent",["type","bubbles","cancelable","status","redirected"])},__init:function(){pa.prototype.__init.call(this);this.status=0;this.redirected=!1},__class__:im});var Oh=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!0);
tg.call(this,a,b,c,d,f)};t["openfl.events.IOErrorEvent"]=Oh;Oh.__name__="openfl.events.IOErrorEvent";Oh.__super__=tg;Oh.prototype=I(tg.prototype,{clone:function(){var a=new Oh(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("IOErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:Oh});var Vm=function(a,b,c,d,f,g,h,n,l,q,u){u==
null&&(u=!1);q==null&&(q=!1);l==null&&(l=!1);n==null&&(n=!1);h==null&&(h=!1);f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.charCode=d;this.keyCode=f;this.keyLocation=g!=null?g:0;this.ctrlKey=h;this.altKey=n;this.shiftKey=l;this.controlKey=q;this.commandKey=u;this.__updateAfterEventFlag=!1};t["openfl.events.KeyboardEvent"]=Vm;Vm.__name__="openfl.events.KeyboardEvent";Vm.__super__=pa;Vm.prototype=I(pa.prototype,{altKey:null,charCode:null,commandKey:null,controlKey:null,
ctrlKey:null,keyCode:null,keyLocation:null,shiftKey:null,__updateAfterEventFlag:null,clone:function(){var a=new Vm(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey,this.controlKey,this.commandKey);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("KeyboardEvent","type bubbles cancelable charCode keyCode keyLocation ctrlKey altKey shiftKey".split(" "))},
updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__init:function(){pa.prototype.__init.call(this);this.keyLocation=this.keyCode=this.charCode=0;this.__updateAfterEventFlag=this.commandKey=this.controlKey=this.shiftKey=this.altKey=this.ctrlKey=!1},__class__:Vm});var Ic=function(a,b,c,d,f,g,h,n,l,q,u,v,z,r){r==null&&(r=0);z==null&&(z=!1);v==null&&(v=!1);u==null&&(u=0);q==null&&(q=!1);l==null&&(l=!1);n==null&&(n=!1);h==null&&(h=!1);f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=
!0);pa.call(this,a,b,c);this.shiftKey=l;this.altKey=n;this.ctrlKey=h;this.bubbles=b;this.relatedObject=g;this.delta=u;this.localX=d;this.localY=f;this.buttonDown=q;this.commandKey=v;this.controlKey=z;this.clickCount=r;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1};t["openfl.events.MouseEvent"]=Ic;Ic.__name__="openfl.events.MouseEvent";Ic.__create=function(a,b,c,d,f,g,h,n){n==null&&(n=0);a=new Ic(a,!0,!1,g.x,g.y,null,Ic.__ctrlKey,Ic.__altKey,Ic.__shiftKey,
Ic.__buttonDown,n,Ic.__commandKey,Ic.__controlKey,c);a.stageX=d;a.stageY=f;a.target=h;return a};Ic.__super__=pa;Ic.prototype=I(pa.prototype,{altKey:null,buttonDown:null,commandKey:null,controlKey:null,clickCount:null,ctrlKey:null,delta:null,isRelatedObjectInaccessible:null,localX:null,localY:null,relatedObject:null,shiftKey:null,stageX:null,stageY:null,__updateAfterEventFlag:null,clone:function(){var a=new Ic(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,
this.altKey,this.shiftKey,this.buttonDown,this.delta,this.commandKey,this.controlKey,this.clickCount);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("MouseEvent","type bubbles cancelable localX localY relatedObject ctrlKey altKey shiftKey buttonDown delta".split(" "))},updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__init:function(){pa.prototype.__init.call(this);this.bubbles=!0;this.ctrlKey=
this.altKey=this.shiftKey=!1;this.relatedObject=null;this.localY=this.localX=this.delta=0;this.controlKey=this.commandKey=this.buttonDown=!1;this.clickCount=0;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1},__class__:Ic});var nn=function(a,b,c,d){c==null&&(c=!1);b==null&&(b=!1);this.info=d;pa.call(this,a,b,c)};t["openfl.events.NetStatusEvent"]=nn;nn.__name__="openfl.events.NetStatusEvent";nn.__super__=pa;nn.prototype=I(pa.prototype,{info:null,clone:function(){var a=
new nn(this.type,this.bubbles,this.cancelable,this.info);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("NetStatusEvent",["type","bubbles","cancelable","info"])},__init:function(){pa.prototype.__init.call(this);this.info=null},__class__:nn});var sh=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=f};t["openfl.events.ProgressEvent"]=
sh;sh.__name__="openfl.events.ProgressEvent";sh.__super__=pa;sh.prototype=I(pa.prototype,{bytesLoaded:null,bytesTotal:null,clone:function(){var a=new sh(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ProgressEvent",["type","bubbles","cancelable","bytesLoaded","bytesTotal"])},__init:function(){pa.prototype.__init.call(this);this.bytesTotal=
this.bytesLoaded=0},__class__:sh});var fk=function(a,b,c,d,f,g){g==null&&(g=!0);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.objectMatrix=d;this.objectColorTransform=f;this.allowSmoothing=g};t["openfl.events.RenderEvent"]=fk;fk.__name__="openfl.events.RenderEvent";fk.__super__=pa;fk.prototype=I(pa.prototype,{allowSmoothing:null,objectColorTransform:null,objectMatrix:null,renderer:null,clone:function(){var a=new fk(this.type,this.bubbles,this.cancelable,this.objectMatrix.clone(),this.objectColorTransform.__clone(),
this.allowSmoothing);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("RenderEvent",["type","bubbles","cancelable"])},__init:function(){pa.prototype.__init.call(this);this.objectColorTransform=this.objectMatrix=null;this.allowSmoothing=!1;this.renderer=null},__class__:fk});var Fo=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.data=new Xc(0);this.data.__endian=1;this.position=0};
t["openfl.events.SampleDataEvent"]=Fo;Fo.__name__="openfl.events.SampleDataEvent";Fo.__super__=pa;Fo.prototype=I(pa.prototype,{data:null,position:null,tempBuffer:null,leftChannel:null,rightChannel:null,clone:function(){var a=new Fo(this.type,this.bubbles,this.cancelable);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;a.data=this.data;a.position=this.position;return a},toString:function(){return this.__formatToString("SampleDataEvent",["type","bubbles","cancelable"])},
__init:function(){pa.prototype.__init.call(this);this.data=new Xc(0);this.data.__endian=1;this.position=0},getBufferSize:function(){var a=sb.toFloat(mc.get_length(this.data))/sb.toFloat(4)/2|0;if(a>0){if(a!=0&&(a&a-1)==0&&a>=2048&&a<=8192)return this.tempBuffer=new Float32Array(a*2),a;throw new Sd("To be consistent with flash the listener function registered to SampleDataEvent has to provide 2048, 4096 or 8192 samples if targeting HTML5.");}return 0},getSamples:function(a){this.data.position=0;this.tempBuffer=
gA.fromBytes(mc.toBytes(this.data));this.leftChannel=a.outputBuffer.getChannelData(0);this.rightChannel=a.outputBuffer.getChannelData(1);for(var b=a=0,c=sb.toFloat(mc.get_length(this.data))/sb.toFloat(2)|0;b<c;){var d=b++;this.leftChannel[d]=this.tempBuffer[a++];this.rightChannel[d]=this.tempBuffer[a++]}},__class__:Fo});var ym=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);tg.call(this,a,b,c,d,f)};t["openfl.events.SecurityErrorEvent"]=ym;ym.__name__="openfl.events.SecurityErrorEvent";
ym.__super__=tg;ym.prototype=I(tg.prototype,{clone:function(){var a=new ym(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("SecurityErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:ym});var Wm=function(a,b,c,d,f){f==null&&(f=3);d==null&&(d=3);c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.beforeOrientation=
d;this.afterOrientation=f};t["openfl.events.StageOrientationEvent"]=Wm;Wm.__name__="openfl.events.StageOrientationEvent";Wm.__super__=pa;Wm.prototype=I(pa.prototype,{beforeOrientation:null,afterOrientation:null,clone:function(){var a=new Wm(this.type,this.bubbles,this.cancelable,this.beforeOrientation,this.afterOrientation);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("StageOrientationEvent",["type",
"bubbles","cancelable","beforeOrientation","afterOrientation"])},__class__:Wm});var wl=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);pa.call(this,a,b,c);this.__updateAfterEventFlag=!1};t["openfl.events.TimerEvent"]=wl;wl.__name__="openfl.events.TimerEvent";wl.__super__=pa;wl.prototype=I(pa.prototype,{__updateAfterEventFlag:null,clone:function(){var a=new wl(this.type,this.bubbles,this.cancelable);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TimerEvent",
["type","bubbles","cancelable"])},updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__class__:wl});var Sf=function(a,b,c,d,f,g,h,n,l,q,u,v,z,r,F,J,L,Q,W,ka){J==null&&(J=!1);F==null&&(F=!1);r==null&&(r=!1);z==null&&(z=!1);v==null&&(v=!1);q==null&&(q=0);l==null&&(l=0);n==null&&(n=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!0);pa.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=f;this.localX=g;this.localY=h;this.sizeX=n;this.sizeY=
l;this.pressure=q;this.relatedObject=u;this.ctrlKey=v;this.altKey=z;this.shiftKey=r;this.commandKey=F;this.controlKey=J;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1};t["openfl.events.TouchEvent"]=Sf;Sf.__name__="openfl.events.TouchEvent";Sf.__create=function(a,b,c,d,f,g){a=new Sf(a,!0,!1,0,!0,f.x,f.y,1,1,1);a.stageX=c;a.stageY=d;a.target=g;return a};Sf.__super__=pa;Sf.prototype=I(pa.prototype,{altKey:null,commandKey:null,controlKey:null,ctrlKey:null,delta:null,isPrimaryTouchPoint:null,
localX:null,localY:null,pressure:null,relatedObject:null,shiftKey:null,sizeX:null,sizeY:null,stageX:null,stageY:null,touchPointID:null,__updateAfterEventFlag:null,clone:function(){var a=new Sf(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey,this.controlKey);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;
return a},toString:function(){return this.__formatToString("TouchEvent","type bubbles cancelable touchPointID isPrimaryTouchPoint localX localY sizeX sizeY pressure relatedObject ctrlKey altKey shiftKey commandKey controlKey".split(" "))},updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__init:function(){pa.prototype.__init.call(this);this.bubbles=!0;this.touchPointID=0;this.isPrimaryTouchPoint=!1;this.pressure=this.sizeY=this.sizeX=this.localY=this.localX=0;this.relatedObject=null;this.controlKey=
this.commandKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1},__class__:Sf});var xl=function(a,b,c,d){c==null&&(c=!0);b==null&&(b=!0);tg.call(this,a,b,c);this.error=d};t["openfl.events.UncaughtErrorEvent"]=xl;xl.__name__="openfl.events.UncaughtErrorEvent";xl.__super__=tg;xl.prototype=I(tg.prototype,{error:null,clone:function(){var a=new xl(this.type,this.bubbles,this.cancelable,this.error);a.target=this.target;a.currentTarget=this.currentTarget;
a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("UncaughtErrorEvent",["type","bubbles","cancelable","error"])},__init:function(){tg.prototype.__init.call(this);this.cancelable=this.bubbles=!0;this.error=null},__class__:xl});var ev=function(){this.__enabled=!0;qa.call(this)};t["openfl.events.UncaughtErrorEvents"]=ev;ev.__name__="openfl.events.UncaughtErrorEvents";ev.__super__=qa;ev.prototype=I(qa.prototype,{__enabled:null,addEventListener:function(a,b,c,d,f){f==
null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);qa.prototype.addEventListener.call(this,a,b,c,d,f);Object.prototype.hasOwnProperty.call(this.__eventMap.h,"uncaughtError")&&(this.__enabled=!0)},removeEventListener:function(a,b,c){c==null&&(c=!1);qa.prototype.removeEventListener.call(this,a,b,c);Object.prototype.hasOwnProperty.call(this.__eventMap.h,"uncaughtError")||(this.__enabled=!1)},__class__:ev});var Go=function(){};t["openfl.external.ExternalInterface"]=Go;Go.__name__="openfl.external.ExternalInterface";
Go.__properties__={get_objectID:"get_objectID"};Go.addCallback=function(a,b){md.application.__window.element!=null&&(md.application.__window.element[a]=b)};Go.call=function(a,b,c,d,f,g){if(!(new Wa("^\\(.+\\)$","")).match(a)){var h=a.split(".").slice(0,-1).join(".");h.length>0&&(a+=".bind("+h+")")}try{var n=eval(a)}catch(l){return Pb.lastError=l,null}return ab.typeof(n)!=ac.TFunction?null:b==null?n():c==null?n(b):d==null?n(b,c):f==null?n(b,c,d):g==null?n(b,c,d,f):n(b,c,d,f,g)};Go.get_objectID=function(){return md.application!=
null&&md.application.__window!=null&&md.application.__window.element!=null?md.application.__window.element.id:null};var gi=function(){this.__leftExtension=this.__bottomExtension=0;this.__needSecondBitmapData=!0;this.__numShaderPasses=0;this.__preserveObject=!1;this.__rightExtension=0;this.__shaderBlendMode=10;this.__topExtension=0;this.__smooth=!0};t["openfl.filters.BitmapFilter"]=gi;gi.__name__="openfl.filters.BitmapFilter";gi.prototype={__bottomExtension:null,__leftExtension:null,__needSecondBitmapData:null,
__numShaderPasses:null,__preserveObject:null,__renderDirty:null,__rightExtension:null,__shaderBlendMode:null,__smooth:null,__topExtension:null,clone:function(){return new gi},__applyFilter:function(a,b,c,d){return b},__initShader:function(a,b,c){return null},__class__:gi};var Se=function(a){this.__glFragmentSource==null&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_FragColor = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t}");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");bi.call(this,a);this.__isGenerated=!0;this.__initGL()};t["openfl.filters.BitmapFilterShader"]=Se;Se.__name__="openfl.filters.BitmapFilterShader";
Se.__super__=bi;Se.prototype=I(bi.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Se});var zv=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="uniform sampler2D openfl_Texture;\n\n\t\tvarying vec2 vBlurCoords[7];\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 sum = vec4(0.0);\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[0]) * 0.00443;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[1]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[2]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[3]) * 0.39894;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[4]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[5]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[6]) * 0.00443;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = openfl_TextureCoord + r;\n\n\t\t}");
Se.call(this);this.uRadius.value=[0,0];this.__isGenerated=!0;this.__initGL()};t["openfl.filters._BlurFilter.BlurShader"]=zv;zv.__name__="openfl.filters._BlurFilter.BlurShader";zv.__super__=Se;zv.prototype=I(Se.prototype,{__update:function(){this.uTextureSize.value=[this.__texture.input.width,this.__texture.input.height];Se.prototype.__update.call(this)},uRadius:null,uTextureSize:null,__class__:zv});var ij=function(a,b,c){c==null&&(c=1);b==null&&(b=4);a==null&&(a=4);gi.call(this);this.set_blurX(a);
this.set_blurY(b);this.set_quality(c);this.__needSecondBitmapData=!0;this.__preserveObject=!1;this.__renderDirty=!0};t["openfl.filters.BlurFilter"]=ij;ij.__name__="openfl.filters.BlurFilter";ij.__super__=gi;ij.prototype=I(gi.prototype,{__blurX:null,__blurY:null,__horizontalPasses:null,__quality:null,__verticalPasses:null,clone:function(){return new ij(this.__blurX,this.__blurY,this.__quality)},__applyFilter:function(a,b,c,d){(new Date).getTime();c=Ub.gaussianBlur(a.image,b.image,c.__toLimeRectangle(),
d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality);(new Date).getTime();return c==a.image?a:b},__initShader:function(a,b,c){b<this.__horizontalPasses?(a=Math.pow(.5,b>>1),ij.__blurShader.uRadius.value[0]=this.get_blurX()*a,ij.__blurShader.uRadius.value[1]=0):(a=Math.pow(.5,b-this.__horizontalPasses>>1),ij.__blurShader.uRadius.value[0]=0,ij.__blurShader.uRadius.value[1]=this.get_blurY()*a);return ij.__blurShader},__padFor:function(a){return a<=0?0:(Math.ceil(a*(this.__quality>0?this.__quality:
1)*3)|0)+2},get_blurX:function(){return this.__blurX},set_blurX:function(a){if(a!=this.__blurX){this.__blurX=a;this.__renderDirty=!0;var b;this.__rightExtension=this.__leftExtension=b=a<=0?0:(Math.ceil(a*(this.__quality>0?this.__quality:1)*3)|0)+2}return a},get_blurY:function(){return this.__blurY},set_blurY:function(a){if(a!=this.__blurY){this.__blurY=a;this.__renderDirty=!0;var b;this.__bottomExtension=this.__topExtension=b=a<=0?0:(Math.ceil(a*(this.__quality>0?this.__quality:1)*3)|0)+2}return a},
get_quality:function(){return this.__quality},set_quality:function(a){this.__horizontalPasses=this.__blurX<=0?0:Math.round(a/4*this.__blurX)+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(a/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses;a!=this.__quality&&(this.__renderDirty=!0);this.__quality=a;this.set_blurX(this.__blurX);this.set_blurY(this.__blurY);return this.__quality},__class__:ij,__properties__:{set_quality:"set_quality",get_quality:"get_quality",
set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX"}});var Av=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_FragColor = texture2D(openfl_Texture, textureCoords.zw);\n\t\t}\n\t");this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");
Se.call(this);this.offset.value=[0,0];this.__isGenerated=!0;this.__initGL()};t["openfl.filters._DropShadowFilter.HideShader"]=Av;Av.__name__="openfl.filters._DropShadowFilter.HideShader";Av.__super__=Se;Av.prototype=I(Se.prototype,{offset:null,sourceBitmap:null,__class__:Av});var Cl=function(a,b,c,d,f,g,h,n,l,q,u){u==null&&(u=!1);q==null&&(q=!1);l==null&&(l=!1);n==null&&(n=1);h==null&&(h=1);g==null&&(g=4);f==null&&(f=4);d==null&&(d=1);c==null&&(c=0);b==null&&(b=45);a==null&&(a=4);gi.call(this);this.__offsetY=
this.__offsetX=0;this.__distance=a;this.__angle=b;this.__color=c;this.__alpha=d;this.__blurX=f;this.__blurY=g;this.__strength=h;this.__quality=n;this.__inner=l;this.__knockout=q;this.__hideObject=u;this.__updateSize();this.__renderDirty=this.__preserveObject=this.__needSecondBitmapData=!0};t["openfl.filters.DropShadowFilter"]=Cl;Cl.__name__="openfl.filters.DropShadowFilter";Cl.__super__=gi;Cl.prototype=I(gi.prototype,{__alpha:null,__angle:null,__blurX:null,__blurY:null,__color:null,__distance:null,
__hideObject:null,__horizontalPasses:null,__inner:null,__knockout:null,__offsetX:null,__offsetY:null,__quality:null,__strength:null,__verticalPasses:null,clone:function(){return new Cl(this.__distance,this.__angle,this.__color,this.__alpha,this.__blurX,this.__blurY,this.__strength,this.__quality,this.__inner,this.__knockout,this.__hideObject)},__applyFilter:function(a,b,c,d){var f=this.__color>>16&255,g=this.__color>>8&255,h=this.__color&255;d=new Ea(d.x+this.__offsetX,d.y+this.__offsetY);c=Ub.gaussianBlur(a.image,
b.image,c.__toLimeRectangle(),d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);c.colorTransform(c.get_rect(),(new wc(0,0,0,this.__alpha,f,g,h,0)).__toLimeColorMatrix());return c==a.image?a:b},__initShader:function(a,b,c){if(this.__inner&&b==0)return ke.__invertAlphaShader;a=b-(this.__inner?1:0);b=this.__horizontalPasses+this.__verticalPasses;if(a<b){var d=ke.__blurAlphaShader;a<this.__horizontalPasses?(c=Math.pow(.5,a>>1)*.5,d.uRadius.value[0]=this.get_blurX()*c,d.uRadius.value[1]=
0):(c=Math.pow(.5,a-this.__horizontalPasses>>1)*.5,d.uRadius.value[0]=0,d.uRadius.value[1]=this.get_blurY()*c);d.uColor.value[0]=(this.get_color()>>16&255)/255;d.uColor.value[1]=(this.get_color()>>8&255)/255;d.uColor.value[2]=(this.get_color()&255)/255;d.uColor.value[3]=this.get_alpha();d.uStrength.value[0]=a==b-1?this.__strength:1;return d}if(this.__inner){if(this.__knockout||this.__hideObject)return d=ke.__innerCombineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=
this.__offsetY,d;d=ke.__innerCombineShader}else{if(this.__knockout)return d=ke.__combineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=this.__offsetY,d;if(this.__hideObject)return d=Cl.__hideShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=this.__offsetY,d;d=ke.__combineShader}d.sourceBitmap.input=c;d.offset.value[0]=this.__offsetX;d.offset.value[1]=this.__offsetY;return d},__updateSize:function(){this.__offsetX=this.__distance*
Math.cos(this.__angle*Math.PI/180)|0;this.__offsetY=this.__distance*Math.sin(this.__angle*Math.PI/180)|0;this.__topExtension=Math.ceil((this.__offsetY<0?-this.__offsetY:0)+this.__blurY);this.__bottomExtension=Math.ceil((this.__offsetY>0?this.__offsetY:0)+this.__blurY);this.__leftExtension=Math.ceil((this.__offsetX<0?-this.__offsetX:0)+this.__blurX);this.__rightExtension=Math.ceil((this.__offsetX>0?this.__offsetX:0)+this.__blurX);this.__calculateNumShaderPasses()},__calculateNumShaderPasses:function(){this.__horizontalPasses=
this.__blurX<=0?0:Math.round(this.__quality/4*this.__blurX)+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__quality/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses+(this.__inner?2:1)},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__renderDirty=!0);return this.__alpha=a},get_angle:function(){return this.__angle},set_angle:function(a){a!=this.__angle&&(this.__angle=a,this.__renderDirty=!0,this.__updateSize());
return a},get_blurX:function(){return this.__blurX},set_blurX:function(a){a!=this.__blurX&&(this.__blurX=a,this.__renderDirty=!0,this.__updateSize());return a},get_blurY:function(){return this.__blurY},set_blurY:function(a){a!=this.__blurY&&(this.__blurY=a,this.__renderDirty=!0,this.__updateSize());return a},get_color:function(){return this.__color},set_color:function(a){a!=this.__color&&(this.__renderDirty=!0);return this.__color=a},get_distance:function(){return this.__distance},set_distance:function(a){a!=
this.__distance&&(this.__distance=a,this.__renderDirty=!0,this.__updateSize());return a},get_hideObject:function(){return this.__hideObject},set_hideObject:function(a){a!=this.__hideObject&&(this.__renderDirty=!0);return this.__hideObject=a},get_inner:function(){return this.__inner},set_inner:function(a){a!=this.__inner&&(this.__renderDirty=!0);return this.__inner=a},get_knockout:function(){return this.__knockout},set_knockout:function(a){a!=this.__knockout&&(this.__renderDirty=!0);return this.__knockout=
a},get_quality:function(){return this.__quality},set_quality:function(a){a!=this.__quality&&(this.__renderDirty=!0);return this.__quality=a},get_strength:function(){return this.__strength},set_strength:function(a){a!=this.__strength&&(this.__renderDirty=!0);return this.__strength=a},__class__:Cl,__properties__:{set_strength:"set_strength",get_strength:"get_strength",set_quality:"set_quality",get_quality:"get_quality",set_knockout:"set_knockout",get_knockout:"get_knockout",set_inner:"set_inner",get_inner:"get_inner",
set_hideObject:"set_hideObject",get_hideObject:"get_hideObject",set_distance:"set_distance",get_distance:"get_distance",set_color:"set_color",get_color:"get_color",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX",set_angle:"set_angle",get_angle:"get_angle",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var Bv=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec4 uColor;\n\t\tuniform float uStrength;\n\t\tvarying vec2 vTexCoord;\n\t\tvarying vec2 vBlurCoords[6];\n\n\t\tvoid main(void)\n\t\t{\n            vec4 texel = texture2D(openfl_Texture, vTexCoord);\n\n            vec3 contributions = vec3(0.00443, 0.05399, 0.24197);\n            vec3 top = vec3(\n                texture2D(openfl_Texture, vBlurCoords[0]).a,\n                texture2D(openfl_Texture, vBlurCoords[1]).a,\n                texture2D(openfl_Texture, vBlurCoords[2]).a\n            );\n            vec3 bottom = vec3(\n                texture2D(openfl_Texture, vBlurCoords[3]).a,\n                texture2D(openfl_Texture, vBlurCoords[4]).a,\n                texture2D(openfl_Texture, vBlurCoords[5]).a\n            );\n\n            float a = texel.a * 0.39894;\n\t\t\ta += dot(top, contributions.xyz);\n            a += dot(bottom, contributions.zyx);\n\n\t\t\tgl_FragColor = uColor * clamp(a * uStrength, 0.0, 1.0);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vTexCoord;\n\t\tvarying vec2 vBlurCoords[6];\n\n\t\tvoid main(void) {\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\tvTexCoord = openfl_TextureCoord;\n\n\t\t\tvec3 offset = vec3(0.5, 0.75, 1.0);\n\t\t\tvec2 r = uRadius / openfl_TextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r * offset.z;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * offset.y;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * offset.x;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord + r * offset.x;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * offset.y;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * offset.z;\n\t\t}\n\t");
Se.call(this);this.uRadius.value=[0,0];this.uColor.value=[0,0,0,0];this.uStrength.value=[1];this.__isGenerated=!0;this.__initGL()};t["openfl.filters._GlowFilter.BlurAlphaShader"]=Bv;Bv.__name__="openfl.filters._GlowFilter.BlurAlphaShader";Bv.__super__=Se;Bv.prototype=I(Se.prototype,{uRadius:null,uColor:null,uStrength:null,__class__:Bv});var Cv=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = glow * (1.0 - src.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Se.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.CombineKnockoutShader"]=Cv;Cv.__name__="openfl.filters._GlowFilter.CombineKnockoutShader";Cv.__super__=Se;Cv.prototype=I(Se.prototype,{offset:null,sourceBitmap:null,__class__:Cv});var Dv=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = src + glow * (1.0 - src.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Se.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.CombineShader"]=Dv;Dv.__name__="openfl.filters._GlowFilter.CombineShader";Dv.__super__=Se;Dv.prototype=I(Se.prototype,{offset:null,sourceBitmap:null,__class__:Dv});var Ev=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = glow * src.a;\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Se.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.InnerCombineKnockoutShader"]=Ev;Ev.__name__="openfl.filters._GlowFilter.InnerCombineKnockoutShader";Ev.__super__=Se;Ev.prototype=I(Se.prototype,{offset:null,sourceBitmap:null,__class__:Ev});var Fv=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = vec4((src.rgb * (1.0 - glow.a)) + (glow.rgb * src.a), src.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Se.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.InnerCombineShader"]=Fv;Fv.__name__="openfl.filters._GlowFilter.InnerCombineShader";Fv.__super__=Se;Fv.prototype=I(Se.prototype,{offset:null,sourceBitmap:null,__class__:Fv});var Gv=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tvarying vec2 vTexCoord;\n\n\t\tvoid main(void) {\n\t\t\tvec4 texel = texture2D(openfl_Texture, vTexCoord);\n\t\t\tgl_FragColor = vec4(texel.rgb, 1.0 - texel.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tvarying vec2 vTexCoord;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\tvTexCoord = openfl_TextureCoord;\n\t\t}\n\t");Se.call(this);this.__isGenerated=!0;this.__initGL()};t["openfl.filters._GlowFilter.InvertAlphaShader"]=Gv;Gv.__name__="openfl.filters._GlowFilter.InvertAlphaShader";Gv.__super__=
Se;Gv.prototype=I(Se.prototype,{__class__:Gv});var ke=function(a,b,c,d,f,g,h,n){n==null&&(n=!1);h==null&&(h=!1);g==null&&(g=1);f==null&&(f=2);d==null&&(d=6);c==null&&(c=6);b==null&&(b=1);a==null&&(a=16711680);gi.call(this);this.__color=a;this.__alpha=b;this.__blurX=c;this.__blurY=d;this.__strength=f;this.__inner=h;this.__knockout=n;this.__quality=g;this.__updateSize();this.__renderDirty=this.__preserveObject=this.__needSecondBitmapData=!0};t["openfl.filters.GlowFilter"]=ke;ke.__name__="openfl.filters.GlowFilter";
ke.__super__=gi;ke.prototype=I(gi.prototype,{__alpha:null,__blurX:null,__blurY:null,__color:null,__horizontalPasses:null,__inner:null,__knockout:null,__quality:null,__strength:null,__verticalPasses:null,clone:function(){return new ke(this.__color,this.__alpha,this.__blurX,this.__blurY,this.__strength,this.__quality,this.__inner,this.__knockout)},__applyFilter:function(a,b,c,d){var f=this.__color>>16&255,g=this.__color>>8&255,h=this.__color&255;c=Ub.gaussianBlur(a.image,b.image,c.__toLimeRectangle(),
d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);c.colorTransform(c.get_rect(),(new wc(0,0,0,this.__alpha,f,g,h,0)).__toLimeColorMatrix());return c==a.image?a:b},__initShader:function(a,b,c){if(this.__inner&&b==0)return ke.__invertAlphaShader;a=b-(this.__inner?1:0);b=this.__horizontalPasses+this.__verticalPasses;if(a<b){var d=ke.__blurAlphaShader;a<this.__horizontalPasses?(c=Math.pow(.5,a>>1)*.5,d.uRadius.value[0]=this.get_blurX()*c,d.uRadius.value[1]=0):(c=Math.pow(.5,
a-this.__horizontalPasses>>1)*.5,d.uRadius.value[0]=0,d.uRadius.value[1]=this.get_blurY()*c);d.uColor.value[0]=(this.get_color()>>16&255)/255;d.uColor.value[1]=(this.get_color()>>8&255)/255;d.uColor.value[2]=(this.get_color()&255)/255;d.uColor.value[3]=this.get_alpha();d.uStrength.value[0]=a==b-1?this.__strength:1;return d}if(this.__inner){if(this.__knockout)return d=ke.__innerCombineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=0,d.offset.value[1]=0,d;d=ke.__innerCombineShader}else{if(this.__knockout)return d=
ke.__combineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=0,d.offset.value[1]=0,d;d=ke.__combineShader}d.sourceBitmap.input=c;d.offset.value[0]=0;d.offset.value[1]=0;return d},__updateSize:function(){this.__rightExtension=this.__leftExtension=this.__blurX>0?Math.ceil(this.__blurX*1.5):0;this.__bottomExtension=this.__topExtension=this.__blurY>0?Math.ceil(this.__blurY*1.5):0;this.__calculateNumShaderPasses()},__calculateNumShaderPasses:function(){this.__horizontalPasses=this.__blurX<=0?0:
Math.round(this.__quality/4*this.__blurX)+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__quality/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses+(this.__inner?2:1)},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__renderDirty=!0);return this.__alpha=a},get_blurX:function(){return this.__blurX},set_blurX:function(a){a!=this.__blurX&&(this.__blurX=a,this.__renderDirty=!0,this.__updateSize());return a},get_blurY:function(){return this.__blurY},
set_blurY:function(a){a!=this.__blurY&&(this.__blurY=a,this.__renderDirty=!0,this.__updateSize());return a},get_color:function(){return this.__color},set_color:function(a){a!=this.__color&&(this.__renderDirty=!0);return this.__color=a},get_inner:function(){return this.__inner},set_inner:function(a){a!=this.__inner&&(this.__renderDirty=!0,this.__calculateNumShaderPasses());return this.__inner=a},get_knockout:function(){return this.__knockout},set_knockout:function(a){a!=this.__knockout&&(this.__renderDirty=
!0,this.__calculateNumShaderPasses());return this.__knockout=a},get_quality:function(){return this.__quality},set_quality:function(a){a!=this.__quality&&(this.__renderDirty=!0,this.__calculateNumShaderPasses());return this.__quality=a},get_strength:function(){return this.__strength},set_strength:function(a){a!=this.__strength&&(this.__renderDirty=!0);return this.__strength=a},__class__:ke,__properties__:{set_strength:"set_strength",get_strength:"get_strength",set_quality:"set_quality",get_quality:"get_quality",
set_knockout:"set_knockout",get_knockout:"get_knockout",set_inner:"set_inner",get_inner:"get_inner",set_color:"set_color",get_color:"get_color",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var Rm=function(a){this.blendMode=10;gi.call(this);this.shader=a;this.__numShaderPasses=1};t["openfl.filters.ShaderFilter"]=Rm;Rm.__name__="openfl.filters.ShaderFilter";Rm.__super__=gi;Rm.prototype=I(gi.prototype,{blendMode:null,
shader:null,clone:function(){var a=new Rm(this.shader);a.set_bottomExtension(this.get_bottomExtension());a.set_leftExtension(this.get_leftExtension());a.set_rightExtension(this.get_rightExtension());a.set_topExtension(this.get_topExtension());a.blendMode=this.blendMode;return a},invalidate:function(){this.__renderDirty=!0},get_topExtension:function(){return this.__topExtension},set_topExtension:function(a){return this.__topExtension=a},get_bottomExtension:function(){return this.__bottomExtension},
set_bottomExtension:function(a){return this.__bottomExtension=a},get_leftExtension:function(){return this.__leftExtension},set_leftExtension:function(a){return this.__leftExtension=a},get_rightExtension:function(){return this.__rightExtension},set_rightExtension:function(a){return this.__rightExtension=a},__initShader:function(a,b,c){this.__shaderBlendMode=this.blendMode;return this.shader},__class__:Rm,__properties__:{set_topExtension:"set_topExtension",get_topExtension:"get_topExtension",set_rightExtension:"set_rightExtension",
get_rightExtension:"get_rightExtension",set_leftExtension:"set_leftExtension",get_leftExtension:"get_leftExtension",set_bottomExtension:"set_bottomExtension",get_bottomExtension:"get_bottomExtension"}});var Cf=function(a){a!=null&&a.get_length()==16?this.rawData=a.concat(null):this.rawData=tb.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};t["openfl.geom.Matrix3D"]=Cf;Cf.__name__="openfl.geom.Matrix3D";Cf.create2D=function(a,b,c,d){d==null&&(d=0);c==null&&(c=1);var f=d*Math.PI/180;
d=Math.cos(f);f=Math.sin(f);return new Cf(tb.toFloatVector(null,null,null,[d*c,-f*c,0,0,f*c,d*c,0,0,0,0,1,0,a,b,0,1]))};Cf.createABCD=function(a,b,c,d,f,g){return new Cf(tb.toFloatVector(null,null,null,[a,b,0,0,c,d,0,0,0,0,1,0,f,g,0,1]))};Cf.createOrtho=function(a,b,c,d,f,g){var h=1/(b-a),n=1/(d-c),l=1/(g-f);return new Cf(tb.toFloatVector(null,null,null,[2*h,0,0,0,0,2*n,0,0,0,0,-2*l,0,-(a+b)*h,-(c+d)*n,-(f+g)*l,1]))};Cf.interpolate=function(a,b,c){for(var d=new Cf,f=0;f<16;){var g=f++;d.rawData.set(g,
a.rawData.get(g)+(b.rawData.get(g)-a.rawData.get(g))*c)}return d};Cf.interpolateToOutput=function(a,b,c,d){d==null&&(d=new Cf);for(var f=0;f<16;){var g=f++;d.rawData.set(g,a.rawData.get(g)+(b.rawData.get(g)-a.rawData.get(g))*c)}return d};Cf.__getAxisRotation=function(a,b,c,d){var f=new Cf;a=new ae(a,b,c);d=Math.PI/180*-d;c=Math.cos(d);d=Math.sin(d);b=1-c;f.rawData.set(0,c+a.x*a.x*b);f.rawData.set(5,c+a.y*a.y*b);f.rawData.set(10,c+a.z*a.z*b);c=a.x*a.y*b;var g=a.z*d;f.rawData.set(4,c+g);f.rawData.set(1,
c-g);c=a.x*a.z*b;g=a.y*d;f.rawData.set(8,c-g);f.rawData.set(2,c+g);c=a.y*a.z*b;g=a.x*d;f.rawData.set(9,c+g);f.rawData.set(6,c-g);return f};Cf.prototype={rawData:null,append:function(a){var b=this.rawData.get(0),c=this.rawData.get(4),d=this.rawData.get(8),f=this.rawData.get(12),g=this.rawData.get(1),h=this.rawData.get(5),n=this.rawData.get(9),l=this.rawData.get(13),q=this.rawData.get(2),u=this.rawData.get(6),v=this.rawData.get(10),z=this.rawData.get(14),r=this.rawData.get(3),F=this.rawData.get(7),
J=this.rawData.get(11),L=this.rawData.get(15),Q=a.rawData.get(0),W=a.rawData.get(4),ka=a.rawData.get(8),ha=a.rawData.get(12),ta=a.rawData.get(1),za=a.rawData.get(5),eb=a.rawData.get(9),db=a.rawData.get(13),Ra=a.rawData.get(2),vb=a.rawData.get(6),bb=a.rawData.get(10),Tb=a.rawData.get(14),Eb=a.rawData.get(3),Lb=a.rawData.get(7),vc=a.rawData.get(11);a=a.rawData.get(15);this.rawData.set(0,b*Q+g*W+q*ka+r*ha);this.rawData.set(1,b*ta+g*za+q*eb+r*db);this.rawData.set(2,b*Ra+g*vb+q*bb+r*Tb);this.rawData.set(3,
b*Eb+g*Lb+q*vc+r*a);this.rawData.set(4,c*Q+h*W+u*ka+F*ha);this.rawData.set(5,c*ta+h*za+u*eb+F*db);this.rawData.set(6,c*Ra+h*vb+u*bb+F*Tb);this.rawData.set(7,c*Eb+h*Lb+u*vc+F*a);this.rawData.set(8,d*Q+n*W+v*ka+J*ha);this.rawData.set(9,d*ta+n*za+v*eb+J*db);this.rawData.set(10,d*Ra+n*vb+v*bb+J*Tb);this.rawData.set(11,d*Eb+n*Lb+v*vc+J*a);this.rawData.set(12,f*Q+l*W+z*ka+L*ha);this.rawData.set(13,f*ta+l*za+z*eb+L*db);this.rawData.set(14,f*Ra+l*vb+z*bb+L*Tb);this.rawData.set(15,f*Eb+l*Lb+z*vc+L*a)},appendRotation:function(a,
b,c){var d=0,f=d,g=f;c!=null&&(g=c.x,f=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var h=b.x,n=b.y;b=b.z;var l=h*h,q=n*n,u=b*b,v=l+q+u;if(v!=0){var z=Math.sqrt(v);h/=z;n/=z;b/=z;l/=v;q/=v;u/=v}v=1-a;z=new Cf;var r=z.rawData;r.set(0,l+(q+u)*a);r.set(1,h*n*v+b*c);r.set(2,h*b*v-n*c);r.set(4,h*n*v-b*c);r.set(5,q+(l+u)*a);r.set(6,n*b*v+h*c);r.set(8,h*b*v+n*c);r.set(9,n*b*v-h*c);r.set(10,u+(l+q)*a);r.set(12,(g*(q+u)-h*(f*n+d*b))*v+(f*b-d*n)*c);r.set(13,(f*(l+u)-n*(g*h+d*b))*v+(d*h-g*b)*c);r.set(14,
(d*(l+q)-b*(g*h+f*n))*v+(g*n-f*h)*c);this.append(z)},appendScale:function(a,b,c){this.append(new Cf(tb.toFloatVector(null,null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},appendTranslation:function(a,b,c){var d=this.rawData;d.set(12,d.get(12)+a);d=this.rawData;d.set(13,d.get(13)+b);d=this.rawData;d.set(14,d.get(14)+c)},clone:function(){return new Cf(this.rawData.copy())},copyColumnFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(1,b.y);this.rawData.set(2,b.z);this.rawData.set(3,
b.w);break;case 1:this.rawData.set(4,b.x);this.rawData.set(5,b.y);this.rawData.set(6,b.z);this.rawData.set(7,b.w);break;case 2:this.rawData.set(8,b.x);this.rawData.set(9,b.y);this.rawData.set(10,b.z);this.rawData.set(11,b.w);break;case 3:this.rawData.set(12,b.x),this.rawData.set(13,b.y),this.rawData.set(14,b.z),this.rawData.set(15,b.w)}},copyColumnTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(1);b.z=this.rawData.get(2);b.w=this.rawData.get(3);break;case 1:b.x=this.rawData.get(4);
b.y=this.rawData.get(5);b.z=this.rawData.get(6);b.w=this.rawData.get(7);break;case 2:b.x=this.rawData.get(8);b.y=this.rawData.get(9);b.z=this.rawData.get(10);b.w=this.rawData.get(11);break;case 3:b.x=this.rawData.get(12),b.y=this.rawData.get(13),b.z=this.rawData.get(14),b.w=this.rawData.get(15)}},copyFrom:function(a){this.rawData=a.rawData.copy()},copyRawDataFrom:function(a,b,c){c==null&&(c=!1);b==null&&(b=0);c&&this.transpose();for(var d=0,f=a.get_length()-b;d<f;){var g=d++;this.rawData.set(g,a.get(g+
b))}c&&this.transpose()},copyRawDataTo:function(a,b,c){c==null&&(c=!1);b==null&&(b=0);c&&this.transpose();for(var d=0,f=this.rawData.get_length();d<f;){var g=d++;a.set(g+b,this.rawData.get(g))}c&&this.transpose()},copyRowFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(4,b.y);this.rawData.set(8,b.z);this.rawData.set(12,b.w);break;case 1:this.rawData.set(1,b.x);this.rawData.set(5,b.y);this.rawData.set(9,b.z);this.rawData.set(13,b.w);break;case 2:this.rawData.set(2,b.x);
this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,b.w);break;case 3:this.rawData.set(3,b.x),this.rawData.set(7,b.y),this.rawData.set(11,b.z),this.rawData.set(15,b.w)}},copyRowTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(4);b.z=this.rawData.get(8);b.w=this.rawData.get(12);break;case 1:b.x=this.rawData.get(1);b.y=this.rawData.get(5);b.z=this.rawData.get(9);b.w=this.rawData.get(13);break;case 2:b.x=this.rawData.get(2);b.y=this.rawData.get(6);b.z=this.rawData.get(10);
b.w=this.rawData.get(14);break;case 3:b.x=this.rawData.get(3),b.y=this.rawData.get(7),b.z=this.rawData.get(11),b.w=this.rawData.get(15)}},copyToMatrix3D:function(a){a.rawData=this.rawData.copy()},decompose:function(a){a==null&&(a=1);var b=tb.toObjectVector(null),c=this.clone().rawData.copy(),d=new ae(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var f=new ae;f.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));f.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+
c.get(6)*c.get(6));f.z=Math.sqrt(c.get(8)*c.get(8)+c.get(9)*c.get(9)+c.get(10)*c.get(10));c.get(0)*(c.get(5)*c.get(10)-c.get(6)*c.get(9))-c.get(1)*(c.get(4)*c.get(10)-c.get(6)*c.get(8))+c.get(2)*(c.get(4)*c.get(9)-c.get(5)*c.get(8))<0&&(f.z=-f.z);var g=c;g.set(0,g.get(0)/f.x);g=c;g.set(1,g.get(1)/f.x);g=c;g.set(2,g.get(2)/f.x);g=c;g.set(4,g.get(4)/f.y);g=c;g.set(5,g.get(5)/f.y);g=c;g.set(6,g.get(6)/f.y);g=c;g.set(8,g.get(8)/f.z);g=c;g.set(9,g.get(9)/f.z);g=c;g.set(10,g.get(10)/f.z);g=new ae;switch(a){case 0:g.w=
Math.acos((c.get(0)+c.get(5)+c.get(10)-1)/2);a=Math.sqrt((c.get(6)-c.get(9))*(c.get(6)-c.get(9))+(c.get(8)-c.get(2))*(c.get(8)-c.get(2))+(c.get(1)-c.get(4))*(c.get(1)-c.get(4)));a!=0?(g.x=(c.get(6)-c.get(9))/a,g.y=(c.get(8)-c.get(2))/a,g.z=(c.get(1)-c.get(4))/a):g.x=g.y=g.z=0;break;case 1:g.y=Math.asin(-c.get(2));c.get(2)!=1&&c.get(2)!=-1?(g.x=Math.atan2(c.get(6),c.get(10)),g.z=Math.atan2(c.get(1),c.get(0))):(g.z=0,g.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),a>0?
(g.w=Math.sqrt(1+a)/2,g.x=(c.get(6)-c.get(9))/(4*g.w),g.y=(c.get(8)-c.get(2))/(4*g.w),g.z=(c.get(1)-c.get(4))/(4*g.w)):c.get(0)>c.get(5)&&c.get(0)>c.get(10)?(g.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,g.w=(c.get(6)-c.get(9))/(4*g.x),g.y=(c.get(1)+c.get(4))/(4*g.x),g.z=(c.get(8)+c.get(2))/(4*g.x)):c.get(5)>c.get(10)?(g.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,g.x=(c.get(1)+c.get(4))/(4*g.y),g.w=(c.get(8)-c.get(2))/(4*g.y),g.z=(c.get(6)+c.get(9))/(4*g.y)):(g.z=Math.sqrt(1+c.get(10)-c.get(0)-
c.get(5))/2,g.x=(c.get(8)+c.get(2))/(4*g.z),g.y=(c.get(6)+c.get(9))/(4*g.z),g.w=(c.get(1)-c.get(4))/(4*g.z))}b.push(d);b.push(g);b.push(f);return b},decomposeToOutput:function(a,b){a==null&&(a=1);b==null&&(b=tb.toObjectVector(null));var c=this.clone().rawData.copy(),d=b.get(0);d==null?d=new ae(c.get(12),c.get(13),c.get(14)):d.setTo(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var f=b.get(1);f==null&&(f=new ae);f.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));
f.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+c.get(6)*c.get(6));f.z=Math.sqrt(c.get(8)*c.get(8)+c.get(9)*c.get(9)+c.get(10)*c.get(10));c.get(0)*(c.get(5)*c.get(10)-c.get(6)*c.get(9))-c.get(1)*(c.get(4)*c.get(10)-c.get(6)*c.get(8))+c.get(2)*(c.get(4)*c.get(9)-c.get(5)*c.get(8))<0&&(f.z=-f.z);var g=c;g.set(0,g.get(0)/f.x);g=c;g.set(1,g.get(1)/f.x);g=c;g.set(2,g.get(2)/f.x);g=c;g.set(4,g.get(4)/f.y);g=c;g.set(5,g.get(5)/f.y);g=c;g.set(6,g.get(6)/f.y);g=c;g.set(8,g.get(8)/f.z);g=c;g.set(9,g.get(9)/
f.z);g=c;g.set(10,g.get(10)/f.z);g=b.get(2);g==null&&(g=new ae);switch(a){case 0:g.w=Math.acos((c.get(0)+c.get(5)+c.get(10)-1)/2);a=Math.sqrt((c.get(6)-c.get(9))*(c.get(6)-c.get(9))+(c.get(8)-c.get(2))*(c.get(8)-c.get(2))+(c.get(1)-c.get(4))*(c.get(1)-c.get(4)));a!=0?(g.x=(c.get(6)-c.get(9))/a,g.y=(c.get(8)-c.get(2))/a,g.z=(c.get(1)-c.get(4))/a):g.x=g.y=g.z=0;break;case 1:g.y=Math.asin(-c.get(2));c.get(2)!=1&&c.get(2)!=-1?(g.x=Math.atan2(c.get(6),c.get(10)),g.z=Math.atan2(c.get(1),c.get(0))):(g.z=
0,g.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),a>0?(g.w=Math.sqrt(1+a)/2,g.x=(c.get(6)-c.get(9))/(4*g.w),g.y=(c.get(8)-c.get(2))/(4*g.w),g.z=(c.get(1)-c.get(4))/(4*g.w)):c.get(0)>c.get(5)&&c.get(0)>c.get(10)?(g.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,g.w=(c.get(6)-c.get(9))/(4*g.x),g.y=(c.get(1)+c.get(4))/(4*g.x),g.z=(c.get(8)+c.get(2))/(4*g.x)):c.get(5)>c.get(10)?(g.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,g.x=(c.get(1)+c.get(4))/(4*g.y),g.w=(c.get(8)-c.get(2))/
(4*g.y),g.z=(c.get(6)+c.get(9))/(4*g.y)):(g.z=Math.sqrt(1+c.get(10)-c.get(0)-c.get(5))/2,g.x=(c.get(8)+c.get(2))/(4*g.z),g.y=(c.get(6)+c.get(9))/(4*g.z),g.w=(c.get(1)-c.get(4))/(4*g.z))}b.set(0,d);b.set(1,g);b.set(2,f);return b},deltaTransformVector:function(a){var b=a.x,c=a.y;a=a.z;return new ae(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8),b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10),b*this.rawData.get(3)+
c*this.rawData.get(7)+a*this.rawData.get(11))},deltaTransformVectorToOutput:function(a,b){var c=a.x,d=a.y;a=a.z;return b!=null?(b.setTo(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)),b.w=c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11),b):new ae(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8),c*this.rawData.get(1)+
d*this.rawData.get(5)+a*this.rawData.get(9),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10),c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11))},identity:function(){this.rawData=tb.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])},interpolateTo:function(a,b){for(var c=0;c<16;){var d=c++;this.rawData.set(d,this.rawData.get(d)+(a.rawData.get(d)-this.rawData.get(d))*b)}},invert:function(){var a=this.get_determinant(),b=Math.abs(a)>1E-11;if(b){a=1/a;var c=
this.rawData.get(0),d=this.rawData.get(4),f=this.rawData.get(8),g=this.rawData.get(12),h=this.rawData.get(1),n=this.rawData.get(5),l=this.rawData.get(9),q=this.rawData.get(13),u=this.rawData.get(2),v=this.rawData.get(6),z=this.rawData.get(10),r=this.rawData.get(14),F=this.rawData.get(3),J=this.rawData.get(7),L=this.rawData.get(11),Q=this.rawData.get(15);this.rawData.set(0,a*(n*(z*Q-r*L)-l*(v*Q-r*J)+q*(v*L-z*J)));this.rawData.set(1,-a*(h*(z*Q-r*L)-l*(u*Q-r*F)+q*(u*L-z*F)));this.rawData.set(2,a*(h*
(v*Q-r*J)-n*(u*Q-r*F)+q*(u*J-v*F)));this.rawData.set(3,-a*(h*(v*L-z*J)-n*(u*L-z*F)+l*(u*J-v*F)));this.rawData.set(4,-a*(d*(z*Q-r*L)-f*(v*Q-r*J)+g*(v*L-z*J)));this.rawData.set(5,a*(c*(z*Q-r*L)-f*(u*Q-r*F)+g*(u*L-z*F)));this.rawData.set(6,-a*(c*(v*Q-r*J)-d*(u*Q-r*F)+g*(u*J-v*F)));this.rawData.set(7,a*(c*(v*L-z*J)-d*(u*L-z*F)+f*(u*J-v*F)));this.rawData.set(8,a*(d*(l*Q-q*L)-f*(n*Q-q*J)+g*(n*L-l*J)));this.rawData.set(9,-a*(c*(l*Q-q*L)-f*(h*Q-q*F)+g*(h*L-l*F)));this.rawData.set(10,a*(c*(n*Q-q*J)-d*(h*Q-
q*F)+g*(h*J-n*F)));this.rawData.set(11,-a*(c*(n*L-l*J)-d*(h*L-l*F)+f*(h*J-n*F)));this.rawData.set(12,-a*(d*(l*r-q*z)-f*(n*r-q*v)+g*(n*z-l*v)));this.rawData.set(13,a*(c*(l*r-q*z)-f*(h*r-q*u)+g*(h*z-l*u)));this.rawData.set(14,-a*(c*(n*r-q*v)-d*(h*r-q*u)+g*(h*v-n*u)));this.rawData.set(15,a*(c*(n*z-l*v)-d*(h*z-l*u)+f*(h*v-n*u)))}return b},pointAt:function(a,b,c){b==null&&(b=new ae(0,0,-1));c==null&&(c=new ae(0,-1,0));b=b.subtract(a);c=c.clone();b.normalize();c.normalize();var d=b.clone();d.scaleBy(c.dotProduct(b));
c=c.subtract(d);c.get_length()>0?c.normalize():c=b.x!=0?new ae(-b.y,b.x,0):new ae(1,0,0);d=c.crossProduct(b);d.normalize();this.rawData.set(0,d.x);this.rawData.set(4,d.y);this.rawData.set(8,d.z);this.rawData.set(12,0);this.rawData.set(1,c.x);this.rawData.set(5,c.y);this.rawData.set(9,c.z);this.rawData.set(13,0);this.rawData.set(2,b.x);this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,0);this.rawData.set(3,a.x);this.rawData.set(7,a.y);this.rawData.set(11,a.z);this.rawData.set(15,
1)},prepend:function(a){var b=a.rawData.get(0),c=a.rawData.get(4),d=a.rawData.get(8),f=a.rawData.get(12),g=a.rawData.get(1),h=a.rawData.get(5),n=a.rawData.get(9),l=a.rawData.get(13),q=a.rawData.get(2),u=a.rawData.get(6),v=a.rawData.get(10),z=a.rawData.get(14),r=a.rawData.get(3),F=a.rawData.get(7),J=a.rawData.get(11);a=a.rawData.get(15);var L=this.rawData.get(0),Q=this.rawData.get(4),W=this.rawData.get(8),ka=this.rawData.get(12),ha=this.rawData.get(1),ta=this.rawData.get(5),za=this.rawData.get(9),
eb=this.rawData.get(13),db=this.rawData.get(2),Ra=this.rawData.get(6),vb=this.rawData.get(10),bb=this.rawData.get(14),Tb=this.rawData.get(3),Eb=this.rawData.get(7),Lb=this.rawData.get(11),vc=this.rawData.get(15);this.rawData.set(0,b*L+g*Q+q*W+r*ka);this.rawData.set(1,b*ha+g*ta+q*za+r*eb);this.rawData.set(2,b*db+g*Ra+q*vb+r*bb);this.rawData.set(3,b*Tb+g*Eb+q*Lb+r*vc);this.rawData.set(4,c*L+h*Q+u*W+F*ka);this.rawData.set(5,c*ha+h*ta+u*za+F*eb);this.rawData.set(6,c*db+h*Ra+u*vb+F*bb);this.rawData.set(7,
c*Tb+h*Eb+u*Lb+F*vc);this.rawData.set(8,d*L+n*Q+v*W+J*ka);this.rawData.set(9,d*ha+n*ta+v*za+J*eb);this.rawData.set(10,d*db+n*Ra+v*vb+J*bb);this.rawData.set(11,d*Tb+n*Eb+v*Lb+J*vc);this.rawData.set(12,f*L+l*Q+z*W+a*ka);this.rawData.set(13,f*ha+l*ta+z*za+a*eb);this.rawData.set(14,f*db+l*Ra+z*vb+a*bb);this.rawData.set(15,f*Tb+l*Eb+z*Lb+a*vc)},prependRotation:function(a,b,c){var d=0,f=d,g=f;c!=null&&(g=c.x,f=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var h=b.x,n=b.y;b=b.z;var l=h*h,q=n*n,
u=b*b,v=l+q+u;if(v!=0){var z=Math.sqrt(v);h/=z;n/=z;b/=z;l/=v;q/=v;u/=v}v=1-a;z=new Cf;var r=z.rawData;r.set(0,l+(q+u)*a);r.set(1,h*n*v+b*c);r.set(2,h*b*v-n*c);r.set(4,h*n*v-b*c);r.set(5,q+(l+u)*a);r.set(6,n*b*v+h*c);r.set(8,h*b*v+n*c);r.set(9,n*b*v-h*c);r.set(10,u+(l+q)*a);r.set(12,(g*(q+u)-h*(f*n+d*b))*v+(f*b-d*n)*c);r.set(13,(f*(l+u)-n*(g*h+d*b))*v+(d*h-g*b)*c);r.set(14,(d*(l+q)-b*(g*h+f*n))*v+(g*n-f*h)*c);this.prepend(z)},prependScale:function(a,b,c){this.prepend(new Cf(tb.toFloatVector(null,
null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},prependTranslation:function(a,b,c){var d=new Cf;d.set_position(new ae(a,b,c));this.prepend(d)},recompose:function(a,b){b==null&&(b=1);if(a.get_length()<3||a.get(2).x==0||a.get(2).y==0||a.get(2).z==0)return!1;this.identity();var c=[];c[0]=c[1]=c[2]=a.get(2).x;c[4]=c[5]=c[6]=a.get(2).y;c[8]=c[9]=c[10]=a.get(2).z;if(b==1){b=Math.cos(a.get(1).x);var d=Math.cos(a.get(1).y),f=Math.cos(a.get(1).z),g=Math.sin(a.get(1).x),h=Math.sin(a.get(1).y),n=Math.sin(a.get(1).z);
this.rawData.set(0,d*f*c[0]);this.rawData.set(1,d*n*c[1]);this.rawData.set(2,-h*c[2]);this.rawData.set(3,0);this.rawData.set(4,(g*h*f-b*n)*c[4]);this.rawData.set(5,(g*h*n+b*f)*c[5]);this.rawData.set(6,g*d*c[6]);this.rawData.set(7,0);this.rawData.set(8,(b*h*f+g*n)*c[8]);this.rawData.set(9,(b*h*n-g*f)*c[9]);this.rawData.set(10,b*d*c[10])}else d=a.get(1).x,f=a.get(1).y,g=a.get(1).z,h=a.get(1).w,b==0&&(d*=Math.sin(h/2),f*=Math.sin(h/2),g*=Math.sin(h/2),h=Math.cos(h/2)),this.rawData.set(0,(1-2*f*f-2*g*
g)*c[0]),this.rawData.set(1,(2*d*f+2*h*g)*c[1]),this.rawData.set(2,(2*d*g-2*h*f)*c[2]),this.rawData.set(3,0),this.rawData.set(4,(2*d*f-2*h*g)*c[4]),this.rawData.set(5,(1-2*d*d-2*g*g)*c[5]),this.rawData.set(6,(2*f*g+2*h*d)*c[6]),this.rawData.set(7,0),this.rawData.set(8,(2*d*g+2*h*f)*c[8]),this.rawData.set(9,(2*f*g-2*h*d)*c[9]),this.rawData.set(10,(1-2*d*d-2*f*f)*c[10]);this.rawData.set(11,0);this.rawData.set(12,a.get(0).x);this.rawData.set(13,a.get(0).y);this.rawData.set(14,a.get(0).z);this.rawData.set(15,
1);a.get(2).x==0&&this.rawData.set(0,1E-15);a.get(2).y==0&&this.rawData.set(5,1E-15);a.get(2).z==0&&this.rawData.set(10,1E-15);return!(a.get(2).x==0||a.get(2).y==0||a.get(2).y==0)},transformVector:function(a){var b=a.x,c=a.y;a=a.z;return new ae(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14),
b*this.rawData.get(3)+c*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15))},transformVectorToOutput:function(a,b){var c=a.x,d=a.y;a=a.z;return b!=null?(b.setTo(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14)),b.w=c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11)+
this.rawData.get(15),b):new ae(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14),c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15))},transformVectors:function(a,b){for(var c=0,d,f,g;c+3<=a.get_length();)d=a.get(c),f=a.get(c+1),g=a.get(c+2),b.set(c,d*this.rawData.get(0)+
f*this.rawData.get(4)+g*this.rawData.get(8)+this.rawData.get(12)),b.set(c+1,d*this.rawData.get(1)+f*this.rawData.get(5)+g*this.rawData.get(9)+this.rawData.get(13)),b.set(c+2,d*this.rawData.get(2)+f*this.rawData.get(6)+g*this.rawData.get(10)+this.rawData.get(14)),c+=3},transpose:function(){var a=this.rawData.copy();this.rawData.set(1,a.get(4));this.rawData.set(2,a.get(8));this.rawData.set(3,a.get(12));this.rawData.set(4,a.get(1));this.rawData.set(6,a.get(9));this.rawData.set(7,a.get(13));this.rawData.set(8,
a.get(2));this.rawData.set(9,a.get(6));this.rawData.set(11,a.get(14));this.rawData.set(12,a.get(3));this.rawData.set(13,a.get(7));this.rawData.set(14,a.get(11))},get_determinant:function(){return(this.rawData.get(0)*this.rawData.get(5)-this.rawData.get(4)*this.rawData.get(1))*(this.rawData.get(10)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(11))-(this.rawData.get(0)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(15)-this.rawData.get(14)*
this.rawData.get(7))+(this.rawData.get(0)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(11)-this.rawData.get(10)*this.rawData.get(7))+(this.rawData.get(4)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(3))-(this.rawData.get(4)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(11)-this.rawData.get(10)*
this.rawData.get(3))+(this.rawData.get(8)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(9))*(this.rawData.get(2)*this.rawData.get(7)-this.rawData.get(6)*this.rawData.get(3))},get_position:function(){return new ae(this.rawData.get(12),this.rawData.get(13),this.rawData.get(14))},set_position:function(a){this.rawData.set(12,a.x);this.rawData.set(13,a.y);this.rawData.set(14,a.z);return a},__class__:Cf,__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}};
var Vq=function(a){this.__colorTransform=new wc;this.concatenatedColorTransform=new wc;this.pixelBounds=new Ia;this.__displayObject=a;this.__hasMatrix=!0};t["openfl.geom.Transform"]=Vq;Vq.__name__="openfl.geom.Transform";Vq.prototype={concatenatedColorTransform:null,pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,__hasMatrix3D:null,get_colorTransform:function(){return this.__colorTransform.__clone()},set_colorTransform:function(a){this.__colorTransform.__equals(a,!1)||
(this.__colorTransform.__copyFrom(a),a!=null&&this.__displayObject.set_alpha(a.alphaMultiplier),a=this.__displayObject,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__colorTransform},get_concatenatedMatrix:function(){return this.__hasMatrix?this.__displayObject.__getWorldTransform().clone():null},get_matrix:function(){return this.__hasMatrix?this.__displayObject.__transform.clone():null},set_matrix:function(a){if(a==null)return this.__hasMatrix=!1,null;this.__hasMatrix=
!0;this.__hasMatrix3D=!1;this.__displayObject!=null&&this.__setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty);return a},get_matrix3D:function(){if(this.__hasMatrix3D){var a=this.__displayObject.__transform;return new Cf(tb.toFloatVector(null,null,null,[a.a,a.b,0,0,a.c,a.d,0,0,0,0,1,0,a.tx,a.ty,0,1]))}return null},set_matrix3D:function(a){if(a==null)return this.__hasMatrix3D=!1,null;this.__hasMatrix=!1;this.__hasMatrix3D=!0;this.__setTransform(a.rawData.get(0),a.rawData.get(1),a.rawData.get(4),a.rawData.get(5),
a.rawData.get(12),a.rawData.get(13));return a},__setTransform:function(a,b,c,d,f,g){if(this.__displayObject!=null){var h=this.__displayObject.__transform;if(h.a!=a||h.b!=b||h.c!=c||h.d!=d||h.tx!=f||h.ty!=g){var n=b==0?a:Math.sqrt(a*a+b*b);var l=c==0?d:Math.sqrt(c*c+d*d);this.__displayObject.__scaleX=n;this.__displayObject.__scaleY=l;n=180/Math.PI*Math.atan2(d,c)-90;n!=this.__displayObject.__rotation&&(this.__displayObject.__rotation=n,n*=Math.PI/180,this.__displayObject.__rotationSine=Math.sin(n),
this.__displayObject.__rotationCosine=Math.cos(n));h.a=a;h.b=b;h.c=c;h.d=d;h.tx=f;h.ty=g;this.__displayObject.__setTransformDirty()}}},__class__:Vq,__properties__:{set_matrix3D:"set_matrix3D",get_matrix3D:"get_matrix3D",set_matrix:"set_matrix",get_matrix:"get_matrix",get_concatenatedMatrix:"get_concatenatedMatrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}};var ae=function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.w=d;this.x=a;
this.y=b;this.z=c};t["openfl.geom.Vector3D"]=ae;ae.__name__="openfl.geom.Vector3D";ae.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};ae.angleBetween=function(a,b){var c=a.get_length(),d=b.get_length();a=a.dotProduct(b);c!=0&&(a/=c);d!=0&&(a/=d);return Math.acos(a)};ae.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*c+d*d+a*a)};ae.get_X_AXIS=function(){return new ae(1,0,0)};ae.get_Y_AXIS=function(){return new ae(0,1,0)};ae.get_Z_AXIS=
function(){return new ae(0,0,1)};ae.prototype={w:null,x:null,y:null,z:null,add:function(a){return new ae(this.x+a.x,this.y+a.y,this.z+a.z)},addToOutput:function(a,b){return b!=null?(b.setTo(this.x+a.x,this.y+a.y,this.z+a.z),b):new ae(this.x+a.x,this.y+a.y,this.z+a.z)},clone:function(){return new ae(this.x,this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a){return new ae(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)},crossProductToOutput:function(a,
b){return b!=null?(b.setTo(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x),b.w=1,b):new ae(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){b==null&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z?b?this.w==a.w:!0:!1},incrementBy:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){c==null&&
(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-a.y)<b&&Math.abs(this.z-a.z)<b?c?Math.abs(this.w-a.w)<b:!0:!1},negate:function(){this.x*=-1;this.y*=-1;this.z*=-1},normalize:function(){var a=this.get_length();a!=0&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a){return new ae(this.x-a.x,this.y-a.y,this.z-a.z)},subtractToOutput:function(a,
b){return b!=null?(b.setTo(this.x-a.x,this.y-a.y,this.z-a.z),b):new ae(this.x-a.x,this.y-a.y,this.z-a.z)},toString:function(){return"Vector3D("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:ae,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var op=function(a,b,c){c==null&&(c=1);b==null&&(b=1);this.requestedLocaleIDName=
a;this._normalizedRequestedLocaleIDName=on.normalizeRequestedLocaleIDName(a);this.setDateTimeStyles(b,c);this.actualLocaleIDName=this.intlDateTimeFormat.resolvedOptions().locale;this.lastOperationStatus=7};t["openfl.globalization.DateTimeFormatter"]=op;op.__name__="openfl.globalization.DateTimeFormatter";op.getAvailableLocaleIDNames=function(){return tb.toObjectVector(null)};op.prototype={intlDateTimeFormat:null,intlDateTimeFormatUTC:null,dateStyle:null,timeStyle:null,dateTimePattern:null,getDateStyle:function(){this.lastOperationStatus=
7;return this.dateStyle},getTimeStyle:function(){this.lastOperationStatus=7;return this.timeStyle},getDateTimePattern:function(){this.lastOperationStatus=7;return this.dateTimePattern},getFirstWeekday:function(){this.lastOperationStatus=11;return 0},actualLocaleIDName:null,requestedLocaleIDName:null,_normalizedRequestedLocaleIDName:null,lastOperationStatus:null,format:function(a){if(this.dateStyle==0||this.timeStyle==0){var b=this.formatPatternJS(a,!1);this.lastOperationStatus=7;return b}try{return b=
this.intlDateTimeFormat.format(a),this.lastOperationStatus=7,b}catch(c){return Pb.lastError=c,this.lastOperationStatus=1,null}},formatUTC:function(a){if(this.dateTimePattern!=null){var b=this.formatPatternJS(a,!0);this.lastOperationStatus=7;return b}try{return b=this.intlDateTimeFormatUTC.format(a),this.lastOperationStatus=7,b}catch(c){return Pb.lastError=c,this.lastOperationStatus=1,null}},formatPatternJS:function(a,b){var c="",d=Dy.tokenize(this.dateTimePattern);b=b?"UTC":void 0;for(var f=0;f<d.length;){var g=
d[f];++f;switch(g._hx_index){case 0:var h=g.text;break;case 1:h="";break;case 2:switch(g.length){case 4:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{weekday:"long",timeZone:b})).formatToParts(a);break;case 5:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{weekday:"narrow",timeZone:b})).formatToParts(a);break;default:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{weekday:"short",timeZone:b})).formatToParts(a)}h=this.getDateFormatPart("weekday",
h);break;case 3:switch(g.length){case 4:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{era:"long",timeZone:b})).formatToParts(a);break;case 5:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{era:"narrow",timeZone:b})).formatToParts(a);break;default:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{era:"short",timeZone:b})).formatToParts(a)}h=this.getDateFormatPart("era",h);break;case 4:h=g.length;switch(h){case 1:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{year:"numeric",timeZone:b})).formatToParts(a)[0].value;break;case 2:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{year:"2-digit",timeZone:b})).formatToParts(a)[0].value;break;default:h=N.lpad((new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{year:"numeric",timeZone:b})).formatToParts(a)[0].value,"0",Math.min(4,h)|0)}break;case 5:switch(g.length){case 1:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"numeric",timeZone:b})).formatToParts(a);
break;case 2:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"2-digit",timeZone:b})).formatToParts(a);break;case 3:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"short",timeZone:b})).formatToParts(a);break;case 4:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"long",timeZone:b})).formatToParts(a);break;default:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"narrow",timeZone:b})).formatToParts(a)}h=
this.getDateFormatPart("month",h);break;case 6:h=this.getDateFormatPart("day",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{day:"numeric",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{day:"2-digit",timeZone:b})).formatToParts(a));break;case 7:h="";break;case 8:h="";break;case 9:h="";break;case 10:h="";break;case 11:h="";break;case 12:h=this.getDateFormatPart("dayPeriod",(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{hour:"numeric",hour12:!0,timeZone:b})).formatToParts(a));break;case 13:h=this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",hourCycle:"h11",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h11",timeZone:b})).formatToParts(a));break;case 14:h=this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",
hourCycle:"h12",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h12",timeZone:b})).formatToParts(a));break;case 15:h=this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",hourCycle:"h23",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h23",timeZone:b})).formatToParts(a));break;case 16:h=
this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",hourCycle:"h24",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h24",timeZone:b})).formatToParts(a));break;case 17:h=this.getDateFormatPart("minute",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{minute:"numeric",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{minute:"2-digit",timeZone:b})).formatToParts(a));break;case 18:h=this.getDateFormatPart("second",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{second:"numeric",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{second:"2-digit",timeZone:b})).formatToParts(a));break;case 19:h="";break;case 20:h="";break;case 21:h=this.getDateFormatPart("timeZoneName",g.length==4?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{timeZoneName:"long",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{timeZoneName:"short",timeZone:b})).formatToParts(a));break;case 22:h=""}c+=h}return c},getDateFormatPart:function(a,b){for(var c="",d=0;d<b.length;){var f=b[d];++d;H.string(f.type)==a&&(c=f.value)}return c},getMonthNames:function(a,b){a==null&&(a=0);try{var c=new Intl.DateTimeFormat(this.actualLocaleIDName,{month:a==0?"long":"short"});a=[];for(b=0;b<12;){var d=b++;a[d]=c.format(new Date(2E3,
d,1,0,0,0))}this.lastOperationStatus=7;return tb.toObjectVector(null,a.length,!0,a)}catch(f){return Pb.lastError=f,this.lastOperationStatus=1,null}},getWeekdayNames:function(a,b){a==null&&(a=0);try{switch(a){case 0:var c="long";break;case 2:c="narrow";break;default:c="short"}var d=new Intl.DateTimeFormat(this.actualLocaleIDName,{weekday:c});a=[];var f=new Date(2006,0,1,0,0,0);a[0]=d.format(f);f=new Date(2006,0,2,0,0,0);a[1]=d.format(f);f=new Date(2006,0,3,0,0,0);a[2]=d.format(f);f=new Date(2006,0,
4,0,0,0);a[3]=d.format(f);f=new Date(2006,0,5,0,0,0);a[4]=d.format(f);f=new Date(2006,0,6,0,0,0);a[5]=d.format(f);f=new Date(2006,0,7,0,0,0);a[6]=d.format(f);this.lastOperationStatus=7;return tb.toObjectVector(null,a.length,!0,a)}catch(g){return Pb.lastError=g,this.lastOperationStatus=1,null}},setDateTimeStyles:function(a,b){b==null&&(b=1);a==null&&(a=1);if(a==0||b==0)this.lastOperationStatus=2;else{this.dateStyle=a;this.timeStyle=b;this.dateTimePattern=null;var c={};if(a!=3){switch(a){case 1:a="full";
break;case 2:a="long";break;default:a="short"}c.dateStyle=a}if(b!=3){switch(b){case 1:a="medium";break;case 2:a="medium";break;default:a="short"}c.timeStyle=a}try{this.intlDateTimeFormat=new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,c),c.timeZone="UTC",this.intlDateTimeFormatUTC=new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,c),this.resolveDateTimePattern(),this.lastOperationStatus=7}catch(d){Pb.lastError=d,this.lastOperationStatus=1}}},setDateTimePattern:function(a){if(a==
null||a.length>255)this.lastOperationStatus=10;else{this.timeStyle=this.dateStyle=0;this.dateTimePattern=a;try{var b=Dy.tokenize(this.dateTimePattern);this.lastOperationStatus=7;for(a=0;a<b.length;){var c=b[a];++a;switch(c._hx_index){case 1:this.lastOperationStatus=10;return;case 7:this.lastOperationStatus=14;return;case 8:this.lastOperationStatus=14;return;case 9:this.lastOperationStatus=14;return;case 10:this.lastOperationStatus=14;return;case 11:this.lastOperationStatus=14;return;case 19:this.lastOperationStatus=
14;break;case 20:this.lastOperationStatus=14;return;case 22:this.lastOperationStatus=14;return}}}catch(d){Pb.lastError=d,b=ba.caught(d).unwrap(),De.trace("Date time tokenization error: "+H.string(b),{fileName:"openfl/globalization/DateTimeFormatter.hx",lineNumber:830,className:"openfl.globalization.DateTimeFormatter",methodName:"setDateTimePattern"}),this.dateTimePattern="",this.lastOperationStatus=10}}},resolveDateTimePattern:function(){for(var a="",b=this.intlDateTimeFormat.formatToParts(new Date(2021,
9,12,0,0,0)),c=0;c<b.length;){var d=b[c];++c;switch(d.type){case "day":d="d";break;case "dayPeriod":d="a";break;case "era":d="G";break;case "hour":d="h";break;case "literal":d=d.value;break;case "minute":d="m";break;case "month":d="M";break;case "second":d="s";break;case "timeZoneName":d="z";break;case "weekday":d="E";break;case "year":d="y";break;default:d=""}a+=d}this.dateTimePattern=a},__class__:op};var Dy=function(){};t["openfl.globalization._DateTimeFormatter.DateTimeFormatTokenizer"]=Dy;Dy.__name__=
"openfl.globalization._DateTimeFormatter.DateTimeFormatTokenizer";Dy.tokenize=function(a){for(var b=[],c="",d=null,f=0;f<a.length;){var g=a.charAt(f);++f;if(d!=null&&d._hx_index==0){var h=d.text;g=="'"?(f<a.length?a.charAt(f):null)=="'"?(d=lc.Text(h+g),++f):(b.push(d),d=null):d=lc.Text(h+g)}else{switch(g){case "'":g=lc.Text("");break;case "D":g=lc.DayOfYear(1);break;case "E":g=lc.Weekday(1);break;case "F":g=lc.DayOfWeekOccurence;break;case "G":g=lc.Era(1);break;case "H":g=lc.Hour23(1);break;case "K":g=
lc.Hour11(1);break;case "M":g=lc.Month(1);break;case "Q":g=lc.Quarter(1);break;case "S":g=lc.Millisecond(1);break;case "W":g=lc.WeekOfMonth;break;case "Z":g=lc.TimeZoneOffset(1);break;case "a":g=lc.AMPM;break;case "d":g=lc.Date(1);break;case "h":g=lc.Hour12(1);break;case "k":g=lc.Hour24(1);break;case "m":g=lc.Minute(1);break;case "s":g=lc.Second(1);break;case "v":g=lc.TimeZone(1);break;case "w":g=lc.WeekOfYear(1);break;case "y":g=lc.Year(1);break;case "z":g=lc.TimeZoneDST(1);break;default:(new Wa("^[A-Za-z]$",
"")).match(g)?g=lc.Invalid(g):(c+=g,g=null)}g!=null&&c.length>0&&(b.push(lc.Text(c)),c="");if(d!=null&&g!=null&&R[g.__enum__].__constructs__[g._hx_index]._hx_name==R[d.__enum__].__constructs__[d._hx_index]._hx_name)switch(d._hx_index){case 0:d=lc.Invalid(d.text);break;case 1:d=lc.Invalid(d.text);break;case 2:d=lc.Weekday(Math.min(5,d.length+1)|0);break;case 3:d=lc.Era(Math.min(5,d.length+1)|0);break;case 4:d=lc.Year(Math.min(5,d.length+1)|0);break;case 5:d=lc.Month(Math.min(5,d.length+1)|0);break;
case 6:d=lc.Date(Math.min(2,d.length+1)|0);break;case 7:d=lc.Quarter(Math.min(4,d.length+1)|0);break;case 8:d=lc.WeekOfYear(Math.min(2,d.length+1)|0);break;case 9:d=lc.WeekOfMonth;break;case 10:d=lc.DayOfYear(Math.min(3,d.length+1)|0);break;case 11:d=lc.DayOfWeekOccurence;break;case 12:d=lc.AMPM;break;case 13:d=lc.Hour11(Math.min(2,d.length+1)|0);break;case 14:d=lc.Hour12(Math.min(2,d.length+1)|0);break;case 15:d=lc.Hour23(Math.min(2,d.length+1)|0);break;case 16:d=lc.Hour24(Math.min(2,d.length+1)|
0);break;case 17:d=lc.Minute(Math.min(2,d.length+1)|0);break;case 18:d=lc.Second(Math.min(2,d.length+1)|0);break;case 19:d=lc.Millisecond(Math.min(5,d.length+1)|0);break;case 20:d=lc.TimeZone(Math.min(4,d.length+1)|0);break;case 21:d=lc.TimeZoneDST(Math.min(4,d.length+1)|0);break;case 22:d=lc.TimeZoneOffset(Math.min(4,d.length+1)|0)}else d!=null&&b.push(d),d=g}}d!=null&&b.push(d);c.length>0&&b.push(lc.Text(c));return b};var lc=R["openfl.globalization._DateTimeFormatter.DateTimeFormatToken"]={__ename__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
__constructs__:null,Text:(B=function(a){return{_hx_index:0,text:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Text",B.__params__=["text"],B),Invalid:(B=function(a){return{_hx_index:1,text:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Invalid",B.__params__=["text"],B),Weekday:(B=function(a){return{_hx_index:2,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},
B._hx_name="Weekday",B.__params__=["length"],B),Era:(B=function(a){return{_hx_index:3,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Era",B.__params__=["length"],B),Year:(B=function(a){return{_hx_index:4,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Year",B.__params__=["length"],B),Month:(B=function(a){return{_hx_index:5,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:E}},B._hx_name="Month",B.__params__=["length"],B),Date:(B=function(a){return{_hx_index:6,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Date",B.__params__=["length"],B),Quarter:(B=function(a){return{_hx_index:7,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Quarter",B.__params__=["length"],B),WeekOfYear:(B=function(a){return{_hx_index:8,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:E}},B._hx_name="WeekOfYear",B.__params__=["length"],B),WeekOfMonth:{_hx_name:"WeekOfMonth",_hx_index:9,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E},DayOfYear:(B=function(a){return{_hx_index:10,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="DayOfYear",B.__params__=["length"],B),DayOfWeekOccurence:{_hx_name:"DayOfWeekOccurence",_hx_index:11,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:E},AMPM:{_hx_name:"AMPM",_hx_index:12,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E},Hour11:(B=function(a){return{_hx_index:13,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Hour11",B.__params__=["length"],B),Hour12:(B=function(a){return{_hx_index:14,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Hour12",B.__params__=["length"],B),Hour23:(B=
function(a){return{_hx_index:15,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Hour23",B.__params__=["length"],B),Hour24:(B=function(a){return{_hx_index:16,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Hour24",B.__params__=["length"],B),Minute:(B=function(a){return{_hx_index:17,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Minute",
B.__params__=["length"],B),Second:(B=function(a){return{_hx_index:18,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Second",B.__params__=["length"],B),Millisecond:(B=function(a){return{_hx_index:19,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="Millisecond",B.__params__=["length"],B),TimeZone:(B=function(a){return{_hx_index:20,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:E}},B._hx_name="TimeZone",B.__params__=["length"],B),TimeZoneDST:(B=function(a){return{_hx_index:21,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="TimeZoneDST",B.__params__=["length"],B),TimeZoneOffset:(B=function(a){return{_hx_index:22,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:E}},B._hx_name="TimeZoneOffset",B.__params__=["length"],B)};lc.__constructs__=[lc.Text,lc.Invalid,lc.Weekday,
lc.Era,lc.Year,lc.Month,lc.Date,lc.Quarter,lc.WeekOfYear,lc.WeekOfMonth,lc.DayOfYear,lc.DayOfWeekOccurence,lc.AMPM,lc.Hour11,lc.Hour12,lc.Hour23,lc.Hour24,lc.Minute,lc.Second,lc.Millisecond,lc.TimeZone,lc.TimeZoneDST,lc.TimeZoneOffset];var on=function(a){if(a=="i-default")this.language=this.name=a,this.script=this.region="",this.rtl=!1,this.lastOperationStatus=7;else try{var b=(new Intl.Locale(a)).maximize();this.name=y.field(b,"baseName");this.language=y.field(b,"language");this.region=y.field(b,
"region");this.script=y.field(b,"script");this.rtl=on.RTL_LANGUAGES.indexOf(this.language)!=-1;this.lastOperationStatus=7}catch(c){Pb.lastError=c,this.lastOperationStatus=1}};t["openfl.globalization.LocaleID"]=on;on.__name__="openfl.globalization.LocaleID";on.normalizeRequestedLocaleIDName=function(a){if(a==null)return null;a=="i-default"&&(a=Intl.DateTimeFormat().resolvedOptions().locale);a=a.replace(RegExp("_","g"),"-");var b=a.split("-"),c=b.shift();c=c.toLowerCase();c=="root"&&(c="und");var d=
a=null;if(b.length>0){var f=b.shift();f!=null&&f.length==4&&(a=f.charAt(0).toUpperCase()+V.substr(f,1,null).toLowerCase(),f=b.shift());f==null||f.length!=2&&f.length!=3||(d=f.toUpperCase(),b.shift())}b=c;a!=null&&(b+="-"+a);d!=null&&(b+="-"+d);return b};on.prototype={name:null,lastOperationStatus:null,language:null,region:null,script:null,rtl:null,getLanguage:function(){return this.language},getRegion:function(){return this.region},getScript:function(){return this.script},getVariant:function(){return""},
isRightToLeft:function(){return this.rtl},__class__:on};var ew=function(){};t["openfl.media.ID3Info"]=ew;ew.__name__="openfl.media.ID3Info";ew.prototype={album:null,artist:null,comment:null,genre:null,songName:null,track:null,year:null,__class__:ew};var Es=function(a,b,c){this.__firstRun=!0;qa.call(this,this);this.__sound=a;this.rightPeak=this.leftPeak=1;this.__soundTransform=c!=null?c:new ki;this.__initAudioSource(b);te.__registerSoundChannel(this)};t["openfl.media.SoundChannel"]=Es;Es.__name__=
"openfl.media.SoundChannel";Es.__super__=qa;Es.prototype=I(qa.prototype,{leftPeak:null,rightPeak:null,__sound:null,__isValid:null,__soundTransform:null,__audioSource:null,__sampleDataEvent:null,__processor:null,__firstRun:null,stop:function(){te.__unregisterSoundChannel(this);this.__isValid&&(this.__processor!=null&&(this.__processor.disconnect(),this.__processor=this.__processor.onaudioprocess=null),this.__audioSource.stop(),this.__dispose())},__dispose:function(){this.__isValid&&(this.__audioSource.onComplete.remove(m(this,
this.audioSource_onComplete)),this.__audioSource.dispose(),this.__audioSource=null,this.__isValid=!1)},__startSampleData:function(){var a=this,b=this.__sound.__webAudioContext;if(b!=null){this.__sampleDataEvent=new Fo("sampleData");this.__sound.dispatchEvent(this.__sampleDataEvent);var c=this.__sampleDataEvent.getBufferSize();c==0?Pa.setTimeout(function(){a.stop();a.dispatchEvent(new pa("soundComplete"))},1):(this.__processor=b.createScriptProcessor(c,0,2),this.__processor.connect(b.destination),
this.__processor.onaudioprocess=m(this,this.onSample),b.resume())}},__updateTransform:function(){this.set_soundTransform(this.get_soundTransform())},__initAudioSource:function(a){this.__audioSource=a;this.__audioSource!=null&&(this.__audioSource.onComplete.add(m(this,this.audioSource_onComplete)),this.__isValid=!0,this.__audioSource.play())},get_position:function(){return this.__isValid?this.__audioSource.get_currentTime()+this.__audioSource.offset:0},set_position:function(a){if(!this.__isValid)return 0;
this.__audioSource.set_currentTime((a|0)-this.__audioSource.offset);return a},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(a){if(a!=null){this.__soundTransform.pan=a.pan;this.__soundTransform.volume=a.volume;var b=te.__soundTransform.pan+this.__soundTransform.pan;b<-1&&(b=-1);b>1&&(b=1);var c=te.__soundTransform.volume*this.__soundTransform.volume;this.__isValid&&(this.__audioSource.set_gain(c),c=this.__audioSource.get_position(),c.x=b,c.z=-1*Math.sqrt(1-
Math.pow(b,2)),this.__audioSource.set_position(c))}return a},audioSource_onComplete:function(){te.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new pa("soundComplete"))},onSample:function(a){if(this.__firstRun){var b=!0;this.__firstRun=!1}else mc.set_length(this.__sampleDataEvent.data,0),this.__sound.dispatchEvent(this.__sampleDataEvent),b=sb.gt(mc.get_length(this.__sampleDataEvent.data),0);b?this.__sampleDataEvent.getSamples(a):(this.stop(),this.dispatchEvent(new pa("soundComplete")))},
__class__:Es,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var Ez=function(a,b){b==null&&(b=!1);a==null&&(a=1E3);this.bufferTime=a;this.checkPolicyFile=b};t["openfl.media.SoundLoaderContext"]=Ez;Ez.__name__="openfl.media.SoundLoaderContext";Ez.prototype={bufferTime:null,checkPolicyFile:null,__class__:Ez};var ki=function(a,b){b==null&&(b=0);a==null&&(a=1);this.volume=a;this.pan=b;this.rightToRight=
this.rightToLeft=this.leftToRight=this.leftToLeft=0};t["openfl.media.SoundTransform"]=ki;ki.__name__="openfl.media.SoundTransform";ki.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new ki(this.volume,this.pan)},__class__:ki};var te=function(){};t["openfl.media.SoundMixer"]=te;te.__name__="openfl.media.SoundMixer";te.__properties__={set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"};te.areSoundsInaccessible=
function(){return!1};te.stopAll=function(){for(var a=te.__soundChannels.length;a>0;)--a,te.__soundChannels[a].stop()};te.__registerSoundChannel=function(a){te.__soundChannels.push(a)};te.__unregisterSoundChannel=function(a){V.remove(te.__soundChannels,a)};te.get_soundTransform=function(){return te.__soundTransform};te.__unregisterSoundChannelByBuffer=function(a){for(var b=te.__soundChannels.length;b>0;){--b;var c=te.__soundChannels[b];c.__audioSource.buffer==a&&c.stop()}};te.set_soundTransform=function(a){te.__soundTransform=
a.clone();for(var b=0,c=te.__soundChannels;b<c.length;){var d=c[b];++b;d.__updateTransform()}return a};var Wo=function(a,b){b==null&&(b=240);a==null&&(a=320);ma.call(this);this.__drawableType=8;this.__width=a;this.__height=b;this.__textureTime=-1;this.smoothing=!1;this.deblocking=0};t["openfl.media.Video"]=Wo;Wo.__name__="openfl.media.Video";Wo.__super__=ma;Wo.prototype=I(ma.prototype,{deblocking:null,smoothing:null,__active:null,__buffer:null,__bufferAlpha:null,__bufferColorTransform:null,__bufferContext:null,
__bufferData:null,__currentWidth:null,__currentHeight:null,__dirty:null,__height:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__stream:null,__texture:null,__textureTime:null,__uvRect:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__width:null,attachNetStream:function(a){this.__stream=a;this.__stream==null||this.__stream.__video==null||this.__stream.__closed||this.__stream.__video.play()},clear:function(){},__enterFrame:function(a){this.__renderable&&
this.__stream!=null&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=Ia.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ia.__pool.release(c)},__getIndexBuffer:function(a){if(this.__indexBuffer==null||this.__indexBufferContext!=a.__context)this.__indexBufferData=new Uint16Array(6),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=
2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferContext=a.__context,this.__indexBuffer=a.createIndexBuffer(6),this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData);return this.__indexBuffer},__getTexture:function(a){if(this.__stream==null||this.__stream.__video==null)return null;var b=a.__context.webgl,c=b.RGBA,d=b.RGBA;this.__stream.__closed||this.__stream.__video.currentTime==this.__textureTime||(this.__texture==null&&(this.__texture=a.createRectangleTexture(this.__stream.__video.videoWidth,
this.__stream.__video.videoHeight,1,!1)),a.__bindGLTexture2D(this.__texture.__textureID),yd.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,this.__stream.__video),this.__textureTime=this.__stream.__video.currentTime);return this.__texture},__getVertexBuffer:function(a){if(this.__vertexBuffer==null||this.__vertexBufferContext!=a.__context||this.__currentWidth!=this.get_width()||this.__currentHeight!=this.get_height())this.__currentWidth=this.get_width(),this.__currentHeight=this.get_height(),this.__vertexBufferData=
new Float32Array(20),this.__vertexBufferData[0]=this.get_width(),this.__vertexBufferData[1]=this.get_height(),this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[6]=this.get_height(),this.__vertexBufferData[9]=1,this.__vertexBufferData[10]=this.get_width(),this.__vertexBufferData[13]=1,this.__vertexBufferContext=a.__context,this.__vertexBuffer=a.createVertexBuffer(3,5),this.__vertexBuffer.uploadFromTypedArray(el.toArrayBufferView(this.__vertexBufferData));return this.__vertexBuffer},
__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var h=this.__renderTransform,n=h.a*h.d-h.b*h.c;c=n==0?-h.tx:1/n*(h.c*(h.ty-b)+h.d*(a-h.tx));h=this.__renderTransform;n=h.a*h.d-h.b*h.c;a=n==0?-h.ty:1/n*(h.a*(b-h.ty)+h.b*(h.tx-a));return c>0&&a>0&&c<=this.__width&&a<=this.__height?(d==null||f||d.push(g),!0):!1},__hitTestMask:function(a,b){var c=Ea.__pool.get();c.setTo(a,b);this.__globalToLocal(c,
c);a=c.x>0&&c.y>0&&c.x<=this.__width&&c.y<=this.__height;Ea.__pool.release(c);return a},get_height:function(){return this.__height*this.get_scaleY()},set_height:function(a){if(this.get_scaleY()!=1||a!=this.__height)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleY(1);return this.__height=a},get_videoHeight:function(){return this.__stream!=null&&this.__stream.__video!=null?this.__stream.__video.videoHeight|0:0},get_videoWidth:function(){return this.__stream!=null&&this.__stream.__video!=null?
this.__stream.__video.videoWidth|0:0},get_width:function(){return this.__width*this.__scaleX},set_width:function(a){if(this.__scaleX!=1||this.__width!=a)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleX(1);return this.__width=a},__class__:Wo,__properties__:I(ma.prototype.__properties__,{get_videoWidth:"get_videoWidth",get_videoHeight:"get_videoHeight"})});var bw=function(a,b,c){this.description=a;this.extension=b;this.macType=c};t["openfl.net.FileFilter"]=bw;bw.__name__="openfl.net.FileFilter";
bw.prototype={description:null,extension:null,macType:null,__class__:bw};var So=function(){this.__pendingDownload=!1;qa.call(this);this.__inputControl=window.document.createElement("input");this.__inputControl.setAttribute("type","file");this.__inputControl.onclick=function(a){a.cancelBubble=!0;a.stopPropagation()}};t["openfl.net.FileReference"]=So;So.__name__="openfl.net.FileReference";So.__super__=qa;So.prototype=I(qa.prototype,{creationDate:null,creator:null,data:null,modificationDate:null,name:null,
size:null,type:null,extension:null,__data:null,__path:null,__urlLoader:null,__inputControl:null,__pendingDownload:null,__pendingDefaultFileName:null,browse:function(a){var b=this,c=this.__path=this.__data=null;if(a!=null){c=[];for(var d=0;d<a.length;){var f=a[d];++d;c.push(N.replace(N.replace(f.extension,"*.","."),";",","))}c=c.join(",")}c!=null?this.__inputControl.setAttribute("accept",c):this.__inputControl.removeAttribute("accept");this.__inputControl.onchange=function(){if(b.__inputControl.files.length==
0)b.dispatchEvent(new pa("cancel"));else{var g=b.__inputControl.files[0],h=new Date(g.lastModified);b.modificationDate=h;b.creationDate=b.get_modificationDate();b.size=g.size;h=Cg.extension(g.name);b.type="."+h;b.name=Cg.withoutDirectory(g.name);b.__path=g.name;b.dispatchEvent(new pa("select"))}};this.__inputControl.click();return!0},cancel:function(){this.__urlLoader!=null&&this.__urlLoader.close()},download:function(a,b){this.__path=this.__data=null;this.__urlLoader=new Jj;this.__urlLoader.dataFormat=
0;this.__urlLoader.addEventListener("open",m(this,this.urlLoader_onOpen));this.__urlLoader.addEventListener("complete",m(this,this.urlLoader_download_onComplete));this.__urlLoader.addEventListener("ioError",m(this,this.urlLoader_onIOError));this.__urlLoader.addEventListener("progress",m(this,this.urlLoader_onProgress));this.__urlLoader.load(a);a=new gq;a.onCancel.add(m(this,this.saveFileDialog_onCancel));a.onSelect.add(m(this,this.saveFileDialog_onSelect));a.browse(lu.SAVE,b!=null?Cg.extension(b):
null,b);this.__pendingDownload=!0;this.__pendingDefaultFileName=b},load:function(){var a=this,b=this.__inputControl.files[0],c=new FileReader;c.onload=function(d){a.data=mc.fromArrayBuffer(d.target.result);a.openFileDialog_onComplete()};c.onerror=function(d){a.dispatchEvent(new Oh("ioError"))};c.readAsArrayBuffer(b)},save:function(a,b){this.__path=this.__data=null;a!=null&&(a instanceof Xc?this.__data=a:(this.__data=new Xc(0),this.__data.writeUTFBytes(H.string(a))),a=new gq,a.onCancel.add(m(this,
this.saveFileDialog_onCancel)),a.onSave.add(m(this,this.saveFileDialog_onSave)),a.save(this.__data,b!=null?Cg.extension(b):null,b))},upload:function(a,b,c){c==null&&(c=!1);b==null&&(b="Filedata");var d=this;c=new FileReader;c.onload=function(f){f=mc.fromArrayBuffer(f.target.result);d.__uploadFileBytes(a,b,f)};c.onerror=function(f){d.dispatchEvent(new Oh("ioError"))}},__uploadFileBytes:function(a,b,c){var d=ab.typeof(a.data)==ac.TObject;if(d&&a.method=="GET"){for(var f="",g=y.fields(a.data),h=a.url.lastIndexOf("?")==
-1?"?":"&",n=0;n<g.length;){var l=g[n];++n;var q=y.field(a.data,l);f+=f.length==0?h:"&";f+=l+"="+q}a.url+=f}f=new Xc(0);if(d&&a.method=="POST")for(g=y.fields(a.data),n=0;n<g.length;)l=g[n],++n,q=y.field(a.data,l),f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n"),f.writeUTFBytes('Content-Disposition: form-data; name="'+l+'"\r\n\r\n'),f.writeUTFBytes(H.string(q)),f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n");f.writeUTFBytes('Content-Disposition: form-data; name="Filename"\r\n\r\n');
f.writeUTFBytes(this.get_name());f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n");f.writeUTFBytes('Content-Disposition: form-data; name="'+b+'"; ');f.writeUTFBytes('filename="'+this.get_name()+'"\r\n');f.writeUTFBytes("Content-Type: application/octet-stream\r\n\r\n");f.writeBytes(c,0,0);f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n");f.writeUTFBytes('Content-Disposition: form-data; name="Upload"\r\n\r\n');f.writeUTFBytes("Submit Query");
f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2--\r\n");a.data=f;a.method="POST";a.contentType="multipart/form-data; boundary=----------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2";a.requestHeaders=[new Nq("Accept","text/*"),new Nq("Cache-Control","no-cache")];b=new Jj;b.dataFormat=0;b.addEventListener("open",m(this,this.urlLoader_onOpen));b.addEventListener("complete",m(this,this.urlLoader_upload_onComplete));b.addEventListener("httpResponseStatus",m(this,this.urlLoader_upload_onHttpResponseStatus));
b.addEventListener("httpStatus",m(this,this.urlLoader_upload_onHttpStatus));b.addEventListener("progress",m(this,this.urlLoader_onProgress));b.addEventListener("ioError",m(this,this.urlLoader_onIOError));b.load(a)},openFileDialog_onCancel:function(){this.dispatchEvent(new pa("cancel"))},openFileDialog_onComplete:function(){this.dispatchEvent(new pa("complete"))},openFileDialog_onSelect:function(a){this.name=Cg.withoutDirectory(a);this.__path=a;this.dispatchEvent(new pa("select"))},saveFileDialog_onCancel:function(){this.dispatchEvent(new pa("cancel"))},
saveFileDialog_onSave:function(a){var b=this;Gc.delay(function(){b.dispatchEvent(new pa("complete"))},1)},saveFileDialog_onSelect:function(a){this.dispatchEvent(new pa("select"))},urlLoader_download_onComplete:function(a){this.__urlLoader.data instanceof Xc?this.__data=this.__urlLoader.data:(this.__data=new Xc(0),this.__data.writeUTFBytes(H.string(this.__urlLoader.data)));this.__pendingDownload&&((new gq).save(this.__data,this.__pendingDefaultFileName!=null?Cg.extension(this.__pendingDefaultFileName):
null,this.__pendingDefaultFileName),this.__pendingDownload=!1,this.__pendingDefaultFileName=null);this.dispatchEvent(a)},urlLoader_upload_onHttpResponseStatus:function(a){this.dispatchEvent(a)},urlLoader_upload_onHttpStatus:function(a){a.status==200?this.dispatchEvent(new pa("complete")):a.status!=0&&this.dispatchEvent(a)},urlLoader_upload_onComplete:function(a){this.dispatchEvent(new mn("uploadCompleteData",!1,!1,a.currentTarget.data))},urlLoader_onIOError:function(a){this.__pendingDownload&&(this.__pendingDownload=
!1,this.__pendingDefaultFileName=null);this.dispatchEvent(a)},urlLoader_onProgress:function(a){this.dispatchEvent(a)},urlLoader_onOpen:function(a){this.dispatchEvent(a)},get_creationDate:function(){return this.creationDate},get_modificationDate:function(){return this.modificationDate},get_name:function(){return this.name},get_size:function(){return this.size},get_type:function(){return this.type},get_extension:function(){return this.extension},__class__:So,__properties__:{get_extension:"get_extension",
get_type:"get_type",get_size:"get_size",get_name:"get_name",get_modificationDate:"get_modificationDate",get_creationDate:"get_creationDate"}});var Ey=function(){};t["openfl.net.IDynamicPropertyOutput"]=Ey;Ey.__name__="openfl.net.IDynamicPropertyOutput";Ey.__isInterface__=!0;Ey.prototype={writeDynamicProperty:null,__class__:Ey};var Fy=function(){};t["openfl.net.IDynamicPropertyWriter"]=Fy;Fy.__name__="openfl.net.IDynamicPropertyWriter";Fy.__isInterface__=!0;Fy.prototype={writeDynamicProperties:null,
__class__:Fy};var zn=function(){qa.call(this)};t["openfl.net.NetConnection"]=zn;zn.__name__="openfl.net.NetConnection";zn.__super__=qa;zn.prototype=I(qa.prototype,{connect:function(a,b,c,d,f,g){if(a!=null)throw ba.thrown('Error: Can only connect in "HTTP streaming" mode');this.dispatchEvent(new nn("netStatus",!1,!0,{code:"NetConnection.Connect.Success"}))},__class__:zn});var Xo=function(a,b){qa.call(this);this.__connection=a;this.__soundTransform=new ki;this.__video=window.document.createElement("video");
this.__video.setAttribute("playsinline","");this.__video.setAttribute("webkit-playsinline","");this.__video.setAttribute("crossorigin","anonymous");this.__video.addEventListener("error",m(this,this.video_onError),!1);this.__video.addEventListener("waiting",m(this,this.video_onWaiting),!1);this.__video.addEventListener("ended",m(this,this.video_onEnd),!1);this.__video.addEventListener("pause",m(this,this.video_onPause),!1);this.__video.addEventListener("seeking",m(this,this.video_onSeeking),!1);this.__video.addEventListener("playing",
m(this,this.video_onPlaying),!1);this.__video.addEventListener("timeupdate",m(this,this.video_onTimeUpdate),!1);this.__video.addEventListener("loadstart",m(this,this.video_onLoadStart),!1);this.__video.addEventListener("stalled",m(this,this.video_onStalled),!1);this.__video.addEventListener("durationchange",m(this,this.video_onDurationChange),!1);this.__video.addEventListener("canplay",m(this,this.video_onCanPlay),!1);this.__video.addEventListener("canplaythrough",m(this,this.video_onCanPlayThrough),
!1);this.__video.addEventListener("loadedmetadata",m(this,this.video_onLoadMetaData),!1)};t["openfl.net.NetStream"]=Xo;Xo.__name__="openfl.net.NetStream";Xo.__super__=qa;Xo.prototype=I(qa.prototype,{audioCodec:null,bufferLength:null,bufferTime:null,bytesLoaded:null,bytesTotal:null,checkPolicyFile:null,client:null,currentFPS:null,decodedFrames:null,liveDelay:null,objectEncoding:null,time:null,videoCode:null,__closed:null,__connection:null,__soundTransform:null,__timer:null,__video:null,close:function(){this.__video!=
null&&(this.__closed=!0,this.__video.pause(),this.__video.src="",this.time=0)},dispose:function(){this.close();this.__video=null},pause:function(){this.__video!=null&&this.__video.pause()},play:function(a,b,c,d,f,g){this.__video!=null&&(this.__video.volume=te.__soundTransform.volume*this.__soundTransform.volume,typeof a=="string"?this.__video.src=a:this.__video.srcObject=a,this.__video.play())},requestVideoStatus:function(){var a=this;this.__video!=null&&(this.__timer==null&&(this.__timer=new Gc(1)),
this.__timer.run=function(){a.__video.paused?a.__playStatus("NetStream.Play.pause"):a.__playStatus("NetStream.Play.playing");a.__timer.stop()})},resume:function(){this.__video!=null&&this.__video.play()},seek:function(a){this.__video!=null&&(a<0?a=0:a>this.__video.duration&&(a=this.__video.duration),this.__dispatchStatus("NetStream.SeekStart.Notify"),this.__video.currentTime=a)},togglePause:function(){this.__video!=null&&(this.__video.paused?this.__video.play():this.__video.pause())},__dispatchStatus:function(a){a=
new nn("netStatus",!1,!1,{code:a});this.__connection.dispatchEvent(a);this.dispatchEvent(a)},__playStatus:function(a){if(this.__video!=null&&this.client!=null)try{var b=this.client.onPlayStatus;b({code:a,duration:this.__video.duration,position:this.__video.currentTime,speed:this.__video.playbackRate,start:this.__video.startTime})}catch(c){Pb.lastError=c}},video_onCanPlay:function(a){this.__playStatus("NetStream.Play.canplay")},video_onCanPlayThrough:function(a){this.__playStatus("NetStream.Play.canplaythrough")},
video_onDurationChange:function(a){this.__playStatus("NetStream.Play.durationchange")},video_onEnd:function(a){this.__dispatchStatus("NetStream.Play.Stop");this.__dispatchStatus("NetStream.Play.Complete");this.__playStatus("NetStream.Play.Complete")},video_onError:function(a){this.__dispatchStatus("NetStream.Play.Stop");this.__playStatus("NetStream.Play.error")},video_onLoadMetaData:function(a){if(this.__video!=null&&this.client!=null)try{var b=this.client.onMetaData;b({width:this.__video.videoWidth,
height:this.__video.videoHeight,duration:this.__video.duration})}catch(c){Pb.lastError=c}},video_onLoadStart:function(a){this.__playStatus("NetStream.Play.loadstart")},video_onPause:function(a){this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(a){this.__dispatchStatus("NetStream.Play.Start");this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(a){this.__playStatus("NetStream.Play.seeking");this.__dispatchStatus("NetStream.Seek.Complete")},video_onStalled:function(a){this.__playStatus("NetStream.Play.stalled")},
video_onTimeUpdate:function(a){this.__video!=null&&(this.time=this.__video.currentTime,this.__playStatus("NetStream.Play.timeupdate"))},video_onWaiting:function(a){this.__playStatus("NetStream.Play.waiting")},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(a){a!=null&&(this.__soundTransform.pan=a.pan,this.__soundTransform.volume=a.volume,this.__video!=null&&(this.__video.volume=te.__soundTransform.volume*this.__soundTransform.volume));return a},get_speed:function(){return this.__video!=
null?this.__video.playbackRate:1},set_speed:function(a){return this.__video!=null?this.__video.playbackRate=a:a},__class__:Xo,__properties__:{set_speed:"set_speed",get_speed:"get_speed",set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"}});var Xe=function(){qa.call(this);this.client=this;this.objectEncoding=Xe.defaultObjectEncoding};t["openfl.net.SharedObject"]=Xe;Xe.__name__="openfl.net.SharedObject";Xe.getLocal=function(a,b,c){c=" ~%&\\;:\"',<>?#".split("");var d=!0;
if(a==null||a=="")d=!1;else for(var f=0;f<c.length;){var g=c[f];++f;if(a.indexOf(g)>-1){d=!1;break}}if(!d)throw new Sd("Error #2134: Cannot create SharedObject.");Xe.__sharedObjects==null&&(Xe.__sharedObjects=new G,Na.current!=null&&Na.current.onExit.add(Xe.application_onExit));c=b+"/"+a;if(!Object.prototype.hasOwnProperty.call(Xe.__sharedObjects.h,c)){d=null;try{var h=dl.getLocalStorage();b==null&&(h!=null&&(d=h.getItem(window.location.href+":"+a),h.removeItem(window.location.href+":"+a)),b=window.location.pathname);
h!=null&&d==null&&(d=h.getItem(b+":"+a))}catch(l){Pb.lastError=l}h=new Xe;h.data={};h.__localPath=b;h.__name=a;if(d!=null&&d!="")try{var n=new Pg(d);n.setResolver({resolveEnum:ab.resolveEnum,resolveClass:Xe.__resolveClass});h.data=n.unserialize()}catch(l){Pb.lastError=l}Xe.__sharedObjects.h[c]=h}return Xe.__sharedObjects.h[c]};Xe.getRemote=function(a,b,c,d){md.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:808,className:"openfl.net.SharedObject",methodName:"getRemote"});return null};
Xe.__getPath=function(a,b){a=Rb.get_applicationStorageDirectory()+"/"+a+"/";b=N.replace(b,"//","/");b=N.replace(b,"//","/");N.startsWith(b,"/")&&(b=V.substr(b,1,null));N.endsWith(b,"/")&&(b=b.substring(0,b.length-1));if(b.indexOf("/")>-1){var c=b.split("/");b="";for(var d=0,f=c.length-1;d<f;){var g=d++;b+="#"+c[g]+"/"}b+=c[c.length-1]}return a+b+".sol"};Xe.__mkdir=function(a){};Xe.__resolveClass=function(a){return a!=null?(N.startsWith(a,"neash.")&&(a=N.replace(a,"neash.","openfl.")),N.startsWith(a,
"native.")&&(a=N.replace(a,"native.","openfl.")),N.startsWith(a,"flash.")&&(a=N.replace(a,"flash.","openfl.")),N.startsWith(a,"openfl._v2.")&&(a=N.replace(a,"openfl._v2.","openfl.")),N.startsWith(a,"openfl._legacy.")&&(a=N.replace(a,"openfl._legacy.","openfl.")),t[a]):null};Xe.application_onExit=function(a){a=Xe.__sharedObjects.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].flush()};Xe.__super__=qa;Xe.prototype=I(qa.prototype,{client:null,data:null,fps:null,objectEncoding:null,__localPath:null,
__name:null,clear:function(){this.data={};try{var a=dl.getLocalStorage();a!=null&&a.removeItem(this.__localPath+":"+this.__name)}catch(b){Pb.lastError=b}},close:function(){},connect:function(a,b){md.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:392,className:"openfl.net.SharedObject",methodName:"connect"})},flush:function(a){if(y.fields(this.data).length==0)return 0;a=Bg.run(this.data);try{var b=dl.getLocalStorage();b!=null&&(b.removeItem(this.__localPath+":"+this.__name),b.setItem(this.__localPath+
":"+this.__name,a))}catch(c){return Pb.lastError=c,1}return 0},send:function(a){md.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:824,className:"openfl.net.SharedObject",methodName:"send"})},setDirty:function(a){},setProperty:function(a,b){this.data!=null&&(this.data[a]=b)},get_size:function(){try{var a=Bg.run(this.data);return Oa.ofString(a).length}catch(b){return Pb.lastError=b,0}},__class__:Xe,__properties__:{get_size:"get_size"}});var Jj=function(a){qa.call(this);this.bytesTotal=
this.bytesLoaded=0;this.dataFormat=1;a!=null&&this.load(a)};t["openfl.net.URLLoader"]=Jj;Jj.__name__="openfl.net.URLLoader";Jj.__super__=qa;Jj.prototype=I(qa.prototype,{bytesLoaded:null,bytesTotal:null,data:null,dataFormat:null,__httpRequest:null,close:function(){this.__httpRequest!=null&&this.__httpRequest.cancel()},load:function(a){var b=this,c=new pa("open");this.dispatchEvent(c);this.dataFormat==0?(c=new ju,this.__prepareRequest(c,a),c.load().onProgress(m(this,this.httpRequest_onProgress)).onError(m(this,
this.httpRequest_onError)).onComplete(function(d){b.__dispatchResponseStatus();b.__dispatchStatus();b.data=d;d=new pa("complete");b.dispatchEvent(d)})):(c=new io,this.__prepareRequest(c,a),c.load().onProgress(m(this,this.httpRequest_onProgress)).onError(m(this,this.httpRequest_onError)).onComplete(function(d){b.__dispatchResponseStatus();b.__dispatchStatus();b.data=b.dataFormat==2?vn._new(d):d;d=new pa("complete");b.dispatchEvent(d)}))},__dispatchResponseStatus:function(){var a=new im("httpResponseStatus",
!1,!1,this.__httpRequest.responseStatus);a.responseURL=this.__httpRequest.uri;var b=[];if(this.__httpRequest.enableResponseHeaders&&this.__httpRequest.responseHeaders!=null)for(var c=0,d=this.__httpRequest.responseHeaders;c<d.length;){var f=d[c];++c;b.push(new Nq(f.name,f.value))}a.responseHeaders=b;this.dispatchEvent(a)},__dispatchStatus:function(){var a=new im("httpStatus",!1,!1,this.__httpRequest.responseStatus);this.dispatchEvent(a)},__prepareRequest:function(a,b){this.__httpRequest=a;this.__httpRequest.uri=
b.url;this.__httpRequest.method=b.method;if(b.data!=null)if(ab.typeof(b.data)==ac.TObject){var c=y.fields(b.data);for(a=0;a<c.length;){var d=c[a];++a;this.__httpRequest.formData.h[d]=y.field(b.data,d)}}else this.__httpRequest.data=b.data instanceof Oa?b.data:Oa.ofString(H.string(b.data));this.__httpRequest.contentType=b.contentType;if(b.requestHeaders!=null)for(a=0,c=b.requestHeaders;a<c.length;)d=c[a],++a,this.__httpRequest.headers.push(new Vt(d.name,d.value));this.__httpRequest.followRedirects=
b.followRedirects;this.__httpRequest.timeout=b.idleTimeout|0;this.__httpRequest.manageCookies=b.manageCookies;this.__httpRequest.withCredentials=b.withCredentials;this.__httpRequest.userAgent=b.userAgent;this.__httpRequest.enableResponseHeaders=!0},httpRequest_onError:function(a){this.__dispatchResponseStatus();this.__dispatchStatus();this.__httpRequest instanceof rk?this.data=this.__httpRequest.responseData:this.__httpRequest instanceof io&&(this.data=this.__httpRequest.responseData);var b=a==403?
new ym("securityError"):new Oh("ioError");b.text=H.string(a);this.dispatchEvent(b)},httpRequest_onProgress:function(a,b){var c=new sh("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:Jj});var se=function(a){this.withCredentials=!1;a!=null&&(this.url=a);this.contentType=null;this.followRedirects=jm.followRedirects;this.idleTimeout=jm.idleTimeout>0?jm.idleTimeout:3E4;this.manageCookies=jm.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=jm.userAgent};
t["openfl.net.URLRequest"]=se;se.__name__="openfl.net.URLRequest";se.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,withCredentials:null,method:null,requestHeaders:null,url:null,userAgent:null,__class__:se};var jm=function(){};t["openfl.net.URLRequestDefaults"]=jm;jm.__name__="openfl.net.URLRequestDefaults";var Nq=function(a,b){b==null&&(b="");a==null&&(a="");this.name=a;this.value=b};t["openfl.net.URLRequestHeader"]=Nq;Nq.__name__="openfl.net.URLRequestHeader";
Nq.prototype={name:null,value:null,__class__:Nq};var vn={_new:function(a){var b={};a!=null&&vn.decode(b,a);return b},decode:function(a,b){for(var c=y.fields(a),d=0;d<c.length;){var f=c[d];++d;y.deleteField(a,f)}c=b.split("&");for(d=0;d<c.length;)if(f=c[d],++d,b=f.indexOf("="),b>0){var g=V.substr(f,0,b);g=decodeURIComponent(g.split("+").join(" "));f=V.substr(f,b+1,null);a[g]=decodeURIComponent(f.split("+").join(" "))}else b!=0&&(a[decodeURIComponent(f.split("+").join(" "))]="")},toString:function(a){for(var b=
[],c=y.fields(a),d=0;d<c.length;){var f=c[d];++d;var g=y.field(a,f);if(f.indexOf("[]")>-1&&g instanceof Array){var h=[];for(g=La(g);g.hasNext();){var n=g.next();h.push(encodeURIComponent(n))}h=h.join("&amp;"+f+"=");b.push(encodeURIComponent(f)+"="+h)}else f=encodeURIComponent(f)+"=",h=H.string(g),b.push(f+encodeURIComponent(h))}return b.join("&")},__get:function(a,b){return y.field(a,b)},__set:function(a,b,c){a[b]=c}},to=function(a){this.parentDomain=a!=null?a:to.currentDomain};t["openfl.system.ApplicationDomain"]=
to;to.__name__="openfl.system.ApplicationDomain";to.prototype={parentDomain:null,getDefinition:function(a){return t[a]},hasDefinition:function(a){return t[a]!=null},__class__:to};var vd=function(){};t["openfl.system.Capabilities"]=vd;vd.__name__="openfl.system.Capabilities";vd.__properties__={get_version:"get_version",get_screenResolutionY:"get_screenResolutionY",get_screenResolutionX:"get_screenResolutionX",get_screenDPI:"get_screenDPI",get_pixelAspectRatio:"get_pixelAspectRatio",get_os:"get_os",
get_manufacturer:"get_manufacturer",get_language:"get_language",get_cpuArchitecture:"get_cpuArchitecture"};vd.hasMultiChannelAudio=function(a){return!1};vd.get_cpuArchitecture=function(){return"x86"};vd.get_language=function(){var a=Fh.get_language(Fh.get_currentLocale());if(a!=null)switch(a=a.toLowerCase(),a){case "cs":case "da":case "de":case "en":case "es":case "fi":case "fr":case "hu":case "it":case "ja":case "ko":case "nb":case "nl":case "pl":case "pt":case "ru":case "sv":case "tr":return a;
case "zh":a=Fh.get_region(Fh.get_currentLocale());if(a!=null)switch(a.toUpperCase()){case "HANT":case "TW":return"zh-TW"}return"zh-CN";default:return"xu"}return"en"};vd.get_manufacturer=function(){var a=Rb.get_platformName();return"OpenFL"+(a!=null?" "+a:"")};vd.get_os=function(){var a=Rb.get_platformLabel();return a!=null?a:""};vd.get_pixelAspectRatio=function(){return 1};vd.get_screenDPI=function(){var a=md.application!=null?md.application.__window:null,b=72;a!=null&&(b*=a.__scale);return b};vd.get_screenResolutionX=
function(){var a=md.current.stage,b=0;if(a==null)return 0;if(a.window!=null){var c=a.window.get_display();c!=null&&(b=Math.ceil(c.currentMode.width*a.window.__scale))}return b>0?b:a.stageWidth};vd.get_screenResolutionY=function(){var a=md.current.stage,b=0;if(a==null)return 0;if(a.window!=null){var c=a.window.get_display();c!=null&&(b=Math.ceil(c.currentMode.height*a.window.__scale))}return b>0?b:a.stageHeight};vd.get_version=function(){return"WEB "+(N.replace("9.5.1",".",",")+",0")};var Fz=function(a,
b,c){a==null&&(a=!1);this.checkPolicyFile=a;this.securityDomain=c;this.applicationDomain=b;this.allowLoadBytesCodeExecution=this.allowCodeImport=!0};t["openfl.system.LoaderContext"]=Fz;Fz.__name__="openfl.system.LoaderContext";Fz.prototype={allowCodeImport:null,allowLoadBytesCodeExecution:null,applicationDomain:null,checkPolicyFile:null,securityDomain:null,__class__:Fz};var Oq=function(){};t["openfl.system.SecurityDomain"]=Oq;Oq.__name__="openfl.system.SecurityDomain";Oq.prototype={__class__:Oq};
var me=function(a){yf.call(this,a)};t["openfl.text.Font"]=me;me.__name__="openfl.text.Font";me.enumerateFonts=function(a){return me.__registeredFonts};me.fromBytes=function(a){var b=new me;b.__fromBytes(mc.toBytes(a));return b};me.fromFile=function(a){if(a==null)return null;var b=new me;b.__fromFile(a);return b};me.loadFromBytes=function(a){return yf.loadFromBytes(mc.toBytes(a)).then(function(b){var c=new me;c.__fromLimeFont(b);return Hc.withValue(c)})};me.loadFromFile=function(a){return yf.loadFromFile(a).then(function(b){var c=
new me;c.__fromLimeFont(b);return Hc.withValue(c)})};me.loadFromName=function(a){return yf.loadFromName(a).then(function(b){var c=new me;c.__fromLimeFont(b);return Hc.withValue(c)})};me.registerFont=function(a){a=w.getClass(a)==null?w.__cast(ab.createInstance(a,[]),me):w.__cast(a,me);a!=null&&(me.__registeredFonts.push(a),me.__fontByName.h[a.name]=a)};me.__super__=yf;me.prototype=I(yf.prototype,{fontStyle:null,fontType:null,__initialized:null,__fromLimeFont:function(a){this.__copyFrom(a)},__initialize:function(){return this.__initialized},
get_fontName:function(){return this.name},set_fontName:function(a){return this.name=a},__class__:me,__properties__:{set_fontName:"set_fontName",get_fontName:"get_fontName"}});var ef=function(a,b,c,d,f,g,h,n,l,q,u,v,z){this.set_font(a);this.set_size(b);this.color=c;this.set_bold(d);this.set_italic(f);this.underline=g;this.url=h;this.target=n;this.align=l;this.leftMargin=q;this.rightMargin=u;this.indent=v;this.leading=z};t["openfl.text.TextFormat"]=ef;ef.__name__="openfl.text.TextFormat";ef.prototype=
{align:null,blockIndent:null,bold:null,bullet:null,color:null,font:null,indent:null,italic:null,kerning:null,leading:null,leftMargin:null,letterSpacing:null,rightMargin:null,size:null,strikethrough:null,tabStops:null,target:null,underline:null,url:null,__ascent:null,__descent:null,__cacheKey:null,clone:function(){var a=new ef(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);a.align=this.align;a.leftMargin=this.leftMargin;a.rightMargin=this.rightMargin;a.indent=
this.indent;a.leading=this.leading;a.blockIndent=this.blockIndent;a.bullet=this.bullet;a.kerning=this.kerning;a.letterSpacing=this.letterSpacing;a.tabStops=this.tabStops;a.strikethrough=this.strikethrough;a.__ascent=this.__ascent;a.__descent=this.__descent;a.__cacheKey=this.__toCacheKey();return a},__merge:function(a){a.font!=null&&this.set_font(a.font);a.size!=null&&this.set_size(a.size);a.color!=null&&(this.color=a.color);a.bold!=null&&this.set_bold(a.bold);a.italic!=null&&this.set_italic(a.italic);
a.underline!=null&&(this.underline=a.underline);a.url!=null&&(this.url=a.url);a.target!=null&&(this.target=a.target);a.align!=null&&(this.align=a.align);a.leftMargin!=null&&(this.leftMargin=a.leftMargin);a.rightMargin!=null&&(this.rightMargin=a.rightMargin);a.indent!=null&&(this.indent=a.indent);a.leading!=null&&(this.leading=a.leading);a.blockIndent!=null&&(this.blockIndent=a.blockIndent);a.bullet!=null&&(this.bullet=a.bullet);a.kerning!=null&&(this.kerning=a.kerning);a.letterSpacing!=null&&(this.letterSpacing=
a.letterSpacing);a.tabStops!=null&&(this.tabStops=a.tabStops);a.strikethrough!=null&&(this.strikethrough=a.strikethrough);a.__ascent!=null&&(this.__ascent=a.__ascent);a.__descent!=null&&(this.__descent=a.__descent);this.__toCacheKey()},__toCacheKey:function(){return this.__cacheKey=""+this.font+this.size+H.string(this.bold)+H.string(this.italic)},set_font:function(a){this.font!=a&&(this.font=a,this.__toCacheKey());return this.font},set_size:function(a){this.size!=a&&(this.size=a,this.__toCacheKey());
return this.size},set_bold:function(a){this.bold!=a&&(this.bold=a,this.__toCacheKey());return this.bold},set_italic:function(a){this.italic!=a&&(this.italic=a,this.__toCacheKey());return this.italic},__class__:ef,__properties__:{set_size:"set_size",set_italic:"set_italic",set_font:"set_font",set_bold:"set_bold"}};var Nk={fromString:function(a){switch(a){case "center":return 0;case "end":return 1;case "justify":return 2;case "left":return 3;case "right":return 4;case "start":return 5;default:return null}},
toString:function(a){switch(a){case 0:return"center";case 1:return"end";case 2:return"justify";case 3:return"left";case 4:return"right";case 5:return"start";default:return null}}},ky=function(a,b,c,d,f,g){this.x=a;this.width=b;this.height=c;this.ascent=d;this.descent=f;this.leading=g};t["openfl.text.TextLineMetrics"]=ky;ky.__name__="openfl.text.TextLineMetrics";ky.prototype={ascent:null,descent:null,height:null,leading:null,width:null,x:null,__class__:ky};var hw=function(a){this.importRegex=new Wa("@import .*?;",
"ig");this.commentRegex="(\\/\\*[\\s\\S]*?\\*\\/)";this.combinedCSSRegex="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)*?})";this.keyframeRegex="((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";this.mediaQueryRegex="((@media [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";this.cssRegex=new Wa("([\\s\\S]*?){([\\s\\S]*?)*}","ig");this.keyframeStatements=[];this.importStatements=[]};t["openfl.text._internal.CSSParser"]=hw;hw.__name__="openfl.text._internal.CSSParser";
hw.prototype={source:null,options:null,importStatements:null,keyframeStatements:null,cssRegex:null,mediaQueryRegex:null,keyframeRegex:null,combinedCSSRegex:null,commentRegex:null,importRegex:null,stripComments:function(a){return a.replace(new RegExp(this.commentRegex,"ig"),"")},parseRules:function(a){for(var b=new Wa("(\\*?[-#/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)+((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)","g"),c=this.getMatches(b,a),d=[],f=0,g=c.length;f<g;){a=f++;if(!b.match(c[a]))return null;
var h=a=b.matched(0).split("\r\n").join("\n");h=N.trim(h);if(h.indexOf(":")!=-1){if(a=N.trim(h.split(":")[0]),h=N.trim(h.split(":")[1]),!(a.length<1||h.length<1)){var n=new G;n.h.type="declaration";n.h.property=a;n.h.value=h;d.push(n)}}else V.substr(N.trim(h),0,7)=="base64,"?(a=h+N.trim(h),d[d.length-1].h.value=a):h.length>0&&(a=new G,a.h.type="declaration",a.h.property="",a.h.value=h,a.h.defective=!0,d.push(a))}return d},findCorrespondingRule:function(a,b,c){for(var d=null,f=0,g=a.length;f<g;){var h=
f++;if(a[h].h.directive==b&&(d=a[h],c==a[h].h.value))break}return d},findBySelector:function(a,b,c){c==null&&(c=!1);for(var d=[],f=0,g=a.length;f<g;){var h=f++;c==0?a[h].h.selector==b&&d.push(a[h]):w.__cast(a[h].h.selector,String).indexOf(b)!=-1&&d.push(a[h])}if(b=="@imports"||d.length<2)return d;a=d[0];f=0;for(g=d.length;f<g;)h=f++,this.intelligentCSSPush([a],d[h]);return[a]},deleteBySelector:function(a,b){for(var c=[],d=0,f=a.length;d<f;){var g=d++;a[g].h.selector!=b&&c.push(a[g])}return c},compress:function(a){for(var b=
[],c=Object.create(null),d=0,f=a.length;d<f;){var g=d++;g=a[g];c[g.h.selector]!=1&&(g=this.findBySelector(a,g.h.selector),g.length!=0&&(b=b.concat(g),c.selector=!0))}return b},diff:function(a,b){if(a.h.selector==b.h.selector||a.h.type=="media"||b.h.type=="media")return null;var c=new G;c.h.selector=a.h.selector;c.h.rules=[];var d=c;new G;new G;var f=w.__cast(a.h.rules,Array).length;var g=w.__cast(b.h.rules,Array).length;c=0;for(var h=f;c<h;){c++;f=w.__cast(a.h.rules,Array)[1];var n=this.findCorrespondingRule(b.h.rules,
a.h.directive,a.h.value);n==null?w.__cast(d.h.rules,Array).push(f):f.h.value!=n.h.value&&w.__cast(d.h.rules,Array).push(f)}c=0;for(h=g;c<h;)c++,n=w.__cast(a.h.rules,Array)[1],f=this.findCorrespondingRule(a.h.rules,b.h.directive),f==null&&(n.h.type="DELETED",w.__cast(d.h.rules,Array).push(n));return w.__cast(d.h.rules,Array).length==0?null:d},intelligentMerge:function(a,b,c){c==null&&(c=!1);for(var d=0,f=b.length;d<f;){var g=d++;this.intelligentCSSPush(a,b[g],c)}d=0;for(f=a.length;d<f;)g=d++,b=a[g],
b.h.type!="media"&&b.h.type!="keyframes"&&(c=this.compactRules(b.h.rules),b.h.rules=c)},intelligentCSSPush:function(a,b,c){c==null&&(c=!1);var d=null;if(c==0){c=0;for(var f=a.length;c<f;){var g=c++;if(a[g].h.selector==b.h.selector){d=a[g];break}}}else for(c=a.length-1;c>-1;){if(a[c].h.selector==b.h.selector){d=a[c];break}--c}if(d==null)a.push(b);else if(b.h.type!="media")for(a=b.h.rules,c=0,f=a.length;c<f;)g=c++,b=a[g],g=this.findCorrespondingRule(d.h.rules,b.h.directive),g==null?d.h.rules.push(b):
b.h.type=="DELETED"?g.h.type="DELETED":g.h.value=b.h.value;else c=w.__cast(d.h.subStyles,Array).concat(b.h.subStyles),d.h.value=c},compactRules:function(a){for(var b=[],c=0,d=a.length;c<d;){var f=c++;a[f].h.type!="DELETED"&&b.push(a[f])}return b},getImports:function(a){for(var b=[],c=0,d=a.length;c<d;){var f=c++;a[f].h.type=="imports"&&b.push(a[f].h.styles)}return b},parse:function(a){if(a==null)return null;var b=RegExp("^\\s+|\\s+$","g");a=a.replace(b,"");for(var c=[],d=this.importRegex.match(a);d;){var f=
this.importRegex.matched(0);if(f!=null){this.importStatements.push(f);var g=new G;g.h.selector="@imports";g.h.type="imports";g.h.styles=f;c.push(g)}else break}a=a.replace(this.importRegex.r,"");for(f=new Wa(this.keyframeRegex,"gi");f.match(a);){d=this.getMatches(f,a);if(d==null)break;g=new G;g.h.selectors="@keyframes";g.h.type="keyframes";var h=f.matchedRight();g.h.styles=h;c.push(g)}a=a.replace(f.r,"");for(g=new Wa(this.combinedCSSRegex,"gi");g.match(a);){d=this.getMatches(g,a);if(d==null)break;
a="";g=0;for(f=d.length;g<f;){var n=g++;h=new Wa("^([^{]+)","");if(h.match(d[n]))h.matched(0)!=null&&(a=N.trim(h.matched(0).split("\r\n").join("\n"))),b=new Wa(this.commentRegex,"gi"),n=this.getMatches(b,a),n!=null&&(a=N.trim(a.replace(b.r,""))),b=RegExp("\n+",""),a=a.replace(b,"\n"),a.indexOf("@media")!=-1?(b=new G,b.h.selectors=a,b.h.type="media",h=this.parse(h.matchedRight()+"\n}"),b.h.subStyles=h,h=b,n!=null&&(h.h.comments=n[0]),c.push(h)):h.matchedRight()!=null&&(h=this.parseRules(h.matchedRight()),
b=new G,b.h.selectors=a,b.h.type="rule",b.h.declarations=h,h=b,a=="@font-face"&&(h.h.type="font-face"),n!=null&&(h.h.comments=n[0]),c.push(h));else break}break}g=new G;g.h.type="stylesheet";g.h.rules=c;g.h.parsingErrors=[];return g},getMatches:function(a,b,c){c==null&&(c=0);for(var d=[];a.match(b);)b=N.trim(a.matched(c)),d.push(b),b=N.trim(a.matchedRight());return d.length==0?null:d},__class__:hw};var Pq=function(a,b){this.__collisions=[];this.__wordMap=new Od;this.set(a,b)};t["openfl.text._internal.CacheMeasurement"]=
Pq;Pq.__name__="openfl.text._internal.CacheMeasurement";Pq.prototype={__collisions:null,__wordMap:null,hash:null,set:function(a,b){this.__addCollision(a,b)},get:function(a){return this.__collisions.length>1?this.__wordMap.h[this.__collisions.indexOf(a)]:this.__wordMap.h[0]},__addCollision:function(a,b){if(!this.exists(a)){var c=this.__wordMap;a=this.__collisions.push(a)-1;c.h[a]=b}},exists:function(a){return this.__collisions.length==0?!1:this.__collisions.indexOf(a)>-1},__class__:Pq};var Gy=function(a,
b,c){this.glyph=a;this.advance=b;this.offset=c!=null?c:new Uf};t["openfl.text._internal.GlyphPosition"]=Gy;Gy.__name__="openfl.text._internal.GlyphPosition";Gy.prototype={advance:null,glyph:null,offset:null,__class__:Gy};var jc=function(){};t["openfl.text._internal.HTMLParser"]=jc;jc.__name__="openfl.text._internal.HTMLParser";jc.parse=function(a,b,c,d,f){a=b?a.replace(jc.__regexBreakTag.r,"\n"):a.replace(jc.__regexBreakTag.r,"");a=a.replace(jc.__regexEntityNbsp.r," ");a=jc.__regexCharEntity.map(a,
function(W){var ka=W.matched(1),ha=W.matched(2);return ka!=null&&(ka=H.parseInt(ka),ka!=null)?String.fromCodePoint(ka):ha!=null&&(ha=H.parseInt("0"+ha),ha!=null)?String.fromCodePoint(ha):W.matched(0)});var g=a.split("<");if(g.length==1){a=jc.__htmlUnescape(a.replace(jc.__regexHTMLTag.r,""));if(f.get_length()>1){var h=f.get_length()-1;f.__tempIndex=1;for(var n=0,l=[];n<l.length;){var q=l[n++];f.insertAt(f.__tempIndex,q);f.__tempIndex++}f.splice(f.__tempIndex,h)}b=f.get(0);b.format=d;b.start=0;b.end=
a.length}else{h=f.get_length();n=f.__tempIndex=0;for(l=[];n<l.length;)q=l[n++],f.insertAt(f.__tempIndex,q),f.__tempIndex++;f.splice(f.__tempIndex,h);a="";h=[d.clone()];n=[];q=!1;for(l=0;l<g.length;){var u=g[l];++l;if(u!=""){var v=V.substr(u,0,1)=="/",z=u.indexOf(">"),r=z+1,F=u.indexOf(" ");F=u.substring(v?1:0,F>-1&&F<z?F:z).toLowerCase();if(v)n.length!=0&&F==n[n.length-1]&&(n.pop(),h.pop(),v=h[h.length-1].clone(),(F=="p"||F=="li")&&f.get_length()>0&&(b&&(a+="\n"),q=!0),r<u.length&&(q=jc.__htmlUnescape(V.substr(u,
r,null)),f.push(new Hh(v,a.length,a.length+q.length)),a+=q,q=!1));else if(v=h[h.length-1].clone(),z>-1){c!=null&&(c.__applyStyle(F,v),jc.__regexClass.match(u)&&(c.__applyStyle("."+jc.__getAttributeMatch(jc.__regexClass),v),c.__applyStyle(F+"."+jc.__getAttributeMatch(jc.__regexClass),v)));switch(F){case "a":c!=null&&c.__applyStyle("a:link",v);jc.__regexHref.match(u)&&(v.url=jc.__getAttributeMatch(jc.__regexHref));break;case "b":v.set_bold(!0);break;case "em":case "i":v.set_italic(!0);break;case "font":jc.__regexFace.match(u)&&
v.set_font(jc.__getAttributeMatch(jc.__regexFace));jc.__regexColor.match(u)&&(v.color=H.parseInt("0x"+jc.__getAttributeMatch(jc.__regexColor)));if(jc.__regexSize.match(u)){z=jc.__getAttributeMatch(jc.__regexSize);var J=V.cca(z,0);J==43||J==45?v.set_size((h.length>=2?h[h.length-2]:d).size+H.parseInt(z)):v.set_size(H.parseInt(z))}break;case "li":f.get_length()>0&&!q&&(a+="\n");z=v.clone();z.underline=!1;f.push(new Hh(z,a.length,a.length+2));a+="\u2022 ";break;case "p":f.get_length()>0&&!q&&(a+="\n");
jc.__regexAlign.match(u)&&(z=jc.__getAttributeMatch(jc.__regexAlign).toLowerCase(),v.align=Nk.fromString(z));break;case "textformat":jc.__regexBlockIndent.match(u)&&(v.blockIndent=H.parseInt(jc.__getAttributeMatch(jc.__regexBlockIndent)));jc.__regexIndent.match(u)&&(v.indent=H.parseInt(jc.__getAttributeMatch(jc.__regexIndent)));jc.__regexLeading.match(u)&&(v.leading=H.parseInt(jc.__getAttributeMatch(jc.__regexLeading)));jc.__regexLeftMargin.match(u)&&(v.leftMargin=H.parseInt(jc.__getAttributeMatch(jc.__regexLeftMargin)));
jc.__regexRightMargin.match(u)&&(v.rightMargin=H.parseInt(jc.__getAttributeMatch(jc.__regexRightMargin)));if(jc.__regexTabStops.match(u)){z=jc.__getAttributeMatch(jc.__regexTabStops).split(" ");J=[];for(var L=0;L<z.length;){var Q=z[L];++L;J.push(H.parseInt(Q))}v.tabStops=J}break;case "u":v.underline=!0}h.push(v);n.push(F);r<u.length&&(q=jc.__htmlUnescape(u.substring(r)),f.push(new Hh(v,a.length,a.length+q.length)),a+=q,q=!1)}else q=jc.__htmlUnescape(u),f.push(new Hh(v,a.length,a.length+q.length)),
a+=q,q=!1}}f.get_length()==0&&f.push(new Hh(h[0],0,0))}return a};jc.__getAttributeMatch=function(a){return a.matched(2)!=null?a.matched(2):a.matched(3)};jc.__htmlUnescape=function(a){a=a.replace(jc.__regexEntityApos.r,"'");return N.htmlUnescape(a)};var Ho=function(){this.__shortWordMap=new G;this.__longWordMap=new G};t["openfl.text._internal.ShapeCache"]=Ho;Ho.__name__="openfl.text._internal.ShapeCache";Ho.hashFunction=function(a){for(var b=0,c,d=0,f=a.length;d<f;)c=d++,c=V.cca(a,c),b=(b<<5)-b+c,
b|=0;return b};Ho.prototype={__shortWordMap:null,__longWordMap:null,cache:function(a,b,c){a=a.format.__cacheKey;return c.length>15?this.__cacheLongWord(c,a,b):this.__cacheShortWord(c,a,b)},__cacheShortWord:function(a,b,c){if(Object.prototype.hasOwnProperty.call(this.__shortWordMap.h,b)){var d=this.__shortWordMap.h[b];if(Object.prototype.hasOwnProperty.call(d.h,a))return d.h[a];var f=c();d.h[a]=f}else d=new G,f=c(),d.h[a]=f,this.__shortWordMap.h[b]=d;return c()},__cacheLongWord:function(a,b,c){var d=
Ho.hashFunction(a);if(Object.prototype.hasOwnProperty.call(this.__longWordMap.h,b)){var f=this.__longWordMap.h[b];if(f.h.hasOwnProperty(d)){var g=f.h[d];if(g.exists(a))return g.get(a);g.set(a,c())}else g=new Pq(a,c()),f.h[d]=g}else f=new Od,g=new Pq(a,c()),g.hash=d,f.h[d]=g,this.__longWordMap.h[b]=f;return c()},__class__:Ho};var Wc=function(a){this.__shapeCache=new Ho;this.textField=a;this.height=this.width=100;this.set_text("");this.bounds=new Ia(0,0,0,0);this.textBounds=new Ia(0,0,0,0);this.type=
0;this.autoSize=2;this.embedFonts=!1;this.selectable=!0;this.borderColor=0;this.border=!1;this.backgroundColor=16777215;this.background=!1;this.gridFitType=1;this.maxChars=0;this.multiline=!1;this.numLines=1;this.scrollH=this.sharpness=0;this.set_scrollV(1);this.wordWrap=!1;this.lineAscents=tb.toFloatVector(null);this.lineBreaks=tb.toIntVector(null);this.lineDescents=tb.toFloatVector(null);this.lineLeadings=tb.toFloatVector(null);this.lineHeights=tb.toFloatVector(null);this.lineWidths=tb.toFloatVector(null);
this.layoutGroups=tb.toObjectVector(null);this.textFormatRanges=tb.toObjectVector(null);Wc.__context==null&&(Wc.__context=window.document.createElement("canvas").getContext("2d"))};t["openfl.text._internal.TextEngine"]=Wc;Wc.__name__="openfl.text._internal.TextEngine";Wc.findFont=function(a){return me.__fontByName.h[a]};Wc.findFontVariant=function(a){var b=a.font,c=a.bold;a=a.italic;b==null&&(b="_serif");var d=N.replace(N.replace(b," Normal","")," Regular","");return c&&a&&Object.prototype.hasOwnProperty.call(me.__fontByName.h,
d+" Bold Italic")?Wc.findFont(d+" Bold Italic"):c&&Object.prototype.hasOwnProperty.call(me.__fontByName.h,d+" Bold")?Wc.findFont(d+" Bold"):a&&Object.prototype.hasOwnProperty.call(me.__fontByName.h,d+" Italic")?Wc.findFont(d+" Italic"):Wc.findFont(b)};Wc.getDefaultFont=function(a,b,c){Wc.__defaultFonts==null&&(Wc.__defaultFonts=new G);a=Wc.__defaultFonts.h[a];return a==null?null:b&&c&&a.boldItalic!=null?a.boldItalic:c&&a.italic!=null?a.italic:b&&a.bold!=null?a.bold:a.normal};Wc.getFormatHeight=function(a){var b=
Wc.getFont(a);Wc.__context.font=b;b=Wc.getFontInstance(a);if(a.__ascent!=null){var c=a.size*a.__ascent;b=a.size*a.__descent}else b!=null&&b.unitsPerEM!=0?(c=b.ascender/b.unitsPerEM*a.size,b=Math.abs(b.descender/b.unitsPerEM*a.size)):(c=a.size,b=a.size*.185);return c+b+a.leading};Wc.getFont=function(a){var b=a.font,c=a.bold,d=a.italic;b==null&&(b="_serif");var f=N.replace(N.replace(b," Normal","")," Regular","");c&&d&&Object.prototype.hasOwnProperty.call(me.__fontByName.h,f+" Bold Italic")?(b=f+" Bold Italic",
d=c=!1):c&&Object.prototype.hasOwnProperty.call(me.__fontByName.h,f+" Bold")?(b=f+" Bold",c=!1):d&&Object.prototype.hasOwnProperty.call(me.__fontByName.h,f+" Italic")?(b=f+" Italic",d=!1):(c&&(b.indexOf(" Bold ")>-1||N.endsWith(b," Bold"))&&(c=!1),d&&(b.indexOf(" Italic ")>-1||N.endsWith(b," Italic"))&&(d=!1));c=(d?"italic ":"normal ")+"normal "+(c?"bold ":"normal ");c+=a.size+"px";c+="/"+(a.size+3)+"px ";switch(b){case "_sans":a="sans-serif";break;case "_serif":a="serif";break;case "_typewriter":a=
"monospace";break;default:a="'"+b.replace(RegExp("^[\\s'\"]+(.*)[\\s'\"]+$",""),"$1")+"'"}return c+=""+a};Wc.getFontInstance=function(a){return Wc.findFontVariant(a)};Wc.prototype={antiAliasType:null,autoSize:null,background:null,backgroundColor:null,border:null,borderColor:null,bottomScrollV:null,bounds:null,caretIndex:null,embedFonts:null,gridFitType:null,height:null,layoutGroups:null,lineAscents:null,lineBreaks:null,lineDescents:null,lineLeadings:null,lineHeights:null,lineWidths:null,maxChars:null,
maxScrollH:null,maxScrollV:null,multiline:null,numLines:null,restrict:null,scrollH:null,scrollV:null,selectable:null,sharpness:null,text:null,textBounds:null,textHeight:null,textFormatRanges:null,textWidth:null,type:null,width:null,wordWrap:null,textField:null,__cursorTimer:null,__hasFocus:null,__isKeyDown:null,__measuredHeight:null,__measuredWidth:null,__restrictRegexp:null,__selectionStart:null,__shapeCache:null,__showCursor:null,__textFormat:null,__textLayout:null,__texture:null,__useIntAdvances:null,
__cairoFont:null,__font:null,createRestrictRegexp:function(a){var b="",c=!1;a=(new Wa("\\^([^\\^]+)","gu")).map(a,function(f){if(c)return c=!c,f.matched(1);b+=f.matched(1);c=!c;return""});var d=[];a.length>0&&d.push("[^"+a+"]");b.length>0&&d.push("["+b+"]");return new Wa("("+d.join("|")+")","g")},getBounds:function(){var a=this.border?1:0;this.bounds.width=this.width+a;this.bounds.height=this.height+a;a=this.width;for(var b=this.height,c=this.layoutGroups.get_length()-1,d=0,f=this.layoutGroups.get_length();d<
f;){var g=d++,h=this.layoutGroups.get(g);if(g!=c||h.startIndex!=h.endIndex||this.type==1)h.offsetX<a&&(a=h.offsetX),h.offsetY<b&&(b=h.offsetY)}a>=this.width&&(a=2);b>=this.height&&(b=2);this.textBounds.setTo(Math.max(a-2,0),Math.max(b-2,0),Math.min(this.textWidth+4,this.bounds.width),Math.min(this.textHeight*1.185+4,this.bounds.height))},getLine:function(a){return a<0||a>this.lineBreaks.get_length()+1?null:this.lineBreaks.get_length()==0?this.text:this.text.substring(a>0?this.lineBreaks.get(a-1):
0,this.lineBreaks.get(a))},getLineBreaks:function(){this.lineBreaks.set_length(0);for(var a=-1,b;a<this.text.length;)if(b=this.text.indexOf("\n",a+1),a=this.text.indexOf("\r",a+1),a=a==-1?b:b==-1?a:a<b?a:b,a>-1)this.lineBreaks.push(a);else break},getLineBreakIndex:function(a){a==null&&(a=0);for(var b=this.lineBreaks.iterator();b.hasNext();){var c=b.next();if(c>=a)return c}return-1},getLineMeasurements:function(){this.lineAscents.set_length(0);this.lineDescents.set_length(0);this.lineLeadings.set_length(0);
this.lineHeights.set_length(0);this.lineWidths.set_length(0);var a=0,b=0,c=null,d=0,f=0;this.textHeight=this.textWidth=0;this.numLines=1;this.maxScrollH=0;for(var g=this.layoutGroups.get_length()-1,h=0,n=this.layoutGroups.get_length();h<n;){var l=h++;var q=this.layoutGroups.get(l);if(l!=g||q.startIndex!=q.endIndex||this.type==1){for(;q.lineIndex>this.numLines-1;)this.lineAscents.push(a),this.lineDescents.push(b),this.lineLeadings.push(c!=null?c:0),this.lineHeights.push(d),this.lineWidths.push(f),
b=a=0,c=null,f=d=0,this.numLines++;a=Math.max(a,q.ascent);b=Math.max(b,q.descent);c=c==null?q.leading:Math.max(c,q.leading)|0;d=Math.max(d,q.height);f=q.offsetX-2+q.width;f>this.textWidth&&(this.textWidth=f);l=Math.ceil(q.offsetY-2+q.ascent+q.descent);l>this.textHeight&&(this.textHeight=l)}}this.textHeight==0&&this.textField!=null&&this.type==1&&(a=this.textField.__textFormat,b=Wc.getFontInstance(a),a.__ascent!=null?(g=a.size*a.__ascent,h=a.size*a.__descent):b!=null&&b.unitsPerEM!=0?(g=b.ascender/
b.unitsPerEM*a.size,h=Math.abs(b.descender/b.unitsPerEM*a.size)):(g=a.size,h=a.size*.185),c=a.leading,a=g,b=h,this.textHeight=l=Math.ceil(g+h));this.lineAscents.push(a);this.lineDescents.push(b);this.lineLeadings.push(c!=null?c:0);this.lineHeights.push(d);this.lineWidths.push(f);this.numLines==1&&c>0&&(this.textHeight+=c);if(this.autoSize!=2)switch(this.autoSize){case 0:case 1:case 3:this.wordWrap||(this.width=this.textWidth+4),this.height=this.textHeight+4,this.bottomScrollV=this.numLines}this.maxScrollH=
this.textWidth>this.width-4?this.textWidth-this.width+4|0:0;this.scrollH>this.maxScrollH&&(this.scrollH=this.maxScrollH)},getLayoutGroups:function(){var a=this;this.layoutGroups.set_length(0);if(this.text!=null&&this.text!=""){var b=-1,c=null,d=null,f=Jc.__defaultTextFormat.clone(),g=0,h=0,n=0,l=0,q=3,u=0,v=0,z=0,r=0,F=!0,J=null,L=null,Q=0,W=0,ka=0,ha=-2,ta=-1,za=this.text.indexOf(" "),eb=0,db=eb<this.lineBreaks.get_length()?this.lineBreaks.get(eb):-1,Ra=0,vb=0,bb=0,Tb=0,Eb=function(Zc,jd,Zd){var Nc=
function(){var Ud=[];if(a.__useIntAdvances==null){var kf=new Wa("Trident/7.0","");a.__useIntAdvances=kf.match(wa.navigator.userAgent)}if(a.__useIntAdvances){var hg=0;kf=jd;for(var Tg=Zd;kf<Tg;){var rf=kf++;rf=a.measureText(Zc.substring(jd,rf+1));Ud.push(rf-hg);hg=rf}}else for(kf=jd,Tg=Zd;kf<Tg;)rf=kf++,rf<Zc.length-1?(hg=a.measureText(Zc.charAt(rf+1)),hg=a.measureText(V.substr(Zc,rf,2))-hg):hg=Wc.__context.measureText(Zc.charAt(rf)).width,Ud.push(hg);return Ud};return f.align==2?Nc():a.__shapeCache.cache(c,
Nc,Zc.substring(jd,Zd))},Lb=function(Zc){for(var jd=0,Zd=0;Zd<Zc.length;){var Nc=Zc[Zd];++Zd;jd+=Nc}return jd},vc=function(){return 2+z+u+(F?v:0)},zd=function(){return a.width-2-r-vc()},Qb=function(Zc,jd){J==null||J.startIndex!=J.endIndex?(J=new Hv(c.format,Zc,jd),a.layoutGroups.push(J)):(J.format=c.format,J.startIndex=Zc,J.endIndex=jd)},wd=function(){f.__ascent!=null?(h=f.size*f.__ascent,l=f.size*f.__descent):d!=null&&d.unitsPerEM!=0?(h=d.ascender/d.unitsPerEM*f.size,l=Math.abs(d.descender/d.unitsPerEM*
f.size)):(h=f.size,l=f.size*.185);g=f.leading;W=Math.ceil(h+l+g);W>ka&&(ka=W);h>n&&(n=h)},Ae=function(){F=!0;q=f.align!=null?f.align:3;u=f.blockIndent!=null?f.blockIndent:0;v=f.indent!=null?f.indent:0;z=f.leftMargin!=null?f.leftMargin:0;r=f.rightMargin!=null?f.rightMargin:0},bg=function(){if(b<a.textFormatRanges.get_length()-1){b+=1;c=a.textFormatRanges.get(b);f.__merge(c.format);var Zc=Wc.getFont(f);Wc.__context.font=Zc;d=Wc.getFontInstance(f);return!0}return!1},Df=function(Zc,jd){if(Zc>=jd)L=[],
Q=0;else if(jd<=c.end)L=Eb(a.text,Zc,jd),Q=Lb(L);else{var Zd=Zc;Zc=c.end;var Nc=0;L=[];for(Q=0;;)if(Zd!=Zc&&(Zd=Eb(a.text,Zd,Zc),L=L.concat(Zd)),Zc!=jd){if(!bg()){Vb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",lineNumber:1186,className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}Zd=Zc;Zc=jd<c.end?jd:c.end;++Nc}else{Q=Lb(L);break}b-=Nc+1;
bg()}},Sg=function(Zc){if(Zc<=c.end){L=Eb(a.text,bb,Zc);Q=Lb(L);Qb(bb,Zc);J.positions=L;var jd=Ra,Zd=vc();J.offsetX=jd+Zd;J.ascent=h;J.descent=l;J.leading=g;J.lineIndex=Tb;J.offsetY=vb+2;J.width=Q;J.height=W;Ra+=Q;Zc==c.end&&(J=null,bg(),wd())}else for(;;){var Nc=Zc<c.end?Zc:c.end;bb!=Nc&&(L=Eb(a.text,bb,Nc),Q=Lb(L),Qb(bb,Nc),J.positions=L,jd=Ra,Zd=vc(),J.offsetX=jd+Zd,J.ascent=h,J.descent=l,J.leading=g,J.lineIndex=Tb,J.offsetY=vb+2,J.width=Q,J.height=W,Ra+=Q,bb=Nc);Nc==c.end&&(J=null);if(Nc==Zc)break;
if(!bg()){Vb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",lineNumber:1274,className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}wd()}bb=Zc},Nf=function(){wd();for(var Zc=a.layoutGroups.get_length();--Zc>-1;){var jd=a.layoutGroups.get(Zc);if(jd.lineIndex<Tb)break;jd.lineIndex>Tb||(jd.ascent=n,jd.height=ka)}vb+=ka;ka=n=0;Tb+=1;Ra=0;F=!1},he=
function(Zc){if(a.width>=4&&a.wordWrap){var jd=L;var Zd=Lb(jd);for(var Nc=jd.length-1;Nc>=0;){var Ud=V.cca(a.text,bb+Nc);if(Ud!=32&&Ud!=9)break;Zd-=jd[Nc];--Nc}for(;jd.length>0&&Ra+Zd>zd();){for(Ud=Nc=Zd=0;Ra+Ud<zd();){var kf=jd[Nc];kf==0?(++Nc,++Zd):(Ud+=kf,++Nc)}if(Nc==Zd)Nc=Zd+1;else for(;Nc>1&&Ra+Ud>zd();)--Nc,Nc-Zd>0?(Df(bb,bb+Nc-Zd),Ud=Q):(Nc=1,Zd=0,Df(bb,bb+1),Ud=0);jd=bb+Nc-Zd;Sg(jd);Nf();Df(jd,Zc);jd=L;Zd=Q}}Sg(Zc)};bg();Ae();wd();for(var ie,ml=this.text.length+1;bb<ml;)if(db>-1&&(za==-1||
db<za))bb<=db?(Df(bb,db),he(db),J=null):J!=null&&J.startIndex!=J.endIndex&&(J.endIndex==za&&(J.width-=J.positions[J.positions.length-1]),J=null),Nf(),c.end==db&&(bg(),wd()),bb=db+1,ta=db,++eb,db=eb<this.lineBreaks.get_length()?this.lineBreaks.get(eb):-1,Ae();else if(za>-1)for(J!=null&&J.startIndex!=J.endIndex&&(J=null),ie=!1;bb<this.text.length;){var td=-1;za==-1?td=db:(td=za+1,db>-1&&db<td&&(td=db));td==-1&&(td=this.text.length);Df(bb,td);if(q==2){if(L.length>0&&bb==ha){bb+=1;var ne=L.shift();Q-=
ne;Ra+=ne}L.length>0&&td==za+1&&(--td,ne=L.pop(),Q-=ne)}this.wordWrap&&Ra+Q>zd()&&(ie=!0,L.length>0&&td==za+1&&Ra+Q-L[L.length-1]<=zd()&&(ie=!1));if(ie){q!=2&&(J!=null||this.layoutGroups.get_length()>0)&&(ie=J,ie==null&&(ie=this.layoutGroups.get(this.layoutGroups.get_length()-1)),ie.width-=ie.positions[ie.positions.length-1],ie.endIndex--);ie=this.layoutGroups.get_length()-1;for(ne=0;ie>=0;){J=this.layoutGroups.get(ie);if(ie>0&&J.startIndex>ha)++ne;else break;--ie}bb==ha+1&&Nf();Ra=0;if(ne>0){ie=
this.layoutGroups.get(this.layoutGroups.get_length()-ne).offsetX;ne=this.layoutGroups.get_length()-ne;for(var Mc=this.layoutGroups.get_length();ne<Mc;){var xk=ne++;J=this.layoutGroups.get(xk);J.offsetX-=ie;J.offsetY=vb+2;J.lineIndex=Tb;Ra+=J.width}}he(td);ie=!1}else J!=null&&bb==za&&ha!=za-1?(q!=2&&(J.endIndex=za,J.positions=J.positions.concat(L),J.width+=Q),Ra+=Q,bb=td):J==null||q==2?(he(td),td==this.text.length&&Nf()):(ne=td<c.end?td:c.end,ne<td&&(L=Eb(this.text,bb,ne),Q=Lb(L)),J.endIndex=ne,J.positions=
J.positions.concat(L),J.width+=Q,Ra+=Q,ne==c.end&&(J=null,bg(),wd(),bb=ne,ne!=td&&Sg(td)),db==td&&++td,bb=td,td==this.text.length&&(Nf(),db!=-1&&(ta=db,++eb,db=eb<this.lineBreaks.get_length()?this.lineBreaks.get(eb):-1)));td=this.text.indexOf(" ",bb);db==ha&&(J.endIndex=db,db-J.startIndex-J.positions.length<0&&J.positions.push(0),bb=db+1);ha=za;za=td;if(db>-1&&db<=bb&&(za>db||za==-1)||bb>this.text.length)break}else bb<this.text.length&&(Df(bb,this.text.length),he(this.text.length),Nf()),bb+=1;ta==
bb-2&&ta>-1&&(Qb(bb-1,bb-1),J.positions=[],J.ascent=h,J.descent=l,J.leading=g,J.lineIndex=Tb,J.offsetX=vc(),J.offsetY=vb+2,J.width=0,J.height=W)}},measureText:function(a){return Wc.__context.measureText(a).width},restrictText:function(a){if(a==null)return a;this.__restrictRegexp!=null&&(a=this.__restrictRegexp.split(a).join(""));return a},setTextAlignment:function(){for(var a=-1,b=0,c,d,f=!1,g=0,h=this.layoutGroups.get_length();g<h;){var n=g++;c=this.layoutGroups.get(n);if(c.lineIndex!=a)switch(a=
c.lineIndex,b=this.width-4-c.format.rightMargin,c.format.align){case 0:b=this.lineWidths.get(a)<b?Math.round((b-this.lineWidths.get(a))/2):0;break;case 2:if(this.lineWidths.get(a)<b){d=1;for(var l=n+1,q=this.layoutGroups.get_length();l<q;){var u=l++;if(this.layoutGroups.get(u).lineIndex==a)u!=0&&V.cca(this.text,this.layoutGroups.get(u).startIndex-1)!=32||++d;else break}if(d>1&&(c=this.layoutGroups.get(n+d-1),l=V.cca(this.text,c.endIndex),c.endIndex<this.text.length&&l!=10&&l!=13)){b=(b-this.lineWidths.get(a))/
(d-1);f=!0;l=1;do this.layoutGroups.get(n+l).offsetX+=b*l;while(++l<d)}}b=0;break;case 4:b=this.lineWidths.get(a)<b?Math.round(b-this.lineWidths.get(a)):0;break;default:b=0}b>0&&(c.offsetX+=b)}f&&this.getLineMeasurements()},trimText:function(a){if(a==null)return a;this.maxChars>0&&a.length>this.maxChars&&(a=V.substr(a,0,this.maxChars));return a},update:function(){this.text==null||this.textFormatRanges.get_length()==0?(this.lineAscents.set_length(0),this.lineBreaks.set_length(0),this.lineDescents.set_length(0),
this.lineLeadings.set_length(0),this.lineHeights.set_length(0),this.lineWidths.set_length(0),this.layoutGroups.set_length(0),this.textHeight=this.textWidth=0,this.numLines=1,this.maxScrollH=0,this.bottomScrollV=this.maxScrollV=1):(this.getLineBreaks(),this.getLayoutGroups(),this.getLineMeasurements(),this.setTextAlignment());this.getBounds()},get_bottomScrollV:function(){if(this.numLines==1||this.lineHeights==null)return 1;for(var a=this.lineHeights.get_length(),b=this.lineLeadings.get_length()==
a?-this.lineLeadings.get(a-1):0,c=(this.get_scrollV()>0?this.get_scrollV():1)-1,d=this.lineHeights.get_length();c<d;){var f=c++,g=this.lineHeights.get(f);b+=g;if(b>this.height-4){a=f+(b-this.height>=0?0:1);break}}return a<this.get_scrollV()?this.get_scrollV():a},get_maxScrollV:function(){if(this.numLines==1||this.lineHeights==null)return 1;for(var a=this.numLines-1,b=0;a>=0;){b+=this.lineHeights.get(a);if(b>this.height-4){a+=b-this.height<0?1:2;break}--a}return a<1?1:a},set_restrict:function(a){if(this.restrict==
a)return this.restrict;this.restrict=a;this.__restrictRegexp=this.restrict==null||this.restrict.length==0?null:this.createRestrictRegexp(a);return this.restrict},get_scrollV:function(){if(this.numLines==1||this.lineHeights==null)return 1;var a=this.get_maxScrollV();return this.scrollV>a?a:this.scrollV},set_scrollV:function(a){a<1?a=1:a>this.get_maxScrollV()&&(a=this.get_maxScrollV());return this.scrollV=a},set_text:function(a){return this.text=a},__class__:Wc,__properties__:{set_text:"set_text",set_scrollV:"set_scrollV",
get_scrollV:"get_scrollV",set_restrict:"set_restrict",get_maxScrollV:"get_maxScrollV",get_bottomScrollV:"get_bottomScrollV"}};var Gz=function(a,b,c,d){this.normal=a;this.bold=b;this.italic=c;this.boldItalic=d};t["openfl.text._internal._TextEngine.DefaultFontSet"]=Gz;Gz.__name__="openfl.text._internal._TextEngine.DefaultFontSet";Gz.prototype={bold:null,boldItalic:null,italic:null,normal:null,getFont:function(a,b){return a&&b&&this.boldItalic!=null?this.boldItalic:b&&this.italic!=null?this.italic:a&&
this.bold!=null?this.bold:this.normal},__class__:Gz};var Hh=function(a,b,c){this.format=a;this.start=b;this.end=c};t["openfl.text._internal.TextFormatRange"]=Hh;Hh.__name__="openfl.text._internal.TextFormatRange";Hh.prototype={end:null,format:null,start:null,__class__:Hh};var Qf=function(a,b,c,d,f,g){g==null&&(g="en");f==null&&(f="Zyyy");d==null&&(d=4);c==null&&(c=12);a==null&&(a="");this.__hbFontSize=-1;this.letterSpacing=0;this.set_text(a);this.set_font(b);this.set_size(c);this.__direction=d;this.__script=
f;this.__language=g;this.positions=[];this.__dirty=!0;this.__create(this.__direction,this.__script,this.__language)};t["openfl.text._internal.TextLayout"]=Qf;Qf.__name__="openfl.text._internal.TextLayout";Qf.prototype={autoHint:null,font:null,glyphs:null,letterSpacing:null,positions:null,size:null,text:null,__buffer:null,__direction:null,__dirty:null,__handle:null,__language:null,__script:null,__font:null,__hbBuffer:null,__hbFont:null,__hbFontSize:null,__create:function(a,b,c){c.length==4&&(this.__hbBuffer=
jA._new(),Xz._new(c))},__position:function(){this.positions=[]},get_positions:function(){this.__dirty&&(this.__dirty=!1,this.__position());return this.positions},get_direction:function(){return this.__direction},set_direction:function(a){if(a==this.__direction)return a;this.__direction=a;this.__dirty=!0;return a},set_font:function(a){if(a==this.font)return a;this.font=a;this.__dirty=!0;return a},get_glyphs:function(){for(var a=[],b=0,c=this.get_positions();b<c.length;){var d=c[b];++b;a.push(d.glyph)}return a},
get_language:function(){return this.__language},set_language:function(a){if(a==this.__language)return a;this.__language=a;this.__dirty=!0;return a},get_script:function(){return this.__script},set_script:function(a){if(a==this.__script)return a;this.__script=a;this.__dirty=!0;return a},set_size:function(a){if(a==this.size)return a;this.size=a;this.__dirty=!0;return a},set_text:function(a){if(a==this.text)return a;this.text=a;this.__dirty=!0;return a},__class__:Qf,__properties__:{set_text:"set_text",
set_size:"set_size",set_script:"set_script",get_script:"get_script",get_positions:"get_positions",set_language:"set_language",get_language:"get_language",get_glyphs:"get_glyphs",set_font:"set_font",set_direction:"set_direction",get_direction:"get_direction"}};var Hv=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};t["openfl.text._internal.TextLayoutGroup"]=Hv;Hv.__name__="openfl.text._internal.TextLayoutGroup";Hv.prototype={ascent:null,descent:null,endIndex:null,format:null,height:null,
leading:null,lineIndex:null,offsetX:null,offsetY:null,positions:null,startIndex:null,width:null,getAdvance:function(a){return this.positions[a]},__class__:Hv};var Tc=function(){qa.call(this);Tc.__instances.push(this)};t["openfl.ui.GameInput"]=Tc;Tc.__name__="openfl.ui.GameInput";Tc.getDeviceAt=function(a){return a>=0&&a<Tc.__deviceList.length?Tc.__deviceList[a]:null};Tc.__getDevice=function(a){if(a==null)return null;if(Tc.__devices.h.__keys__[a.__id__]==null){var b=new Iv(a.__jsGamepad.id,a.__jsGamepad.id);
Tc.__deviceList.push(b);Tc.__devices.set(a,b);Tc.numDevices=Tc.__deviceList.length}return Tc.__devices.h[a.__id__]};Tc.__onGamepadAxisMove=function(a,b,c){a=Tc.__getDevice(a);if(a!=null&&a.enabled){if(!a.__axis.h.hasOwnProperty(b)){if(b==null)var d="null";else switch(b){case 0:d="LEFT_X";break;case 1:d="LEFT_Y";break;case 2:d="RIGHT_X";break;case 3:d="RIGHT_Y";break;case 4:d="TRIGGER_LEFT";break;case 5:d="TRIGGER_RIGHT";break;default:d="UNKNOWN ("+b+")"}d=new $i(a,"AXIS_"+d,-1,1);a.__axis.h[b]=d;
a.__controls.push(d)}d=a.__axis.h[b];d.value=c;d.dispatchEvent(new pa("change"))}};Tc.__onGamepadButtonDown=function(a,b){a=Tc.__getDevice(a);if(a!=null&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(b==null)var c="null";else switch(b){case 0:c="A";break;case 1:c="B";break;case 2:c="X";break;case 3:c="Y";break;case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c="LEFT_SHOULDER";break;case 10:c="RIGHT_SHOULDER";break;
case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";break;default:c="UNKNOWN ("+b+")"}c=new $i(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=a.__button.h[b];c.value=1;c.dispatchEvent(new pa("change"))}};Tc.__onGamepadButtonUp=function(a,b){a=Tc.__getDevice(a);if(a!=null&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(b==null)var c="null";else switch(b){case 0:c="A";break;case 1:c="B";break;case 2:c="X";break;case 3:c="Y";break;
case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c="LEFT_SHOULDER";break;case 10:c="RIGHT_SHOULDER";break;case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";break;default:c="UNKNOWN ("+b+")"}c=new $i(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=a.__button.h[b];c.value=0;c.dispatchEvent(new pa("change"))}};Tc.__onGamepadConnect=function(a){a=Tc.__getDevice(a);
if(a!=null)for(var b=0,c=Tc.__instances;b<c.length;){var d=c[b];++b;d.dispatchEvent(new Jk("deviceAdded",!0,!1,a))}};Tc.__onGamepadDisconnect=function(a){var b=Tc.__devices.h[a.__id__];if(b!=null){Tc.__devices.h.__keys__[a.__id__]!=null&&(V.remove(Tc.__deviceList,Tc.__devices.h[a.__id__]),Tc.__devices.remove(a));Tc.numDevices=Tc.__deviceList.length;a=0;for(var c=Tc.__instances;a<c.length;){var d=c[a];++a;d.dispatchEvent(new Jk("deviceRemoved",!0,!1,b))}}};Tc.__super__=qa;Tc.prototype=I(qa.prototype,
{addEventListener:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);qa.prototype.addEventListener.call(this,a,b,c,d,f);if(a=="deviceAdded")for(a=0,b=Tc.__deviceList;a<b.length;)c=b[a],++a,this.dispatchEvent(new Jk("deviceAdded",!0,!1,c))},__class__:Tc});var $i=function(a,b,c,d,f){f==null&&(f=0);qa.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=f};t["openfl.ui.GameInputControl"]=$i;$i.__name__="openfl.ui.GameInputControl";$i.__super__=qa;$i.prototype=
I(qa.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:$i});var Iv=function(a,b){this.__controls=[];this.__button=new Od;this.__axis=new Od;this.id=a;this.name=b;a=new $i(this,"AXIS_0",-1,1);this.__axis.h[0]=a;this.__controls.push(a);a=new $i(this,"AXIS_1",-1,1);this.__axis.h[1]=a;this.__controls.push(a);a=new $i(this,"AXIS_2",-1,1);this.__axis.h[2]=a;this.__controls.push(a);a=new $i(this,"AXIS_3",-1,1);this.__axis.h[3]=a;this.__controls.push(a);a=new $i(this,"AXIS_4",
-1,1);this.__axis.h[4]=a;this.__controls.push(a);a=new $i(this,"AXIS_5",-1,1);this.__axis.h[5]=a;this.__controls.push(a);for(b=0;b<15;){var c=b++;a=new $i(this,"BUTTON_"+c,0,1);this.__button.h[c]=a;this.__controls.push(a)}};t["openfl.ui.GameInputDevice"]=Iv;Iv.__name__="openfl.ui.GameInputDevice";Iv.prototype={enabled:null,id:null,name:null,sampleInterval:null,__axis:null,__button:null,__controls:null,__gamepad:null,getCachedSamples:function(a,b){return 0},getControlAt:function(a){return a>=0&&a<
this.__controls.length?this.__controls[a]:null},startCachingSamples:function(a,b){},stopCachingSamples:function(){},get_numControls:function(){return this.__controls.length},__class__:Iv,__properties__:{get_numControls:"get_numControls"}};var Bb=function(){};t["openfl.ui.Keyboard"]=Bb;Bb.__name__="openfl.ui.Keyboard";Bb.isAccessible=function(){return!1};Bb.__convertKeyCode=function(a){switch(a){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;case 33:return 49;
case 34:return 222;case 35:return 51;case 36:return 52;case 37:return 53;case 38:return 55;case 39:return 222;case 40:return 57;case 41:return 48;case 42:return 56;case 44:return 188;case 45:return 189;case 46:return 190;case 47:return 191;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 58:return 186;case 59:return 186;case 60:return 60;case 61:return 187;case 62:return 190;
case 63:return 191;case 64:return 50;case 91:return 219;case 92:return 220;case 93:return 221;case 94:return 54;case 95:return 189;case 96:return 192;case 97:return 65;case 98:return 66;case 99:return 67;case 100:return 68;case 101:return 69;case 102:return 70;case 103:return 71;case 104:return 72;case 105:return 73;case 106:return 74;case 107:return 75;case 108:return 76;case 109:return 77;case 110:return 78;case 111:return 79;case 112:return 80;case 113:return 81;case 114:return 82;case 115:return 83;
case 116:return 84;case 117:return 85;case 118:return 86;case 119:return 87;case 120:return 88;case 121:return 89;case 122:return 90;case 127:return 46;case 1073741881:return 20;case 1073741882:return 112;case 1073741883:return 113;case 1073741884:return 114;case 1073741885:return 115;case 1073741886:return 116;case 1073741887:return 117;case 1073741888:return 118;case 1073741889:return 119;case 1073741890:return 120;case 1073741891:return 121;case 1073741892:return 122;case 1073741893:return 123;
case 1073741894:return 301;case 1073741895:return 145;case 1073741896:return 19;case 1073741897:return 45;case 1073741898:return 36;case 1073741899:return 33;case 1073741901:return 35;case 1073741902:return 34;case 1073741903:return 39;case 1073741904:return 37;case 1073741905:return 40;case 1073741906:return 38;case 1073741907:return 144;case 1073741908:return 111;case 1073741909:return 106;case 1073741910:return 109;case 1073741911:return 107;case 1073741912:return 13;case 1073741913:return 97;
case 1073741914:return 98;case 1073741915:return 99;case 1073741916:return 100;case 1073741917:return 101;case 1073741918:return 102;case 1073741919:return 103;case 1073741920:return 104;case 1073741921:return 105;case 1073741922:return 96;case 1073741923:return 110;case 1073741925:return 302;case 1073741928:return 124;case 1073741929:return 125;case 1073741930:return 126;case 1073741982:return 13;case 1073742044:return 110;case 1073742048:return 17;case 1073742049:return 16;case 1073742050:return 18;
case 1073742051:return 15;case 1073742052:return 17;case 1073742053:return 16;case 1073742054:return 18;case 1073742055:return 15;default:return a}};Bb.__getCharCode=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);var d=b;a>=65&&a<=90&&(d=b!=c);if(d){switch(a){case 48:return 41;case 49:return 33;case 50:return 64;case 51:return 35;case 52:return 36;case 53:return 37;case 54:return 94;case 55:return 38;case 56:return 42;case 57:return 40;case 186:return 58;case 187:return 43;case 188:return 60;case 189:return 95;
case 190:return 62;case 191:return 63;case 192:return 126;case 219:return 123;case 220:return 124;case 221:return 125;case 222:return 34}if(a>=65&&a<=90)return a-65+65}else{switch(a){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39}if(a>=48&&a<=57)return a-
48+48;if(a>=65&&a<=90)return a-65+97}if(a>=96&&a<=105)return a-96+48;switch(a){case 8:return 8;case 13:return 13;case 46:return 127;case 106:return 42;case 107:return 43;case 108:return 44;case 110:return 45;case 111:return 46}return 0};Bb.__getKeyLocation=function(a){switch(a){case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:return 3;
case 1073742048:case 1073742049:case 1073742050:case 1073742051:return 1;case 1073742052:case 1073742053:case 1073742054:case 1073742055:return 2;default:return 0}};var xd=function(){};t["openfl.ui.Mouse"]=xd;xd.__name__="openfl.ui.Mouse";xd.__properties__={set_cursor:"set_cursor",get_cursor:"get_cursor"};xd.hide=function(){xd.__hidden=!0;for(var a=0,b=Na.current.__windows;a<b.length;){var c=b[a];++a;c.set_cursor(null)}};xd.show=function(){xd.__hidden=!1;var a=xd.__cursor;xd.__cursor=null;xd.set_cursor(a)};
xd.get_cursor=function(){return xd.__cursor};xd.set_cursor=function(a){a==null&&(a="auto");var b=null;switch(a){case "arrow":b=id.ARROW;break;case "button":b=id.POINTER;break;case "crosshair":b=id.CROSSHAIR;break;case "custom":b=id.CUSTOM;break;case "hand":b=id.MOVE;break;case "ibeam":b=id.TEXT;break;case "resize_nesw":b=id.RESIZE_NESW;break;case "resize_ns":b=id.RESIZE_NS;break;case "resize_nwse":b=id.RESIZE_NWSE;break;case "resize_we":b=id.RESIZE_WE;break;case "wait":b=id.WAIT;break;case "waitarrow":b=
id.WAIT_ARROW}if(b!=null&&!xd.__hidden)for(var c=0,d=Na.current.__windows;c<d.length;){var f=d[c];++c;f.set_cursor(b)}return xd.__cursor=a};var ch={fromLimeCursor:function(a){switch(a._hx_index){case 0:return"arrow";case 1:return"crosshair";case 2:return"auto";case 3:return"hand";case 4:return"button";case 5:return"resize_nesw";case 6:return"resize_ns";case 7:return"resize_nwse";case 8:return"resize_we";case 9:return"ibeam";case 10:return"wait";case 11:return"waitarrow";case 12:return"custom"}},toLimeCursor:function(a){switch(a){case "arrow":return id.ARROW;
case "auto":return id.DEFAULT;case "button":return id.POINTER;case "crosshair":return id.CROSSHAIR;case "custom":return id.CUSTOM;case "hand":return id.MOVE;case "ibeam":return id.TEXT;case "resize_nesw":return id.RESIZE_NESW;case "resize_ns":return id.RESIZE_NS;case "resize_nwse":return id.RESIZE_NWSE;case "resize_we":return id.RESIZE_WE;case "wait":return id.WAIT;case "waitarrow":return id.WAIT_ARROW;default:return id.DEFAULT}}},Io=function(){};t["openfl.ui.Multitouch"]=Io;Io.__name__="openfl.ui.Multitouch";
Io.__properties__={get_supportsTouchEvents:"get_supportsTouchEvents"};Io.get_supportsTouchEvents=function(){return"ontouchstart"in document.documentElement||window.DocumentTouch&&document instanceof DocumentTouch?!0:!1};var va=function(a){a==null&&(a=!1);this.debugEnabled=!1;this.debugEnabled=a;va.initialized||va.init()};t["openfl.utils.AGALMiniAssembler"]=va;va.__name__="openfl.utils.AGALMiniAssembler";va.init=function(){va.initialized=!0;var a=va.OPMAP,b=new kd("mov",2,0,0);a.h.mov=b;a=va.OPMAP;
b=new kd("add",3,1,0);a.h.add=b;a=va.OPMAP;b=new kd("sub",3,2,0);a.h.sub=b;a=va.OPMAP;b=new kd("mul",3,3,0);a.h.mul=b;a=va.OPMAP;b=new kd("div",3,4,0);a.h.div=b;a=va.OPMAP;b=new kd("rcp",2,5,0);a.h.rcp=b;a=va.OPMAP;b=new kd("min",3,6,0);a.h.min=b;a=va.OPMAP;b=new kd("max",3,7,0);a.h.max=b;a=va.OPMAP;b=new kd("frc",2,8,0);a.h.frc=b;a=va.OPMAP;b=new kd("sqt",2,9,0);a.h.sqt=b;a=va.OPMAP;b=new kd("rsq",2,10,0);a.h.rsq=b;a=va.OPMAP;b=new kd("pow",3,11,0);a.h.pow=b;a=va.OPMAP;b=new kd("log",2,12,0);a.h.log=
b;a=va.OPMAP;b=new kd("exp",2,13,0);a.h.exp=b;a=va.OPMAP;b=new kd("nrm",2,14,0);a.h.nrm=b;a=va.OPMAP;b=new kd("sin",2,15,0);a.h.sin=b;a=va.OPMAP;b=new kd("cos",2,16,0);a.h.cos=b;a=va.OPMAP;b=new kd("crs",3,17,0);a.h.crs=b;a=va.OPMAP;b=new kd("dp3",3,18,0);a.h.dp3=b;a=va.OPMAP;b=new kd("dp4",3,19,0);a.h.dp4=b;a=va.OPMAP;b=new kd("abs",2,20,0);a.h.abs=b;a=va.OPMAP;b=new kd("neg",2,21,0);a.h.neg=b;a=va.OPMAP;b=new kd("sat",2,22,0);a.h.sat=b;a=va.OPMAP;b=new kd("m33",3,23,16);a.h.m33=b;a=va.OPMAP;b=new kd("m44",
3,24,16);a.h.m44=b;a=va.OPMAP;b=new kd("m34",3,25,16);a.h.m34=b;a=va.OPMAP;b=new kd("ddx",2,26,288);a.h.ddx=b;a=va.OPMAP;b=new kd("ddy",2,27,288);a.h.ddy=b;a=va.OPMAP;b=new kd("ife",2,28,897);a.h.ife=b;a=va.OPMAP;b=new kd("ine",2,29,897);a.h.ine=b;a=va.OPMAP;b=new kd("ifg",2,30,897);a.h.ifg=b;a=va.OPMAP;b=new kd("ifl",2,31,897);a.h.ifl=b;a=va.OPMAP;b=new kd("els",0,32,1921);a.h.els=b;a=va.OPMAP;b=new kd("eif",0,33,1409);a.h.eif=b;a=va.OPMAP;b=new kd("kil",1,39,160);a.h.kil=b;a=va.OPMAP;b=new kd("tex",
3,40,40);a.h.tex=b;a=va.OPMAP;b=new kd("sge",3,41,0);a.h.sge=b;a=va.OPMAP;b=new kd("slt",3,42,0);a.h.slt=b;a=va.OPMAP;b=new kd("sgn",2,43,0);a.h.sgn=b;a=va.OPMAP;b=new kd("seq",3,44,0);a.h.seq=b;a=va.OPMAP;b=new kd("sne",3,45,0);a.h.sne=b;a=va.SAMPLEMAP;b=new Be("rgba",8,0);a.h.rgba=b;a=va.SAMPLEMAP;b=new Be("compressed",8,1);a.h.compressed=b;a=va.SAMPLEMAP;b=new Be("compressedalpha",8,2);a.h.compressedalpha=b;a=va.SAMPLEMAP;b=new Be("dxt1",8,1);a.h.dxt1=b;a=va.SAMPLEMAP;b=new Be("dxt5",8,2);a.h.dxt5=
b;a=va.SAMPLEMAP;b=new Be("video",8,3);a.h.video=b;a=va.SAMPLEMAP;b=new Be("2d",12,0);a.h["2d"]=b;a=va.SAMPLEMAP;b=new Be("3d",12,2);a.h["3d"]=b;a=va.SAMPLEMAP;b=new Be("cube",12,1);a.h.cube=b;a=va.SAMPLEMAP;b=new Be("mipnearest",24,1);a.h.mipnearest=b;a=va.SAMPLEMAP;b=new Be("miplinear",24,2);a.h.miplinear=b;a=va.SAMPLEMAP;b=new Be("mipnone",24,0);a.h.mipnone=b;a=va.SAMPLEMAP;b=new Be("nomip",24,0);a.h.nomip=b;a=va.SAMPLEMAP;b=new Be("nearest",28,0);a.h.nearest=b;a=va.SAMPLEMAP;b=new Be("linear",
28,1);a.h.linear=b;a=va.SAMPLEMAP;b=new Be("anisotropic2x",28,2);a.h.anisotropic2x=b;a=va.SAMPLEMAP;b=new Be("anisotropic4x",28,3);a.h.anisotropic4x=b;a=va.SAMPLEMAP;b=new Be("anisotropic8x",28,4);a.h.anisotropic8x=b;a=va.SAMPLEMAP;b=new Be("anisotropic16x",28,5);a.h.anisotropic16x=b;a=va.SAMPLEMAP;b=new Be("centroid",16,1);a.h.centroid=b;a=va.SAMPLEMAP;b=new Be("single",16,2);a.h.single=b;a=va.SAMPLEMAP;b=new Be("ignoresampler",16,4);a.h.ignoresampler=b;a=va.SAMPLEMAP;b=new Be("repeat",20,1);a.h.repeat=
b;a=va.SAMPLEMAP;b=new Be("wrap",20,1);a.h.wrap=b;a=va.SAMPLEMAP;b=new Be("clamp",20,0);a.h.clamp=b;a=va.SAMPLEMAP;b=new Be("clamp_u_repeat_v",20,2);a.h.clamp_u_repeat_v=b;a=va.SAMPLEMAP;b=new Be("repeat_u_clamp_v",20,3);a.h.repeat_u_clamp_v=b};va.prototype={agalcode:null,error:null,verbose:null,debugEnabled:null,assemble2:function(a,b,c,d){c=this.assemble("vertex",c,b);b=this.assemble("fragment",d,b);a=a.createProgram();a.upload(c,b);return a},assemble:function(a,b,c,d){d==null&&(d=!1);c==null&&
(c=1);var f=Pa.getTimer();this.agalcode=new Xc(0);this.error="";var g=!1;a=="fragment"?g=!0:a!="vertex"&&(this.error='ERROR: mode needs to be "fragment" or "vertex" but is "'+a+'".');this.agalcode.__endian=1;this.agalcode.writeByte(160);this.agalcode.writeUnsignedInt(c);this.agalcode.writeByte(161);this.agalcode.writeByte(g?1:0);this.initregmap(c,d);a=N.replace(b,"\r","\n").split("\n");b=0;d=a.length;for(var h=new Wa("<.*>","g"),n=new Wa("([\\w\\.\\-\\+]+)","gi"),l=new Wa("^\\w{3}","ig"),q=new Wa("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?",
"gi"),u=new Wa("\\[.*\\]","ig"),v=new Wa("^\\b[A-Za-z]{1,3}","ig"),z=new Wa("\\d+",""),r=new Wa("(\\.[xyzw]{1,4})",""),F=new Wa("[A-Za-z]{1,3}","ig"),J=new Wa("(\\.[xyzw]{1,1})",""),L=new Wa("\\+\\d{1,3}","ig"),Q=0;Q<d&&this.error=="";){var W=N.trim(a[Q]),ka=W.indexOf("//");ka!=-1&&(W=V.substr(W,0,ka));var ha=h.match(W)?h.matchedPos().pos:-1;ka=null;ha!=-1&&(ka=this.match(V.substr(W,ha,null),n),W=V.substr(W,0,ha));var ta=null;l.match(W)&&(ha=l.matched(0),ta=va.OPMAP.h[ha]);if(ta==null)W.length>=3&&
Vb.warn("warning: bad line "+Q+": "+a[Q],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else if(this.debugEnabled&&Vb.info(ta,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:272,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),ta==null)W.length>=3&&Vb.warn("warning: bad line "+Q+": "+a[Q],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});else{W=V.substr(W,W.indexOf(ta.name)+ta.name.length,null);if((ta.flags&256)!=0&&c<2){this.error="error: opcode requires version 2.";break}if((ta.flags&64)!=0&&g){this.error="error: opcode is only allowed in vertex programs.";break}if((ta.flags&32)!=0&&!g){this.error="error: opcode is only allowed in fragment programs.";break}this.verbose&&Vb.info("emit opcode="+H.string(ta),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});this.agalcode.writeUnsignedInt(ta.emitCode);++b;if(b>4096){this.error="error: too many opcodes. maximum is 4096.";break}var za=this.match(W,q);if(za.length!=ta.numRegister){this.error="error: wrong number of operands. found "+za.length+" but expected "+ta.numRegister+".";break}var eb=!1,db=160;W=0;for(ha=za.length;W<ha;){var Ra=W++,vb=!1,bb=this.match(za[Ra],u);bb.length>0&&(za[Ra]=N.replace(za[Ra],bb[0],"0"),this.verbose&&Vb.info("IS REL",{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),vb=!0);var Tb=this.match(za[Ra],v);if(Tb.length==0){this.error="error: could not parse operand "+Ra+" ("+za[Ra]+").";eb=!0;break}var Eb=va.REGMAP.h[Tb[0]];this.debugEnabled&&Vb.info(Eb,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(Eb==null){this.error="error: could not find register name for operand "+Ra+" ("+za[Ra]+").";eb=!0;break}if(g){if((Eb.flags&
32)==0){this.error="error: register operand "+Ra+" ("+za[Ra]+") only allowed in vertex programs.";eb=!0;break}if(vb){this.error="error: register operand "+Ra+" ("+za[Ra]+") relative adressing not allowed in fragment programs.";eb=!0;break}}else if((Eb.flags&64)==0){this.error="error: register operand "+Ra+" ("+za[Ra]+") only allowed in fragment programs.";eb=!0;break}za[Ra]=V.substr(za[Ra],za[Ra].indexOf(Eb.name)+Eb.name.length,null);var Lb=vb?this.match(bb[0],z):this.match(za[Ra],z);Tb=0;Lb.length>
0&&(Tb=H.parseInt(Lb[0]));if(sb.gt(Tb,Eb.range)){W=Eb.range+1;this.error="error: register operand "+Ra+" ("+za[Ra]+") index exceeds limit of "+(W==null?"null":H.string(sb.toFloat(W)))+".";eb=!0;break}var vc=this.match(za[Ra],r),zd=Ra==0&&(ta.flags&128)==0,Qb=Ra==2&&(ta.flags&8)!=0,wd=0,Ae=0,bg=0;if(zd&&vb){this.error="error: relative can not be destination";eb=!0;break}if(vc.length>0){for(var Df=Lb=0,Sg=vc[0].length,Nf=1;Nf<Sg;)Df=V.cca(vc[0],Nf)-120,sb.gt(Df,2)&&(Df=3),Lb=zd?Lb|1<<Df:Lb|Df<<(Nf-
1<<1),++Nf;if(!zd)for(;Nf<=4;)Lb|=Df<<(Nf-1<<1),++Nf}else Lb=zd?15:228;if(vb){vc=this.match(bb[0],F);wd=va.REGMAP.h[vc[0]];if(wd==null){this.error="error: bad index register";eb=!0;break}wd=wd.emitCode;Df=this.match(bb[0],J);if(Df.length==0){this.error="error: bad index register select";eb=!0;break}Ae=V.cca(Df[0],1)-120;sb.gt(Ae,2)&&(Ae=3);bb=this.match(bb[0],L);bb.length>0&&(bg=H.parseInt(bb[0]));if(bg<0||bg>255){this.error="error: index offset "+bg+" out of bounds. [0..255]";eb=!0;break}this.verbose&&
Vb.info("RELATIVE: type="+wd+"=="+vc[0]+" sel="+(Ae==null?"null":H.string(sb.toFloat(Ae)))+"=="+Df[0]+" idx="+(Tb==null?"null":H.string(sb.toFloat(Tb)))+" offset="+bg,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Vb.info("  emit argcode="+H.string(Eb)+"["+(Tb==null?"null":H.string(sb.toFloat(Tb)))+"]["+Lb+"]",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:525,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});if(zd)this.agalcode.writeShort(Tb),this.agalcode.writeByte(Lb),this.agalcode.writeByte(Eb.emitCode),db-=32;else{if(Qb){this.verbose&&Vb.info("  emit sampler",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});Ra=5;bb=vb=0;for(Eb=ka==null?0:ka.length;bb<Eb;)Lb=bb++,this.verbose&&Vb.info("    opt: "+ka[Lb],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:552,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"}),zd=va.SAMPLEMAP.h[ka[Lb]],zd==null?(vb=parseFloat(ka[Lb]),this.verbose&&Vb.info("    bias: "+vb,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:565,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})):(zd.flag!=16&&(Ra&=~(15<<zd.flag)),Ra|=zd.mask<<zd.flag);this.agalcode.writeShort(Tb);this.agalcode.writeByte(vb*8|0);this.agalcode.writeByte(0);this.agalcode.writeUnsignedInt(Ra);this.verbose&&Vb.info("    bits: "+(Ra-5),{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:586,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}else Ra==0&&(this.agalcode.writeUnsignedInt(0),db-=32),this.agalcode.writeShort(Tb),this.agalcode.writeByte(bg),this.agalcode.writeByte(Lb),this.agalcode.writeByte(Eb.emitCode),this.agalcode.writeByte(wd),this.agalcode.writeShort(vb?Ae|32768:0);db-=64}}for(W=0;W<db;)this.agalcode.writeByte(0),W+=8;if(eb)break}++Q}this.error!=""&&(this.error+="\n  at line "+Q+" "+a[Q],mc.set_length(this.agalcode,0),Vb.info(this.error,
{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:631,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}));if(this.debugEnabled){c="generated bytecode:";g=mc.get_length(this.agalcode);W=0;for(ha=g;W<ha;)g=W++,g%16==0&&(c+="\n"),g%4==0&&(c+=" "),g=N.hex(this.agalcode.b[g],2),g.length<2&&(g="0"+g),c+=g;Vb.info(c,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:662,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Vb.info("AGALMiniAssembler.assemble time: "+
(Pa.getTimer()-f)/1E3+"s",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:667,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});return this.agalcode},initregmap:function(a,b){var c=va.REGMAP,d=new Ei("va","vertex attribute",0,b?1024:a==1||a==2?7:15,66);c.h.va=d;c=va.REGMAP;d=new Ei("vc","vertex constant",1,b?1024:a==1?127:249,66);c.h.vc=d;c=va.REGMAP;d=new Ei("vt","vertex temporary",2,b?1024:a==1?7:25,67);c.h.vt=d;c=va.REGMAP;d=new Ei("vo","vertex output",3,b?1024:0,65);
c.h.vo=d;c=va.REGMAP;d=new Ei("vi","varying",4,b?1024:a==1?7:9,99);c.h.vi=d;c=va.REGMAP;d=new Ei("fc","fragment constant",1,b?1024:a==1?27:a==2?63:199,34);c.h.fc=d;c=va.REGMAP;d=new Ei("ft","fragment temporary",2,b?1024:a==1?7:25,35);c.h.ft=d;c=va.REGMAP;d=new Ei("fs","texture sampler",5,b?1024:7,34);c.h.fs=d;c=va.REGMAP;d=new Ei("fo","fragment output",3,b?1024:a==1?0:3,33);c.h.fo=d;c=va.REGMAP;d=new Ei("fd","fragment depth output",6,b?1024:a==1?-1:0,33);c.h.fd=d;c=va.REGMAP;d=new Ei("iid","instance id",
7,b?1024:0,66);c.h.iid=d;d=va.REGMAP.h.vo;va.REGMAP.h.op=d;d=va.REGMAP.h.vi;va.REGMAP.h.i=d;d=va.REGMAP.h.vi;va.REGMAP.h.v=d;d=va.REGMAP.h.fo;va.REGMAP.h.oc=d;d=va.REGMAP.h.fd;va.REGMAP.h.od=d;d=va.REGMAP.h.vi;va.REGMAP.h.fi=d},match:function(a,b){for(var c=[],d=0;b.matchSub(a,d);)d=b.matched(0),c.push(d),d=b.matchedPos().pos+d.length;return c},__class__:va};var kd=function(a,b,c,d){this.name=a;this.numRegister=b;this.emitCode=c;this.flags=d};t["openfl.utils._AGALMiniAssembler.OpCode"]=kd;kd.__name__=
"openfl.utils._AGALMiniAssembler.OpCode";kd.prototype={emitCode:null,flags:null,name:null,numRegister:null,toString:function(){return'[OpCode name="'+this.name+'", numRegister='+this.numRegister+", emitCode="+this.emitCode+", flags="+this.flags+"]"},__class__:kd};var Ei=function(a,b,c,d,f){this.name=a;this.longName=b;this.emitCode=c;this.range=d;this.flags=f};t["openfl.utils._AGALMiniAssembler.Register"]=Ei;Ei.__name__="openfl.utils._AGALMiniAssembler.Register";Ei.prototype={emitCode:null,name:null,
longName:null,flags:null,range:null,toString:function(){return'[Register name="'+this.name+'", longName="'+this.longName+'", emitCode='+(this.emitCode==null?"null":H.string(sb.toFloat(this.emitCode)))+", range="+(this.range==null?"null":H.string(sb.toFloat(this.range)))+", flags="+(this.flags==null?"null":H.string(sb.toFloat(this.flags)))+"]"},__class__:Ei};var Be=function(a,b,c){this.name=a;this.flag=b;this.mask=c};t["openfl.utils._AGALMiniAssembler.Sampler"]=Be;Be.__name__="openfl.utils._AGALMiniAssembler.Sampler";
Be.prototype={flag:null,mask:null,name:null,toString:function(){return'[Sampler name="'+this.name+'", flag="'+(this.flag==null?"null":H.string(sb.toFloat(this.flag)))+'", mask='+(this.mask==null?"null":H.string(sb.toFloat(this.mask)))+"]"},__class__:Be};var Jv=function(){};t["openfl.utils.IAssetCache"]=Jv;Jv.__name__="openfl.utils.IAssetCache";Jv.__isInterface__=!0;Jv.prototype={get_enabled:null,set_enabled:null,clear:null,getBitmapData:null,getFont:null,getSound:null,hasBitmapData:null,hasFont:null,
hasSound:null,removeBitmapData:null,removeFont:null,removeSound:null,setBitmapData:null,setFont:null,setSound:null,__class__:Jv,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Kv=function(){this.__enabled=!0;this.bitmapData=new G;this.font=new G;this.sound=new G};t["openfl.utils.AssetCache"]=Kv;Kv.__name__="openfl.utils.AssetCache";Kv.__interfaces__=[Jv];Kv.prototype={bitmapData:null,font:null,sound:null,__enabled:null,clear:function(a){if(a==null)this.bitmapData=new G,this.font=
new G,this.sound=new G;else{var b=this.bitmapData.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];N.startsWith(f,a)&&this.removeBitmapData(f)}b=this.font.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],N.startsWith(f,a)&&this.removeFont(f);b=this.sound.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],N.startsWith(f,a)&&this.removeSound(f)}},getBitmapData:function(a){return this.bitmapData.h[a]},getFont:function(a){return this.font.h[a]},getSound:function(a){return this.sound.h[a]},
hasBitmapData:function(a){return Object.prototype.hasOwnProperty.call(this.bitmapData.h,a)},hasFont:function(a){return Object.prototype.hasOwnProperty.call(this.font.h,a)},hasSound:function(a){return Object.prototype.hasOwnProperty.call(this.sound.h,a)},removeBitmapData:function(a){var b=mb.cache.image;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.bitmapData;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},removeFont:function(a){var b=mb.cache.font;Object.prototype.hasOwnProperty.call(b.h,
a)&&delete b.h[a];b=this.font;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},removeSound:function(a){var b=mb.cache.audio;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.sound;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},setBitmapData:function(a,b){this.bitmapData.h[a]=b},setFont:function(a,b){this.font.h[a]=b},setSound:function(a,b){this.sound.h[a]=b},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=
a},__class__:Kv,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Bf=function(){ed.call(this)};t["openfl.utils.AssetLibrary"]=Bf;Bf.__name__="openfl.utils.AssetLibrary";Bf.fromBundle=function(a){a=ed.fromBundle(a);if(a!=null){if(a instanceof Bf)return a;var b=new Bf;b.__proxy=a;return b}return null};Bf.fromBytes=function(a,b){return Bf.fromManifest(xe.fromBytes(mc.toLimeBytes(a),b))};Bf.fromFile=function(a,b){return Bf.fromManifest(xe.fromFile(a,b))};Bf.fromManifest=function(a){a=
ed.fromManifest(a);if(a!=null){if(a instanceof Bf)return a;var b=new Bf;b.__proxy=a;return b}return null};Bf.loadFromBytes=function(a,b){return xe.loadFromBytes(mc.toLimeBytes(a),b).then(function(c){return Bf.loadFromManifest(c)})};Bf.loadFromFile=function(a,b){return xe.loadFromFile(a,b).then(function(c){return Bf.loadFromManifest(c)})};Bf.loadFromManifest=function(a){a=Bf.fromManifest(a);return a!=null?a.load().then(function(b){return Hc.withValue(b)}):Hc.withError("Could not load asset manifest")};
Bf.__super__=ed;Bf.prototype=I(ed.prototype,{__proxy:null,bind:function(a,b){return!1},exists:function(a,b){return this.__proxy!=null?this.__proxy.exists(a,b):ed.prototype.exists.call(this,a,b)},getAsset:function(a,b){return this.__proxy!=null?this.__proxy.getAsset(a,b):ed.prototype.getAsset.call(this,a,b)},getAudioBuffer:function(a){return this.__proxy!=null?this.__proxy.getAudioBuffer(a):ed.prototype.getAudioBuffer.call(this,a)},getBytes:function(a){return this.__proxy!=null?this.__proxy.getBytes(a):
ed.prototype.getBytes.call(this,a)},getFont:function(a){return this.__proxy!=null?this.__proxy.getFont(a):ed.prototype.getFont.call(this,a)},getImage:function(a){return this.__proxy!=null?this.__proxy.getImage(a):ed.prototype.getImage.call(this,a)},getMovieClip:function(a){return null},getPath:function(a){return this.__proxy!=null?this.__proxy.getPath(a):ed.prototype.getPath.call(this,a)},getText:function(a){return this.__proxy!=null?this.__proxy.getText(a):ed.prototype.getText.call(this,a)},isLocal:function(a,
b){return this.__proxy!=null?this.__proxy.isLocal(a,b):ed.prototype.isLocal.call(this,a,b)},list:function(a){return this.__proxy!=null?this.__proxy.list(a):ed.prototype.list.call(this,a)},loadAsset:function(a,b){return this.__proxy!=null?this.__proxy.loadAsset(a,b):ed.prototype.loadAsset.call(this,a,b)},load:function(){return this.__proxy!=null?this.__proxy.load():ed.prototype.load.call(this)},loadAudioBuffer:function(a){return this.__proxy!=null?this.__proxy.loadAudioBuffer(a):ed.prototype.loadAudioBuffer.call(this,
a)},loadBytes:function(a){return this.__proxy!=null?this.__proxy.loadBytes(a):ed.prototype.loadBytes.call(this,a)},loadFont:function(a){return this.__proxy!=null?this.__proxy.loadFont(a):ed.prototype.loadFont.call(this,a)},loadImage:function(a){return this.__proxy!=null?this.__proxy.loadImage(a):ed.prototype.loadImage.call(this,a)},loadMovieClip:function(a){return Hc.withValue(this.getMovieClip(a))},loadText:function(a){return this.__proxy!=null?this.__proxy.loadText(a):ed.prototype.loadText.call(this,
a)},unload:function(){this.__proxy!=null?this.__proxy.unload():ed.prototype.unload.call(this)},__class__:Bf});var Z=function(){};t["openfl.utils.Assets"]=Z;Z.__name__="openfl.utils.Assets";Z.addEventListener=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);mb.onChange.has(Z.LimeAssets_onChange)||mb.onChange.add(Z.LimeAssets_onChange);Z.dispatcher.addEventListener(a,b,c,d,f)};Z.dispatchEvent=function(a){return Z.dispatcher.dispatchEvent(a)};Z.exists=function(a,b){return mb.exists(a,
b)};Z.getBitmapData=function(a,b){b==null&&(b=!0);if(b&&Z.cache.get_enabled()&&Z.cache.hasBitmapData(a)){var c=Z.cache.getBitmapData(a);if(Z.isValidBitmapData(c))return c}c=mb.getImage(a,!1);return c!=null?(c=Dc.fromImage(c),c.__asset=!0,b&&Z.cache.get_enabled()&&Z.cache.setBitmapData(a,c),c):null};Z.getBytes=function(a){return mc.fromLimeBytes(mb.getBytes(a))};Z.getFont=function(a,b){b==null&&(b=!0);if(b&&Z.cache.get_enabled()&&Z.cache.hasFont(a))return Z.cache.getFont(a);var c=mb.getFont(a,!1);
if(c!=null){var d=new me;d.__fromLimeFont(c);b&&Z.cache.get_enabled()&&Z.cache.setFont(a,d);return d}return new me};Z.getLibrary=function(a){return mb.getLibrary(a)};Z.getMovieClip=function(a){var b=a.substring(0,a.indexOf(":")),c=V.substr(a,a.indexOf(":")+1,null),d=Z.getLibrary(b);if(d!=null){if(d instanceof Bf&&d.exists(c,"MOVIE_CLIP")){if(d.isLocal(c,"MOVIE_CLIP"))return d.getMovieClip(c);Vb.error('MovieClip asset "'+a+'" exists, but only asynchronously',{fileName:"openfl/utils/Assets.hx",lineNumber:261,
className:"openfl.utils.Assets",methodName:"getMovieClip"});return null}Vb.error('There is no MovieClip asset with an ID of "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:267,className:"openfl.utils.Assets",methodName:"getMovieClip"})}else Vb.error('There is no asset library named "'+b+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:271,className:"openfl.utils.Assets",methodName:"getMovieClip"});return null};Z.getMusic=function(a,b){b==null&&(b=!0);return Z.getSound(a,b)};Z.getPath=function(a){return mb.getPath(a)};
Z.getSound=function(a,b){b==null&&(b=!0);if(b&&Z.cache.get_enabled()&&Z.cache.hasSound(a)){var c=Z.cache.getSound(a);if(Z.isValidSound(c))return c}c=mb.getAudioBuffer(a,!1);return c!=null?(c=pe.fromAudioBuffer(c),b&&Z.cache.get_enabled()&&Z.cache.setSound(a,c),c):null};Z.getText=function(a){return mb.getText(a)};Z.hasEventListener=function(a){return Z.dispatcher.hasEventListener(a)};Z.hasLibrary=function(a){return mb.hasLibrary(a)};Z.initBinding=function(a,b){if(Object.prototype.hasOwnProperty.call(Z.libraryBindings.h,
a)){var c=Z.libraryBindings.h[a];b==null?Da.__constructor=function(d){d.__bind(c,a)}:(Da.__constructor=null,b.__bind(c,a))}else Vb.warn('No asset is registered as "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:434,className:"openfl.utils.Assets",methodName:"initBinding"})};Z.isLocal=function(a,b,c){c==null&&(c=!0);if(c&&Z.cache.get_enabled()&&((b=="IMAGE"||b==null)&&Z.cache.hasBitmapData(a)||(b=="FONT"||b==null)&&Z.cache.hasFont(a)||(b=="SOUND"||b=="MUSIC"||b==null)&&Z.cache.hasSound(a)))return!0;
c=a.substring(0,a.indexOf(":"));a=V.substr(a,a.indexOf(":")+1,null);c=Z.getLibrary(c);return c!=null?c.isLocal(a,b):!1};Z.isValidBitmapData=function(a){return a!=null&&a.image!=null};Z.isValidSound=function(a){return!0};Z.list=function(a){return mb.list(a)};Z.loadBitmapData=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new Mf;if(b&&Z.cache.get_enabled()&&Z.cache.hasBitmapData(a)){var d=Z.cache.getBitmapData(a);if(Z.isValidBitmapData(d))return c.complete(d),c.future}mb.loadImage(a,!1).onComplete(function(f){f!=
null?(f=Dc.fromImage(f),f.__asset=!0,b&&Z.cache.get_enabled()&&Z.cache.setBitmapData(a,f),c.complete(f)):c.error('[Assets] Could not load Image "'+a+'"')}).onError(m(c,c.error)).onProgress(m(c,c.progress));return c.future};Z.loadBytes=function(a){var b=new Mf;a=mb.loadBytes(a);a.onComplete(function(c){b.complete(mc.fromLimeBytes(c))});a.onProgress(function(c,d){b.progress(c,d)});a.onError(function(c){b.error(c)});return b.future};Z.loadFont=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new Mf;
if(b&&Z.cache.get_enabled()&&Z.cache.hasFont(a))return c.complete(Z.cache.getFont(a)),c.future;mb.loadFont(a).onComplete(function(d){var f=new me;f.__fromLimeFont(d);b&&Z.cache.get_enabled()&&Z.cache.setFont(a,f);c.complete(f)}).onError(m(c,c.error)).onProgress(m(c,c.progress));return c.future};Z.loadLibrary=function(a){return mb.loadLibrary(a).then(function(b){var c=null;b!=null&&(b instanceof Bf?c=b:(c=mb.libraries,Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a],c=new Bf,c.__proxy=b,
mb.registerLibrary(a,c)));return Hc.withValue(c)})};Z.loadMusic=function(a,b){b==null&&(b=!0);b==null&&(b=!0);return new Hc(function(){return Z.getMusic(a,b)})};Z.loadMovieClip=function(a){var b=new Mf,c=a.substring(0,a.indexOf(":")),d=V.substr(a,a.indexOf(":")+1,null),f=Z.getLibrary(c);if(f!=null){if(f instanceof Bf&&f.exists(d,"MOVIE_CLIP"))return b.completeWith(f.loadMovieClip(d)),b.future;b.error('[Assets] There is no MovieClip asset with an ID of "'+a+'"')}else b.error('[Assets] There is no asset library named "'+
c+'"');return b.future};Z.loadSound=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new Mf;mb.loadAudioBuffer(a,b).onComplete(function(d){d!=null?(d=pe.fromAudioBuffer(d),b&&Z.cache.get_enabled()&&Z.cache.setSound(a,d),c.complete(d)):c.error('[Assets] Could not load Sound "'+a+'"')}).onError(m(c,c.error)).onProgress(m(c,c.progress));return c.future};Z.loadText=function(a){return mb.loadText(a)};Z.registerBinding=function(a,b){Z.libraryBindings.h[a]=b};Z.registerLibrary=function(a,b){mb.registerLibrary(a,
b)};Z.removeEventListener=function(a,b,c){c==null&&(c=!1);Z.dispatcher.removeEventListener(a,b,c)};Z.resolveClass=function(a){return t[a]};Z.resolveEnum=function(a){return R[a]};Z.unloadLibrary=function(a){mb.unloadLibrary(a)};Z.unregisterBinding=function(a,b){Object.prototype.hasOwnProperty.call(Z.libraryBindings.h,a)&&Z.libraryBindings.h[a]==b&&(b=Z.libraryBindings,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a])};Z.LimeAssets_onChange=function(){Z.dispatchEvent(new pa("change"))};var mc=
{__properties__:{set_position:"set_position",get_position:"get_position",set_length:"set_length",get_length:"get_length",get_bytesAvailable:"get_bytesAvailable",set_defaultObjectEncoding:"set_defaultObjectEncoding",get_defaultObjectEncoding:"get_defaultObjectEncoding",set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"},_new:function(a){a==null&&(a=0);return new Xc(a)},clear:function(a){a.clear()},compress:function(a,b){a.compress(b)},deflate:function(a){a.deflate()},fromArrayBuffer:function(a){return a==
null?null:Xc.fromBytes(Oa.ofData(a))},fromBytes:function(a){return a==null?null:a instanceof Xc?a:Xc.fromBytes(a)},fromBytesData:function(a){return a==null?null:Xc.fromBytes(Oa.ofData(a))},fromFile:function(a){return mc.fromLimeBytes(rg.fromFile(a))},fromLimeBytes:function(a){return mc.fromBytes(a)},get:function(a,b){return a.b[b]},inflate:function(a){a.inflate()},loadFromBytes:function(a){return rg.loadFromBytes(a).then(function(b){b=mc.fromLimeBytes(b);return Hc.withValue(b)})},loadFromFile:function(a){return rg.loadFromFile(a).then(function(b){b=
mc.fromLimeBytes(b);return Hc.withValue(b)})},readBoolean:function(a){return a.readBoolean()},readByte:function(a){return a.readByte()},readBytes:function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);a.readBytes(b,c,d)},readDouble:function(a){return a.readDouble()},readFloat:function(a){return a.readFloat()},readInt:function(a){return a.readInt()},readInt64:function(a){return a.readInt64()},readMultiByte:function(a,b,c){return a.readMultiByte(b,c)},readObject:function(a){return a.readObject()},readShort:function(a){return a.readShort()},
readUTF:function(a){return a.readUTF()},readUTFBytes:function(a,b){return a.readUTFBytes(b)},readUnsignedByte:function(a){return a.readUnsignedByte()},readUnsignedInt:function(a){return a.readUnsignedInt()},readUnsignedShort:function(a){return a.readUnsignedShort()},set:function(a,b,c){a.__resize(b+1);return a.b[b]=c},toArrayBuffer:function(a){return a.b.bufferValue},toBytePointer:function(a){kA.set(mc.__bytePointer,a,null,null,a.position);return mc.__bytePointer},toBytes:function(a){return a},toBytesData:function(a){return a.b.bufferValue},
toLimeBytes:function(a){return a},toString:function(a){return a.toString()},uncompress:function(a,b){a.uncompress(b)},writeBoolean:function(a,b){a.writeBoolean(b)},writeByte:function(a,b){a.writeByte(b)},writeBytes:function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);a.writeBytes(b,c,d)},writeDouble:function(a,b){a.writeDouble(b)},writeFloat:function(a,b){a.writeFloat(b)},writeInt:function(a,b){a.writeInt(b)},writeInt64:function(a,b){a.writeInt64(b)},writeMultiByte:function(a,b,c){a.writeMultiByte(b,c)},
writeObject:function(a,b){a.writeObject(b)},writeShort:function(a,b){a.writeShort(b)},writeUTF:function(a,b){a.writeUTF(b)},writeUTFBytes:function(a,b){a.writeUTFBytes(b)},writeUnsignedInt:function(a,b){a.writeUnsignedInt(b)},get_bytesAvailable:function(a){return a.length-a.position},get_defaultEndian:function(){Xc.__defaultEndian==null&&(Rb.get_endianness()==qk.LITTLE_ENDIAN?Xc.__defaultEndian=1:Xc.__defaultEndian=0);return Xc.__defaultEndian},set_defaultEndian:function(a){return Xc.__defaultEndian=
a},get_defaultObjectEncoding:function(){return Xc.defaultObjectEncoding},set_defaultObjectEncoding:function(a){return Xc.defaultObjectEncoding=a},get_endian:function(a){return a.__endian},set_endian:function(a,b){return a.__endian=b},get_length:function(a){return a==null?0:a.length},set_length:function(a,b){b>=0&&(a.__resize(b),b<a.position&&(a.position=b));return a.length=b},get_objectEncoding:function(a){return a.objectEncoding},set_objectEncoding:function(a,b){return a.objectEncoding=b},get_position:function(a){return a.position},
set_position:function(a,b){return a.position=b}},Lv=function(){};t["openfl.utils.IDataOutput"]=Lv;Lv.__name__="openfl.utils.IDataOutput";Lv.__isInterface__=!0;Lv.prototype={get_endian:null,set_endian:null,objectEncoding:null,writeBoolean:null,writeByte:null,writeBytes:null,writeDouble:null,writeFloat:null,writeInt:null,writeMultiByte:null,writeObject:null,writeShort:null,writeUnsignedInt:null,writeUTF:null,writeUTFBytes:null,__class__:Lv,__properties__:{set_endian:"set_endian",get_endian:"get_endian"}};
var Qq=function(){};t["openfl.utils.IDataInput"]=Qq;Qq.__name__="openfl.utils.IDataInput";Qq.__isInterface__=!0;Qq.prototype={get_bytesAvailable:null,get_endian:null,set_endian:null,objectEncoding:null,readBoolean:null,readByte:null,readBytes:null,readDouble:null,readFloat:null,readInt:null,readMultiByte:null,readObject:null,readShort:null,readUnsignedByte:null,readUnsignedInt:null,readUnsignedShort:null,readUTF:null,readUTFBytes:null,__class__:Qq,__properties__:{set_endian:"set_endian",get_endian:"get_endian",
get_bytesAvailable:"get_bytesAvailable"}};var Xc=function(a){a==null&&(a=0);var b=new Oa(new ArrayBuffer(a));Oa.call(this,b.b.buffer);this.__allocated=a;Xc.__defaultEndian==null&&(Rb.get_endianness()==qk.LITTLE_ENDIAN?Xc.__defaultEndian=1:Xc.__defaultEndian=0);this.__endian=Xc.__defaultEndian;this.objectEncoding=Xc.defaultObjectEncoding;this.position=0};t["openfl.utils.ByteArrayData"]=Xc;Xc.__name__="openfl.utils.ByteArrayData";Xc.__interfaces__=[Lv,Qq];Xc.__properties__={set_defaultEndian:"set_defaultEndian",
get_defaultEndian:"get_defaultEndian"};Xc.fromBytes=function(a){var b=new Xc;b.__fromBytes(a);return b};Xc.get_defaultEndian=function(){Xc.__defaultEndian==null&&(Rb.get_endianness()==qk.LITTLE_ENDIAN?Xc.__defaultEndian=1:Xc.__defaultEndian=0);return Xc.__defaultEndian};Xc.set_defaultEndian=function(a){return Xc.__defaultEndian=a};Xc.__super__=Oa;Xc.prototype=I(Oa.prototype,{objectEncoding:null,position:null,__endian:null,__allocated:null,__amf3Reader:null,clear:function(){this.position=this.length=
0},compress:function(a){a==null&&(a=2);if(this.__allocated>this.length){var b=this.length;this.length=this.__allocated;var c=new Oa(new ArrayBuffer(b));c.blit(0,this,0,b);this.b=c.b;this.__allocated=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=rg.compress(this,tk.DEFLATE);break;case 1:a=rg.compress(this,tk.LZMA);break;default:a=rg.compress(this,tk.ZLIB)}a!=null&&(this.b=a.b,this.__allocated=a.length,this.data=a.data,this.position=this.length=this.__allocated)},deflate:function(){this.compress(0)},
inflate:function(){this.uncompress(0)},readBoolean:function(){if(this.position<this.length)return this.b[this.position++]!=0;throw new Ik;},readByte:function(){var a=this.readUnsignedByte();return(a&128)!=0?a-256:a},readBytes:function(a,b,c){c==null&&(c=0);b==null&&(b=0);c==0&&(c=this.length-this.position);if(this.position+c>this.length)throw new Ik;a.length<b+c&&a.__resize(b+c);a.blit(b,this,this.position,c);this.position+=c},readDouble:function(){if(this.__endian==1){if(this.position+8>this.length)throw new Ik;
this.position+=8;return this.getDouble(this.position-8)}var a=this.readInt(),b=this.readInt();return qf.i64ToDouble(b,a)},readFloat:function(){if(this.__endian==1){if(this.position+4>this.length)throw new Ik;this.position+=4;return this.getFloat(this.position-4)}return qf.i32ToFloat(this.readInt())},readInt:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),d=this.readUnsignedByte();return this.__endian==1?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readInt64:function(){if(this.position+
8>this.length)throw new Ik;if(this.__endian==1){var a=this.readUnsignedInt();var b=this.readUnsignedInt()}else b=this.readUnsignedInt(),a=this.readUnsignedInt();return new Hb(b,a)},readMultiByte:function(a,b){return this.readUTFBytes(a)},readObject:function(){switch(this.objectEncoding){case 0:var a=new ao(this,this.position),b=new Mv(a);b=hi.unwrapValue(b.read());this.position=a.pos;return b;case 3:return a=new ao(this,this.position),b=new Nv(a,this.__amf3Reader),b=Ec.decode(b.read()),this.position=
a.pos,b;case 10:return b=this.readUTF(),Pg.run(b);case 11:return b=this.readLargeUTF(),Pg.run(b);case 12:return b=this.readUTF(),(new En(b)).doParse();case 13:return b=this.readLargeUTF(),(new En(b)).doParse();default:return null}},readShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte();a=this.__endian==1?b<<8|a:a<<8|b;return(a&32768)!=0?a-65536:a},readUnsignedByte:function(){if(this.position<this.length)return this.b[this.position++];throw new Ik;},readUnsignedInt:function(){var a=
this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),d=this.readUnsignedByte();return this.__endian==1?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readUnsignedShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte();return this.__endian==1?(b<<8)+a:a<<8|b},readUTF:function(){var a=this.readUnsignedShort();return this.readUTFBytes(a)},readLargeUTF:function(){var a=this.readUnsignedInt();return this.readUTFBytes(a)},readUTFBytes:function(a){if(this.position+a>this.length)throw new Ik;
this.position+=a;return this.getString(this.position-a,a)},uncompress:function(a){a==null&&(a=2);if(this.__allocated>this.length){var b=this.length;this.length=this.__allocated;var c=new Oa(new ArrayBuffer(b));c.blit(0,this,0,b);this.b=c.b;this.__allocated=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=rg.decompress(this,tk.DEFLATE);break;case 1:a=rg.decompress(this,tk.LZMA);break;default:a=rg.decompress(this,tk.ZLIB)}a!=null&&(this.b=a.b,this.__allocated=a.length,this.data=a.data,this.length=
this.__allocated);this.position=0},writeBoolean:function(a){this.writeByte(a?1:0)},writeByte:function(a){this.__resize(this.position+1);this.b[this.position++]=a&255},writeBytes:function(a,b,c){c==null&&(c=0);b==null&&(b=0);mc.get_length(a)!=0&&(c==0&&(c=mc.get_length(a)-b),this.__resize(this.position+c),this.blit(this.position,a,b,c),this.position+=c)},writeDouble:function(a){a=qf.doubleToI64(a);this.__endian==1?(this.writeInt(a.low),this.writeInt(a.high)):(this.writeInt(a.high),this.writeInt(a.low))},
writeFloat:function(a){this.__endian==1?(this.__resize(this.position+4),this.setFloat(this.position,a),this.position+=4):(a=qf.floatToI32(a),this.writeInt(a))},writeInt:function(a){this.__resize(this.position+4);this.__endian==1?(this.b[this.position++]=a&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a>>16&255,this.b[this.position++]=a>>24&255):(this.b[this.position++]=a>>24&255,this.b[this.position++]=a>>16&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a&255)},writeInt64:function(a){this.__endian==
1?(this.writeUnsignedInt(a.low),this.writeUnsignedInt(a.high)):(this.writeUnsignedInt(a.high),this.writeUnsignedInt(a.low))},writeMultiByte:function(a,b){this.writeUTFBytes(a)},writeObject:function(a){switch(this.objectEncoding){case 0:a=hi.encode(a);var b=new $p,c=new Hy(b);c.write(a);this.writeBytes(mc.fromBytes(b.getBytes()));break;case 3:b=new $p;c=new Iy(b);a instanceof Xc?c.write(Qc.AByteArray(a)):(a=Ec.encode(a),c.write(a));this.writeBytes(mc.fromBytes(b.getBytes()));break;case 10:a=Bg.run(a);
this.writeUTF(a);break;case 11:a=Bg.run(a);this.writeLargeUTF(a);break;case 12:a=yg.print(a,null,null);this.writeUTF(a);break;case 13:a=yg.print(a,null,null),this.writeLargeUTF(a)}},writeShort:function(a){this.__resize(this.position+2);this.__endian==1?(this.b[this.position++]=a,this.b[this.position++]=a>>8):(this.b[this.position++]=a>>8,this.b[this.position++]=a)},writeUnsignedInt:function(a){this.writeInt(a)},writeUTF:function(a){a=Oa.ofString(a);if(a.length>65535)throw new we("Length is out of range");
this.writeShort(a.length);this.writeBytes(mc.fromBytes(a))},writeLargeUTF:function(a){a=Oa.ofString(a);this.writeUnsignedInt(a.length);this.writeBytes(mc.fromBytes(a))},writeUTFBytes:function(a){a=Oa.ofString(a);this.writeBytes(mc.fromBytes(a))},__fromBytes:function(a){this.b=a.b;this.__allocated=a.length;this.data=a.data;this.length=a.length},__resize:function(a){if(a>this.__allocated){var b=new Oa(new ArrayBuffer((a+1)*3>>1));if(this.__allocated>0){var c=this.length;this.length=this.__allocated;
b.blit(0,this,0,this.__allocated);this.length=c}this.b=b.b;this.__allocated=b.length;this.data=b.data}this.length<a&&(this.length=a)},__setData:function(a){this.b=a.b;this.__allocated=a.length;this.data=a.data},get_bytesAvailable:function(){return this.length-this.position},get_endian:function(){return this.__endian},set_endian:function(a){return this.__endian=a},get___length:function(){return this.length},set___length:function(a){return this.length=a},__class__:Xc,__properties__:{set___length:"set___length",
get___length:"get___length",set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}});var oo=function(){this.types=new G;this.values=new G};t["openfl.utils._Dictionary.ClassMap"]=oo;oo.__name__="openfl.utils._Dictionary.ClassMap";oo.__interfaces__=[ja];oo.prototype={types:null,values:null,clear:function(){this.types.h=Object.create(null);this.values.h=Object.create(null)},copy:function(){for(var a=new oo,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},
exists:function(a){return Object.prototype.hasOwnProperty.call(this.types.h,a.__name__)},get:function(a){return this.values.h[a.__name__]},keyValueIterator:function(){return new yl(this)},keys:function(){return new Xp(this.types.h)},iterator:function(){return new Xp(this.values.h)},remove:function(a){a=a.__name__;var b=this.types;Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],b=!0):b=!1;if(b)return!0;b=this.values;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},
set:function(a,b){var c=a.__name__;this.types.h[c]=a;this.values.h[c]=b},toString:function(){return G.stringify(this.values.h)},__class__:oo};var mo=function(){this.floatKeys=[];this.values=[]};t["openfl.utils._Dictionary.FloatMap"]=mo;mo.__name__="openfl.utils._Dictionary.FloatMap";mo.__interfaces__=[ja];mo.prototype={floatKeys:null,values:null,clear:function(){this.floatKeys=[];this.values=[]},copy:function(){for(var a=new mo,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},
exists:function(a){return this.indexOf(a)>-1},get:function(a){a=this.indexOf(a);return a>-1?this.values[a]:null},keyValueIterator:function(){return new yl(this)},keys:function(){return new wg(this.floatKeys.slice())},iterator:function(){return new wg(this.values.slice())},remove:function(a){a=this.indexOf(a);return a>-1?(this.floatKeys.splice(a,1),this.values.splice(a,1),!0):!1},set:function(a,b){this.insertSorted(a,b)},indexOf:function(a){var b=this.floatKeys.length,c=0,d=b-1;if(b==0)return-1;for(;c<
d;){b=Math.floor((c+d)/2);if(this.floatKeys[b]==a)return b;this.floatKeys[b]>a?d=b-1:c=b+1}return this.floatKeys[c]==a?c:-1},insertSorted:function(a,b){var c=this.floatKeys.length,d=0,f=c-1;if(c==0)this.floatKeys.push(a),this.values.push(b);else{for(;d<f;){c=Math.floor((d+f)/2);if(this.floatKeys[c]==a){this.values[c]=b;return}this.floatKeys[c]>a?f=c-1:d=c+1}this.floatKeys[d]>a?(this.floatKeys.splice(d,0,a),this.values.splice(d,0,b)):this.floatKeys[d]<a?(this.floatKeys.splice(d+1,0,a),this.values.splice(d+
1,0,b)):this.values[d]=b}},toString:function(){return this.values.toString()},__class__:mo};var no=function(){this.map=new Ta};t["openfl.utils._Dictionary.UtilsObjectMap"]=no;no.__name__="openfl.utils._Dictionary.UtilsObjectMap";no.__interfaces__=[ja];no.prototype={map:null,clear:function(){this.map.h={__keys__:{}}},copy:function(){for(var a=new no,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return this.map.h.__keys__[a.__id__]!=null},get:function(a){return this.map.h[a.__id__]},
keyValueIterator:function(){return new yl(this)},keys:function(){return this.map.keys()},iterator:function(){return this.map.iterator()},remove:function(a){return this.map.remove(a)},set:function(a,b){this.map.set(a,b)},toString:function(){return this.map.toString()},__class__:no};var Mz={fromLimeEndian:function(a){switch(a._hx_index){case 0:return 1;case 1:return 0}},fromString:function(a){switch(a){case "bigEndian":return 0;case "littleEndian":return 1;default:return null}},toLimeEndian:function(a){switch(a){case 0:return qk.BIG_ENDIAN;
case 1:return qk.LITTLE_ENDIAN;default:return null}},toString:function(a){switch(a){case 0:return"bigEndian";case 1:return"littleEndian";default:return null}}},Ke={_new:function(){return{}},hasOwnProperty:function(a,b){return a!=null?Object.prototype.hasOwnProperty.call(a,b):!1},isPrototypeOf:function(a,b){if(a!=null)for(a=w.getClass(a);a!=null;){if(a==b)return!0;a=a.__super__}return!1},iterator:function(a){if(a instanceof Array)return new wg(a);var b=y.fields(a);b==null&&(b=[]);if(a instanceof zb)for(var c=
0,d=a.get_numChildren();c<d;){var f=c++;f=a.getChildAt(f).get_name();f!=null&&b.indexOf(f)==-1&&b.push(f)}return new wg(b)},propertyIsEnumerable:function(a,b){return a!=null&&Object.prototype.hasOwnProperty.call(a,b)?w.__implements(y.field(a,b),Rq):!1},toLocaleString:function(a){return a==null?null:H.string(a)},toString:function(a){return a==null?null:H.string(a)},valueOf:function(a){return a},__fieldRead:function(a,b){return Ke.__get(a,b)},__fieldWrite:function(a,b,c){a!=null&&y.setProperty(a,b,
c);return c},__get:function(a,b){if(a==null||b==null)return null;if(Object.prototype.hasOwnProperty.call(a,b))return y.field(a,b);if(a instanceof zb){var c=a.getChildByName(b);if(c!=null)return c}b=y.getProperty(a,b);y.isFunction(b)&&(b=Function.prototype.bind.call(b,a));return b},__set:function(a,b,c){a!=null&&y.setProperty(a,b,c);return c},__getArray:function(a,b){return a==null?null:w.__cast(a,Array)[b]},__setArray:function(a,b,c){return a==null?c:w.__cast(a,Array)[b]=c},toFunction:function(a){return a},
toFloat:function(a){return typeof a=="number"?a:NaN},toInt:function(a){return a},toBool:function(a){return typeof a=="boolean"?a:typeof a=="number"?a!=0:a!=null},__negate:function(a){return-a},__preIncrement:function(a){return++a},__postIncrement:function(a){return a++},__preDecrement:function(a){return--a},__postDecrement:function(a){return a--},__add:function(a,b){if(typeof a=="string"||typeof b=="string"){if(a==null)a="null";else{var c=a;a=c==null?null:H.string(c)}b==null?b="null":(c=b,b=c==null?
null:H.string(c));return a+b}return a+b},__addString:function(a,b){return(a==null?"null":a==null?null:H.string(a))+b},__addInt:function(a,b){return a+b},__addFloat:function(a,b){return a+b},__sub:function(a,b){return a-b},__subInt:function(a,b){return a-b},__intSub:function(a,b){return a-b},__subFloat:function(a,b){return a-b},__floatSub:function(a,b){return a-b},__mul:function(a,b){return a*b},__mulInt:function(a,b){return a*b},__mulFloat:function(a,b){return a*b},__div:function(a,b){return a/b},
__divInt:function(a,b){return a/b},__intDiv:function(a,b){return a/b},__divFloat:function(a,b){return a/b},__floatDiv:function(a,b){return a/b},__mod:function(a,b){return a%b},__modInt:function(a,b){return a%b},__intMod:function(a,b){return a%b},__modFloat:function(a,b){return a%b},__floatMod:function(a,b){return a%b},__eq:function(a,b){return a==b},__eqDynamic:function(a,b){return a==b},__neq:function(a,b){return a!=b},__neqDynamic:function(a,b){return a!=b},__lt:function(a,b){return a<b},__ltInt:function(a,
b){return a<b},__intLt:function(a,b){return a<b},__ltFloat:function(a,b){return a<b},__floatLt:function(a,b){return a<b},__lte:function(a,b){return a<=b},__lteInt:function(a,b){return Ke.__lte(a,b)},__intLte:function(a,b){return Ke.__lte(a,b)},__lteFloat:function(a,b){return Ke.__lte(a,b)},__floatLte:function(a,b){return Ke.__lte(a,b)},__gt:function(a,b){return a>b},__gtInt:function(a,b){return Ke.__gt(a,b)},__intGt:function(a,b){return a>b},__gtFloat:function(a,b){return Ke.__gt(a,b)},__floatGt:function(a,
b){return a>b},__gte:function(a,b){return a>=b},__gteInt:function(a,b){return Ke.__gte(a,b)},__intGte:function(a,b){return a>=b},__gteFloat:function(a,b){return Ke.__gte(a,b)},__floatGte:function(a,b){return a>=b},__complement:function(a){return~a},__and:function(a,b){return a&b},__andInt:function(a,b){return a&b},__or:function(a,b){return a|b},__orInt:function(a,b){return a|b},__xor:function(a,b){return a^b},__xorInt:function(a,b){return a^b},__shr:function(a,b){return a>>b},__shrInt:function(a,
b){return a>>b},__intShr:function(a,b){return a>>b},__ushr:function(a,b){return a>>>b},__ushrInt:function(a,b){return a>>>b},__intUshr:function(a,b){return a>>>b},__shl:function(a,b){return a<<b},__shlInt:function(a,b){return a<<b},__intShl:function(a,b){return a<<b}},Ov=function(){};t["haxe.lang.Iterator"]=Ov;Ov.__name__="haxe.lang.Iterator";Ov.__isInterface__=!0;Ov.prototype={hasNext:null,next:null,__class__:Ov};var Rq=function(){};t["haxe.lang.Iterable"]=Rq;Rq.__name__="haxe.lang.Iterable";Rq.__isInterface__=
!0;Rq.prototype={iterator:null,__class__:Rq};var iq=function(a,b){b==null&&(b=0);if(isNaN(a)||a<0)throw new Sd("The delay specified is negative or not a finite number");qa.call(this);this.__delay=a;this.__repeatCount=b;this.running=!1;this.currentCount=0};t["openfl.utils.Timer"]=iq;iq.__name__="openfl.utils.Timer";iq.__super__=qa;iq.prototype=I(qa.prototype,{currentCount:null,running:null,__delay:null,__repeatCount:null,__timer:null,__timerID:null,reset:function(){this.running&&this.stop();this.currentCount=
0},start:function(){this.running||(this.running=!0,this.__timerID=window.setInterval(m(this,this.timer_onTimer),this.__delay|0))},stop:function(){this.running=!1;this.__timerID!=null&&(window.clearInterval(this.__timerID),this.__timerID=null)},get_delay:function(){return this.__delay},set_delay:function(a){this.__delay=a;this.running&&(this.stop(),this.start());return this.__delay},get_repeatCount:function(){return this.__repeatCount},set_repeatCount:function(a){this.running&&a!=0&&a<=this.currentCount&&
this.stop();return this.__repeatCount=a},__handleUpdateAfterEvent:function(){Pa.get_current()!=null&&Pa.get_current().stage!=null&&Pa.get_current().stage.__renderAfterEvent()},timer_onTimer:function(){this.currentCount++;if(this.__repeatCount>0&&this.currentCount>=this.__repeatCount){this.stop();var a=new wl("timer");this.dispatchEvent(a);a.__updateAfterEventFlag&&this.__handleUpdateAfterEvent();a=new wl("timerComplete")}else a=new wl("timer");this.dispatchEvent(a);a.__updateAfterEventFlag&&this.__handleUpdateAfterEvent()},
__class__:iq,__properties__:{set_repeatCount:"set_repeatCount",get_repeatCount:"get_repeatCount",set_delay:"set_delay",get_delay:"get_delay"}});var md=function(){};t["openfl.utils._internal.Lib"]=md;md.__name__="openfl.utils._internal.Lib";md.notImplemented=function(a){var b=a.className+"."+a.methodName;Object.prototype.hasOwnProperty.call(md.__sentWarnings.h,b)||(md.__sentWarnings.h[b]=!0,Vb.warn(a.methodName+" is not implemented",a))};var Xm=function(){this.rollOutStack=[]};t["openfl.utils._internal.TouchData"]=
Xm;Xm.__name__="openfl.utils._internal.TouchData";Xm.prototype={rollOutStack:null,touch:null,touchDownTarget:null,touchOverTarget:null,reset:function(){this.touchOverTarget=this.touchDownTarget=this.touch=null;this.rollOutStack.splice(0,this.rollOutStack.length)},__class__:Xm};var Mv=function(a){this.i=a;a.set_bigEndian(!0)};t["openfl.utils._internal.format.amf.AMFReader"]=Mv;Mv.__name__="openfl.utils._internal.format.amf.AMFReader";Mv.prototype={i:null,readObject:function(){for(var a=new G;;){var b=
this.i.readByte(),c=this.i.readByte();b=this.i.readString(b<<8|c);c=this.i.readByte();if(c==9)break;c=this.readWithCode(c);a.h[b]=c}return a},readArray:function(a){for(var b=[],c=0;c<a;)c++,b.push(this.read());return b},readInt:function(){return this.i.readInt32()},readWithCode:function(a){var b=this.i;switch(a){case 0:return Ff.ANumber(b.readDouble());case 1:switch(b.readByte()){case 0:b=!1;break;case 1:b=!0;break;default:throw ba.thrown("Invalid AMF");}return Ff.ABool(b);case 2:return Ff.AString(b.readString(b.readUInt16()));
case 5:return Ff.ANull;case 6:return Ff.AUndefined;case 7:throw ba.thrown("Not supported : Reference");case 3:case 8:return b=a==8?this.i.readInt32():null,Ff.AObject(this.readObject(),b);case 10:return Ff.AArray(this.readArray(this.i.readInt32()));case 11:return a=b.readDouble(),b=b.readUInt16(),Ff.ADate(new Date(a+b*60*1E3));case 12:return Ff.AString(b.readString(this.i.readInt32()));default:throw ba.thrown("Unknown AMF "+a);}},read:function(){return this.readWithCode(this.i.readByte())},__class__:Mv};
var hi=function(){};t["openfl.utils._internal.format.amf.AMFTools"]=hi;hi.__name__="openfl.utils._internal.format.amf.AMFTools";hi.encode=function(a){var b=ab.typeof(a);switch(b._hx_index){case 0:return Ff.ANull;case 1:return Ff.ANumber(a);case 2:return Ff.ANumber(a);case 3:return Ff.ABool(a);case 4:b=new G;for(var c=0,d=y.fields(a);c<d.length;){var f=d[c];++c;var g=hi.encode(y.field(a,f));b.h[f]=g}return Ff.AObject(b);case 6:b=b.c;switch(b){case Array:f=[];for(b=0;b<a.length;)g=a[b],++b,f.push(hi.encode(g));
return Ff.AArray(f);case String:return Ff.AString(a);case G:b=new G;c=Object.keys(a.h);d=c.length;for(var h=0;h<d;)f=c[h++],g=hi.encode(a.h[f]),b.h[f]=g;return Ff.AObject(b);default:throw ba.thrown("Can't encode instance of "+b.__name__);}break;default:throw ba.thrown("Can't encode "+H.string(a));}};hi.number=function(a){return a==null?null:a._hx_index==0?a.f:null};hi.string=function(a){return a==null?null:a._hx_index==2?a.s:null};hi.object=function(a){return a==null?null:a._hx_index==3?a.fields:
null};hi.abool=function(a){return a==null?null:a._hx_index==1?a.b:null};hi.array=function(a){return a==null?null:a._hx_index==7?a.values:null};hi.unwrapValue=function(a){switch(a._hx_index){case 0:return a=a.f;case 1:return a.b;case 2:return a.s;case 3:a=a.fields;var b={};for(var c=Object.keys(a.h),d=c.length,f=0;f<d;){var g=c[f++];b[g]=hi.unwrapValue(a.h[g])}return b;case 4:return a.d;case 5:return null;case 6:return null;case 7:c=a.values;a=hi.unwrapValue;d=Array(c.length);b=0;for(f=c.length;b<
f;)g=b++,d[g]=a(c[g]);return d}};var Ff=R["openfl.utils._internal.format.amf.AMFValue"]={__ename__:"openfl.utils._internal.format.amf.AMFValue",__constructs__:null,ANumber:(B=function(a){return{_hx_index:0,f:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:E}},B._hx_name="ANumber",B.__params__=["f"],B),ABool:(B=function(a){return{_hx_index:1,b:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:E}},B._hx_name="ABool",B.__params__=["b"],B),AString:(B=function(a){return{_hx_index:2,
s:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:E}},B._hx_name="AString",B.__params__=["s"],B),AObject:(B=function(a,b){return{_hx_index:3,fields:a,size:b,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:E}},B._hx_name="AObject",B.__params__=["fields","size"],B),ADate:(B=function(a){return{_hx_index:4,d:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:E}},B._hx_name="ADate",B.__params__=["d"],B),AUndefined:{_hx_name:"AUndefined",_hx_index:5,__enum__:"openfl.utils._internal.format.amf.AMFValue",
toString:E},ANull:{_hx_name:"ANull",_hx_index:6,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:E},AArray:(B=function(a){return{_hx_index:7,values:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:E}},B._hx_name="AArray",B.__params__=["values"],B)};Ff.__constructs__=[Ff.ANumber,Ff.ABool,Ff.AString,Ff.AObject,Ff.ADate,Ff.AUndefined,Ff.ANull,Ff.AArray];var Hy=function(a){this.o=a;a.set_bigEndian(!0)};t["openfl.utils._internal.format.amf.AMFWriter"]=Hy;Hy.__name__="openfl.utils._internal.format.amf.AMFWriter";
Hy.prototype={o:null,write:function(a){var b=this.o;switch(a._hx_index){case 0:var c=a.f;b.writeByte(0);b.writeDouble(c);break;case 1:c=a.b;b.writeByte(1);b.writeByte(c?1:0);break;case 2:c=a.s;c.length<=65535?(b.writeByte(2),b.writeUInt16(c.length)):(b.writeByte(12),b.writeInt32(c.length));b.writeString(c);break;case 3:c=a.fields;a=a.size;a==null?b.writeByte(3):(b.writeByte(8),b.writeInt32(a));for(var d=Object.keys(c.h),f=d.length,g=0;g<f;)a=d[g++],b.writeUInt16(a.length),b.writeString(a),this.write(c.h[a]);
b.writeByte(0);b.writeByte(0);b.writeByte(9);break;case 4:c=a.d;b.writeByte(11);b.writeDouble(c.getTime());b.writeUInt16(0);break;case 5:b.writeByte(6);break;case 6:b.writeByte(5);break;case 7:for(c=a.values,b.writeByte(10),b.writeInt32(c.length),b=0;b<c.length;)a=c[b],++b,this.write(a)}},__class__:Hy};var Pv=function(a,b){this.a=a;this.extra=b};t["openfl.utils._internal.format.amf3.AMF3Array"]=Pv;Pv.__name__="openfl.utils._internal.format.amf3.AMF3Array";Pv.prototype={a:null,extra:null,__class__:Pv};
var Jo=R["openfl.utils._internal.format.amf3.AMF3ObjectHeader"]={__ename__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",__constructs__:null,HReference:(B=function(a){return{_hx_index:0,value:a,__enum__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",toString:E}},B._hx_name="HReference",B.__params__=["value"],B),HTraits:(B=function(a){return{_hx_index:1,traits:a,__enum__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",toString:E}},B._hx_name="HTraits",B.__params__=["traits"],B),
HExternal:(B=function(a){return{_hx_index:2,className:a,__enum__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",toString:E}},B._hx_name="HExternal",B.__params__=["className"],B)};Jo.__constructs__=[Jo.HReference,Jo.HTraits,Jo.HExternal];var Nv=function(a,b){b==null?(this.complexObjectsTable=[],this.objectTraitsTable=[],this.stringTable=[]):(this.complexObjectsTable=b.complexObjectsTable,this.objectTraitsTable=b.objectTraitsTable,this.stringTable=b.stringTable);this.i=a;a.set_bigEndian(!0)};
t["openfl.utils._internal.format.amf3.AMF3Reader"]=Nv;Nv.__name__="openfl.utils._internal.format.amf3.AMF3Reader";Nv.prototype={complexObjectsTable:null,objectTraitsTable:null,stringTable:null,i:null,readObject:function(a){a==null&&(a=this.readObjectHeader());var b=null;switch(a._hx_index){case 0:var c=a.value;return c;case 1:var d=a.traits;a=new G;b=Qc.AObject(a,null,d.className!=null?d.className:null);for(var f=0,g=d.sealedMemberNames.length;f<g;){c=f++;var h=d.sealedMemberNames[c];c=this.read();
a.h[h]=c}if(d.isDynamic)for(;;){d=Ec.decode(this.readString());if(d=="")break;c=this.read();a.h[d]=c}break;case 2:b=Ec.object(Qc.AObject(null,null,a.className)),b!=null&&w.__implements(b,Xn)?(b.readExternal(new Qv(this)),b=Qc.AExternal(b)):b=Qc.ANull}this.complexObjectsTable.push(b);return b},readObjectHeader:function(a){var b=this.readInt();if((b&1)==0)return Jo.HReference(this.complexObjectsTable[b>>1]);if((b&3)==1)return Jo.HTraits(this.objectTraitsTable[b>>2]);if((b&7)==3){var c=[],d=b>>4;a={isExternalizable:!1,
isDynamic:(b>>3&1)==1,className:a!=null?a:Ec.decode(this.readString()),sealedMemberNames:c};for(b=0;b<d;)b++,c.push(Ec.decode(this.readString()));this.objectTraitsTable.push(a);return Jo.HTraits(a)}if((b&7)==7)return Jo.HExternal(a!=null?a:Ec.decode(this.readString()));throw ba.thrown("Invalid object traits");},readMap:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=new cf,c=Qc.AMap(b);this.complexObjectsTable.push(c);this.i.readByte();for(var d=0;d<a;)d++,
b.set(this.read(),this.read());return c},readArray:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=[],c=new G,d=Qc.AArray(b,c);this.complexObjectsTable.push(d);for(var f=Ec.decode(this.readString());f.length!=0;){var g=this.read();c.h[f]=g;f=Ec.decode(this.readString())}for(c=0;c<a;)c++,b.push(this.read());return d},readIntVector:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=this.i.readByte()!=0,c=tb.toIntVector(null,
a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,this.i.readInt32())}a=Qc.AIntVector(c);this.complexObjectsTable.push(a);return a},readFloatVector:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=this.i.readByte()!=0,c=tb.toFloatVector(null,a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,this.i.readDouble())}a=Qc.AFloatVector(c);this.complexObjectsTable.push(a);return a},readObjectVector:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>
1];var b=a>>1;a=this.i.readByte()!=0;var c=Ec.decode(this.readString()),d=tb.toNullVector(null,b);d.fixed=a;var f=Qc.AObjectVector(d,c);this.complexObjectsTable.push(f);a=null;for(var g=0;g<b;){var h=g++,n=this.i.readByte();switch(n){case 1:d.set(h,null);break;case 10:a==null&&(a=this.readObjectHeader(c));d.set(h,this.readObject(a));break;default:De.trace("Unhandled object vector code: 0x"+N.hex(n),{fileName:"openfl/utils/_internal/format/amf3/AMF3Reader.hx",lineNumber:317,className:"openfl.utils._internal.format.amf3.AMF3Reader",
methodName:"readObjectVector"})}}return f},readByteArray:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;for(var b=new Oa(new ArrayBuffer(a)),c=0;c<a;){var d=c++,f=this.i.readByte();b.b[d]=f}b=mc.fromBytes(b);b.__endian=0;b.__amf3Reader=this;b=Qc.AByteArray(b);this.complexObjectsTable.push(b);return b},readInt:function(a,b){b==null&&(b=0);a==null&&(a=!1);var c=this.i.readByte()&255;if(c<128)return c>>b;var d=(c&127)<<7;c=this.i.readByte()&255;if(c<128)return(d|
c)>>b;d=(d|c&127)<<7;c=this.i.readByte()&255;if(c<128)return(d|c)>>b;d=(d|c&127)<<8;c=this.i.readByte()&255;d|=c;a&&(d&268435456)!=0&&(d|=-536870912);return d>>b},readString:function(){var a=this.readInt();return(a&1)==0?this.stringTable[a>>1]:this.readStringNoHeader(a>>1)},readStringNoHeader:function(a){if(a==0)return Qc.AString("");a=Qc.AString(this.i.readString(a,Wp.UTF8));this.stringTable.push(a);return a},readDate:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>
1];a=new Date(this.i.readDouble());a=Qc.ADate(a);this.complexObjectsTable.push(a);return a},readXml:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a=Jb.parse(Ec.decode(this.readStringNoHeader(a>>1)));a=Qc.AXml(a);this.complexObjectsTable.push(a);return a},readWithCode:function(a){var b=this.i;switch(a){case 0:return Qc.AUndefined;case 1:return Qc.ANull;case 2:return Qc.ABool(!1);case 3:return Qc.ABool(!0);case 4:return Qc.AInt(this.readInt(!0));case 5:return Qc.ANumber(b.readDouble());
case 6:return this.readString();case 7:throw ba.thrown("XMLDocument unsupported");case 8:return this.readDate();case 9:return this.readArray();case 10:return this.readObject();case 11:return this.readXml();case 12:return this.readByteArray();case 13:case 14:return this.readIntVector();case 15:return this.readFloatVector();case 16:return this.readObjectVector();case 17:return this.readMap();default:throw ba.thrown("Unknown AMF "+a);}},read:function(){var a=this.i.readByte();return this.readWithCode(a)},
__class__:Nv};var Qv=function(a){this.i=a.i;this.r=a;this.objectEncoding=3};t["openfl.utils._internal.format.amf3.AMF3ReaderInput"]=Qv;Qv.__name__="openfl.utils._internal.format.amf3.AMF3ReaderInput";Qv.__interfaces__=[Qq];Qv.prototype={objectEncoding:null,i:null,r:null,readBoolean:function(){return this.i.readByte()!=0},readByte:function(){return this.i.readByte()},readBytes:function(a,b,c){c==null&&(c=0);b==null&&(b=0);this.i.readBytes(mc.toBytes(a),b,c)},readDouble:function(){return this.i.readDouble()},
readFloat:function(){return this.i.readFloat()},readInt:function(){return this.i.readInt32()},readMultiByte:function(a,b){return this.i.readString(a)},readObject:function(){switch(this.objectEncoding){case 0:var a=new Mv(this.i);return a=hi.unwrapValue(a.read());case 3:return a=new Nv(this.i,this.r),a=Ec.decode(a.read());default:return null}},readShort:function(){return this.i.readInt16()},readUnsignedByte:function(){return this.i.readByte()},readUnsignedInt:function(){var a=this.i.readByte(),b=this.i.readByte(),
c=this.i.readByte(),d=this.i.readByte();return this.get_endian()==1?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readUnsignedShort:function(){var a=this.i.readByte(),b=this.i.readByte();return this.get_endian()==1?(b<<8)+a:a<<8|b},readUTF:function(){var a=this.readUnsignedShort();return this.readUTFBytes(a)},readUTFBytes:function(a){return this.i.readString(a)},get_bytesAvailable:function(){return-1},get_endian:function(){return this.i.bigEndian?0:1},set_endian:function(a){return a},__class__:Qv,__properties__:{set_endian:"set_endian",
get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var Ec=function(){};t["openfl.utils._internal.format.amf3.AMF3Tools"]=Ec;Ec.__name__="openfl.utils._internal.format.amf3.AMF3Tools";Ec.encode=function(a){var b=ab.typeof(a);switch(b._hx_index){case 0:return Qc.ANull;case 1:return Qc.AInt(a);case 2:return Qc.ANumber(a);case 3:return Qc.ABool(a);case 4:for(var c=new G,d=0,f=y.fields(a);d<f.length;){var g=f[d];++d;b=Ec.encode(y.field(a,g));c.h[g]=b}return Qc.AObject(c,null,null);case 5:return Qc.ANull;
case 6:switch(b.c){case Array:g=[];for(b=0;b<a.length;)c=a[b],++b,g.push(Ec.encode(c));return Qc.AArray(g);case Date:return Qc.ADate(a);case String:return Qc.AString(a);case Jb:return Qc.AXml(a);case Od:case Ta:case G:c=new cf;f=Object.keys(a.h);d=f.length;for(b=0;b<d;)g=f[b++],c.set(Ec.encode(g),Ec.encode(a.h[g]));return Qc.AMap(c);case Oa:return Qc.AByteArray(mc.fromBytes(a));case Xc:return Qc.AByteArray(a);case Pv:g=[];f=new G;b=0;for(d=a.a;b<d.length;)c=d[b],++b,g.push(Ec.encode(c));d=c=a.extra.h;
b=Object.keys(c);for(var h=b.length,n=0;n<h;){var l=d[b[n++]];c=Ec.encode(a.extra.h[l]);f.h[l]=c}return Qc.AArray(g,f);default:return w.__implements(a,Xn)?Qc.AExternal(a):Qc.ANull}break;default:throw ba.thrown("Can't encode "+H.string(a));}};Ec.decode=function(a){if(a==null)return null;switch(a._hx_index){case 0:return Ec.undefined(a);case 1:return Ec.anull(a);case 2:return Ec.bool(a);case 3:return Ec.int(a);case 4:return Ec.number(a);case 5:return Ec.string(a);case 6:return Ec.date(a);case 7:return Ec.object(a);
case 8:return Ec.external(a);case 9:return Ec.array(a);case 10:return Ec.intVector(a);case 11:return Ec.floatVector(a);case 12:return Ec.objectVector(a);case 13:return Ec.xml(a);case 14:return Ec.byteArray(a);case 15:return Ec.map(a)}};Ec.undefined=function(a){return null};Ec.anull=function(a){return null};Ec.bool=function(a){return a==null?null:a._hx_index==2?a.b:null};Ec.int=function(a){return a==null?null:a._hx_index==3?a.i:null};Ec.number=function(a){return a==null?null:a._hx_index==4?a.f:null};
Ec.string=function(a){return a==null?null:a._hx_index==5?a.s:null};Ec.date=function(a){return a==null?null:a._hx_index==6?a.d:null};Ec.array=function(a){if(a!=null&&a._hx_index==9){a=a.values;for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(Ec.decode(d))}return b}return null};Ec.intVector=function(a){return a==null?null:a._hx_index==10?a.v:null};Ec.floatVector=function(a){return a==null?null:a._hx_index==11?a.v:null};Ec.objectVector=function(a){if(a!=null&&a._hx_index==12){a=a.v;for(var b=tb.toObjectVector(null,
a.get_length(),a.fixed),c=0,d=a.get_length();c<d;){var f=c++;b.set(f,Ec.decode(a.get(f)))}return b}return null};Ec.object=function(a){if(a!=null&&a._hx_index==7){var b=a.fields,c=a.className;a=null;if(c!=null&&c!=""){var d=Pa.getClassByAlias(c);d==null&&(d=t[c]);d!=null&&(a=ab.createInstance(d,[]))}else a={};if(a!=null&&b!=null){c=Object.keys(b.h);d=c.length;for(var f=0;f<d;){var g=c[f++];y.setProperty(a,g,Ec.decode(b.h[g]))}}return a}return null};Ec.external=function(a){return a==null?null:a._hx_index==
8?a.o:null};Ec.xml=function(a){return a==null?null:a._hx_index==13?a.x:null};Ec.byteArray=function(a){return a==null?null:a._hx_index==14?a.ba:null};Ec.map=function(a){if(a!=null&&a._hx_index==15){a=a.m;for(var b=a.keys();b.hasNext();){b=b.next();if(typeof b=="number"&&(b|0)===b){b=new Od;for(var c=a.keys();c.hasNext();){var d=c.next(),f=Ec.decode(d);d=Ec.decode(a.get(d));b.h[f]=d}}else if(typeof b=="string")for(b=new G,c=a.keys();c.hasNext();)d=c.next(),f=Ec.decode(d),d=Ec.decode(a.get(d)),b.h[f]=
d;else for(b=new Ta,c=a.keys();c.hasNext();)f=c.next(),b.set(Ec.decode(f),Ec.decode(a.get(f)));break}return new Ta}return null};var Qc=R["openfl.utils._internal.format.amf3.AMF3Value"]={__ename__:"openfl.utils._internal.format.amf3.AMF3Value",__constructs__:null,AUndefined:{_hx_name:"AUndefined",_hx_index:0,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E},ANull:{_hx_name:"ANull",_hx_index:1,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E},ABool:(B=function(a){return{_hx_index:2,
b:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="ABool",B.__params__=["b"],B),AInt:(B=function(a){return{_hx_index:3,i:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="AInt",B.__params__=["i"],B),ANumber:(B=function(a){return{_hx_index:4,f:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="ANumber",B.__params__=["f"],B),AString:(B=function(a){return{_hx_index:5,s:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:E}},B._hx_name="AString",B.__params__=["s"],B),ADate:(B=function(a){return{_hx_index:6,d:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="ADate",B.__params__=["d"],B),AObject:(B=function(a,b,c){return{_hx_index:7,fields:a,size:b,className:c,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="AObject",B.__params__=["fields","size","className"],B),AExternal:(B=function(a){return{_hx_index:8,o:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:E}},B._hx_name="AExternal",B.__params__=["o"],B),AArray:(B=function(a,b){return{_hx_index:9,values:a,extra:b,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="AArray",B.__params__=["values","extra"],B),AIntVector:(B=function(a){return{_hx_index:10,v:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="AIntVector",B.__params__=["v"],B),AFloatVector:(B=function(a){return{_hx_index:11,v:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:E}},B._hx_name="AFloatVector",B.__params__=["v"],B),AObjectVector:(B=function(a,b){return{_hx_index:12,v:a,type:b,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="AObjectVector",B.__params__=["v","type"],B),AXml:(B=function(a){return{_hx_index:13,x:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="AXml",B.__params__=["x"],B),AByteArray:(B=function(a){return{_hx_index:14,ba:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:E}},B._hx_name="AByteArray",B.__params__=["ba"],B),AMap:(B=function(a){return{_hx_index:15,m:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:E}},B._hx_name="AMap",B.__params__=["m"],B)};Qc.__constructs__=[Qc.AUndefined,Qc.ANull,Qc.ABool,Qc.AInt,Qc.ANumber,Qc.AString,Qc.ADate,Qc.AObject,Qc.AExternal,Qc.AArray,Qc.AIntVector,Qc.AFloatVector,Qc.AObjectVector,Qc.AXml,Qc.AByteArray,Qc.AMap];var Iy=function(a){this.o=a;a.set_bigEndian(!0)};t["openfl.utils._internal.format.amf3.AMF3Writer"]=
Iy;Iy.__name__="openfl.utils._internal.format.amf3.AMF3Writer";Iy.prototype={o:null,writeInt:function(a){a>268435455||a<-268435456?(this.o.writeByte(5),this.o.writeDouble(a)):(this.o.writeByte(4),this.writeUInt(a))},writeUInt:function(a,b){b==null&&(b=!1);b&&(a=a<<1|1);(a>>>31&1)==1&&(a&=536870911);b=22;var c=!1,d=a>>>b-1;sb.gt(d,0)&&(d>>>=1,this.o.writeByte(d|128),a-=d<<b,++b,c=!0);b-=8;d=a>>>b;if(c||sb.gt(d,0))this.o.writeByte(d|128),a-=d<<b,c=!0;b-=7;d=a>>>b;if(c||sb.gt(d,0))this.o.writeByte(d|
128),a-=d<<b;this.o.writeByte(a)},writeString:function(a){a=Oa.ofString(a,Wp.UTF8);this.writeUInt(a.length,!0);this.o.writeBytes(a,0,a.length)},writeIntVector:function(a){this.writeUInt(a.get_length(),!0);this.o.writeByte(a.fixed?1:0);for(var b=0,c=a.get_length();b<c;){var d=b++;this.o.writeInt32(a.get(d))}},writeFloatVector:function(a){this.writeUInt(a.get_length(),!0);this.o.writeByte(a.fixed?1:0);for(var b=0,c=a.get_length();b<c;){var d=b++;this.o.writeDouble(a.get(d))}},writeObjectVector:function(a,
b){this.writeUInt(a.get_length(),!0);this.o.writeByte(a.fixed?1:0);this.o.writeString(b);b=0;for(var c=a.get_length();b<c;){var d=b++;this.write(a.get(d))}},writeObject:function(a,b,c){b==null?this.o.writeByte(11):this.writeUInt(b<<4|3);this.o.writeByte(1);if(b==null){c=a.h;c=Object.keys(c);for(var d=c.length,f=0;f<d;){var g=c[f++];this.writeString(g);this.write(a.h[g])}this.o.writeByte(1)}else{b=[];c=a.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=c[f++],b.push(g),this.writeString(g);c=0;for(d=b.length;c<
d;)f=c++,this.write(a.h[b[f]])}},writeExternal:function(a){this.writeUInt(7);var b=w.getClass(a),c=null;Pa.__registeredClasses.exists(b)&&(c=Pa.__registeredClasses.get(b));c==null&&(c=b.__name__);this.writeString(c);b=new Xc(0);b.__endian=0;a.writeExternal(b);this.o.writeBytes(mc.toBytes(b),0,mc.get_length(b))},write:function(a){var b=this.o;switch(a._hx_index){case 0:b.writeByte(0);break;case 1:b.writeByte(1);break;case 2:var c=a.b;b.writeByte(c?3:2);break;case 3:this.writeInt(a.i);break;case 4:c=
a.f;b.writeByte(5);b.writeDouble(c);break;case 5:c=a.s;b.writeByte(6);this.writeString(c);break;case 6:c=a.d;b.writeByte(8);b.writeByte(1);b.writeDouble(c.getTime());break;case 7:var d=a.fields;c=a.size;a=a.className;b.writeByte(10);this.writeObject(d,c,a);break;case 8:c=a.o;b.writeByte(10);this.writeExternal(c);break;case 9:c=a.values;a=a.extra;b.writeByte(9);this.writeUInt(c.length,!0);if(a!=null){d=a.h;d=Object.keys(d);for(var f=d.length,g=0;g<f;){var h=d[g++];b.writeString(h);this.write(a.h[h])}}b.writeByte(1);
for(a=0;a<c.length;)b=c[a],++a,this.write(b);break;case 10:c=a.v;b.writeByte(13);this.writeIntVector(c);break;case 11:c=a.v;b.writeByte(15);this.writeFloatVector(c);break;case 12:c=a.v;b.writeByte(16);this.writeObjectVector(c);break;case 13:c=a.x;b.writeByte(11);this.writeString(rn.print(c));break;case 14:c=a.ba;b.writeByte(12);this.writeUInt(mc.get_length(c),!0);b.write(mc.toBytes(c));break;case 15:for(c=a.m,b.writeByte(17),this.writeUInt(ib.count(c),!0),b.writeByte(0),b=c.keys();b.hasNext();)a=
b.next(),this.write(a),this.write(c.get(a))}},__class__:Iy};var Oo=function(){this._useF8=!0;this._varType="string";this._intPos=3;Le.call(this,"original.debug","Debug");this._txFormat=new ef("_sans",10,16777215,null,null,null,null,null,3);this._btFormat=new ef("_sans",9,0,!0,null,null,null,null,0);this._inFormat=new ef("_sans",10,16777215,null,null,null,null,null,3);this._infoArea=new Da;this._infoArea.get_graphics().beginFill(0,.5);this._infoArea.get_graphics().drawRect(0,0,350,110);this._infoArea.get_graphics().endFill();
this._infoArea.set_x(this._infoArea.set_y(10));this._infoText=this.createTxInterface(!0,"",5,5,this._infoArea.get_width()-10,this._infoArea.get_height()-19);this._infoArea.addChild(this._infoText);var a=(this._infoArea.get_width()-40)/7;this._hideBt=this.createBtInterface("hide",m(this,this.onInterfaceHide));this._hideBt.set_x(5);this._hideBt.set_y(this._infoText.get_height()-2);this._hideBt.set_width(a);this._infoArea.addChild(this._hideBt);this._cycleBt=this.createBtInterface("cycle",m(this,this.onInterfaceCycle));
this._cycleBt.set_x(this._hideBt.get_x()+a+5);this._cycleBt.set_y(this._hideBt.get_y());this._cycleBt.set_width(a);this._infoArea.addChild(this._cycleBt);this._movieIBt=this.createBtInterface("movie",m(this,this.onInterfaceMovie));this._movieIBt.set_x(this._cycleBt.get_x()+a+5);this._movieIBt.set_y(this._hideBt.get_y());this._movieIBt.set_width(a);this._infoArea.addChild(this._movieIBt);this._sceneIBt=this.createBtInterface("scene",m(this,this.onInterfaceScene));this._sceneIBt.set_x(this._movieIBt.get_x()+
a+5);this._sceneIBt.set_y(this._hideBt.get_y());this._sceneIBt.set_width(a);this._infoArea.addChild(this._sceneIBt);this._varIBt=this.createBtInterface("vars",m(this,this.onInterfaceVar));this._varIBt.set_x(this._sceneIBt.get_x()+a+5);this._varIBt.set_y(this._hideBt.get_y());this._varIBt.set_width(a);this._infoArea.addChild(this._varIBt);this._actionIBt=this.createBtInterface("action",m(this,this.onInterfaceAction));this._actionIBt.set_x(this._varIBt.get_x()+a+5);this._actionIBt.set_y(this._hideBt.get_y());
this._actionIBt.set_width(a);this._infoArea.addChild(this._actionIBt);this._statsIBt=this.createBtInterface("stats",m(this,this.onInterfaceStats));this._statsIBt.set_x(this._actionIBt.get_x()+a+5);this._statsIBt.set_y(this._hideBt.get_y());this._statsIBt.set_width(a);this._infoArea.addChild(this._statsIBt);this._interfaceMovie=new Da;this._interfaceMovie.get_graphics().beginFill(0,.5);this._interfaceMovie.get_graphics().drawRect(0,0,this._infoArea.get_width(),75);this._interfaceMovie.get_graphics().endFill();
this._interfaceMovie.set_x(0);this._interfaceMovie.set_y(this._infoArea.get_height()+2);this._movieTxt=this.createTxInterface(!0,"<b>New movie load:</b> enter the movie ID",5,5,this._interfaceMovie.get_width()-10,24);this._interfaceMovie.addChild(this._movieTxt);this._movieInput=this.createInputInterface(this._interfaceMovie.get_width()-10);this._movieInput.set_x(5);this._movieInput.set_y(this._movieTxt.get_y()+this._movieTxt.get_height());this._interfaceMovie.addChild(this._movieInput);this._movieBt=
this.createBtInterface("load movie",m(this,this.onLoadMovie));this._movieBt.set_x(5);this._movieBt.set_y(this._movieInput.get_y()+this._movieInput.get_height()+5);this._movieBt.set_width(this._movieInput.get_width());this._interfaceMovie.addChild(this._movieBt);this._interfaceScene=new Da;this._interfaceScene.get_graphics().beginFill(0,.5);this._interfaceScene.get_graphics().drawRect(0,0,this._infoArea.get_width(),75);this._interfaceScene.get_graphics().endFill();this._interfaceScene.set_x(0);this._interfaceScene.set_y(this._infoArea.get_height()+
2);this._sceneTxt=this.createTxInterface(!0,"<b>New scene load:</b> enter the scene ID",5,5,this._interfaceScene.get_width()-10,24);this._interfaceScene.addChild(this._sceneTxt);this._sceneInput=this.createInputInterface(this._interfaceScene.get_width()-10);this._sceneInput.set_x(5);this._sceneInput.set_y(this._sceneTxt.get_y()+this._sceneTxt.get_height());this._interfaceScene.addChild(this._sceneInput);this._sceneBt=this.createBtInterface("load scene",m(this,this.onLoadScene));this._sceneBt.set_x(5);
this._sceneBt.set_y(this._sceneInput.get_y()+this._sceneInput.get_height()+5);this._sceneBt.set_width(this._sceneInput.get_width());this._interfaceScene.addChild(this._sceneBt);this._interfaceVar=new Da;this._interfaceVar.get_graphics().beginFill(0,.5);this._interfaceVar.get_graphics().drawRect(0,0,this._infoArea.get_width(),200);this._interfaceVar.get_graphics().endFill();this._interfaceVar.set_x(0);this._interfaceVar.set_y(this._infoArea.get_height()+2);this._varTxt=this.createTxInterface(!1,"<b>String variables</b>",
5,5,this._interfaceVar.get_width()-10,24);this._varTxt.set_defaultTextFormat(this._txFormat);this._interfaceVar.addChild(this._varTxt);this._varList=this.createTxInterface(!0,"",5,this._varTxt.get_y()+this._varTxt.get_height(),this._varTxt.get_width(),100);this._varList.set_selectable(!0);this._varList.set_type(1);this._varList.set_border(!0);this._varList.set_borderColor(16777215);this._varList.addEventListener("click",m(this,this.onInputClick));this._interfaceVar.addChild(this._varList);this._setvarTxt=
this.createTxInterface(!1,"<b>Set string value (set to empty field to remove it)</b>",5,this._varList.get_y()+this._varList.get_height()+5,this._interfaceVar.get_width()-10,18);this._interfaceVar.addChild(this._setvarTxt);this._setVarName=this.createInputInterface(this._interfaceVar.get_width()/3);this._setVarName.set_x(5);this._setVarName.set_y(this._setvarTxt.get_y()+this._setvarTxt.get_height()+5);this._interfaceVar.addChild(this._setVarName);this._setVarEqual=this.createTxInterface(!1,"=",this._setVarName.get_x()+
this._setVarName.get_width()+5,this._setVarName.get_y(),20,15);this._interfaceVar.addChild(this._setVarEqual);this._setVarValue=this.createInputInterface(this._interfaceVar.get_width()/3);this._setVarValue.set_x(this._setVarEqual.get_x()+this._setVarEqual.get_width()+2);this._setVarValue.set_y(this._setVarName.get_y());this._interfaceVar.addChild(this._setVarValue);this._setVarButton=this.createBtInterface("set",m(this,this.onSetVar));this._setVarButton.set_x(this._interfaceVar.get_width()-this._setVarButton.get_width()-
5);this._setVarButton.set_y(this._setVarName.get_y());this._interfaceVar.addChild(this._setVarButton);this._traceVarButton=this.createBtInterface("trace",m(this,this.onTraceVar));this._traceVarButton.set_x(this._interfaceVar.get_width()-this._traceVarButton.get_width()-5);this._traceVarButton.set_y(this._setVarButton.get_y()+this._setVarButton.get_height()+5);this._interfaceVar.addChild(this._traceVarButton);this._refreshVarButton=this.createBtInterface("refresh",m(this,this.onRefreshVar));this._refreshVarButton.set_x(this._traceVarButton.get_x()-
this._refreshVarButton.get_width()-5);this._refreshVarButton.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._refreshVarButton);this._setVarString=this.createBtInterface("string",m(this,this.onSetString));this._setVarString.set_x(5);this._setVarString.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._setVarString);this._setVarFloat=this.createBtInterface("float",m(this,this.onSetFloat));this._setVarFloat.set_x(this._setVarString.get_x()+this._setVarString.get_width()+
5);this._setVarFloat.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._setVarFloat);this._setVarInt=this.createBtInterface("int",m(this,this.onSetInt));this._setVarInt.set_x(this._setVarFloat.get_x()+this._setVarFloat.get_width()+5);this._setVarInt.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._setVarInt);this._setVarBool=this.createBtInterface("bool",m(this,this.onSetBool));this._setVarBool.set_x(this._setVarInt.get_x()+this._setVarInt.get_width()+5);this._setVarBool.set_y(this._traceVarButton.get_y());
this._interfaceVar.addChild(this._setVarBool);this._intarfaceAction=new Da;this._intarfaceAction.get_graphics().beginFill(0,.5);this._intarfaceAction.get_graphics().drawRect(0,0,this._infoArea.get_width(),200);this._intarfaceAction.get_graphics().endFill();this._intarfaceAction.set_x(0);this._intarfaceAction.set_y(this._infoArea.get_height()+2);this._actionTxt=this.createTxInterface(!0,"<b>Write/paste the action JSON below</b>",5,5,this._intarfaceAction.get_width()-10,24);this._intarfaceAction.addChild(this._actionTxt);
this._actionArea=this.createInputInterface(this._intarfaceAction.get_width()-10);this._actionArea.set_x(5);this._actionArea.set_y(this._actionTxt.get_y()+this._actionTxt.get_height());this._actionArea.set_height(140);this._intarfaceAction.addChild(this._actionArea);this._actionRun=this.createBtInterface("run",m(this,this.onRunAction));this._actionRun.set_x(5);this._actionRun.set_y(this._actionArea.get_y()+this._actionArea.get_height()+5);this._actionRun.set_width(this._actionArea.get_width());this._intarfaceAction.addChild(this._actionRun);
this._fpsHolder=new Da;this._fpsHolder.get_graphics().beginFill(0,.5);this._fpsHolder.get_graphics().drawRect(0,0,65,30);this._fpsHolder.get_graphics().endFill()};t["plugins.DebugPlugin"]=Oo;Oo.__name__="plugins.DebugPlugin";Oo.__super__=Le;Oo.prototype=I(Le.prototype,{_overlay:null,_infoArea:null,_infoText:null,_txFormat:null,_btFormat:null,_inFormat:null,_hideBt:null,_cycleBt:null,_sceneIBt:null,_movieIBt:null,_varIBt:null,_actionIBt:null,_statsIBt:null,_intPos:null,_sceneBt:null,_interfaceScene:null,
_sceneInput:null,_sceneTxt:null,_movieBt:null,_interfaceMovie:null,_movieInput:null,_movieTxt:null,_interfaceVar:null,_varTxt:null,_varList:null,_setvarTxt:null,_varType:null,_setVarName:null,_setVarEqual:null,_setVarValue:null,_setVarButton:null,_refreshVarButton:null,_traceVarButton:null,_setVarString:null,_setVarFloat:null,_setVarInt:null,_setVarBool:null,_intarfaceAction:null,_actionTxt:null,_actionArea:null,_actionRun:null,_fps:null,_fpsHolder:null,_useF8:null,initialize:function(a){Le.prototype.initialize.call(this,
a);this._overlay=this.getOverlay("original.debug");this.setAction("trace",m(this,this.acTrace));this.setAction("trace.strings",m(this,this.acTraceStrings));this.setAction("trace.floats",m(this,this.acTraceFloats));this.setAction("trace.ints",m(this,this.acTraceInts));this.setAction("trace.bools",m(this,this.acTraceBools));this.setAction("trace.vars",m(this,this.acTraceVars));this.setAction("debuginfo.show",m(this,this.acInfoShow));this.setAction("debuginfo.hide",m(this,this.acInfoHide));this.info.addEventListener("movieload",
m(this,this.onMovieLoad));this.info.addEventListener("sceneload",m(this,this.onSceneLoad));this.info.addEventListener("keyframeload",m(this,this.onKeyframeLoad));this.info.addEventListener("displayresize",m(this,this.onDisplayResize));this.addActionGroupDescription({n:"Original Debug",d:"Actions from the original debug plugin.",a:[{n:"Trace",a:"trace",c:!1,d:"Outputs text to the system console.",p:[{n:"Text to output",t:"string",d:"The text to output.",o:!1}]}]});this.addGlobalVarGroupDescription({n:"Original Debug Variables",
v:[{d:"Is the debug area shown?",t:"bool",c:"?_DEBUGDISPLAY"}]})},checkKeyboard:function(a){return this._useF8&&a==119?(this._infoArea.parent==null?(this._overlay.addChild(this._infoArea),this.overlayTop("original.debug")):this._overlay.removeChild(this._infoArea),!0):!1},parseBool:function(a){return a=="?_DEBUGDISPLAY"?{found:!0,value:this._infoArea.parent!=null}:{found:!1,value:!1}},kill:function(){this.info.removeEventListener("movieload",m(this,this.onMovieLoad));this.info.removeEventListener("sceneload",
m(this,this.onSceneLoad));this.info.removeEventListener("keyframeload",m(this,this.onKeyframeLoad));this.info.removeEventListener("displayresize",m(this,this.onDisplayResize));this.acInfoHide([]);this._infoArea.get_graphics().clear();this._infoArea.removeChildren();this._infoText=this._infoArea=null;this.killBtInterface(this._hideBt,m(this,this.onInterfaceHide));this.killBtInterface(this._cycleBt,m(this,this.onInterfaceCycle));this.killBtInterface(this._sceneIBt,m(this,this.onInterfaceScene));this.killBtInterface(this._movieIBt,
m(this,this.onInterfaceMovie));this.killBtInterface(this._varIBt,m(this,this.onInterfaceVar));this.killBtInterface(this._actionIBt,m(this,this.onInterfaceAction));this.killBtInterface(this._statsIBt,m(this,this.onInterfaceStats));this._hideBt=this._cycleBt=this._sceneIBt=this._movieIBt=this._varIBt=this._actionIBt=this._statsIBt=null;this._interfaceMovie.get_graphics().clear();this._interfaceMovie.removeChildren();this._movieTxt=this._interfaceMovie=null;this._movieInput.removeEventListener("click",
m(this,this.onInputClick));this._movieInput=null;this.killBtInterface(this._movieBt,m(this,this.onLoadMovie));this._movieBt=null;this._interfaceScene.get_graphics().clear();this._interfaceScene.removeChildren();this._sceneTxt=this._interfaceScene=null;this._sceneInput.removeEventListener("click",m(this,this.onInputClick));this._sceneInput=null;this.killBtInterface(this._sceneBt,m(this,this.onLoadScene));this._sceneBt=null;this._interfaceVar.get_graphics().clear();this._interfaceVar.removeChildren();
this._varTxt=this._interfaceVar=null;this._varList.removeEventListener("click",m(this,this.onInputClick));this._setvarTxt=this._varList=null;this._setVarName.removeEventListener("click",m(this,this.onInputClick));this._setVarName=null;this._setVarValue.removeEventListener("click",m(this,this.onInputClick));this._setVarEqual=this._setVarValue=null;this.killBtInterface(this._setVarButton,m(this,this.onSetVar));this._setVarButton=null;this.killBtInterface(this._traceVarButton,m(this,this.onTraceVar));
this._traceVarButton=null;this.killBtInterface(this._refreshVarButton,m(this,this.onRefreshVar));this._refreshVarButton=null;this.killBtInterface(this._setVarString,m(this,this.onSetString));this._setVarString=null;this.killBtInterface(this._setVarFloat,m(this,this.onSetFloat));this._setVarFloat=null;this.killBtInterface(this._setVarInt,m(this,this.onSetInt));this._setVarInt=null;this.killBtInterface(this._setVarBool,m(this,this.onSetBool));this._setVarBool=null;this._intarfaceAction.get_graphics().clear();
this._intarfaceAction.removeChildren();this._actionTxt=this._intarfaceAction=null;this._actionArea.removeEventListener("click",m(this,this.onInputClick));this._actionArea=null;this.killBtInterface(this._actionRun,m(this,this.onRunAction));this._txFormat=this._btFormat=this._inFormat=this._actionRun=null;this._fpsHolder.removeChildren();this._fpsHolder.get_graphics().clear();this._fps=this._fpsHolder=null;this.removeOverlay("original.debug");this._overlay=null;Le.prototype.kill.call(this)},getConfig:function(a){a==
null&&(a=!0);a&&(this._useF8=!0);return{usef8:this._useF8}},setConfig:function(a){Object.prototype.hasOwnProperty.call(a,"usef8")&&(this._useF8=!0)},acTrace:function(a){for(var b=0;b<a.length;){var c=a[b];++b;De.trace(this._access.parser.parseString(c),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:642,className:"plugins.DebugPlugin",methodName:"acTrace"})}return!0},acTraceStrings:function(a){De.trace(yg.print({string:this._access.varString},null,null),{fileName:"Source/plugins/DebugPlugin.hx",
lineNumber:652,className:"plugins.DebugPlugin",methodName:"acTraceStrings"});return!0},acTraceFloats:function(a){De.trace(yg.print({float:this._access.varFloat},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:664,className:"plugins.DebugPlugin",methodName:"acTraceFloats"});return!0},acTraceInts:function(a){De.trace(yg.print({int:this._access.varInt},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:676,className:"plugins.DebugPlugin",methodName:"acTraceInts"});return!0},
acTraceBools:function(a){De.trace(yg.print({bool:this._access.varBool},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:688,className:"plugins.DebugPlugin",methodName:"acTraceBools"});return!0},acTraceVars:function(a){De.trace(yg.print({string:this._access.varString,float:this._access.varFloat,int:this._access.varInt,bool:this._access.varBool},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:700,className:"plugins.DebugPlugin",methodName:"acTraceVars"});return!0},acInfoShow:function(a){this._overlay.addChild(this._infoArea);
return!0},acInfoHide:function(a){this._infoArea.parent!=null&&this._overlay.removeChild(this._infoArea);return!0},setInfoText:function(){this._infoText.set_htmlText("<b>Movie:</b> "+this.info.movieName+" ("+this.info.movieId+")<br><b>Scene:</b> "+this.info.sceneName+" ("+this.info.sceneId+")<br><b>Keyframe:</b> "+(this.info.keyframeCurrent+1)+"/"+this.info.keyframeTotal+"<br><b>Asset multiply:</b> "+this.info.displayMultiply+"<br><b>Orientation:</b> "+this.info.orientation+"<br><b>Screen area:</b> ");
if(this.info.orientation=="vertical"){var a=this._infoText;a.set_htmlText(a.get_htmlText()+(this.info.displaySmaller+"x"+this.info.displayBigger))}else a=this._infoText,a.set_htmlText(a.get_htmlText()+(this.info.displayBigger+"x"+this.info.displaySmaller))},setVarText:function(){this._varList.set_htmlText("");switch(this._varType){case "bool":var a=this._access.varBool.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._varList;f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+
H.string(this._access.varBool.h[d])+"<br>"))}break;case "float":a=this._access.varFloat.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._varList,f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+this._access.varFloat.h[d]+"<br>"));break;case "int":a=this._access.varInt.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._varList,f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+this._access.varInt.h[d]+"<br>"));break;default:for(a=this._access.varString.h,a=Object.keys(a),b=
a.length,c=0;c<b;)d=a[c++],f=this._varList,f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+this._access.varString.h[d]+"<br>"))}},createTxInterface:function(a,b,c,d,f,g){var h=new Jc;h.set_defaultTextFormat(this._txFormat);h.set_multiline(a);h.set_selectable(!1);h.set_htmlText(b);h.set_x(c);h.set_y(d);h.set_width(f);h.set_height(g);return h},createBtInterface:function(a,b){var c=new Jc;c.set_defaultTextFormat(this._btFormat);c.set_background(!0);c.set_backgroundColor(16777215);c.set_border(!0);
c.set_borderColor(16777215);c.set_width(50);c.set_height(15);c.set_text(a);c.set_selectable(!1);c.addEventListener("click",b);return c},createInputInterface:function(a){var b=new Jc;b.set_type(1);b.set_defaultTextFormat(this._inFormat);b.set_background(!0);b.set_backgroundColor(0);b.set_border(!0);b.set_borderColor(0);b.set_width(a);b.set_height(15);b.set_text("");b.addEventListener("click",m(this,this.onInputClick));return b},onInputClick:function(a){this._infoArea.stage.set_focus(a.target)},killBtInterface:function(a,
b){b!=null&&a.removeEventListener("click",b);a.set_text(null);a.set_htmlText(null);a.set_defaultTextFormat(null)},onMovieLoad:function(a){this.setInfoText();this.placeInterface()},onSceneLoad:function(a){this.setInfoText()},onKeyframeLoad:function(a){this.setInfoText()},onDisplayResize:function(a){this.setInfoText();this.placeInterface()},onInterfaceHide:function(a){this.acInfoHide([])},onInterfaceCycle:function(a){this._intPos++;this._intPos>3&&(this._intPos=0);this.placeInterface();De.trace(dk.totalDrawCalls(),
{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:880,className:"plugins.DebugPlugin",methodName:"onInterfaceCycle"})},onInterfaceMovie:function(a){this._interfaceScene.parent!=null&&this._infoArea.removeChild(this._interfaceScene);this._interfaceVar.parent!=null&&this._infoArea.removeChild(this._interfaceVar);this._intarfaceAction.parent!=null&&this._infoArea.removeChild(this._intarfaceAction);this._interfaceMovie.parent==null?this._infoArea.addChild(this._interfaceMovie):this._infoArea.removeChild(this._interfaceMovie);
this.placeInterface()},onInterfaceScene:function(a){this._interfaceMovie.parent!=null&&this._infoArea.removeChild(this._interfaceMovie);this._interfaceVar.parent!=null&&this._infoArea.removeChild(this._interfaceVar);this._intarfaceAction.parent!=null&&this._infoArea.removeChild(this._intarfaceAction);this._interfaceScene.parent==null?this._infoArea.addChild(this._interfaceScene):this._infoArea.removeChild(this._interfaceScene);this.placeInterface()},onInterfaceVar:function(a){this._interfaceMovie.parent!=
null&&this._infoArea.removeChild(this._interfaceMovie);this._interfaceScene.parent!=null&&this._infoArea.removeChild(this._interfaceScene);this._intarfaceAction.parent!=null&&this._infoArea.removeChild(this._intarfaceAction);this._interfaceVar.parent==null?(this.setVarText(),this._infoArea.addChild(this._interfaceVar)):this._infoArea.removeChild(this._interfaceVar);this.placeInterface()},onInterfaceAction:function(a){this._interfaceMovie.parent!=null&&this._infoArea.removeChild(this._interfaceMovie);
this._interfaceScene.parent!=null&&this._infoArea.removeChild(this._interfaceScene);this._interfaceVar.parent!=null&&this._infoArea.removeChild(this._interfaceVar);this._intarfaceAction.parent==null?this._infoArea.addChild(this._intarfaceAction):this._infoArea.removeChild(this._intarfaceAction);this.placeInterface()},onInterfaceStats:function(a){De.trace("build with -D gl_stats to check out draw calls as well",{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:949,className:"plugins.DebugPlugin",
methodName:"onInterfaceStats"});this._fps==null?(this._fps=new Uu(5,5,16777215),this._fpsHolder.addChild(this._fps),this._overlay.addChild(this._fpsHolder),this.placeInterface()):(this._overlay.removeChild(this._fpsHolder),this._fpsHolder.removeChild(this._fps),this._fps=null)},onLoadMovie:function(a){this._movieInput.get_text()!=""&&this._access.parser.run(yg.print({ac:"movie.load",param:[this._movieInput.get_text()]},null,null))},onLoadScene:function(a){this._sceneInput.get_text()!=""&&this._access.parser.run(yg.print({ac:"scene.load",
param:[this._sceneInput.get_text()]},null,null))},onSetVar:function(a){if(this._setVarName.get_text()!="")switch(this._varType){case "bool":if(this._setVarValue.get_text()==""){a=this._access.varBool;var b=this._access.parser.parseString(this._setVarName.get_text());Object.prototype.hasOwnProperty.call(a.h,b)&&(a=this._access.varBool,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])}else{a=this._access.varBool;b=this._access.parser.parseString(this._setVarName.get_text());
var c=this._access.parser.parseBool(this._setVarValue.get_text());a.h[b]=c}break;case "float":this._setVarValue.get_text()==""?(a=this._access.varFloat,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&(a=this._access.varFloat,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])):(a=this._access.varFloat,b=this._access.parser.parseString(this._setVarName.get_text()),c=this._access.parser.parseFloat(this._setVarValue.get_text()),
a.h[b]=c);break;case "int":this._setVarValue.get_text()==""?(a=this._access.varInt,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&(a=this._access.varInt,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])):(a=this._access.varInt,b=this._access.parser.parseString(this._setVarName.get_text()),c=this._access.parser.parseInt(this._setVarValue.get_text()),a.h[b]=c);break;
default:this._setVarValue.get_text()==""?(a=this._access.varString,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&(a=this._access.varString,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])):(a=this._access.varString,b=this._access.parser.parseString(this._setVarName.get_text()),c=this._access.parser.parseString(this._setVarValue.get_text()),a.h[b]=c)}this.setVarText()},
onTraceVar:function(a){De.trace(yg.print({string:this._access.varString,float:this._access.varFloat,int:this._access.varInt,bool:this._access.varBool},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:1034,className:"plugins.DebugPlugin",methodName:"onTraceVar"})},onRefreshVar:function(a){this.setVarText()},onSetString:function(a){this._varType="string";this._varTxt.set_htmlText("<b>String variables</b>");this._setvarTxt.set_htmlText("<b>Set string value (set to empty field to remove it)</b>");
this._setVarName.set_text("");this._setVarValue.set_text("");this.setVarText()},onSetFloat:function(a){this._varType="float";this._varTxt.set_htmlText("<b>Float variables</b>");this._setvarTxt.set_htmlText("<b>Set float value (set to empty field to remove it)</b>");this._setVarName.set_text("");this._setVarValue.set_text("");this.setVarText()},onSetInt:function(a){this._varType="int";this._varTxt.set_htmlText("<b>Int variables</b>");this._setvarTxt.set_htmlText("<b>Set int value (set to empty field to remove it)</b>");
this._setVarName.set_text("");this._setVarValue.set_text("");this.setVarText()},onSetBool:function(a){this._varType="bool";this._varTxt.set_htmlText("<b>Bool variables</b>");this._setvarTxt.set_htmlText("<b>Set bool value (set to empty field to remove it)</b>");this._setVarName.set_text("");this._setVarValue.set_text("");this.setVarText()},onRunAction:function(a){this._actionArea.get_text()!=""&&this._access.parser.run(this._actionArea.get_text())},placeInterface:function(){switch(this._intPos){case 0:this._infoArea.set_x(10);
this._infoArea.set_y(10);this.info.orientation=="vertical"?(this._fpsHolder.set_x(10),this._fpsHolder.set_y(this.info.displayBigger-30-10)):(this._fpsHolder.set_x(10),this._fpsHolder.set_y(this.info.displaySmaller-30-10));break;case 1:this.info.orientation=="vertical"?this._infoArea.set_x(this.info.displaySmaller-this._infoArea.get_width()-10):this._infoArea.set_x(this.info.displayBigger-this._infoArea.get_width()-10);this._infoArea.set_y(10);this._fpsHolder.set_x(10);this._fpsHolder.set_y(10);break;
case 2:this.info.orientation=="vertical"?(this._infoArea.set_x(this.info.displaySmaller-this._infoArea.get_width()-10),this._infoArea.set_y(this.info.displayBigger-this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displaySmaller-65-10)):(this._infoArea.set_x(this.info.displayBigger-this._infoArea.get_width()-10),this._infoArea.set_y(this.info.displaySmaller-this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displayBigger-65-10));this._fpsHolder.set_y(10);break;case 3:this.info.orientation==
"vertical"?(this._infoArea.set_x(10),this._infoArea.set_y(this.info.displayBigger-this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displaySmaller-65-10),this._fpsHolder.set_y(this.info.displayBigger-30-10)):(this._infoArea.set_x(10),this._infoArea.set_y(this.info.displaySmaller-this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displayBigger-65-10),this._fpsHolder.set_y(this.info.displaySmaller-30-10))}},__class__:Oo});var Qo=function(){this._firstsent=!1;Le.call(this,
"google-analytics","Google Analytics","GoogleAnalytics",!0,!1)};t["plugins.GoogleAnalyticsPlugin"]=Qo;Qo.__name__="plugins.GoogleAnalyticsPlugin";Qo.__super__=Le;Qo.prototype=I(Le.prototype,{_confWindow:null,_firstsent:null,initialize:function(a){Le.prototype.initialize.call(this,a);this.addMenu("Analytics",m(this,this.onAnalytics));this._confWindow=new bp("Google Analytics",500,150);this._confWindow.addForm("config",this._confWindow.ui.forge("config",[{tp:"Label",id:"measurement",tx:"Measurement ID",
vr:""},{tp:"TInput",id:"measurement",tx:"",vr:""},{tp:"Button",id:"measurement",tx:"Update configuration",ac:m(this,this.onUpdate)}]));this._confWindow.startInterface();this.info.addEventListener("movieload",m(this,this.onMovieLoad));this.info.addEventListener("sceneload",m(this,this.onSceneLoad));this.setAction("analytics.event",m(this,this.acEvent))},kill:function(){Le.prototype.kill.call(this);this.info.removeEventListener("movieload",m(this,this.onMovieLoad));this.info.removeEventListener("sceneload",
m(this,this.onSceneLoad));this._confWindow.kill();this._confWindow=null},acEvent:function(a){if(a.length>=2){var b=!1;try{window.gtag("event",this._access.parser.parseString(a[0]),{movie_name:p.mdata.title,scene_name:p.movie.scene.title,movie_id:p.movie.get_mvId(),scene_id:p.movie.get_scId(),about:this._access.parser.parseString(a[1])}),b=!0}catch(c){b=!1}return b}return!1},onAnalytics:function(a){k.ws.get_level()==0?(Object.prototype.hasOwnProperty.call(this.config.h,"measurementid")&&this._confWindow.ui.inputs.h.measurement.set_text(this.config.h.measurementid),
this.showWindow(this._confWindow)):k.showPopup("Google Analytics","This configuration is only available to system administrators.",320,180,"OK","warn")},onUpdate:function(a){a=this.config;var b=this._confWindow.ui.inputs.h.measurement.get_text();a.h.measurementid=b;this.updateConfig(m(this,this.onUpdateFinish))},onUpdateFinish:function(a,b){a?b.map.h.e!=0?k.showPopup("Google Analytics","Error while saving the plugin configuration.",320,180,"OK"):(k.showMsg("The Google Analytics configuration was updated."),
this.hideWindow(this._confWindow)):k.showPopup("Google Analytics","Error while saving the plugin configuration.",320,180,"OK")},onMovieLoad:function(a){if(p.mode=="player"&&Object.prototype.hasOwnProperty.call(this.config.h,"measurementid")){this._firstsent=!0;try{window.gtag("set","campaign",{id:p.movie.get_mvId(),name:p.mdata.title,source:p.base}),window.gtag("event","movie.load",{movie_id:p.movie.get_mvId(),movie_name:p.mdata.title})}catch(b){}}},onSceneLoad:function(a){if(!this._firstsent)this.onMovieLoad(null);
if(p.mode=="player"&&Object.prototype.hasOwnProperty.call(this.config.h,"measurementid"))try{window.gtag("event","scene.load",{scene_id:p.movie.get_scId(),scene_name:p.movie.scene.title,movie_id:p.movie.get_mvId(),movie_name:p.mdata.title})}catch(b){}},__class__:Qo});var oe=function(){Le.call(this,"overlay","Overlay","Overlay",!0,!0)};t["plugins.OverlayPlugin"]=oe;oe.__name__="plugins.OverlayPlugin";oe.overlay_return=Sa.overlay_return=function(){if(oe.overlayInfo!=null){var a=p.ws,b=new G;b.h.key=
oe.overlayInfo.key;a.send("Overlay/LoadKey",b,oe.onkeyLoaded)}};oe.onkeyLoaded=function(a,b){if(a)if(b.map.h.e==0)if(b.map.h.key!=""){if(b.map.h.ret!="")if(a=Ga.jsonParse(b.map.h.ret),a==0)oe.overlayInfo.onerror!=null&&oe.overlayInfo.parser.run(oe.overlayInfo.onerror,!0);else{b=0;for(var c=y.fields(a);b<c.length;){var d=c[b];++b;var f=y.field(a,d);if(Object.prototype.hasOwnProperty.call(f,"t")&&Object.prototype.hasOwnProperty.call(f,"v"))switch(y.field(f,"t")){case "B":oe.overlayInfo.parser.setBool(d,
y.field(f,"v"));break;case "F":oe.overlayInfo.parser.setFloat(d,y.field(f,"v"));break;case "I":oe.overlayInfo.parser.setInt(d,y.field(f,"v"));break;case "S":oe.overlayInfo.parser.setString(d,y.field(f,"v"))}}}oe.overlayInfo.onsuccess!=null&&oe.overlayInfo.parser.run(oe.overlayInfo.onsuccess,!0)}else oe.overlayInfo.onerror!=null&&oe.overlayInfo.parser.run(oe.overlayInfo.onerror,!0);else oe.overlayInfo.onerror!=null&&oe.overlayInfo.parser.run(oe.overlayInfo.onerror,!0);else oe.overlayInfo.onerror!=
null&&oe.overlayInfo.parser.run(oe.overlayInfo.onerror,!0);oe.overlayInfo=null};oe.__super__=Le;oe.prototype=I(Le.prototype,{_confWindow:null,initialize:function(a){Le.prototype.initialize.call(this,a);this.addMenu("Overlay",m(this,this.onOverlay));this._confWindow=new bp("Overlay",500,150);this._confWindow.addForm("config",this._confWindow.ui.forge("config",[{tp:"Label",id:"overlay",tx:"Secret KEY for server communication",vr:""},{tp:"TInput",id:"overlay",tx:"",vr:""},{tp:"Button",id:"overlay",tx:"Update configuration",
ac:m(this,this.onUpdate)}]));this._confWindow.startInterface();this.setAction("overlay.show",m(this,this.getKey))},kill:function(){Le.prototype.kill.call(this);this._confWindow.kill();this._confWindow=null},getKey:function(a,b){if(a.length>=2){oe.overlayInfo=null;var c="0";a.length>=3&&this._access.parser.parseBool(a[2])&&(c="1");var d=new G;if(a.length>=4)for(var f=3,g=a.length;f<g;){var h=f++,n=this._access.parser.parseString(a[h]);d.h["v"+(h-2)]=n}g=p.ws;f=new G;h=this._access.parser.parseString(a[0]);
f.h.url=h;h=this._access.parser.parseString(a[1]);f.h.title=h;f.h.addget=c;h=Ga.jsonStringify(d);f.h.data=h;g.send("Overlay/GetKey",f,m(this,this.onKeyReturn),b);return!0}return!1},onKeyReturn:function(a,b){var c=b.extra;if(a)if(b.map.h.e==0)if(b.map.h.key!=""){oe.overlayInfo={key:b.map.h.key,onerror:c.onerror,onsuccess:c.onsuccess,parser:this._access.parser};a=H.string(b.map.h.url)+"?key="+H.string(b.map.h.key);if(b.map.h.addget=="1"){c=Ga.jsonAsMap(b.map.h.data);for(var d=Object.keys(c.h),f=d.length,
g=0;g<f;){var h=d[g++];a+="&"+h+"="+encodeURIComponent(c.h[h])}}try{window.overlay_place(a,b.map.h.title)}catch(n){}}else c.onerror!=null&&this._access.parser.run(c.onerror,!0);else c.onerror!=null&&this._access.parser.run(c.onerror,!0);else c.onerror!=null&&this._access.parser.run(c.onerror,!0)},onOverlay:function(a){k.ws.get_level()==0?(Object.prototype.hasOwnProperty.call(this.config.h,"overlay")&&this._confWindow.ui.inputs.h.overlay.set_text(this.config.h.overlay),this.showWindow(this._confWindow)):
k.showPopup("Overlay","This configuration is only available to system administrators.",320,180,"OK","warn")},onUpdate:function(a){a=this.config;var b=this._confWindow.ui.inputs.h.overlay.get_text();a.h.overlay=b;this.updateConfig(m(this,this.onUpdateFinish))},onUpdateFinish:function(a,b){a?b.map.h.e!=0?k.showPopup("Overlay","Error while saving the plugin configuration.",320,180,"OK"):(k.showMsg("The overlay configuration was updated."),this.hideWindow(this._confWindow)):k.showPopup("Overlay","Error while saving the plugin configuration.",
320,180,"OK")},__class__:oe});var Ro=function(){Le.call(this,"server-call","Server Call","ServerCall",!1,!0)};t["plugins.ServerCallPlugin"]=Ro;Ro.__name__="plugins.ServerCallPlugin";Ro.__super__=Le;Ro.prototype=I(Le.prototype,{initialize:function(a){Le.prototype.initialize.call(this,a);this.setAction("call.url",m(this,this.acUrl));this.setAction("call.process",m(this,this.acProcess));this.setAction("call.sdprocess",m(this,this.acSdProcess))},kill:function(){Le.prototype.kill.call(this)},acUrl:function(a,
b){if(a.length>0){var c="";a.length>1&&(c=this._access.parser.parseString(a[1]));var d=p.ws,f=new G;a=this._access.parser.parseString(a[0]);f.h.url=a;f.h["var"]=c;d.send("ServerCall/Url",f,m(this,this.onCallReturn),b);return!0}return!1},onCallReturn:function(a,b){var c=b.extra;a?b.map.h.e==0?(b.map.h["var"]!=""&&this._access.parser.setString(b.map.h["var"],b.map.h.resp),c.onsuccess!=null&&this._access.parser.run(c.onsuccess,!0)):c.onerror!=null&&this._access.parser.run(c.onerror,!0):c.onerror!=null&&
this._access.parser.run(c.onerror,!0)},acProcess:function(a,b){if(a.length>0){var c=[];if(a.length>1)for(var d=1,f=a.length;d<f;){var g=d++;c.push(this._access.parser.parseString(a[g]))}f=p.ws;d=new G;a=this._access.parser.parseString(a[0]);d.h.url=a;a=Ga.jsonStringify(c);d.h.data=a;a=p.movie.get_mvId();d.h.movieid=a;a=p.movie.get_scId();d.h.sceneid=a;d.h.movietitle=p.mdata.title;d.h.scenetitle=p.movie.scene.title;a=p.ws.get_user();d.h.visitor=a;f.send("ServerCall/Process",d,m(this,this.onProcessReturn),
b);return!0}return!1},acSdProcess:function(a,b){if(a.length>0){var c=[];if(a.length>1)for(var d=1,f=a.length;d<f;){var g=d++;c.push(this._access.parser.parseString(a[g]))}a=this._access.parser.parseString(a[0]);d=new G;c=Ga.jsonStringify(c);d.h.data=c;c=p.movie.get_mvId();d.h.movieid=c;c=p.movie.get_scId();d.h.sceneid=c;d.h.movietitle=p.mdata.title;d.h.scenetitle=p.movie.scene.title;c=p.ws.get_user();d.h.visitor=c;new Ob(!0,a,"POST",d,3,m(this,this.onSdProcessReturn),null,null,null,null,b);return!0}return!1},
onProcessReturn:function(a,b){var c=b.extra;if(a)if(b.map.h.e==0){if(b.map.h.resp!="")if(a=Ga.jsonParse(b.map.h.resp),a==0)c.onerror!=null&&this._access.parser.run(c.onerror,!0);else{b=0;for(var d=y.fields(a);b<d.length;){var f=d[b];++b;var g=y.field(a,f);if(Object.prototype.hasOwnProperty.call(g,"t")&&Object.prototype.hasOwnProperty.call(g,"v"))switch(y.field(g,"t")){case "B":this._access.parser.setBool(f,y.field(g,"v"));break;case "F":this._access.parser.setFloat(f,y.field(g,"v"));break;case "I":this._access.parser.setInt(f,
y.field(g,"v"));break;case "S":this._access.parser.setString(f,y.field(g,"v"))}}c.onsuccess!=null&&this._access.parser.run(c.onsuccess,!0)}}else c.onerror!=null&&this._access.parser.run(c.onerror,!0);else c.onerror!=null&&this._access.parser.run(c.onerror,!0)},onSdProcessReturn:function(a,b){var c=b.extra;if(a){a=0;for(var d=y.fields(b.json);a<d.length;){var f=d[a];++a;var g=y.field(b.json,f);if(Object.prototype.hasOwnProperty.call(g,"t")&&Object.prototype.hasOwnProperty.call(g,"v"))switch(y.field(g,
"t")){case "B":this._access.parser.setBool(f,y.field(g,"v"));break;case "F":this._access.parser.setFloat(f,y.field(g,"v"));break;case "I":this._access.parser.setInt(f,y.field(g,"v"));break;case "S":this._access.parser.setString(f,y.field(g,"v"))}}c.onsuccess!=null&&this._access.parser.run(c.onsuccess,!0)}else c.onerror!=null&&this._access.parser.run(c.onerror,!0)},__class__:Ro});var Po=function(){Le.call(this,"original.share","Share")};t["plugins.SharePlugin"]=Po;Po.__name__="plugins.SharePlugin";
Po.__super__=Le;Po.prototype=I(Le.prototype,{_overlay:null,initialize:function(a){Le.prototype.initialize.call(this,a);this._overlay=this.getOverlay("original.share");this.setAction("share.facebook",m(this,this.acFacebook));this.setAction("share.linkedin",m(this,this.acLinkedin));this.setAction("share.pinterest",m(this,this.acPinterest));this.setAction("share.reddit",m(this,this.acReddit));this.setAction("share.x",m(this,this.acX))},kill:function(){this.removeOverlay("original.share");this._overlay=
null;Le.prototype.kill.call(this)},acFacebook:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(a)));a.method="GET";Pa.getURL(a);return!0},acLinkedin:function(a,b){a.length>
0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(a)));a.method="GET";Pa.getURL(a);return!0},acPinterest:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+
p.movie.get_mvId(),a=new se("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(a)));a.method="GET";Pa.getURL(a);return!0},acReddit:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://www.reddit.com/submit?url="+encodeURIComponent(a))):
(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://www.reddit.com/submit?url="+encodeURIComponent(a)));a.method="GET";Pa.getURL(a);return!0},acX:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new se("https://twitter.com/intent/tweet?url="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+
p.movie.get_mvId(),a=new se("https://twitter.com/intent/tweet?url="+encodeURIComponent(a)));a.method="GET";Pa.getURL(a);return!0},__class__:Po});wa.$haxeUID|=0;typeof performance!="undefined"&&typeof performance.now=="function"&&(V.now=performance.now.bind(performance));t.Math=Math;String.fromCodePoint==null&&(String.fromCodePoint=function(a){return a<65536?String.fromCharCode(a):String.fromCharCode((a>>10)+55232)+String.fromCharCode((a&1023)+56320)});Object.defineProperty(String.prototype,"__class__",
{value:t.String=String,enumerable:!1,writable:!0});String.__name__="String";t.Array=Array;Array.__name__="Array";Date.prototype.__class__=t.Date=Date;Date.__name__="Date";var jw={},eA={},Iz=Number,$v=Boolean,kw={},Rz={};w.__toStr={}.toString;ArrayBuffer.prototype.slice==null&&(ArrayBuffer.prototype.slice=Oy.sliceImpl);typeof window=="undefined"&&(wa.onmessage=function(a){a=a.data;try{wa.onmessage=(B=$b.__current,m(B,B.dispatchMessage)),Fx.toFunction(a)()}catch(b){Pb.lastError=b,$b.__current.destroy()}});
X.__alpha16=new Uint32Array(256);for(var Ko=0;Ko<256;){var Sq=Ko++;X.__alpha16[Sq]=Math.ceil(Sq*257.00392156862745)}X.__clamp=new Uint8Array(511);for(Ko=0;Ko<255;)Sq=Ko++,X.__clamp[Sq]=Sq;for(Ko=255;Ko<511;)Sq=Ko++,X.__clamp[Sq]=255;sk.available=!1;sk.enabled=!1;Vb.level=3;typeof console=="undefined"&&(console={});console.log==null&&(console.log=function(){});Vf.__registerDefaultLoaders();C.hitTestCanvas=dl.get_supported()?window.document.createElement("canvas"):null;C.hitTestContext=dl.get_supported()?
C.hitTestCanvas.getContext("2d"):null;Io.maxTouchPoints=2;Io.supportedGestures=null;Io.supportsGestureEvents=!1;Io.inputMode=2;tb.__meta__={statics:{toNullVector:{SuppressWarnings:["checkstyle:Dynamic"]}}};ma.__meta__={fields:{__cairo:{SuppressWarnings:["checkstyle:Dynamic"]},addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]},removeEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};ma.__broadcastEvents=new G;ma.__instanceCount=0;ma.__tempStack=new dc(function(){return tb.toObjectVector(null)},
function(a){a.set_length(0)});fa.__meta__={fields:{layoutData:{style:null},disabledAlpha:{style:null},focusRectSkin:{style:null},focusPaddingTop:{style:null},focusPaddingRight:{style:null},focusPaddingBottom:{style:null},focusPaddingLeft:{style:null}}};pb.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};pb.VARIANT_TOOL_BAR="toolBar";qc.DAY_SHORT_NAMES="Sun Mon Tue Wed Thu Fri Sat".split(" ");qc.DAY_NAMES="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");qc.MONTH_SHORT_NAMES=
"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");qc.MONTH_NAMES="January February March April May June July August September October November December".split(" ");Wa.escapeRe=RegExp("[.*+?^${}()|[\\]\\\\]","g");Jb.Element=0;Jb.PCData=1;Jb.CData=2;Jb.Comment=3;Jb.DocType=4;Jb.ProcessingInstruction=5;Jb.Document=6;Tf.__meta__={obj:{defaultXmlProperty:["content"]}};Tf.MAX_CLICK_DISTANCE_FOR_CLOSE=6;cg.ORIENTATION_LANDSCAPE="landscape";cg.ORIENTATION_PORTRAIT="portrait";cg.MODE_PLAYER="player";
cg.MODE_EDITOR="editor";cg.MODE_EDPLAYERWAIT="editorplayerwait";cg.MODE_EDPLAYER="editorplayer";Ob.MODEBINARY=0;Ob.MODETEXT=1;Ob.MODEJSON=3;Ob.MODEMAP=4;Ob.MODEBINTXT=5;Ob.MODEBINMAP=6;k.AREASIZE_MAX=3840;k.AREASIZE_MIN=100;k.singleUser=!1;k.userLevel=-1;k.validEmail=!1;k.host="";k.fonts=[];k.mvOwner=!1;k.mvCollaborator=!1;k.plugins=new G;k.temp=new G;k.displayType="landscape";k.sceneToLoad="";k.kfToLoad=-1;k.copy=new Ib;k.testActions="";k.testDelay=0;Ea.__pool=new dc(function(){return new Ea},function(a){a.setTo(0,
0)});gb.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]},to3DString:{SuppressWarnings:["checkstyle:FieldDocComment"]},toMozString:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};gb.__identity=new gb;gb.__pool=new dc(function(){return new gb},function(a){a.identity()});gb.__matrix3=fj._new();wc.__pool=new dc(function(){return new wc},function(a){a.__identity()});gj.__supportedStyles="color display font-family font-size font-style font-weight kerning leading letter-spacing margin-left margin-right text-align text-decoration text-indent".split(" ");
p.session="";p.ready=!1;p.mode="player";p.render="webgl";p.share="scene";p.fps="free";p.nocache=!0;p.server=!1;p.base="";p.font="";p.loadingMovie="";p.multiply=1;p.orientation="horizontal";p.path="";p.secretKey="";p.plugins=new G;p.style=new gj;p.contraptions=new ik;p.narrative=new Je;p.mvActions=new G;p.contentPosition=new Ea;p.contentWidth=0;p.contentHeight=0;p.usingTarget=0;p.cursorVisible=!0;p.canTrigger=!0;p.history=[];pa.ACTIVATE="activate";pa.ADDED="added";pa.ADDED_TO_STAGE="addedToStage";
pa.CANCEL="cancel";pa.CHANGE="change";pa.CLEAR="clear";pa.CLOSING="closing";pa.CLOSE="close";pa.COMPLETE="complete";pa.CONNECT="connect";pa.CONTEXT3D_CREATE="context3DCreate";pa.COPY="copy";pa.CUT="cut";pa.DEACTIVATE="deactivate";pa.ENTER_FRAME="enterFrame";pa.EXIT_FRAME="exitFrame";pa.EXITING="exiting";pa.FRAME_CONSTRUCTED="frameConstructed";pa.FRAME_LABEL="frameLabel";pa.FULLSCREEN="fullScreen";pa.ID3="id3";pa.INIT="init";pa.MOUSE_LEAVE="mouseLeave";pa.OPEN="open";pa.PASTE="paste";pa.REMOVED="removed";
pa.REMOVED_FROM_STAGE="removedFromStage";pa.RENDER="render";pa.RESIZE="resize";pa.SCROLL="scroll";pa.SELECT="select";pa.SELECT_ALL="selectAll";pa.SOUND_COMPLETE="soundComplete";pa.TAB_CHILDREN_CHANGE="tabChildrenChange";pa.TAB_ENABLED_CHANGE="tabEnabledChange";pa.TAB_INDEX_CHANGE="tabIndexChange";pa.TEXTURE_READY="textureReady";pa.UNLOAD="unload";Lk.MOVIE_LOADED="movie_loaded";Lk.SCENE_LOADED="scene_loaded";Lk.EVENT="event";Al.VORIENTATION="vertical";Al.HORIENTATION="horizontal";Al.SORIENTATION="square";
Kj.MOVIELOAD="movieload";Kj.SCENELOAD="sceneload";Kj.KEYFRAMELOAD="keyframeload";Kj.DISPLAYRESIZE="displayresize";li.__meta__={fields:{setSkinForState:{style:null}}};Xb.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setTextFormatForState:{style:null},setIconForState:{style:null}}};Xb.VARIANT_PRIMARY="primary";Xb.VARIANT_DANGER="danger";Wf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY=x.CUSTOM("decrementButtonFactory");Wf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY=x.CUSTOM("incrementButtonFactory");
Wf.defaultDecrementButtonFactory=Lc.withClass(Xb);Wf.defaultIncrementButtonFactory=Lc.withClass(Xb);ah.CHILD_VARIANT_DECREMENT_BUTTON="hScrollBar_decrementButton";ah.CHILD_VARIANT_INCREMENT_BUTTON="hScrollBar_incrementButton";$g.CHILD_VARIANT_DECREMENT_BUTTON="vScrollBar_decrementButton";$g.CHILD_VARIANT_INCREMENT_BUTTON="vScrollBar_incrementButton";Ab.INVALIDATION_FLAG_SCROLLER_FACTORY=x.CUSTOM("scrollerFactory");Ab.INVALIDATION_FLAG_SCROLL_BAR_FACTORY=x.CUSTOM("scrollBarFactory");Ab.defaultScrollBarXFactory=
Lc.withClass(ah);Ab.defaultScrollBarYFactory=Lc.withClass($g);je.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};gf.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};gf.POINTER_ID_MOUSE=-1E3;gf.defaultDividerFactory=Lc.withFunction(function(){var a=new Da;a.get_graphics().beginFill(16711935,0);a.get_graphics().drawRect(0,0,6,6);a.get_graphics().endFill();return a});Bl.MODEWARN="warn";Bl.MODECONFIRM="confirm";pi.CHILD_VARIANT_LIST_VIEW="textEditor_listView";ia.__meta__={obj:{defaultXmlProperty:["text"]}};
ia.VARIANT_HEADING="heading";ia.VARIANT_DETAIL="detail";ia.VARIANT_DANGER="danger";Fc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Fc.VARIANT_BORDERLESS="borderless";Fc.VARIANT_BORDER="border";Fc.VARIANT_POP_UP="popUp";Fc.CHILD_VARIANT_ITEM_RENDERER="listView_itemRenderer";Fc.DEFAULT_DRAG_FORMAT_ITEMS="items";Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=x.CUSTOM("itemRendererFactory");Fc.RESET_ITEM_STATE=new Jl;ce.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};ce.INVALIDATION_FLAG_BUTTON_FACTORY=
x.CUSTOM("buttonFactory");ce.INVALIDATION_FLAG_LIST_VIEW_FACTORY=x.CUSTOM("listViewFactory");ce.CHILD_VARIANT_BUTTON="popUpListView_button";ce.CHILD_VARIANT_LIST_VIEW="popUpListView_listView";ce.defaultButtonFactory=Lc.withClass(Xb);ce.defaultListViewFactory=Lc.withClass(Fc);Wd.__meta__={obj:{defaultXmlProperty:["content"]}};Wd.INVALIDATION_FLAG_ORIGIN=x.CUSTOM("origin");Ye.__meta__={obj:{defaultXmlProperty:["text"]}};Ye.VARIANT_DANGER="danger";rd.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setSkinForState:{style:null},
setTextFormatForState:{style:null}}};rd.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY=x.CUSTOM("errorCalloutFactory");rd.VARIANT_SEARCH="search";rd.CHILD_VARIANT_ERROR_CALLOUT="textInput_errorCallout";rd.defaultErrorCalloutFactory=Lc.withClass(Ye);Ze.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Ze.INVALIDATION_FLAG_BUTTON_FACTORY=x.CUSTOM("buttonFactory");Ze.CHILD_VARIANT_BUTTON="buttonBar_button";Ze.RESET_BUTTON_STATE=new lp;Fd.INVALIDATION_FLAG_BUTTON_BAR_FACTORY=x.CUSTOM("buttonBarFactory");
Fd.INVALIDATION_FLAG_HEADER_FACTORY=x.CUSTOM("headerFactory");Fd.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY=x.CUSTOM("messageLabelFactory");Fd.CHILD_VARIANT_HEADER="alert_header";Fd.CHILD_VARIANT_MESSAGE_LABEL="alert_messageLabel";Fd.CHILD_VARIANT_BUTTON_BAR="alert_buttonBar";Fd.defaultButtonBarFactory=Lc.withClass(Ze);Fd.defaultHeaderFactory=Lc.withClass(Mi);Fd.defaultMessageLabelFactory=Lc.withClass(ia);si.__meta__={fields:{setSkinForState:{style:null}}};hd.__meta__={obj:{defaultXmlProperty:["text"]},
fields:{setTextFormatForState:{style:null},setIconForState:{style:null}}};Ah.__meta__={obj:{defaultXmlProperty:["content"]}};Ah.INVALIDATION_FLAG_HEADER_FACTORY=x.CUSTOM("headerFactory");Ah.CHILD_VARIANT_HEADER="collapsible_header";Ah.defaultHeaderFactory=Lc.withClass(hd);Qd.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Qd.INVALIDATION_FLAG_BUTTON_FACTORY=x.CUSTOM("buttonFactory");Qd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=x.CUSTOM("textInputFactory");Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY=x.CUSTOM("listViewFactory");
Qd.CHILD_VARIANT_BUTTON="comboBox_button";Qd.CHILD_VARIANT_TEXT_INPUT="comboBox_textInput";Qd.CHILD_VARIANT_LIST_VIEW="comboBox_listView";Qd.defaultButtonFactory=Lc.withClass(Xb);Qd.defaultTextInputFactory=Lc.withClass(rd);Qd.defaultListViewFactory=Lc.withClass(Fc);Kb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY=x.CUSTOM("monthTitleViewFactory");Kb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY=x.CUSTOM("decrementMonthButtonFactory");Kb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY=x.CUSTOM("incrementMonthButtonFactory");
Kb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY=x.CUSTOM("decrementYearButtonFactory");Kb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY=x.CUSTOM("incrementYearButtonFactory");Kb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY=x.CUSTOM("dateRendererFactory");Kb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY=x.CUSTOM("weekdayLabelFactory");Kb.RESET_ITEM_STATE=new nt;Kb.CHILD_VARIANT_DATE_RENDERER="datePicker_dateRenderer";Kb.CHILD_VARIANT_MUTED_DATE_RENDERER="datePicker_mutedDateRenderer";Kb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON=
"datePicker_decrementMonthButton";Kb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON="datePicker_incrementMonthButton";Kb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON="datePicker_decrementYearButton";Kb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON="datePicker_incrementYearButton";Kb.CHILD_VARIANT_MONTH_TITLE_VIEW="datePicker_monthTitleView";Kb.CHILD_VARIANT_WEEKDAY_LABEL="datePicker_weekdayLabel";Kb.defaultDecrementMonthButtonFactory=Lc.withClass(Xb);Kb.defaultIncrementMonthButtonFactory=Lc.withClass(Xb);Kb.defaultDecrementYearButtonFactory=
Lc.withClass(Xb);Kb.defaultIncrementYearButtonFactory=Lc.withClass(Xb);Kb.defaultMonthTitleViewFactory=Lc.withClass(ia);Kb.defaultWeekdayLabelFactory=Lc.withClass(ia);Ti.__meta__={obj:{defaultXmlProperty:["content"]}};sc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};sc.VARIANT_BORDERLESS="borderless";sc.VARIANT_BORDER="border";sc.CHILD_VARIANT_CELL_RENDERER="gridView_cellRenderer";sc.CHILD_VARIANT_HEADER_RENDERER="gridView_headerRenderer";sc.CHILD_VARIANT_HEADER_DIVIDER="gridView_headerDivider";
sc.CHILD_VARIANT_COLUMN_DIVIDER="gridView_columnDivider";sc.DEFAULT_DRAG_FORMAT_ITEMS="items";sc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY=x.CUSTOM("rowRendererFactory");sc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=x.CUSTOM("headerRendererFactory");sc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY=x.CUSTOM("headerDividerFactory");sc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY=x.CUSTOM("columnDividerFactory");sc.RESET_HEADER_STATE=new pt;sc.RESET_ROW_STATE=new qt;sc.POINTER_ID_MOUSE=-1E3;Yc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};
Yc.CHILD_VARIANT_HEADER_RENDERER="groupListView_headerRenderer";Yc.CHILD_VARIANT_ITEM_RENDERER="groupListView_itemRenderer";Yc.VARIANT_BORDERLESS="borderless";Yc.VARIANT_BORDER="border";Yc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=x.CUSTOM("itemRendererFactory");Yc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=x.CUSTOM("headerRendererFactory");Yc.RESET_ITEM_STATE=new sp;sd.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY=x.CUSTOM("decrementButtonFactory");sd.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY=x.CUSTOM("incrementButtonFactory");
sd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=x.CUSTOM("textInputFactory");sd.CHILD_VARIANT_DECREMENT_BUTTON="numericStepper_decrementButton";sd.CHILD_VARIANT_INCREMENT_BUTTON="numericStepper_incrementButton";sd.CHILD_VARIANT_TEXT_INPUT="numericStepper_textInput";sd.defaultDecrementButtonFactory=Lc.withClass(Xb);sd.defaultIncrementButtonFactory=Lc.withClass(Xb);sd.defaultTextInputFactory=Lc.withClass(rd);eh.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY=x.CUSTOM("toggleButtonFactory");eh.CHILD_VARIANT_TOGGLE_BUTTON=
"pageIndicator_toggleButton";Xd.INVALIDATION_FLAG_BUTTON_FACTORY=x.CUSTOM("buttonFactory");Xd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=x.CUSTOM("textInputFactory");Xd.INVALIDATION_FLAG_DATE_PICKER_FACTORY=x.CUSTOM("datePickerFactory");Xd.CHILD_VARIANT_BUTTON="popUpDatePicker_button";Xd.CHILD_VARIANT_TEXT_INPUT="popUpDatePicker_textInput";Xd.CHILD_VARIANT_DATE_PICKER="popUpDatePicker_datePicker";Xd.defaultButtonFactory=Lc.withClass(Xb);Xd.defaultTextInputFactory=Lc.withClass(rd);Xd.defaultDatePickerFactory=
Lc.withClass(Kb);oj.defaultRadioGroup=new vp;Oe.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Oe.INVALIDATION_FLAG_TAB_FACTORY=x.CUSTOM("tabFactory");Oe.CHILD_VARIANT_TAB="tabBar_tab";Oe.RESET_TAB_STATE=new wp;tf.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setSkinForState:{style:null},setTextFormatForState:{style:null}}};tf.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY=x.CUSTOM("errorCalloutFactory");tf.CHILD_VARIANT_ERROR_CALLOUT="textArea_errorCallout";tf.defaultErrorCalloutFactory=Lc.withClass(Ye);
Cc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Cc.VARIANT_BORDERLESS="borderless";Cc.VARIANT_BORDER="border";Cc.CHILD_VARIANT_CELL_RENDERER="treeGridView_cellRenderer";Cc.CHILD_VARIANT_HEADER_RENDERER="treeGridView_headerRenderer";Cc.CHILD_VARIANT_HEADER_DIVIDER="treeGridView_headerDivider";Cc.CHILD_VARIANT_COLUMN_DIVIDER="treeGridView_columnDivider";Cc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY=x.CUSTOM("rowRendererFactory");Cc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=x.CUSTOM("headerRendererFactory");
Cc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY=x.CUSTOM("headerDividerFactory");Cc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY=x.CUSTOM("columnDividerFactory");Cc.RESET_HEADER_STATE=new tt;Cc.RESET_ROW_STATE=new ut;Cc.POINTER_ID_MOUSE=-1E3;fe.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};fe.VARIANT_BORDERLESS="borderless";fe.VARIANT_BORDER="border";fe.CHILD_VARIANT_ITEM_RENDERER="treeView_itemRenderer";fe.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=x.CUSTOM("itemRendererFactory");fe.RESET_ITEM_STATE=
new zp;eg.INVALIDATION_FLAG_CELL_RENDERER_FACTORY=x.CUSTOM("cellRendererFactory");eg.RESET_CELL_STATE=new Bp;Sc.__meta__={fields:{setSecondaryTextFormatForState:{style:null}}};If.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY=x.CUSTOM("disclosureButtonFactory");If.defaultDisclosureButtonFactory=Lc.withClass(hd);If.VARIANT_FILE_SYSTEM="fileSystem";If.CHILD_VARIANT_DISCLOSURE_BUTTON="hierarchicalItemRenderer_disclosureButton";Nl.__meta__={fields:{setSkinForState:{style:null}}};Zf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY=
x.CUSTOM("cellRendererFactory");Zf.RESET_CELL_STATE=new Bm;Ag.internalIDCounter=0;Ch.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Ch.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY=x.CUSTOM("pageIndicatorFactory");Ch.CHILD_VARIANT_PAGE_INDICATOR="pageNavigator_pageIndicator";Ch.defaultPageIndicatorFactory=Lc.withClass(eh);og.internalIDCounter=0;bh.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};bh.INVALIDATION_FLAG_TAB_BAR_FACTORY=x.CUSTOM("tabBarFactory");bh.CHILD_VARIANT_TAB_BAR="tabNavigator_tabBar";
bh.defaultTabBarFactory=Lc.withClass(Oe);Pl.WRAP_OBJECT_HIGH_TAB_INDEX=2147483647;al.CHILD_VARIANT_TOOL_TIP="toolTip";Cd.stageToManager=new Ta;Cd._focusManagerFactory=Cd.defaultFocusManagerFactory;Aa.stageToManager=new Ta;be._toolTipManagerFactory=be.defaultToolTipManagerFactory;be.stageToManager=new Ta;gk.STAGE_TO_VALIDATION_QUEUE=new Ta;dg.__meta__={obj:{defaultXmlProperty:["array"]}};fb._dropTargetLocalX=0;fb._dropTargetLocalY=0;fb._dragAvatarOffsetX=0;fb.dragAvatarOffsetX=1;fb.dragAvatarOffsetY=
1;fb.dropAccepted=!1;fb._oldDragAvatarMouseEnabled=!1;fb._oldDragAvatarMouseChildren=!1;Pj.ITEM_TRIGGER="itemTrigger";Pj._pool=new dc(function(){return new Pj(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Si.ITEM_TRIGGER="itemTrigger";Si._pool=new dc(function(){return new Si(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});$f.DRAG_START=
"dragStart";$f.DRAG_COMPLETE="dragComplete";$f.DRAG_ENTER="dragEnter";$f.DRAG_MOVE="dragMove";$f.DRAG_EXIT="dragExit";$f.DRAG_DROP="dragDrop";$f._pool=new dc(function(){return new $f(null,null,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});Y.INITIALIZE="initialize";Y.CREATION_COMPLETE="creationComplete";Y.LAYOUT_DATA_CHANGE="layoutDataChange";Y.STATE_CHANGE="stateChange";Y.OPENING="opening";Y.CLOSING="closing";Y.ENABLE="enable";Y.DISABLE=
"disable";Y._pool=new dc(function(){return new Y(null,!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});Ld.ADD_ITEM="addItem";Ld.REMOVE_ITEM="removeItem";Ld.REPLACE_ITEM="replaceItem";Ld.UPDATE_ITEM="updateItem";Ld.UPDATE_ALL="updateAll";Ld.RESET="reset";Ld.REMOVE_ALL="removeAll";Ld.FILTER_CHANGE="filterChange";Ld.SORT_CHANGE="sortChange";Ld._pool=new dc(function(){return new Ld(null,-1,!1,!1)},function(a){a.target=null;a.currentTarget=
null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.addedItem=null;a.removedItem=null});Qj.SUBMIT="submit";Qj._pool=new dc(function(){return new Qj(null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});Hf.CELL_TRIGGER="cellTrigger";Hf.HEADER_TRIGGER="headerTrigger";Hf._cellPool=new dc(function(){return new Hf(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=
!1;a.state=null});Hf._headerPool=new dc(function(){return new Hf(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});ti.ITEM_TRIGGER="itemTrigger";ti._pool=new dc(function(){return new ti(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Ng.ADD_ITEM="addItem";Ng.REMOVE_ITEM="removeItem";Ng.REPLACE_ITEM="replaceItem";Ng.UPDATE_ITEM=
"updateItem";Ng.UPDATE_ALL="updateAll";Ng.RESET="reset";Ng.REMOVE_ALL="removeAll";Ng.FILTER_CHANGE="filterChange";Ng.SORT_CHANGE="sortChange";Ng._pool=new dc(function(){return new Ng(null,null,!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.addedItem=null;a.removedItem=null;a.location=null});Wh.ITEM_TRIGGER="itemTrigger";Wh._pool=new dc(function(){return new Wh(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=
!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Id.SCROLL_START="scrollStart";Id.SCROLL_COMPLETE="scrollComplete";Id.SCROLL="scroll";Id._pool=new dc(function(){return new Id(null,!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});vh.STYLES_CHANGE="stylesChange";vh._pool=new dc(function(){return new vh(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.affectsTarget=
null});Rj.ITEM_TRIGGER="itemTrigger";Rj._pool=new dc(function(){return new Rj(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Xh.TRANSITION_START="transitionStart";Xh.TRANSITION_COMPLETE="transitionComplete";Xh.TRANSITION_CANCEL="transitionCancel";Xh._pool=new dc(function(){return new Xh(null,null,null,null,null)},function(a){a.previousViewID=null;a.previousView=null;a.nextViewID=null;a.nextView=null;a.target=null;
a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});$e.CELL_TRIGGER="cellTrigger";$e.HEADER_TRIGGER="headerTrigger";$e.BRANCH_OPEN="branchOpen";$e.BRANCH_CLOSE="branchClose";$e._cellPool=new dc(function(){return new $e(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});$e._headerPool=new dc(function(){return new $e(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=
!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Mg.ITEM_TRIGGER="itemTrigger";Mg.BRANCH_OPEN="branchOpen";Mg.BRANCH_CLOSE="branchClose";Mg._pool=new dc(function(){return new Mg(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});pf.TRIGGER="trigger";pf._pool=new dc(function(){return new pf(null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.relatedObject=
null});Td.actuators=[];Td.actuatorsLength=0;Td.addedEvent=!1;pj.VIEW_REQUIRED_ERROR="Cannot transition if both old view and new view are null.";Yk.MONTH_NUMBER_OF_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31];Yk.FEBRUARY_NUMBER_OF_DAYS_LEAP_YEAR=29;pc.MEDIA_QUERY_DESKTOP="screen and (hover: hover) and (pointer: fine)";pc.MEDIA_QUERY_MOBILE="screen and (hover: none) and (pointer: coarse)";mg.MINIMUM_VELOCITY=.02;mg.POINTER_ID_MOUSE=-1E3;Pd.stageToObject=new Ta;Oi.MINIMUM_VELOCITY=.02;Oi.POINTER_ID_MOUSE=
-1E3;Sz._mul=Math.imul!=null?Math.imul:function(a,b){return a*(b&65535)+(a*(b>>>16)<<16|0)|0};Bg.USE_CACHE=!1;Bg.USE_ENUM_INDEX=!1;Bg.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";Pg.DEFAULT_RESOLVER=new Gt;Pg.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";nc.BLOCK_SIZE=16;Li.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";Li.BYTES=Oa.ofString(Li.CHARS);Eh.BLOCK_SIZE=16;cc.AES_BLOCK_SIZE=16;cc.NONCE_SIZE=12;cc.E=new Hb(-520093696,
0);qf.i64tmp=new Hb(0,0);qf.helper=new DataView(new ArrayBuffer(8));zl.escapes=function(a){a=new G;a.h.lt="<";a.h.gt=">";a.h.amp="&";a.h.quot='"';a.h.apos="'";return a}(this);Qg.LEN_EXTRA_BITS_TBL=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1];Qg.LEN_BASE_VAL_TBL=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258];Qg.DIST_EXTRA_BITS_TBL=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1];Qg.DIST_BASE_VAL_TBL=[1,2,3,4,5,
7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];Qg.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];wn.p1=0;wn.tokenMin=0;wn.tokenMax=0;Zb.OPTION_REVOKE_URL=1;Zb.activeRequests=0;Zb.requestLimit=17;Zb.requestQueue=new hb;Lm.PROTOTYPE_FIELD="__prototype__";Lm.SKIP_FIELD="__skipPrototype__";Lm.RESTORE_FIELD="__restoreFlag__";$b.__current=new $b(wa.location.href);$b.__isWorker=typeof window=="undefined";$b.__messages=new hb;$b.__resolveMethods=
new hb;$b.__workerCount=0;xc.dummyCharacter="\u007f";xc.windowID=0;rj.DICTIONARY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");rj.EXTENDED_DICTIONARY=function(a){a=[];for(var b=0,c=rj.DICTIONARY;b<c.length;){var d=c[b];++b;for(var f=0,g=rj.DICTIONARY;f<g.length;){var h=g[f];++f;a.push(d+h)}}return a}(this);$h.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,
405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,
383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1];$h.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,
15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,
16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9];A.DEPTH_BUFFER_BIT=256;A.STENCIL_BUFFER_BIT=1024;A.COLOR_BUFFER_BIT=16384;A.POINTS=0;A.LINES=1;A.LINE_LOOP=2;A.LINE_STRIP=3;A.TRIANGLES=4;A.TRIANGLE_STRIP=5;A.TRIANGLE_FAN=6;A.ZERO=0;A.ONE=1;A.SRC_COLOR=768;A.ONE_MINUS_SRC_COLOR=769;A.SRC_ALPHA=770;A.ONE_MINUS_SRC_ALPHA=771;A.DST_ALPHA=772;A.ONE_MINUS_DST_ALPHA=773;A.DST_COLOR=774;A.ONE_MINUS_DST_COLOR=775;A.SRC_ALPHA_SATURATE=776;A.FUNC_ADD=32774;A.BLEND_EQUATION=
32777;A.BLEND_EQUATION_RGB=32777;A.BLEND_EQUATION_ALPHA=34877;A.FUNC_SUBTRACT=32778;A.FUNC_REVERSE_SUBTRACT=32779;A.BLEND_DST_RGB=32968;A.BLEND_SRC_RGB=32969;A.BLEND_DST_ALPHA=32970;A.BLEND_SRC_ALPHA=32971;A.CONSTANT_COLOR=32769;A.ONE_MINUS_CONSTANT_COLOR=32770;A.CONSTANT_ALPHA=32771;A.ONE_MINUS_CONSTANT_ALPHA=32772;A.BLEND_COLOR=32773;A.ARRAY_BUFFER=34962;A.ELEMENT_ARRAY_BUFFER=34963;A.ARRAY_BUFFER_BINDING=34964;A.ELEMENT_ARRAY_BUFFER_BINDING=34965;A.STREAM_DRAW=35040;A.STATIC_DRAW=35044;A.DYNAMIC_DRAW=
35048;A.BUFFER_SIZE=34660;A.BUFFER_USAGE=34661;A.CURRENT_VERTEX_ATTRIB=34342;A.FRONT=1028;A.BACK=1029;A.FRONT_AND_BACK=1032;A.CULL_FACE=2884;A.BLEND=3042;A.DITHER=3024;A.STENCIL_TEST=2960;A.DEPTH_TEST=2929;A.SCISSOR_TEST=3089;A.POLYGON_OFFSET_FILL=32823;A.SAMPLE_ALPHA_TO_COVERAGE=32926;A.SAMPLE_COVERAGE=32928;A.NO_ERROR=0;A.INVALID_ENUM=1280;A.INVALID_VALUE=1281;A.INVALID_OPERATION=1282;A.OUT_OF_MEMORY=1285;A.CW=2304;A.CCW=2305;A.LINE_WIDTH=2849;A.ALIASED_POINT_SIZE_RANGE=33901;A.ALIASED_LINE_WIDTH_RANGE=
33902;A.CULL_FACE_MODE=2885;A.FRONT_FACE=2886;A.DEPTH_RANGE=2928;A.DEPTH_WRITEMASK=2930;A.DEPTH_CLEAR_VALUE=2931;A.DEPTH_FUNC=2932;A.STENCIL_CLEAR_VALUE=2961;A.STENCIL_FUNC=2962;A.STENCIL_FAIL=2964;A.STENCIL_PASS_DEPTH_FAIL=2965;A.STENCIL_PASS_DEPTH_PASS=2966;A.STENCIL_REF=2967;A.STENCIL_VALUE_MASK=2963;A.STENCIL_WRITEMASK=2968;A.STENCIL_BACK_FUNC=34816;A.STENCIL_BACK_FAIL=34817;A.STENCIL_BACK_PASS_DEPTH_FAIL=34818;A.STENCIL_BACK_PASS_DEPTH_PASS=34819;A.STENCIL_BACK_REF=36003;A.STENCIL_BACK_VALUE_MASK=
36004;A.STENCIL_BACK_WRITEMASK=36005;A.VIEWPORT=2978;A.SCISSOR_BOX=3088;A.COLOR_CLEAR_VALUE=3106;A.COLOR_WRITEMASK=3107;A.UNPACK_ALIGNMENT=3317;A.PACK_ALIGNMENT=3333;A.MAX_TEXTURE_SIZE=3379;A.MAX_VIEWPORT_DIMS=3386;A.SUBPIXEL_BITS=3408;A.RED_BITS=3410;A.GREEN_BITS=3411;A.BLUE_BITS=3412;A.ALPHA_BITS=3413;A.DEPTH_BITS=3414;A.STENCIL_BITS=3415;A.POLYGON_OFFSET_UNITS=10752;A.POLYGON_OFFSET_FACTOR=32824;A.TEXTURE_BINDING_2D=32873;A.SAMPLE_BUFFERS=32936;A.SAMPLES=32937;A.SAMPLE_COVERAGE_VALUE=32938;A.SAMPLE_COVERAGE_INVERT=
32939;A.NUM_COMPRESSED_TEXTURE_FORMATS=34466;A.COMPRESSED_TEXTURE_FORMATS=34467;A.DONT_CARE=4352;A.FASTEST=4353;A.NICEST=4354;A.GENERATE_MIPMAP_HINT=33170;A.BYTE=5120;A.UNSIGNED_BYTE=5121;A.SHORT=5122;A.UNSIGNED_SHORT=5123;A.INT=5124;A.UNSIGNED_INT=5125;A.FLOAT=5126;A.DEPTH_COMPONENT=6402;A.ALPHA=6406;A.RGB=6407;A.RGBA=6408;A.LUMINANCE=6409;A.LUMINANCE_ALPHA=6410;A.UNSIGNED_SHORT_4_4_4_4=32819;A.UNSIGNED_SHORT_5_5_5_1=32820;A.UNSIGNED_SHORT_5_6_5=33635;A.FRAGMENT_SHADER=35632;A.VERTEX_SHADER=35633;
A.MAX_VERTEX_ATTRIBS=34921;A.MAX_VERTEX_UNIFORM_VECTORS=36347;A.MAX_VARYING_VECTORS=36348;A.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661;A.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660;A.MAX_TEXTURE_IMAGE_UNITS=34930;A.MAX_FRAGMENT_UNIFORM_VECTORS=36349;A.SHADER_TYPE=35663;A.DELETE_STATUS=35712;A.LINK_STATUS=35714;A.VALIDATE_STATUS=35715;A.ATTACHED_SHADERS=35717;A.ACTIVE_UNIFORMS=35718;A.ACTIVE_ATTRIBUTES=35721;A.SHADING_LANGUAGE_VERSION=35724;A.CURRENT_PROGRAM=35725;A.NEVER=512;A.LESS=513;A.EQUAL=514;A.LEQUAL=
515;A.GREATER=516;A.NOTEQUAL=517;A.GEQUAL=518;A.ALWAYS=519;A.KEEP=7680;A.REPLACE=7681;A.INCR=7682;A.DECR=7683;A.INVERT=5386;A.INCR_WRAP=34055;A.DECR_WRAP=34056;A.VENDOR=7936;A.RENDERER=7937;A.VERSION=7938;A.EXTENSIONS=7939;A.NEAREST=9728;A.LINEAR=9729;A.NEAREST_MIPMAP_NEAREST=9984;A.LINEAR_MIPMAP_NEAREST=9985;A.NEAREST_MIPMAP_LINEAR=9986;A.LINEAR_MIPMAP_LINEAR=9987;A.TEXTURE_MAG_FILTER=10240;A.TEXTURE_MIN_FILTER=10241;A.TEXTURE_WRAP_S=10242;A.TEXTURE_WRAP_T=10243;A.TEXTURE_2D=3553;A.TEXTURE=5890;
A.TEXTURE_CUBE_MAP=34067;A.TEXTURE_BINDING_CUBE_MAP=34068;A.TEXTURE_CUBE_MAP_POSITIVE_X=34069;A.TEXTURE_CUBE_MAP_NEGATIVE_X=34070;A.TEXTURE_CUBE_MAP_POSITIVE_Y=34071;A.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072;A.TEXTURE_CUBE_MAP_POSITIVE_Z=34073;A.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074;A.MAX_CUBE_MAP_TEXTURE_SIZE=34076;A.TEXTURE0=33984;A.TEXTURE1=33985;A.TEXTURE2=33986;A.TEXTURE3=33987;A.TEXTURE4=33988;A.TEXTURE5=33989;A.TEXTURE6=33990;A.TEXTURE7=33991;A.TEXTURE8=33992;A.TEXTURE9=33993;A.TEXTURE10=33994;A.TEXTURE11=
33995;A.TEXTURE12=33996;A.TEXTURE13=33997;A.TEXTURE14=33998;A.TEXTURE15=33999;A.TEXTURE16=34E3;A.TEXTURE17=34001;A.TEXTURE18=34002;A.TEXTURE19=34003;A.TEXTURE20=34004;A.TEXTURE21=34005;A.TEXTURE22=34006;A.TEXTURE23=34007;A.TEXTURE24=34008;A.TEXTURE25=34009;A.TEXTURE26=34010;A.TEXTURE27=34011;A.TEXTURE28=34012;A.TEXTURE29=34013;A.TEXTURE30=34014;A.TEXTURE31=34015;A.ACTIVE_TEXTURE=34016;A.REPEAT=10497;A.CLAMP_TO_EDGE=33071;A.MIRRORED_REPEAT=33648;A.FLOAT_VEC2=35664;A.FLOAT_VEC3=35665;A.FLOAT_VEC4=35666;
A.INT_VEC2=35667;A.INT_VEC3=35668;A.INT_VEC4=35669;A.BOOL=35670;A.BOOL_VEC2=35671;A.BOOL_VEC3=35672;A.BOOL_VEC4=35673;A.FLOAT_MAT2=35674;A.FLOAT_MAT3=35675;A.FLOAT_MAT4=35676;A.SAMPLER_2D=35678;A.SAMPLER_CUBE=35680;A.VERTEX_ATTRIB_ARRAY_ENABLED=34338;A.VERTEX_ATTRIB_ARRAY_SIZE=34339;A.VERTEX_ATTRIB_ARRAY_STRIDE=34340;A.VERTEX_ATTRIB_ARRAY_TYPE=34341;A.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922;A.VERTEX_ATTRIB_ARRAY_POINTER=34373;A.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975;A.IMPLEMENTATION_COLOR_READ_TYPE=
35738;A.IMPLEMENTATION_COLOR_READ_FORMAT=35739;A.VERTEX_PROGRAM_POINT_SIZE=34370;A.POINT_SPRITE=34913;A.COMPILE_STATUS=35713;A.LOW_FLOAT=36336;A.MEDIUM_FLOAT=36337;A.HIGH_FLOAT=36338;A.LOW_INT=36339;A.MEDIUM_INT=36340;A.HIGH_INT=36341;A.FRAMEBUFFER=36160;A.RENDERBUFFER=36161;A.RGBA4=32854;A.RGB5_A1=32855;A.RGB565=36194;A.DEPTH_COMPONENT16=33189;A.STENCIL_INDEX=6401;A.STENCIL_INDEX8=36168;A.DEPTH_STENCIL=34041;A.RENDERBUFFER_WIDTH=36162;A.RENDERBUFFER_HEIGHT=36163;A.RENDERBUFFER_INTERNAL_FORMAT=36164;
A.RENDERBUFFER_RED_SIZE=36176;A.RENDERBUFFER_GREEN_SIZE=36177;A.RENDERBUFFER_BLUE_SIZE=36178;A.RENDERBUFFER_ALPHA_SIZE=36179;A.RENDERBUFFER_DEPTH_SIZE=36180;A.RENDERBUFFER_STENCIL_SIZE=36181;A.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048;A.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049;A.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050;A.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051;A.COLOR_ATTACHMENT0=36064;A.DEPTH_ATTACHMENT=36096;A.STENCIL_ATTACHMENT=36128;A.DEPTH_STENCIL_ATTACHMENT=33306;A.NONE=0;A.FRAMEBUFFER_COMPLETE=
36053;A.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054;A.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055;A.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057;A.FRAMEBUFFER_UNSUPPORTED=36061;A.FRAMEBUFFER_BINDING=36006;A.RENDERBUFFER_BINDING=36007;A.MAX_RENDERBUFFER_SIZE=34024;A.INVALID_FRAMEBUFFER_OPERATION=1286;A.UNPACK_FLIP_Y_WEBGL=37440;A.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441;A.CONTEXT_LOST_WEBGL=37442;A.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443;A.BROWSER_DEFAULT_WEBGL=37444;A.READ_BUFFER=3074;A.UNPACK_ROW_LENGTH=
3314;A.UNPACK_SKIP_ROWS=3315;A.UNPACK_SKIP_PIXELS=3316;A.PACK_ROW_LENGTH=3330;A.PACK_SKIP_ROWS=3331;A.PACK_SKIP_PIXELS=3332;A.TEXTURE_BINDING_3D=32874;A.UNPACK_SKIP_IMAGES=32877;A.UNPACK_IMAGE_HEIGHT=32878;A.MAX_3D_TEXTURE_SIZE=32883;A.MAX_ELEMENTS_VERTICES=33E3;A.MAX_ELEMENTS_INDICES=33001;A.MAX_TEXTURE_LOD_BIAS=34045;A.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657;A.MAX_VERTEX_UNIFORM_COMPONENTS=35658;A.MAX_ARRAY_TEXTURE_LAYERS=35071;A.MIN_PROGRAM_TEXEL_OFFSET=35076;A.MAX_PROGRAM_TEXEL_OFFSET=35077;A.MAX_VARYING_COMPONENTS=
35659;A.FRAGMENT_SHADER_DERIVATIVE_HINT=35723;A.RASTERIZER_DISCARD=35977;A.VERTEX_ARRAY_BINDING=34229;A.MAX_VERTEX_OUTPUT_COMPONENTS=37154;A.MAX_FRAGMENT_INPUT_COMPONENTS=37157;A.MAX_SERVER_WAIT_TIMEOUT=37137;A.MAX_ELEMENT_INDEX=36203;A.RED=6403;A.RGB8=32849;A.RGBA8=32856;A.RGB10_A2=32857;A.TEXTURE_3D=32879;A.TEXTURE_WRAP_R=32882;A.TEXTURE_MIN_LOD=33082;A.TEXTURE_MAX_LOD=33083;A.TEXTURE_BASE_LEVEL=33084;A.TEXTURE_MAX_LEVEL=33085;A.TEXTURE_COMPARE_MODE=34892;A.TEXTURE_COMPARE_FUNC=34893;A.SRGB=35904;
A.SRGB8=35905;A.SRGB8_ALPHA8=35907;A.COMPARE_REF_TO_TEXTURE=34894;A.RGBA32F=34836;A.RGB32F=34837;A.RGBA16F=34842;A.RGB16F=34843;A.TEXTURE_2D_ARRAY=35866;A.TEXTURE_BINDING_2D_ARRAY=35869;A.R11F_G11F_B10F=35898;A.RGB9_E5=35901;A.RGBA32UI=36208;A.RGB32UI=36209;A.RGBA16UI=36214;A.RGB16UI=36215;A.RGBA8UI=36220;A.RGB8UI=36221;A.RGBA32I=36226;A.RGB32I=36227;A.RGBA16I=36232;A.RGB16I=36233;A.RGBA8I=36238;A.RGB8I=36239;A.RED_INTEGER=36244;A.RGB_INTEGER=36248;A.RGBA_INTEGER=36249;A.R8=33321;A.RG8=33323;A.R16F=
33325;A.R32F=33326;A.RG16F=33327;A.RG32F=33328;A.R8I=33329;A.R8UI=33330;A.R16I=33331;A.R16UI=33332;A.R32I=33333;A.R32UI=33334;A.RG8I=33335;A.RG8UI=33336;A.RG16I=33337;A.RG16UI=33338;A.RG32I=33339;A.RG32UI=33340;A.R8_SNORM=36756;A.RG8_SNORM=36757;A.RGB8_SNORM=36758;A.RGBA8_SNORM=36759;A.RGB10_A2UI=36975;A.TEXTURE_IMMUTABLE_FORMAT=37167;A.TEXTURE_IMMUTABLE_LEVELS=33503;A.UNSIGNED_INT_2_10_10_10_REV=33640;A.UNSIGNED_INT_10F_11F_11F_REV=35899;A.UNSIGNED_INT_5_9_9_9_REV=35902;A.FLOAT_32_UNSIGNED_INT_24_8_REV=
36269;A.UNSIGNED_INT_24_8=34042;A.HALF_FLOAT=5131;A.RG=33319;A.RG_INTEGER=33320;A.INT_2_10_10_10_REV=36255;A.CURRENT_QUERY=34917;A.QUERY_RESULT=34918;A.QUERY_RESULT_AVAILABLE=34919;A.ANY_SAMPLES_PASSED=35887;A.ANY_SAMPLES_PASSED_CONSERVATIVE=36202;A.MAX_DRAW_BUFFERS=34852;A.DRAW_BUFFER0=34853;A.DRAW_BUFFER1=34854;A.DRAW_BUFFER2=34855;A.DRAW_BUFFER3=34856;A.DRAW_BUFFER4=34857;A.DRAW_BUFFER5=34858;A.DRAW_BUFFER6=34859;A.DRAW_BUFFER7=34860;A.DRAW_BUFFER8=34861;A.DRAW_BUFFER9=34862;A.DRAW_BUFFER10=34863;
A.DRAW_BUFFER11=34864;A.DRAW_BUFFER12=34865;A.DRAW_BUFFER13=34866;A.DRAW_BUFFER14=34867;A.DRAW_BUFFER15=34868;A.MAX_COLOR_ATTACHMENTS=36063;A.COLOR_ATTACHMENT1=36065;A.COLOR_ATTACHMENT2=36066;A.COLOR_ATTACHMENT3=36067;A.COLOR_ATTACHMENT4=36068;A.COLOR_ATTACHMENT5=36069;A.COLOR_ATTACHMENT6=36070;A.COLOR_ATTACHMENT7=36071;A.COLOR_ATTACHMENT8=36072;A.COLOR_ATTACHMENT9=36073;A.COLOR_ATTACHMENT10=36074;A.COLOR_ATTACHMENT11=36075;A.COLOR_ATTACHMENT12=36076;A.COLOR_ATTACHMENT13=36077;A.COLOR_ATTACHMENT14=
36078;A.COLOR_ATTACHMENT15=36079;A.SAMPLER_3D=35679;A.SAMPLER_2D_SHADOW=35682;A.SAMPLER_2D_ARRAY=36289;A.SAMPLER_2D_ARRAY_SHADOW=36292;A.SAMPLER_CUBE_SHADOW=36293;A.INT_SAMPLER_2D=36298;A.INT_SAMPLER_3D=36299;A.INT_SAMPLER_CUBE=36300;A.INT_SAMPLER_2D_ARRAY=36303;A.UNSIGNED_INT_SAMPLER_2D=36306;A.UNSIGNED_INT_SAMPLER_3D=36307;A.UNSIGNED_INT_SAMPLER_CUBE=36308;A.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311;A.MAX_SAMPLES=36183;A.SAMPLER_BINDING=35097;A.PIXEL_PACK_BUFFER=35051;A.PIXEL_UNPACK_BUFFER=35052;A.PIXEL_PACK_BUFFER_BINDING=
35053;A.PIXEL_UNPACK_BUFFER_BINDING=35055;A.COPY_READ_BUFFER=36662;A.COPY_WRITE_BUFFER=36663;A.COPY_READ_BUFFER_BINDING=36662;A.COPY_WRITE_BUFFER_BINDING=36663;A.FLOAT_MAT2x3=35685;A.FLOAT_MAT2x4=35686;A.FLOAT_MAT3x2=35687;A.FLOAT_MAT3x4=35688;A.FLOAT_MAT4x2=35689;A.FLOAT_MAT4x3=35690;A.UNSIGNED_INT_VEC2=36294;A.UNSIGNED_INT_VEC3=36295;A.UNSIGNED_INT_VEC4=36296;A.UNSIGNED_NORMALIZED=35863;A.SIGNED_NORMALIZED=36764;A.VERTEX_ATTRIB_ARRAY_INTEGER=35069;A.VERTEX_ATTRIB_ARRAY_DIVISOR=35070;A.TRANSFORM_FEEDBACK_BUFFER_MODE=
35967;A.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968;A.TRANSFORM_FEEDBACK_VARYINGS=35971;A.TRANSFORM_FEEDBACK_BUFFER_START=35972;A.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973;A.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976;A.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978;A.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979;A.INTERLEAVED_ATTRIBS=35980;A.SEPARATE_ATTRIBS=35981;A.TRANSFORM_FEEDBACK_BUFFER=35982;A.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983;A.TRANSFORM_FEEDBACK=36386;A.TRANSFORM_FEEDBACK_PAUSED=
36387;A.TRANSFORM_FEEDBACK_ACTIVE=36388;A.TRANSFORM_FEEDBACK_BINDING=36389;A.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296;A.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297;A.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298;A.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299;A.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300;A.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301;A.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=33302;A.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303;A.FRAMEBUFFER_DEFAULT=33304;A.DEPTH24_STENCIL8=35056;A.DRAW_FRAMEBUFFER_BINDING=36006;
A.READ_FRAMEBUFFER=36008;A.DRAW_FRAMEBUFFER=36009;A.READ_FRAMEBUFFER_BINDING=36010;A.RENDERBUFFER_SAMPLES=36011;A.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052;A.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182;A.UNIFORM_BUFFER=35345;A.UNIFORM_BUFFER_BINDING=35368;A.UNIFORM_BUFFER_START=35369;A.UNIFORM_BUFFER_SIZE=35370;A.MAX_VERTEX_UNIFORM_BLOCKS=35371;A.MAX_FRAGMENT_UNIFORM_BLOCKS=35373;A.MAX_COMBINED_UNIFORM_BLOCKS=35374;A.MAX_UNIFORM_BUFFER_BINDINGS=35375;A.MAX_UNIFORM_BLOCK_SIZE=35376;A.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=
35377;A.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379;A.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380;A.ACTIVE_UNIFORM_BLOCKS=35382;A.UNIFORM_TYPE=35383;A.UNIFORM_SIZE=35384;A.UNIFORM_BLOCK_INDEX=35386;A.UNIFORM_OFFSET=35387;A.UNIFORM_ARRAY_STRIDE=35388;A.UNIFORM_MATRIX_STRIDE=35389;A.UNIFORM_IS_ROW_MAJOR=35390;A.UNIFORM_BLOCK_BINDING=35391;A.UNIFORM_BLOCK_DATA_SIZE=35392;A.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394;A.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395;A.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396;
A.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398;A.OBJECT_TYPE=37138;A.SYNC_CONDITION=37139;A.SYNC_STATUS=37140;A.SYNC_FLAGS=37141;A.SYNC_FENCE=37142;A.SYNC_GPU_COMMANDS_COMPLETE=37143;A.UNSIGNALED=37144;A.SIGNALED=37145;A.ALREADY_SIGNALED=37146;A.TIMEOUT_EXPIRED=37147;A.CONDITION_SATISFIED=37148;A.WAIT_FAILED=37149;A.SYNC_FLUSH_COMMANDS_BIT=1;A.COLOR=6144;A.DEPTH=6145;A.STENCIL=6146;A.MIN=32775;A.MAX=32776;A.DEPTH_COMPONENT24=33190;A.STREAM_READ=35041;A.STREAM_COPY=35042;A.STATIC_READ=35045;A.STATIC_COPY=
35046;A.DYNAMIC_READ=35049;A.DYNAMIC_COPY=35050;A.DEPTH_COMPONENT32F=36012;A.DEPTH32F_STENCIL8=36013;A.INVALID_INDEX=-1;A.TIMEOUT_IGNORED=-1;A.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447;xf.__identity=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];wb.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];U.NONE=0;U.FALSE=0;U.TRUE=1;U.SOURCE_RELATIVE=514;U.CONE_INNER_ANGLE=4097;U.CONE_OUTER_ANGLE=4098;U.PITCH=4099;U.POSITION=4100;U.DIRECTION=4101;U.VELOCITY=4102;U.LOOPING=4103;U.BUFFER=4105;U.GAIN=4106;U.MIN_GAIN=4109;U.MAX_GAIN=
4110;U.ORIENTATION=4111;U.SOURCE_STATE=4112;U.INITIAL=4113;U.PLAYING=4114;U.PAUSED=4115;U.STOPPED=4116;U.BUFFERS_QUEUED=4117;U.BUFFERS_PROCESSED=4118;U.REFERENCE_DISTANCE=4128;U.ROLLOFF_FACTOR=4129;U.CONE_OUTER_GAIN=4130;U.MAX_DISTANCE=4131;U.SEC_OFFSET=4132;U.SAMPLE_OFFSET=4133;U.BYTE_OFFSET=4134;U.SOURCE_TYPE=4135;U.STATIC=4136;U.STREAMING=4137;U.UNDETERMINED=4144;U.FORMAT_MONO8=4352;U.FORMAT_MONO16=4353;U.FORMAT_STEREO8=4354;U.FORMAT_STEREO16=4355;U.FREQUENCY=8193;U.BITS=8194;U.CHANNELS=8195;U.SIZE=
8196;U.NO_ERROR=0;U.INVALID_NAME=40961;U.INVALID_ENUM=40962;U.INVALID_VALUE=40963;U.INVALID_OPERATION=40964;U.OUT_OF_MEMORY=40965;U.VENDOR=45057;U.VERSION=45058;U.RENDERER=45059;U.EXTENSIONS=45060;U.DOPPLER_FACTOR=49152;U.SPEED_OF_SOUND=49155;U.DOPPLER_VELOCITY=49153;U.DISTANCE_MODEL=53248;U.INVERSE_DISTANCE=53249;U.INVERSE_DISTANCE_CLAMPED=53250;U.LINEAR_DISTANCE=53251;U.LINEAR_DISTANCE_CLAMPED=53252;U.EXPONENT_DISTANCE=53253;U.EXPONENT_DISTANCE_CLAMPED=53254;U.METERS_PER_UNIT=131076;U.DIRECT_FILTER=
131077;U.AUXILIARY_SEND_FILTER=131078;U.AIR_ABSORPTION_FACTOR=131079;U.ROOM_ROLLOFF_FACTOR=131080;U.CONE_OUTER_GAINHF=131081;U.DIRECT_FILTER_GAINHF_AUTO=131082;U.AUXILIARY_SEND_FILTER_GAIN_AUTO=131083;U.AUXILIARY_SEND_FILTER_GAINHF_AUTO=131084;U.REVERB_DENSITY=1;U.REVERB_DIFFUSION=2;U.REVERB_GAIN=3;U.REVERB_GAINHF=4;U.REVERB_DECAY_TIME=5;U.REVERB_DECAY_HFRATIO=6;U.REVERB_REFLECTIONS_GAIN=7;U.REVERB_REFLECTIONS_DELAY=8;U.REVERB_LATE_REVERB_GAIN=9;U.REVERB_LATE_REVERB_DELAY=10;U.REVERB_AIR_ABSORPTION_GAINHF=
11;U.REVERB_ROOM_ROLLOFF_FACTOR=12;U.REVERB_DECAY_HFLIMIT=13;U.EAXREVERB_DENSITY=1;U.EAXREVERB_DIFFUSION=2;U.EAXREVERB_GAIN=3;U.EAXREVERB_GAINHF=4;U.EAXREVERB_GAINLF=5;U.EAXREVERB_DECAY_TIME=6;U.EAXREVERB_DECAY_HFRATIO=7;U.EAXREVERB_DECAY_LFRATIO=8;U.EAXREVERB_REFLECTIONS_GAIN=9;U.EAXREVERB_REFLECTIONS_DELAY=10;U.EAXREVERB_REFLECTIONS_PAN=11;U.EAXREVERB_LATE_REVERB_GAIN=12;U.EAXREVERB_LATE_REVERB_DELAY=13;U.EAXREVERB_LATE_REVERB_PAN=14;U.EAXREVERB_ECHO_TIME=15;U.EAXREVERB_ECHO_DEPTH=16;U.EAXREVERB_MODULATION_TIME=
17;U.EAXREVERB_MODULATION_DEPTH=18;U.EAXREVERB_AIR_ABSORPTION_GAINHF=19;U.EAXREVERB_HFREFERENCE=20;U.EAXREVERB_LFREFERENCE=21;U.EAXREVERB_ROOM_ROLLOFF_FACTOR=22;U.EAXREVERB_DECAY_HFLIMIT=23;U.CHORUS_WAVEFORM=1;U.CHORUS_PHASE=2;U.CHORUS_RATE=3;U.CHORUS_DEPTH=4;U.CHORUS_FEEDBACK=5;U.CHORUS_DELAY=6;U.DISTORTION_EDGE=1;U.DISTORTION_GAIN=2;U.DISTORTION_LOWPASS_CUTOFF=3;U.DISTORTION_EQCENTER=4;U.DISTORTION_EQBANDWIDTH=5;U.ECHO_DELAY=1;U.ECHO_LRDELAY=2;U.ECHO_DAMPING=3;U.ECHO_FEEDBACK=4;U.ECHO_SPREAD=5;
U.FLANGER_WAVEFORM=1;U.FLANGER_PHASE=2;U.FLANGER_RATE=3;U.FLANGER_DEPTH=4;U.FLANGER_FEEDBACK=5;U.FLANGER_DELAY=6;U.FREQUENCY_SHIFTER_FREQUENCY=1;U.FREQUENCY_SHIFTER_LEFT_DIRECTION=2;U.FREQUENCY_SHIFTER_RIGHT_DIRECTION=3;U.VOCAL_MORPHER_PHONEMEA=1;U.VOCAL_MORPHER_PHONEMEA_COARSE_TUNING=2;U.VOCAL_MORPHER_PHONEMEB=3;U.VOCAL_MORPHER_PHONEMEB_COARSE_TUNING=4;U.VOCAL_MORPHER_WAVEFORM=5;U.VOCAL_MORPHER_RATE=6;U.PITCH_SHIFTER_COARSE_TUNE=1;U.PITCH_SHIFTER_FINE_TUNE=2;U.RING_MODULATOR_FREQUENCY=1;U.RING_MODULATOR_HIGHPASS_CUTOFF=
2;U.RING_MODULATOR_WAVEFORM=3;U.AUTOWAH_ATTACK_TIME=1;U.AUTOWAH_RELEASE_TIME=2;U.AUTOWAH_RESONANCE=3;U.AUTOWAH_PEAK_GAIN=4;U.COMPRESSOR_ONOFF=1;U.EQUALIZER_LOW_GAIN=1;U.EQUALIZER_LOW_CUTOFF=2;U.EQUALIZER_MID1_GAIN=3;U.EQUALIZER_MID1_CENTER=4;U.EQUALIZER_MID1_WIDTH=5;U.EQUALIZER_MID2_GAIN=6;U.EQUALIZER_MID2_CENTER=7;U.EQUALIZER_MID2_WIDTH=8;U.EQUALIZER_HIGH_GAIN=9;U.EQUALIZER_HIGH_CUTOFF=10;U.EFFECT_FIRST_PARAMETER=0;U.EFFECT_LAST_PARAMETER=32768;U.EFFECT_TYPE=32769;U.EFFECT_NULL=0;U.EFFECT_EAXREVERB=
32768;U.EFFECT_REVERB=1;U.EFFECT_CHORUS=2;U.EFFECT_DISTORTION=3;U.EFFECT_ECHO=4;U.EFFECT_FLANGER=5;U.EFFECT_FREQUENCY_SHIFTER=6;U.EFFECT_VOCAL_MORPHER=7;U.EFFECT_PITCH_SHIFTER=8;U.EFFECT_RING_MODULATOR=9;U.FFECT_AUTOWAH=10;U.EFFECT_AUTOWAH=10;U.EFFECT_COMPRESSOR=11;U.EFFECT_EQUALIZER=12;U.EFFECTSLOT_EFFECT=1;U.EFFECTSLOT_GAIN=2;U.EFFECTSLOT_AUXILIARY_SEND_AUTO=3;U.LOWPASS_GAIN=1;U.LOWPASS_GAINHF=2;U.HIGHPASS_GAIN=1;U.HIGHPASS_GAINLF=2;U.BANDPASS_GAIN=1;U.BANDPASS_GAINLF=2;U.BANDPASS_GAINHF=3;U.FILTER_FIRST_PARAMETER=
0;U.FILTER_LAST_PARAMETER=32768;U.FILTER_TYPE=32769;U.FILTER_NULL=0;U.FILTER_LOWPASS=1;U.FILTER_HIGHPASS=2;U.FILTER_BANDPASS=3;Pc.FALSE=0;Pc.TRUE=1;Pc.FREQUENCY=4103;Pc.REFRESH=4104;Pc.SYNC=4105;Pc.MONO_SOURCES=4112;Pc.STEREO_SOURCES=4113;Pc.NO_ERROR=0;Pc.INVALID_DEVICE=40961;Pc.INVALID_CONTEXT=40962;Pc.INVALID_ENUM=40963;Pc.INVALID_VALUE=40964;Pc.OUT_OF_MEMORY=40965;Pc.ATTRIBUTES_SIZE=4098;Pc.ALL_ATTRIBUTES=4099;Pc.DEFAULT_DEVICE_SPECIFIER=4100;Pc.DEVICE_SPECIFIER=4101;Pc.EXTENSIONS=4102;Pc.ENUMERATE_ALL_EXT=
1;Pc.DEFAULT_ALL_DEVICES_SPECIFIER=4114;Pc.ALL_DEVICES_SPECIFIER=4115;Pe.onUpdate=new jf;Pe.__updated=!1;sg.alreadyCreated=new G;sg.initialized=!1;aj.sensorByID=new Od;aj.sensors=[];Rb.__directories=new Od;af.workLoad=.5;af.__totalWorkPriority=0;jo.nextID=0;sf.devices=new Od;sf.onConnect=new Sx;Te.devices=new Od;Te.onConnect=new Tx;Ac.NONE=0;Ac.LEFT_SHIFT=1;Ac.RIGHT_SHIFT=2;Ac.LEFT_CTRL=64;Ac.RIGHT_CTRL=128;Ac.LEFT_ALT=256;Ac.RIGHT_ALT=512;Ac.LEFT_META=1024;Ac.RIGHT_META=2048;Ac.NUM_LOCK=4096;Ac.CAPS_LOCK=
8192;Ac.MODE=16384;Ac.CTRL=192;Ac.SHIFT=3;Ac.ALT=768;Ac.META=3072;Ue.onCancel=new ho;Ue.onEnd=new ho;Ue.onMove=new ho;Ue.onStart=new ho;mb.cache=new cy;mb.onChange=new jf;mb.bundlePaths=new G;mb.libraries=new G;mb.libraryPaths=new G;el.BYTES_PER_ELEMENT=4;Vb.throwErrors=!0;Jd.TEXT_CHANGE="textChange";Jd.ORIGIN_LOCAL="local";Jd.ORIGIN_UNDO="undo";Jd.ORIGIN_REMOTE="remote";Il.SELECTION_CHANGE="selectionChange";wf.TOGGLE_BREAKPOINT="toggleBreakpoint";wf.SELECT_LINE="selectLine";hp.CHUNK_TIMESPAN=16;
xh.SCROLL_THRESHOLD=10;xh.SCROLL_INTERVAL=60;xb.CSS_TEXT=0;xb.CSS_PROPERTY=1;xb.CSS_VALUE=2;xb.CSS_STRING1=3;xb.CSS_STRING2=4;xb.CSS_STRING3=5;xb.CSS_STRING4=6;xb.CSS_COMMENT1=7;xb.CSS_COMMENT2=8;xb.CSS_COMMENT3=9;xb.CSS_MEDIA=10;xb.CSS_BRACEOPEN=11;xb.CSS_BRACECLOSE=12;xb.CSS_COLON1=13;xb.CSS_COLON2=14;xb.CSS_COLON3=15;xb.CSS_COLOR=16;xb.CSS_NUMBER=17;bd.JS_CODE=1;bd.JS_STRING1=2;bd.JS_STRING2=3;bd.JS_COMMENT=4;bd.JS_MULTILINE_COMMENT=5;bd.JS_REGULAR_EXPRESSION=6;bd.JS_NULL_KEYWORD=7;bd.JS_UNDEFINED_KEYWORD=
8;bd.JS_BOOLEAN_KEYWORD=7;bd.JS_KEYWORD=10;bd.JS_VAR_KEYWORD=11;bd.JS_FUNCTION_KEYWORD=12;bd.JS_TYPE_KEYWORD=13;In.TEXT=0;Kd.DEFAULT_NON_WORD_CHARACTERS=" \t.:;,?+-*/%=!&|()[]{}<>".split("");jk.easeIn=new mu;jk.easeInOut=new nu;jk.easeOut=new ou;Ca.defaultActuator=Td;Ca.defaultEase=jk.easeOut;Ca.targetLibraries=new Ta;Qk.easeIn=new lq;Qk.easeInOut=new tu;Qk.easeOut=new mq;Rk.easeIn=new uu;Rk.easeInOut=new vu;Rk.easeOut=new wu;hj.easeIn=new nq(.1,.4);hj.easeInOut=new oq(.1,.4);hj.easeOut=new pq(.1,
.4);Ni.easeIn=new yu;Ni.easeInOut=new zu;Ni.easeOut=new Au;th.easeIn=new Bu;th.easeInOut=new Cu;th.easeOut=new Du;Sk.easeIn=new Eu;Sk.easeInOut=new Fu;Sk.easeOut=new Gu;Tk.easeIn=new Hu;Tk.easeInOut=new Iu;Tk.easeOut=new Ju;Pa.__lastTimerID=0;Pa.__sentWarnings=new G;Pa.__timers=new Od;Pa.__registeredClassAliases=new G;Pa.__registeredClasses=Zz.toUtilsObjectMap(null);hl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};dj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};ej.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};cj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Fi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{concat:{SuppressWarnings:["checkstyle:Dynamic"]},toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ui.__meta__={fields:{setDataHandler:{SuppressWarnings:["checkstyle:Dynamic"]}}};Lo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ia.__pool=new dc(function(){return new Ia},function(a){a.setTo(0,0,0,0)});Dc.__meta__={fields:{image:{SuppressWarnings:["checkstyle:Dynamic"]},__framebufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},
__indexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},__surface:{SuppressWarnings:["checkstyle:Dynamic"]},__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__vertexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},compare:{SuppressWarnings:["checkstyle:Dynamic"]},getSurface:{SuppressWarnings:["checkstyle:Dynamic"]},__fromImage:{SuppressWarnings:["checkstyle:Dynamic"]}}};Dc.VERTEX_BUFFER_STRIDE=14;Dc.__tempVector=new Uf;Dc.__fillRectRectangle=new Ia;Gh.__meta__={fields:{__context:{SuppressWarnings:["checkstyle:Dynamic"]},
__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};Lu.__meta__={fields:{cairo:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix3:{SuppressWarnings:["checkstyle:Dynamic"]},applyMatrix:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeCairo:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};il.__meta__={fields:{context:{SuppressWarnings:["checkstyle:Dynamic"]},applySmoothing:{SuppressWarnings:["checkstyle:Dynamic"]},setTransform:{SuppressWarnings:["checkstyle:Dynamic"]},
__setBlendModeContext:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};iz.NONE=0;iz.ROUND=1;iz.SQUARE=2;Pu.__meta__={fields:{__element:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};rq.__meta__={fields:{element:{SuppressWarnings:["checkstyle:Dynamic"]},applyStyle:{SuppressWarnings:["checkstyle:Dynamic"]},clearStyle:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};bi.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Jc.__missingFontWarning=new G;Mh.__meta__={fields:{overrideBlendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};ro.SIN45=.7071067811865476;ro.TAN22=.41421356237309503;lz.BEVEL=0;lz.MITER=1;lz.ROUND=2;Vf.__meta__={fields:{__dispatchError:{SuppressWarnings:["checkstyle:Dynamic"]},Loader_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};Xj.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};Xj.__rootURL=
dl.get_supported()?window.document.URL:"";yc.__meta__={fields:{gl:{SuppressWarnings:["checkstyle:Dynamic"]},__gl:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix:{SuppressWarnings:["checkstyle:Dynamic"]},__projection:{SuppressWarnings:["checkstyle:Dynamic"]},__projectionFlipped:{SuppressWarnings:["checkstyle:Dynamic"]},getMatrix:{SuppressWarnings:["checkstyle:Dynamic"]}}};yc.__alphaValue=[1];yc.__colorMultipliersValue=[0,0,0,0];yc.__colorOffsetsValue=[0,0,0,0];yc.__defaultColorMultipliersValue=
[1,1,1,1];yc.__emptyColorValue=[0,0,0,0];yc.__emptyAlphaValue=[1];yc.__hasColorTransformValue=[!1];yc.__scissorRectangle=new Ia;yc.__textureSizeValue=[0,0];Tq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};iv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Su.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};qo.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},
name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};gd.__meta__={fields:{__broadcastEvent:{SuppressWarnings:["checkstyle:Dynamic"]},__dispatchEvent:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchStack:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchTarget:{SuppressWarnings:["checkstyle:Dynamic"]},__handleError:{SuppressWarnings:["checkstyle:Dynamic"]}}};Yl.__meta__={fields:{data:{SuppressWarnings:["checkstyle:Dynamic"]}}};jv.__meta__=
{obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};qq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};wo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};kv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};lv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};mv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};nv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
ov.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ym.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};po.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Wl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};lh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};lh.empty=new lh;C.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
statics:{windingRule:{SuppressWarnings:["checkstyle:Dynamic"]},createBitmapFill:{SuppressWarnings:["checkstyle:Dynamic"]},createGradientPattern:{SuppressWarnings:["checkstyle:Dynamic"]}}};C.SIN45=.7071067811865476;C.TAN22=.41421356237309503;C.fillCommands=new lh;C.strokeCommands=new lh;xz.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};oa.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};vj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Sm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};gm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};gm.MAX_INDEX_BUFFER_LENGTH=65535;gm.MAX_QUADS_PER_INDEX_BUFFER=10922;gm.MAX_QUAD_INDEX_BUFFER_LENGTH=65532;kl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ha.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ha.blankBitmapData=new Dc(1,1,!1,0);Ha.tempColorTransform=
new wc(1,1,1,1,0,0,0,0);Ha.tempVerticesVector=tb.toFloatVector(null);Ha.tempIndicesVector=tb.toIntVector(null);Ha.tempUvtVector=tb.toFloatVector(null);Tm.opaqueBitmapData=new Dc(1,1,!1,0);Dj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ll.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ka.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Wi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Wi.__textureSizeValue=[0,0];Yd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
jh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};kh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};kh.__regexColor=new Wa("color=(\"#([^\"]+)\"|'#([^']+)')","i");kh.__regexFace=new Wa("face=(\"([^\"]+)\"|'([^']+)')","i");kh.__regexFont=new Wa("<font ([^>]+)>","gi");kh.__regexCloseFont=new Wa("</font>","gi");kh.__regexSize=new Wa("size=(\"([^\"]+)\"|'([^']+)')","i");wk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
jl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};wj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{obj:{SuppressWarnings:["checkstyle:Dynamic"]}}};hm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};hn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};hn.alphaColorTransform=new wc;hn.bitmap=new Ma;hn.destPoint=new Ea;hn.sourceRect=new Ia;Qm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{P:{SuppressWarnings:["checkstyle:ConstantName"]}}};
Qm.P=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,
82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,
240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,
70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];jn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vu.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Gq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};dk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};dk.drawCallsCounters=function(a){a=new Od;var b=new Gq;a.h[0]=b;b=new Gq;a.h[1]=b;return a}(this);$c.supportsVideoTexture=!0;$c.__glDepthStencil=-1;$c.__glMaxTextureMaxAnisotropy=-1;$c.__glMaxViewportDims=-1;$c.__glMemoryCurrentAvailable=-1;$c.__glMemoryTotalAvailable=-1;$c.__glTextureMaxAnisotropy=-1;Cz.DYNAMIC_DRAW=0;Cz.STATIC_DRAW=1;Dz.FRAGMENT=0;Dz.VERTEX=1;Jq.BGR_PACKED=
0;Jq.BGRA=1;Jq.BGRA_PACKED=2;Jq.COMPRESSED=3;Jq.COMPRESSED_ALPHA=4;Jq.RGBA_HALF_FLOAT=5;xv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yg.limitedProfile=!0;Do.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};yv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Eo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
ln.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Lq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Hq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};pd.__meta__={fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};kn.__lowMemoryMode=!1;Sd.DEFAULT_TO_STRING="Error";vl.ACTIVITY="activity";Dg.LINK="link";Dg.TEXT_INPUT="textInput";tg.ERROR="error";Mq.ASYNC_ERROR="asyncError";
mn.DATA="data";mn.UPLOAD_COMPLETE_DATA="uploadCompleteData";Mo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};mm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};mm.supportsWeakReference=Object.prototype.hasOwnProperty.call(wa,"WeakRef");yj.FOCUS_IN="focusIn";yj.FOCUS_OUT="focusOut";yj.KEY_FOCUS_CHANGE="keyFocusChange";yj.MOUSE_FOCUS_CHANGE="mouseFocusChange";Ej.FULL_SCREEN="fullScreen";Ej.FULL_SCREEN_INTERACTIVE_ACCEPTED="fullScreenInteractiveAccepted";Jk.DEVICE_ADDED=
"deviceAdded";Jk.DEVICE_REMOVED="deviceRemoved";Jk.DEVICE_UNUSABLE="deviceUnusable";im.HTTP_RESPONSE_STATUS="httpResponseStatus";im.HTTP_STATUS="httpStatus";Oh.IO_ERROR="ioError";Vm.KEY_DOWN="keyDown";Vm.KEY_UP="keyUp";Ic.CLICK="click";Ic.DOUBLE_CLICK="doubleClick";Ic.MIDDLE_CLICK="middleClick";Ic.MIDDLE_MOUSE_DOWN="middleMouseDown";Ic.MIDDLE_MOUSE_UP="middleMouseUp";Ic.MOUSE_DOWN="mouseDown";Ic.MOUSE_MOVE="mouseMove";Ic.MOUSE_OUT="mouseOut";Ic.MOUSE_OVER="mouseOver";Ic.MOUSE_UP="mouseUp";Ic.MOUSE_WHEEL=
"mouseWheel";Ic.RELEASE_OUTSIDE="releaseOutside";Ic.RIGHT_CLICK="rightClick";Ic.RIGHT_MOUSE_DOWN="rightMouseDown";Ic.RIGHT_MOUSE_UP="rightMouseUp";Ic.ROLL_OUT="rollOut";Ic.ROLL_OVER="rollOver";nn.NET_STATUS="netStatus";sh.PROGRESS="progress";sh.SOCKET_DATA="socketData";fk.CLEAR_DOM="clearDOM";fk.RENDER_CAIRO="renderCairo";fk.RENDER_CANVAS="renderCanvas";fk.RENDER_DOM="renderDOM";fk.RENDER_OPENGL="renderOpenGL";Fo.SAMPLE_DATA="sampleData";ym.SECURITY_ERROR="securityError";Wm.ORIENTATION_CHANGE="orientationChange";
Wm.ORIENTATION_CHANGING="orientationChanging";wl.TIMER="timer";wl.TIMER_COMPLETE="timerComplete";Sf.__meta__={fields:{delta:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Sf.TOUCH_BEGIN="touchBegin";Sf.TOUCH_END="touchEnd";Sf.TOUCH_MOVE="touchMove";Sf.TOUCH_OUT="touchOut";Sf.TOUCH_OVER="touchOver";Sf.TOUCH_ROLL_OUT="touchRollOut";Sf.TOUCH_ROLL_OVER="touchRollOver";Sf.TOUCH_TAP="touchTap";xl.UNCAUGHT_ERROR="uncaughtError";Go.available=!0;Go.marshallExceptions=!1;ij.__blurShader=new zv;Cl.__hideShader=
new Av;ke.__invertAlphaShader=new Gv;ke.__blurAlphaShader=new Bv;ke.__combineShader=new Dv;ke.__innerCombineShader=new Fv;ke.__combineKnockoutShader=new Cv;ke.__innerCombineKnockoutShader=new Ev;Rm.__meta__={fields:{blendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Cf.__meta__={statics:{create2D:{SuppressWarnings:["checkstyle:FieldDocComment"]},createABCD:{SuppressWarnings:["checkstyle:FieldDocComment"]},createOrtho:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};on.DEFAULT="i-default";
on.RTL_LANGUAGES="ae ar arc bcc bqi ckb dv fa glk he ku mzn nqo pnb ps sd ug ur yi".split(" ");ki.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};te.MAX_ACTIVE_CHANNELS=32;te.__soundChannels=[];te.__soundTransform=new ki;Wo.VERTEX_BUFFER_STRIDE=5;zn.__meta__={statics:{CONNECT_SUCCESS:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};zn.CONNECT_SUCCESS="NetConnection.Connect.Success";Xo.__meta__={fields:{audioCodec:{SuppressWarnings:["checkstyle:FieldDocComment"]},decodedFrames:{SuppressWarnings:["checkstyle:FieldDocComment"]},
speed:{SuppressWarnings:["checkstyle:FieldDocComment"]},requestVideoStatus:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Xe.defaultObjectEncoding=10;jm.followRedirects=!0;jm.idleTimeout=0;jm.manageCookies=!0;vn.__meta__={statics:{__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};to.currentDomain=new to(null);vd.avHardwareDisable=!0;vd.hasAccessibility=!1;vd.hasAudio=!0;vd.hasAudioEncoder=!1;vd.hasEmbeddedVideo=!1;vd.hasIME=!1;vd.hasMP3=
!1;vd.hasPrinting=!0;vd.hasScreenBroadcast=!1;vd.hasScreenPlayback=!1;vd.hasStreamingAudio=!1;vd.hasStreamingVideo=!1;vd.hasTLS=!0;vd.hasVideoEncoder=!0;vd.isDebugger=!1;vd.isEmbeddedInAcrobat=!1;vd.localFileReadDisable=!0;vd.maxLevelIDC=0;vd.playerType="PlugIn";vd.screenColor="color";vd.serverString="";vd.supports32BitProcesses=!1;vd.supports64BitProcesses=!1;vd.touchscreenType=0;vd.__standardDensities=[120,160,240,320,480,640,800,960];Oq.__meta__={obj:{SuppressWarnings:["checkstyle:UnnecessaryConstructor"]}};
Oq.currentDomain=new Oq;me.__fontByName=new G;me.__registeredFonts=[];ef.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Nk.CENTER=0;Nk.END=1;Nk.JUSTIFY=2;Nk.LEFT=3;Nk.RIGHT=4;Nk.START=5;Pq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Gy.__meta__={obj:{SuppressWarnings:[["checkstyle:FieldDocComment","checkstyle:Dynamic"]]}};jc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};jc.__regexAlign=new Wa("align\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");jc.__regexBreakTag=new Wa("<br\\s*/?>","gi");jc.__regexBlockIndent=new Wa("blockindent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexClass=new Wa("class\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexColor=new Wa("color\\s?=\\s?(\"#([^\"]+)\"|'#([^']+)')","i");jc.__regexEntityApos=new Wa("&apos;","g");jc.__regexEntityNbsp=new Wa("&nbsp;","g");jc.__regexCharEntity=new Wa("&#(?:([0-9]+)|(x[0-9a-fA-F]+));","g");jc.__regexFace=new Wa("face\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexHTMLTag=
new Wa("<.*?>","g");jc.__regexHref=new Wa("href\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexIndent=new Wa(" indent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexLeading=new Wa("leading\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexLeftMargin=new Wa("leftmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexRightMargin=new Wa("rightmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexSize=new Wa("size\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");jc.__regexTabStops=new Wa("tabstops\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");Ho.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Wc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{__cairoFont:{SuppressWarnings:["checkstyle:Dynamic"]}}};Wc.GUTTER=2;Wc.UTF8_TAB=9;Wc.UTF8_ENDLINE=10;Wc.UTF8_SPACE=32;Wc.UTF8_HYPHEN=45;Qf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{glyphs:{SuppressWarnings:["checkstyle:Dynamic"]},__handle:{SuppressWarnings:["checkstyle:Dynamic"]},__hbBuffer:{SuppressWarnings:["checkstyle:Dynamic"]},
__hbFont:{SuppressWarnings:["checkstyle:Dynamic"]},get_glyphs:{SuppressWarnings:["checkstyle:Dynamic"]}}};Qf.FT_LOAD_DEFAULT=0;Qf.FT_LOAD_NO_SCALE=1;Qf.FT_LOAD_NO_HINTING=2;Qf.FT_LOAD_RENDER=4;Qf.FT_LOAD_NO_BITMAP=8;Qf.FT_LOAD_VERTICAL_LAYOUT=16;Qf.FT_LOAD_FORCE_AUTOHINT=32;Qf.FT_LOAD_CROP_BITMAP=64;Qf.FT_LOAD_PEDANTIC=128;Qf.FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH=256;Qf.FT_LOAD_NO_RECURSE=512;Qf.FT_LOAD_IGNORE_TRANSFORM=1024;Qf.FT_LOAD_MONOCHROME=2048;Qf.FT_LOAD_LINEAR_DESIGN=4096;Qf.FT_LOAD_NO_AUTOHINT=
8192;Qf.FT_LOAD_COLOR=16384;Qf.FT_LOAD_COMPUTE_METRICS=32768;Qf.FT_LOAD_BITMAP_METRICS_ONLY=65536;Qf.FT_LOAD_TARGET_NORMAL=0;Qf.FT_LOAD_TARGET_LIGHT=0;Hv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Tc.__meta__={fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};Tc.isSupported=!0;Tc.numDevices=0;Tc.__deviceList=[];Tc.__instances=[];Tc.__devices=new Ta;Iv.MAX_BUFFER_SIZE=32E3;Bb.__meta__={statics:{BREAK:{SuppressWarnings:["checkstyle:FieldDocComment"]},NUMLOCK:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
Bb.NUMBER_0=48;Bb.NUMBER_1=49;Bb.NUMBER_2=50;Bb.NUMBER_3=51;Bb.NUMBER_4=52;Bb.NUMBER_5=53;Bb.NUMBER_6=54;Bb.NUMBER_7=55;Bb.NUMBER_8=56;Bb.NUMBER_9=57;Bb.A=65;Bb.B=66;Bb.C=67;Bb.D=68;Bb.E=69;Bb.F=70;Bb.G=71;Bb.H=72;Bb.I=73;Bb.J=74;Bb.K=75;Bb.L=76;Bb.M=77;Bb.N=78;Bb.O=79;Bb.P=80;Bb.Q=81;Bb.R=82;Bb.S=83;Bb.T=84;Bb.U=85;Bb.V=86;Bb.W=87;Bb.X=88;Bb.Y=89;Bb.Z=90;Bb.NUMPAD_0=96;Bb.NUMPAD_1=97;Bb.NUMPAD_2=98;Bb.NUMPAD_3=99;Bb.NUMPAD_4=100;Bb.NUMPAD_5=101;Bb.NUMPAD_6=102;Bb.NUMPAD_7=103;Bb.NUMPAD_8=104;Bb.NUMPAD_9=
105;Bb.NUMPAD_MULTIPLY=106;Bb.NUMPAD_ADD=107;Bb.NUMPAD_ENTER=108;Bb.NUMPAD_SUBTRACT=109;Bb.NUMPAD_DECIMAL=110;Bb.NUMPAD_DIVIDE=111;Bb.F1=112;Bb.F2=113;Bb.F3=114;Bb.F4=115;Bb.F5=116;Bb.F6=117;Bb.F7=118;Bb.F8=119;Bb.F9=120;Bb.F10=121;Bb.F11=122;Bb.F12=123;Bb.F13=124;Bb.F14=125;Bb.F15=126;Bb.BACKSPACE=8;Bb.TAB=9;Bb.ALTERNATE=18;Bb.ENTER=13;Bb.COMMAND=15;Bb.SHIFT=16;Bb.CONTROL=17;Bb.BREAK=19;Bb.CAPS_LOCK=20;Bb.NUMPAD=21;Bb.ESCAPE=27;Bb.SPACE=32;Bb.PAGE_UP=33;Bb.PAGE_DOWN=34;Bb.END=35;Bb.HOME=36;Bb.LEFT=
37;Bb.RIGHT=39;Bb.UP=38;Bb.DOWN=40;Bb.INSERT=45;Bb.DELETE=46;Bb.NUMLOCK=144;Bb.SEMICOLON=186;Bb.EQUAL=187;Bb.COMMA=188;Bb.MINUS=189;Bb.PERIOD=190;Bb.SLASH=191;Bb.BACKQUOTE=192;Bb.LEFTBRACKET=219;Bb.BACKSLASH=220;Bb.RIGHTBRACKET=221;Bb.QUOTE=222;xd.supportsCursor=!0;xd.supportsNativeCursor=!0;xd.__cursor="auto";ch.ARROW="arrow";ch.AUTO="auto";ch.BUTTON="button";ch.HAND="hand";ch.IBEAM="ibeam";ch.__CROSSHAIR="crosshair";ch.__CUSTOM="custom";ch.__MOVE="move";ch.__RESIZE_NESW="resize_nesw";ch.__RESIZE_NS=
"resize_ns";ch.__RESIZE_NWSE="resize_nwse";ch.__RESIZE_WE="resize_we";ch.__WAIT="wait";ch.__WAIT_ARROW="waitarrow";va.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName","checkstyle:FieldDocComment"]]}};va.OPMAP=new G;va.REGMAP=new G;va.SAMPLEMAP=new G;va.MAX_NESTING=4;va.MAX_OPCODES=4096;va.FRAGMENT="fragment";va.VERTEX="vertex";va.SAMPLER_TYPE_SHIFT=8;va.SAMPLER_DIM_SHIFT=12;va.SAMPLER_SPECIAL_SHIFT=16;va.SAMPLER_REPEAT_SHIFT=20;va.SAMPLER_MIPMAP_SHIFT=24;va.SAMPLER_FILTER_SHIFT=28;va.REG_WRITE=
1;va.REG_READ=2;va.REG_FRAG=32;va.REG_VERT=64;va.OP_SCALAR=1;va.OP_SPECIAL_TEX=8;va.OP_SPECIAL_MATRIX=16;va.OP_FRAG_ONLY=32;va.OP_VERT_ONLY=64;va.OP_NO_DEST=128;va.OP_VERSION2=256;va.OP_INCNEST=512;va.OP_DECNEST=1024;va.MOV="mov";va.ADD="add";va.SUB="sub";va.MUL="mul";va.DIV="div";va.RCP="rcp";va.MIN="min";va.MAX="max";va.FRC="frc";va.SQT="sqt";va.RSQ="rsq";va.POW="pow";va.LOG="log";va.EXP="exp";va.NRM="nrm";va.SIN="sin";va.COS="cos";va.CRS="crs";va.DP3="dp3";va.DP4="dp4";va.ABS="abs";va.NEG="neg";
va.SAT="sat";va.M33="m33";va.M44="m44";va.M34="m34";va.DDX="ddx";va.DDY="ddy";va.IFE="ife";va.INE="ine";va.IFG="ifg";va.IFL="ifl";va.IEG="ieg";va.IEL="iel";va.ELS="els";va.EIF="eif";va.TED="ted";va.KIL="kil";va.TEX="tex";va.SGE="sge";va.SLT="slt";va.SGN="sgn";va.SEQ="seq";va.SNE="sne";va.VA="va";va.VC="vc";va.VT="vt";va.VO="vo";va.VI="vi";va.FC="fc";va.FT="ft";va.FS="fs";va.FO="fo";va.FD="fd";va.IID="iid";va.D2="2d";va.D3="3d";va.CUBE="cube";va.MIPNEAREST="mipnearest";va.MIPLINEAR="miplinear";va.MIPNONE=
"mipnone";va.NOMIP="nomip";va.NEAREST="nearest";va.LINEAR="linear";va.ANISOTROPIC2X="anisotropic2x";va.ANISOTROPIC4X="anisotropic4x";va.ANISOTROPIC8X="anisotropic8x";va.ANISOTROPIC16X="anisotropic16x";va.CENTROID="centroid";va.SINGLE="single";va.IGNORESAMPLER="ignoresampler";va.REPEAT="repeat";va.WRAP="wrap";va.CLAMP="clamp";va.REPEAT_U_CLAMP_V="repeat_u_clamp_v";va.CLAMP_U_REPEAT_V="clamp_u_repeat_v";va.RGBA="rgba";va.COMPRESSED="compressed";va.COMPRESSEDALPHA="compressedalpha";va.DXT1="dxt1";va.DXT5=
"dxt5";va.VIDEO="video";va.initialized=!1;kd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ei.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Be.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Z.cache=new Kv;Z.dispatcher=new qa;Z.libraryBindings=new G;mc.__bytePointer=new uj(null,0);Xc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Xc.defaultObjectEncoding=10;oo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
mo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};no.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Mz.BIG_ENDIAN=0;Mz.LITTLE_ENDIAN=1;Ke.__meta__={statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]},__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]},__getArray:{SuppressWarnings:["checkstyle:FieldDocComment"]},__setArray:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ov.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Rq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};md.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{notImplemented:{SuppressWarnings:["checkstyle:NullableParameter"]}}};md.__sentWarnings=new G;Xm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};Xm.__pool=new dc(function(){return new Xm},function(a){a.reset()});Pv.__meta__={fields:{extra:{optional:null}}};ic.main()})(typeof Ua!="undefined"?
Ua:typeof window!="undefined"?window:typeof self!="undefined"?self:this,typeof window!="undefined"?window:typeof Qa!="undefined"?Qa:typeof self!="undefined"?self:this)};typeof self!=="undefined"&&self.constructor.name.includes("Worker")?jb({},aa):(Nb.lime=Nb.lime||{},Nb.lime.$scripts=Nb.lime.$scripts||{},Nb.lime.$scripts.TilBuci=jb,Nb.lime.embed=function(Ua){var Qa={},Sa=Nb.lime.$scripts[Ua];if(!Sa)throw Error('Cannot find project name "'+Ua+'"');Sa(Qa,aa);for(var wa in Qa)Nb[wa]=Nb[wa]||Qa[wa];(Sa=
Qa.lime||window.lime)&&Sa.embed&&this!==Sa.embed&&Sa.embed.apply(Sa,arguments);return Qa});typeof define==="function"&&define.amd&&(define([],function(){return Nb.lime}),define.__amd=define.amd,define.amd=null)};$lime_init(typeof exports!=="undefined"?exports:typeof define==="function"&&define.amd?{}:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this,typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:this);
typeof self!=="undefined"&&self.constructor.name.includes("Worker")||(!function(){var Nb=function(){this.init()};Nb.prototype={init:function(){var t=this||aa;return t._counter=1E3,t._html5AudioPool=[],t.html5PoolSize=10,t._codecs={},t._howls=[],t._muted=!1,t._volume=1,t._canPlayEvent="canplaythrough",t._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,t.masterGain=null,t.noAudio=!1,t.usingWebAudio=!0,t.autoSuspend=!0,t.ctx=null,t.autoUnlock=!0,t._setup(),t},volume:function(t){var E=
this||aa;if(t=parseFloat(t),E.ctx||m(),void 0!==t&&t>=0&&t<=1){if(E._volume=t,E._muted)return E;E.usingWebAudio&&E.masterGain.gain.setValueAtTime(t,aa.ctx.currentTime);for(var R=0;R<E._howls.length;R++)if(!E._howls[R]._webAudio)for(var B=E._howls[R]._getSoundIds(),sa=0;sa<B.length;sa++){var ua=E._howls[R]._soundById(B[sa]);ua&&ua._node&&(ua._node.volume=ua._volume*t)}return E}return E._volume},mute:function(t){var E=this||aa;E.ctx||m();E._muted=t;E.usingWebAudio&&E.masterGain.gain.setValueAtTime(t?
0:E._volume,aa.ctx.currentTime);for(var R=0;R<E._howls.length;R++)if(!E._howls[R]._webAudio)for(var B=E._howls[R]._getSoundIds(),sa=0;sa<B.length;sa++){var ua=E._howls[R]._soundById(B[sa]);ua&&ua._node&&(ua._node.muted=!!t||ua._muted)}return E},stop:function(){for(var t=this||aa,E=0;E<t._howls.length;E++)t._howls[E].stop();return t},unload:function(){for(var t=this||aa,E=t._howls.length-1;E>=0;E--)t._howls[E].unload();return t.usingWebAudio&&t.ctx&&void 0!==t.ctx.close&&(t.ctx.close(),t.ctx=null,
m()),t},codecs:function(t){return(this||aa)._codecs[t.replace(/^x-/,"")]},_setup:function(){var t=this||aa;if(t.state=t.ctx?t.ctx.state||"suspended":"suspended",t._autoSuspend(),!t.usingWebAudio)if("undefined"!=typeof Audio)try{var E=new Audio;void 0===E.oncanplaythrough&&(t._canPlayEvent="canplay")}catch(R){t.noAudio=!0}else t.noAudio=!0;try{E=new Audio,E.muted&&(t.noAudio=!0)}catch(R){}return t.noAudio||t._setupCodecs(),t},_setupCodecs:function(){var t=this||aa,E=null;try{E="undefined"!=typeof Audio?
new Audio:null}catch(Ba){return t}if(!E||"function"!=typeof E.canPlayType)return t;var R=E.canPlayType("audio/mpeg;").replace(/^no$/,""),B=t._navigator?t._navigator.userAgent:"",sa=B.match(/OPR\/(\d+)/g);sa=sa&&parseInt(sa[0].split("/")[1],10)<33;var ua=-1!==B.indexOf("Safari")&&-1===B.indexOf("Chrome");B=B.match(/Version\/(.*?) /);B=ua&&B&&parseInt(B[1],10)<15;return t._codecs={mp3:!(sa||!R&&!E.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!R,opus:!!E.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,
""),ogg:!!E.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!E.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(E.canPlayType('audio/wav; codecs="1"')||E.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!E.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!E.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(E.canPlayType("audio/x-m4a;")||E.canPlayType("audio/m4a;")||E.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(E.canPlayType("audio/x-m4b;")||E.canPlayType("audio/m4b;")||
E.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(E.canPlayType("audio/x-mp4;")||E.canPlayType("audio/mp4;")||E.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(B||!E.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(B||!E.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!E.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(E.canPlayType("audio/x-flac;")||E.canPlayType("audio/flac;")).replace(/^no$/,"")},t},_unlockAudio:function(){var t=
this||aa;if(!t._audioUnlocked&&t.ctx){t._audioUnlocked=!1;t.autoUnlock=!1;t._mobileUnloaded||44100===t.ctx.sampleRate||(t._mobileUnloaded=!0,t.unload());t._scratchBuffer=t.ctx.createBuffer(1,1,22050);var E=function(R){for(;t._html5AudioPool.length<t.html5PoolSize;)try{var B=new Audio;B._unlocked=!0;t._releaseHtml5Audio(B)}catch(Na){t.noAudio=!0;break}for(R=0;R<t._howls.length;R++)if(!t._howls[R]._webAudio){B=t._howls[R]._getSoundIds();for(var sa=0;sa<B.length;sa++){var ua=t._howls[R]._soundById(B[sa]);
ua&&ua._node&&!ua._node._unlocked&&(ua._node._unlocked=!0,ua._node.load())}}t._autoResume();var Ba=t.ctx.createBufferSource();Ba.buffer=t._scratchBuffer;Ba.connect(t.ctx.destination);void 0===Ba.start?Ba.noteOn(0):Ba.start(0);"function"==typeof t.ctx.resume&&t.ctx.resume();Ba.onended=function(){Ba.disconnect(0);t._audioUnlocked=!0;document.removeEventListener("touchstart",E,!0);document.removeEventListener("touchend",E,!0);document.removeEventListener("click",E,!0);document.removeEventListener("keydown",
E,!0);for(var Na=0;Na<t._howls.length;Na++)t._howls[Na]._emit("unlock")}};return document.addEventListener("touchstart",E,!0),document.addEventListener("touchend",E,!0),document.addEventListener("click",E,!0),document.addEventListener("keydown",E,!0),t}},_obtainHtml5Audio:function(){var t=this||aa;if(t._html5AudioPool.length)return t._html5AudioPool.pop();t=(new Audio).play();return t&&"undefined"!=typeof Promise&&(t instanceof Promise||"function"==typeof t.then)&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),
new Audio},_releaseHtml5Audio:function(t){var E=this||aa;return t._unlocked&&E._html5AudioPool.push(t),E},_autoSuspend:function(){var t=this;if(t.autoSuspend&&t.ctx&&void 0!==t.ctx.suspend&&aa.usingWebAudio){for(var E=0;E<t._howls.length;E++)if(t._howls[E]._webAudio)for(var R=0;R<t._howls[E]._sounds.length;R++)if(!t._howls[E]._sounds[R]._paused)return t;return t._suspendTimer&&clearTimeout(t._suspendTimer),t._suspendTimer=setTimeout(function(){if(t.autoSuspend){t._suspendTimer=null;t.state="suspending";
var B=function(){t.state="suspended";t._resumeAfterSuspend&&(delete t._resumeAfterSuspend,t._autoResume())};t.ctx.suspend().then(B,B)}},3E4),t}},_autoResume:function(){var t=this;if(t.ctx&&void 0!==t.ctx.resume&&aa.usingWebAudio)return"running"===t.state&&"interrupted"!==t.ctx.state&&t._suspendTimer?(clearTimeout(t._suspendTimer),t._suspendTimer=null):"suspended"===t.state||"running"===t.state&&"interrupted"===t.ctx.state?(t.ctx.resume().then(function(){t.state="running";for(var E=0;E<t._howls.length;E++)t._howls[E]._emit("resume")}),
t._suspendTimer&&(clearTimeout(t._suspendTimer),t._suspendTimer=null)):"suspending"===t.state&&(t._resumeAfterSuspend=!0),t}};var aa=new Nb,jb=function(t){if(!t.src||0===t.src.length)return void console.error("An array of source files must be passed with any new Howl.");this.init(t)};jb.prototype={init:function(t){var E=this;return aa.ctx||m(),E._autoplay=t.autoplay||!1,E._format="string"!=typeof t.format?t.format:[t.format],E._html5=t.html5||!1,E._muted=t.mute||!1,E._loop=t.loop||!1,E._pool=t.pool||
5,E._preload="boolean"!=typeof t.preload&&"metadata"!==t.preload||t.preload,E._rate=t.rate||1,E._sprite=t.sprite||{},E._src="string"!=typeof t.src?t.src:[t.src],E._volume=void 0!==t.volume?t.volume:1,E._xhr={method:t.xhr&&t.xhr.method?t.xhr.method:"GET",headers:t.xhr&&t.xhr.headers?t.xhr.headers:null,withCredentials:!(!t.xhr||!t.xhr.withCredentials)&&t.xhr.withCredentials},E._duration=0,E._state="unloaded",E._sounds=[],E._endTimers={},E._queue=[],E._playLock=!1,E._onend=t.onend?[{fn:t.onend}]:[],
E._onfade=t.onfade?[{fn:t.onfade}]:[],E._onload=t.onload?[{fn:t.onload}]:[],E._onloaderror=t.onloaderror?[{fn:t.onloaderror}]:[],E._onplayerror=t.onplayerror?[{fn:t.onplayerror}]:[],E._onpause=t.onpause?[{fn:t.onpause}]:[],E._onplay=t.onplay?[{fn:t.onplay}]:[],E._onstop=t.onstop?[{fn:t.onstop}]:[],E._onmute=t.onmute?[{fn:t.onmute}]:[],E._onvolume=t.onvolume?[{fn:t.onvolume}]:[],E._onrate=t.onrate?[{fn:t.onrate}]:[],E._onseek=t.onseek?[{fn:t.onseek}]:[],E._onunlock=t.onunlock?[{fn:t.onunlock}]:[],
E._onresume=[],E._webAudio=aa.usingWebAudio&&!E._html5,void 0!==aa.ctx&&aa.ctx&&aa.autoUnlock&&aa._unlockAudio(),aa._howls.push(E),E._autoplay&&E._queue.push({event:"play",action:function(){E.play()}}),E._preload&&"none"!==E._preload&&E.load(),E},load:function(){var t=null;if(aa.noAudio)return void this._emit("loaderror",null,"No audio support.");"string"==typeof this._src&&(this._src=[this._src]);for(var E=0;E<this._src.length;E++){var R;if(this._format&&this._format[E])var B=this._format[E];else{if("string"!=
typeof(R=this._src[E])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(B=/^data:audio\/([^;,]+);/i.exec(R))||(B=/\.([^.]+)$/.exec(R.split("?",1)[0]));B&&=B[1].toLowerCase()}if(B||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),B&&aa.codecs(B)){t=this._src[E];break}}return t?(this._src=t,this._state="loading","https:"===window.location.protocol&&"http:"===t.slice(0,5)&&(this._html5=!0,this._webAudio=
!1),new Ua(this),this._webAudio&&Sa(this),this):void this._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(t,E){var R=this,B=null;if("number"==typeof t)B=t,t=null;else{if("string"==typeof t&&"loaded"===R._state&&!R._sprite[t])return null;if(void 0===t&&(t="__default",!R._playLock)){for(var sa=0,ua=0;ua<R._sounds.length;ua++)R._sounds[ua]._paused&&!R._sounds[ua]._ended&&(sa++,B=R._sounds[ua]._id);1===sa?t=null:B=null}}var Ba=B?R._soundById(B):R._inactiveSound();
if(!Ba)return null;if(B&&!t&&(t=Ba._sprite||"__default"),"loaded"!==R._state){Ba._sprite=t;Ba._ended=!1;var Na=Ba._id;return R._queue.push({event:"play",action:function(){R.play(Na)}}),Na}if(B&&!Ba._paused)return E||R._loadQueue("play"),Ba._id;R._webAudio&&aa._autoResume();var ic=Math.max(0,Ba._seek>0?Ba._seek:R._sprite[t][0]/1E3),Db=Math.max(0,(R._sprite[t][0]+R._sprite[t][1])/1E3-ic),qa=1E3*Db/Math.abs(Ba._rate),kc=R._sprite[t][0]/1E3,tb=(R._sprite[t][0]+R._sprite[t][1])/1E3;Ba._sprite=t;Ba._ended=
!1;var dc=function(){Ba._paused=!1;Ba._seek=ic;Ba._start=kc;Ba._stop=tb;Ba._loop=!(!Ba._loop&&!R._sprite[t][2])};if(ic>=tb)return void R._ended(Ba);var ja=Ba._node;if(R._webAudio)B=function(){R._playLock=!1;dc();R._refreshBuffer(Ba);ja.gain.setValueAtTime(Ba._muted||R._muted?0:Ba._volume,aa.ctx.currentTime);Ba._playStart=aa.ctx.currentTime;void 0===ja.bufferSource.start?Ba._loop?ja.bufferSource.noteGrainOn(0,ic,86400):ja.bufferSource.noteGrainOn(0,ic,Db):Ba._loop?ja.bufferSource.start(0,ic,86400):
ja.bufferSource.start(0,ic,Db);qa!==1/0&&(R._endTimers[Ba._id]=setTimeout(R._ended.bind(R,Ba),qa));E||setTimeout(function(){R._emit("play",Ba._id);R._loadQueue()},0)},"running"===aa.state&&"interrupted"!==aa.ctx.state?B():(R._playLock=!0,R.once("resume",B),R._clearTimer(Ba._id));else{var Ta=function(){ja.currentTime=ic;ja.muted=Ba._muted||R._muted||aa._muted||ja.muted;ja.volume=Ba._volume*aa.volume();ja.playbackRate=Ba._rate;try{var ma=ja.play();if(ma&&"undefined"!=typeof Promise&&(ma instanceof Promise||
"function"==typeof ma.then)?(R._playLock=!0,dc(),ma.then(function(){R._playLock=!1;ja._unlocked=!0;E?R._loadQueue():R._emit("play",Ba._id)}).catch(function(){R._playLock=!1;R._emit("playerror",Ba._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");Ba._ended=!0;Ba._paused=!0})):E||(R._playLock=!1,dc(),R._emit("play",Ba._id)),ja.playbackRate=Ba._rate,ja.paused)return void R._emit("playerror",Ba._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
"__default"!==t||Ba._loop?R._endTimers[Ba._id]=setTimeout(R._ended.bind(R,Ba),qa):(R._endTimers[Ba._id]=function(){R._ended(Ba);ja.removeEventListener("ended",R._endTimers[Ba._id],!1)},ja.addEventListener("ended",R._endTimers[Ba._id],!1))}catch(Ja){R._emit("playerror",Ba._id,Ja)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===ja.src&&(ja.src=R._src,ja.load());B=window&&window.ejecta||!ja.readyState&&aa._navigator.isCocoonJS;if(ja.readyState>=3||B)Ta();
else{R._playLock=!0;R._state="loading";var hb=function(){R._state="loaded";Ta();ja.removeEventListener(aa._canPlayEvent,hb,!1)};ja.addEventListener(aa._canPlayEvent,hb,!1);R._clearTimer(Ba._id)}}return Ba._id},pause:function(t){var E=this;if("loaded"!==E._state||E._playLock)return E._queue.push({event:"pause",action:function(){E.pause(t)}}),E;for(var R=E._getSoundIds(t),B=0;B<R.length;B++){E._clearTimer(R[B]);var sa=E._soundById(R[B]);if(sa&&!sa._paused&&(sa._seek=E.seek(R[B]),sa._rateSeek=0,sa._paused=
!0,E._stopFade(R[B]),sa._node))if(E._webAudio){if(!sa._node.bufferSource)continue;void 0===sa._node.bufferSource.stop?sa._node.bufferSource.noteOff(0):sa._node.bufferSource.stop(0);E._cleanBuffer(sa._node)}else isNaN(sa._node.duration)&&sa._node.duration!==1/0||sa._node.pause();arguments[1]||E._emit("pause",sa?sa._id:null)}return E},stop:function(t,E){var R=this;if("loaded"!==R._state||R._playLock)return R._queue.push({event:"stop",action:function(){R.stop(t)}}),R;for(var B=R._getSoundIds(t),sa=0;sa<
B.length;sa++){R._clearTimer(B[sa]);var ua=R._soundById(B[sa]);ua&&(ua._seek=ua._start||0,ua._rateSeek=0,ua._paused=!0,ua._ended=!0,R._stopFade(B[sa]),ua._node&&(R._webAudio?ua._node.bufferSource&&(void 0===ua._node.bufferSource.stop?ua._node.bufferSource.noteOff(0):ua._node.bufferSource.stop(0),R._cleanBuffer(ua._node)):isNaN(ua._node.duration)&&ua._node.duration!==1/0||(ua._node.currentTime=ua._start||0,ua._node.pause(),ua._node.duration===1/0&&R._clearSound(ua._node))),E||R._emit("stop",ua._id))}return R},
mute:function(t,E){var R=this;if("loaded"!==R._state||R._playLock)return R._queue.push({event:"mute",action:function(){R.mute(t,E)}}),R;if(void 0===E){if("boolean"!=typeof t)return R._muted;R._muted=t}for(var B=R._getSoundIds(E),sa=0;sa<B.length;sa++){var ua=R._soundById(B[sa]);ua&&(ua._muted=t,ua._interval&&R._stopFade(ua._id),R._webAudio&&ua._node?ua._node.gain.setValueAtTime(t?0:ua._volume,aa.ctx.currentTime):ua._node&&(ua._node.muted=!!aa._muted||t),R._emit("mute",ua._id))}return R},volume:function(){var t,
E,R=this,B=arguments;if(0===B.length)return R._volume;1===B.length||2===B.length&&void 0===B[1]?R._getSoundIds().indexOf(B[0])>=0?E=parseInt(B[0],10):t=parseFloat(B[0]):B.length>=2&&(t=parseFloat(B[0]),E=parseInt(B[1],10));var sa;if(!(void 0!==t&&t>=0&&t<=1))return sa=E?R._soundById(E):R._sounds[0],sa?sa._volume:0;if("loaded"!==R._state||R._playLock)return R._queue.push({event:"volume",action:function(){R.volume.apply(R,B)}}),R;void 0===E&&(R._volume=t);E=R._getSoundIds(E);for(var ua=0;ua<E.length;ua++)(sa=
R._soundById(E[ua]))&&(sa._volume=t,B[2]||R._stopFade(E[ua]),R._webAudio&&sa._node&&!sa._muted?sa._node.gain.setValueAtTime(t,aa.ctx.currentTime):sa._node&&!sa._muted&&(sa._node.volume=t*aa.volume()),R._emit("volume",sa._id));return R},fade:function(t,E,R,B){var sa=this;if("loaded"!==sa._state||sa._playLock)return sa._queue.push({event:"fade",action:function(){sa.fade(t,E,R,B)}}),sa;t=Math.min(Math.max(0,parseFloat(t)),1);E=Math.min(Math.max(0,parseFloat(E)),1);R=parseFloat(R);sa.volume(t,B);for(var ua=
sa._getSoundIds(B),Ba=0;Ba<ua.length;Ba++){var Na=sa._soundById(ua[Ba]);if(Na){if(B||sa._stopFade(ua[Ba]),sa._webAudio&&!Na._muted){var ic=aa.ctx.currentTime,Db=ic+R/1E3;Na._volume=t;Na._node.gain.setValueAtTime(t,ic);Na._node.gain.linearRampToValueAtTime(E,Db)}sa._startFadeInterval(Na,t,E,R,ua[Ba],void 0===B)}}return sa},_startFadeInterval:function(t,E,R,B,sa,ua){var Ba=this,Na=E,ic=R-E;sa=Math.abs(ic/.01);sa=Math.max(4,sa>0?B/sa:B);var Db=Date.now();t._fadeTo=R;t._interval=setInterval(function(){var qa=
(Date.now()-Db)/B;Db=Date.now();Na+=ic*qa;Na=Math.round(100*Na)/100;Na=ic<0?Math.max(R,Na):Math.min(R,Na);Ba._webAudio?t._volume=Na:Ba.volume(Na,t._id,!0);ua&&(Ba._volume=Na);(R<E&&Na<=R||R>E&&Na>=R)&&(clearInterval(t._interval),t._interval=null,t._fadeTo=null,Ba.volume(R,t._id),Ba._emit("fade",t._id))},sa)},_stopFade:function(t){var E=this._soundById(t);return E&&E._interval&&(this._webAudio&&E._node.gain.cancelScheduledValues(aa.ctx.currentTime),clearInterval(E._interval),E._interval=null,this.volume(E._fadeTo,
t),E._fadeTo=null,this._emit("fade",t)),this},loop:function(){var t,E,R,B=arguments;if(0===B.length)return this._loop;if(1===B.length){if("boolean"!=typeof B[0])return!!(R=this._soundById(parseInt(B[0],10)))&&R._loop;this._loop=t=B[0]}else 2===B.length&&(t=B[0],E=parseInt(B[1],10));E=this._getSoundIds(E);for(B=0;B<E.length;B++)(R=this._soundById(E[B]))&&(R._loop=t,this._webAudio&&R._node&&R._node.bufferSource&&(R._node.bufferSource.loop=t,t&&(R._node.bufferSource.loopStart=R._start||0,R._node.bufferSource.loopEnd=
R._stop,this.playing(E[B])&&(this.pause(E[B],!0),this.play(E[B],!0)))));return this},rate:function(){var t,E,R=this,B=arguments;0===B.length?E=R._sounds[0]._id:1===B.length?R._getSoundIds().indexOf(B[0])>=0?E=parseInt(B[0],10):t=parseFloat(B[0]):2===B.length&&(t=parseFloat(B[0]),E=parseInt(B[1],10));var sa;if("number"!=typeof t)return sa=R._soundById(E),sa?sa._rate:R._rate;if("loaded"!==R._state||R._playLock)return R._queue.push({event:"rate",action:function(){R.rate.apply(R,B)}}),R;void 0===E&&(R._rate=
t);E=R._getSoundIds(E);for(var ua=0;ua<E.length;ua++)if(sa=R._soundById(E[ua])){R.playing(E[ua])&&(sa._rateSeek=R.seek(E[ua]),sa._playStart=R._webAudio?aa.ctx.currentTime:sa._playStart);sa._rate=t;R._webAudio&&sa._node&&sa._node.bufferSource?sa._node.bufferSource.playbackRate.setValueAtTime(t,aa.ctx.currentTime):sa._node&&(sa._node.playbackRate=t);var Ba=R.seek(E[ua]);Ba=1E3*((R._sprite[sa._sprite][0]+R._sprite[sa._sprite][1])/1E3-Ba)/Math.abs(sa._rate);!R._endTimers[E[ua]]&&sa._paused||(R._clearTimer(E[ua]),
R._endTimers[E[ua]]=setTimeout(R._ended.bind(R,sa),Ba));R._emit("rate",sa._id)}return R},seek:function(){var t,E,R=this,B=arguments;0===B.length?R._sounds.length&&(E=R._sounds[0]._id):1===B.length?R._getSoundIds().indexOf(B[0])>=0?E=parseInt(B[0],10):R._sounds.length&&(E=R._sounds[0]._id,t=parseFloat(B[0])):2===B.length&&(t=parseFloat(B[0]),E=parseInt(B[1],10));if(void 0===E)return 0;if("number"==typeof t&&("loaded"!==R._state||R._playLock))return R._queue.push({event:"seek",action:function(){R.seek.apply(R,
B)}}),R;var sa=R._soundById(E);if(sa){if(!("number"==typeof t&&t>=0))return R._webAudio?(t=R.playing(E)?aa.ctx.currentTime-sa._playStart:0,sa._seek+((sa._rateSeek?sa._rateSeek-sa._seek:0)+t*Math.abs(sa._rate))):sa._node.currentTime;var ua=R.playing(E);ua&&R.pause(E,!0);sa._seek=t;sa._ended=!1;R._clearTimer(E);R._webAudio||!sa._node||isNaN(sa._node.duration)||(sa._node.currentTime=t);var Ba=function(){ua&&R.play(E,!0);R._emit("seek",E)};if(ua&&!R._webAudio){var Na=function(){R._playLock?setTimeout(Na,
0):Ba()};setTimeout(Na,0)}else Ba()}return R},playing:function(t){if("number"==typeof t)return t=this._soundById(t),!!t&&!t._paused;for(t=0;t<this._sounds.length;t++)if(!this._sounds[t]._paused)return!0;return!1},duration:function(t){var E=this._duration;t=this._soundById(t);return t&&(E=this._sprite[t._sprite][1]/1E3),E},state:function(){return this._state},unload:function(){for(var t=this._sounds,E=0;E<t.length;E++)t[E]._paused||this.stop(t[E]._id),this._webAudio||(this._clearSound(t[E]._node),
t[E]._node.removeEventListener("error",t[E]._errorFn,!1),t[E]._node.removeEventListener(aa._canPlayEvent,t[E]._loadFn,!1),t[E]._node.removeEventListener("ended",t[E]._endFn,!1),aa._releaseHtml5Audio(t[E]._node)),delete t[E]._node,this._clearTimer(t[E]._id);E=aa._howls.indexOf(this);E>=0&&aa._howls.splice(E,1);t=!0;for(E=0;E<aa._howls.length;E++)if(aa._howls[E]._src===this._src||this._src.indexOf(aa._howls[E]._src)>=0){t=!1;break}return Qa&&t&&delete Qa[this._src],aa.noAudio=!1,this._state="unloaded",
this._sounds=[],null},on:function(t,E,R,B){t=this["_on"+t];return"function"==typeof E&&t.push(B?{id:R,fn:E,once:B}:{id:R,fn:E}),this},off:function(t,E,R){var B=this["_on"+t];if("number"==typeof E&&(R=E,E=null),E||R)for(t=0;t<B.length;t++){var sa=R===B[t].id;if(E===B[t].fn&&sa||!E&&sa){B.splice(t,1);break}}else if(t)this["_on"+t]=[];else for(E=Object.keys(this),t=0;t<E.length;t++)0===E[t].indexOf("_on")&&Array.isArray(this[E[t]])&&(this[E[t]]=[]);return this},once:function(t,E,R){return this.on(t,
E,R,1),this},_emit:function(t,E,R){for(var B=this["_on"+t],sa=B.length-1;sa>=0;sa--)B[sa].id&&B[sa].id!==E&&"load"!==t||(setTimeout(function(ua){ua.call(this,E,R)}.bind(this,B[sa].fn),0),B[sa].once&&this.off(t,B[sa].fn,B[sa].id));return this._loadQueue(t),this},_loadQueue:function(t){if(this._queue.length>0){var E=this._queue[0];E.event===t&&(this._queue.shift(),this._loadQueue());t||E.action()}return this},_ended:function(t){var E=t._sprite;if(!this._webAudio&&t._node&&!t._node.paused&&!t._node.ended&&
t._node.currentTime<t._stop)return setTimeout(this._ended.bind(this,t),100),this;E=!(!t._loop&&!this._sprite[E][2]);if(this._emit("end",t._id),!this._webAudio&&E&&this.stop(t._id,!0).play(t._id),this._webAudio&&E){this._emit("play",t._id);t._seek=t._start||0;t._rateSeek=0;t._playStart=aa.ctx.currentTime;var R=1E3*(t._stop-t._start)/Math.abs(t._rate);this._endTimers[t._id]=setTimeout(this._ended.bind(this,t),R)}return this._webAudio&&!E&&(t._paused=!0,t._ended=!0,t._seek=t._start||0,t._rateSeek=0,
this._clearTimer(t._id),this._cleanBuffer(t._node),aa._autoSuspend()),this._webAudio||E||this.stop(t._id,!0),this},_clearTimer:function(t){if(this._endTimers[t]){if("function"!=typeof this._endTimers[t])clearTimeout(this._endTimers[t]);else{var E=this._soundById(t);E&&E._node&&E._node.removeEventListener("ended",this._endTimers[t],!1)}delete this._endTimers[t]}return this},_soundById:function(t){for(var E=0;E<this._sounds.length;E++)if(t===this._sounds[E]._id)return this._sounds[E];return null},_inactiveSound:function(){this._drain();
for(var t=0;t<this._sounds.length;t++)if(this._sounds[t]._ended)return this._sounds[t].reset();return new Ua(this)},_drain:function(){var t=this._pool,E=0,R;if(!(this._sounds.length<t)){for(R=0;R<this._sounds.length;R++)this._sounds[R]._ended&&E++;for(R=this._sounds.length-1;R>=0&&!(E<=t);R--)this._sounds[R]._ended&&(this._webAudio&&this._sounds[R]._node&&this._sounds[R]._node.disconnect(0),this._sounds.splice(R,1),E--)}},_getSoundIds:function(t){if(void 0===t){t=[];for(var E=0;E<this._sounds.length;E++)t.push(this._sounds[E]._id);
return t}return[t]},_refreshBuffer:function(t){return t._node.bufferSource=aa.ctx.createBufferSource(),t._node.bufferSource.buffer=Qa[this._src],t._panner?t._node.bufferSource.connect(t._panner):t._node.bufferSource.connect(t._node),t._node.bufferSource.loop=t._loop,t._loop&&(t._node.bufferSource.loopStart=t._start||0,t._node.bufferSource.loopEnd=t._stop||0),t._node.bufferSource.playbackRate.setValueAtTime(t._rate,aa.ctx.currentTime),this},_cleanBuffer:function(t){var E=aa._navigator&&aa._navigator.vendor.indexOf("Apple")>=
0;if(!t.bufferSource)return this;if(aa._scratchBuffer&&t.bufferSource&&(t.bufferSource.onended=null,t.bufferSource.disconnect(0),E))try{t.bufferSource.buffer=aa._scratchBuffer}catch(R){}return t.bufferSource=null,this},_clearSound:function(t){/MSIE |Trident\//.test(aa._navigator&&aa._navigator.userAgent)||(t.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var Ua=function(t){this._parent=t;this.init()};Ua.prototype={init:function(){var t=this._parent;
return this._muted=t._muted,this._loop=t._loop,this._volume=t._volume,this._rate=t._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++aa._counter,t._sounds.push(this),this.create(),this},create:function(){var t=this._parent,E=aa._muted||this._muted||this._parent._muted?0:this._volume;return t._webAudio?(this._node=void 0===aa.ctx.createGain?aa.ctx.createGainNode():aa.ctx.createGain(),this._node.gain.setValueAtTime(E,aa.ctx.currentTime),this._node.paused=!0,this._node.connect(aa.masterGain)):
aa.noAudio||(this._node=aa._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(aa._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=t._src,this._node.preload=!0===t._preload?"auto":t._preload,this._node.volume=E*aa.volume(),this._node.load()),this},reset:function(){var t=this._parent;
return this._muted=t._muted,this._loop=t._loop,this._volume=t._volume,this._rate=t._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++aa._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0);this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var t=this._parent;t._duration=Math.ceil(10*this._node.duration)/10;0===Object.keys(t._sprite).length&&(t._sprite=
{__default:[0,1E3*t._duration]});"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue());this._node.removeEventListener(aa._canPlayEvent,this._loadFn,!1)},_endListener:function(){var t=this._parent;t._duration===1/0&&(t._duration=Math.ceil(10*this._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1E3*t._duration),t._ended(this));this._node.removeEventListener("ended",this._endFn,!1)}};var Qa={},Sa=function(t){var E=t._src;if(Qa[E])return t._duration=Qa[E].duration,
void La(t);if(/^data:[^;]+;base64,/.test(E)){for(var R=atob(E.split(",")[1]),B=new Uint8Array(R.length),sa=0;sa<R.length;++sa)B[sa]=R.charCodeAt(sa);I(B.buffer,t)}else{var ua=new XMLHttpRequest;ua.open(t._xhr.method,E,!0);ua.withCredentials=t._xhr.withCredentials;ua.responseType="arraybuffer";t._xhr.headers&&Object.keys(t._xhr.headers).forEach(function(Ba){ua.setRequestHeader(Ba,t._xhr.headers[Ba])});ua.onload=function(){var Ba=(ua.status+"")[0];if("0"!==Ba&&"2"!==Ba&&"3"!==Ba)return void t._emit("loaderror",
null,"Failed loading audio file with status: "+ua.status+".");I(ua.response,t)};ua.onerror=function(){t._webAudio&&(t._html5=!0,t._webAudio=!1,t._sounds=[],delete Qa[E],t.load())};wa(ua)}},wa=function(t){try{t.send()}catch(E){t.onerror()}},I=function(t,E){var R=function(){E._emit("loaderror",null,"Decoding audio data failed.")},B=function(sa){sa&&E._sounds.length>0?(Qa[E._src]=sa,La(E,sa)):R()};"undefined"!=typeof Promise&&1===aa.ctx.decodeAudioData.length?aa.ctx.decodeAudioData(t).then(B).catch(R):
aa.ctx.decodeAudioData(t,B,R)},La=function(t,E){E&&!t._duration&&(t._duration=E.duration);0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1E3*t._duration]});"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue())},m=function(){if(aa.usingWebAudio){try{"undefined"!=typeof AudioContext?aa.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?aa.ctx=new webkitAudioContext:aa.usingWebAudio=!1}catch(R){aa.usingWebAudio=!1}aa.ctx||(aa.usingWebAudio=!1);var t=/iP(hone|od|ad)/.test(aa._navigator&&
aa._navigator.platform),E=aa._navigator&&aa._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);E=E?parseInt(E[1],10):null;t&&E&&E<9&&(t=/safari/.test(aa._navigator&&aa._navigator.userAgent.toLowerCase()),aa._navigator&&!t&&(aa.usingWebAudio=!1));aa.usingWebAudio&&(aa.masterGain=void 0===aa.ctx.createGain?aa.ctx.createGainNode():aa.ctx.createGain(),aa.masterGain.gain.setValueAtTime(aa._muted?0:aa._volume,aa.ctx.currentTime),aa.masterGain.connect(aa.ctx.destination));aa._setup()}};"function"==typeof define&&
define.amd&&define([],function(){return{Howler:aa,Howl:jb}});"undefined"!=typeof exports&&(exports.Howler=aa,exports.Howl=jb);"undefined"!=typeof global?(global.HowlerGlobal=Nb,global.Howler=aa,global.Howl=jb,global.Sound=Ua):"undefined"!=typeof window&&(window.HowlerGlobal=Nb,window.Howler=aa,window.Howl=jb,window.Sound=Ua)}(),!function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(aa){if(!this.ctx||!this.ctx.listener)return this;
for(var jb=this._howls.length-1;jb>=0;jb--)this._howls[jb].stereo(aa);return this};HowlerGlobal.prototype.pos=function(aa,jb,Ua){return this.ctx&&this.ctx.listener?(jb="number"!=typeof jb?this._pos[1]:jb,Ua="number"!=typeof Ua?this._pos[2]:Ua,"number"!=typeof aa?this._pos:(this._pos=[aa,jb,Ua],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),
this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this};HowlerGlobal.prototype.orientation=function(aa,jb,Ua,Qa,Sa,wa){if(!this.ctx||!this.ctx.listener)return this;var I=this._orientation;return jb="number"!=typeof jb?I[1]:jb,Ua="number"!=typeof Ua?I[2]:Ua,Qa="number"!=typeof Qa?I[3]:Qa,Sa="number"!=typeof Sa?I[4]:Sa,wa="number"!=typeof wa?I[5]:wa,"number"!=typeof aa?I:(this._orientation=
[aa,jb,Ua,Qa,Sa,wa],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(aa,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(jb,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(Ua,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(Qa,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(Sa,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(wa,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(aa,
jb,Ua,Qa,Sa,wa),this)};Howl.prototype.init=function(aa){return function(jb){return this._orientation=jb.orientation||[1,0,0],this._stereo=jb.stereo||null,this._pos=jb.pos||null,this._pannerAttr={coneInnerAngle:void 0!==jb.coneInnerAngle?jb.coneInnerAngle:360,coneOuterAngle:void 0!==jb.coneOuterAngle?jb.coneOuterAngle:360,coneOuterGain:void 0!==jb.coneOuterGain?jb.coneOuterGain:0,distanceModel:void 0!==jb.distanceModel?jb.distanceModel:"inverse",maxDistance:void 0!==jb.maxDistance?jb.maxDistance:1E4,
panningModel:void 0!==jb.panningModel?jb.panningModel:"HRTF",refDistance:void 0!==jb.refDistance?jb.refDistance:1,rolloffFactor:void 0!==jb.rolloffFactor?jb.rolloffFactor:1},this._onstereo=jb.onstereo?[{fn:jb.onstereo}]:[],this._onpos=jb.onpos?[{fn:jb.onpos}]:[],this._onorientation=jb.onorientation?[{fn:jb.onorientation}]:[],aa.call(this,jb)}}(Howl.prototype.init);Howl.prototype.stereo=function(aa,jb){var Ua=this;if(!Ua._webAudio)return Ua;if("loaded"!==Ua._state)return Ua._queue.push({event:"stereo",
action:function(){Ua.stereo(aa,jb)}}),Ua;var Qa=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===jb){if("number"!=typeof aa)return Ua._stereo;Ua._stereo=aa;Ua._pos=[aa,0,0]}for(var Sa=Ua._getSoundIds(jb),wa=0;wa<Sa.length;wa++){var I=Ua._soundById(Sa[wa]);if(I){if("number"!=typeof aa)return I._stereo;I._stereo=aa;I._pos=[aa,0,0];I._node&&(I._pannerAttr.panningModel="equalpower",I._panner&&I._panner.pan||Nb(I,Qa),"spatial"===Qa?void 0!==I._panner.positionX?(I._panner.positionX.setValueAtTime(aa,
Howler.ctx.currentTime),I._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),I._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):I._panner.setPosition(aa,0,0):I._panner.pan.setValueAtTime(aa,Howler.ctx.currentTime));Ua._emit("stereo",I._id)}}return Ua};Howl.prototype.pos=function(aa,jb,Ua,Qa){var Sa=this;if(!Sa._webAudio)return Sa;if("loaded"!==Sa._state)return Sa._queue.push({event:"pos",action:function(){Sa.pos(aa,jb,Ua,Qa)}}),Sa;if(jb="number"!=typeof jb?0:jb,Ua="number"!=typeof Ua?
-.5:Ua,void 0===Qa){if("number"!=typeof aa)return Sa._pos;Sa._pos=[aa,jb,Ua]}for(var wa=Sa._getSoundIds(Qa),I=0;I<wa.length;I++){var La=Sa._soundById(wa[I]);if(La){if("number"!=typeof aa)return La._pos;La._pos=[aa,jb,Ua];La._node&&(La._panner&&!La._panner.pan||Nb(La,"spatial"),void 0!==La._panner.positionX?(La._panner.positionX.setValueAtTime(aa,Howler.ctx.currentTime),La._panner.positionY.setValueAtTime(jb,Howler.ctx.currentTime),La._panner.positionZ.setValueAtTime(Ua,Howler.ctx.currentTime)):La._panner.setPosition(aa,
jb,Ua));Sa._emit("pos",La._id)}}return Sa};Howl.prototype.orientation=function(aa,jb,Ua,Qa){var Sa=this;if(!Sa._webAudio)return Sa;if("loaded"!==Sa._state)return Sa._queue.push({event:"orientation",action:function(){Sa.orientation(aa,jb,Ua,Qa)}}),Sa;if(jb="number"!=typeof jb?Sa._orientation[1]:jb,Ua="number"!=typeof Ua?Sa._orientation[2]:Ua,void 0===Qa){if("number"!=typeof aa)return Sa._orientation;Sa._orientation=[aa,jb,Ua]}for(var wa=Sa._getSoundIds(Qa),I=0;I<wa.length;I++){var La=Sa._soundById(wa[I]);
if(La){if("number"!=typeof aa)return La._orientation;La._orientation=[aa,jb,Ua];La._node&&(La._panner||(La._pos||(La._pos=Sa._pos||[0,0,-.5]),Nb(La,"spatial")),void 0!==La._panner.orientationX?(La._panner.orientationX.setValueAtTime(aa,Howler.ctx.currentTime),La._panner.orientationY.setValueAtTime(jb,Howler.ctx.currentTime),La._panner.orientationZ.setValueAtTime(Ua,Howler.ctx.currentTime)):La._panner.setOrientation(aa,jb,Ua));Sa._emit("orientation",La._id)}}return Sa};Howl.prototype.pannerAttr=function(){var aa,
jb,Ua=arguments;if(!this._webAudio)return this;if(0===Ua.length)return this._pannerAttr;if(1===Ua.length){if("object"!=typeof Ua[0])return jb=this._soundById(parseInt(Ua[0],10)),jb?jb._pannerAttr:this._pannerAttr;var Qa=Ua[0];void 0===aa&&(Qa.pannerAttr||(Qa.pannerAttr={coneInnerAngle:Qa.coneInnerAngle,coneOuterAngle:Qa.coneOuterAngle,coneOuterGain:Qa.coneOuterGain,distanceModel:Qa.distanceModel,maxDistance:Qa.maxDistance,refDistance:Qa.refDistance,rolloffFactor:Qa.rolloffFactor,panningModel:Qa.panningModel}),
this._pannerAttr={coneInnerAngle:void 0!==Qa.pannerAttr.coneInnerAngle?Qa.pannerAttr.coneInnerAngle:this._coneInnerAngle,coneOuterAngle:void 0!==Qa.pannerAttr.coneOuterAngle?Qa.pannerAttr.coneOuterAngle:this._coneOuterAngle,coneOuterGain:void 0!==Qa.pannerAttr.coneOuterGain?Qa.pannerAttr.coneOuterGain:this._coneOuterGain,distanceModel:void 0!==Qa.pannerAttr.distanceModel?Qa.pannerAttr.distanceModel:this._distanceModel,maxDistance:void 0!==Qa.pannerAttr.maxDistance?Qa.pannerAttr.maxDistance:this._maxDistance,
refDistance:void 0!==Qa.pannerAttr.refDistance?Qa.pannerAttr.refDistance:this._refDistance,rolloffFactor:void 0!==Qa.pannerAttr.rolloffFactor?Qa.pannerAttr.rolloffFactor:this._rolloffFactor,panningModel:void 0!==Qa.pannerAttr.panningModel?Qa.pannerAttr.panningModel:this._panningModel})}else 2===Ua.length&&(Qa=Ua[0],aa=parseInt(Ua[1],10));aa=this._getSoundIds(aa);for(Ua=0;Ua<aa.length;Ua++)if(jb=this._soundById(aa[Ua])){var Sa=jb._pannerAttr;Sa={coneInnerAngle:void 0!==Qa.coneInnerAngle?Qa.coneInnerAngle:
Sa.coneInnerAngle,coneOuterAngle:void 0!==Qa.coneOuterAngle?Qa.coneOuterAngle:Sa.coneOuterAngle,coneOuterGain:void 0!==Qa.coneOuterGain?Qa.coneOuterGain:Sa.coneOuterGain,distanceModel:void 0!==Qa.distanceModel?Qa.distanceModel:Sa.distanceModel,maxDistance:void 0!==Qa.maxDistance?Qa.maxDistance:Sa.maxDistance,refDistance:void 0!==Qa.refDistance?Qa.refDistance:Sa.refDistance,rolloffFactor:void 0!==Qa.rolloffFactor?Qa.rolloffFactor:Sa.rolloffFactor,panningModel:void 0!==Qa.panningModel?Qa.panningModel:
Sa.panningModel};var wa=jb._panner;wa||(jb._pos||(jb._pos=this._pos||[0,0,-.5]),Nb(jb,"spatial"),wa=jb._panner);wa.coneInnerAngle=Sa.coneInnerAngle;wa.coneOuterAngle=Sa.coneOuterAngle;wa.coneOuterGain=Sa.coneOuterGain;wa.distanceModel=Sa.distanceModel;wa.maxDistance=Sa.maxDistance;wa.refDistance=Sa.refDistance;wa.rolloffFactor=Sa.rolloffFactor;wa.panningModel=Sa.panningModel}return this};Sound.prototype.init=function(aa){return function(){var jb=this._parent;this._orientation=jb._orientation;this._stereo=
jb._stereo;this._pos=jb._pos;this._pannerAttr=jb._pannerAttr;aa.call(this);this._stereo?jb.stereo(this._stereo):this._pos&&jb.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init);Sound.prototype.reset=function(aa){return function(){var jb=this._parent;return this._orientation=jb._orientation,this._stereo=jb._stereo,this._pos=jb._pos,this._pannerAttr=jb._pannerAttr,this._stereo?jb.stereo(this._stereo):this._pos?jb.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&
(this._panner.disconnect(0),this._panner=void 0,jb._refreshBuffer(this)),aa.call(this)}}(Sound.prototype.reset);var Nb=function(aa,jb){"spatial"===(jb||"spatial")?(aa._panner=Howler.ctx.createPanner(),aa._panner.coneInnerAngle=aa._pannerAttr.coneInnerAngle,aa._panner.coneOuterAngle=aa._pannerAttr.coneOuterAngle,aa._panner.coneOuterGain=aa._pannerAttr.coneOuterGain,aa._panner.distanceModel=aa._pannerAttr.distanceModel,aa._panner.maxDistance=aa._pannerAttr.maxDistance,aa._panner.refDistance=aa._pannerAttr.refDistance,
aa._panner.rolloffFactor=aa._pannerAttr.rolloffFactor,aa._panner.panningModel=aa._pannerAttr.panningModel,void 0!==aa._panner.positionX?(aa._panner.positionX.setValueAtTime(aa._pos[0],Howler.ctx.currentTime),aa._panner.positionY.setValueAtTime(aa._pos[1],Howler.ctx.currentTime),aa._panner.positionZ.setValueAtTime(aa._pos[2],Howler.ctx.currentTime)):aa._panner.setPosition(aa._pos[0],aa._pos[1],aa._pos[2]),void 0!==aa._panner.orientationX?(aa._panner.orientationX.setValueAtTime(aa._orientation[0],Howler.ctx.currentTime),
aa._panner.orientationY.setValueAtTime(aa._orientation[1],Howler.ctx.currentTime),aa._panner.orientationZ.setValueAtTime(aa._orientation[2],Howler.ctx.currentTime)):aa._panner.setOrientation(aa._orientation[0],aa._orientation[1],aa._orientation[2])):(aa._panner=Howler.ctx.createStereoPanner(),aa._panner.pan.setValueAtTime(aa._stereo,Howler.ctx.currentTime));aa._panner.connect(aa._node);aa._paused||aa._parent.pause(aa._id,!0).play(aa._id,!0)}}());
!function(Nb){"object"==typeof exports&&"undefined"!=typeof module?module.exports=Nb():"function"==typeof define&&define.amd?define([],Nb):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=Nb()}(function(){return function Qa(aa,jb,Ua){function Sa(La,m){if(!jb[La]){if(!aa[La]){var t="function"==typeof require&&require;if(!m&&t)return t(La,!0);if(wa)return wa(La,!0);m=Error("Cannot find module '"+La+"'");throw m.code="MODULE_NOT_FOUND",m;}m=
jb[La]={exports:{}};aa[La][0].call(m.exports,function(E){var R=aa[La][1][E];return Sa(R?R:E)},m,m.exports,Qa,aa,jb,Ua)}return jb[La].exports}for(var wa="function"==typeof require&&require,I=0;I<Ua.length;I++)Sa(Ua[I]);return Sa}({1:[function(aa,jb,Ua){function Qa(Ba){if(!(this instanceof Qa))return new Qa(Ba);Ba=this.options=I.assign({level:B,method:ua,chunkSize:16384,windowBits:15,memLevel:8,strategy:sa,to:""},Ba||{});Ba.raw&&Ba.windowBits>0?Ba.windowBits=-Ba.windowBits:Ba.gzip&&Ba.windowBits>0&&
Ba.windowBits<16&&(Ba.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new t;this.strm.avail_out=0;var Na=wa.deflateInit2(this.strm,Ba.level,Ba.method,Ba.windowBits,Ba.memLevel,Ba.strategy);if(Na!==R)throw Error(m[Na]);if(Ba.header&&wa.deflateSetHeader(this.strm,Ba.header),Ba.dictionary){var ic;if(ic="string"==typeof Ba.dictionary?La.string2buf(Ba.dictionary):"[object ArrayBuffer]"===E.call(Ba.dictionary)?new Uint8Array(Ba.dictionary):Ba.dictionary,Na=wa.deflateSetDictionary(this.strm,
ic),Na!==R)throw Error(m[Na]);this._dict_set=!0}}function Sa(Ba,Na){Na=new Qa(Na);if(Na.push(Ba,!0),Na.err)throw Na.msg;return Na.result}var wa=aa("./zlib/deflate"),I=aa("./utils/common"),La=aa("./utils/strings"),m=aa("./zlib/messages"),t=aa("./zlib/zstream"),E=Object.prototype.toString,R=0,B=-1,sa=0,ua=8;Qa.prototype.push=function(Ba,Na){var ic,Db=this.strm,qa=this.options.chunkSize;if(this.ended)return!1;Na=Na===~~Na?Na:Na===!0?4:0;"string"==typeof Ba?Db.input=La.string2buf(Ba):"[object ArrayBuffer]"===
E.call(Ba)?Db.input=new Uint8Array(Ba):Db.input=Ba;Db.next_in=0;Db.avail_in=Db.input.length;do{if(0===Db.avail_out&&(Db.output=new I.Buf8(qa),Db.next_out=0,Db.avail_out=qa),ic=wa.deflate(Db,Na),ic!==1&&ic!==R)return this.onEnd(ic),this.ended=!0,!1;0!==Db.avail_out&&(0!==Db.avail_in||Na!==4&&Na!==2)||("string"===this.options.to?this.onData(La.buf2binstring(I.shrinkBuf(Db.output,Db.next_out))):this.onData(I.shrinkBuf(Db.output,Db.next_out)))}while((Db.avail_in>0||0===Db.avail_out)&&ic!==1);return Na===
4?(ic=wa.deflateEnd(this.strm),this.onEnd(ic),this.ended=!0,ic===R):Na!==2||(this.onEnd(R),Db.avail_out=0,!0)};Qa.prototype.onData=function(Ba){this.chunks.push(Ba)};Qa.prototype.onEnd=function(Ba){Ba===R&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=I.flattenChunks(this.chunks));this.chunks=[];this.err=Ba;this.msg=this.strm.msg};Ua.Deflate=Qa;Ua.deflate=Sa;Ua.deflateRaw=function(Ba,Na){return Na=Na||{},Na.raw=!0,Sa(Ba,Na)};Ua.gzip=function(Ba,Na){return Na=Na||{},Na.gzip=
!0,Sa(Ba,Na)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(aa,jb,Ua){function Qa(sa){if(!(this instanceof Qa))return new Qa(sa);var ua=this.options=I.assign({chunkSize:16384,windowBits:0,to:""},sa||{});ua.raw&&ua.windowBits>=0&&ua.windowBits<16&&(ua.windowBits=-ua.windowBits,0===ua.windowBits&&(ua.windowBits=-15));!(ua.windowBits>=0&&ua.windowBits<16)||sa&&sa.windowBits||(ua.windowBits+=32);ua.windowBits>15&&ua.windowBits<48&&0===
(15&ua.windowBits)&&(ua.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new E;this.strm.avail_out=0;sa=wa.inflateInit2(this.strm,ua.windowBits);if(sa!==m.Z_OK)throw Error(t[sa]);this.header=new R;wa.inflateGetHeader(this.strm,this.header)}function Sa(sa,ua){ua=new Qa(ua);if(ua.push(sa,!0),ua.err)throw ua.msg;return ua.result}var wa=aa("./zlib/inflate"),I=aa("./utils/common"),La=aa("./utils/strings"),m=aa("./zlib/constants"),t=aa("./zlib/messages"),E=aa("./zlib/zstream"),
R=aa("./zlib/gzheader"),B=Object.prototype.toString;Qa.prototype.push=function(sa,ua){var Ba,Na,ic,Db,qa,kc=this.strm,tb=this.options.chunkSize,dc=this.options.dictionary,ja=!1;if(this.ended)return!1;ua=ua===~~ua?ua:ua===!0?m.Z_FINISH:m.Z_NO_FLUSH;"string"==typeof sa?kc.input=La.binstring2buf(sa):"[object ArrayBuffer]"===B.call(sa)?kc.input=new Uint8Array(sa):kc.input=sa;kc.next_in=0;kc.avail_in=kc.input.length;do{if(0===kc.avail_out&&(kc.output=new I.Buf8(tb),kc.next_out=0,kc.avail_out=tb),Ba=wa.inflate(kc,
m.Z_NO_FLUSH),Ba===m.Z_NEED_DICT&&dc&&(qa="string"==typeof dc?La.string2buf(dc):"[object ArrayBuffer]"===B.call(dc)?new Uint8Array(dc):dc,Ba=wa.inflateSetDictionary(this.strm,qa)),Ba===m.Z_BUF_ERROR&&ja===!0&&(Ba=m.Z_OK,ja=!1),Ba!==m.Z_STREAM_END&&Ba!==m.Z_OK)return this.onEnd(Ba),this.ended=!0,!1;kc.next_out&&(0!==kc.avail_out&&Ba!==m.Z_STREAM_END&&(0!==kc.avail_in||ua!==m.Z_FINISH&&ua!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(Na=La.utf8border(kc.output,kc.next_out),ic=kc.next_out-Na,Db=La.buf2string(kc.output,
Na),kc.next_out=ic,kc.avail_out=tb-ic,ic&&I.arraySet(kc.output,kc.output,Na,ic,0),this.onData(Db)):this.onData(I.shrinkBuf(kc.output,kc.next_out))));0===kc.avail_in&&0===kc.avail_out&&(ja=!0)}while((kc.avail_in>0||0===kc.avail_out)&&Ba!==m.Z_STREAM_END);return Ba===m.Z_STREAM_END&&(ua=m.Z_FINISH),ua===m.Z_FINISH?(Ba=wa.inflateEnd(this.strm),this.onEnd(Ba),this.ended=!0,Ba===m.Z_OK):ua!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),kc.avail_out=0,!0)};Qa.prototype.onData=function(sa){this.chunks.push(sa)};
Qa.prototype.onEnd=function(sa){sa===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=I.flattenChunks(this.chunks));this.chunks=[];this.err=sa;this.msg=this.strm.msg};Ua.Inflate=Qa;Ua.inflate=Sa;Ua.inflateRaw=function(sa,ua){return ua=ua||{},ua.raw=!0,Sa(sa,ua)};Ua.ungzip=Sa},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(aa,jb,Ua){aa="undefined"!=typeof Uint8Array&&
"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;Ua.assign=function(wa){for(var I=Array.prototype.slice.call(arguments,1);I.length;){var La=I.shift();if(La){if("object"!=typeof La)throw new TypeError(La+"must be non-object");for(var m in La)La.hasOwnProperty(m)&&(wa[m]=La[m])}}return wa};Ua.shrinkBuf=function(wa,I){return wa.length===I?wa:wa.subarray?wa.subarray(0,I):(wa.length=I,wa)};var Qa={arraySet:function(wa,I,La,m,t){if(I.subarray&&wa.subarray)return void wa.set(I.subarray(La,
La+m),t);for(var E=0;E<m;E++)wa[t+E]=I[La+E]},flattenChunks:function(wa){var I,La;var m=La=0;for(I=wa.length;m<I;m++)La+=wa[m].length;var t=new Uint8Array(La);m=La=0;for(I=wa.length;m<I;m++){var E=wa[m];t.set(E,La);La+=E.length}return t}},Sa={arraySet:function(wa,I,La,m,t){for(var E=0;E<m;E++)wa[t+E]=I[La+E]},flattenChunks:function(wa){return[].concat.apply([],wa)}};Ua.setTyped=function(wa){wa?(Ua.Buf8=Uint8Array,Ua.Buf16=Uint16Array,Ua.Buf32=Int32Array,Ua.assign(Ua,Qa)):(Ua.Buf8=Array,Ua.Buf16=Array,
Ua.Buf32=Array,Ua.assign(Ua,Sa))};Ua.setTyped(aa)},{}],4:[function(aa,jb,Ua){function Qa(m,t){if(t<65537&&(m.subarray&&I||!m.subarray&&wa))return String.fromCharCode.apply(null,Sa.shrinkBuf(m,t));for(var E="",R=0;R<t;R++)E+=String.fromCharCode(m[R]);return E}var Sa=aa("./common"),wa=!0,I=!0;try{String.fromCharCode.apply(null,[0])}catch(m){wa=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(m){I=!1}var La=new Sa.Buf8(256);for(aa=0;aa<256;aa++)La[aa]=aa>=252?6:aa>=248?5:aa>=240?4:aa>=
224?3:aa>=192?2:1;La[254]=La[254]=1;Ua.string2buf=function(m){var t,E,R,B=m.length,sa=0;for(E=0;E<B;E++){var ua=m.charCodeAt(E);55296===(64512&ua)&&E+1<B&&(t=m.charCodeAt(E+1),56320===(64512&t)&&(ua=65536+(ua-55296<<10)+(t-56320),E++));sa+=ua<128?1:ua<2048?2:ua<65536?3:4}var Ba=new Sa.Buf8(sa);for(E=R=0;R<sa;E++)ua=m.charCodeAt(E),55296===(64512&ua)&&E+1<B&&(t=m.charCodeAt(E+1),56320===(64512&t)&&(ua=65536+(ua-55296<<10)+(t-56320),E++)),ua<128?Ba[R++]=ua:ua<2048?(Ba[R++]=192|ua>>>6,Ba[R++]=128|63&
ua):ua<65536?(Ba[R++]=224|ua>>>12,Ba[R++]=128|ua>>>6&63,Ba[R++]=128|63&ua):(Ba[R++]=240|ua>>>18,Ba[R++]=128|ua>>>12&63,Ba[R++]=128|ua>>>6&63,Ba[R++]=128|63&ua);return Ba};Ua.buf2binstring=function(m){return Qa(m,m.length)};Ua.binstring2buf=function(m){for(var t=new Sa.Buf8(m.length),E=0,R=t.length;E<R;E++)t[E]=m.charCodeAt(E);return t};Ua.buf2string=function(m,t){var E,R,B,sa=t||m.length,ua=Array(2*sa);for(t=E=0;t<sa;)if(R=m[t++],R<128)ua[E++]=R;else if(B=La[R],B>4)ua[E++]=65533,t+=B-1;else{for(R&=
2===B?31:3===B?15:7;B>1&&t<sa;)R=R<<6|63&m[t++],B--;B>1?ua[E++]=65533:R<65536?ua[E++]=R:(R-=65536,ua[E++]=55296|R>>10&1023,ua[E++]=56320|1023&R)}return Qa(ua,E)};Ua.utf8border=function(m,t){var E;t=t||m.length;t>m.length&&(t=m.length);for(E=t-1;E>=0&&128===(192&m[E]);)E--;return E<0?t:0===E?t:E+La[m[E]]>t?E:t}},{"./common":3}],5:[function(aa,jb,Ua){jb.exports=function(Qa,Sa,wa,I){var La=65535&Qa|0;Qa=Qa>>>16&65535|0;for(var m;0!==wa;){m=wa>2E3?2E3:wa;wa-=m;do La=La+Sa[I++]|0,Qa=Qa+La|0;while(--m);
La%=65521;Qa%=65521}return La|Qa<<16|0}},{}],6:[function(aa,jb,Ua){jb.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(aa,jb,Ua){var Qa=function(){for(var Sa,
wa=[],I=0;I<256;I++){Sa=I;for(var La=0;La<8;La++)Sa=1&Sa?3988292384^Sa>>>1:Sa>>>1;wa[I]=Sa}return wa}();jb.exports=function(Sa,wa,I,La){I=La+I;for(Sa^=-1;La<I;La++)Sa=Sa>>>8^Qa[255&(Sa^wa[La])];return Sa^-1}},{}],8:[function(aa,jb,Ua){function Qa(M,ib){return M.msg=dc[ib],ib}function Sa(M){for(var ib=M.length;--ib>=0;)M[ib]=0}function wa(M){var ib=M.state,S=ib.pending;S>M.avail_out&&(S=M.avail_out);0!==S&&(Db.arraySet(M.output,ib.pending_buf,ib.pending_out,S,M.next_out),M.next_out+=S,ib.pending_out+=
S,M.total_out+=S,M.avail_out-=S,ib.pending-=S,0===ib.pending&&(ib.pending_out=0))}function I(M,ib){qa._tr_flush_block(M,M.block_start>=0?M.block_start:-1,M.strstart-M.block_start,ib);M.block_start=M.strstart;wa(M.strm)}function La(M,ib){M.pending_buf[M.pending++]=ib}function m(M,ib){M.pending_buf[M.pending++]=ib>>>8&255;M.pending_buf[M.pending++]=255&ib}function t(M,ib){var S,O,y=M.max_chain_length,H=M.strstart,nb=M.prev_length,N=M.nice_match,ac=M.strstart>M.w_size-pb?M.strstart-(M.w_size-pb):0,ab=
M.window,sb=M.w_mask,ec=M.prev,Jb=M.strstart+fa,Nh=ab[H+nb-1],mf=ab[H+nb];M.prev_length>=M.good_match&&(y>>=2);N>M.lookahead&&(N=M.lookahead);do if(S=ib,ab[S+nb]===mf&&ab[S+nb-1]===Nh&&ab[S]===ab[H]&&ab[++S]===ab[H+1]){H+=2;for(S++;ab[++H]===ab[++S]&&ab[++H]===ab[++S]&&ab[++H]===ab[++S]&&ab[++H]===ab[++S]&&ab[++H]===ab[++S]&&ab[++H]===ab[++S]&&ab[++H]===ab[++S]&&ab[++H]===ab[++S]&&H<Jb;);if(O=fa-(Jb-H),H=Jb-fa,O>nb){if(M.match_start=ib,nb=O,O>=N)break;Nh=ab[H+nb-1];mf=ab[H+nb]}}while((ib=ec[ib&sb])>
ac&&0!==--y);return nb<=M.lookahead?nb:M.lookahead}function E(M){var ib,S,O=M.w_size;do{if(S=M.window_size-M.lookahead-M.strstart,M.strstart>=O+(O-pb)){Db.arraySet(M.window,M.window,O,O,0);M.match_start-=O;M.strstart-=O;M.block_start-=O;var y=ib=M.hash_size;do{var H=M.head[--y];M.head[y]=H>=O?H-O:0}while(--ib);y=ib=O;do H=M.prev[--y],M.prev[y]=H>=O?H-O:0;while(--ib);S+=O}if(0===M.strm.avail_in)break;y=M.strm;H=M.window;var nb=M.strstart+M.lookahead,N=y.avail_in;if(ib=(N>S&&(N=S),0===N?0:(y.avail_in-=
N,Db.arraySet(H,y.input,y.next_in,N,nb),1===y.state.wrap?y.adler=kc(y.adler,H,N,nb):2===y.state.wrap&&(y.adler=tb(y.adler,H,N,nb)),y.next_in+=N,y.total_in+=N,N)),M.lookahead+=ib,M.lookahead+M.insert>=Fa)for(S=M.strstart-M.insert,M.ins_h=M.window[S],M.ins_h=(M.ins_h<<M.hash_shift^M.window[S+1])&M.hash_mask;M.insert&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[S+Fa-1])&M.hash_mask,M.prev[S&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=S,S++,M.insert--,!(M.lookahead+M.insert<Fa)););}while(M.lookahead<pb&&0!==
M.strm.avail_in)}function R(M,ib){for(var S,O;;){if(M.lookahead<pb){if(E(M),M.lookahead<pb&&ib===ja)return ya;if(0===M.lookahead)break}if(S=0,M.lookahead>=Fa&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Fa-1])&M.hash_mask,S=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=M.strstart),0!==S&&M.strstart-S<=M.w_size-pb&&(M.match_length=t(M,S)),M.match_length>=Fa)if(O=qa._tr_tally(M,M.strstart-M.match_start,M.match_length-Fa),M.lookahead-=M.match_length,M.match_length<=M.max_lazy_match&&
M.lookahead>=Fa){M.match_length--;do M.strstart++,M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Fa-1])&M.hash_mask,S=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=M.strstart;while(0!==--M.match_length);M.strstart++}else M.strstart+=M.match_length,M.match_length=0,M.ins_h=M.window[M.strstart],M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+1])&M.hash_mask;else O=qa._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++;if(O&&(I(M,!1),0===M.strm.avail_out))return ya}return M.insert=
M.strstart<Fa-1?M.strstart:Fa-1,ib===Ta?(I(M,!0),0===M.strm.avail_out?qc:Wa):M.last_lit&&(I(M,!1),0===M.strm.avail_out)?ya:Rf}function B(M,ib){for(var S,O,y;;){if(M.lookahead<pb){if(E(M),M.lookahead<pb&&ib===ja)return ya;if(0===M.lookahead)break}if(S=0,M.lookahead>=Fa&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Fa-1])&M.hash_mask,S=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=M.strstart),M.prev_length=M.match_length,M.prev_match=M.match_start,M.match_length=Fa-1,0!==S&&M.prev_length<
M.max_lazy_match&&M.strstart-S<=M.w_size-pb&&(M.match_length=t(M,S),M.match_length<=5&&(M.strategy===zb||M.match_length===Fa&&M.strstart-M.match_start>4096)&&(M.match_length=Fa-1)),M.prev_length>=Fa&&M.match_length<=M.prev_length){y=M.strstart+M.lookahead-Fa;O=qa._tr_tally(M,M.strstart-1-M.prev_match,M.prev_length-Fa);M.lookahead-=M.prev_length-1;M.prev_length-=2;do++M.strstart<=y&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Fa-1])&M.hash_mask,S=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],
M.head[M.ins_h]=M.strstart);while(0!==--M.prev_length);if(M.match_available=0,M.match_length=Fa-1,M.strstart++,O&&(I(M,!1),0===M.strm.avail_out))return ya}else if(M.match_available){if(O=qa._tr_tally(M,0,M.window[M.strstart-1]),O&&I(M,!1),M.strstart++,M.lookahead--,0===M.strm.avail_out)return ya}else M.match_available=1,M.strstart++,M.lookahead--}return M.match_available&&(qa._tr_tally(M,0,M.window[M.strstart-1]),M.match_available=0),M.insert=M.strstart<Fa-1?M.strstart:Fa-1,ib===Ta?(I(M,!0),0===M.strm.avail_out?
qc:Wa):M.last_lit&&(I(M,!1),0===M.strm.avail_out)?ya:Rf}function sa(M,ib,S,O,y){this.good_length=M;this.max_lazy=ib;this.nice_length=S;this.max_chain=O;this.func=y}function ua(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=Vd;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=
this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new Db.Buf16(2*Bd);this.dyn_dtree=new Db.Buf16(2*(2*Ad+1));this.bl_tree=new Db.Buf16(2*(2*T+1));Sa(this.dyn_ltree);Sa(this.dyn_dtree);Sa(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new Db.Buf16(nd+1);
this.heap=new Db.Buf16(2*rb+1);Sa(this.heap);this.heap_max=this.heap_len=0;this.depth=new Db.Buf16(2*rb+1);Sa(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function Ba(M){var ib;return M&&M.state?(M.total_in=M.total_out=0,M.data_type=da,ib=M.state,ib.pending=0,ib.pending_out=0,ib.wrap<0&&(ib.wrap=-ib.wrap),ib.status=ib.wrap?Mb:Va,M.adler=2===ib.wrap?0:1,ib.last_flush=ja,qa._tr_init(ib),hb):Qa(M,ma)}
function Na(M){var ib=Ba(M);ib===hb&&(M=M.state,M.window_size=2*M.w_size,Sa(M.head),M.max_lazy_match=V[M.level].max_lazy,M.good_match=V[M.level].good_length,M.nice_match=V[M.level].nice_length,M.max_chain_length=V[M.level].max_chain,M.strstart=0,M.block_start=0,M.lookahead=0,M.insert=0,M.match_length=M.prev_length=Fa-1,M.match_available=0,M.ins_h=0);return ib}function ic(M,ib,S,O,y,H){if(!M)return ma;var nb=1;if(ib===Ja&&(ib=6),O<0?(nb=0,O=-O):O>15&&(nb=2,O-=16),y<1||y>dd||S!==Vd||O<8||O>15||ib<0||
ib>9||H<0||H>Da)return Qa(M,ma);8===O&&(O=9);var N=new ua;return M.state=N,N.strm=M,N.wrap=nb,N.gzhead=null,N.w_bits=O,N.w_size=1<<N.w_bits,N.w_mask=N.w_size-1,N.hash_bits=y+7,N.hash_size=1<<N.hash_bits,N.hash_mask=N.hash_size-1,N.hash_shift=~~((N.hash_bits+Fa-1)/Fa),N.window=new Db.Buf8(2*N.w_size),N.head=new Db.Buf16(N.hash_size),N.prev=new Db.Buf16(N.w_size),N.lit_bufsize=1<<y+6,N.pending_buf_size=4*N.lit_bufsize,N.pending_buf=new Db.Buf8(N.pending_buf_size),N.d_buf=1*N.lit_bufsize,N.l_buf=3*N.lit_bufsize,
N.level=ib,N.strategy=H,N.method=S,Na(M)}var Db=aa("../utils/common"),qa=aa("./trees"),kc=aa("./adler32"),tb=aa("./crc32"),dc=aa("./messages"),ja=0,Ta=4,hb=0,ma=-2,Ja=-1,zb=1,Da=4,da=2,Vd=8,dd=9,rb=286,Ad=30,T=19,Bd=2*rb+1,nd=15,Fa=3,fa=258,pb=fa+Fa+1,Mb=42,Va=113,ya=1,Rf=2,qc=3,Wa=4;var V=[new sa(0,0,0,0,function(M,ib){var S=65535;for(S>M.pending_buf_size-5&&(S=M.pending_buf_size-5);;){if(M.lookahead<=1){if(E(M),0===M.lookahead&&ib===ja)return ya;if(0===M.lookahead)break}M.strstart+=M.lookahead;
M.lookahead=0;var O=M.block_start+S;if((0===M.strstart||M.strstart>=O)&&(M.lookahead=M.strstart-O,M.strstart=O,I(M,!1),0===M.strm.avail_out)||M.strstart-M.block_start>=M.w_size-pb&&(I(M,!1),0===M.strm.avail_out))return ya}return M.insert=0,ib===Ta?(I(M,!0),0===M.strm.avail_out?qc:Wa):(M.strstart>M.block_start&&I(M,!1),ya)}),new sa(4,4,8,4,R),new sa(4,5,16,8,R),new sa(4,6,32,32,R),new sa(4,4,16,16,B),new sa(8,16,32,32,B),new sa(8,16,128,128,B),new sa(8,32,128,256,B),new sa(32,128,258,1024,B),new sa(32,
258,258,4096,B)];Ua.deflateInit=function(M,ib){return ic(M,ib,Vd,15,8,0)};Ua.deflateInit2=ic;Ua.deflateReset=Na;Ua.deflateResetKeep=Ba;Ua.deflateSetHeader=function(M,ib){return M&&M.state?2!==M.state.wrap?ma:(M.state.gzhead=ib,hb):ma};Ua.deflate=function(M,ib){var S,O;if(!M||!M.state||ib>5||ib<0)return M?Qa(M,ma):ma;if(O=M.state,!M.output||!M.input&&0!==M.avail_in||O.status===666&&ib!==Ta)return Qa(M,0===M.avail_out?-5:ma);if(O.strm=M,S=O.last_flush,O.last_flush=ib,O.status===Mb)if(2===O.wrap)M.adler=
0,La(O,31),La(O,139),La(O,8),O.gzhead?(La(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),La(O,255&O.gzhead.time),La(O,O.gzhead.time>>8&255),La(O,O.gzhead.time>>16&255),La(O,O.gzhead.time>>24&255),La(O,9===O.level?2:O.strategy>=2||O.level<2?4:0),La(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(La(O,255&O.gzhead.extra.length),La(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(M.adler=tb(M.adler,O.pending_buf,O.pending,0)),O.gzindex=
0,O.status=69):(La(O,0),La(O,0),La(O,0),La(O,0),La(O,0),La(O,9===O.level?2:O.strategy>=2||O.level<2?4:0),La(O,3),O.status=Va);else{var y=Vd+(O.w_bits-8<<4)<<8;y|=(O.strategy>=2||O.level<2?0:O.level<6?1:6===O.level?2:3)<<6;0!==O.strstart&&(y|=32);O.status=Va;m(O,y+(31-y%31));0!==O.strstart&&(m(O,M.adler>>>16),m(O,65535&M.adler));M.adler=1}if(O.status===69)if(O.gzhead.extra){for(y=O.pending;O.gzindex<(65535&O.gzhead.extra.length)&&(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&&O.pending>y&&(M.adler=
tb(M.adler,O.pending_buf,O.pending-y,y)),wa(M),y=O.pending,O.pending!==O.pending_buf_size));)La(O,255&O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&&O.pending>y&&(M.adler=tb(M.adler,O.pending_buf,O.pending-y,y));O.gzindex===O.gzhead.extra.length&&(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){y=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>y&&(M.adler=tb(M.adler,O.pending_buf,O.pending-y,y)),wa(M),y=O.pending,O.pending===O.pending_buf_size)){var H=
1;break}H=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0;La(O,H)}while(0!==H);O.gzhead.hcrc&&O.pending>y&&(M.adler=tb(M.adler,O.pending_buf,O.pending-y,y));0===H&&(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){y=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>y&&(M.adler=tb(M.adler,O.pending_buf,O.pending-y,y)),wa(M),y=O.pending,O.pending===O.pending_buf_size)){H=1;break}H=O.gzindex<O.gzhead.comment.length?255&
O.gzhead.comment.charCodeAt(O.gzindex++):0;La(O,H)}while(0!==H);O.gzhead.hcrc&&O.pending>y&&(M.adler=tb(M.adler,O.pending_buf,O.pending-y,y));0===H&&(O.status=103)}else O.status=103;if(O.status===103&&(O.gzhead.hcrc?(O.pending+2>O.pending_buf_size&&wa(M),O.pending+2<=O.pending_buf_size&&(La(O,255&M.adler),La(O,M.adler>>8&255),M.adler=0,O.status=Va)):O.status=Va),0!==O.pending){if(wa(M),0===M.avail_out)return O.last_flush=-1,hb}else if(0===M.avail_in&&(ib<<1)-(ib>4?9:0)<=(S<<1)-(S>4?9:0)&&ib!==Ta)return Qa(M,
-5);if(O.status===666&&0!==M.avail_in)return Qa(M,-5);if(0!==M.avail_in||0!==O.lookahead||ib!==ja&&O.status!==666){if(O.strategy===2)a:{for(var nb;;){if(0===O.lookahead&&(E(O),0===O.lookahead)){if(ib===ja){var N=ya;break a}break}if(O.match_length=0,nb=qa._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,nb&&(I(O,!1),0===O.strm.avail_out)){N=ya;break a}}N=(O.insert=0,ib===Ta?(I(O,!0),0===O.strm.avail_out?qc:Wa):O.last_lit&&(I(O,!1),0===O.strm.avail_out)?ya:Rf)}else if(O.strategy===3)a:{var ac,
ab;for(nb=O.window;;){if(O.lookahead<=fa){if(E(O),O.lookahead<=fa&&ib===ja){N=ya;break a}if(0===O.lookahead)break}if(O.match_length=0,O.lookahead>=Fa&&O.strstart>0&&(ab=O.strstart-1,ac=nb[ab],ac===nb[++ab]&&ac===nb[++ab]&&ac===nb[++ab])){for(S=O.strstart+fa;ac===nb[++ab]&&ac===nb[++ab]&&ac===nb[++ab]&&ac===nb[++ab]&&ac===nb[++ab]&&ac===nb[++ab]&&ac===nb[++ab]&&ac===nb[++ab]&&ab<S;);O.match_length=fa-(S-ab);O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=Fa?(N=qa._tr_tally(O,
1,O.match_length-Fa),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(N=qa._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),N&&(I(O,!1),0===O.strm.avail_out)){N=ya;break a}}N=(O.insert=0,ib===Ta?(I(O,!0),0===O.strm.avail_out?qc:Wa):O.last_lit&&(I(O,!1),0===O.strm.avail_out)?ya:Rf)}else N=V[O.level].func(O,ib);if(N!==qc&&N!==Wa||(O.status=666),N===ya||N===qc)return 0===M.avail_out&&(O.last_flush=-1),hb;if(N===Rf&&(ib===1?qa._tr_align(O):ib!==5&&(qa._tr_stored_block(O,
0,0,!1),ib===3&&(Sa(O.head),0===O.lookahead&&(O.strstart=0,O.block_start=0,O.insert=0))),wa(M),0===M.avail_out))return O.last_flush=-1,hb}return ib!==Ta?hb:O.wrap<=0?1:(2===O.wrap?(La(O,255&M.adler),La(O,M.adler>>8&255),La(O,M.adler>>16&255),La(O,M.adler>>24&255),La(O,255&M.total_in),La(O,M.total_in>>8&255),La(O,M.total_in>>16&255),La(O,M.total_in>>24&255)):(m(O,M.adler>>>16),m(O,65535&M.adler)),wa(M),O.wrap>0&&(O.wrap=-O.wrap),0!==O.pending?hb:1)};Ua.deflateEnd=function(M){var ib;return M&&M.state?
(ib=M.state.status,ib!==Mb&&ib!==69&&ib!==73&&ib!==91&&ib!==103&&ib!==Va&&ib!==666?Qa(M,ma):(M.state=null,ib===Va?Qa(M,-3):hb)):ma};Ua.deflateSetDictionary=function(M,ib){var S,O,y;var H=ib.length;if(!M||!M.state||(S=M.state,O=S.wrap,2===O||1===O&&S.status!==Mb||S.lookahead))return ma;1===O&&(M.adler=kc(M.adler,ib,H,0));S.wrap=0;H>=S.w_size&&(0===O&&(Sa(S.head),S.strstart=0,S.block_start=0,S.insert=0),y=new Db.Buf8(S.w_size),Db.arraySet(y,ib,H-S.w_size,S.w_size,0),ib=y,H=S.w_size);y=M.avail_in;var nb=
M.next_in;var N=M.input;M.avail_in=H;M.next_in=0;M.input=ib;for(E(S);S.lookahead>=Fa;){ib=S.strstart;H=S.lookahead-(Fa-1);do S.ins_h=(S.ins_h<<S.hash_shift^S.window[ib+Fa-1])&S.hash_mask,S.prev[ib&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=ib,ib++;while(--H);S.strstart=ib;S.lookahead=Fa-1;E(S)}return S.strstart+=S.lookahead,S.block_start=S.strstart,S.insert=S.lookahead,S.lookahead=0,S.match_length=S.prev_length=Fa-1,S.match_available=0,M.next_in=nb,M.input=N,M.avail_in=y,S.wrap=O,hb};Ua.deflateInfo=
"pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(aa,jb,Ua){jb.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(aa,jb,Ua){jb.exports=function(Qa,Sa){var wa,I,La;var m=Qa.state;var t=Qa.next_in;var E=Qa.input;var R=t+(Qa.avail_in-5);var B=Qa.next_out;var sa=Qa.output;Sa=B-(Sa-Qa.avail_out);var ua=B+(Qa.avail_out-
257);var Ba=m.dmax;var Na=m.wsize;var ic=m.whave;var Db=m.wnext;var qa=m.window;var kc=m.hold;var tb=m.bits;var dc=m.lencode;var ja=m.distcode;var Ta=(1<<m.lenbits)-1;var hb=(1<<m.distbits)-1;a:do{tb<15&&(kc+=E[t++]<<tb,tb+=8,kc+=E[t++]<<tb,tb+=8);var ma=dc[kc&Ta];b:for(;;){if(wa=ma>>>24,kc>>>=wa,tb-=wa,wa=ma>>>16&255,0===wa)sa[B++]=65535&ma;else{if(!(16&wa)){if(0===(64&wa)){ma=dc[(65535&ma)+(kc&(1<<wa)-1)];continue b}if(32&wa){m.mode=12;break a}Qa.msg="invalid literal/length code";m.mode=30;break a}var Ja=
65535&ma;(wa&=15)&&(tb<wa&&(kc+=E[t++]<<tb,tb+=8),Ja+=kc&(1<<wa)-1,kc>>>=wa,tb-=wa);tb<15&&(kc+=E[t++]<<tb,tb+=8,kc+=E[t++]<<tb,tb+=8);ma=ja[kc&hb];c:for(;;){if(wa=ma>>>24,kc>>>=wa,tb-=wa,wa=ma>>>16&255,!(16&wa)){if(0===(64&wa)){ma=ja[(65535&ma)+(kc&(1<<wa)-1)];continue c}Qa.msg="invalid distance code";m.mode=30;break a}if(I=65535&ma,wa&=15,tb<wa&&(kc+=E[t++]<<tb,tb+=8,tb<wa&&(kc+=E[t++]<<tb,tb+=8)),I+=kc&(1<<wa)-1,I>Ba){Qa.msg="invalid distance too far back";m.mode=30;break a}if(kc>>>=wa,tb-=wa,
wa=B-Sa,I>wa){if(wa=I-wa,wa>ic&&m.sane){Qa.msg="invalid distance too far back";m.mode=30;break a}if(ma=0,La=qa,0===Db){if(ma+=Na-wa,wa<Ja){Ja-=wa;do sa[B++]=qa[ma++];while(--wa);ma=B-I;La=sa}}else if(Db<wa){if(ma+=Na+Db-wa,wa-=Db,wa<Ja){Ja-=wa;do sa[B++]=qa[ma++];while(--wa);if(ma=0,Db<Ja){wa=Db;Ja-=wa;do sa[B++]=qa[ma++];while(--wa);ma=B-I;La=sa}}}else if(ma+=Db-wa,wa<Ja){Ja-=wa;do sa[B++]=qa[ma++];while(--wa);ma=B-I;La=sa}for(;Ja>2;)sa[B++]=La[ma++],sa[B++]=La[ma++],sa[B++]=La[ma++],Ja-=3;Ja&&(sa[B++]=
La[ma++],Ja>1&&(sa[B++]=La[ma++]))}else{ma=B-I;do sa[B++]=sa[ma++],sa[B++]=sa[ma++],sa[B++]=sa[ma++],Ja-=3;while(Ja>2);Ja&&(sa[B++]=sa[ma++],Ja>1&&(sa[B++]=sa[ma++]))}break}}break}}while(t<R&&B<ua);Ja=tb>>3;t-=Ja;tb-=Ja<<3;Qa.next_in=t;Qa.next_out=B;Qa.avail_in=t<R?5+(R-t):5-(t-R);Qa.avail_out=B<ua?257+(ua-B):257-(B-ua);m.hold=kc&(1<<tb)-1;m.bits=tb}},{}],11:[function(aa,jb,Ua){function Qa(ja){return(ja>>>24&255)+(ja>>>8&65280)+((65280&ja)<<8)+((255&ja)<<24)}function Sa(){this.mode=0;this.last=!1;
this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new B.Buf16(320);this.work=new B.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function wa(ja){var Ta;return ja&&ja.state?(Ta=ja.state,ja.total_in=
ja.total_out=Ta.total=0,ja.msg="",Ta.wrap&&(ja.adler=1&Ta.wrap),Ta.mode=qa,Ta.last=0,Ta.havedict=0,Ta.dmax=32768,Ta.head=null,Ta.hold=0,Ta.bits=0,Ta.lencode=Ta.lendyn=new B.Buf32(kc),Ta.distcode=Ta.distdyn=new B.Buf32(tb),Ta.sane=1,Ta.back=-1,ic):Db}function I(ja){var Ta;return ja&&ja.state?(Ta=ja.state,Ta.wsize=0,Ta.whave=0,Ta.wnext=0,wa(ja)):Db}function La(ja,Ta){var hb,ma;return ja&&ja.state?(ma=ja.state,Ta<0?(hb=0,Ta=-Ta):(hb=(Ta>>4)+1,Ta<48&&(Ta&=15)),Ta&&(Ta<8||Ta>15)?Db:(null!==ma.window&&
ma.wbits!==Ta&&(ma.window=null),ma.wrap=hb,ma.wbits=Ta,I(ja))):Db}function m(ja,Ta){var hb,ma;return ja?(ma=new Sa,ja.state=ma,ma.window=null,hb=La(ja,Ta),hb!==ic&&(ja.state=null),hb):Db}function t(ja,Ta,hb,ma){var Ja;ja=ja.state;return null===ja.window&&(ja.wsize=1<<ja.wbits,ja.wnext=0,ja.whave=0,ja.window=new B.Buf8(ja.wsize)),ma>=ja.wsize?(B.arraySet(ja.window,Ta,hb-ja.wsize,ja.wsize,0),ja.wnext=0,ja.whave=ja.wsize):(Ja=ja.wsize-ja.wnext,Ja>ma&&(Ja=ma),B.arraySet(ja.window,Ta,hb-ma,Ja,ja.wnext),
ma-=Ja,ma?(B.arraySet(ja.window,Ta,hb-ma,ma,0),ja.wnext=ma,ja.whave=ja.wsize):(ja.wnext+=Ja,ja.wnext===ja.wsize&&(ja.wnext=0),ja.whave<ja.wsize&&(ja.whave+=Ja))),0}var E,R,B=aa("../utils/common"),sa=aa("./adler32"),ua=aa("./crc32"),Ba=aa("./inffast"),Na=aa("./inftrees"),ic=0,Db=-2,qa=1,kc=852,tb=592,dc=!0;Ua.inflateReset=I;Ua.inflateReset2=La;Ua.inflateResetKeep=wa;Ua.inflateInit=function(ja){return m(ja,15)};Ua.inflateInit2=m;Ua.inflate=function(ja,Ta){var hb,ma,Ja,zb,Da,da,Vd,dd=0,rb=new B.Buf8(4),
Ad=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ja||!ja.state||!ja.output||!ja.input&&0!==ja.avail_in)return Db;var T=ja.state;T.mode===12&&(T.mode=13);var Bd=ja.next_out;var nd=ja.output;var Fa=ja.avail_out;var fa=ja.next_in;var pb=ja.input;var Mb=ja.avail_in;var Va=T.hold;var ya=T.bits;var Rf=Mb;var qc=Fa;var Wa=ic;a:for(;;)switch(T.mode){case qa:if(0===T.wrap){T.mode=13;break}for(;ya<16;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(2&T.wrap&&35615===Va){T.check=0;rb[0]=255&Va;rb[1]=
Va>>>8&255;T.check=ua(T.check,rb,2,0);ya=Va=0;T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&Va)<<8)+(Va>>8))%31){ja.msg="incorrect header check";T.mode=30;break}if((15&Va)!==8){ja.msg="unknown compression method";T.mode=30;break}if(Va>>>=4,ya-=4,da=(15&Va)+8,0===T.wbits)T.wbits=da;else if(da>T.wbits){ja.msg="invalid window size";T.mode=30;break}T.dmax=1<<da;ja.adler=T.check=1;T.mode=512&Va?10:12;ya=Va=0;break;case 2:for(;ya<16;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=
8}if(T.flags=Va,(255&T.flags)!==8){ja.msg="unknown compression method";T.mode=30;break}if(57344&T.flags){ja.msg="unknown header flags set";T.mode=30;break}T.head&&(T.head.text=Va>>8&1);512&T.flags&&(rb[0]=255&Va,rb[1]=Va>>>8&255,T.check=ua(T.check,rb,2,0));ya=Va=0;T.mode=3;case 3:for(;ya<32;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}T.head&&(T.head.time=Va);512&T.flags&&(rb[0]=255&Va,rb[1]=Va>>>8&255,rb[2]=Va>>>16&255,rb[3]=Va>>>24&255,T.check=ua(T.check,rb,4,0));ya=Va=0;T.mode=4;case 4:for(;ya<
16;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}T.head&&(T.head.xflags=255&Va,T.head.os=Va>>8);512&T.flags&&(rb[0]=255&Va,rb[1]=Va>>>8&255,T.check=ua(T.check,rb,2,0));ya=Va=0;T.mode=5;case 5:if(1024&T.flags){for(;ya<16;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}T.length=Va;T.head&&(T.head.extra_len=Va);512&T.flags&&(rb[0]=255&Va,rb[1]=Va>>>8&255,T.check=ua(T.check,rb,2,0));ya=Va=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(hb=T.length,hb>Mb&&(hb=Mb),hb&&(T.head&&(da=
T.head.extra_len-T.length,T.head.extra||(T.head.extra=Array(T.head.extra_len)),B.arraySet(T.head.extra,pb,fa,hb,da)),512&T.flags&&(T.check=ua(T.check,pb,hb,fa)),Mb-=hb,fa+=hb,T.length-=hb),T.length))break a;T.length=0;T.mode=7;case 7:if(2048&T.flags){if(0===Mb)break a;hb=0;do da=pb[fa+hb++],T.head&&da&&T.length<65536&&(T.head.name+=String.fromCharCode(da));while(da&&hb<Mb);if(512&T.flags&&(T.check=ua(T.check,pb,hb,fa)),Mb-=hb,fa+=hb,da)break a}else T.head&&(T.head.name=null);T.length=0;T.mode=8;case 8:if(4096&
T.flags){if(0===Mb)break a;hb=0;do da=pb[fa+hb++],T.head&&da&&T.length<65536&&(T.head.comment+=String.fromCharCode(da));while(da&&hb<Mb);if(512&T.flags&&(T.check=ua(T.check,pb,hb,fa)),Mb-=hb,fa+=hb,da)break a}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;ya<16;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(Va!==(65535&T.check)){ja.msg="header crc mismatch";T.mode=30;break}ya=Va=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0);ja.adler=T.check=0;T.mode=12;break;case 10:for(;ya<
32;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}ja.adler=T.check=Qa(Va);ya=Va=0;T.mode=11;case 11:if(0===T.havedict)return ja.next_out=Bd,ja.avail_out=Fa,ja.next_in=fa,ja.avail_in=Mb,T.hold=Va,T.bits=ya,2;ja.adler=T.check=1;T.mode=12;case 12:if(Ta===5||Ta===6)break a;case 13:if(T.last){Va>>>=7&ya;ya-=7&ya;T.mode=27;break}for(;ya<3;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}switch(T.last=1&Va,Va>>>=1,--ya,3&Va){case 0:T.mode=14;break;case 1:var V=T;if(dc){E=new B.Buf32(512);R=new B.Buf32(32);
for(Ja=0;Ja<144;)V.lens[Ja++]=8;for(;Ja<256;)V.lens[Ja++]=9;for(;Ja<280;)V.lens[Ja++]=7;for(;Ja<288;)V.lens[Ja++]=8;Na(1,V.lens,0,288,E,0,V.work,{bits:9});for(Ja=0;Ja<32;)V.lens[Ja++]=5;Na(2,V.lens,0,32,R,0,V.work,{bits:5});dc=!1}V.lencode=E;V.lenbits=9;V.distcode=R;V.distbits=5;if(T.mode=20,Ta===6){Va>>>=2;ya-=2;break a}break;case 2:T.mode=17;break;case 3:ja.msg="invalid block type",T.mode=30}Va>>>=2;ya-=2;break;case 14:Va>>>=7&ya;for(ya-=7&ya;ya<32;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=
8}if((65535&Va)!==(Va>>>16^65535)){ja.msg="invalid stored block lengths";T.mode=30;break}if(T.length=65535&Va,Va=0,ya=0,T.mode=15,Ta===6)break a;case 15:T.mode=16;case 16:if(hb=T.length){if(hb>Mb&&(hb=Mb),hb>Fa&&(hb=Fa),0===hb)break a;B.arraySet(nd,pb,fa,hb,Bd);Mb-=hb;fa+=hb;Fa-=hb;Bd+=hb;T.length-=hb;break}T.mode=12;break;case 17:for(;ya<14;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(T.nlen=(31&Va)+257,Va>>>=5,ya-=5,T.ndist=(31&Va)+1,Va>>>=5,ya-=5,T.ncode=(15&Va)+4,Va>>>=4,ya-=4,T.nlen>286||
T.ndist>30){ja.msg="too many length or distance symbols";T.mode=30;break}T.have=0;T.mode=18;case 18:for(;T.have<T.ncode;){for(;ya<3;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}T.lens[Ad[T.have++]]=7&Va;Va>>>=3;ya-=3}for(;T.have<19;)T.lens[Ad[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,Vd={bits:T.lenbits},Wa=Na(0,T.lens,0,19,T.lencode,0,T.work,Vd),T.lenbits=Vd.bits,Wa){ja.msg="invalid code lengths set";T.mode=30;break}T.have=0;T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;dd=T.lencode[Va&
(1<<T.lenbits)-1],zb=dd>>>24,V=65535&dd,!(zb<=ya);){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(V<16)Va>>>=zb,ya-=zb,T.lens[T.have++]=V;else{if(16===V){for(Ja=zb+2;ya<Ja;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(Va>>>=zb,ya-=zb,0===T.have){ja.msg="invalid bit length repeat";T.mode=30;break}da=T.lens[T.have-1];hb=3+(3&Va);Va>>>=2;ya-=2}else if(17===V){for(Ja=zb+3;ya<Ja;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}Va>>>=zb;ya-=zb;da=0;hb=3+(7&Va);Va>>>=3;ya-=3}else{for(Ja=zb+7;ya<Ja;){if(0===
Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}Va>>>=zb;ya-=zb;da=0;hb=11+(127&Va);Va>>>=7;ya-=7}if(T.have+hb>T.nlen+T.ndist){ja.msg="invalid bit length repeat";T.mode=30;break}for(;hb--;)T.lens[T.have++]=da}}if(T.mode===30)break;if(0===T.lens[256]){ja.msg="invalid code -- missing end-of-block";T.mode=30;break}if(T.lenbits=9,Vd={bits:T.lenbits},Wa=Na(1,T.lens,0,T.nlen,T.lencode,0,T.work,Vd),T.lenbits=Vd.bits,Wa){ja.msg="invalid literal/lengths set";T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,Vd=
{bits:T.distbits},Wa=Na(2,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,Vd),T.distbits=Vd.bits,Wa){ja.msg="invalid distances set";T.mode=30;break}if(T.mode=20,Ta===6)break a;case 20:T.mode=21;case 21:if(Mb>=6&&Fa>=258){ja.next_out=Bd;ja.avail_out=Fa;ja.next_in=fa;ja.avail_in=Mb;T.hold=Va;T.bits=ya;Ba(ja,qc);Bd=ja.next_out;nd=ja.output;Fa=ja.avail_out;fa=ja.next_in;pb=ja.input;Mb=ja.avail_in;Va=T.hold;ya=T.bits;T.mode===12&&(T.back=-1);break}for(T.back=0;dd=T.lencode[Va&(1<<T.lenbits)-1],zb=dd>>>24,Ja=
dd>>>16&255,V=65535&dd,!(zb<=ya);){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(Ja&&0===(240&Ja)){var M=zb;var ib=Ja;for(Da=V;dd=T.lencode[Da+((Va&(1<<M+ib)-1)>>M)],zb=dd>>>24,Ja=dd>>>16&255,V=65535&dd,!(M+zb<=ya);){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}Va>>>=M;ya-=M;T.back+=M}if(Va>>>=zb,ya-=zb,T.back+=zb,T.length=V,0===Ja){T.mode=26;break}if(32&Ja){T.back=-1;T.mode=12;break}if(64&Ja){ja.msg="invalid literal/length code";T.mode=30;break}T.extra=15&Ja;T.mode=22;case 22:if(T.extra){for(Ja=
T.extra;ya<Ja;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}T.length+=Va&(1<<T.extra)-1;Va>>>=T.extra;ya-=T.extra;T.back+=T.extra}T.was=T.length;T.mode=23;case 23:for(;dd=T.distcode[Va&(1<<T.distbits)-1],zb=dd>>>24,Ja=dd>>>16&255,V=65535&dd,!(zb<=ya);){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(0===(240&Ja)){M=zb;ib=Ja;for(Da=V;dd=T.distcode[Da+((Va&(1<<M+ib)-1)>>M)],zb=dd>>>24,Ja=dd>>>16&255,V=65535&dd,!(M+zb<=ya);){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}Va>>>=M;ya-=M;T.back+=M}if(Va>>>=
zb,ya-=zb,T.back+=zb,64&Ja){ja.msg="invalid distance code";T.mode=30;break}T.offset=V;T.extra=15&Ja;T.mode=24;case 24:if(T.extra){for(Ja=T.extra;ya<Ja;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}T.offset+=Va&(1<<T.extra)-1;Va>>>=T.extra;ya-=T.extra;T.back+=T.extra}if(T.offset>T.dmax){ja.msg="invalid distance too far back";T.mode=30;break}T.mode=25;case 25:if(0===Fa)break a;if(hb=qc-Fa,T.offset>hb){if(hb=T.offset-hb,hb>T.whave&&T.sane){ja.msg="invalid distance too far back";T.mode=30;break}hb>
T.wnext?(hb-=T.wnext,ma=T.wsize-hb):ma=T.wnext-hb;hb>T.length&&(hb=T.length);Ja=T.window}else Ja=nd,ma=Bd-T.offset,hb=T.length;hb>Fa&&(hb=Fa);Fa-=hb;T.length-=hb;do nd[Bd++]=Ja[ma++];while(--hb);0===T.length&&(T.mode=21);break;case 26:if(0===Fa)break a;nd[Bd++]=T.length;Fa--;T.mode=21;break;case 27:if(T.wrap){for(;ya<32;){if(0===Mb)break a;Mb--;Va|=pb[fa++]<<ya;ya+=8}if(qc-=Fa,ja.total_out+=qc,T.total+=qc,qc&&(ja.adler=T.check=T.flags?ua(T.check,nd,qc,Bd-qc):sa(T.check,nd,qc,Bd-qc)),qc=Fa,(T.flags?
Va:Qa(Va))!==T.check){ja.msg="incorrect data check";T.mode=30;break}ya=Va=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;ya<32;){if(0===Mb)break a;Mb--;Va+=pb[fa++]<<ya;ya+=8}if(Va!==(4294967295&T.total)){ja.msg="incorrect length check";T.mode=30;break}ya=Va=0}T.mode=29;case 29:Wa=1;break a;case 30:Wa=-3;break a;case 31:return-4;default:return Db}return ja.next_out=Bd,ja.avail_out=Fa,ja.next_in=fa,ja.avail_in=Mb,T.hold=Va,T.bits=ya,(T.wsize||qc!==ja.avail_out&&T.mode<30&&(T.mode<27||Ta!==4))&&t(ja,
ja.output,ja.next_out,qc-ja.avail_out)?(T.mode=31,-4):(Rf-=ja.avail_in,qc-=ja.avail_out,ja.total_in+=Rf,ja.total_out+=qc,T.total+=qc,T.wrap&&qc&&(ja.adler=T.check=T.flags?ua(T.check,nd,qc,ja.next_out-qc):sa(T.check,nd,qc,ja.next_out-qc)),ja.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(0===Rf&&0===qc||Ta===4)&&Wa===ic&&(Wa=-5),Wa)};Ua.inflateEnd=function(ja){if(!ja||!ja.state)return Db;var Ta=ja.state;return Ta.window&&(Ta.window=null),ja.state=null,ic};Ua.inflateGetHeader=
function(ja,Ta){var hb;return ja&&ja.state?(hb=ja.state,0===(2&hb.wrap)?Db:(hb.head=Ta,Ta.done=!1,ic)):Db};Ua.inflateSetDictionary=function(ja,Ta){var hb,ma,Ja=Ta.length;return ja&&ja.state?(hb=ja.state,0!==hb.wrap&&hb.mode!==11?Db:hb.mode===11&&(ma=1,ma=sa(ma,Ta,Ja,0),ma!==hb.check)?-3:t(ja,Ta,Ja,Ja)?(hb.mode=31,-4):(hb.havedict=1,ic)):Db};Ua.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(aa,jb,Ua){var Qa=
aa("../utils/common"),Sa=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],wa=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],La=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];jb.exports=function(m,t,E,R,B,sa,ua,Ba){var Na,ic,Db,qa,kc,tb,dc=
Ba.bits,ja,Ta,hb,ma,Ja,zb=0,Da,da=null,Vd=0,dd=new Qa.Buf16(16);var rb=new Qa.Buf16(16);var Ad=null,T=0;for(ja=0;ja<=15;ja++)dd[ja]=0;for(Ta=0;Ta<R;Ta++)dd[t[E+Ta]]++;var Bd=dc;for(hb=15;hb>=1&&0===dd[hb];hb--);if(Bd>hb&&(Bd=hb),0===hb)return B[sa++]=20971520,B[sa++]=20971520,Ba.bits=1,0;for(dc=1;dc<hb&&0===dd[dc];dc++);Bd<dc&&(Bd=dc);for(ja=Na=1;ja<=15;ja++)if(Na<<=1,Na-=dd[ja],Na<0)return-1;if(Na>0&&(m===0||1!==hb))return-1;rb[1]=0;for(ja=1;ja<15;ja++)rb[ja+1]=rb[ja]+dd[ja];for(Ta=0;Ta<R;Ta++)0!==
t[E+Ta]&&(ua[rb[t[E+Ta]]++]=Ta);if(m===0?(da=Ad=ua,qa=19):m===1?(da=Sa,Vd-=257,Ad=wa,T-=257,qa=256):(da=I,Ad=La,qa=-1),Da=0,Ta=0,ja=dc,rb=sa,ma=Bd,Ja=0,Db=-1,zb=1<<Bd,R=zb-1,m===1&&zb>852||m===2&&zb>592)return 1;for(var nd=0;;){nd++;var Fa=ja-Ja;ua[Ta]<qa?(kc=0,tb=ua[Ta]):ua[Ta]>qa?(kc=Ad[T+ua[Ta]],tb=da[Vd+ua[Ta]]):(kc=96,tb=0);Na=1<<ja-Ja;dc=ic=1<<ma;do ic-=Na,B[rb+(Da>>Ja)+ic]=Fa<<24|kc<<16|tb|0;while(0!==ic);for(Na=1<<ja-1;Da&Na;)Na>>=1;if(0!==Na?(Da&=Na-1,Da+=Na):Da=0,Ta++,0===--dd[ja]){if(ja===
hb)break;ja=t[E+ua[Ta]]}if(ja>Bd&&(Da&R)!==Db){0===Ja&&(Ja=Bd);rb+=dc;ma=ja-Ja;for(Na=1<<ma;ma+Ja<hb&&(Na-=dd[ma+Ja],!(Na<=0));)ma++,Na<<=1;if(zb+=1<<ma,m===1&&zb>852||m===2&&zb>592)return 1;Db=Da&R;B[Db]=Bd<<24|ma<<16|rb-sa|0}}return 0!==Da&&(B[rb+Da]=ja-Ja<<24|4194304),Ba.bits=Bd,0}},{"../utils/common":3}],13:[function(aa,jb,Ua){jb.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},
{}],14:[function(aa,jb,Ua){function Qa(S){for(var O=S.length;--O>=0;)S[O]=0}function Sa(S,O,y,H,nb){this.static_tree=S;this.extra_bits=O;this.extra_base=y;this.elems=H;this.max_length=nb;this.has_stree=S&&S.length}function wa(S,O){this.dyn_tree=S;this.max_code=0;this.stat_desc=O}function I(S,O){S.pending_buf[S.pending++]=255&O;S.pending_buf[S.pending++]=O>>>8&255}function La(S,O,y){S.bi_valid>Vd-y?(S.bi_buf|=O<<S.bi_valid&65535,I(S,S.bi_buf),S.bi_buf=O>>Vd-S.bi_valid,S.bi_valid+=y-Vd):(S.bi_buf|=
O<<S.bi_valid&65535,S.bi_valid+=y)}function m(S,O,y){La(S,y[2*O],y[2*O+1])}function t(S,O){var y=0;do y|=1&S,S>>>=1,y<<=1;while(--O>0);return y>>>1}function E(S,O,y){var H,nb=Array(da+1),N=0;for(H=1;H<=da;H++)nb[H]=N=N+y[H-1]<<1;for(y=0;y<=O;y++)H=S[2*y+1],0!==H&&(S[2*y]=t(nb[H]++,H))}function R(S){var O;for(O=0;O<ma;O++)S.dyn_ltree[2*O]=0;for(O=0;O<Ja;O++)S.dyn_dtree[2*O]=0;for(O=0;O<zb;O++)S.bl_tree[2*O]=0;S.dyn_ltree[2*dd]=1;S.opt_len=S.static_len=0;S.last_lit=S.matches=0}function B(S){S.bi_valid>
8?I(S,S.bi_buf):S.bi_valid>0&&(S.pending_buf[S.pending++]=S.bi_buf);S.bi_buf=0;S.bi_valid=0}function sa(S,O,y,H){var nb=2*O,N=2*y;return S[nb]<S[N]||S[nb]===S[N]&&H[O]<=H[y]}function ua(S,O,y){for(var H=S.heap[y],nb=y<<1;nb<=S.heap_len&&(nb<S.heap_len&&sa(O,S.heap[nb+1],S.heap[nb],S.depth)&&nb++,!sa(O,H,S.heap[nb],S.depth));)S.heap[y]=S.heap[nb],y=nb,nb<<=1;S.heap[y]=H}function Ba(S,O,y){var H,nb,N=0;if(0!==S.last_lit){do{var ac=S.pending_buf[S.d_buf+2*N]<<8|S.pending_buf[S.d_buf+2*N+1];var ab=S.pending_buf[S.l_buf+
N];N++;0===ac?m(S,ab,O):(H=ya[ab],m(S,H+hb+1,O),nb=Bd[H],0!==nb&&(ab-=Rf[H],La(S,ab,nb)),ac--,H=ac<256?Va[ac]:Va[256+(ac>>>7)],m(S,H,y),nb=nd[H],0!==nb&&(ac-=qc[H],La(S,ac,nb)))}while(N<S.last_lit)}m(S,dd,O)}function Na(S,O){var y,H=O.dyn_tree;var nb=O.stat_desc.static_tree;var N=O.stat_desc.has_stree,ac=O.stat_desc.elems,ab=-1;S.heap_len=0;S.heap_max=Da;for(y=0;y<ac;y++)0!==H[2*y]?(S.heap[++S.heap_len]=ab=y,S.depth[y]=0):H[2*y+1]=0;for(;S.heap_len<2;){var sb=S.heap[++S.heap_len]=ab<2?++ab:0;H[2*
sb]=1;S.depth[sb]=0;S.opt_len--;N&&(S.static_len-=nb[2*sb+1])}O.max_code=ab;for(y=S.heap_len>>1;y>=1;y--)ua(S,H,y);sb=ac;do y=S.heap[1],S.heap[1]=S.heap[S.heap_len--],ua(S,H,1),nb=S.heap[1],S.heap[--S.heap_max]=y,S.heap[--S.heap_max]=nb,H[2*sb]=H[2*y]+H[2*nb],S.depth[sb]=(S.depth[y]>=S.depth[nb]?S.depth[y]:S.depth[nb])+1,H[2*y+1]=H[2*nb+1]=sb,S.heap[1]=sb++,ua(S,H,1);while(S.heap_len>=2);S.heap[--S.heap_max]=S.heap[1];var ec,Jb;y=O.dyn_tree;sb=O.max_code;ac=O.stat_desc.static_tree;var Nh=O.stat_desc.has_stree,
mf=O.stat_desc.extra_bits,Tf=O.stat_desc.extra_base,Hi=O.stat_desc.max_length,cg=0;for(N=0;N<=da;N++)S.bl_count[N]=0;y[2*S.heap[S.heap_max]+1]=0;for(O=S.heap_max+1;O<Da;O++)nb=S.heap[O],N=y[2*y[2*nb+1]+1]+1,N>Hi&&(N=Hi,cg++),y[2*nb+1]=N,nb>sb||(S.bl_count[N]++,ec=0,nb>=Tf&&(ec=mf[nb-Tf]),Jb=y[2*nb],S.opt_len+=Jb*(N+ec),Nh&&(S.static_len+=Jb*(ac[2*nb+1]+ec)));if(0!==cg){do{for(N=Hi-1;0===S.bl_count[N];)N--;S.bl_count[N]--;S.bl_count[N+1]+=2;S.bl_count[Hi]--;cg-=2}while(cg>0);for(N=Hi;0!==N;N--)for(nb=
S.bl_count[N];0!==nb;)ec=S.heap[--O],ec>sb||(y[2*ec+1]!==N&&(S.opt_len+=(N-y[2*ec+1])*y[2*ec],y[2*ec+1]=N),nb--)}E(H,ab,S.bl_count)}function ic(S,O,y){var H,nb=-1,N=O[1],ac=0,ab=7,sb=4;0===N&&(ab=138,sb=3);O[2*(y+1)+1]=65535;for(H=0;H<=y;H++){var ec=N;N=O[2*(H+1)+1];++ac<ab&&ec===N||(ac<sb?S.bl_tree[2*ec]+=ac:0!==ec?(ec!==nb&&S.bl_tree[2*ec]++,S.bl_tree[2*rb]++):ac<=10?S.bl_tree[2*Ad]++:S.bl_tree[2*T]++,ac=0,nb=ec,0===N?(ab=138,sb=3):ec===N?(ab=6,sb=3):(ab=7,sb=4))}}function Db(S,O,y){var H,nb,N=
-1,ac=O[1],ab=0,sb=7,ec=4;0===ac&&(sb=138,ec=3);for(H=0;H<=y;H++)if(nb=ac,ac=O[2*(H+1)+1],!(++ab<sb&&nb===ac)){if(ab<ec){do m(S,nb,S.bl_tree);while(0!==--ab)}else 0!==nb?(nb!==N&&(m(S,nb,S.bl_tree),ab--),m(S,rb,S.bl_tree),La(S,ab-3,2)):ab<=10?(m(S,Ad,S.bl_tree),La(S,ab-3,3)):(m(S,T,S.bl_tree),La(S,ab-11,7));ab=0;N=nb;0===ac?(sb=138,ec=3):nb===ac?(sb=6,ec=3):(sb=7,ec=4)}}function qa(S){var O,y=4093624447;for(O=0;O<=31;O++,y>>>=1)if(1&y&&0!==S.dyn_ltree[2*O])return dc;if(0!==S.dyn_ltree[18]||0!==S.dyn_ltree[20]||
0!==S.dyn_ltree[26])return ja;for(O=32;O<hb;O++)if(0!==S.dyn_ltree[2*O])return ja;return dc}function kc(S,O,y,H){La(S,(Ta<<1)+(H?1:0),3);B(S);I(S,y);I(S,~y);tb.arraySet(S.pending_buf,S.window,O,y,S.pending);S.pending+=y}var tb=aa("../utils/common"),dc=0,ja=1,Ta=0,hb=256,ma=hb+1+29,Ja=30,zb=19,Da=2*ma+1,da=15,Vd=16,dd=256,rb=16,Ad=17,T=18,Bd=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],nd=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Fa=[0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,2,3,7],fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],pb=Array(2*(ma+2));Qa(pb);var Mb=Array(2*Ja);Qa(Mb);var Va=Array(512);Qa(Va);var ya=Array(256);Qa(ya);var Rf=Array(29);Qa(Rf);var qc=Array(Ja);Qa(qc);var Wa,V,M,ib=!1;Ua._tr_init=function(S){if(!ib){var O,y,H,nb=Array(da+1);for(H=y=0;H<28;H++)for(Rf[H]=y,O=0;O<1<<Bd[H];O++)ya[y++]=H;ya[y-1]=H;for(H=y=0;H<16;H++)for(qc[H]=y,O=0;O<1<<nd[H];O++)Va[y++]=H;for(y>>=7;H<Ja;H++)for(qc[H]=y<<7,O=0;O<1<<nd[H]-7;O++)Va[256+y++]=H;for(O=0;O<=
da;O++)nb[O]=0;for(O=0;O<=143;)pb[2*O+1]=8,O++,nb[8]++;for(;O<=255;)pb[2*O+1]=9,O++,nb[9]++;for(;O<=279;)pb[2*O+1]=7,O++,nb[7]++;for(;O<=287;)pb[2*O+1]=8,O++,nb[8]++;E(pb,ma+1,nb);for(O=0;O<Ja;O++)Mb[2*O+1]=5,Mb[2*O]=t(O,5);Wa=new Sa(pb,Bd,hb+1,ma,da);V=new Sa(Mb,nd,0,Ja,da);M=new Sa([],Fa,0,zb,7);ib=!0}S.l_desc=new wa(S.dyn_ltree,Wa);S.d_desc=new wa(S.dyn_dtree,V);S.bl_desc=new wa(S.bl_tree,M);S.bi_buf=0;S.bi_valid=0;R(S)};Ua._tr_stored_block=kc;Ua._tr_flush_block=function(S,O,y,H){var nb=0;if(S.level>
0){S.strm.data_type===2&&(S.strm.data_type=qa(S));Na(S,S.l_desc);Na(S,S.d_desc);ic(S,S.dyn_ltree,S.l_desc.max_code);ic(S,S.dyn_dtree,S.d_desc.max_code);Na(S,S.bl_desc);for(nb=zb-1;nb>=3&&0===S.bl_tree[2*fa[nb]+1];nb--);nb=(S.opt_len+=3*(nb+1)+5+5+4,nb);var N=S.opt_len+3+7>>>3;var ac=S.static_len+3+7>>>3;ac<=N&&(N=ac)}else N=ac=y+5;if(y+4<=N&&O!==-1)kc(S,O,y,H);else if(S.strategy===4||ac===N)La(S,2+(H?1:0),3),Ba(S,pb,Mb);else{La(S,4+(H?1:0),3);O=S.l_desc.max_code+1;y=S.d_desc.max_code+1;nb+=1;La(S,
O-257,5);La(S,y-1,5);La(S,nb-4,4);for(N=0;N<nb;N++)La(S,S.bl_tree[2*fa[N]+1],3);Db(S,S.dyn_ltree,O-1);Db(S,S.dyn_dtree,y-1);Ba(S,S.dyn_ltree,S.dyn_dtree)}R(S);H&&B(S)};Ua._tr_tally=function(S,O,y){return S.pending_buf[S.d_buf+2*S.last_lit]=O>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&O,S.pending_buf[S.l_buf+S.last_lit]=255&y,S.last_lit++,0===O?S.dyn_ltree[2*y]++:(S.matches++,O--,S.dyn_ltree[2*(ya[y]+hb+1)]++,S.dyn_dtree[2*(O<256?Va[O]:Va[256+(O>>>7)])]++),S.last_lit===S.lit_bufsize-1};Ua._tr_align=
function(S){La(S,2,3);m(S,dd,pb);16===S.bi_valid?(I(S,S.bi_buf),S.bi_buf=0,S.bi_valid=0):S.bi_valid>=8&&(S.pending_buf[S.pending++]=255&S.bi_buf,S.bi_buf>>=8,S.bi_valid-=8)}},{"../utils/common":3}],15:[function(aa,jb,Ua){jb.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(aa,jb,Ua){Ua=aa("./lib/utils/common").assign;var Qa=aa("./lib/deflate"),
Sa=aa("./lib/inflate");aa=aa("./lib/zlib/constants");var wa={};Ua(wa,Qa,Sa,aa);jb.exports=wa},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var e=function(){function Nb(D){var K=[];return K[D-1]=void 0,K}function aa(D,K){return Qa(D[0]+K[0],D[1]+K[1])}function jb(D,K){var P=~~Math.max(Math.min(D[1]/nf,2147483647),-2147483648)&~~Math.max(Math.min(K[1]/nf,2147483647),-2147483648);D=wa(D)&wa(K);var la,na;return la=P*nf,na=D,0>D&&(na+=nf),[na,la]}function Ua(D,K){var P,la;return D[0]==K[0]&&D[1]==K[1]?0:(P=0>D[1],la=0>K[1],P&&!la?-1:!P&&la?1:Qa(D[0]-K[0],D[1]-K[1])[1]<
0?-1:1)}function Qa(D,K){K%=1.8446744073709552E19;D%=1.8446744073709552E19;var P=K%nf;var la=Math.floor(D/nf)*nf;K=K-P+la;for(D=D-la+P;0>D;)D+=nf,K-=nf;for(;D>4294967295;)D-=nf,K+=nf;for(K%=1.8446744073709552E19;K>0x7fffffff00000000;)K-=1.8446744073709552E19;for(;-0x7fffffffffffffff>K;)K+=1.8446744073709552E19;return[D,K]}function Sa(D){return D>=0?[D,0]:[D+nf,-nf]}function wa(D){return D[0]>=2147483648?~~Math.max(Math.min(D[0]-nf,2147483647),-2147483648):~~Math.max(Math.min(D[0],2147483647),-2147483648)}
function I(D){return 30>=D?1<<D:I(30)*I(D-30)}function La(D,K){var P,la,na,ca;if(K&=63,D[0]==Hj[0]&&D[1]==Hj[1])return K?Lg:D;if(0>D[1])throw Error("Neg");return ca=I(K),la=D[1]*ca%1.8446744073709552E19,na=D[0]*ca,P=na-na%nf,la+=P,na-=P,la>=0x7fffffffffffffff&&(la-=1.8446744073709552E19),[na,la]}function m(D,K){var P;return K&=63,P=I(K),Qa(Math.floor(D[0]/P),D[1]/P)}function t(D,K){return D.Mc=K,D.Lc=0,D.Yb=K.length,D}function E(D){return D.Lc>=D.Yb?-1:255&D.Mc[D.Lc++]}function R(D){return D.Mc=Nb(32),
D.Yb=0,D}function B(D){var K=D.Mc;return K.length=D.Yb,K}function sa(D,K,P,la,na){for(var ca=0;na>ca;++ca)P[la+ca]=D[K+ca]}function ua(D,K,P){D.Nb=R({});var la=t({},K),na=D.Nb,ca=Sa(K.length);if(Ua(ca,hk)<0)throw Error("invalid length "+ca);D.Tb=ca;K={};var Xa;K.v=Nb(4);K.a=[];K.d={};K.C=Nb(192);K.bb=Nb(12);K.hb=Nb(12);K.Ub=Nb(12);K.vc=Nb(12);K._=Nb(192);K.K=[];K.Sb=Nb(114);K.S=H({},4);K.$=Wa({});K.i=Wa({});K.A={};K.m=[];K.P=[];K.lb=[];K.nc=Nb(16);K.x=Nb(4);K.Q=Nb(4);K.Xb=[Lg];K.uc=[Lg];K.Kc=[0];
K.fc=Nb(5);K.yc=Nb(128);K.vb=0;K.X=1;K.D=0;K.Hb=-1;for(Xa=K.mb=0;4096>Xa;++Xa)K.a[Xa]={};for(Xa=0;4>Xa;++Xa)K.K[Xa]=H({},6);Xa=1<<P.s;K.ab=Xa;for(var cb=0;Xa>1<<cb;++cb);K.$b=2*cb;K.n=P.f;Xa=K.X;K.X=P.m;K.b&&Xa!=K.X&&(K.wb=-1,K.b=null);K.eb=0;K.fb=3;K.Y=2;K.y=3;K.Gc=void 0===e.disableEndMark;K.fc[0]=9*(5*K.Y+K.eb)+K.fb<<24>>24;for(P=0;4>P;++P)K.fc[1+P]=K.ab>>8*P<<24>>24;sa(K.fc,0,na.Mc,na.Yb,5);na.Yb+=5;for(P=0;64>P;P+=8)Xa=na,cb=255&wa(m(ca,P)),Xa.Mc[Xa.Yb++]=cb<<24>>24;K.W=0;K.oc=la;K.pc=0;K.b||
(la={},ca=4,K.X||(ca=2),la.qb=ca>2,la.qb?(la.w=0,la.xb=4,la.R=66560):(la.w=2,la.xb=3,la.R=0),K.b=la);la=K.A;ca=K.eb;P=K.fb;if(null==la.V||la.u!=P||la.I!=ca)for(la.I=ca,la.qc=(1<<ca)-1,la.u=P,P=1<<la.u+la.I,la.V=Nb(P),ca=0;P>ca;++ca){Xa=la.V;cb=ca;var $a={};$a=($a.tb=Nb(768),$a);Xa[cb]=$a}if(K.ab!=K.wb||K.Hb!=K.n)la=K.b,ca=K.ab,P=K.n,1073741567>ca&&(la.Fc=16+(P>>1),cb=ca+4096,Xa=P+274,la.Bc=cb,la._b=Xa,cb=cb+Xa+(~~((ca+4096+P+274)/2)+256),(null==la.c||la.Kb!=cb)&&(la.c=null,la.Kb=cb,la.c=Nb(la.Kb)),
la.H=la.Kb-Xa,la.ob=P,P=ca+1,la.p!=P&&(la.L=Nb(2*(la.p=P))),P=65536,la.qb&&(P=ca-1,P|=P>>1,P|=P>>2,P|=P>>4,P|=P>>8,P>>=1,P|=65535,P>16777216&&(P>>=1),la.Ec=P,++P,P+=la.R),P!=la.rc&&(la.ub=Nb(la.rc=P))),K.wb=K.ab,K.Hb=K.n;K.d.Ab=na;K.l=0;for(na=K.J=0;4>na;++na)K.v[na]=0;na=K.d;na.mc=Lg;na.xc=Lg;na.E=-1;na.Jb=1;na.Oc=0;sb(K.C);sb(K._);sb(K.bb);sb(K.hb);sb(K.Ub);sb(K.vc);sb(K.Sb);na=K.A;ca=1<<na.u+na.I;for(la=0;ca>la;++la)sb(na.V[la].tb);for(na=0;4>na;++na)sb(K.K[na].G);ya(K.$,1<<K.Y);ya(K.i,1<<K.Y);
sb(K.S.G);K.N=0;K.jb=0;K.q=0;K.s=0;T(K);Ad(K);K.$.rb=K.n+1-2;V(K.$,1<<K.Y);K.i.rb=K.n+1-2;V(K.i,1<<K.Y);K.g=Lg;na={};K=(na.cb=K,na.Z=null,na.zc=1,na);D.yb=K;return D}function Ba(D,K){D.Nb=R({});var P=t({},K),la=D.Nb,na,ca,Xa,cb="",$a=[];for(na=0;5>na;++na){if(ca=E(P),-1==ca)throw Error("truncated input");$a[na]=ca<<24>>24}K={B:{},e:{}};K.Gb=Nb(192);K.Zb=Nb(12);K.Cb=Nb(12);K.Db=Nb(12);K.Eb=Nb(12);K.pb=Nb(192);K.kb=Nb(4);K.kc=Nb(114);K.Fb=O({},4);K.Rb=Vd({});K.sb=Vd({});K.gb={};for(na=0;4>na;++na)K.kb[na]=
O({},6);var Gb;if(5>$a.length)na=0;else{na=255&$a[0];var Ib=na%9;na=~~(na/9);var Ob=na%5;var Fb=~~(na/5);for(Gb=na=0;4>Gb;++Gb)na+=(255&$a[1+Gb])<<8*Gb;if(!($a=na>99999999)){if(Ib>8||Ob>4||Fb>4)Fb=0;else{$a=K.gb;if(null==$a.V||$a.u!=Ib||$a.I!=Ob)for($a.I=Ob,$a.qc=(1<<Ob)-1,$a.u=Ib,Ob=1<<$a.u+$a.I,$a.V=Nb(Ob),Ib=0;Ob>Ib;++Ib){Gb=$a.V;var Vc=Ib;var k={};k=(k.Ib=Nb(768),k);Gb[Vc]=k}Fb=1<<Fb;Fb=(Da(K.Rb,Fb),Da(K.sb,Fb),K.Dc=Fb-1,1)}$a=!Fb}$a?na=0:0>na?na=0:(K.Ob!=na&&(K.Ob=na,K.nb=Math.max(K.Ob,1),na=
K.B,Fb=Math.max(K.nb,4096),null!=na.Lb&&na.M==Fb||(na.Lb=Nb(Fb)),na.M=Fb,na.o=0,na.h=0),na=1)}if(!na)throw Error("corrupted input");for(na=0;64>na;na+=8){if(ca=E(P),-1==ca)throw Error("truncated input");ca=ca.toString(16);1==ca.length&&(ca="0"+ca);cb=ca+""+cb}/^0+$|^f+$/i.test(cb)?D.Tb=hk:(Xa=parseInt(cb,16),D.Tb=Xa>4294967295?hk:Sa(Xa));ca=D.Tb;K.e.Ab=P;P=K.B;Ta(P);P.cc=null;K.B.cc=la;K.B.h=0;K.B.o=0;sb(K.Gb);sb(K.pb);sb(K.Zb);sb(K.Cb);sb(K.Db);sb(K.Eb);sb(K.kc);la=K.gb;Xa=1<<la.u+la.I;for(P=0;Xa>
P;++P)sb(la.V[P].Ib);for(la=0;4>la;++la)sb(K.kb[la].G);dd(K.Rb);dd(K.sb);sb(K.Fb.G);la=K.e;la.Bb=0;la.E=-1;for(P=0;5>P;++P)la.Bb=la.Bb<<8|E(la.Ab);K.U=0;K.ib=0;K.Jc=0;K.Ic=0;K.Qc=0;K.Nc=ca;K.g=Lg;K.jc=0;la={};K=(la.Z=K,la.cb=null,la.zc=1,la);D.yb=K;return D}function Na(D,K){return D.c[D.f+D.o+K]}function ic(D,K,P,la){D.T&&D.o+K+la>D.h&&(la=D.h-(D.o+K));++P;var na=D.f+D.o+K;for(K=0;la>K&&D.c[na+K]==D.c[na+K-P];++K);return K}function Db(D){return D.h-D.o}function qa(D){var K,P,la;if(!D.T)for(;la=-D.f+
D.Kb-D.h,la;){var na=D.cc,ca=D.c,Xa=D.f+D.h,cb=la;if(K=na.Lc>=na.Yb?-1:(cb=Math.min(cb,na.Yb-na.Lc),sa(na.Mc,na.Lc,ca,Xa,cb),na.Lc+=cb,cb),-1==K)return D.zb=D.h,P=D.f+D.zb,P>D.H&&(D.zb=D.H-D.f),void(D.T=1);D.h+=K;D.h>=D.o+D._b&&(D.zb=D.h-D._b)}}function kc(D,K){D.f+=K;D.zb-=K;D.o-=K;D.h-=K}function tb(D){var K;++D.k>=D.p&&(D.k=0);++D.o;if(D.o>D.zb){var P=D.f+D.o;if(P>D.H){var la=D.f+D.o-D.Bc;la>0&&--la;var na=D.f+D.h-la;for(P=0;na>P;++P)D.c[P]=D.c[la+P];D.f-=la}qa(D)}1073741823==D.o&&(K=D.o-D.p,dc(D.L,
2*D.p,K),dc(D.ub,D.rc,K),kc(D,K))}function dc(D,K,P){var la;for(la=0;K>la;++la){var na=D[la]||0;P>=na?na=0:na-=P;D[la]=na}}function ja(D,K){var P,la,na,ca,Xa,cb,$a,Gb,Ib,Ob;do{if(D.h>=D.o+D.ob)var Fb=D.ob;else if(Fb=D.h-D.o,D.xb>Fb){tb(D);continue}var Vc=D.o>D.p?D.o-D.p:0;var k=D.f+D.o;D.qb?(Ob=Ij[255&D.c[k]]^255&D.c[k+1],ca=1023&Ob,D.ub[ca]=D.o,Ob^=(255&D.c[k+2])<<8,Xa=65535&Ob,D.ub[1024+Xa]=D.o,cb=(Ob^Ij[255&D.c[k+3]]<<5)&D.Ec):cb=255&D.c[k]^(255&D.c[k+1])<<8;var Ea=D.ub[D.R+cb];D.ub[D.R+cb]=D.o;
var Je=(D.k<<1)+1;var tc=D.k<<1;var de=Gb=D.w;for(P=D.Fc;;){if(Vc>=Ea||0==P--){D.L[Je]=D.L[tc]=0;break}if(na=D.o-Ea,la=(D.k>=na?D.k-na:D.k-na+D.p)<<1,Ib=D.f+Ea,$a=Gb>de?de:Gb,D.c[Ib+$a]==D.c[k+$a]){for(;++$a!=Fb&&D.c[Ib+$a]==D.c[k+$a];);if($a==Fb){D.L[tc]=D.L[la];D.L[Je]=D.L[la+1];break}}(255&D.c[k+$a])>(255&D.c[Ib+$a])?(D.L[tc]=Ea,tc=la+1,Ea=D.L[tc],Gb=$a):(D.L[Je]=Ea,Je=la,Ea=D.L[Je],de=$a)}tb(D)}while(0!=--K)}function Ta(D){var K=D.o-D.h;if(K){var P=D.cc;sa(D.Lb,D.h,P.Mc,P.Yb,K);P.Yb+=K;D.o>=D.M&&
(D.o=0);D.h=D.o}}function hb(D,K){K=D.o-K-1;return 0>K&&(K+=D.M),D.Lb[K]}function ma(D){return D-=2,4>D?D:3}function Ja(D){return 4>D?0:10>D?D-3:D-6}function zb(D){if(!D.zc)throw Error("bad state");if(D.cb){a:{var K=D.cb,P=D.cb.Xb,la=D.cb.uc,na=D.cb.Kc,ca,Xa;P[0]=Lg;la[0]=Lg;na[0]=1;if(K.oc){K.b.cc=K.oc;var cb=K.b;cb.f=0;cb.o=0;cb.h=0;cb.T=0;qa(cb);cb.k=0;kc(cb,-1);K.W=1;K.oc=null}if(!K.pc){K.pc=1;var $a=cb=K.g;if($a[0]==Lg[0]&&$a[1]==Lg[1]){if(!Db(K.b)){Bd(K,wa(K.g));break a}pb(K);var Gb=wa(K.g)&
K.y;ec(K.d,K.C,(K.l<<4)+Gb,0);K.l=Ja(K.l);$a=Na(K.b,-K.s);ib(M(K.A,wa(K.g),K.J),K.d,$a);K.J=$a;--K.s;K.g=aa(K.g,pm)}if(Db(K.b))for(;;){if(ca=nd(K,wa(K.g)),Xa=K.mb,Gb=wa(K.g)&K.y,$a=(K.l<<4)+Gb,1==ca&&-1==Xa){ec(K.d,K.C,$a,0);$a=Na(K.b,-K.s);var Ib=M(K.A,wa(K.g),K.J);if(7>K.l)ib(Ib,K.d,$a);else{var Ob=Na(K.b,-K.v[0]-1-K.s);var Fb=void 0;var Vc;var k=K.d;var Ea=Ob,Je=$a,tc=1,de=1;for(Vc=7;Vc>=0;--Vc){var pe=Je>>Vc&1;Ob=de;tc&&(Fb=Ea>>Vc&1,Ob+=1+Fb<<8,tc=Fb==pe);ec(k,Ib.tb,Ob,pe);de=de<<1|pe}}K.J=$a;
K.l=Ja(K.l)}else{if(ec(K.d,K.C,$a,1),4>Xa){if(ec(K.d,K.bb,K.l,1),Xa?(ec(K.d,K.hb,K.l,1),1==Xa?ec(K.d,K.Ub,K.l,0):(ec(K.d,K.Ub,K.l,1),ec(K.d,K.vc,K.l,Xa-2))):(ec(K.d,K.hb,K.l,0),1==ca?ec(K.d,K._,$a,0):ec(K.d,K._,$a,1)),1==ca?K.l=7>K.l?9:11:(qc(K.i,K.d,ca-2,Gb),K.l=7>K.l?8:11),$a=K.v[Xa],0!=Xa){for(Fb=Xa;Fb>=1;--Fb)K.v[Fb]=K.v[Fb-1];K.v[0]=$a}}else{ec(K.d,K.bb,K.l,0);K.l=7>K.l?7:10;qc(K.$,K.d,ca-2,Gb);Xa-=4;Fb=Va(Xa);$a=ma(ca);nb(K.K[$a],K.d,Fb);if(Fb>=4)if(k=(Fb>>1)-1,Ib=(2|1&Fb)<<k,Ob=Xa-Ib,14>Fb)for($a=
K.Sb,Fb=Ib-Fb-1,Ib=K.d,pe=Ob,Ea=1,Ob=0;k>Ob;++Ob)Vc=1&pe,ec(Ib,$a,Fb+Ea,Vc),Ea=Ea<<1|Vc,pe>>=1;else Jb(K.d,Ob>>4,k-4),ac(K.S,K.d,15&Ob),++K.Qb;$a=Xa;for(Fb=3;Fb>=1;--Fb)K.v[Fb]=K.v[Fb-1];K.v[0]=$a;++K.Mb}K.J=Na(K.b,ca-1-K.s)}if(K.s-=ca,K.g=aa(K.g,Sa(ca)),!K.s){K.Mb>=128&&T(K);K.Qb>=16&&Ad(K);P[0]=K.g;$a=K.d;$a=aa(aa(Sa($a.Jb),$a.mc),[4,0]);if(la[0]=$a,!Db(K.b)){Bd(K,wa(K.g));break a}$a=K.g;$a=Qa($a[0]-cb[0],$a[1]-cb[1]);if(Ua($a,[4096,0])>=0){K.pc=0;na[0]=0;break a}}}else Bd(K,wa(K.g))}}D.Pb=D.cb.Xb[0];
D.cb.Kc[0]&&(ca=D.cb,Mb(ca),ca.d.Ab=null,D.zc=0)}else{a:{ca=D.Z;if(Fb=wa(ca.g)&ca.Dc,ab(ca.e,ca.Gb,(ca.U<<4)+Fb)){if(ab(ca.e,ca.Zb,ca.U))K=0,ab(ca.e,ca.Cb,ca.U)?(ab(ca.e,ca.Db,ca.U)?(ab(ca.e,ca.Eb,ca.U)?($a=ca.Qc,ca.Qc=ca.Ic):$a=ca.Ic,ca.Ic=ca.Jc):$a=ca.Jc,ca.Jc=ca.ib,ca.ib=$a):ab(ca.e,ca.pb,(ca.U<<4)+Fb)||(ca.U=7>ca.U?9:11,K=1),K||(K=da(ca.sb,ca.e,Fb)+2,ca.U=7>ca.U?8:11);else if(ca.Qc=ca.Ic,ca.Ic=ca.Jc,ca.Jc=ca.ib,K=2+da(ca.Rb,ca.e,Fb),ca.U=7>ca.U?7:10,cb=y(ca.kb[ma(K)],ca.e),cb>=4)if(P=(cb>>1)-
1,ca.ib=(2|1&cb)<<P,14>cb){Xa=ca.ib;Gb=ca.kc;la=ca.ib-cb-1;na=ca.e;Fb=1;for($a=Ib=0;P>$a;++$a)cb=ab(na,Gb,la+Fb),Fb<<=1,Fb+=cb,Ib|=cb<<$a;ca.ib=Xa+Ib}else{Xa=ca.ib;Gb=ca.e;la=0;for(P-=4;0!=P;--P)Gb.E>>>=1,na=Gb.Bb-Gb.E>>>31,Gb.Bb-=Gb.E&na-1,la=la<<1|1-na,-16777216&Gb.E||(Gb.Bb=Gb.Bb<<8|E(Gb.Ab),Gb.E<<=8);ca.ib=Xa+(la<<4);Xa=ca.ib;Gb=ca.Fb;P=ca.e;cb=1;for(na=$a=0;Gb.F>na;++na)la=ab(P,Gb.G,cb),cb<<=1,cb+=la,$a|=la<<na;if(ca.ib=Xa+$a,0>ca.ib){ca=-1==ca.ib?1:-1;break a}}else ca.ib=cb;if(Ua(Sa(ca.ib),
ca.g)>=0||ca.ib>=ca.nb){ca=-1;break a}Xa=ca.B;Gb=K;P=Xa.o-ca.ib-1;for(0>P&&(P+=Xa.M);0!=Gb;--Gb)P>=Xa.M&&(P=0),Xa.Lb[Xa.o++]=Xa.Lb[P++],Xa.o>=Xa.M&&Ta(Xa);ca.g=aa(ca.g,Sa(K));ca.jc=hb(ca.B,0)}else{Xa=ca.gb;Gb=wa(ca.g);Xa=Xa.V[((Gb&Xa.qc)<<Xa.u)+((255&ca.jc)>>>8-Xa.u)];if(7>ca.U){Gb=ca.e;K=1;do K=K<<1|ab(Gb,Xa.Ib,K);while(256>K);Xa=K<<24>>24}else{Gb=ca.e;K=hb(ca.B,ca.ib);P=1;do if(na=K>>7&1,K<<=1,la=ab(Gb,Xa.Ib,(1+na<<8)+P),P=P<<1|la,na!=la){for(;256>P;)P=P<<1|ab(Gb,Xa.Ib,P);break}while(256>P);Xa=
P<<24>>24}ca.jc=Xa;Xa=ca.B;Gb=ca.jc;Xa.Lb[Xa.o++]=Gb;Xa.o>=Xa.M&&Ta(Xa);ca.U=Ja(ca.U);ca.g=aa(ca.g,pm)}ca=0}if(-1==ca)throw Error("corrupted input");D.Pb=hk;D.Pc=D.Z.g;if(ca||Ua(D.Z.Nc,Lg)>=0&&Ua(D.Z.g,D.Z.Nc)>=0)Ta(D.Z.B),ca=D.Z.B,Ta(ca),ca.cc=null,D.Z.e.Ab=null,D.zc=0}return D.zc}function Da(D,K){for(;K>D.O;++D.O)D.ec[D.O]=O({},3),D.hc[D.O]=O({},3)}function da(D,K,P){return ab(K,D.wc,0)?8+(ab(K,D.wc,1)?8+y(D.tc,K):y(D.hc[P],K)):y(D.ec[P],K)}function Vd(D){return D.wc=Nb(2),D.ec=Nb(16),D.hc=Nb(16),
D.tc=O({},8),D.O=0,D}function dd(D){sb(D.wc);for(var K=0;D.O>K;++K)sb(D.ec[K].G),sb(D.hc[K].G);sb(D.tc.G)}function rb(D,K){D.jb=K;var P=D.a[K].r;var la=D.a[K].j;do{if(D.a[K].t){var na=D.a[P];na.j=-1;na.t=0;D.a[P].r=P-1;D.a[K].Ac&&(D.a[P-1].t=0,D.a[P-1].r=D.a[K].r2,D.a[P-1].j=D.a[K].j2)}var ca=P;na=la;la=D.a[ca].j;P=D.a[ca].r;D.a[ca].j=na;D.a[ca].r=K;K=ca}while(K>0);return D.mb=D.a[0].j,D.q=D.a[0].r}function Ad(D){for(var K=0;16>K;++K){var P=D.nc,la=K,na,ca=D.S,Xa=K,cb=1,$a=0;for(na=ca.F;0!=na;--na){var Gb=
1&Xa;Xa>>>=1;$a+=mf(ca.G[cb],Gb);cb=cb<<1|Gb}P[la]=$a}D.Qb=0}function T(D){var K;for(K=4;128>K;++K){var P=Va(K);var la=(P>>1)-1;var na=(2|1&P)<<la;var ca=D.yc;var Xa=K;var cb=D.Sb;P=na-P-1;na=K-na;for(var $a=1,Gb=0;0!=la;--la){var Ib=1&na;na>>>=1;Gb+=Dd[(2047&(cb[P+$a]-Ib^-Ib))>>>2];$a=$a<<1|Ib}ca[Xa]=Gb}for(ca=0;4>ca;++ca){K=D.K[ca];Xa=ca<<6;for(P=0;D.$b>P;++P)D.P[Xa+P]=N(K,P);for(P=14;D.$b>P;++P)D.P[Xa+P]+=(P>>1)-1-4<<6;cb=128*ca;for(K=0;4>K;++K)D.lb[cb+K]=D.P[Xa+K];for(;128>K;++K)D.lb[cb+K]=D.P[Xa+
Va(K)]+D.yc[K]}D.Mb=0}function Bd(D,K){Mb(D);K&=D.y;D.Gc&&(ec(D.d,D.C,(D.l<<4)+K,1),ec(D.d,D.bb,D.l,0),D.l=7>D.l?7:10,qc(D.$,D.d,0,K),K=ma(2),nb(D.K[K],D.d,63),Jb(D.d,67108863,26),ac(D.S,D.d,15));for(K=0;5>K;++K)Nh(D.d)}function nd(D,K){var P,la,na,ca,Xa,cb,$a,Gb,Ib,Ob,Fb,Vc,k,Ea,Je,tc,de,pe,ld,fj,gb,wc,gj,p,sn,Kk,om,Gj;if(D.jb!=D.q)return Ob=D.a[D.q].r-D.q,D.mb=D.a[D.q].j,D.q=D.a[D.q].r,Ob;if(D.q=D.jb=0,D.N?(Ib=D.vb,D.N=0):Ib=pb(D),Ob=D.D,de=Db(D.b)+1,2>de)return D.mb=-1,1;de>273&&(de=273);for(cb=
$a=0;4>cb;++cb)D.x[cb]=D.v[cb],D.Q[cb]=ic(D.b,-1,D.x[cb],273),D.Q[cb]>D.Q[$a]&&($a=cb);if(D.Q[$a]>=D.n)return D.mb=$a,Ob=D.Q[$a],K=Ob-1,K>0&&(ja(D.b,K),D.s+=K),Ob;if(Ib>=D.n)return D.mb=D.m[Ob-1]+4,K=Ib-1,K>0&&(ja(D.b,K),D.s+=K),Ib;if(Xa=Na(D.b,-1),Ea=Na(D.b,-D.v[0]-1-1),2>Ib&&Xa!=Ea&&2>D.Q[$a])return D.mb=-1,1;D.a[0].Hc=D.l;var ye=K&D.y;D.a[1].z=Dd[D.C[(D.l<<4)+ye]>>>2]+S(M(D.A,K,D.J),D.l>=7,Ea,Xa);var xg=D.a[1];xg.j=-1;xg.t=0;xg=Dd[2048-D.C[(D.l<<4)+ye]>>>2];var ii=xg+Dd[2048-D.bb[D.l]>>>2];if(Ea==
Xa){var Ph=D.l;Ph=ii+(Dd[D.hb[Ph]>>>2]+Dd[D._[(Ph<<4)+ye]>>>2]);D.a[1].z>Ph&&(D.a[1].z=Ph,cb=D.a[1],cb.j=0,cb.t=0)}if(Gb=Ib>=D.Q[$a]?Ib:D.Q[$a],2>Gb)return D.mb=D.a[1].j,1;D.a[1].r=0;D.a[0].bc=D.x[0];D.a[0].ac=D.x[1];D.a[0].dc=D.x[2];D.a[0].lc=D.x[3];$a=Gb;do D.a[$a--].z=268435455;while($a>=2);for(cb=0;4>cb;++cb)if(k=D.Q[cb],!(2>k)){var ji=ii+fa(D,cb,D.l,ye);do{var le=ji+D.i.Cc[272*ye+(k-2)];var rc=D.a[k];rc.z>le&&(rc.z=le,rc.r=0,rc.j=cb,rc.t=0)}while(--k>=2)}if(k=xg+Dd[D.bb[D.l]>>>2],$a=D.Q[0]>=
2?D.Q[0]+1:2,Ib>=$a){for(Ib=0;$a>D.m[Ib];)Ib+=2;for(;P=D.m[Ib+1],le=k+Fa(D,P,$a,ye),rc=D.a[$a],rc.z>le&&(rc.z=le,rc.r=0,rc.j=P+4,rc.t=0),$a!=D.m[Ib]||(Ib+=2,Ib!=Ob);++$a);}for(P=0;;){if(++P,P==Gb)return rb(D,P);if(Je=pb(D),Ob=D.D,Je>=D.n)return D.vb=Je,D.N=1,rb(D,P);if(++K,gb=D.a[P].r,D.a[P].t?(--gb,D.a[P].Ac?(wc=D.a[D.a[P].r2].Hc,wc=4>D.a[P].j2?7>wc?8:11:7>wc?7:10):wc=D.a[gb].Hc,wc=Ja(wc)):wc=D.a[gb].Hc,gb==P-1?wc=D.a[P].j?Ja(wc):7>wc?9:11:(D.a[P].t&&D.a[P].Ac?(gb=D.a[P].r2,fj=D.a[P].j2,wc=7>wc?
8:11):(fj=D.a[P].j,wc=4>fj?7>wc?8:11:7>wc?7:10),ld=D.a[gb],4>fj?fj?1==fj?(D.x[0]=ld.ac,D.x[1]=ld.bc,D.x[2]=ld.dc,D.x[3]=ld.lc):2==fj?(D.x[0]=ld.dc,D.x[1]=ld.bc,D.x[2]=ld.ac,D.x[3]=ld.lc):(D.x[0]=ld.lc,D.x[1]=ld.bc,D.x[2]=ld.ac,D.x[3]=ld.dc):(D.x[0]=ld.bc,D.x[1]=ld.ac,D.x[2]=ld.dc,D.x[3]=ld.lc):(D.x[0]=fj-4,D.x[1]=ld.bc,D.x[2]=ld.ac,D.x[3]=ld.dc)),D.a[P].Hc=wc,D.a[P].bc=D.x[0],D.a[P].ac=D.x[1],D.a[P].dc=D.x[2],D.a[P].lc=D.x[3],ca=D.a[P].z,Xa=Na(D.b,-1),Ea=Na(D.b,-D.x[0]-1-1),ye=K&D.y,la=ca+Dd[D.C[(wc<<
4)+ye]>>>2]+S(M(D.A,K,Na(D.b,-2)),wc>=7,Ea,Xa),tc=D.a[P+1],Ib=0,tc.z>la&&(tc.z=la,tc.r=P,tc.j=-1,tc.t=0,Ib=1),xg=ca+Dd[2048-D.C[(wc<<4)+ye]>>>2],ii=xg+Dd[2048-D.bb[wc]>>>2],Ea!=Xa||P>tc.r&&!tc.j||(Ph=ii+(Dd[D.hb[wc]>>>2]+Dd[D._[(wc<<4)+ye]>>>2]),tc.z>=Ph&&(tc.z=Ph,tc.r=P,tc.j=0,tc.t=0,Ib=1)),pe=Db(D.b)+1,pe=pe>4095-P?4095-P:pe,de=pe,!(2>de)){if(de>D.n&&(de=D.n),!Ib&&Ea!=Xa&&(gj=Math.min(pe-1,D.n),Vc=ic(D.b,0,D.x[0],gj),Vc>=2)){cb=Ja(wc);rc=K+1&D.y;le=la+Dd[2048-D.C[(cb<<4)+rc]>>>2]+Dd[2048-D.bb[cb]>>>
2];for(ji=P+1+Vc;ji>Gb;)D.a[++Gb].z=268435455;le+=(p=D.i.Cc[272*rc+(Vc-2)],p+fa(D,0,cb,rc));rc=D.a[ji];rc.z>le&&(rc.z=le,rc.r=P+1,rc.j=0,rc.t=1,rc.Ac=0)}$a=2;for(Ib=0;4>Ib;++Ib)if(Fb=ic(D.b,-1,D.x[Ib],de),!(2>Fb)){k=Fb;do{for(;P+Fb>Gb;)D.a[++Gb].z=268435455;le=ii+(sn=D.i.Cc[272*ye+(Fb-2)],sn+fa(D,Ib,wc,ye));rc=D.a[P+Fb];rc.z>le&&(rc.z=le,rc.r=P,rc.j=Ib,rc.t=0)}while(--Fb>=2);if(Fb=k,Ib||($a=Fb+1),pe>Fb&&(gj=Math.min(pe-1-Fb,D.n),Vc=ic(D.b,Fb,D.x[Ib],gj),Vc>=2)){cb=7>wc?8:11;rc=K+Fb&D.y;le=ii+(Kk=
D.i.Cc[272*ye+(Fb-2)],Kk+fa(D,Ib,wc,ye))+Dd[D.C[(cb<<4)+rc]>>>2]+S(M(D.A,K+Fb,Na(D.b,Fb-1-1)),1,Na(D.b,Fb-1-(D.x[Ib]+1)),Na(D.b,Fb-1));cb=Ja(cb);rc=K+Fb+1&D.y;le+=Dd[2048-D.C[(cb<<4)+rc]>>>2];le+=Dd[2048-D.bb[cb]>>>2];for(ji=Fb+1+Vc;P+ji>Gb;)D.a[++Gb].z=268435455;le+=(om=D.i.Cc[272*rc+(Vc-2)],om+fa(D,0,cb,rc));rc=D.a[P+ji];rc.z>le&&(rc.z=le,rc.r=P+Fb+1,rc.j=0,rc.t=1,rc.Ac=1,rc.r2=P,rc.j2=Ib)}}if(Je>de){Je=de;for(Ob=0;Je>D.m[Ob];Ob+=2);D.m[Ob]=Je;Ob+=2}if(Je>=$a){for(k=xg+Dd[D.bb[wc]>>>2];P+Je>Gb;)D.a[++Gb].z=
268435455;for(Ib=0;$a>D.m[Ib];)Ib+=2;for(Fb=$a;;++Fb)if(na=D.m[Ib+1],le=k+Fa(D,na,Fb,ye),rc=D.a[P+Fb],rc.z>le&&(rc.z=le,rc.r=P,rc.j=na+4,rc.t=0),Fb==D.m[Ib]){if(pe>Fb&&(gj=Math.min(pe-1-Fb,D.n),Vc=ic(D.b,Fb,na,gj),Vc>=2)){cb=7>wc?7:10;rc=K+Fb&D.y;le=le+Dd[D.C[(cb<<4)+rc]>>>2]+S(M(D.A,K+Fb,Na(D.b,Fb-1-1)),1,Na(D.b,Fb-(na+1)-1),Na(D.b,Fb-1));cb=Ja(cb);rc=K+Fb+1&D.y;le+=Dd[2048-D.C[(cb<<4)+rc]>>>2];le+=Dd[2048-D.bb[cb]>>>2];for(ji=Fb+1+Vc;P+ji>Gb;)D.a[++Gb].z=268435455;le+=(Gj=D.i.Cc[272*rc+(Vc-2)],
Gj+fa(D,0,cb,rc));rc=D.a[P+ji];rc.z>le&&(rc.z=le,rc.r=P+Fb+1,rc.j=0,rc.t=1,rc.Ac=1,rc.r2=P,rc.j2=na+4)}if(Ib+=2,Ib==Ob)break}}}}}function Fa(D,K,P,la){var na,ca=ma(P);return na=128>K?D.lb[128*ca+K]:D.P[(ca<<6)+(131072>K?ik[K>>6]+12:134217728>K?ik[K>>16]+32:ik[K>>26]+52)]+D.nc[15&K],na+D.$.Cc[272*la+(P-2)]}function fa(D,K,P,la){var na;return K?(na=Dd[2048-D.hb[P]>>>2],1==K?na+=Dd[D.Ub[P]>>>2]:(na+=Dd[2048-D.Ub[P]>>>2],na+=mf(D.vc[P],K-2))):(na=Dd[D.hb[P]>>>2],na+=Dd[2048-D._[(P<<4)+la]>>>2]),na}function pb(D){var K=
0;a:{var P=D.b;var la=D.m,na,ca,Xa,cb,$a,Gb,Ib,Ob;if(P.h>=P.o+P.ob)var Fb=P.ob;else if(Fb=P.h-P.o,P.xb>Fb){P=(tb(P),0);break a}var Vc=0;var k=P.o>P.p?P.o-P.p:0;var Ea=P.f+P.o;var Je=1;var tc=$a=0;P.qb?(ca=Ij[255&P.c[Ea]]^255&P.c[Ea+1],$a=1023&ca,ca^=(255&P.c[Ea+2])<<8,tc=65535&ca,Gb=(ca^Ij[255&P.c[Ea+3]]<<5)&P.Ec):Gb=255&P.c[Ea]^(255&P.c[Ea+1])<<8;ca=P.ub[P.R+Gb]||0;P.qb&&(na=P.ub[$a]||0,Xa=P.ub[1024+tc]||0,P.ub[$a]=P.o,P.ub[1024+tc]=P.o,na>k&&P.c[P.f+na]==P.c[Ea]&&(la[Vc++]=Je=2,la[Vc++]=P.o-na-
1),Xa>k&&P.c[P.f+Xa]==P.c[Ea]&&(Xa==na&&(Vc-=2),la[Vc++]=Je=3,la[Vc++]=P.o-Xa-1,na=Xa),0!=Vc&&na==ca&&(Vc-=2,Je=1));P.ub[P.R+Gb]=P.o;Gb=(P.k<<1)+1;var de=P.k<<1;$a=tc=P.w;0!=P.w&&ca>k&&P.c[P.f+ca+P.w]!=P.c[Ea+P.w]&&(la[Vc++]=Je=P.w,la[Vc++]=P.o-ca-1);for(na=P.Fc;;){if(k>=ca||0==na--){P.L[Gb]=P.L[de]=0;break}if(cb=P.o-ca,Xa=(P.k>=cb?P.k-cb:P.k-cb+P.p)<<1,Ob=P.f+ca,Ib=tc>$a?$a:tc,P.c[Ob+Ib]==P.c[Ea+Ib]){for(;++Ib!=Fb&&P.c[Ob+Ib]==P.c[Ea+Ib];);if(Ib>Je&&(la[Vc++]=Je=Ib,la[Vc++]=cb-1,Ib==Fb)){P.L[de]=
P.L[Xa];P.L[Gb]=P.L[Xa+1];break}}(255&P.c[Ea+Ib])>(255&P.c[Ob+Ib])?(P.L[de]=ca,de=Xa+1,ca=P.L[de],tc=Ib):(P.L[Gb]=ca,Gb=Xa,ca=P.L[Gb],$a=Ib)}P=(tb(P),Vc)}return D.D=P,D.D>0&&(K=D.m[D.D-2],K==D.n&&(K+=ic(D.b,K-1,D.m[D.D-1],273-K))),++D.s,K}function Mb(D){D.b&&D.W&&(D.b.cc=null,D.W=0)}function Va(D){return 2048>D?ik[D]:2097152>D?ik[D>>10]+20:ik[D>>20]+40}function ya(D,K){sb(D.db);for(var P=0;K>P;++P)sb(D.Vb[P].G),sb(D.Wb[P].G);sb(D.ic.G)}function Rf(D,K,P,la,na){var ca;var Xa=Dd[D.db[0]>>>2];var cb=
Dd[2048-D.db[0]>>>2];var $a=cb+Dd[D.db[1]>>>2];cb+=Dd[2048-D.db[1]>>>2];for(ca=0;8>ca;++ca){if(ca>=P)return;la[na+ca]=Xa+N(D.Vb[K],ca)}for(;16>ca;++ca){if(ca>=P)return;la[na+ca]=$a+N(D.Wb[K],ca-8)}for(;P>ca;++ca)la[na+ca]=cb+N(D.ic,ca-8-8)}function qc(D,K,P,la){8>P?(ec(K,D.db,0,0),nb(D.Vb[la],K,P)):(P-=8,ec(K,D.db,0,1),8>P?(ec(K,D.db,1,0),nb(D.Wb[la],K,P)):(ec(K,D.db,1,1),nb(D.ic,K,P-8)));0==--D.sc[la]&&(Rf(D,la,D.rb,D.Cc,272*la),D.sc[la]=D.rb)}function Wa(D){D.db=Nb(2);D.Vb=Nb(16);D.Wb=Nb(16);D.ic=
H({},8);for(var K=0;16>K;++K)D.Vb[K]=H({},3),D.Wb[K]=H({},3);return D.Cc=[],D.sc=[],D}function V(D,K){for(var P=0;K>P;++P)Rf(D,P,D.rb,D.Cc,272*P),D.sc[P]=D.rb}function M(D,K,P){return D.V[((K&D.qc)<<D.u)+((255&P)>>>8-D.u)]}function ib(D,K,P){var la,na=1;for(la=7;la>=0;--la){var ca=P>>la&1;ec(K,D.tb,na,ca);na=na<<1|ca}}function S(D,K,P,la){var na,ca,Xa=1,cb=7,$a=0;if(K)for(;cb>=0;--cb)if(ca=P>>cb&1,na=la>>cb&1,$a+=mf(D.tb[(1+ca<<8)+Xa],na),Xa=Xa<<1|na,ca!=na){--cb;break}for(;cb>=0;--cb)na=la>>cb&1,
$a+=mf(D.tb[Xa],na),Xa=Xa<<1|na;return $a}function O(D,K){return D.F=K,D.G=Nb(1<<K),D}function y(D,K){var P,la=1;for(P=D.F;0!=P;--P)la=(la<<1)+ab(K,D.G,la);return la-(1<<D.F)}function H(D,K){return D.F=K,D.G=Nb(1<<K),D}function nb(D,K,P){var la,na=1;for(la=D.F;0!=la;){--la;var ca=P>>>la&1;ec(K,D.G,na,ca);na=na<<1|ca}}function N(D,K){var P,la=1,na=0;for(P=D.F;0!=P;){--P;var ca=K>>>P&1;na+=mf(D.G[la],ca);la=(la<<1)+ca}return na}function ac(D,K,P){var la,na=1;for(la=0;D.F>la;++la){var ca=1&P;ec(K,D.G,
na,ca);na=na<<1|ca;P>>=1}}function ab(D,K,P){var la,na=K[P];return la=(D.E>>>11)*na,(-2147483648^la)>(-2147483648^D.Bb)?(D.E=la,K[P]=na+(2048-na>>>5)<<16>>16,-16777216&D.E||(D.Bb=D.Bb<<8|E(D.Ab),D.E<<=8),0):(D.E-=la,D.Bb-=la,K[P]=na-(na>>>5)<<16>>16,-16777216&D.E||(D.Bb=D.Bb<<8|E(D.Ab),D.E<<=8),1)}function sb(D){for(var K=D.length-1;K>=0;--K)D[K]=1024}function ec(D,K,P,la){var na=K[P];var ca=(D.E>>>11)*na;la?(D.xc=aa(D.xc,jb(Sa(ca),[4294967295,0])),D.E-=ca,K[P]=na-(na>>>5)<<16>>16):(D.E=ca,K[P]=na+
(2048-na>>>5)<<16>>16);-16777216&D.E||(D.E<<=8,Nh(D))}function Jb(D,K,P){for(--P;P>=0;--P)D.E>>>=1,1==(K>>>P&1)&&(D.xc=aa(D.xc,Sa(D.E))),-16777216&D.E||(D.E<<=8,Nh(D))}function Nh(D){var K=D.xc;var P=32;var la;var na=(P&=63,la=m(K,P),0>K[1]&&(la=aa(la,La([2,0],63-P))),la);na=wa(na);if(0!=na||Ua(D.xc,[4278190080,0])<0){D.mc=aa(D.mc,Sa(D.Jb));P=D.Oc;do K=D.Ab,P+=na,K.Mc[K.Yb++]=P<<24>>24,P=255;while(0!=--D.Jb);D.Oc=wa(D.xc)>>>24}++D.Jb;D.xc=La(jb(D.xc,[16777215,0]),8)}function mf(D,K){return Dd[(2047&
(D-K^-K))>>>2]}function Tf(D){for(var K,P,la,na=0,ca=0,Xa=D.length,cb=[],$a=[];Xa>na;++na,++ca){if(K=255&D[na],128&K)if(192==(224&K)){if(na+1>=Xa||(P=255&D[++na],128!=(192&P)))return D;$a[ca]=(31&K)<<6|63&P}else{if(224!=(240&K)||na+2>=Xa||(P=255&D[++na],128!=(192&P))||(la=255&D[++na],128!=(192&la)))return D;$a[ca]=(15&K)<<12|(63&P)<<6|63&la}else{if(!K)return D;$a[ca]=K}16383==ca&&(cb.push(String.fromCharCode.apply(String,$a)),ca=-1)}return ca>0&&($a.length=ca,cb.push(String.fromCharCode.apply(String,
$a))),cb.join("")}function Hi(D){var K,P,la=[],na=0,ca=D.length;if("object"==typeof D)return D;for(P=K=0;ca>P;++P)la[K++]=D.charCodeAt(P);for(P=0;ca>P;++P)D=la[P],D>=1&&127>=D?++na:na+=!D||D>=128&&2047>=D?2:3;K=[];for(P=na=0;ca>P;++P)D=la[P],D>=1&&127>=D?K[na++]=D<<24>>24:!D||D>=128&&2047>=D?(K[na++]=(192|D>>6&31)<<24>>24,K[na++]=(128|63&D)<<24>>24):(K[na++]=(224|D>>12&15)<<24>>24,K[na++]=(128|D>>6&63)<<24>>24,K[na++]=(128|63&D)<<24>>24);return K}function cg(D){return D[1]+D[0]}var Ji="function"==
typeof setImmediate?setImmediate:setTimeout,nf=4294967296,hk=[4294967295,-nf],Hj=[0,-0x7fffffffffffffff],Lg=[0,0],pm=[1,0],Ij=function(){var D,K,P=[];for(D=0;256>D;++D){var la=D;for(K=0;8>K;++K)0!=(1&la)?la=la>>>1^-306674912:la>>>=1;P[D]=la}return P}(),ik=function(){var D,K,P=2,la=[0,1];for(K=2;22>K;++K){var na=1<<(K>>1)-1;for(D=0;na>D;++D,++P)la[P]=K<<24>>24}return la}(),Dd=function(){var D,K,P=[];for(K=8;K>=0;--K){var la=1<<9-K-1;for(D=1<<9-K;D>la;++la)P[la]=(K<<6)+(D-la<<6>>>9-K-1)}return P}(),
Pk=function(){var D=[{s:16,f:64,m:0},{s:20,f:64,m:0},{s:19,f:64,m:1},{s:20,f:64,m:1},{s:21,f:128,m:1},{s:22,f:128,m:1},{s:23,f:128,m:1},{s:24,f:255,m:1},{s:25,f:255,m:1}];return function(K){return D[K-1]||D[6]}}();return"undefined"==typeof onmessage||"undefined"!=typeof window&&void 0!==window.document||!function(){onmessage=function(D){D&&D.gc&&(D.gc.action==2?e.decompress(D.gc.gc,D.gc.cbn):D.gc.action==1&&e.compress(D.gc.gc,D.gc.Rc,D.gc.cbn))}}(),{compress:function(D,K,P,la){function na(){try{for(var Gb,
Ib=(new Date).getTime();zb(cb.c.yb);)if(ca=cg(cb.c.yb.Pb)/cg(cb.c.Tb),(new Date).getTime()-Ib>200)return la(ca),Ji(na,0),0;la(1);Gb=B(cb.c.Nb);Ji(P.bind(null,Gb),0)}catch(Ob){P(null,Ob)}}var ca,Xa,cb={},$a=void 0===P&&void 0===la;if("function"!=typeof P&&(Xa=P,P=la=0),la=la||function(Gb){void 0!==Xa&&postMessage({action:3,cbn:Xa,result:Gb})},P=P||function(Gb,Ib){return void 0!==Xa?postMessage({action:1,cbn:Xa,result:Gb,error:Ib}):void 0},$a){for(cb.c=ua({},Hi(D),Pk(K));zb(cb.c.yb););return B(cb.c.Nb)}try{cb.c=
ua({},Hi(D),Pk(K)),la(0)}catch(Gb){return P(null,Gb)}Ji(na,0)},decompress:function(D,K,P){function la(){try{for(var Ib,Ob=0,Fb=(new Date).getTime();zb(Xa.d.yb);)if(++Ob%1E3==0&&(new Date).getTime()-Fb>200)return Gb&&(na=cg(Xa.d.yb.Z.g)/$a,P(na)),Ji(la,0),0;P(1);Ib=Tf(B(Xa.d.Nb));Ji(K.bind(null,Ib),0)}catch(Vc){K(null,Vc)}}var na,ca,Xa={},cb=void 0===K&&void 0===P;if("function"!=typeof K&&(ca=K,K=P=0),P=P||function(Ib){void 0!==ca&&postMessage({action:3,cbn:ca,result:Gb?Ib:-1})},K=K||function(Ib,Ob){return void 0!==
ca?postMessage({action:2,cbn:ca,result:Ib,error:Ob}):void 0},cb){for(Xa.d=Ba({},D);zb(Xa.d.yb););return Tf(B(Xa.d.Nb))}try{Xa.d=Ba({},D);var $a=cg(Xa.d.Tb);var Gb=$a>-1;P(0)}catch(Ib){return K(null,Ib)}Ji(la,0)}}}();this.LZMA=this.LZMA_WORKER=e}
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var saveAs=saveAs||function(Nb){if(!(typeof Nb==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent))){var aa=Nb.document.createElementNS("http://www.w3.org/1999/xhtml","a"),jb="download"in aa,Ua=/constructor/i.test(Nb.HTMLElement)||Nb.safari,Qa=/CriOS\/[\d]+/.test(navigator.userAgent),Sa=function(t){(Nb.setImmediate||Nb.setTimeout)(function(){throw t;},0)},wa=function(t){setTimeout(function(){typeof t===
"string"?(Nb.URL||Nb.webkitURL||Nb).revokeObjectURL(t):t.remove()},4E4)},I=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},La=function(t,E,R){R||(t=I(t));var B=this,sa=t.type==="application/octet-stream",ua=function(){var Na=["writestart","progress","write","writeend"];Na=[].concat(Na);for(var ic=Na.length;ic--;){var Db=B["on"+Na[ic]];if(typeof Db==="function")try{Db.call(B,B)}catch(qa){Sa(qa)}}};
B.readyState=B.INIT;if(jb){var Ba=(Nb.URL||Nb.webkitURL||Nb).createObjectURL(t);setTimeout(function(){aa.href=Ba;aa.download=E;var Na=new MouseEvent("click");aa.dispatchEvent(Na);ua();wa(Ba);B.readyState=B.DONE})}else(function(){if((Qa||sa&&Ua)&&Nb.FileReader){var Na=new FileReader;Na.onloadend=function(){var ic=Qa?Na.result:Na.result.replace(/^data:[^;]*;/,"data:attachment/file;");Nb.open(ic,"_blank")||(Nb.location.href=ic);B.readyState=B.DONE;ua()};Na.readAsDataURL(t);B.readyState=B.INIT}else Ba||=
(Nb.URL||Nb.webkitURL||Nb).createObjectURL(t),sa?Nb.location.href=Ba:Nb.open(Ba,"_blank")||(Nb.location.href=Ba),B.readyState=B.DONE,ua(),wa(Ba)})()},m=La.prototype;if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob)return function(t,E,R){E=E||t.name||"download";R||(t=I(t));return navigator.msSaveOrOpenBlob(t,E)};m.abort=function(){};m.readyState=m.INIT=0;m.WRITING=1;m.DONE=2;m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null;return function(t,E,R){return new La(t,
E||t.name||"download",R)}}}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);typeof module!=="undefined"&&module.exports?module.exports.saveAs=saveAs:typeof define!=="undefined"&&define!==null&&define.amd!==null&&define("FileSaver.js",function(){return saveAs})}typeof self!=="undefined"&&self.constructor.name.includes("Worker");
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){window.BlobBuilder=window.MozBlobBuilder||window.WebKitBlobBuilder||window.BlobBuilder;var TBU_filedata,TBU_piecesize=524288,TBU_originalsize,TBU_start,TBU_end,TBU_part,TBU_total,TBU_chunk,TBU_xhr,TBU_info_a,TBU_info_r,TBU_info_u,TBU_info_s,TBU_info_url,TBU_uploading=!1,TBU_input=document.createElement("input");TBU_input.setAttribute("type","file");TBU_input.setAttribute("name","TBU_input");TBU_input.setAttribute("onChange",
"TBU_fileSelected();")}if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var embed_display=!1,embed_area=null,embed_frame=null,tilbuci_resize=[];tilbuci_resize.push(function(){embed_display&&embed_area!=null&&embed_frame!=null&&(embed_frame.style.width=embed_area.clientWidth+"px",embed_frame.style.height=embed_area.clientHeight+"px")});window.onresize=function(Nb){for(Nb=0;Nb<tilbuci_resize.length;Nb++)tilbuci_resize[Nb]()}}
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var overlay_display=!1,overlay_area=null,overlay_frame=null,overlay_title=null;tilbuci_resize.push(function(){overlay_display&&overlay_area!=null&&overlay_frame!=null&&(overlay_frame.style.width=overlay_area.clientWidth-120+"px",overlay_frame.style.height=overlay_area.clientHeight-100+"px")})}typeof define==="function"&&define.__amd&&(define.amd=define.__amd,delete define.__amd);
